sooner 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. data/MIT-LICENSE +1 -1
  2. data/README.rdoc +0 -0
  3. data/Rakefile +28 -32
  4. data/app/assets/javascripts/sooner/admin/application.js +8 -0
  5. data/app/assets/javascripts/sooner/application.js +2 -0
  6. data/app/assets/javascripts/sooner/jquery.tablesorter.min.js +4 -0
  7. data/app/assets/javascripts/sooner/subscribers.js +2 -0
  8. data/app/assets/stylesheets/sooner/admin/application.css +37 -0
  9. data/app/assets/stylesheets/sooner/application.css +3 -0
  10. data/app/assets/stylesheets/sooner/subscribers.css +0 -0
  11. data/app/controllers/sooner/admin/subscribers_controller.rb +89 -0
  12. data/app/controllers/sooner/application_controller.rb +4 -0
  13. data/app/controllers/sooner/subscribers_controller.rb +20 -16
  14. data/app/helpers/sooner/admin/subscribers_helper.rb +4 -0
  15. data/app/helpers/sooner/application_helper.rb +4 -0
  16. data/app/helpers/sooner/subscribers_helper.rb +4 -0
  17. data/app/mailers/sooner/subscribers_mailer.rb +16 -0
  18. data/app/models/sooner/admin/subscriber.rb +3 -0
  19. data/app/models/sooner/subscriber.rb +19 -12
  20. data/app/views/layouts/sooner/admin.html.erb +21 -0
  21. data/app/views/layouts/sooner/application.html.erb +14 -0
  22. data/app/views/sooner/admin/subscribers/_form.html.erb +19 -0
  23. data/app/views/sooner/admin/subscribers/edit.html.erb +6 -0
  24. data/app/views/sooner/admin/subscribers/index.html.erb +22 -0
  25. data/app/views/sooner/admin/subscribers/new.html.erb +8 -0
  26. data/app/views/sooner/admin/subscribers/show.html.erb +5 -0
  27. data/app/views/sooner/subscribers/_message.html.erb +1 -0
  28. data/app/views/sooner/subscribers/create.js.erb +5 -0
  29. data/app/views/sooner/subscribers/new.html.erb +17 -10
  30. data/app/views/sooner/subscribers_mailer/subscribed.text.erb +3 -0
  31. data/config/routes.rb +8 -3
  32. data/lib/generators/sooner/install/install_generator.rb +33 -32
  33. data/lib/generators/sooner/install/templates/README +3 -13
  34. data/lib/generators/sooner/views/views_generator.rb +49 -47
  35. data/lib/sooner/engine.rb +5 -0
  36. data/lib/sooner/version.rb +2 -2
  37. data/lib/sooner/version.rb~ +3 -0
  38. data/lib/sooner.rb +21 -12
  39. data/lib/tasks/sooner_tasks.rake +4 -0
  40. data/test/dummy/Rakefile +7 -0
  41. data/test/dummy/app/assets/javascripts/application.js +9 -0
  42. data/test/dummy/app/assets/stylesheets/application.css +7 -0
  43. data/test/dummy/app/controllers/application_controller.rb +3 -0
  44. data/test/dummy/app/helpers/application_helper.rb +2 -0
  45. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  46. data/test/dummy/config/application.rb +45 -0
  47. data/test/dummy/config/boot.rb +10 -0
  48. data/test/dummy/config/database.yml +25 -0
  49. data/test/dummy/config/environment.rb +5 -0
  50. data/test/dummy/config/environments/development.rb +33 -0
  51. data/test/dummy/config/environments/production.rb +60 -0
  52. data/test/dummy/config/environments/test.rb +39 -0
  53. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  54. data/test/dummy/config/initializers/inflections.rb +10 -0
  55. data/test/dummy/config/initializers/mime_types.rb +5 -0
  56. data/test/dummy/config/initializers/secret_token.rb +7 -0
  57. data/test/dummy/config/initializers/session_store.rb +8 -0
  58. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  59. data/test/dummy/config/locales/en.yml +5 -0
  60. data/test/dummy/config/mongoid.yml +20 -0
  61. data/test/dummy/config/routes.rb +3 -0
  62. data/test/dummy/config.ru +4 -0
  63. data/test/dummy/db/development.sqlite3 +0 -0
  64. data/test/dummy/log/development.log +13370 -0
  65. data/test/dummy/public/404.html +26 -0
  66. data/test/dummy/public/422.html +26 -0
  67. data/test/dummy/public/500.html +26 -0
  68. data/test/dummy/public/favicon.ico +0 -0
  69. data/test/dummy/public/subscribers.csv +1 -0
  70. data/test/dummy/script/rails +6 -0
  71. data/test/dummy/tmp/cache/assets/C30/8B0/sprockets%2F6853748309a0fdd864824f56536d8023 +9062 -0
  72. data/test/dummy/tmp/cache/assets/C3F/0E0/sprockets%2F0e1cbc926773103d03774752e9108a00 +335 -0
  73. data/test/dummy/tmp/cache/assets/C66/FB0/sprockets%2F98a6552e0c72949d717178b5902e6f36 +71 -0
  74. data/test/dummy/tmp/cache/assets/C6D/F80/sprockets%2F44533615dbef3e810253094110825dac +62 -0
  75. data/test/dummy/tmp/cache/assets/C7A/910/sprockets%2F856f6b120c31d4622c49b3630219de68 +9069 -0
  76. data/test/dummy/tmp/cache/assets/C92/6A0/sprockets%2Fc5438348d868c777420d2e63fce56245 +98 -0
  77. data/test/dummy/tmp/cache/assets/C9C/A60/sprockets%2Fc6c3395667d18857f7f12369e53fa727 +350 -0
  78. data/test/dummy/tmp/cache/assets/CA7/430/sprockets%2F202cbe6f48604eb00549854f3053b58a +25 -0
  79. data/test/dummy/tmp/cache/assets/CB4/610/sprockets%2Ffeb1a7838d426857f0530993e420b60e +115 -0
  80. data/test/dummy/tmp/cache/assets/CE4/0D0/sprockets%2F439a9e8509403ac14ca356e5f2e9348b +7 -0
  81. data/test/dummy/tmp/cache/assets/CEB/DC0/sprockets%2F38536533e8e59a3fe0be483209c6d5c6 +352 -0
  82. data/test/dummy/tmp/cache/assets/CF6/900/sprockets%2F94575569edeb05737ebeaa60898940b6 +26 -0
  83. data/test/dummy/tmp/cache/assets/D07/4F0/sprockets%2Fe6091698b531dd271d5ac325b8b84ba0 +10 -0
  84. data/test/dummy/tmp/cache/assets/D19/BD0/sprockets%2F88636a6d051daca6365de6bd82096f48 +2445 -0
  85. data/test/dummy/tmp/cache/assets/D2B/3B0/sprockets%2F7de3b697dd206aa6eb292e301b140b60 +88 -0
  86. data/test/dummy/tmp/cache/assets/D39/410/sprockets%2Fa93af35d175ac7db006e63e91a0889b0 +42 -0
  87. data/test/dummy/tmp/cache/assets/D53/160/sprockets%2F8970dd07264d6eae78dd182d79df13c8 +303 -0
  88. data/test/dummy/tmp/cache/assets/D60/CE0/sprockets%2F06310f19d92bb4f40da80a37750ebdee +9 -0
  89. data/test/dummy/tmp/cache/assets/D65/620/sprockets%2F631e2801093d7a12aa6766bccaadfe88 +422 -0
  90. data/test/dummy/tmp/cache/assets/D7E/D20/sprockets%2Ff491cba4ec5176a691d9e5d7fc70892c +9052 -0
  91. data/test/dummy/tmp/cache/assets/D88/580/sprockets%2Ffef9b1c3b3b1b0316917a509cb1afb42 +439 -0
  92. data/test/dummy/tmp/cache/assets/D8E/B60/sprockets%2F1bc4810ecfe6a7b05c934eb3b0c2963a +9064 -0
  93. data/test/dummy/tmp/cache/assets/D99/D60/sprockets%2F29025313ddeaa1ff18cade1ed728949a +41 -0
  94. data/test/dummy/tmp/cache/assets/D9E/FD0/sprockets%2Ff8c955f36a2caa4039a66afc4c376e3a +0 -0
  95. data/test/dummy/tmp/cache/assets/DA5/1C0/sprockets%2Fec8cd61eddd7205e7c9c647f59413ac0 +371 -0
  96. data/test/dummy/tmp/cache/assets/DAF/6E0/sprockets%2F1b832fdf9fb97a8a7bcd2c907e652f47 +2386 -0
  97. data/test/dummy/tmp/cache/assets/DBC/650/sprockets%2Fd6da39f6f3f4a37c0db10cbc34ab0681 +67 -0
  98. data/test/dummy/tmp/cache/assets/DC2/150/sprockets%2F5cd685a35e3b593acade42a3b01def72 +8 -0
  99. data/test/dummy/tmp/cache/assets/DC7/530/sprockets%2Fea29d9af8aad9da0803062d3d7c06ac8 +373 -0
  100. data/test/dummy/tmp/cache/assets/DC9/2C0/sprockets%2Fbe1b3f07eb2f550c47c493a6f9a0de7b +333 -0
  101. data/test/dummy/tmp/cache/assets/DD6/820/sprockets%2Fb453f0fef899e0c6fe08aba14b94d09e +45 -0
  102. data/test/dummy/tmp/cache/assets/DD7/130/sprockets%2F6af271c6eec0698bc95224abf1ebf9f6 +390 -0
  103. data/test/dummy/tmp/cache/assets/E03/200/sprockets%2F8bd487cf65caa9fe453abd16be83e0a7 +70 -0
  104. data/test/dummy/tmp/cache/assets/E1D/680/sprockets%2Fc5c6b0ea20de8ef4d2f1eed00a35c93c +25 -0
  105. data/test/dummy/tmp/cache/assets/E49/440/sprockets%2Fbb92f156efb75bdda7bbacc04acb1425 +27 -0
  106. data/test/dummy/tmp/cache/assets/E59/430/sprockets%2Fb3073d96f7bcefcbdd3cdabe09a45a74 +286 -0
  107. data/test/dummy/tmp/cache/assets/E84/430/sprockets%2F61ffc0ed6338cebfdac2f1d3eaf0ae47 +9420 -0
  108. data/test/fixtures/sooner/admin/subscribers.yml +11 -0
  109. data/test/fixtures/sooner/subscribers.yml +7 -0
  110. data/test/functional/sooner/admin/subscribers_controller_test.rb +51 -0
  111. data/test/functional/sooner/subscribers_controller_test.rb +51 -0
  112. data/test/functional/sooner/subscribers_mailer_test.rb +14 -0
  113. data/test/integration/navigation_test.rb +10 -0
  114. data/test/sooner_test.rb +7 -0
  115. data/test/test_helper.rb +10 -0
  116. data/test/unit/helpers/sooner/admin/subscribers_helper_test.rb +6 -0
  117. data/test/unit/helpers/sooner/subscribers_helper_test.rb +6 -0
  118. data/test/unit/sooner/admin/subscriber_test.rb +9 -0
  119. data/test/unit/sooner/subscriber_test.rb +9 -0
  120. metadata +252 -53
  121. data/Gemfile +0 -4
  122. data/lib/sooner/email_format_validator.rb +0 -9
  123. data/lib/sooner/rails.rb +0 -5
