Current Path : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/scale/ |
Current File : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/scale/actionresultdialog.min.js |
(function(t){if(BX.Scale.ActionResultDialog)return;BX.Scale.ActionResultDialog=function(t){this.dialogWindow=null;this.result=t.result;this.actionName=t.actionName;this.pageRefresh=t.pageRefresh};BX.Scale.ActionResultDialog.prototype.buildContent=function(){var t="";if(this.result.ACTION_RESULT){t="<table class='bx-adm-scale-action-result-table'>";t+="<tr><th>"+BX.message("SCALE_PANEL_JS_ARD_NAME")+"</th><th>"+BX.message("SCALE_PANEL_JS_ARD_RESULT")+"</th><th>"+BX.message("SCALE_PANEL_JS_ARD_MESSAGE")+"</th></tr>";for(var e in this.result.ACTION_RESULT){var i="",s=this.result.ACTION_RESULT[e];if(s.ERROR)i+=s.ERROR;else if(s.OUTPUT&&s.OUTPUT.DATA&&s.OUTPUT.DATA.message)i=s.OUTPUT.DATA.message;t+="<tr>";t+="<td>"+this.result.ACTION_RESULT[e].NAME+"</td>";if(s.RESULT=="OK")t+="<td style='text-align: center;'><span style='color: green;'>OK</span></td>";else t+="<td style='text-align: center;'><span style='color: red;'>"+BX.message("SCALE_PANEL_JS_ERROR")+"</span></td>";t+="<td><pre>"+BX.util.htmlspecialchars(i)+"</pre></td>";t+="</tr>"}t+="</table>"}return t};BX.Scale.ActionResultDialog.prototype.show=function(){var e=this.buildContent();BX.Scale.currentActionResultDialogContext=this;var i=BX.CAdminDialog.btnClose;if(this.pageRefresh){i.action=function(){this.parentWindow.Close();BX.Scale.AdminFrame.waitForPageRefreshing();t.location.reload(true)}}this.dialogWindow=new BX.CDialog({title:BX.message("SCALE_PANEL_JS_ARD_RES"),content:e,resizable:true,height:500,width:600,buttons:[i]});this.dialogWindow.Show();this.dialogWindow.adjustSizeEx()}})(window);