|
a/Allura/allura/public/nf/js/jquery.notify.js |
|
b/Allura/allura/public/nf/js/jquery.notify.js |
|
... |
|
... |
36 |
$(message).animate({ opacity: 0 }, { duration: 250, queue: false, complete: fadeComplete });
|
36 |
$(message).animate({ opacity: 0 }, { duration: 250, queue: false, complete: fadeComplete });
|
37 |
}
|
37 |
}
|
38 |
|
38 |
|
39 |
function scanMessages(container, o) {
|
39 |
function scanMessages(container, o) {
|
40 |
function helper() {
|
40 |
function helper() {
|
41 |
var $msg = $('.' + o.newClass + '.' + o.messageClass, container);
|
41 |
var selector = '.' + o.newClass + '.' + o.messageClass,
|
|
|
42 |
$msg;
|
|
|
43 |
// Special support for persistent messages, such as sitewide
|
|
|
44 |
// notifications; note that this requires the cookie plugin.
|
|
|
45 |
// Persistent messages are assumed sticky.
|
|
|
46 |
if ($.cookie && $.cookie(o.persistentCookie)){
|
|
|
47 |
$msg = $(selector, container).not(o.persistentClass);
|
|
|
48 |
} else {
|
|
|
49 |
$msg = $(selector, container);
|
|
|
50 |
}
|
42 |
if ($msg.length) {
|
51 |
if ($msg.length) {
|
43 |
$msg.prepend(o.closeIcon);
|
52 |
$msg.prepend(o.closeIcon);
|
44 |
$msg.click(function(e) {
|
53 |
$msg.click(function(e) {
|
|
|
54 |
if ($.cookie && $msg.hasClass(o.persistentClass)) {
|
|
|
55 |
$.cookie(o.persistentCookie, 1, { path: '/' });
|
|
|
56 |
}
|
45 |
closer(this, o);
|
57 |
closer(this, o);
|
46 |
});
|
58 |
});
|
47 |
$msg.removeClass(o.newClass).addClass(o.activeClass);
|
59 |
$msg.removeClass(o.newClass).addClass(o.activeClass);
|
48 |
$msg.each(function() {
|
60 |
$msg.each(function() {
|
49 |
var self = this;
|
61 |
var self = this;
|
50 |
if (!$(self).hasClass(o.stickyClass)) {
|
62 |
if (!$(self).hasClass(o.stickyClass) || !$(self).hasClass(o.persistentClass)) {
|
51 |
var timer = $(self).attr('data-timer') || o.timer;
|
63 |
var timer = $(self).attr('data-timer') || o.timer;
|
52 |
setTimeout(function() {
|
64 |
setTimeout(function() {
|
53 |
closer($(self), o);
|
65 |
closer($(self), o);
|
54 |
}, timer);
|
66 |
}, timer);
|
55 |
}
|
67 |
}
|
|
... |
|
... |
119 |
title: '',
|
131 |
title: '',
|
120 |
sanitize: true,
|
132 |
sanitize: true,
|
121 |
tmpl: '<div class="message <%=newClass%> <%=status%> <% if (sticky) { %><%=stickyClass %><% } %>" data-timer="<%=timer%>"><% if (title) { %><h6><%=title%></h6><% } %><div class="content"><%=message%></div></div>',
|
133 |
tmpl: '<div class="message <%=newClass%> <%=status%> <% if (sticky) { %><%=stickyClass %><% } %>" data-timer="<%=timer%>"><% if (title) { %><h6><%=title%></h6><% } %><div class="content"><%=message%></div></div>',
|
122 |
scrollcss: { position: 'fixed', top: '20px' },
|
134 |
scrollcss: { position: 'fixed', top: '20px' },
|
123 |
stickyClass: 'notify-sticky',
|
135 |
stickyClass: 'notify-sticky',
|
|
|
136 |
persistentClass: 'notify-persistent',
|
|
|
137 |
persistentCookie: 'notify-persistent-closed',
|
124 |
newClass: 'notify-new',
|
138 |
newClass: 'notify-new',
|
125 |
activeClass: 'notify-active',
|
139 |
activeClass: 'notify-active',
|
126 |
inactiveClass: 'notify-inactive',
|
140 |
inactiveClass: 'notify-inactive',
|
127 |
messageClass: 'message',
|
141 |
messageClass: 'message',
|
128 |
closeIcon: '<b title="Close" class="ico ico-close" data-icon="D"></b>'
|
142 |
closeIcon: '<b title="Close" class="ico ico-close" data-icon="D"></b>'
|