mirror of
https://github.com/twisterarmy/twister-calm.git
synced 2025-01-11 23:47:59 +00:00
update
bug fix close by click on any place in modal window
This commit is contained in:
parent
7c1a504f70
commit
ae1ab04f69
9
calm.js
9
calm.js
@ -2,8 +2,9 @@ $(function(){
|
|||||||
$('.post-text').on('click', 'a', function(e){
|
$('.post-text').on('click', 'a', function(e){
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
});
|
});
|
||||||
$(".modal-blackout").on('click', function(){
|
|
||||||
closeModal($(this));
|
$(".cancel").on('click', function(e){
|
||||||
if($(".modal-content").attr("style") != undefined){$(".modal-content").removeAttr("style")}
|
if($(".modal-content").attr("style") != undefined){$(".modal-content").removeAttr("style")};
|
||||||
})
|
|
||||||
|
})
|
||||||
})
|
})
|
@ -271,7 +271,7 @@
|
|||||||
<!-- TEMPLATE INVÓLUCRO DO POST EXPANDIDO END -->
|
<!-- TEMPLATE INVÓLUCRO DO POST EXPANDIDO END -->
|
||||||
|
|
||||||
<!-- TEMPLATE DO MODAL GENÉRICO INIT -->
|
<!-- TEMPLATE DO MODAL GENÉRICO INIT -->
|
||||||
<div class="modal-blackout">
|
<div class="modal-blackout cancel">
|
||||||
<div class="modal-wrapper">
|
<div class="modal-wrapper">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h3></h3>
|
<h3></h3>
|
||||||
|
@ -30,7 +30,7 @@ function openModal( modalClass )
|
|||||||
|
|
||||||
//fecha o modal removendo o conteúdo por detach
|
//fecha o modal removendo o conteúdo por detach
|
||||||
function closeModal($this)
|
function closeModal($this)
|
||||||
{
|
{
|
||||||
var $body = $( "body" );
|
var $body = $( "body" );
|
||||||
var $modalWindows = $( "body" ).children( ".modal-blackout" );
|
var $modalWindows = $( "body" ).children( ".modal-blackout" );
|
||||||
|
|
||||||
@ -440,7 +440,9 @@ var retweetSubmit = function(e)
|
|||||||
|
|
||||||
|
|
||||||
function initInterfaceCommon() {
|
function initInterfaceCommon() {
|
||||||
$( "body" ).on( "click", ".cancel" , function() { closeModal($(this)); } );
|
$( "body" ).on( "click", function(event) {
|
||||||
|
if($(event.target).hasClass('cancel')) closeModal($(this));
|
||||||
|
});
|
||||||
$( ".post-reply" ).bind( "click", postReplyClick );
|
$( ".post-reply" ).bind( "click", postReplyClick );
|
||||||
$( ".post-propagate" ).bind( "click", reTwistPopup );
|
$( ".post-propagate" ).bind( "click", reTwistPopup );
|
||||||
$( ".userMenu-config-dropdown" ).bind( "click", dropDownMenu );
|
$( ".userMenu-config-dropdown" ).bind( "click", dropDownMenu );
|
||||||
@ -460,4 +462,5 @@ function initInterfaceCommon() {
|
|||||||
$( ".open-hashtag-modal").bind( "click", openHashtagModal );
|
$( ".open-hashtag-modal").bind( "click", openHashtagModal );
|
||||||
$( ".open-following-modal").bind( "click", openFollowingModal );
|
$( ".open-following-modal").bind( "click", openFollowingModal );
|
||||||
$( ".userMenu-connections a").bind( "click", openMentionsModal );
|
$( ".userMenu-connections a").bind( "click", openMentionsModal );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user