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
31385a6d
Commit
31385a6d
authored
Aug 14, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move callback fn in publishToGist to the top
parent
9af4379d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
file-panel.js
src/app/panels/file-panel.js
+11
-11
No files found.
src/app/panels/file-panel.js
View file @
31385a6d
...
...
@@ -281,6 +281,17 @@ function filepanel (appAPI, filesProvider) {
// ------------------ gist publish --------------
function
publishToGist
()
{
function
cb
(
data
)
{
if
(
data
instanceof
Error
)
{
console
.
log
(
'fail'
,
data
.
message
)
modalDialogCustom
.
alert
(
'Failed to create gist: '
+
(
data
||
'Unknown transport error'
))
}
else
{
data
=
JSON
.
parse
(
data
)
if
(
data
.
html_url
&&
confirm
(
'Created a gist at '
+
data
.
html_url
+
' Would you like to open it in a new window?'
))
{
window
.
open
(
data
.
html_url
,
'_blank'
)
}
}
}
if
(
confirm
(
'Are you sure you want to publish all your files anonymously as a public gist on github.com?'
))
{
appAPI
.
packageFiles
((
error
,
packaged
)
=>
{
if
(
error
)
{
...
...
@@ -297,17 +308,6 @@ function filepanel (appAPI, filesProvider) {
files
:
packaged
})
},
cb
)
function
cb
(
data
)
{
if
(
data
instanceof
Error
)
{
console
.
log
(
'fail'
,
data
.
message
)
modalDialogCustom
.
alert
(
'Failed to create gist: '
+
(
data
||
'Unknown transport error'
))
}
else
{
data
=
JSON
.
parse
(
data
)
if
(
data
.
html_url
&&
confirm
(
'Created a gist at '
+
data
.
html_url
+
' Would you like to open it in a new window?'
))
{
window
.
open
(
data
.
html_url
,
'_blank'
)
}
}
}
}
})
}
...
...
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