root / drupal7 / sites / all / modules / panels / js / panels-base.js @ f0456308
1 | 85ad3d82 | Assos Assos | /**
|
---|---|---|---|
2 | * @file
|
||
3 | * Implement basic methods required by all of panels.
|
||
4 | */
|
||
5 | |||
6 | (function ($) { |
||
7 | Drupal.Panels = Drupal.Panels || {}; |
||
8 | |||
9 | Drupal.Panels.changed = function(item) { |
||
10 | if (!item.is('.changed')) { |
||
11 | item.addClass('changed');
|
||
12 | item.find('div.grabber span.text').append(' <span class="star">*</span> '); |
||
13 | } |
||
14 | }; |
||
15 | |||
16 | Drupal.Panels.restripeTable = function(table) { |
||
17 | // :even and :odd are reversed because jquery counts from 0 and
|
||
18 | // we count from 1, so we're out of sync.
|
||
19 | $('tbody tr:not(:hidden)', $(table)) |
||
20 | .removeClass('even')
|
||
21 | .removeClass('odd')
|
||
22 | .filter(':even')
|
||
23 | .addClass('odd')
|
||
24 | .end() |
||
25 | .filter(':odd')
|
||
26 | .addClass('even');
|
||
27 | }; |
||
28 | })(jQuery); |