From 1dd4e4a4277f77c1055911ca7d64130aaf026810 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Tue, 20 Oct 2009 20:56:14 -0600 Subject: Update tag error messages to use g-action-status and g-message-block. Style g-error for short forms. --- lib/gallery.common.css | 14 +++++++++++--- modules/tag/css/tag.css | 7 +------ modules/tag/js/tag.js | 4 ++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/gallery.common.css b/lib/gallery.common.css index a700c359..939aa2f6 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -219,14 +219,16 @@ form .g-error { .g-message-block { border: 1px solid #ccc; + width: 100%; } #g-action-status { margin-bottom: 1em; - width: 100% !important; } -#g-action-status li { +#g-action-status li, +p#g-action-status, +div#g-action-status { padding-top: .4em; padding-bottom: .3em; } @@ -355,12 +357,18 @@ form .g-error { padding: .4em 0; } -.g-short-form input[type="text"] { +.g-short-form .textbox { color: #666; padding: .3em .6em; width: auto; } +.g-short-form .textbox.g-error { + border: 1px solid #f00; + color: #f00; + padding-left: 24px; +} + .g-short-form .g-cancel { display: block; padding: .2em .8em; diff --git a/modules/tag/css/tag.css b/modules/tag/css/tag.css index ec16251d..6e7bb4a3 100644 --- a/modules/tag/css/tag.css +++ b/modules/tag/css/tag.css @@ -92,9 +92,4 @@ #g-rename-tag-form ul { margin-bottom: 0; -} - -#g-rename-tag-form input[type="text"].g-error { - border: 2px solid red; - background: none; -} +} \ No newline at end of file diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index 02985d55..722a8b0e 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -19,7 +19,7 @@ function ajaxify_tag_form() { function closeEditInPlaceForms() { // closes currently open inplace edit forms if ($("#g-rename-tag-form").length) { - $("#g-edit-error-message").remove(); + $("#g-action-status").remove(); var li = $("#g-rename-tag-form").parent(); $("#g-rename-tag-form").parent().html($("#g-rename-tag-form").parent().data("revert")); li.height(""); @@ -74,7 +74,7 @@ function editInPlace(element) { $("#g-rename-tag-form #name") .addClass("g-error") .focus(); - $("#g-tag-admin").before("

" + data.message + "

"); + $("#g-tag-admin").before("

" + data.message + "

"); } } }); -- cgit v1.2.3 From 5d66416b267eafd822d570c74f1c0f3368b61fd9 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Tue, 20 Oct 2009 21:34:47 -0600 Subject: Minor tag admin style updates. --- modules/tag/css/tag.css | 1 + modules/tag/views/admin_tags.html.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/tag/css/tag.css b/modules/tag/css/tag.css index 6e7bb4a3..03ed444b 100644 --- a/modules/tag/css/tag.css +++ b/modules/tag/css/tag.css @@ -80,6 +80,7 @@ #g-tag-admin td { border: 0; + vertical-align: top; } #g-tag-admin ul { diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index 8647412d..3e333817 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -23,7 +23,7 @@
- -- cgit v1.2.3 From 3ac9e84e200dc2c883a080bbdc834bbd4355255c Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Tue, 20 Oct 2009 21:35:35 -0600 Subject: Move basic form styles from wind themes to gallery.common.css. --- lib/gallery.common.css | 203 ++++++++++++++++++++++++++++++--------- themes/admin_wind/css/screen.css | 101 ------------------- themes/wind/css/screen.css | 106 -------------------- 3 files changed, 155 insertions(+), 255 deletions(-) diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 939aa2f6..4f0517db 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -1,12 +1,14 @@ /** - * Gallery 3 commonly reused screen styles + * Gallery 3 commonly re-used screen styles * * Sheet organization: + * * 1) Text - * 2) Dimension and scale - * 3) States and interactions - * 4) Positioning and order - * 5) Containers/widgets + * 2) Forms + * 3) Dimension and scale + * 4) States and interactions + * 5) Positioning and order + * 6) Containers/widgets */ /** ******************************************************************* @@ -25,9 +27,135 @@ text-align: right; } +/** ******************************************************************* + * 2) 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 { + border: none; +} + +legend { + font-weight: bold; + margin-left: .8em; +} + +#g-banner legend, +#g-sidebar legend, +#g-content #g-search-form legend, +input[type="hidden"] { + display: none; +} + +input[type="text"], +input[type="password"] { + width: 50%; +} + +input[type="text"], +input[type="password"], +textarea { + border: 1px solid #e8e8e8; + border-top-color: #ccc; + border-left-color: #ccc; + color: #333; +} + +textarea { + width: 100%; + height: 12em; +} + +input:focus, +input.textbox:focus, +input[type=text]:focus, +textarea:focus, +option:focus { + background-color: #ffc; + color: #000; +} + +/* Form layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +form li { + margin: 0 !important; + padding: .3em 0; +} + +form ul ul { + clear: both; +} + +form ul ul li { + float: left; +} + +input, +select, +textarea { + display: block; + clear: both; + padding: .2em; +} + +input[type="submit"], +input[type="reset"] { + display: inline; + clear: none; + float: left; +} + +/* Short forms ~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-short-form label { + display: none; +} + +.g-short-form fieldset { + border: none; + padding: 0; +} + +.g-short-form li { + float: left; + padding: .4em 0; +} + +.g-short-form .textbox, +.g-short-form input[type=text] { + color: #666; + padding: .3em .6em; +} + +.g-short-form .textbox.g-error { + border: 1px solid #f00; + color: #f00; + padding-left: 24px; +} + +.g-short-form .g-cancel { + display: block; + padding: .2em .8em; +} + +#g-sidebar .g-short-form li { + padding-left: 0; + padding-right: 0; +} /** ******************************************************************* - * 2) Dimension and scale + * 3) Dimension and scale **********************************************************************/ .g-narrow { @@ -39,7 +167,7 @@ } /** ******************************************************************* - * 3) States and interactions + * 4) States and interactions **********************************************************************/ .g-active, @@ -77,6 +205,21 @@ form li.g-warning { padding: .3em .8em .3em 1em; } +form.g-error input[type="text"], +li.g-error input[type="text"], +form.g-error input[type="password"], +li.g-error input[type="password"], +form.g-error input[type="checkbox"], +li.g-error input[type="checkbox"], +form.g-error input[type="radio"], +li.g-error input[type="radio"], +form.g-error textarea, +li.g-error textarea, +form.g-error select, +li.g-error select { + border: 2px solid red; +} + .g-error, .g-denied, tr.g-error td.g-error { @@ -148,7 +291,7 @@ form .g-error { } /** ******************************************************************* - * 4) Positioning and order + * 5) Positioning and order **********************************************************************/ .g-left { @@ -178,7 +321,7 @@ form .g-error { } /** ******************************************************************* - * 5) Containers/widgets + * 6) Containers/widgets **********************************************************************/ /* Generic block container ~~~~~~~~~~~~~~~ */ @@ -298,11 +441,6 @@ div#g-action-status { width: 40%; } -.g-inline * { - float: left; - margin-right: .4em; -} - /* Dialogs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #g-dialog { @@ -341,42 +479,11 @@ div#g-action-status { margin: .4em 1em; } -/* Inline layout (forms, lists) ~~~~~~~~~~ */ - -.g-short-form label { - display: none; -} +/* Inline layout ~~~~~~~~~~ */ -.g-short-form fieldset { - border: none; - padding: 0 !important; -} - -.g-short-form li { +.g-inline * { float: left; - padding: .4em 0; -} - -.g-short-form .textbox { - color: #666; - padding: .3em .6em; - width: auto; -} - -.g-short-form .textbox.g-error { - border: 1px solid #f00; - color: #f00; - padding-left: 24px; -} - -.g-short-form .g-cancel { - display: block; - padding: .2em .8em; -} - -#g-sidebar .g-short-form li { - padding-left: 0; - padding-right: 0; + margin-right: .4em; } /* Right to left styles ~~~~~~~~~~~~~~~~~~~~ */ diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 74323067..7c0149c8 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -114,107 +114,6 @@ th { white-space: nowrap; } -/* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -fieldset { - border: 1px solid #ccc; - padding-bottom: .8em; -} - -#g-header fieldset, -#g-sidebar fieldset { - border: none; -} - -legend { - font-weight: bold; - margin-left: 1em; -} - -#g-header legend, -#g-sidebar legend, -#g-content #g-search-form legend, -input[type="hidden"] { - display: none; -} - -label { - cursor: help; -} - -input[type="text"], -input[type="password"] { - width: 50%; -} - -input[type="text"], -input[type="password"], -textarea { - border: 1px solid #e8e8e8; - border-top-color: #ccc; - border-left-color: #ccc; - color: #333; -} - -textarea { - width: 100%; - height: 12em; -} - -input:focus, -textarea:focus, -option:focus { - background-color: #ffc; - color: #000; -} - -/* Form layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -form li { - margin: 0 !important; - padding: .3em 1.5em .3em 1em; -} - -form ul ul { - clear: both; -} - -form ul ul li { - float: left; -} - -input, -select, -textarea { - display: block; - clear: both; - padding: .2em; -} - -input[type="submit"], -input[type="reset"] { - display: inline; - clear: none; - float: left; -} - -/* Form validation ~~~~~~~~~~~~~~~~~~~~~~~ */ - -form.g-error input[type="text"], -li.g-error input[type="text"], -form.g-error input[type="password"], -li.g-error input[type="password"], -form.g-error input[type="checkbox"], -li.g-error input[type="checkbox"], -form.g-error input[type="radio"], -li.g-error input[type="radio"], -form.g-error textarea, -li.g-error textarea, -form.g-error select, -li.g-error select { - border: 2px solid red; -} - /** ******************************************************************* * 2) Reusable content blocks *********************************************************************/ diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index d7eb19e6..d4fdcade 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -118,112 +118,6 @@ td { vertical-align: top; } -/* 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 { - border: none; -} - -legend { - font-weight: bold; - margin-left: .8em; -} - -#g-banner legend, -#g-sidebar legend, -#g-content #g-search-form legend, -input[type="hidden"] { - display: none; -} - -label { - cursor: help; -} - -input[type="text"], -input[type="password"] { - width: 50%; -} - -input[type="text"], -input[type="password"], -textarea { - border: 1px solid #e8e8e8; - border-top-color: #ccc; - border-left-color: #ccc; - color: #333; -} - -textarea { - width: 100%; - height: 12em; -} - -input:focus, -textarea:focus, -option:focus { - background-color: #ffc; - color: #000; -} - -/* Form layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - -form li { - margin: 0 !important; - padding: .3em 0; -} - -form ul ul { - clear: both; -} - -form ul ul li { - float: left; -} - -input, -select, -textarea { - display: block; - clear: both; - padding: .2em; -} - -input[type="submit"], -input[type="reset"] { - display: inline; - clear: none; - float: left; -} - -/* Form validation ~~~~~~~~~~~~~~~~~~~~~~~ */ - -form.g-error input[type="text"], -li.g-error input[type="text"], -form.g-error input[type="password"], -li.g-error input[type="password"], -form.g-error input[type="checkbox"], -li.g-error input[type="checkbox"], -form.g-error input[type="radio"], -li.g-error input[type="radio"], -form.g-error textarea, -li.g-error textarea, -form.g-error select, -li.g-error select { - border: 2px solid red; -} - /** ******************************************************************* * 2) Reusable content blocks *********************************************************************/ -- cgit v1.2.3 From fbb8e92497a041561e6bea53cb3c6e7a9ab52cd7 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Tue, 20 Oct 2009 22:35:39 -0600 Subject: Added generic .g-message class to mark form validation messages. Minor form layout updates. --- lib/gallery.common.css | 39 +++++++++++++++++++------------------ modules/gallery/views/form.html.php | 2 +- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 4f0517db..77653d00 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -31,19 +31,15 @@ * 2) Forms **********************************************************************/ -#g-sidebar form { - padding-left: 0; - padding-right: 0; -} - fieldset { border: 1px solid #ccc; - padding: .8em 1em !important; + padding: .8em 1em; } #g-banner fieldset, #g-sidebar fieldset { border: none; + padding: 0; } legend { @@ -58,11 +54,17 @@ input[type="hidden"] { display: none; } +input.textbox, input[type="text"], input[type="password"] { width: 50%; } +textarea { + width: 100%; + height: 12em; +} + input[type="text"], input[type="password"], textarea { @@ -72,11 +74,6 @@ textarea { color: #333; } -textarea { - width: 100%; - height: 12em; -} - input:focus, input.textbox:focus, input[type=text]:focus, @@ -89,7 +86,7 @@ option:focus { /* Form layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ form li { - margin: 0 !important; + margin: 0; padding: .3em 0; } @@ -129,6 +126,7 @@ input[type="reset"] { .g-short-form li { float: left; + margin: 0 !important; padding: .4em 0; } @@ -217,7 +215,8 @@ form.g-error textarea, li.g-error textarea, form.g-error select, li.g-error select { - border: 2px solid red; + border: 2px solid #f00; + margin-bottom: .2em; } .g-error, @@ -358,7 +357,11 @@ form .g-error { display: inline-block; } -/* Status messages ~~~~~~~~~~~~~~~~~~~~~~~ */ +/* Status and validation messages ~~~~ */ + +.g-message { + font-size: .8em; +} .g-message-block { border: 1px solid #ccc; @@ -448,14 +451,12 @@ div#g-action-status { } #g-dialog .g-narrow { - margin: 0 auto; - width: 270px; + width: 280px; } -#g-dialog fieldset { +#g-dialog form fieldset { border: none; - padding: 0 !important; - width: 99%; + padding: 0; } #g-dialog legend { diff --git a/modules/gallery/views/form.html.php b/modules/gallery/views/form.html.php index 6bc622fd..abc32164 100644 --- a/modules/gallery/views/form.html.php +++ b/modules/gallery/views/form.html.php @@ -58,7 +58,7 @@ if (!function_exists("DrawForm")) { } if ($input->error_messages()) { foreach ($input->error_messages() as $error_message) { - print "$prefix

\n"; + print "$prefix

\n"; print "$prefix $error_message\n"; print "$prefix

\n"; } -- cgit v1.2.3 From bb8ece06e26c1163f6013b5c8b849cf5eff9dee5 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Tue, 20 Oct 2009 22:47:12 -0600 Subject: Remove g-add-photos selectors from admin_wind, they're only needed in wind. Updated case in hex color spec., prefer lowercase. --- themes/admin_wind/css/screen.css | 48 ---------------------------------------- themes/wind/css/screen.css | 2 +- 2 files changed, 1 insertion(+), 49 deletions(-) diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 7c0149c8..31de58f8 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -568,54 +568,6 @@ li.g-default-group h4, li.g-default-group .g-user { display: inline-block; } -#g-add-photos p { - margin: 0; - padding: 0; -} - -#g-add-photos-canvas { - height: 325px; - width: 450px; - overflow: auto; -} - -#g-add-photos-queue .progressbar { - height: 4px; -} - -#g-add-photos-queue .title { - font-size: 1.25em; -} - -#g-add-photos-queue .status { - font-size: .75em; -} - -#g-add-photos-queue .box { - margin-bottom: 8px; - padding: 4px; -} - -#g-add-photos-queue .pending { - background-color: #e8e8e8; - border: 1px solid #d7d7d7; -} - -#g-add-photos-queue .error { - background-color: #fcc; - border: 1px solid #ebb; -} - -#g-add-photos-queue .uploading { - background-color: #ff9; - border: 1px solid #ee8; -} - -#g-add-photos-queue .complete { - background-color: #cfc; - border: 1px solid #beb; -} - #g-admin-g2-import-notes { padding-bottom: 20px; } diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index d4fdcade..fcbf63ea 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -591,7 +591,7 @@ td { padding-left:10px; } #g-add-photos-canvas { - border: 1px solid #CCCCCC; + border: 1px solid #ccc; margin: .5em 0 .5em 0; width: 469px; height: 325px; -- cgit v1.2.3 From 055c410126d3ec56aac34dabf1cee5a57459afaf Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Tue, 20 Oct 2009 23:20:38 -0600 Subject: Fix block management UI. Block list height is now dynamically set based on the total number of available blocks which will grow without hardcoding CSS heights and setting the div to be scrollable. --- modules/gallery/views/admin_sidebar.html.php | 41 ++++++++++++++++------------ themes/admin_wind/css/screen.css | 25 ++++++++++++----- 2 files changed, 41 insertions(+), 25 deletions(-) diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php index 030dfdce..834429c3 100644 --- a/modules/gallery/views/admin_sidebar.html.php +++ b/modules/gallery/views/admin_sidebar.html.php @@ -1,11 +1,13 @@ -
+ +

-
"> -
-

-
-
    - -
+
+
"> +
+

+
+
    + +
+
-
-
-

-
-
    - -
+
+

+
+
    + +
+
diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 31de58f8..a889545b 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -424,16 +424,27 @@ li.g-default-group h4, li.g-default-group .g-user { /* Block admin ~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#g-admin-blocks .g-block { - clear: none; +.g-admin-blocks-list { + float: left; + margin: 0 2em 2em 0; width: 30%; } -#g-admin-blocks .g-block .g-draggable { - background: #e7e7e7; - /*border: 1px solid #fff;*/ - margin-bottom: 1em; - padding: .4em .8em; +.g-admin-blocks-list div:last-child { + border: .1em solid; + height: 100%; +} + +.g-admin-blocks-list ul { + height: 98%; + margin: .1em .1em; + padding: .1em; +} + +.g-admin-blocks-list ul li.g-draggable { + background-color: #e8e8e8; + margin: .5em; + padding: .3em .8em; } /** ******************************************************************* -- cgit v1.2.3 From 093b20980755c1c566689a3ae83ac5cdee1322fe Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Tue, 20 Oct 2009 23:22:16 -0600 Subject: Removed console.log() debug output. --- modules/tag/js/tag.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index 722a8b0e..ed977480 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -64,13 +64,11 @@ function editInPlace(element) { $("#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 window.location.reload(); } else if (data.result == "error") { - console.log("error"); $("#g-rename-tag-form #name") .addClass("g-error") .focus(); -- cgit v1.2.3 From e025abea4179bc059b8fef195bafe0c3f60f1220 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Tue, 20 Oct 2009 23:37:03 -0600 Subject: Added confirmation message for block admin actions. --- modules/gallery/views/admin_sidebar.html.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php index 834429c3..f784b1a5 100644 --- a/modules/gallery/views/admin_sidebar.html.php +++ b/modules/gallery/views/admin_sidebar.html.php @@ -21,6 +21,10 @@ if (data.result == "success") { $("ul#g-available-blocks").html(data.available); $("ul#g-active-blocks").html(data.active); + var message = "Updated blocks"; + $("#g-action-status").remove(); + $("#g-block-admin").before("
  • " + message + "
"); + $("#g-action-status").fadeTo(1000,1).fadeTo(2000,0); } }); } @@ -29,7 +33,7 @@ }); -
+

-- cgit v1.2.3

+ count()) ?>