|
15 | 15 | define([ |
16 | 16 | 'text!vp_base/html/m_apps/bind.html!strip', |
17 | 17 | 'css!vp_base/css/m_apps/bind.css', |
| 18 | +'vp_base/js/com/com_util', |
18 | 19 | 'vp_base/js/com/com_String', |
19 | 20 | 'vp_base/js/com/component/PopupComponent', |
20 | 21 | 'vp_base/js/com/component/MultiSelector' |
21 | | -],function(bindHtml,bindCss,com_String,PopupComponent,MultiSelector){ |
| 22 | +],function(bindHtml,bindCss,com_util,com_String,PopupComponent,MultiSelector){ |
22 | 23 |
|
23 | 24 | /** |
24 | 25 | * Bind |
@@ -347,35 +348,21 @@ define([ |
347 | 348 | that.renderDataPage(''); |
348 | 349 | } |
349 | 350 | }else{ |
350 | | -varerrorContent=newcom_String(); |
| 351 | +varerrorContent=''; |
351 | 352 | if(msg.content.ename){ |
352 | | -errorContent.appendFormatLine('<div class="{0}">','vp-popup-data-error-box'); |
353 | | -errorContent.appendLine('<i class="fa fa-exclamation-triangle"></i>'); |
354 | | -errorContent.appendFormatLine('<label class="{0}">{1}</label>', |
355 | | -'vp-popup-data-error-box-title',msg.content.ename); |
356 | | -if(msg.content.evalue){ |
357 | | -// errorContent.appendLine('<br/>'); |
358 | | -errorContent.appendFormatLine('<pre>{0}</pre>',msg.content.evalue.split('\\n').join('<br/>')); |
359 | | -} |
360 | | -errorContent.appendLine('</div>'); |
| 353 | +errorContent=com_util.templateForErrorBox(msg.content.ename,msg.content.evalue); |
361 | 354 | } |
362 | 355 | that.renderDataPage(errorContent); |
| 356 | +vpLog.display(VP_LOG_TYPE.ERROR,msg.content.ename,msg.content.evalue,msg.content); |
363 | 357 | } |
364 | 358 | }).catch(function(resultObj){ |
365 | 359 | let{ msg}=resultObj; |
366 | | -varerrorContent=newcom_String(); |
| 360 | +varerrorContent=''; |
367 | 361 | if(msg.content.ename){ |
368 | | -errorContent.appendFormatLine('<div class="{0}">','vp-popup-data-error-box'); |
369 | | -errorContent.appendLine('<i class="fa fa-exclamation-triangle"></i>'); |
370 | | -errorContent.appendFormatLine('<label class="{0}">{1}</label>', |
371 | | -'vp-popup-data-error-box-title',msg.content.ename); |
372 | | -if(msg.content.evalue){ |
373 | | -// errorContent.appendLine('<br/>'); |
374 | | -errorContent.appendFormatLine('<pre>{0}</pre>',msg.content.evalue.split('\\n').join('<br/>')); |
375 | | -} |
376 | | -errorContent.appendLine('</div>'); |
| 362 | +errorContent=com_util.templateForErrorBox(msg.content.ename,msg.content.evalue); |
377 | 363 | } |
378 | 364 | that.renderDataPage(errorContent); |
| 365 | +vpLog.display(VP_LOG_TYPE.ERROR,msg.content.ename,msg.content.evalue,msg.content); |
379 | 366 | }); |
380 | 367 | } |
381 | 368 |
|
|