diff --git a/lib/gallery.common.css b/lib/gallery.common.css index fc12b401..12d96d41 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -31,6 +31,11 @@ **********************************************************************/ .g-narrow { + width: 25%; +} + +.g-wide { + width: 100%; } /** ******************************************************************* @@ -104,9 +109,12 @@ form .g-error { } .g-installed { + background-color: #eeeeee; } .g-default { + background-color: #c5dbec; + font-weight: bold; } .g-draggable, @@ -214,9 +222,15 @@ form .g-error { } #g-action-status { + margin-bottom: 1em; width: 100% !important; } +#g-action-status li { + padding-top: .4em; + padding-bottom: .3em; +} + #g-site-status li { border-bottom: 1px solid #ccc; padding: .3em .3em .3em 30px; @@ -324,3 +338,41 @@ form .g-error { #g-dialog .g-cancel { margin: .4em 1em; } + +/* Inline layout (forms, lists) ~~~~~~~~~~ */ + +.g-short-form label { + display: none; +} + +.g-short-form fieldset { + border: none; + padding: 0 !important; +} + +.g-short-form li { + float: left; + padding: .4em 0; +} + +.g-short-form input[type="text"] { + color: #666; + padding: .3em .6em; + width: auto; +} + +.g-short-form .g-cancel { + display: block; + padding: .2em .8em; +} + +#g-sidebar .g-short-form li { + padding-left: 0; + padding-right: 0; +} + +/* Right to left styles ~~~~~~~~~~~~~~~~~~~~ */ + +.rtl .g-short-form li { + float: right; +} diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 4ac6de70..7c52fef0 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -1,4 +1,6 @@ (function ($) { + + // Fade in action status message background color $.fn.gallery_show_message = function(message) { return this.each(function(i){ $(this).effect("highlight", {"color": "white"}, 3000); @@ -17,7 +19,6 @@ return $(this).height(tallest_height); }; - // Vertically align a block element's content $.fn.gallery_valign = function(container) { return this.each(function(i){ @@ -123,6 +124,7 @@ $(thumb).attr({src: data.src, width: data.width, height: data.height}); }; + // Initialize context menus $.fn.gallery_context_menu = function() { if ($(".g-context-menu li").length) { var hover_target = ".g-context-menu"; @@ -144,6 +146,7 @@ } }; + // Size a container to fit within the browser window $.gallery_auto_fit_window = function(imageWidth, imageHeight) { var size = $.gallery_get_viewport_size(); var width = size.width() - 6, @@ -169,4 +172,40 @@ }; }; + // Initialize a short form. Short forms may contain only one text input. + $.fn.gallery_short_form = function() { + return this.each(function(i){ + var label = $(this).find("label:first"); + var input = $(this).find("input[type=text]:first"); + var button = $(this).find("input[type=submit]"); + + $(".g-short-form").addClass("ui-helper-clearfix"); + $(".g-short-form input[type=text]").addClass("ui-corner-left"); + $(".g-short-form input[type=submit]").addClass("ui-state-default ui-corner-right"); + + // Set the input value equal to label text + if (input.val() == "") { + input.val(label.html()); + button.enable(false); + } + + // Attach event listeners to the input + input.bind("focus", function(e) { + // Empty input value if it equals it's label + if ($(this).val() == label.html()) { + $(this).val(""); + } + button.enable(true); + }); + + input.bind("blur", function(e){ + // Reset the input value if it's empty + if ($(this).val() == "") { + $(this).val(label.html()); + button.enable(false); + } + }); + }); + }; + })(jQuery); diff --git a/lib/gallery.form.js b/lib/gallery.form.js deleted file mode 100644 index 77ce3b7d..00000000 --- a/lib/gallery.form.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Initialize a short form. Short forms may contain only one text input. - * - * @param form_id string The form's CSS id - */ -function short_form_init(form_id) { - var form = $(form_id); - var label = form.find("label:first"); - var input = form.find("input[type=text]:first"); - var button = form.find("input[type=submit]"); - - // Set the input value equal to label text - if (input.val() == "") { - input.val(label.html()); - button.enable(false); - } - - // Attach event listeners to the input - input.bind("focus", function(e) { - // Empty input value if it equals it's label - if ($(this).val() == label.html()) { - $(this).val(""); - } - button.enable(true); - }); - - input.bind("blur", function(e){ - // Reset the input value if it's empty - if ($(this).val() == "") { - $(this).val(label.html()); - button.enable(false); - } - }); -} diff --git a/modules/akismet/views/admin_akismet.html.php b/modules/akismet/views/admin_akismet.html.php index 22c60c97..d273be5b 100644 --- a/modules/akismet/views/admin_akismet.html.php +++ b/modules/akismet/views/admin_akismet.html.php @@ -1,17 +1,18 @@ -
+

Wordpress.com API Key, which is also free. Your comments will be automatically relayed to Akismet.com where they'll be scanned for spam. Spam messages will be flagged accordingly and hidden from your vistors until you approve or delete them.", array("api_key_url" => "http://wordpress.com/api-keys", "akismet_url" => "http://akismet.com")) ?>

+
+ +
+ +
+ - -
- +
- - -
diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 8f719f05..82e071a8 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -34,165 +34,168 @@ } -
+

