32:ccf41c7443de
Anton Shestakov <av6@dwimlabs.net>, Mon, 21 Mar 2016 23:11:40 +0800
css: missing presence message style

next change 34:a7e8ed799092
previous change 31:d0248d45562f

js/rivets.js

Permissions: -rw-r--r--

Other formats: Feeds:
// Generated by CoffeeScript 1.10.0
(function() {
var slice = [].slice,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
rivets.adapters[':'] = {
observe: function(obj, keypath, callback) {
return obj.on('change:' + keypath, callback);
},
unobserve: function(obj, keypath, callback) {
return obj.off('change:' + keypath, callback);
},
get: function(obj, keypath) {
return obj.get(keypath);
},
set: function(obj, keypath, value) {
return obj.set(keypath, value);
}
};
rivets.formatters['first-letter'] = function(value) {
if (value != null) {
return value.charAt(0);
} else {
return ' ';
}
};
rivets.formatters['only'] = function() {
var allowed, value;
value = arguments[0], allowed = 2 <= arguments.length ? slice.call(arguments, 1) : [];
if (indexOf.call(allowed, value) >= 0) {
return value;
} else {
return '';
}
};
rivets.formatters['eq'] = function(a, b) {
return a === b;
};
rivets.formatters['format-date'] = function(value, format) {
if (value != null) {
return value.format(format);
} else {
return '';
}
};
rivets.formatters['iso-date'] = function(value) {
if (value != null) {
return value.toISOString();
} else {
return '';
}
};
rivets.formatters['from-now'] = function(value) {
if (value != null) {
return value.fromNow();
} else {
return '';
}
};
}).call(this);
//# sourceMappingURL=rivets.js.map