armadillo.File.prototype.move = function(dest) {
var file = this;
var callback = function(data, status, xhr) {
- if (data['error']) {
- app.showError(data['message']);
- } else {
- app.clearError();
- app.list(app.stripLastPathComponent(dest));
- }
+ app.clearError(true);
+ app.list(app.stripLastPathComponent(dest));
};
app.sendRequest('move', {'source':this.getFullPath(), 'target':dest}, callback);
};
*/
armadillo.App.prototype.list = function(path) {
var callback = function(data, status, xhr) {
- if (data['error']) {
- app.showError(data['message']);
- return; // Error.
- } else {
- app.clearError(true);
- }
+ app.clearError(true);
// Update the listing.
$('#pwd').text(path);
if (name != null && name != '') {
var path = this.joinPath(this.getCurrentPath(), name);
this.sendRequest('mkdir', {'path':path}, function(data, status, xhr) {
- if (data['error']) {
- app.showError(data['message']);
- } else {
- app.clearError();
- app.list(app.getCurrentPath());
- }
+ app.clearError(true);
+ app.list(app.getCurrentPath());
});
}
};
armadillo.PathControl.prototype.fetchMenuContents_ = function(path, name, menu) {
var fullPath = this.path_;
var callback = function(data, status, xhr) {
- if (data['error']) {
- app.showError(data['message']);
- return;
- }
-
// Create an empty node for the current directory.
data.unshift('/');
armadillo.TVRenamer.prototype.run = function() {
var file = this.file_;
var callback = function(data, stauts, xhr) {
- if (data['error']) {
- app.showError(data['message']);
- } else {
- app.clearError();
- file.move(data['path']);
- }
+ app.clearError(true);
+ file.move(data['path']);
};
app.sendRequest('tv_rename', {'path':this.file_.getFullPath()},
callback);