- /**
- * @param {*} url
- * @param {*} width
- * @param {*} height
- * @param {*} title
- * @param {Object} options
- */
- openDialog: function (url, width, height, title, options) {
- var windowId = this.windowId,
- content = '<div class="popup-window magento-message" id="' + windowId + '"></div>',
- self = this;
-
- if (this.modal) {
- this.modal.html($(content).html());
-
- if (options && typeof options.closed !== 'undefined') {
- this.modal.modal('option', 'closed', options.closed);
- }
- } else {
- this.modal = $(content).modal($.extend({
- title: title || 'Insert File...',
- modalClass: 'magento',
- type: 'slide',
- buttons: []
- }, options));
- }
- this.modal.modal('openModal');
- $.ajax({
- url: url,
- type: 'get',
- context: $(this),
- showLoader: true
-
- }).done(function (data) {
- self.modal.html(data).trigger('contentUpdated');
- });
- },