Skip to content

Commit

Permalink
Merge branch 'master' into matching-engine
Browse files Browse the repository at this point in the history
Conflicts:
	Gemfile
  • Loading branch information
Jan Xie committed Mar 24, 2014
2 parents a1723cb + a01a242 commit 54b9275
Show file tree
Hide file tree
Showing 104 changed files with 5,581 additions and 467 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
# Ignore the default SQLite database.
/db/*.sqlite3

# Ignore config ymls
/config/database.yml
/config/application.yml

# Ignore all logfiles and tempfiles.
/log/*.log
/log/*.pid
Expand All @@ -28,6 +32,9 @@
# Ignore ctags
.tags

# Ignore vim temporary files
**/*.swp

/vendor/bundle
.env
.ruby-version
55 changes: 33 additions & 22 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,42 @@ gem 'rails'

gem 'mysql2'
gem 'daemons-rails'

gem 'qrencoder'
gem 'rotp'
gem 'json'
gem 'jbuilder'
gem 'bcrypt-ruby', '~> 3.1.2'

gem 'omniauth'
gem 'omniauth-identity'
gem 'qrencoder'

gem 'figaro'
gem 'settingslogic'

gem 'aasm'
gem 'cancan'
gem 'enumerize'
gem 'datagrid'
gem 'cached_resource'
gem 'acts-as-taggable-on'
gem 'kaminari'
gem 'paranoid2'
gem 'active_hash'
gem 'http_accept_language'
gem "globalize", "~> 4.0.0"
gem 'paper_trail', '~> 3.0.1'

gem 'pusher'

gem 'gon'
gem 'resque'
gem 'resque_mailer'
gem 'resque-scheduler'

gem 'rails-i18n'
gem 'i18n-js'
gem 'rotp'
gem 'figaro'

gem 'simple_form', '3.0.1'
gem 'slim-rails'
gem 'less-rails'
Expand All @@ -25,30 +54,12 @@ gem 'bootstrap-on-rails'
gem 'font-awesome-less'
gem 'momentjs-rails'
gem 'flot-rails'
gem 'cached_resource'
gem 'handlebars_assets'
gem 'recaptcha', :require => 'recaptcha/rails'
gem 'browser'
gem 'datagrid'
gem 'introjs-rails'
gem 'enumerize'
gem 'cancan'
gem 'gon'
gem 'json'
gem 'rbtree'
gem 'resque'
gem 'resque_mailer'
gem 'resque-scheduler'
gem 'settingslogic'
gem 'paranoid2'
gem 'kaminari'
gem 'bcrypt-ruby', '~> 3.1.2'
gem 'jbuilder'
gem 'acts-as-taggable-on'
gem 'active_hash'
gem 'pusher'
gem 'http_accept_language'
gem "globalize", "~> 4.0.0"
gem 'liability-proof', '0.0.5'

group :development, :test do
gem 'factory_girl_rails'
Expand Down
10 changes: 10 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
aasm (3.1.1)
actionmailer (4.0.2)
actionpack (= 4.0.2)
mail (~> 2.5.4)
Expand Down Expand Up @@ -36,6 +37,7 @@ GEM
addressable (2.3.5)
arel (4.0.1)
atomic (1.1.14)
awesome_print (1.2.0)
bcrypt-ruby (3.1.2)
better_errors (1.1.0)
coderay (>= 1.0.0)
Expand Down Expand Up @@ -149,6 +151,8 @@ GEM
less-rails (2.4.2)
actionpack (>= 3.1)
less (~> 2.4.0)
liability-proof (0.0.5)
awesome_print
libv8 (3.16.14.3)
mail (2.5.4)
mime-types (~> 1.16)
Expand Down Expand Up @@ -186,6 +190,9 @@ GEM
bcrypt-ruby (~> 3.0)
omniauth (~> 1.0)
open4 (1.3.0)
paper_trail (3.0.1)
activerecord (>= 3.0, < 5.0)
activesupport (>= 3.0, < 5.0)
paranoid2 (1.1.3)
activerecord (>= 4.0.0.rc1)
poltergeist (1.5.0)
Expand Down Expand Up @@ -339,6 +346,7 @@ PLATFORMS
ruby

DEPENDENCIES
aasm
active_hash
acts-as-taggable-on
bcrypt-ruby (~> 3.1.2)
Expand Down Expand Up @@ -374,6 +382,7 @@ DEPENDENCIES
kaminari
launchy
less-rails
liability-proof (= 0.0.5)
mails_viewer
meta_request
mina
Expand All @@ -382,6 +391,7 @@ DEPENDENCIES
mysql2
omniauth
omniauth-identity
paper_trail (~> 3.0.1)
paranoid2
poltergeist
pry-rails
Expand Down
10 changes: 8 additions & 2 deletions app/assets/javascripts/app.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ I18n.defaultLocale = 'en'
I18n.locale = gon.local

