[Rt-commit] rt branch, 4.2/fix-rights-editor-tab-state, created. rt-4.2.1-69-g02252aa
? sunnavy
sunnavy at bestpractical.com
Mon Dec 30 09:08:04 EST 2013
The branch, 4.2/fix-rights-editor-tab-state has been created
at 02252aa790a430492079e124faf3f47542297893 (commit)
- Log -----------------------------------------------------------------
commit 02252aa790a430492079e124faf3f47542297893
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Dec 30 21:58:34 2013 +0800
js code update for new jquery-ui tabs used in EditRights
the main changes that affect here of tabs(since 1.10) are:
* cookie support is removed
* option selected => active
* events select and show are removed
diff --git a/share/html/Admin/Elements/EditRights b/share/html/Admin/Elements/EditRights
index dc26d0f..9a60e7b 100644
--- a/share/html/Admin/Elements/EditRights
+++ b/share/html/Admin/Elements/EditRights
@@ -92,19 +92,20 @@ if ($anchor =~ /AddPrincipal/) {
sync_anchor(<% $anchor |n,j %>);
jQuery(".rights-editor").tabs({
- select: function(ev, ui) {
- sync_anchor(ui.tab.hash);
+ activate: function(ev, ui) {
+ sync_anchor(ui.newPanel.selector);
}
});
jQuery(".rights-editor .category-tabs").tabs({
- cookie: { name: "rights-category-tab" /* saves current tab in cookie */ },
- show: function(ev, ui) {
+ active: jQuery.cookie('rights-category-tab') || 0,
+ activate: function(ev, ui) {
+ jQuery.cookie('rights-category-tab', ui.newTab.index());
jQuery(".rights-editor .category-tabs").not(this).each(function() {
var item = jQuery(this);
- var selected = item.tabs("option", "selected") || 0;
- if (selected != ui.index)
- item.tabs("select", ui.index);
+ var selected = item.tabs("option", "active") || 0;
+ if (selected != ui.newTab.index())
+ item.tabs("option", "active", ui.newTab.index());
});
}
});
-----------------------------------------------------------------------
More information about the rt-commit
mailing list