permissionList.js revision 6d67b58472abc76a1d0d68a1d1fa32a45dc6626a
$.widget("ui.permissionList", {
_create : function() {
// Tipsy tooltip
gravity : 'w'
}).click(function() {
});
// Attach Autocomplete to inputs
minLength : 3,
},
},
});
// Never submit the autocompletion form
});
// Removal of permissions
if(!confirm("really delete?"))
return;
$.ajax({
type: 'POST',
success: function(){
})
},
}
});
});
// Show / Hide edit form
this.blur();
// show form
// clone template form
form = $(form.replace(/%RANDOM%/g, random)).removeClass("editTemplate").addClass("edit").attr("action", li.data('uri')).appendTo(li)
// extend selector for more supported elements
if(!name)
return;
// change 'model[name]' into 'name'
if(match)
if(type=='input')
switch(type){
case 'checkbox':
break;
case 'select':
break;
// add here support for other input types, when needed
}
});
} else {
// hide form
}
});
// Permission removal succeeded
});
// AJAX Actions failed
});
},
// collects elements from list for exclusion
excludeMap : function() {
var self = this;
var map = {}
var $this = $(this);
else
});
return map;
},
// source for autcomplete
});
$.ajax({
url : '/autocomplete',
}
})
},
// autocomplete select-handler
var input = $(this);
var params = {}
if(this.polymorphic){
}
// Create the permission
});
return false;
},
// camelCase to under_score
toUnderscore: function(value){
return value;
}
});