mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 12:53:33 +08:00

- Page edit actions changed over to use id instead of slug (others should follow suit since slug uniqueness is only guaranteed among published content items...where applicable, there is no notion of a "published" blog) --HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4045722
22 lines
601 B
JavaScript
22 lines
601 B
JavaScript
jQuery.fn.extend({
|
|
slugify: function(options) {
|
|
//todo: (heskew) need messaging system
|
|
if (!options.target || !options.url)
|
|
return;
|
|
|
|
var args = {
|
|
"contentType": options.contentType,
|
|
__RequestVerificationToken: $("input[name=__RequestVerificationToken]").val()
|
|
};
|
|
args[$(this).attr("name")] = $(this).val();
|
|
|
|
jQuery.post(
|
|
options.url,
|
|
args,
|
|
function(data) {
|
|
options.target.val(data);
|
|
},
|
|
"json"
|
|
);
|
|
}
|
|
}); |