remove "admin_" prefix from et2 ids

This commit is contained in:
Ralf Becker 2013-08-01 11:44:44 +00:00
parent 6f39b0618d
commit 596a01a76d
3 changed files with 32 additions and 9 deletions

View File

@ -43,7 +43,7 @@ class admin_ui
$tpl = new etemplate_new('admin.index');
$content = array();
$content['admin_nm'] = array(
$content['nm'] = array(
'get_rows' => 'admin_ui::get_users',
'no_cat' => true,
'no_filter2' => true,

View File

@ -66,10 +66,16 @@ app.admin = AppJS.extend(
this.et2 = _et2.widgetContainer;
var iframe = this.iframe = this.et2.getWidgetById('admin_iframe');
if (iframe) iframe.set_src(egw.webserverUrl+'/admin/index.php');
var splitter = this.splitter = this.et2.getWidgetById('admin_splitter');
var iframe = this.iframe = this.et2.getWidgetById('iframe');
if (iframe)
{
iframe.set_src(egw.webserverUrl+'/admin/index.php');
var self = this;
jQuery(iframe.getDOMNode()).bind('load', function(){
self._hide_navbar.call(self);
});
}
var splitter = this.splitter = this.et2.getWidgetById('splitter');
if (splitter)
{
window.setTimeout(function(){
@ -78,6 +84,23 @@ app.admin = AppJS.extend(
}
},
/**
* Hide navbar for idots template
*
* Just a hack for old idots, not neccesary for jdots
*/
_hide_navbar: function()
{
var document = this.iframe.getDOMNode().contentDocument;
// hide navbar elements
var ids2hide = ['divLogo', 'topmenu', 'divAppIconBar', 'divStatusBar', 'tdSidebox', 'divAppboxHeader'];
for(var i=0; i < ids2hide.length; ++i)
{
var elem = document.getElementById(ids2hide[i]);
if (elem) elem.style.display = 'none';
}
},
/**
* Set location of iframe for given _action and _sender (row)
*
@ -106,7 +129,7 @@ app.admin = AppJS.extend(
{
this.splitter.undock();
var parts = _id.split('/');
this.et2.getWidgetById('admin_nm').applyFilters({ filter: parts[2] ? parts[2] : '', search: ''});
this.et2.getWidgetById('nm').applyFilters({ filter: parts[2] ? parts[2] : '', search: ''});
}
else if (typeof link == 'undefined')
{

View File

@ -45,9 +45,9 @@
<template id="admin.index" template="" lang="" group="0" version="1.9.001">
<tree autoloading="admin_ui::ajax_tree" id="tree" onclick="app.admin.run(widget.event_args[0],widget);" parent_node="admin_tree_target" std_images="orange-ball"/>
<html id="msg"/>
<split dock_side="topDock" id="admin_splitter" orientation="h">
<nextmatch id="admin_nm" template="admin.index.rows"/>
<iframe frameborder="1" height="500px" id="admin_iframe" scrolling="auto" width="100%"/>
<split dock_side="topDock" id="splitter" orientation="h">
<nextmatch id="nm" template="admin.index.rows"/>
<iframe frameborder="1" height="500px" id="iframe" scrolling="auto" width="100%"/>
</split>
</template>
</overlay>