aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-09-11 07:37:05 +0000
committerOlivier Lamy <olamy@apache.org>2012-09-11 07:37:05 +0000
commite75d0d78ae86c80210f4144846637738eb9be140 (patch)
tree96c3496329eee93711bdeedfa49d2b3cf50a77b2 /archiva-modules
parent1a2df0b49f118abe5af153285925ffb2422ec889 (diff)
downloadarchiva-e75d0d78ae86c80210f4144846637738eb9be140.tar.gz
archiva-e75d0d78ae86c80210f4144846637738eb9be140.zip
we now have a generic way to handle errors
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1383269 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/redback.js5
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js42
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js4
3 files changed, 0 insertions, 51 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/redback.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/redback.js
index 347436fe5..b4f48d294 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/redback.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/redback.js
@@ -176,8 +176,6 @@ define("redback",["jquery","utils","jquery.validate","jquery.json","knockout",
removeSmallSpinnerImg();
},
error: function(result) {
- var obj = jQuery.parseJSON(result.responseText);
- displayRedbackError(obj);
window.modalRegisterWindow.modal('hide');
}
});
@@ -205,9 +203,6 @@ define("redback",["jquery","utils","jquery.validate","jquery.json","knockout",
},
error: function(result) {
$.log("validateKey#error");
- var obj = jQuery.parseJSON(result.responseText);
- $.log("validateKey#error response:"+obj);
- displayRedbackError(obj);
}
})
}
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js
index dca92888c..dcaa3956f 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js
@@ -113,10 +113,6 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
} else {
displayErrorMessage("user cannot created");
}
- },
- error: function(result) {
- var obj = jQuery.parseJSON(result.responseText);
- displayRedbackError(obj);
}
});
};
@@ -149,10 +145,6 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
} else {
displayErrorMessage("admin user not created");
}
- },
- error: function(result) {
- var obj = jQuery.parseJSON(result.responseText);
- displayRedbackError(obj);
}
});
};
@@ -177,10 +169,6 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
} else {
displayErrorMessage("user cannot be updated");
}
- },
- error: function(result) {
- var obj = jQuery.parseJSON(result.responseText);
- displayRedbackError(obj);
}
});
}
@@ -213,10 +201,6 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
dataType: 'json',
success: function(result) {
displaySuccessMessage($.i18n.prop("user.roles.updated",curUser.username()));
- },
- error: function(result) {
- var obj = jQuery.parseJSON(result.responseText);
- displayRedbackError(obj);
}
});
}
@@ -230,10 +214,6 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
success: function(result) {
displaySuccessMessage($.i18n.prop("user.locked",curUser.username()));
curUser.modified(false);
- },
- error: function(result) {
- var obj = jQuery.parseJSON(result.responseText);
- displayRedbackError(obj);
}
});
}
@@ -247,10 +227,6 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
success: function(result) {
displaySuccessMessage($.i18n.prop("user.unlocked",curUser.username()));
curUser.modified(false);
- },
- error: function(result) {
- var obj = jQuery.parseJSON(result.responseText);
- displayRedbackError(obj);
}
});
}
@@ -268,10 +244,6 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
success: function(result) {
displaySuccessMessage($.i18n.prop("user.passwordChangeRequired.updated",curUser.username(),value));
curUser.modified(false);
- },
- error: function(result) {
- var obj = jQuery.parseJSON(result.responseText);
- displayRedbackError(obj);
}
});
};
@@ -474,10 +446,6 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
displayErrorMessage("issue appended");
}
window.modalChangePasswordBox.modal('hide');
- },
- error: function(result) {
- var obj = jQuery.parseJSON(result.responseText);
- displayRedbackError(obj,"modal-password-change-content");
}
});
@@ -520,11 +488,6 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
success: function(result) {
clearUserMessages();
displayInfoMessage($.i18n.prop("password.reset.success"));
- },
- error: function(result) {
- clearUserMessages();
- var obj = jQuery.parseJSON(result.responseText);
- displayRedbackError(obj);
}
});
}
@@ -748,11 +711,6 @@ define("redback.user",["jquery","utils","i18n","jquery.validate","knockout","kno
displayErrorMessage("issue appended");
}
window.modalChangePasswordBox.modal('hide');
- },
- error: function(result) {
- var obj = jQuery.parseJSON(result.responseText);
- displayRedbackError(obj);
- logout(false);
}
});
diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js
index e4778b386..1c2001680 100644
--- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js
+++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js
@@ -108,10 +108,6 @@ define("redback.users",["jquery","utils","i18n","jquery.validate","knockout","kn
displaySuccessMessage( $.i18n.prop("user.deleted", currentUser.username()));
self.users.remove(currentUser);
},
- error: function(result) {
- var obj = jQuery.parseJSON(result.responseText);
- displayRedbackError(obj);
- },
complete: function() {
closeDialogConfirm();
}