speedo 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. data/app/assets/javascripts/speedo.js +12 -12
  2. data/app/views/layouts/speedo/application.html.haml +2 -2
  3. data/lib/speedo/sass.rb +1 -1
  4. data/lib/speedo/version.rb +1 -1
  5. data/test/dummy/log/development.log +889 -0
  6. data/test/dummy/tmp/cache/assets/BC8/350/sprockets%2F3357f02a74351649de62769431854154 +0 -0
  7. data/test/dummy/tmp/cache/assets/BFD/090/sprockets%2F50267839603d9c7384477250f0169f0e +0 -0
  8. data/test/dummy/tmp/cache/assets/C4F/220/sprockets%2F19a6a3539a4ed0526c356691798032a3 +0 -0
  9. data/test/dummy/tmp/cache/assets/C55/E10/sprockets%2F9da121566709335e3081059e7774a9bb +957 -0
  10. data/test/dummy/tmp/cache/assets/C5F/4E0/sprockets%2F4c17092a9c628e66645a4586e9b50717 +57 -0
  11. data/test/dummy/tmp/cache/assets/C82/BB0/sprockets%2F904cd2f9283528b32d94a1d2a6711489 +41 -0
  12. data/test/dummy/tmp/cache/assets/CDE/600/sprockets%2F205a8cce7806d7c77117f1dc263146a8 +0 -0
  13. data/test/dummy/tmp/cache/assets/CE0/930/sprockets%2Fb6670296cd6b3ce81034c8d5d31e5725 +8 -0
  14. data/test/dummy/tmp/cache/assets/CE1/3B0/sprockets%2Fe8865654d2d075e6bba1074193e443dc +350 -0
  15. data/test/dummy/tmp/cache/assets/CF5/F40/sprockets%2F72637ea0f394f68dcc931527509e79ec +0 -0
  16. data/test/dummy/tmp/cache/assets/CF9/7C0/sprockets%2F488b6dcdeb1301268a65202e7101ed2a +974 -0
  17. data/test/dummy/tmp/cache/assets/D0C/C60/sprockets%2F39d93fba83bb3b50a75826703c5a28c5 +311 -0
  18. data/test/dummy/tmp/cache/assets/D1D/D50/sprockets%2F5b87bedce3ae871f14e41e2479290866 +0 -0
  19. data/test/dummy/tmp/cache/assets/D2A/5C0/sprockets%2Fe12edc211b1935a76d3aab4e8716006d +394 -0
  20. data/test/dummy/tmp/cache/assets/D3A/090/sprockets%2F0d24039ad1b8ef3525e367fe51905fbb +11635 -0
  21. data/test/dummy/tmp/cache/assets/D3B/1E0/sprockets%2Fe5f2362b8b1eb8273f1a7764cbb15e35 +11618 -0
  22. data/test/dummy/tmp/cache/assets/D3D/F80/sprockets%2Fadfc8f7271b3a873f3462e149a6a34e0 +374 -0
  23. data/test/dummy/tmp/cache/assets/D3F/0A0/sprockets%2Fc4574a4ea12e8efe636123e1a17f7d66 +11773 -0
  24. data/test/dummy/tmp/cache/assets/D42/CB0/sprockets%2F6c01eb50fe79d82720a649960dee5dd0 +20 -0
  25. data/test/dummy/tmp/cache/assets/D49/2B0/sprockets%2F34363288c95affbe232a199c6938ceab +391 -0
  26. data/test/dummy/tmp/cache/assets/D5B/120/sprockets%2F525577d56abcec9969e805ddc2997fd0 +332 -0
  27. data/test/dummy/tmp/cache/assets/D65/820/sprockets%2F4e91290eae5edd2f4d287ca2952be000 +327 -0
  28. data/test/dummy/tmp/cache/assets/D6C/3D0/sprockets%2Fa62ebc5f479b52c204f4c71ea65594ca +55 -0
  29. data/test/dummy/tmp/cache/assets/D71/D90/sprockets%2F7bb9508df3d877f853823addd4b0a22b +19 -0
  30. data/test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +0 -0
  31. data/test/dummy/tmp/cache/assets/D97/830/sprockets%2Fd55ede995a2705ab74db22acf510dd90 +0 -0
  32. data/test/dummy/tmp/cache/assets/D9B/400/sprockets%2Fec83dc0dc78764b460a3ffc063df25e0 +11789 -0
  33. data/test/dummy/tmp/cache/assets/DA1/670/sprockets%2Fb71f32bbfb530e59ad7a177cf54a888b +0 -0
  34. data/test/dummy/tmp/cache/assets/DA8/760/sprockets%2F1359bb83c703a91d57cfebdaf879a4d7 +9288 -0
  35. data/test/dummy/tmp/cache/assets/DB3/C60/sprockets%2F1ff86e3b1c5bf1c179ac719fced99829 +53 -0
  36. data/test/dummy/tmp/cache/assets/DBE/F80/sprockets%2F8647fc3439abdaa0eb161dadf2fc4304 +694 -0
  37. data/test/dummy/tmp/cache/assets/DC3/CC0/sprockets%2Fa04ece65c59a7a325cab61861da2be7e +0 -0
  38. data/test/dummy/tmp/cache/assets/DC5/290/sprockets%2F1c5dee9b02ab66fbf6e62627a13e27ba +37 -0
  39. data/test/dummy/tmp/cache/assets/DE9/520/sprockets%2Fe9f8259c99da2f355198dc4bcdebb69d +0 -0
  40. data/test/dummy/tmp/cache/assets/DEA/500/sprockets%2F485fc5ba3f81b49ccdd788885ea8de5e +0 -0
  41. data/test/dummy/tmp/cache/assets/DF2/CB0/sprockets%2F4500acae993e0fa07bd48dceee07e2b3 +0 -0
  42. data/test/dummy/tmp/cache/assets/DF9/EB0/sprockets%2Ffcaa51a13d86ac9cf245f2a5d70c9d8c +256 -0
  43. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  44. data/test/dummy/tmp/cache/assets/E7F/BB0/sprockets%2Ffdeefdc424a13a04addae542356dffae +678 -0
  45. data/test/dummy/tmp/cache/assets/E82/D20/sprockets%2Fcdce4acb88dcbeaba64a06a254a9e09f +0 -0
  46. metadata +192 -88
  47. /data/vendor/assets/javascripts/{chosen.jquery.js → speedo/chosen.jquery.js} +0 -0
  48. /data/vendor/assets/javascripts/{jquery.autoSuggest.js → speedo/jquery.autoSuggest.js} +0 -0
  49. /data/vendor/assets/javascripts/{jquery.autogrow.js → speedo/jquery.autogrow.js} +0 -0
  50. /data/vendor/assets/javascripts/{jquery.dataTables.js → speedo/jquery.dataTables.js} +0 -0
  51. /data/vendor/assets/javascripts/{jquery.livequery.js → speedo/jquery.livequery.js} +0 -0
  52. /data/vendor/assets/javascripts/{jquery.mousewheel-3.0.4.pack.js → speedo/jquery.mousewheel-3.0.4.pack.js} +0 -0
  53. /data/vendor/assets/javascripts/{jquery.placeholder.min.js → speedo/jquery.placeholder.min.js} +0 -0
  54. /data/vendor/assets/javascripts/{jquery.spin.js → speedo/jquery.spin.js} +0 -0
  55. /data/vendor/assets/javascripts/{jquery.timeago.js → speedo/jquery.timeago.js} +0 -0
  56. /data/vendor/assets/javascripts/{jquery.tools.min.js → speedo/jquery.tools.min.js} +0 -0
  57. /data/vendor/assets/javascripts/{jquery.uniform.js → speedo/jquery.uniform.js} +0 -0
  58. /data/vendor/assets/javascripts/{modernizr.min.js → speedo/modernizr.min.js} +0 -0
  59. /data/vendor/assets/javascripts/{respond.js → speedo/respond.js} +0 -0
  60. /data/vendor/assets/javascripts/{spin.js → speedo/spin.js} +0 -0
  61. /data/vendor/assets/stylesheets/{autoSuggest.css → speedo/autoSuggest.css} +0 -0
  62. /data/vendor/assets/stylesheets/{chosen-sprite.png → speedo/chosen-sprite.png} +0 -0
  63. /data/vendor/assets/stylesheets/{chosen.css → speedo/chosen.css} +0 -0
  64. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/Sorting icons.psd +0 -0
  65. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/back_disabled.png +0 -0
  66. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/back_enabled.png +0 -0
  67. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/back_enabled_hover.png +0 -0
  68. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/favicon.ico +0 -0
  69. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/forward_disabled.png +0 -0
  70. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/forward_enabled.png +0 -0
  71. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/forward_enabled_hover.png +0 -0
  72. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/sort_asc.png +0 -0
  73. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/sort_asc_disabled.png +0 -0
  74. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/sort_both.png +0 -0
  75. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/sort_desc.png +0 -0
  76. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/sort_desc_disabled.png +0 -0
  77. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  78. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  79. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_glass_65_ffffff_1x400.png +0 -0
  80. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_glass_75_dadada_1x400.png +0 -0
  81. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  82. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_glass_75_ffffff_1x400.png +0 -0
  83. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  84. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
  85. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-icons_222222_256x240.png +0 -0
  86. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-icons_2e83ff_256x240.png +0 -0
  87. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-icons_454545_256x240.png +0 -0
  88. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-icons_888888_256x240.png +0 -0
  89. /data/vendor/assets/stylesheets/{dataTables → speedo/dataTables}/ui-icons_cd0a0a_256x240.png +0 -0
  90. /data/vendor/assets/stylesheets/{formtastic-buttonless.css → speedo/formtastic-buttonless.css} +0 -0
  91. /data/vendor/assets/stylesheets/{gh-buttons.css → speedo/gh-buttons.css} +0 -0
  92. /data/vendor/assets/stylesheets/{gh-icons.png → speedo/gh-icons.png} +0 -0
  93. /data/vendor/assets/stylesheets/{jquery-ui-1.8.18.custom.css → speedo/jquery-ui-1.8.18.custom.css} +0 -0
  94. /data/vendor/assets/stylesheets/{jquery.dataTables.css → speedo/jquery.dataTables.css} +0 -0
  95. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  96. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  97. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_glass_65_ffffff_1x400.png +0 -0
  98. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_glass_75_dadada_1x400.png +0 -0
  99. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  100. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_glass_75_ffffff_1x400.png +0 -0
  101. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  102. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
  103. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-icons_222222_256x240.png +0 -0
  104. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-icons_2e83ff_256x240.png +0 -0
  105. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-icons_454545_256x240.png +0 -0
  106. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-icons_888888_256x240.png +0 -0
  107. /data/vendor/assets/stylesheets/{jqueryui → speedo/jqueryui}/ui-icons_cd0a0a_256x240.png +0 -0
  108. /data/vendor/assets/stylesheets/{normalize.css → speedo/normalize.css} +0 -0
  109. /data/vendor/assets/stylesheets/{uniform → speedo/uniform}/bg-input-focus.png +0 -0
  110. /data/vendor/assets/stylesheets/{uniform → speedo/uniform}/bg-input.png +0 -0
  111. /data/vendor/assets/stylesheets/{uniform → speedo/uniform}/sprite-aristo.png +0 -0
  112. /data/vendor/assets/stylesheets/{uniform → speedo/uniform}/sprite.png +0 -0
  113. /data/vendor/assets/stylesheets/{uniform.default.css → speedo/uniform.default.css} +0 -0