- -
- -
+
+ +
+ +
- -

- - - - - - - - - -

- - -
- - 0): ?> -

- -

- -

- spam): ?> - spam) ?> -

-

- "> - - - - + +

+ + + + + + + + -

-

- + - -
-

- -

-
- - - - - - - - - $comment): ?> - "> - - - - - -
- - - - - -
- - " - class="g-avatar" - alt="author_name()) ?>" - width="40" - height="40" /> + + - -

created) ?>

- text)) ?> -
-
    - state != "unpublished"): ?> -
  • - - - - -
  • + + - state != "published"): ?> -
  • - - - - -
  • - - state != "spam"): ?> -
  • - - - - -
  • - - -
  • - - - - -
  • -
-
+

+
+ -
- + +
+

+ +

+
+ + + + + + + + + $comment): ?> + "> + + + + + +
+ + + + + +
+ + " + class="g-avatar" + alt="author_name()) ?>" + width="40" + height="40" /> + +

author_name()) ?>

+
+ +

created) ?>

+ text)) ?> +
+
    + state != "unpublished"): ?> +
  • + + + + +
  • + + state != "published"): ?> +
  • + + + + +
  • + + state != "spam"): ?> +
  • + + + + +
  • + + +
  • + + + + +
  • +
+
+ +
+ +
+
diff --git a/modules/digibug/views/admin_digibug.html.php b/modules/digibug/views/admin_digibug.html.php index f75adc60..5d07eb68 100644 --- a/modules/digibug/views/admin_digibug.html.php +++ b/modules/digibug/views/admin_digibug.html.php @@ -1,18 +1,16 @@ -
-
- "> -

+
+ " alt="Digibug logo" class="g-right"/> +

+

-
-

register with Digibug and enter your Digibug id in the Advanced Settings page you can make money off of your photos!", array("signup_url" => "http://www.digibug.com/signup.php", diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index fd8ae63c..e1443aa7 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -1,94 +1,96 @@ -

+

-
-

-

- -

-
    -
  • - not imported. You will have to set them again manually (for now).") ?> -
  • -
  • - -
  • -
  • - -
  • -
  • - php_value eaccelerator.enable 0 in gallery3/.htaccess") ?> -
  • -
-
- - - -
-

-
    -
  • - g2_import::version())) ?> -
  • - -
  • - Using the same value will speed up your import.", - array("g2_pixels" => $g2_sizes["thumb"]["size"], - "g3_pixels" => $thumb_size, - "url" => html::mark_clean(url::site("admin/theme_options")))) ?> -
  • - - - -
  • - Using the same value will speed up your import.", - array("g2_pixels" => $g2_sizes["resize"]["size"], - "g3_pixels" => $resize_size, - "url" => html::mark_clean(url::site("admin/theme_options")))) ?> -
  • - -
- -
+
+
+

- +

  • - + not imported. You will have to set them again manually (for now).") ?>
  • - +
  • - +
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - + php_value eaccelerator.enable 0 in gallery3/.htaccess") ?>
+ -

- "> - - -

+ +
+

+
    +
  • + g2_import::version())) ?> +
  • + +
  • + Using the same value will speed up your import.", + array("g2_pixels" => $g2_sizes["thumb"]["size"], + "g3_pixels" => $thumb_size, + "url" => html::mark_clean(url::site("admin/theme_options")))) ?> +
  • + + + +
  • + Using the same value will speed up your import.", + array("g2_pixels" => $g2_sizes["resize"]["size"], + "g3_pixels" => $resize_size, + "url" => html::mark_clean(url::site("admin/theme_options")))) ?> +
  • + +
+ +
+

+ +

+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+ +

+ "> + + +

