includes/clientside/static/admin-menu.js
changeset 21 663fcf528726
parent 15 ad5986a53197
child 530 8d3c49b8dc79
equal deleted inserted replaced
20:40105681f495 21:663fcf528726
    31  *
    31  *
    32  * Due to the unclear licensing conditions on this script, I contacted the author, who said that because Enano
    32  * Due to the unclear licensing conditions on this script, I contacted the author, who said that because Enano
    33  * is not a "competing product" I was allowed to treat the code as GPL. The conversation can be seen in the
    33  * is not a "competing product" I was allowed to treat the code as GPL. The conversation can be seen in the
    34  * /licenses/tigra-menu.html document in the Enano distribution.
    34  * /licenses/tigra-menu.html document in the Enano distribution.
    35  */
    35  */
    36  
    36 
    37 var ck = readCookie('admin_menu_state');
    37 if ( typeof(readCookie) == 'function' )
    38 if(ck)
       
    39 {
    38 {
    40   var ck = parseInt(ck);
    39   var ck = readCookie('admin_menu_state');
       
    40   if(ck)
       
    41   {
       
    42     ck = parseInt(ck);
       
    43   }
       
    44   else
       
    45   {
       
    46     ck = 0;
       
    47   }
       
    48   ck = ( isNaN(ck) ) ? 0 : ck;
    41 }
    49 }
    42 else
    50 else
    43 {
    51 {
    44   ck = 0;
    52   var ck = 0;
    45 }
    53 }
    46 ck = ( isNaN(ck) ) ? 0 : ck;
       
    47 
    54 
    48 function tree (a_items, a_template) {
    55 function tree (a_items, a_template) {
    49 
    56 
    50 	this.a_tpl      = a_template;
    57 	this.a_tpl      = a_template;
    51 	this.a_config   = a_items;
    58 	this.a_config   = a_items;