From 5242d68296182a1b253bd6aea373ae82c1a57e80 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 27 Nov 2008 14:47:13 +0000 Subject: [PATCH] Updated plugin&&tabs, implemented tab disabling -> allows modal dialogs -Currently not activated, should be checked before. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13058 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_plugin.inc | 6 ++++++ gosa-core/include/class_tabs.inc | 28 ++++++++++++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index 2c804e967..60f0878b0 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -2063,6 +2063,12 @@ class plugin { return(array()); } + + function is_modal_dialog() + { + return(FALSE); + // return(isset($this->dialog) && $this->dialog); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/gosa-core/include/class_tabs.inc b/gosa-core/include/class_tabs.inc index a679baa5f..38567747c 100644 --- a/gosa-core/include/class_tabs.inc +++ b/gosa-core/include/class_tabs.inc @@ -124,11 +124,8 @@ class tabs $this->save_object(FALSE); } - /* Build tab line */ - $display= $this->gen_tabs(); - /* Show object */ - $display.= "\n"; + $display = "
\n"; $display.= "
\n"; /* If multiple edit is enabled for this tab, @@ -138,9 +135,14 @@ class tabs }else{ $display.= $this->by_object[$this->current]->multiple_execute(); } + $modal_dialog = $this->by_object[$this->current]->is_modal_dialog(); + + /* Build tab line */ + $modal = TRUE; + $tabs= $this->gen_tabs($modal_dialog); /* Footer for tabbed dialog */ - $display.= "
"; + $display = $tabs.$display.""; return ($display); } @@ -179,7 +181,7 @@ class tabs } } - function gen_tabs() + function gen_tabs($disabled = FALSE) { $display= ""; $display.= ""; @@ -218,13 +220,19 @@ class tabs $notify= ""; } - if (session::get('js')==FALSE){ + if($disabled){ + $display.= "
".$title."
"; + }elseif (session::get('js')==FALSE){ $display.= "
"; } else { - $display.= "
$title$title
"; } - $display.= ">"; } $display.= "
\n"; $display.= "
 
"; -- 2.30.2