|
|
|
@ -128,9 +128,12 @@ THE SOFTWARE. |
|
|
|
|
var $fileNameInputEl = $('<input value="'+originalName+'"/>'); |
|
|
|
|
$fileTabEl.html( $fileNameInputEl ) |
|
|
|
|
$fileNameInputEl.focus() |
|
|
|
|
$fileNameInputEl.on( 'blur', handleRename ) |
|
|
|
|
$fileNameInputEl.keyup( handleRename ); |
|
|
|
|
|
|
|
|
|
$fileNameInputEl.on( 'blur', function(ev){ |
|
|
|
|
function handleRename (ev) { |
|
|
|
|
ev.preventDefault() |
|
|
|
|
if (ev.which && ev.which !== 13) return false; |
|
|
|
|
var newName = ev.target.value; |
|
|
|
|
var $new = null |
|
|
|
|
if ( newName !== originalName && confirm( "Are you sure you want to rename: " + originalName + " to " + newName + '?' )) { |
|
|
|
@ -144,7 +147,8 @@ THE SOFTWARE. |
|
|
|
|
|
|
|
|
|
updateFiles() |
|
|
|
|
return false; |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
@ -161,7 +165,7 @@ THE SOFTWARE. |
|
|
|
|
updateFiles() |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
function showFileHandler (ev) { |
|
|
|
|
ev.preventDefault() |
|
|
|
|