diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-07-08 00:29:37 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-07-08 00:29:37 +0000 |
| commit | c83650d83ad8b1f4bda30cac2ae8efa6e1c97287 (patch) | |
| tree | 482cf980e87cd7c80c28a89bb9395eba6b53026f /modules/gallery/views/admin_theme_options.html.php | |
| parent | a0b0b415515bff5f9edd43d373e8e78f3b3f8e4d (diff) | |
| parent | 9d66783f47636153bf3661d1d89e694dd5188c36 (diff) | |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/views/admin_theme_options.html.php')
| -rw-r--r-- | modules/gallery/views/admin_theme_options.html.php | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/modules/gallery/views/admin_theme_options.html.php b/modules/gallery/views/admin_theme_options.html.php index a4bf1c4e..b4a90682 100644 --- a/modules/gallery/views/admin_theme_options.html.php +++ b/modules/gallery/views/admin_theme_options.html.php @@ -1,7 +1,37 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div class="g-block"> - <h1> <?= t("Theme Options") ?> </h1> +<script type="text/javascript"> + $("#g-theme-options-form").ready(function() { + var contents = $("#g-theme-options-form fieldset:not(:last-child)"); + if (contents.length > 1) { + $("<div id='g-theme-options-form-tabs'>" + + " <ul class='tabnav'></ul>" + + "</div>").insertBefore("#g-theme-options-form fieldset:last-child"); + $(contents).each(function(index) { + var text = $("legend", this).text(); + var tabId = "tab_" + index; + var tabContentId = "tab_content_" + index; + if (text == "") { + text = <?= t("Tab_")->for_js() ?> + index; + } + $(".tabnav").append( + "<li><a id='" + tabId + "' href='#" + tabContentId + "'>" + text + "</a></li>"); + $("#g-theme-options-form-tabs").append( + "<div id='" + tabContentId + "' class='tabdiv'></div>"); + if ($("li.g-error", this).length > 0) { + $("#" + tabId).addClass("g-error"); + } + $("#" + tabContentId).append($("ul", this)); + $(this).remove(); + }); + $("#g-theme-options-form-tabs").tabs({}); + } else { + $("#g-theme-options-form fieldset:first legend").hide(); + } + }); +</script> +<div class="g-block"> + <h1> <?= t("Theme options") ?> </h1> <div class="g-block-content"> <?= $form ?> </div> |
