/home/techb158/exp.abdallabala.com/ui/lib
NameSizeModeActions
ace/-0755rm
c3/-0755rm
chart/-0755rm
contacts/-0755rm
css/-0755rm
dashboard/-0755rm
dp/-0755rm
dropzone/-0755rm
dt/-0755rm
fc/-0755rm
fonts/-0755rm
footable/-0755rm
ibilling/-0755rm
icons/-0755rm
imgcrop/-0755rm
imgs/-0755rm
invoices/-0755rm
js/-0755rm
jslib/-0755rm
moment/-0755rm
multi-select/-0755rm
orders/-0755rm
popover/-0755rm
prism/-0755rm
redactor/-0755rm
s2/-0755rm
select/-0755rm
settings/-0755rm
sn/-0755rm
spectrum/-0755rm
terminal/-0755rm
tinymce/-0755rm
toggle/-0755rm
transactions/-0755rm
validator/-0755rm
.DS_Store102440644editdlrm
add-contact.js61050644editdlrm
app.js144100644editdlrm
blockui.js199120644editdlrm
clipboard.min.js101120644editdlrm
deposit.js64630644editdlrm
edit-invoice-v2.js172420644editdlrm
edit_invoice_v2n.js112360644editdlrm
expense.js38250644editdlrm
ibilling.js6250440644editdlrm
index.html1120644editdlrm
invoice.js157390644editdlrm
invoice_add_v2.js113600644editdlrm
jquery.steps.min.js136340644editdlrm
locale.js4010644editdlrm
login.js14610644editdlrm
modal.css46960644editdlrm
modal.js266340644editdlrm
numeric.js636160644editdlrm
profile.js145530644editdlrm
progress.js61670644editdlrm
quicksearch.js54620644editdlrm
quote-edit.js104330644editdlrm
quotes.js95370644editdlrm
require.js155240644editdlrm
tr-manage.js26150644editdlrm
transfer.js17020644editdlrm
tr_filter.js36070644editdlrm
typeahead.bundle.min.js397490644editdlrm
Edit: /home/techb158/exp.abdallabala.com/ui/lib/modal.js (26634B)
!function ($) { "use strict"; // jshint ;_; /* MODAL MANAGER CLASS DEFINITION * ====================== */ var ModalManager = function (element, options) { this.init(element, options); }; ModalManager.prototype = { constructor: ModalManager, init: function (element, options) { this.$element = $(element); this.options = $.extend({}, $.fn.modalmanager.defaults, this.$element.data(), typeof options == 'object' && options); this.stack = []; this.backdropCount = 0; if (this.options.resize) { var resizeTimeout, that = this; $(window).on('resize.modal', function(){ resizeTimeout && clearTimeout(resizeTimeout); resizeTimeout = setTimeout(function(){ for (var i = 0; i < that.stack.length; i++){ that.stack[i].isShown && that.stack[i].layout(); } }, 10); }); } }, createModal: function (element, options) { $(element).modal($.extend({ manager: this }, options)); }, appendModal: function (modal) { this.stack.push(modal); var that = this; modal.$element.on('show.modalmanager', targetIsSelf(function (e) { var showModal = function(){ modal.isShown = true; var transition = $.support.transition && modal.$element.hasClass('fade'); that.$element .toggleClass('modal-open', that.hasOpenModal()) .toggleClass('page-overflow', $(window).height() < that.$element.height()); modal.$parent = modal.$element.parent(); modal.$container = that.createContainer(modal); modal.$element.appendTo(modal.$container); that.backdrop(modal, function () { modal.$element.show(); if (transition) { //modal.$element[0].style.display = 'run-in'; modal.$element[0].offsetWidth; //modal.$element.one($.support.transition.end, function () { modal.$element[0].style.display = 'block' }); } modal.layout(); modal.$element .addClass('in') .attr('aria-hidden', false); var complete = function () { that.setFocus(); modal.$element.trigger('shown'); }; transition ? modal.$element.one($.support.transition.end, complete) : complete(); }); }; modal.options.replace ? that.replace(showModal) : showModal(); })); modal.$element.on('hidden.modalmanager', targetIsSelf(function (e) { that.backdrop(modal); // handle the case when a modal may have been removed from the dom before this callback executes if (!modal.$element.parent().length) { that.destroyModal(modal); } else if (modal.$backdrop){ var transition = $.support.transition && modal.$element.hasClass('fade'); // trigger a relayout due to firebox's buggy transition end event if (transition) { modal.$element[0].offsetWidth; } $.support.transition && modal.$element.hasClass('fade') ? modal.$backdrop.one($.support.transition.end, function () { modal.destroy(); }) : modal.destroy(); } else { modal.destroy(); } })); modal.$element.on('destroyed.modalmanager', targetIsSelf(function (e) { that.destroyModal(modal); })); }, getOpenModals: function () { var openModals = []; for (var i = 0; i < this.stack.length; i++){ if (this.stack[i].isShown) openModals.push(this.stack[i]); } return openModals; }, hasOpenModal: function () { return this.getOpenModals().length > 0; }, setFocus: function () { var topModal; for (var i = 0; i < this.stack.length; i++){ if (this.stack[i].isShown) topModal = this.stack[i]; } if (!topModal) return; topModal.focus(); }, destroyModal: function (modal) { modal.$element.off('.modalmanager'); if (modal.$backdrop) this.removeBackdrop(modal); this.stack.splice(this.getIndexOfModal(modal), 1); var hasOpenModal = this.hasOpenModal(); this.$element.toggleClass('modal-open', hasOpenModal); if (!hasOpenModal){ this.$element.removeClass('page-overflow'); } this.removeContainer(modal); this.setFocus(); }, getModalAt: function (index) { return this.stack[index]; }, getIndexOfModal: function (modal) { for (var i = 0; i < this.stack.length; i++){ if (modal === this.stack[i]) return i; } }, replace: function (callback) { var topModal; for (var i = 0; i < this.stack.length; i++){ if (this.stack[i].isShown) topModal = this.stack[i]; } if (topModal) { this.$backdropHandle = topModal.$backdrop; topModal.$backdrop = null; callback && topModal.$element.one('hidden', targetIsSelf( $.proxy(callback, this) )); topModal.hide(); } else if (callback) { callback(); } }, removeBackdrop: function (modal) { modal.$backdrop.remove(); modal.$backdrop = null; }, createBackdrop: function (animate, tmpl) { var $backdrop; if (!this.$backdropHandle) { $backdrop = $(tmpl) .addClass(animate) .appendTo(this.$element); } else { $backdrop = this.$backdropHandle; $backdrop.off('.modalmanager'); this.$backdropHandle = null; this.isLoading && this.removeSpinner(); } return $backdrop; }, removeContainer: function (modal) { modal.$container.remove(); modal.$container = null; }, createContainer: function (modal) { var $container; $container = $('