Revision 53a78d40
Added by Ohad Levy over 12 years ago
- ID 53a78d402f754fbbf35ed04e158a0664bd7b7e52
public/javascripts/application.js | ||
---|---|---|
$(function() {
|
||
$('.error, .warning, .notice').hide().each(function(index, item) {
|
||
item = $(item);
|
||
$.jnotify(item.text(), { type: item.attr('class'), sticky: true });
|
||
});
|
||
$('.error').hide().each(function(index, item) {
|
||
if ($('.errorExplanation').length == 0) {
|
||
$.jnotify($(item).text(), { type: "error", sticky: true });
|
||
}
|
||
});
|
||
|
||
$('.warning').hide().each(function(index, item) {
|
||
$.jnotify($(item).text(), { type: "warning", sticky: true });
|
||
});
|
||
|
||
$('.notice').hide().each(function(index, item) {
|
||
$.jnotify($(item).text(), { type: "success", sticky: false });
|
||
});
|
||
});
|
||
|
||
|
||
function remove_fields(link) {
|
||
$(link).prev("input[type=hidden]").val("1");
|
||
$(link).closest(".fields").hide();
|
Also available in: Unified diff
fixes #1174 - error messages might show up twice
also fixes wrong colors for warning errors etc