tao_popover 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 487bec5ea186f4dca5a1fb96983a4fbe1e443f72
4
- data.tar.gz: 8583a156bf5b8e093b97b65a1209a564f8f72b74
3
+ metadata.gz: 554c3b29117ef8069442fde3706417468b6a3827
4
+ data.tar.gz: 53a73092496cbeb0839d9105283bf4bae744d6cd
5
5
  SHA512:
6
- metadata.gz: be6afa3951ada513f9e70bcc09507f14782cbf696f42c5020f4e0b96b5a93748171a629b65888acb8390489d176f69f54c60924314f961db681cb3523928211b
7
- data.tar.gz: b972d4fd14cca6181230a4a7803e82591cf57e5f72d10bd01f9f45ed56cf8cd1be8d3c0d2f761f02288d68a9b7426a06e66f23338bf6bddd104b84b620b286ec
6
+ metadata.gz: 3f46e09af0971b3652f76f38cd70500ff452b19b01810fded3a159e9f820b7a0c954adb503915e761ddd9ef4ed20ba85ae0329421cb7a3876810af079d7459a5
7
+ data.tar.gz: 85889283a6ee2ff9eb1eb36ad6235baffe1b4dce86ceb91f132b98d5715d0b49bb68129c62ef95aba04437a3567242689bb757d7b5eac6f00dbed02d829853a2
data/dist/tao.js CHANGED
@@ -27746,21 +27746,21 @@ return jQuery;
27746
27746
  return this;
27747
27747
  };
27748
27748
 
