transferred Code Ocean from original repository to GitHub

This commit is contained in:
Hauke Klement
2015-01-22 09:51:49 +01:00
commit 4cbf9970b1
683 changed files with 11979 additions and 0 deletions

0
lib/assets/.keep Normal file
View File

View File

@ -0,0 +1,41 @@
(function() {
var DURATION = 10000;
var SEVERITIES = ['danger', 'info', 'success', 'warning'];
var buildFlash = function(options) {
if (options.text) {
var container = options.container;
var html = '';
if (options.icon) {
html += '<i class="' + options.icon.join(' ') + '">&nbsp;';
}
html += options.text;
container.html(html);
showFlashes();
}
};
var generateMethods = function() {
$.flash = {};
$.each(SEVERITIES, function(index, severity) {
$.flash[severity] = function(options) {
buildFlash($.extend(options, {
container: $('#flash-' + severity)
}));
};
});
};
var showFlashes = function() {
$('.flash').each(function() {
if ($(this).html() !== '') {
$(this).slideDown().delay(DURATION).slideUp(function() {
$(this).html('');
});
}
});
};
generateMethods();
$(showFlashes);
})();

View File

@ -0,0 +1,3 @@
.flash {
display: none;
}