character 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 458133239b35522811a9d45e7a7aa6dc23d2550b
4
- data.tar.gz: cd08086e12ecd53d63cb270a750837a4c757d31d
3
+ metadata.gz: 8a8bba0296e43c12ead4fe669043d298d156c50e
4
+ data.tar.gz: bfaa09e984bd3f63e91cfbca3b8d7bb2dde94002
5
5
  SHA512:
6
- metadata.gz: d48c04a9f210fda478393335b4e0a2a33154f5002c347915d788c5187239e4f180026e0d43d9508dd41693e6783a9a049e13e6c5b5fff1dc02812b1999be7a6f
7
- data.tar.gz: bb77c36d5b7e60d9daf2349d4953cf828d068ad63adcdd3676cf1e3ee66a386a30ec6d926feddb5ca70a5e3cdfb8cf72de6457614e1b3d388726970d0befd507
6
+ metadata.gz: 3aa6b85efd05c33bfbb9839e33a05ec7e83ab2deaf4b52dde7e35d007b35aee505d8f894004cfd606886d1ad228804de8847f24d2e590ad996840b5e30215b96
7
+ data.tar.gz: 86cce4addd1212901169e3c11cec556fec07f146af9132749dfc21534db5b2839ebc7193757d8942afaf088094796cafffa255d5f8eaa76fa60336b378dc8206
@@ -96,9 +96,13 @@
96
96
  @ui.listContent.find('.selected').removeClass 'selected'
97
97
 
98
98
  $el.toggleClass 'selected'
99
- @ui.insertButton.removeClass 'disabled'
100
99
 
101
- @ui.deleteButton.show()
100
+ if @ui.listContent.find('.selected').length > 0
101
+ @ui.insertButton.removeClass 'disabled'
102
+ @ui.deleteButton.show()
103
+ else
104
+ @ui.insertButton.addClass 'disabled'
105
+ @ui.deleteButton.hide()
102
106
 
103
107
  _deleteImage: (e) ->
104
108
  if confirm("""Delete selected image?""")
@@ -20,14 +20,6 @@ Gem::Specification.new do |gem|
20
20
  # Supress the warning about no rubyforge project
21
21
  gem.rubyforge_project = 'nowarning'
22
22
 
23
-
24
- # automated tests
25
- gem.add_development_dependency 'rails', '~> 4.1.0'
26
- gem.add_development_dependency 'database_cleaner'
27
- gem.add_development_dependency 'factory_girl_rails'
28
- gem.add_development_dependency 'minitest-reporters'
29
- gem.add_development_dependency 'minitest-focus'
30
-
31
23
  # javascript
32
24
  gem.add_runtime_dependency 'underscore-rails'
33
25
  gem.add_runtime_dependency 'marionette-rails', '~> 2.0.0'
@@ -37,9 +29,9 @@ Gem::Specification.new do |gem|
37
29
  gem.add_runtime_dependency 'modernizr-rails'
38
30
 
39
31
  # css
40
- gem.add_runtime_dependency 'rhythm'
41
32
  gem.add_runtime_dependency 'compass-rails'
42
33
  gem.add_runtime_dependency 'font-awesome-rails'
34
+ gem.add_runtime_dependency 'rhythm'
43
35
  gem.add_runtime_dependency 'simple_form_scss'
44
36
 
45
37
  # authentication
@@ -56,7 +48,6 @@ Gem::Specification.new do |gem|
56
48
  gem.add_runtime_dependency 'kaminari'
57
49
 
58
50
  # blog
59
- # gem.add_runtime_dependency 'mongoid' <- for now you have to pick github version manually for Rails 4
60
51
  gem.add_runtime_dependency 'mongoid_slug'
61
52
  gem.add_runtime_dependency 'mongoid_search'
62
53
  gem.add_runtime_dependency 'mini_magick'
@@ -64,4 +55,11 @@ Gem::Specification.new do |gem|
64
55
 
65
56
  # analytics
66
57
  gem.add_runtime_dependency 'google-api-client'
58
+
59
+ # automated tests
60
+ gem.add_development_dependency 'rails', '~> 4.1.2'
61
+ gem.add_development_dependency 'database_cleaner'
62
+ gem.add_development_dependency 'factory_girl_rails'
63
+ gem.add_development_dependency 'minitest-reporters'
64
+ gem.add_development_dependency 'minitest-focus'
67
65
  end
@@ -1,3 +1,3 @@
1
1
  module Character
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
@@ -1,20 +1,35 @@
1
- // Backbone.js 1.1.0
1
+ // Backbone.js 1.1.2
2
2
 
