Created
December 16, 2013 04:01
-
-
Save nachodd/ff1733573f412d0f8b44 to your computer and use it in GitHub Desktop.
modal bootstrap & javascript objects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Modal cargando | |
var dialogs = (function () { | |
var cargandoDiv = $('#cargandoDialog'); | |
var avisoDiv = $('#modalAviso'); | |
return { | |
showCargando: function() { | |
cargandoDiv.modal(); | |
}, | |
hideCargando: function () { | |
cargandoDiv.modal('hide'); | |
} | |
}; | |
})(); | |
var collection = (function () { | |
var keys = [], values = []; | |
return { | |
get: function (key) { | |
var at = keys.indexOf(key); | |
if (at >= 0) { | |
return values[at]; | |
} | |
}, | |
set: function (key, value) { | |
var at = keys.indexOf(key); | |
if (at < 0) { | |
at = keys.length; | |
} | |
keys[at] = key; | |
values[at] = value; | |
}, | |
remove: function (key) { | |
var at = keys.indexOf(key); | |
if (at >= 0) { | |
keys.splice(at, 1); | |
values.splice(at, 1); | |
} | |
} | |
}; | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment