author | Lennard de Rijk <ljvderijk@gmail.com> |
Sat, 04 Jul 2009 15:16:54 +0200 | |
changeset 2532 | 0b4dbe4b3fb7 |
parent 2455 | a023b71ce125 |
child 2800 | cd9eed2b787e |
permissions | -rw-r--r-- |
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 |
}); |