X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FAdmin%2FElements%2FEditRights;h=ece8d9e170aef222b73c62f7e3f5e4ec3f5c358c;hp=20ee551c9d6ff4264107a406ddd5e1596d2656cd;hb=7322f2afedcc2f427e997d1535a503613a83f088;hpb=c71b2dc296da6207c525a064d322f7153c284d4e diff --git a/rt/share/html/Admin/Elements/EditRights b/rt/share/html/Admin/Elements/EditRights index 20ee551c9..ece8d9e17 100644 --- a/rt/share/html/Admin/Elements/EditRights +++ b/rt/share/html/Admin/Elements/EditRights @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -51,8 +51,6 @@ $Principals $AddPrincipal => undef <%init> -use Scalar::Util qw(blessed); - # Let callbacks get at principals and context before we do anything with them $m->callback( Principals => $Principals, Context => $Context ); @@ -94,22 +92,23 @@ if ($anchor =~ /AddPrincipal/) { sync_anchor(<% $anchor |n,j %>); jQuery(".rights-editor").tabs({ - select: function(ev, ui) { - sync_anchor(ui.tab.hash); - if ( jQuery(ui.tab).find('input[type=text]').size() > 0 ) { - jQuery(ui.tab).find('input[type=text]:first').focus(); + beforeActivate: function(ev, ui) { + sync_anchor(ui.newPanel.selector); + if ( ui.newTab.find('input[type=text]').size() > 0 ) { + ui.newTab.find('input[type=text]:first').focus(); } } }); 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()); }); } }); @@ -140,21 +139,23 @@ for my $category (@$Principals) {
  • % my $type = lc $AddPrincipal eq 'user' ? loc('username') : loc($AddPrincipal); @@ -180,7 +181,7 @@ for my $category (@$Principals) { if ($obj->isa('RT::Group') and $obj->Domain eq 'UserDefined') { my $subgroups = $obj->GroupMembersObj( Recursively => 1 ); $subgroups->LimitToUserDefinedGroups; - $subgroups->Limit( FIELD => 'Name', OPERATOR => '!=', VALUE => $obj->Name ); + $subgroups->Limit( FIELD => 'Name', OPERATOR => '!=', VALUE => $obj->Name, CASESENSITIVE => 0 ); if ( $subgroups->Count ) { my $inc = join ", ", map $_->Name, @{$subgroups->ItemsArrayRef};