Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:gallery/gallery3
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat committed Aug 29, 2009
2 parents 483d8df + a1ce2d3 commit a2258b2
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 1 deletion.
111 changes: 111 additions & 0 deletions 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 {

}
13 changes: 13 additions & 0 deletions modules/gallery/js/l10n_client.js
Expand Up @@ -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.
Expand Down
5 changes: 4 additions & 1 deletion modules/gallery/views/l10n_client.html.php
Expand Up @@ -3,7 +3,8 @@
<div class="labels">
<span id="l10n-client-toggler">
<a id="gMinimizeL10n">_</a>
<a id="gCloseL10n" href="<?= url::site("l10n_client/toggle_l10n_mode?csrf=".access::csrf_token()) ?>">X</a>
<a id="gCloseL10n" title="<?= t("Stop the translation mode") ?>"
href="<?= url::site("l10n_client/toggle_l10n_mode?csrf=".access::csrf_token()) ?>">X</a>
</span>
<div class="label strings"><h2><?= t("Page Text") ?>
<? if (!Input::instance()->get('show_all_l10n_messages')): ?>
Expand Down Expand Up @@ -76,5 +77,7 @@ class="gButtonLink ui-state-default ui-corner-all"><?= t("Copy source text") ?><
var MSG_CLOSE_X = "<?= t("X") ?>";
var l10n_client_data = <?= json_encode($string_list) ?>;
var plural_forms = <?= json_encode($plural_forms) ?>;
var toggle_l10n_mode_url = "<?= url::site("l10n_client/toggle_l10n_mode") ?>";
var csrf = "<?= access::csrf_token() ?>";
</script>
</div>

0 comments on commit a2258b2

Please sign in to comment.