diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js index 1157b7184..f70e6defd 100644 --- a/apps/common/main/lib/view/OpenDialog.js +++ b/apps/common/main/lib/view/OpenDialog.js @@ -53,12 +53,22 @@ define([ var t = this, _options = {}; + var width, height; + + if (options.preview) { + width = 414; + height = 277; + } else { + width = (options.type !== Asc.c_oAscAdvancedOptionsID.DRM) ? 340 : (options.warning ? 370 : 262); + height = (options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 190 : (options.warning ? 187 : 147); + } + _.extend(_options, { closable : false, preview : options.preview, warning : options.warning, - width : (options.preview) ? 414 : ((options.type == Asc.c_oAscAdvancedOptionsID.DRM && options.warning) ? 370 : 262), - height : (options.preview) ? 277 : ((options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 190 : (options.warning ? 187 : 147)), + width : width, + height : height, header : true, cls : 'open-dlg', contentTemplate : '', @@ -85,10 +95,10 @@ define([ '', '<% } %>', '<% } else { %>', - '