Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
Votacion
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blockchain
Votacion
Commits
5f6c7ba4
Commit
5f6c7ba4
authored
5 years ago
by
Otto Zaiser
Browse files
Options
Downloads
Patches
Plain Diff
Testeando
parent
1549db69
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web/dist/js/vendor/ballot.js
+6
-5
6 additions, 5 deletions
web/dist/js/vendor/ballot.js
web/dist/nueva/index.html
+1
-1
1 addition, 1 deletion
web/dist/nueva/index.html
with
7 additions
and
6 deletions
web/dist/js/vendor/ballot.js
+
6
−
5
View file @
5f6c7ba4
...
...
@@ -103,7 +103,7 @@ async function page_loaded() {
error
=
'
El plugin no puede detectar directamente desde un archivo. El documento necesita estar en un servidor.
'
;
else
{
// Non-dapp browsers...
//
window.
alert("Non-Ethereum browser detected. Consider using MetaMask.");
//alert
ar
("Non-Ethereum browser detected. Consider using MetaMask.");
error
=
'
No se detectó un browser Ethereum. Por favor, <a href="https://metamask.io/" target="_blank">instalá MetaMask</a>.
'
;
}
if
(
error
)
{
...
...
@@ -220,11 +220,11 @@ function api_version() {
function
setup_existing_contract
(
abi
,
addr
)
{
if
(
api_version
()
==
0
)
{
var
MyContract
=
window
.
web3
.
eth
.
contract
(
abiNew
);
console
.
log
(
MyContract
);
console
.
log
(
"
Mi contrato:
"
,
MyContract
);
contract
=
MyContract
.
at
(
mainaddr
[
netid
]);
return
contract
;
}
window
.
alert
(
'
Do not know how to deal with contracts at this API version (
'
+
window
.
web3
.
version
.
api
+
'
).
'
);
alert
ar
(
'
Do not know how to deal with contracts at this API version (
'
+
window
.
web3
.
version
.
api
+
'
).
'
);
return
;
}
...
...
@@ -235,7 +235,7 @@ function setup_existing_instance(abi, addr) {
contract
=
MyContract
.
at
(
addr
);
return
contract
;
}
window
.
alert
(
'
Do not know how to deal with contracts at this API version (
'
+
window
.
web3
.
version
.
api
+
'
).
'
);
alert
ar
(
'
Do not know how to deal with contracts at this API version (
'
+
window
.
web3
.
version
.
api
+
'
).
'
);
return
;
}
...
...
@@ -418,6 +418,7 @@ async function nueva_votacion(arguments, proposals, voters) {
alertarLoading
(
'
Creando un nuevo contrato de votación.
'
);
var
contract
=
setup_existing_contract
(
abiNew
,
mainaddr
[
netid
]);
console
.
log
(
"
Contrato:
"
,
contract
);
if
(
!
contract
)
return
;
...
...
@@ -745,7 +746,7 @@ function access_accounts() {
// Acccounts now exposed, or the error gets caught
accExposed
=
1
;
}
catch
(
error
)
{
//
window.
alert(
// alert
ar
(
// "Access to your ethereum account was denied. The reason " +
// "given with was \"" +
// error +
...
...
This diff is collapsed.
Click to expand it.
web/dist/nueva/index.html
+
1
−
1
View file @
5f6c7ba4
...
...
@@ -41,7 +41,7 @@
<div
class=
"row"
>
<div
class=
"form-group form-group-lg col-sm-12"
>
<label
for=
"_title"
class=
"form-required"
>
Título de la votación
</label>
<input
class=
"form-control"
type=
"text"
id=
"_title"
name=
"_title"
value=
""
size=
"40"
<input
class=
"form-control"
type=
"text"
id=
"_title"
name=
"_title"
value=
"
Quien es mejor
"
size=
"40"
required=
"required"
aria-required=
"true"
>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment