transit 0.0.1 → 0.0.2

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.
Files changed (186) hide show
  1. data/Gemfile +19 -11
  2. data/app/assets/images/transit/icon24x24.png +0 -0
  3. data/app/assets/images/transit/icon24x24_files.png +0 -0
  4. data/app/assets/images/transit/jplayer.swf +0 -0
  5. data/app/assets/images/transit/uploadify.swf +0 -0
  6. data/app/assets/images/transit/video_player.swf +0 -0
  7. data/app/assets/javascripts/jqtools/expose.js +224 -0
  8. data/app/assets/javascripts/jqtools/flashembed.js +300 -0
  9. data/app/assets/javascripts/jqtools/overlay.js +294 -0
  10. data/app/assets/javascripts/jqtools/scrollable.js +3 -0
  11. data/app/assets/javascripts/jqtools/scrollable/autoscroll.js +81 -0
  12. data/app/assets/javascripts/jqtools/scrollable/base.js +335 -0
  13. data/app/assets/javascripts/jqtools/scrollable/navigator.js +139 -0
  14. data/app/assets/javascripts/jqtools/validator.js +590 -0
  15. data/app/assets/javascripts/jqueryui/accordion.js +611 -0
  16. data/app/assets/javascripts/jqueryui/autocomplete.js +612 -0
  17. data/app/assets/javascripts/jqueryui/button.js +388 -0
  18. data/app/assets/javascripts/jqueryui/core.js +312 -0
  19. data/app/assets/javascripts/jqueryui/datepicker.js +1791 -0
  20. data/app/assets/javascripts/jqueryui/dialog.js +878 -0
  21. data/app/assets/javascripts/jqueryui/draggable.js +815 -0
  22. data/app/assets/javascripts/jqueryui/droppable.js +285 -0
  23. data/app/assets/javascripts/jqueryui/effects/blind.js +49 -0
  24. data/app/assets/javascripts/jqueryui/effects/bounce.js +78 -0
  25. data/app/assets/javascripts/jqueryui/effects/clip.js +54 -0
  26. data/app/assets/javascripts/jqueryui/effects/core.js +746 -0
  27. data/app/assets/javascripts/jqueryui/effects/drop.js +50 -0
  28. data/app/assets/javascripts/jqueryui/effects/explode.js +79 -0
  29. data/app/assets/javascripts/jqueryui/effects/fade.js +32 -0
  30. data/app/assets/javascripts/jqueryui/effects/fold.js +56 -0
  31. data/app/assets/javascripts/jqueryui/effects/highlight.js +50 -0
  32. data/app/assets/javascripts/jqueryui/effects/pulsate.js +51 -0
  33. data/app/assets/javascripts/jqueryui/effects/scale.js +178 -0
  34. data/app/assets/javascripts/jqueryui/effects/shake.js +57 -0
  35. data/app/assets/javascripts/jqueryui/effects/slide.js +50 -0
  36. data/app/assets/javascripts/jqueryui/effects/transfer.js +45 -0
  37. data/app/assets/javascripts/jqueryui/mouse.js +160 -0
  38. data/app/assets/javascripts/jqueryui/position.js +252 -0
  39. data/app/assets/javascripts/jqueryui/progressbar.js +109 -0
  40. data/app/assets/javascripts/jqueryui/resizable.js +814 -0
  41. data/app/assets/javascripts/jqueryui/selectable.js +266 -0
  42. data/app/assets/javascripts/jqueryui/slider.js +666 -0
  43. data/app/assets/javascripts/jqueryui/sortable.js +1077 -0
  44. data/app/assets/javascripts/jqueryui/tabs.js +758 -0
  45. data/app/assets/javascripts/jqueryui/widget.js +262 -0
  46. data/app/assets/javascripts/libs/backbone.js +1152 -0
  47. data/app/assets/javascripts/libs/cookie.js +89 -0
  48. data/app/assets/javascripts/libs/fileinput.js +130 -0
  49. data/app/assets/javascripts/libs/jplayer.js +1768 -0
  50. data/app/assets/javascripts/libs/proper.js +541 -0
  51. data/app/assets/javascripts/libs/sanitize.js +282 -0
  52. data/app/assets/javascripts/libs/selecttolist.js +75 -0
  53. data/app/assets/javascripts/libs/underscore.js +807 -0
  54. data/app/assets/javascripts/libs/uploadify.js +677 -0
  55. data/app/assets/javascripts/libs/wymeditor.js +9538 -0
  56. data/app/assets/javascripts/transit.js +4 -0
  57. data/app/assets/javascripts/transit/admin.js +22 -0
  58. data/app/assets/javascripts/transit/admin/contexts.js +52 -0
  59. data/app/assets/javascripts/transit/admin/fields.js +36 -0
  60. data/app/assets/javascripts/transit/admin/upload.js +109 -0
  61. data/app/assets/javascripts/transit/config.js.erb +101 -0
  62. data/app/assets/javascripts/transit/contexts/audio.js +39 -0
  63. data/app/assets/javascripts/transit/contexts/video.js +79 -0
  64. data/app/assets/javascripts/transit/core.js +171 -0
  65. data/app/assets/javascripts/transit/frontend.js +3 -0
  66. data/app/assets/javascripts/transit/lib/base64.js +120 -0
  67. data/app/assets/javascripts/transit/lib/editor.js +177 -0
  68. data/app/assets/javascripts/transit/views/audio_player.jst +22 -0
  69. data/app/assets/javascripts/transit/views/editor_toolbar.jst +12 -0
  70. data/app/assets/javascripts/transit/views/file_upload.jst +5 -0
  71. data/app/assets/javascripts/transit/views/video_player.jst +20 -0
  72. data/app/assets/javascripts/transit/views/wym_box.jst +4 -0
  73. data/app/assets/javascripts/transit/views/wym_iframe.jst +3 -0
  74. data/app/assets/stylesheets/transit.css.scss.erb +42 -0
  75. data/app/assets/stylesheets/transit/forms.css.scss +66 -0
  76. data/app/assets/stylesheets/transit/media/audio.css.scss +65 -0
  77. data/app/assets/stylesheets/transit/media/video.css.scss +30 -0
  78. data/app/assets/stylesheets/transit/panel.css.scss +100 -0
  79. data/app/assets/stylesheets/transit/ui.css.scss +507 -0
  80. data/app/controllers/pages_controller.rb +3 -0
  81. data/app/controllers/posts_controller.rb +3 -0
  82. data/app/controllers/transit/assets_controller.rb +38 -0
  83. data/app/controllers/transit/contexts_controller.rb +12 -9
  84. data/app/controllers/transit/pages_controller.rb +26 -0
  85. data/app/controllers/transit/posts_controller.rb +31 -0
  86. data/app/controllers/transit/topics_controller.rb +5 -0
  87. data/app/controllers/transit_controller.rb +16 -0
  88. data/app/helpers/transit/admin_helper.rb +43 -0
  89. data/app/helpers/transit/form_helper.rb +17 -0
  90. data/app/helpers/transit/package_helper.rb +41 -0
  91. data/app/helpers/transit/pagination_helper.rb +58 -0
  92. data/app/helpers/transit_helper.rb +42 -0
  93. data/app/models/comment.rb +37 -0
  94. data/app/models/contexts/audio.rb +12 -0
  95. data/app/models/{text.rb → contexts/text.rb} +0 -0
  96. data/app/models/contexts/video.rb +24 -0
  97. data/app/models/topic.rb +19 -0
  98. data/app/models/transit/asset.rb +68 -0
  99. data/{lib → app/models}/transit/context.rb +29 -0
  100. data/app/views/contexts/_text.html.erb +1 -1
  101. data/app/views/posts/index.rss.builder +18 -0
  102. data/app/views/transit/assets/_file.html.erb +4 -0
  103. data/app/views/transit/assets/_image.html.erb +13 -0
  104. data/app/views/transit/assets/create.js.erb +8 -0
  105. data/app/views/transit/assets/destroy.js.erb +3 -0
  106. data/app/views/transit/assets/manage.html.erb +20 -0
  107. data/app/views/transit/contexts/_audio.html.erb +18 -0
  108. data/app/views/transit/contexts/_text.html.erb +6 -0
  109. data/app/views/transit/contexts/_video.html.erb +13 -0
  110. data/app/views/transit/contexts/destroy.js.erb +1 -0
  111. data/app/views/transit/contexts/index.html.erb +5 -0
  112. data/app/views/transit/contexts/new.js.erb +7 -0
  113. data/app/views/transit/contexts/show.html.erb +8 -0
  114. data/app/views/transit/index.html.erb +26 -0
  115. data/app/views/transit/index.js.erb +1 -0
  116. data/app/views/transit/interface/post_panel.html.erb +96 -0
  117. data/app/views/transit/pages/_table.html.erb +7 -0
  118. data/app/views/transit/pages/edit.html.erb +17 -0
  119. data/app/views/transit/pages/index.html.erb +17 -0
  120. data/app/views/transit/pages/update.js.erb +1 -0
  121. data/app/views/transit/posts/_form.html.erb +49 -0
  122. data/app/views/transit/posts/edit.html.erb +14 -0
  123. data/app/views/transit/posts/new.html.erb +21 -0
  124. data/app/views/transit/table.html.erb +13 -0
  125. data/app/views/transit/table.js.erb +8 -0
  126. data/app/views/transit/topics/manage.html.erb +28 -0
  127. data/config/locales/en.yml +22 -0
  128. data/config/routes.rb +3 -3
  129. data/lib/transit.rb +51 -17
  130. data/lib/transit/admin.rb +85 -0
  131. data/lib/transit/builders/form_builder.rb +319 -0
  132. data/lib/transit/builders/jst_builder.rb +38 -0
  133. data/lib/transit/builders/package_builder.rb +45 -0
  134. data/lib/transit/config.rb +20 -0
  135. data/lib/transit/controller/generator.rb +42 -0
  136. data/lib/transit/controller/responder.rb +34 -0
  137. data/lib/transit/core_ext.rb +18 -0
  138. data/lib/transit/errors/resource_not_found.rb +6 -0
  139. data/lib/transit/model/assets.rb +14 -0
  140. data/lib/transit/model/attachments.rb +55 -0
  141. data/lib/transit/model/auto_increment.rb +22 -0
  142. data/lib/transit/model/base.rb +56 -0
  143. data/lib/transit/model/comments.rb +19 -0
  144. data/lib/transit/model/hooks.rb +38 -0
  145. data/lib/transit/model/owners.rb +14 -0
  146. data/lib/transit/model/paginator.rb +92 -0
  147. data/lib/transit/model/topics.rb +14 -0
  148. data/lib/transit/package/page.rb +20 -12
  149. data/lib/transit/package/post.rb +87 -33
  150. data/lib/transit/package/post/validations.rb +14 -0
  151. data/lib/transit/rails/engine.rb +29 -13
  152. data/lib/transit/rails/railtie.rb +31 -0
  153. data/lib/transit/rails/routing.rb +11 -6
  154. data/lib/transit/services.rb +13 -0
  155. data/lib/transit/services/base.rb +14 -0
  156. data/lib/transit/services/facebook.rb +13 -0
  157. data/lib/transit/services/ted.rb +10 -0
  158. data/lib/transit/services/twitter.rb +13 -0
  159. data/lib/transit/services/vimeo.rb +10 -0
  160. data/lib/transit/services/you_tube.rb +12 -0
  161. data/lib/transit/version.rb +1 -1
  162. metadata +178 -31
  163. data/app/assets/stylesheets/includes/_compat.scss +0 -24
  164. data/app/assets/stylesheets/includes/_defaults.scss +0 -99
  165. data/app/assets/stylesheets/includes/_global.scss +0 -16
  166. data/app/assets/stylesheets/includes/_imports.scss +0 -27
  167. data/app/assets/stylesheets/includes/_mixins.scss +0 -38
  168. data/app/assets/stylesheets/includes/_setup.scss +0 -85
  169. data/app/assets/stylesheets/layout.css.scss +0 -29
  170. data/app/assets/stylesheets/transit.css +0 -3
  171. data/app/controllers/application_controller.rb +0 -5
  172. data/app/controllers/transit/index_controller.rb +0 -7
  173. data/app/controllers/transit/packages_controller.rb +0 -64
  174. data/app/controllers/transit/transit_controller.rb +0 -4
  175. data/app/helpers/routing_helpers.rb +0 -7
  176. data/app/models/audio.rb +0 -4
  177. data/app/models/package_asset.rb +0 -11
  178. data/app/models/video.rb +0 -8
  179. data/app/views/contexts/_audio.html.erb +0 -1
  180. data/app/views/contexts/_video.html.erb +0 -1
  181. data/app/views/layouts/transit.html.erb +0 -31
  182. data/app/views/transit/index/index.html.erb +0 -0
  183. data/lib/transit/helpers/controller_helpers.rb +0 -40
  184. data/lib/transit/helpers/model_helpers.rb +0 -26
  185. data/lib/transit/package.rb +0 -25
  186. data/lib/transit/package/base.rb +0 -49
