updated bootstrap, jquery. Added sortable/partially hidable tables
This commit is contained in:
36
templates/curStock.hamlet
Normal file
36
templates/curStock.hamlet
Normal file
@ -0,0 +1,36 @@
|
||||
<div .panel .panel-default>
|
||||
<div .panel-heading>Current Stock:
|
||||
<div .btn-group role="group" id="stockOptions">
|
||||
<a id="stockTableSort" .btn .active role="button">
|
||||
Sort Mode
|
||||
<a id="stockTableColumnSelect" .btn role="button">
|
||||
Hide/Show Mode
|
||||
<table .table .table-condensed .small .table-bordered id="tableStock">
|
||||
<thead>
|
||||
<tr>
|
||||
<th .text-center>Bought
|
||||
<th .text-center>Item name
|
||||
<th .text-center>Quantity
|
||||
<th .text-center>Buy price
|
||||
<th .text-center>Required sell
|
||||
<th .text-center>Total
|
||||
<th .text-center>Station name
|
||||
<tbody>
|
||||
$forall DisCols tid sid sn tn is wrth avg' dt taxed <- items'
|
||||
<tr>
|
||||
<td>#{showDateTime dt}
|
||||
<td><a href="@{ItemR tid}">#{tn}</a>
|
||||
<td .numeric>#{is}
|
||||
<td .numeric>#{prettyISK avg'}
|
||||
<td .numeric>#{prettyISK taxed}
|
||||
<td .numeric>#{prettyISK wrth}
|
||||
<td>#{sn}
|
||||
<tfoot>
|
||||
<tr .total>
|
||||
<th .text-center>Total
|
||||
<td>
|
||||
<td .numeric>
|
||||
<td .numeric>
|
||||
<td .numeric>
|
||||
<td .numeric>#{prettyISK total}
|
||||
<td>
|
39
templates/curStock.julius
Normal file
39
templates/curStock.julius
Normal file
@ -0,0 +1,39 @@
|
||||
var stockSorting = true;
|
||||
|
||||
function options(opt) {
|
||||
switch(opt) {
|
||||
case "stockSort":
|
||||
$('#tableStock tr th').each(function(id,elem) {
|
||||
$(elem).off('click');
|
||||
$(elem).on('click', function() {
|
||||
sortTableBy("#tableStock",id,1,stockSorting);
|
||||
stockSorting = !stockSorting;
|
||||
});
|
||||
});
|
||||
$('#stockOptions > a').each(function(i,e) {$(e).removeClass("active");});
|
||||
$('#stockTableSort').addClass("active");
|
||||
break;
|
||||
case "stockHide":
|
||||
$('#tableStock tr th').each(function(id,elem) {
|
||||
$(elem).off('click');
|
||||
$(elem).on('click', function() {
|
||||
hideTableCol("#tableStock",id,"#stockOptions");
|
||||
});
|
||||
});
|
||||
$('#stockOptions > a').each(function(i,e) {$(e).removeClass("active");});
|
||||
console.log($('#stockOptions a'));
|
||||
$('#stockTableColumnSelect').addClass("active");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$('#stockTableSort').on('click', function() {
|
||||
options("stockSort");
|
||||
});
|
||||
|
||||
$('#stockTableColumnSelect').on('click', function() {
|
||||
options("stockHide");
|
||||
});
|
||||
|
||||
|
||||
options("stockSort");
|
77
templates/item.hamlet
Normal file
77
templates/item.hamlet
Normal file
@ -0,0 +1,77 @@
|
||||
<div .panel .panel-default>
|
||||
$if page > 0
|
||||
<div .panel-heading>#{itemsPerPage} Transactions (starting at #{offset}) of #{total}
|
||||
$else
|
||||
<div .panel-heading>#{itemsPerPage} Transactions of #{total}
|
||||
<div .btn-group role="group" id="itemOptions">
|
||||
<a id="itemTableSort" .btn .active role="button">
|
||||
Sort Mode
|
||||
<a id="itemTableColumnSelect" .btn role="button">
|
||||
Hide/Show Mode
|
||||
<table .table .table-condensed .small id="tableItem">
|
||||
<thead>
|
||||
<tr>
|
||||
<th .text-center>Time
|
||||
<th .text-center>P/C
|
||||
<th .text-center>B/S
|
||||
<th .text-center>Item
|
||||
<th .text-center>##
|
||||
<th .text-center>ISK/Item
|
||||
<th .text-center>ISK total
|
||||
<th .text-center>ISK profit
|
||||
<th .text-center>%
|
||||
<th .text-center>Time
|
||||
<th .text-center>Client
|
||||
<th .text-center>Station
|
||||
<th .text-center>?
|
||||
<th .text-center>
|
||||
<tbody>
|
||||
$forall Entity _ t <- items
|
||||
<tr>
|
||||
<td>#{showDateTime $ transactionDateTime $ t}
|
||||
$if transactionTransForCorp t
|
||||
<td .corpTransaction .text-center>C
|
||||
$else
|
||||
<td .personalTransaction .text-center>P
|
||||
$if transactionTransIsSell t
|
||||
<td .sellTransaction .text-center>S
|
||||
$else
|
||||
<td .buyTransaction .text-center>B
|
||||
<td><a href="@{ItemR (transactionTypeId t)}">#{transactionTypeName t}</a>
|
||||
<td .numeric>#{transactionQuantity t}
|
||||
<td .numeric>#{prettyISK $ transactionPriceCents t}
|
||||
<td .numeric>#{prettyISK $ transactionQuantity t * transactionPriceCents t}
|
||||
$maybe profit <- transRealProfit t
|
||||
$if (&&) (transactionTransIsSell t) (profit > 0)
|
||||
<td .numeric .profit>
|
||||
#{prettyISK $ profit}
|
||||
$elseif (&&) (transactionTransIsSell t) (profit < 0)
|
||||
<td .numeric .loss>
|
||||
#{prettyISK $ profit}
|
||||
$elseif not (transactionTransIsSell t)
|
||||
<td .numeric .buyfee>
|
||||
#{prettyISK $ profit}
|
||||
$else
|
||||
<td .numeric>
|
||||
#{prettyISK $ profit}
|
||||
<td .numeric>
|
||||
#{profitPercent profit t}%
|
||||
$nothing
|
||||
<td>
|
||||
-
|
||||
<td>
|
||||
<td .duration>
|
||||
$maybe secs <- transactionSecondsToSell t
|
||||
#{showSecsToSell secs}
|
||||
$nothing
|
||||
|
||||
<td>#{transactionClientName t}
|
||||
<td>#{transactionStationName t}
|
||||
<td>
|
||||
<td>
|
||||
<ul class="pagination">
|
||||
$forall p <- paginatePages
|
||||
$if p == page
|
||||
<li .active><a href="@{ItemPagedR tid p}">#{p}</a>
|
||||
$else
|
||||
<li><a href="@{ItemPagedR tid p}">#{p}</a>
|
39
templates/item.julius
Normal file
39
templates/item.julius
Normal file
@ -0,0 +1,39 @@
|
||||
var itemSorting = true;
|
||||
|
||||
function options(opt) {
|
||||
switch(opt) {
|
||||
case "itemSort":
|
||||
$('#tableItem tr th').each(function(id,elem) {
|
||||
$(elem).off('click');
|
||||
$(elem).on('click', function() {
|
||||
sortTableBy("#tableItem",id,0,itemSorting);
|
||||
itemSorting = !itemSorting;
|
||||
});
|
||||
});
|
||||
$('#itemOptions > a').each(function(i,e) {$(e).removeClass("active");});
|
||||
$('#itemTableSort').addClass("active");
|
||||
break;
|
||||
case "itemHide":
|
||||
$('#tableItem tr th').each(function(id,elem) {
|
||||
$(elem).off('click');
|
||||
$(elem).on('click', function() {
|
||||
hideTableCol("#tableItem",id,"#itemOptions");
|
||||
});
|
||||
});
|
||||
$('#itemOptions > a').each(function(i,e) {$(e).removeClass("active");});
|
||||
console.log($('#itemOptions a'));
|
||||
$('#itemTableColumnSelect').addClass("active");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$('#itemTableSort').on('click', function() {
|
||||
options("itemSort");
|
||||
});
|
||||
|
||||
$('#itemTableColumnSelect').on('click', function() {
|
||||
options("itemHide");
|
||||
});
|
||||
|
||||
|
||||
options("itemSort");
|
129
templates/wallet.hamlet
Normal file
129
templates/wallet.hamlet
Normal file
@ -0,0 +1,129 @@
|
||||
<div .panel .panel-default>
|
||||
<div .panel-heading>Transactions in the last #{hrs} hours:
|
||||
<div .btn-group .btn-group-justified role="group">
|
||||
$forall (hrs',cap) <- buttonIntervals
|
||||
$if hrs == hrs'
|
||||
<a href="@{WalletDetailsR hrs' days}" .btn .active role="button">#{cap}
|
||||
$else
|
||||
<a href="@{WalletDetailsR hrs' days}" .btn role="button">#{cap}
|
||||
<div .btn-group role="group" id="walletOptions">
|
||||
<a id="walletTableSort" .btn .active role="button">
|
||||
Sort Mode
|
||||
<a id="walletTableColumnSelect" .btn role="button">
|
||||
Hide/Show Mode
|
||||
<table .table .table-condensed .small id="tableWallet">
|
||||
<thead>
|
||||
<tr>
|
||||
<th .text-center>Time
|
||||
<th .text-center>P/C
|
||||
<th .text-center>B/S
|
||||
<th .text-center>Item
|
||||
<th .text-center>##
|
||||
<th .text-center>ISK/Item
|
||||
<th .text-center>ISK total
|
||||
<th .text-center>ISK profit
|
||||
<th .text-center>%
|
||||
<th .text-center>Time
|
||||
<th .text-center>Client
|
||||
<th .text-center>Station
|
||||
<th .text-center>?
|
||||
<th .text-center>
|
||||
<tbody>
|
||||
$forall Entity _ t <- trans
|
||||
<tr>
|
||||
<td>#{showDateTime $ transactionDateTime $ t}
|
||||
$if transactionTransForCorp t
|
||||
<td .corpTransaction .text-center>C
|
||||
$else
|
||||
<td .personalTransaction .text-center>P
|
||||
$if transactionTransIsSell t
|
||||
<td .sellTransaction .text-center>S
|
||||
$else
|
||||
<td .buyTransaction .text-center>B
|
||||
<td><a href="@{ItemR (transactionTypeId t)}">#{transactionTypeName t}</a>
|
||||
<td .numeric>#{transactionQuantity t}
|
||||
<td .numeric>#{prettyISK $ transactionPriceCents t}
|
||||
<td .numeric>#{prettyISK $ transactionQuantity t * transactionPriceCents t}
|
||||
$maybe profit <- transRealProfit t
|
||||
$if (&&) (transactionTransIsSell t) (profit > 0)
|
||||
<td .numeric .profit>
|
||||
#{prettyISK $ profit}
|
||||
$elseif (&&) (transactionTransIsSell t) (profit < 0)
|
||||
<td .numeric .loss>
|
||||
#{prettyISK $ profit}
|
||||
$elseif not (transactionTransIsSell t)
|
||||
<td .numeric .buyfee>
|
||||
#{prettyISK $ profit}
|
||||
$else
|
||||
<td .numeric>
|
||||
#{prettyISK $ profit}
|
||||
<td .numeric>
|
||||
#{profitPercent profit t}%
|
||||
$nothing
|
||||
<td>
|
||||
-
|
||||
<td>
|
||||
<td .duration>
|
||||
$maybe secs <- transactionSecondsToSell t
|
||||
#{showSecsToSell secs}
|
||||
$nothing
|
||||
|
||||
<td>#{transactionClientName t}
|
||||
<td>#{transactionStationName t}
|
||||
<td>
|
||||
<td>
|
||||
|
||||
<div .panel .panel-default>
|
||||
<div .panel-heading>Statistices for the last #{days} days:
|
||||
<div .btn-group .btn-group-justified role="group">
|
||||
$forall days' <- profitIntervals
|
||||
$if days == days'
|
||||
<a href="@{WalletDetailsR hrs days'}" .btn .active role="button">#{days'} days
|
||||
$else
|
||||
<a href="@{WalletDetailsR hrs days'}" .btn role="button">#{days'} days
|
||||
<div .btn-group role="group" id="walletDaysOptions">
|
||||
<a id="walletDaysTableSort" .btn .active role="button">
|
||||
Sort Mode
|
||||
<a id="walletDaysTableColumnSelect" .btn role="button">
|
||||
Hide/Show Mode
|
||||
<table .table .table-condensed .small id="tableWalletDays">
|
||||
<thead>
|
||||
<tr>
|
||||
<th .text-center>Date
|
||||
<th .text-center>ISK Buy
|
||||
<th .text-center>ISK Sell
|
||||
<th .text-center>ISK Profit
|
||||
<th .text-center>ISK Broker Fee
|
||||
<th .text-center>ISK Transaction Tax
|
||||
<th .text-center>Real Profit
|
||||
<th .text-center>%
|
||||
<tbody>
|
||||
$forall (Profit t b s p bf tt) <- profits
|
||||
<tr>
|
||||
<td>#{show t}
|
||||
<td .numeric>#{prettyISK b}
|
||||
<td .numeric>#{prettyISK s}
|
||||
<td .numeric>#{prettyISK p}
|
||||
<td .numeric>#{prettyISK bf}
|
||||
<td .numeric>#{prettyISK tt}
|
||||
<td .numeric>#{transRealProfit' p bf tt}
|
||||
<td .numeric>
|
||||
$maybe pp <- profitPercent' p bf tt s
|
||||
#{pp}
|
||||
$nothing
|
||||
|
||||
<tfoot>
|
||||
$with (ProfitSum b s p bf tt) <- profitssum
|
||||
<tr .total>
|
||||
<th .text-center>Total
|
||||
<td .numeric>#{prettyISK b}
|
||||
<td .numeric>#{prettyISK s}
|
||||
<td .numeric>#{prettyISK p}
|
||||
<td .numeric>#{prettyISK bf}
|
||||
<td .numeric>#{prettyISK tt}
|
||||
<td .numeric>#{transRealProfit' p bf tt}
|
||||
<td .numeric>
|
||||
$maybe pp <- profitPercent' p bf tt s
|
||||
#{pp}
|
||||
$nothing
|
||||
|
79
templates/wallet.julius
Normal file
79
templates/wallet.julius
Normal file
@ -0,0 +1,79 @@
|
||||
var walletSorting = true;
|
||||
|
||||
function options(opt) {
|
||||
switch(opt) {
|
||||
case "walletSort":
|
||||
$('#tableWallet tr th').each(function(id,elem) {
|
||||
$(elem).off('click');
|
||||
$(elem).on('click', function() {
|
||||
sortTableBy("#tableWallet",id,3,walletSorting);
|
||||
walletSorting = !walletSorting;
|
||||
});
|
||||
});
|
||||
$('#walletOptions > a').each(function(i,e) {$(e).removeClass("active");});
|
||||
$('#walletTableSort').addClass("active");
|
||||
break;
|
||||
case "walletHide":
|
||||
$('#tableWallet tr th').each(function(id,elem) {
|
||||
$(elem).off('click');
|
||||
$(elem).on('click', function() {
|
||||
hideTableCol("#tableWallet",id,"#walletOptions");
|
||||
});
|
||||
});
|
||||
$('#walletOptions > a').each(function(i,e) {$(e).removeClass("active");});
|
||||
console.log($('#walletOptions a'));
|
||||
$('#walletTableColumnSelect').addClass("active");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$('#walletTableSort').on('click', function() {
|
||||
options("walletSort");
|
||||
});
|
||||
|
||||
$('#walletTableColumnSelect').on('click', function() {
|
||||
options("walletHide");
|
||||
});
|
||||
|
||||
|
||||
options("walletSort");
|
||||
|
||||
var walletDaysSorting = true;
|
||||
|
||||
function optionsDays(opt) {
|
||||
switch(opt) {
|
||||
case "walletDaysSort":
|
||||
$('#tableWalletDays tr th').each(function(id,elem) {
|
||||
$(elem).off('click');
|
||||
$(elem).on('click', function() {
|
||||
sortTableBy("#tableWalletDays",id,3,walletDaysSorting);
|
||||
walletDaysSorting = !walletDaysSorting;
|
||||
});
|
||||
});
|
||||
$('#walletDaysOptions > a').each(function(i,e) {$(e).removeClass("active");});
|
||||
$('#walletDaysTableSort').addClass("active");
|
||||
break;
|
||||
case "walletDaysHide":
|
||||
$('#tableWalletDays tr th').each(function(id,elem) {
|
||||
$(elem).off('click');
|
||||
$(elem).on('click', function() {
|
||||
hideTableCol("#tableWalletDays",id,"#walletDaysOptions");
|
||||
});
|
||||
});
|
||||
$('#walletDaysOptions > a').each(function(i,e) {$(e).removeClass("active");});
|
||||
console.log($('#walletDaysOptions a'));
|
||||
$('#walletDaysTableColumnSelect').addClass("active");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$('#walletDaysTableSort').on('click', function() {
|
||||
optionsDays("walletDaysSort");
|
||||
});
|
||||
|
||||
$('#walletDaysTableColumnSelect').on('click', function() {
|
||||
optionsDays("walletDaysHide");
|
||||
});
|
||||
|
||||
|
||||
optionsDays("walletDaysSort");
|
Reference in New Issue
Block a user