$ ->
if $('#assets-index').length
$.scrollIt
topOffset: -180
activeClass: 'active'

$.fn.extend
fixAsk: ->
if $(@).text().length
Expand Down Expand Up @@ -35,7 +40,7 @@ $ ->
window.fixBid = (str) ->
window.fix('bid', str)

$('[data-clipboard-text]').each ->
$('[data-clipboard-text], [data-clipboard-target]').each ->
zero = new ZeroClipboard($(@))

zero.on 'complete', ->
Expand All @@ -53,7 +58,7 @@ $ ->

if gon.env is 'development'
Pusher.log = (message) ->
window.console && console.log(message)
#window.console && console.log(message)

pusher = new Pusher(gon.pusher_key, {encrypted: true});

Expand Down Expand Up @@ -84,3 +89,4 @@ $ ->

$(".ask-panel, .bid-panel").click ->
$(document).trigger('history::resize', gon.history_height)

2 changes: 2 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
//= require bootstrap-datetimepicker
//= require bootstrap-wysiwyg
//
//= require scrollIt
//= require moment
//= require numeral
//= require bignumber
Expand All @@ -39,6 +40,7 @@
//= require pusher.min
//= require i18n
//= require i18n/translations
//= require selectize

//= require_tree ./component_data
//= require_tree ./component_ui
Expand Down
70 changes: 70 additions & 0 deletions app/assets/javascripts/withdraw_selectize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
$(function(){
Selectize.define('option_destroy', function() {
var self = this;
this.onOptionSelect = (function() {
var original = self.onOptionSelect;
return function(e) {
$target = $(e.target);
if ($target.hasClass('destroy-withdraw-address')) {
$.ajax({
url: '/withdraw_addresses/' + $target.data('addr-id'),
type: 'DELETE'
}).done(function(){
self.load(self.settings.load);
self.open();
});
} else {
original.apply(this, arguments);
}
};
})();
});

$('select#withdraw_address').selectize({
plugins: ['option_destroy'],
preload: true,
createOnBlur: true,
valueField: 'address',
labelField: 'label',
searchField: ['label', 'address'],
create: function(input){
return {
address: input,
label: 'label'
}
},
render: {
option: function(item, escape) {
return '<div><div>' +
'<span>' + escape(item.address) + '</span>' +
'</div>' +
'<div>' +
'<span class="lead">' + escape(item.label) + '</span>' +
'<a class="destroy-withdraw-address pull-right" href="javascript:void(0)" data-addr-id="' + item.id + '"> Delete </a>' +
'</div></div>';
}
},
load: function(query, callback) {
var self = this;
if(!callback){
callback = query;
query = '';
}
$.ajax({
url: '/withdraw_addresses?currency=' + $('input#withdraw_currency').val() + '&query=' + encodeURIComponent(query),
type: 'GET',
error: function() {
callback();
},
success: function(res) {
self.clearOptions();
callback(res);
}
});
},
onItemAdd: function(value, $item) {
$('form input#withdraw_address_label').val($item.text());
$item.text(value);
}
});
});
2 changes: 2 additions & 0 deletions app/assets/stylesheets/application.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
@import 'bootstrap_and_overrides';
@import 'bootstrap-datetimepicker.css';
@import 'font-awesome';
@import 'selectize.bootstrap3';
@import 'basic';
@import 'layout';
@import 'welcome';
@import 'market';
@import 'assets';
@import 'ticker';
@import 'admin';

Expand Down
74 changes: 74 additions & 0 deletions app/assets/stylesheets/assets.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#assets-index {

header {
.navbar-fixed-top {
background-color: #f2f2f2;
}
}

.assets {
margin: 40px 0;

.title {
width: 200px;
}

.currency {
font-weight: bold;
color: #fdbb00;
}
}

.proof {
.json {
margin-top: 40px;
code {
font-size: .8em;
color: #666;
}
}
}

.proof-bottom {
text-align: center;
}

ul.assets-nav {
margin-bottom: 20px;

li {
font-size: 14px;
text-align: center;
padding: 10px 15px 0 10px;
border-bottom: 3px solid #ccc;

a {
color: #ccc;
font-weight: bold;
}

a:after {
content: "";
width: 12px;
height: 12px;
color: #ccc;
background-color: #f2f2f2;
border: 2px solid #ccc;
border-radius: 6px;
position: absolute;
top: 36px;
left: 50%;
}
}

li.active {
a {
color: #888;
}

a:after {
background-color: #888;
}
}
}
}
4 changes: 2 additions & 2 deletions app/assets/stylesheets/layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ footer {
}

#content {
font-size: 16px;
font-size: 14px;
border-left: 1px solid #DDD;
padding-top: 15px;

Expand Down Expand Up @@ -62,6 +62,6 @@ footer {
}

#guide {
font-size: 16px;
font-size: 14px;
padding-left: 26px;
}
Loading

0 comments on commit 54b9275

Please sign in to comment.