3
- // (c) 2010-2011 Jeremy Ashkenas, DocumentCloud Inc.
4
- // (c) 2011-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3
+ // (c) 2010-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
5
4
  // Backbone may be freely distributed under the MIT license.
6
5
  // For all details and documentation:
7
6
  // http://backbonejs.org
8
7
 
9
- (function(){
8
+ (function(root, factory) {
9
+
10
+ // Set up Backbone appropriately for the environment. Start with AMD.
11
+ if (typeof define === 'function' && define.amd) {
12
+ define(['underscore', 'jquery', 'exports'], function(_, $, exports) {
13
+ // Export global even in AMD case in case this script is loaded with
14
+ // others that may still expect a global Backbone.
15
+ root.Backbone = factory(root, exports, _, $);
16
+ });
17
+
18
+ // Next for Node.js or CommonJS. jQuery may not be needed as a module.
19
+ } else if (typeof exports !== 'undefined') {
20
+ var _ = require('underscore');
21
+ factory(root, exports, _);
22
+
23
+ // Finally, as a browser global.
24
+ } else {
25
+ root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$));
26
+ }
27
+
28
+ }(this, function(root, Backbone, _, $) {
10
29
 
11
30
  // Initial Setup
12
31
  // -------------
13
32
 
14
- // Save a reference to the global object (`window` in the browser, `exports`
15
- // on the server).
16
- var root = this;
17
-
18
33
  // Save the previous value of the `Backbone` variable, so that it can be
19
34
  // restored later on, if `noConflict` is used.
20
35
  var previousBackbone = root.Backbone;
@@ -25,25 +40,12 @@
25
40
  var slice = array.slice;
26
41
  var splice = array.splice;
27
42
 
28
- // The top-level namespace. All public Backbone classes and modules will
29
- // be attached to this. Exported for both the browser and the server.
30
- var Backbone;
31
- if (typeof exports !== 'undefined') {
32
- Backbone = exports;
33
- } else {
34
- Backbone = root.Backbone = {};
35
- }
36
-
37
43
  // Current version of the library. Keep in sync with `package.json`.
38
- Backbone.VERSION = '1.1.0';
39
-
40
- // Require Underscore, if we're on the server, and it's not already present.
41
- var _ = root._;
42
- if (!_ && (typeof require !== 'undefined')) _ = require('underscore');
44
+ Backbone.VERSION = '1.1.2';
43
45
 
44
46
  // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
45
47
  // the `$` variable.
46
- Backbone.$ = root.jQuery || root.Zepto || root.ender || root.$;
48
+ Backbone.$ = $;
47
49
 
48
50
  // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
49
51
  // to its previous owner. Returns a reference to this Backbone object.
@@ -109,7 +111,7 @@
109
111
  var retain, ev, events, names, i, l, j, k;
110
112
  if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;
111
113
  if (!name && !callback && !context) {
112
- this._events = {};
114
+ this._events = void 0;
113
115
  return this;
114
116
  }
115
117
  names = name ? [name] : _.keys(this._events);
@@ -205,7 +207,7 @@
205
207
  case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;
206
208
  case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;
207
209
  case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;
208
- default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args);
210
+ default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return;
209
211
  }
210
212
  };
211
213
 
@@ -350,7 +352,7 @@
350
352
 
351
353
  // Trigger all relevant attribute changes.
352
354
  if (!silent) {
353
- if (changes.length) this._pending = true;
355
+ if (changes.length) this._pending = options;
354
356
  for (var i = 0, l = changes.length; i < l; i++) {
355
357
  this.trigger('change:' + changes[i], this, current[changes[i]], options);
356
358
  }
@@ -361,6 +363,7 @@
361
363
  if (changing) return this;
362
364
  if (!silent) {
363
365
  while (this._pending) {
366
+ options = this._pending;
364
367
  this._pending = false;
365
368
  this.trigger('change', this, options);
366
369
  }
@@ -528,9 +531,12 @@
528
531
  // using Backbone's restful methods, override this to change the endpoint
529
532
  // that will be called.
530
533
  url: function() {
531
- var base = _.result(this, 'urlRoot') || _.result(this.collection, 'url') || urlError();
534
+ var base =
535
+ _.result(this, 'urlRoot') ||
536
+ _.result(this.collection, 'url') ||
537
+ urlError();
532
538
  if (this.isNew()) return base;
533
- return base + (base.charAt(base.length - 1) === '/' ? '' : '/') + encodeURIComponent(this.id);
539
+ return base.replace(/([^\/])$/, '$1/') + encodeURIComponent(this.id);
534
540
  },
535
541
 
536
542
  // **parse** converts a response into the hash of attributes to be `set` on
@@ -546,7 +552,7 @@
546
552
 
547
553
  // A model is new if it has never been saved to the server, and lacks an id.
548
554
  isNew: function() {
549
- return this.id == null;
555
+ return !this.has(this.idAttribute);
550
556
  },
551
557
 
552
558
  // Check if the model is currently in a valid state.
@@ -650,7 +656,7 @@
650
656
  options.index = index;
651
657
  model.trigger('remove', model, this, options);
652
658
  }
653
- this._removeReference(model);
659
+ this._removeReference(model, options);
654
660
  }
