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,88 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1320224373.2252865: @value{I"
2
+ class:EFI"BundledAsset;
3
+ FI"id;
4
+ F"%1454718f3c1365781248814568e306f0I"logical_path;
5
+ F"sooner/reset.cssI"
6
+ F"K/home/sbertel/workspace/sooner/app/assets/stylesheets/sooner/reset.cssI"content_type;
7
+ FI"
8
+ FI"
9
+ mtime;
10
+ FI"2011-11-02T10:59:10+02:00;
11
+ FI" body;
12
+ FI"w/* Resets
13
+ ------ */
14
+
15
+ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, hr, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figure, figcaption, hgroup, menu, footer, header, nav, section, summary, time, mark, audio, video {
16
+ margin:0;
17
+ padding:0;
18
+ border:0;
19
+ }
20
+ article, aside, canvas, figure, figure img, figcaption, hgroup, footer, header, nav, section, audio, video {
21
+ display:block;
22
+ }
23
+ a img {
24
+ border:0;
25
+ }
26
+ /* Typography presets
27
+ ------------------ */
28
+ .gigantic {
29
+ font-size:110px;
30
+ line-height:120px;
31
+ letter-spacing:-2px;
32
+ }
33
+ .huge, h1 {
34
+ font-size:68px;
35
+ line-height:72px;
36
+ letter-spacing:-1px;
37
+ }
38
+ .large, h2 {
39
+ font-size:42px;
40
+ line-height:48px;
41
+ }
42
+ .bigger, h3 {
43
+ font-size:26px;
44
+ line-height:36px;
45
+ }
46
+ .big, h4 {
47
+ font-size:22px;
48
+ line-height:30px;
49
+ }
50
+ body {
51
+ font:16px /24px Georgia,serif;
52
+ }
53
+ .small, small {
54
+ font-size:13px;
55
+ line-height:18px;
56
+ }
57
+ /* Selection colours (easy to forget)
58
+ ::selection {
59
+ background:rgb(255,255,158);
60
+ } */
61
+ ::-moz-selection {
62
+ background:rgb(255,255,158);
63
+ }
64
+ /*
65
+ img::selection {
66
+ background:transparent;
67
+ }
68
+ */
69
+ img::-moz-selection {
70
+ background:transparent;
71
+ }
72
+ body {
73
+ -webkit-tap-highlight-color:rgb(255,255,158);
74
+ }
75
+ form {
76
+ text-align:center;
77
+ }
78
+ ;
79
+ FI"asset_paths;
80
+ F["K/home/sbertel/workspace/sooner/app/assets/stylesheets/sooner/reset.cssI"dependency_paths;
81
+ F[{I" path;
82
+ F"K/home/sbertel/workspace/sooner/app/assets/stylesheets/sooner/reset.cssI"
83
+ mtime;
84
+ FIu: Time
85
+ : @_zoneI"EET;
86
+ T:
87
+ F"%04d52823c47bf1bfcaf341d7b2fffbd7I"
88
+ F"%46dde6621c301f4928e3b34efee9e3b5
@@ -0,0 +1,42 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1320073782.2603366: @value{I"
2
+ class:EFI"BundledAsset;
3
+ FI"id;
4
+ F"%4ac1d57e06fbeb32728f90f1cfdddc9cI"logical_path;
5
+ F" sooner/admin/subscribers.jsI"
6
+ F"V/home/sbertel/workspace/sooner/app/assets/javascripts/sooner/admin/subscribers.jsI"content_type;
7
+ FI"application/javascript;
8
+ FI"
9
+ mtime;
10
+ FI"2011-10-31T17:09:36+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
+ $(document).ready(function()
16
+ {
17
+ $("#subscribers_list").tablesorter();
18
+ }
19
+ );
20
+ ;
21
+ FI"asset_paths;
22
+ F["g/home/sbertel/.rvm/gems/ruby-1.9.3-p0/gems/jquery-rails-1.0.16/vendor/assets/javascripts/jquery.js"[/home/sbertel/workspace/sooner/app/assets/javascripts/sooner/jquery.tablesorter.min.js"V/home/sbertel/workspace/sooner/app/assets/javascripts/sooner/admin/subscribers.jsI"dependency_paths;
23
+ F[{I" path;
24
+ F"V/home/sbertel/workspace/sooner/app/assets/javascripts/sooner/admin/subscribers.jsI"
25
+ mtime;
26
+ FIu: Time
27
+ : @_zoneI"EET;
28
+ T:
29
+ F"%55d0490955ed8a465e6cdcf3b59111a2{I" path;
30
+ F"g/home/sbertel/.rvm/gems/ruby-1.9.3-p0/gems/jquery-rails-1.0.16/vendor/assets/javascripts/jquery.jsI"
31
+ mtime;
32
+ FIu;
33
+ ; I"EET;
34
+ T;
35
+ F"%edf6bc5888735e82a8f6769492e5dccd{I" path;
36
+ F"[/home/sbertel/workspace/sooner/app/assets/javascripts/sooner/jquery.tablesorter.min.jsI"
37
+ mtime;
38
+ FIu;
39
+ ; I"EET;
40
+ T;
41
+ F"%c1a09974d985b756618cdb0ac6388a9fI"
42
+ F"%46dde6621c301f4928e3b34efee9e3b5
@@ -0,0 +1,303 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1320224789.7115364: @value{I"
2
+ class:EFI"BundledAsset;
3
+ FI"id;
4
+ F"%d5b5f1bf9c4a2a9a05a4a792c814e4e9I"logical_path;
5
+ F"sooner/respond.src.jsI"
6
+ F"P/home/sbertel/workspace/sooner/app/assets/javascripts/sooner/respond.src.jsI"content_type;
7
+ FI"application/javascript;
8
+ FI"
9
+ mtime;
10
+ FI"2011-11-02T11:05:38+02:00;
11
+ FI" body;
12
+ FI"3/*! Respond.js v1.0.1pre: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
13
+
14
+ (function( win, mqSupported ){
15
+ //exposed namespace
16
+ win.respond = {};
17
+
18
+ //define update even in native-mq-supporting browsers, to avoid errors
19
+ respond.update = function(){};
20
+
21
+ //expose media query support flag for external use
22
+ respond.mediaQueriesSupported = mqSupported;
23
+
24
+ //if media queries are supported, exit here
25
+ if( mqSupported ){ return; }
26
+
27
+ //define vars
28
+ var doc = win.document,
29
+ docElem = doc.documentElement,
30
+ mediastyles = [],
31
+ rules = [],
32
+ appendedEls = [],
33
+ parsedSheets = {},
34
+ resizeThrottle = 30,
35
+ head = doc.getElementsByTagName( "head" )[0] || docElem,
36
+ links = head.getElementsByTagName( "link" ),
37
+ requestQueue = [],
38
+
39
+ //loop stylesheets, send text content to translate
40
+ ripCSS = function(){
41
+ var sheets = links,
42
+ sl = sheets.length,
43
+ i = 0,
44
+ //vars for loop:
45
+ sheet, href, media, isCSS;
46
+
47
+ for( ; i < sl; i++ ){
48
+ sheet = sheets[ i ],
49
+ href = sheet.href,
50
+ media = sheet.media,
51
+ isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
52
+
53
+ //only links plz and prevent re-parsing
54
+ if( !!href && isCSS && !parsedSheets[ href ] ){
55
+ // selectivizr exposes css through the rawCssText expando
56
+ if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
57
+ translate( sheet.styleSheet.rawCssText, href, media );
58
+ parsedSheets[ href ] = true;
59
+ } else {
60
+ if( !/^([a-zA-Z]+?:(\/\/)?)/.test( href )
61
+ || href.replace( RegExp.$1, "" ).split( "/" )[0] === win.location.host ){
62
+ requestQueue.push( {
63
+ href: href,
64
+ media: media
65
+ } );
66
+ }
67
+ }
68
+ }
69
+ }
70
+ makeRequests();
71
+
72
+ },
73
+
74
+ //recurse through request queue, get css text
75
+ makeRequests = function(){
76
+ if( requestQueue.length ){
77
+ var thisRequest = requestQueue.shift();
78
+
79
+ ajax( thisRequest.href, function( styles ){
80
+ translate( styles, thisRequest.href, thisRequest.media );
81
+ parsedSheets[ thisRequest.href ] = true;
82
+ makeRequests();
83
+ } );
84
+ }
85
+ },
86
+
87
+ //find media blocks in css text, convert to style blocks
88
+ translate = function( styles, href, media ){
89
+ var qs = styles.match( /@media[^\{]+\{([^\{\}]+\{[^\}\{]+\})+/gi ),
90
+ ql = qs && qs.length || 0,
91
+ //try to get CSS path
92
+ href = href.substring( 0, href.lastIndexOf( "/" )),
93
+ repUrls = function( css ){
94
+ return css.replace( /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, "$1" + href + "$2$3" );
95
+ },
96
+ useMedia = !ql && media,
97
+ //vars used in loop
98
+ i = 0,
99
+ j, fullq, thisq, eachq, eql;
100
+
101
+ //if path exists, tack on trailing slash
102
+ if( href.length ){ href += "/"; }
103
+
104
+ //if no internal queries exist, but media attr does, use that
105
+ //note: this currently lacks support for situations where a media attr is specified on a link AND
106
+ //its associated stylesheet has internal CSS media queries.
107
+ //In those cases, the media attribute will currently be ignored.
108
+ if( useMedia ){
109
+ ql = 1;
110
+ }
111
+
112
+
113
+ for( ; i < ql; i++ ){
114
+ j = 0;
115
+
116
+ //media attr
117
+ if( useMedia ){
118
+ fullq = media;
119
+ rules.push( repUrls( styles ) );
120
+ }
121
+ //parse for styles
122
+ else{
123
+ fullq = qs[ i ].match( /@media ([^\{]+)\{([\S\s]+?)$/ ) && RegExp.$1;
124
+ rules.push( RegExp.$2 && repUrls( RegExp.$2 ) );
125
+ }
126
+
127
+ eachq = fullq.split( "," );
128
+ eql = eachq.length;
129
+
130
+
131
+ for( ; j < eql; j++ ){
132
+ thisq = eachq[ j ];
133
+ mediastyles.push( {
134
+ media : thisq.match( /(only\s+)?([a-zA-Z]+)(\sand)?/ ) && RegExp.$2,
135
+ rules : rules.length - 1,
136
+ minw : thisq.match( /\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/ ) && parseFloat( RegExp.$1 ),
137
+ maxw : thisq.match( /\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/ ) && parseFloat( RegExp.$1 )
138
+ } );
139
+ }
140
+ }
141
+
142
+ applyMedia();
143
+ },
144
+
145
+ lastCall,
146
+
147
+ resizeDefer,
148
+
149
+ //enable/disable styles
150
+ applyMedia = function( fromResize ){
151
+ var name = "clientWidth",
152
+ docElemProp = docElem[ name ],
153
+ currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[ name ] || docElemProp,
154
+ styleBlocks = {},
155
+ dFrag = doc.createDocumentFragment(),
156
+ lastLink = links[ links.length-1 ],
157
+ now = (new Date()).getTime();
158
+
159
+ //throttle resize calls
160
+ if( fromResize && lastCall && now - lastCall < resizeThrottle ){
161
+ clearTimeout( resizeDefer );
162
+ resizeDefer = setTimeout( applyMedia, resizeThrottle );
163
+ return;
164
+ }
165
+ else {
166
+ lastCall = now;
167
+ }
168
+
169
+ for( var i in mediastyles ){
170
+ var thisstyle = mediastyles[ i ];
171
+ if( !thisstyle.minw && !thisstyle.maxw ||
172
+ ( !thisstyle.minw || thisstyle.minw && currWidth >= thisstyle.minw ) &&
173
+ (!thisstyle.maxw || thisstyle.maxw && currWidth <= thisstyle.maxw ) ){
174
+ if( !styleBlocks[ thisstyle.media ] ){
175
+ styleBlocks[ thisstyle.media ] = [];
176
+ }
177
+ styleBlocks[ thisstyle.media ].push( rules[ thisstyle.rules ] );
178
+ }
179
+ }
180
+
181
+ //remove any existing respond style element(s)
182
+ for( var i in appendedEls ){
183
+ if( appendedEls[ i ] && appendedEls[ i ].parentNode === head ){
184
+ head.removeChild( appendedEls[ i ] );
185
+ }
186
+ }
187
+
188
+ //inject active styles, grouped by media type
189
+ for( var i in styleBlocks ){
190
+ var ss = doc.createElement( "style" ),
191
+ css = styleBlocks[ i ].join( "\n" );
192
+
193
+ ss.type = "text/css";
194
+ ss.media = i;
195
+
196
+ if ( ss.styleSheet ){
197
+ ss.styleSheet.cssText = css;
198
+ }
199
+ else {
200
+ ss.appendChild( doc.createTextNode( css ) );
201
+ }
202
+ dFrag.appendChild( ss );
203
+ appendedEls.push( ss );
204
+ }
205
+
206
+ //append to DOM at once
207
+ head.insertBefore( dFrag, lastLink.nextSibling );
208
+ },
209
+ //tweaked Ajax functions from Quirksmode
210
+ ajax = function( url, callback ) {
211
+ var req = xmlHttp();
212
+ if (!req){
213
+ return;
214
+ }
215
+ req.open( "GET", url, true );
216
+ req.onreadystatechange = function () {
217
+ if ( req.readyState != 4 || req.status != 200 && req.status != 304 ){
218
+ return;
219
+ }
220
+ callback( req.responseText );
221
+ }
222
+ if ( req.readyState == 4 ){
223
+ return;
224
+ }
225
+ req.send( null );
226
+ },
227
+ //define ajax obj
228
+ xmlHttp = (function() {
229
+ var xmlhttpmethod = false;
230
+ try {
231
+ xmlhttpmethod = new XMLHttpRequest();
232
+ }
233
+ catch( e ){
234
+ xmlhttpmethod = new ActiveXObject( "Microsoft.XMLHTTP" );
235
+ }
236
+ return function(){
237
+ return xmlhttpmethod;
238
+ };
239
+ })();
240
+
241
+ //translate CSS
242
+ ripCSS();
243
+
244
+ //expose update for re-running respond later on
245
+ respond.update = ripCSS;
246
+
247
+ //adjust on resize
248
+ function callMedia(){
249
+ applyMedia( true );
250
+ }
251
+ if( win.addEventListener ){
252
+ win.addEventListener( "resize", callMedia, false );
253
+ }
254
+ else if( win.attachEvent ){
255
+ win.attachEvent( "onresize", callMedia );
256
+ }
257
+ })(
258
+ this,
259
+ (function( win ){
260
+
261
+ //for speed, flag browsers with window.matchMedia support and IE 9 as supported
262
+ if( win.matchMedia ){ return true; }
263
+
264
+ var bool,
265
+ doc = document,
266
+ docElem = doc.documentElement,
267
+ refNode = docElem.firstElementChild || docElem.firstChild,
268
+ // fakeBody required for <FF4 when executed in <head>
269
+ fakeUsed = !doc.body,
270
+ fakeBody = doc.body || doc.createElement( "body" ),
271
+ div = doc.createElement( "div" ),
272
+ q = "only all";
273
+
274
+ div.id = "mq-test-1";
275
+ div.style.cssText = "position:absolute;top:-99em";
276
+ fakeBody.appendChild( div );
277
+
278
+ div.innerHTML = '_<style media="'+q+'"> #mq-test-1 { width: 9px; }</style>';
279
+ if( fakeUsed ){
280
+ docElem.insertBefore( fakeBody, refNode );
281
+ }
282
+ div.removeChild( div.firstChild );
283
+ bool = div.offsetWidth == 9;
284
+ if( fakeUsed ){
285
+ docElem.removeChild( fakeBody );
286
+ }
287
+ else{
288
+ fakeBody.removeChild( div );
289
+ }
290
+ return bool;
291
+ })( this )
292
+ );
293
+ ;
294
+ FI"asset_paths;
295
+ F["P/home/sbertel/workspace/sooner/app/assets/javascripts/sooner/respond.src.jsI"dependency_paths;
296
+ F[{I" path;
297
+ F"P/home/sbertel/workspace/sooner/app/assets/javascripts/sooner/respond.src.jsI"
298
+ mtime;
299
+ FIu: Time
300
+ : @_zoneI"EET;
301
+ T:
302
+ F"%e9891776a920562179cfc61a1437f0adI"
303
+ F"%46dde6621c301f4928e3b34efee9e3b5
@@ -0,0 +1,9 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1320073196.8306928: @value{ I" length:EFi�@I" digest;
2
+ F"%9d33cdc99906e8f7aa826bb45a91c390I" source;
3
+ FI"�@
4
+ (function($){$.extend({tablesorter:new
5
+ function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,rows,-1,i);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,rows,rowIndex,cellIndex){var l=parsers.length,node=false,nodeValue=false,keepLooking=true;while(nodeValue==''&&keepLooking){rowIndex++;if(rows[rowIndex]){node=getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex);nodeValue=trimAndGetNodeText(table.config,node);if(table.config.debug){log('Checking if value was empty on row:'+rowIndex);}}else{keepLooking=false;}}for(var i=1;i<l;i++){if(parsers[i].is(nodeValue,table,node)){return parsers[i];}}return parsers[0];}function getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex){return rows[rowIndex].cells[cellIndex];}function trimAndGetNodeText(config,node){return $.trim(getElementText(config,node));}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=$(table.tBodies[0].rows[i]),cols=[];if(c.hasClass(table.config.cssChildRow)){cache.row[cache.row.length-1]=cache.row[cache.row.length-1].add(c);continue;}cache.row.push(c);for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c[0].cells[j]),table,c[0].cells[j]));}cols.push(cache.normalized.length);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){var text="";if(!node)return"";if(!config.supportsTextContent)config.supportsTextContent=node.textContent||false;if(config.textExtraction=="simple"){if(config.supportsTextContent){text=node.textContent;}else{if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){text=node.childNodes[0].innerHTML;}else{text=node.innerHTML;}}}else{if(typeof(config.textExtraction)=="function"){text=config.textExtraction(node);}else{text=$(node).text();}}return text;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){var pos=n[i][checkCell];rows.push(r[pos]);if(!table.config.appender){var l=r[pos].length;for(var j=0;j<l;j++){tableBody[0].appendChild(r[pos][j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false;var header_index=computeTableHeaderCellIndexes(table);$tableHeaders=$(table.config.selectorHeaders,table).each(function(index){this.column=header_index[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=formatSortingOrder(table.config.sortInitialOrder);this.count=this.order;if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(checkHeaderOptionsSortingLocked(table,index))this.order=this.lockedOrder=checkHeaderOptionsSortingLocked(table,index);if(!this.sortDisabled){var $th=$(this).addClass(table.config.cssHeader);if(table.config.onRenderHeader)table.config.onRenderHeader.apply($th);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function computeTableHeaderCellIndexes(t){var matrix=[];var lookup={};var thead=t.getElementsByTagName('THEAD')[0];var trs=thead.getElementsByTagName('TR');for(var i=0;i<trs.length;i++){var cells=trs[i].cells;for(var j=0;j<cells.length;j++){var c=cells[j];var rowIndex=c.parentNode.rowIndex;var cellId=rowIndex+"-"+c.cellIndex;var rowSpan=c.rowSpan||1;var colSpan=c.colSpan||1
6
+ var firstAvailCol;if(typeof(matrix[rowIndex])=="undefined"){matrix[rowIndex]=[];}for(var k=0;k<matrix[rowIndex].length+1;k++){if(typeof(matrix[rowIndex][k])=="undefined"){firstAvailCol=k;break;}}lookup[cellId]=firstAvailCol;for(var k=rowIndex;k<rowIndex+rowSpan;k++){if(typeof(matrix[k])=="undefined"){matrix[k]=[];}var matrixrow=matrix[k];for(var l=firstAvailCol;l<firstAvailCol+colSpan;l++){matrixrow[l]="x";}}}}return lookup;}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){return(v.toLowerCase()=="desc")?1:0;}else{return(v==1)?1:0;}}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(table.config.parsers[c].type=="text")?((order==0)?makeSortFunction("text","asc",c):makeSortFunction("text","desc",c)):((order==0)?makeSortFunction("numeric","asc",c):makeSortFunction("numeric","desc",c));var e="e"+i;dynamicExp+="var "+e+" = "+s;dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";if(table.config.debug){benchmark("Evaling expression:"+dynamicExp,new Date());}eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function makeSortFunction(type,direction,index){var a="a["+index+"]",b="b["+index+"]";if(type=='text'&&direction=='asc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+a+" < "+b+") ? -1 : 1 )));";}else if(type=='text'&&direction=='desc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+b+" < "+a+") ? -1 : 1 )));";}else if(type=='numeric'&&direction=='asc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+a+" - "+b+"));";}else if(type=='numeric'&&direction=='desc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+b+" - "+a+"));";}};function makeSortText(i){return"((a["+i+"] < b["+i+"]) ? -1 : ((a["+i+"] > b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){var me=this;setTimeout(function(){me.config.parsers=buildParserCache(me,$headers);cache=buildCache(me);},1);}).bind("updateCell",function(e,cell){var config=this.config;var pos=[(cell.parentNode.rowIndex-1),cell.cellIndex];cache.normalized[pos[0]][pos[1]]=config.parsers[pos[1]].format(getElementText(config,cell),cell);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){return/^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g,'')));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLocaleLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[£$€]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}var $tr,row=-1,odd;$("tr:visible",table.tBodies[0]).each(function(i){$tr=$(this);if(!$tr.hasClass(table.config.cssChildRow))row++;odd=(row%2==0);$tr.removeClass(table.config.widgetZebra.css[odd?0:1]).addClass(table.config.widgetZebra.css[odd?1:0])});if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
7
+ ;
8
+ TI"
9
+ F"%e6411a6cf85db85a2e2ed6a34a08ba07