author | Dan |
Sun, 25 Jan 2009 20:24:38 -0500 | |
changeset 820 | 07e54a67d5d2 |
parent 582 | a38876c0793c |
child 1227 | bdac73ed481e |
permissions | -rw-r--r-- |
1 | 1 |
// Page toolbar - selecting buttons |
2 |
||
582
a38876c0793c
Majorly reworked Javascript runtime stuff to use on-demand loading.
Dan
parents:
420
diff
changeset
|
3 |
window.unselectAllButtonsMajor = function() |
1 | 4 |
{ |
5 |
if ( !document.getElementById('pagebar_main') ) |
|
6 |
return false; |
|
7 |
obj = document.getElementById('pagebar_main').firstChild; |
|
8 |
while(obj) |
|
9 |
{ |
|
10 |
if(obj.id == 'mdgToolbar_article' || obj.id == 'mdgToolbar_discussion') |
|
11 |
{ |
|
420
301f546688d1
Re-enabled, debugged, and optimized Javascript compression code
Dan
parents:
128
diff
changeset
|
12 |
$dynano(obj).rmClass('selected'); |
1 | 13 |
} |
14 |
obj = obj.nextSibling; |
|
15 |
} |
|
16 |
} |
|
17 |
||
582
a38876c0793c
Majorly reworked Javascript runtime stuff to use on-demand loading.
Dan
parents:
420
diff
changeset
|
18 |
window.unselectAllButtonsMinor = function() |
1 | 19 |
{ |
20 |
if ( !document.getElementById('pagebar_main') ) |
|
21 |
return false; |
|
22 |
obj = document.getElementById('pagebar_main').firstChild.nextSibling; |
|
23 |
while(obj) |
|
24 |
{ |
|
420
301f546688d1
Re-enabled, debugged, and optimized Javascript compression code
Dan
parents:
128
diff
changeset
|
25 |
if ( !$dynano(obj).hasClass('selected') ) |
1 | 26 |
{ |
27 |
obj = obj.nextSibling; |
|
28 |
continue; |
|
29 |
} |
|
30 |
if(obj.id != 'mdgToolbar_article' && obj.id != 'mdgToolbar_discussion') |
|
31 |
{ |
|
32 |
if ( obj.className ) |
|
420
301f546688d1
Re-enabled, debugged, and optimized Javascript compression code
Dan
parents:
128
diff
changeset
|
33 |
$dynano(obj).rmClass('selected'); |
1 | 34 |
} |
35 |
obj = obj.nextSibling; |
|
36 |
} |
|
37 |
} |
|
38 |
||
582
a38876c0793c
Majorly reworked Javascript runtime stuff to use on-demand loading.
Dan
parents:
420
diff
changeset
|
39 |
window.selectButtonMajor = function(which) |
1 | 40 |
{ |
41 |
if ( !document.getElementById('pagebar_main') ) |
|
42 |
return false; |
|
86
c162ca39db8f
Finished pagination code (was incomplete in previous revision) and added a few hacks for an upcoming theme
Dan
parents:
1
diff
changeset
|
43 |
var dom = document.getElementById('mdgToolbar_'+which); |
c162ca39db8f
Finished pagination code (was incomplete in previous revision) and added a few hacks for an upcoming theme
Dan
parents:
1
diff
changeset
|
44 |
if ( !dom ) |
c162ca39db8f
Finished pagination code (was incomplete in previous revision) and added a few hacks for an upcoming theme
Dan
parents:
1
diff
changeset
|
45 |
return false; |
c162ca39db8f
Finished pagination code (was incomplete in previous revision) and added a few hacks for an upcoming theme
Dan
parents:
1
diff
changeset
|
46 |
if(typeof(dom) == 'object') |
1 | 47 |
{ |
48 |
unselectAllButtonsMajor(); |
|
420
301f546688d1
Re-enabled, debugged, and optimized Javascript compression code
Dan
parents:
128
diff
changeset
|
49 |
$dynano('mdgToolbar_'+which).addClass('selected'); |
1 | 50 |
} |
51 |
} |
|
52 |
||
582
a38876c0793c
Majorly reworked Javascript runtime stuff to use on-demand loading.
Dan
parents:
420
diff
changeset
|
53 |
window.selectButtonMinor = function(which) |
1 | 54 |
{ |
55 |
if ( !document.getElementById('pagebar_main') ) |
|
56 |
return false; |
|
57 |
if(typeof(document.getElementById('mdgToolbar_'+which)) == 'object') |
|
58 |
{ |
|
59 |
unselectAllButtonsMinor(); |
|
420
301f546688d1
Re-enabled, debugged, and optimized Javascript compression code
Dan
parents:
128
diff
changeset
|
60 |
$dynano('mdgToolbar_'+which).addClass('selected'); |
1 | 61 |
} |
62 |
} |
|
63 |