includes/clientside/static/toolbar.js
changeset 582 a38876c0793c
parent 420 301f546688d1
child 1227 bdac73ed481e
equal deleted inserted replaced
581:5e8fd89c02ea 582:a38876c0793c
     1 // Page toolbar - selecting buttons
     1 // Page toolbar - selecting buttons
     2 
     2 
     3 function unselectAllButtonsMajor()
     3 window.unselectAllButtonsMajor = function()
     4 {
     4 {
     5   if ( !document.getElementById('pagebar_main') )
     5   if ( !document.getElementById('pagebar_main') )
     6     return false;
     6     return false;
     7   obj = document.getElementById('pagebar_main').firstChild;
     7   obj = document.getElementById('pagebar_main').firstChild;
     8   while(obj)
     8   while(obj)
    13     }
    13     }
    14     obj = obj.nextSibling;
    14     obj = obj.nextSibling;
    15   }
    15   }
    16 }
    16 }
    17 
    17 
    18 function unselectAllButtonsMinor()
    18 window.unselectAllButtonsMinor = function()
    19 {
    19 {
    20   if ( !document.getElementById('pagebar_main') )
    20   if ( !document.getElementById('pagebar_main') )
    21     return false;
    21     return false;
    22   obj = document.getElementById('pagebar_main').firstChild.nextSibling;
    22   obj = document.getElementById('pagebar_main').firstChild.nextSibling;
    23   while(obj)
    23   while(obj)
    34     }
    34     }
    35     obj = obj.nextSibling;
    35     obj = obj.nextSibling;
    36   }
    36   }
    37 }
    37 }
    38 
    38 
    39 function selectButtonMajor(which)
    39 window.selectButtonMajor = function(which)
    40 {
    40 {
    41   if ( !document.getElementById('pagebar_main') )
    41   if ( !document.getElementById('pagebar_main') )
    42     return false;
    42     return false;
    43   var dom = document.getElementById('mdgToolbar_'+which);
    43   var dom = document.getElementById('mdgToolbar_'+which);
    44   if ( !dom )
    44   if ( !dom )
    48     unselectAllButtonsMajor();
    48     unselectAllButtonsMajor();
    49     $dynano('mdgToolbar_'+which).addClass('selected');
    49     $dynano('mdgToolbar_'+which).addClass('selected');
    50   }
    50   }
    51 }
    51 }
    52 
    52 
    53 function selectButtonMinor(which)
    53 window.selectButtonMinor = function(which)
    54 {
    54 {
    55   if ( !document.getElementById('pagebar_main') )
    55   if ( !document.getElementById('pagebar_main') )
    56     return false;
    56     return false;
    57   if(typeof(document.getElementById('mdgToolbar_'+which)) == 'object')
    57   if(typeof(document.getElementById('mdgToolbar_'+which)) == 'object')
    58   {
    58   {