From 4433e5bed111719a39c15789a1e41349ddd835c8 Mon Sep 17 00:00:00 2001 From: ChanMyeong Date: Mon, 29 Oct 2012 07:19:05 +0000 Subject: [PATCH] spamfilter UI cleaning. git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11943 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/admin/tpl/js/admin.js | 13 +- modules/admin/tpl/js/admin.min.js | 1700 +++++++++++++++++- modules/spamfilter/lang/lang.xml | 2 +- modules/spamfilter/tpl/config_block.html | 26 +- modules/spamfilter/tpl/denied_ip_list.html | 26 +- modules/spamfilter/tpl/denied_word_list.html | 32 +- modules/spamfilter/tpl/header.html | 6 +- 7 files changed, 1693 insertions(+), 112 deletions(-) diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index 0fc23f9eb..b64c984e1 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -248,13 +248,12 @@ jQuery(function($){ $('label:not([for])').labelMaker(); // :radio, :checkbox checked class $.fn.checkToggle = function(){ - this.change(function(){ - var $this = $(this); - if($this.is(':checked')){ - $this.parent('label').addClass('checked'); - } - $(':radio, :checkbox').not(':checked').parent('label').removeClass('checked'); - }); + function check(){ + $(':checked').parent('label').addClass('checked'); + $(':not(":checked")').parent('label').removeClass('checked'); + } + this.change(check); + check(); }; $(':radio, :checkbox').checkToggle(); // File input .overlap style diff --git a/modules/admin/tpl/js/admin.min.js b/modules/admin/tpl/js/admin.min.js index f32df4e1b..b64c984e1 100644 --- a/modules/admin/tpl/js/admin.min.js +++ b/modules/admin/tpl/js/admin.min.js @@ -1,58 +1,1642 @@ -function showWaitingFogLayer(){var a=jQuery('');a.height(jQuery(window).height());jQuery(".wfsr").wrap('
').before(a)}function hideWaitingFogLayer(){jQuery(".wfsr").prev("span").remove();jQuery(".wfsr").unwrap()}function doInstallModule(a){var e=[];e.module_name=a;exec_xml("install","procInstallAdminInstall",e,completeInstallModule);showWaitingFogLayer()} -function doUpdateModule(a){var e=[];e.module_name=a;exec_xml("install","procInstallAdminUpdate",e,completeInstallModule);showWaitingFogLayer()}function completeInstallModule(a){alert(a.message);location.reload()} -jQuery(function(a){window.scrollTo(0,0);a(".x .skipNav>a").click(function(){a(a(this).attr("href")).attr("tabindex","0").css("outline","0").focus()});a(document.body).on("click",".x [data-toggle]",function(){var b=a(this),d=a(b.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(): -b.focus();return!1});a(document.body).on("click",".x [data-show]",function(){a(a(this).attr("data-show")).show().attr("tabindex","0").focus();return!1});a(document.body).on("click",".x [data-hide]",function(){var b=a(this);a(b.attr("data-hide")).hide();b.focus();return!1});a.fn.xeTabbable=function(){a(this).each(function(){var b=a(this);b.find(">.x_nav-tabs>li>a").each(function(b){a(this).attr("data-index",b+1)});b.find(">.x_tab-content>.x_tab-pane").each(function(b){a(this).attr("data-index",b+1)})}); -a('.x .x_tab-content>.x_tab-pane:not(".x_active")').hide()};a(".x .x_tabbable").xeTabbable();a(document.body).on("click",'.x .x_nav-tabs>li>a[href*="#"]',function(){var b=a(this);b.parent("li").addClass("x_active").siblings().removeClass("x_active");b.closest(".x_nav-tabs").next(".x_tab-content").find(">.x_tab-pane").eq(b.attr("data-index")-1).addClass("x_active").show().siblings().removeClass("x_active").hide();a(this).parents(".x_tabbable").trigger("tab_change",[parseInt(a(this).attr("data-index"))- -1,a(this)]);return!1});a.fn.gnb=function(){function b(){e.width("99.99%");setTimeout(function(){e.removeAttr("style");f.height()>e.height()&&e.height(f.height())},100)}var d=a(".x>.xin>.body"),e=d.children("#content.content"),f=d.find(">.gnb"),g=f.find(">ul>li");g.find("a").prepend("");g.each(function(b){a(this).attr("data-index",b+1)});var k=g.find(">ul>li.active_").closest("li.active").attr("data-index");g.find(">ul>li.active_").clone().addClass("active").attr("data-index",k).prependTo("#gnbNav"); -g.find("ul").prev("a").bind("click focus",function(){a(this).parent("li").addClass("open").siblings("li").removeClass("open");d.removeClass("wide");b();return!1});f.find('>a[href="#gnbNav"]').click(function(){a(this).parent(".gnb").toggleClass("open");d.toggleClass("wide");b();return!1});f.prepend('');a(".x .section.collapse>h1>.snToggle").removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down");e.find(">.snToggle").click(function(){var b=a(this),d=b.closest(".section");d.hasClass("collapse")?(d.removeClass("collapse").children("h1:first").siblings().show(),b.removeClass("x_icon-chevron-down").addClass("x_icon-chevron-up")):(d.addClass("collapse").children("h1:first").siblings().hide(), -b.removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down"));reflow()});e=a(".x .x_alert");e.prepend('');e.children(".x_close").click(function(){a(this).parent(".x_alert").hide()});a(".x .x_btn").click(function(){if(a(this).hasClass("x_disabled"))return!1});a.fn.vr=function(){this.each(function(){var b=a(this);"|"==b.text()&&b.addClass("vr").filter(":first-child, :last-child").remove()})};a(".x i").vr();a.fn.labelMaker=function(){this.each(function(b){var b= -b+1,d=a(this),b="i"+b;d.next("input, textarea, select").filter("[id]").not(":radio, :checkbox").length?d.attr("for",d.next().attr("id")):d.next("input, textarea, select").not("[id]").not(":radio, :checkbox").length?d.attr("for",b).next().attr("id",b):d.prev(":radio, :checkbox").filter("[id]").length?d.attr("for",d.prev().attr("id")):d.prev(":radio, :checkbox").not("[id]").length?d.attr("for",b).prev().attr("id",b):d.children("input, textarea, select").filter("[id]").length?d.attr("for",d.children("input, textarea, select").filter("[id]").eq(0).attr("id")): -d.children("input, textarea, select").not("[id]").length&&d.attr("for",b).children("input, textarea, select").not("[id]").eq(0).attr("id",b)})};a("label:not([for])").labelMaker();a.fn.checkToggle=function(){this.change(function(){var b=a(this);b.is(":checked")&&b.parent("label").addClass("checked");a(":radio, :checkbox").not(":checked").parent("label").removeClass("checked")})};a(":radio, :checkbox").checkToggle();a.fn.fileTypeOverlap=function(){this.each(function(){var b=a(this);b.wrap('').before(''),d.click(function(){b.data("anchor").trigger("close.mw")}),b.find("[data-hide]").click(function(){b.data("anchor").trigger("close.mw")}), -a("body").append('
').append(b),b.prepend(d));b.data("anchor",e);d=a.Event("before-open.mw");e.trigger(d);if(d.isDefaultPrevented())return!1;b=a(e.attr("href"));d=e.data("duration")||"fast";b.data("state","showing");a(document).bind("keydown.mw",function(a){if(27==a.which)return e.trigger("close.mw"),!1});b.fadeIn(d,function(){e.trigger("after-open.mw")}).find("button.x_close:first").focus().end().prev(".x_modal-backdrop").show();a("body").css("overflow","hidden")}).bind("close.mw", -function(){var e=a(this),b,d;b=a.Event("before-close.mw");e.trigger(b);if(b.isDefaultPrevented())return!1;b=a(e.attr("href"));d=e.data("duration")||"fast";b.data("state","hiding");b.fadeOut(d,function(){e.trigger("after-close.mw")}).prev(".x_modal-backdrop").hide();a("body").css("overflow","auto");e.focus()});a("div.x_modal").addClass("x").hide()};a("a.modalAnchor").xeModalWindow()}); -jQuery(function(a){var e=!1;a.fn.xeContentToggler=function(){this.not(".xe-content-toggler").addClass("xe-content-toggler").each(function(){var b=a(this);$layer=a(b.attr("href"));$layer.hide().not(".xe-toggling-content").addClass("xe-toggling-content").mousedown(function(){e=!0}).focusout(function(){setTimeout(function(){!e&&(!$layer.find(":focus").length&&"showing"==$layer.data("state"))&&b.trigger("close.tc");e=!1},1)})}).click(function(){var b=a(this),d;d=a(b.attr("href"));d.data("anchor",b);"showing"== -d.data("state")?b.trigger("close.tc"):b.trigger("open.tc");return!1}).bind("open.tc",function(){function b(){d.trigger("after-open.tc")}var d=a(this),h,f,g;h=a(d.attr("href"));f=d.data("effect");g=d.data("duration")||"fast";h.data("state","showing");d.trigger("before-open.tc");e=!1;a(document).unbind("mousedown.tc keydown.tc").bind("mousedown.tc keydown.tc",function(b){if(b&&("keydown"==b.type&&27!=b.which||"mousedown"==b.type&&(b=a(b.target),b.is("html,.tgAnchor,.tgContent")||h.has(b).length)))return!0; -d.trigger("close.tc");return!1});switch(f){case "slide":h.slideDown(g,b);break;case "slide-h":f=h.css({"overflow-x":"",width:""}).width();h.show().css({"overflow-x":"hidden",width:"0px"}).animate({width:f},g,function(){h.css({"overflow-x":"",width:""});b()});break;case "fade":h.fadeIn(g,b);break;default:h.show(),d.trigger("after-open.tc")}}).bind("close.tc",function(){function b(){d.trigger("after-close.tc")}var d=a(this),e,f,g;a(document).unbind("mousedown.tc keydown.tc");e=a(d.attr("href"));f=d.data("effect"); -g=d.data("duration")||"fast";e.data("state","hiding");d.trigger("before-close.tc");switch(f){case "slide":e.slideUp(g,b);break;case "slide-h":e.animate({width:0},g,function(){e.hide();b()});break;case "fade":e.fadeOut(g,b);break;default:e.hide(),d.trigger("after-close.tc")}});return this};a("a.tgAnchor").xeContentToggler()}); -jQuery(function(a){a.fn.xeModuleFinder=function(){this.not(".xe-module-finder").addClass("xe-module-finder").find("a.tgAnchor.findsite").bind("before-open.tc",function(){var e,b,d;e=a(this);b=a(e.attr("href")).find(">ul");d=e.prev("input:text").val();a.exec_json("admin.getSiteAllList",{domain:d},function(d){var f=d.site_list,g,k;b.empty();e.closest(".modulefinder").find(".moduleList,.moduleIdList").attr("disabled","disabled");if(d.error||!a.isArray(f))e.trigger("close.tc");else{g=0;for(k=f.length;g< -k;g++)d=a("
  • ").appendTo(b),a('
  • -
    -
    - -
    -
    + + + + diff --git a/modules/spamfilter/tpl/denied_word_list.html b/modules/spamfilter/tpl/denied_word_list.html index 9a9750328..89e36c982 100644 --- a/modules/spamfilter/tpl/denied_word_list.html +++ b/modules/spamfilter/tpl/denied_word_list.html @@ -9,37 +9,35 @@ {$lang->cmd_denied_word} - IP - {$lang->latest_hit} - {$lang->hit} - {$lang->regdate} - {$lang->cmd_delete} + IP + {$lang->latest_hit} + {$lang->hit} + {$lang->regdate} + {$lang->cmd_delete} {$word_info->word} - {$word_info->latest_hit}- - {$word_info->hit} + {$word_info->latest_hit}- + {$word_info->hit} {zdate($word_info->regdate,'Y-m-d')} {$lang->cmd_delete} + + {$lang->no_data} + -
    + -
    - - {$lang->about_denied_word} -
    -
    -
    - -
    -
    + + + +
    diff --git a/modules/spamfilter/tpl/header.html b/modules/spamfilter/tpl/header.html index e28c58f9b..aa14bf08b 100644 --- a/modules/spamfilter/tpl/header.html +++ b/modules/spamfilter/tpl/header.html @@ -1,7 +1,7 @@ -
    -

    {$XE_VALIDATOR_MESSAGE}

    -

    {$lang->spamfilter}

    +
    +

    {$XE_VALIDATOR_MESSAGE}

    +