alecpl
2009-04-24 111be7087f207b2e9a5bc71ebfa981b4024a08b9
program/js/app.js
@@ -1232,9 +1232,6 @@
  this.drag_start = function(list)
  {
    this.initialBodyScrollTop = bw.ie ? 0 : window.pageYOffset;
    this.initialMailBoxScrollTop = document.getElementById("mailboxlist-container").scrollTop;
    var model = this.task == 'mail' ? this.env.mailboxes : this.env.address_sources;
    this.drag_active = true;
@@ -1244,6 +1241,9 @@
    // save folderlist and folders location/sizes for droptarget calculation in drag_move()
    if (this.gui_objects.folderlist && model)
      {
      this.initialBodyScrollTop = bw.ie ? 0 : window.pageYOffset;
      this.initialListScrollTop = this.gui_objects.folderlist.parentNode.scrollTop;
      var li, pos, list, height;
      list = $(this.gui_objects.folderlist);
      pos = list.offset();
@@ -1266,7 +1266,7 @@
    if (this.gui_objects.folderlist && this.env.folder_coords) {
      // offsets to compensate for scrolling while dragging a message
      var boffset = bw.ie ? -document.documentElement.scrollTop : this.initialBodyScrollTop;
      var moffset = this.initialMailBoxScrollTop-document.getElementById('mailboxlist-container').scrollTop;
      var moffset = this.initialListScrollTop-this.gui_objects.folderlist.parentNode.scrollTop;
      var toffset = -moffset-boffset;
      var li, pos, mouse;
@@ -2568,7 +2568,7 @@
    this.ksearch_value = q;
    
    this.display_message(this.get_label('searching'), 'loading', true);
    this.http_post('autocomplete', '_search='+q);
    this.http_post('autocomplete', '_search='+urlencode(q));
  };
  this.ksearch_query_results = function(results, search)
@@ -3008,7 +3008,6 @@
      var reg = new RegExp('.*['+RegExp.escape(this.env.delimiter)+']');
      this.name_input = document.createElement('INPUT');
      this.name_input.value = this.env.subscriptionrows[id][0].replace(reg, '');
      this.name_input.style.width = '100%';
      reg = new RegExp('['+RegExp.escape(this.env.delimiter)+']?[^'+RegExp.escape(this.env.delimiter)+']+$');
      this.name_input.__parent = this.env.subscriptionrows[id][0].replace(reg, '');
@@ -3789,6 +3788,13 @@
      });
    }
  this.plain2html = function(plainText, id)
    {
    this.set_busy(true, 'converting');
    $(document.getElementById(id)).val('<pre>'+plainText+'</pre>');
    this.set_busy(false);
    }
  /********************************************************/
  /*********        remote request methods        *********/
@@ -3911,16 +3917,12 @@
  // handle HTTP request errors
  this.http_error = function(request, status, err)
    {
      alert(status+":"+err);
/*
    //alert('Error sending request: '+request_obj.url+' => HTTP '+request_obj.xmlhttp.status);
    if (request_obj.__lock)
      this.set_busy(false);
    var errmsg = request.statusText;
    request_obj.reset();
    request_obj.__lock = false;
    this.display_message('Unknown Server Error!', 'error');
*/
    this.set_busy(false);
    request.abort();
    this.display_message('Unknown Server Error!' + (errmsg ? ' ('+errmsg+')' : ''), 'error');
    };
  // use an image to send a keep-alive siganl to the server