mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
Issue 2929: r12743`s bug(support nested modal window)
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12747 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
172f48156c
commit
5856ab444d
2 changed files with 3 additions and 2 deletions
|
|
@ -366,6 +366,7 @@ jQuery(function($){
|
|||
$btnClose = $('<button type="button" class="x_close">×</button>');
|
||||
$btnClose.click(function(){ $modal.data('anchor').trigger('close.mw') });
|
||||
$modal.find('[data-hide]').click(function(){ $modal.data('anchor').trigger('close.mw') });
|
||||
$('body').append($modal);
|
||||
$modal.prepend($btnClose); // prepend close button
|
||||
}
|
||||
|
||||
|
|
|
|||
4
modules/admin/tpl/js/admin.min.js
vendored
4
modules/admin/tpl/js/admin.min.js
vendored
|
|
@ -13,8 +13,8 @@ e.attr("for",e.next().attr("id")):e.next("input, textarea, select").not("[id]").
|
|||
e.attr("for",b).children("input, textarea, select").not("[id]").eq(0).attr("id",b)})};a("label:not([for])").labelMaker();a.fn.checkToggle=function(){function b(){setTimeout(function(){a(":checked").parent("label").addClass("checked");a(':not(":checked")').parent("label").removeClass("checked")},0)}this.change(b);b()};a(":radio, :checkbox").checkToggle();a.fn.fileTypeOverlap=function(){this.each(function(){var b=a(this);b.wrap('<span class="fileBtn x_btn" />').before(b.attr("title"))})};a('input[type="file"].overlap').fileTypeOverlap();
|
||||
a.fn.tableSpan=function(){this.each(function(){var b=a(this),e=b.find(">thead>tr:eq(0)>th").length,b=b.find(">tbody>tr:eq(0)>td:only-child");e!=b.attr("colspan")&&b.attr("colspan",e).css("text-align","center")})};a("table").tableSpan()});
|
||||
jQuery(function(a){var d=[],f=a('<div class="x_modal-backdrop"></div>').appendTo("body").hide();a.fn.xeModalWindow=function(){this.not(".xe-modal-window").addClass("xe-modal-window").each(function(){a(a(this).attr("href")).addClass("x").hide()}).click(function(){var b=a(this);"showing"==a(b.attr("href")).data("state")?b.trigger("close.mw"):b.trigger("open.mw");return!1}).bind("open.mw",function(){function b(){e.trigger("after-open.mw")}var e=a(this),h,g;h=a(e.attr("href"));if(!(d.length&&d[d.length-
|
||||
1].get(0)==h.get(0))){h.parent("body").length||(g=a('<button type="button" class="x_close">×</button>'),g.click(function(){h.data("anchor").trigger("close.mw")}),h.find("[data-hide]").click(function(){h.data("anchor").trigger("close.mw")}),h.prepend(g));h.data("anchor",e);g=a.Event("before-open.mw");e.trigger(g);if(g.isDefaultPrevented())return!1;g=e.data("duration")||"fast";h.data("state","showing");a(document).bind("keydown.mw",function(a){if(27==a.which)return e.trigger("close.mw"),!1});
|
||||
h.fadeIn(g,b).find("button.x_close:first").focus();a("body").css("overflow","hidden");d.push(h);g=1040+2*(d.length-1);f.css("z-index",g).show();h.css("z-index",g+1)}}).bind("close.mw",function(){function b(){e.trigger("after-close.mw")}var e=a(this),h,g;g=a(e.attr("href"));if(!(d.length&&d[d.length-1].get(0)!=g.get(0))){h=a.Event("before-close.mw");e.trigger(h);if(h.isDefaultPrevented())return!1;h=e.data("duration")||"fast";g.data("state","hiding");g.fadeOut(h,b);a("body").css("overflow","auto");
|
||||
1].get(0)==h.get(0))){h.parent("body").length||(g=a('<button type="button" class="x_close">×</button>'),g.click(function(){h.data("anchor").trigger("close.mw")}),h.find("[data-hide]").click(function(){h.data("anchor").trigger("close.mw")}),a("body").append(h),h.prepend(g));h.data("anchor",e);g=a.Event("before-open.mw");e.trigger(g);if(g.isDefaultPrevented())return!1;g=e.data("duration")||"fast";h.data("state","showing");a(document).bind("keydown.mw",function(a){if(27==a.which)return e.trigger("close.mw"),
|
||||
!1});h.fadeIn(g,b).find("button.x_close:first").focus();a("body").css("overflow","hidden");d.push(h);g=1040+2*(d.length-1);f.css("z-index",g).show();h.css("z-index",g+1)}}).bind("close.mw",function(){function b(){e.trigger("after-close.mw")}var e=a(this),h,g;g=a(e.attr("href"));if(!(d.length&&d[d.length-1].get(0)!=g.get(0))){h=a.Event("before-close.mw");e.trigger(h);if(h.isDefaultPrevented())return!1;h=e.data("duration")||"fast";g.data("state","hiding");g.fadeOut(h,b);a("body").css("overflow","auto");
|
||||
e.focus();d.pop();g=1040+2*(d.length-1);d.length?f.css("z-index",g):f.hide()}});a("div.x_modal").addClass("x")};a("a.modalAnchor").xeModalWindow()});
|
||||
jQuery(function(a){var d=!1;a.fn.xeContentToggler=function(){this.not(".xe-content-toggler").addClass("xe-content-toggler").each(function(){var f=a(this);$layer=a(f.attr("href"));$layer.hide().not(".xe-toggling-content").addClass("xe-toggling-content").mousedown(function(){d=!0}).focusout(function(){setTimeout(function(){!d&&(!$layer.find(":focus").length&&"showing"==$layer.data("state"))&&f.trigger("close.tc");d=!1},1)})}).click(function(){var d=a(this),b;b=a(d.attr("href"));b.data("anchor",d);"showing"==
|
||||
b.data("state")?d.trigger("close.tc"):d.trigger("open.tc");return!1}).bind("open.tc",function(){function f(){b.trigger("after-open.tc")}var b=a(this),e,h,g;e=a(b.attr("href"));h=b.data("effect");g=b.data("duration")||"fast";e.data("state","showing");b.trigger("before-open.tc");d=!1;a(document).unbind("mousedown.tc keydown.tc").bind("mousedown.tc keydown.tc",function(d){if(d&&("keydown"==d.type&&27!=d.which||"mousedown"==d.type&&(d=a(d.target),d.is("html,.tgAnchor,.tgContent")||e.has(d).length)))return!0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue