diff options
| author | Thomas Bruederli <thomas@roundcube.net> | 2013-10-23 10:39:17 +0200 | 
|---|---|---|
| committer | Thomas Bruederli <thomas@roundcube.net> | 2013-10-23 10:39:17 +0200 | 
| commit | 6abdfff07ddaf375bac51f74b5be4435f2878121 (patch) | |
| tree | 0ca558d997a55edeb0d60fe9c0dccf893610b74f /program/js | |
| parent | 1ece73dc4ea724f681ee49f1a1c2a9f241a1fa51 (diff) | |
Allow to override popup options; return reference to popup dialog
Diffstat (limited to 'program/js')
| -rw-r--r-- | program/js/app.js | 11 | 
1 files changed, 6 insertions, 5 deletions
| diff --git a/program/js/app.js b/program/js/app.js index 01707362f..c8101ef91 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -5900,24 +5900,23 @@ function rcube_webmail()    };    // open a jquery UI dialog with the given content -  this.show_popup_dialog = function(html, title, buttons) +  this.show_popup_dialog = function(html, title, buttons, options)    {      // forward call to parent window      if (this.is_framed()) { -      parent.rcmail.show_popup_dialog(html, title, buttons); -      return; +      return parent.rcmail.show_popup_dialog(html, title, buttons);      }      var popup = $('<div class="popup">')        .html(html) -      .dialog({ +      .dialog($.extend({          title: title,          buttons: buttons,          modal: true,          resizable: true,          width: 500,          close: function(event, ui) { $(this).remove() } -      }); +      }, options || {}));      // resize and center popup      var win = $(window), w = win.width(), h = win.height(), @@ -5927,6 +5926,8 @@ function rcube_webmail()        height: Math.min(h - 40, height + 75 + (buttons ? 50 : 0)),        width: Math.min(w - 20, width + 20)      }); + +    return popup;    };    // enable/disable buttons for page shifting | 
