diff --git a/codepot/src/codepot/views/code_folder.php b/codepot/src/codepot/views/code_folder.php index b5523f6d..844e0855 100644 --- a/codepot/src/codepot/views/code_folder.php +++ b/codepot/src/codepot/views/code_folder.php @@ -318,7 +318,12 @@ $(function () { import_in_progress = false; $('#code_folder_mainarea_new_form_div').dialog('enable'); $('#code_folder_mainarea_new_form_div').dialog('close'); - show_alert ('Failed - ' + errorThrown, "lang->line('Error')?>"); + + var errmsg = ''; + if (errmsg == '' && errorThrown != null) errmsg = errorThrown; + if (errmsg == '' && textStatus != null) errmsg = textStatus; + if (errmsg == '') errmsg = 'Unknown error'; + show_alert ('Failed - ' + errmsg, "lang->line('Error')?>"); } }); } @@ -402,7 +407,12 @@ $(function () { delete_in_progress = false; $('#code_folder_mainarea_delete_form_div').dialog('enable'); $('#code_folder_mainarea_delete_form_div').dialog('close'); - show_alert ('Failed - ' + errorThrown, "lang->line('Error')?>"); + + var errmsg = ''; + if (errmsg == '' && errorThrown != null) errmsg = errorThrown; + if (errmsg == '' && textStatus != null) errmsg = textStatus; + if (errmsg == '') errmsg = 'Unknown error'; + show_alert ('Failed - ' + errmsg, "lang->line('Error')?>"); } }); } @@ -491,7 +501,12 @@ $(function () { rename_in_progress = false; $('#code_folder_mainarea_rename_form_div').dialog('enable'); $('#code_folder_mainarea_rename_form_div').dialog('close'); - show_alert ('Failed - ' + errorThrown, "lang->line('Error')?>"); + + var errmsg = ''; + if (errmsg == '' && errorThrown != null) errmsg = errorThrown; + if (errmsg == '' && textStatus != null) errmsg = textStatus; + if (errmsg == '') errmsg = 'Unknown error'; + show_alert ('Failed - ' + errmsg, "lang->line('Error')?>"); } }); } diff --git a/codepot/src/codepot/views/file_home.php b/codepot/src/codepot/views/file_home.php index cb999db2..1c4c5c78 100644 --- a/codepot/src/codepot/views/file_home.php +++ b/codepot/src/codepot/views/file_home.php @@ -189,7 +189,11 @@ $(function () { import_in_progress = false; $('#file_home_mainarea_new_form_div').dialog('enable'); $('#file_home_mainarea_new_form_div').dialog('close'); - show_alert ('Failed - ' + errorThrown, "lang->line('Error')?>"); + var errmsg = ''; + if (errmsg == '' && errorThrown != null) errmsg = errorThrown; + if (errmsg == '' && textStatus != null) errmsg = textStatus; + if (errmsg == '') errmsg = 'Unknown error'; + show_alert ('Failed - ' + errmsg, "lang->line('Error')?>"); } }); }