diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php
index 3e880b2626..e60d59800b 100644
--- a/lib/base/front/front.class.php
+++ b/lib/base/front/front.class.php
@@ -392,7 +392,7 @@ class baseHTML
{
$html = "
";
$html .= "\n";
- $html .= "
";
+ $html .= "";
return $html;
}
@@ -412,7 +412,7 @@ class baseHTML
{
$html = "";
$html .= "\n";
- $html .= "
";
+ $html .= "";
return $html;
}
@@ -507,7 +507,7 @@ class baseHTML
* @access public
* @return string the common button tag.
*/
- public static function commonButton($label = '', $class = 'btn btn-default', $misc = '', $icon = '')
+ public static function commonButton($label = '', $class = 'btn', $misc = '', $icon = '')
{
if($icon) $label = " " . $label;
return " ";
@@ -526,7 +526,7 @@ class baseHTML
* @access public
* @return string
*/
- public static function linkButton($label = '', $link = '', $class='btn btn-default', $misc = '', $target = 'self')
+ public static function linkButton($label = '', $link = '', $class='btn', $misc = '', $target = 'self')
{
global $config, $lang;
@@ -650,7 +650,7 @@ function selectReverse(scope)
EOT;
global $lang;
- $string .= "";
+ $string .= "";
return $string;
}
diff --git a/lib/front/front.class.php b/lib/front/front.class.php
index de49d752d9..b0a8954b3d 100644
--- a/lib/front/front.class.php
+++ b/lib/front/front.class.php
@@ -92,12 +92,12 @@ class html extends baseHTML
return parent::submitButton($label, $class, $misc);
}
- public static function commonButton($label = '', $misc = '', $class = 'btn btn-default', $icon = '')
+ public static function commonButton($label = '', $misc = '', $class = 'btn', $icon = '')
{
return parent::commonButton($label, $class, $misc, $icon);
}
- public static function linkButton($label = '', $link = '', $target = 'self', $misc = '', $class = 'btn btn-default')
+ public static function linkButton($label = '', $link = '', $target = 'self', $misc = '', $class = 'btn')
{
return parent::linkButton($label, $link, $class, $misc, $target);
}
diff --git a/module/block/view/dashboard.html.php b/module/block/view/dashboard.html.php
index 31f78811af..530728f437 100644
--- a/module/block/view/dashboard.html.php
+++ b/module/block/view/dashboard.html.php
@@ -105,7 +105,7 @@ config.confirmRemoveBlock = 'block->confirmRemoveBlock; ?>';
var module = '';
var useGuest = ;
-$('#subHeader #pageActions .btn-toolbar:last').append(createLink("block", "admin", "id=0&module=$module"), " {$lang->block->createBlock}", '', "class='btn btn-default' data-toggle='modal' data-type='ajax' data-width='700' data-title='{$lang->block->createBlock}'"))?>);
+$('#subHeader #pageActions .btn-toolbar:last').append(createLink("block", "admin", "id=0&module=$module"), " {$lang->block->createBlock}", '', "class='btn' data-toggle='modal' data-type='ajax' data-width='700' data-title='{$lang->block->createBlock}'"))?>);
getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
diff --git a/module/block/view/todoblock.html.php b/module/block/view/todoblock.html.php
index 16d8e99384..94d7310df0 100644
--- a/module/block/view/todoblock.html.php
+++ b/module/block/view/todoblock.html.php
@@ -82,7 +82,7 @@
save, "onclick='ajaxCreateTodo(this)'", "btn btn-primary btn-wide");?>
-
+
diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php
index 6aa50dbfe9..3650a765ea 100644
--- a/module/bug/view/create.html.php
+++ b/module/bug/view/create.html.php
@@ -77,7 +77,7 @@ js::set('confirmDeleteTemplate', $lang->bug->confirmDeleteTemplate);
@@ -86,7 +86,7 @@ js::set('confirmDeleteTemplate', $lang->bug->confirmDeleteTemplate);
|
diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php
index 94944fdb1e..0ea5159e3f 100644
--- a/module/bug/view/edit.html.php
+++ b/module/bug/view/edit.html.php
@@ -218,7 +218,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
openedBuild, 'size=4 multiple=multiple class="chosen form-control"');?>
- bug->allBuilds, "class='btn btn-default' onclick='loadAllBuilds(this)'")?>
+ bug->allBuilds, "class='btn' onclick='loadAllBuilds(this)'")?>
|
@@ -235,7 +235,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
resolvedBuild, "class='form-control chosen'");?>
- bug->allBuilds, "class='btn btn-default' onclick='loadAllBuilds(this)'")?>
+ bug->allBuilds, "class='btn' onclick='loadAllBuilds(this)'")?>
|
diff --git a/module/build/view/linkbug.html.php b/module/build/view/linkbug.html.php
index b644e7552b..b98295749b 100644
--- a/module/build/view/linkbug.html.php
+++ b/module/build/view/linkbug.html.php
@@ -62,11 +62,7 @@
-<<<<<<< HEAD
- build->linkBug, '', 'btn btn-default');?>
-=======
build->linkBug, '', 'btn');?>
->>>>>>> d31cb467eea5b5badeb0fe21a7c21ac7e1b3b15e
id}&type=bug"), $lang->goback, '', "class='btn'");?>
diff --git a/module/build/view/linkstory.html.php b/module/build/view/linkstory.html.php
index 3eb59c2180..6104ac1f14 100644
--- a/module/build/view/linkstory.html.php
+++ b/module/build/view/linkstory.html.php
@@ -66,11 +66,7 @@
-<<<<<<< HEAD
- build->linkStory, '', 'btn btn-default');?>
-=======
build->linkStory, '', 'btn');?>
->>>>>>> d31cb467eea5b5badeb0fe21a7c21ac7e1b3b15e
id}&type=story"), $lang->goback, '', "class='btn'");?>
diff --git a/module/message/view/setting.html.php b/module/message/view/setting.html.php
index a14f257991..6568907b7a 100644
--- a/module/message/view/setting.html.php
+++ b/module/message/view/setting.html.php
@@ -70,7 +70,7 @@
- | |
+ |
diff --git a/module/project/view/all.html.php b/module/project/view/all.html.php
index 937e7fce92..1537b30b95 100644
--- a/module/project/view/all.html.php
+++ b/module/project/view/all.html.php
@@ -108,7 +108,7 @@
').append(a)),i.$menu.append(a),i.$menu.removeClass("loading"),i.isLoaded=!0,e&&e(!0)},error:function(){i.$menu.removeClass("loading").append(''+(s.errorText||window.lang&&window.lang.timeout)+"
"),e&&e(!1)}},s.ajax))},s.prototype.scrollTo=function(t){t.length&&t[0].scrollIntoView({behavior:"smooth"})},s.prototype.getItems=function(){return this.$.find(this.options.selector)},s.prototype.getActiveItem=function(){return this.getItems().filter(".active:first")},s.prototype.search=function(e){var s=this,n=void 0===e||null===e||""===e,o=s.getItems().removeClass("active");if(n)o.removeClass("hidden");else{var a=t.trim(e).split(" ");o.each(function(){var e=t(this),s=e.text()+" "+(e.data("key")||e.data("filter"));e.toggleClass("hidden",!i(a,s))})}s.scrollTo(o.not(".hidden").first().addClass("active"))},s.DEFAULTS={selector:".list-group a",searchBox:".search-box",onSelectItem:null},t.fn.searchList=function(i){return this.each(function(){var n=t(this),o=n.data(e),a="object"==typeof i&&i;o||n.data(e,o=new s(this,a)),"string"==typeof i&&o[i]()})},s.NAME=e,t.fn.searchList.Constructor=s,t(function(){t('[data-ride="searchList"]').searchList()})}(jQuery),function(t){"use strict";var e="zui.labelSelector",i=function(s,n){var o=this;o.name=e;o.$=t(s);n=o.options=t.extend({},i.DEFAULTS,this.$.data(),n),o.$.hide(),o.update()};i.prototype.select=function(t){t+="",this.$wrapper.find(".label.active").removeClass("active"),""!==t&&"0"!==t&&this.$wrapper.find('.label[data-value="'+t+'"]').addClass("active"),this.$.val(t).trigger("change")},i.prototype.update=function(){var e=this,i=e.options,s=e.$wrapper;if(!s){if(i.wrapper)s=t(i.wrapper);else{var n=e.$.next();s=n.hasClass(".label-selector")?n:t('')}s.parent().length||e.$.after(s),e.$wrapper=s,s.on("click",".label",function(){e.select(t(this).data("value"))})}s.empty();var o=e.$.val();e.$.children("option").each(function(){var e=t(this),n={label:e.text(),value:e.val()},a=""===n.value||"0"===n.value,r=t(i.labelTemplate||'');i.labelClass&&!a&&r.addClass(i.labelClass),i.labelCreator?r=i.labelCreator(r):(r.data("option",n).attr("data-value",n.value),a&&!n.label?r.addClass("empty").append(''):r.text(n.label).toggleClass("active",o===n.value)),s.append(r)})},i.DEFAULTS={},t.fn.labelSelector=function(s){return this.each(function(){var n=t(this),o=n.data(e),a="object"==typeof s&&s;o||n.data(e,o=new i(this,a)),"string"==typeof s&&o[s]()})},i.NAME=e,t.fn.labelSelector.Constructor=i,t(function(){t('[data-provide="labelSelector"]').labelSelector()})}(jQuery),function(t){"use strict";var e="zui.fileInput";const i=t.BYTE_UNITS={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776};var s=t.formatBytes=function(t,e,s){return void 0===e&&(e=2),s||(s=ta.fileMaxSize&&(h.val(""),(window.bootbox||window).alert(a.fileSizeError.format(s(a.fileMaxSize)))),r.update()}),r.update()};o.prototype.getFile=function(){return this.$input.prop("files")[0]},o.prototype.update=function(t){var e=this,i=e.$,n=e.getFile(),o=!n;i.toggleClass("normal",!o).toggleClass("empty",o),n?(e.oldName=n.name,i.find(".file-title").text(n.name).attr("title",n.name),i.find(".file-size").text(s(n.size)),i.find(".file-editbox").val(n.name).attr("size",n.name.length),e.options.onSelect&&e.options.onSelect(n,e)):i.find(".file-editbox").val("")},o.DEFAULTS={fileMaxSize:0,fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInput=function(i){return this.each(function(){var s=t(this),n=s.data(e),a="object"==typeof i&&i;n||s.data(e,n=new o(this,a)),"string"==typeof i&&n[i]()})},o.NAME=e,t.fn.fileInput.Constructor=o,t(function(){t('[data-provide="fileInput"]').fileInput()});var a="zui.fileInputList",r=function(e,i){var s=this;s.name=a;var n=s.$=t(e);i=s.options=t.extend({},r.DEFAULTS,this.$.data(),i),s.$template=n.find(".file-input").detach(),s.add()};r.prototype.add=function(){var t=this,e=t.options,i=t.$template.clone();"before"===e.appendWay?t.$.prepend(i):t.$.append(i),i.fileInput({fileMaxSize:e.eachFileMaxSize,fileSizeError:e.fileSizeError,onDelete:function(e){e.$.remove(),t.options.onDelete&&t.options.onDelete(e,t)},onSelect:function(e,i){t.add(),t.options.onSelect&&t.options.onSelect(e,i,t)}})},r.DEFAULTS={fileMaxSize:0,eachFileMaxSize:0,appendWay:"after",fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInputList=function(e){return this.each(function(){var i=t(this),s=i.data(a),n="object"==typeof e&&e;s||i.data(a,s=new r(this,n)),"string"==typeof e&&s[e]()})},r.NAME=a,t.fn.fileInputList.Constructor=r,t(function(){t('[data-provide="fileInputList"]').fileInputList()})}(jQuery),function(t){window.config||(window.config={}),t.createLink=window.createLink=function(t,e,s,n,o){if(n||(n=config.defaultView),o||(o=!1),s)for(s=s.split("&"),i=0;i'+d+"")}}t.val()||(time=e(o.format("hh:mm")),time=time-time%10+10,t.val(s(time)))};t.fn.timeSpanControl=function(i){return this.each(function(){var a=t(this),r=t.extend({},i,a.data()),l=a.find('[name="begin"],.control-time-begin'),h=a.find('[name="end"],.control-time-end'),c=function(){var t=l.val();if(a.find(".hide-empty-begin").toggleClass("hide",!t),t){const i=s(e(t)+30);h.find('option[value="'+i+'"]').length&&h.val(i),r.onChange&&r.onChange(h,i)}};if(a.data("timeSpanControlInit")){if(r.begin){const d=n(r.begin).format("hh:mm");l.find('option[value="'+d+'"]').length&&l.val(d),r.onChange&&r.onChange(l,d)}if(r.end){const u=n(r.end).format("hh:mm");h.find('option[value="'+u+'"]').length&&h.val(u),r.onChange&&r.onChange(h,u)}}else l.on("change",c),o(l,r.begin),o(h,r.end),a.data("timeSpanControlInit",!0);r.end||c()})},t.timeSpanControl={convertTimeToNum:e,convertNumToTime:s,initTimeSelect:o,createTime:n};var a=t.setSearchType=function(e){var i=t("#searchType");e||(e=i.val()),e=e||"bug",i.val(e);var s=t("#searchTypeMenu");s.find("li.selected").removeClass("selected");var n=s.find('a[data-value="'+e+'"]'),o=n.text();n.parent().addClass("selected"),t("#searchTypeName").text(o)};t.gotoObject=function(e,i){e||(e=t("#searchType").val()),i||(i=t("#searchInput").val()),i&&e&&(window.location.href=t.createLink(e,"testsuite"===e?"library":"view","id="+i))};t(function(){a(),t(document).on("keydown",function(e){e.ctrlKey&&71===e.keyCode&&(t("#searchInput").val("").focus(),e.stopPropagation(),e.preventDefault())})}),t.chosenDefaultOptions={disable_search_threshold:1,width:null,allow_single_deselect:!0,placeholder_text_single:" ",placeholder_text_multiple:" ",search_contains:!0},t.chosenSimpleOptions=t.extend({},t.chosenDefaultOptions,{disable_search_threshold:6}),t.fn._chosen=t.fn.chosen,t.fn.chosen=function(e){return"string"==typeof e?this._chosen(e):this.each(function(){var i=t(this).addClass("chosen-controled");return i._chosen(t.extend({},i.hasClass("chosen-simple")?t.chosenSimpleOptions:t.chosenDefaultOptions,e))})},t(function(){t(".chosen,.chosen-simple").each(function(){var e=t(this);e.closest(".template").length||e.chosen()})}),t.extend(t.fn.pager.Constructor.DEFAULTS,{maxNavCount:8,prevIcon:"icon-angle-left",nextIcon:"icon-angle-right",navEllipsisItem:"…",menuDirection:"dropup",pageSizeOptions:[5,10,15,20,25,30,35,40,45,50,100,200,500,1e3,2e3],elements:["total_text","size_menu","prev_icon","nav","next_icon"],onPageChange:function(t,e){console.log("onPageChange",t,e),t.recPerPage!==e.recPerPage&&(window.location.href=this.createLink())}}),t.zui.Messager.DEFAULTS.cssClass="messagger-zt",t.fn.reverseOrder=function(){return this.each(function(){var e=t(this);e.prependTo(e.parent())})};var r=function(e,i){var s=t(e);i=t.extend({},s.data(),i);var n=s.find(".histories-list"),o=!0,a=!1;s.on("click",".btn-reverse",function(){n.children("li").reverseOrder(),o=!o,t(this).find(".icon").toggleClass("icon-arrow-up",o).toggleClass("icon-arrow-down",!o)}).on("click",".btn-expand-all",function(){var e=t(this).find(".icon");a=!a,e.toggleClass("icon-plus",!a).toggleClass("icon-minus",a),n.children("li").toggleClass("show-changes",a)}).on("click",".btn-expand",function(){t(this).closest("li").toggleClass("show-changes")}).on("click",".btn-strip",function(){var e=t(this),s=e.find(".icon"),n=s.hasClass("icon-code");s.toggleClass("icon-code",!n).toggleClass("icon-text",n),e.attr("title",n?i.original:i.textdiff),e.closest("li").toggleClass("show-original",n)}),n.find(".btn-strip").attr("title",i.original);var r=s.find(".modal-comment").modal({show:!1,backdrop:!1,position:function(t){var e=n[0].getBoundingClientRect(),i=t.$element.find(".modal-dialog"),s=i.outerWidth(),o=i.outerHeight();return{top:Math.min(window.innerHeight-o,e.top-40),left:e.left+e.width-s,margin:0}}});s.on("click",".btn-comment",function(t){r.modal("toggle"),t.preventDefault()}).on("click",".btn-edit-comment,.btn-hide-form",function(){t(this).closest("li").toggleClass("show-form")});var l=s.find(".comment-edit-form");l.ajaxForm({success:function(t,e,i,s){setTimeout(function(){l.closest("li").removeClass("show-form")},2e3)}})};t.fn.histories=function(t){return this.each(function(){r(this,t)})},t(function(){t(".histories").histories()});var l=0,h=0;t.toggleSidebar=function(e){var i=t("#sidebar");if(i.length){var s=t("main");if(void 0===e)e=s.hasClass("hide-sidebar");else if(e&&!s.hasClass("hide-sidebar"))return;s.toggleClass("hide-sidebar",!e),clearTimeout(l),e?(i.addClass("showing"),l=setTimeout(function(){i.removeClass("showing"),i.trigger("sidebar.toggle",e)},210)):i.trigger("sidebar.toggle",e),t.zui.store.set(h,e)}};var c=function(){var e=t("#sidebar");if(e.length&&!e.data("init")){h="sidebar:"+(e.data("id")||config.module+"/"+config.method);var i=t("main");i.on("click",".sidebar-toggle",function(){t.toggleSidebar(i.hasClass("hide-sidebar"))});var s=t.zui.store.get(h,e.data("hide")!==!1);return e.addClass("no-animate"),t.toggleSidebar(s),setTimeout(function(){e.removeClass("no-animate")},500),e.data("init",1),!0}};c()||t(c),t.toggleQueryBox=function(e){var i=t("#queryBox");i.length&&(void 0===e&&(e=!i.hasClass("show")),i.toggleClass("show",!!e),i.data("init")||(i.addClass("load-indicator loading").data("init",1),t.get(t.createLink("search","buildForm"),function(t){i.html(t).removeClass("loading")})),t(".querybox-toggle").toggleClass("querybox-opened",e))},t(function(){var e=t("#queryBox");e.length&&(t(document).on("click",".querybox-toggle",function(){t.toggleQueryBox()}),e.hasClass("show")&&t.toggleQueryBox(!0))}),t.extend(t.fn.colorPicker.Constructor.DEFAULTS,{colors:["#3DA7F5","#75C941","#2DBDB2","#797EC9","#FFAF38","#FF4E3E"]}),t(function(){t("a.iframe").each(function(){var e=t(this);e.parents('[data-ride="table"]').length||e.modalTrigger()})});var d=function(){var e,i,s=t(this),n=t.extend({limitSize:40,suffix:"…"},s.data()),o=s.text();if(o.length>n.limitSize){e=o,i=o.substr(0,n.limitSize)+n.suffix,s.text(i).addClass("limit-text-on");var a=n.toggleBtn?t(n.toggleBtn):s.next(".text-limit-toggle");a.text(a.data("textExpand")),a.on("click",function(){var t=s.toggleClass("limit-text-on").hasClass("limit-text-on");s.text(t?i:e),a.text(a.data(t?"textExpand":"textCollapse"))})}else(n.toggleBtn?t(n.toggleBtn):s.next(".text-limit-toggle")).hide()};t.fn.textLimit=function(){return this.each(d)},t(function(){t(".text-limit").textLimit()}),t.fixedTableHead=window.fixedTableHead=function(e){t(e).scroll(function(){var e=t(this).find(".table-fixed-head").size()>0;if(!e&&(t(this).css("position","relative"),1==t(this).find("table").size())){var i=""+t(this).find("table thead").html()+"
";t(this).prepend(i);var s=t(this).find("table.table-fixed-head");s.addClass(t(this).find("table:last").attr("class"));var n=t(this).find("table:last thead th");s.find("thead th").each(function(t){s.find("thead th").eq(t).width(n.eq(t).width())})}t(this).find("table.table-fixed-head").css("top",t(this).scrollTop())})},t(document).on("click","tr[data-url]",function(){var e=t(this),i=e.data("href")||e.data("url");i&&(window.location.href=i)}),"yes"===config.onlybody&&self===parent&&(window.location.href=window.location.href.replace("?onlybody=yes","").replace("&onlybody=yes","")),t(function(){t("body").addClass("m-{currentModule}-{currentMethod}".format(config))});var u,p,f,g,m,v=function(){u||(u=t("#subNavbar"),p=t("#pageNav"),f=t("#pageActions"),g=u.children(".nav"),m=g.outerWidth());var e=u.outerWidth(),i=p.outerWidth()||0,s=f.outerWidth()||0;if(i=i?i+15:0,s=s?s+15:0,!i&&!s)return void g.css({maxWidth:null,left:null,position:"static"});var n=Math.max(300,e-i-s),o=Math.min(n,m),a=(e-o)/2,r=i&&a",a,r,l,h,n)})};t.fn.fixInputGroup=function(){return this.each(function(){_(this)})},t(function(){t(".input-group").fixInputGroup()})}(jQuery);
\ No newline at end of file
+},400)})}(jQuery,window,void 0),$.zui.browser.ie&&$.zui.browser.ie<10){var $uploader=$("#uploader");$uploader.on("click",".uploader-btn-browse",function(){$uploader.find('input[type="file"]:first').click()})}!function(t){"use strict";var e="zui.searchList",i=function(t,e){if(t&&t.length)for(var i=0;i').append(a)),i.$menu.append(a),i.$menu.removeClass("loading"),i.isLoaded=!0,e&&e(!0)},error:function(){i.$menu.removeClass("loading").append(''+(s.errorText||window.lang&&window.lang.timeout)+"
"),e&&e(!1)}},s.ajax))},s.prototype.scrollTo=function(t){t.length&&t[0].scrollIntoView({behavior:"smooth"})},s.prototype.getItems=function(){return this.$.find(this.options.selector)},s.prototype.getActiveItem=function(){return this.getItems().filter(".active:first")},s.prototype.search=function(e){var s=this,n=void 0===e||null===e||""===e,o=s.getItems().removeClass("active");if(n)o.removeClass("hidden");else{var a=t.trim(e).split(" ");o.each(function(){var e=t(this),s=e.text()+" "+(e.data("key")||e.data("filter"));e.toggleClass("hidden",!i(a,s))})}s.scrollTo(o.not(".hidden").first().addClass("active"))},s.DEFAULTS={selector:".list-group a",searchBox:".search-box",onSelectItem:null},t.fn.searchList=function(i){return this.each(function(){var n=t(this),o=n.data(e),a="object"==typeof i&&i;o||n.data(e,o=new s(this,a)),"string"==typeof i&&o[i]()})},s.NAME=e,t.fn.searchList.Constructor=s,t(function(){t('[data-ride="searchList"]').searchList()})}(jQuery),function(t){"use strict";var e="zui.labelSelector",i=function(s,n){var o=this;o.name=e;o.$=t(s);n=o.options=t.extend({},i.DEFAULTS,this.$.data(),n),o.$.hide(),o.update()};i.prototype.select=function(t){t+="",this.$wrapper.find(".label.active").removeClass("active"),""!==t&&"0"!==t&&this.$wrapper.find('.label[data-value="'+t+'"]').addClass("active"),this.$.val(t).trigger("change")},i.prototype.update=function(){var e=this,i=e.options,s=e.$wrapper;if(!s){if(i.wrapper)s=t(i.wrapper);else{var n=e.$.next();s=n.hasClass(".label-selector")?n:t('')}s.parent().length||e.$.after(s),e.$wrapper=s,s.on("click",".label",function(){e.select(t(this).data("value"))})}s.empty();var o=e.$.val();e.$.children("option").each(function(){var e=t(this),n={label:e.text(),value:e.val()},a=""===n.value||"0"===n.value,r=t(i.labelTemplate||'');i.labelClass&&!a&&r.addClass(i.labelClass),i.labelCreator?r=i.labelCreator(r):(r.data("option",n).attr("data-value",n.value),a&&!n.label?r.addClass("empty").append(''):r.text(n.label).toggleClass("active",o===n.value)),s.append(r)})},i.DEFAULTS={},t.fn.labelSelector=function(s){return this.each(function(){var n=t(this),o=n.data(e),a="object"==typeof s&&s;o||n.data(e,o=new i(this,a)),"string"==typeof s&&o[s]()})},i.NAME=e,t.fn.labelSelector.Constructor=i,t(function(){t('[data-provide="labelSelector"]').labelSelector()})}(jQuery),function(t){"use strict";var e="zui.fileInput";const i=t.BYTE_UNITS={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776};var s=t.formatBytes=function(t,e,s){return void 0===e&&(e=2),s||(s=ta.fileMaxSize&&(h.val(""),(window.bootbox||window).alert(a.fileSizeError.format(s(a.fileMaxSize)))),r.update()}),r.update()};o.prototype.getFile=function(){return this.$input.prop("files")[0]},o.prototype.update=function(t){var e=this,i=e.$,n=e.getFile(),o=!n;i.toggleClass("normal",!o).toggleClass("empty",o),n?(e.oldName=n.name,i.find(".file-title").text(n.name).attr("title",n.name),i.find(".file-size").text(s(n.size)),i.find(".file-editbox").val(n.name).attr("size",n.name.length),e.options.onSelect&&e.options.onSelect(n,e)):i.find(".file-editbox").val("")},o.DEFAULTS={fileMaxSize:0,fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInput=function(i){return this.each(function(){var s=t(this),n=s.data(e),a="object"==typeof i&&i;n||s.data(e,n=new o(this,a)),"string"==typeof i&&n[i]()})},o.NAME=e,t.fn.fileInput.Constructor=o,t(function(){t('[data-provide="fileInput"]').fileInput()});var a="zui.fileInputList",r=function(e,i){var s=this;s.name=a;var n=s.$=t(e);i=s.options=t.extend({},r.DEFAULTS,this.$.data(),i),s.$template=n.find(".file-input").detach(),s.add()};r.prototype.add=function(){var t=this,e=t.options,i=t.$template.clone();"before"===e.appendWay?t.$.prepend(i):t.$.append(i),i.fileInput({fileMaxSize:e.eachFileMaxSize,fileSizeError:e.fileSizeError,onDelete:function(e){e.$.remove(),t.options.onDelete&&t.options.onDelete(e,t)},onSelect:function(e,i){t.add(),t.options.onSelect&&t.options.onSelect(e,i,t)}})},r.DEFAULTS={fileMaxSize:0,eachFileMaxSize:0,appendWay:"after",fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInputList=function(e){return this.each(function(){var i=t(this),s=i.data(a),n="object"==typeof e&&e;s||i.data(a,s=new r(this,n)),"string"==typeof e&&s[e]()})},r.NAME=a,t.fn.fileInputList.Constructor=r,t(function(){t('[data-provide="fileInputList"]').fileInputList()})}(jQuery),function(t){window.config||(window.config={}),t.createLink=window.createLink=function(t,e,s,n,o){if(n||(n=config.defaultView),o||(o=!1),s)for(s=s.split("&"),i=0;i'+d+"")}}t.val()||(time=e(o.format("hh:mm")),time=time-time%10+10,t.val(s(time)))};t.fn.timeSpanControl=function(i){return this.each(function(){var a=t(this),r=t.extend({},i,a.data()),l=a.find('[name="begin"],.control-time-begin'),h=a.find('[name="end"],.control-time-end'),c=function(){var t=l.val();if(a.find(".hide-empty-begin").toggleClass("hide",!t),t){const i=s(e(t)+30);h.find('option[value="'+i+'"]').length&&h.val(i),r.onChange&&r.onChange(h,i)}};if(a.data("timeSpanControlInit")){if(r.begin){const d=n(r.begin).format("hh:mm");l.find('option[value="'+d+'"]').length&&l.val(d),r.onChange&&r.onChange(l,d)}if(r.end){const u=n(r.end).format("hh:mm");h.find('option[value="'+u+'"]').length&&h.val(u),r.onChange&&r.onChange(h,u)}}else l.on("change",c),o(l,r.begin),o(h,r.end),a.data("timeSpanControlInit",!0);r.end||c()})},t.timeSpanControl={convertTimeToNum:e,convertNumToTime:s,initTimeSelect:o,createTime:n};var a=t.setSearchType=function(e){var i=t("#searchType");e||(e=i.val()),e=e||"bug",i.val(e);var s=t("#searchTypeMenu");s.find("li.selected").removeClass("selected");var n=s.find('a[data-value="'+e+'"]'),o=n.text();n.parent().addClass("selected"),t("#searchTypeName").text(o)};t.gotoObject=function(e,i){e||(e=t("#searchType").val()),i||(i=t("#searchInput").val()),i&&e&&(window.location.href=t.createLink(e,"testsuite"===e?"library":"view","id="+i))};t(function(){a(),t(document).on("keydown",function(e){e.ctrlKey&&71===e.keyCode&&(t("#searchInput").val("").focus(),e.stopPropagation(),e.preventDefault())})}),t.chosenDefaultOptions={disable_search_threshold:1,width:null,allow_single_deselect:!0,placeholder_text_single:" ",placeholder_text_multiple:" ",search_contains:!0},t.chosenSimpleOptions=t.extend({},t.chosenDefaultOptions,{disable_search_threshold:6}),t.fn._chosen=t.fn.chosen,t.fn.chosen=function(e){return"string"==typeof e?this._chosen(e):this.each(function(){var i=t(this).addClass("chosen-controled");return i._chosen(t.extend({},i.hasClass("chosen-simple")?t.chosenSimpleOptions:t.chosenDefaultOptions,e))})},t(function(){t(".chosen,.chosen-simple").each(function(){var e=t(this);e.closest(".template").length||e.chosen()})}),t.extend(t.fn.pager.Constructor.DEFAULTS,{maxNavCount:8,prevIcon:"icon-angle-left",nextIcon:"icon-angle-right",navEllipsisItem:"…",menuDirection:"dropup",pageSizeOptions:[5,10,15,20,25,30,35,40,45,50,100,200,500,1e3,2e3],elements:["total_text","size_menu","prev_icon","nav","next_icon"],onPageChange:function(t,e){console.log("onPageChange",t,e),t.recPerPage!==e.recPerPage&&(window.location.href=this.createLink())}}),t.zui.Messager.DEFAULTS.cssClass="messagger-zt",t.fn.reverseOrder=function(){return this.each(function(){var e=t(this);e.prependTo(e.parent())})};var r=function(e,i){var s=t(e);i=t.extend({},s.data(),i);var n=s.find(".histories-list"),o=!0,a=!1;s.on("click",".btn-reverse",function(){n.children("li").reverseOrder(),o=!o,t(this).find(".icon").toggleClass("icon-arrow-up",o).toggleClass("icon-arrow-down",!o)}).on("click",".btn-expand-all",function(){var e=t(this).find(".icon");a=!a,e.toggleClass("icon-plus",!a).toggleClass("icon-minus",a),n.children("li").toggleClass("show-changes",a)}).on("click",".btn-expand",function(){t(this).closest("li").toggleClass("show-changes")}).on("click",".btn-strip",function(){var e=t(this),s=e.find(".icon"),n=s.hasClass("icon-code");s.toggleClass("icon-code",!n).toggleClass("icon-text",n),e.attr("title",n?i.original:i.textdiff),e.closest("li").toggleClass("show-original",n)}),n.find(".btn-strip").attr("title",i.original);var r=s.find(".modal-comment").modal({show:!1,backdrop:!1,position:function(t){var e=n[0].getBoundingClientRect(),i=t.$element.find(".modal-dialog"),s=i.outerWidth(),o=i.outerHeight();return{top:Math.min(window.innerHeight-o,e.top-40),left:e.left+e.width-s,margin:0}}});s.on("click",".btn-comment",function(t){r.modal("toggle"),t.preventDefault()}).on("click",".btn-edit-comment,.btn-hide-form",function(){t(this).closest("li").toggleClass("show-form")});var l=s.find(".comment-edit-form");l.ajaxForm({success:function(t,e,i,s){setTimeout(function(){l.closest("li").removeClass("show-form")},2e3)}})};t.fn.histories=function(t){return this.each(function(){r(this,t)})},t(function(){t(".histories").histories()});var l=0,h=0;t.toggleSidebar=function(e){var i=t("#sidebar");if(i.length){var s=t("main");if(void 0===e)e=s.hasClass("hide-sidebar");else if(e&&!s.hasClass("hide-sidebar"))return;s.toggleClass("hide-sidebar",!e),clearTimeout(l),e?(i.addClass("showing"),l=setTimeout(function(){i.removeClass("showing"),i.trigger("sidebar.toggle",e)},210)):i.trigger("sidebar.toggle",e),t.zui.store.set(h,e)}};var c=function(){var e=t("#sidebar");if(e.length&&!e.data("init")){h="sidebar:"+(e.data("id")||config.module+"/"+config.method);var i=t("main");i.on("click",".sidebar-toggle",function(){t.toggleSidebar(i.hasClass("hide-sidebar"))});var s=t.zui.store.get(h,e.data("hide")!==!1);return e.addClass("no-animate"),t.toggleSidebar(s),setTimeout(function(){e.removeClass("no-animate")},500),e.data("init",1),!0}};c()||t(c),t.toggleQueryBox=function(e){var i=t("#queryBox");i.length&&(void 0===e&&(e=!i.hasClass("show")),i.toggleClass("show",!!e),i.data("init")||(i.addClass("load-indicator loading").data("init",1),t.get(t.createLink("search","buildForm"),function(t){i.html(t).removeClass("loading")})),t(".querybox-toggle").toggleClass("querybox-opened",e))},t(function(){var e=t("#queryBox");e.length&&(t(document).on("click",".querybox-toggle",function(){t.toggleQueryBox()}),e.hasClass("show")&&t.toggleQueryBox(!0))}),t.extend(t.fn.colorPicker.Constructor.DEFAULTS,{colors:["#3DA7F5","#75C941","#2DBDB2","#797EC9","#FFAF38","#FF4E3E"]}),t(function(){t("a.iframe").each(function(){var e=t(this);e.parents('[data-ride="table"]').length||e.modalTrigger()})});var d=function(){var e,i,s=t(this),n=t.extend({limitSize:40,suffix:"…"},s.data()),o=s.text();if(o.length>n.limitSize){e=o,i=o.substr(0,n.limitSize)+n.suffix,s.text(i).addClass("limit-text-on");var a=n.toggleBtn?t(n.toggleBtn):s.next(".text-limit-toggle");a.text(a.data("textExpand")),a.on("click",function(){var t=s.toggleClass("limit-text-on").hasClass("limit-text-on");s.text(t?i:e),a.text(a.data(t?"textExpand":"textCollapse"))})}else(n.toggleBtn?t(n.toggleBtn):s.next(".text-limit-toggle")).hide()};t.fn.textLimit=function(){return this.each(d)},t(function(){t(".text-limit").textLimit()}),t.fixedTableHead=window.fixedTableHead=function(e){t(e).scroll(function(){var e=t(this).find(".table-fixed-head").size()>0;if(!e&&(t(this).css("position","relative"),1==t(this).find("table").size())){var i=""+t(this).find("table thead").html()+"
";t(this).prepend(i);var s=t(this).find("table.table-fixed-head");s.addClass(t(this).find("table:last").attr("class"));var n=t(this).find("table:last thead th");s.find("thead th").each(function(t){s.find("thead th").eq(t).width(n.eq(t).width())})}t(this).find("table.table-fixed-head").css("top",t(this).scrollTop())})},t(document).on("click","tr[data-url]",function(){var e=t(this),i=e.data("href")||e.data("url");i&&(window.location.href=i)}),"yes"===config.onlybody&&self===parent&&(window.location.href=window.location.href.replace("?onlybody=yes","").replace("&onlybody=yes","")),t(function(){t("body").addClass("m-{currentModule}-{currentMethod}".format(config))});var u,p,f,g,m,v=function(){u||(u=t("#subNavbar"),p=t("#pageNav"),f=t("#pageActions"),g=u.children(".nav"),m=g.outerWidth());var e=u.outerWidth(),i=p.outerWidth()||0,s=f.outerWidth()||0;if(i=i?i+15:0,s=s?s+15:0,!i&&!s)return void g.css({maxWidth:null,left:null,position:"static"});var n=Math.max(300,e-i-s),o=Math.min(n,m),a=(e-o)/2,r=i&&a",a,r,l,h,n)})};t.fn.fixInputGroup=function(){return this.each(function(){_(this)})},t(function(){t(".input-group").fixInputGroup()})}(jQuery);