@@ -0,0 +1,285 @@
1
+ /*
2
+ * jQuery UI Droppable 1.8.13
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Droppables
9
+ *
10
+ * Depends:
11
+ * jquery.ui.core.js
12
+ * jquery.ui.widget.js
13
+ * jquery.ui.mouse.js
14
+ * jquery.ui.draggable.js
15
+ */
16
+ (function( $, undefined ) {
17
+
18
+ $.widget("ui.droppable", {
19
+ widgetEventPrefix: "drop",
20
+ options: {
21
+ accept: '*',
22
+ activeClass: false,
23
+ addClasses: true,
24
+ greedy: false,
25
+ hoverClass: false,
26
+ scope: 'default',
27
+ tolerance: 'intersect'
28
+ },
29
+ _create: function() {
30
+
31
+ var o = this.options, accept = o.accept;
32
+ this.isover = 0; this.isout = 1;
33
+
34
+ this.accept = $.isFunction(accept) ? accept : function(d) {
35
+ return d.is(accept);
36
+ };
37
+
38
+ //Store the droppable's proportions
39
+ this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
40
+
41
+ // Add the reference and positions to the manager
42
+ $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
43
+ $.ui.ddmanager.droppables[o.scope].push(this);
44
+
45
+ (o.addClasses && this.element.addClass("ui-droppable"));
46
+
47
+ },
48
+
49
+ destroy: function() {
50
+ var drop = $.ui.ddmanager.droppables[this.options.scope];
51
+ for ( var i = 0; i < drop.length; i++ )
52
+ if ( drop[i] == this )
53
+ drop.splice(i, 1);
54
+
55
+ this.element
56
+ .removeClass("ui-droppable ui-droppable-disabled")
57
+ .removeData("droppable")
58
+ .unbind(".droppable");
59
+
60
+ return this;
61
+ },
62
+
63
+ _setOption: function(key, value) {
64
+
65
+ if(key == 'accept') {
66
+ this.accept = $.isFunction(value) ? value : function(d) {
67
+ return d.is(value);
68
+ };
69
+ }
70
+ $.Widget.prototype._setOption.apply(this, arguments);
71
+ },
72
+
73
+ _activate: function(event) {
74
+ var draggable = $.ui.ddmanager.current;
75
+ if(this.options.activeClass) this.element.addClass(this.options.activeClass);
76
+ (draggable && this._trigger('activate', event, this.ui(draggable)));
77
+ },
78
+
79
+ _deactivate: function(event) {
80
+ var draggable = $.ui.ddmanager.current;
81
+ if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
82
+ (draggable && this._trigger('deactivate', event, this.ui(draggable)));
83
+ },
84
+
85
+ _over: function(event) {
86
+
87
+ var draggable = $.ui.ddmanager.current;
88
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
89
+
90
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
91
+ if(this.options.hoverClass) this.element.addClass(this.options.hoverClass);
92
+ this._trigger('over', event, this.ui(draggable));
93
+ }
94
+
95
+ },
96
+
97
+ _out: function(event) {
98
+
99
+ var draggable = $.ui.ddmanager.current;
100
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
101
+
102
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
103
+ if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
104
+ this._trigger('out', event, this.ui(draggable));
105
+ }
106
+
107
+ },
108
+
109
+ _drop: function(event,custom) {
110
+
111
+ var draggable = custom || $.ui.ddmanager.current;
112
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element
113
+
114
+ var childrenIntersection = false;
115
+ this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() {
116
+ var inst = $.data(this, 'droppable');
117
+ if(
118
+ inst.options.greedy
119
+ && !inst.options.disabled
120
+ && inst.options.scope == draggable.options.scope
121
+ && inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element))
122
+ && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
123
+ ) { childrenIntersection = true; return false; }
124
+ });
125
+ if(childrenIntersection) return false;
126
+
127
+ if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
128
+ if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
129
+ if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
130
+ this._trigger('drop', event, this.ui(draggable));
131
+ return this.element;
132
+ }
133
+
134
+ return false;
135
+
136
+ },
137
+
138
+ ui: function(c) {
139
+ return {
140
+ draggable: (c.currentItem || c.element),
141
+ helper: c.helper,
142
+ position: c.position,
143
+ offset: c.positionAbs
144
+ };
145
+ }
146
+
147
+ });
148
+
149
+ $.extend($.ui.droppable, {
150
+ version: "1.8.13"
151
+ });
152
+
153
+ $.ui.intersect = function(draggable, droppable, toleranceMode) {
154
+
155
+ if (!droppable.offset) return false;
156
+
157
+ var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
158
+ y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
159
+ var l = droppable.offset.left, r = l + droppable.proportions.width,
160
+ t = droppable.offset.top, b = t + droppable.proportions.height;
161
+
162
+ switch (toleranceMode) {
163
+ case 'fit':
164
+ return (l <= x1 && x2 <= r
165
+ && t <= y1 && y2 <= b);
166
+ break;
167
+ case 'intersect':
168
+ return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
169
+ && x2 - (draggable.helperProportions.width / 2) < r // Left Half
170
+ && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half
171
+ && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
172
+ break;
173
+ case 'pointer':
174
+ var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left),
175
+ draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top),
176
+ isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width);
177
+ return isOver;
178
+ break;
179
+ case 'touch':
180
+ return (
181
+ (y1 >= t && y1 <= b) || // Top edge touching
182
+ (y2 >= t && y2 <= b) || // Bottom edge touching
183
+ (y1 < t && y2 > b) // Surrounded vertically
184
+ ) && (
185
+ (x1 >= l && x1 <= r) || // Left edge touching
186
+ (x2 >= l && x2 <= r) || // Right edge touching
187
+ (x1 < l && x2 > r) // Surrounded horizontally
188
+ );
189
+ break;
190
+ default:
191
+ return false;
192
+ break;
193
+ }
194
+
195
+ };
196
+
197
+ /*
198
+ This manager tracks offsets of draggables and droppables
199
+ */
200
+ $.ui.ddmanager = {
201
+ current: null,
202
+ droppables: { 'default': [] },
203
+ prepareOffsets: function(t, event) {
204
+
205
+ var m = $.ui.ddmanager.droppables[t.options.scope] || [];
206
+ var type = event ? event.type : null; // workaround for #2317
207
+ var list = (t.currentItem || t.element).find(":data(droppable)").andSelf();
208
+
209
+ droppablesLoop: for (var i = 0; i < m.length; i++) {
210
+
211
+ if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted
212
+ for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item
213
+ m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
214
+
215
+ if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
216
+
217
+ m[i].offset = m[i].element.offset();
218
+ m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
219
+
220
+ }
221
+
222
+ },
223
+ drop: function(draggable, event) {
224
+
225
+ var dropped = false;
226
+ $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
227
+
228
+ if(!this.options) return;
229
+ if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
230
+ dropped = dropped || this._drop.call(this, event);
231
+
232
+ if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
233
+ this.isout = 1; this.isover = 0;
234
+ this._deactivate.call(this, event);
235
+ }
236
+
237
+ });
238
+ return dropped;
239
+
240
+ },
241
+ drag: function(draggable, event) {
242
+
243
+ //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
244
+ if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
245
+
246
+ //Run through all droppables and check their positions based on specific tolerance options
247
+ $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
248
+
249
+ if(this.options.disabled || this.greedyChild || !this.visible) return;
250
+ var intersects = $.ui.intersect(draggable, this, this.options.tolerance);
251
+
252
+ var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null);
253
+ if(!c) return;
254
+
255
+ var parentInstance;
256
+ if (this.options.greedy) {
257
+ var parent = this.element.parents(':data(droppable):eq(0)');
258
+ if (parent.length) {
259
+ parentInstance = $.data(parent[0], 'droppable');
260
+ parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
261
+ }
262
+ }
263
+
264
+ // we just moved into a greedy child
265
+ if (parentInstance && c == 'isover') {
266
+ parentInstance['isover'] = 0;
267
+ parentInstance['isout'] = 1;
268
+ parentInstance._out.call(parentInstance, event);
269
+ }
270
+
271
+ this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0;
272
+ this[c == "isover" ? "_over" : "_out"].call(this, event);
273
+
274
+ // we just moved out of a greedy child
275
+ if (parentInstance && c == 'isout') {
276
+ parentInstance['isout'] = 0;
277
+ parentInstance['isover'] = 1;
278
+ parentInstance._over.call(parentInstance, event);
279
+ }
280
+ });
281
+
282
+ }
283
+ };
284
+
285
+ })(jQuery);
@@ -0,0 +1,49 @@
1
+ /*
2
+ * jQuery UI Effects Blind 1.8.13
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Effects/Blind
9
+ *
10
+ * Depends:
11
+ * jquery.effects.core.js
12
+ */
13
+ (function( $, undefined ) {
14
+
15
+ $.effects.blind = function(o) {
16
+
17
+ return this.queue(function() {
18
+
19
+ // Create element
20
+ var el = $(this), props = ['position','top','bottom','left','right'];
21
+
22
+ // Set options
23
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
24
+ var direction = o.options.direction || 'vertical'; // Default direction
25
+
26
+ // Adjust
27
+ $.effects.save(el, props); el.show(); // Save & Show
28
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
29
+ var ref = (direction == 'vertical') ? 'height' : 'width';
30
+ var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width();
31
+ if(mode == 'show') wrapper.css(ref, 0); // Shift
32
+
33
+ // Animation
34
+ var animation = {};
35
+ animation[ref] = mode == 'show' ? distance : 0;
36
+
37
+ // Animate
38
+ wrapper.animate(animation, o.duration, o.options.easing, function() {
39
+ if(mode == 'hide') el.hide(); // Hide
40
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
41
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
42
+ el.dequeue();
43
+ });
44
+
45
+ });
46
+
47
+ };
48
+
49
+ })(jQuery);
@@ -0,0 +1,78 @@
1
+ /*
2
+ * jQuery UI Effects Bounce 1.8.13
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Effects/Bounce
9
+ *
10
+ * Depends:
11
+ * jquery.effects.core.js
12
+ */
13
+ (function( $, undefined ) {
14
+
15
+ $.effects.bounce = function(o) {
16
+
17
+ return this.queue(function() {
18
+
19
+ // Create element
20
+ var el = $(this), props = ['position','top','bottom','left','right'];
21
+
22
+ // Set options
23
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
24
+ var direction = o.options.direction || 'up'; // Default direction
25
+ var distance = o.options.distance || 20; // Default distance
26
+ var times = o.options.times || 5; // Default # of times
27
+ var speed = o.duration || 250; // Default speed per bounce
28
+ if (/show|hide/.test(mode)) props.push('opacity'); // Avoid touching opacity to prevent clearType and PNG issues in IE
29
+
30
+ // Adjust
31
+ $.effects.save(el, props); el.show(); // Save & Show
32
+ $.effects.createWrapper(el); // Create Wrapper
33
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
34
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
35
+ var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 3 : el.outerWidth({margin:true}) / 3);
36
+ if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
37
+ if (mode == 'hide') distance = distance / (times * 2);
38
+ if (mode != 'hide') times--;
39
+
40
+ // Animate
41
+ if (mode == 'show') { // Show Bounce
42
+ var animation = {opacity: 1};
43
+ animation[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
44
+ el.animate(animation, speed / 2, o.options.easing);
45
+ distance = distance / 2;
46
+ times--;
47
+ };
48
+ for (var i = 0; i < times; i++) { // Bounces
49
+ var animation1 = {}, animation2 = {};
50
+ animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
51
+ animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
52
+ el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing);
53
+ distance = (mode == 'hide') ? distance * 2 : distance / 2;
54
+ };
55
+ if (mode == 'hide') { // Last Bounce
56
+ var animation = {opacity: 0};
57
+ animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
58
+ el.animate(animation, speed / 2, o.options.easing, function(){
59
+ el.hide(); // Hide
60
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
61
+ if(o.callback) o.callback.apply(this, arguments); // Callback
62
+ });
63
+ } else {
64
+ var animation1 = {}, animation2 = {};
65
+ animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
66
+ animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
67
+ el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing, function(){
68
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
69
+ if(o.callback) o.callback.apply(this, arguments); // Callback
70
+ });
71
+ };
72
+ el.queue('fx', function() { el.dequeue(); });
73
+ el.dequeue();
74
+ });
75
+
76
+ };
77
+
78
+ })(jQuery);
@@ -0,0 +1,54 @@
1
+ /*
2
+ * jQuery UI Effects Clip 1.8.13
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Effects/Clip
9
+ *
10
+ * Depends:
11
+ * jquery.effects.core.js
12
+ */
13
+ (function( $, undefined ) {
14
+
15
+ $.effects.clip = function(o) {
16
+
17
+ return this.queue(function() {
18
+
19
+ // Create element
20
+ var el = $(this), props = ['position','top','bottom','left','right','height','width'];
21
+
22
+ // Set options
23
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
24
+ var direction = o.options.direction || 'vertical'; // Default direction
25
+
26
+ // Adjust
27
+ $.effects.save(el, props); el.show(); // Save & Show
28
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
29
+ var animate = el[0].tagName == 'IMG' ? wrapper : el;
30
+ var ref = {
31
+ size: (direction == 'vertical') ? 'height' : 'width',
32
+ position: (direction == 'vertical') ? 'top' : 'left'
33
+ };
34
+ var distance = (direction == 'vertical') ? animate.height() : animate.width();
35
+ if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift
36
+
37
+ // Animation
38
+ var animation = {};
39
+ animation[ref.size] = mode == 'show' ? distance : 0;
40
+ animation[ref.position] = mode == 'show' ? 0 : distance / 2;
41
+
42
+ // Animate
43
+ animate.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
44
+ if(mode == 'hide') el.hide(); // Hide
45
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
46
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
47
+ el.dequeue();
48
+ }});
49
+
50
+ });
51
+
52
+ };
53
+
54
+ })(jQuery);