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
374305df
Commit
374305df
authored
Oct 04, 2015
by
d11e9
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix rename and new file bug
parent
dc1b100c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
index.html
index.html
+5
-5
No files found.
index.html
View file @
374305df
...
...
@@ -113,10 +113,10 @@ THE SOFTWARE.
var
$filesEl
=
$
(
'#files'
);
$filesEl
.
on
(
'click'
,
'.newFile'
,
function
()
{
var
files
=
getFiles
(
)
while
(
typeof
files
[
SOL_CACHE_UNTITLED
+
untitledCount
]
!==
'undefined'
)
untitledCount
++
;
while
(
window
.
localStorage
[
SOL_CACHE_UNTITLED
+
untitledCount
]
)
untitledCount
++
;
SOL_CACHE_FILE
=
SOL_CACHE_UNTITLED
+
untitledCount
;
window
.
localStorage
[
fileKey
(
SOL_CACHE_FILE
)
]
=
''
;
window
.
localStorage
[
SOL_CACHE_FILE
]
=
''
;
updateFiles
();
})
...
...
@@ -142,9 +142,9 @@ THE SOFTWARE.
$fileNameInputEl
.
off
(
'keyup'
);
if
(
newName
!==
originalName
&&
confirm
(
"Are you sure you want to rename: "
+
originalName
+
" to "
+
newName
+
'?'
))
{
var
content
=
window
.
localStorage
.
remove
Item
(
fileKey
(
originalName
)
);
var
content
=
window
.
localStorage
.
get
Item
(
fileKey
(
originalName
)
);
window
.
localStorage
[
fileKey
(
newName
)]
=
content
;
window
.
localStorage
.
removeItem
(
fileKey
(
originalName
)
);
window
.
localStorage
.
removeItem
(
fileKey
(
originalName
)
);
SOL_CACHE_FILE
=
fileKey
(
newName
);
}
...
...
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