diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index bca38a49d5..100e960191 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -13,60 +13,65 @@ build->confirmDelete)?> -
-
- icons['build']);?> project->build;?> +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
build->id;?>build->product;?>build->name;?>build->scmPath;?>build->filePath;?>build->date;?>build->builder;?>actions;?>
id;?>productName;?> + branchName) echo "{$build->branchName}"?> + createLink('build', 'view', "build=$build->id"), $build->name);?> + scmPath, 'http') === 0 ? html::a($build->scmPath) : $build->scmPath;?>filePath, 'http') === 0 ? html::a($build->filePath) : $build->filePath;?>date?>builder]?> + createLink('build', 'view', "buildID=$build->id&type=story&link=true"), "", '', "class='btn' title='{$lang->build->linkStory}'"); + } + common::printIcon('testtask', 'create', "product=$build->product&project=$project->id&build=$build->id", $build, 'list', 'bullhorn'); + $lang->project->bug = $lang->project->viewBug; + common::printIcon('project', 'bug', "project=$project->id&orderBy=status&build=$build->id", $build, 'list'); + common::printIcon('build', 'edit', "buildID=$build->id", $build, 'list'); + if(common::hasPriv('build', 'delete', $build)) + { + $deleteURL = $this->createLink('build', 'delete', "buildID=$build->id&confirm=yes"); + echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"buildList\",confirmDelete)", '', '', "class='btn' title='{$lang->build->delete}'"); + } + ?> +
+
-
- id");?> -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
build->id;?>build->product;?>build->name;?>build->scmPath;?>build->filePath;?>build->date;?>build->builder;?>actions;?>
id;?>productName;?> - branchName) echo "{$build->branchName}"?> - createLink('build', 'view', "build=$build->id"), $build->name);?> - scmPath, 'http') === 0 ? html::a($build->scmPath) : $build->scmPath;?>filePath, 'http') === 0 ? html::a($build->filePath) : $build->filePath;?>date?>builder]?> - createLink('build', 'view', "buildID=$build->id&type=story&link=true"), "", '', "class='btn-icon' title='{$lang->build->linkStory}'"); - } - common::printIcon('testtask', 'create', "product=$build->product&project=$project->id&build=$build->id", $build, 'list', 'bullhorn'); - $lang->project->bug = $lang->project->viewBug; - common::printIcon('project', 'bug', "project=$project->id&orderBy=status&build=$build->id", $build, 'list'); - common::printIcon('build', 'edit', "buildID=$build->id", $build, 'list'); - if(common::hasPriv('build', 'delete', $build)) - { - $deleteURL = $this->createLink('build', 'delete', "buildID=$build->id&confirm=yes"); - echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"buildList\",confirmDelete)", '', '', "class='btn-icon' title='{$lang->build->delete}'"); - } - ?> -
+ diff --git a/module/project/view/testtask.html.php b/module/project/view/testtask.html.php index a6879f610d..4f8f1342a8 100644 --- a/module/project/view/testtask.html.php +++ b/module/project/view/testtask.html.php @@ -13,81 +13,91 @@ testtask->confirmDelete)?> -
-
- icons['test']);?> testtask->browse;?> -
-
- -
-
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + - - -
+ +
+ +
+ + idAB;?> +
testtask->product;?>testtask->name;?>testtask->build;?>testtask->owner;?>testtask->begin;?>testtask->end;?>statusAB;?>actions;?>
+
+ + + id);?> +
+
product, '');?>createLink('testtask', 'view', "taskID=$task->id"), $task->name);?>build == 'trunk' || empty($task->buildName)) ? $lang->trunk : html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName);?>owner];?>begin?>end?>testtask->statusList[$task->status];?> + id", $task, 'list', 'sitemap'); + common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link'); + common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list'); + common::printIcon('testreport', 'browse', "objectID=$task->product&objectType=product&extra=$task->id", $task, 'list','flag'); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
idAB;?>testtask->product;?>testtask->name;?>testtask->build;?>testtask->owner;?>testtask->begin;?>testtask->end;?>statusAB;?>actions;?>
- id}' /> "; - echo html::a($this->createLink('testtask', 'view', "taskID=$task->id"), sprintf('%03d', $task->id)); - ?> - product, '');?>createLink('testtask', 'view', "taskID=$task->id"), $task->name);?>build == 'trunk' || empty($task->buildName)) ? $lang->trunk : html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName);?>owner];?>begin?>end?>testtask->statusList[$task->status];?> - id", $task, 'list', 'sitemap'); - common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link'); - common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list'); - common::printIcon('testreport', 'browse', "objectID=$task->product&objectType=product&extra=$task->id", $task, 'list','flag'); - - if(common::hasPriv('testtask', 'delete', $task)) - { - $deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes"); - echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"taskList\",confirmDelete)", '', '', "class='btn-icon' title='{$lang->testtask->delete}'"); - } - ?> -
-
+ if(common::hasPriv('testtask', 'delete', $task)) + { + $deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes"); + echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"taskList\",confirmDelete)", '', '', "class='btn' title='{$lang->testtask->delete}'"); + } + ?> +
+ + -
-
+ + +
+
+
diff --git a/module/release/view/browse.html.php b/module/release/view/browse.html.php index 4aa6700a97..af70c8a323 100644 --- a/module/release/view/browse.html.php +++ b/module/release/view/browse.html.php @@ -13,63 +13,69 @@ release->confirmDelete)?> -
-
-
- - release->browse;?> - type !== 'normal') echo '' . $branches[$branch] . '';?> +
+
+ -
- id&branch=$branch");?> +
+ + + + + + + type != 'normal'):?> + + + + + + + + + + + + + + type != 'normal'):?> + + + + + + + + +
release->id;?>release->name;?>release->build;?>product->branch;?>release->date;?>release->status;?>actions;?>
id;?>id"), $release->name);?>createLink('build', 'view', "buildID=$release->buildID"), $release->buildName, '_blank');?>branch];?>date;?>release->statusList[$release->status];?> + id&type=story&link=true"), ' ', '', "class='btn' title='{$lang->release->linkStory}'"); + if(common::hasPriv('release', 'linkBug') and $this->config->global->flow != 'onlyStory') echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), ' ', '', "class='btn' title='{$lang->release->linkBug}'"); + if(common::hasPriv('release', 'changeStatus', $release)) + { + $changedStatus = $release->status == 'normal' ? 'terminate' : 'normal'; + echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), ' ', 'hiddenwin', "class='btn' title='{$lang->release->changeStatusList[$changedStatus]}'"); + } + common::printIcon('release', 'edit', "release=$release->id", $release, 'list'); + if(common::hasPriv('release', 'delete', $release)) + { + $deleteURL = $this->createLink('release', 'delete', "releaseID=$release->id&confirm=yes"); + echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"releaseList\",confirmDelete)", '', '', "class='btn' title='{$lang->release->delete}'"); + } + ?> +
- - - - - - - type != 'normal'):?> - - - - - - - - - - - - - - type != 'normal'):?> - - - - - - - - -
release->id;?>release->name;?>release->build;?>product->branch;?>release->date;?>release->status;?>actions;?>
id;?>id"), $release->name);?>createLink('build', 'view', "buildID=$release->buildID"), $release->buildName, '_blank');?>branch];?>date;?>release->statusList[$release->status];?> - id&type=story&link=true"), ' ', '', "class='btn-icon' title='{$lang->release->linkStory}'"); - if(common::hasPriv('release', 'linkBug') and $this->config->global->flow != 'onlyStory') echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), ' ', '', "class='btn-icon' title='{$lang->release->linkBug}'"); - if(common::hasPriv('release', 'changeStatus', $release)) - { - $changedStatus = $release->status == 'normal' ? 'terminate' : 'normal'; - echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), ' ', 'hiddenwin', "class='btn-icon' title='{$lang->release->changeStatusList[$changedStatus]}'"); - } - common::printIcon('release', 'edit', "release=$release->id", $release, 'list'); - if(common::hasPriv('release', 'delete', $release)) - { - $deleteURL = $this->createLink('release', 'delete', "releaseID=$release->id&confirm=yes"); - echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"releaseList\",confirmDelete)", '', '', "class='btn-icon' title='{$lang->release->delete}'"); - } - ?> -
-
- +
diff --git a/www/js/zui/min.js b/www/js/zui/min.js index a9665f551a..0abeeb43f1 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -1,5 +1,5 @@ /*! - * ZUI: Zentao template - v1.8.1 - 2018-03-16 + * ZUI: Zentao template - v1.8.1 - 2018-03-30 * http://zui.sexy * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2018 cnezsoft.com; Licensed MIT @@ -10,20 +10,20 @@ * Copyright (c) 2010 "Cowboy" Ben Alman * MIT & GPL http://benalman.com/about/license/ */ -function(t,e,i){"$:nomunge";function s(){n=e[r](function(){a.each(function(){var e=t(this),i=e.width(),s=e.height(),n=t.data(this,h);i===n.w&&s===n.h||e.trigger(l,[n.w=i,n.h=s])}),s()},o[c])}var n,a=t([]),o=t.resize=t.extend(t.resize,{}),r="setTimeout",l="resize",h=l+"-special-event",c="delay",d="throttleWindow";o[c]=250,o[d]=!0,t.event.special[l]={setup:function(){if(!o[d]&&this[r])return!1;var e=t(this);a=a.add(e),t.data(this,h,{w:e.width(),h:e.height()}),1===a.length&&s()},teardown:function(){if(!o[d]&&this[r])return!1;var e=t(this);a=a.not(e),e.removeData(h),a.length||clearTimeout(n)},add:function(e){function s(e,s,a){var o=t(this),r=t.data(this,h)||{};r.w=s!==i?s:o.width(),r.h=a!==i?a:o.height(),n.apply(this,arguments)}if(!o[d]&&this[r])return!1;var n;return t.isFunction(e)?(n=e,s):(n=e.handler,void(e.handler=s))}}}(jQuery,this),function(t,e){"use strict";var i,s,n="localStorage",a="page_"+t.location.pathname+t.location.search,o=function(){this.slience=!0;try{n in t&&t[n]&&t[n].setItem&&(this.enable=!0,i=t[n])}catch(o){}this.enable||(s={},i={getLength:function(){var t=0;return e.each(s,function(){t++}),t},key:function(t){var i,n=0;return e.each(s,function(e){return n===t?(i=e,!1):void n++}),i},removeItem:function(t){delete s[t]},getItem:function(t){return s[t]},setItem:function(t,e){s[t]=e},clear:function(){s={}}}),this.storage=i,this.page=this.get(a,{})};o.prototype.pageSave=function(){if(e.isEmptyObject(this.page))this.remove(a);else{var t,i=[];for(t in this.page){var s=this.page[t];null===s&&i.push(t)}for(t=i.length-1;t>=0;t--)delete this.page[i[t]];this.set(a,this.page)}},o.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},o.prototype.pageClear=function(){this.page={},this.pageSave()},o.prototype.pageGet=function(t,e){var i=this.page[t];return void 0===e||null!==i&&void 0!==i?i:e},o.prototype.pageSet=function(t,i){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=i,this.pageSave()},o.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},o.prototype.length=function(){return this.check()?i.getLength?i.getLength():i.length:0},o.prototype.removeItem=function(t){return i.removeItem(t),this},o.prototype.remove=function(t){return this.removeItem(t)},o.prototype.getItem=function(t){return i.getItem(t)},o.prototype.get=function(t,e){var i=this.deserialize(this.getItem(t));return"undefined"!=typeof i&&null!==i||"undefined"==typeof e?i:e},o.prototype.key=function(t){return i.key(t)},o.prototype.setItem=function(t,e){return i.setItem(t,e),this},o.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},o.prototype.clear=function(){return i.clear(),this},o.prototype.forEach=function(t){for(var e=this.length(),s=e-1;s>=0;s--){var n=i.key(s);t(n,this.get(n))}return this},o.prototype.getAll=function(){var t={};return this.forEach(function(e,i){t[e]=i}),t},o.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},o.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new o})}(window,jQuery),function(t){"use strict";var e="zui.searchBox",i=function(e,s){var n=this;n.name=name,n.$=t(e),n.options=s=t.extend({},i.DEFAULTS,n.$.data(),s);var a=n.$.is(s.inputSelector)?n.$:n.$.find(s.inputSelector);if(a.length){var o=function(){n.changeTimer&&(clearTimeout(n.changeTimer),n.changeTimer=null)},r=function(){o();var t=n.getSearch();if(t!==n.lastValue){var e=""===t;a.toggleClass("empty",e),n.$.callComEvent(n,"onSearchChange",[t,e]),n.lastValue=t}};n.$input=a=a.first(),n.lastValue=n.getSearch(),a.on(s.listenEvent,function(t){n.changeTimer=setTimeout(function(){r()},s.changeDelay)}).on("focus",function(t){a.addClass("focus"),n.$.callComEvent(n,"onFocus",[t])}).on("blur",function(t){a.removeClass("focus"),n.$.callComEvent(n,"onBlur",[t])}).on("keydown",function(t){var e=0,i=t.witch;27===i&&s.escToClear?(this.setSearch("",!0),r(),e=1):13===i&&s.onPressEnter&&(r(),n.$.callComEvent(n,"onPressEnter",[t]));var a=n.$.callComEvent(n,"onKeyDown",[t]);a===!1&&(e=1),e&&t.preventDefault()}),n.$.on("click",".search-clear-btn",function(t){n.setSearch("",!0),r(),t.preventDefault()}),r()}else console.error("ZUI: search box init error, cannot find search box input element.")};i.DEFAULTS={inputSelector:'input[type="search"],input[type="text"]',listenEvent:"change input paste",changeDelay:500},i.prototype.getSearch=function(){return this.$input&&t.trim(this.$input.val())},i.prototype.setSearch=function(t,e){var i=this.$input;i&&(i.val(t),e||i.trigger("change"))},i.prototype.focus=function(){this.$input&&this.$input.focus()},t.fn.searchBox=function(s){return this.each(function(){var n=t(this),a=n.data(e),o="object"==typeof s&&s;a||n.data(e,a=new i(this,o)),"string"==typeof s&&a[s]()})},i.NAME=e,t.fn.searchBox.Constructor=i}(jQuery),function(t,e){"use strict";var i="zui.draggable",s={container:"body",move:!0},n=0,a=function(e,i){var a=this;a.$=t(e),a.id=n++,a.options=t.extend({},s,a.$.data(),i),a.init()};a.DEFAULTS=s,a.NAME=i,a.prototype.init=function(){var s,n,a,o,r,l=this,h=l.$,c="before",d="drag",u="finish",p="."+i+"."+l.id,f="mousedown"+p,g="mouseup"+p,m="mousemove"+p,v=l.options,y=v.selector,b=v.handle,w=h,_=t.isFunction(v.move),x=function(t){var e=t.pageX,i=t.pageY;r=!0;var n={left:e-a.x,top:i-a.y};w.removeClass("drag-ready").addClass("dragging"),v.move&&(_?v.move(n,w):w.css(n)),v[d]&&v[d]({event:t,element:w,startOffset:a,pos:n,offset:{x:e-s.x,y:i-s.y},smallOffset:{x:e-o.x,y:i-o.y}}),o.x=e,o.y=i,v.stopPropagation&&t.stopPropagation()},C=function(i){if(t(e).off(p),!r)return void w.removeClass("drag-ready");var n={left:i.pageX-a.x,top:i.pageY-a.y};w.removeClass("drag-ready dragging"),v.move&&(_?v.move(n,w):w.css(n)),v[u]&&v[u]({event:i,element:w,startOffset:a,pos:n,offset:{x:i.pageX-s.x,y:i.pageY-s.y},smallOffset:{x:i.pageX-o.x,y:i.pageY-o.y}}),i.preventDefault(),v.stopPropagation&&i.stopPropagation()},k=function(i){var l=t.zui.getMouseButtonCode(v.mouseButton);if(!(l>-1&&i.button!==l)){var h=t(this);if(y&&(w=b?h.closest(y):h),v[c]){var d=v[c]({event:i,element:w});if(d===!1)return}var u=t(v.container),p=w.offset();n=u.offset(),s={x:i.pageX,y:i.pageY},a={x:i.pageX-p.left+n.left,y:i.pageY-p.top+n.top},o=t.extend({},s),r=!1,w.addClass("drag-ready"),i.preventDefault(),v.stopPropagation&&i.stopPropagation(),t(e).on(m,x).on(g,C)}};b?h.on(f,b,k):y?h.on(f,y,k):h.on(f,k)},a.prototype.destroy=function(){var s="."+i+"."+this.id;this.$.off(s),t(e).off(s),this.$.data(i,null)},t.fn.draggable=function(e){return this.each(function(){var s=t(this),n=s.data(i),o="object"==typeof e&&e;n||s.data(i,n=new a(this,o)),"string"==typeof e&&n[e]()})},t.fn.draggable.Constructor=a}(jQuery,document),function(t,e,i){"use strict";var s="zui.droppable",n={target:".droppable-target",deviation:5,sensorOffsetX:0,sensorOffsetY:0},a=0,o=function(e,i){var s=this;s.id=a++,s.$=t(e),s.options=t.extend({},n,s.$.data(),i),s.init()};o.DEFAULTS=n,o.NAME=s,o.prototype.trigger=function(e,i){return t.zui.callEvent(this.options[e],i,this)},o.prototype.init=function(){var n,a,o,r,l,h,c,d,u,p,f,g,m,v=this,y=v.$,b=v.options,w=b.deviation,_="."+s+"."+v.id,x="mousedown"+_,C="mouseup"+_,k="mousemove"+_,T=b.selector,S=b.handle,D=b.flex,M=b.container,P=b.canMoveHere,F=y,L=!1,z=M?t(b.container).first():T?y:t("body"),E=function(e){if(L&&(f={left:e.pageX,top:e.pageY},!(i.abs(f.left-d.left)a&&f.top>o&&f.left-1&&i.button!==s)){var f=t(this);T&&(F=S?f.closest(T):f),F.hasClass("drag-shadow")||b.before&&b.before({event:i,element:F})===!1||(L=!0,n=t.isFunction(b.target)?b.target(y):z.find(b.target),a=null,o=null,r=!1,l=!0,h=null,c=F.offset(),u=z.offset(),d={left:i.pageX,top:i.pageY},g=t.extend({},d),p={left:d.left-c.left,top:d.top-c.top},F.addClass("drag-from"),t(e).on(k,E).on(C,A),m=setTimeout(function(){t(e).on(x,A)},10),i.preventDefault())}};S?y.on(x,S,I):T?y.on(x,T,I):y.on(x,I)},o.prototype.destroy=function(){var i="."+s+"."+this.id;this.$.off(i),t(e).off(i),this.$.data(s,null)},o.prototype.reset=function(){this.destroy(),this.init()},t.fn.droppable=function(e){return this.each(function(){var i=t(this),n=i.data(s),a="object"==typeof e&&e;n||i.data(s,n=new o(this,a)),"string"==typeof e&&n[e]()})},t.fn.droppable.Constructor=o}(jQuery,document,Math),+function(t,e){"use strict";function i(e,i,a){return this.each(function(){var o=t(this),r=o.data(s),l=t.extend({},n.DEFAULTS,o.data(),"object"==typeof e&&e);r||o.data(s,r=new n(this,l)),"string"==typeof e?r[e](i,a):l.show&&r.show(i,a)})}var s="zui.modal",n=function(i,n){var a=this;a.options=n,a.$body=t(document.body),a.$element=t(i),a.$backdrop=a.isShown=null,a.scrollbarWidth=0,n.moveable===e&&(a.options.moveable=a.$element.hasClass("modal-moveable")),n.remote&&a.$element.find(".modal-content").load(n.remote,function(){a.$element.trigger("loaded."+s)})};n.VERSION="3.2.0",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"};var a=function(e,i){var s=t(window);i.left=Math.max(0,Math.min(i.left,s.width()-e.outerWidth())),i.top=Math.max(0,Math.min(i.top,s.height()-e.outerHeight())),e.css(i)};n.prototype.toggle=function(t,e){return this.isShown?this.hide():this.show(t,e)},n.prototype.ajustPosition=function(i){var n=this,o=n.options;if(i===e&&(i=o.position),i!==e){t.isFunction(i)&&(i=i(n));var r=n.$element.find(".modal-dialog"),l=Math.max(0,(t(window).height()-r.outerHeight())/2);if("fit"===i?i={marginTop:2*l/3}:"center"===i?i={marginTop:l}:t.isPlainObject(i)||(i={marginTop:i}),r.hasClass("modal-moveable")){var h=null,c=o.rememberPos;c&&(c===!0?h=n.$element.data("modal-pos"):t.zui.store&&(h=t.zui.store.pageGet(s+".rememberPos."+c))),i=t.extend(i,{left:Math.max(0,(t(window).width()-r.outerWidth())/2)},h),"inside"===o.moveable?a(r,i):r.css(i)}else r.css(i)}},n.prototype.setMoveale=function(){t.fn.draggable||console.error("Moveable modal requires draggable.js.");var e=this,i=e.options,n=e.$element.find(".modal-dialog").removeClass("modal-dragged");n.toggleClass("modal-moveable",!!i.moveable),e.$element.data("modal-moveable-setup")||n.draggable({container:e.$element,handle:".modal-header",before:function(){n.css("margin-top","").addClass("modal-dragged")},finish:function(n){var a=i.rememberPos;a&&(e.$element.data("modal-pos",n.pos),t.zui.store&&a!==!0&&t.zui.store.pageSet(s+".rememberPos."+a,n.pos))},move:"inside"!==i.moveable||function(t){a(n,t)}})},n.prototype.show=function(e,i){var a=this,o=t.Event("show."+s,{relatedTarget:e});a.$element.trigger(o),a.isShown||o.isDefaultPrevented()||(a.isShown=!0,a.options.moveable&&a.setMoveale(),a.checkScrollbar(),a.options.backdrop!==!1&&(a.$body.addClass("modal-open"),a.setScrollbar()),a.escape(),a.$element.on("click.dismiss."+s,'[data-dismiss="modal"]',t.proxy(a.hide,a)),a.backdrop(function(){var o=t.support.transition&&a.$element.hasClass("fade");a.$element.parent().length||a.$element.appendTo(a.$body),a.$element.show().scrollTop(0),o&&a.$element[0].offsetWidth,a.$element.addClass("in").attr("aria-hidden",!1),a.ajustPosition(i),a.enforceFocus();var r=t.Event("shown."+s,{relatedTarget:e});o?a.$element.find(".modal-dialog").one("bsTransitionEnd",function(){a.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(n.TRANSITION_DURATION):a.$element.trigger("focus").trigger(r)}))},n.prototype.hide=function(e){e&&e.preventDefault();var i=this;e=t.Event("hide."+s),i.$element.trigger(e),i.isShown&&!e.isDefaultPrevented()&&(i.isShown=!1,i.options.backdrop!==!1&&(i.$body.removeClass("modal-open"),i.resetScrollbar()),i.escape(),t(document).off("focusin."+s),i.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+s),t.support.transition&&i.$element.hasClass("fade")?i.$element.one("bsTransitionEnd",t.proxy(i.hideModal,i)).emulateTransitionEnd(n.TRANSITION_DURATION):i.hideModal())},n.prototype.enforceFocus=function(){t(document).off("focusin."+s).on("focusin."+s,t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+s,t.proxy(function(i){if(27==i.which){var n=t.Event("escaping."+s),a=this.$element.triggerHandler(n,"esc");if(a!=e&&!a)return;this.hide()}},this)):this.isShown||t(document).off("keydown.dismiss."+s)},n.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden."+s)})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(e){var i=this,a=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&a;if(this.$backdrop=t('
').appendTo("body").data(s,r);var d=function(e,s){var n=i[e];t.isFunction(n)&&c.on(s+a,n)};d("onShow","show"),d("shown","shown"),d("onHide","hide"),d("hidden","hidden"),d("loaded","loaded"),c.on("shown"+a,function(){r.isShown=!0}).on("hidden"+a,function(){r.isShown=!1}),this.$modal=c,this.$dialog=c.find(".modal-dialog"),i.mergeOptions&&(this.options=i)},r.prototype.show=function(i){var a=t.extend({},this.options,{url:this.$trigger?this.$trigger.attr("href")||this.$trigger.attr("data-url")||this.$trigger.data("url"):this.options.url},i);this.init(a);var r=this,l=this.$modal,h=this.$dialog,c=a.custom,d=h.find(".modal-body").css("padding",""),u=h.find(".modal-header"),p=h.find(".modal-content");l.toggleClass("fade",a.fade).addClass(a.className).toggleClass("modal-loading",!this.isShown),h.toggleClass("modal-md","md"===a.size).toggleClass("modal-sm","sm"===a.size).toggleClass("modal-lg","lg"===a.size).toggleClass("modal-fullscreen","fullscreen"===a.size),u.toggle(a.showHeader),u.find(".modal-icon").attr("class","modal-icon icon-"+a.icon),u.find(".modal-title-name").text(a.title||""),a.size&&"fullscreen"===a.size&&(a.width="",a.height="");var f=function(){clearTimeout(this.resizeTask),this.resizeTask=setTimeout(function(){r.ajustPosition(a.position)},100)},g=function(t,e){return"undefined"==typeof t&&(t=a.delay),setTimeout(function(){h=l.find(".modal-dialog"),a.width&&"auto"!=a.width&&h.css("width",a.width),a.height&&"auto"!=a.height&&(h.css("height",a.height),"iframe"===a.type&&d.css("height",h.height()-u.outerHeight())),r.ajustPosition(a.position),l.removeClass("modal-loading"),"iframe"!=a.type&&h.off("resize."+s).on("resize."+s,f),e&&e()},t)};if("custom"===a.type&&c)if(t.isFunction(c)){var m=c({modal:l,options:a,modalTrigger:r,ready:g});typeof m===o&&(d.html(m),g())}else c instanceof t?(d.html(t("
").append(c.clone()).html()),g()):(d.html(c),g());else if(a.url){var v=function(){var t=l.callComEvent(r,"broken");t&&(d.html(t),g())};if(l.attr("ref",a.url),"iframe"===a.type){l.addClass("modal-iframe"),this.firstLoad=!0;var y="iframe-"+a.name;u.detach(),d.detach(),p.empty().append(u).append(d),d.css("padding",0).html(''),a.waittime>0&&(r.waitTimeout=g(a.waittime,v));var w=document.getElementById(y);w.onload=w.onreadystatechange=function(){if(r.firstLoad&&l.addClass("modal-loading"),!this.readyState||"complete"==this.readyState){r.firstLoad=!1,a.waittime>0&&clearTimeout(r.waitTimeout);try{l.attr("ref",w.contentWindow.location.href);var t=e.frames[y].$;if(t&&"auto"===a.height&&"fullscreen"!=a.size){var i=t("body").addClass("body-modal");a.iframeBodyClass&&i.addClass(a.iframeBodyClass);var n=function(t){l.removeClass("fade");var e=i.outerHeight();t===!0&&a.onlyIncreaseHeight&&(e=Math.max(e,d.data("minModalHeight")||0),d.data("minModalHeight",e)),d.css("height",e),a.fade&&l.addClass("fade"),g()};l.callComEvent(r,"loaded",{modalType:"iframe",jQuery:t}),setTimeout(n,100),i.off("resize."+s).on("resize."+s,f)}else g();t.extend({closeModal:e.closeModal})}catch(o){g()}}}}else t.ajax(t.extend({url:a.url,success:function(i){try{var s=t(i);s.filter(".modal-dialog").length?h.replaceWith(s):s.filter(".modal-content").length?h.find(".modal-content").replaceWith(s):d.wrapInner(s)}catch(a){e.console&&e.console.warn&&console.warn("ZUI: Cannot recogernize remote content.",{error:a,data:i}),l.html(i)}l.callComEvent(r,"loaded",{modalType:n}),g()},error:v},a.ajaxOptions))}l.modal({show:"show",backdrop:a.backdrop,moveable:a.moveable,rememberPos:a.rememberPos,keyboard:a.keyboard})},r.prototype.close=function(i,s){(i||s)&&this.$modal.on("hidden"+a,function(){t.isFunction(i)&&i(),typeof s===o&&("this"===s?e.location.reload():e.location=s)}),this.$modal.modal("hide")},r.prototype.toggle=function(t){this.isShown?this.close():this.show(t)},r.prototype.ajustPosition=function(e){e=e===i?this.options.position:e,t.isFunction(e)&&(e=e(this)),this.$modal.modal("ajustPosition",e)},t.zui({ModalTrigger:r,modalTrigger:new r}),t.fn.modalTrigger=function(e,i){return t(this).each(function(){var n=t(this),a=n.data(s),l=t.extend({title:n.attr("title")||n.text(),url:n.attr("href"),type:n.hasClass("iframe")?"iframe":""},n.data(),t.isPlainObject(e)&&e);a||n.data(s,a=new r(l,n)),typeof e==o?a[e](i):l.show&&a.show(i),n.on((l.trigger||"click")+".toggle."+s,function(t){a.toggle(l),n.is("a")&&t.preventDefault()})})};var l=t.fn.modal;t.fn.modal=function(e,i){return t(this).each(function(){var s=t(this);s.hasClass("modal")?l.call(s,e,i):s.modalTrigger(e,i)})};var h=function(e){var i=typeof e;return"undefined"===i?e=t(".modal.modal-trigger"):i===o&&(e=t(e)),e&&e instanceof t?e:null},c=function(e,i,n){if(t.isFunction(e)){var a=n;n=i,i=e,e=a}e=h(e),e&&e.length&&e.each(function(){t(this).data(s).close(i,n)})},d=function(t,e){e=h(e),e&&e.length&&e.modal("ajustPosition",t)};t.zui({closeModal:c,ajustModalPosition:d}),t(document).on("click."+s+".data-api",'[data-toggle="modal"]',function(e){var i=t(this),n=i.attr("href"),a=null;try{a=t(i.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,""))}catch(o){}a&&a.length||(i.data(s)?i.trigger(".toggle."+s):i.modalTrigger({show:!0})),i.is("a")&&e.preventDefault()})}(window.jQuery,window,void 0),+function(t){"use strict";var e=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",t,e)};e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.prototype.init=function(e,i,s){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(s);for(var n=this.options.trigger.split(" "),a=n.length;a--;){var o=n[a];if("click"==o)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=o){var r="hover"==o?"mouseenter":"focus",l="hover"==o?"mouseleave":"blur";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,s){i[t]!=s&&(e[t]=s)}),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},e.prototype.show=function(e){var i=t.Event("show.zui."+this.type);if((e||this.hasContent())&&this.enabled){var s=this;if(s.$element.trigger(i),i.isDefaultPrevented())return;var n=s.tip();s.setContent(e),s.options.animation&&n.addClass("fade");var a="function"==typeof s.options.placement?s.options.placement.call(s,n[0],s.$element[0]):s.options.placement,o=/\s?auto?\s?/i,r=o.test(a);r&&(a=a.replace(o,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass(a),s.options.container?n.appendTo(s.options.container):n.insertAfter(s.$element);var l=s.getPosition(),h=n[0].offsetWidth,c=n[0].offsetHeight;if(r){var d=s.$element.parent(),u=a,p=document.documentElement.scrollTop||document.body.scrollTop,f="body"==s.options.container?window.innerWidth:d.outerWidth(),g="body"==s.options.container?window.innerHeight:d.outerHeight(),m="body"==s.options.container?0:d.offset().left;a="bottom"==a&&l.top+l.height+c-p>g?"top":"top"==a&&l.top-p-c<0?"bottom":"right"==a&&l.right+h>f?"left":"left"==a&&l.left-h').insertAfter(t(this)).on("click",e),o.trigger(n=t.Event("show."+s)),n.isDefaultPrevented())return;o.toggleClass("open").trigger("shown."+s),a.focus()}return!1}},o.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var s=t(this);if(e.preventDefault(),e.stopPropagation(),!s.is(".disabled, :disabled")){var n=i(s),o=n.hasClass("open");if(!o||o&&27==e.keyCode)return 27==e.which&&n.find(a).focus(),s.click();var r=t("[role=menu] li:not(.divider):visible a",n);if(r.length){var l=r.index(r.filter(":focus"));38==e.keyCode&&l>0&&l--,40==e.keyCode&&l
',a={type:"default",placement:"top",time:4e3,parent:"body",icon:null,close:!0,fade:!0,scale:!0},o={},r=function(e,r){t.isPlainObject(e)&&(r=e,e=r.message);var l=this;r=l.options=t.extend({},a,r),l.id=r.id||s++;var h=o[l.id];h&&h.destroy(),o[l.id]=l,l.message=(r.icon?' ':"")+e,l.$=t(n.format(r)).toggleClass("fade",r.fade).toggleClass("scale",r.scale).attr("id","messager-"+l.id),r.cssClass&&l.$.addClass(r.cssClass);var c=!1,d=l.$.find(".messager-actions"),u=function(e){var s=t('