From 769042fc93ef2ad9b6895f3297b021ba5c78c458 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 29 Aug 2016 14:45:09 +0300 Subject: [PATCH] Window: add alert without footer and close button. --- apps/common/main/lib/component/Window.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index 2025d3f26..8af21c295 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -400,7 +400,7 @@ define([ } } options.dontshow = options.dontshow || false; - + if (!options.width) options.width = 'auto'; var template = '
' + @@ -410,24 +410,22 @@ define([ '
' + '' + '<% if (dontshow) { %>
<% } %>' + - '' + + '<% } %>'; - var win = new Common.UI.Window({ + _.extend(options, { cls: 'alert', - title: options.title, - width: options.width, onprimary: onKeyDown, tpl: _.template(template, options) - }), - chDontShow = null; + }); + + var win = new Common.UI.Window(options), + chDontShow = null; function autoSize(window) { var text_cnt = window.getChild('.info-box');