diff --git a/admin/inc/class.uiaccess_history.inc.php b/admin/inc/class.uiaccess_history.inc.php index dc4f12d5ad..125fe68429 100644 --- a/admin/inc/class.uiaccess_history.inc.php +++ b/admin/inc/class.uiaccess_history.inc.php @@ -46,6 +46,11 @@ $order = get_var('order',array('POST'),0); $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('View access log'); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); diff --git a/admin/inc/class.uiaccounts.inc.php b/admin/inc/class.uiaccounts.inc.php index 812225f5c4..d233b96641 100755 --- a/admin/inc/class.uiaccounts.inc.php +++ b/admin/inc/class.uiaccounts.inc.php @@ -60,6 +60,11 @@ unset($GLOBALS['phpgw_info']['flags']['noheader']); unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); @@ -215,6 +220,11 @@ unset($GLOBALS['phpgw_info']['flags']['noheader']); unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); @@ -377,6 +387,11 @@ unset($GLOBALS['phpgw_info']['flags']['noheader']); unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); @@ -451,6 +466,11 @@ unset($GLOBALS['phpgw_info']['flags']['noheader']); unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); $t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); @@ -578,6 +598,11 @@ } unset($GLOBALS['phpgw_info']['flags']['noheader']); unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); $t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); @@ -797,6 +822,11 @@ unset($GLOBALS['phpgw_info']['flags']['noheader']); unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); @@ -935,6 +965,11 @@ unset($GLOBALS['phpgw_info']['flags']['noheader']); unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); $t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); @@ -1212,6 +1247,11 @@ unset($GLOBALS['phpgw_info']['flags']['noheader']); unset($GLOBALS['phpgw_info']['flags']['nonavbar']); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); $t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); diff --git a/admin/inc/class.uiapplications.inc.php b/admin/inc/class.uiapplications.inc.php index 4aa754c5ea..4abc8b388a 100644 --- a/admin/inc/class.uiapplications.inc.php +++ b/admin/inc/class.uiapplications.inc.php @@ -41,6 +41,11 @@ $can_delete = !$GLOBALS['phpgw']->acl->check('applications_access',8,'admin'); $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Installed applications'); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); @@ -215,6 +220,11 @@ } $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Add new application'); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); @@ -306,6 +316,11 @@ } $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Edit application'); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); @@ -362,6 +377,11 @@ $GLOBALS['phpgw']->template->set_file(array('body' => 'delete_common.tpl')); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); diff --git a/admin/inc/class.uiasyncservice.inc.php b/admin/inc/class.uiasyncservice.inc.php index 59d052d700..774ab6ee07 100644 --- a/admin/inc/class.uiasyncservice.inc.php +++ b/admin/inc/class.uiasyncservice.inc.php @@ -42,6 +42,11 @@ $GLOBALS['phpgw']->redirect_link('/index.php'); } $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Asynchronous timed services'); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); diff --git a/admin/inc/class.uicategories.inc.php b/admin/inc/class.uicategories.inc.php index b6ca90cfba..0cf6da0ab5 100644 --- a/admin/inc/class.uicategories.inc.php +++ b/admin/inc/class.uicategories.inc.php @@ -53,6 +53,11 @@ $this->acl_add_sub= !$GLOBALS['phpgw']->acl->check('global_categories_access',64,'admin'); $this->appname = get_var('appname',array('GET','POST')); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps'][$this->appname ? $this->appname : 'admin']['title']; $this->start = $this->bo->start; @@ -143,6 +148,11 @@ } $GLOBALS['phpgw_info']['flags']['app_header'] .= ' - '.lang('Global categories'); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); $this->set_langs(); @@ -308,6 +318,11 @@ } $GLOBALS['phpgw_info']['flags']['app_header'] .= ' - '.lang('Add global category'); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); @@ -375,6 +390,11 @@ } $GLOBALS['phpgw_info']['flags']['app_header'] .= ' - '.lang('Edit global category'); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); @@ -446,6 +466,11 @@ )); $GLOBALS['phpgw_info']['flags']['app_header'] .= ' - '.lang('Delete category'); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); diff --git a/admin/inc/class.uiconfig.inc.php b/admin/inc/class.uiconfig.inc.php index 410fe79ca9..f204cc8f26 100644 --- a/admin/inc/class.uiconfig.inc.php +++ b/admin/inc/class.uiconfig.inc.php @@ -141,6 +141,12 @@ $t->set_var('th_err',$GLOBALS['phpgw_info']['theme']['th_bg']); } + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); + $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); diff --git a/admin/inc/class.uicurrentsessions.inc.php b/admin/inc/class.uicurrentsessions.inc.php index 6d680c20e7..4873d21779 100644 --- a/admin/inc/class.uicurrentsessions.inc.php +++ b/admin/inc/class.uicurrentsessions.inc.php @@ -34,6 +34,11 @@ function header() { + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); } diff --git a/admin/inc/class.uilog.inc.php b/admin/inc/class.uilog.inc.php index 6d6890c28e..feb3bcafa5 100644 --- a/admin/inc/class.uilog.inc.php +++ b/admin/inc/class.uilog.inc.php @@ -261,6 +261,11 @@ $this->t->set_var('event_list',$table); $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.($this->editmode?lang('Edit Table format') : lang('View error log')); + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); $this->t->pfp('out','log_list_t'); diff --git a/admin/inc/class.uimainscreen.inc.php b/admin/inc/class.uimainscreen.inc.php index 29ee25135e..93ac0390b1 100644 --- a/admin/inc/class.uimainscreen.inc.php +++ b/admin/inc/class.uimainscreen.inc.php @@ -72,6 +72,11 @@ $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Main screen message'); break; } + if(!@is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); diff --git a/admin/templates/default/index.tpl b/admin/templates/default/index.tpl index 410675d84a..a07ad58abe 100755 --- a/admin/templates/default/index.tpl +++ b/admin/templates/default/index.tpl @@ -1,24 +1,4 @@ - {rows}