paint-rails 0.6.7 → 0.7.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -4
  3. data/lib/paint-rails/version.rb +1 -1
  4. data/paint-rails.gemspec +2 -2
  5. data/vendor/assets/stylesheets/Brocfile.js +3 -0
  6. data/vendor/assets/stylesheets/Gemfile +3 -0
  7. data/vendor/assets/stylesheets/Gemfile.lock +14 -0
  8. data/vendor/assets/stylesheets/bin/ci +6 -0
  9. data/vendor/assets/stylesheets/bin/lint +5 -0
  10. data/vendor/assets/stylesheets/bin/setup +7 -0
  11. data/vendor/assets/stylesheets/bower_components/fontawesome/.bower.json +5 -5
  12. data/vendor/assets/stylesheets/bower_components/fontawesome/.gitignore +1 -0
  13. data/vendor/assets/stylesheets/bower_components/fontawesome/bower.json +1 -1
  14. data/vendor/assets/stylesheets/bower_components/fontawesome/css/font-awesome.css +133 -4
  15. data/vendor/assets/stylesheets/bower_components/fontawesome/css/font-awesome.css.map +7 -0
  16. data/vendor/assets/stylesheets/bower_components/fontawesome/css/font-awesome.min.css +2 -2
  17. data/vendor/assets/stylesheets/bower_components/fontawesome/fonts/FontAwesome.otf +0 -0
  18. data/vendor/assets/stylesheets/bower_components/fontawesome/fonts/fontawesome-webfont.eot +0 -0
  19. data/vendor/assets/stylesheets/bower_components/fontawesome/fonts/fontawesome-webfont.svg +53 -8
  20. data/vendor/assets/stylesheets/bower_components/fontawesome/fonts/fontawesome-webfont.ttf +0 -0
  21. data/vendor/assets/stylesheets/bower_components/fontawesome/fonts/fontawesome-webfont.woff +0 -0
  22. data/vendor/assets/stylesheets/bower_components/fontawesome/fonts/fontawesome-webfont.woff2 +0 -0
  23. data/vendor/assets/stylesheets/bower_components/fontawesome/less/{spinning.less → animated.less} +6 -1
  24. data/vendor/assets/stylesheets/bower_components/fontawesome/less/core.less +3 -1
  25. data/vendor/assets/stylesheets/bower_components/fontawesome/less/font-awesome.less +2 -2
  26. data/vendor/assets/stylesheets/bower_components/fontawesome/less/icons.less +45 -1
  27. data/vendor/assets/stylesheets/bower_components/fontawesome/less/mixins.less +3 -1
  28. data/vendor/assets/stylesheets/bower_components/fontawesome/less/path.less +1 -0
  29. data/vendor/assets/stylesheets/bower_components/fontawesome/less/variables.less +47 -2
  30. data/vendor/assets/stylesheets/bower_components/fontawesome/scss/{_spinning.scss → _animated.scss} +5 -0
  31. data/vendor/assets/stylesheets/bower_components/fontawesome/scss/_core.scss +3 -1
  32. data/vendor/assets/stylesheets/bower_components/fontawesome/scss/_icons.scss +45 -1
  33. data/vendor/assets/stylesheets/bower_components/fontawesome/scss/_mixins.scss +3 -1
  34. data/vendor/assets/stylesheets/bower_components/fontawesome/scss/_path.scss +2 -1
  35. data/vendor/assets/stylesheets/bower_components/fontawesome/scss/_variables.scss +47 -2
  36. data/vendor/assets/stylesheets/bower_components/fontawesome/scss/font-awesome.scss +2 -2
  37. data/vendor/assets/stylesheets/bower_components/foundation/.bower.json +5 -5
  38. data/vendor/assets/stylesheets/bower_components/foundation/bower.json +1 -1
  39. data/vendor/assets/stylesheets/bower_components/foundation/css/foundation.css +1855 -1667
  40. data/vendor/assets/stylesheets/bower_components/foundation/css/foundation.css.map +7 -0
  41. data/vendor/assets/stylesheets/bower_components/foundation/css/foundation.min.css +1 -0
  42. data/vendor/assets/stylesheets/bower_components/foundation/css/normalize.css +11 -12
  43. data/vendor/assets/stylesheets/bower_components/foundation/css/normalize.css.map +7 -0
  44. data/vendor/assets/stylesheets/bower_components/foundation/css/normalize.min.css +1 -0
  45. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.abide.js +156 -62
  46. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.accordion.js +35 -13
  47. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.alert.js +8 -8
  48. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.clearing.js +93 -65
  49. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.dropdown.js +203 -66
  50. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.equalizer.js +57 -27
  51. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.interchange.js +61 -46
  52. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.joyride.js +93 -78
  53. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.js +177 -77
  54. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.magellan.js +81 -55
  55. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.offcanvas.js +28 -28
  56. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.orbit.js +135 -131
  57. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.reveal.js +119 -65
  58. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.slider.js +113 -71
  59. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.tab.js +67 -35
  60. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.tooltip.js +76 -37
  61. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.topbar.js +71 -58
  62. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation.js +1570 -919
  63. data/vendor/assets/stylesheets/bower_components/foundation/js/foundation.min.js +5 -4
  64. data/vendor/assets/stylesheets/bower_components/foundation/js/vendor/fastclick.js +8 -9
  65. data/vendor/assets/stylesheets/bower_components/foundation/js/vendor/jquery.js +10 -9
  66. data/vendor/assets/stylesheets/bower_components/foundation/js/vendor/modernizr.js +1 -1
  67. data/vendor/assets/stylesheets/bower_components/foundation/js/vendor/placeholder.js +2 -2
  68. data/vendor/assets/stylesheets/bower_components/foundation/package.json +53 -0
  69. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/_functions.scss +76 -22
  70. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/_settings.scss +152 -107
  71. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_accordion.scss +8 -8
  72. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_alert-boxes.scss +12 -12
  73. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_block-grid.scss +14 -13
  74. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_breadcrumbs.scss +18 -19
  75. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_button-groups.scss +35 -25
  76. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_buttons.scss +16 -19
  77. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_clearing.scss +60 -47
  78. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_dropdown-buttons.scss +15 -15
  79. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_dropdown.scss +42 -36
  80. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_flex-video.scss +7 -7
  81. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_forms.scss +103 -79
  82. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_global.scss +95 -53
  83. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_grid.scss +42 -25
  84. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_icon-bar.scss +371 -204
  85. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_inline-lists.scss +8 -8
  86. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_joyride.scss +40 -42
  87. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_keystrokes.scss +2 -3
  88. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_labels.scss +7 -7
  89. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_magellan.scss +2 -2
  90. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_offcanvas.scss +184 -179
  91. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_orbit.scss +90 -70
  92. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_pagination.scss +15 -15
  93. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_panels.scss +27 -15
  94. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_pricing-tables.scss +16 -16
  95. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_progress-bars.scss +4 -4
  96. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_range-slider.scss +28 -19
  97. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_reveal.scss +37 -50
  98. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_side-nav.scss +15 -11
  99. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_split-buttons.scss +26 -14
  100. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_sub-nav.scss +14 -12
  101. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_switches.scss +32 -21
  102. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_tables.scss +8 -8
  103. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_tabs.scss +50 -31
  104. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_thumbs.scss +8 -8
  105. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_tooltips.scss +25 -25
  106. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_top-bar.scss +197 -145
  107. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_type.scss +20 -81
  108. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_visibility.scss +99 -15
  109. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation.scss +37 -38
  110. data/vendor/assets/stylesheets/bower_components/foundation/scss/normalize.scss +8 -11
  111. data/vendor/assets/stylesheets/bower_components/jquery/.bower.json +5 -4
  112. data/vendor/assets/stylesheets/bower_components/jquery/bower.json +2 -1
  113. data/vendor/assets/stylesheets/bower_components/jquery/dist/jquery.js +9 -4
  114. data/vendor/assets/stylesheets/bower_components/jquery/dist/jquery.min.js +4 -4
  115. data/vendor/assets/stylesheets/bower_components/jquery/dist/jquery.min.map +1 -1
  116. data/vendor/assets/stylesheets/bower_components/jquery/src/core.js +6 -1
  117. data/vendor/assets/stylesheets/circle.yml +17 -0
  118. data/vendor/assets/stylesheets/components/_button.scss +120 -21
  119. data/vendor/assets/stylesheets/components/_dropdown.scss +316 -14
  120. data/vendor/assets/stylesheets/components/_flip-panel.scss +191 -0
  121. data/vendor/assets/stylesheets/components/_form.scss +346 -0
  122. data/vendor/assets/stylesheets/components/_layout.scss +261 -121
  123. data/vendor/assets/stylesheets/components/_panel.scss +91 -0
  124. data/vendor/assets/stylesheets/components/_quick-jump.scss +267 -0
  125. data/vendor/assets/stylesheets/components/_side-panel.scss +154 -0
  126. data/vendor/assets/stylesheets/components/_table.scss +105 -0
  127. data/vendor/assets/stylesheets/components/_typography.scss +34 -3
  128. data/vendor/assets/stylesheets/components/_vertical-align.scss +9 -0
  129. data/vendor/assets/stylesheets/globals/_functions.scss +69 -0
  130. data/vendor/assets/stylesheets/globals/_mixins.scss +23 -1
  131. data/vendor/assets/stylesheets/globals/_settings.scss +35 -36
  132. data/vendor/assets/stylesheets/paint.scss +22 -14
  133. metadata +29 -8
  134. data/vendor/assets/stylesheets/bower_components/fontawesome/less/extras.less +0 -2
  135. data/vendor/assets/stylesheets/bower_components/fontawesome/scss/_extras.scss +0 -44
  136. data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_toolbar.scss +0 -70
