// |
notifications:[],
// buttonCancel:String
// The HTML tip show when hovering over the close button.
buttonCancel:"Close for now",
// noRemindButton:String
// The text link shown that when clicked, permanently dismisses
// the message (sets a cookie). If this string is blank, this
// link is not displayed.
noRemindButton:"Don't Remind Me Again",
templateString: template,
constructor: function(props, node){
if(!props.notifications && node){
// From markup. Create the notifications Array from the
// srcRefNode children.
array.forEach(node.childNodes, function(n){
if(n.nodeType==1){
var val = domAttr.get(n, "validate");
this.notifications.push({
message:n.innerHTML,
validate:function(){
// the function that fires to determine if the
// bar shows or not.
var evals = true;
try{
evals = dojo.eval(val);
}catch(e){ /* squelch. it's true.*/ }
return evals;
}
});
}
}, this);
}
},
checkNotifications: function(){
// summary:
// Internal. Go through the notifications Array
// and check for any that evaluate to true.
// tags:
// private
if(!this.notifications.length){
// odd. why use the bar but not set any notifications?
return;
}
for(var i=0;i