Changeset 2393 in subversion


Ignore:
Timestamp:
Apr 15, 2009 8:40:28 AM (4 years ago)
Author:
alec
Message:
  • fix console for Konqueror
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/js/common.js

    r2150 r2393  
    609609  this.log = function(msg) 
    610610  { 
    611     box = rcube_find_object('console'); 
    612  
     611    var box = rcube_find_object('console'); 
     612 
     613    if (box) { 
     614      if (msg.charAt(msg.length-1)=='\n') 
     615        msg += '--------------------------------------\n'; 
     616      else 
     617        msg += '\n--------------------------------------\n'; 
     618 
     619      // Konqueror (Safari also?) doesn't allows to just change value of hidden element 
     620      if (bw.konq) { 
     621        box.innerText += msg; 
     622        box.value = box.innerText; 
     623      } else 
     624        box.value += msg; 
     625    } 
     626  }; 
     627 
     628  this.reset = function() 
     629  { 
     630    var box = rcube_find_object('console'); 
    613631    if (box) 
    614       if (msg.charAt(msg.length-1)=='\n') 
    615         box.value += msg+'--------------------------------------\n'; 
    616       else 
    617         box.value += msg+'\n--------------------------------------\n'; 
    618   }; 
    619  
    620   this.reset = function() 
    621   { 
    622     box = rcube_find_object('console'); 
    623     if (box) 
    624       box.value = ''; 
     632      box.innerText = box.value = ''; 
    625633  }; 
    626634} 
Note: See TracChangeset for help on using the changeset viewer.