Permalink
Browse files

Merge pull request #3 from LithMage/master

  • Loading branch information...
2 parents a1974a6 + 310db81 commit 6df096b44f60bd07d004399d3cb08f401bba7e59 @de-luxe de-luxe committed on GitHub Nov 19, 2016
Showing with 16 additions and 1 deletion.
  1. +8 −1 html/ui/index.html
  2. +8 −0 html/ui/js/nrs.assetexchange.js
View
@@ -16,8 +16,9 @@
<style id="user_header_style" type="text/css"></style>
<style id="user_sidebar_style" type="text/css"></style>
<style id="user_boxes_style" type="text/css"></style>
+ <!-- Reconsider this jquery input as its a multiple of the one in 3rd party folder, one posibility might be to add jquery here but remove from 3rd party
+ same with the import i removed for bootstrap.js. Duplicate imports for scripts might cause some spectacular and hard to trace bugs -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script>
- <script type="text/javascript" src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.js" type="text/javascript"></script>
<style>
.animate-change {
background-color:green;
@@ -208,6 +209,11 @@
.open-buyTicket {
font-size:1.2em;
}
+
+ .show-my-trades-only {
+ float: right;
+ margin: 0.5em 0.5em;
+ }
</style>
<!--script type="text/javascript" src="https://code.jquery.com/ui/1.10.4/jquery-ui.min.js" type="text/javascript"></script-->
</head>
@@ -1295,6 +1301,7 @@ <h3 class="box-title"><span data-i18n="buy_orders">Buy Orders</span> <span id="b
<div class="box box-primary" style="max-height:500px;overflow:auto;margin-bottom:10px;">
<div class="box-header">
<h3 class="box-title" data-i18n="trade_history">Trade History</h3>
+ <label class="show-my-trades-only"><input id="ae_show_my_trades_only" type="checkbox"> Show only my trades.</label>
</div>
<div class="box-body no-padding">
<div class="data-container data-loading" data-no-padding="true">
@@ -674,6 +674,7 @@ var NRS = (function(NRS, $, undefined) {
//todo NRS.currentSubPageID ??...
NRS.sendRequest("getTrades+" + assetId, {
"asset": assetId,
+ "account": ($("#ae_show_my_trades_only").is(":checked")) ? $("#account_id").text() : "",
"firstIndex": 0,
"lastIndex": 50
}, function(response, input) {
@@ -699,6 +700,13 @@ var NRS = (function(NRS, $, undefined) {
});
}
+ // if this is clicked we can assume there is asset selected
+ // might need to implement some safety check just in case.
+ // LithStud 2016.11.17
+ $("#ae_show_my_trades_only").on("change", function() {
+ $("#asset_exchange_sidebar a.active").trigger("click");
+ });
+
NRS.loadAssetOrders = function(type, assetId, refresh) {
type = type.toLowerCase();

0 comments on commit 6df096b

Please sign in to comment.