1
0
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:
llj
2018-02-05 16:47:56 +08:00
parent 2d98cc405d
commit 88478dee1d
159 changed files with 591 additions and 21432 deletions

View File

@@ -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.");
}