Skip to content
Snippets Groups Projects
Commit a5d315d6 authored by Uma's avatar Uma
Browse files

showModal and showPopup one time registration is removed

parent e33f9c80
No related branches found
No related tags found
No related merge requests found
......@@ -446,7 +446,7 @@ jQuery.Class("Vtiger_Helper_Js",{
var cb = params.cb;
var container = jQuery('.myModal');
container.one('hidden.bs.modal',function() {
container.on('hidden.bs.modal',function() {
container.html('');
window.onbeforeunload = null;
});
......@@ -794,12 +794,6 @@ jQuery.Class("Vtiger_Helper_Js",{
params = {};
}
// we should hide all existing modal's
var hideModals = (typeof params.hideModals !== 'undefined') ? params.hideModals : true;
if(hideModals) {
this.hideModal();
}
var defaultParams = app.helper.defaultModalParams();
params = jQuery.extend(defaultParams,params);
......@@ -808,14 +802,7 @@ jQuery.Class("Vtiger_Helper_Js",{
var container = jQuery('<div id="popupModal" class="modal"></div>');
container.on('hidden.bs.modal',function() {
/**
* if tabindex = -1 then browser will set focus to that element.
* Loading another modal(this has tabindex = -1) on a modal is not moving the focus to new modal.
* We can't remove tabindex from the modals in tpl. So, this is a work around(removing index on show and adding on hide).
*/
jQuery('#helpPageOverlay').attr('tabindex','-1');
container.html('');
window.onbeforeunload = null;
container.html('').remove();
});
if(typeof cb === "function") {
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment