mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-25 06:33:48 +00:00
[upgrade jquery] modifications, & cleaned up code & files
This commit is contained in:
@@ -24,10 +24,10 @@ define([
|
||||
var $input = this.$('[name="newname"]');
|
||||
var dot_index = this.dirent.get('obj_name').lastIndexOf('.');
|
||||
if (!this.dirent.get('is_dir') && dot_index != -1) {
|
||||
$input[0].focus();
|
||||
$input.trigger('focus');
|
||||
$input[0].setSelectionRange(0, dot_index);
|
||||
} else {
|
||||
$input.select();
|
||||
$input.trigger('select');
|
||||
}
|
||||
|
||||
this.$error = this.$('.error');
|
||||
@@ -91,7 +91,7 @@ define([
|
||||
error: function(xhr, textStatus, errorThrown) {
|
||||
var err;
|
||||
if (xhr.responseText) {
|
||||
err = $.parseJSON(xhr.responseText).error;
|
||||
err = JSON.parse(xhr.responseText).error;
|
||||
} else {
|
||||
err = gettext("Failed. Please check the network.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user