You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
3.4 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{597:function(n,t,e){"use strict";function o(e){return e.ok?e:e.text().then(function(n){var t=new Error;throw t.name=e.statusText,t.message=n,t})}e.d(t,"a",function(){return o})},605:function(n,t,e){},608:function(n,t,e){"use strict";function r(u,n,t){return l.a.show1(),fetch(m.a.get("getConnectionStringProperties",{id:window.DSG.currentReport._id,connectionType:encodeURIComponent(n),connectionString:encodeURIComponent(t)}),{credentials:"same-origin"}).then(y.a).then(function(n){return n.json()}).then(function(n){var t,e,o,i,c,r,a,s,d,p=u.find(".js-edit-connection-string__body");for(t in p.empty(),n.properties)e=n.properties[t],o=f()('<div class="fr-edit-connection-string-dialog__displayname">'+e.displayName+": </div>"),p.append(o),p.append('<div class="fr-edit-connection-string-dialog__description">'+e.description+"</div>"),a=e.value,s=e.propertyType,d=void 0,a=""+a,c="text","number"==typeof(i="System.Boolean"===s?"true"===a.toLowerCase():-1!==["System.Decimal","System.Double","System.Int16","System.Int32","System.Int64","System.Single","System.UInt16","System.UInt32","System.UInt64"].indexOf(s)?"number"==typeof(d=Object(g.a)(a))?d:0:a)?c="number":"boolean"==typeof i&&(c="checkbox"),r=f()('<input type="'+c+'" class="js-edit-connection-string__property-item">').data("name",e.name),"checkbox"===c?(r.prop("checked",i),o.append(r)):(r.val(i),p.append(f()('<div class="js-edit-connection-string__input-container"></div>').append(r))),p.append("<br>")}).catch(function(n){a.a.trigger("alert",n),u.close()}).then(function(){return l.a.hide()})}function o(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},i=n.connectionType,o=n.connectionString,c=n.onSave;return Object(u.a)().then(function(n){var t=new s.a(d.a.tr("Forms DataWizard ConnectionString")),e=f()(p());return t.find(".fr-modal-content").html(e),t.on("click",".js-edit-connection-string-cancel-btn",function(){t.close()}),t.on("click",".js-edit-connection-string-save-btn",function(){var o=new FormData;t.find(".js-edit-connection-string__property-item").each(function(n,t){var e=f()(t);"checkbox"===e.prop("type")?o.append(e.data("name"),e.prop("checked")):o.append(e.data("name"),e.val())}),function(t,n,e,o){l.a.show1(),fetch(m.a.get("makeConnectionString",{id:window.DSG.currentReport._id,connectionType:encodeURIComponent(n)}),{method:"POST",body:e,credentials:"same-origin"}).then(y.a).then(function(n){return n.json()}).then(function(n){o(n.connectionString),t.close()}).catch(function(n){a.a.trigger("alert",n)}).then(function(){return l.a.hide()})}(t,i,o,c)}),r(t,i,o),n.append(t),window.DSG.head.put(n),t})}var i,f,a,s,d,p,u,l,m,y,g;e.r(t),e(605),i=e(0),f=e.n(i),a=e(1),s=e(244),d=e(2),p=function(){return'\n <div>\n <div class="fr-modal-body js-edit-connection-string__body"></div>\n <div class="fr-modal-footer">\n <div class="pull-right">\n <button type="button" class="fr-btn fr-btn-primary js-edit-connection-string-cancel-btn">\n '+d.a.tr("Buttons Cancel")+'\n </button>\n <button type="button" class="fr-btn fr-btn-primary js-edit-connection-string-save-btn">\n '+d.a.tr("Save")+"\n </button>\n </div>\n </div>\n </div>\n "},u=e(173),l=e(48),m=e(4),y=e(597),g=e(151),e.d(t,"create",function(){return o})}}]);