diff --git a/modules/admin/tpl/css/admin.css b/modules/admin/tpl/css/admin.css index 5ae42cbf6..70bf4a820 100644 --- a/modules/admin/tpl/css/admin.css +++ b/modules/admin/tpl/css/admin.css @@ -60,6 +60,9 @@ body>.x,.x label,.x table,.x input,.x textarea,.x select,.x button{font-size:13p .x .x_inline{display:inline-block;*display:inline;*zoom:1} .x label[for], .x .x_form-horizontal .x_control-label{font-weight:bold} +.x input[type="radio"]+label, +.x input[type="checkbox"]+label{font-weight:normal} +.x input:checked+label{font-weight:bold} .x label.x_inline{margin-right:16px} .x .x_input-append .x_add-on, .x .x_input-prepend .x_add-on{height:16px;line-height:16px} diff --git a/modules/admin/tpl/css/admin.min.css b/modules/admin/tpl/css/admin.min.css index 2d0810b59..0411b8deb 100644 --- a/modules/admin/tpl/css/admin.min.css +++ b/modules/admin/tpl/css/admin.min.css @@ -60,6 +60,9 @@ body>.x,.x label,.x table,.x input,.x textarea,.x select,.x button{font-size:13p .x .x_inline{display:inline-block;*display:inline;*zoom:1} .x label[for], .x .x_form-horizontal .x_control-label{font-weight:bold} +.x input[type="radio"]+label, +.x input[type="checkbox"]+label{font-weight:normal} +.x input:checked+label{font-weight:bold} .x label.x_inline{margin-right:16px} .x .x_input-append .x_add-on, .x .x_input-prepend .x_add-on{height:16px;line-height:16px} diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index 0addb3106..68796ef68 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -150,6 +150,24 @@ jQuery(function($){ $this.addClass('vr'); } }); +// label[for] + input[id]/textarea[id]/select[id] creator + $('label:not([for])').each(function(index){ + var $this = $(this); + index = index + 1; + if($this.next('input[id], textarea[id], select[id]').not(':radio, :checkbox').length){ + // next input, textarea, select id true + $this.attr('for', $this.next().attr('id')); + } else if ($this.next('input:not([id]), textarea:not([id]), select:not([id])').not(':radio, :checkbox').length) { + // next input, textarea, select id false + $this.attr('for', 'i' + index).next().attr('id', 'i' + index); + } else if ($this.prev(':radio[id], :checkbox[id]').length) { + // prev :radio :checkbox id true + $this.attr('for', $this.prev().attr('id')); + } else if ($this.prev(':radio:not([id]), :checkbox:not([id])').length) { + // prev :radio :checkbox id false + $this.attr('for', 'i' + index).prev().attr('id', 'i' + index); + } + }); }); // Modal Window jQuery(function($){ diff --git a/modules/admin/tpl/js/admin.min.js b/modules/admin/tpl/js/admin.min.js index 59c417390..68796ef68 100644 --- a/modules/admin/tpl/js/admin.min.js +++ b/modules/admin/tpl/js/admin.min.js @@ -1,47 +1,1460 @@ -jQuery(function(b){function f(){a.width("99.99%");setTimeout(function(){a.removeAttr("style");d.height()>a.height()&&a.height(d.height())},100)}window.scrollTo(0,0);b(".x .skipNav>a").click(function(){b(b(this).attr("href")).attr("tabindex","0").css("outline","0").focus()});b(document.body).on("click",".x [data-toggle]",function(){var a=b(this),d=b(a.attr("data-toggle"));d.toggle();d.is(":visible")&&!d.find("a,input,button,textarea,select").length?d.attr("tabindex","0").not(":disabled").focus():d.is(":visible")&& -d.find("a,input,button,textarea,select").length?d.find("a,input,button,textarea,select").not(":disabled").eq(0).focus():a.focus();return!1});b(document.body).on("click",".x [data-show]",function(){b(b(this).attr("data-show")).show().attr("tabindex","0").focus();return!1});b(document.body).on("click",".x [data-hide]",function(){var a=b(this);b(a.attr("data-hide")).hide();a.focus();return!1});b.fn.xeTabbable=function(){b(this).each(function(){var a=b(this);a.find(">.x_nav-tabs>li>a").each(function(a){b(this).attr("data-index", -a+1)});a.find(">.x_tab-content>.x_tab-pane").each(function(a){b(this).attr("data-index",a+1)})});b('.x .x_tab-content>.x_tab-pane:not(".x_active")').hide()};b(".x .x_tabbable").xeTabbable();b(document.body).on("click",'.x .x_nav-tabs>li>a[href*="#"]',function(){var a=b(this);a.parent("li").addClass("x_active").siblings().removeClass("x_active");a.closest(".x_nav-tabs").next(".x_tab-content").find(">.x_tab-pane").eq(a.attr("data-index")-1).addClass("x_active").show().siblings().removeClass("x_active").hide(); -return!1});var e=b(".x>.body"),a=e.children("#content.content"),d=e.find(">.gnb"),g=d.find(">ul>li");g.find("a").prepend("");g.find(">ul>li.active_").clone().addClass("active").prependTo("#gnbNav");g.find("ul").prev("a").bind("click focus",function(){b(this).parent("li").addClass("open").siblings("li").removeClass("open");e.removeClass("wide");f();return!1});d.find('>a[href="#gnbNav"]').click(function(){b(this).parent(".gnb").toggleClass("open");e.toggleClass("wide");f();return!1});d.prepend(''); -b(".x .section>h1>.snToggle").click(function(){var a=b(this),d=a.closest(".section");d.hasClass("collapse")?(d.removeClass("collapse").children("h1:first").siblings().show(),a.removeClass("x_icon-chevron-down").addClass("x_icon-chevron-up")):(d.addClass("collapse").children("h1:first").siblings().hide(),a.removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down"));f()});g=b(".x .x_alert");g.prepend('');g.children(".x_close").click(function(){b(this).parent(".x_alert").hide()}); -b(".x .x_btn").click(function(){if(b(this).hasClass("x_disabled"))return!1});b(".x i").each(function(){var a=b(this);"|"==a.text()&&a.addClass("vr")})}); -jQuery(function(b){b.fn.xeModalWindow=function(){this.not(".xe-modal-window").addClass("xe-modal-window").each(function(){b(b(this).attr("href")).addClass("x").hide()}).click(function(){var f=b(this);"showing"==b(f.attr("href")).data("state")?f.trigger("close.mw"):f.trigger("open.mw");return!1}).bind("open.mw",function(){var f=b(this),e,a;e=b(f.attr("href"));e.parent("body").length||(a=b(''),a.click(function(){e.data("anchor").trigger("close.mw")}), -e.find("[data-hide]").click(function(){e.data("anchor").trigger("close.mw")}),b("body").append('
').append(e),e.prepend(a));e.data("anchor",f);a=b.Event("before-open.mw");f.trigger(a);if(a.isDefaultPrevented())return!1;e=b(f.attr("href"));a=f.data("duration")||"fast";e.data("state","showing");b(document).bind("keydown.mw",function(a){if(27==a.which)return f.trigger("close.mw"),!1});e.fadeIn(a,function(){f.trigger("after-open.mw")}).find("button.x_close:first").focus().end().prev(".x_modal-backdrop").show()}).bind("close.mw", -function(){var f=b(this),e,a;e=b.Event("before-close.mw");f.trigger(e);if(e.isDefaultPrevented())return!1;e=b(f.attr("href"));a=f.data("duration")||"fast";e.data("state","hiding");e.fadeOut(a,function(){f.trigger("after-close.mw")}).prev(".x_modal-backdrop").hide();f.focus()});b("div.x_modal").addClass("x").hide()};b("a.modalAnchor").xeModalWindow()}); -jQuery(function(b){var f=!1;b.fn.xeContentToggler=function(){this.not(".xe-content-toggler").addClass("xe-content-toggler").each(function(){var e=b(this);$layer=b(e.attr("href"));$layer.hide().not(".xe-toggling-content").addClass("xe-toggling-content").mousedown(function(){f=!0}).focusout(function(){setTimeout(function(){!f&&(!$layer.find(":focus").length&&"showing"==$layer.data("state"))&&e.trigger("close.tc");f=!1},1)})}).click(function(){var e=b(this),a;a=b(e.attr("href"));a.data("anchor",e);"showing"== -a.data("state")?e.trigger("close.tc"):e.trigger("open.tc");return!1}).bind("open.tc",function(){function e(){a.trigger("after-open.tc")}var a=b(this),d,g,n;d=b(a.attr("href"));g=a.data("effect");n=a.data("duration")||"fast";d.data("state","showing");a.trigger("before-open.tc");f=!1;b(document).unbind("mousedown.tc keydown.tc").bind("mousedown.tc keydown.tc",function(e){if(e&&("keydown"==e.type&&27!=e.which||"mousedown"==e.type&&(e=b(e.target),e.is("html,.tgAnchor,.tgContent")||d.has(e).length)))return!0; -a.trigger("close.tc");return!1});switch(g){case "slide":d.slideDown(n,e);break;case "slide-h":g=d.css({"overflow-x":"",width:""}).width();d.show().css({"overflow-x":"hidden",width:"0px"}).animate({width:g},n,function(){d.css({"overflow-x":"",width:""});e()});break;case "fade":d.fadeIn(n,e);break;default:d.show(),a.trigger("after-open.tc")}}).bind("close.tc",function(){function e(){a.trigger("after-close.tc")}var a=b(this),d,g,f;b(document).unbind("mousedown.tc keydown.tc");d=b(a.attr("href"));g=a.data("effect"); -f=a.data("duration")||"fast";d.data("state","hiding");a.trigger("before-close.tc");switch(g){case "slide":d.slideUp(f,e);break;case "slide-h":d.animate({width:0},f,function(){d.hide();e()});break;case "fade":d.fadeOut(f,e);break;default:d.hide(),a.trigger("after-close.tc")}});return this};b("a.tgAnchor").xeContentToggler()}); -jQuery(function(b){b.fn.xeModuleFinder=function(){this.not(".xe-module-finder").addClass("xe-module-finder").find("a.tgAnchor.findsite").bind("before-open.tc",function(){var f,e,a;f=b(this);e=b(f.attr("href")).find(">ul");a=f.prev("input:text").val();b.exec_json("admin.getSiteAllList",{domain:a},function(a){var g=a.site_list,n,k;e.empty();f.closest(".modulefinder").find(".moduleList,.moduleIdList").attr("disabled","disabled");if(a.error||!b.isArray(g))f.trigger("close.tc");else{n=0;for(k=g.length;n< -k;n++)a=b("
  • ").appendTo(e),b('