104,14 → 104,9 |
weid:($("#weid")[0] ? $("#weid")[0].checked : null), |
parent:parent |
}, |
error:function(jqXHR, textStatus, errorThrown) { |
if (errorThrown == "abort") return; |
alertError(_L("Error: %1",errorThrown)); |
}, |
error: oidplus_ajax_error, |
success:function(data) { |
if ("error" in data) { |
alertError(_L("Error: %1",data.error)); |
} else if (data.status >= 0) { |
oidplus_ajax_success(data, function (data) { |
if (data.status == 0/*OK*/) { |
if (confirm(_L("Insert OK.")+"\n\n"+_L("Do you want to open the newly created object now?"))) { |
openAndSelectNode(data.inserted_id, parent); |
147,10 → 142,8 |
|
// TODO: Don't use reloadContent(); instead add a node at the tree at the left add at the right add a new row to the table |
reloadContent(); |
} else { |
alertError(_L("Error: %1",data)); |
}); |
} |
} |
}); |
}, |
|
179,14 → 172,9 |
confidential:($("#hide_"+$.escapeSelector(id))[0] ? $("#hide_"+$.escapeSelector(id))[0].checked : null), |
parent:parent |
}, |
error:function(jqXHR, textStatus, errorThrown) { |
if (errorThrown == "abort") return; |
alertError(_L("Error: %1",errorThrown)); |
}, |
error: oidplus_ajax_error, |
success:function(data) { |
if ("error" in data) { |
alertError(_L("Error: %1",data.error)); |
} else if (data.status >= 0) { |
oidplus_ajax_success(data, function (data) { |
if (data.status == 0/*OK*/) { |
alertSuccess(_L("Update OK")); |
} |
208,10 → 196,8 |
|
// reloadContent(); |
$('#oidtree').jstree("refresh"); |
} else { |
alertError(_L("Error: %1",data)); |
}); |
} |
} |
}); |
}, |
|
235,20 → 221,13 |
id:id, |
parent:parent |
}, |
error:function(jqXHR, textStatus, errorThrown) { |
if (errorThrown == "abort") return; |
alertError(_L("Error: %1",errorThrown)); |
}, |
error: oidplus_ajax_error, |
success:function(data) { |
if ("error" in data) { |
alertError(_L("Error: %1",data.error)); |
} else if (data.status >= 0) { |
oidplus_ajax_success(data, function (data) { |
reloadContent(); |
// TODO: Don't use reloadContent(); instead delete node at the left tree and remove the row at the right table |
} else { |
alertError(_L("Error: %1",data.error)); |
}); |
} |
} |
}); |
}, |
|
272,14 → 251,9 |
//description:($("#description")[0] ? $("#description")[0].value : null) |
description:tinyMCE.get('description').getContent() |
}, |
error:function(jqXHR, textStatus, errorThrown) { |
if (errorThrown == "abort") return; |
alertError(_L("Error: %1",errorThrown)); |
}, |
error: oidplus_ajax_error, |
success:function(data) { |
if ("error" in data) { |
alertError(_L("Error: %1",data.error)); |
} else if (data.status >= 0) { |
oidplus_ajax_success(data, function (data) { |
alertSuccess(_L("Update OK")); |
//reloadContent(); |
$('#oidtree').jstree("refresh"); |
292,10 → 266,8 |
|
var mce = tinymce.get('description'); |
if (mce != null) mce.setDirty(false); |
} else { |
alertError(_L("Error: %1",data.error)); |
}); |
} |
} |
}); |
}, |
|