@@ -4,7 +4,7 @@
4
4
  Foundation.libs.interchange = {
5
5
  name : 'interchange',
6
6
 
7
- version : '5.4.7',
7
+ version : '5.5.2',
8
8
 
9
9
  cache : {},
10
10
 
@@ -15,15 +15,19 @@
15
15
  load_attr : 'interchange',
16
16
 
17
17
  named_queries : {
18
- 'default' : 'only screen',
19
- small : Foundation.media_queries.small,
20
- medium : Foundation.media_queries.medium,
21
- large : Foundation.media_queries.large,
22
- xlarge : Foundation.media_queries.xlarge,
23
- xxlarge: Foundation.media_queries.xxlarge,
24
- landscape : 'only screen and (orientation: landscape)',
25
- portrait : 'only screen and (orientation: portrait)',
26
- retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +
18
+ 'default' : 'only screen',
19
+ 'small' : Foundation.media_queries['small'],
20
+ 'small-only' : Foundation.media_queries['small-only'],
21
+ 'medium' : Foundation.media_queries['medium'],
22
+ 'medium-only' : Foundation.media_queries['medium-only'],
23
+ 'large' : Foundation.media_queries['large'],
24
+ 'large-only' : Foundation.media_queries['large-only'],
25
+ 'xlarge' : Foundation.media_queries['xlarge'],
26
+ 'xlarge-only' : Foundation.media_queries['xlarge-only'],
27
+ 'xxlarge' : Foundation.media_queries['xxlarge'],
28
+ 'landscape' : 'only screen and (orientation: landscape)',
29
+ 'portrait' : 'only screen and (orientation: portrait)',
30
+ 'retina' : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +
27
31
  'only screen and (min--moz-device-pixel-ratio: 2),' +
28
32
  'only screen and (-o-min-device-pixel-ratio: 2/1),' +
29
33
  'only screen and (min-device-pixel-ratio: 2),' +
@@ -32,7 +36,7 @@
32
36
  },
33
37
 
34
38
  directives : {
35
- replace: function (el, path, trigger) {
39
+ replace : function (el, path, trigger) {
36
40
  // The trigger argument, if called within the directive, fires
37
41
  // an event named after the directive on the element, passing
38
42
  // any parameters along to the event that you pass to trigger.
@@ -44,22 +48,26 @@
44
48
  // console.log($(this).html(), a, b, c);
45
49
  // });
46
50
 
47
- if (/IMG/.test(el[0].nodeName)) {
51
+ if (el !== null && /IMG/.test(el[0].nodeName)) {
48
52
  var orig_path = el[0].src;
49
53
 
50
- if (new RegExp(path, 'i').test(orig_path)) return;
54
+ if (new RegExp(path, 'i').test(orig_path)) {
55
+ return;
56
+ }
51
57
 
52
- el[0].src = path;
58
+ el.attr("src", path);
53
59
 
54
60
  return trigger(el[0].src);
55
61
  }
56
62
  var last_path = el.data(this.data_attr + '-last-path'),
57
63
  self = this;
58
64
 
59
- if (last_path == path) return;
65
+ if (last_path == path) {
66
+ return;
67
+ }
60
68
 
61
69
  if (/\.(gif|jpg|jpeg|tiff|png)([?#].*)?/i.test(path)) {
62
- $(el).css('background-image', 'url('+path+')');
70
+ $(el).css('background-image', 'url(' + path + ')');
63
71
  el.data('interchange-last-path', path);
64
72
  return trigger(path);
65
73
  }
@@ -80,12 +88,11 @@
80
88
  this.data_attr = this.set_data_attr();
81
89
  $.extend(true, this.settings, method, options);
82
90
  this.bindings(method, options);
83
- this.load('images');
84
- this.load('nodes');
91
+ this.reflow();
85
92
  },
86
93
 
87
- get_media_hash : function() {
88
- var mediaHash='';
94
+ get_media_hash : function () {
95
+ var mediaHash = '';
89
96
  for (var queryName in this.settings.named_queries ) {
90
97
  mediaHash += matchMedia(this.settings.named_queries[queryName]).matches.toString();
91
98
  }
@@ -111,7 +118,7 @@
111
118
  resize : function () {
112
119
  var cache = this.cache;
113
120
 
114
- if(!this.images_loaded || !this.nodes_loaded) {
121
+ if (!this.images_loaded || !this.nodes_loaded) {
115
122
  setTimeout($.proxy(this.resize, this), 50);
116
123
  return;
117
124
  }
@@ -119,18 +126,19 @@
119
126
  for (var uuid in cache) {
120
127
  if (cache.hasOwnProperty(uuid)) {
121
128
  var passed = this.results(uuid, cache[uuid]);
122
-
123
129
  if (passed) {
124
130
  this.settings.directives[passed
125
- .scenario[1]].call(this, passed.el, passed.scenario[0], function () {
126
- if (arguments[0] instanceof Array) {
131
+ .scenario[1]].call(this, passed.el, passed.scenario[0], (function (passed) {
132
+ if (arguments[0] instanceof Array) {
127
133
  var args = arguments[0];
128
- } else {
134
+ } else {
129
135
  var args = Array.prototype.slice.call(arguments, 0);
130
136
  }
131
137
 
132
- passed.el.trigger(passed.scenario[1], args);
133
- });
138
+ return function() {
139
+ passed.el.trigger(passed.scenario[1], args);
140
+ }
141
+ }(passed)));
134
142
  }
135
143
  }
136
144
  }
@@ -151,7 +159,7 @@
151
159
  mq = matchMedia(rule);
152
160
  }
153
161
  if (mq.matches) {
154
- return {el: el, scenario: scenarios[count]};
162
+ return {el : el, scenario : scenarios[count]};
155
163
  }
156
164
  }
157
165
  }
@@ -207,7 +215,6 @@
207
215
  this.cached_nodes = [];
208
216
  this.nodes_loaded = (count === 0);
209
217
 
210
-
211
218
  while (i--) {
212
219
  loaded_count++;
213
220
  var str = nodes[i].getAttribute(data_attr) || '';
@@ -216,7 +223,7 @@
216
223
  this.cached_nodes.push(nodes[i]);
217
224
  }
218
225
 
219
- if(loaded_count === count) {
226
+ if (loaded_count === count) {
220
227
  this.nodes_loaded = true;
221
228
  this.enhance('nodes');
222
229
  }
@@ -232,7 +239,7 @@
232
239
  this.object($(this['cached_' + type][i]));
233
240
  }
234
241
 
235
- return $(window).trigger('resize').trigger('resize.fndtn.interchange');
242
+ return $(window).trigger('resize.fndtn.interchange');
236
243
  },
237
244
 
238
245
  convert_directive : function (directive) {
@@ -249,33 +256,40 @@
249
256
  parse_scenario : function (scenario) {
250
257
  // This logic had to be made more complex since some users were using commas in the url path
251
258
  // So we cannot simply just split on a comma
259
+
252
260
  var directive_match = scenario[0].match(/(.+),\s*(\w+)\s*$/),
253
- media_query = scenario[1];
261
+ // getting the mq has gotten a bit complicated since we started accounting for several use cases
262
+ // of URLs. For now we'll continue to match these scenarios, but we may consider having these scenarios
263
+ // as nested objects or arrays in F6.
264
+ // regex: match everything before close parenthesis for mq
265
+ media_query = scenario[1].match(/(.*)\)/);
254
266
 
255
267
  if (directive_match) {
256
268
  var path = directive_match[1],
257
269
  directive = directive_match[2];
258
- }
259
- else {
270
+
271
+ } else {
260
272
  var cached_split = scenario[0].split(/,\s*$/),
261
273
  path = cached_split[0],
262
- directive = '';
274
+ directive = '';
263
275
  }
264
276
 
265
- return [this.trim(path), this.convert_directive(directive), this.trim(media_query)];
277
+ return [this.trim(path), this.convert_directive(directive), this.trim(media_query[1])];
266
278
  },
267
279
 
268
- object : function(el) {
280
+ object : function (el) {
269
281
  var raw_arr = this.parse_data_attr(el),
270
- scenarios = [],
282
+ scenarios = [],
271
283
  i = raw_arr.length;
272
284
 
273
285
  if (i > 0) {
274
286
  while (i--) {
275
- var split = raw_arr[i].split(/\((.*?)(\))$/);
287
+ // split array between comma delimited content and mq
288
+ // regex: comma, optional space, open parenthesis
289
+ var scenario = raw_arr[i].split(/,\s?\(/);
276
290
 
277
- if (split.length > 1) {
278
- var params = this.parse_scenario(split);
291
+ if (scenario.length > 1) {
292
+ var params = this.parse_scenario(scenario);
279
293
  scenarios.push(params);
280
294
  }
281
295
  }
@@ -288,14 +302,15 @@
288
302
  var uuid = this.random_str(),
289
303
  current_uuid = el.data(this.add_namespace('uuid', true));
290
304
 
291
- if (this.cache[current_uuid]) return this.cache[current_uuid];
305
+ if (this.cache[current_uuid]) {
306
+ return this.cache[current_uuid];
307
+ }
292
308
 
293
309
  el.attr(this.add_namespace('data-uuid'), uuid);
294
-
295
310
  return this.cache[uuid] = scenarios;
296
311
  },
297
312
 
298
- trim : function(str) {
313
+ trim : function (str) {
299
314
 
300
315
  if (typeof str === 'string') {
301
316
  return $.trim(str);
@@ -304,7 +319,7 @@
304
319
  return str;
305
320
  },
306
321
 
307
- set_data_attr: function (init) {
322
+ set_data_attr : function (init) {
308
323
  if (init) {
309
324
  if (this.namespace.length > 0) {
310
325
  return this.namespace + '-' + this.settings.load_attr;
@@ -322,7 +337,7 @@
322
337
 
323
338
  parse_data_attr : function (el) {
324
339
  var raw = el.attr(this.attr_name()).split(/\[(.*?)\]/),
325
- i = raw.length,
340
+ i = raw.length,
326
341
  output = [];
327
342
 
328
343
  while (i--) {
@@ -6,7 +6,7 @@
6
6
  Foundation.libs.joyride = {
7
7
  name : 'joyride',
8
8
 
9
- version : '5.4.7',
9
+ version : '5.5.2',
10
10
 
11
11
  defaults : {
12
12
  expose : false, // turn on or off the expose feature
@@ -32,16 +32,16 @@
32
32
  tip_container : 'body', // Where will the tip be attached
33
33
  abort_on_close : true, // When true, the close event will not fire any callback
34
34
  tip_location_patterns : {
35
- top: ['bottom'],
36
- bottom: [], // bottom should not need to be repositioned
37
- left: ['right', 'top', 'bottom'],
38
- right: ['left', 'top', 'bottom']
35
+ top : ['bottom'],
36
+ bottom : [], // bottom should not need to be repositioned
37
+ left : ['right', 'top', 'bottom'],
38
+ right : ['left', 'top', 'bottom']
39
39
  },
40
- post_ride_callback : function (){}, // A method to call once the tour closes (canceled or complete)
41
- post_step_callback : function (){}, // A method to call after each step
42
- pre_step_callback : function (){}, // A method to call before each step
43
- pre_ride_callback : function (){}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
44
- post_expose_callback : function (){}, // A method to call after an element has been exposed
40
+ post_ride_callback : function () {}, // A method to call once the tour closes (canceled or complete)
41
+ post_step_callback : function () {}, // A method to call after each step
42
+ pre_step_callback : function () {}, // A method to call before each step
43
+ pre_ride_callback : function () {}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
44
+ post_expose_callback : function () {}, // A method to call after an element has been exposed
45
45
  template : { // HTML segments for tip layout
46
46
  link : '<a href="#close" class="joyride-close-tip">&times;</a>',
47
47
  timer : '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
@@ -64,7 +64,7 @@
64
64
  this.bindings(method, options)
65
65
  },
66
66
 
67
- go_next : function() {
67
+ go_next : function () {
68
68
  if (this.settings.$li.next().length < 1) {
69
69
  this.end();
70
70
  } else if (this.settings.timer > 0) {
@@ -78,7 +78,7 @@
78
78
  }
79
79
  },
80
80
 
81
- go_prev : function() {
81
+ go_prev : function () {
82
82
  if (this.settings.$li.prev().length < 1) {
83
83
  // Do nothing if there are no prev element
84
84
  } else if (this.settings.timer > 0) {
@@ -111,10 +111,12 @@
111
111
  this.end(this.settings.abort_on_close);
112
112
  }.bind(this))
113
113
 
114
- .on("keyup.fndtn.joyride", function(e) {
114
+ .on('keyup.fndtn.joyride', function (e) {
115
115
  // Don't do anything if keystrokes are disabled
116
116
  // or if the joyride is not being shown
117
- if (!this.settings.keyboard || !this.settings.riding) return;
117
+ if (!this.settings.keyboard || !this.settings.riding) {
118
+ return;
119
+ }
118
120
 
119
121
  switch (e.which) {
120
122
  case 39: // right arrow
@@ -160,9 +162,13 @@
160
162
  integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
161
163
  int_settings_count = integer_settings.length;
162
164
 
163
- if (!$this.length > 0) return;
165
+ if (!$this.length > 0) {
166
+ return;
167
+ }
164
168
 
165
- if (!this.settings.init) this.events();
169
+ if (!this.settings.init) {
170
+ this.events();
171
+ }
166
172
 
167
173
  this.settings = $this.data(this.attr_name(true) + '-init');
168
174
 
@@ -255,10 +261,11 @@
255
261
  txt = $.trim(txt) || 'Previous';
256
262
 
257
263
  // Add the disabled class to the button if it's the first element
258
- if (idx == 0)
264
+ if (idx == 0) {
259
265
  txt = $(this.settings.template.prev_button).append(txt).addClass('disabled')[0].outerHTML;
260
- else
266
+ } else {
261
267
  txt = $(this.settings.template.prev_button).append(txt)[0].outerHTML;
268
+ }
262
269
  } else {
263
270
  txt = '';
264
271
  }
@@ -267,10 +274,8 @@
267
274
 
268
275
  create : function (opts) {
269
276
  this.settings.tip_settings = $.extend({}, this.settings, this.data_options(opts.$li));
270
- var buttonText = opts.$li.attr(this.add_namespace('data-button'))
271
- || opts.$li.attr(this.add_namespace('data-text')),
272
- prevButtonText = opts.$li.attr(this.add_namespace('data-button-prev'))
273
- || opts.$li.attr(this.add_namespace('data-prev-text')),
277
+ var buttonText = opts.$li.attr(this.add_namespace('data-button')) || opts.$li.attr(this.add_namespace('data-text')),
278
+ prevButtonText = opts.$li.attr(this.add_namespace('data-button-prev')) || opts.$li.attr(this.add_namespace('data-prev-text')),
274
279
  tipClass = opts.$li.attr('class'),
275
280
  $tip_content = $(this.tip_template({
276
281
  tip_class : tipClass,
@@ -287,8 +292,7 @@
287
292
  var $timer = null;
288
293
 
289
294
  // are we paused?
290
- if (this.settings.$li === undefined
291
- || ($.inArray(this.settings.$li.index(), this.settings.pause_after) === -1)) {
295
+ if (this.settings.$li === undefined || ($.inArray(this.settings.$li.index(), this.settings.pause_after) === -1)) {
292
296
 
293
297
  // don't go to the next li if the tour was paused
294
298
  if (this.settings.paused) {
@@ -319,8 +323,14 @@
319
323
 
320
324
  this.settings.tip_settings.tip_location_pattern = this.settings.tip_location_patterns[this.settings.tip_settings.tip_location];
321
325
 
322
- // scroll if not modal
326
+ // scroll and hide bg if not modal
323
327
  if (!/body/i.test(this.settings.$target.selector)) {
328
+ var joyridemodalbg = $('.joyride-modal-bg');
329
+ if (/pop/i.test(this.settings.tipAnimation)) {
330
+ joyridemodalbg.hide();
331
+ } else {
332
+ joyridemodalbg.fadeOut(this.settings.tipAnimationFadeSpeed);
333
+ }
324
334
  this.scroll_to();
325
335
  }
326
336
 
@@ -342,7 +352,7 @@
342
352
 
343
353
  setTimeout(function () {
344
354
  $timer.animate({
345
- width: $timer.parent().width()
355
+ width : $timer.parent().width()
346
356
  }, this.settings.timer, 'linear');
347
357
  }.bind(this), this.settings.tip_animation_fade_speed);
348
358
 
@@ -351,7 +361,6 @@
351
361
 
352
362
  }
353
363
 
354
-
355
364
  } else if (/fade/i.test(this.settings.tip_animation)) {
356
365
 
357
366
  $timer.width(0);
@@ -364,7 +373,7 @@
364
373
 
365
374
  setTimeout(function () {
366
375
  $timer.animate({
367
- width: $timer.parent().width()
376
+ width : $timer.parent().width()
368
377
  }, this.settings.timer, 'linear');
369
378
  }.bind(this), this.settings.tip_animation_fade_speed);
370
379
 
@@ -409,7 +418,7 @@
409
418
 
410
419
  // Prevent scroll bouncing...wait to remove from layout
411
420
  this.settings.$current_tip.css('visibility', 'hidden');
412
- setTimeout($.proxy(function() {
421
+ setTimeout($.proxy(function () {
413
422
  this.hide();
414
423
  this.css('visibility', 'visible');
415
424
  }, this.settings.$current_tip), 0);
@@ -423,10 +432,11 @@
423
432
  this.set_next_tip();
424
433
  this.settings.$current_tip = this.settings.$next_tip;
425
434
  } else {
426
- if (is_prev)
435
+ if (is_prev) {
427
436
  this.settings.$li = this.settings.$li.prev();
428
- else
437
+ } else {
429
438
  this.settings.$li = this.settings.$li.next();
439
+ }
430
440
  this.set_next_tip();
431
441
  }
432
442
 
@@ -434,7 +444,7 @@
434
444
  },
435
445
 
436
446
  set_next_tip : function () {
437
- this.settings.$next_tip = $(".joyride-tip-guide").eq(this.settings.$li.index());
447
+ this.settings.$next_tip = $('.joyride-tip-guide').eq(this.settings.$li.index());
438
448
  this.settings.$next_tip.data('closed', '');
439
449
  },
440
450
 
@@ -462,7 +472,7 @@
462
472
 
463
473
  if (tipOffset != 0) {
464
474
  $('html, body').stop().animate({
465
- scrollTop: tipOffset
475
+ scrollTop : tipOffset
466
476
  }, this.settings.scroll_speed, 'swing');
467
477
  }
468
478
  },
@@ -490,18 +500,18 @@
490
500
  }
491
501
 
492
502
  if (!/body/i.test(this.settings.$target.selector)) {
493
- var topAdjustment = this.settings.tip_settings.tipAdjustmentY ? parseInt(this.settings.tip_settings.tipAdjustmentY) : 0,
494
- leftAdjustment = this.settings.tip_settings.tipAdjustmentX ? parseInt(this.settings.tip_settings.tipAdjustmentX) : 0;
503
+ var topAdjustment = this.settings.tip_settings.tipAdjustmentY ? parseInt(this.settings.tip_settings.tipAdjustmentY) : 0,
504
+ leftAdjustment = this.settings.tip_settings.tipAdjustmentX ? parseInt(this.settings.tip_settings.tipAdjustmentX) : 0;
495
505
 
496
506
  if (this.bottom()) {
497
507
  if (this.rtl) {
498
508
  this.settings.$next_tip.css({
499
- top: (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
500
- left: this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth() + leftAdjustment});
509
+ top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
510
+ left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth() + leftAdjustment});
501
511
  } else {
502
512
  this.settings.$next_tip.css({
503
- top: (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
504
- left: this.settings.$target.offset().left + leftAdjustment});
513
+ top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
514
+ left : this.settings.$target.offset().left + leftAdjustment});
505
515
  }
506
516
 
507
517
  this.nub_position($nub, this.settings.tip_settings.nub_position, 'top');
@@ -509,12 +519,12 @@
509
519
  } else if (this.top()) {
510
520
  if (this.rtl) {
511
521
  this.settings.$next_tip.css({
512
- top: (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
513
- left: this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
522
+ top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
523
+ left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
514
524
  } else {
515
525
  this.settings.$next_tip.css({
516
- top: (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
517
- left: this.settings.$target.offset().left + leftAdjustment});
526
+ top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
527
+ left : this.settings.$target.offset().left + leftAdjustment});
518
528
  }
519
529
 
520
530
  this.nub_position($nub, this.settings.tip_settings.nub_position, 'bottom');
@@ -522,16 +532,16 @@
522
532
  } else if (this.right()) {
523
533
 
524
534
  this.settings.$next_tip.css({
525
- top: this.settings.$target.offset().top + topAdjustment,
526
- left: (this.settings.$target.outerWidth() + this.settings.$target.offset().left + nub_width + leftAdjustment)});
535
+ top : this.settings.$target.offset().top + topAdjustment,
536
+ left : (this.settings.$target.outerWidth() + this.settings.$target.offset().left + nub_width + leftAdjustment)});
527
537
 
528
538
  this.nub_position($nub, this.settings.tip_settings.nub_position, 'left');
529
539
 
530
540
  } else if (this.left()) {
531
541
 
532
542
  this.settings.$next_tip.css({
533
- top: this.settings.$target.offset().top + topAdjustment,
534
- left: (this.settings.$target.offset().left - this.settings.$next_tip.outerWidth() - nub_width + leftAdjustment)});
543
+ top : this.settings.$target.offset().top + topAdjustment,
544
+ left : (this.settings.$target.offset().left - this.settings.$next_tip.outerWidth() - nub_width + leftAdjustment)});
535
545
 
536
546
  this.nub_position($nub, this.settings.tip_settings.nub_position, 'right');
537
547
 
@@ -587,12 +597,12 @@
587
597
 
588
598
  if (this.top()) {
589
599
 
590
- this.settings.$next_tip.offset({top: this.settings.$target.offset().top - tip_height - nub_height});
600
+ this.settings.$next_tip.offset({top : this.settings.$target.offset().top - tip_height - nub_height});
591
601
  $nub.addClass('bottom');
592
602
 
593
603
  } else {
594
604
 
595
- this.settings.$next_tip.offset({top: this.settings.$target.offset().top + target_height + nub_height});
605
+ this.settings.$next_tip.offset({top : this.settings.$target.offset().top + target_height + nub_height});
596
606
  $nub.addClass('top');
597
607
 
598
608
  }
@@ -618,7 +628,8 @@
618
628
  if (!this.settings.$next_tip.data('closed')) {
619
629
  var joyridemodalbg = $('.joyride-modal-bg');
620
630
  if (joyridemodalbg.length < 1) {
621
- $('body').append(this.settings.template.modal).show();
631
+ var joyridemodalbg = $(this.settings.template.modal);
632
+ joyridemodalbg.appendTo('body');
622
633
  }
623
634
 
624
635
  if (/pop/i.test(this.settings.tip_animation)) {
@@ -639,14 +650,14 @@
639
650
 
640
651
  if (arguments.length > 0 && arguments[0] instanceof $) {
641
652
  el = arguments[0];
642
- } else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
653
+ } else if (this.settings.$target && !/body/i.test(this.settings.$target.selector)) {
643
654
  el = this.settings.$target;
644
- } else {
655
+ } else {
645
656
  return false;
646
657
  }
647
658
 
648
- if(el.length < 1){
649
- if(window.console){
659
+ if (el.length < 1) {
660
+ if (window.console) {
650
661
  console.error('element not valid', el);
651
662
  }
652
663
  return false;
@@ -655,39 +666,41 @@
655
666
  expose = $(this.settings.template.expose);
656
667
  this.settings.$body.append(expose);
657
668
  expose.css({
658
- top: el.offset().top,
659
- left: el.offset().left,
660
- width: el.outerWidth(true),
661
- height: el.outerHeight(true)
669
+ top : el.offset().top,
670
+ left : el.offset().left,
671
+ width : el.outerWidth(true),
672
+ height : el.outerHeight(true)
662
673
  });
663
674
 
664
675
  exposeCover = $(this.settings.template.expose_cover);
665
676
 
666
677
  origCSS = {
667
- zIndex: el.css('z-index'),
668
- position: el.css('position')
678
+ zIndex : el.css('z-index'),
679
+ position : el.css('position')
669
680
  };
670
681
 
671
682
  origClasses = el.attr('class') == null ? '' : el.attr('class');
672
683
 
673
- el.css('z-index',parseInt(expose.css('z-index'))+1);
684
+ el.css('z-index', parseInt(expose.css('z-index')) + 1);
674
685
 
675
686
  if (origCSS.position == 'static') {
676
- el.css('position','relative');
687
+ el.css('position', 'relative');
677
688
  }
678
689
 
679
- el.data('expose-css',origCSS);
690
+ el.data('expose-css', origCSS);
680
691
  el.data('orig-class', origClasses);
681
692
  el.attr('class', origClasses + ' ' + this.settings.expose_add_class);
682
693
 
683
694
  exposeCover.css({
684
- top: el.offset().top,
685
- left: el.offset().left,
686
- width: el.outerWidth(true),
687
- height: el.outerHeight(true)
695
+ top : el.offset().top,
696
+ left : el.offset().left,
697
+ width : el.outerWidth(true),
698
+ height : el.outerHeight(true)
688
699
  });
689
700
 
690
- if (this.settings.modal) this.show_modal();
701
+ if (this.settings.modal) {
702
+ this.show_modal();
703
+ }
691
704
 
692
705
  this.settings.$body.append(exposeCover);
693
706
  expose.addClass(randId);
@@ -700,20 +713,20 @@
700
713
  un_expose : function () {
701
714
  var exposeId,
702
715
  el,
703
- expose ,
716
+ expose,
704
717
  origCSS,
705
718
  origClasses,
706
719
  clearAll = false;
707
720
 
708
721
  if (arguments.length > 0 && arguments[0] instanceof $) {
709
722
  el = arguments[0];
710
- } else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
723
+ } else if (this.settings.$target && !/body/i.test(this.settings.$target.selector)) {
711
724
  el = this.settings.$target;
712
- } else {
725
+ } else {
713
726
  return false;
714
727
  }
715
728
 
716
- if(el.length < 1){
729
+ if (el.length < 1) {
717
730
  if (window.console) {
718
731
  console.error('element not valid', el);
719
732
  }
@@ -742,7 +755,7 @@
742
755
  }
743
756
 
744
757
  if (origCSS.position != el.css('position')) {
745
- if(origCSS.position == 'static') {// this is default, no need to set it.
758
+ if (origCSS.position == 'static') {// this is default, no need to set it.
746
759
  el.css('position', '');
747
760
  } else {
748
761
  el.css('position', origCSS.position);
@@ -758,7 +771,7 @@
758
771
  this.remove_exposed(el);
759
772
  },
760
773
 
761
- add_exposed: function(el){
774
+ add_exposed : function (el) {
762
775
  this.settings.exposed = this.settings.exposed || [];
763
776
  if (el instanceof $ || typeof el === 'object') {
764
777
  this.settings.exposed.push(el[0]);
@@ -767,11 +780,11 @@
767
780
  }
768
781
  },
769
782
 
770
- remove_exposed: function(el){
783
+ remove_exposed : function (el) {
771
784
  var search, i;
772
785
  if (el instanceof $) {
773
786
  search = el[0]
774
- } else if (typeof el == 'string'){
787
+ } else if (typeof el == 'string') {
775
788
  search = el;
776
789
  }
777
790
 
@@ -847,7 +860,9 @@
847
860
  var i = hidden_corners.length;
848
861
 
849
862
  while (i--) {
850
- if (hidden_corners[i]) return false;
863
+ if (hidden_corners[i]) {
864
+ return false;
865
+ }
851
866
  }
852
867
 
853
868
  return true;
@@ -875,7 +890,7 @@
875
890
 
876
891
  end : function (abort) {
877
892
  if (this.settings.cookie_monster) {
878
- $.cookie(this.settings.cookie_name, 'ridden', { expires: this.settings.cookie_expires, domain: this.settings.cookie_domain });
893
+ $.cookie(this.settings.cookie_name, 'ridden', {expires : this.settings.cookie_expires, domain : this.settings.cookie_domain});
879
894
  }
880
895
 
881
896
  if (this.settings.timer > 0) {