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
4698cc12
Commit
4698cc12
authored
Oct 04, 2015
by
d11e9
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix removal bug and focus editor on tab change
parent
374305df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
index.html
index.html
+11
-5
No files found.
index.html
View file @
4698cc12
...
...
@@ -161,8 +161,8 @@ THE SOFTWARE.
var
index
=
getFiles
().
indexOf
(
fileKey
(
name
)
);
if
(
confirm
(
"Are you sure you want to remove: "
+
name
+
" from local storage?"
))
{
SOL_CACHE_FILE
=
getFiles
()[
Math
.
max
(
0
,
index
-
1
)];
window
.
localStorage
.
removeItem
(
fileKey
(
name
)
);
SOL_CACHE_FILE
=
getFiles
()[
Math
.
max
(
0
,
index
-
1
)];
updateFiles
();
}
return
false
;
...
...
@@ -187,10 +187,16 @@ THE SOFTWARE.
for
(
var
f
in
files
)
{
$filesEl
.
append
(
fileTabTemplate
(
files
[
f
]));
}
var
active
=
fileTabFromKey
(
SOL_CACHE_FILE
);
active
.
addClass
(
'active'
);
editor
.
setValue
(
window
.
localStorage
[
SOL_CACHE_FILE
]
||
''
,
-
1
);
$
(
'#input'
).
toggle
(
true
);
if
(
SOL_CACHE_FILE
)
{
var
active
=
fileTabFromKey
(
SOL_CACHE_FILE
);
active
.
addClass
(
'active'
);
editor
.
setValue
(
window
.
localStorage
[
SOL_CACHE_FILE
]
||
''
,
-
1
);
editor
.
focus
();
$
(
'#input'
).
toggle
(
true
);
}
else
{
$
(
'#input'
).
toggle
(
false
);
}
}
function
fileTabTemplate
(
key
)
{
...
...
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