mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
[lib/dirent] improved 'rename'
This commit is contained in:
@@ -15,9 +15,17 @@ define([
|
||||
this.dir = options.dir;
|
||||
|
||||
this.render();
|
||||
this.$el.modal({appendTo:'#main'});
|
||||
this.$el.modal({appendTo:'#main', focus: false});
|
||||
$('#simplemodal-container').css({'width':'auto', 'height':'auto'});
|
||||
|
||||
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].setSelectionRange(0, dot_index);
|
||||
} else {
|
||||
$input.select();
|
||||
}
|
||||
|
||||
this.$error = this.$('.error');
|
||||
this.$form = this.$('form');
|
||||
},
|
||||
|
Reference in New Issue
Block a user