Add epoch time to serialization and relax address validation (#4)

- address validation is breaking in Ubuntu Firefox. disabled until future fix
This commit is contained in:
Andy Freer 2016-11-27 20:17:53 +00:00 committed by snogcel
parent 119b8f9dfc
commit 183f6dea19
2 changed files with 6386 additions and 6343 deletions

File diff suppressed because it is too large Load diff

View file

@ -18,6 +18,8 @@
$(document).ready(function() { $(document).ready(function() {
$("#time").val(Math.floor((new Date).getTime() / 1000));
var opts = { dateFormat: $.datepicker.ISO_8601 }; var opts = { dateFormat: $.datepicker.ISO_8601 };
$('#start_epoch').datepicker(opts, 'getdate'); $('#start_epoch').datepicker(opts, 'getdate');
@ -48,7 +50,7 @@
$('#feeTxid').on('input', function() { $('#feeTxid').on('input', function() {
if ($(this).val().length > 0) { if ($(this).val().length > 0) {
var submitCommand = "gobject submit " + $('#parentHash').val() + " " + $('#revision').val() + " " + $('#time').val() + " " + proposal.gov.serialize() + " " + $(this).val(); var submitCommand = "gobject submit " + $('#parentHash').val() + " " + $('#revision').val() + " " + $('#time').val() + " " + proposal.gov.serialize() + " " + $(this).val();
console.log(submitCommand);
$('textarea#submitProposal').val(submitCommand); $('textarea#submitProposal').val(submitCommand);
$('.walletCommands#walletCommandsSubmit').removeClass('hidden'); $('.walletCommands#walletCommandsSubmit').removeClass('hidden');
} else { } else {
@ -145,8 +147,9 @@
ProposalGenerator.prototype.walletCommands = function() { ProposalGenerator.prototype.walletCommands = function() {
var gov = this.gov; var gov = this.gov;
var propCommand = "gobject prepare "+$('#parentHash').val() + " " + $('#revision').val() +" " + $('#time').val() +" " + gov.serialize(); var prepCommand = "gobject prepare "+$('#parentHash').val() + " " + $('#revision').val() +" " + $('#time').val() +" " + gov.serialize();
$("textarea#prepareProposal").val(propCommand); console.log(prepCommand);
$("textarea#prepareProposal").val(prepCommand);
if(this._mode == 'proposal') { if(this._mode == 'proposal') {
setFormEditable(true); setFormEditable(true);