Browse Source

trying to add closeModal to browser's url/hash history

master
Miguel Freitas 10 years ago
parent
commit
f415c0e516
  1. 8
      js/interface_common.js

8
js/interface_common.js

@ -30,6 +30,12 @@ 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)
{
closeModalHandler($this);
window.location.hash = '';
}
function closeModalHandler($this)
{ {
var $body = $( "body" ); var $body = $( "body" );
var $modalWindows = $( "body" ).children( ".modal-blackout" ); var $modalWindows = $( "body" ).children( ".modal-blackout" );
@ -370,6 +376,8 @@ function watchHashChange(e)
}else if (hashdata[1] == 'hashtag') { }else if (hashdata[1] == 'hashtag') {
openHashtagModalFromSearch(hashdata[2]); openHashtagModalFromSearch(hashdata[2]);
} }
} else {
closeModalHandler();
} }
} }

Loading…
Cancel
Save