+
+
-
diff --git a/modules/gallery/controllers/admin_languages.php b/modules/gallery/controllers/admin_languages.php index 8af1dd85..ccc631c7 100644 --- a/modules/gallery/controllers/admin_languages.php +++ b/modules/gallery/controllers/admin_languages.php @@ -112,7 +112,8 @@ class Admin_Languages_Controller extends Admin_Controller { $server_link = l10n_client::server_api_key_url(); $group->input("api_key") ->label(empty($api_key) - ? t("This is a unique key that will allow you to send translations to the remote server. To get your API key go to %server-link.", + ? t("This is a unique key that will allow you to send translations to the remote + server. To get your API key go to %server-link.", array("server-link" => html::mark_clean(html::anchor($server_link)))) : t("API Key")) ->value($api_key) diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php index 70ecd261..e3ae5f58 100644 --- a/modules/gallery/views/admin_advanced_settings.html.php +++ b/modules/gallery/views/admin_advanced_settings.html.php @@ -1,38 +1,41 @@ -
+

+
    -
  • - -
  • +
- - - - - - - - module_name == "gallery" && $var->name == "_cache") continue ?> - - - - - - -
module_name ?> name) ?> - module_name/" . html::clean($var->name)) ?>" - class="g-dialog-link" - title=" $var->name, "module_name" => $var->module_name))->for_html_attr() ?>"> - value): ?> - value) ?> - - - - -
+
+ + + + + + + + + module_name == "gallery" && $var->name == "_cache") continue ?> + "> + + + + + + +
module_name ?> name) ?> + module_name/" . html::clean($var->name)) ?>" + class="g-dialog-link" + title=" $var->name, "module_name" => $var->module_name))->for_html_attr() ?>"> + value): ?> + value) ?> + + + + +
+
diff --git a/modules/gallery/views/admin_graphics.html.php b/modules/gallery/views/admin_graphics.html.php index 95d0618c..0f4c0dd8 100644 --- a/modules/gallery/views/admin_graphics.html.php +++ b/modules/gallery/views/admin_graphics.html.php @@ -12,26 +12,28 @@ }); -
+

-

- - - - $tk->$active, "is_active" => true)) ?> - - -
-

- - - $tk->$id, "is_active" => false)) ?> +
+

+ + + + $tk->$active, "is_active" => true)) ?> - + +
+

+ + + $tk->$id, "is_active" => false)) ?> + + +
diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php index 74f48b76..311672de 100644 --- a/modules/gallery/views/admin_languages.html.php +++ b/modules/gallery/views/admin_languages.html.php @@ -1,103 +1,112 @@ -
-

-

- -

+ + +
+

+ +
+ +
+

+

+ +

+ +
+
"> + + + + + + + + + $display_name): ?> + +
+ + + + + + + "> + + + + + + +
+ +
+ for_html_attr() ?>" /> +
+
+
+ +
+

+

+ +

+ +
+ for_html_attr() ?>"> + + + +

+ +

+ +
    +
  • +
  • locales::display_name())) ?>
  • +
  • +
+ + + get("l10n_mode", false)): ?> + + + + + + +

+ +
+
- $("g-languages-form").ajaxForm({ - dataType: "json", - success: function(data) { - if (data.result == "success") { - el = $(' + '">'); // this is a little hack to trigger the update_l10n task in a dialog - el.gallery_dialog(); - el.trigger('click'); - } - } - }); - -
- -
-

-

- -

- -

- -
- for_html_attr() ?>"> - - - -

Step 1: Make sure the target language is installed and up to date (check above).") ?>

- -

Step 2: Make sure you have selected the right target language (currently %default_locale).", - array("default_locale" => locales::display_name())) ?>

- -

Step 3: Start the translation mode and the translation interface will appear at the bottom of each Gallery page.") ?>

- - - - get("l10n_mode", false)): ?> - - - - - -
- -

- +
diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index 94582dc8..73a4bef8 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -1,193 +1,195 @@ -
+

-
-

- - - - - - - - - severity) ?>"> - - - - - - -
- - - - - -
- name ?> - - description ?> - - callback?csrf=$csrf") ?>" - class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> - - -
-
+
+
+

+ + + + + + + + + severity) ?>"> + + + + + + +
+ + + + + +
+ name ?> + + description ?> + + callback?csrf=$csrf") ?>" + class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> + + +
+
- count()): ?> -
-

- - - - - - - - - - - - state == "stalled" ? "g-warning" : "" ?>"> - - - - - - - - - -
- - - - - - - - - - - " - class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> - - -
"> - updated) ?> - - name ?> - - done): ?> - state == "cancelled"): ?> - - - - state == "stalled"): ?> - - - $task->percent_complete)) ?> - - - status ?> - - owner()->name) ?> - - id?csrf=$csrf") ?>" - class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> - - - state == "stalled"): ?> - id?csrf=$csrf") ?>"> - - - -
-
- - - count()): ?> - + + + count()): ?> +
+

