diff --git a/public/.gitignore b/public/.gitignore index a79ae128ba..6cf346eba5 100644 --- a/public/.gitignore +++ b/public/.gitignore @@ -3,3 +3,8 @@ !agileui.js !agileui.less !.gitignore +!agileui.css +!agileui.css.map +!agileui.min.js +!atkjs-ui.js +!atkjs-ui.min.js diff --git a/public/agileui.css b/public/agileui.css new file mode 100644 index 0000000000..a56349cc8a --- /dev/null +++ b/public/agileui.css @@ -0,0 +1 @@ +.ui.visible.left.sidebar~header.atk-topMenu.ui.menu.fixed{width:calc(100% - 260px)}.ui.visible.left.sidebar~.atk-mainContainer,.ui.visible.left.sidebar~footer.atk-footer{padding-left:260px}.atk-layout{display:flex;min-height:100vh;flex-direction:column}.atk-topMenuGhost.ui.menu{display:none;margin:0;pointer-events:none;visibility:hidden}header.atk-topMenu.ui.fixed.menu~.atk-topMenuGhost{display:block}header.atk-topMenu.ui.menu .item>.label{margin-left:0}.atk-mainContainer{flex:1}footer.atk-footer .ui.divider,footer.atk-footer .ui.segment{margin:0}.ui.left.sidebar{z-index:103}.ui.left.sidebar .item.atk-leftMenuClose{display:none;position:fixed;right:0;top:0;z-index:999}.ui.left.sidebar .item.atk-leftMenuClose i.icon{margin-left:0!important}.ui.table.atk-overflow-auto{overflow:auto}.ui.table.atk-overflow-auto>.ui.table{border:none}.atk-cell-expanded{min-width:320px;max-width:640px;white-space:normal}.atk-overlay.pushable{height:100%;left:0;opacity:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:102}.atk-overlay.pushable .pusher:after{height:100%;opacity:1;width:100%}@media (max-width:991px){.ui.left.sidebar~header.atk-topMenu.ui.menu.fixed{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);width:100%!important}.ui.visible.left.sidebar~.atk-mainContainer,.ui.visible.left.sidebar~footer.atk-footer{padding-left:0}.ui.left.sidebar{opacity:0;pointer-events:none;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);visibility:visible}body.atk-leftMenu-visible:after{left:0;position:fixed;top:0}body.atk-leftMenu-visible .ui.left.sidebar{opacity:1;pointer-events:auto}body.atk-leftMenu-visible .ui.left.sidebar .atk-leftMenuClose{display:block}}@media (min-width:768px) and (max-width:991px){body.atk-leftMenu-visible .atk-overlay.pushable{opacity:1}}@media (max-width:767px){body.atk-leftMenu-visible{overflow:hidden}.ui.left.sidebar{width:100%}}@media print{.ui.visible.left.sidebar~.atk-mainContainer,.ui.visible.left.sidebar~footer.atk-footer{padding-left:0}.atk-topMenu,.atk-topMenuGhost,.ui.left.sidebar{display:none!important}}/*# sourceMappingURL=agileui.css.map */ \ No newline at end of file diff --git a/public/agileui.css.map b/public/agileui.css.map new file mode 100644 index 0000000000..fc45dea9a7 --- /dev/null +++ b/public/agileui.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["agileui.less"],"names":[],"mappings":"AASqD,0DACnD,MAAA,mBAEuB,4CACQ,2CAC/B,aAAA,MAGF,YACE,QAAA,KACA,WAAA,MACA,eAAA,OAEkB,0BAClB,QAAA,KACA,OAAA,EACA,eAAA,KACA,WAAA,OAE+B,mDAC/B,QAAA,MAE+B,wCAC/B,YAAA,EAEF,mBACE,KAAA,EAGG,8BAAa,8BACd,OAAA,EAMI,iBACN,QAAA,IACK,yCACH,QAAA,KACA,SAAA,MACA,MAAA,EACA,IAAA,EACA,QAAA,IACC,gDACC,YAAA,YAWG,4BACP,SAAA,KACI,sCACF,YAGJ,mBACE,UAAA,MACA,UAAA,MACA,YAAA,OAEU,sBACV,OAAA,KACA,KAAA,EACA,QAAA,EACA,eAAA,KACA,SAAA,MACA,IAAA,EACA,MAAA,KACA,QAAA,IAEG,oCACC,OAAA,KACA,QAAA,EACA,MAAA,KAQoC,yBACK,kDAC3C,kBAAmB,mBACnB,UAAW,mBACX,MAAA,eAEuB,4CACQ,2CAC/B,aAAA,EAEM,iBACN,QAAA,EACA,eAAA,KACA,kBAAmB,mBACnB,UAAW,mBACX,WAAA,QAGC,gCACC,KAAA,EACA,SAAA,MACA,IAAA,EAEM,2CACN,QAAA,EACA,eAAA,KACA,8DACE,QAAA,OAKgE,+CAChC,gDACpC,QAAA,GAGqC,yBACnC,0BACF,SAAA,OAEM,iBACN,MAAA,MAOJ,aAC2B,4CACQ,2CAC/B,aAAA,EAEgB,aAAc,kBAAxB,iBACN,QAAA"} \ No newline at end of file diff --git a/public/agileui.min.js b/public/agileui.min.js new file mode 100644 index 0000000000..7367a578d1 --- /dev/null +++ b/public/agileui.min.js @@ -0,0 +1 @@ +$(function(){$(".ui.left.sidebar").prepend(''),$(".atk-leftMenuClose").click(function(){$("body").removeClass("atk-leftMenu-visible")}),$(".atk-leftMenuTrigger").click(function(ev){ev.preventDefault(),ev.stopPropagation(),$(".ui.left.sidebar").toggleClass("visible"),$("body").toggleClass("atk-leftMenu-visible")})}); diff --git a/public/atkjs-ui.min.js b/public/atkjs-ui.min.js new file mode 100644 index 0000000000..44fff6e604 --- /dev/null +++ b/public/atkjs-ui.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jQuery")):"function"==typeof define&&define.amd?define("atk",["jQuery"],t):"object"==typeof exports?exports.atk=t(require("jQuery")):e.atk=t(e.jQuery)}(this,function(__WEBPACK_EXTERNAL_MODULE_0__){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=16)}([function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE_0__},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t/g,""),jQuery),apiService.afterSuccessCallbacks.length>0){var i=this;apiService.afterSuccessCallbacks.forEach(function(e){apiService.evalResponse.call(i,e,jQuery)}),apiService.afterSuccessCallbacks.splice(0)}}else if(e.isServiceError)throw{message:e.message}}catch(e){apiService.showErrorModal(apiService.getErrorHtml(e.message))}}},{key:"onAfterSuccess",value:function(e){this.afterSuccessCallbacks.push(e)}},{key:"successTest",value:function(e){return!!e.success&&(this.data={},!0)}},{key:"atkSuccessTest",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e.success?this.onSuccess(e,t):this.onFailure(e)}},{key:"onFailure",value:function(e){if(e.hasOwnProperty("success")&&!e.success)e.hasOwnProperty("useWindow")&&e.useWindow?apiService.showErrorWindow(e.message):apiService.showErrorModal(e.message);else{var t=e.match(/]*>[\s\S]*<\/body>/gi);t?apiService.showErrorModal(t):apiService.showErrorModal(e)}}},{key:"showErrorModal",value:function(e){var t=(0,_jquery2.default)("
").appendTo("body").addClass("ui scrolling modal").css("padding","1em").html(e);t.modal({duration:100,allowMultiple:!1,onHide:function(){return t.children().remove(),!0}}).modal("show").modal("refresh")}},{key:"showErrorWindow",value:function(e){var t;(0,_jquery2.default)('
').css((t={padding:"8px","background-color":"rgba(0, 0, 0, 0.5)"},_defineProperty(t,"padding","4px"),_defineProperty(t,"margin","auto"),_defineProperty(t,"width","100%"),_defineProperty(t,"height","100%"),_defineProperty(t,"position","fixed"),_defineProperty(t,"top",0),_defineProperty(t,"bottom",0),_defineProperty(t,"z-index","100000"),_defineProperty(t,"overflow-y","scroll"),t)).html((0,_jquery2.default)("
").css({width:"70%","margin-top":"4%","margin-bottom":"4%","margin-left":"auto","margin-right":"auto",background:"white",padding:"4px","overflow-x":"scroll"}).html(e).prepend((0,_jquery2.default)('').css("float","right").click(function(){var e=(0,_jquery2.default)(this).parents(".atk-exception");e.hide(),e.remove()}))).appendTo("body")}},{key:"getErrorHtml",value:function(e){return'
\n \n
\n
Javascript Error
\n
'+e+"
\n
\n
"}}]),ApiService}(),apiService=new ApiService;Object.freeze(apiService),exports.default=apiService,module.exports=exports.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:[],i=arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(e,t){},r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){return new window.XMLHttpRequest},a=new FormData,u=0;u=0?"&":"?")+e.param(n)),t}}(jQuery),t.default=function(e){e.atkAddParams=e.atk.addParams}(jQuery),e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];s.default.atk||(s.default.atk=new Object);var i="atk"+e,o="__"+i,a=s.default.fn[i];s.default.atk[e]=t,s.default.fn[i]=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return"string"==typeof n&&this.data(o)&&"function"==typeof this.data(o)[n]?this.data(o).call(n,i):this.each(function(){var i=s.default.extend({},t.DEFAULTS,"object"===(void 0===n?"undefined":r(n))&&n);(0,s.default)(this).data(o,new s.default.atk[e](this,i))})},n&&(s.default[i]=function(e){return(0,s.default)({})[i](e)}),s.default.fn[i].noConflict=function(){return s.default.fn[i]=a}}Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=o;var a=n(0),s=i(a),u=n(14),l=i(u),c=n(13),f=i(c),d=n(12),p=i(d),h=n(7),v=i(h),y=n(8),b=i(y),g=n(11),m=i(g),_=n(9),w=i(_),k=n(10),S=i(k);o("Spinner",l.default),o("ReloadView",p.default),o("Ajaxec",v.default),o("CreateModal",b.default),o("Notify",m.default,!0),o("ServerEvent",f.default,!0),o("FileUpload",w.default),o("JsSearch",S.default),e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n').appendTo("body").html(this.getDialogHtml(e.title));t.data({uri:e.uri,type:e.mode,args:e.uri_options,needRemove:!0,needCloseTrigger:!0,label:e.label}),t.modal(e.modal).modal("show")}},{key:"getDialogHtml",value:function(e){return'\n
'+e+'
\n
\n
\n
'}}]),t}(l.default);t.default=d,d.DEFAULTS={title:"",uri:null,uri_options:{},label:"Loading...",modal:{duration:100}},e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n0&&(e.textInput.val(t.target.files[0].name),e.doFileUpload(t.target.files))})}},{key:"setState",value:function(e){var t=this;switch(e){case"delete":this.action.html(this.getEraseContent),setTimeout(function(){t.bar.progress("reset"),t.bar.hide("fade")},1e3);break;case"upload":this.action.html(this.actionContent),this.textInput.val(""),this.fileInput.val(""),this.hiddenInput.val(""),this.$el.data().fileId=null}}},{key:"doFileUpload",value:function(e){var t=this;this.settings.submit&&$("#"+this.settings.submit).addClass("disabled");var n=function(e,n){e.success&&(t.bar.progress("set label",t.settings.completeLabel),t.setState("delete")),t.settings.submit&&$("#"+t.settings.submit).removeClass("disabled")},i=function(){var e=new window.XMLHttpRequest;return e.upload.addEventListener("progress",function(e){if(e.lengthComputable){var n=e.loaded/e.total;t.bar.progress("set percent",parseInt(100*n))}},!1),e};t.bar.show(),f.default.uploadFiles(e,this.$el,{action:"upload"},this.settings.uri,n,i)}},{key:"doFileDelete",value:function(e){var t=this;this.$el.api({on:"now",url:this.settings.uri,data:{action:"delete",f_name:e},method:"POST",obj:this.$el,onComplete:function(e,n){e.success&&t.setState("upload")}})}},{key:"getEraseContent",value:function(){return''}}]),t}(l.default);t.default=d,d.DEFAULTS={uri:null,file:{id:null,name:null},uri_options:{},hasFocus:!0,action:null,completeLabel:"100%",submit:null},e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:function(){};this.$el.api({on:"now",url:e,data:t,method:"GET",obj:this.$el,stateContext:this.searchAction,onComplete:n})}}]),t}(l.default);t.default=d,d.DEFAULTS={uri:null,uri_options:{}},e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n \n
\n \n
\n \n '+e.content+"\n
\n
\n
"}},{key:"removeNotifier",value:function(e){var t=e.data.self;clearTimeout(t.timer),t.notify.transition(t.settings.closeTransition),t.notify.remove()}},{key:"getClasses",value:function(e){return{base:{position:"body"===e?"fixed":"absolute","z-index":9999}}}},{key:"getPosition",value:function(e){return{topLeft:{top:"0px",left:"0px"},topCenter:{margin:"auto",top:"0px",left:"0px",right:"0px"},topRight:{top:"0px",right:"0px"},bottomLeft:{bottom:"0px",left:"0px"},bottomCenter:{margin:"auto",bottom:"0px",left:"0px",right:"0px"},bottomRight:{bottom:"0px",right:"0px"},center:{margin:"auto",top:"0px",left:"0px",bottom:"0px",right:"0px","max-height":"1%"}}[e]}}]),t}(l.default);t.default=d,d.DEFAULTS={color:"green",size:"small",icon:null,content:null,width:100,closeTransition:"scale",openTransition:"scale",duration:3e3,opacity:"1",position:"topLeft"},e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2];this.timer=setTimeout(function(){n&&e.empty(),e.append(t)},500)}},{key:"remove",value:function(){clearTimeout(this.timer),this.$el.find(".loader").remove()}}]),t}(f.default);t.default=d,d.DEFAULTS={active:!1,replace:!1,dimmed:!1,inline:!1,indeterminate:!1,loaderText:"Loading",centered:!1,baseDimmerMarkup:'
',baseLoaderMarkup:'
'},e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0?n.first():t.first();i.length>0&&i.focus().select()}},{key:"setCloseTriggerEventInModals",value:function(){for(var e=this,t=function(t){var n=e.modals[t];n.data().needCloseTrigger?n.on("close",".atk-dialog-content",function(){n.modal("hide")}):n.off("close",".atk-dialog-content")},n=this.modals.length-1;n>=0;--n)t(n)}},{key:"hideShowCloseIcon",value:function(){for(var e=this.modals.length-1;e>=0;--e){var t=this.modals[e];e===this.modals.length-1?(t.find("i.icon.close").show(),t.data("isClosable",!0)):(t.find("i.icon.close").hide(),t.data("isClosable",!1))}}},{key:"getLoader",value:function(e){return'
\n
'+e+"
"}}]),e}(),l=new u;Object.freeze(l),t.default=l,e.exports=t.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=n(4),r=i(o);n(5);var a=n(6),s=i(a);r.default.version=function(){return"1.1.0"},r.default.registerPlugin=s.default,e.exports=r.default}])}); \ No newline at end of file