summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gallery.common.js12
-rw-r--r--modules/gallery/libraries/I18n.php7
-rw-r--r--themes/default/js/ui.init.js8
3 files changed, 15 insertions, 12 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js
index 844e219b..a959d90d 100644
--- a/lib/gallery.common.js
+++ b/lib/gallery.common.js
@@ -112,15 +112,19 @@
};
$.fn.gallery_context_menu = function() {
+ var in_progress = 0;
+ $(".gContextMenu *").removeAttr('title');
$(".gContextMenu ul").hide();
$(".gContextMenu").hover(
function() {
- $(this).find("ul").slideDown("fast");
- $(this).find(".gDialogLink").gallery_dialog();
- $(this).find(".gAjaxLink").gallery_ajax();
+ if (in_progress == 0) {
+ $(this).find("ul").slideDown("fast", function() { in_progress = 1; });
+ $(this).find(".gDialogLink").gallery_dialog();
+ $(this).find(".gAjaxLink").gallery_ajax();
+ }
},
function() {
- $(this).find("ul").slideUp("slow");
+ $(this).find("ul").slideUp("slow", function() { in_progress = 0; });
}
);
};
diff --git a/modules/gallery/libraries/I18n.php b/modules/gallery/libraries/I18n.php
index 03a6d8f6..b1b4298a 100644
--- a/modules/gallery/libraries/I18n.php
+++ b/modules/gallery/libraries/I18n.php
@@ -77,7 +77,12 @@ class I18n_Core {
// TODO: See G2 for better fallack code.
$locale_prefs = array($locale);
$locale_prefs[] = 'en_US';
- setlocale(LC_ALL, $locale_prefs);
+ $new_locale = setlocale(LC_ALL, $locale_prefs);
+ if (is_string($new_locale) && strpos($new_locale, 'tr') === 0) {
+ // Make PHP 5 work with Turkish (the localization results are mixed though).
+ // Hack for http://bugs.php.net/18556
+ setlocale(LC_CTYPE, 'C');
+ }
}
return $this->_config['default_locale'];
}
diff --git a/themes/default/js/ui.init.js b/themes/default/js/ui.init.js
index ef7e43d9..2391f638 100644
--- a/themes/default/js/ui.init.js
+++ b/themes/default/js/ui.init.js
@@ -1,8 +1,5 @@
/**
- * Initialize jQuery UI and Plugin elements
- *
- * @todo Standardize how elements requiring listeners are handled
- * http://docs.jquery.com/Events/live
+ * Initialize jQuery UI and Gallery Plugin elements
*/
var shortForms = new Array(
@@ -13,9 +10,6 @@ var shortForms = new Array(
$(document).ready(function() {
- // Remove .gMenu from thumb menu's before initializing Superfish
- // @todo gallery_menu should only apply gMenu to top-level menus, submenus should be gSubMenu-N
-
// Initialize Superfish menus
$("ul.gMenu").addClass("sf-menu");
$('ul.sf-menu').superfish({