+ + + + + + + + + + + + state == "success" ? "g-success" : "g-error" ?>"> + + + + + + + + + +
+ + + + + + + + + + + " + class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> + + +
"> + updated) ?> + + name ?> + + state == "success"): ?> + + state == "error"): ?> + + state == "cancelled"): ?> + + + + status ?> + + owner()->name) ?> + + done): ?> + id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> + + + get_log()): ?> + id?csrf=$csrf") ?>" class="g-dialog-link g-button ui-state-default ui-corner-all"> + + + + + id?csrf=$csrf") ?>" class="g-dialog-link g-button" ui-state-default ui-corner-all> + + + id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> + + + + +
+
+
-
diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index 75f4f0c5..4c4976f8 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -1,32 +1,34 @@ -
+

-
"> - - - - - - - - - - $module_info): ?> - "> - $module_name); ?> - locked) $data["disabled"] = 1; ?> - - - - - - - -
name) ?> version ?> description) ?>
- for_html_attr() ?>"/> -
+
+
"> + + + + + + + + + + $module_info): ?> + "> + $module_name); ?> + locked) $data["disabled"] = 1; ?> + + + + + + + +
name) ?> version ?> description) ?>
+ for_html_attr() ?>" /> +
+
diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php index b4f339ae..030dfdce 100644 --- a/modules/gallery/views/admin_sidebar.html.php +++ b/modules/gallery/views/admin_sidebar.html.php @@ -1,7 +1,11 @@ -

-

- -

-
"> -
-

-
-
    - -
+
+

+

+ +

+ +
"> +
+

+
+
    + +
+
-
-
-

-
-
    - -
+
+

+
+
    + +
+
diff --git a/modules/gallery/views/admin_theme_options.html.php b/modules/gallery/views/admin_theme_options.html.php index e09be728..a4bf1c4e 100644 --- a/modules/gallery/views/admin_theme_options.html.php +++ b/modules/gallery/views/admin_theme_options.html.php @@ -1,6 +1,8 @@ -
+

+
+
diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index f7e77a01..dda18265 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -7,83 +7,88 @@ } -

-

- -

+
+

+

+ +

-
-

-
- " - alt="name) ?>" /> -

name ?>

-

- description ?> -

-
- -

-
- - $info): ?> - site) continue ?> - - +

+
+ + $info): ?> + site) continue ?> + + + + -
-

-
- " - alt="name) ?>" /> -

name ?>

-

- description ?> -

-
- -

- - - - -

- -

- +
+

+
+ " + alt="name) ?>" /> +

name ?>

+

+ description ?> +

+
+ +

+ +
+
\ No newline at end of file diff --git a/modules/recaptcha/views/admin_recaptcha.html.php b/modules/recaptcha/views/admin_recaptcha.html.php index 3e964801..a0af3ba8 100644 --- a/modules/recaptcha/views/admin_recaptcha.html.php +++ b/modules/recaptcha/views/admin_recaptcha.html.php @@ -1,5 +1,5 @@ -
+

reCAPTCHA Public/Private Key pair, which is also free. Once registered, the challenge and response strings are evaluated at recaptcha.net to determine if the form content has been entered by a bot.", @@ -7,27 +7,29 @@ "recaptcha_url" => html::mark_clean("http://recaptcha.net"))) ?>

- -
+
+ - -
-

-

- -

+ +
+

+

+ +

