various adjustments

This commit is contained in:
snogcel 2016-12-19 21:24:24 -07:00
parent 3d255b6d72
commit f4aaa06663
2 changed files with 13 additions and 8 deletions

View file

@ -240,10 +240,10 @@
</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>
<li class="active"><a id="step_one" data-toggle="tab" href="#step1">Create a Proposal</a></li>
<li><a id="step_two" data-toggle="tab" href="#step2">Wallet Commands</a></li>
<li><a id="step_three" data-toggle="tab" href="#step3">Confirm Transaction</a></li>
<li><a id="step_four" data-toggle="tab" href="#step4">Submit Proposal</a></li>
</ul>
</div>
</div>
@ -292,7 +292,7 @@
<div class="row">
<div class="col-xs-3">
<div class="form-group">
<label for="start_epoch">First Payment:</label>
<label for="start_epoch">Voting Deadline:</label>
<select name="start_epoch" class="form-control" id="start_epoch"></select>
</div>
</div>

View file

@ -15,8 +15,8 @@ function PaymentCycle(gov, provider) {
this.selectedStartIndex = 0;
this.selectedPeriods = 1;
if (this.network == 'testnet') this.paymentCycle = 24;
if (this.network == 'testnet') this.budgetCycles = 96;
if (this.network == 'testnet') this.paymentCycle = 23;
if (this.network == 'testnet') this.budgetCycles = 99;
this.blockHeight = null;
@ -25,6 +25,8 @@ function PaymentCycle(gov, provider) {
this.Messages = {
paymentCycle: {
payment: "Payment",
payments: "Payments",
months: "Months",
month: "Month",
days: "Days",
@ -157,15 +159,18 @@ PaymentCycle.prototype.updateEndEpoch = function() {
end_epoch.find('option').remove();
var i = 1;
var payments = self.Messages.paymentCycle.payment;
$.each(this.endDate, function(index) {
if(index >= self.selectedStartIndex) {
if (i > 1) payments = self.Messages.paymentCycle.payments;
var eta = self.getTimeDifference(opts, self.startDate[self.selectedStartIndex].timestamp, this.timestamp);
var time = this.timestamp - self.startDate[self.selectedStartIndex].timestamp;
var option = $("<option />").val((Math.floor(this.after / 1000))).text((i)+" Payment").attr('data-index', index).attr('data-label', this.label).attr('data-time', time).attr('data-eta', eta).attr('data-block', this.superblock);
var option = $("<option />").val((Math.floor(this.after / 1000))).text((i+" "+payments)).attr('data-index', index).attr('data-label', this.label).attr('data-time', time).attr('data-eta', eta).attr('data-block', this.superblock);
end_epoch.append(option);
i++;