Merge pull request #13 from hunterlester/development

UI Adjustments
This commit is contained in:
snogcel 2016-12-07 20:09:48 -07:00 committed by GitHub
commit 4b4c5dd273
4 changed files with 265 additions and 165 deletions

View file

@ -1,5 +1,6 @@
body {
background-image: url("../images/background.png");
font-family: 'Roboto', sans-serif;
}
textarea {
@ -26,8 +27,16 @@ i.fa {
font-weight: 600;
}
.input-spacing {
margin: 5%;
}
.progress {
margin-top: 2%;
}
.proposalBlock {
margin-top: 6%;
/*margin-top: 6%;*/
padding: 7%;
background-color: #ffffff;
box-shadow: 0px 17px 24px 0px rgba(0, 0, 0, 0.16);
@ -68,6 +77,36 @@ i.fa {
width: 20%;
}
#side-header {
margin-top: 40%;
}
#side_header_description {
margin: 20% 0% 20% 0%;
}
#proposal_link {
font-weight: 600;
}
@media (max-width: 992px) {
#side-header {
margin-top: 4%;
}
.proposalBlock {
margin-top: 0%;
}
.header_description {
margin: 1% 0% 1% 0%;
}
#side_header_description {
margin: 1% 0% 1% 0%;
}
}
#walletCommandsHeader {
margin-top:2em;
}

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -2,8 +2,12 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dash Governance Tools</title>
<link rel='shortcut icon' type='image/x-icon' href='favicon.ico' />
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script src="bitcore-lib-dash.js"></script>
<script src="vendor/jquery/jquery-3.1.1.min.js"></script>
@ -19,7 +23,6 @@
<link rel="stylesheet" href="css/master.css">
<script src="js/proposalGenerator.js"></script>
<script src="js/paymentCycle.js"></script>
<script src="js/txListener.js"></script>
<script src="js/transactionListener.js"></script>
<script src="js/formHandler.js"></script>
@ -76,9 +79,14 @@
var validProposal = proposal.validate();
if (validProposal) {
document.getElementById('step_two').click();
document.getElementsByClassName('progress-bar')[0].style.width = "50%";
document.getElementsByClassName('progress-bar')[0].innerText = "Generated wallet commands";
proposal.walletCommands();
transactionListener(proposal);
$('#btnEdit').click(function() {
proposal.createProposal();
});
@ -104,9 +112,7 @@
txListener.initSocket();
}
});
});
});
</script>
@ -115,23 +121,58 @@
<div class="container-fluid">
<div class="row" id="header">
<div class="col-sm-2">
<div class="col-md-2">
<img src="images/dash_logo.png" alt="dash governance tools">
</div>
<div class="col-sm-4">
<h2 class="header_title">Dash Budget Proposal Generator</h2>
<h5 class="header_description">Generate budget proposal commands you can copy/paste into your Dash wallet to prepare a budget proposal and submit it to the network.</h5>
<div class="col-md-4">
</div>
<div class="col-sm-4 col-sm-offset-2 text-right">
<!-- -->
<!-- -->
<!-- Social icons commented out until we get URIs -->
<!-- -->
<!-- <div class="col-md-4 col-md-offset-2 text-right">
<i class="fa fa-twitter" aria-hidden="true"></i>
<i class="fa fa-facebook" aria-hidden="true"></i>
<i class="fa fa-rss" aria-hidden="true"></i>
<img id="lang_box" src="images/lang.png" alt="english language">
</div> -->
</div>
<div class="row">
<div class="col-xs-12">
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="25"
aria-valuemin="0" aria-valuemax="100" style="width:25%">
Create proposal
</div>
</div>
<ul class="nav nav-pills">
<li class="active"><a id="step_one" data-toggle="tab" href="#step1">Form</a></li>
<li><a id="step_two" data-toggle="tab" href="#step2">Commands</a></li>
<li><a id="step_three" data-toggle="tab" href="#step3">Progress</a></li>
<li><a id="step_four" data-toggle="tab" href="#step4">Complete</a></li>
</ul>
</div>
</div>
<div class="row">
<div class="col-sm-5 col-sm-offset-2 col-xs-12 col-xs-offset-0">
<div class="col-lg-2 col-md-2 col-md-push-8">
<div class="row" id="side-header">
<div class="col-xs-12">
<div >
<h3 class="header_title">Dash Budget Proposal</h3>
<p id="side_header_description" class="header_description">Generate budget proposal commands you can copy/paste into your Dash wallet to prepare a budget proposal and submit it to the network.</p>
<a href="#"><h5 id="proposal_link">Proposal Generator</h5></a>
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-md-offset-2 col-md-pull-2 col-sm-12 col-sm-offset-0 col-xs-12 col-xs-offset-0">
<div class="tab-content">
<div id="step1" class="tab-pane fade in active">
<div class="proposalBlock createProposal">
<div class="row">
<div class="col-xs-12">
@ -171,7 +212,7 @@
<!-- -->
<!-- The following form group is a placeholder for proposal end time. Please change to the correct id. -->
<div class="form-group">
<label for="start_epoch">End Date:</label>
<label for="start_epoch">Number of Payments:</label>
<select name="start_epoch" class="form-control" id="end_epoch"></select>
</div>
<!-- -->
@ -193,10 +234,14 @@
<input type="text" class="form-control" id="payment_amount" value="" placeholder="0">
</div>
</div>
<div class="col-xs-4 col-xs-offset-1">
<div type="submit" class="btn btn-success" id="btnPrepare">Create Proposal</div>
<div type="submit" class="btn btn-primary hidden" id="btnEdit">Edit Proposal</div>
<div type="submit" class="btn btn-primary hidden" id="btnNew">New Proposal</div>
<div class="col-xs-4">
<input type="submit" class="btn btn-success" id="btnPrepare" value="Create Proposal">
<div class="input-spacing">
<input type="submit" class="btn btn-primary hidden" id="btnEdit" value="Edit Proposal">
</div>
<div class="input-spacing">
<input type="submit" class="btn btn-primary hidden" id="btnNew" value="New Proposal">
</div>
</div>
</div>
@ -234,8 +279,8 @@
</div>
</div>
</div>
</div>
<div id="step2" class="tab-pane fade">
<div class="row walletCommands hidden" id="walletCommandsHeader">
<div class="col-xs-12">
<h2>Wallet Commands</h2>
@ -257,7 +302,7 @@
</div>
<div class="row walletCommands" id="walletCommandsTx">
<div class="row walletCommands hidden" id="walletCommandsTx">
<div class="col-xs-12">
@ -271,7 +316,10 @@
</div>
<div class="row walletCommands" id="walletCommandsProgress">
</div>
<div id="step3" class="tab-pane fade">
<div class="row walletCommands hidden" id="walletCommandsProgress">
<div class="col-xs-12">
@ -284,7 +332,8 @@
</div>
</div>
</div>
<div id="step4" class="tab-pane fade">
<div class="row walletCommands hidden" id="walletCommandsSubmit">
<div class="col-xs-12">
@ -298,8 +347,11 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -31,6 +31,11 @@ function transactionListener(proposal) {
$.getJSON(provider + 'insight-api-dash/tx/' + txidfield.val(), function(data) {
txidfield.attr("disabled", true);
$('.walletCommands#walletCommandsProgress').removeClass('hidden');
document.getElementById('step_three').click();
document.getElementsByClassName('progress-bar')[0].style.width = "75%";
document.getElementsByClassName('progress-bar')[0].innerText = "Awaiting network confirmations...";
var txid = data.tx;
var confirmations = data.confirmations;
var conftxt;
@ -129,6 +134,10 @@ function transactionListener(proposal) {
progbarval = 100;
$("#progresstxt").text("Your transaction has " + confirmations + " confirmations. You can now submit the proposal.");
$('.walletCommands#walletCommandsSubmit').removeClass('hidden');
document.getElementById('step_four').click();
document.getElementsByClassName('progress-bar')[0].style.width = "100%";
document.getElementsByClassName('progress-bar')[0].innerText = "Success";
}
$("#progressbar").progressbar({value: progbarval})
.children('.ui-progressbar-value')