- Contract.php: 返回合约账户余额(balance_contract) - My.php: 地址管理增加BTC/ETH - AppContract.php: 一键平仓(closeall) - AppProxy.php: 代理专属注册链接 + 分级权限(L1/L2) - site.php: 手续费减半(0.018→0.009) - agent_permission_setup.sql: 代理权限SQL - crypto_news_crawler.py: 新闻自动采集脚本
81 lines
2.7 KiB
JavaScript
Executable File
81 lines
2.7 KiB
JavaScript
Executable File
/**
|
|
* @author: Dennis Hernández
|
|
* @webSite: http://djhvscf.github.io/Blog
|
|
* @version: v1.0.0
|
|
*
|
|
* @update zhixin wen <wenzhixin2010@gmail.com>
|
|
*/
|
|
|
|
!function ($) {
|
|
|
|
'use strict';
|
|
|
|
$.extend($.fn.bootstrapTable.defaults, {
|
|
keyEvents: false
|
|
});
|
|
|
|
var BootstrapTable = $.fn.bootstrapTable.Constructor,
|
|
_init = BootstrapTable.prototype.init;
|
|
|
|
BootstrapTable.prototype.init = function () {
|
|
_init.apply(this, Array.prototype.slice.apply(arguments));
|
|
this.initKeyEvents();
|
|
};
|
|
|
|
BootstrapTable.prototype.initKeyEvents = function () {
|
|
if (this.options.keyEvents) {
|
|
var that = this;
|
|
|
|
$(document).off('keydown').on('keydown', function (e) {
|
|
var $search = that.$toolbar.find('.search input'),
|
|
$refresh = that.$toolbar.find('button[name="refresh"]'),
|
|
$toggle = that.$toolbar.find('button[name="toggle"]'),
|
|
$paginationSwitch = that.$toolbar.find('button[name="paginationSwitch"]');
|
|
|
|
if (document.activeElement === $search.get(0) || !$.contains(document.activeElement ,that.$toolbar.get(0))) {
|
|
return true;
|
|
}
|
|
|
|
switch (e.keyCode) {
|
|
case 83: //s
|
|
if (!that.options.search) {
|
|
return;
|
|
}
|
|
$search.focus();
|
|
return false;
|
|
case 82: //r
|
|
if (!that.options.showRefresh) {
|
|
return;
|
|
}
|
|
$refresh.click();
|
|
return false;
|
|
case 84: //t
|
|
if (!that.options.showToggle) {
|
|
return;
|
|
}
|
|
$toggle.click();
|
|
return false;
|
|
case 80: //p
|
|
if (!that.options.showPaginationSwitch) {
|
|
return;
|
|
}
|
|
$paginationSwitch.click();
|
|
return false;
|
|
case 37: // left
|
|
if (!that.options.pagination) {
|
|
return;
|
|
}
|
|
that.prevPage();
|
|
return false;
|
|
case 39: // right
|
|
if (!that.options.pagination) {
|
|
return;
|
|
}
|
|
that.nextPage();
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
};
|
|
}(jQuery);
|