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
48ebe3f1
Commit
48ebe3f1
authored
Sep 01, 2016
by
chriseth
Committed by
GitHub
Sep 01, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #204 from ethereum/cleanup-udapp
Cleanup some bits of UDapp
parents
1b2a5689
6a92be25
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
32 deletions
+42
-32
browser-solidity.css
assets/css/browser-solidity.css
+0
-4
universal-dapp.css
assets/css/universal-dapp.css
+28
-19
universal-dapp.js
src/universal-dapp.js
+14
-9
No files found.
assets/css/browser-solidity.css
View file @
48ebe3f1
...
...
@@ -305,16 +305,12 @@ body {
content
:
"\25B6"
;
}
#output
.poweredBy
,
#output
.legend
{
display
:
none
;
}
#output
.udapp
{
border
:
0
none
;
box-shadow
:
none
;
border-bottom
:
3px
solid
#F4F6FF
;
}
.crow
{
overflow
:
auto
;
display
:
block
;
...
...
assets/css/universal-dapp.css
View file @
48ebe3f1
.udapp
{
padding
:
1em
;
border
:
1px
dotted
#4D5686
;
position
:
relative
;
box-shadow
:
0
0
5px
rgba
(
0
,
0
,
0
,
0.3
);
box-shadow
:
0
0
5px
rgba
(
0
,
0
,
0
,
0.3
);
box-sizing
:
border-box
;
overflow
:
auto
;
}
...
...
@@ -25,7 +24,7 @@
width
:
100%
;
padding
:
0.6em
;
box-sizing
:
border-box
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0.3
);
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0.3
);
border-radius
:
3px
;
}
...
...
@@ -55,7 +54,7 @@
.udapp
.title
{
margin-bottom
:
0.4em
;
padding
:
0.2em
;
background-color
:
rgba
(
255
,
255
,
255
,
0.5
);
background-color
:
rgba
(
255
,
255
,
255
,
0.5
);
display
:
block
;
font-weight
:
bold
;
padding-right
:
2em
;
...
...
@@ -90,7 +89,10 @@
white-space
:
pre
;
}
.udapp
.result
{
position
:
relative
;
}
.udapp
.result
{
position
:
relative
;
}
.udapp
.output
.result
.returned
,
.udapp
.output
.result
.value
,
.udapp
.output
.result
.waiting
,
...
...
@@ -107,7 +109,9 @@
width
:
2.5em
;
}
.udapp
.output
.result
:last-child
{
margin
:
0
;
}
.udapp
.output
.result
:last-child
{
margin
:
0
;
}
.udapp
.output
:empty
{
display
:
none
;
...
...
@@ -162,13 +166,11 @@
content
:
"\25B6"
;
}
.udapp
.contractProperty
{
overflow
:
auto
;
margin-bottom
:
0.4em
;
}
.udapp
input
,
.udapp
button
{
width
:
33%
;
...
...
@@ -184,7 +186,10 @@
border-radius
:
3px
;
}
.udapp
input
{
border-left
:
0
none
;}
.udapp
input
{
border-left
:
0
none
;
}
.udapp
button
{
background-color
:
#666
;
color
:
#4C4B4B
;
...
...
@@ -269,9 +274,9 @@
white-space
:
pre
;
}
.udapp
.events
.event
.name
{
margin-right
:
0.5em
;
}
.udapp
.events
.event
.name
{
margin-right
:
0.5em
;
}
.udapp
.legend
{
font-size
:
12px
;
...
...
@@ -282,7 +287,9 @@
.udapp
.legend
div
{
display
:
inline-block
;
margin-right
:
0.5em
;
margin-bottom
:
1em
;
}
.udapp
.legend
div
:before
{
content
:
"."
;
color
:
transparent
;
...
...
@@ -293,12 +300,14 @@
width
:
1em
;
}
.udapp
.legend
.attach
:before
{
background-color
:
#62B762
;
}
.udapp
.legend
.transact
:before
{
background-color
:
#D42828
;
}
.udapp
.legend
.call
:before
{
background-color
:
#556DF3
;
}
.udapp
.legend
.attach
:before
{
background-color
:
#62B762
;
}
.udapp
.legend
.transact
:before
{
background-color
:
#D42828
;
}
.udapp
.poweredBy
{
float
:
right
;
color
:
#666
;
font-size
:
12px
;
.udapp
.legend
.call
:before
{
background-color
:
#556DF3
;
}
src/universal-dapp.js
View file @
48ebe3f1
...
...
@@ -135,6 +135,19 @@ UniversalDApp.prototype.getBalance = function (address, cb) {
UniversalDApp
.
prototype
.
render
=
function
()
{
var
self
=
this
;
// NOTE: don't display anything if there are no contracts to display
if
(
self
.
contracts
.
length
===
0
)
{
return
self
.
$el
;
}
var
$legend
=
$
(
'<div class="legend" />'
)
.
append
(
$
(
'<div class="attach"/>'
).
text
(
'Attach'
))
.
append
(
$
(
'<div class="transact"/>'
).
text
(
'Transact'
))
.
append
(
$
(
'<div class="call"/>'
).
text
(
'Call'
));
self
.
$el
.
append
(
$legend
);
// NOTE: this might be used in the future
if
(
self
.
contracts
.
length
===
0
)
{
self
.
$el
.
append
(
self
.
getABIInputForm
());
}
else
{
...
...
@@ -153,15 +166,7 @@ UniversalDApp.prototype.render = function () {
self
.
$el
.
append
(
self
.
renderOutputModifier
(
self
.
contracts
[
c
].
name
,
$contractEl
));
}
}
var
$legend
=
$
(
'<div class="legend" />'
)
.
append
(
$
(
'<div class="attach"/>'
).
text
(
'Attach'
))
.
append
(
$
(
'<div class="transact"/>'
).
text
(
'Transact'
))
.
append
(
$
(
'<div class="call"/>'
).
text
(
'Call'
));
self
.
$el
.
append
(
$
(
'<div class="poweredBy" />'
)
.
html
(
'<a href="http://github.com/d11e9/universal-dapp">Universal ÐApp</a> powered by The Blockchain'
));
self
.
$el
.
append
(
$legend
);
return
self
.
$el
;
};
...
...
@@ -179,7 +184,7 @@ UniversalDApp.prototype.getABIInputForm = function (cb) {
var
self
=
this
;
var
$el
=
$
(
'<div class="udapp-setup" />'
);
var
$jsonInput
=
$
(
'<textarea class="json" placeholder=
\'
[ { "name": name, "bytecode": bytecode, "interface": abi }, { ... } ]
\'
/>'
);
var
$createButton
=
$
(
'<button class="udapp-create"/>'
).
text
(
'
Create a Universal ÐApp
'
);
var
$createButton
=
$
(
'<button class="udapp-create"/>'
).
text
(
'
Render ABI
'
);
$createButton
.
click
(
function
(
ev
)
{
var
contracts
=
$
.
parseJSON
(
$jsonInput
.
val
());
if
(
cb
)
{
...
...
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