From 39559fdfd09491dce669d0351768fe2b13ccdd03 Mon Sep 17 00:00:00 2001 From: jhilden Date: Sat, 29 Aug 2009 19:11:16 -0400 Subject: [PATCH 1/2] initial version of the the file with common CSS styles that should be reused if possible --- lib/gallery.common.css | 111 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 lib/gallery.common.css diff --git a/lib/gallery.common.css b/lib/gallery.common.css new file mode 100644 index 0000000000..ca90a484fb --- /dev/null +++ b/lib/gallery.common.css @@ -0,0 +1,111 @@ +/* ####### states, interactions, positioning ########### */ + +/* states */ + +.g-active, .g-enabled, .g-available, .g-editable, .g-selected, .g-highlight { + font-weight: bold; +} +.g-inactive, .g-disabled, .g-unavailable, .g-uneditable, .g-locked, .g-unselected, .g-understate { + color: #ccc; + font-weight: normal; +} + +.g-error, .g-denied { + +} +.g-success, .g-allowed { + +} +.g-info { + +} +.g-warning { + +} + +.g-open { + +} +.g-closed { + +} + +.g-installed { + +} +.g-default { + +} + +/* interactions */ + +.g-draggable, .ui-draggable { + cursor: move; +} +.g-target { + +} + + + +/* positioning */ + +.g-right { + float: right; +} +.g-left { + float: left; +} + +/* order */ + +.g-first { + +} +.g-last { + +} +.g-even-row { + +} +.g-odd-row { + +} + +/* text */ + +.g-txt-small { + font-size: .8em; +} +.g-txt-big { + font-size: 1.2em; +} +.g-txt-right { + text-align: right; +} + +/* ####### reusable containers/widgets ########### */ + +.g-dialog { + +} + +.g-button { /* a link styled like a button */ + +} + +.g-progressbar { + +} + +.g-block { + +} + +.g-message-box { + +} + +.g-list-horizontal { + +} From a1ce2d3f0aff6dcb7149f2d7327a10079e5c78f8 Mon Sep 17 00:00:00 2001 From: jhilden Date: Sat, 29 Aug 2009 19:19:04 -0400 Subject: [PATCH 2/2] you can close the l10n client directly from its interface now, without going back to the languages admin page --- modules/gallery/js/l10n_client.js | 13 +++++++++++++ modules/gallery/views/l10n_client.html.php | 5 ++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/gallery/js/l10n_client.js b/modules/gallery/js/l10n_client.js index 80fe166b26..35986e5a69 100644 --- a/modules/gallery/js/l10n_client.js +++ b/modules/gallery/js/l10n_client.js @@ -205,6 +205,19 @@ Gallery.behaviors.l10nClient = function(context) { Gallery.l10nClient.toggle(0); } }); + + // Close the l10n client using an AJAX call and refreshing the page + $('#gCloseL10n').click(function(event) { + $.ajax({ + type: "GET", + url: toggle_l10n_mode_url, + data: "csrf=" + csrf, + success: function() { + window.location.reload(true); + } + }); + event.preventDefault(); + }); // Register keybindings using jQuery hotkeys // TODO: Either remove hotkeys code or add query.hotkeys.js. diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php index 5ee7eca33b..6c440b6858 100644 --- a/modules/gallery/views/l10n_client.html.php +++ b/modules/gallery/views/l10n_client.html.php @@ -3,7 +3,8 @@
_ - X + " + href="">X

get('show_all_l10n_messages')): ?> @@ -76,5 +77,7 @@ class="gButtonLink ui-state-default ui-corner-all">< var MSG_CLOSE_X = ""; var l10n_client_data = ; var plural_forms = ; + var toggle_l10n_mode_url = ""; + var csrf = "";