编辑组织栏目的顺序时,不需要弹窗

This commit is contained in:
ouyangxuhua 2016-03-22 14:10:36 +08:00
parent 675b1ad403
commit fcb189d874
1 changed files with 6 additions and 12 deletions

View File

@ -134,19 +134,13 @@
function update_priority(show_id, edit_id, field_id, input_value){
var re = /^[0-9]*[1-9]*[0-9]$/
if(re.test(input_value) && $(show_id).html().trim() != input_value.trim() && input_value.trim() != ''){
if(confirm("确定修改为" + input_value + "?")){
$.ajax({
url: "/org_subfields/" + field_id + "/update_priority?priority=" + input_value,
type: 'put'
});
}
else{
$(edit_id).children("input").val($(show_id).html().trim());
}
$.ajax({
url: "/org_subfields/" + field_id + "/update_priority?priority=" + input_value,
type: 'put'
});
}
else
{
$(edit_id).find("input").val($(show_id).html().trim());
else{
$(edit_id).children("input").val($(show_id).html().trim());
}
$(show_id).show();
$(edit_id).hide();