fix for #841
This commit is contained in:
parent
d7b63a5bb2
commit
16e86486ee
@ -258,14 +258,17 @@ echo Bootstrap::formOpen(array(
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Generate slug when the user type the title
|
// Generate slug when the user type the title and the slug field is empty
|
||||||
|
var currentSlug = $("#jsslug").val();
|
||||||
$("#jstitle").keyup(function() {
|
$("#jstitle").keyup(function() {
|
||||||
var text = $(this).val();
|
var text = $(this).val();
|
||||||
var parent = $("#jsparent").val();
|
var parent = $("#jsparent").val();
|
||||||
var currentKey = "";
|
var currentKey = "";
|
||||||
var ajax = new bluditAjax();
|
var ajax = new bluditAjax();
|
||||||
var callBack = $("#jsslug");
|
var callBack = $("#jsslug");
|
||||||
ajax.generateSlug(text, parent, currentKey, callBack);
|
if (currentSlug.length === 0) {
|
||||||
|
ajax.generateSlug(text, parent, currentKey, callBack);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Datepicker
|
// Datepicker
|
||||||
|
Loading…
x
Reference in New Issue
Block a user