@@ -0,0 +1,394 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1339771359.3520699: @value{I"
2
+ class:EFI"BundledAsset;
3
+ FI"id;
4
+ F"%1ea926f24f639eded005fe0ed4d93aacI"logical_path;
5
+ F"jquery_ujs.jsI"
6
+ F"p/Users/stu/.rvm/gems/ruby-1.9.3-p0@groupie/gems/jquery-rails-1.0.19/vendor/assets/javascripts/jquery_ujs.jsI"content_type;
7
+ FI"application/javascript;
8
+ FI"
9
+ mtime;
10
+ FI"2012-05-28T11:16:46-04:00;
11
+ FI" body;
12
+ FI"�;(function($, undefined) {
13
+
14
+ /**
15
+ * Unobtrusive scripting adapter for jQuery
16
+ *
17
+ * Requires jQuery 1.6.0 or later.
18
+ * https://github.com/rails/jquery-ujs
19
+
20
+ * Uploading file using rails.js
21
+ * =============================
22
+ *
23
+ * By default, browsers do not allow files to be uploaded via AJAX. As a result, if there are any non-blank file fields
24
+ * in the remote form, this adapter aborts the AJAX submission and allows the form to submit through standard means.
25
+ *
26
+ * The `ajax:aborted:file` event allows you to bind your own handler to process the form submission however you wish.
27
+ *
28
+ * Ex:
29
+ * $('form').live('ajax:aborted:file', function(event, elements){
30
+ * // Implement own remote file-transfer handler here for non-blank file inputs passed in `elements`.
31
+ * // Returning false in this handler tells rails.js to disallow standard form submission
32
+ * return false;
33
+ * });
34
+ *
35
+ * The `ajax:aborted:file` event is fired when a file-type input is detected with a non-blank value.
36
+ *
37
+ * Third-party tools can use this hook to detect when an AJAX file upload is attempted, and then use
38
+ * techniques like the iframe method to upload the file instead.
39
+ *
40
+ * Required fields in rails.js
41
+ * ===========================
42
+ *
43
+ * If any blank required inputs (required="required") are detected in the remote form, the whole form submission
44
+ * is canceled. Note that this is unlike file inputs, which still allow standard (non-AJAX) form submission.
45
+ *
46
+ * The `ajax:aborted:required` event allows you to bind your own handler to inform the user of blank required inputs.
47
+ *
48
+ * !! Note that Opera does not fire the form's submit event if there are blank required inputs, so this event may never
49
+ * get fired in Opera. This event is what causes other browsers to exhibit the same submit-aborting behavior.
50
+ *
51
+ * Ex:
52
+ * $('form').live('ajax:aborted:required', function(event, elements){
53
+ * // Returning false in this handler tells rails.js to submit the form anyway.
54
+ * // The blank required inputs are passed to this function in `elements`.
55
+ * return ! confirm("Would you like to submit the form with missing info?");
56
+ * });
57
+ */
58
+
59
+ // Shorthand to make it a little easier to call public rails functions from within rails.js
60
+ var rails;
61
+
62
+ $.rails = rails = {
63
+ // Link elements bound by jquery-ujs
64
+ linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]',
65
+
66
+ // Select elements bound by jquery-ujs
67
+ inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',
68
+
69
+ // Form elements bound by jquery-ujs
70
+ formSubmitSelector: 'form',
71
+
72
+ // Form input elements bound by jquery-ujs
73
+ formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not(button[type])',
74
+
75
+ // Form input elements disabled during form submission
76
+ disableSelector: 'input[data-disable-with], button[data-disable-with], textarea[data-disable-with]',
77
+
78
+ // Form input elements re-enabled after form submission
79
+ enableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled',
80
+
81
+ // Form required input elements
82
+ requiredInputSelector: 'input[name][required]:not([disabled]),textarea[name][required]:not([disabled])',
83
+
84
+ // Form file input elements
85
+ fileInputSelector: 'input:file',
86
+
87
+ // Link onClick disable selector with possible reenable after remote submission
88
+ linkDisableSelector: 'a[data-disable-with]',
89
+
90
+ // Make sure that every Ajax request sends the CSRF token
91
+ CSRFProtection: function(xhr) {
92
+ var token = $('meta[name="csrf-token"]').attr('content');
93
+ if (token) xhr.setRequestHeader('X-CSRF-Token', token);
94
+ },
95
+
96
+ // Triggers an event on an element and returns false if the event result is false
97
+ fire: function(obj, name, data) {
98
+ var event = $.Event(name);
99
+ obj.trigger(event, data);
100
+ return event.result !== false;
101
+ },
102
+
103
+ // Default confirm dialog, may be overridden with custom confirm dialog in $.rails.confirm
104
+ confirm: function(message) {
105
+ return confirm(message);
106
+ },
107
+
108
+ // Default ajax function, may be overridden with custom function in $.rails.ajax
109
+ ajax: function(options) {
110
+ return $.ajax(options);
111
+ },
112
+
113
+ // Submits "remote" forms and links with ajax
114
+ handleRemote: function(element) {
115
+ var method, url, data,
116
+ crossDomain = element.data('cross-domain') || null,
117
+ dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType),
118
+ options;
119
+
120
+ if (rails.fire(element, 'ajax:before')) {
121
+
122
+ if (element.is('form')) {
123
+ method = element.attr('method');
124
+ url = element.attr('action');
125
+ data = element.serializeArray();
126
+ // memoized value from clicked submit button
127
+ var button = element.data('ujs:submit-button');
128
+ if (button) {
129
+ data.push(button);
130
+ element.data('ujs:submit-button', null);
131
+ }
132
+ } else if (element.is(rails.inputChangeSelector)) {
133
+ method = element.data('method');
134
+ url = element.data('url');
135
+ data = element.serialize();
136
+ if (element.data('params')) data = data + "&" + element.data('params');
137
+ } else {
138
+ method = element.data('method');
139
+ url = element.attr('href');
140
+ data = element.data('params') || null;
141
+ }
142
+
143
+ options = {
144
+ type: method || 'GET', data: data, dataType: dataType, crossDomain: crossDomain,
145
+ // stopping the "ajax:beforeSend" event will cancel the ajax request
146
+ beforeSend: function(xhr, settings) {
147
+ if (settings.dataType === undefined) {
148
+ xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
149
+ }
150
+ return rails.fire(element, 'ajax:beforeSend', [xhr, settings]);
151
+ },
152
+ success: function(data, status, xhr) {
153
+ element.trigger('ajax:success', [data, status, xhr]);
154
+ },
155
+ complete: function(xhr, status) {
156
+ element.trigger('ajax:complete', [xhr, status]);
157
+ },
158
+ error: function(xhr, status, error) {
159
+ element.trigger('ajax:error', [xhr, status, error]);
160
+ }
161
+ };
162
+ // Only pass url to `ajax` options if not blank
163
+ if (url) { options.url = url; }
164
+
165
+ return rails.ajax(options);
166
+ } else {
167
+ return false;
168
+ }
169
+ },
170
+
171
+ // Handles "data-method" on links such as:
172
+ // <a href="/users/5" data-method="delete" rel="nofollow" data-confirm="Are you sure?">Delete</a>
173
+ handleMethod: function(link) {
174
+ var href = link.attr('href'),
175
+ method = link.data('method'),
176
+ target = link.attr('target'),
177
+ csrf_token = $('meta[name=csrf-token]').attr('content'),
178
+ csrf_param = $('meta[name=csrf-param]').attr('content'),
179
+ form = $('<form method="post" action="' + href + '"></form>'),
180
+ metadata_input = '<input name="_method" value="' + method + '" type="hidden" />';
181
+
182
+ if (csrf_param !== undefined && csrf_token !== undefined) {
183
+ metadata_input += '<input name="' + csrf_param + '" value="' + csrf_token + '" type="hidden" />';
184
+ }
185
+
186
+ if (target) { form.attr('target', target); }
187
+
188
+ form.hide().append(metadata_input).appendTo('body');
189
+ form.submit();
190
+ },
191
+
192
+ /* Disables form elements:
193
+ - Caches element value in 'ujs:enable-with' data store
194
+ - Replaces element text with value of 'data-disable-with' attribute
195
+ - Sets disabled property to true
196
+ */
197
+ disableFormElements: function(form) {
198
+ form.find(rails.disableSelector).each(function() {
199
+ var element = $(this), method = element.is('button') ? 'html' : 'val';
200
+ element.data('ujs:enable-with', element[method]());
201
+ element[method](element.data('disable-with'));
202
+ element.prop('disabled', true);
203
+ });
204
+ },
205
+
206
+ /* Re-enables disabled form elements:
207
+ - Replaces element text with cached value from 'ujs:enable-with' data store (created in `disableFormElements`)
208
+ - Sets disabled property to false
209
+ */
210
+ enableFormElements: function(form) {
211
+ form.find(rails.enableSelector).each(function() {
212
+ var element = $(this), method = element.is('button') ? 'html' : 'val';
213
+ if (element.data('ujs:enable-with')) element[method](element.data('ujs:enable-with'));
214
+ element.prop('disabled', false);
215
+ });
216
+ },
217
+
218
+ /* For 'data-confirm' attribute:
219
+ - Fires `confirm` event
220
+ - Shows the confirmation dialog
221
+ - Fires the `confirm:complete` event
222
+
223
+ Returns `true` if no function stops the chain and user chose yes; `false` otherwise.
224
+ Attaching a handler to the element's `confirm` event that returns a `falsy` value cancels the confirmation dialog.
225
+ Attaching a handler to the element's `confirm:complete` event that returns a `falsy` value makes this function
226
+ return false. The `confirm:complete` event is fired whether or not the user answered true or false to the dialog.
227
+ */
228
+ allowAction: function(element) {
229
+ var message = element.data('confirm'),
230
+ answer = false, callback;
231
+ if (!message) { return true; }
232
+
233
+ if (rails.fire(element, 'confirm')) {
234
+ answer = rails.confirm(message);
235
+ callback = rails.fire(element, 'confirm:complete', [answer]);
236
+ }
237
+ return answer && callback;
238
+ },
239
+
240
+ // Helper function which checks for blank inputs in a form that match the specified CSS selector
241
+ blankInputs: function(form, specifiedSelector, nonBlank) {
242
+ var inputs = $(), input,
243
+ selector = specifiedSelector || 'input,textarea';
244
+ form.find(selector).each(function() {
245
+ input = $(this);
246
+ // Collect non-blank inputs if nonBlank option is true, otherwise, collect blank inputs
247
+ if (nonBlank ? input.val() : !input.val()) {
248
+ inputs = inputs.add(input);
249
+ }
250
+ });
251
+ return inputs.length ? inputs : false;
252
+ },
253
+
254
+ // Helper function which checks for non-blank inputs in a form that match the specified CSS selector
255
+ nonBlankInputs: function(form, specifiedSelector) {
256
+ return rails.blankInputs(form, specifiedSelector, true); // true specifies nonBlank
257
+ },
258
+
259
+ // Helper function, needed to provide consistent behavior in IE
260
+ stopEverything: function(e) {
261
+ $(e.target).trigger('ujs:everythingStopped');
262
+ e.stopImmediatePropagation();
263
+ return false;
264
+ },
265
+
266
+ // find all the submit events directly bound to the form and
267
+ // manually invoke them. If anyone returns false then stop the loop
268
+ callFormSubmitBindings: function(form, event) {
269
+ var events = form.data('events'), continuePropagation = true;
270
+ if (events !== undefined && events['submit'] !== undefined) {
271
+ $.each(events['submit'], function(i, obj){
272
+ if (typeof obj.handler === 'function') return continuePropagation = obj.handler(event);
273
+ });
274
+ }
275
+ return continuePropagation;
276
+ },
277
+
278
+ // replace element's html with the 'data-disable-with' after storing original html
279
+ // and prevent clicking on it
280
+ disableElement: function(element) {
281
+ element.data('ujs:enable-with', element.html()); // store enabled state
282
+ element.html(element.data('disable-with')); // set to disabled state
283
+ element.bind('click.railsDisable', function(e) { // prevent further clicking
284
+ return rails.stopEverything(e)
285
+ });
286
+ },
287
+
288
+ // restore element to its original state which was disabled by 'disableElement' above
289
+ enableElement: function(element) {
290
+ if (element.data('ujs:enable-with') !== undefined) {
291
+ element.html(element.data('ujs:enable-with')); // set to old enabled state
292
+ // this should be element.removeData('ujs:enable-with')
293
+ // but, there is currently a bug in jquery which makes hyphenated data attributes not get removed
294
+ element.data('ujs:enable-with', false); // clean up cache
295
+ }
296
+ element.unbind('click.railsDisable'); // enable element
297
+ }
298
+
299
+ };
300
+
301
+ $.ajaxPrefilter(function(options, originalOptions, xhr){ if ( !options.crossDomain ) { rails.CSRFProtection(xhr); }});
302
+
303
+ $(document).delegate(rails.linkDisableSelector, 'ajax:complete', function() {
304
+ rails.enableElement($(this));
305
+ });
306
+
307
+ $(document).delegate(rails.linkClickSelector, 'click.rails', function(e) {
308
+ var link = $(this), method = link.data('method'), data = link.data('params');
309
+ if (!rails.allowAction(link)) return rails.stopEverything(e);
310
+
311
+ if (link.is(rails.linkDisableSelector)) rails.disableElement(link);
312
+
313
+ if (link.data('remote') !== undefined) {
314
+ if ( (e.metaKey || e.ctrlKey) && (!method || method === 'GET') && !data ) { return true; }
315
+
316
+ if (rails.handleRemote(link) === false) { rails.enableElement(link); }
317
+ return false;
318
+
319
+ } else if (link.data('method')) {
320
+ rails.handleMethod(link);
321
+ return false;
322
+ }
323
+ });
324
+
325
+ $(document).delegate(rails.inputChangeSelector, 'change.rails', function(e) {
326
+ var link = $(this);
327
+ if (!rails.allowAction(link)) return rails.stopEverything(e);
328
+
329
+ rails.handleRemote(link);
330
+ return false;
331
+ });
332
+
333
+ $(document).delegate(rails.formSubmitSelector, 'submit.rails', function(e) {
334
+ var form = $(this),
335
+ remote = form.data('remote') !== undefined,
336
+ blankRequiredInputs = rails.blankInputs(form, rails.requiredInputSelector),
337
+ nonBlankFileInputs = rails.nonBlankInputs(form, rails.fileInputSelector);
338
+
339
+ if (!rails.allowAction(form)) return rails.stopEverything(e);
340
+
341
+ // skip other logic when required values are missing or file upload is present
342
+ if (blankRequiredInputs && form.attr("novalidate") == undefined && rails.fire(form, 'ajax:aborted:required', [blankRequiredInputs])) {
343
+ return rails.stopEverything(e);
344
+ }
345
+
346
+ if (remote) {
347
+ if (nonBlankFileInputs) {
348
+ return rails.fire(form, 'ajax:aborted:file', [nonBlankFileInputs]);
349
+ }
350
+
351
+ // If browser does not support submit bubbling, then this live-binding will be called before direct
352
+ // bindings. Therefore, we should directly call any direct bindings before remotely submitting form.
353
+ if (!$.support.submitBubbles && $().jquery < '1.7' && rails.callFormSubmitBindings(form, e) === false) return rails.stopEverything(e);
354
+
355
+ rails.handleRemote(form);
356
+ return false;
357
+
358
+ } else {
359
+ // slight timeout so that the submit button gets properly serialized
360
+ setTimeout(function(){ rails.disableFormElements(form); }, 13);
361
+ }
362
+ });
363
+
364
+ $(document).delegate(rails.formInputClickSelector, 'click.rails', function(event) {
365
+ var button = $(this);
366
+
367
+ if (!rails.allowAction(button)) return rails.stopEverything(event);
368
+
369
+ // register the pressed submit button
370
+ var name = button.attr('name'),
371
+ data = name ? {name:name, value:button.val()} : null;
372
+
373
+ button.closest('form').data('ujs:submit-button', data);
374
+ });
375
+
376
+ $(document).delegate(rails.formSubmitSelector, 'ajax:beforeSend.rails', function(event) {
377
+ if (this == event.target) rails.disableFormElements($(this));
378
+ });
379
+
380
+ $(document).delegate(rails.formSubmitSelector, 'ajax:complete.rails', function(event) {
381
+ if (this == event.target) rails.enableFormElements($(this));
382
+ });
383
+
384
+ })( jQuery );
385
+ ;
386
+ FI"asset_paths;
387
+ F["p/Users/stu/.rvm/gems/ruby-1.9.3-p0@groupie/gems/jquery-rails-1.0.19/vendor/assets/javascripts/jquery_ujs.jsI"dependency_paths;
388
+ F[{I" path;
389
+ F"p/Users/stu/.rvm/gems/ruby-1.9.3-p0@groupie/gems/jquery-rails-1.0.19/vendor/assets/javascripts/jquery_ujs.jsI"
390
+ mtime;
391
+ FIu: Time
392
+ T: offseti���I"hexdigest;
393
+ F"%2caafa0c2617f9985c1a0b07ebaefadfI"
394
+ F"%46dde6621c301f4928e3b34efee9e3b5