aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md28
-rw-r--r--index.html18
-rw-r--r--src/components/Navigation.vue33
-rw-r--r--src/components/Register.vue35
-rw-r--r--src/components/Sales.vue209
-rw-r--r--src/components/SignIn.vue2
-rw-r--r--src/main.js3
-rw-r--r--static/js/report.coffee148
-rw-r--r--static/js/report.js143
-rw-r--r--views/users/index.html7
10 files changed, 306 insertions, 320 deletions
diff --git a/README.md b/README.md
index bb5d3cf7..f8b86724 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,30 @@
-# The Bitcoin Co-op
+# CoinOS
-This website uses the Twitter Bootstrap library and the ExpressJS framework. If you want to contribute changes or updates, contact [email protected] to get started.
+CoinOS is a mobile-friendly point-of-sale app that merchants can use to accept Bitcoin payments.
+
+# Features
+
+* Setup a customized payment page with your company name and logo
+* Enter sale amounts in your local currency and have them converted to an amount in bitcoin using your chosen exchange rate
+* A QR code payment request is generated with your receiving address and the sale amount for your customers to scan
+* Get am on-screen notification when the requested amount is received at your address
+* Transactions and the exchange rate at the time of sale are recorded and can be viewed later and filtered by date range
+
+# Installation
+
+Install nodeJS (http://nodejs.org/) and redis (http://redis.io/). On Ubuntu that looks like:
+
+ sudo apt-get install nodejs redis-server
+
+Download and configure CoinOS:
+
+ git clone https://github.com/thebitcoincoop/coinos
+ cd coinos
+ npm install
+ bower install
+ npm start
+
+Now the app should be runnning at http://localhost:3001/
# License
diff --git a/index.html b/index.html
index 82e457a3..cc0ce247 100644
--- a/index.html
+++ b/index.html
@@ -20,24 +20,6 @@
</head>
<body>
<div class="container-fluid">
- <nav class="navbar" role="navigation">
- <button type="button" class="btn btn-primary navbar-toggle" data-toggle="collapse" data-target="#nav">
- <span class="pull-right glyphicon glyphicon-list"></span>
- <span id="connection" class="pull-right glyphicon glyphicon-exclamation-sign"></span>
- </button>
- <div id="nav" class="collapse navbar-collapse no-transition">
- <div class="navbar">
- <ul class="nav navbar-nav">
- <li><a href="/{{user}}"><span class="glyphicon glyphicon-home"></span> Home</a></li>
- <li><a href="/{{user}}/report"><span class="glyphicon glyphicon-list-alt"></span> Sales</a></li>
- <li><a href="/{{user}}/wallet"><span class="fa fa-bank"></span> Wallet</a></li>
- <li><a href="/{{user}}/profile"><span class="glyphicon glyphicon-user"></span> Account</a></li>
- <li><a href="/{{user}}/edit"><span class="glyphicon glyphicon-cog"></span> Settings</a></li>
- <li><a href="/logout"><span class="glyphicon glyphicon-off"></span> Logout</a></li>
- </ul>
- </div>
- </div>
- </nav>
<div class="row" id="app"></div>
</div>
</body>
diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue
new file mode 100644
index 00000000..d83d48b2
--- /dev/null
+++ b/src/components/Navigation.vue
@@ -0,0 +1,33 @@
+<template lang="pug">
+nav.navbar(role='navigation')
+ button.btn.btn-primary.navbar-toggle(type='button', data-toggle='collapse', data-target='#nav')
+ span.pull-right.glyphicon.glyphicon-list
+ span#connection.pull-right.glyphicon.glyphicon-exclamation-sign
+ #nav.collapse.navbar-collapse.no-transition
+ .navbar
+ ul.nav.navbar-nav
+ li
+ a(href='/{{user}}')
+ span.glyphicon.glyphicon-home
+ | Home
+ li
+ a(href='/{{user}}/report')
+ span.glyphicon.glyphicon-list-alt
+ | Sales
+ li
+ a(href='/{{user}}/wallet')
+ span.fa.fa-bank
+ | Wallet
+ li
+ a(href='/{{user}}/profile')
+ span.glyphicon.glyphicon-user
+ | Account
+ li
+ a(href='/{{user}}/edit')
+ span.glyphicon.glyphicon-cog
+ | Settings
+ li
+ a(href='/logout')
+ span.glyphicon.glyphicon-off
+ | Logout
+</template>
diff --git a/src/components/Register.vue b/src/components/Register.vue
new file mode 100644
index 00000000..3b04ccc3
--- /dev/null
+++ b/src/components/Register.vue
@@ -0,0 +1,35 @@
+<template lang="pug">
+#main-logo
+form#register(action='/users', method='post')
+ | {{#error}}
+ .alert.alert-danger {{error}}
+ | {{/error}}
+ .form-group
+ label(for='username') Username:
+ |
+ input#username.form-control(type='text', name='username')
+ .form-group
+ label(for='email') Email:
+ |
+ input#email.form-control(type='text', name='email')
+ .form-group
+ label(for='password') Passphrase:
+ |
+ input#password.form-control(type='password', name='password')
+ #messages
+ .form-group
+ label(for='confirm') Confirm Passphrase:
+ |
+ input#confirm.form-control(type='password', name='confirm')
+ |
+ input#commission(name='commission', type='hidden', value='0')
+ |
+ input#unit(name='unit', type='hidden', value='BTC')
+ |
+ input#pubkey(name='pubkey', type='hidden')
+ |
+ input#privkey(name='privkey', type='hidden')
+ |
+ input.btn.btn-primary(type='submit', value='Register')
+#qr
+</template>
diff --git a/src/components/Sales.vue b/src/components/Sales.vue
new file mode 100644
index 00000000..623868dd
--- /dev/null
+++ b/src/components/Sales.vue
@@ -0,0 +1,209 @@
+<template lang="pug">
+ div
+ h1 Payments Received
+ div(style='margin-bottom: 15px')
+ input#user(type='hidden', value='')
+ |
+ input#from_date(type='text', style='position: relative; top: 25px; height: 0px; width:0px; border: 0px;')
+ |
+ button#from.btn.btn-primary
+ | to
+ input#to_date(type='text', style='position: relative; top: 25px; height: 0px; width:0px; border: 0px;')
+ |
+ button#to.btn.btn-primary(name='to')
+ p.alert.alert-warning(style='display: none') No transactions were found for the specified time period
+ table.table.table-striped.table-hover.report(style='cursor: pointer; display: none')
+ thead
+ tr
+ th Time
+ th Rate
+ th &nbsp;&nbsp;&nbsp;BTC
+ th &nbsp;&nbsp;&nbsp;{{currency}}
+ tbody
+ tfoot
+ tr
+ td.total(colspan='2') Subtotal:
+ td#btc
+ td#fiat
+ tr
+ td.total(colspan='2') Tips:
+ td#btc_tips
+ td#fiat_tips
+ tr
+ td.total(colspan='2') Total:
+ td#btc_total
+ td#fiat_total
+ #modal.modal.fade(tabindex='-1', role='dialog')
+ .modal-dialog
+ .modal-content
+ .modal-header
+ button.close(type='button', data-dismiss='modal')
+ span(aria-hidden='true') &times;
+ span.sr-only Close
+ h4.modal-title Transaction
+ .modal-body
+ textarea(style='width: 100%; height: 100px;', placeholder='Notes')
+ p#yousure You sure?
+ .modal-footer
+ #buttons
+ button.btn.btn-danger(type='button', tabindex='-1') Delete Transaction
+ |
+ button.btn.btn-primary(type='button') View Blockchain
+ |
+ button.btn.btn-default(type='button', data-dismiss='modal') Done
+ #confirm
+ button.btn.btn-default(type='button', data-dismiss='modal') No
+ |
+ button.btn.btn-danger(type='button') Yes
+</template>
+
+<script>
+export default {
+ name: 'Sales'
+}
+ /*
+ (function() {
+ var display, filterDates, g;
+
+ g = typeof exports !== "undefined" && exports !== null ? exports : this;
+
+ $(function() {
+ var from, to;
+ from = moment().subtract(7, 'days');
+ to = moment();
+ $('#from').html(from.format("MMMM Do, YYYY"));
+ $('#to').html(to.format("MMMM Do, YYYY"));
+ $('#from_date').val(from.format("MM/DD/YYYY"));
+ $('#to_date').val(to.format("MM/DD/YYYY"));
+ $('#from_date').datepicker({
+ onClose: filterDates
+ });
+ $('#to_date').datepicker({
+ onClose: filterDates
+ });
+ $('#from').click(function() {
+ return $('#from_date').datepicker('show').blur();
+ });
+ $('#to').click(function() {
+ return $('#to_date').datepicker('show').blur();
+ });
+ return $.getJSON('transactions.json', function(data) {
+ g.transactions = data.transactions.filter(function(t) {
+ return t.user === $('#user').val();
+ });
+ display(g.transactions);
+ return filterDates();
+ });
+ });
+
+ filterDates = function() {
+ var transactions;
+ $('#from').html(moment($('#from_date').datepicker('getDate')).format("MMMM Do, YYYY"));
+ $('#to').html(moment($('#to_date').datepicker('getDate')).format("MMMM Do, YYYY"));
+ transactions = $.grep(g.transactions, function(e, i) {
+ var amount, d, from, to;
+ if (!e) {
+ return false;
+ }
+ from = moment($('#from_date').val(), "MM/DD/YYYY");
+ to = moment($('#to_date').val(), "MM/DD/YYYY");
+ d = moment(e.date);
+ amount = parseFloat(e.exchange) * parseFloat(e.received);
+ return !isNaN(parseFloat(amount)) && isFinite(amount) && ((from == null) || d.diff(from, 'days') >= 0) && ((to == null) || d.diff(to, 'days') <= 0);
+ });
+ return display(transactions);
+ };
+
+ display = function(transactions) {
+ var btc_tips_total, btc_total, fiat_tips_total, fiat_total;
+ $('.report tbody tr').remove();
+ if (transactions.length === 0) {
+ $('.report').hide();
+ return $('.alert').fadeIn();
+ } else {
+ $('.alert').hide();
+ btc_total = btc_tips_total = 0;
+ fiat_total = fiat_tips_total = 0;
+ $.each(transactions, function() {
+ var btc, btc_tip, btc_tip_str, date, exchange, fiat, fiat_tip, fiat_tip_str, notes, row, tip, txid;
+ btc_tip_str = "";
+ fiat_tip_str = "";
+ exchange = parseFloat(this.exchange);
+ tip = this.tip;
+ btc = parseFloat(this.received);
+ fiat = btc * exchange;
+ btc_total += parseFloat(btc.toFixed(8));
+ fiat_total += parseFloat(fiat.toFixed(2));
+ if (tip > 1) {
+ btc = btc / tip;
+ btc_tip = (btc * tip - btc).toFixed(8);
+ fiat_tip = (btc_tip * exchange).toFixed(2);
+ btc_tips_total += parseFloat(btc_tip);
+ fiat_tips_total += parseFloat(fiat_tip);
+ btc_tip_str = "<br /><small>+ " + btc_tip + "</small>";
+ fiat_tip_str = "<br /><small>+ " + fiat_tip + "</small>";
+ }
+ fiat = btc * exchange;
+ notes = this.notes;
+ txid = this.txid;
+ date = moment(this.date, 'YYYY-MM-DD h:mm:ss').format('MMM D h:mma');
+ row = $("<tr id='" + this.txid + "'>\n <td>" + date + "&nbsp;&nbsp;<span class='glyphicon glyphicon-tag hidden'></span></td>\n <td>" + (exchange.toFixed(2)) + "</td>\n <td>" + (btc.toFixed(8)) + btc_tip_str + "</td>\n <td>" + (fiat.toFixed(2)) + fiat_tip_str + "</td>\n</tr>");
+ if (notes) {
+ row.attr('data-notes', notes);
+ row.find('span').removeClass('hidden');
+ }
+ $('.report tbody').append(row);
+ return row.click(function() {
+ $('#confirm, #yousure').hide();
+ $('#buttons, #modal textarea').show();
+ notes = $(this).attr('data-notes');
+ $('#modal').modal();
+ $('#modal textarea').val('');
+ $('#modal .btn-primary').toggle((txid != null) && txid.length > 5);
+ $('#modal .btn-danger').off().click(function() {
+ $('#yousure, #confirm').show();
+ return $('#buttons, #modal textarea').hide();
+ });
+ $('#confirm .btn-danger').click(function() {
+ $.ajax({
+ type: 'delete',
+ url: "/" + ($('#user').val()) + "/transactions/" + txid
+ });
+ $('#modal').modal('hide');
+ return row.fadeOut('slow');
+ });
+ $('#modal .btn-primary').off().click(function() {
+ window.open("https://blockchain.info/tx/" + txid, '_blank');
+ return $('#modal').modal('hide');
+ });
+ $('#modal textarea').off().change(function() {
+ notes = $(this).val();
+ if (txid) {
+ $.post("/transactions/" + txid, {
+ notes: $(this).val()
+ });
+ }
+ row.find('span').addClass('hidden');
+ if (notes) {
+ row.find('span').removeClass('hidden');
+ }
+ return row.attr('data-notes', $(this).val());
+ });
+ if (notes) {
+ return $('#modal textarea').val(notes);
+ }
+ });
+ });
+ $('#btc_total').html("" + (parseFloat(btc_total).toFixed(8)));
+ $('#fiat_total').html("" + (parseFloat(fiat_total).toFixed(2)));
+ $('#btc_tips').html("" + (parseFloat(btc_tips_total).toFixed(8)));
+ $('#fiat_tips').html("" + (parseFloat(fiat_tips_total).toFixed(2)));
+ $('#btc').html("" + (parseFloat(btc_total - btc_tips_total).toFixed(8)));
+ $('#fiat').html("" + (parseFloat(fiat_total - fiat_tips_total).toFixed(2)));
+ return $('.report').fadeIn();
+ }
+ };
+
+ }).call(this);
+ */
+</script>
diff --git a/src/components/SignIn.vue b/src/components/SignIn.vue
index 37a49d5f..4592602f 100644
--- a/src/components/SignIn.vue
+++ b/src/components/SignIn.vue
@@ -1,7 +1,7 @@
<template lang="pug">
div
#main-logo
- p.alert.alert-danger Invalid username or password, please try again.
+ // p.alert.alert-danger Invalid username or password, please try again.
form.form-signin(action='login', method='post')
input.form-control(name='username', type='text', placeholder='Username', value='user', required='', autofocus='')
br
diff --git a/src/main.js b/src/main.js
index e4ae5c1a..0fb682f3 100644
--- a/src/main.js
+++ b/src/main.js
@@ -4,10 +4,11 @@ import Vue from 'vue'
import VueRouter from 'vue-router'
import App from './App'
import SignIn from './components/SignIn'
+import Sales from './components/Sales'
const routes = [
{ path: '/', component: SignIn },
- { path: '/signin', component: SignIn }
+ { path: '/sales', component: Sales }
]
const router = new VueRouter({
diff --git a/static/js/report.coffee b/static/js/report.coffee
deleted file mode 100644
index 3fee6714..00000000
--- a/static/js/report.coffee
+++ /dev/null
@@ -1,148 +0,0 @@
-g = exports ? this
-
-$(->
- from = moment().subtract(7, 'days')
- to = moment()
-
- $('#from').html(from.format("MMMM Do, YYYY"))
- $('#to').html(to.format("MMMM Do, YYYY"))
-
- $('#from_date').val(from.format("MM/DD/YYYY"))
- $('#to_date').val(to.format("MM/DD/YYYY"))
-
- $('#from_date').datepicker(onClose: filterDates)
- $('#to_date').datepicker(onClose: filterDates)
-
- $('#from').click(-> $('#from_date').datepicker('show').blur())
- $('#to').click(-> $('#to_date').datepicker('show').blur())
-
- $.getJSON('transactions.json', (data) ->
- g.transactions = data.transactions.filter((t) -> t.user is $('#user').val())
- display(g.transactions)
- filterDates()
- )
-)
-
-filterDates = ->
- $('#from').html(moment($('#from_date').datepicker('getDate')).format("MMMM Do, YYYY"))
- $('#to').html(moment($('#to_date').datepicker('getDate')).format("MMMM Do, YYYY"))
-
- transactions = $.grep(g.transactions, (e, i) ->
- return false unless e
-
- from = moment($('#from_date').val(), "MM/DD/YYYY")
- to = moment($('#to_date').val(), "MM/DD/YYYY")
-
- d = moment(e.date)
- amount = parseFloat(e.exchange) * parseFloat(e.received)
-
- !isNaN(parseFloat(amount)) && isFinite(amount) &&
- (!from? || d.diff(from, 'days') >= 0) && (!to? || d.diff(to, 'days') <= 0)
- )
-
- display(transactions)
-
-display = (transactions) ->
- $('.report tbody tr').remove()
-
- if transactions.length is 0
- $('.report').hide()
- $('.alert').fadeIn()
- else
- $('.alert').hide()
- btc_total = btc_tips_total = 0
- fiat_total = fiat_tips_total = 0
-
- $.each(transactions, ->
- btc_tip_str = ""
- fiat_tip_str = ""
-
- exchange = parseFloat(@exchange)
- tip = @tip
- btc = parseFloat(@received)
- fiat = btc * exchange
-
- btc_total += parseFloat(btc.toFixed(8))
- fiat_total += parseFloat(fiat.toFixed(2))
-
- if tip > 1
- btc = btc / tip
- btc_tip = (btc * tip - btc).toFixed(8)
- fiat_tip = (btc_tip * exchange).toFixed(2)
-
- btc_tips_total += parseFloat(btc_tip)
- fiat_tips_total += parseFloat(fiat_tip)
-
- btc_tip_str = "<br /><small>+ #{btc_tip}</small>"
- fiat_tip_str = "<br /><small>+ #{fiat_tip}</small>"
-
- fiat = btc * exchange
-
- notes = @notes
- txid = @txid
- date = moment(@date, 'YYYY-MM-DD h:mm:ss').format('MMM D h:mma')
-
- row = $("""
- <tr id='#{@txid}'>
- <td>#{date}&nbsp;&nbsp;<span class='glyphicon glyphicon-tag hidden'></span></td>
- <td>#{exchange.toFixed(2)}</td>
- <td>#{btc.toFixed(8)}#{btc_tip_str}</td>
- <td>#{fiat.toFixed(2)}#{fiat_tip_str}</td>
- </tr>
- """)
-
- if notes
- row.attr('data-notes', notes)
- row.find('span').removeClass('hidden')
-
- $('.report tbody').append(row)
-
- row.click(->
- $('#confirm, #yousure').hide()
- $('#buttons, #modal textarea').show()
- notes = $(this).attr('data-notes')
-
- $('#modal').modal()
- $('#modal textarea').val('')
- $('#modal .btn-primary').toggle(txid? and txid.length > 5)
-
- $('#modal .btn-danger').off().click(->
- $('#yousure, #confirm').show()
- $('#buttons, #modal textarea').hide()
- )
-
- $('#confirm .btn-danger').click(->
- $.ajax(type: 'delete', url: "/#{$('#user').val()}/transactions/#{txid}")
- $('#modal').modal('hide')
- row.fadeOut('slow')
- )
-
- $('#modal .btn-primary').off().click(->
- window.open("https://blockchain.info/tx/#{txid}", '_blank')
- $('#modal').modal('hide')
- )
-
- $('#modal textarea').off().change(->
- notes = $(this).val()
- $.post("/transactions/#{txid}", notes: $(this).val()) if txid
-
- row.find('span').addClass('hidden')
- if notes
- row.find('span').removeClass('hidden')
-
- row.attr('data-notes', $(this).val())
- )
-
- if notes
- $('#modal textarea').val(notes)
- )
- )
-
- $('#btc_total').html("#{parseFloat(btc_total).toFixed(8)}")
- $('#fiat_total').html("#{parseFloat(fiat_total).toFixed(2)}")
- $('#btc_tips').html("#{parseFloat(btc_tips_total).toFixed(8)}")
- $('#fiat_tips').html("#{parseFloat(fiat_tips_total).toFixed(2)}")
- $('#btc').html("#{parseFloat(btc_total - btc_tips_total).toFixed(8)}")
- $('#fiat').html("#{parseFloat(fiat_total - fiat_tips_total).toFixed(2)}")
-
- $('.report').fadeIn()
diff --git a/static/js/report.js b/static/js/report.js
deleted file mode 100644
index 31b3b689..00000000
--- a/static/js/report.js
+++ /dev/null
@@ -1,143 +0,0 @@
-(function() {
- var display, filterDates, g;
-
- g = typeof exports !== "undefined" && exports !== null ? exports : this;
-
- $(function() {
- var from, to;
- from = moment().subtract(7, 'days');
- to = moment();
- $('#from').html(from.format("MMMM Do, YYYY"));
- $('#to').html(to.format("MMMM Do, YYYY"));
- $('#from_date').val(from.format("MM/DD/YYYY"));
- $('#to_date').val(to.format("MM/DD/YYYY"));
- $('#from_date').datepicker({
- onClose: filterDates
- });
- $('#to_date').datepicker({
- onClose: filterDates
- });
- $('#from').click(function() {
- return $('#from_date').datepicker('show').blur();
- });
- $('#to').click(function() {
- return $('#to_date').datepicker('show').blur();
- });
- return $.getJSON('transactions.json', function(data) {
- g.transactions = data.transactions.filter(function(t) {
- return t.user === $('#user').val();
- });
- display(g.transactions);
- return filterDates();
- });
- });
-
- filterDates = function() {
- var transactions;
- $('#from').html(moment($('#from_date').datepicker('getDate')).format("MMMM Do, YYYY"));
- $('#to').html(moment($('#to_date').datepicker('getDate')).format("MMMM Do, YYYY"));
- transactions = $.grep(g.transactions, function(e, i) {
- var amount, d, from, to;
- if (!e) {
- return false;
- }
- from = moment($('#from_date').val(), "MM/DD/YYYY");
- to = moment($('#to_date').val(), "MM/DD/YYYY");
- d = moment(e.date);
- amount = parseFloat(e.exchange) * parseFloat(e.received);
- return !isNaN(parseFloat(amount)) && isFinite(amount) && ((from == null) || d.diff(from, 'days') >= 0) && ((to == null) || d.diff(to, 'days') <= 0);
- });
- return display(transactions);
- };
-
- display = function(transactions) {
- var btc_tips_total, btc_total, fiat_tips_total, fiat_total;
- $('.report tbody tr').remove();
- if (transactions.length === 0) {
- $('.report').hide();
- return $('.alert').fadeIn();
- } else {
- $('.alert').hide();
- btc_total = btc_tips_total = 0;
- fiat_total = fiat_tips_total = 0;
- $.each(transactions, function() {
- var btc, btc_tip, btc_tip_str, date, exchange, fiat, fiat_tip, fiat_tip_str, notes, row, tip, txid;
- btc_tip_str = "";
- fiat_tip_str = "";
- exchange = parseFloat(this.exchange);
- tip = this.tip;
- btc = parseFloat(this.received);
- fiat = btc * exchange;
- btc_total += parseFloat(btc.toFixed(8));
- fiat_total += parseFloat(fiat.toFixed(2));
- if (tip > 1) {
- btc = btc / tip;
- btc_tip = (btc * tip - btc).toFixed(8);
- fiat_tip = (btc_tip * exchange).toFixed(2);
- btc_tips_total += parseFloat(btc_tip);
- fiat_tips_total += parseFloat(fiat_tip);
- btc_tip_str = "<br /><small>+ " + btc_tip + "</small>";
- fiat_tip_str = "<br /><small>+ " + fiat_tip + "</small>";
- }
- fiat = btc * exchange;
- notes = this.notes;
- txid = this.txid;
- date = moment(this.date, 'YYYY-MM-DD h:mm:ss').format('MMM D h:mma');
- row = $("<tr id='" + this.txid + "'>\n <td>" + date + "&nbsp;&nbsp;<span class='glyphicon glyphicon-tag hidden'></span></td>\n <td>" + (exchange.toFixed(2)) + "</td>\n <td>" + (btc.toFixed(8)) + btc_tip_str + "</td>\n <td>" + (fiat.toFixed(2)) + fiat_tip_str + "</td>\n</tr>");
- if (notes) {
- row.attr('data-notes', notes);
- row.find('span').removeClass('hidden');
- }
- $('.report tbody').append(row);
- return row.click(function() {
- $('#confirm, #yousure').hide();
- $('#buttons, #modal textarea').show();
- notes = $(this).attr('data-notes');
- $('#modal').modal();
- $('#modal textarea').val('');
- $('#modal .btn-primary').toggle((txid != null) && txid.length > 5);
- $('#modal .btn-danger').off().click(function() {
- $('#yousure, #confirm').show();
- return $('#buttons, #modal textarea').hide();
- });
- $('#confirm .btn-danger').click(function() {
- $.ajax({
- type: 'delete',
- url: "/" + ($('#user').val()) + "/transactions/" + txid
- });
- $('#modal').modal('hide');
- return row.fadeOut('slow');
- });
- $('#modal .btn-primary').off().click(function() {
- window.open("https://blockchain.info/tx/" + txid, '_blank');
- return $('#modal').modal('hide');
- });
- $('#modal textarea').off().change(function() {
- notes = $(this).val();
- if (txid) {
- $.post("/transactions/" + txid, {
- notes: $(this).val()
- });
- }
- row.find('span').addClass('hidden');
- if (notes) {
- row.find('span').removeClass('hidden');
- }
- return row.attr('data-notes', $(this).val());
- });
- if (notes) {
- return $('#modal textarea').val(notes);
- }
- });
- });
- $('#btc_total').html("" + (parseFloat(btc_total).toFixed(8)));
- $('#fiat_total').html("" + (parseFloat(fiat_total).toFixed(2)));
- $('#btc_tips').html("" + (parseFloat(btc_tips_total).toFixed(8)));
- $('#fiat_tips').html("" + (parseFloat(fiat_tips_total).toFixed(2)));
- $('#btc').html("" + (parseFloat(btc_total - btc_tips_total).toFixed(8)));
- $('#fiat').html("" + (parseFloat(fiat_total - fiat_tips_total).toFixed(2)));
- return $('.report').fadeIn();
- }
- };
-
-}).call(this);
diff --git a/views/users/index.html b/views/users/index.html
deleted file mode 100644
index 3bf10b58..00000000
--- a/views/users/index.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<h1>Merchants</h1>
-
-<ul>
- <li>One</li>
- <li>One</li>
- <li>One</li>
-</ul>