summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2016-06-12 19:11:04 -0400
committerMalf Furious <m@lfurio.us>2016-06-12 19:11:04 -0400
commitf8126b70cf8e4c9a744a99a3eb41de158a26a517 (patch)
tree7ca7eace43e783c234b006ee1ea9afbef06017ec
parente0ab905b502e12a17b43e2c7d10e2a48b7b65774 (diff)
downloadscrott-f8126b70cf8e4c9a744a99a3eb41de158a26a517.tar.gz
scrott-f8126b70cf8e4c9a744a99a3eb41de158a26a517.zip
Add functions to Common model for assigning CSS to setting tabs
The setting modal window will need to support showing unknown tabs at the beginning of the tab list. These functions handle assigning specific CSS classes to tab-panes ONLY if that tab will appear in the left-most position in the modal's tab list.
-rw-r--r--app/model/common.mod.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/app/model/common.mod.php b/app/model/common.mod.php
index 07b86df..e478e9d 100644
--- a/app/model/common.mod.php
+++ b/app/model/common.mod.php
@@ -34,6 +34,8 @@ class CommonModel extends MasterModel
function __construct()
{
parent::__construct();
+ $this->first_setting_tab_active = 0;
+ $this->first_setting_tab_disp = 0;
$this->common_handleFormSubmissions($_REQUEST['input'], $_FILES['attachment']);
$this->common_deflt();
}
@@ -363,6 +365,34 @@ class CommonModel extends MasterModel
$this->redirectTo($this->ar() . "/");
}
}
+
+ /*
+ * Set CSS class for the first tab title in the setting modal only
+ */
+ function getSettingModalTabActiveClass()
+ {
+ if (!$this->first_setting_tab_active)
+ {
+ $this->first_setting_tab_active = 1;
+ return "active";
+ }
+
+ return "";
+ }
+
+ /*
+ * Set CSS classes for the first tab in the setting modal only
+ */
+ function getSettingModalTabDispClasses()
+ {
+ if (!$this->first_setting_tab_disp)
+ {
+ $this->first_setting_tab_disp = 1;
+ return "in active";
+ }
+
+ return "";
+ }
}
?>