Have bookmark editor show errors on non 200 responses.
This commit is contained in:
parent
536531848e
commit
b864397242
1 changed files with 7 additions and 2 deletions
|
@ -117,12 +117,17 @@ function on_save(ed, edit_element_map, display_element_map)
|
|||
{
|
||||
function callback(response)
|
||||
{
|
||||
ed.hide_spinner();
|
||||
if (response["meta"]["status"] != 200)
|
||||
{
|
||||
ed.show_error("Status: " + response["meta"]["status"]);
|
||||
return;
|
||||
}
|
||||
|
||||
ed.save();
|
||||
display_element_map["title"].href = response["data"]["url"];
|
||||
display_element_map["url"].href = response["data"]["url"];
|
||||
}
|
||||
edit_element_map["title"];
|
||||
|
||||
edit_element_map["url"].value = edit_element_map["url"].value.trim();
|
||||
if (!edit_element_map["url"].value)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue