allura
Revisión | 429ae7d7920c85a623d534084e566473e7c35348 (tree) |
---|---|
Tiempo | 2012-05-15 00:09:11 |
Autor | Jenny Steele <jsteele@geek...> |
Commiter | Yaroslav Luzin |
[#3598] Inherited permissions now keep an up to date inherit message on the permission tooltip
@@ -77,10 +77,12 @@ $(function() { | ||
77 | 77 | for(var i=0, len=data[k].length; i<len; ++i){ |
78 | 78 | var item = data[k][i]; |
79 | 79 | var perm_holder = group_holder.find('li[data-permission='+item.name+']'); |
80 | + var perm_link = perm_holder.find('a'); | |
80 | 81 | if(!perm_holder.hasClass(item.has)){ |
81 | 82 | perm_holder.effect('highlight', {}, 2000); |
82 | 83 | var icon = perm_holder.find('b'); |
83 | - perm_holder.attr('class',item.has).find('a').attr('title',item.text); | |
84 | + perm_holder.attr('class',item.has); | |
85 | + perm_link.attr('title',item.text); | |
84 | 86 | if(item.has=="yes"){ |
85 | 87 | icon.attr('class','ico ico-check').attr('data-icon','3'); |
86 | 88 | } |
@@ -91,7 +93,11 @@ $(function() { | ||
91 | 93 | icon.attr('class','ico ico-noentry').attr('data-icon','d'); |
92 | 94 | } |
93 | 95 | perm_holder.find('span').remove(); |
94 | - perm_holder.find('a').show(); | |
96 | + perm_link.show(); | |
97 | + } | |
98 | + // inherited permissions may change where they're inherited from | |
99 | + else if(item.has=="inherit"){ | |
100 | + perm_link.attr('title',item.text); | |
95 | 101 | } |
96 | 102 | } |
97 | 103 | } |