remove textbox after pressing "enter" even if the name is the same
This commit is contained in:
parent
39735721ec
commit
92b37119e3
|
@ -157,7 +157,7 @@ var FileList={
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
tr.attr('data-file', newname);
|
tr.attr('data-file', newname);
|
||||||
var path = td.children('a.name').attr('href');
|
var path = td.children('a.name').attr('href');
|
||||||
td.children('a.name').attr('href', path.replace(encodeURIComponent(name), encodeURIComponent(newname)));
|
td.children('a.name').attr('href', path.replace(encodeURIComponent(name), encodeURIComponent(newname)));
|
||||||
|
@ -173,7 +173,6 @@ var FileList={
|
||||||
if (newname.indexOf('.') > 0 && tr.data('type') != 'dir') {
|
if (newname.indexOf('.') > 0 && tr.data('type') != 'dir') {
|
||||||
span.append($('<span class="extension">'+newname.substr(newname.lastIndexOf('.'))+'</span>'));
|
span.append($('<span class="extension">'+newname.substr(newname.lastIndexOf('.'))+'</span>'));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
input.click(function(event){
|
input.click(function(event){
|
||||||
|
|
Loading…
Reference in New Issue