FINAL suepr merge step : added all modules to this super repos
This commit is contained in:
23
sites/all/themes/gui/gui7/js/gui7.js
Normal file
23
sites/all/themes/gui/gui7/js/gui7.js
Normal file
@@ -0,0 +1,23 @@
|
||||
Drupal.behaviors.gui7 = function (context) {
|
||||
// Growl-style system messages
|
||||
$('#console > div.messages:not(.processed)')
|
||||
.addClass('processed')
|
||||
.each(function() {
|
||||
// If a message meets these criteria, we don't autoclose
|
||||
// - contains a link
|
||||
// - is an error or warning
|
||||
// - contains a lenghthy amount of text
|
||||
if ($('a', this).size() || $(this).is('.error') || $(this).is('.warning') || $(this).text().length > 100) {
|
||||
$(this).prepend("<span class='close'>x</span>");
|
||||
$('span.close', this).click(function() {
|
||||
$(this).parent().slideUp('fast');
|
||||
});
|
||||
}
|
||||
else {
|
||||
// This essentially adds a 3 second pause before hiding the message.
|
||||
$(this).animate({opacity:1}, 5000, 'linear', function() {
|
||||
$(this).slideUp('fast');
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user