655
661
  return singular ? models[0] : models;
656
662
  },
@@ -676,11 +682,11 @@
676
682
  // Turn bare objects into model references, and prevent invalid models
677
683
  // from being added.
678
684
  for (i = 0, l = models.length; i < l; i++) {
679
- attrs = models[i];
685
+ attrs = models[i] || {};
680
686
  if (attrs instanceof Model) {
681
687
  id = model = attrs;
682
688
  } else {
683
- id = attrs[targetModel.prototype.idAttribute];
689
+ id = attrs[targetModel.prototype.idAttribute || 'id'];
684
690
  }
685
691
 
686
692
  // If a duplicate is found, prevent it from being added and
@@ -700,14 +706,13 @@
700
706
  model = models[i] = this._prepareModel(attrs, options);
701
707
  if (!model) continue;
702
708
  toAdd.push(model);
703
-
704
- // Listen to added models' events, and index models for lookup by
705
- // `id` and by `cid`.
706
- model.on('all', this._onModelEvent, this);
707
- this._byId[model.cid] = model;
708
- if (model.id != null) this._byId[model.id] = model;
709
+ this._addReference(model, options);
709
710
  }
710
- if (order) order.push(existing || model);
711
+
712
+ // Do not add multiple models with the same `id`.
713
+ model = existing || model;
714
+ if (order && (model.isNew() || !modelMap[model.id])) order.push(model);
715
+ modelMap[model.id] = true;
711
716
  }
712
717
 
713
718
  // Remove nonexistent models if appropriate.
@@ -745,7 +750,7 @@
745
750
  }
746
751
  if (sort || (order && order.length)) this.trigger('sort', this, options);
747
752
  }
748
-
753
+
749
754
  // Return the added (or merged) model (or models).
750
755
  return singular ? models[0] : models;
751
756
  },
