app/soc/content/js/menu-081108.js
author Madhusudan C.S <madhusudancs@gmail.com>
Sat, 22 Aug 2009 03:56:14 +0530
changeset 2783 339696f3f5cf
parent 2455 a023b71ce125
child 2800 cd9eed2b787e
permissions -rw-r--r--
Extended program configuration create/edit views specifically to support GHOP. Added the first views for GHOP, which are inherited from soc program views. Added new param keys, module_package. url_name key now specifies this is view is from a Melange GHOP module. Also added the view to GHOP module's callback.py. The program Logic class's timeline_logic variable is tied to corresponding timeline logic within the constructor.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
423
25665d645fa8 Add javascript expandable menus.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     1
$(function() {
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
     2
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
     3
   var new_item_text = "(new)"
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
     4
   $('#menu li.expandable').find('a').each(function(){
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
     5
     if ($(this).text().indexOf(new_item_text) > -1)
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
     6
     $(this).css('color', 'red');
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
     7
   });
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
   
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
     9
   $('#side #menu li.expandable > a').dblclick(function() {
423
25665d645fa8 Add javascript expandable menus.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    10
    window.location = $(this).attr('href');
449
a4dc4c9e7356 Allowing + and - to be clicked in the menu
Dmitri Gaskin <dmitrig01@gmail.com>
parents: 426
diff changeset
    11
  })
a4dc4c9e7356 Allowing + and - to be clicked in the menu
Dmitri Gaskin <dmitrig01@gmail.com>
parents: 426
diff changeset
    12
  $('#side #menu li.expandable > span').toggle(function() {
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
    13
    $(this).find("img").attr('src', '/soc/content/images/plus.gif')
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
    14
    .end().parent().children("ul").toggle();
449
a4dc4c9e7356 Allowing + and - to be clicked in the menu
Dmitri Gaskin <dmitrig01@gmail.com>
parents: 426
diff changeset
    15
  }, function() {
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
    16
    $(this).find("img").attr('src', '/soc/content/images/minus.gif')
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
    17
    .end().parent().children("ul").toggle();
423
25665d645fa8 Add javascript expandable menus.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    18
    return false;
25665d645fa8 Add javascript expandable menus.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    19
  });
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
    20
  $('#side #menu li.expandable > span').contents()
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
    21
  .before('<img src="/soc/content/images/minus.gif" />');
449
a4dc4c9e7356 Allowing + and - to be clicked in the menu
Dmitri Gaskin <dmitrig01@gmail.com>
parents: 426
diff changeset
    22
});