Skip to content

Instantly share code, notes, and snippets.

privateMessages: [{
author: "Sly"
created_at: {
date: "2014-05-14 23:15:07"
timezone: "Europe/Helsinki"
timezone_type: 3
}
message: "asdadasdasdad"
recipient: "Nagibator2000"
}]
_disableEnableAll: function(element, isDisabled) {
var descendants = element.descendants();
for (var k in descendants) {
if(k !== 'toJSON') {
descendants[k].disabled = isDisabled;
}
}
element.disabled = isDisabled;
},
Validation.add(
'validate_unique_email',
'This email is already in use! Please log in in order to proceed',
function(value){
var url = validationUniqueEmail + '?email=' + encodeURIComponent(value);
var ok = false;
new Ajax.Request(url, {
method: 'get',
const Prom = (function () {
function toArray(arr){
return (
(Array.isArray(arr) && arr)
|| (!Array.isArray(arr) && arr.length && [].slice.call(arr))
|| (typeof arr === 'string' && arr.split(''))
|| (typeof arr === 'object' && [])
)
}