@@ -757,7 +762,7 @@
757
762
  reset: function(models, options) {
758
763
  options || (options = {});
759
764
  for (var i = 0, l = this.models.length; i < l; i++) {
760
- this._removeReference(this.models[i]);
765
+ this._removeReference(this.models[i], options);
761
766
  }
762
767
  options.previousModels = this.models;
763
768
  this._reset();
@@ -798,7 +803,7 @@
798
803
  // Get a model from the set by id.
799
804
  get: function(obj) {
800
805
  if (obj == null) return void 0;
801
- return this._byId[obj.id] || this._byId[obj.cid] || this._byId[obj];
806
+ return this._byId[obj] || this._byId[obj.id] || this._byId[obj.cid];
802
807
  },
803
808
 
804
809
  // Get the model at the given index.
@@ -874,7 +879,7 @@
874
879
  if (!options.wait) this.add(model, options);
875
880
  var collection = this;
876
881
  var success = options.success;
877
- options.success = function(model, resp, options) {
882
+ options.success = function(model, resp) {
878
883
  if (options.wait) collection.add(model, options);
879
884
  if (success) success(model, resp, options);
880
885
  };
@@ -904,10 +909,7 @@
904
909
  // Prepare a hash of attributes (or other model) to be added to this
905
910
  // collection.
906
911
  _prepareModel: function(attrs, options) {
907
- if (attrs instanceof Model) {
908
- if (!attrs.collection) attrs.collection = this;
909
- return attrs;
910
- }
912
+ if (attrs instanceof Model) return attrs;
911
913
  options = options ? _.clone(options) : {};
912
914
  options.collection = this;
913
915
  var model = new this.model(attrs, options);
@@ -916,8 +918,16 @@
916
918
  return false;
917
919
  },
918
920
 
921
+ // Internal method to create a model's ties to a collection.
922
+ _addReference: function(model, options) {
923
+ this._byId[model.cid] = model;
924
+ if (model.id != null) this._byId[model.id] = model;
925
+ if (!model.collection) model.collection = this;
926
+ model.on('all', this._onModelEvent, this);
927
+ },
928
+
919
929
  // Internal method to sever a model's ties to a collection.
920
- _removeReference: function(model) {
930
+ _removeReference: function(model, options) {
921
931
  if (this === model.collection) delete model.collection;
922
932
  model.off('all', this._onModelEvent, this);
923
933
  },
@@ -946,7 +956,7 @@
946
956
  'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke',
947
957
  'max', 'min', 'toArray', 'size', 'first', 'head', 'take', 'initial', 'rest',
948
958
  'tail', 'drop', 'last', 'without', 'difference', 'indexOf', 'shuffle',
949
- 'lastIndexOf', 'isEmpty', 'chain'];
959
+ 'lastIndexOf', 'isEmpty', 'chain', 'sample'];
950
960
 
951
961
  // Mix in each Underscore method as a proxy to `Collection#models`.
952
962
  _.each(methods, function(method) {
@@ -958,7 +968,7 @@
958
968
  });
959
969
 
960
970
  // Underscore methods that take a property name as an argument.
961
- var attributeMethods = ['groupBy', 'countBy', 'sortBy'];
971
+ var attributeMethods = ['groupBy', 'countBy', 'sortBy', 'indexBy'];
962
972
 
963
973
  // Use attributes instead of properties.
964
974
  _.each(attributeMethods, function(method) {
@@ -1180,7 +1190,9 @@
1180
1190
  return xhr;
1181
1191
  };
1182
1192
 
1183
- var noXhrPatch = typeof window !== 'undefined' && !!window.ActiveXObject && !(window.XMLHttpRequest && (new XMLHttpRequest).dispatchEvent);
1193
+ var noXhrPatch =
1194
+ typeof window !== 'undefined' && !!window.ActiveXObject &&
1195
+ !(window.XMLHttpRequest && (new XMLHttpRequest).dispatchEvent);
1184
1196
 
1185
1197
  // Map from CRUD to HTTP for our default `Backbone.sync` implementation.
1186
1198
  var methodMap = {
@@ -1239,7 +1251,7 @@
1239
1251
  var router = this;
1240
1252
  Backbone.history.route(route, function(fragment) {
1241
1253
  var args = router._extractParameters(route, fragment);
1242
- callback && callback.apply(router, args);
1254
+ router.execute(callback, args);
1243
1255
  router.trigger.apply(router, ['route:' + name].concat(args));
1244
1256
  router.trigger('route', name, args);
1245
1257
  Backbone.history.trigger('route', router, name, args);
@@ -1247,6 +1259,12 @@
1247
1259
  return this;
1248
1260
  },
1249
1261
 
1262
+ // Execute a route handler with the provided parameters. This is an
1263
+ // excellent place to do pre-route setup or post-route cleanup.
1264
+ execute: function(callback, args) {
1265
+ if (callback) callback.apply(this, args);
1266
+ },
1267
+
1250
1268
  // Simple proxy to `Backbone.history` to save a fragment into the history.
1251
1269
  navigate: function(fragment, options) {
1252
1270
  Backbone.history.navigate(fragment, options);
@@ -1271,10 +1289,10 @@
1271
1289
  route = route.replace(escapeRegExp, '\\$&')
1272
1290
  .replace(optionalParam, '(?:$1)?')
1273
1291
  .replace(namedParam, function(match, optional) {
1274
- return optional ? match : '([^\/]+)';
1292
+ return optional ? match : '([^/?]+)';
1275
1293
  })
1276
- .replace(splatParam, '(.*?)');
1277
- return new RegExp('^' + route + '$');
1294
+ .replace(splatParam, '([^?]*?)');
1295
+ return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
1278
1296
  },
1279
1297
 
1280
1298
  // Given a route, and a URL fragment that it matches, return the array of
@@ -1282,7 +1300,9 @@
1282
1300
  // treated as `null` to normalize cross-browser behavior.
1283
1301
  _extractParameters: function(route, fragment) {
1284
1302
  var params = route.exec(fragment).slice(1);
1285
- return _.map(params, function(param) {
1303
+ return _.map(params, function(param, i) {
1304
+ // Don't decode the search params.
1305
+ if (i === params.length - 1) return param || null;
1286
1306
  return param ? decodeURIComponent(param) : null;
1287
1307
  });
1288
1308
  }
@@ -1320,8 +1340,8 @@
1320
1340
  // Cached regex for removing a trailing slash.
1321
1341
  var trailingSlash = /\/$/;
1322
1342
 
1323
- // Cached regex for stripping urls of hash and query.
1324
- var pathStripper = /[?#].*$/;
1343
+ // Cached regex for stripping urls of hash.
1344
+ var pathStripper = /#.*$/;
1325
1345
 
1326
1346
  // Has the history handling already been started?
1327
1347
  History.started = false;
@@ -1333,6 +1353,11 @@
1333
1353
  // twenty times a second.
1334
1354
  interval: 50,
1335
1355
 
1356
+ // Are we at the app root?
1357
+ atRoot: function() {
1358
+ return this.location.pathname.replace(/[^\/]$/, '$&/') === this.root;
1359
+ },
1360
+
1336
1361
  // Gets the true hash value. Cannot use location.hash directly due to bug
1337
1362
  // in Firefox where location.hash will always be decoded.
1338
1363
  getHash: function(window) {
@@ -1345,7 +1370,7 @@
1345
1370
  getFragment: function(fragment, forcePushState) {
1346
1371
  if (fragment == null) {
1347
1372
  if (this._hasPushState || !this._wantsHashChange || forcePushState) {
1348
- fragment = this.location.pathname;
1373
+ fragment = decodeURI(this.location.pathname + this.location.search);
1349
1374
  var root = this.root.replace(trailingSlash, '');
1350
1375
  if (!fragment.indexOf(root)) fragment = fragment.slice(root.length);
1351
1376
  } else {
@@ -1376,7 +1401,8 @@
1376
1401
  this.root = ('/' + this.root + '/').replace(rootStripper, '/');
1377
1402
 
1378
1403
  if (oldIE && this._wantsHashChange) {
1379
- this.iframe = Backbone.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow;
1404
+ var frame = Backbone.$('<iframe src="javascript:0" tabindex="-1">');
1405
+ this.iframe = frame.hide().appendTo('body')[0].contentWindow;
1380
1406
  this.navigate(fragment);
1381
1407
  }
1382
1408
 
@@ -1394,7 +1420,6 @@
1394
1420
  // opened by a non-pushState browser.
1395
1421
  this.fragment = fragment;
1396
1422
  var loc = this.location;
1397
- var atRoot = loc.pathname.replace(/[^\/]$/, '$&/') === this.root;
1398
1423
 
1399
1424
  // Transition from hashChange to pushState or vice versa if both are
1400
1425
  // requested.
@@ -1402,17 +1427,17 @@
1402
1427
 
1403
1428
  // If we've started off with a route from a `pushState`-enabled
1404
1429
  // browser, but we're currently in a browser that doesn't support it...
1405
- if (!this._hasPushState && !atRoot) {
1430
+ if (!this._hasPushState && !this.atRoot()) {
1406
1431
  this.fragment = this.getFragment(null, true);
1407
- this.location.replace(this.root + this.location.search + '#' + this.fragment);
1432
+ this.location.replace(this.root + '#' + this.fragment);
1408
1433
  // Return immediately as browser will do redirect to new url
1409
1434
  return true;
1410
1435
 
1411
1436
  // Or if we've started out with a hash-based route, but we're currently
1412
1437
  // in a browser where it could be `pushState`-based instead...
1413
- } else if (this._hasPushState && atRoot && loc.hash) {
1438
+ } else if (this._hasPushState && this.atRoot() && loc.hash) {
1414
1439
  this.fragment = this.getHash().replace(routeStripper, '');
1415
- this.history.replaceState({}, document.title, this.root + this.fragment + loc.search);
1440
+ this.history.replaceState({}, document.title, this.root + this.fragment);
1416
1441
  }
1417
1442
 
1418
1443
  }
@@ -1424,7 +1449,7 @@
1424
1449
  // but possibly useful for unit testing Routers.
1425
1450
  stop: function() {
1426
1451
  Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl);
1427
- clearInterval(this._checkUrlInterval);
1452
+ if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);
1428
1453
  History.started = false;
1429
1454
  },
1430
1455
 
@@ -1472,7 +1497,7 @@
1472
1497
 
1473
1498
  var url = this.root + (fragment = this.getFragment(fragment || ''));
1474
1499
 
1475
- // Strip the fragment of the query and hash for matching.
1500
+ // Strip the hash for matching.
1476
1501
  fragment = fragment.replace(pathStripper, '');
1477
1502
 
1478
1503
  if (this.fragment === fragment) return;
@@ -1578,4 +1603,6 @@
1578
1603
  };
1579
1604
  };
1580
1605
 
1581
- }).call(this);
1606
+ return Backbone;
1607
+
1608
+ }));
@@ -127,8 +127,7 @@ Licensed under the BSD-2-Clause License.
127
127
  var offset, touch;
128
128
  touch = evt.originalEvent.touches[0] || evt.originalEvent.changedTouches[0];
129
129
  offset = _this.el.offset();
130
- _this.fire('hover', touch.pageX - offset.left, touch.pageY - offset.top);
131
- return touch;
130
+ return _this.fire('hovermove', touch.pageX - offset.left, touch.pageY - offset.top);
132
131
  });
