");if(this.options.cardView){y.push(m('',this.header.fields.length))}if(!this.options.cardView&&this.options.detailView){y.push(" ",'',m('',this.options.iconsPrefix,this.options.icons.detailOpen),""," | ")}j.each(this.header.fields,function(I,L){var P="",M=o(C,L,z.options.escape),K="",E={},Q="",J=z.header.classes[I],G="",O="",R="",H="",F=z.columns[I];if(z.fromHtml&&typeof M==="undefined"){return}if(!F.visible){return}if(z.options.cardView&&!F.cardVisible){return}r=m('style="%s"',s.concat(z.header.styles[I]).join("; "));if(C["_"+L+"_id"]){Q=m(' id="%s"',C["_"+L+"_id"])}if(C["_"+L+"_class"]){J=m(' class="%s"',C["_"+L+"_class"])}if(C["_"+L+"_rowspan"]){O=m(' rowspan="%s"',C["_"+L+"_rowspan"])}if(C["_"+L+"_colspan"]){R=m(' colspan="%s"',C["_"+L+"_colspan"])}if(C["_"+L+"_title"]){H=m(' title="%s"',C["_"+L+"_title"])}E=q(z.header,z.header.cellStyles[I],[M,C,w,L],E);if(E.classes){J=m(' class="%s"',E.classes)}if(E.css){var D=[];for(var N in E.css){D.push(N+": "+E.css[N])}r=m('style="%s"',D.concat(z.header.styles[I]).join("; "))}M=q(F,z.header.formatters[I],[M,C,w],M);if(C["_"+L+"_data"]&&!j.isEmptyObject(C["_"+L+"_data"])){j.each(C["_"+L+"_data"],function(T,S){if(T==="index"){return}G+=m(' data-%s="%s"',T,S)})}if(F.checkbox||F.radio){K=F.checkbox?"checkbox":K;K=F.radio?"radio":K;P=[m(z.options.cardView?' ':' ',F["class"]||""),"",z.header.formatters[I]&&typeof M==="string"?M:"",z.options.cardView?"":" | "].join("");C[z.header.stateField]=M===true||(M&&M.checked)}else{M=typeof M==="undefined"||M===null?z.options.undefinedText:M;P=z.options.cardView?[' ',z.options.showHeader?m('%s',r,c(z.columns,"field","title",L)):"",m('%s',M)," "].join(""):[m(" ",Q,J,r,G,O,R,H),M," | "].join("");if(z.options.cardView&&z.options.smartDisplay&&M===""){P=' '}}y.push(P)});if(this.options.cardView){y.push(" | ")}y.push("")}if(!y.length){y.push('',m('| %s | ',this.$header.find("th").length,this.options.formatNoMatches()),"
")}this.$body.html(y.join(""));if(!x){this.scrollTo(0)}this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(J){var D=j(this),F=D.parent(),M=z.data[F.data("index")],H=D[0].cellIndex,G=z.getVisibleFields(),K=G[z.options.detailView&&!z.options.cardView?H-1:H],E=z.columns[i(z.columns,K)],L=o(M,K,z.options.escape);if(D.find(".detail-icon").length){return}z.trigger(J.type==="click"?"click-cell":"dbl-click-cell",K,L,M,D);z.trigger(J.type==="click"?"click-row":"dbl-click-row",M,F,K);if(J.type==="click"&&z.options.clickToSelect&&E.clickToSelect){var I=F.find(m('[name="%s"]',z.options.selectItemName));if(I.length){I[0].click()}}});this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(){var H=j(this),G=H.parent().parent(),E=G.data("index"),I=v[E];if(G.next().is("tr.detail-view")){H.find("i").attr("class",m("%s %s",z.options.iconsPrefix,z.options.icons.detailOpen));G.next().remove();z.trigger("collapse-row",E,I)}else{H.find("i").attr("class",m("%s %s",z.options.iconsPrefix,z.options.icons.detailClose));G.after(m(' |
',G.find("td").length));var D=G.next().find("td");var F=q(z.options,z.options.detailFormatter,[E,I,D],"");if(D.length===1){D.append(F)}z.trigger("expand-row",E,I,D)}z.resetView()});this.$selectItem=this.$body.find(m('[name="%s"]',this.options.selectItemName));this.$selectItem.off("click").on("click",function(E){E.stopImmediatePropagation();var F=j(this),D=F.prop("checked"),G=z.data[F.data("index")];if(z.options.maintainSelected&&j(this).is(":radio")){j.each(z.options.data,function(H,I){I[z.header.stateField]=false})}G[z.header.stateField]=D;if(z.options.singleSelect){z.$selectItem.not(this).each(function(){z.data[j(this).data("index")][z.header.stateField]=false});z.$selectItem.filter(":checked").not(this).prop("checked",false)}z.updateSelected();z.trigger(D?"check":"uncheck",G,F)});j.each(this.header.events,function(G,F){if(!F){return}if(typeof F==="string"){F=q(null,F)}var H=z.header.fields[G],D=j.inArray(H,z.getVisibleFields());if(z.options.detailView&&!z.options.cardView){D+=1}for(var E in F){z.$body.find(">tr:not(.no-records-found)").each(function(){var M=j(this),N=M.find(z.options.cardView?".card-view":"td").eq(D),J=E.indexOf(" "),I=E.substring(0,J),K=E.substring(J+1),L=F[E];N.find(K).off(I).on(I,function(Q){var O=M.data("index"),R=z.data[O],P=R[H];L.apply(this,[Q,P,R,O])})})}});this.updateSelected();this.resetView();this.trigger("post-body",v)};e.prototype.initServer=function(r,w,s){var u=this,v={},x={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder},t;if(this.options.pagination){x.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize;x.pageNumber=this.options.pageNumber}if(!(s||this.options.url)&&!this.options.ajax){return}if(this.options.queryParamsType==="limit"){x={search:x.searchText,sort:x.sortName,order:x.sortOrder};if(this.options.pagination){x.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1);x.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize}}if(!(j.isEmptyObject(this.filterColumnsPartial))){x.filter=JSON.stringify(this.filterColumnsPartial,null)}v=q(this.options,this.options.queryParams,[x],v);j.extend(v,w||{});if(v===false){return}if(!r){this.$tableLoading.show()}t=j.extend({},q(null,this.options.ajaxOptions),{type:this.options.method,url:s||this.options.url,data:this.options.contentType==="application/json"&&this.options.method==="post"?JSON.stringify(v):v,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(y){y=q(u.options,u.options.responseHandler,[y],y);u.load(y);u.trigger("load-success",y);if(!r){u.$tableLoading.hide()}},error:function(y){u.trigger("load-error",y.status,y);if(!r){u.$tableLoading.hide()}}});if(this.options.ajax){q(this,this.options.ajax,[t],null)}else{if(this._xhr&&this._xhr.readyState!==4){this._xhr.abort()}this._xhr=j.ajax(t)}};e.prototype.initSearchText=function(){if(this.options.search){if(this.options.searchText!==""){var r=this.$toolbar.find(".search input");r.val(this.options.searchText);this.onSearch({currentTarget:r})}}};e.prototype.getCaret=function(){var r=this;j.each(this.$header.find("th"),function(s,t){j(t).find(".sortable").removeClass("desc asc").addClass(j(t).data("field")===r.options.sortName?r.options.sortOrder:"both")})};e.prototype.updateSelected=function(){var r=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",r);this.$selectItem.each(function(){j(this).closest("tr")[j(this).prop("checked")?"addClass":"removeClass"]("selected")})};e.prototype.updateRows=function(){var r=this;this.$selectItem.each(function(){r.data[j(this).data("index")][r.header.stateField]=j(this).prop("checked")})};e.prototype.resetRows=function(){var r=this;j.each(this.data,function(s,t){r.$selectAll.prop("checked",false);r.$selectItem.prop("checked",false);if(r.header.stateField){t[r.header.stateField]=false}})};e.prototype.trigger=function(s){var r=Array.prototype.slice.call(arguments,1);s+=".bs.table";this.options[e.EVENTS[s]].apply(this.options,r);this.$el.trigger(j.Event(s),r);this.options.onAll(s,r);this.$el.trigger(j.Event("all.bs.table"),[s,r])};e.prototype.resetHeader=function(){clearTimeout(this.timeoutId_);this.timeoutId_=setTimeout(j.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)};e.prototype.fitHeader=function(){var t=this,u,r,x,y;if(t.$el.is(":hidden")){t.timeoutId_=setTimeout(j.proxy(t.fitHeader,t),100);return}u=this.$tableBody.get(0);r=u.scrollWidth>u.clientWidth&&u.scrollHeight>u.clientHeight+this.$header.outerHeight()?a():0;this.$el.css("margin-top",-this.$header.outerHeight());x=j(":focus");if(x.length>0){var z=x.parents("th");if(z.length>0){var A=z.attr("data-field");if(A!==undefined){var s=this.$header.find("[data-field='"+A+"']");if(s.length>0){s.find(":input").addClass("focus-temp")}}}}this.$header_=this.$header.clone(true,true);this.$selectAll_=this.$header_.find('[name="btSelectAll"]');this.$tableHeader.css({"margin-right":r}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_);y=j(".focus-temp:visible:eq(0)");if(y.length>0){y.focus();this.$header.find(".focus-temp").removeClass("focus-temp")}this.$header.find("th[data-field]").each(function(B){t.$header_.find(m('th[data-field="%s"]',j(this).data("field"))).data(j(this).data())});var w=this.getVisibleFields(),v=this.$header_.find("th");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(C){var E=j(this),B=C;if(t.options.detailView&&!t.options.cardView){if(C===0){t.$header_.find("th.detail").find(".fht-cell").width(E.innerWidth())}B=C-1}var D=t.$header_.find(m('th[data-field="%s"]',w[B]));if(D.length>1){D=j(v[E[0].cellIndex])}D.find(".fht-cell").width(E.innerWidth())});this.$tableBody.off("scroll").on("scroll",function(){t.$tableHeader.scrollLeft(j(this).scrollLeft());if(t.options.showFooter&&!t.options.cardView){t.$tableFooter.scrollLeft(j(this).scrollLeft())}});t.trigger("post-header")};e.prototype.resetFooter=function(){var s=this,t=s.getData(),r=[];if(!this.options.showFooter||this.options.cardView){return}if(!this.options.cardView&&this.options.detailView){r.push(' | ')}j.each(this.columns,function(x,z){var w,B="",v="",A=[],y={},u=m(' class="%s"',z["class"]);if(!z.visible){return}if(s.options.cardView&&(!z.cardVisible)){return}B=m("text-align: %s; ",z.falign?z.falign:z.align);v=m("vertical-align: %s; ",z.valign);y=q(null,s.options.footerStyle);if(y&&y.css){for(w in y.css){A.push(w+": "+y.css[w])}}r.push("");r.push(' ');r.push(q(z,z.footerFormatter,[t]," ")||" ");r.push(" ");r.push('');r.push("");r.push(" | ")});this.$tableFooter.find("tr").html(r.join(""));this.$tableFooter.show();clearTimeout(this.timeoutFooter_);this.timeoutFooter_=setTimeout(j.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0)};e.prototype.fitFooter=function(){var u=this,r,t,s;clearTimeout(this.timeoutFooter_);if(this.$el.is(":hidden")){this.timeoutFooter_=setTimeout(j.proxy(this.fitFooter,this),100);return}t=this.$el.css("width");s=t>this.$tableBody.width()?a():0;this.$tableFooter.css({"margin-right":s}).find("table").css("width",t).attr("class",this.$el.attr("class"));r=this.$tableFooter.find("td");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(v){var w=j(this);r.eq(v).find(".fht-cell").width(w.innerWidth())})};e.prototype.toggleColumn=function(r,s,u){if(r===-1){return}this.columns[r].visible=s;this.initHeader();this.initSearch();this.initPagination();this.initBody();if(this.options.showColumns){var t=this.$toolbar.find(".keep-open input").prop("disabled",false);if(u){t.filter(m('[value="%s"]',r)).prop("checked",s)}if(t.filter(":checked").length<=this.options.minimumCountColumns){t.filter(":checked").prop("disabled",true)}}};e.prototype.toggleRow=function(r,t,s){if(r===-1){return}this.$body.find(typeof r!=="undefined"?m('tr[data-index="%s"]',r):m('tr[data-uniqueid="%s"]',t))[s?"show":"hide"]()};e.prototype.getVisibleFields=function(){var s=this,r=[];j.each(this.header.fields,function(t,v){var u=s.columns[i(s.columns,v)];if(!u.visible){return}r.push(v)});return r};e.prototype.resetView=function(u){var s=0;if(u&&u.height){this.options.height=u.height}this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length);if(this.options.height){var t=d(this.$toolbar),v=d(this.$pagination),r=this.options.height-t-v;this.$tableContainer.css("height",r+"px")}if(this.options.cardView){this.$el.css("margin-top","0");this.$tableContainer.css("padding-bottom","0");this.$tableFooter.hide();return}if(this.options.showHeader&&this.options.height){this.$tableHeader.show();this.resetHeader();s+=this.$header.outerHeight()}else{this.$tableHeader.hide();this.trigger("post-header")}if(this.options.showFooter){this.resetFooter();if(this.options.height){s+=this.$tableFooter.outerHeight()+1}}this.getCaret();this.$tableContainer.css("padding-bottom",s+"px");this.trigger("reset-view")};e.prototype.getData=function(r){return(this.searchText||!j.isEmptyObject(this.filterColumns)||!j.isEmptyObject(this.filterColumnsPartial))?(r?this.data.slice(this.pageFrom-1,this.pageTo):this.data):(r?this.options.data.slice(this.pageFrom-1,this.pageTo):this.options.data)};e.prototype.load=function(s){var r=false;if(this.options.sidePagination==="server"){this.options.totalRows=s.total;r=s.fixedScroll;s=s[this.options.dataField]}else{if(!j.isArray(s)){r=s.fixedScroll;s=s.data}}this.initData(s);this.initSearch();this.initPagination();this.initBody(r)};e.prototype.append=function(r){this.initData(r,"append");this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.prepend=function(r){this.initData(r,"prepend");this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.remove=function(u){var r=this.options.data.length,s,t;if(!u.hasOwnProperty("field")||!u.hasOwnProperty("values")){return}for(s=r-1;s>=0;s--){t=this.options.data[s];if(!t.hasOwnProperty(u.field)){continue}if(j.inArray(t[u.field],u.values)!==-1){this.options.data.splice(s,1)}}if(r===this.options.data.length){return}this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.removeAll=function(){if(this.options.data.length>0){this.options.data.splice(0,this.options.data.length);this.initSearch();this.initPagination();this.initBody(true)}};e.prototype.getRowByUniqueId=function(x){var w=this.options.uniqueId,r=this.options.data.length,s=null,t,v,u;for(t=r-1;t>=0;t--){v=this.options.data[t];if(v.hasOwnProperty(w)){u=v[w]}else{if(v._data.hasOwnProperty(w)){u=v._data[w]}else{continue}}if(typeof u==="string"){x=x.toString()}else{if(typeof u==="number"){if((Number(u)===u)&&(u%1===0)){x=parseInt(x)}else{if((u===Number(u))&&(u!==0)){x=parseFloat(x)}}}}if(u===x){s=v;break}}return s};e.prototype.removeByUniqueId=function(t){var r=this.options.data.length,s=this.getRowByUniqueId(t);if(s){this.options.data.splice(this.options.data.indexOf(s),1)}if(r===this.options.data.length){return}this.initSearch();this.initPagination();this.initBody(true)};e.prototype.updateByUniqueId=function(t){var r=this;var s=j.isArray(t)?t:[t];j.each(s,function(u,w){var v;if(!w.hasOwnProperty("id")||!w.hasOwnProperty("row")){return}v=j.inArray(r.getRowByUniqueId(w.id),r.options.data);if(v===-1){return}j.extend(r.options.data[v],w.row)});this.initSearch();this.initSort();this.initBody(true)};e.prototype.insertRow=function(r){if(!r.hasOwnProperty("index")||!r.hasOwnProperty("row")){return}this.data.splice(r.index,0,r.row);this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.updateRow=function(t){var r=this;var s=j.isArray(t)?t:[t];j.each(s,function(u,v){if(!v.hasOwnProperty("index")||!v.hasOwnProperty("row")){return}j.extend(r.options.data[v.index],v.row)});this.initSearch();this.initSort();this.initBody(true)};e.prototype.showRow=function(r){if(!r.hasOwnProperty("index")&&!r.hasOwnProperty("uniqueId")){return}this.toggleRow(r.index,r.uniqueId,true)};e.prototype.hideRow=function(r){if(!r.hasOwnProperty("index")&&!r.hasOwnProperty("uniqueId")){return}this.toggleRow(r.index,r.uniqueId,false)};e.prototype.getRowsHidden=function(r){var t=j(this.$body[0]).children().filter(":hidden"),s=0;if(r){for(;str"),r;if(this.options.detailView&&!this.options.cardView){t+=1}r=x.eq(y).find(">td").eq(t);if(y<0||t<0||y>=this.data.length){return}for(w=y;wtd").eq(v).hide()}}r.attr("rowspan",u).attr("colspan",s).show()};e.prototype.updateCell=function(r){if(!r.hasOwnProperty("index")||!r.hasOwnProperty("field")||!r.hasOwnProperty("value")){return}this.data[r.index][r.field]=r.value;if(r.reinit===false){return}this.initSort();this.initBody(true)};e.prototype.getOptions=function(){return this.options};e.prototype.getSelections=function(){var r=this;return j.grep(this.options.data,function(s){return s[r.header.stateField]})};e.prototype.getAllSelections=function(){var r=this;return j.grep(this.options.data,function(s){return s[r.header.stateField]})};e.prototype.checkAll=function(){this.checkAll_(true)};e.prototype.uncheckAll=function(){this.checkAll_(false)};e.prototype.checkInvert=function(){var s=this;var t=s.$selectItem.filter(":enabled");var r=t.filter(":checked");t.each(function(){j(this).prop("checked",!j(this).prop("checked"))});s.updateRows();s.updateSelected();s.trigger("uncheck-some",r);r=s.getSelections();s.trigger("check-some",r)};e.prototype.checkAll_=function(r){var s;if(!r){s=this.getSelections()}this.$selectAll.add(this.$selectAll_).prop("checked",r);this.$selectItem.filter(":enabled").prop("checked",r);this.updateRows();if(r){s=this.getSelections()}this.trigger(r?"check-all":"uncheck-all",s)};e.prototype.check=function(r){this.check_(true,r)};e.prototype.uncheck=function(r){this.check_(false,r)};e.prototype.check_=function(t,r){var s=this.$selectItem.filter(m('[data-index="%s"]',r)).prop("checked",t);this.data[r][this.header.stateField]=t;this.updateSelected();this.trigger(t?"check":"uncheck",this.data[r],s)};e.prototype.checkBy=function(r){this.checkBy_(true,r)};e.prototype.uncheckBy=function(r){this.checkBy_(false,r)};e.prototype.checkBy_=function(s,u){if(!u.hasOwnProperty("field")||!u.hasOwnProperty("values")){return}var r=this,t=[];j.each(this.options.data,function(v,x){if(!x.hasOwnProperty(u.field)){return false}if(j.inArray(x[u.field],u.values)!==-1){var w=r.$selectItem.filter(":enabled").filter(m('[data-index="%s"]',v)).prop("checked",s);x[r.header.stateField]=s;t.push(x);r.trigger(s?"check":"uncheck",x,w)}});this.updateSelected();this.trigger(s?"check-some":"uncheck-some",t)};e.prototype.destroy=function(){this.$el.insertBefore(this.$container);j(this.options.toolbar).insertBefore(this.$el);this.$container.next().remove();this.$container.remove();this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")};e.prototype.showLoading=function(){this.$tableLoading.show()};e.prototype.hideLoading=function(){this.$tableLoading.hide()};e.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var r=this.$toolbar.find('button[name="paginationSwitch"] i');if(this.options.pagination){r.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown)}else{r.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp)}this.updatePagination()};e.prototype.refresh=function(r){if(r&&r.url){this.options.pageNumber=1}if(selectionIds.length>0){selectionIds=[]}this.initServer(r&&r.silent,r&&r.query,r&&r.url);this.trigger("refresh",r)};e.prototype.resetWidth=function(){if(this.options.showHeader&&this.options.height){this.fitHeader()}if(this.options.showFooter){this.fitFooter()}};e.prototype.showColumn=function(r){this.toggleColumn(i(this.columns,r),true,true)};e.prototype.hideColumn=function(r){this.toggleColumn(i(this.columns,r),false,true)};e.prototype.getHiddenColumns=function(){return j.grep(this.columns,function(r){return !r.visible})};e.prototype.getVisibleColumns=function(){return j.grep(this.columns,function(r){return r.visible})};e.prototype.toggleAllColumns=function(r){j.each(this.columns,function(t,u){this.columns[t].visible=r});this.initHeader();this.initSearch();this.initPagination();this.initBody();if(this.options.showColumns){var s=this.$toolbar.find(".keep-open input").prop("disabled",false);if(s.filter(":checked").length<=this.options.minimumCountColumns){s.filter(":checked").prop("disabled",true)}}};e.prototype.showAllColumns=function(){this.toggleAllColumns(true)};e.prototype.hideAllColumns=function(){this.toggleAllColumns(false)};e.prototype.filterBy=function(r){this.filterColumns=j.isEmptyObject(r)?{}:r;this.options.pageNumber=1;this.initSearch();this.updatePagination()};e.prototype.scrollTo=function(r){if(typeof r==="string"){r=r==="bottom"?this.$tableBody[0].scrollHeight:0}if(typeof r==="number"){this.$tableBody.scrollTop(r)}if(typeof r==="undefined"){return this.$tableBody.scrollTop()}};e.prototype.getScrollPosition=function(){return this.scrollTo()};e.prototype.selectPage=function(r){if(r>0&&r<=this.options.totalPages){this.options.pageNumber=r;this.updatePagination()}};e.prototype.prevPage=function(){if(this.options.pageNumber>1){this.options.pageNumber--;this.updatePagination()}};e.prototype.nextPage=function(){if(this.options.pageNumber tr[data-index="%s"]',r));if(t.next().is("tr.detail-view")===(s?false:true)){t.find("> td > .detail-icon").click()}};e.prototype.expandRow=function(r){this.expandRow_(true,r)};e.prototype.collapseRow=function(r){this.expandRow_(false,r)};e.prototype.expandAllRows=function(r){if(r){var w=this.$body.find(m('> tr[data-index="%s"]',0)),x=this,u=null,v=false,s=-1;if(!w.next().is("tr.detail-view")){w.find("> td > .detail-icon").click();v=true}else{if(!w.next().next().is("tr.detail-view")){w.next().find(".detail-icon").click();v=true}}if(v){try{s=setInterval(function(){u=x.$body.find("tr.detail-view").last().find(".detail-icon");if(u.length>0){u.click()}else{clearInterval(s)}},1)}catch(z){clearInterval(s)}}}else{var y=this.$body.children();for(var t=0;t',
+ '',
+ ''].join(''));
+
+
+ this.$fixedBody.find('table').attr('class', this.$el.attr('class'));
+ this.$fixedHeaderColumns = this.$fixedBody.find('thead');
+ this.$fixedBodyColumns = this.$fixedBody.find('tbody');
+ this.$tableBody.before(this.$fixedBody);
+ }
+ if (this.options.rightFixedColumns) {
+ this.$rightfixedBody = $([
+ ''].join(''));
+
+ this.$rightfixedBody.find('table').attr('class', this.$el.attr('class'));
+ this.$rightfixedHeaderColumns = this.$rightfixedBody.find('thead');
+ this.$rightfixedBodyColumns = this.$rightfixedBody.find('tbody');
+ this.$tableBody.before(this.$rightfixedBody);
+ }
+ };
+
+ BootstrapTable.prototype.initHeader = function () {
+ _initHeader.apply(this, Array.prototype.slice.apply(arguments));
+
+ if (!this.options.fixedColumns && !this.options.rightFixedColumns){
+ return;
+ }
+ this.initFixedColumns();
+
+ var $ltr = this.$header.find('tr:eq(0)').clone(),
+ $rtr = this.$header.find('tr:eq(0)').clone(),
+ $lths = $ltr.clone().find('th'),
+ $rths = $rtr.clone().find('th');
+
+ $ltr.html('');
+ $rtr.html('');
+ //右边列冻结
+ if (this.options.rightFixedColumns) {
+ for (var i = 0; i < this.options.rightFixedNumber; i++) {
+ $rtr.append($rths.eq($rths.length - this.options.rightFixedNumber + i).clone());
+ }
+ this.$rightfixedHeaderColumns.html('').append($rtr);
+ }
+
+ //左边列冻结
+ if (this.options.fixedColumns) {
+ for (var i = 0; i < this.options.fixedNumber; i++) {
+ $ltr.append($lths.eq(i).clone());
+ }
+ this.$fixedHeaderColumns.html('').append($ltr);
+ }
+ };
+
+ BootstrapTable.prototype.initBody = function () {
+ _initBody.apply(this, Array.prototype.slice.apply(arguments));
+
+ if (!this.options.fixedColumns && !this.options.rightFixedColumns) {
+ return;
+ }
+
+ var that = this;
+ if (this.options.fixedColumns) {
+ this.$fixedBodyColumns.html('');
+ this.$body.find('> tr[data-index]').each(function () {
+ var $tr = $(this).clone(),
+ $tds = $tr.clone().find('td');
+
+ $tr.html('');
+ for (var i = 0; i < that.options.fixedNumber; i++) {
+ $tr.append($tds.eq(i).clone());
+ }
+ that.$fixedBodyColumns.append($tr);
+ });
+ }
+ if (this.options.rightFixedColumns) {
+ this.$rightfixedBodyColumns.html('');
+ this.$body.find('> tr[data-index]').each(function () {
+ var $tr = $(this).clone(),
+ $tds = $tr.clone().find('td');
+
+ $tr.html('');
+ for (var i = 0; i < that.options.rightFixedNumber; i++) {
+ var indexTd = $tds.length - that.options.rightFixedNumber + i;
+ var oldTd = $tds.eq(indexTd);
+ var fixTd = oldTd.clone();
+ var buttons = fixTd.find('button');
+ //事件转移:冻结列里面的事件转移到实际按钮的事件
+ buttons.each(function (key, item) {
+ $(item).click(function () {
+ that.$body.find("tr[data-index=" + $tr.attr('data-index') + "] td:eq(" + indexTd + ") button:eq(" + key + ")").click();
+ });
+ });
+ $tr.append(fixTd);
+ }
+ that.$rightfixedBodyColumns.append($tr);
+ });
+ }
+ };
+
+ BootstrapTable.prototype.resetView = function () {
+ _resetView.apply(this, Array.prototype.slice.apply(arguments));
+
+ if (!this.options.fixedColumns && !this.options.rightFixedColumns) {
+ return;
+ }
+
+ clearTimeout(this.timeoutHeaderColumns_);
+ this.timeoutHeaderColumns_ = setTimeout($.proxy(this.fitHeaderColumns, this), this.$el.is(':hidden') ? 100 : 0);
+
+ clearTimeout(this.timeoutBodyColumns_);
+ this.timeoutBodyColumns_ = setTimeout($.proxy(this.fitBodyColumns, this), this.$el.is(':hidden') ? 100 : 0);
+ };
+
+ BootstrapTable.prototype.fitHeaderColumns = function () {
+ var that = this,
+ visibleFields = this.getVisibleFields(),
+ headerWidth = 0;
+ if (that.options.fixedColumns) {
+ this.$body.find('tr:first-child:not(.no-records-found) > *').each(function (i) {
+ var $this = $(this),
+ index = i;
+
+ if (i >= that.options.fixedNumber) {
+ return false;
+ }
+
+ if (that.options.detailView && !that.options.cardView) {
+ index = i - 1;
+ }
+
+ that.$fixedBody.find('thead th[data-field="' + visibleFields[index] + '"]')
+ .find('.fht-cell').width($this.innerWidth() - 1);
+ headerWidth += $this.outerWidth();
+ });
+ this.$fixedBody.width(headerWidth - 1).show();
+ }
+ if (that.options.rightFixedColumns) {
+ this.$body.find('tr:first-child:not(.no-records-found) > *').each(function (i) {
+ var $this = $(this),
+ index = i;
+
+ if (i >= visibleFields.length - that.options.rightFixedNumber) {
+ return false;
+
+
+ if (that.options.detailView && !that.options.cardView) {
+ index = i - 1;
+ }
+ that.$rightfixedBody.find('thead th[data-field="' + visibleFields[index] + '"]')
+ .find('.fht-cell').width($this.innerWidth() - 1);
+ headerWidth += $this.outerWidth();
+ }
+ });
+ this.$rightfixedBody.width(headerWidth - 1).show();
+ }
+ };
+
+ BootstrapTable.prototype.fitBodyColumns = function () {
+ var that = this,
+ top = -(parseInt(this.$el.css('margin-top')) - 2),
+ height = this.$tableBody.height() - 2;
+
+ if (that.options.fixedColumns) {
+ if (!this.$body.find('> tr[data-index]').length) {
+ this.$fixedBody.hide();
+ return;
+ }
+
+ this.$body.find('> tr').each(function (i) {
+ that.$fixedBody.find('tbody tr:eq(' + i + ')').height($(this).height());
+ });
+
+ //// events
+ this.$tableBody.on('scroll', function () {
+ that.$fixedBody.find('table').css('top', -$(this).scrollTop());
+ });
+ this.$body.find('> tr[data-index]').off('hover').hover(function () {
+ var index = $(this).data('index');
+ that.$fixedBody.find('tr[data-index="' + index + '"]').addClass('hover');
+ }, function () {
+ var index = $(this).data('index');
+ that.$fixedBody.find('tr[data-index="' + index + '"]').removeClass('hover');
+ });
+ this.$fixedBody.find('tr[data-index]').off('hover').hover(function () {
+ var index = $(this).data('index');
+ that.$body.find('tr[data-index="' + index + '"]').addClass('hover');
+ }, function () {
+ var index = $(this).data('index');
+ that.$body.find('> tr[data-index="' + index + '"]').removeClass('hover');
+ });
+ }
+ if (that.options.rightFixedColumns) {
+ if (!this.$body.find('> tr[data-index]').length) {
+ this.$rightfixedBody.hide();
+ return;
+ }
+
+ this.$body.find('> tr').each(function (i) {
+ that.$rightfixedBody.find('tbody tr:eq(' + i + ')').height($(this).height());
+ });
+
+ //// events
+ this.$tableBody.on('scroll', function () {
+ that.$rightfixedBody.find('table').css('top', -$(this).scrollTop());
+ });
+ this.$body.find('> tr[data-index]').off('hover').hover(function () {
+ var index = $(this).data('index');
+ that.$rightfixedBody.find('tr[data-index="' + index + '"]').addClass('hover');
+ }, function () {
+ var index = $(this).data('index');
+ that.$rightfixedBody.find('tr[data-index="' + index + '"]').removeClass('hover');
+ });
+ this.$rightfixedBody.find('tr[data-index]').off('hover').hover(function () {
+ var index = $(this).data('index');
+ that.$body.find('tr[data-index="' + index + '"]').addClass('hover');
+ }, function () {
+ var index = $(this).data('index');
+ that.$body.find('> tr[data-index="' + index + '"]').removeClass('hover');
+ });
+ }
+ };
+
+})(jQuery);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js
index 2376f9444..ee98b198b 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js
@@ -15,7 +15,7 @@
// 判断是否 iphone
var isIPhone = function () {
- let browserName = navigator.userAgent.toLowerCase();
+ var browserName = navigator.userAgent.toLowerCase();
return /(iPhone|iPad|iPod|iOS)/i.test(browserName);
};
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.css b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.css
deleted file mode 100644
index 85b40c788..000000000
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.css
+++ /dev/null
@@ -1,14 +0,0 @@
-.bootstrap-tree-table .treetable-indent {width:16px; height: 16px; display: inline-block; position: relative;}
-.bootstrap-tree-table .treetable-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;}
-.bootstrap-tree-table .treetable-selected{background: #f5f5f5 !important;}
-.bootstrap-tree-table .treetable-table{border:0 !important;margin-bottom:0}
-.bootstrap-tree-table .treetable-table tbody {display:block;height:auto;overflow-y:auto;}
-.bootstrap-tree-table .treetable-table thead, .treetable-table tbody tr {display:table;width:100%;table-layout:fixed;}
-.bootstrap-tree-table .treetable-thead th{line-height:24px;border: 0 !important;border-radius: 4px;border-left:0px solid #e7eaec !important;border-bottom:1px solid #ccc!important;text-align: left;}
-.bootstrap-tree-table .treetable-thead tr :first-child{border-left:0 !important}
-.bootstrap-tree-table .treetable-tbody td{border: 0 !important;border-left:0px solid #e7eaec !important;border-bottom:1px solid #e7eaec!important;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
-.bootstrap-tree-table .treetable-tbody tr :first-child{border-left:0 !important}
-.bootstrap-tree-table .treetable-bars .tool-left, .bootstrap-tree-table .treetable-bars .tool-right{margin-top: 10px; margin-bottom: 10px;}
-.bootstrap-tree-table .treetable-bars .tool-left{float: left;}
-.bootstrap-tree-table .treetable-bars .tool-right{float: right;}
-.bootstrap-tree-table .treetable-bars .columns li label{display: block;padding: 3px 20px;clear: both;font-weight: 400;line-height: 1.428571429;max-width: 100%;margin-bottom: 5px;cursor:pointer;}
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.js b/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.js
index b25091e96..4e3891e96 100644
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.js
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.js
@@ -123,6 +123,7 @@
$(window).bind('mouseup', imgMouseUp);
el.bind('mousewheel DOMMouseScroll', zoomImage);
};
+ obj.image.crossOrigin = 'Anonymous';
obj.image.src = options.imgSrc;
el.on('remove', function(){$(window).unbind('mouseup', imgMouseUp)});
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datepicker.js b/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datepicker.js
deleted file mode 100644
index 053b510d0..000000000
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datepicker.js
+++ /dev/null
@@ -1,1671 +0,0 @@
-/* =========================================================
- * bootstrap-datepicker.js
- * Repo: https://github.com/eternicode/bootstrap-datepicker/
- * Demo: http://eternicode.github.io/bootstrap-datepicker/
- * Docs: http://bootstrap-datepicker.readthedocs.org/
- * Forked from http://www.eyecon.ro/bootstrap-datepicker
- * =========================================================
- * Started by Stefan Petre; improvements by Andrew Rowls + contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================= */
-
-(function($, undefined){
-
- var $window = $(window);
-
- function UTCDate(){
- return new Date(Date.UTC.apply(Date, arguments));
- }
- function UTCToday(){
- var today = new Date();
- return UTCDate(today.getFullYear(), today.getMonth(), today.getDate());
- }
- function alias(method){
- return function(){
- return this[method].apply(this, arguments);
- };
- }
-
- var DateArray = (function(){
- var extras = {
- get: function(i){
- return this.slice(i)[0];
- },
- contains: function(d){
- // Array.indexOf is not cross-browser;
- // $.inArray doesn't work with Dates
- var val = d && d.valueOf();
- for (var i=0, l=this.length; i < l; i++)
- if (this[i].valueOf() === val)
- return i;
- return -1;
- },
- remove: function(i){
- this.splice(i,1);
- },
- replace: function(new_array){
- if (!new_array)
- return;
- if (!$.isArray(new_array))
- new_array = [new_array];
- this.clear();
- this.push.apply(this, new_array);
- },
- clear: function(){
- this.splice(0);
- },
- copy: function(){
- var a = new DateArray();
- a.replace(this);
- return a;
- }
- };
-
- return function(){
- var a = [];
- a.push.apply(a, arguments);
- $.extend(a, extras);
- return a;
- };
- })();
-
-
- // Picker object
-
- var Datepicker = function(element, options){
- this.dates = new DateArray();
- this.viewDate = UTCToday();
- this.focusDate = null;
-
- this._process_options(options);
-
- this.element = $(element);
- this.isInline = false;
- this.isInput = this.element.is('input');
- this.component = this.element.is('.date') ? this.element.find('.add-on, .input-group-addon, .btn') : false;
- this.hasInput = this.component && this.element.find('input').length;
- if (this.component && this.component.length === 0)
- this.component = false;
-
- this.picker = $(DPGlobal.template);
- this._buildEvents();
- this._attachEvents();
-
- if (this.isInline){
- this.picker.addClass('datepicker-inline').appendTo(this.element);
- }
- else {
- this.picker.addClass('datepicker-dropdown dropdown-menu');
- }
-
- if (this.o.rtl){
- this.picker.addClass('datepicker-rtl');
- }
-
- this.viewMode = this.o.startView;
-
- if (this.o.calendarWeeks)
- this.picker.find('tfoot th.today')
- .attr('colspan', function(i, val){
- return parseInt(val) + 1;
- });
-
- this._allow_update = false;
-
- this.setStartDate(this._o.startDate);
- this.setEndDate(this._o.endDate);
- this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled);
-
- this.fillDow();
- this.fillMonths();
-
- this._allow_update = true;
-
- this.update();
- this.showMode();
-
- if (this.isInline){
- this.show();
- }
- };
-
- Datepicker.prototype = {
- constructor: Datepicker,
-
- _process_options: function(opts){
- // Store raw options for reference
- this._o = $.extend({}, this._o, opts);
- // Processed options
- var o = this.o = $.extend({}, this._o);
-
- // Check if "de-DE" style date is available, if not language should
- // fallback to 2 letter code eg "de"
- var lang = o.language;
- if (!dates[lang]){
- lang = lang.split('-')[0];
- if (!dates[lang])
- lang = defaults.language;
- }
- o.language = lang;
-
- switch (o.startView){
- case 2:
- case 'decade':
- o.startView = 2;
- break;
- case 1:
- case 'year':
- o.startView = 1;
- break;
- default:
- o.startView = 0;
- }
-
- switch (o.minViewMode){
- case 1:
- case 'months':
- o.minViewMode = 1;
- break;
- case 2:
- case 'years':
- o.minViewMode = 2;
- break;
- default:
- o.minViewMode = 0;
- }
-
- o.startView = Math.max(o.startView, o.minViewMode);
-
- // true, false, or Number > 0
- if (o.multidate !== true){
- o.multidate = Number(o.multidate) || false;
- if (o.multidate !== false)
- o.multidate = Math.max(0, o.multidate);
- else
- o.multidate = 1;
- }
- o.multidateSeparator = String(o.multidateSeparator);
-
- o.weekStart %= 7;
- o.weekEnd = ((o.weekStart + 6) % 7);
-
- var format = DPGlobal.parseFormat(o.format);
- if (o.startDate !== -Infinity){
- if (!!o.startDate){
- if (o.startDate instanceof Date)
- o.startDate = this._local_to_utc(this._zero_time(o.startDate));
- else
- o.startDate = DPGlobal.parseDate(o.startDate, format, o.language);
- }
- else {
- o.startDate = -Infinity;
- }
- }
- if (o.endDate !== Infinity){
- if (!!o.endDate){
- if (o.endDate instanceof Date)
- o.endDate = this._local_to_utc(this._zero_time(o.endDate));
- else
- o.endDate = DPGlobal.parseDate(o.endDate, format, o.language);
- }
- else {
- o.endDate = Infinity;
- }
- }
-
- o.daysOfWeekDisabled = o.daysOfWeekDisabled||[];
- if (!$.isArray(o.daysOfWeekDisabled))
- o.daysOfWeekDisabled = o.daysOfWeekDisabled.split(/[,\s]*/);
- o.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function(d){
- return parseInt(d, 10);
- });
-
- var plc = String(o.orientation).toLowerCase().split(/\s+/g),
- _plc = o.orientation.toLowerCase();
- plc = $.grep(plc, function(word){
- return (/^auto|left|right|top|bottom$/).test(word);
- });
- o.orientation = {x: 'auto', y: 'auto'};
- if (!_plc || _plc === 'auto')
- ; // no action
- else if (plc.length === 1){
- switch (plc[0]){
- case 'top':
- case 'bottom':
- o.orientation.y = plc[0];
- break;
- case 'left':
- case 'right':
- o.orientation.x = plc[0];
- break;
- }
- }
- else {
- _plc = $.grep(plc, function(word){
- return (/^left|right$/).test(word);
- });
- o.orientation.x = _plc[0] || 'auto';
-
- _plc = $.grep(plc, function(word){
- return (/^top|bottom$/).test(word);
- });
- o.orientation.y = _plc[0] || 'auto';
- }
- },
- _events: [],
- _secondaryEvents: [],
- _applyEvents: function(evs){
- for (var i=0, el, ch, ev; i < evs.length; i++){
- el = evs[i][0];
- if (evs[i].length === 2){
- ch = undefined;
- ev = evs[i][1];
- }
- else if (evs[i].length === 3){
- ch = evs[i][1];
- ev = evs[i][2];
- }
- el.on(ev, ch);
- }
- },
- _unapplyEvents: function(evs){
- for (var i=0, el, ev, ch; i < evs.length; i++){
- el = evs[i][0];
- if (evs[i].length === 2){
- ch = undefined;
- ev = evs[i][1];
- }
- else if (evs[i].length === 3){
- ch = evs[i][1];
- ev = evs[i][2];
- }
- el.off(ev, ch);
- }
- },
- _buildEvents: function(){
- if (this.isInput){ // single input
- this._events = [
- [this.element, {
- focus: $.proxy(this.show, this),
- keyup: $.proxy(function(e){
- if ($.inArray(e.keyCode, [27,37,39,38,40,32,13,9]) === -1)
- this.update();
- }, this),
- keydown: $.proxy(this.keydown, this)
- }]
- ];
- }
- else if (this.component && this.hasInput){ // component: input + button
- this._events = [
- // For components that are not readonly, allow keyboard nav
- [this.element.find('input'), {
- focus: $.proxy(this.show, this),
- keyup: $.proxy(function(e){
- if ($.inArray(e.keyCode, [27,37,39,38,40,32,13,9]) === -1)
- this.update();
- }, this),
- keydown: $.proxy(this.keydown, this)
- }],
- [this.component, {
- click: $.proxy(this.show, this)
- }]
- ];
- }
- else if (this.element.is('div')){ // inline datepicker
- this.isInline = true;
- }
- else {
- this._events = [
- [this.element, {
- click: $.proxy(this.show, this)
- }]
- ];
- }
- this._events.push(
- // Component: listen for blur on element descendants
- [this.element, '*', {
- blur: $.proxy(function(e){
- this._focused_from = e.target;
- }, this)
- }],
- // Input: listen for blur on element
- [this.element, {
- blur: $.proxy(function(e){
- this._focused_from = e.target;
- }, this)
- }]
- );
-
- this._secondaryEvents = [
- [this.picker, {
- click: $.proxy(this.click, this)
- }],
- [$(window), {
- resize: $.proxy(this.place, this)
- }],
- [$(document), {
- 'mousedown touchstart': $.proxy(function(e){
- // Clicked outside the datepicker, hide it
- if (!(
- this.element.is(e.target) ||
- this.element.find(e.target).length ||
- this.picker.is(e.target) ||
- this.picker.find(e.target).length
- )){
- this.hide();
- }
- }, this)
- }]
- ];
- },
- _attachEvents: function(){
- this._detachEvents();
- this._applyEvents(this._events);
- },
- _detachEvents: function(){
- this._unapplyEvents(this._events);
- },
- _attachSecondaryEvents: function(){
- this._detachSecondaryEvents();
- this._applyEvents(this._secondaryEvents);
- },
- _detachSecondaryEvents: function(){
- this._unapplyEvents(this._secondaryEvents);
- },
- _trigger: function(event, altdate){
- var date = altdate || this.dates.get(-1),
- local_date = this._utc_to_local(date);
-
- this.element.trigger({
- type: event,
- date: local_date,
- dates: $.map(this.dates, this._utc_to_local),
- format: $.proxy(function(ix, format){
- if (arguments.length === 0){
- ix = this.dates.length - 1;
- format = this.o.format;
- }
- else if (typeof ix === 'string'){
- format = ix;
- ix = this.dates.length - 1;
- }
- format = format || this.o.format;
- var date = this.dates.get(ix);
- return DPGlobal.formatDate(date, format, this.o.language);
- }, this)
- });
- },
-
- show: function(){
- if (!this.isInline)
- this.picker.appendTo('body');
- this.picker.show();
- this.place();
- this._attachSecondaryEvents();
- this._trigger('show');
- },
-
- hide: function(){
- if (this.isInline)
- return;
- if (!this.picker.is(':visible'))
- return;
- this.focusDate = null;
- this.picker.hide().detach();
- this._detachSecondaryEvents();
- this.viewMode = this.o.startView;
- this.showMode();
-
- if (
- this.o.forceParse &&
- (
- this.isInput && this.element.val() ||
- this.hasInput && this.element.find('input').val()
- )
- )
- this.setValue();
- this._trigger('hide');
- },
-
- remove: function(){
- this.hide();
- this._detachEvents();
- this._detachSecondaryEvents();
- this.picker.remove();
- delete this.element.data().datepicker;
- if (!this.isInput){
- delete this.element.data().date;
- }
- },
-
- _utc_to_local: function(utc){
- return utc && new Date(utc.getTime() + (utc.getTimezoneOffset()*60000));
- },
- _local_to_utc: function(local){
- return local && new Date(local.getTime() - (local.getTimezoneOffset()*60000));
- },
- _zero_time: function(local){
- return local && new Date(local.getFullYear(), local.getMonth(), local.getDate());
- },
- _zero_utc_time: function(utc){
- return utc && new Date(Date.UTC(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate()));
- },
-
- getDates: function(){
- return $.map(this.dates, this._utc_to_local);
- },
-
- getUTCDates: function(){
- return $.map(this.dates, function(d){
- return new Date(d);
- });
- },
-
- getDate: function(){
- return this._utc_to_local(this.getUTCDate());
- },
-
- getUTCDate: function(){
- return new Date(this.dates.get(-1));
- },
-
- setDates: function(){
- var args = $.isArray(arguments[0]) ? arguments[0] : arguments;
- this.update.apply(this, args);
- this._trigger('changeDate');
- this.setValue();
- },
-
- setUTCDates: function(){
- var args = $.isArray(arguments[0]) ? arguments[0] : arguments;
- this.update.apply(this, $.map(args, this._utc_to_local));
- this._trigger('changeDate');
- this.setValue();
- },
-
- setDate: alias('setDates'),
- setUTCDate: alias('setUTCDates'),
-
- setValue: function(){
- var formatted = this.getFormattedDate();
- if (!this.isInput){
- if (this.component){
- this.element.find('input').val(formatted).change();
- }
- }
- else {
- this.element.val(formatted).change();
- }
- },
-
- getFormattedDate: function(format){
- if (format === undefined)
- format = this.o.format;
-
- var lang = this.o.language;
- return $.map(this.dates, function(d){
- return DPGlobal.formatDate(d, format, lang);
- }).join(this.o.multidateSeparator);
- },
-
- setStartDate: function(startDate){
- this._process_options({startDate: startDate});
- this.update();
- this.updateNavArrows();
- },
-
- setEndDate: function(endDate){
- this._process_options({endDate: endDate});
- this.update();
- this.updateNavArrows();
- },
-
- setDaysOfWeekDisabled: function(daysOfWeekDisabled){
- this._process_options({daysOfWeekDisabled: daysOfWeekDisabled});
- this.update();
- this.updateNavArrows();
- },
-
- place: function(){
- if (this.isInline)
- return;
- var calendarWidth = this.picker.outerWidth(),
- calendarHeight = this.picker.outerHeight(),
- visualPadding = 10,
- windowWidth = $window.width(),
- windowHeight = $window.height(),
- scrollTop = $window.scrollTop();
-
- var zIndex = parseInt(this.element.parents().filter(function(){
- return $(this).css('z-index') !== 'auto';
- }).first().css('z-index'))+10;
- var offset = this.component ? this.component.parent().offset() : this.element.offset();
- var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(false);
- var width = this.component ? this.component.outerWidth(true) : this.element.outerWidth(false);
- var left = offset.left,
- top = offset.top;
-
- this.picker.removeClass(
- 'datepicker-orient-top datepicker-orient-bottom '+
- 'datepicker-orient-right datepicker-orient-left'
- );
-
- if (this.o.orientation.x !== 'auto'){
- this.picker.addClass('datepicker-orient-' + this.o.orientation.x);
- if (this.o.orientation.x === 'right')
- left -= calendarWidth - width;
- }
- // auto x orientation is best-placement: if it crosses a window
- // edge, fudge it sideways
- else {
- // Default to left
- this.picker.addClass('datepicker-orient-left');
- if (offset.left < 0)
- left -= offset.left - visualPadding;
- else if (offset.left + calendarWidth > windowWidth)
- left = windowWidth - calendarWidth - visualPadding;
- }
-
- // auto y orientation is best-situation: top or bottom, no fudging,
- // decision based on which shows more of the calendar
- var yorient = this.o.orientation.y,
- top_overflow, bottom_overflow;
- if (yorient === 'auto'){
- top_overflow = -scrollTop + offset.top - calendarHeight;
- bottom_overflow = scrollTop + windowHeight - (offset.top + height + calendarHeight);
- if (Math.max(top_overflow, bottom_overflow) === bottom_overflow)
- yorient = 'top';
- else
- yorient = 'bottom';
- }
- this.picker.addClass('datepicker-orient-' + yorient);
- if (yorient === 'top')
- top += height;
- else
- top -= calendarHeight + parseInt(this.picker.css('padding-top'));
-
- this.picker.css({
- top: top,
- left: left,
- zIndex: zIndex
- });
- },
-
- _allow_update: true,
- update: function(){
- if (!this._allow_update)
- return;
-
- var oldDates = this.dates.copy(),
- dates = [],
- fromArgs = false;
- if (arguments.length){
- $.each(arguments, $.proxy(function(i, date){
- if (date instanceof Date)
- date = this._local_to_utc(date);
- dates.push(date);
- }, this));
- fromArgs = true;
- }
- else {
- dates = this.isInput
- ? this.element.val()
- : this.element.data('date') || this.element.find('input').val();
- if (dates && this.o.multidate)
- dates = dates.split(this.o.multidateSeparator);
- else
- dates = [dates];
- delete this.element.data().date;
- }
-
- dates = $.map(dates, $.proxy(function(date){
- return DPGlobal.parseDate(date, this.o.format, this.o.language);
- }, this));
- dates = $.grep(dates, $.proxy(function(date){
- return (
- date < this.o.startDate ||
- date > this.o.endDate ||
- !date
- );
- }, this), true);
- this.dates.replace(dates);
-
- if (this.dates.length)
- this.viewDate = new Date(this.dates.get(-1));
- else if (this.viewDate < this.o.startDate)
- this.viewDate = new Date(this.o.startDate);
- else if (this.viewDate > this.o.endDate)
- this.viewDate = new Date(this.o.endDate);
-
- if (fromArgs){
- // setting date by clicking
- this.setValue();
- }
- else if (dates.length){
- // setting date by typing
- if (String(oldDates) !== String(this.dates))
- this._trigger('changeDate');
- }
- if (!this.dates.length && oldDates.length)
- this._trigger('clearDate');
-
- this.fill();
- },
-
- fillDow: function(){
- var dowCnt = this.o.weekStart,
- html = '';
- if (this.o.calendarWeeks){
- var cell = '| | ';
- html += cell;
- this.picker.find('.datepicker-days thead tr:first-child').prepend(cell);
- }
- while (dowCnt < this.o.weekStart + 7){
- html += ''+dates[this.o.language].daysMin[(dowCnt++)%7]+' | ';
- }
- html += '
';
- this.picker.find('.datepicker-days thead').append(html);
- },
-
- fillMonths: function(){
- var html = '',
- i = 0;
- while (i < 12){
- html += ''+dates[this.o.language].monthsShort[i++]+'';
- }
- this.picker.find('.datepicker-months td').html(html);
- },
-
- setRange: function(range){
- if (!range || !range.length)
- delete this.range;
- else
- this.range = $.map(range, function(d){
- return d.valueOf();
- });
- this.fill();
- },
-
- getClassNames: function(date){
- var cls = [],
- year = this.viewDate.getUTCFullYear(),
- month = this.viewDate.getUTCMonth(),
- today = new Date();
- if (date.getUTCFullYear() < year || (date.getUTCFullYear() === year && date.getUTCMonth() < month)){
- cls.push('old');
- }
- else if (date.getUTCFullYear() > year || (date.getUTCFullYear() === year && date.getUTCMonth() > month)){
- cls.push('new');
- }
- if (this.focusDate && date.valueOf() === this.focusDate.valueOf())
- cls.push('focused');
- // Compare internal UTC date with local today, not UTC today
- if (this.o.todayHighlight &&
- date.getUTCFullYear() === today.getFullYear() &&
- date.getUTCMonth() === today.getMonth() &&
- date.getUTCDate() === today.getDate()){
- cls.push('today');
- }
- if (this.dates.contains(date) !== -1)
- cls.push('active');
- if (date.valueOf() < this.o.startDate || date.valueOf() > this.o.endDate ||
- $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1){
- cls.push('disabled');
- }
- if (this.range){
- if (date > this.range[0] && date < this.range[this.range.length-1]){
- cls.push('range');
- }
- if ($.inArray(date.valueOf(), this.range) !== -1){
- cls.push('selected');
- }
- }
- return cls;
- },
-
- fill: function(){
- var d = new Date(this.viewDate),
- year = d.getUTCFullYear(),
- month = d.getUTCMonth(),
- startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity,
- startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity,
- endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity,
- endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity,
- todaytxt = dates[this.o.language].today || dates['en'].today || '',
- cleartxt = dates[this.o.language].clear || dates['en'].clear || '',
- tooltip;
- this.picker.find('.datepicker-days thead th.datepicker-switch')
- .text(dates[this.o.language].months[month]+' '+year);
- this.picker.find('tfoot th.today')
- .text(todaytxt)
- .toggle(this.o.todayBtn !== false);
- this.picker.find('tfoot th.clear')
- .text(cleartxt)
- .toggle(this.o.clearBtn !== false);
- this.updateNavArrows();
- this.fillMonths();
- var prevMonth = UTCDate(year, month-1, 28),
- day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth());
- prevMonth.setUTCDate(day);
- prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7);
- var nextMonth = new Date(prevMonth);
- nextMonth.setUTCDate(nextMonth.getUTCDate() + 42);
- nextMonth = nextMonth.valueOf();
- var html = [];
- var clsName;
- while (prevMonth.valueOf() < nextMonth){
- if (prevMonth.getUTCDay() === this.o.weekStart){
- html.push('');
- if (this.o.calendarWeeks){
- // ISO 8601: First week contains first thursday.
- // ISO also states week starts on Monday, but we can be more abstract here.
- var
- // Start of current week: based on weekstart/current date
- ws = new Date(+prevMonth + (this.o.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5),
- // Thursday of this week
- th = new Date(Number(ws) + (7 + 4 - ws.getUTCDay()) % 7 * 864e5),
- // First Thursday of year, year from thursday
- yth = new Date(Number(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5),
- // Calendar week: ms between thursdays, div ms per day, div 7 days
- calWeek = (th - yth) / 864e5 / 7 + 1;
- html.push('| '+ calWeek +' | ');
-
- }
- }
- clsName = this.getClassNames(prevMonth);
- clsName.push('day');
-
- if (this.o.beforeShowDay !== $.noop){
- var before = this.o.beforeShowDay(this._utc_to_local(prevMonth));
- if (before === undefined)
- before = {};
- else if (typeof(before) === 'boolean')
- before = {enabled: before};
- else if (typeof(before) === 'string')
- before = {classes: before};
- if (before.enabled === false)
- clsName.push('disabled');
- if (before.classes)
- clsName = clsName.concat(before.classes.split(/\s+/));
- if (before.tooltip)
- tooltip = before.tooltip;
- }
-
- clsName = $.unique(clsName);
- html.push(''+prevMonth.getUTCDate() + ' | ');
- if (prevMonth.getUTCDay() === this.o.weekEnd){
- html.push('
');
- }
- prevMonth.setUTCDate(prevMonth.getUTCDate()+1);
- }
- this.picker.find('.datepicker-days tbody').empty().append(html.join(''));
-
- var months = this.picker.find('.datepicker-months')
- .find('th:eq(1)')
- .text(year)
- .end()
- .find('span').removeClass('active');
-
- $.each(this.dates, function(i, d){
- if (d.getUTCFullYear() === year)
- months.eq(d.getUTCMonth()).addClass('active');
- });
-
- if (year < startYear || year > endYear){
- months.addClass('disabled');
- }
- if (year === startYear){
- months.slice(0, startMonth).addClass('disabled');
- }
- if (year === endYear){
- months.slice(endMonth+1).addClass('disabled');
- }
-
- html = '';
- year = parseInt(year/10, 10) * 10;
- var yearCont = this.picker.find('.datepicker-years')
- .find('th:eq(1)')
- .text(year + '-' + (year + 9))
- .end()
- .find('td');
- year -= 1;
- var years = $.map(this.dates, function(d){
- return d.getUTCFullYear();
- }),
- classes;
- for (var i = -1; i < 11; i++){
- classes = ['year'];
- if (i === -1)
- classes.push('old');
- else if (i === 10)
- classes.push('new');
- if ($.inArray(year, years) !== -1)
- classes.push('active');
- if (year < startYear || year > endYear)
- classes.push('disabled');
- html += ''+year+'';
- year += 1;
- }
- yearCont.html(html);
- },
-
- updateNavArrows: function(){
- if (!this._allow_update)
- return;
-
- var d = new Date(this.viewDate),
- year = d.getUTCFullYear(),
- month = d.getUTCMonth();
- switch (this.viewMode){
- case 0:
- if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth()){
- this.picker.find('.prev').css({visibility: 'hidden'});
- }
- else {
- this.picker.find('.prev').css({visibility: 'visible'});
- }
- if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth()){
- this.picker.find('.next').css({visibility: 'hidden'});
- }
- else {
- this.picker.find('.next').css({visibility: 'visible'});
- }
- break;
- case 1:
- case 2:
- if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear()){
- this.picker.find('.prev').css({visibility: 'hidden'});
- }
- else {
- this.picker.find('.prev').css({visibility: 'visible'});
- }
- if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear()){
- this.picker.find('.next').css({visibility: 'hidden'});
- }
- else {
- this.picker.find('.next').css({visibility: 'visible'});
- }
- break;
- }
- },
-
- click: function(e){
- e.preventDefault();
- var target = $(e.target).closest('span, td, th'),
- year, month, day;
- if (target.length === 1){
- switch (target[0].nodeName.toLowerCase()){
- case 'th':
- switch (target[0].className){
- case 'datepicker-switch':
- this.showMode(1);
- break;
- case 'prev':
- case 'next':
- var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1);
- switch (this.viewMode){
- case 0:
- this.viewDate = this.moveMonth(this.viewDate, dir);
- this._trigger('changeMonth', this.viewDate);
- break;
- case 1:
- case 2:
- this.viewDate = this.moveYear(this.viewDate, dir);
- if (this.viewMode === 1)
- this._trigger('changeYear', this.viewDate);
- break;
- }
- this.fill();
- break;
- case 'today':
- var date = new Date();
- date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);
-
- this.showMode(-2);
- var which = this.o.todayBtn === 'linked' ? null : 'view';
- this._setDate(date, which);
- break;
- case 'clear':
- var element;
- if (this.isInput)
- element = this.element;
- else if (this.component)
- element = this.element.find('input');
- if (element)
- element.val("").change();
- this.update();
- this._trigger('changeDate');
- if (this.o.autoclose)
- this.hide();
- break;
- }
- break;
- case 'span':
- if (!target.is('.disabled')){
- this.viewDate.setUTCDate(1);
- if (target.is('.month')){
- day = 1;
- month = target.parent().find('span').index(target);
- year = this.viewDate.getUTCFullYear();
- this.viewDate.setUTCMonth(month);
- this._trigger('changeMonth', this.viewDate);
- if (this.o.minViewMode === 1){
- this._setDate(UTCDate(year, month, day));
- }
- }
- else {
- day = 1;
- month = 0;
- year = parseInt(target.text(), 10)||0;
- this.viewDate.setUTCFullYear(year);
- this._trigger('changeYear', this.viewDate);
- if (this.o.minViewMode === 2){
- this._setDate(UTCDate(year, month, day));
- }
- }
- this.showMode(-1);
- this.fill();
- }
- break;
- case 'td':
- if (target.is('.day') && !target.is('.disabled')){
- day = parseInt(target.text(), 10)||1;
- year = this.viewDate.getUTCFullYear();
- month = this.viewDate.getUTCMonth();
- if (target.is('.old')){
- if (month === 0){
- month = 11;
- year -= 1;
- }
- else {
- month -= 1;
- }
- }
- else if (target.is('.new')){
- if (month === 11){
- month = 0;
- year += 1;
- }
- else {
- month += 1;
- }
- }
- this._setDate(UTCDate(year, month, day));
- }
- break;
- }
- }
- if (this.picker.is(':visible') && this._focused_from){
- $(this._focused_from).focus();
- }
- delete this._focused_from;
- },
-
- _toggle_multidate: function(date){
- var ix = this.dates.contains(date);
- if (!date){
- this.dates.clear();
- }
- else if (ix !== -1){
- this.dates.remove(ix);
- }
- else {
- this.dates.push(date);
- }
- if (typeof this.o.multidate === 'number')
- while (this.dates.length > this.o.multidate)
- this.dates.remove(0);
- },
-
- _setDate: function(date, which){
- if (!which || which === 'date')
- this._toggle_multidate(date && new Date(date));
- if (!which || which === 'view')
- this.viewDate = date && new Date(date);
-
- this.fill();
- this.setValue();
- this._trigger('changeDate');
- var element;
- if (this.isInput){
- element = this.element;
- }
- else if (this.component){
- element = this.element.find('input');
- }
- if (element){
- element.change();
- }
- if (this.o.autoclose && (!which || which === 'date')){
- this.hide();
- }
- },
-
- moveMonth: function(date, dir){
- if (!date)
- return undefined;
- if (!dir)
- return date;
- var new_date = new Date(date.valueOf()),
- day = new_date.getUTCDate(),
- month = new_date.getUTCMonth(),
- mag = Math.abs(dir),
- new_month, test;
- dir = dir > 0 ? 1 : -1;
- if (mag === 1){
- test = dir === -1
- // If going back one month, make sure month is not current month
- // (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02)
- ? function(){
- return new_date.getUTCMonth() === month;
- }
- // If going forward one month, make sure month is as expected
- // (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02)
- : function(){
- return new_date.getUTCMonth() !== new_month;
- };
- new_month = month + dir;
- new_date.setUTCMonth(new_month);
- // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11
- if (new_month < 0 || new_month > 11)
- new_month = (new_month + 12) % 12;
- }
- else {
- // For magnitudes >1, move one month at a time...
- for (var i=0; i < mag; i++)
- // ...which might decrease the day (eg, Jan 31 to Feb 28, etc)...
- new_date = this.moveMonth(new_date, dir);
- // ...then reset the day, keeping it in the new month
- new_month = new_date.getUTCMonth();
- new_date.setUTCDate(day);
- test = function(){
- return new_month !== new_date.getUTCMonth();
- };
- }
- // Common date-resetting loop -- if date is beyond end of month, make it
- // end of month
- while (test()){
- new_date.setUTCDate(--day);
- new_date.setUTCMonth(new_month);
- }
- return new_date;
- },
-
- moveYear: function(date, dir){
- return this.moveMonth(date, dir*12);
- },
-
- dateWithinRange: function(date){
- return date >= this.o.startDate && date <= this.o.endDate;
- },
-
- keydown: function(e){
- if (this.picker.is(':not(:visible)')){
- if (e.keyCode === 27) // allow escape to hide and re-show picker
- this.show();
- return;
- }
- var dateChanged = false,
- dir, newDate, newViewDate,
- focusDate = this.focusDate || this.viewDate;
- switch (e.keyCode){
- case 27: // escape
- if (this.focusDate){
- this.focusDate = null;
- this.viewDate = this.dates.get(-1) || this.viewDate;
- this.fill();
- }
- else
- this.hide();
- e.preventDefault();
- break;
- case 37: // left
- case 39: // right
- if (!this.o.keyboardNavigation)
- break;
- dir = e.keyCode === 37 ? -1 : 1;
- if (e.ctrlKey){
- newDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir);
- newViewDate = this.moveYear(focusDate, dir);
- this._trigger('changeYear', this.viewDate);
- }
- else if (e.shiftKey){
- newDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir);
- newViewDate = this.moveMonth(focusDate, dir);
- this._trigger('changeMonth', this.viewDate);
- }
- else {
- newDate = new Date(this.dates.get(-1) || UTCToday());
- newDate.setUTCDate(newDate.getUTCDate() + dir);
- newViewDate = new Date(focusDate);
- newViewDate.setUTCDate(focusDate.getUTCDate() + dir);
- }
- if (this.dateWithinRange(newDate)){
- this.focusDate = this.viewDate = newViewDate;
- this.setValue();
- this.fill();
- e.preventDefault();
- }
- break;
- case 38: // up
- case 40: // down
- if (!this.o.keyboardNavigation)
- break;
- dir = e.keyCode === 38 ? -1 : 1;
- if (e.ctrlKey){
- newDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir);
- newViewDate = this.moveYear(focusDate, dir);
- this._trigger('changeYear', this.viewDate);
- }
- else if (e.shiftKey){
- newDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir);
- newViewDate = this.moveMonth(focusDate, dir);
- this._trigger('changeMonth', this.viewDate);
- }
- else {
- newDate = new Date(this.dates.get(-1) || UTCToday());
- newDate.setUTCDate(newDate.getUTCDate() + dir * 7);
- newViewDate = new Date(focusDate);
- newViewDate.setUTCDate(focusDate.getUTCDate() + dir * 7);
- }
- if (this.dateWithinRange(newDate)){
- this.focusDate = this.viewDate = newViewDate;
- this.setValue();
- this.fill();
- e.preventDefault();
- }
- break;
- case 32: // spacebar
- // Spacebar is used in manually typing dates in some formats.
- // As such, its behavior should not be hijacked.
- break;
- case 13: // enter
- focusDate = this.focusDate || this.dates.get(-1) || this.viewDate;
- this._toggle_multidate(focusDate);
- dateChanged = true;
- this.focusDate = null;
- this.viewDate = this.dates.get(-1) || this.viewDate;
- this.setValue();
- this.fill();
- if (this.picker.is(':visible')){
- e.preventDefault();
- if (this.o.autoclose)
- this.hide();
- }
- break;
- case 9: // tab
- this.focusDate = null;
- this.viewDate = this.dates.get(-1) || this.viewDate;
- this.fill();
- this.hide();
- break;
- }
- if (dateChanged){
- if (this.dates.length)
- this._trigger('changeDate');
- else
- this._trigger('clearDate');
- var element;
- if (this.isInput){
- element = this.element;
- }
- else if (this.component){
- element = this.element.find('input');
- }
- if (element){
- element.change();
- }
- }
- },
-
- showMode: function(dir){
- if (dir){
- this.viewMode = Math.max(this.o.minViewMode, Math.min(2, this.viewMode + dir));
- }
- this.picker
- .find('>div')
- .hide()
- .filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName)
- .css('display', 'block');
- this.updateNavArrows();
- }
- };
-
- var DateRangePicker = function(element, options){
- this.element = $(element);
- this.inputs = $.map(options.inputs, function(i){
- return i.jquery ? i[0] : i;
- });
- delete options.inputs;
-
- $(this.inputs)
- .datepicker(options)
- .bind('changeDate', $.proxy(this.dateUpdated, this));
-
- this.pickers = $.map(this.inputs, function(i){
- return $(i).data('datepicker');
- });
- this.updateDates();
- };
- DateRangePicker.prototype = {
- updateDates: function(){
- this.dates = $.map(this.pickers, function(i){
- return i.getUTCDate();
- });
- this.updateRanges();
- },
- updateRanges: function(){
- var range = $.map(this.dates, function(d){
- return d.valueOf();
- });
- $.each(this.pickers, function(i, p){
- p.setRange(range);
- });
- },
- dateUpdated: function(e){
- // `this.updating` is a workaround for preventing infinite recursion
- // between `changeDate` triggering and `setUTCDate` calling. Until
- // there is a better mechanism.
- if (this.updating)
- return;
- this.updating = true;
-
- var dp = $(e.target).data('datepicker'),
- new_date = dp.getUTCDate(),
- i = $.inArray(e.target, this.inputs),
- l = this.inputs.length;
- if (i === -1)
- return;
-
- $.each(this.pickers, function(i, p){
- if (!p.getUTCDate())
- p.setUTCDate(new_date);
- });
-
- if (new_date < this.dates[i]){
- // Date being moved earlier/left
- while (i >= 0 && new_date < this.dates[i]){
- this.pickers[i--].setUTCDate(new_date);
- }
- }
- else if (new_date > this.dates[i]){
- // Date being moved later/right
- while (i < l && new_date > this.dates[i]){
- this.pickers[i++].setUTCDate(new_date);
- }
- }
- this.updateDates();
-
- delete this.updating;
- },
- remove: function(){
- $.map(this.pickers, function(p){ p.remove(); });
- delete this.element.data().datepicker;
- }
- };
-
- function opts_from_el(el, prefix){
- // Derive options from element data-attrs
- var data = $(el).data(),
- out = {}, inkey,
- replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])');
- prefix = new RegExp('^' + prefix.toLowerCase());
- function re_lower(_,a){
- return a.toLowerCase();
- }
- for (var key in data)
- if (prefix.test(key)){
- inkey = key.replace(replace, re_lower);
- out[inkey] = data[key];
- }
- return out;
- }
-
- function opts_from_locale(lang){
- // Derive options from locale plugins
- var out = {};
- // Check if "de-DE" style date is available, if not language should
- // fallback to 2 letter code eg "de"
- if (!dates[lang]){
- lang = lang.split('-')[0];
- if (!dates[lang])
- return;
- }
- var d = dates[lang];
- $.each(locale_opts, function(i,k){
- if (k in d)
- out[k] = d[k];
- });
- return out;
- }
-
- var old = $.fn.datepicker;
- $.fn.datepicker = function(option){
- var args = Array.apply(null, arguments);
- args.shift();
- var internal_return;
- this.each(function(){
- var $this = $(this),
- data = $this.data('datepicker'),
- options = typeof option === 'object' && option;
- if (!data){
- var elopts = opts_from_el(this, 'date'),
- // Preliminary otions
- xopts = $.extend({}, defaults, elopts, options),
- locopts = opts_from_locale(xopts.language),
- // Options priority: js args, data-attrs, locales, defaults
- opts = $.extend({}, defaults, locopts, elopts, options);
- if ($this.is('.input-daterange') || opts.inputs){
- var ropts = {
- inputs: opts.inputs || $this.find('input').toArray()
- };
- $this.data('datepicker', (data = new DateRangePicker(this, $.extend(opts, ropts))));
- }
- else {
- $this.data('datepicker', (data = new Datepicker(this, opts)));
- }
- }
- if (typeof option === 'string' && typeof data[option] === 'function'){
- internal_return = data[option].apply(data, args);
- if (internal_return !== undefined)
- return false;
- }
- });
- if (internal_return !== undefined)
- return internal_return;
- else
- return this;
- };
-
- var defaults = $.fn.datepicker.defaults = {
- autoclose: false,
- beforeShowDay: $.noop,
- calendarWeeks: false,
- clearBtn: false,
- daysOfWeekDisabled: [],
- endDate: Infinity,
- forceParse: true,
- format: 'yyyy-mm-dd',
- keyboardNavigation: true,
- language: 'en',
- minViewMode: 0,
- multidate: false,
- multidateSeparator: ',',
- orientation: "auto",
- rtl: false,
- startDate: -Infinity,
- startView: 0,
- todayBtn: false,
- todayHighlight: false,
- weekStart: 0
- };
- var locale_opts = $.fn.datepicker.locale_opts = [
- 'format',
- 'rtl',
- 'weekStart'
- ];
- $.fn.datepicker.Constructor = Datepicker;
- var dates = $.fn.datepicker.dates = {
- en: {
- days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"],
- daysShort: ["日", "一", "二", "三", "四", "五", "六", "日"],
- daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"],
- months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
- monthsShort: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
- today: "今天",
- clear: "清空"
- }
- };
-
- var DPGlobal = {
- modes: [
- {
- clsName: 'days',
- navFnc: 'Month',
- navStep: 1
- },
- {
- clsName: 'months',
- navFnc: 'FullYear',
- navStep: 1
- },
- {
- clsName: 'years',
- navFnc: 'FullYear',
- navStep: 10
- }],
- isLeapYear: function(year){
- return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0));
- },
- getDaysInMonth: function(year, month){
- return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
- },
- validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g,
- nonpunctuation: /[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,
- parseFormat: function(format){
- // IE treats \0 as a string end in inputs (truncating the value),
- // so it's a bad format delimiter, anyway
- var separators = format.replace(this.validParts, '\0').split('\0'),
- parts = format.match(this.validParts);
- if (!separators || !separators.length || !parts || parts.length === 0){
- throw new Error("Invalid date format.");
- }
- return {separators: separators, parts: parts};
- },
- parseDate: function(date, format, language){
- if (!date)
- return undefined;
- if (date instanceof Date)
- return date;
- if (typeof format === 'string')
- format = DPGlobal.parseFormat(format);
- var part_re = /([\-+]\d+)([dmwy])/,
- parts = date.match(/([\-+]\d+)([dmwy])/g),
- part, dir, i;
- if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)){
- date = new Date();
- for (i=0; i < parts.length; i++){
- part = part_re.exec(parts[i]);
- dir = parseInt(part[1]);
- switch (part[2]){
- case 'd':
- date.setUTCDate(date.getUTCDate() + dir);
- break;
- case 'm':
- date = Datepicker.prototype.moveMonth.call(Datepicker.prototype, date, dir);
- break;
- case 'w':
- date.setUTCDate(date.getUTCDate() + dir * 7);
- break;
- case 'y':
- date = Datepicker.prototype.moveYear.call(Datepicker.prototype, date, dir);
- break;
- }
- }
- return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0);
- }
- parts = date && date.match(this.nonpunctuation) || [];
- date = new Date();
- var parsed = {},
- setters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'],
- setters_map = {
- yyyy: function(d,v){
- return d.setUTCFullYear(v);
- },
- yy: function(d,v){
- return d.setUTCFullYear(2000+v);
- },
- m: function(d,v){
- if (isNaN(d))
- return d;
- v -= 1;
- while (v < 0) v += 12;
- v %= 12;
- d.setUTCMonth(v);
- while (d.getUTCMonth() !== v)
- d.setUTCDate(d.getUTCDate()-1);
- return d;
- },
- d: function(d,v){
- return d.setUTCDate(v);
- }
- },
- val, filtered;
- setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m'];
- setters_map['dd'] = setters_map['d'];
- date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);
- var fparts = format.parts.slice();
- // Remove noop parts
- if (parts.length !== fparts.length){
- fparts = $(fparts).filter(function(i,p){
- return $.inArray(p, setters_order) !== -1;
- }).toArray();
- }
- // Process remainder
- function match_part(){
- var m = this.slice(0, parts[i].length),
- p = parts[i].slice(0, m.length);
- return m === p;
- }
- if (parts.length === fparts.length){
- var cnt;
- for (i=0, cnt = fparts.length; i < cnt; i++){
- val = parseInt(parts[i], 10);
- part = fparts[i];
- if (isNaN(val)){
- switch (part){
- case 'MM':
- filtered = $(dates[language].months).filter(match_part);
- val = $.inArray(filtered[0], dates[language].months) + 1;
- break;
- case 'M':
- filtered = $(dates[language].monthsShort).filter(match_part);
- val = $.inArray(filtered[0], dates[language].monthsShort) + 1;
- break;
- }
- }
- parsed[part] = val;
- }
- var _date, s;
- for (i=0; i < setters_order.length; i++){
- s = setters_order[i];
- if (s in parsed && !isNaN(parsed[s])){
- _date = new Date(date);
- setters_map[s](_date, parsed[s]);
- if (!isNaN(_date))
- date = _date;
- }
- }
- }
- return date;
- },
- formatDate: function(date, format, language){
- if (!date)
- return '';
- if (typeof format === 'string')
- format = DPGlobal.parseFormat(format);
- var val = {
- d: date.getUTCDate(),
- D: dates[language].daysShort[date.getUTCDay()],
- DD: dates[language].days[date.getUTCDay()],
- m: date.getUTCMonth() + 1,
- M: dates[language].monthsShort[date.getUTCMonth()],
- MM: dates[language].months[date.getUTCMonth()],
- yy: date.getUTCFullYear().toString().substring(2),
- yyyy: date.getUTCFullYear()
- };
- val.dd = (val.d < 10 ? '0' : '') + val.d;
- val.mm = (val.m < 10 ? '0' : '') + val.m;
- date = [];
- var seps = $.extend([], format.separators);
- for (var i=0, cnt = format.parts.length; i <= cnt; i++){
- if (seps.length)
- date.push(seps.shift());
- date.push(val[format.parts[i]]);
- }
- return date.join('');
- },
- headTemplate: ''+
- ''+
- '| « | '+
- ' | '+
- '» | '+
- '
'+
- '',
- contTemplate: ' |
',
- footTemplate: ''+
- ''+
- ' | '+
- '
'+
- ''+
- ' | '+
- '
'+
- ''
- };
- DPGlobal.template = ''+
- '
'+
- '
'+
- DPGlobal.headTemplate+
- ''+
- DPGlobal.footTemplate+
- '
'+
- '
'+
- '
'+
- '
'+
- DPGlobal.headTemplate+
- DPGlobal.contTemplate+
- DPGlobal.footTemplate+
- '
'+
- '
'+
- '
'+
- '
'+
- DPGlobal.headTemplate+
- DPGlobal.contTemplate+
- DPGlobal.footTemplate+
- '
'+
- '
'+
- '
';
-
- $.fn.datepicker.DPGlobal = DPGlobal;
-
-
- /* DATEPICKER NO CONFLICT
- * =================== */
-
- $.fn.datepicker.noConflict = function(){
- $.fn.datepicker = old;
- return this;
- };
-
-
- /* DATEPICKER DATA-API
- * ================== */
-
- $(document).on(
- 'focus.datepicker.data-api click.datepicker.data-api',
- '[data-provide="datepicker"]',
- function(e){
- var $this = $(this);
- if ($this.data('datepicker'))
- return;
- e.preventDefault();
- // component click requires us to explicitly show it
- $this.datepicker('show');
- }
- );
- $(function(){
- $('[data-provide="datepicker-inline"]').datepicker();
- });
-
-}(window.jQuery));
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.css b/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.css
new file mode 100644
index 000000000..537c6a4ce
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.css
@@ -0,0 +1,418 @@
+/*!
+ * Datetimepicker for Bootstrap
+ *
+ * Copyright 2012 Stefan Petre
+ * Improvements by Andrew Rowls
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+.datetimepicker {
+ padding: 4px;
+ margin-top: 1px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ direction: ltr;
+}
+
+.datetimepicker-inline {
+ width: 220px;
+}
+
+.datetimepicker.datetimepicker-rtl {
+ direction: rtl;
+}
+
+.datetimepicker.datetimepicker-rtl table tr td span {
+ float: right;
+}
+
+.datetimepicker-dropdown, .datetimepicker-dropdown-left {
+ top: 0;
+ left: 0;
+}
+
+[class*=" datetimepicker-dropdown"]:before {
+ content: '';
+ display: inline-block;
+ border-left: 7px solid transparent;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid #cccccc;
+ border-bottom-color: rgba(0, 0, 0, 0.2);
+ position: absolute;
+}
+
+[class*=" datetimepicker-dropdown"]:after {
+ content: '';
+ display: inline-block;
+ border-left: 6px solid transparent;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid #ffffff;
+ position: absolute;
+}
+
+[class*=" datetimepicker-dropdown-top"]:before {
+ content: '';
+ display: inline-block;
+ border-left: 7px solid transparent;
+ border-right: 7px solid transparent;
+ border-top: 7px solid #cccccc;
+ border-top-color: rgba(0, 0, 0, 0.2);
+ border-bottom: 0;
+}
+
+[class*=" datetimepicker-dropdown-top"]:after {
+ content: '';
+ display: inline-block;
+ border-left: 6px solid transparent;
+ border-right: 6px solid transparent;
+ border-top: 6px solid #ffffff;
+ border-bottom: 0;
+}
+
+.datetimepicker-dropdown-bottom-left:before {
+ top: -7px;
+ right: 6px;
+}
+
+.datetimepicker-dropdown-bottom-left:after {
+ top: -6px;
+ right: 7px;
+}
+
+.datetimepicker-dropdown-bottom-right:before {
+ top: -7px;
+ left: 6px;
+}
+
+.datetimepicker-dropdown-bottom-right:after {
+ top: -6px;
+ left: 7px;
+}
+
+.datetimepicker-dropdown-top-left:before {
+ bottom: -7px;
+ right: 6px;
+}
+
+.datetimepicker-dropdown-top-left:after {
+ bottom: -6px;
+ right: 7px;
+}
+
+.datetimepicker-dropdown-top-right:before {
+ bottom: -7px;
+ left: 6px;
+}
+
+.datetimepicker-dropdown-top-right:after {
+ bottom: -6px;
+ left: 7px;
+}
+
+.datetimepicker > div {
+ display: none;
+}
+
+.datetimepicker.minutes div.datetimepicker-minutes {
+ display: block;
+}
+
+.datetimepicker.hours div.datetimepicker-hours {
+ display: block;
+}
+
+.datetimepicker.days div.datetimepicker-days {
+ display: block;
+}
+
+.datetimepicker.months div.datetimepicker-months {
+ display: block;
+}
+
+.datetimepicker.years div.datetimepicker-years {
+ display: block;
+}
+
+.datetimepicker table {
+ margin: 0;
+}
+
+.datetimepicker td,
+.datetimepicker th {
+ text-align: center;
+ width: 20px;
+ height: 20px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ border: none;
+}
+
+.table-striped .datetimepicker table tr td,
+.table-striped .datetimepicker table tr th {
+ background-color: transparent;
+}
+
+.datetimepicker table tr td.minute:hover {
+ background: #eeeeee;
+ cursor: pointer;
+}
+
+.datetimepicker table tr td.hour:hover {
+ background: #eeeeee;
+ cursor: pointer;
+}
+
+.datetimepicker table tr td.day:hover {
+ background: #eeeeee;
+ cursor: pointer;
+}
+
+.datetimepicker table tr td.old,
+.datetimepicker table tr td.new {
+ color: #999999;
+}
+
+.datetimepicker table tr td.disabled,
+.datetimepicker table tr td.disabled:hover {
+ background: none;
+ color: #999999;
+ cursor: default;
+}
+
+.datetimepicker table tr td.today,
+.datetimepicker table tr td.today:hover,
+.datetimepicker table tr td.today.disabled,
+.datetimepicker table tr td.today.disabled:hover {
+ background-color: #fde19a;
+ background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
+ background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
+ background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
+ background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
+ background-image: linear-gradient(to bottom, #fdd49a, #fdf59a);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
+ border-color: #fdf59a #fdf59a #fbed50;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.datetimepicker table tr td.today:hover,
+.datetimepicker table tr td.today:hover:hover,
+.datetimepicker table tr td.today.disabled:hover,
+.datetimepicker table tr td.today.disabled:hover:hover,
+.datetimepicker table tr td.today:active,
+.datetimepicker table tr td.today:hover:active,
+.datetimepicker table tr td.today.disabled:active,
+.datetimepicker table tr td.today.disabled:hover:active,
+.datetimepicker table tr td.today.active,
+.datetimepicker table tr td.today:hover.active,
+.datetimepicker table tr td.today.disabled.active,
+.datetimepicker table tr td.today.disabled:hover.active,
+.datetimepicker table tr td.today.disabled,
+.datetimepicker table tr td.today:hover.disabled,
+.datetimepicker table tr td.today.disabled.disabled,
+.datetimepicker table tr td.today.disabled:hover.disabled,
+.datetimepicker table tr td.today[disabled],
+.datetimepicker table tr td.today:hover[disabled],
+.datetimepicker table tr td.today.disabled[disabled],
+.datetimepicker table tr td.today.disabled:hover[disabled] {
+ background-color: #fdf59a;
+}
+
+.datetimepicker table tr td.today:active,
+.datetimepicker table tr td.today:hover:active,
+.datetimepicker table tr td.today.disabled:active,
+.datetimepicker table tr td.today.disabled:hover:active,
+.datetimepicker table tr td.today.active,
+.datetimepicker table tr td.today:hover.active,
+.datetimepicker table tr td.today.disabled.active,
+.datetimepicker table tr td.today.disabled:hover.active {
+ background-color: #fbf069;
+}
+
+.datetimepicker table tr td.active,
+.datetimepicker table tr td.active:hover,
+.datetimepicker table tr td.active.disabled,
+.datetimepicker table tr td.active.disabled:hover {
+ background-color: #006dcc;
+ background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
+ background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
+ background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
+ background-image: -o-linear-gradient(top, #0088cc, #0044cc);
+ background-image: linear-gradient(to bottom, #0088cc, #0044cc);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
+ border-color: #0044cc #0044cc #002a80;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+ color: #ffffff;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+
+.datetimepicker table tr td.active:hover,
+.datetimepicker table tr td.active:hover:hover,
+.datetimepicker table tr td.active.disabled:hover,
+.datetimepicker table tr td.active.disabled:hover:hover,
+.datetimepicker table tr td.active:active,
+.datetimepicker table tr td.active:hover:active,
+.datetimepicker table tr td.active.disabled:active,
+.datetimepicker table tr td.active.disabled:hover:active,
+.datetimepicker table tr td.active.active,
+.datetimepicker table tr td.active:hover.active,
+.datetimepicker table tr td.active.disabled.active,
+.datetimepicker table tr td.active.disabled:hover.active,
+.datetimepicker table tr td.active.disabled,
+.datetimepicker table tr td.active:hover.disabled,
+.datetimepicker table tr td.active.disabled.disabled,
+.datetimepicker table tr td.active.disabled:hover.disabled,
+.datetimepicker table tr td.active[disabled],
+.datetimepicker table tr td.active:hover[disabled],
+.datetimepicker table tr td.active.disabled[disabled],
+.datetimepicker table tr td.active.disabled:hover[disabled] {
+ background-color: #0044cc;
+}
+
+.datetimepicker table tr td.active:active,
+.datetimepicker table tr td.active:hover:active,
+.datetimepicker table tr td.active.disabled:active,
+.datetimepicker table tr td.active.disabled:hover:active,
+.datetimepicker table tr td.active.active,
+.datetimepicker table tr td.active:hover.active,
+.datetimepicker table tr td.active.disabled.active,
+.datetimepicker table tr td.active.disabled:hover.active {
+ background-color: #003399;
+}
+
+.datetimepicker table tr td span {
+ display: block;
+ width: 23%;
+ height: 54px;
+ line-height: 54px;
+ float: left;
+ margin: 1%;
+ cursor: pointer;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.datetimepicker .datetimepicker-hours span {
+ height: 26px;
+ line-height: 26px;
+}
+
+.datetimepicker .datetimepicker-hours table tr td span.hour_am,
+.datetimepicker .datetimepicker-hours table tr td span.hour_pm {
+ width: 14.6%;
+}
+
+.datetimepicker .datetimepicker-hours fieldset legend,
+.datetimepicker .datetimepicker-minutes fieldset legend {
+ margin-bottom: inherit;
+ line-height: 30px;
+}
+
+.datetimepicker .datetimepicker-minutes span {
+ height: 26px;
+ line-height: 26px;
+}
+
+.datetimepicker table tr td span:hover {
+ background: #eeeeee;
+}
+
+.datetimepicker table tr td span.disabled,
+.datetimepicker table tr td span.disabled:hover {
+ background: none;
+ color: #999999;
+ cursor: default;
+}
+
+.datetimepicker table tr td span.active,
+.datetimepicker table tr td span.active:hover,
+.datetimepicker table tr td span.active.disabled,
+.datetimepicker table tr td span.active.disabled:hover {
+ background-color: #006dcc;
+ background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
+ background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
+ background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
+ background-image: -o-linear-gradient(top, #0088cc, #0044cc);
+ background-image: linear-gradient(to bottom, #0088cc, #0044cc);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
+ border-color: #0044cc #0044cc #002a80;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+ color: #ffffff;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+
+.datetimepicker table tr td span.active:hover,
+.datetimepicker table tr td span.active:hover:hover,
+.datetimepicker table tr td span.active.disabled:hover,
+.datetimepicker table tr td span.active.disabled:hover:hover,
+.datetimepicker table tr td span.active:active,
+.datetimepicker table tr td span.active:hover:active,
+.datetimepicker table tr td span.active.disabled:active,
+.datetimepicker table tr td span.active.disabled:hover:active,
+.datetimepicker table tr td span.active.active,
+.datetimepicker table tr td span.active:hover.active,
+.datetimepicker table tr td span.active.disabled.active,
+.datetimepicker table tr td span.active.disabled:hover.active,
+.datetimepicker table tr td span.active.disabled,
+.datetimepicker table tr td span.active:hover.disabled,
+.datetimepicker table tr td span.active.disabled.disabled,
+.datetimepicker table tr td span.active.disabled:hover.disabled,
+.datetimepicker table tr td span.active[disabled],
+.datetimepicker table tr td span.active:hover[disabled],
+.datetimepicker table tr td span.active.disabled[disabled],
+.datetimepicker table tr td span.active.disabled:hover[disabled] {
+ background-color: #0044cc;
+}
+
+.datetimepicker table tr td span.active:active,
+.datetimepicker table tr td span.active:hover:active,
+.datetimepicker table tr td span.active.disabled:active,
+.datetimepicker table tr td span.active.disabled:hover:active,
+.datetimepicker table tr td span.active.active,
+.datetimepicker table tr td span.active:hover.active,
+.datetimepicker table tr td span.active.disabled.active,
+.datetimepicker table tr td span.active.disabled:hover.active {
+ background-color: #003399;
+}
+
+.datetimepicker table tr td span.old {
+ color: #999999;
+}
+
+.datetimepicker th.switch {
+ width: 145px;
+}
+
+.datetimepicker th span.glyphicon {
+ pointer-events: none;
+}
+
+.datetimepicker thead tr:first-child th,
+.datetimepicker tfoot th {
+ cursor: pointer;
+}
+
+.datetimepicker thead tr:first-child th:hover,
+.datetimepicker tfoot th:hover {
+ background: #eeeeee;
+}
+
+.input-append.date .add-on i,
+.input-prepend.date .add-on i,
+.input-group.date .input-group-addon span {
+ cursor: pointer;
+ width: 14px;
+ height: 14px;
+}
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.js b/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.js
new file mode 100644
index 000000000..3361d4bab
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.js
@@ -0,0 +1,1978 @@
+/* =========================================================
+ * bootstrap-datetimepicker.js
+ * =========================================================
+ * Copyright 2012 Stefan Petre
+ *
+ * Improvements by Andrew Rowls
+ * Improvements by Sébastien Malot
+ * Improvements by Yun Lai
+ * Improvements by Kenneth Henderick
+ * Improvements by CuGBabyBeaR
+ * Improvements by Christian Vaas
+ *
+ * Project URL : http://www.malot.fr/bootstrap-datetimepicker
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================= */
+
+(function(factory){
+ if (typeof define === 'function' && define.amd)
+ define(['jquery'], factory);
+ else if (typeof exports === 'object')
+ factory(require('jquery'));
+ else
+ factory(jQuery);
+
+}(function($, undefined){
+
+ // Add ECMA262-5 Array methods if not supported natively (IE8)
+ if (!('indexOf' in Array.prototype)) {
+ Array.prototype.indexOf = function (find, i) {
+ if (i === undefined) i = 0;
+ if (i < 0) i += this.length;
+ if (i < 0) i = 0;
+ for (var n = this.length; i < n; i++) {
+ if (i in this && this[i] === find) {
+ return i;
+ }
+ }
+ return -1;
+ }
+ }
+
+ // Add timezone abbreviation support for ie6+, Chrome, Firefox
+ function timeZoneAbbreviation() {
+ var abbreviation, date, formattedStr, i, len, matchedStrings, ref, str;
+ date = (new Date()).toString();
+ formattedStr = ((ref = date.split('(')[1]) != null ? ref.slice(0, -1) : 0) || date.split(' ');
+ if (formattedStr instanceof Array) {
+ matchedStrings = [];
+ for (var i = 0, len = formattedStr.length; i < len; i++) {
+ str = formattedStr[i];
+ if ((abbreviation = (ref = str.match(/\b[A-Z]+\b/)) !== null) ? ref[0] : 0) {
+ matchedStrings.push(abbreviation);
+ }
+ }
+ formattedStr = matchedStrings.pop();
+ }
+ return formattedStr;
+ }
+
+ function UTCDate() {
+ return new Date(Date.UTC.apply(Date, arguments));
+ }
+
+ // Picker object
+ var Datetimepicker = function (element, options) {
+ var that = this;
+
+ this.element = $(element);
+
+ // add container for single page application
+ // when page switch the datetimepicker div will be removed also.
+ this.container = options.container || 'body';
+
+ this.language = options.language || this.element.data('date-language') || 'zh-cn';
+ this.language = this.language in dates ? this.language : this.language.split('-')[0]; // fr-CA fallback to fr
+ this.language = this.language in dates ? this.language : 'en';
+ this.isRTL = dates[this.language].rtl || false;
+ this.formatType = options.formatType || this.element.data('format-type') || 'standard';
+ this.format = DPGlobal.parseFormat(options.format || this.element.data('date-format') || dates[this.language].format || DPGlobal.getDefaultFormat(this.formatType, 'input'), this.formatType);
+ this.isInline = false;
+ this.isVisible = false;
+ this.isInput = this.element.is('input');
+ this.fontAwesome = options.fontAwesome || this.element.data('font-awesome') || false;
+
+ this.bootcssVer = options.bootcssVer || (this.isInput ? (this.element.is('.form-control') ? 3 : 2) : ( this.bootcssVer = this.element.is('.input-group') ? 3 : 2 ));
+
+ this.component = this.element.is('.date') ? ( this.bootcssVer === 3 ? this.element.find('.input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-remove, .input-group-addon .glyphicon-calendar, .input-group-addon .fa-calendar, .input-group-addon .fa-clock-o').parent() : this.element.find('.add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar, .add-on .fa-calendar, .add-on .fa-clock-o').parent()) : false;
+ this.componentReset = this.element.is('.date') ? ( this.bootcssVer === 3 ? this.element.find('.input-group-addon .glyphicon-remove, .input-group-addon .fa-times').parent():this.element.find('.add-on .icon-remove, .add-on .fa-times').parent()) : false;
+ this.hasInput = this.component && this.element.find('input').length;
+ if (this.component && this.component.length === 0) {
+ this.component = false;
+ }
+ this.linkField = options.linkField || this.element.data('link-field') || false;
+ this.linkFormat = DPGlobal.parseFormat(options.linkFormat || this.element.data('link-format') || DPGlobal.getDefaultFormat(this.formatType, 'link'), this.formatType);
+ this.minuteStep = options.minuteStep || this.element.data('minute-step') || 5;
+ this.pickerPosition = options.pickerPosition || this.element.data('picker-position') || 'bottom-right';
+ this.showMeridian = options.showMeridian || this.element.data('show-meridian') || false;
+ this.initialDate = options.initialDate || new Date();
+ this.zIndex = options.zIndex || this.element.data('z-index') || undefined;
+ this.title = typeof options.title === 'undefined' ? false : options.title;
+ this.timezone = options.timezone || timeZoneAbbreviation();
+
+ this.icons = {
+ leftArrow: this.fontAwesome ? 'fa-arrow-left' : (this.bootcssVer === 3 ? 'glyphicon-arrow-left' : 'icon-arrow-left'),
+ rightArrow: this.fontAwesome ? 'fa-arrow-right' : (this.bootcssVer === 3 ? 'glyphicon-arrow-right' : 'icon-arrow-right')
+ }
+ this.icontype = this.fontAwesome ? 'fa' : 'glyphicon';
+
+ this._attachEvents();
+
+ this.clickedOutside = function (e) {
+ // Clicked outside the datetimepicker, hide it
+ if ($(e.target).closest('.datetimepicker').length === 0) {
+ that.hide();
+ }
+ }
+
+ this.formatViewType = 'datetime';
+ if ('formatViewType' in options) {
+ this.formatViewType = options.formatViewType;
+ } else if ('formatViewType' in this.element.data()) {
+ this.formatViewType = this.element.data('formatViewType');
+ }
+
+ this.minView = 0;
+ if ('minView' in options) {
+ this.minView = options.minView;
+ } else if ('minView' in this.element.data()) {
+ this.minView = this.element.data('min-view');
+ }
+ this.minView = DPGlobal.convertViewMode(this.minView);
+
+ this.maxView = DPGlobal.modes.length - 1;
+ if ('maxView' in options) {
+ this.maxView = options.maxView;
+ } else if ('maxView' in this.element.data()) {
+ this.maxView = this.element.data('max-view');
+ }
+ this.maxView = DPGlobal.convertViewMode(this.maxView);
+
+ this.wheelViewModeNavigation = false;
+ if ('wheelViewModeNavigation' in options) {
+ this.wheelViewModeNavigation = options.wheelViewModeNavigation;
+ } else if ('wheelViewModeNavigation' in this.element.data()) {
+ this.wheelViewModeNavigation = this.element.data('view-mode-wheel-navigation');
+ }
+
+ this.wheelViewModeNavigationInverseDirection = false;
+
+ if ('wheelViewModeNavigationInverseDirection' in options) {
+ this.wheelViewModeNavigationInverseDirection = options.wheelViewModeNavigationInverseDirection;
+ } else if ('wheelViewModeNavigationInverseDirection' in this.element.data()) {
+ this.wheelViewModeNavigationInverseDirection = this.element.data('view-mode-wheel-navigation-inverse-dir');
+ }
+
+ this.wheelViewModeNavigationDelay = 100;
+ if ('wheelViewModeNavigationDelay' in options) {
+ this.wheelViewModeNavigationDelay = options.wheelViewModeNavigationDelay;
+ } else if ('wheelViewModeNavigationDelay' in this.element.data()) {
+ this.wheelViewModeNavigationDelay = this.element.data('view-mode-wheel-navigation-delay');
+ }
+
+ this.startViewMode = 2;
+ if ('startView' in options) {
+ this.startViewMode = options.startView;
+ } else if ('startView' in this.element.data()) {
+ this.startViewMode = this.element.data('start-view');
+ }
+ this.startViewMode = DPGlobal.convertViewMode(this.startViewMode);
+ this.viewMode = this.startViewMode;
+
+ this.viewSelect = this.minView;
+ if ('viewSelect' in options) {
+ this.viewSelect = options.viewSelect;
+ } else if ('viewSelect' in this.element.data()) {
+ this.viewSelect = this.element.data('view-select');
+ }
+ this.viewSelect = DPGlobal.convertViewMode(this.viewSelect);
+
+ this.forceParse = true;
+ if ('forceParse' in options) {
+ this.forceParse = options.forceParse;
+ } else if ('dateForceParse' in this.element.data()) {
+ this.forceParse = this.element.data('date-force-parse');
+ }
+ var template = this.bootcssVer === 3 ? DPGlobal.templateV3 : DPGlobal.template;
+ while (template.indexOf('{iconType}') !== -1) {
+ template = template.replace('{iconType}', this.icontype);
+ }
+ while (template.indexOf('{leftArrow}') !== -1) {
+ template = template.replace('{leftArrow}', this.icons.leftArrow);
+ }
+ while (template.indexOf('{rightArrow}') !== -1) {
+ template = template.replace('{rightArrow}', this.icons.rightArrow);
+ }
+ this.picker = $(template)
+ .appendTo(this.isInline ? this.element : this.container) // 'body')
+ .on({
+ click: $.proxy(this.click, this),
+ mousedown: $.proxy(this.mousedown, this)
+ });
+
+ if (this.wheelViewModeNavigation) {
+ if ($.fn.mousewheel) {
+ this.picker.on({mousewheel: $.proxy(this.mousewheel, this)});
+ } else {
+ console.log('Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option');
+ }
+ }
+
+ if (this.isInline) {
+ this.picker.addClass('datetimepicker-inline');
+ } else {
+ this.picker.addClass('datetimepicker-dropdown-' + this.pickerPosition + ' dropdown-menu');
+ }
+ if (this.isRTL) {
+ this.picker.addClass('datetimepicker-rtl');
+ var selector = this.bootcssVer === 3 ? '.prev span, .next span' : '.prev i, .next i';
+ this.picker.find(selector).toggleClass(this.icons.leftArrow + ' ' + this.icons.rightArrow);
+ }
+
+ $(document).on('mousedown touchend', this.clickedOutside);
+
+ this.autoclose = false;
+ if ('autoclose' in options) {
+ this.autoclose = options.autoclose;
+ } else if ('dateAutoclose' in this.element.data()) {
+ this.autoclose = this.element.data('date-autoclose');
+ }
+
+ this.keyboardNavigation = true;
+ if ('keyboardNavigation' in options) {
+ this.keyboardNavigation = options.keyboardNavigation;
+ } else if ('dateKeyboardNavigation' in this.element.data()) {
+ this.keyboardNavigation = this.element.data('date-keyboard-navigation');
+ }
+
+ this.todayBtn = (options.todayBtn || this.element.data('date-today-btn') || false);
+ this.clearBtn = (options.clearBtn || this.element.data('date-clear-btn') || false);
+ this.todayHighlight = (options.todayHighlight || this.element.data('date-today-highlight') || false);
+
+ this.weekStart = 0;
+ if (typeof options.weekStart !== 'undefined') {
+ this.weekStart = options.weekStart;
+ } else if (typeof this.element.data('date-weekstart') !== 'undefined') {
+ this.weekStart = this.element.data('date-weekstart');
+ } else if (typeof dates[this.language].weekStart !== 'undefined') {
+ this.weekStart = dates[this.language].weekStart;
+ }
+ this.weekStart = this.weekStart % 7;
+ this.weekEnd = ((this.weekStart + 6) % 7);
+ this.onRenderDay = function (date) {
+ var render = (options.onRenderDay || function () { return []; })(date);
+ if (typeof render === 'string') {
+ render = [render];
+ }
+ var res = ['day'];
+ return res.concat((render ? render : []));
+ };
+ this.onRenderHour = function (date) {
+ var render = (options.onRenderHour || function () { return []; })(date);
+ var res = ['hour'];
+ if (typeof render === 'string') {
+ render = [render];
+ }
+ return res.concat((render ? render : []));
+ };
+ this.onRenderMinute = function (date) {
+ var render = (options.onRenderMinute || function () { return []; })(date);
+ var res = ['minute'];
+ if (typeof render === 'string') {
+ render = [render];
+ }
+ if (date < this.startDate || date > this.endDate) {
+ res.push('disabled');
+ } else if (Math.floor(this.date.getUTCMinutes() / this.minuteStep) === Math.floor(date.getUTCMinutes() / this.minuteStep)) {
+ res.push('active');
+ }
+ return res.concat((render ? render : []));
+ };
+ this.onRenderYear = function (date) {
+ var render = (options.onRenderYear || function () { return []; })(date);
+ var res = ['year'];
+ if (typeof render === 'string') {
+ render = [render];
+ }
+ if (this.date.getUTCFullYear() === date.getUTCFullYear()) {
+ res.push('active');
+ }
+ var currentYear = date.getUTCFullYear();
+ var endYear = this.endDate.getUTCFullYear();
+ if (date < this.startDate || currentYear > endYear) {
+ res.push('disabled');
+ }
+ return res.concat((render ? render : []));
+ }
+ this.onRenderMonth = function (date) {
+ var render = (options.onRenderMonth || function () { return []; })(date);
+ var res = ['month'];
+ if (typeof render === 'string') {
+ render = [render];
+ }
+ return res.concat((render ? render : []));
+ }
+ this.startDate = new Date(-8639968443048000);
+ this.endDate = new Date(8639968443048000);
+ this.datesDisabled = [];
+ this.daysOfWeekDisabled = [];
+ this.setStartDate(options.startDate || this.element.data('date-startdate'));
+ this.setEndDate(options.endDate || this.element.data('date-enddate'));
+ this.setDatesDisabled(options.datesDisabled || this.element.data('date-dates-disabled'));
+ this.setDaysOfWeekDisabled(options.daysOfWeekDisabled || this.element.data('date-days-of-week-disabled'));
+ this.setMinutesDisabled(options.minutesDisabled || this.element.data('date-minute-disabled'));
+ this.setHoursDisabled(options.hoursDisabled || this.element.data('date-hour-disabled'));
+ this.fillDow();
+ this.fillMonths();
+ this.update();
+ this.showMode();
+
+ if (this.isInline) {
+ this.show();
+ }
+ };
+
+ Datetimepicker.prototype = {
+ constructor: Datetimepicker,
+
+ _events: [],
+ _attachEvents: function () {
+ this._detachEvents();
+ if (this.isInput) { // single input
+ this._events = [
+ [this.element, {
+ focus: $.proxy(this.show, this),
+ keyup: $.proxy(this.update, this),
+ keydown: $.proxy(this.keydown, this)
+ }]
+ ];
+ }
+ else if (this.component && this.hasInput) { // component: input + button
+ this._events = [
+ // For components that are not readonly, allow keyboard nav
+ [this.element.find('input'), {
+ focus: $.proxy(this.show, this),
+ keyup: $.proxy(this.update, this),
+ keydown: $.proxy(this.keydown, this)
+ }],
+ [this.component, {
+ click: $.proxy(this.show, this)
+ }]
+ ];
+ if (this.componentReset) {
+ this._events.push([
+ this.componentReset,
+ {click: $.proxy(this.reset, this)}
+ ]);
+ }
+ }
+ else if (this.element.is('div')) { // inline datetimepicker
+ this.isInline = true;
+ }
+ else {
+ this._events = [
+ [this.element, {
+ click: $.proxy(this.show, this)
+ }]
+ ];
+ }
+ for (var i = 0, el, ev; i < this._events.length; i++) {
+ el = this._events[i][0];
+ ev = this._events[i][1];
+ el.on(ev);
+ }
+ },
+
+ _detachEvents: function () {
+ for (var i = 0, el, ev; i < this._events.length; i++) {
+ el = this._events[i][0];
+ ev = this._events[i][1];
+ el.off(ev);
+ }
+ this._events = [];
+ },
+
+ show: function (e) {
+ this.picker.show();
+ this.height = this.component ? this.component.outerHeight() : this.element.outerHeight();
+ if (this.forceParse) {
+ this.update();
+ }
+ this.place();
+ $(window).on('resize', $.proxy(this.place, this));
+ if (e) {
+ e.stopPropagation();
+ e.preventDefault();
+ }
+ this.isVisible = true;
+ this.element.trigger({
+ type: 'show',
+ date: this.date
+ });
+ },
+
+ hide: function () {
+ if (!this.isVisible) return;
+ if (this.isInline) return;
+ this.picker.hide();
+ $(window).off('resize', this.place);
+ this.viewMode = this.startViewMode;
+ this.showMode();
+ if (!this.isInput) {
+ $(document).off('mousedown', this.hide);
+ }
+
+ if (
+ this.forceParse &&
+ (
+ this.isInput && this.element.val() ||
+ this.hasInput && this.element.find('input').val()
+ )
+ )
+ this.setValue();
+ this.isVisible = false;
+ this.element.trigger({
+ type: 'hide',
+ date: this.date
+ });
+ },
+
+ remove: function () {
+ this._detachEvents();
+ $(document).off('mousedown', this.clickedOutside);
+ this.picker.remove();
+ delete this.picker;
+ delete this.element.data().datetimepicker;
+ },
+
+ getDate: function () {
+ var d = this.getUTCDate();
+ if (d === null) {
+ return null;
+ }
+ return new Date(d.getTime() + (d.getTimezoneOffset() * 60000));
+ },
+
+ getUTCDate: function () {
+ return this.date;
+ },
+
+ getInitialDate: function () {
+ return this.initialDate
+ },
+
+ setInitialDate: function (initialDate) {
+ this.initialDate = initialDate;
+ },
+
+ setDate: function (d) {
+ this.setUTCDate(new Date(d.getTime() - (d.getTimezoneOffset() * 60000)));
+ },
+
+ setUTCDate: function (d) {
+ if (d >= this.startDate && d <= this.endDate) {
+ this.date = d;
+ this.setValue();
+ this.viewDate = this.date;
+ this.fill();
+ } else {
+ this.element.trigger({
+ type: 'outOfRange',
+ date: d,
+ startDate: this.startDate,
+ endDate: this.endDate
+ });
+ }
+ },
+
+ setFormat: function (format) {
+ this.format = DPGlobal.parseFormat(format, this.formatType);
+ var element;
+ if (this.isInput) {
+ element = this.element;
+ } else if (this.component) {
+ element = this.element.find('input');
+ }
+ if (element && element.val()) {
+ this.setValue();
+ }
+ },
+
+ setValue: function () {
+ var formatted = this.getFormattedDate();
+ if (!this.isInput) {
+ if (this.component) {
+ this.element.find('input').val(formatted);
+ }
+ this.element.data('date', formatted);
+ } else {
+ this.element.val(formatted);
+ }
+ if (this.linkField) {
+ $('#' + this.linkField).val(this.getFormattedDate(this.linkFormat));
+ }
+ },
+
+ getFormattedDate: function (format) {
+ format = format || this.format;
+ return DPGlobal.formatDate(this.date, format, this.language, this.formatType, this.timezone);
+ },
+
+ setStartDate: function (startDate) {
+ this.startDate = startDate || this.startDate;
+ if (this.startDate.valueOf() !== 8639968443048000) {
+ this.startDate = DPGlobal.parseDate(this.startDate, this.format, this.language, this.formatType, this.timezone);
+ }
+ this.update();
+ this.updateNavArrows();
+ },
+
+ setEndDate: function (endDate) {
+ this.endDate = endDate || this.endDate;
+ if (this.endDate.valueOf() !== 8639968443048000) {
+ this.endDate = DPGlobal.parseDate(this.endDate, this.format, this.language, this.formatType, this.timezone);
+ }
+ this.update();
+ this.updateNavArrows();
+ },
+
+ setDatesDisabled: function (datesDisabled) {
+ this.datesDisabled = datesDisabled || [];
+ if (!$.isArray(this.datesDisabled)) {
+ this.datesDisabled = this.datesDisabled.split(/,\s*/);
+ }
+ var mThis = this;
+ this.datesDisabled = $.map(this.datesDisabled, function (d) {
+ return DPGlobal.parseDate(d, mThis.format, mThis.language, mThis.formatType, mThis.timezone).toDateString();
+ });
+ this.update();
+ this.updateNavArrows();
+ },
+
+ setTitle: function (selector, value) {
+ return this.picker.find(selector)
+ .find('th:eq(1)')
+ .text(this.title === false ? value : this.title);
+ },
+
+ setDaysOfWeekDisabled: function (daysOfWeekDisabled) {
+ this.daysOfWeekDisabled = daysOfWeekDisabled || [];
+ if (!$.isArray(this.daysOfWeekDisabled)) {
+ this.daysOfWeekDisabled = this.daysOfWeekDisabled.split(/,\s*/);
+ }
+ this.daysOfWeekDisabled = $.map(this.daysOfWeekDisabled, function (d) {
+ return parseInt(d, 10);
+ });
+ this.update();
+ this.updateNavArrows();
+ },
+
+ setMinutesDisabled: function (minutesDisabled) {
+ this.minutesDisabled = minutesDisabled || [];
+ if (!$.isArray(this.minutesDisabled)) {
+ this.minutesDisabled = this.minutesDisabled.split(/,\s*/);
+ }
+ this.minutesDisabled = $.map(this.minutesDisabled, function (d) {
+ return parseInt(d, 10);
+ });
+ this.update();
+ this.updateNavArrows();
+ },
+
+ setHoursDisabled: function (hoursDisabled) {
+ this.hoursDisabled = hoursDisabled || [];
+ if (!$.isArray(this.hoursDisabled)) {
+ this.hoursDisabled = this.hoursDisabled.split(/,\s*/);
+ }
+ this.hoursDisabled = $.map(this.hoursDisabled, function (d) {
+ return parseInt(d, 10);
+ });
+ this.update();
+ this.updateNavArrows();
+ },
+
+ place: function () {
+ if (this.isInline) return;
+
+ if (!this.zIndex) {
+ var index_highest = 0;
+ $('div').each(function () {
+ var index_current = parseInt($(this).css('zIndex'), 10);
+ if (index_current > index_highest) {
+ index_highest = index_current;
+ }
+ });
+ this.zIndex = index_highest + 10;
+ }
+
+ var offset, top, left, containerOffset;
+ if (this.container instanceof $) {
+ containerOffset = this.container.offset();
+ } else {
+ containerOffset = $(this.container).offset();
+ }
+
+ if (this.component) {
+ offset = this.component.offset();
+ left = offset.left;
+ if (this.pickerPosition === 'bottom-left' || this.pickerPosition === 'top-left') {
+ left += this.component.outerWidth() - this.picker.outerWidth();
+ }
+ } else {
+ offset = this.element.offset();
+ left = offset.left;
+ if (this.pickerPosition === 'bottom-left' || this.pickerPosition === 'top-left') {
+ left += this.element.outerWidth() - this.picker.outerWidth();
+ }
+ }
+
+ var bodyWidth = document.body.clientWidth || window.innerWidth;
+ if (left + 220 > bodyWidth) {
+ left = bodyWidth - 220;
+ }
+
+ if (this.pickerPosition === 'top-left' || this.pickerPosition === 'top-right') {
+ top = offset.top - this.picker.outerHeight();
+ } else {
+ top = offset.top + this.height;
+ }
+
+ top = top - containerOffset.top;
+ left = left - containerOffset.left;
+
+ this.picker.css({
+ top: top,
+ left: left,
+ zIndex: this.zIndex
+ });
+ },
+
+ hour_minute: "^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]",
+
+ update: function () {
+ var date, fromArgs = false;
+ if (arguments && arguments.length && (typeof arguments[0] === 'string' || arguments[0] instanceof Date)) {
+ date = arguments[0];
+ fromArgs = true;
+ } else {
+ date = (this.isInput ? this.element.val() : this.element.find('input').val()) || this.element.data('date') || this.initialDate;
+ if (typeof date === 'string') {
+ date = date.replace(/^\s+|\s+$/g,'');
+ }
+ }
+
+ if (!date) {
+ date = new Date();
+ fromArgs = false;
+ }
+
+ if (typeof date === "string") {
+ if (new RegExp(this.hour_minute).test(date) || new RegExp(this.hour_minute + ":[0-5][0-9]").test(date)) {
+ date = this.getDate()
+ }
+ }
+
+ this.date = DPGlobal.parseDate(date, this.format, this.language, this.formatType, this.timezone);
+
+ if (fromArgs) this.setValue();
+
+ if (this.date < this.startDate) {
+ this.viewDate = new Date(this.startDate);
+ } else if (this.date > this.endDate) {
+ this.viewDate = new Date(this.endDate);
+ } else {
+ this.viewDate = new Date(this.date);
+ }
+ this.fill();
+ },
+
+ fillDow: function () {
+ var dowCnt = this.weekStart,
+ html = '';
+ while (dowCnt < this.weekStart + 7) {
+ html += '| ' + dates[this.language].daysMin[(dowCnt++) % 7] + ' | ';
+ }
+ html += '
';
+ this.picker.find('.datetimepicker-days thead').append(html);
+ },
+
+ fillMonths: function () {
+ var html = '';
+ var d = new Date(this.viewDate);
+ for (var i = 0; i < 12; i++) {
+ d.setUTCMonth(i);
+ var classes = this.onRenderMonth(d);
+ html += '' + dates[this.language].monthsShort[i] + '';
+ }
+ this.picker.find('.datetimepicker-months td').html(html);
+ },
+
+ fill: function () {
+ if (!this.date || !this.viewDate) {
+ return;
+ }
+ var d = new Date(this.viewDate),
+ year = d.getUTCFullYear(),
+ month = d.getUTCMonth(),
+ dayMonth = d.getUTCDate(),
+ hours = d.getUTCHours(),
+ startYear = this.startDate.getUTCFullYear(),
+ startMonth = this.startDate.getUTCMonth(),
+ endYear = this.endDate.getUTCFullYear(),
+ endMonth = this.endDate.getUTCMonth() + 1,
+ currentDate = (new UTCDate(this.date.getUTCFullYear(), this.date.getUTCMonth(), this.date.getUTCDate())).valueOf(),
+ today = new Date();
+ this.setTitle('.datetimepicker-days', dates[this.language].months[month] + ' ' + year)
+ if (this.formatViewType === 'time') {
+ var formatted = this.getFormattedDate();
+ this.setTitle('.datetimepicker-hours', formatted);
+ this.setTitle('.datetimepicker-minutes', formatted);
+ } else {
+ this.setTitle('.datetimepicker-hours', dayMonth + ' ' + dates[this.language].months[month] + ' ' + year);
+ this.setTitle('.datetimepicker-minutes', dayMonth + ' ' + dates[this.language].months[month] + ' ' + year);
+ }
+ this.picker.find('tfoot th.today')
+ .text(dates[this.language].today || dates['en'].today)
+ .toggle(this.todayBtn !== false);
+ this.picker.find('tfoot th.clear')
+ .text(dates[this.language].clear || dates['en'].clear)
+ .toggle(this.clearBtn !== false);
+ this.updateNavArrows();
+ this.fillMonths();
+ var prevMonth = UTCDate(year, month - 1, 28, 0, 0, 0, 0),
+ day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth());
+ prevMonth.setUTCDate(day);
+ prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.weekStart + 7) % 7);
+ var nextMonth = new Date(prevMonth);
+ nextMonth.setUTCDate(nextMonth.getUTCDate() + 42);
+ nextMonth = nextMonth.valueOf();
+ var html = [];
+ var classes;
+ while (prevMonth.valueOf() < nextMonth) {
+ if (prevMonth.getUTCDay() === this.weekStart) {
+ html.push('');
+ }
+ classes = this.onRenderDay(prevMonth);
+ if (prevMonth.getUTCFullYear() < year || (prevMonth.getUTCFullYear() === year && prevMonth.getUTCMonth() < month)) {
+ classes.push('old');
+ } else if (prevMonth.getUTCFullYear() > year || (prevMonth.getUTCFullYear() === year && prevMonth.getUTCMonth() > month)) {
+ classes.push('new');
+ }
+ // Compare internal UTC date with local today, not UTC today
+ if (this.todayHighlight &&
+ prevMonth.getUTCFullYear() === today.getFullYear() &&
+ prevMonth.getUTCMonth() === today.getMonth() &&
+ prevMonth.getUTCDate() === today.getDate()) {
+ classes.push('today');
+ }
+ if (prevMonth.valueOf() === currentDate) {
+ classes.push('active');
+ }
+ if ((prevMonth.valueOf() + 86400000) <= this.startDate || prevMonth.valueOf() > this.endDate ||
+ $.inArray(prevMonth.getUTCDay(), this.daysOfWeekDisabled) !== -1 ||
+ $.inArray(prevMonth.toDateString(), this.datesDisabled) !== -1) {
+ classes.push('disabled');
+ }
+ html.push('| ' + prevMonth.getUTCDate() + ' | ');
+ if (prevMonth.getUTCDay() === this.weekEnd) {
+ html.push('
');
+ }
+ prevMonth.setUTCDate(prevMonth.getUTCDate() + 1);
+ }
+ this.picker.find('.datetimepicker-days tbody').empty().append(html.join(''));
+
+ html = [];
+ var txt = '', meridian = '', meridianOld = '';
+ var hoursDisabled = this.hoursDisabled || [];
+ d = new Date(this.viewDate)
+ for (var i = 0; i < 24; i++) {
+ d.setUTCHours(i);
+ classes = this.onRenderHour(d);
+ if (hoursDisabled.indexOf(i) !== -1) {
+ classes.push('disabled');
+ }
+ var actual = UTCDate(year, month, dayMonth, i);
+ // We want the previous hour for the startDate
+ if ((actual.valueOf() + 3600000) <= this.startDate || actual.valueOf() > this.endDate) {
+ classes.push('disabled');
+ } else if (hours === i) {
+ classes.push('active');
+ }
+ if (this.showMeridian && dates[this.language].meridiem.length === 2) {
+ meridian = (i < 12 ? dates[this.language].meridiem[0] : dates[this.language].meridiem[1]);
+ if (meridian !== meridianOld) {
+ if (meridianOld !== '') {
+ html.push('');
+ }
+ html.push('');
+ }
+ } else {
+ txt = i + ':00';
+ html.push('' + txt + '');
+ }
+ }
+ this.picker.find('.datetimepicker-hours td').html(html.join(''));
+
+ html = [];
+ txt = '';
+ meridian = '';
+ meridianOld = '';
+ var minutesDisabled = this.minutesDisabled || [];
+ d = new Date(this.viewDate);
+ for (var i = 0; i < 60; i += this.minuteStep) {
+ if (minutesDisabled.indexOf(i) !== -1) continue;
+ d.setUTCMinutes(i);
+ d.setUTCSeconds(0);
+ classes = this.onRenderMinute(d);
+ if (this.showMeridian && dates[this.language].meridiem.length === 2) {
+ meridian = (hours < 12 ? dates[this.language].meridiem[0] : dates[this.language].meridiem[1]);
+ if (meridian !== meridianOld) {
+ if (meridianOld !== '') {
+ html.push('');
+ }
+ html.push('');
+ }
+ } else {
+ txt = i + ':00';
+ html.push('' + hours + ':' + (i < 10 ? '0' + i : i) + '');
+ }
+ }
+ this.picker.find('.datetimepicker-minutes td').html(html.join(''));
+
+ var currentYear = this.date.getUTCFullYear();
+ var months = this.setTitle('.datetimepicker-months', year)
+ .end()
+ .find('.month').removeClass('active');
+ if (currentYear === year) {
+ // getUTCMonths() returns 0 based, and we need to select the next one
+ // To cater bootstrap 2 we don't need to select the next one
+ months.eq(this.date.getUTCMonth()).addClass('active');
+ }
+ if (year < startYear || year > endYear) {
+ months.addClass('disabled');
+ }
+ if (year === startYear) {
+ months.slice(0, startMonth).addClass('disabled');
+ }
+ if (year === endYear) {
+ months.slice(endMonth).addClass('disabled');
+ }
+
+ html = '';
+ year = parseInt(year / 10, 10) * 10;
+ var yearCont = this.setTitle('.datetimepicker-years', year + '-' + (year + 9))
+ .end()
+ .find('td');
+ year -= 1;
+ d = new Date(this.viewDate);
+ for (var i = -1; i < 11; i++) {
+ d.setUTCFullYear(year);
+ classes = this.onRenderYear(d);
+ if (i === -1 || i === 10) {
+ classes.push(old);
+ }
+ html += '' + year + '';
+ year += 1;
+ }
+ yearCont.html(html);
+ this.place();
+ },
+
+ updateNavArrows: function () {
+ var d = new Date(this.viewDate),
+ year = d.getUTCFullYear(),
+ month = d.getUTCMonth(),
+ day = d.getUTCDate(),
+ hour = d.getUTCHours();
+ switch (this.viewMode) {
+ case 0:
+ if (year <= this.startDate.getUTCFullYear()
+ && month <= this.startDate.getUTCMonth()
+ && day <= this.startDate.getUTCDate()
+ && hour <= this.startDate.getUTCHours()) {
+ this.picker.find('.prev').css({visibility: 'hidden'});
+ } else {
+ this.picker.find('.prev').css({visibility: 'visible'});
+ }
+ if (year >= this.endDate.getUTCFullYear()
+ && month >= this.endDate.getUTCMonth()
+ && day >= this.endDate.getUTCDate()
+ && hour >= this.endDate.getUTCHours()) {
+ this.picker.find('.next').css({visibility: 'hidden'});
+ } else {
+ this.picker.find('.next').css({visibility: 'visible'});
+ }
+ break;
+ case 1:
+ if (year <= this.startDate.getUTCFullYear()
+ && month <= this.startDate.getUTCMonth()
+ && day <= this.startDate.getUTCDate()) {
+ this.picker.find('.prev').css({visibility: 'hidden'});
+ } else {
+ this.picker.find('.prev').css({visibility: 'visible'});
+ }
+ if (year >= this.endDate.getUTCFullYear()
+ && month >= this.endDate.getUTCMonth()
+ && day >= this.endDate.getUTCDate()) {
+ this.picker.find('.next').css({visibility: 'hidden'});
+ } else {
+ this.picker.find('.next').css({visibility: 'visible'});
+ }
+ break;
+ case 2:
+ if (year <= this.startDate.getUTCFullYear()
+ && month <= this.startDate.getUTCMonth()) {
+ this.picker.find('.prev').css({visibility: 'hidden'});
+ } else {
+ this.picker.find('.prev').css({visibility: 'visible'});
+ }
+ if (year >= this.endDate.getUTCFullYear()
+ && month >= this.endDate.getUTCMonth()) {
+ this.picker.find('.next').css({visibility: 'hidden'});
+ } else {
+ this.picker.find('.next').css({visibility: 'visible'});
+ }
+ break;
+ case 3:
+ case 4:
+ if (year <= this.startDate.getUTCFullYear()) {
+ this.picker.find('.prev').css({visibility: 'hidden'});
+ } else {
+ this.picker.find('.prev').css({visibility: 'visible'});
+ }
+ if (year >= this.endDate.getUTCFullYear()) {
+ this.picker.find('.next').css({visibility: 'hidden'});
+ } else {
+ this.picker.find('.next').css({visibility: 'visible'});
+ }
+ break;
+ }
+ },
+
+ mousewheel: function (e) {
+
+ e.preventDefault();
+ e.stopPropagation();
+
+ if (this.wheelPause) {
+ return;
+ }
+
+ this.wheelPause = true;
+
+ var originalEvent = e.originalEvent;
+
+ var delta = originalEvent.wheelDelta;
+
+ var mode = delta > 0 ? 1 : (delta === 0) ? 0 : -1;
+
+ if (this.wheelViewModeNavigationInverseDirection) {
+ mode = -mode;
+ }
+
+ this.showMode(mode);
+
+ setTimeout($.proxy(function () {
+
+ this.wheelPause = false
+
+ }, this), this.wheelViewModeNavigationDelay);
+
+ },
+
+ click: function (e) {
+ e.stopPropagation();
+ e.preventDefault();
+ var target = $(e.target).closest('span, td, th, legend');
+ if (target.is('.' + this.icontype)) {
+ target = $(target).parent().closest('span, td, th, legend');
+ }
+ if (target.length === 1) {
+ if (target.is('.disabled')) {
+ this.element.trigger({
+ type: 'outOfRange',
+ date: this.viewDate,
+ startDate: this.startDate,
+ endDate: this.endDate
+ });
+ return;
+ }
+ switch (target[0].nodeName.toLowerCase()) {
+ case 'th':
+ switch (target[0].className) {
+ case 'switch':
+ this.showMode(1);
+ break;
+ case 'prev':
+ case 'next':
+ var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1);
+ switch (this.viewMode) {
+ case 0:
+ this.viewDate = this.moveHour(this.viewDate, dir);
+ break;
+ case 1:
+ this.viewDate = this.moveDate(this.viewDate, dir);
+ break;
+ case 2:
+ this.viewDate = this.moveMonth(this.viewDate, dir);
+ break;
+ case 3:
+ case 4:
+ this.viewDate = this.moveYear(this.viewDate, dir);
+ break;
+ }
+ this.fill();
+ this.element.trigger({
+ type: target[0].className + ':' + this.convertViewModeText(this.viewMode),
+ date: this.viewDate,
+ startDate: this.startDate,
+ endDate: this.endDate
+ });
+ break;
+ case 'clear':
+ this.reset();
+ if (this.autoclose) {
+ this.hide();
+ }
+ break;
+ case 'today':
+ var date = new Date();
+ date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0);
+
+ // Respect startDate and endDate.
+ if (date < this.startDate) date = this.startDate;
+ else if (date > this.endDate) date = this.endDate;
+
+ this.viewMode = this.startViewMode;
+ this.showMode(0);
+ this._setDate(date);
+ this.fill();
+ if (this.autoclose) {
+ this.hide();
+ }
+ break;
+ }
+ break;
+ case 'span':
+ if (!target.is('.disabled')) {
+ var year = this.viewDate.getUTCFullYear(),
+ month = this.viewDate.getUTCMonth(),
+ day = this.viewDate.getUTCDate(),
+ hours = this.viewDate.getUTCHours(),
+ minutes = this.viewDate.getUTCMinutes(),
+ seconds = this.viewDate.getUTCSeconds();
+
+ if (target.is('.month')) {
+ this.viewDate.setUTCDate(1);
+ month = target.parent().find('span').index(target);
+ day = this.viewDate.getUTCDate();
+ this.viewDate.setUTCMonth(month);
+ this.element.trigger({
+ type: 'changeMonth',
+ date: this.viewDate
+ });
+ if (this.viewSelect >= 3) {
+ this._setDate(UTCDate(year, month, day, hours, minutes, seconds, 0));
+ }
+ } else if (target.is('.year')) {
+ this.viewDate.setUTCDate(1);
+ year = parseInt(target.text(), 10) || 0;
+ this.viewDate.setUTCFullYear(year);
+ this.element.trigger({
+ type: 'changeYear',
+ date: this.viewDate
+ });
+ if (this.viewSelect >= 4) {
+ this._setDate(UTCDate(year, month, day, hours, minutes, seconds, 0));
+ }
+ } else if (target.is('.hour')) {
+ hours = parseInt(target.text(), 10) || 0;
+ if (target.hasClass('hour_am') || target.hasClass('hour_pm')) {
+ if (hours === 12 && target.hasClass('hour_am')) {
+ hours = 0;
+ } else if (hours !== 12 && target.hasClass('hour_pm')) {
+ hours += 12;
+ }
+ }
+ this.viewDate.setUTCHours(hours);
+ this.element.trigger({
+ type: 'changeHour',
+ date: this.viewDate
+ });
+ if (this.viewSelect >= 1) {
+ this._setDate(UTCDate(year, month, day, hours, minutes, seconds, 0));
+ }
+ } else if (target.is('.minute')) {
+ minutes = parseInt(target.text().substr(target.text().indexOf(':') + 1), 10) || 0;
+ this.viewDate.setUTCMinutes(minutes);
+ this.element.trigger({
+ type: 'changeMinute',
+ date: this.viewDate
+ });
+ if (this.viewSelect >= 0) {
+ this._setDate(UTCDate(year, month, day, hours, minutes, seconds, 0));
+ }
+ }
+ if (this.viewMode !== 0) {
+ var oldViewMode = this.viewMode;
+ this.showMode(-1);
+ this.fill();
+ if (oldViewMode === this.viewMode && this.autoclose) {
+ this.hide();
+ }
+ } else {
+ this.fill();
+ if (this.autoclose) {
+ this.hide();
+ }
+ }
+ }
+ break;
+ case 'td':
+ if (target.is('.day') && !target.is('.disabled')) {
+ var day = parseInt(target.text(), 10) || 1;
+ var year = this.viewDate.getUTCFullYear(),
+ month = this.viewDate.getUTCMonth(),
+ hours = this.viewDate.getUTCHours(),
+ minutes = this.viewDate.getUTCMinutes(),
+ seconds = this.viewDate.getUTCSeconds();
+ if (target.is('.old')) {
+ if (month === 0) {
+ month = 11;
+ year -= 1;
+ } else {
+ month -= 1;
+ }
+ } else if (target.is('.new')) {
+ if (month === 11) {
+ month = 0;
+ year += 1;
+ } else {
+ month += 1;
+ }
+ }
+ this.viewDate.setUTCFullYear(year);
+ this.viewDate.setUTCMonth(month, day);
+ this.element.trigger({
+ type: 'changeDay',
+ date: this.viewDate
+ });
+ if (this.viewSelect >= 2) {
+ this._setDate(UTCDate(year, month, day, hours, minutes, seconds, 0));
+ }
+ }
+ var oldViewMode = this.viewMode;
+ this.showMode(-1);
+ this.fill();
+ if (oldViewMode === this.viewMode && this.autoclose) {
+ this.hide();
+ }
+ break;
+ }
+ }
+ },
+
+ _setDate: function (date, which) {
+ if (!which || which === 'date')
+ this.date = date;
+ if (!which || which === 'view')
+ this.viewDate = date;
+ this.fill();
+ this.setValue();
+ var element;
+ if (this.isInput) {
+ element = this.element;
+ } else if (this.component) {
+ element = this.element.find('input');
+ }
+ if (element) {
+ element.change();
+ }
+ this.element.trigger({
+ type: 'changeDate',
+ date: this.getDate()
+ });
+ if(date === null)
+ this.date = this.viewDate;
+ },
+
+ moveMinute: function (date, dir) {
+ if (!dir) return date;
+ var new_date = new Date(date.valueOf());
+ //dir = dir > 0 ? 1 : -1;
+ new_date.setUTCMinutes(new_date.getUTCMinutes() + (dir * this.minuteStep));
+ return new_date;
+ },
+
+ moveHour: function (date, dir) {
+ if (!dir) return date;
+ var new_date = new Date(date.valueOf());
+ //dir = dir > 0 ? 1 : -1;
+ new_date.setUTCHours(new_date.getUTCHours() + dir);
+ return new_date;
+ },
+
+ moveDate: function (date, dir) {
+ if (!dir) return date;
+ var new_date = new Date(date.valueOf());
+ //dir = dir > 0 ? 1 : -1;
+ new_date.setUTCDate(new_date.getUTCDate() + dir);
+ return new_date;
+ },
+
+ moveMonth: function (date, dir) {
+ if (!dir) return date;
+ var new_date = new Date(date.valueOf()),
+ day = new_date.getUTCDate(),
+ month = new_date.getUTCMonth(),
+ mag = Math.abs(dir),
+ new_month, test;
+ dir = dir > 0 ? 1 : -1;
+ if (mag === 1) {
+ test = dir === -1
+ // If going back one month, make sure month is not current month
+ // (eg, Mar 31 -> Feb 31 === Feb 28, not Mar 02)
+ ? function () {
+ return new_date.getUTCMonth() === month;
+ }
+ // If going forward one month, make sure month is as expected
+ // (eg, Jan 31 -> Feb 31 === Feb 28, not Mar 02)
+ : function () {
+ return new_date.getUTCMonth() !== new_month;
+ };
+ new_month = month + dir;
+ new_date.setUTCMonth(new_month);
+ // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11
+ if (new_month < 0 || new_month > 11)
+ new_month = (new_month + 12) % 12;
+ } else {
+ // For magnitudes >1, move one month at a time...
+ for (var i = 0; i < mag; i++)
+ // ...which might decrease the day (eg, Jan 31 to Feb 28, etc)...
+ new_date = this.moveMonth(new_date, dir);
+ // ...then reset the day, keeping it in the new month
+ new_month = new_date.getUTCMonth();
+ new_date.setUTCDate(day);
+ test = function () {
+ return new_month !== new_date.getUTCMonth();
+ };
+ }
+ // Common date-resetting loop -- if date is beyond end of month, make it
+ // end of month
+ while (test()) {
+ new_date.setUTCDate(--day);
+ new_date.setUTCMonth(new_month);
+ }
+ return new_date;
+ },
+
+ moveYear: function (date, dir) {
+ return this.moveMonth(date, dir * 12);
+ },
+
+ dateWithinRange: function (date) {
+ return date >= this.startDate && date <= this.endDate;
+ },
+
+ keydown: function (e) {
+ if (this.picker.is(':not(:visible)')) {
+ if (e.keyCode === 27) // allow escape to hide and re-show picker
+ this.show();
+ return;
+ }
+ var dateChanged = false,
+ dir, newDate, newViewDate;
+ switch (e.keyCode) {
+ case 27: // escape
+ this.hide();
+ e.preventDefault();
+ break;
+ case 37: // left
+ case 39: // right
+ if (!this.keyboardNavigation) break;
+ dir = e.keyCode === 37 ? -1 : 1;
+ var viewMode = this.viewMode;
+ if (e.ctrlKey) {
+ viewMode += 2;
+ } else if (e.shiftKey) {
+ viewMode += 1;
+ }
+ if (viewMode === 4) {
+ newDate = this.moveYear(this.date, dir);
+ newViewDate = this.moveYear(this.viewDate, dir);
+ } else if (viewMode === 3) {
+ newDate = this.moveMonth(this.date, dir);
+ newViewDate = this.moveMonth(this.viewDate, dir);
+ } else if (viewMode === 2) {
+ newDate = this.moveDate(this.date, dir);
+ newViewDate = this.moveDate(this.viewDate, dir);
+ } else if (viewMode === 1) {
+ newDate = this.moveHour(this.date, dir);
+ newViewDate = this.moveHour(this.viewDate, dir);
+ } else if (viewMode === 0) {
+ newDate = this.moveMinute(this.date, dir);
+ newViewDate = this.moveMinute(this.viewDate, dir);
+ }
+ if (this.dateWithinRange(newDate)) {
+ this.date = newDate;
+ this.viewDate = newViewDate;
+ this.setValue();
+ this.update();
+ e.preventDefault();
+ dateChanged = true;
+ }
+ break;
+ case 38: // up
+ case 40: // down
+ if (!this.keyboardNavigation) break;
+ dir = e.keyCode === 38 ? -1 : 1;
+ viewMode = this.viewMode;
+ if (e.ctrlKey) {
+ viewMode += 2;
+ } else if (e.shiftKey) {
+ viewMode += 1;
+ }
+ if (viewMode === 4) {
+ newDate = this.moveYear(this.date, dir);
+ newViewDate = this.moveYear(this.viewDate, dir);
+ } else if (viewMode === 3) {
+ newDate = this.moveMonth(this.date, dir);
+ newViewDate = this.moveMonth(this.viewDate, dir);
+ } else if (viewMode === 2) {
+ newDate = this.moveDate(this.date, dir * 7);
+ newViewDate = this.moveDate(this.viewDate, dir * 7);
+ } else if (viewMode === 1) {
+ if (this.showMeridian) {
+ newDate = this.moveHour(this.date, dir * 6);
+ newViewDate = this.moveHour(this.viewDate, dir * 6);
+ } else {
+ newDate = this.moveHour(this.date, dir * 4);
+ newViewDate = this.moveHour(this.viewDate, dir * 4);
+ }
+ } else if (viewMode === 0) {
+ newDate = this.moveMinute(this.date, dir * 4);
+ newViewDate = this.moveMinute(this.viewDate, dir * 4);
+ }
+ if (this.dateWithinRange(newDate)) {
+ this.date = newDate;
+ this.viewDate = newViewDate;
+ this.setValue();
+ this.update();
+ e.preventDefault();
+ dateChanged = true;
+ }
+ break;
+ case 13: // enter
+ if (this.viewMode !== 0) {
+ var oldViewMode = this.viewMode;
+ this.showMode(-1);
+ this.fill();
+ if (oldViewMode === this.viewMode && this.autoclose) {
+ this.hide();
+ }
+ } else {
+ this.fill();
+ if (this.autoclose) {
+ this.hide();
+ }
+ }
+ e.preventDefault();
+ break;
+ case 9: // tab
+ this.hide();
+ break;
+ }
+ if (dateChanged) {
+ var element;
+ if (this.isInput) {
+ element = this.element;
+ } else if (this.component) {
+ element = this.element.find('input');
+ }
+ if (element) {
+ element.change();
+ }
+ this.element.trigger({
+ type: 'changeDate',
+ date: this.getDate()
+ });
+ }
+ },
+
+ showMode: function (dir) {
+ if (dir) {
+ var newViewMode = Math.max(0, Math.min(DPGlobal.modes.length - 1, this.viewMode + dir));
+ if (newViewMode >= this.minView && newViewMode <= this.maxView) {
+ this.element.trigger({
+ type: 'changeMode',
+ date: this.viewDate,
+ oldViewMode: this.viewMode,
+ newViewMode: newViewMode
+ });
+
+ this.viewMode = newViewMode;
+ }
+ }
+ /*
+ vitalets: fixing bug of very special conditions:
+ jquery 1.7.1 + webkit + show inline datetimepicker in bootstrap popover.
+ Method show() does not set display css correctly and datetimepicker is not shown.
+ Changed to .css('display', 'block') solve the problem.
+ See https://github.com/vitalets/x-editable/issues/37
+
+ In jquery 1.7.2+ everything works fine.
+ */
+ //this.picker.find('>div').hide().filter('.datetimepicker-'+DPGlobal.modes[this.viewMode].clsName).show();
+ this.picker.find('>div').hide().filter('.datetimepicker-' + DPGlobal.modes[this.viewMode].clsName).css('display', 'block');
+ this.updateNavArrows();
+ },
+
+ reset: function () {
+ this._setDate(null, 'date');
+ },
+
+ convertViewModeText: function (viewMode) {
+ switch (viewMode) {
+ case 4:
+ return 'decade';
+ case 3:
+ return 'year';
+ case 2:
+ return 'month';
+ case 1:
+ return 'day';
+ case 0:
+ return 'hour';
+ }
+ }
+ };
+
+ var old = $.fn.datetimepicker;
+ $.fn.datetimepicker = function (option) {
+ var args = Array.apply(null, arguments);
+ args.shift();
+ var internal_return;
+ this.each(function () {
+ var $this = $(this),
+ data = $this.data('datetimepicker'),
+ options = typeof option === 'object' && option;
+ if (!data) {
+ $this.data('datetimepicker', (data = new Datetimepicker(this, $.extend({}, $.fn.datetimepicker.defaults, options))));
+ }
+ if (typeof option === 'string' && typeof data[option] === 'function') {
+ internal_return = data[option].apply(data, args);
+ if (internal_return !== undefined) {
+ return false;
+ }
+ }
+ });
+ if (internal_return !== undefined)
+ return internal_return;
+ else
+ return this;
+ };
+
+ $.fn.datetimepicker.defaults = {
+ };
+ $.fn.datetimepicker.Constructor = Datetimepicker;
+ var dates = $.fn.datetimepicker.dates = {
+ 'zh-cn': {
+ days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"],
+ daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
+ daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"],
+ months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
+ monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
+ meridiem: ["上午", "下午"],
+ suffix: ["st", "nd", "rd", "th"],
+ today: "今天",
+ clear: "清除"
+ },
+ en: {
+ days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],
+ daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
+ daysMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],
+ months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
+ monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ meridiem: ['am', 'pm'],
+ suffix: ['st', 'nd', 'rd', 'th'],
+ today: 'Today',
+ clear: 'Clear'
+ }
+ };
+
+ var DPGlobal = {
+ modes: [
+ {
+ clsName: 'minutes',
+ navFnc: 'Hours',
+ navStep: 1
+ },
+ {
+ clsName: 'hours',
+ navFnc: 'Date',
+ navStep: 1
+ },
+ {
+ clsName: 'days',
+ navFnc: 'Month',
+ navStep: 1
+ },
+ {
+ clsName: 'months',
+ navFnc: 'FullYear',
+ navStep: 1
+ },
+ {
+ clsName: 'years',
+ navFnc: 'FullYear',
+ navStep: 10
+ }
+ ],
+ isLeapYear: function (year) {
+ return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0))
+ },
+ getDaysInMonth: function (year, month) {
+ return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]
+ },
+ getDefaultFormat: function (type, field) {
+ if (type === 'standard') {
+ if (field === 'input')
+ return 'yyyy-mm-dd hh:ii';
+ else
+ return 'yyyy-mm-dd hh:ii:ss';
+ } else if (type === 'php') {
+ if (field === 'input')
+ return 'Y-m-d H:i';
+ else
+ return 'Y-m-d H:i:s';
+ } else {
+ throw new Error('Invalid format type.');
+ }
+ },
+ validParts: function (type) {
+ if (type === 'standard') {
+ return /t|hh?|HH?|p|P|z|Z|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;
+ } else if (type === 'php') {
+ return /[dDjlNwzFmMnStyYaABgGhHis]/g;
+ } else {
+ throw new Error('Invalid format type.');
+ }
+ },
+ nonpunctuation: /[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,
+ parseFormat: function (format, type) {
+ // IE treats \0 as a string end in inputs (truncating the value),
+ // so it's a bad format delimiter, anyway
+ var separators = format.replace(this.validParts(type), '\0').split('\0'),
+ parts = format.match(this.validParts(type));
+ if (!separators || !separators.length || !parts || parts.length === 0) {
+ throw new Error('Invalid date format.');
+ }
+ return {separators: separators, parts: parts};
+ },
+ parseDate: function (date, format, language, type, timezone) {
+ if (date instanceof Date) {
+ var dateUTC = new Date(date.valueOf() - date.getTimezoneOffset() * 60000);
+ dateUTC.setMilliseconds(0);
+ return dateUTC;
+ }
+ if (/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(date)) {
+ format = this.parseFormat('yyyy-mm-dd', type);
+ }
+ if (/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(date)) {
+ format = this.parseFormat('yyyy-mm-dd hh:ii', type);
+ }
+ if (/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(date)) {
+ format = this.parseFormat('yyyy-mm-dd hh:ii:ss', type);
+ }
+ if (/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(date)) {
+ var part_re = /([-+]\d+)([dmwy])/,
+ parts = date.match(/([-+]\d+)([dmwy])/g),
+ part, dir;
+ date = new Date();
+ for (var i = 0; i < parts.length; i++) {
+ part = part_re.exec(parts[i]);
+ dir = parseInt(part[1]);
+ switch (part[2]) {
+ case 'd':
+ date.setUTCDate(date.getUTCDate() + dir);
+ break;
+ case 'm':
+ date = Datetimepicker.prototype.moveMonth.call(Datetimepicker.prototype, date, dir);
+ break;
+ case 'w':
+ date.setUTCDate(date.getUTCDate() + dir * 7);
+ break;
+ case 'y':
+ date = Datetimepicker.prototype.moveYear.call(Datetimepicker.prototype, date, dir);
+ break;
+ }
+ }
+ return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), 0);
+ }
+ var parts = date && date.toString().match(this.nonpunctuation) || [],
+ date = new Date(0, 0, 0, 0, 0, 0, 0),
+ parsed = {},
+ setters_order = ['hh', 'h', 'ii', 'i', 'ss', 's', 'yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'D', 'DD', 'd', 'dd', 'H', 'HH', 'p', 'P', 'z', 'Z'],
+ setters_map = {
+ hh: function (d, v) {
+ return d.setUTCHours(v);
+ },
+ h: function (d, v) {
+ return d.setUTCHours(v);
+ },
+ HH: function (d, v) {
+ return d.setUTCHours(v === 12 ? 0 : v);
+ },
+ H: function (d, v) {
+ return d.setUTCHours(v === 12 ? 0 : v);
+ },
+ ii: function (d, v) {
+ return d.setUTCMinutes(v);
+ },
+ i: function (d, v) {
+ return d.setUTCMinutes(v);
+ },
+ ss: function (d, v) {
+ return d.setUTCSeconds(v);
+ },
+ s: function (d, v) {
+ return d.setUTCSeconds(v);
+ },
+ yyyy: function (d, v) {
+ return d.setUTCFullYear(v);
+ },
+ yy: function (d, v) {
+ return d.setUTCFullYear(2000 + v);
+ },
+ m: function (d, v) {
+ v -= 1;
+ while (v < 0) v += 12;
+ v %= 12;
+ d.setUTCMonth(v);
+ while (d.getUTCMonth() !== v)
+ if (isNaN(d.getUTCMonth()))
+ return d;
+ else
+ d.setUTCDate(d.getUTCDate() - 1);
+ return d;
+ },
+ d: function (d, v) {
+ return d.setUTCDate(v);
+ },
+ p: function (d, v) {
+ return d.setUTCHours(v === 1 ? d.getUTCHours() + 12 : d.getUTCHours());
+ },
+ z: function () {
+ return timezone
+ }
+ },
+ val, filtered, part;
+ setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m'];
+ setters_map['dd'] = setters_map['d'];
+ setters_map['P'] = setters_map['p'];
+ setters_map['Z'] = setters_map['z'];
+ date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds());
+ if (parts.length === format.parts.length) {
+ for (var i = 0, cnt = format.parts.length; i < cnt; i++) {
+ val = parseInt(parts[i], 10);
+ part = format.parts[i];
+ if (isNaN(val)) {
+ switch (part) {
+ case 'MM':
+ filtered = $(dates[language].months).filter(function () {
+ var m = this.slice(0, parts[i].length),
+ p = parts[i].slice(0, m.length);
+ return m === p;
+ });
+ val = $.inArray(filtered[0], dates[language].months) + 1;
+ break;
+ case 'M':
+ filtered = $(dates[language].monthsShort).filter(function () {
+ var m = this.slice(0, parts[i].length),
+ p = parts[i].slice(0, m.length);
+ return m.toLowerCase() === p.toLowerCase();
+ });
+ val = $.inArray(filtered[0], dates[language].monthsShort) + 1;
+ break;
+ case 'p':
+ case 'P':
+ val = $.inArray(parts[i].toLowerCase(), dates[language].meridiem);
+ break;
+ case 'z':
+ case 'Z':
+ timezone;
+ break;
+
+ }
+ }
+ parsed[part] = val;
+ }
+ for (var i = 0, s; i < setters_order.length; i++) {
+ s = setters_order[i];
+ if (s in parsed && !isNaN(parsed[s]))
+ setters_map[s](date, parsed[s])
+ }
+ }
+ return date;
+ },
+ formatDate: function (date, format, language, type, timezone) {
+ if (date === null) {
+ return '';
+ }
+ var val;
+ if (type === 'standard') {
+ val = {
+ t: date.getTime(),
+ // year
+ yy: date.getUTCFullYear().toString().substring(2),
+ yyyy: date.getUTCFullYear(),
+ // month
+ m: date.getUTCMonth() + 1,
+ M: dates[language].monthsShort[date.getUTCMonth()],
+ MM: dates[language].months[date.getUTCMonth()],
+ // day
+ d: date.getUTCDate(),
+ D: dates[language].daysShort[date.getUTCDay()],
+ DD: dates[language].days[date.getUTCDay()],
+ p: (dates[language].meridiem.length === 2 ? dates[language].meridiem[date.getUTCHours() < 12 ? 0 : 1] : ''),
+ // hour
+ h: date.getUTCHours(),
+ // minute
+ i: date.getUTCMinutes(),
+ // second
+ s: date.getUTCSeconds(),
+ // timezone
+ z: timezone
+ };
+
+ if (dates[language].meridiem.length === 2) {
+ val.H = (val.h % 12 === 0 ? 12 : val.h % 12);
+ }
+ else {
+ val.H = val.h;
+ }
+ val.HH = (val.H < 10 ? '0' : '') + val.H;
+ val.P = val.p.toUpperCase();
+ val.Z = val.z;
+ val.hh = (val.h < 10 ? '0' : '') + val.h;
+ val.ii = (val.i < 10 ? '0' : '') + val.i;
+ val.ss = (val.s < 10 ? '0' : '') + val.s;
+ val.dd = (val.d < 10 ? '0' : '') + val.d;
+ val.mm = (val.m < 10 ? '0' : '') + val.m;
+ } else if (type === 'php') {
+ // php format
+ val = {
+ // year
+ y: date.getUTCFullYear().toString().substring(2),
+ Y: date.getUTCFullYear(),
+ // month
+ F: dates[language].months[date.getUTCMonth()],
+ M: dates[language].monthsShort[date.getUTCMonth()],
+ n: date.getUTCMonth() + 1,
+ t: DPGlobal.getDaysInMonth(date.getUTCFullYear(), date.getUTCMonth()),
+ // day
+ j: date.getUTCDate(),
+ l: dates[language].days[date.getUTCDay()],
+ D: dates[language].daysShort[date.getUTCDay()],
+ w: date.getUTCDay(), // 0 -> 6
+ N: (date.getUTCDay() === 0 ? 7 : date.getUTCDay()), // 1 -> 7
+ S: (date.getUTCDate() % 10 <= dates[language].suffix.length ? dates[language].suffix[date.getUTCDate() % 10 - 1] : ''),
+ // hour
+ a: (dates[language].meridiem.length === 2 ? dates[language].meridiem[date.getUTCHours() < 12 ? 0 : 1] : ''),
+ g: (date.getUTCHours() % 12 === 0 ? 12 : date.getUTCHours() % 12),
+ G: date.getUTCHours(),
+ // minute
+ i: date.getUTCMinutes(),
+ // second
+ s: date.getUTCSeconds()
+ };
+ val.m = (val.n < 10 ? '0' : '') + val.n;
+ val.d = (val.j < 10 ? '0' : '') + val.j;
+ val.A = val.a.toString().toUpperCase();
+ val.h = (val.g < 10 ? '0' : '') + val.g;
+ val.H = (val.G < 10 ? '0' : '') + val.G;
+ val.i = (val.i < 10 ? '0' : '') + val.i;
+ val.s = (val.s < 10 ? '0' : '') + val.s;
+ } else {
+ throw new Error('Invalid format type.');
+ }
+ var date = [],
+ seps = $.extend([], format.separators);
+ for (var i = 0, cnt = format.parts.length; i < cnt; i++) {
+ if (seps.length) {
+ date.push(seps.shift());
+ }
+ date.push(val[format.parts[i]]);
+ }
+ if (seps.length) {
+ date.push(seps.shift());
+ }
+ return date.join('');
+ },
+ convertViewMode: function (viewMode) {
+ switch (viewMode) {
+ case 4:
+ case 'decade':
+ viewMode = 4;
+ break;
+ case 3:
+ case 'year':
+ viewMode = 3;
+ break;
+ case 2:
+ case 'month':
+ viewMode = 2;
+ break;
+ case 1:
+ case 'day':
+ viewMode = 1;
+ break;
+ case 0:
+ case 'hour':
+ viewMode = 0;
+ break;
+ }
+
+ return viewMode;
+ },
+ headTemplate: '' +
+ '' +
+ ' | ' +
+ ' | ' +
+ ' | ' +
+ '
' +
+ '',
+ headTemplateV3: '' +
+ '' +
+ '| | ' +
+ ' | ' +
+ ' | ' +
+ '
' +
+ '',
+ contTemplate: ' |
',
+ footTemplate: '' +
+ ' |
' +
+ ' |
' +
+ ''
+ };
+ DPGlobal.template = '' +
+ '
' +
+ '
' +
+ DPGlobal.headTemplate +
+ DPGlobal.contTemplate +
+ DPGlobal.footTemplate +
+ '
' +
+ '
' +
+ '
' +
+ '
' +
+ DPGlobal.headTemplate +
+ DPGlobal.contTemplate +
+ DPGlobal.footTemplate +
+ '
' +
+ '
' +
+ '
' +
+ '
' +
+ DPGlobal.headTemplate +
+ '' +
+ DPGlobal.footTemplate +
+ '
' +
+ '
' +
+ '
' +
+ '
' +
+ DPGlobal.headTemplate +
+ DPGlobal.contTemplate +
+ DPGlobal.footTemplate +
+ '
' +
+ '
' +
+ '
' +
+ '
' +
+ DPGlobal.headTemplate +
+ DPGlobal.contTemplate +
+ DPGlobal.footTemplate +
+ '
' +
+ '
' +
+ '
';
+ DPGlobal.templateV3 = '' +
+ '
' +
+ '
' +
+ DPGlobal.headTemplateV3 +
+ DPGlobal.contTemplate +
+ DPGlobal.footTemplate +
+ '
' +
+ '
' +
+ '
' +
+ '
' +
+ DPGlobal.headTemplateV3 +
+ DPGlobal.contTemplate +
+ DPGlobal.footTemplate +
+ '
' +
+ '
' +
+ '
' +
+ '
' +
+ DPGlobal.headTemplateV3 +
+ '' +
+ DPGlobal.footTemplate +
+ '
' +
+ '
' +
+ '
' +
+ '
' +
+ DPGlobal.headTemplateV3 +
+ DPGlobal.contTemplate +
+ DPGlobal.footTemplate +
+ '
' +
+ '
' +
+ '
' +
+ '
' +
+ DPGlobal.headTemplateV3 +
+ DPGlobal.contTemplate +
+ DPGlobal.footTemplate +
+ '
' +
+ '
' +
+ '
';
+ $.fn.datetimepicker.DPGlobal = DPGlobal;
+
+ /* DATETIMEPICKER NO CONFLICT
+ * =================== */
+
+ $.fn.datetimepicker.noConflict = function () {
+ $.fn.datetimepicker = old;
+ return this;
+ };
+
+ /* DATETIMEPICKER DATA-API
+ * ================== */
+
+ $(document).on(
+ 'focus.datetimepicker.data-api click.datetimepicker.data-api',
+ '[data-provide="datetimepicker"]',
+ function (e) {
+ var $this = $(this);
+ if ($this.data('datetimepicker')) return;
+ e.preventDefault();
+ // component click requires us to explicitly show it
+ $this.datetimepicker('show');
+ }
+ );
+ $(function () {
+ $('[data-provide="datetimepicker-inline"]').datetimepicker();
+ });
+
+}));
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.css b/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.css
new file mode 100644
index 000000000..78485fee7
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.css
@@ -0,0 +1,9 @@
+/*!
+ * Datetimepicker for Bootstrap
+ *
+ * Copyright 2012 Stefan Petre
+ * Improvements by Andrew Rowls
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */.datetimepicker{padding:4px;margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;direction:ltr}.datetimepicker-inline{width:220px}.datetimepicker.datetimepicker-rtl{direction:rtl}.datetimepicker.datetimepicker-rtl table tr td span{float:right}.datetimepicker-dropdown,.datetimepicker-dropdown-left{top:0;left:0}[class*=" datetimepicker-dropdown"]:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);position:absolute}[class*=" datetimepicker-dropdown"]:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute}[class*=" datetimepicker-dropdown-top"]:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,0.2);border-bottom:0}[class*=" datetimepicker-dropdown-top"]:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;border-bottom:0}.datetimepicker-dropdown-bottom-left:before{top:-7px;right:6px}.datetimepicker-dropdown-bottom-left:after{top:-6px;right:7px}.datetimepicker-dropdown-bottom-right:before{top:-7px;left:6px}.datetimepicker-dropdown-bottom-right:after{top:-6px;left:7px}.datetimepicker-dropdown-top-left:before{bottom:-7px;right:6px}.datetimepicker-dropdown-top-left:after{bottom:-6px;right:7px}.datetimepicker-dropdown-top-right:before{bottom:-7px;left:6px}.datetimepicker-dropdown-top-right:after{bottom:-6px;left:7px}.datetimepicker>div{display:none}.datetimepicker.minutes div.datetimepicker-minutes{display:block}.datetimepicker.hours div.datetimepicker-hours{display:block}.datetimepicker.days div.datetimepicker-days{display:block}.datetimepicker.months div.datetimepicker-months{display:block}.datetimepicker.years div.datetimepicker-years{display:block}.datetimepicker table{margin:0}.datetimepicker td,.datetimepicker th{text-align:center;width:20px;height:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border:0}.table-striped .datetimepicker table tr td,.table-striped .datetimepicker table tr th{background-color:transparent}.datetimepicker table tr td.minute:hover{background:#eee;cursor:pointer}.datetimepicker table tr td.hour:hover{background:#eee;cursor:pointer}.datetimepicker table tr td.day:hover{background:#eee;cursor:pointer}.datetimepicker table tr td.old,.datetimepicker table tr td.new{color:#999}.datetimepicker table tr td.disabled,.datetimepicker table tr td.disabled:hover{background:0;color:#999;cursor:default}.datetimepicker table tr td.today,.datetimepicker table tr td.today:hover,.datetimepicker table tr td.today.disabled,.datetimepicker table tr td.today.disabled:hover{background-color:#fde19a;background-image:-moz-linear-gradient(top,#fdd49a,#fdf59a);background-image:-ms-linear-gradient(top,#fdd49a,#fdf59a);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fdd49a),to(#fdf59a));background-image:-webkit-linear-gradient(top,#fdd49a,#fdf59a);background-image:-o-linear-gradient(top,#fdd49a,#fdf59a);background-image:linear-gradient(to bottom,#fdd49a,#fdf59a);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a',endColorstr='#fdf59a',GradientType=0);border-color:#fdf59a #fdf59a #fbed50;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.datetimepicker table tr td.today:hover,.datetimepicker table tr td.today:hover:hover,.datetimepicker table tr td.today.disabled:hover,.datetimepicker table tr td.today.disabled:hover:hover,.datetimepicker table tr td.today:active,.datetimepicker table tr td.today:hover:active,.datetimepicker table tr td.today.disabled:active,.datetimepicker table tr td.today.disabled:hover:active,.datetimepicker table tr td.today.active,.datetimepicker table tr td.today:hover.active,.datetimepicker table tr td.today.disabled.active,.datetimepicker table tr td.today.disabled:hover.active,.datetimepicker table tr td.today.disabled,.datetimepicker table tr td.today:hover.disabled,.datetimepicker table tr td.today.disabled.disabled,.datetimepicker table tr td.today.disabled:hover.disabled,.datetimepicker table tr td.today[disabled],.datetimepicker table tr td.today:hover[disabled],.datetimepicker table tr td.today.disabled[disabled],.datetimepicker table tr td.today.disabled:hover[disabled]{background-color:#fdf59a}.datetimepicker table tr td.today:active,.datetimepicker table tr td.today:hover:active,.datetimepicker table tr td.today.disabled:active,.datetimepicker table tr td.today.disabled:hover:active,.datetimepicker table tr td.today.active,.datetimepicker table tr td.today:hover.active,.datetimepicker table tr td.today.disabled.active,.datetimepicker table tr td.today.disabled:hover.active{background-color:#fbf069}.datetimepicker table tr td.active,.datetimepicker table tr td.active:hover,.datetimepicker table tr td.active.disabled,.datetimepicker table tr td.active.disabled:hover{background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-ms-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',endColorstr='#0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.datetimepicker table tr td.active:hover,.datetimepicker table tr td.active:hover:hover,.datetimepicker table tr td.active.disabled:hover,.datetimepicker table tr td.active.disabled:hover:hover,.datetimepicker table tr td.active:active,.datetimepicker table tr td.active:hover:active,.datetimepicker table tr td.active.disabled:active,.datetimepicker table tr td.active.disabled:hover:active,.datetimepicker table tr td.active.active,.datetimepicker table tr td.active:hover.active,.datetimepicker table tr td.active.disabled.active,.datetimepicker table tr td.active.disabled:hover.active,.datetimepicker table tr td.active.disabled,.datetimepicker table tr td.active:hover.disabled,.datetimepicker table tr td.active.disabled.disabled,.datetimepicker table tr td.active.disabled:hover.disabled,.datetimepicker table tr td.active[disabled],.datetimepicker table tr td.active:hover[disabled],.datetimepicker table tr td.active.disabled[disabled],.datetimepicker table tr td.active.disabled:hover[disabled]{background-color:#04c}.datetimepicker table tr td.active:active,.datetimepicker table tr td.active:hover:active,.datetimepicker table tr td.active.disabled:active,.datetimepicker table tr td.active.disabled:hover:active,.datetimepicker table tr td.active.active,.datetimepicker table tr td.active:hover.active,.datetimepicker table tr td.active.disabled.active,.datetimepicker table tr td.active.disabled:hover.active{background-color:#039}.datetimepicker table tr td span{display:block;width:23%;height:54px;line-height:54px;float:left;margin:1%;cursor:pointer;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.datetimepicker .datetimepicker-hours span{height:26px;line-height:26px}.datetimepicker .datetimepicker-hours table tr td span.hour_am,.datetimepicker .datetimepicker-hours table tr td span.hour_pm{width:14.6%}.datetimepicker .datetimepicker-hours fieldset legend,.datetimepicker .datetimepicker-minutes fieldset legend{margin-bottom:inherit;line-height:30px}.datetimepicker .datetimepicker-minutes span{height:26px;line-height:26px}.datetimepicker table tr td span:hover{background:#eee}.datetimepicker table tr td span.disabled,.datetimepicker table tr td span.disabled:hover{background:0;color:#999;cursor:default}.datetimepicker table tr td span.active,.datetimepicker table tr td span.active:hover,.datetimepicker table tr td span.active.disabled,.datetimepicker table tr td span.active.disabled:hover{background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-ms-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',endColorstr='#0044cc',GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.datetimepicker table tr td span.active:hover,.datetimepicker table tr td span.active:hover:hover,.datetimepicker table tr td span.active.disabled:hover,.datetimepicker table tr td span.active.disabled:hover:hover,.datetimepicker table tr td span.active:active,.datetimepicker table tr td span.active:hover:active,.datetimepicker table tr td span.active.disabled:active,.datetimepicker table tr td span.active.disabled:hover:active,.datetimepicker table tr td span.active.active,.datetimepicker table tr td span.active:hover.active,.datetimepicker table tr td span.active.disabled.active,.datetimepicker table tr td span.active.disabled:hover.active,.datetimepicker table tr td span.active.disabled,.datetimepicker table tr td span.active:hover.disabled,.datetimepicker table tr td span.active.disabled.disabled,.datetimepicker table tr td span.active.disabled:hover.disabled,.datetimepicker table tr td span.active[disabled],.datetimepicker table tr td span.active:hover[disabled],.datetimepicker table tr td span.active.disabled[disabled],.datetimepicker table tr td span.active.disabled:hover[disabled]{background-color:#04c}.datetimepicker table tr td span.active:active,.datetimepicker table tr td span.active:hover:active,.datetimepicker table tr td span.active.disabled:active,.datetimepicker table tr td span.active.disabled:hover:active,.datetimepicker table tr td span.active.active,.datetimepicker table tr td span.active:hover.active,.datetimepicker table tr td span.active.disabled.active,.datetimepicker table tr td span.active.disabled:hover.active{background-color:#039}.datetimepicker table tr td span.old{color:#999}.datetimepicker th.switch{width:145px}.datetimepicker th span.glyphicon{pointer-events:none}.datetimepicker thead tr:first-child th,.datetimepicker tfoot th{cursor:pointer}.datetimepicker thead tr:first-child th:hover,.datetimepicker tfoot th:hover{background:#eee}.input-append.date .add-on i,.input-prepend.date .add-on i,.input-group.date .input-group-addon span{cursor:pointer;width:14px;height:14px}
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.js b/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.js
new file mode 100644
index 000000000..7756ee5c2
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.js
@@ -0,0 +1 @@
+(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else{if(typeof exports==="object"){factory(require("jquery"))}else{factory(jQuery)}}}(function($,undefined){if(!("indexOf" in Array.prototype)){Array.prototype.indexOf=function(find,i){if(i===undefined){i=0}if(i<0){i+=this.length}if(i<0){i=0}for(var n=this.length;ithis.endDate){res.push("disabled")}else{if(Math.floor(this.date.getUTCMinutes()/this.minuteStep)===Math.floor(date.getUTCMinutes()/this.minuteStep)){res.push("active")}}return res.concat((render?render:[]))};this.onRenderYear=function(date){var render=(options.onRenderYear||function(){return[]})(date);var res=["year"];if(typeof render==="string"){render=[render]}if(this.date.getUTCFullYear()===date.getUTCFullYear()){res.push("active")}var currentYear=date.getUTCFullYear();var endYear=this.endDate.getUTCFullYear();if(dateendYear){res.push("disabled")}return res.concat((render?render:[]))};this.onRenderMonth=function(date){var render=(options.onRenderMonth||function(){return[]})(date);var res=["month"];if(typeof render==="string"){render=[render]}return res.concat((render?render:[]))};this.startDate=new Date(-8639968443048000);this.endDate=new Date(8639968443048000);this.datesDisabled=[];this.daysOfWeekDisabled=[];this.setStartDate(options.startDate||this.element.data("date-startdate"));this.setEndDate(options.endDate||this.element.data("date-enddate"));this.setDatesDisabled(options.datesDisabled||this.element.data("date-dates-disabled"));this.setDaysOfWeekDisabled(options.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled"));this.setMinutesDisabled(options.minutesDisabled||this.element.data("date-minute-disabled"));this.setHoursDisabled(options.hoursDisabled||this.element.data("date-hour-disabled"));this.fillDow();this.fillMonths();this.update();this.showMode();if(this.isInline){this.show()}};Datetimepicker.prototype={constructor:Datetimepicker,_events:[],_attachEvents:function(){this._detachEvents();if(this.isInput){this._events=[[this.element,{focus:$.proxy(this.show,this),keyup:$.proxy(this.update,this),keydown:$.proxy(this.keydown,this)}]]}else{if(this.component&&this.hasInput){this._events=[[this.element.find("input"),{focus:$.proxy(this.show,this),keyup:$.proxy(this.update,this),keydown:$.proxy(this.keydown,this)}],[this.component,{click:$.proxy(this.show,this)}]];if(this.componentReset){this._events.push([this.componentReset,{click:$.proxy(this.reset,this)}])}}else{if(this.element.is("div")){this.isInline=true}else{this._events=[[this.element,{click:$.proxy(this.show,this)}]]}}}for(var i=0,el,ev;i=this.startDate&&d<=this.endDate){this.date=d;this.setValue();this.viewDate=this.date;this.fill()}else{this.element.trigger({type:"outOfRange",date:d,startDate:this.startDate,endDate:this.endDate})}},setFormat:function(format){this.format=DPGlobal.parseFormat(format,this.formatType);var element;if(this.isInput){element=this.element}else{if(this.component){element=this.element.find("input")}}if(element&&element.val()){this.setValue()}},setValue:function(){var formatted=this.getFormattedDate();if(!this.isInput){if(this.component){this.element.find("input").val(formatted)}this.element.data("date",formatted)}else{this.element.val(formatted)}if(this.linkField){$("#"+this.linkField).val(this.getFormattedDate(this.linkFormat))}},getFormattedDate:function(format){format=format||this.format;return DPGlobal.formatDate(this.date,format,this.language,this.formatType,this.timezone)},setStartDate:function(startDate){this.startDate=startDate||this.startDate;if(this.startDate.valueOf()!==8639968443048000){this.startDate=DPGlobal.parseDate(this.startDate,this.format,this.language,this.formatType,this.timezone)}this.update();this.updateNavArrows()},setEndDate:function(endDate){this.endDate=endDate||this.endDate;if(this.endDate.valueOf()!==8639968443048000){this.endDate=DPGlobal.parseDate(this.endDate,this.format,this.language,this.formatType,this.timezone)}this.update();this.updateNavArrows()},setDatesDisabled:function(datesDisabled){this.datesDisabled=datesDisabled||[];if(!$.isArray(this.datesDisabled)){this.datesDisabled=this.datesDisabled.split(/,\s*/)}var mThis=this;this.datesDisabled=$.map(this.datesDisabled,function(d){return DPGlobal.parseDate(d,mThis.format,mThis.language,mThis.formatType,mThis.timezone).toDateString()});this.update();this.updateNavArrows()},setTitle:function(selector,value){return this.picker.find(selector).find("th:eq(1)").text(this.title===false?value:this.title)},setDaysOfWeekDisabled:function(daysOfWeekDisabled){this.daysOfWeekDisabled=daysOfWeekDisabled||[];if(!$.isArray(this.daysOfWeekDisabled)){this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)}this.daysOfWeekDisabled=$.map(this.daysOfWeekDisabled,function(d){return parseInt(d,10)});this.update();this.updateNavArrows()},setMinutesDisabled:function(minutesDisabled){this.minutesDisabled=minutesDisabled||[];if(!$.isArray(this.minutesDisabled)){this.minutesDisabled=this.minutesDisabled.split(/,\s*/)}this.minutesDisabled=$.map(this.minutesDisabled,function(d){return parseInt(d,10)});this.update();this.updateNavArrows()},setHoursDisabled:function(hoursDisabled){this.hoursDisabled=hoursDisabled||[];if(!$.isArray(this.hoursDisabled)){this.hoursDisabled=this.hoursDisabled.split(/,\s*/)}this.hoursDisabled=$.map(this.hoursDisabled,function(d){return parseInt(d,10)});this.update();this.updateNavArrows()},place:function(){if(this.isInline){return}if(!this.zIndex){var index_highest=0;$("div").each(function(){var index_current=parseInt($(this).css("zIndex"),10);if(index_current>index_highest){index_highest=index_current}});this.zIndex=index_highest+10}var offset,top,left,containerOffset;if(this.container instanceof $){containerOffset=this.container.offset()}else{containerOffset=$(this.container).offset()}if(this.component){offset=this.component.offset();left=offset.left;if(this.pickerPosition==="bottom-left"||this.pickerPosition==="top-left"){left+=this.component.outerWidth()-this.picker.outerWidth()}}else{offset=this.element.offset();left=offset.left;if(this.pickerPosition==="bottom-left"||this.pickerPosition==="top-left"){left+=this.element.outerWidth()-this.picker.outerWidth()}}var bodyWidth=document.body.clientWidth||window.innerWidth;if(left+220>bodyWidth){left=bodyWidth-220}if(this.pickerPosition==="top-left"||this.pickerPosition==="top-right"){top=offset.top-this.picker.outerHeight()}else{top=offset.top+this.height}top=top-containerOffset.top;left=left-containerOffset.left;this.picker.css({top:top,left:left,zIndex:this.zIndex})},hour_minute:"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]",update:function(){var date,fromArgs=false;if(arguments&&arguments.length&&(typeof arguments[0]==="string"||arguments[0] instanceof Date)){date=arguments[0];fromArgs=true}else{date=(this.isInput?this.element.val():this.element.find("input").val())||this.element.data("date")||this.initialDate;if(typeof date==="string"){date=date.replace(/^\s+|\s+$/g,"")}}if(!date){date=new Date();fromArgs=false}if(typeof date==="string"){if(new RegExp(this.hour_minute).test(date)||new RegExp(this.hour_minute+":[0-5][0-9]").test(date)){date=this.getDate()}}this.date=DPGlobal.parseDate(date,this.format,this.language,this.formatType,this.timezone);if(fromArgs){this.setValue()}if(this.datethis.endDate){this.viewDate=new Date(this.endDate)}else{this.viewDate=new Date(this.date)}}this.fill()},fillDow:function(){var dowCnt=this.weekStart,html="";while(dowCnt'+dates[this.language].daysMin[(dowCnt++)%7]+""}html+="
";this.picker.find(".datetimepicker-days thead").append(html)},fillMonths:function(){var html="";var d=new Date(this.viewDate);for(var i=0;i<12;i++){d.setUTCMonth(i);var classes=this.onRenderMonth(d);html+=''+dates[this.language].monthsShort[i]+""}this.picker.find(".datetimepicker-months td").html(html)},fill:function(){if(!this.date||!this.viewDate){return}var d=new Date(this.viewDate),year=d.getUTCFullYear(),month=d.getUTCMonth(),dayMonth=d.getUTCDate(),hours=d.getUTCHours(),startYear=this.startDate.getUTCFullYear(),startMonth=this.startDate.getUTCMonth(),endYear=this.endDate.getUTCFullYear(),endMonth=this.endDate.getUTCMonth()+1,currentDate=(new UTCDate(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate())).valueOf(),today=new Date();this.setTitle(".datetimepicker-days",dates[this.language].months[month]+" "+year);if(this.formatViewType==="time"){var formatted=this.getFormattedDate();this.setTitle(".datetimepicker-hours",formatted);this.setTitle(".datetimepicker-minutes",formatted)}else{this.setTitle(".datetimepicker-hours",dayMonth+" "+dates[this.language].months[month]+" "+year);this.setTitle(".datetimepicker-minutes",dayMonth+" "+dates[this.language].months[month]+" "+year)}this.picker.find("tfoot th.today").text(dates[this.language].today||dates["en"].today).toggle(this.todayBtn!==false);this.picker.find("tfoot th.clear").text(dates[this.language].clear||dates["en"].clear).toggle(this.clearBtn!==false);this.updateNavArrows();this.fillMonths();var prevMonth=UTCDate(year,month-1,28,0,0,0,0),day=DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(),prevMonth.getUTCMonth());prevMonth.setUTCDate(day);prevMonth.setUTCDate(day-(prevMonth.getUTCDay()-this.weekStart+7)%7);var nextMonth=new Date(prevMonth);nextMonth.setUTCDate(nextMonth.getUTCDate()+42);nextMonth=nextMonth.valueOf();var html=[];var classes;while(prevMonth.valueOf()")}classes=this.onRenderDay(prevMonth);if(prevMonth.getUTCFullYear()year||(prevMonth.getUTCFullYear()===year&&prevMonth.getUTCMonth()>month)){classes.push("new")}}if(this.todayHighlight&&prevMonth.getUTCFullYear()===today.getFullYear()&&prevMonth.getUTCMonth()===today.getMonth()&&prevMonth.getUTCDate()===today.getDate()){classes.push("today")}if(prevMonth.valueOf()===currentDate){classes.push("active")}if((prevMonth.valueOf()+86400000)<=this.startDate||prevMonth.valueOf()>this.endDate||$.inArray(prevMonth.getUTCDay(),this.daysOfWeekDisabled)!==-1||$.inArray(prevMonth.toDateString(),this.datesDisabled)!==-1){classes.push("disabled")}html.push(''+prevMonth.getUTCDate()+" | ");if(prevMonth.getUTCDay()===this.weekEnd){html.push("")}prevMonth.setUTCDate(prevMonth.getUTCDate()+1)}this.picker.find(".datetimepicker-days tbody").empty().append(html.join(""));html=[];var txt="",meridian="",meridianOld="";var hoursDisabled=this.hoursDisabled||[];d=new Date(this.viewDate);for(var i=0;i<24;i++){d.setUTCHours(i);classes=this.onRenderHour(d);if(hoursDisabled.indexOf(i)!==-1){classes.push("disabled")}var actual=UTCDate(year,month,dayMonth,i);if((actual.valueOf()+3600000)<=this.startDate||actual.valueOf()>this.endDate){classes.push("disabled")}else{if(hours===i){classes.push("active")}}if(this.showMeridian&&dates[this.language].meridiem.length===2){meridian=(i<12?dates[this.language].meridiem[0]:dates[this.language].meridiem[1]);if(meridian!==meridianOld){if(meridianOld!==""){html.push("")}html.push('")}}else{txt=i+":00";html.push(''+txt+"")}}this.picker.find(".datetimepicker-hours td").html(html.join(""));html=[];txt="";meridian="";meridianOld="";var minutesDisabled=this.minutesDisabled||[];d=new Date(this.viewDate);for(var i=0;i<60;i+=this.minuteStep){if(minutesDisabled.indexOf(i)!==-1){continue}d.setUTCMinutes(i);d.setUTCSeconds(0);classes=this.onRenderMinute(d);if(this.showMeridian&&dates[this.language].meridiem.length===2){meridian=(hours<12?dates[this.language].meridiem[0]:dates[this.language].meridiem[1]);if(meridian!==meridianOld){if(meridianOld!==""){html.push("")}html.push('")}}else{txt=i+":00";html.push(''+hours+":"+(i<10?"0"+i:i)+"")}}this.picker.find(".datetimepicker-minutes td").html(html.join(""));var currentYear=this.date.getUTCFullYear();var months=this.setTitle(".datetimepicker-months",year).end().find(".month").removeClass("active");if(currentYear===year){months.eq(this.date.getUTCMonth()).addClass("active")}if(yearendYear){months.addClass("disabled")}if(year===startYear){months.slice(0,startMonth).addClass("disabled")}if(year===endYear){months.slice(endMonth).addClass("disabled")}html="";year=parseInt(year/10,10)*10;var yearCont=this.setTitle(".datetimepicker-years",year+"-"+(year+9)).end().find("td");year-=1;d=new Date(this.viewDate);for(var i=-1;i<11;i++){d.setUTCFullYear(year);classes=this.onRenderYear(d);if(i===-1||i===10){classes.push(old)}html+=''+year+"";year+=1}yearCont.html(html);this.place()},updateNavArrows:function(){var d=new Date(this.viewDate),year=d.getUTCFullYear(),month=d.getUTCMonth(),day=d.getUTCDate(),hour=d.getUTCHours();switch(this.viewMode){case 0:if(year<=this.startDate.getUTCFullYear()&&month<=this.startDate.getUTCMonth()&&day<=this.startDate.getUTCDate()&&hour<=this.startDate.getUTCHours()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(year>=this.endDate.getUTCFullYear()&&month>=this.endDate.getUTCMonth()&&day>=this.endDate.getUTCDate()&&hour>=this.endDate.getUTCHours()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 1:if(year<=this.startDate.getUTCFullYear()&&month<=this.startDate.getUTCMonth()&&day<=this.startDate.getUTCDate()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(year>=this.endDate.getUTCFullYear()&&month>=this.endDate.getUTCMonth()&&day>=this.endDate.getUTCDate()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 2:if(year<=this.startDate.getUTCFullYear()&&month<=this.startDate.getUTCMonth()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(year>=this.endDate.getUTCFullYear()&&month>=this.endDate.getUTCMonth()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 3:case 4:if(year<=this.startDate.getUTCFullYear()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(year>=this.endDate.getUTCFullYear()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break}},mousewheel:function(e){e.preventDefault();e.stopPropagation();if(this.wheelPause){return}this.wheelPause=true;var originalEvent=e.originalEvent;var delta=originalEvent.wheelDelta;var mode=delta>0?1:(delta===0)?0:-1;if(this.wheelViewModeNavigationInverseDirection){mode=-mode}this.showMode(mode);setTimeout($.proxy(function(){this.wheelPause=false},this),this.wheelViewModeNavigationDelay)},click:function(e){e.stopPropagation();e.preventDefault();var target=$(e.target).closest("span, td, th, legend");if(target.is("."+this.icontype)){target=$(target).parent().closest("span, td, th, legend")}if(target.length===1){if(target.is(".disabled")){this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});return}switch(target[0].nodeName.toLowerCase()){case"th":switch(target[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var dir=DPGlobal.modes[this.viewMode].navStep*(target[0].className==="prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,dir);break;case 1:this.viewDate=this.moveDate(this.viewDate,dir);break;case 2:this.viewDate=this.moveMonth(this.viewDate,dir);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,dir);break}this.fill();this.element.trigger({type:target[0].className+":"+this.convertViewModeText(this.viewMode),date:this.viewDate,startDate:this.startDate,endDate:this.endDate});break;case"clear":this.reset();if(this.autoclose){this.hide()}break;case"today":var date=new Date();date=UTCDate(date.getFullYear(),date.getMonth(),date.getDate(),date.getHours(),date.getMinutes(),date.getSeconds(),0);if(datethis.endDate){date=this.endDate}}this.viewMode=this.startViewMode;this.showMode(0);this._setDate(date);this.fill();if(this.autoclose){this.hide()}break}break;case"span":if(!target.is(".disabled")){var year=this.viewDate.getUTCFullYear(),month=this.viewDate.getUTCMonth(),day=this.viewDate.getUTCDate(),hours=this.viewDate.getUTCHours(),minutes=this.viewDate.getUTCMinutes(),seconds=this.viewDate.getUTCSeconds();if(target.is(".month")){this.viewDate.setUTCDate(1);month=target.parent().find("span").index(target);day=this.viewDate.getUTCDate();this.viewDate.setUTCMonth(month);this.element.trigger({type:"changeMonth",date:this.viewDate});if(this.viewSelect>=3){this._setDate(UTCDate(year,month,day,hours,minutes,seconds,0))}}else{if(target.is(".year")){this.viewDate.setUTCDate(1);year=parseInt(target.text(),10)||0;this.viewDate.setUTCFullYear(year);this.element.trigger({type:"changeYear",date:this.viewDate});if(this.viewSelect>=4){this._setDate(UTCDate(year,month,day,hours,minutes,seconds,0))}}else{if(target.is(".hour")){hours=parseInt(target.text(),10)||0;if(target.hasClass("hour_am")||target.hasClass("hour_pm")){if(hours===12&&target.hasClass("hour_am")){hours=0}else{if(hours!==12&&target.hasClass("hour_pm")){hours+=12}}}this.viewDate.setUTCHours(hours);this.element.trigger({type:"changeHour",date:this.viewDate});if(this.viewSelect>=1){this._setDate(UTCDate(year,month,day,hours,minutes,seconds,0))}}else{if(target.is(".minute")){minutes=parseInt(target.text().substr(target.text().indexOf(":")+1),10)||0;this.viewDate.setUTCMinutes(minutes);this.element.trigger({type:"changeMinute",date:this.viewDate});if(this.viewSelect>=0){this._setDate(UTCDate(year,month,day,hours,minutes,seconds,0))}}}}}if(this.viewMode!==0){var oldViewMode=this.viewMode;this.showMode(-1);this.fill();if(oldViewMode===this.viewMode&&this.autoclose){this.hide()}}else{this.fill();if(this.autoclose){this.hide()}}}break;case"td":if(target.is(".day")&&!target.is(".disabled")){var day=parseInt(target.text(),10)||1;var year=this.viewDate.getUTCFullYear(),month=this.viewDate.getUTCMonth(),hours=this.viewDate.getUTCHours(),minutes=this.viewDate.getUTCMinutes(),seconds=this.viewDate.getUTCSeconds();if(target.is(".old")){if(month===0){month=11;year-=1}else{month-=1}}else{if(target.is(".new")){if(month===11){month=0;year+=1}else{month+=1}}}this.viewDate.setUTCFullYear(year);this.viewDate.setUTCMonth(month,day);this.element.trigger({type:"changeDay",date:this.viewDate});if(this.viewSelect>=2){this._setDate(UTCDate(year,month,day,hours,minutes,seconds,0))}}var oldViewMode=this.viewMode;this.showMode(-1);this.fill();if(oldViewMode===this.viewMode&&this.autoclose){this.hide()}break}}},_setDate:function(date,which){if(!which||which==="date"){this.date=date}if(!which||which==="view"){this.viewDate=date}this.fill();this.setValue();var element;if(this.isInput){element=this.element}else{if(this.component){element=this.element.find("input")}}if(element){element.change()}this.element.trigger({type:"changeDate",date:this.getDate()});if(date===null){this.date=this.viewDate}},moveMinute:function(date,dir){if(!dir){return date}var new_date=new Date(date.valueOf());new_date.setUTCMinutes(new_date.getUTCMinutes()+(dir*this.minuteStep));return new_date},moveHour:function(date,dir){if(!dir){return date}var new_date=new Date(date.valueOf());new_date.setUTCHours(new_date.getUTCHours()+dir);return new_date},moveDate:function(date,dir){if(!dir){return date}var new_date=new Date(date.valueOf());new_date.setUTCDate(new_date.getUTCDate()+dir);return new_date},moveMonth:function(date,dir){if(!dir){return date}var new_date=new Date(date.valueOf()),day=new_date.getUTCDate(),month=new_date.getUTCMonth(),mag=Math.abs(dir),new_month,test;dir=dir>0?1:-1;if(mag===1){test=dir===-1?function(){return new_date.getUTCMonth()===month}:function(){return new_date.getUTCMonth()!==new_month};new_month=month+dir;new_date.setUTCMonth(new_month);if(new_month<0||new_month>11){new_month=(new_month+12)%12}}else{for(var i=0;i=this.startDate&&date<=this.endDate},keydown:function(e){if(this.picker.is(":not(:visible)")){if(e.keyCode===27){this.show()}return}var dateChanged=false,dir,newDate,newViewDate;switch(e.keyCode){case 27:this.hide();e.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation){break}dir=e.keyCode===37?-1:1;var viewMode=this.viewMode;if(e.ctrlKey){viewMode+=2}else{if(e.shiftKey){viewMode+=1}}if(viewMode===4){newDate=this.moveYear(this.date,dir);newViewDate=this.moveYear(this.viewDate,dir)}else{if(viewMode===3){newDate=this.moveMonth(this.date,dir);newViewDate=this.moveMonth(this.viewDate,dir)}else{if(viewMode===2){newDate=this.moveDate(this.date,dir);newViewDate=this.moveDate(this.viewDate,dir)}else{if(viewMode===1){newDate=this.moveHour(this.date,dir);newViewDate=this.moveHour(this.viewDate,dir)}else{if(viewMode===0){newDate=this.moveMinute(this.date,dir);newViewDate=this.moveMinute(this.viewDate,dir)}}}}}if(this.dateWithinRange(newDate)){this.date=newDate;this.viewDate=newViewDate;this.setValue();this.update();e.preventDefault();dateChanged=true}break;case 38:case 40:if(!this.keyboardNavigation){break}dir=e.keyCode===38?-1:1;viewMode=this.viewMode;if(e.ctrlKey){viewMode+=2}else{if(e.shiftKey){viewMode+=1}}if(viewMode===4){newDate=this.moveYear(this.date,dir);newViewDate=this.moveYear(this.viewDate,dir)}else{if(viewMode===3){newDate=this.moveMonth(this.date,dir);newViewDate=this.moveMonth(this.viewDate,dir)}else{if(viewMode===2){newDate=this.moveDate(this.date,dir*7);newViewDate=this.moveDate(this.viewDate,dir*7)}else{if(viewMode===1){if(this.showMeridian){newDate=this.moveHour(this.date,dir*6);newViewDate=this.moveHour(this.viewDate,dir*6)}else{newDate=this.moveHour(this.date,dir*4);newViewDate=this.moveHour(this.viewDate,dir*4)}}else{if(viewMode===0){newDate=this.moveMinute(this.date,dir*4);newViewDate=this.moveMinute(this.viewDate,dir*4)}}}}}if(this.dateWithinRange(newDate)){this.date=newDate;this.viewDate=newViewDate;this.setValue();this.update();e.preventDefault();dateChanged=true}break;case 13:if(this.viewMode!==0){var oldViewMode=this.viewMode;this.showMode(-1);this.fill();if(oldViewMode===this.viewMode&&this.autoclose){this.hide()}}else{this.fill();if(this.autoclose){this.hide()}}e.preventDefault();break;case 9:this.hide();break}if(dateChanged){var element;if(this.isInput){element=this.element}else{if(this.component){element=this.element.find("input")}}if(element){element.change()}this.element.trigger({type:"changeDate",date:this.getDate()})}},showMode:function(dir){if(dir){var newViewMode=Math.max(0,Math.min(DPGlobal.modes.length-1,this.viewMode+dir));if(newViewMode>=this.minView&&newViewMode<=this.maxView){this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:newViewMode});this.viewMode=newViewMode}}this.picker.find(">div").hide().filter(".datetimepicker-"+DPGlobal.modes[this.viewMode].clsName).css("display","block");this.updateNavArrows()},reset:function(){this._setDate(null,"date")},convertViewModeText:function(viewMode){switch(viewMode){case 4:return"decade";case 3:return"year";case 2:return"month";case 1:return"day";case 0:return"hour"}}};var old=$.fn.datetimepicker;$.fn.datetimepicker=function(option){var args=Array.apply(null,arguments);args.shift();var internal_return;this.each(function(){var $this=$(this),data=$this.data("datetimepicker"),options=typeof option==="object"&&option;if(!data){$this.data("datetimepicker",(data=new Datetimepicker(this,$.extend({},$.fn.datetimepicker.defaults,options))))}if(typeof option==="string"&&typeof data[option]==="function"){internal_return=data[option].apply(data,args);if(internal_return!==undefined){return false}}});if(internal_return!==undefined){return internal_return}else{return this}};$.fn.datetimepicker.defaults={};$.fn.datetimepicker.Constructor=Datetimepicker;var dates=$.fn.datetimepicker.dates={"zh-cn":{days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],meridiem:["上午","下午"],suffix:["st","nd","rd","th"],today:"今天",clear:"清除"},en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["am","pm"],suffix:["st","nd","rd","th"],today:"Today",clear:"Clear"}};var DPGlobal={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0))},getDaysInMonth:function(year,month){return[31,(DPGlobal.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month]},getDefaultFormat:function(type,field){if(type==="standard"){if(field==="input"){return"yyyy-mm-dd hh:ii"}else{return"yyyy-mm-dd hh:ii:ss"}}else{if(type==="php"){if(field==="input"){return"Y-m-d H:i"}else{return"Y-m-d H:i:s"}}else{throw new Error("Invalid format type.")}}},validParts:function(type){if(type==="standard"){return/t|hh?|HH?|p|P|z|Z|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g}else{if(type==="php"){return/[dDjlNwzFmMnStyYaABgGhHis]/g}else{throw new Error("Invalid format type.")}}},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(format,type){var separators=format.replace(this.validParts(type),"\0").split("\0"),parts=format.match(this.validParts(type));if(!separators||!separators.length||!parts||parts.length===0){throw new Error("Invalid date format.")}return{separators:separators,parts:parts}},parseDate:function(date,format,language,type,timezone){if(date instanceof Date){var dateUTC=new Date(date.valueOf()-date.getTimezoneOffset()*60000);dateUTC.setMilliseconds(0);return dateUTC}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(date)){format=this.parseFormat("yyyy-mm-dd",type)}if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(date)){format=this.parseFormat("yyyy-mm-dd hh:ii",type)}if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(date)){format=this.parseFormat("yyyy-mm-dd hh:ii:ss",type)}if(/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(date)){var part_re=/([-+]\d+)([dmwy])/,parts=date.match(/([-+]\d+)([dmwy])/g),part,dir;date=new Date();for(var i=0;i"+""+' | '+' | '+' | '+"
"+"",headTemplateV3:""+""+'| | '+' | '+' | '+"
"+"",contTemplate:' |
',footTemplate:""+' |
'+' |
'+""};DPGlobal.template=''+'
'+'
'+DPGlobal.headTemplate+DPGlobal.contTemplate+DPGlobal.footTemplate+"
"+"
"+'
'+'
'+DPGlobal.headTemplate+DPGlobal.contTemplate+DPGlobal.footTemplate+"
"+"
"+'
'+'
'+DPGlobal.headTemplate+""+DPGlobal.footTemplate+"
"+"
"+'
'+'
'+DPGlobal.headTemplate+DPGlobal.contTemplate+DPGlobal.footTemplate+"
"+"
"+'
'+'
'+DPGlobal.headTemplate+DPGlobal.contTemplate+DPGlobal.footTemplate+"
"+"
"+"
";DPGlobal.templateV3=''+'
'+'
'+DPGlobal.headTemplateV3+DPGlobal.contTemplate+DPGlobal.footTemplate+"
"+"
"+'
'+'
'+DPGlobal.headTemplateV3+DPGlobal.contTemplate+DPGlobal.footTemplate+"
"+"
"+'
'+'
'+DPGlobal.headTemplateV3+""+DPGlobal.footTemplate+"
"+"
"+'
'+'
'+DPGlobal.headTemplateV3+DPGlobal.contTemplate+DPGlobal.footTemplate+"
"+"
"+'
'+'
'+DPGlobal.headTemplateV3+DPGlobal.contTemplate+DPGlobal.footTemplate+"
"+"
"+"
";$.fn.datetimepicker.DPGlobal=DPGlobal;$.fn.datetimepicker.noConflict=function(){$.fn.datetimepicker=old;return this};$(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',function(e){var $this=$(this);if($this.data("datetimepicker")){return}e.preventDefault();$this.datetimepicker("show")});$(function(){$('[data-provide="datetimepicker-inline"]').datetimepicker()})}));
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/datepicker3.css b/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/datepicker3.css
deleted file mode 100644
index e1f02da70..000000000
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/datepicker3.css
+++ /dev/null
@@ -1,789 +0,0 @@
-/*!
- * Datepicker for Bootstrap
- *
- * Copyright 2012 Stefan Petre
- * Improvements by Andrew Rowls
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-.datepicker {
- padding: 4px;
- border-radius: 4px;
- direction: ltr;
- /*.dow {
- border-top: 1px solid #ddd !important;
- }*/
-}
-.datepicker-inline {
- width: 220px;
-}
-.datepicker.datepicker-rtl {
- direction: rtl;
-}
-.datepicker.datepicker-rtl table tr td span {
- float: right;
-}
-.datepicker-dropdown {
- top: 0;
- left: 0;
-}
-.datepicker-dropdown:before {
- content: '';
- display: inline-block;
- border-left: 7px solid transparent;
- border-right: 7px solid transparent;
- border-bottom: 7px solid #ccc;
- border-top: 0;
- border-bottom-color: rgba(0, 0, 0, 0.2);
- position: absolute;
-}
-.datepicker-dropdown:after {
- content: '';
- display: inline-block;
- border-left: 6px solid transparent;
- border-right: 6px solid transparent;
- border-bottom: 6px solid #fff;
- border-top: 0;
- position: absolute;
-}
-.datepicker-dropdown.datepicker-orient-left:before {
- left: 6px;
-}
-.datepicker-dropdown.datepicker-orient-left:after {
- left: 7px;
-}
-.datepicker-dropdown.datepicker-orient-right:before {
- right: 6px;
-}
-.datepicker-dropdown.datepicker-orient-right:after {
- right: 7px;
-}
-.datepicker-dropdown.datepicker-orient-top:before {
- top: -7px;
-}
-.datepicker-dropdown.datepicker-orient-top:after {
- top: -6px;
-}
-.datepicker-dropdown.datepicker-orient-bottom:before {
- bottom: -7px;
- border-bottom: 0;
- border-top: 7px solid #999;
-}
-.datepicker-dropdown.datepicker-orient-bottom:after {
- bottom: -6px;
- border-bottom: 0;
- border-top: 6px solid #fff;
-}
-.datepicker > div {
- display: none;
-}
-.datepicker.days div.datepicker-days {
- display: block;
-}
-.datepicker.months div.datepicker-months {
- display: block;
-}
-.datepicker.years div.datepicker-years {
- display: block;
-}
-.datepicker table {
- margin: 0;
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-.datepicker table tr td,
-.datepicker table tr th {
- text-align: center;
- width: 30px;
- height: 30px;
- border-radius: 4px;
- border: none;
-}
-.table-striped .datepicker table tr td,
-.table-striped .datepicker table tr th {
- background-color: transparent;
-}
-.datepicker table tr td.day:hover,
-.datepicker table tr td.day.focused {
- background: #eeeeee;
- cursor: pointer;
-}
-.datepicker table tr td.old,
-.datepicker table tr td.new {
- color: #999999;
-}
-.datepicker table tr td.disabled,
-.datepicker table tr td.disabled:hover {
- background: none;
- color: #999999;
- cursor: default;
-}
-.datepicker table tr td.today,
-.datepicker table tr td.today:hover,
-.datepicker table tr td.today.disabled,
-.datepicker table tr td.today.disabled:hover {
- color: #000000;
- background-color: #ffdb99;
- border-color: #ffb733;
-}
-.datepicker table tr td.today:hover,
-.datepicker table tr td.today:hover:hover,
-.datepicker table tr td.today.disabled:hover,
-.datepicker table tr td.today.disabled:hover:hover,
-.datepicker table tr td.today:focus,
-.datepicker table tr td.today:hover:focus,
-.datepicker table tr td.today.disabled:focus,
-.datepicker table tr td.today.disabled:hover:focus,
-.datepicker table tr td.today:active,
-.datepicker table tr td.today:hover:active,
-.datepicker table tr td.today.disabled:active,
-.datepicker table tr td.today.disabled:hover:active,
-.datepicker table tr td.today.active,
-.datepicker table tr td.today:hover.active,
-.datepicker table tr td.today.disabled.active,
-.datepicker table tr td.today.disabled:hover.active,
-.open .dropdown-toggle.datepicker table tr td.today,
-.open .dropdown-toggle.datepicker table tr td.today:hover,
-.open .dropdown-toggle.datepicker table tr td.today.disabled,
-.open .dropdown-toggle.datepicker table tr td.today.disabled:hover {
- color: #000000;
- background-color: #ffcd70;
- border-color: #f59e00;
-}
-.datepicker table tr td.today:active,
-.datepicker table tr td.today:hover:active,
-.datepicker table tr td.today.disabled:active,
-.datepicker table tr td.today.disabled:hover:active,
-.datepicker table tr td.today.active,
-.datepicker table tr td.today:hover.active,
-.datepicker table tr td.today.disabled.active,
-.datepicker table tr td.today.disabled:hover.active,
-.open .dropdown-toggle.datepicker table tr td.today,
-.open .dropdown-toggle.datepicker table tr td.today:hover,
-.open .dropdown-toggle.datepicker table tr td.today.disabled,
-.open .dropdown-toggle.datepicker table tr td.today.disabled:hover {
- background-image: none;
-}
-.datepicker table tr td.today.disabled,
-.datepicker table tr td.today:hover.disabled,
-.datepicker table tr td.today.disabled.disabled,
-.datepicker table tr td.today.disabled:hover.disabled,
-.datepicker table tr td.today[disabled],
-.datepicker table tr td.today:hover[disabled],
-.datepicker table tr td.today.disabled[disabled],
-.datepicker table tr td.today.disabled:hover[disabled],
-fieldset[disabled] .datepicker table tr td.today,
-fieldset[disabled] .datepicker table tr td.today:hover,
-fieldset[disabled] .datepicker table tr td.today.disabled,
-fieldset[disabled] .datepicker table tr td.today.disabled:hover,
-.datepicker table tr td.today.disabled:hover,
-.datepicker table tr td.today:hover.disabled:hover,
-.datepicker table tr td.today.disabled.disabled:hover,
-.datepicker table tr td.today.disabled:hover.disabled:hover,
-.datepicker table tr td.today[disabled]:hover,
-.datepicker table tr td.today:hover[disabled]:hover,
-.datepicker table tr td.today.disabled[disabled]:hover,
-.datepicker table tr td.today.disabled:hover[disabled]:hover,
-fieldset[disabled] .datepicker table tr td.today:hover,
-fieldset[disabled] .datepicker table tr td.today:hover:hover,
-fieldset[disabled] .datepicker table tr td.today.disabled:hover,
-fieldset[disabled] .datepicker table tr td.today.disabled:hover:hover,
-.datepicker table tr td.today.disabled:focus,
-.datepicker table tr td.today:hover.disabled:focus,
-.datepicker table tr td.today.disabled.disabled:focus,
-.datepicker table tr td.today.disabled:hover.disabled:focus,
-.datepicker table tr td.today[disabled]:focus,
-.datepicker table tr td.today:hover[disabled]:focus,
-.datepicker table tr td.today.disabled[disabled]:focus,
-.datepicker table tr td.today.disabled:hover[disabled]:focus,
-fieldset[disabled] .datepicker table tr td.today:focus,
-fieldset[disabled] .datepicker table tr td.today:hover:focus,
-fieldset[disabled] .datepicker table tr td.today.disabled:focus,
-fieldset[disabled] .datepicker table tr td.today.disabled:hover:focus,
-.datepicker table tr td.today.disabled:active,
-.datepicker table tr td.today:hover.disabled:active,
-.datepicker table tr td.today.disabled.disabled:active,
-.datepicker table tr td.today.disabled:hover.disabled:active,
-.datepicker table tr td.today[disabled]:active,
-.datepicker table tr td.today:hover[disabled]:active,
-.datepicker table tr td.today.disabled[disabled]:active,
-.datepicker table tr td.today.disabled:hover[disabled]:active,
-fieldset[disabled] .datepicker table tr td.today:active,
-fieldset[disabled] .datepicker table tr td.today:hover:active,
-fieldset[disabled] .datepicker table tr td.today.disabled:active,
-fieldset[disabled] .datepicker table tr td.today.disabled:hover:active,
-.datepicker table tr td.today.disabled.active,
-.datepicker table tr td.today:hover.disabled.active,
-.datepicker table tr td.today.disabled.disabled.active,
-.datepicker table tr td.today.disabled:hover.disabled.active,
-.datepicker table tr td.today[disabled].active,
-.datepicker table tr td.today:hover[disabled].active,
-.datepicker table tr td.today.disabled[disabled].active,
-.datepicker table tr td.today.disabled:hover[disabled].active,
-fieldset[disabled] .datepicker table tr td.today.active,
-fieldset[disabled] .datepicker table tr td.today:hover.active,
-fieldset[disabled] .datepicker table tr td.today.disabled.active,
-fieldset[disabled] .datepicker table tr td.today.disabled:hover.active {
- background-color: #ffdb99;
- border-color: #ffb733;
-}
-.datepicker table tr td.today:hover:hover {
- color: #000;
-}
-.datepicker table tr td.today.active:hover {
- color: #fff;
-}
-.datepicker table tr td.range,
-.datepicker table tr td.range:hover,
-.datepicker table tr td.range.disabled,
-.datepicker table tr td.range.disabled:hover {
- background: #eeeeee;
- border-radius: 0;
-}
-.datepicker table tr td.range.today,
-.datepicker table tr td.range.today:hover,
-.datepicker table tr td.range.today.disabled,
-.datepicker table tr td.range.today.disabled:hover {
- color: #000000;
- background-color: #f7ca77;
- border-color: #f1a417;
- border-radius: 0;
-}
-.datepicker table tr td.range.today:hover,
-.datepicker table tr td.range.today:hover:hover,
-.datepicker table tr td.range.today.disabled:hover,
-.datepicker table tr td.range.today.disabled:hover:hover,
-.datepicker table tr td.range.today:focus,
-.datepicker table tr td.range.today:hover:focus,
-.datepicker table tr td.range.today.disabled:focus,
-.datepicker table tr td.range.today.disabled:hover:focus,
-.datepicker table tr td.range.today:active,
-.datepicker table tr td.range.today:hover:active,
-.datepicker table tr td.range.today.disabled:active,
-.datepicker table tr td.range.today.disabled:hover:active,
-.datepicker table tr td.range.today.active,
-.datepicker table tr td.range.today:hover.active,
-.datepicker table tr td.range.today.disabled.active,
-.datepicker table tr td.range.today.disabled:hover.active,
-.open .dropdown-toggle.datepicker table tr td.range.today,
-.open .dropdown-toggle.datepicker table tr td.range.today:hover,
-.open .dropdown-toggle.datepicker table tr td.range.today.disabled,
-.open .dropdown-toggle.datepicker table tr td.range.today.disabled:hover {
- color: #000000;
- background-color: #f4bb51;
- border-color: #bf800c;
-}
-.datepicker table tr td.range.today:active,
-.datepicker table tr td.range.today:hover:active,
-.datepicker table tr td.range.today.disabled:active,
-.datepicker table tr td.range.today.disabled:hover:active,
-.datepicker table tr td.range.today.active,
-.datepicker table tr td.range.today:hover.active,
-.datepicker table tr td.range.today.disabled.active,
-.datepicker table tr td.range.today.disabled:hover.active,
-.open .dropdown-toggle.datepicker table tr td.range.today,
-.open .dropdown-toggle.datepicker table tr td.range.today:hover,
-.open .dropdown-toggle.datepicker table tr td.range.today.disabled,
-.open .dropdown-toggle.datepicker table tr td.range.today.disabled:hover {
- background-image: none;
-}
-.datepicker table tr td.range.today.disabled,
-.datepicker table tr td.range.today:hover.disabled,
-.datepicker table tr td.range.today.disabled.disabled,
-.datepicker table tr td.range.today.disabled:hover.disabled,
-.datepicker table tr td.range.today[disabled],
-.datepicker table tr td.range.today:hover[disabled],
-.datepicker table tr td.range.today.disabled[disabled],
-.datepicker table tr td.range.today.disabled:hover[disabled],
-fieldset[disabled] .datepicker table tr td.range.today,
-fieldset[disabled] .datepicker table tr td.range.today:hover,
-fieldset[disabled] .datepicker table tr td.range.today.disabled,
-fieldset[disabled] .datepicker table tr td.range.today.disabled:hover,
-.datepicker table tr td.range.today.disabled:hover,
-.datepicker table tr td.range.today:hover.disabled:hover,
-.datepicker table tr td.range.today.disabled.disabled:hover,
-.datepicker table tr td.range.today.disabled:hover.disabled:hover,
-.datepicker table tr td.range.today[disabled]:hover,
-.datepicker table tr td.range.today:hover[disabled]:hover,
-.datepicker table tr td.range.today.disabled[disabled]:hover,
-.datepicker table tr td.range.today.disabled:hover[disabled]:hover,
-fieldset[disabled] .datepicker table tr td.range.today:hover,
-fieldset[disabled] .datepicker table tr td.range.today:hover:hover,
-fieldset[disabled] .datepicker table tr td.range.today.disabled:hover,
-fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:hover,
-.datepicker table tr td.range.today.disabled:focus,
-.datepicker table tr td.range.today:hover.disabled:focus,
-.datepicker table tr td.range.today.disabled.disabled:focus,
-.datepicker table tr td.range.today.disabled:hover.disabled:focus,
-.datepicker table tr td.range.today[disabled]:focus,
-.datepicker table tr td.range.today:hover[disabled]:focus,
-.datepicker table tr td.range.today.disabled[disabled]:focus,
-.datepicker table tr td.range.today.disabled:hover[disabled]:focus,
-fieldset[disabled] .datepicker table tr td.range.today:focus,
-fieldset[disabled] .datepicker table tr td.range.today:hover:focus,
-fieldset[disabled] .datepicker table tr td.range.today.disabled:focus,
-fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:focus,
-.datepicker table tr td.range.today.disabled:active,
-.datepicker table tr td.range.today:hover.disabled:active,
-.datepicker table tr td.range.today.disabled.disabled:active,
-.datepicker table tr td.range.today.disabled:hover.disabled:active,
-.datepicker table tr td.range.today[disabled]:active,
-.datepicker table tr td.range.today:hover[disabled]:active,
-.datepicker table tr td.range.today.disabled[disabled]:active,
-.datepicker table tr td.range.today.disabled:hover[disabled]:active,
-fieldset[disabled] .datepicker table tr td.range.today:active,
-fieldset[disabled] .datepicker table tr td.range.today:hover:active,
-fieldset[disabled] .datepicker table tr td.range.today.disabled:active,
-fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:active,
-.datepicker table tr td.range.today.disabled.active,
-.datepicker table tr td.range.today:hover.disabled.active,
-.datepicker table tr td.range.today.disabled.disabled.active,
-.datepicker table tr td.range.today.disabled:hover.disabled.active,
-.datepicker table tr td.range.today[disabled].active,
-.datepicker table tr td.range.today:hover[disabled].active,
-.datepicker table tr td.range.today.disabled[disabled].active,
-.datepicker table tr td.range.today.disabled:hover[disabled].active,
-fieldset[disabled] .datepicker table tr td.range.today.active,
-fieldset[disabled] .datepicker table tr td.range.today:hover.active,
-fieldset[disabled] .datepicker table tr td.range.today.disabled.active,
-fieldset[disabled] .datepicker table tr td.range.today.disabled:hover.active {
- background-color: #f7ca77;
- border-color: #f1a417;
-}
-.datepicker table tr td.selected,
-.datepicker table tr td.selected:hover,
-.datepicker table tr td.selected.disabled,
-.datepicker table tr td.selected.disabled:hover {
- color: #ffffff;
- background-color: #999999;
- border-color: #555555;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-}
-.datepicker table tr td.selected:hover,
-.datepicker table tr td.selected:hover:hover,
-.datepicker table tr td.selected.disabled:hover,
-.datepicker table tr td.selected.disabled:hover:hover,
-.datepicker table tr td.selected:focus,
-.datepicker table tr td.selected:hover:focus,
-.datepicker table tr td.selected.disabled:focus,
-.datepicker table tr td.selected.disabled:hover:focus,
-.datepicker table tr td.selected:active,
-.datepicker table tr td.selected:hover:active,
-.datepicker table tr td.selected.disabled:active,
-.datepicker table tr td.selected.disabled:hover:active,
-.datepicker table tr td.selected.active,
-.datepicker table tr td.selected:hover.active,
-.datepicker table tr td.selected.disabled.active,
-.datepicker table tr td.selected.disabled:hover.active,
-.open .dropdown-toggle.datepicker table tr td.selected,
-.open .dropdown-toggle.datepicker table tr td.selected:hover,
-.open .dropdown-toggle.datepicker table tr td.selected.disabled,
-.open .dropdown-toggle.datepicker table tr td.selected.disabled:hover {
- color: #ffffff;
- background-color: #858585;
- border-color: #373737;
-}
-.datepicker table tr td.selected:active,
-.datepicker table tr td.selected:hover:active,
-.datepicker table tr td.selected.disabled:active,
-.datepicker table tr td.selected.disabled:hover:active,
-.datepicker table tr td.selected.active,
-.datepicker table tr td.selected:hover.active,
-.datepicker table tr td.selected.disabled.active,
-.datepicker table tr td.selected.disabled:hover.active,
-.open .dropdown-toggle.datepicker table tr td.selected,
-.open .dropdown-toggle.datepicker table tr td.selected:hover,
-.open .dropdown-toggle.datepicker table tr td.selected.disabled,
-.open .dropdown-toggle.datepicker table tr td.selected.disabled:hover {
- background-image: none;
-}
-.datepicker table tr td.selected.disabled,
-.datepicker table tr td.selected:hover.disabled,
-.datepicker table tr td.selected.disabled.disabled,
-.datepicker table tr td.selected.disabled:hover.disabled,
-.datepicker table tr td.selected[disabled],
-.datepicker table tr td.selected:hover[disabled],
-.datepicker table tr td.selected.disabled[disabled],
-.datepicker table tr td.selected.disabled:hover[disabled],
-fieldset[disabled] .datepicker table tr td.selected,
-fieldset[disabled] .datepicker table tr td.selected:hover,
-fieldset[disabled] .datepicker table tr td.selected.disabled,
-fieldset[disabled] .datepicker table tr td.selected.disabled:hover,
-.datepicker table tr td.selected.disabled:hover,
-.datepicker table tr td.selected:hover.disabled:hover,
-.datepicker table tr td.selected.disabled.disabled:hover,
-.datepicker table tr td.selected.disabled:hover.disabled:hover,
-.datepicker table tr td.selected[disabled]:hover,
-.datepicker table tr td.selected:hover[disabled]:hover,
-.datepicker table tr td.selected.disabled[disabled]:hover,
-.datepicker table tr td.selected.disabled:hover[disabled]:hover,
-fieldset[disabled] .datepicker table tr td.selected:hover,
-fieldset[disabled] .datepicker table tr td.selected:hover:hover,
-fieldset[disabled] .datepicker table tr td.selected.disabled:hover,
-fieldset[disabled] .datepicker table tr td.selected.disabled:hover:hover,
-.datepicker table tr td.selected.disabled:focus,
-.datepicker table tr td.selected:hover.disabled:focus,
-.datepicker table tr td.selected.disabled.disabled:focus,
-.datepicker table tr td.selected.disabled:hover.disabled:focus,
-.datepicker table tr td.selected[disabled]:focus,
-.datepicker table tr td.selected:hover[disabled]:focus,
-.datepicker table tr td.selected.disabled[disabled]:focus,
-.datepicker table tr td.selected.disabled:hover[disabled]:focus,
-fieldset[disabled] .datepicker table tr td.selected:focus,
-fieldset[disabled] .datepicker table tr td.selected:hover:focus,
-fieldset[disabled] .datepicker table tr td.selected.disabled:focus,
-fieldset[disabled] .datepicker table tr td.selected.disabled:hover:focus,
-.datepicker table tr td.selected.disabled:active,
-.datepicker table tr td.selected:hover.disabled:active,
-.datepicker table tr td.selected.disabled.disabled:active,
-.datepicker table tr td.selected.disabled:hover.disabled:active,
-.datepicker table tr td.selected[disabled]:active,
-.datepicker table tr td.selected:hover[disabled]:active,
-.datepicker table tr td.selected.disabled[disabled]:active,
-.datepicker table tr td.selected.disabled:hover[disabled]:active,
-fieldset[disabled] .datepicker table tr td.selected:active,
-fieldset[disabled] .datepicker table tr td.selected:hover:active,
-fieldset[disabled] .datepicker table tr td.selected.disabled:active,
-fieldset[disabled] .datepicker table tr td.selected.disabled:hover:active,
-.datepicker table tr td.selected.disabled.active,
-.datepicker table tr td.selected:hover.disabled.active,
-.datepicker table tr td.selected.disabled.disabled.active,
-.datepicker table tr td.selected.disabled:hover.disabled.active,
-.datepicker table tr td.selected[disabled].active,
-.datepicker table tr td.selected:hover[disabled].active,
-.datepicker table tr td.selected.disabled[disabled].active,
-.datepicker table tr td.selected.disabled:hover[disabled].active,
-fieldset[disabled] .datepicker table tr td.selected.active,
-fieldset[disabled] .datepicker table tr td.selected:hover.active,
-fieldset[disabled] .datepicker table tr td.selected.disabled.active,
-fieldset[disabled] .datepicker table tr td.selected.disabled:hover.active {
- background-color: #999999;
- border-color: #555555;
-}
-.datepicker table tr td.active,
-.datepicker table tr td.active:hover,
-.datepicker table tr td.active.disabled,
-.datepicker table tr td.active.disabled:hover {
- color: #ffffff;
- background-color: #428bca;
- border-color: #357ebd;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-}
-.datepicker table tr td.active:hover,
-.datepicker table tr td.active:hover:hover,
-.datepicker table tr td.active.disabled:hover,
-.datepicker table tr td.active.disabled:hover:hover,
-.datepicker table tr td.active:focus,
-.datepicker table tr td.active:hover:focus,
-.datepicker table tr td.active.disabled:focus,
-.datepicker table tr td.active.disabled:hover:focus,
-.datepicker table tr td.active:active,
-.datepicker table tr td.active:hover:active,
-.datepicker table tr td.active.disabled:active,
-.datepicker table tr td.active.disabled:hover:active,
-.datepicker table tr td.active.active,
-.datepicker table tr td.active:hover.active,
-.datepicker table tr td.active.disabled.active,
-.datepicker table tr td.active.disabled:hover.active,
-.open .dropdown-toggle.datepicker table tr td.active,
-.open .dropdown-toggle.datepicker table tr td.active:hover,
-.open .dropdown-toggle.datepicker table tr td.active.disabled,
-.open .dropdown-toggle.datepicker table tr td.active.disabled:hover {
- color: #ffffff;
- background-color: #3276b1;
- border-color: #285e8e;
-}
-.datepicker table tr td.active:active,
-.datepicker table tr td.active:hover:active,
-.datepicker table tr td.active.disabled:active,
-.datepicker table tr td.active.disabled:hover:active,
-.datepicker table tr td.active.active,
-.datepicker table tr td.active:hover.active,
-.datepicker table tr td.active.disabled.active,
-.datepicker table tr td.active.disabled:hover.active,
-.open .dropdown-toggle.datepicker table tr td.active,
-.open .dropdown-toggle.datepicker table tr td.active:hover,
-.open .dropdown-toggle.datepicker table tr td.active.disabled,
-.open .dropdown-toggle.datepicker table tr td.active.disabled:hover {
- background-image: none;
-}
-.datepicker table tr td.active.disabled,
-.datepicker table tr td.active:hover.disabled,
-.datepicker table tr td.active.disabled.disabled,
-.datepicker table tr td.active.disabled:hover.disabled,
-.datepicker table tr td.active[disabled],
-.datepicker table tr td.active:hover[disabled],
-.datepicker table tr td.active.disabled[disabled],
-.datepicker table tr td.active.disabled:hover[disabled],
-fieldset[disabled] .datepicker table tr td.active,
-fieldset[disabled] .datepicker table tr td.active:hover,
-fieldset[disabled] .datepicker table tr td.active.disabled,
-fieldset[disabled] .datepicker table tr td.active.disabled:hover,
-.datepicker table tr td.active.disabled:hover,
-.datepicker table tr td.active:hover.disabled:hover,
-.datepicker table tr td.active.disabled.disabled:hover,
-.datepicker table tr td.active.disabled:hover.disabled:hover,
-.datepicker table tr td.active[disabled]:hover,
-.datepicker table tr td.active:hover[disabled]:hover,
-.datepicker table tr td.active.disabled[disabled]:hover,
-.datepicker table tr td.active.disabled:hover[disabled]:hover,
-fieldset[disabled] .datepicker table tr td.active:hover,
-fieldset[disabled] .datepicker table tr td.active:hover:hover,
-fieldset[disabled] .datepicker table tr td.active.disabled:hover,
-fieldset[disabled] .datepicker table tr td.active.disabled:hover:hover,
-.datepicker table tr td.active.disabled:focus,
-.datepicker table tr td.active:hover.disabled:focus,
-.datepicker table tr td.active.disabled.disabled:focus,
-.datepicker table tr td.active.disabled:hover.disabled:focus,
-.datepicker table tr td.active[disabled]:focus,
-.datepicker table tr td.active:hover[disabled]:focus,
-.datepicker table tr td.active.disabled[disabled]:focus,
-.datepicker table tr td.active.disabled:hover[disabled]:focus,
-fieldset[disabled] .datepicker table tr td.active:focus,
-fieldset[disabled] .datepicker table tr td.active:hover:focus,
-fieldset[disabled] .datepicker table tr td.active.disabled:focus,
-fieldset[disabled] .datepicker table tr td.active.disabled:hover:focus,
-.datepicker table tr td.active.disabled:active,
-.datepicker table tr td.active:hover.disabled:active,
-.datepicker table tr td.active.disabled.disabled:active,
-.datepicker table tr td.active.disabled:hover.disabled:active,
-.datepicker table tr td.active[disabled]:active,
-.datepicker table tr td.active:hover[disabled]:active,
-.datepicker table tr td.active.disabled[disabled]:active,
-.datepicker table tr td.active.disabled:hover[disabled]:active,
-fieldset[disabled] .datepicker table tr td.active:active,
-fieldset[disabled] .datepicker table tr td.active:hover:active,
-fieldset[disabled] .datepicker table tr td.active.disabled:active,
-fieldset[disabled] .datepicker table tr td.active.disabled:hover:active,
-.datepicker table tr td.active.disabled.active,
-.datepicker table tr td.active:hover.disabled.active,
-.datepicker table tr td.active.disabled.disabled.active,
-.datepicker table tr td.active.disabled:hover.disabled.active,
-.datepicker table tr td.active[disabled].active,
-.datepicker table tr td.active:hover[disabled].active,
-.datepicker table tr td.active.disabled[disabled].active,
-.datepicker table tr td.active.disabled:hover[disabled].active,
-fieldset[disabled] .datepicker table tr td.active.active,
-fieldset[disabled] .datepicker table tr td.active:hover.active,
-fieldset[disabled] .datepicker table tr td.active.disabled.active,
-fieldset[disabled] .datepicker table tr td.active.disabled:hover.active {
- background-color: #428bca;
- border-color: #357ebd;
-}
-.datepicker table tr td span {
- display: block;
- width: 23%;
- height: 54px;
- line-height: 54px;
- float: left;
- margin: 1%;
- cursor: pointer;
- border-radius: 4px;
-}
-.datepicker table tr td span:hover {
- background: #eeeeee;
-}
-.datepicker table tr td span.disabled,
-.datepicker table tr td span.disabled:hover {
- background: none;
- color: #999999;
- cursor: default;
-}
-.datepicker table tr td span.active,
-.datepicker table tr td span.active:hover,
-.datepicker table tr td span.active.disabled,
-.datepicker table tr td span.active.disabled:hover {
- color: #ffffff;
- background-color: #428bca;
- border-color: #357ebd;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-}
-.datepicker table tr td span.active:hover,
-.datepicker table tr td span.active:hover:hover,
-.datepicker table tr td span.active.disabled:hover,
-.datepicker table tr td span.active.disabled:hover:hover,
-.datepicker table tr td span.active:focus,
-.datepicker table tr td span.active:hover:focus,
-.datepicker table tr td span.active.disabled:focus,
-.datepicker table tr td span.active.disabled:hover:focus,
-.datepicker table tr td span.active:active,
-.datepicker table tr td span.active:hover:active,
-.datepicker table tr td span.active.disabled:active,
-.datepicker table tr td span.active.disabled:hover:active,
-.datepicker table tr td span.active.active,
-.datepicker table tr td span.active:hover.active,
-.datepicker table tr td span.active.disabled.active,
-.datepicker table tr td span.active.disabled:hover.active,
-.open .dropdown-toggle.datepicker table tr td span.active,
-.open .dropdown-toggle.datepicker table tr td span.active:hover,
-.open .dropdown-toggle.datepicker table tr td span.active.disabled,
-.open .dropdown-toggle.datepicker table tr td span.active.disabled:hover {
- color: #ffffff;
- background-color: #3276b1;
- border-color: #285e8e;
-}
-.datepicker table tr td span.active:active,
-.datepicker table tr td span.active:hover:active,
-.datepicker table tr td span.active.disabled:active,
-.datepicker table tr td span.active.disabled:hover:active,
-.datepicker table tr td span.active.active,
-.datepicker table tr td span.active:hover.active,
-.datepicker table tr td span.active.disabled.active,
-.datepicker table tr td span.active.disabled:hover.active,
-.open .dropdown-toggle.datepicker table tr td span.active,
-.open .dropdown-toggle.datepicker table tr td span.active:hover,
-.open .dropdown-toggle.datepicker table tr td span.active.disabled,
-.open .dropdown-toggle.datepicker table tr td span.active.disabled:hover {
- background-image: none;
-}
-.datepicker table tr td span.active.disabled,
-.datepicker table tr td span.active:hover.disabled,
-.datepicker table tr td span.active.disabled.disabled,
-.datepicker table tr td span.active.disabled:hover.disabled,
-.datepicker table tr td span.active[disabled],
-.datepicker table tr td span.active:hover[disabled],
-.datepicker table tr td span.active.disabled[disabled],
-.datepicker table tr td span.active.disabled:hover[disabled],
-fieldset[disabled] .datepicker table tr td span.active,
-fieldset[disabled] .datepicker table tr td span.active:hover,
-fieldset[disabled] .datepicker table tr td span.active.disabled,
-fieldset[disabled] .datepicker table tr td span.active.disabled:hover,
-.datepicker table tr td span.active.disabled:hover,
-.datepicker table tr td span.active:hover.disabled:hover,
-.datepicker table tr td span.active.disabled.disabled:hover,
-.datepicker table tr td span.active.disabled:hover.disabled:hover,
-.datepicker table tr td span.active[disabled]:hover,
-.datepicker table tr td span.active:hover[disabled]:hover,
-.datepicker table tr td span.active.disabled[disabled]:hover,
-.datepicker table tr td span.active.disabled:hover[disabled]:hover,
-fieldset[disabled] .datepicker table tr td span.active:hover,
-fieldset[disabled] .datepicker table tr td span.active:hover:hover,
-fieldset[disabled] .datepicker table tr td span.active.disabled:hover,
-fieldset[disabled] .datepicker table tr td span.active.disabled:hover:hover,
-.datepicker table tr td span.active.disabled:focus,
-.datepicker table tr td span.active:hover.disabled:focus,
-.datepicker table tr td span.active.disabled.disabled:focus,
-.datepicker table tr td span.active.disabled:hover.disabled:focus,
-.datepicker table tr td span.active[disabled]:focus,
-.datepicker table tr td span.active:hover[disabled]:focus,
-.datepicker table tr td span.active.disabled[disabled]:focus,
-.datepicker table tr td span.active.disabled:hover[disabled]:focus,
-fieldset[disabled] .datepicker table tr td span.active:focus,
-fieldset[disabled] .datepicker table tr td span.active:hover:focus,
-fieldset[disabled] .datepicker table tr td span.active.disabled:focus,
-fieldset[disabled] .datepicker table tr td span.active.disabled:hover:focus,
-.datepicker table tr td span.active.disabled:active,
-.datepicker table tr td span.active:hover.disabled:active,
-.datepicker table tr td span.active.disabled.disabled:active,
-.datepicker table tr td span.active.disabled:hover.disabled:active,
-.datepicker table tr td span.active[disabled]:active,
-.datepicker table tr td span.active:hover[disabled]:active,
-.datepicker table tr td span.active.disabled[disabled]:active,
-.datepicker table tr td span.active.disabled:hover[disabled]:active,
-fieldset[disabled] .datepicker table tr td span.active:active,
-fieldset[disabled] .datepicker table tr td span.active:hover:active,
-fieldset[disabled] .datepicker table tr td span.active.disabled:active,
-fieldset[disabled] .datepicker table tr td span.active.disabled:hover:active,
-.datepicker table tr td span.active.disabled.active,
-.datepicker table tr td span.active:hover.disabled.active,
-.datepicker table tr td span.active.disabled.disabled.active,
-.datepicker table tr td span.active.disabled:hover.disabled.active,
-.datepicker table tr td span.active[disabled].active,
-.datepicker table tr td span.active:hover[disabled].active,
-.datepicker table tr td span.active.disabled[disabled].active,
-.datepicker table tr td span.active.disabled:hover[disabled].active,
-fieldset[disabled] .datepicker table tr td span.active.active,
-fieldset[disabled] .datepicker table tr td span.active:hover.active,
-fieldset[disabled] .datepicker table tr td span.active.disabled.active,
-fieldset[disabled] .datepicker table tr td span.active.disabled:hover.active {
- background-color: #428bca;
- border-color: #357ebd;
-}
-.datepicker table tr td span.old,
-.datepicker table tr td span.new {
- color: #999999;
-}
-.datepicker th.datepicker-switch {
- width: 145px;
-}
-.datepicker thead tr:first-child th,
-.datepicker tfoot tr th {
- cursor: pointer;
-}
-.datepicker thead tr:first-child th:hover,
-.datepicker tfoot tr th:hover {
- background: #eeeeee;
-}
-.datepicker .cw {
- font-size: 10px;
- width: 12px;
- padding: 0 2px 0 5px;
- vertical-align: middle;
-}
-.datepicker thead tr:first-child th.cw {
- cursor: default;
- background-color: transparent;
-}
-.input-group.date .input-group-addon i {
- cursor: pointer;
- width: 16px;
- height: 16px;
-}
-.input-daterange input {
- text-align: center;
-}
-.input-daterange input:first-child {
- border-radius: 3px 0 0 3px;
-}
-.input-daterange input:last-child {
- border-radius: 0 3px 3px 0;
-}
-.input-daterange .input-group-addon {
- width: auto;
- min-width: 16px;
- padding: 4px 5px;
- font-weight: normal;
- line-height: 1.428571429;
- text-align: center;
- text-shadow: 0 1px 0 #fff;
- vertical-align: middle;
- background-color: #eeeeee;
- border-width: 1px 0;
- margin-left: -5px;
- margin-right: -5px;
-}
-.datepicker.dropdown-menu {
- position: absolute;
- top: 100%;
- left: 0;
- z-index: 1000;
- float: left;
- display: none;
- min-width: 160px;
- list-style: none;
- background-color: #ffffff;
- border: 1px solid #ccc;
- border: 1px solid rgba(0, 0, 0, 0.2);
- border-radius: 5px;
- -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- -webkit-background-clip: padding-box;
- -moz-background-clip: padding;
- background-clip: padding-box;
- *border-right-width: 2px;
- *border-bottom-width: 2px;
- color: #333333;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 13px;
- line-height: 1.428571429;
-}
-.datepicker.dropdown-menu th,
-.datepicker.dropdown-menu td {
- padding: 4px 5px;
-}
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/jsonview/jquery.jsonview.css b/ruoyi-admin/src/main/resources/static/ajax/libs/jsonview/jquery.jsonview.css
new file mode 100644
index 000000000..e3cb8c5de
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/jsonview/jquery.jsonview.css
@@ -0,0 +1,50 @@
+@charset "UTF-8";
+.jsonview {
+ font-family: monospace;
+ font-size: 1.1em;
+ white-space: pre-wrap; }
+ .jsonview .prop {
+ font-weight: bold; }
+ .jsonview .null {
+ color: red; }
+ .jsonview .bool {
+ color: blue; }
+ .jsonview .num {
+ color: blue; }
+ .jsonview .string {
+ color: green;
+ white-space: pre-wrap; }
+ .jsonview .string.multiline {
+ display: inline-block;
+ vertical-align: text-top; }
+ .jsonview .collapser {
+ position: absolute;
+ left: -1em;
+ cursor: pointer; }
+ .jsonview .collapsible {
+ transition: height 1.2s;
+ transition: width 1.2s; }
+ .jsonview .collapsible.collapsed {
+ height: .8em;
+ width: 1em;
+ display: inline-block;
+ overflow: hidden;
+ margin: 0; }
+ .jsonview .collapsible.collapsed:before {
+ content: "…";
+ width: 1em;
+ margin-left: .2em; }
+ .jsonview .collapser.collapsed {
+ transform: rotate(0deg); }
+ .jsonview .q {
+ display: inline-block;
+ width: 0px;
+ color: transparent; }
+ .jsonview li {
+ position: relative; }
+ .jsonview ul {
+ list-style: none;
+ margin: 0 0 0 2em;
+ padding: 0; }
+ .jsonview h1 {
+ font-size: 1.2em; }
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/jsonview/jquery.jsonview.js b/ruoyi-admin/src/main/resources/static/ajax/libs/jsonview/jquery.jsonview.js
new file mode 100644
index 000000000..18738b440
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/static/ajax/libs/jsonview/jquery.jsonview.js
@@ -0,0 +1,250 @@
+(function(jQuery) {
+ var $, Collapser, JSONFormatter, JSONView;
+ JSONFormatter = (function() {
+ function JSONFormatter(options) {
+ if (options == null) {
+ options = {};
+ }
+ this.options = options;
+ }
+
+ JSONFormatter.prototype.htmlEncode = function(html) {
+ if (html !== null) {
+ return html.toString().replace(/&/g, "&").replace(/"/g, """).replace(//g, ">");
+ } else {
+ return '';
+ }
+ };
+
+ JSONFormatter.prototype.jsString = function(s) {
+ s = JSON.stringify(s).slice(1, -1);
+ return this.htmlEncode(s);
+ };
+
+ JSONFormatter.prototype.decorateWithSpan = function(value, className) {
+ return "" + (this.htmlEncode(value)) + "";
+ };
+
+ JSONFormatter.prototype.valueToHTML = function(value, level) {
+ var valueType;
+ if (level == null) {
+ level = 0;
+ }
+ valueType = Object.prototype.toString.call(value).match(/\s(.+)]/)[1].toLowerCase();
+ return this["" + valueType + "ToHTML"].call(this, value, level);
+ };
+
+ JSONFormatter.prototype.nullToHTML = function(value) {
+ return this.decorateWithSpan('null', 'null');
+ };
+
+ JSONFormatter.prototype.numberToHTML = function(value) {
+ return this.decorateWithSpan(value, 'num');
+ };
+
+ JSONFormatter.prototype.stringToHTML = function(value) {
+ var multilineClass, newLinePattern;
+ if (/^(http|https|file):\/\/[^\s]+$/i.test(value)) {
+ return "\"" + (this.jsString(value)) + "\"";
+ } else {
+ multilineClass = '';
+ value = this.jsString(value);
+ if (this.options.nl2br) {
+ newLinePattern = /([^>\\r\\n]?)(\\r\\n|\\n\\r|\\r|\\n)/g;
+ if (newLinePattern.test(value)) {
+ multilineClass = ' multiline';
+ value = (value + '').replace(newLinePattern, '$1' + '
');
+ }
+ }
+ return "\"" + value + "\"";
+ }
+ };
+
+ JSONFormatter.prototype.booleanToHTML = function(value) {
+ return this.decorateWithSpan(value, 'bool');
+ };
+
+ JSONFormatter.prototype.arrayToHTML = function(array, level) {
+ var collapsible, hasContents, index, numProps, output, value, _i, _len;
+ if (level == null) {
+ level = 0;
+ }
+ hasContents = false;
+ output = '';
+ numProps = array.length;
+ for (index = _i = 0, _len = array.length; _i < _len; index = ++_i) {
+ value = array[index];
+ hasContents = true;
+ output += '' + this.valueToHTML(value, level + 1);
+ if (numProps > 1) {
+ output += ',';
+ }
+ output += '';
+ numProps--;
+ }
+ if (hasContents) {
+ collapsible = level === 0 ? '' : ' collapsible';
+ return "[]";
+ } else {
+ return '[ ]';
+ }
+ };
+
+ JSONFormatter.prototype.objectToHTML = function(object, level) {
+ var collapsible, hasContents, numProps, output, prop, value;
+ if (level == null) {
+ level = 0;
+ }
+ hasContents = false;
+ output = '';
+ numProps = 0;
+ for (prop in object) {
+ numProps++;
+ }
+ for (prop in object) {
+ value = object[prop];
+ hasContents = true;
+ output += "\"" + (this.jsString(prop)) + "\": " + (this.valueToHTML(value, level + 1));
+ if (numProps > 1) {
+ output += ',';
+ }
+ output += '';
+ numProps--;
+ }
+ if (hasContents) {
+ collapsible = level === 0 ? '' : ' collapsible';
+ return "{}";
+ } else {
+ return '{ }';
+ }
+ };
+
+ JSONFormatter.prototype.jsonToHTML = function(json) {
+ return "" + (this.valueToHTML(json)) + "
";
+ };
+
+ return JSONFormatter;
+
+ })();
+ (typeof module !== "undefined" && module !== null) && (module.exports = JSONFormatter);
+ Collapser = {
+ bindEvent: function(item, collapsed) {
+ var collapser;
+ collapser = document.createElement('div');
+ collapser.className = 'collapser';
+ collapser.innerHTML = collapsed ? '+' : '-';
+ collapser.addEventListener('click', (function(_this) {
+ return function(event) {
+ return _this.toggle(event.target);
+ };
+ })(this));
+ item.insertBefore(collapser, item.firstChild);
+ if (collapsed) {
+ return this.collapse(collapser);
+ }
+ },
+ expand: function(collapser) {
+ var ellipsis, target;
+ target = this.collapseTarget(collapser);
+ ellipsis = target.parentNode.getElementsByClassName('ellipsis')[0];
+ target.parentNode.removeChild(ellipsis);
+ target.style.display = '';
+ return collapser.innerHTML = '-';
+ },
+ collapse: function(collapser) {
+ var ellipsis, target;
+ target = this.collapseTarget(collapser);
+ target.style.display = 'none';
+ ellipsis = document.createElement('span');
+ ellipsis.className = 'ellipsis';
+ ellipsis.innerHTML = ' … ';
+ target.parentNode.insertBefore(ellipsis, target);
+ return collapser.innerHTML = '+';
+ },
+ toggle: function(collapser) {
+ var target;
+ target = this.collapseTarget(collapser);
+ if (target.style.display === 'none') {
+ return this.expand(collapser);
+ } else {
+ return this.collapse(collapser);
+ }
+ },
+ collapseTarget: function(collapser) {
+ var target, targets;
+ targets = collapser.parentNode.getElementsByClassName('collapsible');
+ if (!targets.length) {
+ return;
+ }
+ return target = targets[0];
+ }
+ };
+ $ = jQuery;
+ JSONView = {
+ collapse: function(el) {
+ if (el.innerHTML === '-') {
+ return Collapser.collapse(el);
+ }
+ },
+ expand: function(el) {
+ if (el.innerHTML === '+') {
+ return Collapser.expand(el);
+ }
+ },
+ toggle: function(el) {
+ return Collapser.toggle(el);
+ }
+ };
+ return $.fn.JSONView = function() {
+ var args, defaultOptions, formatter, json, method, options, outputDoc;
+ args = arguments;
+ if (JSONView[args[0]] != null) {
+ method = args[0];
+ return this.each(function() {
+ var $this, level;
+ $this = $(this);
+ if (args[1] != null) {
+ level = args[1];
+ return $this.find(".jsonview .collapsible.level" + level).siblings('.collapser').each(function() {
+ return JSONView[method](this);
+ });
+ } else {
+ return $this.find('.jsonview > ul > li > .collapsible').siblings('.collapser').each(function() {
+ return JSONView[method](this);
+ });
+ }
+ });
+ } else {
+ json = args[0];
+ options = args[1] || {};
+ defaultOptions = {
+ collapsed: false,
+ nl2br: false
+ };
+ options = $.extend(defaultOptions, options);
+ formatter = new JSONFormatter({
+ nl2br: options.nl2br
+ });
+ if (Object.prototype.toString.call(json) === '[object String]') {
+ json = JSON.parse(json);
+ }
+ outputDoc = formatter.jsonToHTML(json);
+ return this.each(function() {
+ var $this, item, items, _i, _len, _results;
+ $this = $(this);
+ $this.html(outputDoc);
+ items = $this[0].getElementsByClassName('collapsible');
+ _results = [];
+ for (_i = 0, _len = items.length; _i < _len; _i++) {
+ item = items[_i];
+ if (item.parentNode.nodeName === 'LI') {
+ _results.push(Collapser.bindEvent(item.parentNode, options.collapsed));
+ } else {
+ _results.push(void 0);
+ }
+ }
+ return _results;
+ });
+ }
+ };
+})(jQuery);
diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/layui/lay/modules/layer.js b/ruoyi-admin/src/main/resources/static/ajax/libs/layui/lay/modules/layer.js
deleted file mode 100644
index c2f009bd0..000000000
--- a/ruoyi-admin/src/main/resources/static/ajax/libs/layui/lay/modules/layer.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! layer-v3.1.1 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */
- ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?''+(f?r.title[0]:r.title)+"
":"";return r.zIndex=s,t([r.shade?'':"",''+(e&&2!=r.type?"":u)+'
'+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
'+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t
'+r.btn[t]+"";return''+e+"
"}():"")+(r.resize?'':"")+" "],u,i('')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){s=e.find(".layui-layer-input"),s.focus(),"function"==typeof f&&f(e)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:''+function(){var e=t.length,i=1,a="";if(e>0)for(a='- '+(t[0].content||"no content")+"
";i'+(t[i].content||"no content")+"";return a}()+"
",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]
",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/css/login.css b/ruoyi-admin/src/main/resources/static/css/login.css
index c30e36725..af95567e4 100644
--- a/ruoyi-admin/src/main/resources/static/css/login.css
+++ b/ruoyi-admin/src/main/resources/static/css/login.css
@@ -85,20 +85,19 @@ body.signin {
}
}
/*
-¼checkʽ
-*/
+登录界面check样式
+*/
.checkbox-custom {
position: relative;
padding: 0 15px 0 25px;
margin-bottom: 7px;
- margin-top: 0;
display: inline-block;
}
/*
-ʼcheckboxʽı
+将初始的checkbox的样式改变
*/
.checkbox-custom input[type="checkbox"] {
- opacity: 0;/*ʼcheckbox*/
+ opacity: 0; /*将初始的checkbox隐藏起来*/
position: absolute;
cursor: pointer;
z-index: 2;
@@ -107,7 +106,7 @@ body.signin {
left: 3px;
}
/*
-µcheckboxλ
+设计新的checkbox,位置
*/
.checkbox-custom label:before {
content: '';
@@ -123,7 +122,7 @@ body.signin {
background: #fff;
}
/*
-ʼcheckboxµcheckbox
+点击初始的checkbox,将新的checkbox关联起来
*/
.checkbox-custom input[type="checkbox"]:checked +label:after {
position: absolute;
@@ -142,7 +141,7 @@ body.signin {
.checkbox-custom label {
cursor: pointer;
line-height: 1.2;
- font-weight: normal;/*ırememberme*/
+ font-weight: normal; /*改变了rememberme的字体*/
margin-bottom: 0;
text-align: left;
}
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/css/login.min.css b/ruoyi-admin/src/main/resources/static/css/login.min.css
index d17df77c3..30c6633c7 100644
--- a/ruoyi-admin/src/main/resources/static/css/login.min.css
+++ b/ruoyi-admin/src/main/resources/static/css/login.min.css
@@ -1 +1 @@
-html{height:100%}body.signin{height:auto;background:url(../img/login-background.jpg) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;color:rgba(255,255,255,.95)}.signinpanel{width:750px;margin:10% auto 0}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .code{background:#fff no-repeat 95% center;color:#333;margin:0 0 15px 0}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:420px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}}.checkbox-custom{position:relative;padding:0 15px 0 25px;margin-bottom:7px;margin-top:0;display:inline-block}.checkbox-custom input[type="checkbox"]{opacity:0;position:absolute;cursor:pointer;z-index:2;margin:-6px 0 0 0;top:50%;left:3px}.checkbox-custom label:before{content:'';position:absolute;top:50%;left:0;margin-top:-9px;width:18px;height:17px;display:inline-block;border-radius:2px;border:1px solid #bbb;background:#fff}.checkbox-custom input[type="checkbox"]:checked+label:after{position:absolute;display:inline-block;font-family:'Glyphicons Halflings';content:"\e013";top:42%;left:3px;margin-top:-5px;font-size:11px;line-height:1;width:16px;height:16px;color:#333}.checkbox-custom label{cursor:pointer;line-height:1.2;font-weight:normal;margin-bottom:0;text-align:left}
\ No newline at end of file
+html{height:100%}body.signin{height:auto;background:url(../img/login-background.jpg) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;color:rgba(255,255,255,.95)}.signinpanel{width:750px;margin:10% auto 0}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .code{background:#fff no-repeat 95% center;color:#333;margin:0 0 15px 0}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:420px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}}.checkbox-custom{position:relative;padding:0 15px 0 25px;margin-bottom:7px;display:inline-block}.checkbox-custom input[type="checkbox"]{opacity:0;position:absolute;cursor:pointer;z-index:2;margin:-6px 0 0 0;top:50%;left:3px}.checkbox-custom label:before{content:'';position:absolute;top:50%;left:0;margin-top:-9px;width:18px;height:17px;display:inline-block;border-radius:2px;border:1px solid #bbb;background:#fff}.checkbox-custom input[type="checkbox"]:checked+label:after{position:absolute;display:inline-block;font-family:'Glyphicons Halflings';content:"\e013";top:42%;left:3px;margin-top:-5px;font-size:11px;line-height:1;width:16px;height:16px;color:#333}.checkbox-custom label{cursor:pointer;line-height:1.2;font-weight:normal;margin-bottom:0;text-align:left}
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/static/css/style.css b/ruoyi-admin/src/main/resources/static/css/style.css
index fb8cde4ab..bff2cd712 100644
--- a/ruoyi-admin/src/main/resources/static/css/style.css
+++ b/ruoyi-admin/src/main/resources/static/css/style.css
@@ -2318,16 +2318,6 @@ table.dataTable thead .sorting:after {
.google-map {
height: 300px;
}
-/* Validation */
-label.error {
- color: #cc5965;
- display: inline-block;
- margin-left: 5px;
-}
-
-.form-control.error {
- border: 1px dotted #cc5965;
-}
/* ngGrid */
.gridStyle {
border: 1px solid #d4d4d4;
diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css b/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css
index 7c01cde22..fcb433778 100644
--- a/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css
+++ b/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css
@@ -50,6 +50,130 @@
margin-left: 20px;
}
+.section-content {
+ min-height: 250px;
+ margin-right: auto;
+ margin-left: auto;
+ padding: 5px 5px 5px 5px;
+ width: 100%;
+ height: 100%;
+ position: absolute;
+}
+
+.ibox {
+ margin-bottom: 25px;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ height: 100%;
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
+}
+
+.list-group-striped > .list-group-item {
+ border-left: 0;
+ border-right: 0;
+ border-radius: 0;
+ padding-left: 0;
+ padding-right: 0
+}
+
+.ibox-title-gray {
+ height: 41px;
+ background-color: #f0f3f4;
+ color: #333;
+ font-weight: 700;
+ border-radius: 2px 2px 0 0;
+ padding: 13px !important;
+ border-bottom: 1px solid #eee;
+ display: block;
+ clear: both;
+}
+
+.dashboard-header h5 {
+ padding: 8px 0 0 0;
+ display: inline-block;
+ font-size: 14px;
+ text-overflow: ellipsis;
+ float: left;
+ font-weight: 400;
+}
+
+.ibox-title-gray h5 {
+ display: inline-block;
+ font-size: 14px;
+ margin: 0 0 7px;
+ padding: 0;
+ text-overflow: ellipsis;
+ float: left;
+}
+
+/* 导航页签 */
+.nav-tabs-custom {
+ margin-bottom: 20px;
+ background: #fff;
+ box-shadow: 0 1px 1px rgba(0,0,0,0.1);
+ border-radius: 3px
+}
+
+.nav-tabs-custom>.nav-tabs {
+ margin: 0;
+ border-bottom-color: #f4f4f4;
+ border-top-right-radius: 3px;
+ border-top-left-radius: 3px
+}
+
+.nav-tabs-custom>.nav-tabs>li {
+ border-top: 3px solid transparent;
+ margin-bottom: -2px;
+ margin-right: 5px
+}
+
+.nav-tabs-custom>.nav-tabs>li.disabled>a {
+ color: #777
+}
+
+.nav-tabs-custom>.nav-tabs>li>a {
+ color: #444;
+ font-weight: normal;
+ border-radius: 0
+}
+
+.nav-tabs-custom>.nav-tabs>li>a,.nav-tabs-custom>.nav-tabs>li>a:hover {
+ background: transparent;
+ margin: 0
+}
+
+.nav-tabs-custom>.nav-tabs>li>a:hover {
+ color: #999
+}
+
+.nav-tabs-custom>.nav-tabs>li:not(.active)>a:hover,.nav-tabs-custom>.nav-tabs>li:not(.active)>a:focus,.nav-tabs-custom>.nav-tabs>li:not(.active)>a:active {
+ border-color: transparent
+}
+
+.nav-tabs-custom>.nav-tabs>li.active {
+ border-top-color: #1890ff
+}
+
+.nav-tabs-custom>.nav-tabs>li.active>a,.nav-tabs-custom>.nav-tabs>li.active:hover>a {
+ background-color: #fff;
+ color: #444
+}
+
+.nav-tabs-custom>.nav-tabs>li.active>a {
+ border-top-color: transparent;
+ border-bottom-color: transparent;
+ border-left-color: #f4f4f4;
+ border-right-color: #f4f4f4
+}
+
+.nav-tabs-custom>.tab-content {
+ background: #fff;
+ padding: 10px;
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px
+}
+
/** 弹层组件 禁用样式 **/
.layer-disabled {
border: 1px #dedede solid !important;
@@ -171,11 +295,16 @@
label.error {
position: absolute;
right: 18px;
- top: 7px;
+ top: 10px;
color: #ef392b;
font-size: 12px
}
+.input-group label.error {
+ z-index:99;
+ right: 42px
+}
+
.Validform_error,input.error,select.error {
background-color: #fbe2e2;
border-color: #c66161;
@@ -407,7 +536,7 @@ label {
background: transparent;
outline: none;
height: 30px;
- width: 280px;
+ width: 200px;
padding-left: 5px;
}
@@ -426,17 +555,26 @@ label {
background: transparent;
outline: none;
height: 30px;
- width: 280px;
+ width: 200px;
}
.select-list .select-time input {
- width: 133px;
+ width: 93px;
}
.select-time label,.select-time span,.select-time input {
float: left;
}
+@media (max-width:767px) {
+ .select-time label,.select-time span,.select-time input {
+ float: none;
+ }
+ .select-list .select-time input {
+ width: 200px;
+ }
+}
+
.select-time label {
margin-top: 5px;
}
@@ -485,13 +623,55 @@ label {
}
.table-striped .table>thead:first-child>tr:first-child>th {
- color: #333;
+ font-weight: normal;
+ font-size: 13px
+}
+.table-striped table thead {
+ background-color: #eff3f8;
}
.table-bordered td,.table-bordered th {
border: 1px solid #ddd!important
}
+.fixed-table-container thead th >.both{
+ display: inline-block
+}
+
+/** 表格冻结列样式 **/
+.left-fixed-table-columns{
+ position: absolute;
+ background-color: #fff;
+ display: none;
+ border-right:1px solid #ddd;
+ overflow: hidden;
+}
+
+.right-fixed-table-columns{
+ position: absolute;
+ right:63px;
+ border-left:1px solid #ddd;
+ display: none;
+ z-index:100;
+}
+
+/** 表格树样式 **/
+.bootstrap-tree-table .treetable-indent {width:16px; height: 16px; display: inline-block; position: relative;}
+.bootstrap-tree-table .treetable-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;}
+.bootstrap-tree-table .treetable-selected{background: #f5f5f5 !important;}
+.bootstrap-tree-table .treetable-table{border:0 !important;margin-bottom:0}
+.bootstrap-tree-table .treetable-table tbody {display:block;height:auto;}
+.bootstrap-tree-table .treetable-table thead, .treetable-table tbody tr {display:table;width:100%;table-layout:fixed;}
+.bootstrap-tree-table .treetable-thead th{line-height:24px;border: 0 !important;border-radius: 4px;border-left:0px solid #e7eaec !important;border-bottom:1px solid #ccc!important;text-align: left;}
+.bootstrap-tree-table .treetable-thead tr :first-child{border-left:0 !important}
+.bootstrap-tree-table .treetable-tbody td{border: 0 !important;border-left:0px solid #e7eaec !important;border-bottom:1px solid #e7eaec!important;white-space: nowrap; text-overflow: ellipsis;}
+.bootstrap-tree-table .treetable-tbody tr :first-child{border-left:0 !important}
+.bootstrap-tree-table .treetable-bars .tool-left, .bootstrap-tree-table .treetable-bars .tool-right{margin-top: 10px; margin-bottom: 10px;}
+.bootstrap-tree-table .treetable-bars .tool-left{float: left;}
+.bootstrap-tree-table .treetable-bars .tool-right{float: right;}
+.bootstrap-tree-table .treetable-bars .columns li label{display: block;padding: 3px 20px;clear: both;font-weight: 400;line-height: 1.428571429;max-width: 100%;margin-bottom: 5px;cursor:pointer;}
+
+
/** 首页样式 **/
.ax_close_max {
position: fixed;
@@ -533,3 +713,39 @@ label {
.dropdown-menu > .divider {
background-color:#eee;
}
+
+/** 表单布局 **/
+.form-header {
+ font-size:15px;
+ color:#6379bb;
+ border-bottom:1px solid #ddd;
+ margin:8px 10px 25px 10px;
+ padding-bottom:5px
+}
+
+.form-content {
+ background-color: #ffffff;
+ color: inherit;
+ padding: 10px 15px 15px 15px;
+ border-color: #e7eaec;
+ -webkit-border-image: none;
+ -o-border-image: none;
+ border-image: none;
+ border-width: 1px 0px;
+}
+
+/** 表格跳转样式 **/
+.pageGo input {
+ height: 32px;
+ width: 50px;
+ margin-left: 5px;
+ margin-right: 5px;
+ text-align: center;
+ display: block;
+ float:left;
+}
+.pageGo button {
+ height: 32px;
+ display: block;
+ float:left;
+}
diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/index.js b/ruoyi-admin/src/main/resources/static/ruoyi/index.js
index ede98818b..9147e4319 100644
--- a/ruoyi-admin/src/main/resources/static/ruoyi/index.js
+++ b/ruoyi-admin/src/main/resources/static/ruoyi/index.js
@@ -131,7 +131,7 @@ $(function() {
var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
//实际滚动宽度
var scrollVal = 0;
- if ($(".page-tabs-content").width() < visibleWidth) {
+ if (($(".page-tabs-content").width() + 50) < visibleWidth) {
return false;
} else {
var tabElement = $(".menuTab:first");
@@ -249,7 +249,7 @@ $(function() {
function closeTab() {
var closeTabId = $(this).parents('.menuTab').data('id');
var currentWidth = $(this).parents('.menuTab').width();
-
+ var panelUrl = $(this).parents('.menuTab').data('panel');
// 当前元素处于活动状态
if ($(this).parents('.menuTab').hasClass('active')) {
@@ -307,6 +307,16 @@ $(function() {
return false;
}
});
+
+ if($.common.isNotEmpty(panelUrl)){
+ $('.menuTab[data-id="' + panelUrl + '"]').addClass('active').siblings('.menuTab').removeClass('active');
+ $('.mainContent .RuoYi_iframe').each(function() {
+ if ($(this).data('id') == panelUrl) {
+ $(this).show().siblings('.RuoYi_iframe').hide();
+ return false;
+ }
+ });
+ }
}
}
// 当前元素不处于活动状态
@@ -321,8 +331,8 @@ $(function() {
return false;
}
});
- scrollToTab($('.menuTab.active'));
}
+ scrollToTab($('.menuTab.active'));
return false;
}
diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js
index 596975c41..8a88fea0f 100644
--- a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js
+++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js
@@ -69,19 +69,50 @@ $(function() {
}
// laydate time-input 时间控件绑定
if ($(".time-input").length > 0) {
- layui.use('laydate', function() {
- var laydate = layui.laydate;
- var times = $(".time-input");
- for (var i = 0; i < times.length; i++) {
- var time = times[i];
- laydate.render({
- elem: time,
- theme: 'molv',
- trigger: 'click',
- done: function(value, date) {}
- });
- }
- });
+ layui.use('laydate', function () {
+ var com = layui.laydate;
+ $(".time-input").each(function (index, item) {
+ var time = $(item);
+ // 控制控件外观
+ var type = time.attr("data-type") || 'date';
+ // 控制回显格式
+ var format = time.attr("data-format") || 'yyyy-MM-dd';
+ // 控制日期控件按钮
+ var buttons = time.attr("data-btn") || 'clear|now|confirm', newBtnArr = [];
+ // 日期控件选择完成后回调处理
+ var callback = time.attr("data-callback") || {};
+ if (buttons) {
+ if (buttons.indexOf("|") > 0) {
+ var btnArr = buttons.split("|"), btnLen = btnArr.length;
+ for (var j = 0; j < btnLen; j++) {
+ if ("clear" === btnArr[j] || "now" === btnArr[j] || "confirm" === btnArr[j]) {
+ newBtnArr.push(btnArr[j]);
+ }
+ }
+ } else {
+ if ("clear" === buttons || "now" === buttons || "confirm" === buttons) {
+ newBtnArr.push(buttons);
+ }
+ }
+ } else {
+ newBtnArr = ['clear', 'now', 'confirm'];
+ }
+ com.render({
+ elem: item,
+ theme: 'molv',
+ trigger: 'click',
+ type: type,
+ format: format,
+ btns: newBtnArr,
+ done: function (value, data) {
+ if (typeof window[callback] != 'undefined'
+ && window[callback] instanceof Function) {
+ window[callback](value, data);
+ }
+ }
+ });
+ });
+ });
}
// tree 关键字搜索绑定
if ($("#keyword").length > 0) {
@@ -96,19 +127,15 @@ $(function() {
$.tree.searchNode(e);
}).bind("input propertychange", $.tree.searchNode);
}
- // 复选框后按钮样式状态变更
- $("#bootstrap-table").on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table", function () {
- var ids = $("#bootstrap-table").bootstrapTable("getSelections");
- $('#toolbar .btn-del').toggleClass('disabled', !ids.length);
- $('#toolbar .btn-edit').toggleClass('disabled', ids.length!=1);
- });
// tree表格树 展开/折叠
- var expandFlag = false;
+ var expandFlag;
$("#expandAllBtn").click(function() {
- if (expandFlag) {
- $('#bootstrap-tree-table').bootstrapTreeTable('expandAll');
+ var dataExpand = $.common.isEmpty($.table._option.expandAll) ? true : $.table._option.expandAll;
+ expandFlag = $.common.isEmpty(expandFlag) ? dataExpand : expandFlag;
+ if (!expandFlag) {
+ $('#' + $.table._option.id).bootstrapTreeTable('expandAll');
} else {
- $('#bootstrap-tree-table').bootstrapTreeTable('collapseAll');
+ $('#' + $.table._option.id).bootstrapTreeTable('collapseAll');
}
expandFlag = expandFlag ? false: true;
})
@@ -123,8 +150,25 @@ var refreshItem = function(){
target.attr('src', url).ready();
}
+/** 关闭选项卡 */
+var closeItem = function(){
+ var topWindow = $(window.parent.document);
+ var panelUrl = window.frameElement.getAttribute('data-panel');
+ $('.page-tabs-content .active i', topWindow).click();
+ if($.common.isNotEmpty(panelUrl)){
+ $('.menuTab[data-id="' + panelUrl + '"]', topWindow).addClass('active').siblings('.menuTab').removeClass('active');
+ $('.mainContent .RuoYi_iframe', topWindow).each(function() {
+ if ($(this).data('id') == panelUrl) {
+ $(this).show().siblings('.RuoYi_iframe').hide();
+ return false;
+ }
+ });
+ }
+}
+
/** 创建选项卡 */
function createMenuItem(dataUrl, menuName) {
+ var panelUrl = window.frameElement.getAttribute('data-id');
dataIndex = $.common.random(1,100),
flag = true;
if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
@@ -149,12 +193,17 @@ function createMenuItem(dataUrl, menuName) {
});
// 选项卡菜单不存在
if (flag) {
- var str = '';
+ var str = '';
$('.menuTab', topWindow).removeClass('active');
// 添加选项卡对应的iframe
- var str1 = '';
+ var str1 = '';
$('.mainContent', topWindow).find('iframe.RuoYi_iframe').hide().parents('.mainContent').append(str1);
+
+ window.parent.$.modal.loading("数据加载中,请稍后...");
+ $('.mainContent iframe:visible', topWindow).load(function () {
+ window.parent.$.modal.closeLoading();
+ });
// 添加选项卡
$('.menuTabs .page-tabs-content', topWindow).append(str);
diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
index 395b4ba11..5d4a24589 100644
--- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
+++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
@@ -1,921 +1,1222 @@
-/**
- * 通用js方法封装处理
- * Copyright (c) 2019 ruoyi
- */
-(function ($) {
- $.extend({
- _treeTable: {},
- _tree: {},
- // 表格封装处理
- table: {
- _option: {},
- _params: {},
- // 初始化表格参数
- init: function(options) {
- $.table._option = options;
- $.table._params = $.common.isEmpty(options.queryParams) ? $.table.queryParams : options.queryParams;
- _sortOrder = $.common.isEmpty(options.sortOrder) ? "asc" : options.sortOrder;
- _sortName = $.common.isEmpty(options.sortName) ? "" : options.sortName;
- _striped = $.common.isEmpty(options.striped) ? false : options.striped;
- _escape = $.common.isEmpty(options.escape) ? false : options.escape;
- _showFooter = $.common.isEmpty(options.showFooter) ? false : options.showFooter;
- $('#bootstrap-table').bootstrapTable({
- url: options.url, // 请求后台的URL(*)
- contentType: "application/x-www-form-urlencoded", // 编码类型
- method: 'post', // 请求方式(*)
- cache: false, // 是否使用缓存
- striped: _striped, // 是否显示行间隔色
- sortable: true, // 是否启用排序
- sortStable: true, // 设置为 true 将获得稳定的排序
- sortName: _sortName, // 排序列名称
- sortOrder: _sortOrder, // 排序方式 asc 或者 desc
- pagination: $.common.visible(options.pagination), // 是否显示分页(*)
- pageNumber: 1, // 初始化加载第一页,默认第一页
- pageSize: 10, // 每页的记录行数(*)
- pageList: [10, 25, 50], // 可供选择的每页的行数(*)
- escape: _escape, // 转义HTML字符串
- showFooter: _showFooter, // 是否显示表尾
- iconSize: 'outline', // 图标大小:undefined默认的按钮尺寸 xs超小按钮sm小按钮lg大按钮
- toolbar: '#toolbar', // 指定工作栏
- sidePagination: "server", // 启用服务端分页
- search: $.common.visible(options.search), // 是否显示搜索框功能
- showSearch: $.common.visible(options.showSearch), // 是否显示检索信息
- showRefresh: $.common.visible(options.showRefresh), // 是否显示刷新按钮
- showColumns: $.common.visible(options.showColumns), // 是否显示隐藏某列下拉框
- showToggle: $.common.visible(options.showToggle), // 是否显示详细视图和列表视图的切换按钮
- showExport: $.common.visible(options.showExport), // 是否支持导出文件
- queryParams: $.table._params, // 传递参数(*)
- columns: options.columns, // 显示列信息(*)
- responseHandler: $.table.responseHandler // 回调函数
- });
- },
- // 查询条件
- queryParams: function(params) {
- return {
- // 传递参数查询参数
- pageSize: params.limit,
- pageNum: params.offset / params.limit + 1,
- searchValue: params.search,
- orderByColumn: params.sort,
- isAsc: params.order
- };
- },
- // 请求获取数据后处理回调函数
- responseHandler: function(res) {
- if (res.code == 0) {
- return { rows: res.rows, total: res.total };
- } else {
- $.modal.alertWarning(res.msg);
- return { rows: [], total: 0 };
- }
- },
- // 序列号生成
- serialNumber: function (index) {
- var table = $('#bootstrap-table').bootstrapTable('getOptions');
- var pageSize = table.pageSize;
- var pageNumber = table.pageNumber;
- return pageSize * (pageNumber - 1) + index + 1;
- },
- // 搜索-默认第一个form
- search: function(formId) {
- var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
- var params = $("#bootstrap-table").bootstrapTable('getOptions');
- params.queryParams = function(params) {
- var search = {};
- $.each($("#" + currentId).serializeArray(), function(i, field) {
- search[field.name] = field.value;
- });
- search.pageSize = params.limit;
- search.pageNum = params.offset / params.limit + 1;
- search.searchValue = params.search;
- search.orderByColumn = params.sort;
- search.isAsc = params.order;
- return search;
- }
- $("#bootstrap-table").bootstrapTable('refresh', params);
- },
- // 导出数据
- exportExcel: function(formId) {
- var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
- $.modal.loading("正在导出数据,请稍后...");
- $.post($.table._option.exportUrl, $("#" + currentId).serializeArray(), function(result) {
- if (result.code == web_status.SUCCESS) {
- window.location.href = ctx + "common/download?fileName=" + result.msg + "&delete=" + true;
- } else {
- $.modal.alertError(result.msg);
- }
- $.modal.closeLoading();
- });
- },
- // 下载模板
- importTemplate: function() {
- $.get($.table._option.importTemplateUrl, function(result) {
- if (result.code == web_status.SUCCESS) {
- window.location.href = ctx + "common/download?fileName=" + result.msg + "&delete=" + true;
- } else {
- $.modal.alertError(result.msg);
- }
- });
- },
- // 导入数据
- importExcel: function(formId) {
- var currentId = $.common.isEmpty(formId) ? 'importForm' : formId;
- $.form.reset(currentId);
- layer.open({
- type: 1,
- area: ['400px', '230px'],
- fix: false,
- //不固定
- maxmin: true,
- shade: 0.3,
- title: '导入' + $.table._option.modalName + '数据',
- content: $('#' + currentId),
- btn: [' 导入', ' 取消'],
- // 弹层外区域关闭
- shadeClose: true,
- btn1: function(index, layero){
- var file = layero.find('#file').val();
- if (file == '' || (!$.common.endWith(file, '.xls') && !$.common.endWith(file, '.xlsx'))){
- $.modal.msgWarning("请选择后缀为 “xls”或“xlsx”的文件。");
- return false;
- }
- var index = layer.load(2, {shade: false});
- var formData = new FormData();
- formData.append("file", $('#file')[0].files[0]);
- formData.append("updateSupport", $("input[name='updateSupport']").is(':checked'));
- $.ajax({
- url: $.table._option.importUrl,
- data: formData,
- cache: false,
- contentType: false,
- processData: false,
- type: 'POST',
- success: function (result) {
- if (result.code == web_status.SUCCESS) {
- $.modal.closeAll();
- $.modal.alertSuccess(result.msg);
- $.table.refresh();
- } else {
- layer.close(index);
- $.modal.alertError(result.msg);
- }
- }
- });
- }
- });
- },
- // 刷新表格
- refresh: function() {
- $("#bootstrap-table").bootstrapTable('refresh', {
- silent: true
- });
- },
- // 查询表格指定列值
- selectColumns: function(column) {
- return $.map($('#bootstrap-table').bootstrapTable('getSelections'), function (row) {
- return row[column];
- });
- },
- // 查询表格首列值
- selectFirstColumns: function() {
- return $.map($('#bootstrap-table').bootstrapTable('getSelections'), function (row) {
- return row[$.table._option.columns[1].field];
- });
- },
- // 回显数据字典
- selectDictLabel: function(datas, value) {
- var actions = [];
- $.each(datas, function(index, dict) {
- if (dict.dictValue == value) {
- actions.push("" + dict.dictLabel + "");
- return false;
- }
- });
- return actions.join('');
- },
- // 显示表格指定列
- showColumn: function(column) {
- $("#bootstrap-table").bootstrapTable('showColumn', column);
- },
- // 隐藏表格指定列
- hideColumn: function(column) {
- $("#bootstrap-table").bootstrapTable('hideColumn', column);
- }
- },
- // 表格树封装处理
- treeTable: {
- _option: {},
- // 初始化表格
- init: function(options) {
- $.table._option = options;
- _striped = $.common.isEmpty(options.striped) ? false : options.striped;
- _expandColumn = $.common.isEmpty(options.expandColumn) ? '1' : options.expandColumn;
- var treeTable = $('#bootstrap-tree-table').bootstrapTreeTable({
- code: options.code, // 用于设置父子关系
- parentCode: options.parentCode, // 用于设置父子关系
- type: 'get', // 请求方式(*)
- url: options.url, // 请求后台的URL(*)
- ajaxParams: {}, // 请求数据的ajax的data属性
- expandColumn: _expandColumn, // 在哪一列上面显示展开按钮
- striped: _striped, // 是否显示行间隔色
- bordered: true, // 是否显示边框
- toolbar: '#toolbar', // 指定工作栏
- showRefresh: $.common.visible(options.showRefresh), // 是否显示刷新按钮
- showColumns: $.common.visible(options.showColumns), // 是否显示隐藏某列下拉框
- expandAll: $.common.visible(options.expandAll), // 是否全部展开
- expandFirst: $.common.visible(options.expandFirst), // 是否默认第一级展开--expandAll为false时生效
- columns: options.columns
- });
- $._treeTable = treeTable;
- },
- // 条件查询
- search: function(formId) {
- var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
- var params = {};
- $.each($("#" + currentId).serializeArray(), function(i, field) {
- params[field.name] = field.value;
- });
- $._treeTable.bootstrapTreeTable('refresh', params);
- },
- // 刷新
- refresh: function() {
- $._treeTable.bootstrapTreeTable('refresh');
- },
- },
- // 表单封装处理
- form: {
- // 表单重置
- reset: function(formId) {
- var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
- $("#" + currentId)[0].reset();
- },
- // 获取选中复选框项
- selectCheckeds: function(name) {
- var checkeds = "";
- $('input:checkbox[name="' + name + '"]:checked').each(function(i) {
- if (0 == i) {
- checkeds = $(this).val();
- } else {
- checkeds += ("," + $(this).val());
- }
- });
- return checkeds;
- },
- // 获取选中下拉框项
- selectSelects: function(name) {
- var selects = "";
- $('#' + name + ' option:selected').each(function (i) {
- if (0 == i) {
- selects = $(this).val();
- } else {
- selects += ("," + $(this).val());
- }
- });
- return selects;
- }
- },
- // 弹出层封装处理
- modal: {
- // 显示图标
- icon: function(type) {
- var icon = "";
- if (type == modal_status.WARNING) {
- icon = 0;
- } else if (type == modal_status.SUCCESS) {
- icon = 1;
- } else if (type == modal_status.FAIL) {
- icon = 2;
- } else {
- icon = 3;
- }
- return icon;
- },
- // 消息提示
- msg: function(content, type) {
- if (type != undefined) {
- layer.msg(content, { icon: $.modal.icon(type), time: 1000, shift: 5 });
- } else {
- layer.msg(content);
- }
- },
- // 错误消息
- msgError: function(content) {
- $.modal.msg(content, modal_status.FAIL);
- },
- // 成功消息
- msgSuccess: function(content) {
- $.modal.msg(content, modal_status.SUCCESS);
- },
- // 警告消息
- msgWarning: function(content) {
- $.modal.msg(content, modal_status.WARNING);
- },
- // 弹出提示
- alert: function(content, type) {
- layer.alert(content, {
- icon: $.modal.icon(type),
- title: "系统提示",
- btn: ['确认'],
- btnclass: ['btn btn-primary'],
- });
- },
- // 消息提示并刷新父窗体
- msgReload: function(msg, type) {
- layer.msg(msg, {
- icon: $.modal.icon(type),
- time: 500,
- shade: [0.1, '#8F8F8F']
- },
- function() {
- $.modal.reload();
- });
- },
- // 错误提示
- alertError: function(content) {
- $.modal.alert(content, modal_status.FAIL);
- },
- // 成功提示
- alertSuccess: function(content) {
- $.modal.alert(content, modal_status.SUCCESS);
- },
- // 警告提示
- alertWarning: function(content) {
- $.modal.alert(content, modal_status.WARNING);
- },
- // 关闭窗体
- close: function () {
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- },
- // 关闭全部窗体
- closeAll: function () {
- layer.closeAll();
- },
- // 确认窗体
- confirm: function (content, callBack) {
- layer.confirm(content, {
- icon: 3,
- title: "系统提示",
- btn: ['确认', '取消'],
- btnclass: ['btn btn-primary', 'btn btn-danger'],
- }, function (index) {
- layer.close(index);
- callBack(true);
- });
- },
- // 弹出层指定宽度
- open: function (title, url, width, height) {
- //如果是移动端,就使用自适应大小弹窗
- if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
- width = 'auto';
- height = 'auto';
- }
- if ($.common.isEmpty(title)) {
- title = false;
- };
- if ($.common.isEmpty(url)) {
- url = "/404.html";
- };
- if ($.common.isEmpty(width)) {
- width = 800;
- };
- if ($.common.isEmpty(height)) {
- height = ($(window).height() - 50);
- };
- layer.open({
- type: 2,
- area: [width + 'px', height + 'px'],
- fix: false,
- //不固定
- maxmin: true,
- shade: 0.3,
- title: title,
- content: url,
- btn: ['确定', '关闭'],
- // 弹层外区域关闭
- shadeClose: true,
- yes: function(index, layero) {
- var iframeWin = layero.find('iframe')[0];
- iframeWin.contentWindow.submitHandler();
- },
- cancel: function(index) {
- return true;
- }
- });
- },
- // 弹出层指定参数选项
- openOptions: function (options) {
- var _url = $.common.isEmpty(options.url) ? "/404.html" : options.url;
- var _title = $.common.isEmpty(options.title) ? "系统窗口" : options.title;
- var _width = $.common.isEmpty(options.width) ? "800" : options.width;
- var _height = $.common.isEmpty(options.height) ? ($(window).height() - 50) : options.height;
- layer.open({
- type: 2,
- maxmin: true,
- shade: 0.3,
- title: _title,
- fix: false,
- area: [_width + 'px', _height + 'px'],
- content: _url,
- shadeClose: true,
- btn: [' 确认', ' 关闭'],
- yes: function (index, layero) {
- options.callBack(index, layero)
- }, cancel: function () {
- return true;
- }
- });
- },
- // 弹出层全屏
- openFull: function (title, url, width, height) {
- //如果是移动端,就使用自适应大小弹窗
- if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
- width = 'auto';
- height = 'auto';
- }
- if ($.common.isEmpty(title)) {
- title = false;
- };
- if ($.common.isEmpty(url)) {
- url = "/404.html";
- };
- if ($.common.isEmpty(width)) {
- width = 800;
- };
- if ($.common.isEmpty(height)) {
- height = ($(window).height() - 50);
- };
- var index = layer.open({
- type: 2,
- area: [width + 'px', height + 'px'],
- fix: false,
- //不固定
- maxmin: true,
- shade: 0.3,
- title: title,
- content: url,
- btn: ['确定', '关闭'],
- // 弹层外区域关闭
- shadeClose: true,
- yes: function(index, layero) {
- var iframeWin = layero.find('iframe')[0];
- iframeWin.contentWindow.submitHandler();
- },
- cancel: function(index) {
- return true;
- }
- });
- layer.full(index);
- },
- // 禁用按钮
- disable: function() {
- $("a[class*=layui-layer-btn]", window.parent.document).addClass("layer-disabled");
- },
- // 启用按钮
- enable: function() {
- $("a[class*=layui-layer-btn]", window.parent.document).removeClass("layer-disabled");
- },
- // 打开遮罩层
- loading: function (message) {
- $.blockUI({ message: '' });
- },
- // 关闭遮罩层
- closeLoading: function () {
- setTimeout(function(){
- $.unblockUI();
- }, 50);
- },
- // 重新加载
- reload: function () {
- parent.location.reload();
- }
- },
- // 操作封装处理
- operate: {
- // 提交数据
- submit: function(url, type, dataType, data) {
- var config = {
- url: url,
- type: type,
- dataType: dataType,
- data: data,
- beforeSend: function () {
- $.modal.loading("正在处理中,请稍后...");
- },
- success: function(result) {
- $.operate.ajaxSuccess(result);
- }
- };
- $.ajax(config)
- },
- // post请求传输
- post: function(url, data) {
- $.operate.submit(url, "post", "json", data);
- },
- // get请求传输
- get: function(url) {
- $.operate.submit(url, "get", "json", "");
- },
- // 详细信息
- detail: function(id, width, height) {
- var _url = $.common.isEmpty(id) ? $.table._option.detailUrl : $.table._option.detailUrl.replace("{id}", id);
- var _width = $.common.isEmpty(width) ? "800" : width;
- var _height = $.common.isEmpty(height) ? ($(window).height() - 50) : height;
- //如果是移动端,就使用自适应大小弹窗
- if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
- _width = 'auto';
- _height = 'auto';
- }
- top.layer.open({
- type: 2,
- area: [_width + 'px', _height + 'px'],
- fix: false,
- //不固定
- maxmin: true,
- shade: 0.3,
- title: $.table._option.modalName + "详细",
- content: _url,
- btn: ['关闭'],
- // 弹层外区域关闭
- shadeClose: true,
- cancel: function(index){
- return true;
- }
- });
- },
- // 删除信息
- remove: function(id) {
- $.modal.confirm("确定删除该条" + $.table._option.modalName + "信息吗?", function() {
- var url = $.common.isEmpty(id) ? $.table._option.removeUrl : $.table._option.removeUrl.replace("{id}", id);
- var data = { "ids": id };
- $.operate.submit(url, "post", "json", data);
- });
- },
- // 批量删除信息
- removeAll: function() {
- var rows = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
- if (rows.length == 0) {
- $.modal.alertWarning("请至少选择一条记录");
- return;
- }
- $.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
- var url = $.table._option.removeUrl;
- var data = { "ids": rows.join() };
- $.operate.submit(url, "post", "json", data);
- });
- },
- // 清空信息
- clean: function() {
- $.modal.confirm("确定清空所有" + $.table._option.modalName + "吗?", function() {
- var url = $.table._option.cleanUrl;
- $.operate.submit(url, "post", "json", "");
- });
- },
- // 添加信息
- add: function(id) {
- var url = $.common.isEmpty(id) ? $.table._option.createUrl : $.table._option.createUrl.replace("{id}", id);
- $.modal.open("添加" + $.table._option.modalName, url);
- },
- // 修改信息
- edit: function(id) {
- var url = "/404.html";
- if ($.common.isNotEmpty(id)) {
- url = $.table._option.updateUrl.replace("{id}", id);
- } else {
- var id = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
- if (id.length == 0) {
- $.modal.alertWarning("请至少选择一条记录");
- return;
- }
- url = $.table._option.updateUrl.replace("{id}", id);
- }
- $.modal.open("修改" + $.table._option.modalName, url);
- },
- // 工具栏表格树修改
- editTree: function() {
- var row = $('#bootstrap-tree-table').bootstrapTreeTable('getSelections')[0];
- if ($.common.isEmpty(row)) {
- $.modal.alertWarning("请至少选择一条记录");
- return;
- }
- var url = $.table._option.updateUrl.replace("{id}", row[$.table._option.uniqueId]);
- $.modal.open("修改" + $.table._option.modalName, url);
- },
- // 添加信息 全屏
- addFull: function(id) {
- var url = $.common.isEmpty(id) ? $.table._option.createUrl : $.table._option.createUrl.replace("{id}", id);
- $.modal.openFull("添加" + $.table._option.modalName, url);
- },
- // 修改信息 全屏
- editFull: function(id) {
- var url = "/404.html";
- if ($.common.isNotEmpty(id)) {
- url = $.table._option.updateUrl.replace("{id}", id);
- } else {
- var row = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
- url = $.table._option.updateUrl.replace("{id}", row);
- }
- $.modal.openFull("修改" + $.table._option.modalName, url);
- },
- // 保存信息
- save: function(url, data) {
- var config = {
- url: url,
- type: "post",
- dataType: "json",
- data: data,
- beforeSend: function () {
- $.modal.loading("正在处理中,请稍后...");
- $.modal.disable();
- },
- success: function(result) {
- $.operate.successCallback(result);
- }
- };
- $.ajax(config)
- },
- // 保存结果弹出msg刷新table表格
- ajaxSuccess: function (result) {
- if (result.code == web_status.SUCCESS) {
- $.modal.msgSuccess(result.msg);
- $.table.refresh();
- } else {
- $.modal.alertError(result.msg);
- }
- $.modal.closeLoading();
- },
- // 成功结果提示msg(父窗体全局更新)
- saveSuccess: function (result) {
- if (result.code == web_status.SUCCESS) {
- $.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
- } else {
- $.modal.alertError(result.msg);
- }
- $.modal.closeLoading();
- },
- // 成功回调执行事件(父窗体静默更新)
- successCallback: function(result) {
- if (result.code == web_status.SUCCESS) {
- if (window.parent.$("#bootstrap-table").length > 0) {
- $.modal.close();
- window.parent.$.modal.msgSuccess(result.msg);
- window.parent.$.table.refresh();
- } else if (window.parent.$("#bootstrap-tree-table").length > 0) {
- $.modal.close();
- window.parent.$.modal.msgSuccess(result.msg);
- window.parent.$.treeTable.refresh();
- } else {
- $.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
- }
- } else {
- $.modal.alertError(result.msg);
- }
- $.modal.closeLoading();
- $.modal.enable();
- }
- },
- // 校验封装处理
- validate: {
- // 判断返回标识是否唯一 false 不存在 true 存在
- unique: function (value) {
- if (value == "0") {
- return true;
- }
- return false;
- },
- // 表单验证
- form: function (formId) {
- var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
- return $("#" + currentId).validate().form();
- }
- },
- // 树插件封装处理
- tree: {
- _option: {},
- _lastValue: {},
- // 初始化树结构
- init: function(options) {
- $.tree._option = options;
- // 属性ID
- var _id = $.common.isEmpty(options.id) ? "tree" : options.id;
- // 展开等级节点
- var _expandLevel = $.common.isEmpty(options.expandLevel) ? 0 : options.expandLevel;
- // 树结构初始化加载
- var setting = {
- check: options.check,
- view: { selectedMulti: false, nameIsHTML: true },
- data: { key: { title: "title" }, simpleData: { enable: true } },
- callback: { onClick: options.onClick }
- };
- $.get(options.url, function(data) {
- var treeName = $("#treeName").val();
- var treeId = $("#treeId").val();
- tree = $.fn.zTree.init($("#" + _id), setting, data);
- $._tree = tree;
- // 展开第一级节点
- var nodes = tree.getNodesByParam("level", 0);
- for (var i = 0; i < nodes.length; i++) {
- if(_expandLevel > 0) {
- tree.expandNode(nodes[i], true, false, false);
- }
- $.tree.selectByIdName(treeId, treeName, nodes[i]);
- }
- // 展开第二级节点
- nodes = tree.getNodesByParam("level", 1);
- for (var i = 0; i < nodes.length; i++) {
- if(_expandLevel > 1) {
- tree.expandNode(nodes[i], true, false, false);
- }
- $.tree.selectByIdName(treeId, treeName, nodes[i]);
- }
- // 展开第三级节点
- nodes = tree.getNodesByParam("level", 2);
- for (var i = 0; i < nodes.length; i++) {
- if(_expandLevel > 2) {
- tree.expandNode(nodes[i], true, false, false);
- }
- $.tree.selectByIdName(treeId, treeName, nodes[i]);
- }
- }, null, null, "正在加载,请稍后...");
- },
- // 搜索节点
- searchNode: function() {
- // 取得输入的关键字的值
- var value = $.common.trim($("#keyword").val());
- if ($.tree._lastValue === value) {
- return;
- }
- // 保存最后一次搜索名称
- $.tree._lastValue = value;
- var nodes = $._tree.getNodes();
- // 如果要查空字串,就退出不查了。
- if (value == "") {
- $.tree.showAllNode(nodes);
- return;
- }
- $.tree.hideAllNode(nodes);
- // 根据搜索值模糊匹配
- $.tree.updateNodes($._tree.getNodesByParamFuzzy("name", value));
- },
- // 根据Id和Name选中指定节点
- selectByIdName: function(treeId, treeName, node) {
- if ($.common.isNotEmpty(treeName) && $.common.isNotEmpty(treeId)) {
- if (treeId == node.id && treeName == node.name) {
- $._tree.selectNode(node, true);
- }
- }
- },
- // 显示所有节点
- showAllNode: function(nodes) {
- nodes = $._tree.transformToArray(nodes);
- for (var i = nodes.length - 1; i >= 0; i--) {
- if (nodes[i].getParentNode() != null) {
- $._tree.expandNode(nodes[i], true, false, false, false);
- } else {
- $._tree.expandNode(nodes[i], true, true, false, false);
- }
- $._tree.showNode(nodes[i]);
- $.tree.showAllNode(nodes[i].children);
- }
- },
- // 隐藏所有节点
- hideAllNode: function(nodes) {
- var tree = $.fn.zTree.getZTreeObj("tree");
- var nodes = $._tree.transformToArray(nodes);
- for (var i = nodes.length - 1; i >= 0; i--) {
- $._tree.hideNode(nodes[i]);
- }
- },
- // 显示所有父节点
- showParent: function(treeNode) {
- var parentNode;
- while ((parentNode = treeNode.getParentNode()) != null) {
- $._tree.showNode(parentNode);
- $._tree.expandNode(parentNode, true, false, false);
- treeNode = parentNode;
- }
- },
- // 显示所有孩子节点
- showChildren: function(treeNode) {
- if (treeNode.isParent) {
- for (var idx in treeNode.children) {
- var node = treeNode.children[idx];
- $._tree.showNode(node);
- $.tree.showChildren(node);
- }
- }
- },
- // 更新节点状态
- updateNodes: function(nodeList) {
- $._tree.showNodes(nodeList);
- for (var i = 0, l = nodeList.length; i < l; i++) {
- var treeNode = nodeList[i];
- $.tree.showChildren(treeNode);
- $.tree.showParent(treeNode)
- }
- },
- // 获取当前被勾选集合
- getCheckedNodes: function(column) {
- var _column = $.common.isEmpty(column) ? "id" : column;
- var nodes = $._tree.getCheckedNodes(true);
- return $.map(nodes, function (row) {
- return row[_column];
- }).join();
- },
- // 不允许根父节点选择
- notAllowParents: function(_tree) {
- var nodes = _tree.getSelectedNodes();
- for (var i = 0; i < nodes.length; i++) {
- if (nodes[i].level == 0) {
- $.modal.msgError("不能选择根节点(" + nodes[i].name + ")");
- return false;
- }
- if (nodes[i].isParent) {
- $.modal.msgError("不能选择父节点(" + nodes[i].name + ")");
- return false;
- }
- }
- return true;
- },
- // 不允许最后层级节点选择
- notAllowLastLevel: function(_tree) {
- var nodes = _tree.getSelectedNodes();
- for (var i = 0; i < nodes.length; i++) {
- if (nodes[i].level == nodes.length + 1) {
- $.modal.msgError("不能选择最后层级节点(" + nodes[i].name + ")");
- return false;
- }
- }
- return true;
- },
- // 隐藏/显示搜索栏
- toggleSearch: function() {
- $('#search').slideToggle(200);
- $('#btnShow').toggle();
- $('#btnHide').toggle();
- $('#keyword').focus();
- },
- // 折叠
- collapse: function() {
- $._tree.expandAll(false);
- },
- // 展开
- expand: function() {
- $._tree.expandAll(true);
- }
- },
- // 通用方法封装处理
- common: {
- // 判断字符串是否为空
- isEmpty: function (value) {
- if (value == null || this.trim(value) == "") {
- return true;
- }
- return false;
- },
- // 判断一个字符串是否为非空串
- isNotEmpty: function (value) {
- return !$.common.isEmpty(value);
- },
- // 是否显示数据 为空默认为显示
- visible: function (value) {
- if ($.common.isEmpty(value) || value == true) {
- return true;
- }
- return false;
- },
- // 空格截取
- trim: function (value) {
- if (value == null) {
- return "";
- }
- return value.toString().replace(/(^\s*)|(\s*$)|\r|\n/g, "");
- },
- // 指定随机数返回
- random: function (min, max) {
- return Math.floor((Math.random() * max) + min);
- },
- startWith: function(value, start) {
- var reg = new RegExp("^" + start);
- return reg.test(value)
- },
- endWith: function(value, end) {
- var reg = new RegExp(end + "$");
- return reg.test(value)
- }
- }
- });
-})(jQuery);
-
-/** 消息状态码 */
-web_status = {
- SUCCESS: 0,
- FAIL: 500
-};
-
-/** 弹窗状态码 */
-modal_status = {
- SUCCESS: "success",
- FAIL: "error",
- WARNING: "warning"
+/**
+ * 通用js方法封装处理
+ * Copyright (c) 2019 ruoyi
+ */
+(function ($) {
+ $.extend({
+ _treeTable: {},
+ _tree: {},
+ // 表格封装处理
+ table: {
+ _option: {},
+ // 初始化表格参数
+ init: function(options) {
+ var defaults = {
+ id: "bootstrap-table",
+ type: 0, // 0 代表bootstrapTable 1代表bootstrapTreeTable
+ height: undefined,
+ sidePagination: "server",
+ sortName: "",
+ sortOrder: "asc",
+ pagination: true,
+ pageSize: 10,
+ toolbar: "toolbar",
+ striped: false,
+ escape: false,
+ showFooter: false,
+ search: false,
+ showSearch: true,
+ showPageGo: false,
+ showRefresh: true,
+ showColumns: true,
+ showToggle: true,
+ showExport: false,
+ clickToSelect: false,
+ rememberSelected: false,
+ fixedColumns: false,
+ fixedNumber: 0,
+ rightFixedColumns: false,
+ rightFixedNumber: 0,
+ queryParams: $.table.queryParams,
+ };
+ var options = $.extend(defaults, options);
+ $.table._option = options;
+ $.table.initEvent();
+ $('#' + options.id).bootstrapTable({
+ url: options.url, // 请求后台的URL(*)
+ contentType: "application/x-www-form-urlencoded", // 编码类型
+ method: 'post', // 请求方式(*)
+ cache: false, // 是否使用缓存
+ height: options.height, // 表格的高度
+ striped: options.striped, // 是否显示行间隔色
+ sortable: true, // 是否启用排序
+ sortStable: true, // 设置为 true 将获得稳定的排序
+ sortName: options.sortName, // 排序列名称
+ sortOrder: options.sortOrder, // 排序方式 asc 或者 desc
+ pagination: options.pagination, // 是否显示分页(*)
+ pageNumber: 1, // 初始化加载第一页,默认第一页
+ pageSize: options.pageSize, // 每页的记录行数(*)
+ pageList: [10, 25, 50], // 可供选择的每页的行数(*)
+ escape: options.escape, // 转义HTML字符串
+ showFooter: options.showFooter, // 是否显示表尾
+ iconSize: 'outline', // 图标大小:undefined默认的按钮尺寸 xs超小按钮sm小按钮lg大按钮
+ toolbar: '#' + options.toolbar, // 指定工作栏
+ sidePagination: options.sidePagination, // server启用服务端分页client客户端分页
+ search: options.search, // 是否显示搜索框功能
+ showSearch: options.showSearch, // 是否显示检索信息
+ showPageGo: options.showPageGo, // 是否显示跳转页
+ showRefresh: options.showRefresh, // 是否显示刷新按钮
+ showColumns: options.showColumns, // 是否显示隐藏某列下拉框
+ showToggle: options.showToggle, // 是否显示详细视图和列表视图的切换按钮
+ showExport: options.showExport, // 是否支持导出文件
+ clickToSelect: options.clickToSelect, // 是否启用点击选中行
+ rememberSelected: options.rememberSelected, // 启用翻页记住前面的选择
+ fixedColumns: options.fixedColumns, // 是否启用冻结列(左侧)
+ fixedNumber: options.fixedNumber, // 列冻结的个数(左侧)
+ rightFixedColumns: options.rightFixedColumns, // 是否启用冻结列(右侧)
+ rightFixedNumber: options.rightFixedNumber, // 列冻结的个数(右侧)
+ queryParams: options.queryParams, // 传递参数(*)
+ columns: options.columns, // 显示列信息(*)
+ responseHandler: $.table.responseHandler, // 在加载服务器发送来的数据之前处理函数
+ onLoadSuccess: $.table.onLoadSuccess, // 当所有数据被加载时触发处理函数
+ });
+ },
+ // 查询条件
+ queryParams: function(params) {
+ return {
+ // 传递参数查询参数
+ pageSize: params.limit,
+ pageNum: params.offset / params.limit + 1,
+ searchValue: params.search,
+ orderByColumn: params.sort,
+ isAsc: params.order
+ };
+ },
+ // 请求获取数据后处理回调函数
+ responseHandler: function(res) {
+ if (res.code == 0) {
+ if ($.common.isNotEmpty($.table._option.sidePagination) && $.table._option.sidePagination == 'client') {
+ return res.rows;
+ } else {
+ if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
+ var column = $.common.isEmpty($.table._option.uniqueId) ? $.table._option.columns[1].field : $.table._option.uniqueId;
+ $.each(res.rows, function(i, row) {
+ row.state = $.inArray(row[column], selectionIds) !== -1;
+ })
+ }
+ return { rows: res.rows, total: res.total };
+ }
+ } else {
+ $.modal.alertWarning(res.msg);
+ return { rows: [], total: 0 };
+ }
+ },
+ // 初始化事件
+ initEvent: function(data) {
+ // 触发行点击事件 加载成功事件
+ $("#" + $.table._option.id).on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table load-success.bs.table", function () {
+ // 工具栏按钮控制
+ var rows = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
+ $('#' + $.table._option.toolbar + ' .btn-del').toggleClass('disabled', !rows.length);
+ $('#' + $.table._option.toolbar + ' .btn-edit').toggleClass('disabled', rows.length!=1);
+ });
+ // 绑定选中事件、取消事件、全部选中、全部取消
+ $("#" + $.table._option.id).on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rows) {
+ // 复选框分页保留保存选中数组
+ var rowIds = $.table.affectedRowIds(rows);
+ if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
+ func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
+ selectionIds = _[func](selectionIds, rowIds);
+ }
+ });
+ },
+ // 当所有数据被加载时触发
+ onLoadSuccess: function(data) {
+ // 浮动提示框特效
+ $("[data-toggle='tooltip']").tooltip();
+ },
+ // 表格销毁
+ destroy: function (tableId) {
+ var currentId = $.common.isEmpty(tableId) ? $.table._option.id : tableId;
+ $("#" + currentId).bootstrapTable('destroy');
+ },
+ // 序列号生成
+ serialNumber: function (index) {
+ var table = $('#' + $.table._option.id).bootstrapTable('getOptions');
+ var pageSize = table.pageSize;
+ var pageNumber = table.pageNumber;
+ return pageSize * (pageNumber - 1) + index + 1;
+ },
+ // 列超出指定长度浮动提示
+ tooltip: function (value, length) {
+ var _length = $.common.isEmpty(length) ? 20 : length;
+ var _text = "";
+ var _value = $.common.nullToStr(value);
+ if (_value.length > _length) {
+ _text = _value.substr(0, _length) + "...";
+ } else {
+ _text = _value;
+ }
+ return '' + _text +'';
+ },
+ // 下拉按钮切换
+ dropdownToggle: function (value) {
+ var actions = [];
+ actions.push('');
+ actions.push('');
+ actions.push('');
+ actions.push('
');
+ return actions.join('');
+ },
+ // 搜索-默认第一个form
+ search: function(formId) {
+ var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
+ var params = $("#" + $.table._option.id).bootstrapTable('getOptions');
+ params.queryParams = function(params) {
+ var search = {};
+ $.each($("#" + currentId).serializeArray(), function(i, field) {
+ search[field.name] = field.value;
+ });
+ search.pageSize = params.limit;
+ search.pageNum = params.offset / params.limit + 1;
+ search.searchValue = params.search;
+ search.orderByColumn = params.sort;
+ search.isAsc = params.order;
+ return search;
+ }
+ $("#" + $.table._option.id).bootstrapTable('refresh', params);
+ },
+ // 导出数据
+ exportExcel: function(formId) {
+ $.modal.confirm("确定导出所有" + $.table._option.modalName + "吗?", function() {
+ var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
+ $.modal.loading("正在导出数据,请稍后...");
+ $.post($.table._option.exportUrl, $("#" + currentId).serializeArray(), function(result) {
+ if (result.code == web_status.SUCCESS) {
+ window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
+ } else if (result.code == web_status.WARNING) {
+ $.modal.alertWarning(result.msg)
+ } else {
+ $.modal.alertError(result.msg);
+ }
+ $.modal.closeLoading();
+ });
+ });
+ },
+ // 下载模板
+ importTemplate: function() {
+ $.get($.table._option.importTemplateUrl, function(result) {
+ if (result.code == web_status.SUCCESS) {
+ window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
+ } else if (result.code == web_status.WARNING) {
+ $.modal.alertWarning(result.msg)
+ } else {
+ $.modal.alertError(result.msg);
+ }
+ });
+ },
+ // 导入数据
+ importExcel: function(formId) {
+ var currentId = $.common.isEmpty(formId) ? 'importForm' : formId;
+ $.form.reset(currentId);
+ layer.open({
+ type: 1,
+ area: ['400px', '230px'],
+ fix: false,
+ //不固定
+ maxmin: true,
+ shade: 0.3,
+ title: '导入' + $.table._option.modalName + '数据',
+ content: $('#' + currentId),
+ btn: [' 导入', ' 取消'],
+ // 弹层外区域关闭
+ shadeClose: true,
+ btn1: function(index, layero){
+ var file = layero.find('#file').val();
+ if (file == '' || (!$.common.endWith(file, '.xls') && !$.common.endWith(file, '.xlsx'))){
+ $.modal.msgWarning("请选择后缀为 “xls”或“xlsx”的文件。");
+ return false;
+ }
+ var index = layer.load(2, {shade: false});
+ $.modal.disable();
+ var formData = new FormData();
+ formData.append("file", $('#file')[0].files[0]);
+ formData.append("updateSupport", $("input[name='updateSupport']").is(':checked'));
+ $.ajax({
+ url: $.table._option.importUrl,
+ data: formData,
+ cache: false,
+ contentType: false,
+ processData: false,
+ type: 'POST',
+ success: function (result) {
+ if (result.code == web_status.SUCCESS) {
+ $.modal.closeAll();
+ $.modal.alertSuccess(result.msg);
+ $.table.refresh();
+ } else if (result.code == web_status.WARNING) {
+ layer.close(index);
+ $.modal.enable();
+ $.modal.alertWarning(result.msg)
+ } else {
+ layer.close(index);
+ $.modal.enable();
+ $.modal.alertError(result.msg);
+ }
+ }
+ });
+ }
+ });
+ },
+ // 刷新表格
+ refresh: function() {
+ $("#" + $.table._option.id).bootstrapTable('refresh', {
+ silent: true
+ });
+ },
+ // 查询表格指定列值
+ selectColumns: function(column) {
+ var rows = $.map($('#' + $.table._option.id).bootstrapTable('getSelections'), function (row) {
+ return row[column];
+ });
+ if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
+ rows = rows.concat(selectionIds);
+ }
+ return $.common.uniqueFn(rows);
+ },
+ // 获取当前页选中或者取消的行ID
+ affectedRowIds: function(rows) {
+ var column = $.common.isEmpty($.table._option.uniqueId) ? $.table._option.columns[1].field : $.table._option.uniqueId;
+ var rowIds;
+ if ($.isArray(rows)) {
+ rowIds = $.map(rows, function(row) {
+ return row[column];
+ });
+ } else {
+ rowIds = [rows[column]];
+ }
+ return rowIds;
+ },
+ // 查询表格首列值
+ selectFirstColumns: function() {
+ var rows = $.map($('#' + $.table._option.id).bootstrapTable('getSelections'), function (row) {
+ return row[$.table._option.columns[1].field];
+ });
+ if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
+ rows = rows.concat(selectionIds);
+ }
+ return $.common.uniqueFn(rows);
+ },
+ // 回显数据字典
+ selectDictLabel: function(datas, value) {
+ var actions = [];
+ $.each(datas, function(index, dict) {
+ if (dict.dictValue == ('' + value)) {
+ var listClass = $.common.equals("default", dict.listClass) ? "" : "badge badge-" + dict.listClass;
+ actions.push($.common.sprintf("%s", listClass, dict.dictLabel));
+ return false;
+ }
+ });
+ return actions.join('');
+ },
+ // 显示表格指定列
+ showColumn: function(column) {
+ $("#" + $.table._option.id).bootstrapTable('showColumn', column);
+ },
+ // 隐藏表格指定列
+ hideColumn: function(column) {
+ $("#" + $.table._option.id).bootstrapTable('hideColumn', column);
+ }
+ },
+ // 表格树封装处理
+ treeTable: {
+ // 初始化表格
+ init: function(options) {
+ var defaults = {
+ id: "bootstrap-tree-table",
+ type: 1, // 0 代表bootstrapTable 1代表bootstrapTreeTable
+ height: 0,
+ rootIdValue: null,
+ ajaxParams: {},
+ toolbar: "toolbar",
+ striped: false,
+ expandColumn: 1,
+ showRefresh: true,
+ showColumns: true,
+ expandAll: true,
+ expandFirst: true
+ };
+ var options = $.extend(defaults, options);
+ $.table._option = options;
+ var treeTable = $('#' + options.id).bootstrapTreeTable({
+ code: options.code, // 用于设置父子关系
+ parentCode: options.parentCode, // 用于设置父子关系
+ type: 'get', // 请求方式(*)
+ url: options.url, // 请求后台的URL(*)
+ ajaxParams: options.ajaxParams, // 请求数据的ajax的data属性
+ rootIdValue: options.rootIdValue, // 设置指定根节点id值
+ height: options.height, // 表格树的高度
+ expandColumn: options.expandColumn, // 在哪一列上面显示展开按钮
+ striped: options.striped, // 是否显示行间隔色
+ bordered: true, // 是否显示边框
+ toolbar: '#' + options.toolbar, // 指定工作栏
+ showRefresh: options.showRefresh, // 是否显示刷新按钮
+ showColumns: options.showColumns, // 是否显示隐藏某列下拉框
+ expandAll: options.expandAll, // 是否全部展开
+ expandFirst: options.expandFirst, // 是否默认第一级展开--expandAll为false时生效
+ columns: options.columns
+ });
+ $._treeTable = treeTable;
+ },
+ // 条件查询
+ search: function(formId) {
+ var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
+ var params = {};
+ $.each($("#" + currentId).serializeArray(), function(i, field) {
+ params[field.name] = field.value;
+ });
+ $._treeTable.bootstrapTreeTable('refresh', params);
+ },
+ // 刷新
+ refresh: function() {
+ $._treeTable.bootstrapTreeTable('refresh');
+ },
+ },
+ // 表单封装处理
+ form: {
+ // 表单重置
+ reset: function(formId) {
+ var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
+ $("#" + currentId)[0].reset();
+ },
+ // 获取选中复选框项
+ selectCheckeds: function(name) {
+ var checkeds = "";
+ $('input:checkbox[name="' + name + '"]:checked').each(function(i) {
+ if (0 == i) {
+ checkeds = $(this).val();
+ } else {
+ checkeds += ("," + $(this).val());
+ }
+ });
+ return checkeds;
+ },
+ // 获取选中下拉框项
+ selectSelects: function(name) {
+ var selects = "";
+ $('#' + name + ' option:selected').each(function (i) {
+ if (0 == i) {
+ selects = $(this).val();
+ } else {
+ selects += ("," + $(this).val());
+ }
+ });
+ return selects;
+ }
+ },
+ // 弹出层封装处理
+ modal: {
+ // 显示图标
+ icon: function(type) {
+ var icon = "";
+ if (type == modal_status.WARNING) {
+ icon = 0;
+ } else if (type == modal_status.SUCCESS) {
+ icon = 1;
+ } else if (type == modal_status.FAIL) {
+ icon = 2;
+ } else {
+ icon = 3;
+ }
+ return icon;
+ },
+ // 消息提示
+ msg: function(content, type) {
+ if (type != undefined) {
+ layer.msg(content, { icon: $.modal.icon(type), time: 1000, shift: 5 });
+ } else {
+ layer.msg(content);
+ }
+ },
+ // 错误消息
+ msgError: function(content) {
+ $.modal.msg(content, modal_status.FAIL);
+ },
+ // 成功消息
+ msgSuccess: function(content) {
+ $.modal.msg(content, modal_status.SUCCESS);
+ },
+ // 警告消息
+ msgWarning: function(content) {
+ $.modal.msg(content, modal_status.WARNING);
+ },
+ // 弹出提示
+ alert: function(content, type) {
+ layer.alert(content, {
+ icon: $.modal.icon(type),
+ title: "系统提示",
+ btn: ['确认'],
+ btnclass: ['btn btn-primary'],
+ });
+ },
+ // 消息提示并刷新父窗体
+ msgReload: function(msg, type) {
+ layer.msg(msg, {
+ icon: $.modal.icon(type),
+ time: 500,
+ shade: [0.1, '#8F8F8F']
+ },
+ function() {
+ $.modal.reload();
+ });
+ },
+ // 错误提示
+ alertError: function(content) {
+ $.modal.alert(content, modal_status.FAIL);
+ },
+ // 成功提示
+ alertSuccess: function(content) {
+ $.modal.alert(content, modal_status.SUCCESS);
+ },
+ // 警告提示
+ alertWarning: function(content) {
+ $.modal.alert(content, modal_status.WARNING);
+ },
+ // 关闭窗体
+ close: function () {
+ var index = parent.layer.getFrameIndex(window.name);
+ parent.layer.close(index);
+ },
+ // 关闭全部窗体
+ closeAll: function () {
+ layer.closeAll();
+ },
+ // 确认窗体
+ confirm: function (content, callBack) {
+ layer.confirm(content, {
+ icon: 3,
+ title: "系统提示",
+ btn: ['确认', '取消'],
+ btnclass: ['btn btn-primary', 'btn btn-danger'],
+ }, function (index) {
+ layer.close(index);
+ callBack(true);
+ });
+ },
+ // 弹出层指定宽度
+ open: function (title, url, width, height, callback) {
+ //如果是移动端,就使用自适应大小弹窗
+ if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
+ width = 'auto';
+ height = 'auto';
+ }
+ if ($.common.isEmpty(title)) {
+ title = false;
+ };
+ if ($.common.isEmpty(url)) {
+ url = "/404.html";
+ };
+ if ($.common.isEmpty(width)) {
+ width = 800;
+ };
+ if ($.common.isEmpty(height)) {
+ height = ($(window).height() - 50);
+ };
+ if ($.common.isEmpty(callback)) {
+ callback = function(index, layero) {
+ var iframeWin = layero.find('iframe')[0];
+ iframeWin.contentWindow.submitHandler();
+ }
+ }
+ layer.open({
+ type: 2,
+ area: [width + 'px', height + 'px'],
+ fix: false,
+ //不固定
+ maxmin: true,
+ shade: 0.3,
+ title: title,
+ content: url,
+ btn: ['确定', '关闭'],
+ // 弹层外区域关闭
+ shadeClose: true,
+ yes: callback,
+ cancel: function(index) {
+ return true;
+ }
+ });
+ },
+ // 弹出层指定参数选项
+ openOptions: function (options) {
+ var _url = $.common.isEmpty(options.url) ? "/404.html" : options.url;
+ var _title = $.common.isEmpty(options.title) ? "系统窗口" : options.title;
+ var _width = $.common.isEmpty(options.width) ? "800" : options.width;
+ var _height = $.common.isEmpty(options.height) ? ($(window).height() - 50) : options.height;
+ layer.open({
+ type: 2,
+ maxmin: true,
+ shade: 0.3,
+ title: _title,
+ fix: false,
+ area: [_width + 'px', _height + 'px'],
+ content: _url,
+ shadeClose: true,
+ btn: [' 确认', ' 关闭'],
+ yes: function (index, layero) {
+ options.callBack(index, layero)
+ }, cancel: function () {
+ return true;
+ }
+ });
+ },
+ // 弹出层全屏
+ openFull: function (title, url, width, height) {
+ //如果是移动端,就使用自适应大小弹窗
+ if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
+ width = 'auto';
+ height = 'auto';
+ }
+ if ($.common.isEmpty(title)) {
+ title = false;
+ };
+ if ($.common.isEmpty(url)) {
+ url = "/404.html";
+ };
+ if ($.common.isEmpty(width)) {
+ width = 800;
+ };
+ if ($.common.isEmpty(height)) {
+ height = ($(window).height() - 50);
+ };
+ var index = layer.open({
+ type: 2,
+ area: [width + 'px', height + 'px'],
+ fix: false,
+ //不固定
+ maxmin: true,
+ shade: 0.3,
+ title: title,
+ content: url,
+ btn: ['确定', '关闭'],
+ // 弹层外区域关闭
+ shadeClose: true,
+ yes: function(index, layero) {
+ var iframeWin = layero.find('iframe')[0];
+ iframeWin.contentWindow.submitHandler();
+ },
+ cancel: function(index) {
+ return true;
+ }
+ });
+ layer.full(index);
+ },
+ // 选卡页方式打开
+ openTab: function (title, url) {
+ createMenuItem(url, title);
+ },
+ // 禁用按钮
+ disable: function() {
+ var doc = window.top == window.parent ? window.document : window.parent.document;
+ $("a[class*=layui-layer-btn]", doc).addClass("layer-disabled");
+ },
+ // 启用按钮
+ enable: function() {
+ var doc = window.top == window.parent ? window.document : window.parent.document;
+ $("a[class*=layui-layer-btn]", doc).removeClass("layer-disabled");
+ },
+ // 打开遮罩层
+ loading: function (message) {
+ $.blockUI({ message: '' });
+ },
+ // 关闭遮罩层
+ closeLoading: function () {
+ setTimeout(function(){
+ $.unblockUI();
+ }, 50);
+ },
+ // 重新加载
+ reload: function () {
+ parent.location.reload();
+ }
+ },
+ // 操作封装处理
+ operate: {
+ // 提交数据
+ submit: function(url, type, dataType, data) {
+ var config = {
+ url: url,
+ type: type,
+ dataType: dataType,
+ data: data,
+ beforeSend: function () {
+ $.modal.loading("正在处理中,请稍后...");
+ },
+ success: function(result) {
+ $.operate.ajaxSuccess(result);
+ }
+ };
+ $.ajax(config)
+ },
+ // post请求传输
+ post: function(url, data) {
+ $.operate.submit(url, "post", "json", data);
+ },
+ // get请求传输
+ get: function(url) {
+ $.operate.submit(url, "get", "json", "");
+ },
+ // 详细信息
+ detail: function(id, width, height) {
+ var _url = $.common.isEmpty(id) ? $.table._option.detailUrl : $.table._option.detailUrl.replace("{id}", id);
+ var _width = $.common.isEmpty(width) ? "800" : width;
+ var _height = $.common.isEmpty(height) ? ($(window).height() - 50) : height;
+ //如果是移动端,就使用自适应大小弹窗
+ if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
+ _width = 'auto';
+ _height = 'auto';
+ }
+ layer.open({
+ type: 2,
+ area: [_width + 'px', _height + 'px'],
+ fix: false,
+ //不固定
+ maxmin: true,
+ shade: 0.3,
+ title: $.table._option.modalName + "详细",
+ content: _url,
+ btn: ['关闭'],
+ // 弹层外区域关闭
+ shadeClose: true,
+ cancel: function(index){
+ return true;
+ }
+ });
+ },
+ // 删除信息
+ remove: function(id) {
+ $.modal.confirm("确定删除该条" + $.table._option.modalName + "信息吗?", function() {
+ var url = $.common.isEmpty(id) ? $.table._option.removeUrl : $.table._option.removeUrl.replace("{id}", id);
+ if($.table._option.type == table_type.bootstrapTreeTable) {
+ $.operate.get(url);
+ } else {
+ var data = { "ids": id };
+ $.operate.submit(url, "post", "json", data);
+ }
+ });
+
+ },
+ // 批量删除信息
+ removeAll: function() {
+ var rows = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
+ if (rows.length == 0) {
+ $.modal.alertWarning("请至少选择一条记录");
+ return;
+ }
+ $.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
+ var url = $.table._option.removeUrl;
+ var data = { "ids": rows.join() };
+ $.operate.submit(url, "post", "json", data);
+ });
+ },
+ // 清空信息
+ clean: function() {
+ $.modal.confirm("确定清空所有" + $.table._option.modalName + "吗?", function() {
+ var url = $.table._option.cleanUrl;
+ $.operate.submit(url, "post", "json", "");
+ });
+ },
+ // 添加信息
+ add: function(id) {
+ $.modal.open("添加" + $.table._option.modalName, $.operate.addUrl(id));
+ },
+ // 添加信息,以tab页展现
+ addTab: function (id) {
+ $.modal.openTab("添加" + $.table._option.modalName, $.operate.addUrl(id));
+ },
+ // 添加信息 全屏
+ addFull: function(id) {
+ var url = $.common.isEmpty(id) ? $.table._option.createUrl : $.table._option.createUrl.replace("{id}", id);
+ $.modal.openFull("添加" + $.table._option.modalName, url);
+ },
+ // 添加访问地址
+ addUrl: function(id) {
+ var url = $.common.isEmpty(id) ? $.table._option.createUrl : $.table._option.createUrl.replace("{id}", id);
+ return url;
+ },
+ // 修改信息
+ edit: function(id) {
+ if($.common.isEmpty(id) && $.table._option.type == table_type.bootstrapTreeTable) {
+ var row = $('#' + $.table._option.id).bootstrapTreeTable('getSelections')[0];
+ if ($.common.isEmpty(row)) {
+ $.modal.alertWarning("请至少选择一条记录");
+ return;
+ }
+ var url = $.table._option.updateUrl.replace("{id}", row[$.table._option.uniqueId]);
+ $.modal.open("修改" + $.table._option.modalName, url);
+ } else {
+ $.modal.open("修改" + $.table._option.modalName, $.operate.editUrl(id));
+ }
+ },
+ // 修改信息,以tab页展现
+ editTab: function(id) {
+ $.modal.openTab("修改" + $.table._option.modalName, $.operate.editUrl(id));
+ },
+ // 修改信息 全屏
+ editFull: function(id) {
+ var url = "/404.html";
+ if ($.common.isNotEmpty(id)) {
+ url = $.table._option.updateUrl.replace("{id}", id);
+ } else {
+ var row = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
+ url = $.table._option.updateUrl.replace("{id}", row);
+ }
+ $.modal.openFull("修改" + $.table._option.modalName, url);
+ },
+ // 修改访问地址
+ editUrl: function(id) {
+ var url = "/404.html";
+ if ($.common.isNotEmpty(id)) {
+ url = $.table._option.updateUrl.replace("{id}", id);
+ } else {
+ var id = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
+ if (id.length == 0) {
+ $.modal.alertWarning("请至少选择一条记录");
+ return;
+ }
+ url = $.table._option.updateUrl.replace("{id}", id);
+ }
+ return url;
+ },
+ // 保存信息 刷新表格
+ save: function(url, data) {
+ var config = {
+ url: url,
+ type: "post",
+ dataType: "json",
+ data: data,
+ beforeSend: function () {
+ $.modal.loading("正在处理中,请稍后...");
+ $.modal.disable();
+ },
+ success: function(result) {
+ $.operate.successCallback(result);
+ }
+ };
+ $.ajax(config)
+ },
+ // 保存信息 弹出提示框
+ saveModal: function(url, data) {
+ var config = {
+ url: url,
+ type: "post",
+ dataType: "json",
+ data: data,
+ beforeSend: function () {
+ $.modal.loading("正在处理中,请稍后...");
+ },
+ success: function(result) {
+ if (result.code == web_status.SUCCESS) {
+ $.modal.alertSuccess(result.msg)
+ } else if (result.code == web_status.WARNING) {
+ $.modal.alertWarning(result.msg)
+ } else {
+ $.modal.alertError(result.msg);
+ }
+ $.modal.closeLoading();
+ }
+ };
+ $.ajax(config)
+ },
+ // 保存选项卡信息
+ saveTab: function(url, data) {
+ var config = {
+ url: url,
+ type: "post",
+ dataType: "json",
+ data: data,
+ beforeSend: function () {
+ $.modal.loading("正在处理中,请稍后...");
+ },
+ success: function(result) {
+ $.operate.successTabCallback(result);
+ }
+ };
+ $.ajax(config)
+ },
+ // 保存结果弹出msg刷新table表格
+ ajaxSuccess: function (result) {
+ if (result.code == web_status.SUCCESS && $.table._option.type == table_type.bootstrapTable) {
+ $.modal.msgSuccess(result.msg);
+ $.table.refresh();
+ } else if (result.code == web_status.SUCCESS && $.table._option.type == table_type.bootstrapTreeTable) {
+ $.modal.msgSuccess(result.msg);
+ $.treeTable.refresh();
+ } else if (result.code == web_status.WARNING) {
+ $.modal.alertWarning(result.msg)
+ } else {
+ $.modal.alertError(result.msg);
+ }
+ $.modal.closeLoading();
+ },
+ // 成功结果提示msg(父窗体全局更新)
+ saveSuccess: function (result) {
+ if (result.code == web_status.SUCCESS) {
+ $.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
+ } else if (result.code == web_status.WARNING) {
+ $.modal.alertWarning(result.msg)
+ } else {
+ $.modal.alertError(result.msg);
+ }
+ $.modal.closeLoading();
+ },
+ // 成功回调执行事件(父窗体静默更新)
+ successCallback: function(result) {
+ if (result.code == web_status.SUCCESS) {
+ var parent = window.parent;
+ if (parent.$.table._option.type == table_type.bootstrapTable) {
+ $.modal.close();
+ parent.$.modal.msgSuccess(result.msg);
+ parent.$.table.refresh();
+ } else if (parent.$.table._option.type == table_type.bootstrapTreeTable) {
+ $.modal.close();
+ parent.$.modal.msgSuccess(result.msg);
+ parent.$.treeTable.refresh();
+ } else {
+ $.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
+ }
+ } else if (result.code == web_status.WARNING) {
+ $.modal.alertWarning(result.msg)
+ } else {
+ $.modal.alertError(result.msg);
+ }
+ $.modal.closeLoading();
+ $.modal.enable();
+ },
+ // 选项卡成功回调执行事件(父窗体静默更新)
+ successTabCallback: function(result) {
+ if (result.code == web_status.SUCCESS) {
+ var topWindow = $(window.parent.document);
+ var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-panel');
+ var $contentWindow = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow)[0].contentWindow;
+ $.modal.close();
+ $contentWindow.$.modal.msgSuccess(result.msg);
+ $contentWindow.$(".layui-layer-padding").removeAttr("style");
+ if ($contentWindow.$.table._option.type == table_type.bootstrapTable) {
+ $contentWindow.$.table.refresh();
+ } else if ($contentWindow.$.table._option.type == table_type.bootstrapTreeTable) {
+ $contentWindow.$.treeTable.refresh();
+ }
+ closeItem();
+ } else if (result.code == web_status.WARNING) {
+ $.modal.alertWarning(result.msg)
+ } else {
+ $.modal.alertError(result.msg);
+ }
+ $.modal.closeLoading();
+ }
+ },
+ // 校验封装处理
+ validate: {
+ // 判断返回标识是否唯一 false 不存在 true 存在
+ unique: function (value) {
+ if (value == "0") {
+ return true;
+ }
+ return false;
+ },
+ // 表单验证
+ form: function (formId) {
+ var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
+ return $("#" + currentId).validate().form();
+ }
+ },
+ // 树插件封装处理
+ tree: {
+ _option: {},
+ _lastValue: {},
+ // 初始化树结构
+ init: function(options) {
+ var defaults = {
+ id: "tree", // 属性ID
+ expandLevel: 0, // 展开等级节点
+ view: {
+ selectedMulti: false, // 设置是否允许同时选中多个节点
+ nameIsHTML: true // 设置 name 属性是否支持 HTML 脚本
+ },
+ check: {
+ enable: false, // 置 zTree 的节点上是否显示 checkbox / radio
+ nocheckInherit: true, // 设置子节点是否自动继承
+ },
+ data: {
+ key: {
+ title: "title" // 节点数据保存节点提示信息的属性名称
+ },
+ simpleData: {
+ enable: true // true / false 分别表示 使用 / 不使用 简单数据模式
+ }
+ },
+ };
+ var options = $.extend(defaults, options);
+ $.tree._option = options;
+ // 树结构初始化加载
+ var setting = {
+ callback: {
+ onClick: options.onClick, // 用于捕获节点被点击的事件回调函数
+ onCheck: options.onCheck, // 用于捕获 checkbox / radio 被勾选 或 取消勾选的事件回调函数
+ onDblClick: options.onDblClick // 用于捕获鼠标双击之后的事件回调函数
+ },
+ check: options.check,
+ view: options.view,
+ data: options.data
+ };
+ $.get(options.url, function(data) {
+ var treeId = $("#treeId").val();
+ tree = $.fn.zTree.init($("#" + options.id), setting, data);
+ $._tree = tree;
+ var nodes = tree.getNodesByParam("level", options.expandLevel - 1);
+ for (var i = 0; i < nodes.length; i++) {
+ tree.expandNode(nodes[i], true, false, false);
+ }
+ var node = tree.getNodesByParam("id", treeId, null)[0];
+ $.tree.selectByIdName(treeId, node);
+ });
+ },
+ // 搜索节点
+ searchNode: function() {
+ // 取得输入的关键字的值
+ var value = $.common.trim($("#keyword").val());
+ if ($.tree._lastValue == value) {
+ return;
+ }
+ // 保存最后一次搜索名称
+ $.tree._lastValue = value;
+ var nodes = $._tree.getNodes();
+ // 如果要查空字串,就退出不查了。
+ if (value == "") {
+ $.tree.showAllNode(nodes);
+ return;
+ }
+ $.tree.hideAllNode(nodes);
+ // 根据搜索值模糊匹配
+ $.tree.updateNodes($._tree.getNodesByParamFuzzy("name", value));
+ },
+ // 根据Id和Name选中指定节点
+ selectByIdName: function(treeId, node) {
+ if ($.common.isNotEmpty(treeId) && treeId == node.id) {
+ $._tree.selectNode(node, true);
+ }
+ },
+ // 显示所有节点
+ showAllNode: function(nodes) {
+ nodes = $._tree.transformToArray(nodes);
+ for (var i = nodes.length - 1; i >= 0; i--) {
+ if (nodes[i].getParentNode() != null) {
+ $._tree.expandNode(nodes[i], true, false, false, false);
+ } else {
+ $._tree.expandNode(nodes[i], true, true, false, false);
+ }
+ $._tree.showNode(nodes[i]);
+ $.tree.showAllNode(nodes[i].children);
+ }
+ },
+ // 隐藏所有节点
+ hideAllNode: function(nodes) {
+ var tree = $.fn.zTree.getZTreeObj("tree");
+ var nodes = $._tree.transformToArray(nodes);
+ for (var i = nodes.length - 1; i >= 0; i--) {
+ $._tree.hideNode(nodes[i]);
+ }
+ },
+ // 显示所有父节点
+ showParent: function(treeNode) {
+ var parentNode;
+ while ((parentNode = treeNode.getParentNode()) != null) {
+ $._tree.showNode(parentNode);
+ $._tree.expandNode(parentNode, true, false, false);
+ treeNode = parentNode;
+ }
+ },
+ // 显示所有孩子节点
+ showChildren: function(treeNode) {
+ if (treeNode.isParent) {
+ for (var idx in treeNode.children) {
+ var node = treeNode.children[idx];
+ $._tree.showNode(node);
+ $.tree.showChildren(node);
+ }
+ }
+ },
+ // 更新节点状态
+ updateNodes: function(nodeList) {
+ $._tree.showNodes(nodeList);
+ for (var i = 0, l = nodeList.length; i < l; i++) {
+ var treeNode = nodeList[i];
+ $.tree.showChildren(treeNode);
+ $.tree.showParent(treeNode)
+ }
+ },
+ // 获取当前被勾选集合
+ getCheckedNodes: function(column) {
+ var _column = $.common.isEmpty(column) ? "id" : column;
+ var nodes = $._tree.getCheckedNodes(true);
+ return $.map(nodes, function (row) {
+ return row[_column];
+ }).join();
+ },
+ // 不允许根父节点选择
+ notAllowParents: function(_tree) {
+ var nodes = _tree.getSelectedNodes();
+ for (var i = 0; i < nodes.length; i++) {
+ if (nodes[i].level == 0) {
+ $.modal.msgError("不能选择根节点(" + nodes[i].name + ")");
+ return false;
+ }
+ if (nodes[i].isParent) {
+ $.modal.msgError("不能选择父节点(" + nodes[i].name + ")");
+ return false;
+ }
+ }
+ return true;
+ },
+ // 不允许最后层级节点选择
+ notAllowLastLevel: function(_tree) {
+ var nodes = _tree.getSelectedNodes();
+ for (var i = 0; i < nodes.length; i++) {
+ if (!nodes[i].isParent) {
+ $.modal.msgError("不能选择最后层级节点(" + nodes[i].name + ")");
+ return false;
+ }
+ }
+ return true;
+ },
+ // 隐藏/显示搜索栏
+ toggleSearch: function() {
+ $('#search').slideToggle(200);
+ $('#btnShow').toggle();
+ $('#btnHide').toggle();
+ $('#keyword').focus();
+ },
+ // 折叠
+ collapse: function() {
+ $._tree.expandAll(false);
+ },
+ // 展开
+ expand: function() {
+ $._tree.expandAll(true);
+ }
+ },
+ // 通用方法封装处理
+ common: {
+ // 判断字符串是否为空
+ isEmpty: function (value) {
+ if (value == null || this.trim(value) == "") {
+ return true;
+ }
+ return false;
+ },
+ // 判断一个字符串是否为非空串
+ isNotEmpty: function (value) {
+ return !$.common.isEmpty(value);
+ },
+ // 空对象转字符串
+ nullToStr: function(value) {
+ if ($.common.isEmpty(value)) {
+ return "-";
+ }
+ return value;
+ },
+ // 是否显示数据 为空默认为显示
+ visible: function (value) {
+ if ($.common.isEmpty(value) || value == true) {
+ return true;
+ }
+ return false;
+ },
+ // 空格截取
+ trim: function (value) {
+ if (value == null) {
+ return "";
+ }
+ return value.toString().replace(/(^\s*)|(\s*$)|\r|\n/g, "");
+ },
+ // 比较两个字符串(大小写敏感)
+ equals: function (str, that) {
+ return str == that;
+ },
+ // 比较两个字符串(大小写不敏感)
+ equalsIgnoreCase: function (str, that) {
+ return String(str).toUpperCase() === String(that).toUpperCase();
+ },
+ // 将字符串按指定字符分割
+ split: function (str, sep, maxLen) {
+ if ($.common.isEmpty(str)) {
+ return null;
+ }
+ var value = String(str).split(sep);
+ return maxLen ? value.slice(0, maxLen - 1) : value;
+ },
+ // 字符串格式化(%s )
+ sprintf: function (str) {
+ var args = arguments, flag = true, i = 1;
+ str = str.replace(/%s/g, function () {
+ var arg = args[i++];
+ if (typeof arg === 'undefined') {
+ flag = false;
+ return '';
+ }
+ return arg;
+ });
+ return flag ? str : '';
+ },
+ // 指定随机数返回
+ random: function (min, max) {
+ return Math.floor((Math.random() * max) + min);
+ },
+ // 判断字符串是否是以start开头
+ startWith: function(value, start) {
+ var reg = new RegExp("^" + start);
+ return reg.test(value)
+ },
+ // 判断字符串是否是以end结尾
+ endWith: function(value, end) {
+ var reg = new RegExp(end + "$");
+ return reg.test(value)
+ },
+ // 数组去重
+ uniqueFn: function(array) {
+ var result = [];
+ var hashObj = {};
+ for (var i = 0; i < array.length; i++) {
+ if (!hashObj[array[i]]) {
+ hashObj[array[i]] = true;
+ result.push(array[i]);
+ }
+ }
+ return result;
+ }
+ }
+ });
+})(jQuery);
+
+/** 表格类型 */
+table_type = {
+ bootstrapTable: 0,
+ bootstrapTreeTable: 1
+};
+
+/** 消息状态码 */
+web_status = {
+ SUCCESS: 0,
+ FAIL: 500,
+ WARNING: 301
+};
+
+/** 弹窗状态码 */
+modal_status = {
+ SUCCESS: "success",
+ FAIL: "error",
+ WARNING: "warning"
};
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/templates/error/unauth.html b/ruoyi-admin/src/main/resources/templates/error/unauth.html
index e2b03c3e0..b662c1229 100644
--- a/ruoyi-admin/src/main/resources/templates/error/unauth.html
+++ b/ruoyi-admin/src/main/resources/templates/error/unauth.html
@@ -14,8 +14,8 @@
您没有访问权限!
- 对不起,您正在寻找的页面已经找到。尝试检查URL的错误,然后按浏览器上的刷新按钮或尝试在我们的应用程序中找到其他内容。
-
主页
+ 对不起,您没有访问权限,请不要进行非法操作!您可以返回主页面
+
返回主页
diff --git a/ruoyi-admin/src/main/resources/templates/include.html b/ruoyi-admin/src/main/resources/templates/include.html
index 9e9cc9e97..85df0030f 100644
--- a/ruoyi-admin/src/main/resources/templates/include.html
+++ b/ruoyi-admin/src/main/resources/templates/include.html
@@ -1,29 +1,30 @@
-
+
+
-
+
-
-
+
+
-
+
@@ -35,11 +36,68 @@
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/templates/index.html b/ruoyi-admin/src/main/resources/templates/index.html
index 1c58aa725..11ef319ec 100644
--- a/ruoyi-admin/src/main/resources/templates/index.html
+++ b/ruoyi-admin/src/main/resources/templates/index.html
@@ -16,9 +16,8 @@
-
+
@@ -158,8 +157,7 @@
-
-
+
-
-
+