kaui 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/kaui/refunds_controller.rb +0 -1
- data/app/views/kaui/refunds/new.html.erb +0 -10
- data/lib/kaui/version.rb +1 -1
- data/test/dummy/kaui_xna.sh +3 -0
- data/test/dummy/log/development.log +10 -98790
- data/test/dummy/log/test.log +19082 -123895
- data/test/dummy/tmp/cache/assets/C94/4E0/sprockets%2Fea1476dc10a3348303f74d111f70441a +0 -0
- data/test/dummy/tmp/cache/assets/{D07/DA0/sprockets%2Ffaad9b18203975dbf0c60f3234a51874 → C97/AF0/sprockets%2F26f7a8493d749271945a322974eee4e5} +0 -0
- data/test/dummy/tmp/cache/assets/{C8D/080/sprockets%2F4556c595251e3b8d4f688467e330da26 → C9C/870/sprockets%2F0402b03b507fa5960706b72da0d690f6} +0 -0
- data/test/dummy/tmp/cache/assets/CD0/9D0/sprockets%2F5c9508c21501c73fbe00473a09b1f5f4 +0 -0
- data/test/dummy/tmp/cache/assets/CD6/8E0/sprockets%2Fda1d0827029118e54fe463a0c0ff1568 +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/CEA/300/sprockets%2Fdf2ad5c9d0990441c2bf59883383d652 +0 -0
- data/test/dummy/tmp/cache/assets/{C95/690/sprockets%2Fc4b083702793f7599f4a3069c50f89a8 → D27/040/sprockets%2F94720e86301d9fdc78e0c291ce997fe5} +0 -0
- data/test/dummy/tmp/cache/assets/{E10/BE0/sprockets%2F9c06f8f8da4e736ccf6de8360cd39bfa → D29/500/sprockets%2F8ca0512b5c1a8cedb3ea5009152976b0} +0 -0
- data/test/dummy/tmp/cache/assets/D32/200/sprockets%2Ffa467106e01bda5d6246baea72159d64 +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/{CF7/710/sprockets%2F86d43448e1fc383cb6f3d752ef288882 → D38/920/sprockets%2F1c247930427b0d25cdf6e18b8ace607d} +0 -0
- data/test/dummy/tmp/cache/assets/D39/5E0/sprockets%2F59fd338be48a81a17a2a785cbd1612b4 +0 -0
- data/test/dummy/tmp/cache/assets/D44/170/sprockets%2Fac15571bce3f926a498da7cd09322d97 +0 -0
- data/test/dummy/tmp/cache/assets/{CAA/680/sprockets%2F3824d037523f650518fb22acab75559d → D46/610/sprockets%2F570cb35b90cf9cfd735673ebfb149326} +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D6C/710/sprockets%2F1765773caead06c0a6a19ea9de2453f7 +0 -0
- data/test/dummy/tmp/cache/assets/{CE0/8A0/sprockets%2Fc18dc7330236e7db17d280973d617b9a → D76/190/sprockets%2F477d2af6fe05c48f45ea721df3334be9} +0 -0
- data/test/dummy/tmp/cache/assets/D76/910/sprockets%2Ff99b4bdc434e11e8634e6af62fe805e0 +0 -0
- data/test/dummy/tmp/cache/assets/{DDF/650/sprockets%2Fbe16f0bf3d2b7af18010acbd53ba22f5 → D99/170/sprockets%2Fedd15cb243afc9888e2ae132be19d270} +0 -0
- data/test/dummy/tmp/cache/assets/D9F/{160/sprockets%2F510462e1ebd5dbb7ae20888b77f9bed2 → 550/sprockets%2Ff62dc25db0a8b19d619890ef1b94ea0f} +0 -0
- data/test/dummy/tmp/cache/assets/{CC2/520/sprockets%2F9637f46d37325381f96d96d94ae0bc50 → DBC/150/sprockets%2Fca62a9ed25e5faa10eb00524dcf72f09} +0 -0
- data/test/dummy/tmp/cache/assets/{CFF/A00/sprockets%2F642f58fb154eff788f45c881b294e818 → DCC/380/sprockets%2F5155cbf5f547ab9dfd05ad7f243b9da0} +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/{E22/F40/sprockets%2Faffacf2e6be325520bd3bfd2096b6dd4 → DEA/1E0/sprockets%2Fcceef1ff985f87dc5a3a279337f18d8e} +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E20/230/sprockets%2F7d3b1348fdf74cf1b6ba2107fbbac5af +0 -0
- data/test/dummy/tmp/cache/assets/E23/0C0/sprockets%2F6fea9cc1fe74102feb0015cecf63b5fb +0 -0
- metadata +382 -412
- data/app/controllers/kaui/tags_controller.rb +0 -85
- data/app/views/kaui/account_emails/edit.html.erb +0 -6
- data/app/views/kaui/analytics/payments_over_time.html.erb +0 -9
- data/app/views/kaui/tags/_form.html.erb +0 -25
- data/app/views/kaui/tags/edit.html.erb +0 -6
- data/app/views/kaui/tags/index.html.erb +0 -25
- data/app/views/kaui/tags/new.html.erb +0 -5
- data/app/views/kaui/tags/show.html.erb +0 -15
- data/test/dummy/tmp/cache/assets/CDF/1F0/sprockets%2F76ac5628a0c4d1b976cb622ec4493751 +0 -381
- data/test/dummy/tmp/cache/assets/CEC/5B0/sprockets%2F1695e8510891108e3950e2a3e4fdf9df +0 -0
- data/test/dummy/tmp/cache/assets/D04/1D0/sprockets%2F3baf64d90ead2434455d2296227ba8a2 +0 -7038
- data/test/dummy/tmp/cache/assets/D05/510/sprockets%2F1c14866e2401c27b0ff5e33d1b92c4e8 +0 -0
- data/test/dummy/tmp/cache/assets/D17/DD0/sprockets%2F665455ecdc7609b23f4ecb366d86055a +0 -9409
- data/test/dummy/tmp/cache/assets/D79/1E0/sprockets%2F97b08ebe07a73d8195ba124ffb45f98b +0 -7038
- data/test/dummy/tmp/cache/assets/E07/1E0/sprockets%2F5a3fe6e98fdf72bbe75c605e54ebc5b0 +0 -9409
- data/test/dummy/tmp/cache/assets/E24/9D0/sprockets%2Fb966ab0a50fda3c156fbad4d8ab73ef6 +0 -381
- data/test/functional/kaui/account_emails_controller_test.rb +0 -51
- data/test/functional/kaui/tags_controller_test.rb +0 -51
@@ -1,381 +0,0 @@
|
|
1
|
-
o: ActiveSupport::Cache::Entry :@compressedF:@created_atf1345257322.208:@expires_in0:@value"i?{"
|
2
|
-
class"ProcessedAsset"logical_path"jquery_ujs.js"
|
3
|
-
mtime"2012-08-14T09:37:41-07:00"lengthi�<"digest"%0ff3e5680ead3dadeee021c144835311"source"�<(function($, undefined) {
|
4
|
-
|
5
|
-
/**
|
6
|
-
* Unobtrusive scripting adapter for jQuery
|
7
|
-
*
|
8
|
-
* Requires jQuery 1.6.0 or later.
|
9
|
-
* https://github.com/rails/jquery-ujs
|
10
|
-
|
11
|
-
* Uploading file using rails.js
|
12
|
-
* =============================
|
13
|
-
*
|
14
|
-
* By default, browsers do not allow files to be uploaded via AJAX. As a result, if there are any non-blank file fields
|
15
|
-
* in the remote form, this adapter aborts the AJAX submission and allows the form to submit through standard means.
|
16
|
-
*
|
17
|
-
* The `ajax:aborted:file` event allows you to bind your own handler to process the form submission however you wish.
|
18
|
-
*
|
19
|
-
* Ex:
|
20
|
-
* $('form').live('ajax:aborted:file', function(event, elements){
|
21
|
-
* // Implement own remote file-transfer handler here for non-blank file inputs passed in `elements`.
|
22
|
-
* // Returning false in this handler tells rails.js to disallow standard form submission
|
23
|
-
* return false;
|
24
|
-
* });
|
25
|
-
*
|
26
|
-
* The `ajax:aborted:file` event is fired when a file-type input is detected with a non-blank value.
|
27
|
-
*
|
28
|
-
* Third-party tools can use this hook to detect when an AJAX file upload is attempted, and then use
|
29
|
-
* techniques like the iframe method to upload the file instead.
|
30
|
-
*
|
31
|
-
* Required fields in rails.js
|
32
|
-
* ===========================
|
33
|
-
*
|
34
|
-
* If any blank required inputs (required="required") are detected in the remote form, the whole form submission
|
35
|
-
* is canceled. Note that this is unlike file inputs, which still allow standard (non-AJAX) form submission.
|
36
|
-
*
|
37
|
-
* The `ajax:aborted:required` event allows you to bind your own handler to inform the user of blank required inputs.
|
38
|
-
*
|
39
|
-
* !! Note that Opera does not fire the form's submit event if there are blank required inputs, so this event may never
|
40
|
-
* get fired in Opera. This event is what causes other browsers to exhibit the same submit-aborting behavior.
|
41
|
-
*
|
42
|
-
* Ex:
|
43
|
-
* $('form').live('ajax:aborted:required', function(event, elements){
|
44
|
-
* // Returning false in this handler tells rails.js to submit the form anyway.
|
45
|
-
* // The blank required inputs are passed to this function in `elements`.
|
46
|
-
* return ! confirm("Would you like to submit the form with missing info?");
|
47
|
-
* });
|
48
|
-
*/
|
49
|
-
|
50
|
-
// Shorthand to make it a little easier to call public rails functions from within rails.js
|
51
|
-
var rails;
|
52
|
-
|
53
|
-
$.rails = rails = {
|
54
|
-
// Link elements bound by jquery-ujs
|
55
|
-
linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]',
|
56
|
-
|
57
|
-
// Select elements bound by jquery-ujs
|
58
|
-
inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',
|
59
|
-
|
60
|
-
// Form elements bound by jquery-ujs
|
61
|
-
formSubmitSelector: 'form',
|
62
|
-
|
63
|
-
// Form input elements bound by jquery-ujs
|
64
|
-
formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not(button[type])',
|
65
|
-
|
66
|
-
// Form input elements disabled during form submission
|
67
|
-
disableSelector: 'input[data-disable-with], button[data-disable-with], textarea[data-disable-with]',
|
68
|
-
|
69
|
-
// Form input elements re-enabled after form submission
|
70
|
-
enableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled',
|
71
|
-
|
72
|
-
// Form required input elements
|
73
|
-
requiredInputSelector: 'input[name][required]:not([disabled]),textarea[name][required]:not([disabled])',
|
74
|
-
|
75
|
-
// Form file input elements
|
76
|
-
fileInputSelector: 'input:file',
|
77
|
-
|
78
|
-
// Link onClick disable selector with possible reenable after remote submission
|
79
|
-
linkDisableSelector: 'a[data-disable-with]',
|
80
|
-
|
81
|
-
// Make sure that every Ajax request sends the CSRF token
|
82
|
-
CSRFProtection: function(xhr) {
|
83
|
-
var token = $('meta[name="csrf-token"]').attr('content');
|
84
|
-
if (token) xhr.setRequestHeader('X-CSRF-Token', token);
|
85
|
-
},
|
86
|
-
|
87
|
-
// Triggers an event on an element and returns false if the event result is false
|
88
|
-
fire: function(obj, name, data) {
|
89
|
-
var event = $.Event(name);
|
90
|
-
obj.trigger(event, data);
|
91
|
-
return event.result !== false;
|
92
|
-
},
|
93
|
-
|
94
|
-
// Default confirm dialog, may be overridden with custom confirm dialog in $.rails.confirm
|
95
|
-
confirm: function(message) {
|
96
|
-
return confirm(message);
|
97
|
-
},
|
98
|
-
|
99
|
-
// Default ajax function, may be overridden with custom function in $.rails.ajax
|
100
|
-
ajax: function(options) {
|
101
|
-
return $.ajax(options);
|
102
|
-
},
|
103
|
-
|
104
|
-
// Default way to get an element's href. May be overridden at $.rails.href.
|
105
|
-
href: function(element) {
|
106
|
-
return element.attr('href');
|
107
|
-
},
|
108
|
-
|
109
|
-
// Submits "remote" forms and links with ajax
|
110
|
-
handleRemote: function(element) {
|
111
|
-
var method, url, data, crossDomain, dataType, options;
|
112
|
-
|
113
|
-
if (rails.fire(element, 'ajax:before')) {
|
114
|
-
crossDomain = element.data('cross-domain') || null;
|
115
|
-
dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType);
|
116
|
-
|
117
|
-
if (element.is('form')) {
|
118
|
-
method = element.attr('method');
|
119
|
-
url = element.attr('action');
|
120
|
-
data = element.serializeArray();
|
121
|
-
// memoized value from clicked submit button
|
122
|
-
var button = element.data('ujs:submit-button');
|
123
|
-
if (button) {
|
124
|
-
data.push(button);
|
125
|
-
element.data('ujs:submit-button', null);
|
126
|
-
}
|
127
|
-
} else if (element.is(rails.inputChangeSelector)) {
|
128
|
-
method = element.data('method');
|
129
|
-
url = element.data('url');
|
130
|
-
data = element.serialize();
|
131
|
-
if (element.data('params')) data = data + "&" + element.data('params');
|
132
|
-
} else {
|
133
|
-
method = element.data('method');
|
134
|
-
url = rails.href(element);
|
135
|
-
data = element.data('params') || null;
|
136
|
-
}
|
137
|
-
|
138
|
-
options = {
|
139
|
-
type: method || 'GET', data: data, dataType: dataType, crossDomain: crossDomain,
|
140
|
-
// stopping the "ajax:beforeSend" event will cancel the ajax request
|
141
|
-
beforeSend: function(xhr, settings) {
|
142
|
-
if (settings.dataType === undefined) {
|
143
|
-
xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
|
144
|
-
}
|
145
|
-
return rails.fire(element, 'ajax:beforeSend', [xhr, settings]);
|
146
|
-
},
|
147
|
-
success: function(data, status, xhr) {
|
148
|
-
element.trigger('ajax:success', [data, status, xhr]);
|
149
|
-
},
|
150
|
-
complete: function(xhr, status) {
|
151
|
-
element.trigger('ajax:complete', [xhr, status]);
|
152
|
-
},
|
153
|
-
error: function(xhr, status, error) {
|
154
|
-
element.trigger('ajax:error', [xhr, status, error]);
|
155
|
-
}
|
156
|
-
};
|
157
|
-
// Only pass url to `ajax` options if not blank
|
158
|
-
if (url) { options.url = url; }
|
159
|
-
|
160
|
-
return rails.ajax(options);
|
161
|
-
} else {
|
162
|
-
return false;
|
163
|
-
}
|
164
|
-
},
|
165
|
-
|
166
|
-
// Handles "data-method" on links such as:
|
167
|
-
// <a href="/users/5" data-method="delete" rel="nofollow" data-confirm="Are you sure?">Delete</a>
|
168
|
-
handleMethod: function(link) {
|
169
|
-
var href = rails.href(link),
|
170
|
-
method = link.data('method'),
|
171
|
-
target = link.attr('target'),
|
172
|
-
csrf_token = $('meta[name=csrf-token]').attr('content'),
|
173
|
-
csrf_param = $('meta[name=csrf-param]').attr('content'),
|
174
|
-
form = $('<form method="post" action="' + href + '"></form>'),
|
175
|
-
metadata_input = '<input name="_method" value="' + method + '" type="hidden" />';
|
176
|
-
|
177
|
-
if (csrf_param !== undefined && csrf_token !== undefined) {
|
178
|
-
metadata_input += '<input name="' + csrf_param + '" value="' + csrf_token + '" type="hidden" />';
|
179
|
-
}
|
180
|
-
|
181
|
-
if (target) { form.attr('target', target); }
|
182
|
-
|
183
|
-
form.hide().append(metadata_input).appendTo('body');
|
184
|
-
form.submit();
|
185
|
-
},
|
186
|
-
|
187
|
-
/* Disables form elements:
|
188
|
-
- Caches element value in 'ujs:enable-with' data store
|
189
|
-
- Replaces element text with value of 'data-disable-with' attribute
|
190
|
-
- Sets disabled property to true
|
191
|
-
*/
|
192
|
-
disableFormElements: function(form) {
|
193
|
-
form.find(rails.disableSelector).each(function() {
|
194
|
-
var element = $(this), method = element.is('button') ? 'html' : 'val';
|
195
|
-
element.data('ujs:enable-with', element[method]());
|
196
|
-
element[method](element.data('disable-with'));
|
197
|
-
element.prop('disabled', true);
|
198
|
-
});
|
199
|
-
},
|
200
|
-
|
201
|
-
/* Re-enables disabled form elements:
|
202
|
-
- Replaces element text with cached value from 'ujs:enable-with' data store (created in `disableFormElements`)
|
203
|
-
- Sets disabled property to false
|
204
|
-
*/
|
205
|
-
enableFormElements: function(form) {
|
206
|
-
form.find(rails.enableSelector).each(function() {
|
207
|
-
var element = $(this), method = element.is('button') ? 'html' : 'val';
|
208
|
-
if (element.data('ujs:enable-with')) element[method](element.data('ujs:enable-with'));
|
209
|
-
element.prop('disabled', false);
|
210
|
-
});
|
211
|
-
},
|
212
|
-
|
213
|
-
/* For 'data-confirm' attribute:
|
214
|
-
- Fires `confirm` event
|
215
|
-
- Shows the confirmation dialog
|
216
|
-
- Fires the `confirm:complete` event
|
217
|
-
|
218
|
-
Returns `true` if no function stops the chain and user chose yes; `false` otherwise.
|
219
|
-
Attaching a handler to the element's `confirm` event that returns a `falsy` value cancels the confirmation dialog.
|
220
|
-
Attaching a handler to the element's `confirm:complete` event that returns a `falsy` value makes this function
|
221
|
-
return false. The `confirm:complete` event is fired whether or not the user answered true or false to the dialog.
|
222
|
-
*/
|
223
|
-
allowAction: function(element) {
|
224
|
-
var message = element.data('confirm'),
|
225
|
-
answer = false, callback;
|
226
|
-
if (!message) { return true; }
|
227
|
-
|
228
|
-
if (rails.fire(element, 'confirm')) {
|
229
|
-
answer = rails.confirm(message);
|
230
|
-
callback = rails.fire(element, 'confirm:complete', [answer]);
|
231
|
-
}
|
232
|
-
return answer && callback;
|
233
|
-
},
|
234
|
-
|
235
|
-
// Helper function which checks for blank inputs in a form that match the specified CSS selector
|
236
|
-
blankInputs: function(form, specifiedSelector, nonBlank) {
|
237
|
-
var inputs = $(), input,
|
238
|
-
selector = specifiedSelector || 'input,textarea';
|
239
|
-
form.find(selector).each(function() {
|
240
|
-
input = $(this);
|
241
|
-
// Collect non-blank inputs if nonBlank option is true, otherwise, collect blank inputs
|
242
|
-
if (nonBlank ? input.val() : !input.val()) {
|
243
|
-
inputs = inputs.add(input);
|
244
|
-
}
|
245
|
-
});
|
246
|
-
return inputs.length ? inputs : false;
|
247
|
-
},
|
248
|
-
|
249
|
-
// Helper function which checks for non-blank inputs in a form that match the specified CSS selector
|
250
|
-
nonBlankInputs: function(form, specifiedSelector) {
|
251
|
-
return rails.blankInputs(form, specifiedSelector, true); // true specifies nonBlank
|
252
|
-
},
|
253
|
-
|
254
|
-
// Helper function, needed to provide consistent behavior in IE
|
255
|
-
stopEverything: function(e) {
|
256
|
-
$(e.target).trigger('ujs:everythingStopped');
|
257
|
-
e.stopImmediatePropagation();
|
258
|
-
return false;
|
259
|
-
},
|
260
|
-
|
261
|
-
// find all the submit events directly bound to the form and
|
262
|
-
// manually invoke them. If anyone returns false then stop the loop
|
263
|
-
callFormSubmitBindings: function(form, event) {
|
264
|
-
var events = form.data('events'), continuePropagation = true;
|
265
|
-
if (events !== undefined && events['submit'] !== undefined) {
|
266
|
-
$.each(events['submit'], function(i, obj){
|
267
|
-
if (typeof obj.handler === 'function') return continuePropagation = obj.handler(event);
|
268
|
-
});
|
269
|
-
}
|
270
|
-
return continuePropagation;
|
271
|
-
},
|
272
|
-
|
273
|
-
// replace element's html with the 'data-disable-with' after storing original html
|
274
|
-
// and prevent clicking on it
|
275
|
-
disableElement: function(element) {
|
276
|
-
element.data('ujs:enable-with', element.html()); // store enabled state
|
277
|
-
element.html(element.data('disable-with')); // set to disabled state
|
278
|
-
element.bind('click.railsDisable', function(e) { // prevent further clicking
|
279
|
-
return rails.stopEverything(e)
|
280
|
-
});
|
281
|
-
},
|
282
|
-
|
283
|
-
// restore element to its original state which was disabled by 'disableElement' above
|
284
|
-
enableElement: function(element) {
|
285
|
-
if (element.data('ujs:enable-with') !== undefined) {
|
286
|
-
element.html(element.data('ujs:enable-with')); // set to old enabled state
|
287
|
-
// this should be element.removeData('ujs:enable-with')
|
288
|
-
// but, there is currently a bug in jquery which makes hyphenated data attributes not get removed
|
289
|
-
element.data('ujs:enable-with', false); // clean up cache
|
290
|
-
}
|
291
|
-
element.unbind('click.railsDisable'); // enable element
|
292
|
-
}
|
293
|
-
|
294
|
-
};
|
295
|
-
|
296
|
-
$.ajaxPrefilter(function(options, originalOptions, xhr){ if ( !options.crossDomain ) { rails.CSRFProtection(xhr); }});
|
297
|
-
|
298
|
-
$(document).delegate(rails.linkDisableSelector, 'ajax:complete', function() {
|
299
|
-
rails.enableElement($(this));
|
300
|
-
});
|
301
|
-
|
302
|
-
$(document).delegate(rails.linkClickSelector, 'click.rails', function(e) {
|
303
|
-
var link = $(this), method = link.data('method'), data = link.data('params');
|
304
|
-
if (!rails.allowAction(link)) return rails.stopEverything(e);
|
305
|
-
|
306
|
-
if (link.is(rails.linkDisableSelector)) rails.disableElement(link);
|
307
|
-
|
308
|
-
if (link.data('remote') !== undefined) {
|
309
|
-
if ( (e.metaKey || e.ctrlKey) && (!method || method === 'GET') && !data ) { return true; }
|
310
|
-
|
311
|
-
if (rails.handleRemote(link) === false) { rails.enableElement(link); }
|
312
|
-
return false;
|
313
|
-
|
314
|
-
} else if (link.data('method')) {
|
315
|
-
rails.handleMethod(link);
|
316
|
-
return false;
|
317
|
-
}
|
318
|
-
});
|
319
|
-
|
320
|
-
$(document).delegate(rails.inputChangeSelector, 'change.rails', function(e) {
|
321
|
-
var link = $(this);
|
322
|
-
if (!rails.allowAction(link)) return rails.stopEverything(e);
|
323
|
-
|
324
|
-
rails.handleRemote(link);
|
325
|
-
return false;
|
326
|
-
});
|
327
|
-
|
328
|
-
$(document).delegate(rails.formSubmitSelector, 'submit.rails', function(e) {
|
329
|
-
var form = $(this),
|
330
|
-
remote = form.data('remote') !== undefined,
|
331
|
-
blankRequiredInputs = rails.blankInputs(form, rails.requiredInputSelector),
|
332
|
-
nonBlankFileInputs = rails.nonBlankInputs(form, rails.fileInputSelector);
|
333
|
-
|
334
|
-
if (!rails.allowAction(form)) return rails.stopEverything(e);
|
335
|
-
|
336
|
-
// skip other logic when required values are missing or file upload is present
|
337
|
-
if (blankRequiredInputs && form.attr("novalidate") == undefined && rails.fire(form, 'ajax:aborted:required', [blankRequiredInputs])) {
|
338
|
-
return rails.stopEverything(e);
|
339
|
-
}
|
340
|
-
|
341
|
-
if (remote) {
|
342
|
-
if (nonBlankFileInputs) {
|
343
|
-
return rails.fire(form, 'ajax:aborted:file', [nonBlankFileInputs]);
|
344
|
-
}
|
345
|
-
|
346
|
-
// If browser does not support submit bubbling, then this live-binding will be called before direct
|
347
|
-
// bindings. Therefore, we should directly call any direct bindings before remotely submitting form.
|
348
|
-
if (!$.support.submitBubbles && $().jquery < '1.7' && rails.callFormSubmitBindings(form, e) === false) return rails.stopEverything(e);
|
349
|
-
|
350
|
-
rails.handleRemote(form);
|
351
|
-
return false;
|
352
|
-
|
353
|
-
} else {
|
354
|
-
// slight timeout so that the submit button gets properly serialized
|
355
|
-
setTimeout(function(){ rails.disableFormElements(form); }, 13);
|
356
|
-
}
|
357
|
-
});
|
358
|
-
|
359
|
-
$(document).delegate(rails.formInputClickSelector, 'click.rails', function(event) {
|
360
|
-
var button = $(this);
|
361
|
-
|
362
|
-
if (!rails.allowAction(button)) return rails.stopEverything(event);
|
363
|
-
|
364
|
-
// register the pressed submit button
|
365
|
-
var name = button.attr('name'),
|
366
|
-
data = name ? {name:name, value:button.val()} : null;
|
367
|
-
|
368
|
-
button.closest('form').data('ujs:submit-button', data);
|
369
|
-
});
|
370
|
-
|
371
|
-
$(document).delegate(rails.formSubmitSelector, 'ajax:beforeSend.rails', function(event) {
|
372
|
-
if (this == event.target) rails.disableFormElements($(this));
|
373
|
-
});
|
374
|
-
|
375
|
-
$(document).delegate(rails.formSubmitSelector, 'ajax:complete.rails', function(event) {
|
376
|
-
if (this == event.target) rails.enableFormElements($(this));
|
377
|
-
});
|
378
|
-
|
379
|
-
})( jQuery );
|
380
|
-
"dependency_digest"%2cd1d2f8ab16360cb1694393844f1d1f"required_paths["j/Users/pierre/.rvm/gems/jruby-1.6.7.2/gems/jquery-rails-2.0.2/vendor/assets/javascripts/jquery_ujs.js"dependency_paths[{" path"j/Users/pierre/.rvm/gems/jruby-1.6.7.2/gems/jquery-rails-2.0.2/vendor/assets/javascripts/jquery_ujs.js"
|
381
|
-
mtime"2012-08-14T09:37:41-07:00"digest"%0ff3e5680ead3dadeee021c144835311"
|
@@ -1,51 +0,0 @@
|
|
1
|
-
# require 'test_helper'
|
2
|
-
#
|
3
|
-
# module Kaui
|
4
|
-
# class AccountEmailsControllerTest < ActionController::TestCase
|
5
|
-
# setup do
|
6
|
-
# @account_email = account_emails(:one)
|
7
|
-
# end
|
8
|
-
#
|
9
|
-
# test "should get index" do
|
10
|
-
# get :index
|
11
|
-
# assert_response :success
|
12
|
-
# assert_not_nil assigns(:account_emails)
|
13
|
-
# end
|
14
|
-
#
|
15
|
-
# test "should get new" do
|
16
|
-
# get :new
|
17
|
-
# assert_response :success
|
18
|
-
# end
|
19
|
-
#
|
20
|
-
# test "should create account_email" do
|
21
|
-
# assert_difference('AccountEmail.count') do
|
22
|
-
# post :create, account_email: { accountId: @account_email.accountId, email: @account_email.email }
|
23
|
-
# end
|
24
|
-
#
|
25
|
-
# assert_redirected_to account_email_path(assigns(:account_email))
|
26
|
-
# end
|
27
|
-
#
|
28
|
-
# test "should show account_email" do
|
29
|
-
# get :show, id: @account_email
|
30
|
-
# assert_response :success
|
31
|
-
# end
|
32
|
-
#
|
33
|
-
# test "should get edit" do
|
34
|
-
# get :edit, id: @account_email
|
35
|
-
# assert_response :success
|
36
|
-
# end
|
37
|
-
#
|
38
|
-
# test "should update account_email" do
|
39
|
-
# put :update, id: @account_email, account_email: { accountId: @account_email.accountId, email: @account_email.email }
|
40
|
-
# assert_redirected_to account_email_path(assigns(:account_email))
|
41
|
-
# end
|
42
|
-
#
|
43
|
-
# test "should destroy account_email" do
|
44
|
-
# assert_difference('AccountEmail.count', -1) do
|
45
|
-
# delete :destroy, id: @account_email
|
46
|
-
# end
|
47
|
-
#
|
48
|
-
# assert_redirected_to account_emails_path
|
49
|
-
# end
|
50
|
-
# end
|
51
|
-
# end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
# require 'test_helper'
|
2
|
-
#
|
3
|
-
# module Kaui
|
4
|
-
# class TagsControllerTest < ActionController::TestCase
|
5
|
-
# setup do
|
6
|
-
# @tag = tags(:one)
|
7
|
-
# end
|
8
|
-
#
|
9
|
-
# test "should get index" do
|
10
|
-
# get :index
|
11
|
-
# assert_response :success
|
12
|
-
# assert_not_nil assigns(:tags)
|
13
|
-
# end
|
14
|
-
#
|
15
|
-
# test "should get new" do
|
16
|
-
# get :new
|
17
|
-
# assert_response :success
|
18
|
-
# end
|
19
|
-
#
|
20
|
-
# test "should create tag" do
|
21
|
-
# assert_difference('Tag.count') do
|
22
|
-
# post :create, tag: { tagDefinitionId: @tag.tagDefinitionId, tagDefinitionName: @tag.tagDefinitionName }
|
23
|
-
# end
|
24
|
-
#
|
25
|
-
# assert_redirected_to tag_path(assigns(:tag))
|
26
|
-
# end
|
27
|
-
#
|
28
|
-
# test "should show tag" do
|
29
|
-
# get :show, id: @tag
|
30
|
-
# assert_response :success
|
31
|
-
# end
|
32
|
-
#
|
33
|
-
# test "should get edit" do
|
34
|
-
# get :edit, id: @tag
|
35
|
-
# assert_response :success
|
36
|
-
# end
|
37
|
-
#
|
38
|
-
# test "should update tag" do
|
39
|
-
# put :update, id: @tag, tag: { tagDefinitionId: @tag.tagDefinitionId, tagDefinitionName: @tag.tagDefinitionName }
|
40
|
-
# assert_redirected_to tag_path(assigns(:tag))
|
41
|
-
# end
|
42
|
-
#
|
43
|
-
# test "should destroy tag" do
|
44
|
-
# assert_difference('Tag.count', -1) do
|
45
|
-
# delete :destroy, id: @tag
|
46
|
-
# end
|
47
|
-
#
|
48
|
-
# assert_redirected_to tags_path
|
49
|
-
# end
|
50
|
-
# end
|
51
|
-
# end
|