133
132
  this.el.bind('click', function(evt) {
134
133
  var offset;
@@ -160,6 +159,7 @@ Licensed under the BSD-2-Clause License.
160
159
  return _this.timeoutId = window.setTimeout(_this.resizeHandler, 100);
161
160
  });
162
161
  }
162
+ this.el.css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)');
163
163
  if (this.postInit) {
164
164
  this.postInit();
165
165
  }
@@ -663,9 +663,13 @@ Licensed under the BSD-2-Clause License.
663
663
  }
664
664
 
665
665
  Hover.prototype.update = function(html, x, y) {
666
- this.html(html);
667
- this.show();
668
- return this.moveTo(x, y);
666
+ if (!html) {
667
+ return this.hide();
668
+ } else {
669
+ this.html(html);
670
+ this.show();
671
+ return this.moveTo(x, y);
672
+ }
669
673
  };
670
674
 
671
675
  Hover.prototype.html = function(content) {
@@ -1482,7 +1486,7 @@ Licensed under the BSD-2-Clause License.
1482
1486
  Bar.prototype.drawSeries = function() {
1483
1487
  var barWidth, bottom, groupWidth, idx, lastTop, left, leftPadding, numBars, row, sidx, size, spaceLeft, top, ypos, zeroPos;
1484
1488
  groupWidth = this.width / this.options.data.length;
1485
- numBars = this.options.stacked != null ? 1 : this.options.ykeys.length;
1489
+ numBars = this.options.stacked ? 1 : this.options.ykeys.length;
1486
1490
  barWidth = (groupWidth * this.options.barSizeRatio - this.options.barGap * (numBars - 1)) / numBars;
1487
1491
  if (this.options.barSize) {
1488
1492
  barWidth = Math.min(barWidth, this.options.barSize);
@@ -1516,6 +1520,9 @@ Licensed under the BSD-2-Clause License.
1516
1520
  left += sidx * (barWidth + this.options.barGap);
1517
1521
  }
1518
1522
  size = bottom - top;
1523
+ if (this.options.verticalGridCondition && this.options.verticalGridCondition(row.x)) {
1524
+ this.drawBar(this.left + idx * groupWidth, this.top, groupWidth, Math.abs(this.top - this.bottom), this.options.verticalGridColor, this.options.verticalGridOpacity, this.options.barRadius);
1525
+ }
1519
1526
  if (this.options.stacked) {
1520
1527
  top -= lastTop;
1521
1528
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: character
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kravets
@@ -11,44 +11,44 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-07-15 00:00:00.000000000 Z
14
+ date: 2014-07-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: rails
17
+ name: underscore-rails
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
- - - "~>"
20
+ - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 4.1.0
23
- type: :development
22
+ version: '0'
23
+ type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 4.1.0
29
+ version: '0'
30
30
  - !ruby/object:Gem::Dependency
31
- name: database_cleaner
31
+ name: marionette-rails
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - ">="
34
+ - - "~>"
35
35
  - !ruby/object:Gem::Version
36
- version: '0'
37
- type: :development
36
+ version: 2.0.0
37
+ type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - ">="
41
+ - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: '0'
43
+ version: 2.0.0
44
44
  - !ruby/object:Gem::Dependency
45
- name: factory_girl_rails
45
+ name: jquery-ui-rails
46
46
  requirement: !ruby/object:Gem::Requirement
47
47
  requirements:
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
50
  version: '0'
51
- type: :development
51
+ type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
@@ -56,13 +56,13 @@ dependencies:
56
56
  - !ruby/object:Gem::Version
57
57
  version: '0'
58
58
  - !ruby/object:Gem::Dependency
59
- name: minitest-reporters
59
+ name: momentjs-rails
60
60
  requirement: !ruby/object:Gem::Requirement
61
61
  requirements:
62
62
  - - ">="
63
63
  - !ruby/object:Gem::Version
64
64
  version: '0'
65
- type: :development
65
+ type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
@@ -70,13 +70,13 @@ dependencies:
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
72
  - !ruby/object:Gem::Dependency
73
- name: minitest-focus
73
+ name: character_editor
74
74
  requirement: !ruby/object:Gem::Requirement
75
75
  requirements:
76
76
  - - ">="
77
77
  - !ruby/object:Gem::Version
78
78
  version: '0'
79
- type: :development
79
+ type: :runtime
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
@@ -84,7 +84,7 @@ dependencies:
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  - !ruby/object:Gem::Dependency
87
- name: underscore-rails
87
+ name: modernizr-rails
88
88
  requirement: !ruby/object:Gem::Requirement
89
89
  requirements:
90
90
  - - ">="
@@ -98,21 +98,21 @@ dependencies:
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  - !ruby/object:Gem::Dependency
101
- name: marionette-rails
101
+ name: compass-rails
102
102
  requirement: !ruby/object:Gem::Requirement
103
103
  requirements:
104
- - - "~>"
104
+ - - ">="
105
105
  - !ruby/object:Gem::Version
106
- version: 2.0.0
106
+ version: '0'
107
107
  type: :runtime
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - "~>"
111
+ - - ">="
112
112
  - !ruby/object:Gem::Version
113
- version: 2.0.0
113
+ version: '0'
114
114
  - !ruby/object:Gem::Dependency
115
- name: jquery-ui-rails
115
+ name: font-awesome-rails
116
116
  requirement: !ruby/object:Gem::Requirement
117
117
  requirements:
118
118
  - - ">="
@@ -126,7 +126,7 @@ dependencies:
126
126
  - !ruby/object:Gem::Version
127
127
  version: '0'
128
128
  - !ruby/object:Gem::Dependency
129
- name: momentjs-rails
129
+ name: rhythm
130
130
  requirement: !ruby/object:Gem::Requirement
131
131
  requirements:
132
132
  - - ">="
@@ -140,7 +140,7 @@ dependencies:
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
142
  - !ruby/object:Gem::Dependency
143
- name: character_editor
143
+ name: simple_form_scss
144
144
  requirement: !ruby/object:Gem::Requirement
145
145
  requirements:
146
146
  - - ">="
@@ -154,35 +154,35 @@ dependencies:
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  - !ruby/object:Gem::Dependency
157
- name: modernizr-rails
157
+ name: browserid-auth-rails
158
158
  requirement: !ruby/object:Gem::Requirement
159
159
  requirements:
160
- - - ">="
160
+ - - "~>"
161
161
  - !ruby/object:Gem::Version
162
- version: '0'
162
+ version: 0.5.7
163
163
  type: :runtime
164
164
  prerelease: false
165
165
  version_requirements: !ruby/object:Gem::Requirement
166
166
  requirements:
167
- - - ">="
167
+ - - "~>"
168
168
  - !ruby/object:Gem::Version
169
- version: '0'
169
+ version: 0.5.7
170
170
  - !ruby/object:Gem::Dependency
171
- name: rhythm
171
+ name: mongoid
172
172
  requirement: !ruby/object:Gem::Requirement
173
173
  requirements:
174
- - - ">="
174
+ - - "~>"
175
175
  - !ruby/object:Gem::Version
176
- version: '0'
176
+ version: 4.0.0
177
177
  type: :runtime
178
178
  prerelease: false
179
179
  version_requirements: !ruby/object:Gem::Requirement
180
180
  requirements:
181
- - - ">="
181
+ - - "~>"
182
182
  - !ruby/object:Gem::Version
183
- version: '0'
183
+ version: 4.0.0
184
184
  - !ruby/object:Gem::Dependency
185
- name: compass-rails
185
+ name: simple_form
186
186
  requirement: !ruby/object:Gem::Requirement
187
187
  requirements:
188
188
  - - ">="
@@ -196,7 +196,7 @@ dependencies:
196
196
  - !ruby/object:Gem::Version
197
197
  version: '0'
198
198
  - !ruby/object:Gem::Dependency
199
- name: font-awesome-rails
199
+ name: nested_form
200
200
  requirement: !ruby/object:Gem::Requirement
201
201
  requirements:
202
202
  - - ">="
@@ -210,7 +210,7 @@ dependencies:
210
210
  - !ruby/object:Gem::Version
211
211
  version: '0'
212
212
  - !ruby/object:Gem::Dependency
213
- name: simple_form_scss
213
+ name: kaminari
214
214
  requirement: !ruby/object:Gem::Requirement
215
215
  requirements:
216
216
  - - ">="
@@ -224,35 +224,35 @@ dependencies:
224
224
  - !ruby/object:Gem::Version
225
225
  version: '0'
226
226
  - !ruby/object:Gem::Dependency
227
- name: browserid-auth-rails
227
+ name: mongoid_slug
228
228
  requirement: !ruby/object:Gem::Requirement
229
229
  requirements:
230
- - - "~>"
230
+ - - ">="
231
231
  - !ruby/object:Gem::Version
232
- version: 0.5.7
232
+ version: '0'
233
233
  type: :runtime
234
234
  prerelease: false
235
235
  version_requirements: !ruby/object:Gem::Requirement
236
236
  requirements:
237
- - - "~>"
237
+ - - ">="
238
238
  - !ruby/object:Gem::Version
239
- version: 0.5.7
239
+ version: '0'
240
240
  - !ruby/object:Gem::Dependency
241
- name: mongoid
241
+ name: mongoid_search
242
242
  requirement: !ruby/object:Gem::Requirement
243
243
  requirements:
244
- - - "~>"
244
+ - - ">="
245
245
  - !ruby/object:Gem::Version
246
- version: 4.0.0
246
+ version: '0'
247
247
  type: :runtime
248
248
  prerelease: false
249
249
  version_requirements: !ruby/object:Gem::Requirement
250
250
  requirements:
251
- - - "~>"
251
+ - - ">="
252
252
  - !ruby/object:Gem::Version
253
- version: 4.0.0
253
+ version: '0'
254
254
  - !ruby/object:Gem::Dependency
255
- name: simple_form
255
+ name: mini_magick
256
256
  requirement: !ruby/object:Gem::Requirement
257
257
  requirements:
258
258
  - - ">="
@@ -266,7 +266,7 @@ dependencies:
266
266
  - !ruby/object:Gem::Version
267
267
  version: '0'
268
268
  - !ruby/object:Gem::Dependency
269
- name: nested_form
269
+ name: meta-tags
270
270
  requirement: !ruby/object:Gem::Requirement
271
271
  requirements:
272
272
  - - ">="
@@ -280,7 +280,7 @@ dependencies:
280
280
  - !ruby/object:Gem::Version
281
281
  version: '0'
282
282
  - !ruby/object:Gem::Dependency
283
- name: kaminari
283
+ name: google-api-client
284
284
  requirement: !ruby/object:Gem::Requirement
285
285
  requirements:
286
286
  - - ">="
@@ -294,27 +294,27 @@ dependencies:
294
294
  - !ruby/object:Gem::Version
295
295
  version: '0'
296
296
  - !ruby/object:Gem::Dependency
297
- name: mongoid_slug
297
+ name: rails
298
298
  requirement: !ruby/object:Gem::Requirement
299
299
  requirements:
300
- - - ">="
300
+ - - "~>"
301
301
  - !ruby/object:Gem::Version
302
- version: '0'
303
- type: :runtime
302
+ version: 4.1.2
303
+ type: :development
304
304
  prerelease: false
305
305
  version_requirements: !ruby/object:Gem::Requirement
306
306
  requirements:
307
- - - ">="
307
+ - - "~>"
308
308
  - !ruby/object:Gem::Version
309
- version: '0'
309
+ version: 4.1.2
310
310
  - !ruby/object:Gem::Dependency
311
- name: mongoid_search
311
+ name: database_cleaner
312
312
  requirement: !ruby/object:Gem::Requirement
313
313
  requirements:
314
314
  - - ">="
315
315
  - !ruby/object:Gem::Version
316
316
  version: '0'
317
- type: :runtime
317
+ type: :development
318
318
  prerelease: false
319
319
  version_requirements: !ruby/object:Gem::Requirement
320
320
  requirements:
@@ -322,13 +322,13 @@ dependencies:
322
322
  - !ruby/object:Gem::Version
323
323
  version: '0'
324
324
  - !ruby/object:Gem::Dependency
325
- name: mini_magick
325
+ name: factory_girl_rails
326
326
  requirement: !ruby/object:Gem::Requirement
327
327
  requirements:
328
328
  - - ">="
329
329
  - !ruby/object:Gem::Version
330
330
  version: '0'
331
- type: :runtime
331
+ type: :development
332
332
  prerelease: false
333
333
  version_requirements: !ruby/object:Gem::Requirement
334
334
  requirements:
@@ -336,13 +336,13 @@ dependencies:
336
336
  - !ruby/object:Gem::Version
337
337
  version: '0'
338
338
  - !ruby/object:Gem::Dependency
339
- name: meta-tags
339
+ name: minitest-reporters
340
340
  requirement: !ruby/object:Gem::Requirement
341
341
  requirements:
342
342
  - - ">="
343
343
  - !ruby/object:Gem::Version
344
344
  version: '0'
345
- type: :runtime
345
+ type: :development
346
346
  prerelease: false
347
347
  version_requirements: !ruby/object:Gem::Requirement
348
348
  requirements:
@@ -350,13 +350,13 @@ dependencies:
350
350
  - !ruby/object:Gem::Version
351
351
  version: '0'
352
352
  - !ruby/object:Gem::Dependency
353
- name: google-api-client
353
+ name: minitest-focus
354
354
  requirement: !ruby/object:Gem::Requirement
355
355
  requirements:
356
356
  - - ">="
357
357
  - !ruby/object:Gem::Version
358
358
  version: '0'
359
- type: :runtime
359
+ type: :development
360
360
  prerelease: false
361
361
  version_requirements: !ruby/object:Gem::Requirement
362
362
  requirements: