fomantic-ui-sass 2.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +27 -0
  3. data/.rspec +1 -0
  4. data/.travis.yml +5 -0
  5. data/CHANGELOG.md +370 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +177 -0
  9. data/Rakefile +8 -0
  10. data/app/assets/fonts/semantic-ui/brand-icons.eot +0 -0
  11. data/app/assets/fonts/semantic-ui/brand-icons.svg +1008 -0
  12. data/app/assets/fonts/semantic-ui/brand-icons.ttf +0 -0
  13. data/app/assets/fonts/semantic-ui/brand-icons.woff +0 -0
  14. data/app/assets/fonts/semantic-ui/brand-icons.woff2 +0 -0
  15. data/app/assets/fonts/semantic-ui/icons.eot +0 -0
  16. data/app/assets/fonts/semantic-ui/icons.otf +0 -0
  17. data/app/assets/fonts/semantic-ui/icons.svg +1518 -0
  18. data/app/assets/fonts/semantic-ui/icons.ttf +0 -0
  19. data/app/assets/fonts/semantic-ui/icons.woff +0 -0
  20. data/app/assets/fonts/semantic-ui/icons.woff2 +0 -0
  21. data/app/assets/fonts/semantic-ui/outline-icons.eot +0 -0
  22. data/app/assets/fonts/semantic-ui/outline-icons.svg +366 -0
  23. data/app/assets/fonts/semantic-ui/outline-icons.ttf +0 -0
  24. data/app/assets/fonts/semantic-ui/outline-icons.woff +0 -0
  25. data/app/assets/fonts/semantic-ui/outline-icons.woff2 +0 -0
  26. data/app/assets/images/semantic-ui/flags.png +0 -0
  27. data/app/assets/javascripts/semantic-ui.js +27 -0
  28. data/app/assets/javascripts/semantic-ui/accordion.js +613 -0
  29. data/app/assets/javascripts/semantic-ui/api.js +1167 -0
  30. data/app/assets/javascripts/semantic-ui/calendar.js +1476 -0
  31. data/app/assets/javascripts/semantic-ui/checkbox.js +828 -0
  32. data/app/assets/javascripts/semantic-ui/colorize.js +280 -0
  33. data/app/assets/javascripts/semantic-ui/dimmer.js +735 -0
  34. data/app/assets/javascripts/semantic-ui/dropdown.js +4030 -0
  35. data/app/assets/javascripts/semantic-ui/embed.js +706 -0
  36. data/app/assets/javascripts/semantic-ui/form.js +1707 -0
  37. data/app/assets/javascripts/semantic-ui/modal.js +1090 -0
  38. data/app/assets/javascripts/semantic-ui/nag.js +507 -0
  39. data/app/assets/javascripts/semantic-ui/popup.js +1532 -0
  40. data/app/assets/javascripts/semantic-ui/progress.js +923 -0
  41. data/app/assets/javascripts/semantic-ui/range.js +278 -0
  42. data/app/assets/javascripts/semantic-ui/rating.js +511 -0
  43. data/app/assets/javascripts/semantic-ui/search.js +1515 -0
  44. data/app/assets/javascripts/semantic-ui/shape.js +921 -0
  45. data/app/assets/javascripts/semantic-ui/sidebar.js +1033 -0
  46. data/app/assets/javascripts/semantic-ui/site.js +490 -0
  47. data/app/assets/javascripts/semantic-ui/state.js +708 -0
  48. data/app/assets/javascripts/semantic-ui/sticky.js +959 -0
  49. data/app/assets/javascripts/semantic-ui/tab.js +952 -0
  50. data/app/assets/javascripts/semantic-ui/toast.js +592 -0
  51. data/app/assets/javascripts/semantic-ui/transition.js +1106 -0
  52. data/app/assets/javascripts/semantic-ui/video.js +532 -0
  53. data/app/assets/javascripts/semantic-ui/visibility.js +1311 -0
  54. data/app/assets/javascripts/semantic-ui/visit.js +525 -0
  55. data/app/assets/stylesheets/semantic-ui.scss +5 -0
  56. data/app/assets/stylesheets/semantic-ui/collections/_all.scss +6 -0
  57. data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +124 -0
  58. data/app/assets/stylesheets/semantic-ui/collections/_form.scss +1158 -0
  59. data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +2093 -0
  60. data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +2193 -0
  61. data/app/assets/stylesheets/semantic-ui/collections/_message.scss +606 -0
  62. data/app/assets/stylesheets/semantic-ui/collections/_table.scss +1117 -0
  63. data/app/assets/stylesheets/semantic-ui/elements/_all.scss +16 -0
  64. data/app/assets/stylesheets/semantic-ui/elements/_button.scss +4530 -0
  65. data/app/assets/stylesheets/semantic-ui/elements/_container.scss +145 -0
  66. data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +259 -0
  67. data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +1036 -0
  68. data/app/assets/stylesheets/semantic-ui/elements/_header.scss +762 -0
  69. data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +6330 -0
  70. data/app/assets/stylesheets/semantic-ui/elements/_image.scss +310 -0
  71. data/app/assets/stylesheets/semantic-ui/elements/_input.scss +519 -0
  72. data/app/assets/stylesheets/semantic-ui/elements/_label.scss +1395 -0
  73. data/app/assets/stylesheets/semantic-ui/elements/_list.scss +959 -0
  74. data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +458 -0
  75. data/app/assets/stylesheets/semantic-ui/elements/_placeholder.scss +242 -0
  76. data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +152 -0
  77. data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +295 -0
  78. data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +884 -0
  79. data/app/assets/stylesheets/semantic-ui/elements/_step.scss +675 -0
  80. data/app/assets/stylesheets/semantic-ui/globals/_all.scss +3 -0
  81. data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +485 -0
  82. data/app/assets/stylesheets/semantic-ui/globals/_site.scss +206 -0
  83. data/app/assets/stylesheets/semantic-ui/globals/_variables.scss +4 -0
  84. data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +247 -0
  85. data/app/assets/stylesheets/semantic-ui/modules/_all.scss +20 -0
  86. data/app/assets/stylesheets/semantic-ui/modules/_calendar.scss +165 -0
  87. data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +718 -0
  88. data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +464 -0
  89. data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +1745 -0
  90. data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +165 -0
  91. data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +646 -0
  92. data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +148 -0
  93. data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +789 -0
  94. data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +523 -0
  95. data/app/assets/stylesheets/semantic-ui/modules/_range.scss +192 -0
  96. data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +263 -0
  97. data/app/assets/stylesheets/semantic-ui/modules/_search.scss +445 -0
  98. data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +154 -0
  99. data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +626 -0
  100. data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +78 -0
  101. data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +92 -0
  102. data/app/assets/stylesheets/semantic-ui/modules/_toast.scss +291 -0
  103. data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +2059 -0
  104. data/app/assets/stylesheets/semantic-ui/modules/_video.scss +125 -0
  105. data/app/assets/stylesheets/semantic-ui/views/_ad.scss +275 -0
  106. data/app/assets/stylesheets/semantic-ui/views/_all.scss +6 -0
  107. data/app/assets/stylesheets/semantic-ui/views/_card.scss +1124 -0
  108. data/app/assets/stylesheets/semantic-ui/views/_comment.scss +296 -0
  109. data/app/assets/stylesheets/semantic-ui/views/_feed.scss +314 -0
  110. data/app/assets/stylesheets/semantic-ui/views/_item.scss +555 -0
  111. data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +583 -0
  112. data/app/helpers/semantic_breadcrumbs_helper.rb +10 -0
  113. data/app/helpers/semantic_flash_helper.rb +22 -0
  114. data/app/helpers/semantic_icon_helper.rb +8 -0
  115. data/app/views/semantic/_breadcrumbs.html.erb +12 -0
  116. data/fomantic-ui-sass.gemspec +31 -0
  117. data/lib/fomantic-ui-sass.rb +62 -0
  118. data/lib/fomantic/ui/sass/breadcrumbs.rb +41 -0
  119. data/lib/fomantic/ui/sass/engine.rb +23 -0
  120. data/lib/fomantic/ui/sass/version.rb +8 -0
  121. data/spec/dummy/README.rdoc +28 -0
  122. data/spec/dummy/Rakefile +6 -0
  123. data/spec/dummy/app/assets/images/.keep +0 -0
  124. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  125. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  126. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  127. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  128. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  129. data/spec/dummy/app/mailers/.keep +0 -0
  130. data/spec/dummy/app/models/.keep +0 -0
  131. data/spec/dummy/app/models/concerns/.keep +0 -0
  132. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  133. data/spec/dummy/bin/bundle +3 -0
  134. data/spec/dummy/bin/rails +4 -0
  135. data/spec/dummy/bin/rake +4 -0
  136. data/spec/dummy/config.ru +4 -0
  137. data/spec/dummy/config/application.rb +28 -0
  138. data/spec/dummy/config/boot.rb +5 -0
  139. data/spec/dummy/config/environment.rb +5 -0
  140. data/spec/dummy/config/environments/development.rb +29 -0
  141. data/spec/dummy/config/environments/production.rb +80 -0
  142. data/spec/dummy/config/environments/test.rb +36 -0
  143. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  144. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  145. data/spec/dummy/config/initializers/inflections.rb +16 -0
  146. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  147. data/spec/dummy/config/initializers/secret_token.rb +12 -0
  148. data/spec/dummy/config/initializers/session_store.rb +3 -0
  149. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  150. data/spec/dummy/config/locales/en.yml +23 -0
  151. data/spec/dummy/config/routes.rb +2 -0
  152. data/spec/dummy/lib/assets/.keep +0 -0
  153. data/spec/dummy/log/.keep +0 -0
  154. data/spec/dummy/public/404.html +58 -0
  155. data/spec/dummy/public/422.html +58 -0
  156. data/spec/dummy/public/500.html +57 -0
  157. data/spec/dummy/public/favicon.ico +0 -0
  158. data/spec/helpers/semantic_breadcrumbs_helper_spec.rb +38 -0
  159. data/spec/helpers/semantic_flash_helper_spec.rb +36 -0
  160. data/spec/helpers/semantic_icon_helper_spec.rb +48 -0
  161. data/spec/spec_helper.rb +17 -0
  162. data/tasks/converter.rb +216 -0
  163. data/templates/project/manifest.rb +29 -0
  164. data/templates/project/styles.scss +1 -0
  165. metadata +390 -0
@@ -0,0 +1,532 @@
1
+ /*!
2
+ * # Semantic UI 2.0.0 - Video
3
+ * http://github.com/semantic-org/semantic-ui/
4
+ *
5
+ *
6
+ * Copyright 2014 Contributorss
7
+ * Released under the MIT license
8
+ * http://opensource.org/licenses/MIT
9
+ *
10
+ */
11
+
12
+ ;(function ($, window, document, undefined) {
13
+
14
+ "use strict";
15
+
16
+ $.fn.video = function(parameters) {
17
+
18
+ var
19
+ $allModules = $(this),
20
+
21
+ moduleSelector = $allModules.selector || '',
22
+
23
+ time = new Date().getTime(),
24
+ performance = [],
25
+
26
+ query = arguments[0],
27
+ methodInvoked = (typeof query == 'string'),
28
+ queryArguments = [].slice.call(arguments, 1),
29
+
30
+ requestAnimationFrame = window.requestAnimationFrame
31
+ || window.mozRequestAnimationFrame
32
+ || window.webkitRequestAnimationFrame
33
+ || window.msRequestAnimationFrame
34
+ || function(callback) { setTimeout(callback, 0); },
35
+
36
+ returnedValue
37
+ ;
38
+
39
+ $allModules
40
+ .each(function() {
41
+ var
42
+ settings = ( $.isPlainObject(parameters) )
43
+ ? $.extend(true, {}, $.fn.video.settings, parameters)
44
+ : $.extend({}, $.fn.video.settings),
45
+
46
+ selector = settings.selector,
47
+ className = settings.className,
48
+ error = settings.error,
49
+ metadata = settings.metadata,
50
+ namespace = settings.namespace,
51
+ templates = settings.templates,
52
+
53
+ eventNamespace = '.' + namespace,
54
+ moduleNamespace = 'module-' + namespace,
55
+
56
+ $window = $(window),
57
+ $module = $(this),
58
+ $placeholder = $module.find(selector.placeholder),
59
+ $playButton = $module.find(selector.playButton),
60
+ $embed = $module.find(selector.embed),
61
+
62
+ element = this,
63
+ instance = $module.data(moduleNamespace),
64
+ module
65
+ ;
66
+
67
+ module = {
68
+
69
+ initialize: function() {
70
+ module.debug('Initializing video');
71
+ module.create();
72
+ $module
73
+ .on('click' + eventNamespace, selector.placeholder, module.play)
74
+ .on('click' + eventNamespace, selector.playButton, module.play)
75
+ ;
76
+ module.instantiate();
77
+ },
78
+
79
+ instantiate: function() {
80
+ module.verbose('Storing instance of module', module);
81
+ instance = module;
82
+ $module
83
+ .data(moduleNamespace, module)
84
+ ;
85
+ },
86
+
87
+ create: function() {
88
+ var
89
+ image = $module.data(metadata.image),
90
+ html = templates.video(image)
91
+ ;
92
+ $module.html(html);
93
+ module.refresh();
94
+ if(!image) {
95
+ module.play();
96
+ }
97
+ module.debug('Creating html for video element', html);
98
+ },
99
+
100
+ destroy: function() {
101
+ module.verbose('Destroying previous instance of video');
102
+ module.reset();
103
+ $module
104
+ .removeData(moduleNamespace)
105
+ .off(eventNamespace)
106
+ ;
107
+ },
108
+
109
+ refresh: function() {
110
+ module.verbose('Refreshing selector cache');
111
+ $placeholder = $module.find(selector.placeholder);
112
+ $playButton = $module.find(selector.playButton);
113
+ $embed = $module.find(selector.embed);
114
+ },
115
+
116
+ // sets new video
117
+ change: function(source, id, url) {
118
+ module.debug('Changing video to ', source, id, url);
119
+ $module
120
+ .data(metadata.source, source)
121
+ .data(metadata.id, id)
122
+ .data(metadata.url, url)
123
+ ;
124
+ settings.onChange();
125
+ },
126
+
127
+ // clears video embed
128
+ reset: function() {
129
+ module.debug('Clearing video embed and showing placeholder');
130
+ $module
131
+ .removeClass(className.active)
132
+ ;
133
+ $embed
134
+ .html(' ')
135
+ ;
136
+ $placeholder
137
+ .show()
138
+ ;
139
+ settings.onReset();
140
+ },
141
+
142
+ // plays current video
143
+ play: function() {
144
+ module.debug('Playing video');
145
+ var
146
+ source = $module.data(metadata.source) || false,
147
+ url = $module.data(metadata.url) || false,
148
+ id = $module.data(metadata.id) || false
149
+ ;
150
+ $embed
151
+ .html( module.generate.html(source, id, url) )
152
+ ;
153
+ $module
154
+ .addClass(className.active)
155
+ ;
156
+ settings.onPlay();
157
+ },
158
+
159
+ get: {
160
+ source: function(url) {
161
+ if(typeof url !== 'string') {
162
+ return false;
163
+ }
164
+ if(url.search('youtube.com') !== -1) {
165
+ return 'youtube';
166
+ }
167
+ else if(url.search('vimeo.com') !== -1) {
168
+ return 'vimeo';
169
+ }
170
+ return false;
171
+ },
172
+ id: function(url) {
173
+ if(url.match(settings.regExp.youtube)) {
174
+ return url.match(settings.regExp.youtube)[1];
175
+ }
176
+ else if(url.match(settings.regExp.vimeo)) {
177
+ return url.match(settings.regExp.vimeo)[2];
178
+ }
179
+ return false;
180
+ }
181
+ },
182
+
183
+ generate: {
184
+ // generates iframe html
185
+ html: function(source, id, url) {
186
+ module.debug('Generating embed html');
187
+ var
188
+ html
189
+ ;
190
+ // allow override of settings
191
+ source = source || settings.source;
192
+ id = id || settings.id;
193
+ if((source && id) || url) {
194
+ if(!source || !id) {
195
+ source = module.get.source(url);
196
+ id = module.get.id(url);
197
+ }
198
+ if(source == 'vimeo') {
199
+ html = ''
200
+ + '<iframe src="//player.vimeo.com/video/' + id + '?=' + module.generate.url(source) + '"'
201
+ + ' width="100%" height="100%"'
202
+ + ' frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'
203
+ ;
204
+ }
205
+ else if(source == 'youtube') {
206
+ html = ''
207
+ + '<iframe src="//www.youtube.com/embed/' + id + '?=' + module.generate.url(source) + '"'
208
+ + ' width="100%" height="100%"'
209
+ + ' frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'
210
+ ;
211
+ }
212
+ }
213
+ else {
214
+ module.error(error.noVideo);
215
+ }
216
+ return html;
217
+ },
218
+
219
+ // generate url parameters
220
+ url: function(source) {
221
+ var
222
+ api = (settings.api)
223
+ ? 1
224
+ : 0,
225
+ autoplay = (settings.autoplay === 'auto')
226
+ ? ($module.data('image') !== undefined)
227
+ : settings.autoplay,
228
+ hd = (settings.hd)
229
+ ? 1
230
+ : 0,
231
+ showUI = (settings.showUI)
232
+ ? 1
233
+ : 0,
234
+ // opposite used for some params
235
+ hideUI = !(settings.showUI)
236
+ ? 1
237
+ : 0,
238
+ url = ''
239
+ ;
240
+ if(source == 'vimeo') {
241
+ url = ''
242
+ + 'api=' + api
243
+ + '&amp;title=' + showUI
244
+ + '&amp;byline=' + showUI
245
+ + '&amp;portrait=' + showUI
246
+ + '&amp;autoplay=' + autoplay
247
+ ;
248
+ if(settings.color) {
249
+ url += '&amp;color=' + settings.color;
250
+ }
251
+ }
252
+ if(source == 'ustream') {
253
+ url = ''
254
+ + 'autoplay=' + autoplay
255
+ ;
256
+ if(settings.color) {
257
+ url += '&amp;color=' + settings.color;
258
+ }
259
+ }
260
+ else if(source == 'youtube') {
261
+ url = ''
262
+ + 'enablejsapi=' + api
263
+ + '&amp;autoplay=' + autoplay
264
+ + '&amp;autohide=' + hideUI
265
+ + '&amp;hq=' + hd
266
+ + '&amp;modestbranding=1'
267
+ ;
268
+ if(settings.color) {
269
+ url += '&amp;color=' + settings.color;
270
+ }
271
+ }
272
+ return url;
273
+ }
274
+ },
275
+
276
+ setting: function(name, value) {
277
+ module.debug('Changing setting', name, value);
278
+ if( $.isPlainObject(name) ) {
279
+ $.extend(true, settings, name);
280
+ }
281
+ else if(value !== undefined) {
282
+ settings[name] = value;
283
+ }
284
+ else {
285
+ return settings[name];
286
+ }
287
+ },
288
+ internal: function(name, value) {
289
+ if( $.isPlainObject(name) ) {
290
+ $.extend(true, module, name);
291
+ }
292
+ else if(value !== undefined) {
293
+ module[name] = value;
294
+ }
295
+ else {
296
+ return module[name];
297
+ }
298
+ },
299
+ debug: function() {
300
+ if(settings.debug) {
301
+ if(settings.performance) {
302
+ module.performance.log(arguments);
303
+ }
304
+ else {
305
+ module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
306
+ module.debug.apply(console, arguments);
307
+ }
308
+ }
309
+ },
310
+ verbose: function() {
311
+ if(settings.verbose && settings.debug) {
312
+ if(settings.performance) {
313
+ module.performance.log(arguments);
314
+ }
315
+ else {
316
+ module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
317
+ module.verbose.apply(console, arguments);
318
+ }
319
+ }
320
+ },
321
+ error: function() {
322
+ module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
323
+ module.error.apply(console, arguments);
324
+ },
325
+ performance: {
326
+ log: function(message) {
327
+ var
328
+ currentTime,
329
+ executionTime,
330
+ previousTime
331
+ ;
332
+ if(settings.performance) {
333
+ currentTime = new Date().getTime();
334
+ previousTime = time || currentTime;
335
+ executionTime = currentTime - previousTime;
336
+ time = currentTime;
337
+ performance.push({
338
+ 'Name' : message[0],
339
+ 'Arguments' : [].slice.call(message, 1) || '',
340
+ 'Element' : element,
341
+ 'Execution Time' : executionTime
342
+ });
343
+ }
344
+ clearTimeout(module.performance.timer);
345
+ module.performance.timer = setTimeout(module.performance.display, 500);
346
+ },
347
+ display: function() {
348
+ var
349
+ title = settings.name + ':',
350
+ totalTime = 0
351
+ ;
352
+ time = false;
353
+ clearTimeout(module.performance.timer);
354
+ $.each(performance, function(index, data) {
355
+ totalTime += data['Execution Time'];
356
+ });
357
+ title += ' ' + totalTime + 'ms';
358
+ if(moduleSelector) {
359
+ title += ' \'' + moduleSelector + '\'';
360
+ }
361
+ if($allModules.length > 1) {
362
+ title += ' ' + '(' + $allModules.length + ')';
363
+ }
364
+ if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
365
+ console.groupCollapsed(title);
366
+ if(console.table) {
367
+ console.table(performance);
368
+ }
369
+ else {
370
+ $.each(performance, function(index, data) {
371
+ console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
372
+ });
373
+ }
374
+ console.groupEnd();
375
+ }
376
+ performance = [];
377
+ }
378
+ },
379
+ invoke: function(query, passedArguments, context) {
380
+ var
381
+ object = instance,
382
+ maxDepth,
383
+ found,
384
+ response
385
+ ;
386
+ passedArguments = passedArguments || queryArguments;
387
+ context = element || context;
388
+ if(typeof query == 'string' && object !== undefined) {
389
+ query = query.split(/[\. ]/);
390
+ maxDepth = query.length - 1;
391
+ $.each(query, function(depth, value) {
392
+ var camelCaseValue = (depth != maxDepth)
393
+ ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
394
+ : query
395
+ ;
396
+ if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
397
+ object = object[camelCaseValue];
398
+ }
399
+ else if( object[camelCaseValue] !== undefined ) {
400
+ found = object[camelCaseValue];
401
+ return false;
402
+ }
403
+ else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
404
+ object = object[value];
405
+ }
406
+ else if( object[value] !== undefined ) {
407
+ found = object[value];
408
+ return false;
409
+ }
410
+ else {
411
+ module.error(error.method, query);
412
+ return false;
413
+ }
414
+ });
415
+ }
416
+ if ( $.isFunction( found ) ) {
417
+ response = found.apply(context, passedArguments);
418
+ }
419
+ else if(found !== undefined) {
420
+ response = found;
421
+ }
422
+ if($.isArray(returnedValue)) {
423
+ returnedValue.push(response);
424
+ }
425
+ else if(returnedValue !== undefined) {
426
+ returnedValue = [returnedValue, response];
427
+ }
428
+ else if(response !== undefined) {
429
+ returnedValue = response;
430
+ }
431
+ return found;
432
+ }
433
+ };
434
+
435
+ if(methodInvoked) {
436
+ if(instance === undefined) {
437
+ module.initialize();
438
+ }
439
+ module.invoke(query);
440
+ }
441
+ else {
442
+ if(instance !== undefined) {
443
+ instance.invoke('destroy');
444
+ }
445
+ module.initialize();
446
+ }
447
+ })
448
+ ;
449
+ return (returnedValue !== undefined)
450
+ ? returnedValue
451
+ : this
452
+ ;
453
+ };
454
+
455
+ $.fn.video.settings = {
456
+
457
+ name : 'Video',
458
+ namespace : 'video',
459
+
460
+ debug : false,
461
+ verbose : false,
462
+ performance : true,
463
+
464
+ metadata : {
465
+ id : 'id',
466
+ image : 'image',
467
+ source : 'source',
468
+ url : 'url'
469
+ },
470
+
471
+ source : false,
472
+ url : false,
473
+ id : false,
474
+
475
+ aspectRatio : (16/9),
476
+
477
+ onPlay : function(){},
478
+ onReset : function(){},
479
+ onChange : function(){},
480
+
481
+ // callbacks not coded yet (needs to use jsapi)
482
+ onPause : function() {},
483
+ onStop : function() {},
484
+
485
+ width : 'auto',
486
+ height : 'auto',
487
+
488
+ autoplay : 'auto',
489
+ color : '#442359',
490
+ hd : true,
491
+ showUI : false,
492
+ api : true,
493
+
494
+ regExp : {
495
+ youtube : /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,
496
+ vimeo : /http:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/
497
+ },
498
+
499
+ error : {
500
+ noVideo : 'No video specified',
501
+ method : 'The method you called is not defined'
502
+ },
503
+
504
+ className : {
505
+ active : 'active'
506
+ },
507
+
508
+ selector : {
509
+ embed : '.embed',
510
+ placeholder : '.placeholder',
511
+ playButton : '.play'
512
+ }
513
+ };
514
+
515
+ $.fn.video.settings.templates = {
516
+ video: function(image) {
517
+ var
518
+ html = ''
519
+ ;
520
+ if(image) {
521
+ html += ''
522
+ + '<i class="video play icon"></i>'
523
+ + '<img class="placeholder" src="' + image + '">'
524
+ ;
525
+ }
526
+ html += '<div class="embed"></div>';
527
+ return html;
528
+ }
529
+ };
530
+
531
+
532
+ })( jQuery, window , document );