app/soc/content/js/menu-090825.js
author Sverre Rabbelier <srabbelier@gmail.com>
Sat, 12 Sep 2009 00:59:58 +0200
changeset 2899 691735924efb
parent 2801 0ee67cc9bd20
permissions -rw-r--r--
Fix broken maintenance mode Maintenance mode has been broken since r7fe19ebfe0d3 (Thu Jun 4) "Display caught errors on the page itself", fix it by passing the site entity, rather than the site module to isActivePeriod.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2800
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
     1
jQuery(function () {
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
     2
  var new_item_text = "(new)";
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
     3
  jQuery('#menu li.expandable').find('a').each(function () {
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
     4
    if (jQuery(this).text().indexOf(new_item_text) > -1) {
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
     5
      jQuery(this).css('color', 'red');
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
     6
    }
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
     7
  });
2455
a023b71ce125 fixed critical errors related to survey subclassing and renaming of deadline and opening properties, and surveys in sidebar are now marked as such and have a red color if untaken
james@jamess-macbook-air.local
parents: 449
diff changeset
     8
2800
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
     9
  jQuery('#side #menu li.expandable > a').dblclick(function () {
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
    10
    window.location = jQuery(this).attr('href');
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
    11
  });
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
    12
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
    13
  jQuery('#side #menu li.expandable > span').toggle(function () {
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
    14
    jQuery(this).find("img").attr('src', '/soc/content/images/plus.gif')
2455
a023b71ce125 fixed critical errors related to survey subclassing and renaming of deadline and opening properties, and surveys in sidebar are now marked as such and have a red color if untaken
james@jamess-macbook-air.local
parents: 449
diff changeset
    15
    .end().parent().children("ul").toggle();
2800
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
    16
  }, function () {
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
    17
    jQuery(this).find("img").attr('src', '/soc/content/images/minus.gif')
2455
a023b71ce125 fixed critical errors related to survey subclassing and renaming of deadline and opening properties, and surveys in sidebar are now marked as such and have a red color if untaken
james@jamess-macbook-air.local
parents: 449
diff changeset
    18
    .end().parent().children("ul").toggle();
423
25665d645fa8 Add javascript expandable menus.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    19
    return false;
25665d645fa8 Add javascript expandable menus.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    20
  });
2800
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
    21
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
    22
  jQuery('#side #menu li.expandable > span').contents()
2455
a023b71ce125 fixed critical errors related to survey subclassing and renaming of deadline and opening properties, and surveys in sidebar are now marked as such and have a red color if untaken
james@jamess-macbook-air.local
parents: 449
diff changeset
    23
  .before('<img src="/soc/content/images/minus.gif" />');
2800
cd9eed2b787e Made all JS code JSLint compliant.
Mario Ferraro <fadinlight@gmail.com>
parents: 2455
diff changeset
    24
});