thomascube
2011-07-30 fcc7f861b170596c6970aecb1ddc87a3567b112f
program/js/app.js
@@ -252,7 +252,10 @@
        }
        // show printing dialog
        else if (this.env.action == 'print' && this.env.uid)
          window.print();
          if (bw.safari)
            window.setTimeout('window.print()', 10);
          else
            window.print();
        // get unread count for each mailbox
        if (this.gui_objects.mailboxlist) {
@@ -1877,9 +1880,7 @@
    if (action == 'preview' && String(target.location.href).indexOf(url) >= 0)
      this.show_contentframe(true);
    else {
      if (!this.env.frame_lock) {
        (this.is_framed() ? parent.rcmail : this).env.frame_lock = this.set_busy(true, 'loading');
      }
      this.lock_frame();
      this.location_href(this.env.comm_path+url, target);
      // mark as read and change mbox unread counter
@@ -1912,6 +1913,12 @@
    if (!show && this.busy)
      this.set_busy(false, null, this.env.frame_lock);
  };
  this.lock_frame = function()
  {
    if (!this.env.frame_lock)
      (this.is_framed() ? parent.rcmail : this).env.frame_lock = this.set_busy(true, 'loading');
  };
  // list a specific page
@@ -3903,8 +3910,10 @@
      if (this.env.group)
        add_url += '&_gid='+urlencode(this.env.group);
      this.set_busy(true);
      this.location_href(this.env.comm_path+'&_action='+action+'&_source='+urlencode(this.env.source)+'&_cid='+urlencode(cid) + add_url, target);
      this.lock_frame();
      this.location_href(this.env.comm_path+'&_action='+action
        +'&_source='+urlencode(this.env.source)
        +'&_cid='+urlencode(cid) + add_url, target);
    }
    return true;
  };
@@ -4424,6 +4433,7 @@
      this.contact_list.clear_selection();
    }
    this.lock_frame();
    this.location_href(this.env.comm_path+'&_action=search'+add_url, target);
    return true;
@@ -4457,6 +4467,7 @@
        add_url = '&_framed=1';
        target = window.frames[this.env.contentframe];
      }
      this.lock_frame();
      this.location_href(this.env.comm_path+'&_action=edit-prefs&_section='+id+add_url, target);
    }
@@ -4858,9 +4869,7 @@
      this.show_contentframe(true);
    }
    else {
      if (!this.env.frame_lock) {
        (parent.rcmail ? parent.rcmail : this).env.frame_lock = this.set_busy(true, 'loading');
      }
      this.lock_frame();
      this.location_href(this.env.comm_path+url, target);
    }
  };
@@ -5144,7 +5153,8 @@
      obj.click(function() { return ref.hide_message(obj); });
    }
    window.setTimeout(function() { ref.hide_message(id, type == 'loading'); }, timeout);
    if (timeout > 0)
      window.setTimeout(function() { ref.hide_message(id, type == 'loading'); }, timeout);
    return id;
  };