mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-04-30 23:37:46 +00:00

this patch implements a UI for the Quarantine, designed to be looked at on mobile phones for this we use Framework7 instead of extjs, since it has much more features and looks more native on phones Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
27 lines
533 B
JavaScript
27 lines
533 B
JavaScript
class Component {
|
|
constructor(config = {}) {
|
|
var me = this;
|
|
me.config = config;
|
|
me.data = config.data || {};
|
|
me.tpl = me.config.tpl || '<div class="component"></div>';
|
|
}
|
|
getTpl() {
|
|
var me = this;
|
|
if (!me._compiledtpl) {
|
|
me._compiledtpl = Template7.compile(me.tpl);
|
|
}
|
|
return me._compiledtpl;
|
|
}
|
|
getEl(data) {
|
|
var me = this;
|
|
if (data === undefined && me._el) {
|
|
return me._el;
|
|
} else if (data !== undefined) {
|
|
me.data =data;
|
|
}
|
|
me._el = Dom7(me.getTpl()(me.data));
|
|
return me._el;
|
|
}
|
|
}
|
|
|