-
- - +
+ + +
+
+ +
- - diff --git a/modules/server_add/controllers/admin_server_add.php b/modules/server_add/controllers/admin_server_add.php index 837a2c00..cb71e1f1 100644 --- a/modules/server_add/controllers/admin_server_add.php +++ b/modules/server_add/controllers/admin_server_add.php @@ -83,7 +83,7 @@ class Admin_Server_Add_Controller extends Admin_Controller { private function _get_admin_form() { $form = new Forge("admin/server_add/add_path", "", "post", - array("id" => "g-server-add-admin-form")); + array("id" => "g-server-add-admin-form", "class" => "g-short-form g-wide")); $add_path = $form->group("add_path"); $add_path->input("path")->label(t("Path"))->rules("required") ->error_messages("not_readable", t("This directory is not readable by the webserver")) diff --git a/modules/server_add/views/admin_server_add.html.php b/modules/server_add/views/admin_server_add.html.php index e447ee6d..eae767af 100644 --- a/modules/server_add/views/admin_server_add.html.php +++ b/modules/server_add/views/admin_server_add.html.php @@ -1,25 +1,22 @@ -
-

- -

-
-

+
+

+
+

style="display: none;">
  • -
    -
    diff --git a/modules/tag/css/tag.css b/modules/tag/css/tag.css index b718de05..ec16251d 100644 --- a/modules/tag/css/tag.css +++ b/modules/tag/css/tag.css @@ -1,3 +1,5 @@ +/* Tag cloud ~~~~~~~~~~~~~~~~~~~~~~~ */ + #g-tag-cloud ul { font-size: 1.2em; text-align: justify; @@ -64,7 +66,13 @@ text-decoration: underline; } -/* Tag admin ~~~~~~~~~~~~~~ */ +/* Add tag form ~~~~~~~~~~~~~~~~~~~~ */ + +#g-sidebar .g-short-form .textbox { + width: 11em; +} + +/* Tag admin ~~~~~~~~~~~~~~~~~~~~~~~ */ #g-tag-admin { table-layout: fixed; @@ -75,40 +83,18 @@ } #g-tag-admin ul { - padding-bottom: .3em; + margin-bottom: 2em; } #g-tag-admin li { - padding: .1em 0 .2em .3em; + padding: .1em 0 .2em 0; } -#g-tag-admin .g-column { - float: left; - width: 200px; +#g-rename-tag-form ul { + margin-bottom: 0; } -#g-edit-tag-form input { - padding: 0 .2em 0 .2em; - clear: none; - float: left; - margin: 0 .2em 0 0; -} - -#g-edit-tag-form input[type="text"].g-error { +#g-rename-tag-form input[type="text"].g-error { border: 2px solid red; background: none; } - -#g-edit-tag-form input[type="submit"] { - height: 25px; -} - -#g-edit-tag-form a, #g-edit-tag-form span { - display: block; - float: left; - padding: .2em .2em 0 .1em; -} - -#g-edit-tag-form span { - float: right; -} diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php index b1d79458..01972a65 100644 --- a/modules/tag/helpers/tag.php +++ b/modules/tag/helpers/tag.php @@ -79,7 +79,6 @@ class tag_Core { } } - /** * Return all the tags for a given item. * @return array @@ -111,7 +110,7 @@ class tag_Core { } static function get_rename_form($tag) { - $form = new Forge("admin/tags/rename/$tag->id", "", "post", array("id" => "g-edit-tag-form", "class" => "g-short-form")); + $form = new Forge("admin/tags/rename/$tag->id", "", "post", array("id" => "g-rename-tag-form", "class" => "g-short-form")); $group = $form->group("rename_tag")->label(t("Rename Tag")); $group->input("name")->label(t("Tag name"))->value($tag->name)->rules("required|length[1,64]"); $group->inputs["name"]->error_messages("in_use", t("There is already a tag with that name")); diff --git a/modules/tag/helpers/tag_theme.php b/modules/tag/helpers/tag_theme.php index e3743824..ac0dd016 100644 --- a/modules/tag/helpers/tag_theme.php +++ b/modules/tag/helpers/tag_theme.php @@ -26,6 +26,7 @@ class tag_theme_Core { } static function admin_head($theme) { + $theme->css("tag.css"); $theme->script("tag.js"); } diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index 532ada95..4ed88e03 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -18,10 +18,10 @@ function ajaxify_tag_form() { function closeEditInPlaceForms() { // closes currently open inplace edit forms - if ($("#g-edit-tag-form").length) { + if ($("#g-rename-tag-form").length) { $("#g-edit-error-message").remove(); - var li = $("#g-edit-tag-form").parent(); - $("#g-edit-tag-form").parent().html($("#g-edit-tag-form").parent().data("revert")); + var li = $("#g-rename-tag-form").parent(); + $("#g-rename-tag-form").parent().html($("#g-rename-tag-form").parent().data("revert")); li.height(""); $(".g-editable", li).bind("click", editInPlace); $(".g-dialog-link", li).gallery_dialog(); @@ -41,34 +41,37 @@ function editInPlace(element) { var tag_name = $(this).html(); var tag_width = $(this).width(); $(this).parent().data("revert", $(this).parent().html()); - var form = '
    '; form += ''; - form += ''; - form += ''; - form += '' + cancel_i18n + ''; + form += ''; form += '
    '; // add edit form $(this).parent().html(form); - $("#g-edit-tag-form #name") - .width(tag_width+30) + $("#g-rename-tag-form #name") + .width(tag_width) .focus(); - //$("#g-edit-tag-form").parent().height( $("#g-edit-tag-form").height() ); - $("#g-edit-tag-form a").bind("click", closeEditInPlaceForms); + $(".g-short-form").gallery_short_form(); + $("#g-rename-tag-form .g-cancel").bind("click", closeEditInPlaceForms); ajaxify_editInPlaceForm = function() { - $("#g-edit-tag-form").ajaxForm({ + $("#g-rename-tag-form").ajaxForm({ dataType: "json", success: function(data) { + console.log("success"); if (data.result == "success") { closeEditInPlaceForms(); // close form $(".g-tag[rel=" + data.tag_id + "]").text(data.new_tagname); // update tagname - console.log(data); window.location.reload(); } else if (data.result == "error") { - $("#g-edit-tag-form #name") + console.log("error"); + $("#g-rename-tag-form #name") .addClass("g-error") .focus(); $("#g-tag-admin").before("

    " + data.message + "

    "); diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index 2d41ee5f..dc9deb1f 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -1,5 +1,5 @@ - + +count()/5 ?> + +
    -

    - -

    +

    - count()/5 ?> - +
    + + + + + +
    + count()) ?> +
    + $tag): ?> + name, 0, 1)) ?> - - - - - + - -
    - count()) ?> -
    - $tag): ?> - name, 0, 1)) ?> - - - -
      - - $tags_per_column): /* new column */ ?> -
    - + + +
      + + $tags_per_column): /* new column */ ?> +
    + + + + +
      @@ -53,12 +63,12 @@ class="g-dialog-link g-delete-link g-button"> - - - - -
    -
    + + + + +
    +
    diff --git a/modules/tag/views/tag_block.html.php b/modules/tag/views/tag_block.html.php index 8c79b74a..ad36b297 100644 --- a/modules/tag/views/tag_block.html.php +++ b/modules/tag/views/tag_block.html.php @@ -6,8 +6,9 @@ url, { max: 30, multiple: true, - multipleSeparator: ',', - cacheLength: 1} + multipleSeparator: ',', + cacheLength: 1 + } ); }); diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index cee7c1eb..7c54d93d 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -42,90 +42,93 @@ }); } +
    - " - class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all" - title="for_html_attr() ?>"> - - - - -

    - -

    +

    - - - - - - - - + user admin ? "admin" : "" ?>"> - - - - - - - -
    - " - title="for_html_attr() ?>" - alt="name) ?>" - width="20" - height="20" /> - name) ?> - - full_name) ?> - - email) ?> - - last_login == 0) ? "" : gallery::date($user->last_login) ?> - - id") ?>" - open_text="" - class="g-panel-link g-button ui-state-default ui-corner-all ui-icon-left"> - - - - id != $user->id && !$user->guest): ?> - id") ?>" - class="g-dialog-link g-button ui-state-default ui-corner-all ui-icon-left"> - - - for_html_attr() ?>" - class="g-button ui-state-disabled ui-corner-all ui-icon-left"> - - -
    -
    -
    - -
    - " - class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all" - title="for_html_attr() ?>"> - - - - -

    - -

    - -
    -
      - $group): ?> -
    • " /> - group = $group; ?> - -
    • - -
    -
    +

    + +
    + + + + + + + + + + $user): ?> + user admin ? "admin" : "" ?>"> + + + + + + + +
    + " + title="for_html_attr() ?>" + alt="name) ?>" + width="20" + height="20" /> + name) ?> + + full_name) ?> + + email) ?> + + last_login == 0) ? "" : gallery::date($user->last_login) ?> + + id") ?>" + open_text="" + class="g-panel-link g-button ui-state-default ui-corner-all ui-icon-left"> + + id != $user->id && !$user->guest): ?> + id") ?>" + class="g-dialog-link g-button ui-state-default ui-corner-all ui-icon-left"> + + + for_html_attr() ?>" + class="g-button ui-state-disabled ui-corner-all ui-icon-left"> + + +
    +
    +
    + + +
    diff --git a/modules/watermark/views/admin_watermarks.html.php b/modules/watermark/views/admin_watermarks.html.php index d034066a..af38cb41 100644 --- a/modules/watermark/views/admin_watermarks.html.php +++ b/modules/watermark/views/admin_watermarks.html.php @@ -1,37 +1,39 @@ -
    +

    - - " - title="for_html_attr() ?>" - class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> - -

    -

    - -

    -
    -
    - -

    - watermark::position($position))) ?> -

    -

    - module::get_var("watermark", "transparency"))) ?> -

    -
    - diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 3d620f1c..e0e5b10d 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -107,11 +107,11 @@ td { border: none; border-bottom: 1px solid #ccc; padding: .5em; - vertical-align: top; + vertical-align: middle; } -#g-admin-maintenance td { - vertical-align: middle; +th { + white-space: nowrap; } /* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -122,8 +122,7 @@ fieldset { } #g-header fieldset, -#g-sidebar fieldset, -.g-short-form fieldset { +#g-sidebar fieldset { border: none; } @@ -135,8 +134,7 @@ legend { #g-header legend, #g-sidebar legend, #g-content #g-search-form legend, -input[type="hidden"], -.g-short-form label { +input[type="hidden"] { display: none; } @@ -298,19 +296,6 @@ tr.g-warning { background-color: #fff; } -/* Inline layout (forms, lists) ~~~~~~~~~~ */ - -.g-short-form li { - float: left; - padding: .4em 0; -} - -.g-short-form input[type="text"] { - color: #666; - padding: .3em .6em; - width: 11em; -} - /*** ****************************************************************** * 3) Page layout containers *********************************************************************/ @@ -489,14 +474,6 @@ tr.g-warning { margin-right: 1em; } -#g-user-admin-list { - margin-bottom: 1em; -} - -#g-user-admin-list td { - vertical-align: bottom; -} - #g-user-admin-list .admin { color: #55f; font-weight: bold; @@ -547,36 +524,18 @@ li.g-group-disable h4, li.g-group-disable .g-user { color: gray; } -#g-admin-advanced-settings tr.setting:hover { - background: #ffc; -} +/* Block admin ~~~~~~~~~~~~~~~~~~~~~~~~~ */ -/* admin/sidebar ~~~~~~~~~~~~~~~~~~~~~~~~~ */ -.g-admin-blocks-list { - float: left; - height: 300px; - margin-left: 20px; +#g-admin-blocks .g-block { + clear: none; width: 30%; } -.g-admin-blocks-list div:last-child { - border: .1em solid; - height: 100%; - overflow-y: auto; -} - -.g-admin-blocks-list ul { - height: 98%; - margin: .1em .1em; - padding: .1em; -} - -.g-admin-blocks-list ul li { - background-color: #e8e8e8; - font-size: 1em; - font-weight: bold; - margin: .5em; - padding: .3em .8em; +#g-admin-blocks .g-block .g-draggable { + background: #e7e7e7; + /*border: 1px solid #fff;*/ + margin-bottom: 1em; + padding: .4em .8em; } /** ******************************************************************* @@ -812,51 +771,11 @@ li.g-group-disable h4, li.g-group-disable .g-user { padding: .5em } -#g-server-add-admin { - margin:auto; - text-align: left; -} - -#g-server-add-admin form fieldset { - border: medium none; -} - -#g-server-add-admin legend { - display: none; -} - -#g-server-add-admin .g-warning { - background-color: #FFFF99; -} - -#g-authorized-path { - margin: 0 !important; - padding: 0.3em 1.5em 0.3em 1em; -} - -#g-server-add-admin #path { - width: 80%; -} - -.g-remove-dir:hover { - cursor: pointer; -} - #g-languages-form table { - width: 400px; - float: left; + width: 40%; margin: 0 3em 1em 0; } -#g-languages-form .installed { - background-color: #EEEEEE; -} - -#g-languages-form .default { - background-color: #C5DBEC; - font-weight: bold; -} - #g-languages-form input { clear: both; } @@ -870,10 +789,6 @@ li.g-group-disable h4, li.g-group-disable .g-user { padding: .5em; } -.g-doc-link { - float: right; -} - /** ******************************************************************* * 7) Right to left styles *********************************************************************/ @@ -905,7 +820,6 @@ li.g-group-disable h4, li.g-group-disable .g-user { .rtl form ul ul li, .rtl input[type="submit"], .rtl input[type="reset"], -.rtl .g-short-form li, .rtl #g-content #g-album-grid .g-item, .rtl #g-site-admin-menu, .rtl .g-pager li, diff --git a/themes/admin_wind/js/ui.init.js b/themes/admin_wind/js/ui.init.js index 0954b63c..e0210ce5 100644 --- a/themes/admin_wind/js/ui.init.js +++ b/themes/admin_wind/js/ui.init.js @@ -1,5 +1,6 @@ /** * Initialize jQuery UI and Gallery Plugins + * @todo Move ui-corner-all assignments to theme admin views */ $(document).ready(function(){ @@ -22,6 +23,9 @@ $(document).ready(function(){ // Initialize modal dialogs $(".g-dialog-link").gallery_dialog(); + // Initialize short forms + $(".g-short-form").gallery_short_form(); + // Initialize ajax links $(".g-ajax-link").gallery_ajax(); @@ -50,13 +54,7 @@ $(document).ready(function(){ $(".g-available .g-block").addClass("ui-corner-all"); $(".g-unavailable").addClass("ui-corner-all"); - // Add hover state for buttons - $(".ui-state-default").hover( - function() { - $(this).addClass("ui-state-hover"); - }, - function() { - $(this).removeClass("ui-state-hover"); - } - ); + // Initialize button hover effect + $.fn.gallery_hover_init(); + }); diff --git a/themes/night_wind/js/ui.init.js b/themes/night_wind/js/ui.init.js index 27fb9664..bddf50c3 100644 --- a/themes/night_wind/js/ui.init.js +++ b/themes/night_wind/js/ui.init.js @@ -29,20 +29,6 @@ $(document).ready(function() { $("#g-view-menu a").addClass("ui-icon"); } - // Initialize short forms - var short_forms = new Array( - "#g-quick-search-form", - "#g-add-tag-form", - "#g-search-form" - ); - - for (var i in short_forms) { - short_form_init(short_forms[i]); - $(short_forms[i]).addClass("g-short-form"); - } - $(".g-short-form input[type=text]").addClass("ui-corner-left"); - $(".g-short-form input[type=submit]").addClass("ui-state-default ui-corner-right"); - // Apply jQuery UI button css to submit inputs $("input[type=submit]:not(.g-short-form input)").addClass("ui-state-default ui-corner-all"); diff --git a/themes/night_wind/views/page.html.php b/themes/night_wind/views/page.html.php index c8b08129..f5c6b0df 100644 --- a/themes/night_wind/views/page.html.php +++ b/themes/night_wind/views/page.html.php @@ -56,7 +56,6 @@ script("gallery.ajax.js") ?> script("gallery.dialog.js") ?> - script("gallery.form.js") ?> script("superfish/js/superfish.js") ?> script("jquery.localscroll.js") ?> script("ui.init.js") ?> diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index 36231b0d..d7eb19e6 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -120,14 +120,18 @@ td { /* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +#g-sidebar form { + padding-left: 0; + padding-right: 0; +} + fieldset { border: 1px solid #ccc; padding: .8em 1em !important; } #g-banner fieldset, -#g-sidebar fieldset, -.g-short-form fieldset { +#g-sidebar fieldset { border: none; } @@ -139,8 +143,7 @@ legend { #g-banner legend, #g-sidebar legend, #g-content #g-search-form legend, -input[type="hidden"], -.g-short-form label { +input[type="hidden"] { display: none; } @@ -234,19 +237,6 @@ li.g-error select { margin-top: 1em; } -/* Inline layout (forms, lists) ~~~~~~~~~~ */ - -.g-short-form li { - float: left; - padding: .4em 0; -} - -.g-short-form input[type="text"] { - color: #666; - padding: .3em .6em; - width: 11em; -} - /*** ****************************************************************** * 3) Page layout containers *********************************************************************/ @@ -821,7 +811,6 @@ li.g-error select { .rtl form ul ul li, .rtl input[type="submit"], .rtl input[type="reset"], -.rtl .g-short-form li, .rtl #g-header #g-logo img, .rtl #g-content #g-album-grid .g-item, .rtl #g-site-menu, diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index e9dd1dd9..0126c36b 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -22,9 +22,10 @@ $(document).ready(function() { // Initialize dialogs $(".g-dialog-link").gallery_dialog(); + // Initialize short forms + $(".g-short-form").gallery_short_form(); + // Apply jQuery UI icon, hover, and rounded corner styles - $(".g-short-form input[type=text]").addClass("ui-corner-left"); - $(".g-short-form input[type=submit]").addClass("ui-state-default ui-corner-right"); $("input[type=submit]:not(.g-short-form input)").addClass("ui-state-default ui-corner-all"); if ($("#g-view-menu").length) { $("#g-view-menu ul").removeClass("g-menu").removeClass("sf-menu"); diff --git a/themes/wind/views/dynamic.html.php b/themes/wind/views/dynamic.html.php index aa347402..51e48dc0 100644 --- a/themes/wind/views/dynamic.html.php +++ b/themes/wind/views/dynamic.html.php @@ -6,7 +6,7 @@

    -
      +
        $child): ?>
      • "> thumb_top($child) ?> diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index c8b08129..f5c6b0df 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -56,7 +56,6 @@ script("gallery.ajax.js") ?> script("gallery.dialog.js") ?> - script("gallery.form.js") ?> script("superfish/js/superfish.js") ?> script("jquery.localscroll.js") ?> script("ui.init.js") ?>