@@ -0,0 +1,390 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1320069165.6287963: @value{I"
2
+ class:EFI"BundledAsset;
3
+ FI"id;
4
+ F"%a073618aade3908bd9d0bb1433d6024eI"logical_path;
5
+ F"jquery_ujs.jsI"
6
+ F"k/home/sbertel/.rvm/gems/ruby-1.9.3-p0/gems/jquery-rails-1.0.16/vendor/assets/javascripts/jquery_ujs.jsI"content_type;
7
+ FI"application/javascript;
8
+ FI"
9
+ mtime;
10
+ FI"2011-10-31T13:53:46+02:00;
11
+ FI" body;
12
+ FI";/**
13
+ * Unobtrusive scripting adapter for jQuery
14
+ *
15
+ * Requires jQuery 1.6.0 or later.
16
+ * https://github.com/rails/jquery-ujs
17
+
18
+ * Uploading file using rails.js
19
+ * =============================
20
+ *
21
+ * By default, browsers do not allow files to be uploaded via AJAX. As a result, if there are any non-blank file fields
22
+ * in the remote form, this adapter aborts the AJAX submission and allows the form to submit through standard means.
23
+ *
24
+ * The `ajax:aborted:file` event allows you to bind your own handler to process the form submission however you wish.
25
+ *
26
+ * Ex:
27
+ * $('form').live('ajax:aborted:file', function(event, elements){
28
+ * // Implement own remote file-transfer handler here for non-blank file inputs passed in `elements`.
29
+ * // Returning false in this handler tells rails.js to disallow standard form submission
30
+ * return false;
31
+ * });
32
+ *
33
+ * The `ajax:aborted:file` event is fired when a file-type input is detected with a non-blank value.
34
+ *
35
+ * Third-party tools can use this hook to detect when an AJAX file upload is attempted, and then use
36
+ * techniques like the iframe method to upload the file instead.
37
+ *
38
+ * Required fields in rails.js
39
+ * ===========================
40
+ *
41
+ * If any blank required inputs (required="required") are detected in the remote form, the whole form submission
42
+ * is canceled. Note that this is unlike file inputs, which still allow standard (non-AJAX) form submission.
43
+ *
44
+ * The `ajax:aborted:required` event allows you to bind your own handler to inform the user of blank required inputs.
45
+ *
46
+ * !! Note that Opera does not fire the form's submit event if there are blank required inputs, so this event may never
47
+ * get fired in Opera. This event is what causes other browsers to exhibit the same submit-aborting behavior.
48
+ *
49
+ * Ex:
50
+ * $('form').live('ajax:aborted:required', function(event, elements){
51
+ * // Returning false in this handler tells rails.js to submit the form anyway.
52
+ * // The blank required inputs are passed to this function in `elements`.
53
+ * return ! confirm("Would you like to submit the form with missing info?");
54
+ * });
55
+ */
56
+
57
+
58
+ (function($, undefined) {
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
+ rails.ajax(options);
166
+ }
167
+ },
168
+
169
+ // Handles "data-method" on links such as:
170
+ // <a href="/users/5" data-method="delete" rel="nofollow" data-confirm="Are you sure?">Delete</a>
171
+ handleMethod: function(link) {
172
+ var href = link.attr('href'),
173
+ method = link.data('method'),
174
+ target = link.attr('target'),
175
+ csrf_token = $('meta[name=csrf-token]').attr('content'),
176
+ csrf_param = $('meta[name=csrf-param]').attr('content'),
177
+ form = $('<form method="post" action="' + href + '"></form>'),
178
+ metadata_input = '<input name="_method" value="' + method + '" type="hidden" />';
179
+
180
+ if (csrf_param !== undefined && csrf_token !== undefined) {
181
+ metadata_input += '<input name="' + csrf_param + '" value="' + csrf_token + '" type="hidden" />';
182
+ }
183
+
184
+ if (target) { form.attr('target', target); }
185
+
186
+ form.hide().append(metadata_input).appendTo('body');
187
+ form.submit();
188
+ },
189
+
190
+ /* Disables form elements:
191
+ - Caches element value in 'ujs:enable-with' data store
192
+ - Replaces element text with value of 'data-disable-with' attribute
193
+ - Sets disabled property to true
194
+ */
195
+ disableFormElements: function(form) {
196
+ form.find(rails.disableSelector).each(function() {
197
+ var element = $(this), method = element.is('button') ? 'html' : 'val';
198
+ element.data('ujs:enable-with', element[method]());
199
+ element[method](element.data('disable-with'));
200
+ element.prop('disabled', true);
201
+ });
202
+ },
203
+
204
+ /* Re-enables disabled form elements:
205
+ - Replaces element text with cached value from 'ujs:enable-with' data store (created in `disableFormElements`)
206
+ - Sets disabled property to false
207
+ */
208
+ enableFormElements: function(form) {
209
+ form.find(rails.enableSelector).each(function() {
210
+ var element = $(this), method = element.is('button') ? 'html' : 'val';
211
+ if (element.data('ujs:enable-with')) element[method](element.data('ujs:enable-with'));
212
+ element.prop('disabled', false);
213
+ });
214
+ },
215
+
216
+ /* For 'data-confirm' attribute:
217
+ - Fires `confirm` event
218
+ - Shows the confirmation dialog
219
+ - Fires the `confirm:complete` event
220
+
221
+ Returns `true` if no function stops the chain and user chose yes; `false` otherwise.
222
+ Attaching a handler to the element's `confirm` event that returns a `falsy` value cancels the confirmation dialog.
223
+ Attaching a handler to the element's `confirm:complete` event that returns a `falsy` value makes this function
224
+ return false. The `confirm:complete` event is fired whether or not the user answered true or false to the dialog.
225
+ */
226
+ allowAction: function(element) {
227
+ var message = element.data('confirm'),
228
+ answer = false, callback;
229
+ if (!message) { return true; }
230
+
231
+ if (rails.fire(element, 'confirm')) {
232
+ answer = rails.confirm(message);
233
+ callback = rails.fire(element, 'confirm:complete', [answer]);
234
+ }
235
+ return answer && callback;
236
+ },
237
+
238
+ // Helper function which checks for blank inputs in a form that match the specified CSS selector
239
+ blankInputs: function(form, specifiedSelector, nonBlank) {
240
+ var inputs = $(), input,
241
+ selector = specifiedSelector || 'input,textarea';
242
+ form.find(selector).each(function() {
243
+ input = $(this);
244
+ // Collect non-blank inputs if nonBlank option is true, otherwise, collect blank inputs
245
+ if (nonBlank ? input.val() : !input.val()) {
246
+ inputs = inputs.add(input);
247
+ }
248
+ });
249
+ return inputs.length ? inputs : false;
250
+ },
251
+
252
+ // Helper function which checks for non-blank inputs in a form that match the specified CSS selector
253
+ nonBlankInputs: function(form, specifiedSelector) {
254
+ return rails.blankInputs(form, specifiedSelector, true); // true specifies nonBlank
255
+ },
256
+
257
+ // Helper function, needed to provide consistent behavior in IE
258
+ stopEverything: function(e) {
259
+ $(e.target).trigger('ujs:everythingStopped');
260
+ e.stopImmediatePropagation();
261
+ return false;
262
+ },
263
+
264
+ // find all the submit events directly bound to the form and
265
+ // manually invoke them. If anyone returns false then stop the loop
266
+ callFormSubmitBindings: function(form) {
267
+ var events = form.data('events'), continuePropagation = true;
268
+ if (events !== undefined && events['submit'] !== undefined) {
269
+ $.each(events['submit'], function(i, obj){
270
+ if (typeof obj.handler === 'function') return continuePropagation = obj.handler(obj.data);
271
+ });
272
+ }
273
+ return continuePropagation;
274
+ },
275
+
276
+ // replace element's html with the 'data-disable-with' after storing original html
277
+ // and prevent clicking on it
278
+ disableElement: function(element) {
279
+ element.data('ujs:enable-with', element.html()); // store enabled state
280
+ element.html(element.data('disable-with')); // set to disabled state
281
+ element.bind('click.railsDisable', function(e) { // prevent further clicking
282
+ return rails.stopEverything(e)
283
+ });
284
+ },
285
+
286
+ // restore element to its original state which was disabled by 'disableElement' above
287
+ enableElement: function(element) {
288
+ if (element.data('ujs:enable-with') !== undefined) {
289
+ element.html(element.data('ujs:enable-with')); // set to old enabled state
290
+ // this should be element.removeData('ujs:enable-with')
291
+ // but, there is currently a bug in jquery which makes hyphenated data attributes not get removed
292
+ element.data('ujs:enable-with', false); // clean up cache
293
+ }
294
+ element.unbind('click.railsDisable'); // enable element
295
+ }
296
+
297
+ };
298
+
299
+ $.ajaxPrefilter(function(options, originalOptions, xhr){ if ( !options.crossDomain ) { rails.CSRFProtection(xhr); }});
300
+
301
+ $(rails.linkDisableSelector).live('ajax:complete', function() {
302
+ rails.enableElement($(this));
303
+ });
304
+
305
+ $(rails.linkClickSelector).live('click.rails', function(e) {
306
+ var link = $(this), method = link.data('method'), data = link.data('params');
307
+ if (!rails.allowAction(link)) return rails.stopEverything(e);
308
+
309
+ if (link.is(rails.linkDisableSelector)) rails.disableElement(link);
310
+
311
+ if (link.data('remote') !== undefined) {
312
+ if ( (e.metaKey || e.ctrlKey) && (!method || method === 'GET') && !data ) { return true; }
313
+ rails.handleRemote(link);
314
+ return false;
315
+ } else if (link.data('method')) {
316
+ rails.handleMethod(link);
317
+ return false;
318
+ }
319
+ });
320
+
321
+ $(rails.inputChangeSelector).live('change.rails', function(e) {
322
+ var link = $(this);
323
+ if (!rails.allowAction(link)) return rails.stopEverything(e);
324
+
325
+ rails.handleRemote(link);
326
+ return false;
327
+ });
328
+
329
+ $(rails.formSubmitSelector).live('submit.rails', function(e) {
330
+ var form = $(this),
331
+ remote = form.data('remote') !== undefined,
332
+ blankRequiredInputs = rails.blankInputs(form, rails.requiredInputSelector),
333
+ nonBlankFileInputs = rails.nonBlankInputs(form, rails.fileInputSelector);
334
+
335
+ if (!rails.allowAction(form)) return rails.stopEverything(e);
336
+
337
+ // skip other logic when required values are missing or file upload is present
338
+ if (blankRequiredInputs && form.attr("novalidate") == undefined && rails.fire(form, 'ajax:aborted:required', [blankRequiredInputs])) {
339
+ return rails.stopEverything(e);
340
+ }
341
+
342
+ if (remote) {
343
+ if (nonBlankFileInputs) {
344
+ return rails.fire(form, 'ajax:aborted:file', [nonBlankFileInputs]);
345
+ }
346
+
347
+ // If browser does not support submit bubbling, then this live-binding will be called before direct
348
+ // bindings. Therefore, we should directly call any direct bindings before remotely submitting form.
349
+ if (!$.support.submitBubbles && rails.callFormSubmitBindings(form) === false) return rails.stopEverything(e);
350
+
351
+ rails.handleRemote(form);
352
+ return false;
353
+ } else {
354
+ // slight timeout so that the submit button gets properly serialized
355
+ setTimeout(function(){ rails.disableFormElements(form); }, 13);
356
+ }
357
+ });
358
+
359
+ $(rails.formInputClickSelector).live('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
+ $(rails.formSubmitSelector).live('ajax:beforeSend.rails', function(event) {
372
+ if (this == event.target) rails.disableFormElements($(this));
373
+ });
374
+
375
+ $(rails.formSubmitSelector).live('ajax:complete.rails', function(event) {
376
+ if (this == event.target) rails.enableFormElements($(this));
377
+ });
378
+
379
+ })( jQuery );
380
+ ;
381
+ FI"asset_paths;
382
+ F["k/home/sbertel/.rvm/gems/ruby-1.9.3-p0/gems/jquery-rails-1.0.16/vendor/assets/javascripts/jquery_ujs.jsI"dependency_paths;
383
+ F[{I" path;
384
+ F"k/home/sbertel/.rvm/gems/ruby-1.9.3-p0/gems/jquery-rails-1.0.16/vendor/assets/javascripts/jquery_ujs.jsI"
385
+ mtime;
386
+ FIu: Time
387
+ : @_zoneI"EET;
388
+ T:
389
+ F"%bff4d9f9bd40708015f5ae4e34621c2cI"
390
+ F"%46dde6621c301f4928e3b34efee9e3b5
@@ -0,0 +1,70 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1320073491.8844433: @value{I"
2
+ class:EFI"BundledAsset;
3
+ FI"id;
4
+ F"%e3afa97257643b5731e85faddf2c049eI"logical_path;
5
+ F"!sooner/admin/subscribers.cssI"
6
+ F"W/home/sbertel/workspace/sooner/app/assets/stylesheets/sooner/admin/subscribers.cssI"content_type;
7
+ FI"
8
+ FI"
9
+ mtime;
10
+ FI"2011-10-31T17:04:48+02:00;
11
+ FI" body;
12
+ FI"�/*
13
+ */
14
+ /* Override some defaults */
15
+
16
+ html, body {
17
+ background-color:#eee;
18
+ }
19
+ body {
20
+ padding-top:40px; /* 40px to make the container go all the way to the bottom of the topbar */
21
+ }
22
+ .container> footer p {
23
+ text-align:center; /* center align it with the container */
24
+ }
25
+ .container {
26
+ width:820px; /* downsize our container to make the content feel a bit tighter and more cohesive. NOTE: this removes two full columns from the grid, meaning you only go to 14 columns and not 16. */
27
+ }
28
+ .content {
29
+ background-color:white;
30
+ padding:20px;
31
+ margin:0 -20px;
32
+ -webkit-border-radius:6px 6px 6px 6px;
33
+ -moz-border-radius:6px 6px 6px 6px;
34
+ border-radius:6px 6px 6px 6px;
35
+ -webkit-box-shadow:0 1px 2px rgba(0,0,0,.15);
36
+ -moz-box-shadow:0 1px 2px rgba(0,0,0,.15);
37
+ box-shadow:0 1px 2px rgba(0,0,0,.15);
38
+ }
39
+ /* Page header tweaks */
40
+ .page-header {
41
+ -webkit-border-radius:6px 6px 0 0;
42
+ -moz-border-radius:6px 6px 0 0;
43
+ border-radius:6px 6px 0 0;
44
+ background-color:#f5f5f5;
45
+ padding:20px 20px 10px;
46
+ margin:-20px -20px 20px;
47
+ }
48
+ ;
49
+ FI"asset_paths;
50
+ F["O/home/sbertel/workspace/sooner/app/assets/stylesheets/sooner/bootstrap.css"W/home/sbertel/workspace/sooner/app/assets/stylesheets/sooner/admin/tablesorter.css"W/home/sbertel/workspace/sooner/app/assets/stylesheets/sooner/admin/subscribers.cssI"dependency_paths;
51
+ F[{I" path;
52
+ F"W/home/sbertel/workspace/sooner/app/assets/stylesheets/sooner/admin/subscribers.cssI"
53
+ mtime;
54
+ FIu: Time
55
+ : @_zoneI"EET;
56
+ T:
57
+ F"%1cc0f6bf12a1563217e16c3f6bbfb3a4{I" path;
58
+ F"O/home/sbertel/workspace/sooner/app/assets/stylesheets/sooner/bootstrap.cssI"
59
+ mtime;
60
+ FIu;
61
+ ; I"EET;
62
+ T;
63
+ F"%0fa819e4d8b384194946300f005ed706{I" path;
64
+ F"W/home/sbertel/workspace/sooner/app/assets/stylesheets/sooner/admin/tablesorter.cssI"
65
+ mtime;
66
+ FIu;
67
+ ; I"EET;
68
+ T;
69
+ F"%1f7ba53e7b027af6f97aff9418992aebI"
70
+ F"%46dde6621c301f4928e3b34efee9e3b5
@@ -0,0 +1,25 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1320234465.799928: @value{I"
2
+ class:EFI"BundledAsset;
3
+ FI"id;
4
+ F"%60da5570c1abda6481c992b48b0a3db0I"logical_path;
5
+ F"sooner/subscribers.jsI"
6
+ F"P/home/sbertel/workspace/sooner/app/assets/javascripts/sooner/subscribers.jsI"content_type;
7
+ FI"application/javascript;
8
+ FI"
9
+ mtime;
10
+ FI"2011-11-02T13:47:27+02:00;
11
+ FI" body;
12
+ FI"�// Place all the behaviors and hooks related to the matching controller here.
13
+ // All this logic will automatically be available in application.js.
14
+ ;
15
+ ;
16
+ FI"asset_paths;
17
+ F["P/home/sbertel/workspace/sooner/app/assets/javascripts/sooner/subscribers.jsI"dependency_paths;
18
+ F[{I" path;
19
+ F"P/home/sbertel/workspace/sooner/app/assets/javascripts/sooner/subscribers.jsI"
20
+ mtime;
21
+ FIu: Time
22
+ : @_zoneI"EET;
23
+ T:
24
+ F"%44166772ece3d58fe0967fc073f2f788I"
25
+ F"%46dde6621c301f4928e3b34efee9e3b5
@@ -0,0 +1,27 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1320069165.6092596: @value{I"
2
+ class:EFI"BundledAsset;
3
+ FI"id;
4
+ F"%352debe88de36623e475023dc9890164I"logical_path;
5
+ F"sooner/subscribers.cssI"
6
+ F"Q/home/sbertel/workspace/sooner/app/assets/stylesheets/sooner/subscribers.cssI"content_type;
7
+ FI"
8
+ FI"
9
+ mtime;
10
+ FI"2011-10-31T13:59:17+02:00;
11
+ FI" body;
12
+ FI"�/*
13
+ Place all the styles related to the matching controller here.
14
+ They will automatically be included in application.css.
15
+ */
16
+
17
+ ;
18
+ FI"asset_paths;
19
+ F["Q/home/sbertel/workspace/sooner/app/assets/stylesheets/sooner/subscribers.cssI"dependency_paths;
20
+ F[{I" path;
21
+ F"Q/home/sbertel/workspace/sooner/app/assets/stylesheets/sooner/subscribers.cssI"
22
+ mtime;
23
+ FIu: Time
24
+ : @_zoneI"EET;
25
+ T:
26
+ F"%86bc49d9e548d142af31e2cc4a6e56e8I"
27
+ F"%46dde6621c301f4928e3b34efee9e3b5