diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-21 07:07:53 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-21 07:07:53 -0700 |
commit | a2048ab3038b93925bff9a29cb22366e5670e067 (patch) | |
tree | e38621f059fb907ed36a5f569448b8e4360c5b35 | |
parent | 97928804ad5f7b69fefe6ff2b50115af1159dbbc (diff) | |
parent | e025abea4179bc059b8fef195bafe0c3f60f1220 (diff) |
Merge branch 'master' into talmdal_dev
Conflicts:
lib/gallery.common.css
-rw-r--r-- | lib/gallery.common.css | 216 | ||||
-rw-r--r-- | modules/gallery/views/admin_sidebar.html.php | 45 | ||||
-rw-r--r-- | modules/gallery/views/form.html.php | 2 | ||||
-rw-r--r-- | modules/tag/css/tag.css | 8 | ||||
-rw-r--r-- | modules/tag/js/tag.js | 6 | ||||
-rw-r--r-- | modules/tag/views/admin_tags.html.php | 2 | ||||
-rw-r--r-- | themes/admin_wind/css/screen.css | 174 | ||||
-rw-r--r-- | themes/wind/css/screen.css | 108 |
8 files changed, 218 insertions, 343 deletions
diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 12d96d41..2a8eddb2 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,133 @@ text-align: right; } +/** ******************************************************************* + * 2) Forms + **********************************************************************/ + +fieldset { + border: 1px solid #ccc; + padding: .8em 1em; +} + +#g-banner fieldset, +#g-sidebar fieldset { + border: none; + padding: 0; +} + +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.textbox, +input[type="text"], +input[type="password"] { + width: 50%; +} + +textarea { + width: 100%; + height: 12em; +} + +input[type="text"], +input[type="password"], +textarea { + border: 1px solid #e8e8e8; + border-top-color: #ccc; + border-left-color: #ccc; + color: #333; +} + +input:focus, +input.textbox:focus, +input[type=text]:focus, +textarea:focus, +option:focus { + background-color: #ffc; + color: #000; +} + +/* Form layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +form li { + margin: 0; + 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; + margin: 0 !important; + 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 +165,7 @@ } /** ******************************************************************* - * 3) States and interactions + * 4) States and interactions **********************************************************************/ .g-active, @@ -77,6 +203,22 @@ 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 #f00; + margin-bottom: .2em; +} + .g-error, .g-denied, tr.g-error td.g-error { @@ -148,7 +290,7 @@ form .g-error { } /** ******************************************************************* - * 4) Positioning and order + * 5) Positioning and order **********************************************************************/ .g-left { @@ -178,7 +320,7 @@ form .g-error { } /** ******************************************************************* - * 5) Containers/widgets + * 6) Containers/widgets **********************************************************************/ /* Generic block container ~~~~~~~~~~~~~~~ */ @@ -215,18 +357,24 @@ form .g-error { display: inline-block; } -/* Status messages ~~~~~~~~~~~~~~~~~~~~~~~ */ +/* Status and validation messages ~~~~ */ + +.g-message { + font-size: .8em; +} .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; } @@ -296,11 +444,6 @@ form .g-error { width: 40%; } -.g-inline * { - float: left; - margin-right: .4em; -} - /* Dialogs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #g-dialog { @@ -308,14 +451,12 @@ form .g-error { } #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 { @@ -339,36 +480,11 @@ form .g-error { margin: .4em 1em; } -/* Inline layout (forms, lists) ~~~~~~~~~~ */ - -.g-short-form label { - display: none; -} - -.g-short-form fieldset { - border: none; - padding: 0 !important; -} +/* Inline layout ~~~~~~~~~~ */ -.g-short-form li { +.g-inline * { 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; + margin-right: .4em; } /* Right to left styles ~~~~~~~~~~~~~~~~~~~~ */ diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php index 030dfdce..f784b1a5 100644 --- a/modules/gallery/views/admin_sidebar.html.php +++ b/modules/gallery/views/admin_sidebar.html.php @@ -1,11 +1,13 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <script type="text/javascript"> $(document).ready(function(){ - $(".g-blocks-list").equal_heights(); + $(".g-admin-blocks-list").equal_heights(); + var extra_ht = $(".g-admin-blocks-list li").length * $(".g-admin-blocks-list li:first").height(); + $(".g-admin-blocks-list").height($(".g-admin-blocks-list").height() + extra_ht); }); $(function() { - $(".g-blocks-list ul").sortable({ + $(".g-admin-blocks-list ul").sortable({ connectWith: ".g-sortable-blocks", opacity: .7, placeholder: "g-target", @@ -15,10 +17,14 @@ $("ul#g-active-blocks li").each(function(i) { active_blocks += "&block["+i+"]="+$(this).attr("ref"); }); - $.getJSON($("#g-admin-blocks").attr("ref").replace("__ACTIVE__", active_blocks), function(data) { + $.getJSON($("#g-site-blocks").attr("ref").replace("__ACTIVE__", active_blocks), function(data) { 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("<ul id=\"g-action-status\" class=\"g-message-block\"><li class=\"g-success\">" + message + "</li></ul>"); + $("#g-action-status").fadeTo(1000,1).fadeTo(2000,0); } }); } @@ -26,27 +32,30 @@ }).disableSelection(); }); </script> -<div class="g-block"> + +<div id="g-block-admin" class="g-block ui-helper-clearfix"> <h1> <?= t("Manage Sidebar") ?> </h1> <p> <?= t("Select and drag blocks from the available column to the active column to add to the sidebar; remove by dragging the other way.") ?> </p> - <div id="g-admin-blocks" class="g-block-content ui-helper-clearfix" ref="<?= url::site("admin/sidebar/update?csrf={$csrf}__ACTIVE__") ?>"> - <div class="g-block g-left"> - <h3><?= t("Available Blocks") ?></h3> - <div class="g-blocks-list g-block-content"> - <ul id="g-available-blocks" class="g-sortable-blocks"> - <?= $available ?> - </ul> + <div class="g-block-content"> + <div id="g-site-blocks" ref="<?= url::site("admin/sidebar/update?csrf={$csrf}__ACTIVE__") ?>"> + <div class="g-admin-blocks-list"> + <div><h3><?= t("Available Blocks") ?></h3></div> + <div> + <ul id="g-available-blocks" class="g-sortable-blocks"> + <?= $available ?> + </ul> + </div> </div> - </div> - <div class="g-block g-left"> - <h3><?= t("Active Blocks") ?></h3> - <div class="g-blocks-list g-block-content"> - <ul id="g-active-blocks" class="g-sortable-blocks"> - <?= $active ?> - </ul> + <div class="g-admin-blocks-list"> + <div><h3><?= t("Active Blocks") ?></h3></div> + <div> + <ul id="g-active-blocks" class="g-sortable-blocks"> + <?= $active ?> + </ul> + </div> </div> </div> </div> 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 <p class=\"g-error\">\n"; + print "$prefix <p class=\"g-message g-error\">\n"; print "$prefix $error_message\n"; print "$prefix </p>\n"; } diff --git a/modules/tag/css/tag.css b/modules/tag/css/tag.css index ec16251d..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 { @@ -92,9 +93,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..ed977480 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(""); @@ -64,17 +64,15 @@ 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(); - $("#g-tag-admin").before("<p id=\"g-edit-error-message\" class=\"g-error\">" + data.message + "</p>"); + $("#g-tag-admin").before("<p id=\"g-action-status\" class=\"g-message-block g-error\">" + data.message + "</p>"); } } }); 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 @@ <div class="g-block-content"> <table id="g-tag-admin"> - <caption class="g-understate"> + <caption> <?= t2("There is one tag", "There are %count tags", $tags->count()) ?> </caption> <tr> diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index e0e5b10d..65a2f43b 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 *********************************************************************/ @@ -526,16 +425,27 @@ li.g-group-disable h4, li.g-group-disable .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; } /** ******************************************************************* @@ -670,54 +580,6 @@ li.g-group-disable h4, li.g-group-disable .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 d7eb19e6..fcbf63ea 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 *********************************************************************/ @@ -697,7 +591,7 @@ li.g-error select { padding-left:10px; } #g-add-photos-canvas { - border: 1px solid #CCCCCC; + border: 1px solid #ccc; margin: .5em 0 .5em 0; width: 469px; height: 325px; |