mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
WIP of admin cmds template
This commit is contained in:
parent
48f2513f40
commit
ff84674275
@ -123,6 +123,17 @@ app.classes.admin = AppJS.extend(
|
|||||||
case 'admin.mailaccount':
|
case 'admin.mailaccount':
|
||||||
this.account_hide_not_applying();
|
this.account_hide_not_applying();
|
||||||
break;
|
break;
|
||||||
|
case 'admin.cmds':
|
||||||
|
var selected = this.et2.getWidgetById('nm').getSelection();
|
||||||
|
if (selected && selected.ids.length == 1)
|
||||||
|
{
|
||||||
|
this.cmds_onselect(selected.ids);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.et2.getWidgetById('splitter').dock();
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1340,5 +1351,45 @@ app.classes.admin = AppJS.extend(
|
|||||||
function(_data){
|
function(_data){
|
||||||
taglist.set_value(_data);
|
taglist.set_value(_data);
|
||||||
}).sendRequest();
|
}).sendRequest();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set content of selected row
|
||||||
|
*
|
||||||
|
* @param {array} node
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
cmds_onselect: function (node)
|
||||||
|
{
|
||||||
|
var splitter = this.et2.getWidgetById('splitter');
|
||||||
|
var cmds_preview = this.et2.getWidgetById('cmds_preview');
|
||||||
|
if (node.length != 1)
|
||||||
|
{
|
||||||
|
splitter.dock();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (splitter.isDocked())
|
||||||
|
{
|
||||||
|
splitter.undock();
|
||||||
|
}
|
||||||
|
var data = egw.dataGetUIDdata(node[0]);
|
||||||
|
var policy_preview = this.et2.getWidgetById('policy_preview');
|
||||||
|
var id = node[0].replace('admin::', '');
|
||||||
|
|
||||||
|
if (app.policy)
|
||||||
|
{
|
||||||
|
cmds_preview.set_disabled(true);
|
||||||
|
policy_preview.set_src(egw.link('/index.php', {
|
||||||
|
menuaction:'policy.EGroupware\\Policy\\History.view',
|
||||||
|
'cmd_id':id,
|
||||||
|
'cmd_template': "policy.admin_cmd_history"
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
policy_preview.set_disabled(true);
|
||||||
|
cmds_preview.set_value({content:[data.data]});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -181,4 +181,17 @@ select#admin-mailaccount_ident_id {
|
|||||||
}
|
}
|
||||||
#admin-acl {width:99%;}
|
#admin-acl {width:99%;}
|
||||||
|
|
||||||
#admin-categories-edit_owner {overflow-y: auto;}
|
#admin-categories-edit_owner {overflow-y: auto;}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Admin command
|
||||||
|
*/
|
||||||
|
|
||||||
|
#admin-cmds_nm {min-height: 100px;}
|
||||||
|
#admin-cmds .et2_split {padding-right: 10px;}
|
||||||
|
#admin-cmds_preview {width:100%; height:100%;}
|
||||||
|
#admin-cmds div.splitter-bar-horizontal {
|
||||||
|
border-top: 1px solid #B4B4B4;
|
||||||
|
border-left: 0;
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
@ -65,14 +65,43 @@
|
|||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
</template>
|
</template>
|
||||||
<template id="admin.cmds" template="" lang="" group="0" version="1.5.001">
|
<template id="admin.cmds.splitter" template="" lang="" height="100%" group="0" version="19.01">
|
||||||
<grid width="100%">
|
<split orientation="h" height="100%" id="splitter" dock_side="bottomDock">
|
||||||
|
<nextmatch options="admin.cmds.rows" id="nm" onselect="app.admin.cmds_onselect"/>
|
||||||
|
<template id="admin.cmds.preview"/>
|
||||||
|
</split>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template id="admin.cmds" template="" lang="" height="100%" group="0" version="1.5.001">
|
||||||
|
<template id="admin.cmds.splitter" height="100%"/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template id="admin.cmds.preview" template="" lang="" group="0" version="1.5.001">
|
||||||
|
<iframe id="policy_preview" src=""/>
|
||||||
|
<grid id="cmds_preview">
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column width="90"/>
|
||||||
|
<column />
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
<nextmatch options="admin.cmds.rows" id="nm"/>
|
<description value="Title" label="%s:"/>
|
||||||
|
<description value="$row_cont[title]"/>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<description value="Comment" label="%s:"/>
|
||||||
|
<description value="$row_cont[comment]"/>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<description value="Creator" label="%s:"/>
|
||||||
|
<hbox>
|
||||||
|
<description value="$row_cont[creator]" label="%s("/>
|
||||||
|
<description value="$row_cont[creator_email]" label="%s)"/>
|
||||||
|
</hbox>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<description value="Data" label="%s:"/>
|
||||||
|
<description value="$row_cont[data]"/>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
@ -190,9 +190,27 @@ select#admin-mailaccount_ident_id {
|
|||||||
#admin-categories-edit_owner {
|
#admin-categories-edit_owner {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
Admin command
|
||||||
|
*/
|
||||||
|
#admin-cmds_nm {
|
||||||
|
min-height: 100px;
|
||||||
|
}
|
||||||
|
#admin-cmds .et2_split {
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
#admin-cmds_preview {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
#admin-cmds div.splitter-bar-horizontal {
|
||||||
|
border-top: 1px solid #B4B4B4;
|
||||||
|
border-left: 0;
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
@media all {
|
@media all {
|
||||||
div.dhtmlxTree td.standartTreeRow span.selectedTreeRow {
|
div.dhtmlxTree td.standartTreeRow span.selectedTreeRow {
|
||||||
background-color: #FFDD73;
|
background-color: rgba(102, 153, 204, 0.7);
|
||||||
color: #1E1E1E;
|
color: #1E1E1E;
|
||||||
}
|
}
|
||||||
/* #############################################################################
|
/* #############################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user