Changeset ab8fdaa in github


Ignore:
Timestamp:
Jul 31, 2012 4:27:37 AM (11 months ago)
Author:
Aleksander Machniak <alec@…>
Children:
b6267dad
Parents:
56012e5
Message:

Small code improvement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/js/app.js

    r56012e5 rab8fdaa  
    53615361  }; 
    53625362 
    5363   // enable/disable buttons for page shifting 
    5364   this.set_page_buttons = function() 
    5365   { 
    5366     this.enable_command('nextpage', 'lastpage', (this.env.pagecount > this.env.current_page)); 
    5367     this.enable_command('previouspage', 'firstpage', (this.env.current_page > 1)); 
    5368   }; 
    5369  
    53705363  // set event handlers on registered buttons 
    53715364  this.init_buttons = function() 
     
    53755368        continue; 
    53765369 
    5377       for (var i=0; i< this.buttons[cmd].length; i++) { 
     5370      for (var i=0; i<this.buttons[cmd].length; i++) { 
    53785371        init_button(cmd, this.buttons[cmd][i]); 
    53795372      } 
     
    53945387      obj = document.getElementById(button.id); 
    53955388 
     5389      if (!obj) 
     5390        continue; 
     5391 
    53965392      // get default/passive setting of the button 
    5397       if (obj && button.type == 'image' && !button.status) { 
     5393      if (button.type == 'image' && !button.status) { 
    53985394        button.pas = obj._original_src ? obj._original_src : obj.src; 
    53995395        // respect PNG fix on IE browsers 
     
    54015397          button.pas = RegExp.$1; 
    54025398      } 
    5403       else if (obj && !button.status) 
     5399      else if (!button.status) 
    54045400        button.pas = String(obj.className); 
    54055401 
    54065402      // set image according to button state 
    5407       if (obj && button.type == 'image' && button[state]) { 
     5403      if (button.type == 'image' && button[state]) { 
    54085404        button.status = state; 
    54095405        obj.src = button[state]; 
    54105406      } 
    54115407      // set class name according to button state 
    5412       else if (obj && button[state] !== undefined) { 
     5408      else if (button[state] !== undefined) { 
    54135409        button.status = state; 
    54145410        obj.className = button[state]; 
    54155411      } 
    54165412      // disable/enable input buttons 
    5417       if (obj && button.type=='input') { 
     5413      if (button.type == 'input') { 
    54185414        button.status = state; 
    54195415        obj.disabled = !state; 
     
    56385634  }; 
    56395635 
     5636  // enable/disable buttons for page shifting 
     5637  this.set_page_buttons = function() 
     5638  { 
     5639    this.enable_command('nextpage', 'lastpage', (this.env.pagecount > this.env.current_page)); 
     5640    this.enable_command('previouspage', 'firstpage', (this.env.current_page > 1)); 
     5641  }; 
     5642 
    56405643  // mark a mailbox as selected and set environment variable 
    56415644  this.select_folder = function(name, prefix, encode) 
Note: See TracChangeset for help on using the changeset viewer.