27749
- TaoModule.get = function(propertyName, getMethod) {
27750
- return Object.defineProperty(this.prototype, propertyName, {
27749
+ TaoModule.get = function(attributeName, getMethod) {
27750
+ return Object.defineProperty(this.prototype, attributeName, {
27751
27751
  get: getMethod,
27752
27752
  configurable: true
27753
27753
  });
27754
27754
  };
27755
27755
 
27756
- TaoModule.set = function(propertyName, setMethod) {
27757
- return Object.defineProperty(this.prototype, propertyName, {
27756
+ TaoModule.set = function(attributeName, setMethod) {
27757
+ return Object.defineProperty(this.prototype, attributeName, {
27758
27758
  set: setMethod,
27759
27759
  configurable: true
27760
27760
  });
27761
27761
  };
27762
27762
 
27763
- TaoModule.property = function() {
27763
+ TaoModule.attribute = function() {
27764
27764
  var i, names, options;
27765
27765
  names = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), options = arguments[i++];
27766
27766
  if (options == null) {
@@ -27774,14 +27774,14 @@ return jQuery;
27774
27774
  return function(name) {
27775
27775
  _this.get(name, function() {
27776
27776
  var ref;
27777
- return (ref = this._properties[name]) != null ? ref : options["default"];
27777
+ return (ref = this._attributes[name]) != null ? ref : options["default"];
27778
27778
  });
27779
27779
  return _this.set(name, function(val) {
27780
27780
  var name1;
27781
- if (this._properties[name] === val) {
27781
+ if (this._attributes[name] === val) {
27782
27782
  return;
27783
27783
  }
27784
- this._properties[name] = val;
27784
+ this._attributes[name] = val;
27785
27785
  return typeof this[name1 = "_" + name + "Changed"] === "function" ? this[name1]() : void 0;
27786
27786
  });
27787
27787
  };
@@ -27793,7 +27793,7 @@ return jQuery;
27793
27793
  if (options == null) {
27794
27794
  options = {};
27795
27795
  }
27796
- this._properties = {};
27796
+ this._attributes = {};
27797
27797
  if (typeof options === 'object') {
27798
27798
  for (key in options) {
27799
27799
  val = options[key];
@@ -27874,7 +27874,9 @@ return jQuery;
27874
27874
  };
27875
27875
 
27876
27876
  TaoApplication.prototype._initI18n = function() {
27877
- return typeof I18n !== "undefined" && I18n !== null ? I18n.locale = this.locale : void 0;
27877
+ if (I18n && this.locale) {
27878
+ return I18n.locale = this.locale;
27879
+ }
27878
27880
  };
27879
27881
 
27880
27882
  TaoApplication.prototype._initIcons = function($page) {
@@ -27930,12 +27932,12 @@ return jQuery;
27930
27932
  };
27931
27933
  })(this)).on('turbolinks:render', (function(_this) {
27932
27934
  return function(e) {
27933
- return _this.trigger('page-render', [$('body > .page')]);
27935
+ return _this.trigger('page-render', [$('body > .tao-page')]);
27934
27936
  };
27935
27937
  })(this)).on('turbolinks:load', (function(_this) {
27936
27938
  return function(e) {
27937
27939
  var $page;
27938
- $page = $('body > .page');
27940
+ $page = $('body > .tao-page');
27939
27941
  if (!($page.length > 0)) {
27940
27942
  return;
27941
27943
  }
@@ -30930,21 +30932,21 @@ var Deferred = void 0;
30930
30932
  return this;
30931
30933
  };
30932
30934
 
30933
- _Class.get = function(propertyName, getMethod) {
30934
- return Object.defineProperty(this.prototype, propertyName, {
30935
+ _Class.get = function(attributeName, getMethod) {
30936
+ return Object.defineProperty(this.prototype, attributeName, {
30935
30937
  get: getMethod,
30936
30938
  configurable: true
30937
30939
  });
30938
30940
  };
30939
30941
 
30940
- _Class.set = function(propertyName, setMethod) {
30941
- return Object.defineProperty(this.prototype, propertyName, {
30942
+ _Class.set = function(attributeName, setMethod) {
30943
+ return Object.defineProperty(this.prototype, attributeName, {
30942
30944
  set: setMethod,
30943
30945
  configurable: true
30944
30946
  });
30945
30947
  };
30946
30948
 
30947
- _Class.property = function() {
30949
+ _Class.attribute = function() {
30948
30950
  var i, names, options;
30949
30951
  names = 2 <= arguments.length ? slice.call(arguments, 0, i = arguments.length - 1) : (i = 0, []), options = arguments[i++];
30950
30952
  if (options == null) {
@@ -31029,25 +31031,25 @@ var Deferred = void 0;
31029
31031
  _Class.prototype.on = function() {
31030
31032
  var args, ref;
31031
31033
  args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
31032
- return (ref = $(this)).on.apply(ref, args);
31034
+ return (ref = this.jq).on.apply(ref, args);
31033
31035
  };
31034
31036
 
31035
31037
  _Class.prototype.off = function() {
31036
31038
  var args, ref;
31037
31039
  args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
31038
- return (ref = $(this)).off.apply(ref, args);
31040
+ return (ref = this.jq).off.apply(ref, args);
31039
31041
  };
31040
31042
 
31041
31043
  _Class.prototype.trigger = function() {
31042
31044
  var args, ref;
31043
31045
  args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
31044
- return (ref = $(this)).triggerHandler.apply(ref, args);
31046
+ return (ref = this.jq).triggerHandler.apply(ref, args);
31045
31047
  };
31046
31048
 
31047
31049
  _Class.prototype.one = function() {
31048
31050
  var args, ref;
31049
31051
  args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
31050
- return (ref = $(this)).one.apply(ref, args);
31052
+ return (ref = this.jq).one.apply(ref, args);
31051
31053
  };
31052
31054
 
31053
31055
  _Class.prototype._init = function() {};
@@ -31080,7 +31082,7 @@ var Deferred = void 0;
31080
31082
  return TaoPage.__super__.constructor.apply(this, arguments);
31081
31083
  }
31082
31084
 
31083
- TaoPage.property('layout');
31085
+ TaoPage.attribute('layout');
31084
31086
 
31085
31087
  TaoPage.prototype.prepareCache = function() {
31086
31088
  return $(this).find('.tao-component').each((function(_this) {
data/dist/tao_popover.js CHANGED
@@ -13,7 +13,7 @@
13
13
  return Direction.__super__.constructor.apply(this, arguments);
14
14
  }
15
15
 
16
- Direction.property('popover', 'target', 'boundarySelector');
16
+ Direction.attribute('popover', 'target', 'boundarySelector');
17
17
 
18
18
  Direction.prototype._init = function() {
19
19
  this.boundary = this.boundarySelector ? this.target.closest(this.boundarySelector) : $(window);
@@ -88,17 +88,17 @@
88
88
  return Position.__super__.constructor.apply(this, arguments);
89
89
  }
90
90
 
91
- Position.property('direction', 'popover', 'target');
91
+ Position.attribute('direction', 'popover', 'target');
92
92
 
93
- Position.property('arrowAlign', {
93
+ Position.attribute('arrowAlign', {
94
94
  "default": 'center'
95
95
  });
96
96
 
97
- Position.property('arrowVerticalAlign', {
97
+ Position.attribute('arrowVerticalAlign', {
98
98
  "default": 'middle'
99
99
  });
100
100
 
101
- Position.property('offset', {
101
+ Position.attribute('offset', {
102
102
  "default": 0
103
103
  });
104
104
 
@@ -211,16 +211,16 @@
211
211
 
212
212
  Element.count = 0;
213
213
 
214
- Element.property('active', 'targetSelector', 'targetTraversal', 'boundarySelector', 'direction', 'arrowAlign', 'arrowVerticalAlign', {
214
+ Element.attribute('active', 'targetSelector', 'targetTraversal', 'boundarySelector', 'direction', 'arrowAlign', 'arrowVerticalAlign', {
215
215
  observe: true
216
216
  });
217
217
 
218
- Element.property('offset', {
218
+ Element.attribute('offset', {
219
219
  observe: true,
220
220
  "default": 5
221
221
  });
222
222
 
223
- Element.property('autoHide', {
223
+ Element.attribute('autoHide', {
224
224
  "default": true
225
225
  });
226
226
 
@@ -334,12 +334,12 @@
334
334
 
335
335
  Trigger.tag = 'tao-popover-trigger';
336
336
 
337
- Trigger.property('triggerAction', {
337
+ Trigger.attribute('triggerAction', {
338
338
  observe: true,
339
339
  "default": 'click'
340
340
  });
341
341
 
342
- Trigger.property('triggerSelector', {
342
+ Trigger.attribute('triggerSelector', {
343
343
  observe: true,
344
344
  "default": 'a, button'
345
345
  });
@@ -1,7 +1,7 @@
1
1
 
2
2
  class TaoPopover.Direction extends TaoModule
3
3
 
4
- @property 'popover', 'target', 'boundarySelector'
4
+ @attribute 'popover', 'target', 'boundarySelector'
5
5
 
6
6
  _init: ->
7
7
  @boundary = if @boundarySelector
@@ -9,11 +9,11 @@ class TaoPopover.Element extends TaoComponent
9
9
 
10
10
  @count: 0
11
11
 
12
- @property 'active', 'targetSelector', 'targetTraversal', 'boundarySelector', 'direction', 'arrowAlign', 'arrowVerticalAlign', observe: true
12
+ @attribute 'active', 'targetSelector', 'targetTraversal', 'boundarySelector', 'direction', 'arrowAlign', 'arrowVerticalAlign', observe: true
13
13
 
14
- @property 'offset', observe: true, default: 5
14
+ @attribute 'offset', observe: true, default: 5
15
15
 
16
- @property 'autoHide', default: true
16
+ @attribute 'autoHide', default: true
17
17
 
18
18
  _init: ->
19
19
  @id ||= "tao-popover-#{++@constructor.count}"
@@ -1,13 +1,13 @@
1
1
 
2
2
  class TaoPopover.Position extends TaoModule
3
3
 
4
- @property 'direction', 'popover', 'target'
4
+ @attribute 'direction', 'popover', 'target'
5
5
 
6
- @property 'arrowAlign', default: 'center'
6
+ @attribute 'arrowAlign', default: 'center'
7
7
 
8
- @property 'arrowVerticalAlign', default: 'middle'
8
+ @attribute 'arrowVerticalAlign', default: 'middle'
9
9
 
10
- @property 'offset', default: 0
10
+ @attribute 'offset', default: 0
11
11
 
12
12
  ARROW_OFFSET: 16
13
13
 
@@ -4,9 +4,9 @@ class TaoPopover.Trigger extends TaoComponent
4
4
 
5
5
  @tag: 'tao-popover-trigger'
6
6
 
7
- @property 'triggerAction', observe: true, default: 'click'
7
+ @attribute 'triggerAction', observe: true, default: 'click'
8
8
 
9
- @property 'triggerSelector', observe: true, default: 'a, button'
9
+ @attribute 'triggerSelector', observe: true, default: 'a, button'
10
10
 
11
11
  @get 'popover', ->
12
12
  return @_popover if @_popover?
@@ -1,3 +1,3 @@
1
1
  module TaoPopover
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
data/tao_popover.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_runtime_dependency "tao_on_rails", '~> 0.4.4'
24
+ spec.add_runtime_dependency "tao_on_rails", '~> 0.5.0'
25
25
 
26
26
  spec.add_development_dependency "bundler", "~> 1.13"
27
27
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tao_popover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - farthinker
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-26 00:00:00.000000000 Z
11
+ date: 2016-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tao_on_rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.4.4
19
+ version: 0.5.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.4.4
26
+ version: 0.5.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement