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
4e19a755
Commit
4e19a755
authored
Oct 08, 2015
by
d11e9
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename button but have title and warning prompt
parent
5a4ef6ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
26 deletions
+31
-26
index.html
index.html
+27
-23
browser-solidity.css
stylesheets/browser-solidity.css
+4
-3
No files found.
index.html
View file @
4e19a755
...
@@ -66,13 +66,14 @@ THE SOFTWARE.
...
@@ -66,13 +66,14 @@ THE SOFTWARE.
<div
class=
"info"
>
<div
class=
"info"
>
<p>
<p>
Version:
<span
id=
"version"
>
(loading)
</span><br/>
Version:
<span
id=
"version"
>
(loading)
</span><br/>
Change to:
<select
id=
"versionSelector"
></select>
<button
id=
"gist"
title=
"Publish all files as public gist on github.com"
>
Publish all files as public gist
</button><br/>
Change to:
<select
id=
"versionSelector"
></select>
<code>
tx.origin =
<span
id=
"txorigin"
/></code>
</p>
</p>
</div>
</div>
<div
id=
"optimizeBox"
>
<div
id=
"optimizeBox"
>
<label
for=
"editorWrap"
><input
id=
"editorWrap"
type=
"checkbox"
>
Text Wrap
</label>
<label
for=
"editorWrap"
><input
id=
"editorWrap"
type=
"checkbox"
>
Text Wrap
</label>
<label
for=
"optimize"
><input
id=
"optimize"
type=
"checkbox"
>
Enable Optimization
</label>
<label
for=
"optimize"
><input
id=
"optimize"
type=
"checkbox"
>
Enable Optimization
</label>
<button
id=
"gist"
title=
"Publish all files as public gist on github.com"
>
Publish gist
</button>
<code
class=
"origin"
>
tx.origin:
<span
id=
"txorigin"
/></code>
<span
id=
"executionContext"
>
<span
id=
"executionContext"
>
<label
for=
"vm"
title=
"Execution environment does not connect to any node, everything is local and in memory only."
>
<label
for=
"vm"
title=
"Execution environment does not connect to any node, everything is local and in memory only."
>
<input
id=
"vm"
type=
"radio"
value=
"vm"
checked
name=
"executionContext"
>
<input
id=
"vm"
type=
"radio"
value=
"vm"
checked
name=
"executionContext"
>
...
@@ -144,29 +145,32 @@ THE SOFTWARE.
...
@@ -144,29 +145,32 @@ THE SOFTWARE.
// ------------------ gist publish --------------
// ------------------ gist publish --------------
$
(
'#gist'
).
click
(
function
(){
$
(
'#gist'
).
click
(
function
(){
if
(
confirm
(
"Are you sure you want to publish all your files anonymously as a public gist on github.com"
))
{
//Get Github Authorization Token with proper scope, print to console
var
description
=
"Ethereum Contracts Gist created using soleditor at: https://chriseth.github.io/browser-solidity"
;
var
files
=
{};
//Create a Gist with token from above
var
filesArr
=
getFiles
();
var
files
=
{};
var
description
=
"Ethereum Contracts Gist created using soleditor at: https://chriseth.github.io/browser-solidity"
;
var
filesArr
=
getFiles
();
for
(
var
f
in
filesArr
)
{
files
[
fileNameFromKey
(
filesArr
[
f
])]
=
{
content
:
localStorage
[
filesArr
[
f
]]
}
}
for
(
var
f
in
filesArr
)
{
var
data
=
JSON
.
stringify
({
files
[
fileNameFromKey
(
filesArr
[
f
])]
=
{
description
:
description
,
content
:
localStorage
[
filesArr
[
f
]]
public
:
true
,
};
files
:
files
});
$
.
ajax
({
url
:
'https://api.github.com/gists'
,
type
:
'POST'
,
data
:
data
}).
done
(
function
(
response
)
{
if
(
response
.
html_url
&&
confirm
(
"Created a gist at "
+
response
.
html_url
+
" Would you like to open it in a new window?"
))
{
window
.
open
(
response
.
html_url
,
'_blank'
);
}
}
});
$
.
ajax
({
url
:
'https://api.github.com/gists'
,
type
:
'POST'
,
data
:
JSON
.
stringify
({
description
:
description
,
public
:
true
,
files
:
files
})
}).
done
(
function
(
response
)
{
if
(
response
.
html_url
&&
confirm
(
"Created a gist at "
+
response
.
html_url
+
" Would you like to open it in a new window?"
))
{
window
.
open
(
response
.
html_url
,
'_blank'
);
}
});
}
})
})
...
...
stylesheets/browser-solidity.css
View file @
4e19a755
...
@@ -120,15 +120,16 @@ body {
...
@@ -120,15 +120,16 @@ body {
}
}
#header
#solIcon
{
#header
#solIcon
{
float
:
lef
t
;
float
:
righ
t
;
height
:
5em
;
height
:
5em
;
}
}
#header
.origin
,
#header
#executionContext
{
#header
#executionContext
{
padding
:
0.4em
1em
;
padding
:
0.4em
1em
;
background-color
:
#efefef
;
background-color
:
#efefef
;
display
:
inline-
block
;
display
:
block
;
margin-
left
:
1
em
;
margin-
top
:
0.5
em
;
}
}
.col1
{
.col1
{
...
...
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