romo 0.15.7 → 0.15.8

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: fd3352f92271713cb247c535a0db7437dbf8477a
4
- data.tar.gz: 1cc602872fe891672451ffbb9b1796cc980bc898
3
+ data.tar.gz: 3132e5085a74da458d7af2e6c7d8826a7177ed78
4
+ metadata.gz: 899e62df705c8bbde86c05c026d11523dfd059eb
5
5
  SHA512:
6
- metadata.gz: 42949e93932abe06fd3fc7a9a805f7d903ce0eb409503084a2e0560b834a98f569909fc40916d7b9447c5eb1aa36543972d70ca08d3728f11f1efadfddb472ed
7
- data.tar.gz: f88235d36f6053c38a7ae15e807c9a025b915e11bc36b3c8a9d32366a6288084c1295bb05e727cbf432f21d67c62f3b79e5052eb76a942899e73b6da0feab224
6
+ data.tar.gz: cb3cfd2ea1dc99fe8dbd70a96986f61a0682c0c409315873f3055773c57c3ca936448933a4977ab137218893eaaba1a021ae1ea384a73f637b34f4aa826d7d3c
7
+ metadata.gz: 6457df35ac58a9ac0bed756720aa79ce4a596095a2461bcb1f57bed75027d4e8177013de6793ac7a2121e252cf505698191258085a8a36a04bdd8c925024e692
@@ -39,7 +39,7 @@
39
39
  }
40
40
  .romo-select-caret {
41
41
  position: absolute;
42
- right: 6px;
42
+ right: 4px + 1px; /* 4 px for desired spacing + 1 px select styling optical illusion */
43
43
  vertical-align: middle;
44
44
  }
45
45
 
@@ -11,14 +11,15 @@ var RomoDatepicker = function(element) {
11
11
  "January", "February", "March", "April", "May", "June",
12
12
  "July", "August", "September", "October", "November", "December"
13
13
  ]
14
- this.defaultPrevClass = undefined;
15
- this.defaultNextClass = undefined;
16
- this.defaultIndicatorClass = undefined;
17
- this.itemSelector = 'TD.romo-datepicker-day:not(.disabled)';
18
- this.calTable = $();
19
- this.date = undefined;
20
- this.today = new Date;
21
- this.prevValue = undefined;
14
+ this.defaultPrevClass = undefined;
15
+ this.defaultNextClass = undefined;
16
+ this.defaultIndicatorClass = undefined;
17
+ this.defaultIndicatorWidthPx = 0;
18
+ this.itemSelector = 'TD.romo-datepicker-day:not(.disabled)';
19
+ this.calTable = $();
20
+ this.date = undefined;
21
+ this.today = new Date;
22
+ this.prevValue = undefined;
22
23
 
23
24
  this.doInit();
24
25
  this.doBindElem();
@@ -67,7 +68,13 @@ RomoDatepicker.prototype.doBindElem = function() {
67
68
  this._hide(this.indicatorElem);
68
69
  }
69
70
  this.indicatorElem.on('click', $.proxy(this.onIndicatorClick, this));
70
- this.elem.css({'padding-right': '22px'});
71
+
72
+ var indicatorWidthPx = this.elem.data('romo-datepicker-indicator-width-px') || this.defaultIndicatorWidthPx;
73
+ // left-side spacing
74
+ // + indicator width
75
+ // + right-side spacing
76
+ var indicatorPaddingPx = 4 + indicatorWidthPx + 4;
77
+ this.elem.css({'padding-right': indicatorPaddingPx + 'px'});
71
78
  this.elem.after(this.indicatorElem);
72
79
  }
73
80
 
@@ -7,6 +7,9 @@ $.fn.romoSelect = function() {
7
7
  var RomoSelect = function(element) {
8
8
  this.elem = $(element);
9
9
 
10
+ this.defaultCaretClass = undefined;
11
+ this.defaultCaretWidthPx = 0;
12
+
10
13
  this.doInit();
11
14
  this.doBindSelectDropdown();
12
15
  this.doRefreshUI();
@@ -144,7 +147,14 @@ RomoSelect.prototype._buildSelectDropdownElem = function() {
144
147
  var caret = $('<i class="romo-select-caret '+caretClass+'"></i>');
145
148
  caret.css({'line-height': romoSelectDropdownElem.css('line-height')});
146
149
  caret.on('click', $.proxy(this.onCaretClick, this));
147
- romoSelectDropdownElem.css({'padding-right': '22px'});
150
+
151
+ var caretWidthPx = this.elem.data('romo-select-caret-width-px') || this.defaultCaretWidthPx;
152
+ // left-side spacing
153
+ // + caret width
154
+ // - 1 px select styling optical illusion
155
+ // + right-side spacing
156
+ var caretPaddingPx = 4 + caretWidthPx - 1 + 4;
157
+ romoSelectDropdownElem.css({'padding-right': caretPaddingPx + 'px'});
148
158
  romoSelectDropdownElem.append(caret);
149
159
  }
150
160
 
@@ -6,7 +6,6 @@ $.fn.romoSelectDropdown = function(optionElemsParent) {
6
6
 
7
7
  var RomoSelectDropdown = function(element, optionElemsParent) {
8
8
  this.elem = $(element);
9
- this.defaultCaretClass = '';
10
9
  this.itemSelector = 'LI[data-romo-select-item="opt"]:not(.disabled)';
11
10
  this.prevValue = undefined;
12
11
 
data/lib/romo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Romo
2
- VERSION = "0.15.7"
2
+ VERSION = "0.15.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: romo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.7
4
+ version: 0.15.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Redding
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2016-03-18 00:00:00 Z
13
+ date: 2016-03-24 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: assert