Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
bfbbcf0c
Commit
bfbbcf0c
authored
Oct 03, 2015
by
d11e9
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
listen to <enter> key on rename
parent
a939f78b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
index.html
index.html
+7
-3
No files found.
index.html
View file @
bfbbcf0c
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment