(function(){page.using={types:["Busy"],texts:["merge_texts"]};page.onLoad=function(){var e=window.u8;var t=window.$t;var a=$("#executeMerge").uniqueId("executeMerge",true);var i=page.process.get("targetUid");function r(){return $("<div></div>").appendTo(a)}var n=e.widget("Busy",r(),{text:t("TXT_merge_texts_43"),delay:0,modal:false,parent:page});var o=r().html(t("TXT_merge_texts_45"));n.show();function s(a){var r=e.Base.Dom.uniqueId();return{template:t("TXT_merge_texts_31").format({TARGET:"<a data-id='${dataId}' href='javascript:void(0);'>${caption.text}</a>"}),data:{dataId:r,caption:a},inserter:function(t,a){$$(t).html(a).find("[data-id='"+r+"']").on("click",function(){e.services.navigation.navigateToPage("expand",{uid:e.recordUidToString(i)})})}}}function d(a,r){if(r.error){o.html(t("TXT_merge_texts_32"));n.hide();page.process.fail(r);return}var d={uid:i};e.services.tableCaptions.invalidateCache();e.services.tableCaptions.read(d,function(a,i){if(n._isDisposed){e.services.notification.info({subject:t("TXT_merge_texts_55"),text:s(i.tableCaption),contentType:"object/utml"});return}page.proceed();n.hide();o.utml(s(i.tableCaption))})}var c=page.process;var u=c.get("$in","useTransaction");u=typeof u=="undefined"?true:e.services.typeConverter.toBoolean(u);e.services.accounts.executeMerge({mergeId:c.get("mergeId"),resolutions:c.get("resolutions"),useTransaction:u},d)}})();