window_rails 0.1.5 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. data/CHANGELOG.rdoc +3 -0
  2. data/LICENSE +1 -23
  3. data/README.rdoc +14 -26
  4. data/app/controllers/window_rails_controller.rb +19 -4
  5. data/lib/window_rails.rb +6 -2
  6. data/lib/window_rails/engine.rb +15 -0
  7. data/lib/window_rails/tasks.rb +65 -3
  8. data/lib/window_rails/version.rb +1 -1
  9. data/lib/window_rails/window_rails_generators.rb +225 -98
  10. data/lib/window_rails/window_rails_view.rb +35 -3
  11. data/rails/init.rb +1 -1
  12. metadata +24 -181
  13. data/files/javascripts/debug.js +0 -137
  14. data/files/javascripts/extended_debug.js +0 -113
  15. data/files/javascripts/tooltip.js +0 -241
  16. data/files/javascripts/window.js +0 -1882
  17. data/files/javascripts/window_effects.js +0 -157
  18. data/files/javascripts/window_ext.js +0 -115
  19. data/files/themes/alert.css +0 -119
  20. data/files/themes/alert/bottom.gif +0 -0
  21. data/files/themes/alert/bottom_left.gif +0 -0
  22. data/files/themes/alert/bottom_right.gif +0 -0
  23. data/files/themes/alert/left.gif +0 -0
  24. data/files/themes/alert/overlay.png +0 -0
  25. data/files/themes/alert/progress.gif +0 -0
  26. data/files/themes/alert/right.gif +0 -0
  27. data/files/themes/alert/top.gif +0 -0
  28. data/files/themes/alert/top_left.gif +0 -0
  29. data/files/themes/alert/top_right.gif +0 -0
  30. data/files/themes/alert_lite.css +0 -88
  31. data/files/themes/alphacube.css +0 -150
  32. data/files/themes/alphacube/bottom-left-c.gif +0 -0
  33. data/files/themes/alphacube/bottom-middle.gif +0 -0
  34. data/files/themes/alphacube/bottom-right-c.gif +0 -0
  35. data/files/themes/alphacube/button-close-focus.gif +0 -0
  36. data/files/themes/alphacube/button-max-focus.gif +0 -0
  37. data/files/themes/alphacube/button-min-focus.gif +0 -0
  38. data/files/themes/alphacube/frame-left.gif +0 -0
  39. data/files/themes/alphacube/frame-right.gif +0 -0
  40. data/files/themes/alphacube/left-top.gif +0 -0
  41. data/files/themes/alphacube/right-top.gif +0 -0
  42. data/files/themes/alphacube/top-middle.gif +0 -0
  43. data/files/themes/behavior.htc +0 -51
  44. data/files/themes/darkX.css +0 -121
  45. data/files/themes/darkX/button-close-focused.png +0 -0
  46. data/files/themes/darkX/button-maximize-focused.png +0 -0
  47. data/files/themes/darkX/button-minimize-focused.png +0 -0
  48. data/files/themes/darkX/frame-bottom-left-focused.png +0 -0
  49. data/files/themes/darkX/frame-bottom-mid-focused.png +0 -0
  50. data/files/themes/darkX/frame-bottom-right-focused.png +0 -0
  51. data/files/themes/darkX/frame-left-focused.png +0 -0
  52. data/files/themes/darkX/frame-right-focused.png +0 -0
  53. data/files/themes/darkX/titlebar-left-focused.png +0 -0
  54. data/files/themes/darkX/titlebar-mid-focused.png +0 -0
  55. data/files/themes/darkX/titlebar-right-focused.png +0 -0
  56. data/files/themes/debug.css +0 -25
  57. data/files/themes/default.css +0 -155
  58. data/files/themes/default/bottom_left.gif +0 -0
  59. data/files/themes/default/bottom_mid.gif +0 -0
  60. data/files/themes/default/bottom_right.gif +0 -0
  61. data/files/themes/default/bottom_right_resize.gif +0 -0
  62. data/files/themes/default/center_left.gif +0 -0
  63. data/files/themes/default/center_right.gif +0 -0
  64. data/files/themes/default/clear.gif +0 -0
  65. data/files/themes/default/close.gif +0 -0
  66. data/files/themes/default/inspect.gif +0 -0
  67. data/files/themes/default/maximize.gif +0 -0
  68. data/files/themes/default/minimize.gif +0 -0
  69. data/files/themes/default/overlay.png +0 -0
  70. data/files/themes/default/resize.gif +0 -0
  71. data/files/themes/default/sizer.gif +0 -0
  72. data/files/themes/default/top_left.gif +0 -0
  73. data/files/themes/default/top_mid.gif +0 -0
  74. data/files/themes/default/top_right.gif +0 -0
  75. data/files/themes/iefix/blank.gif +0 -0
  76. data/files/themes/iefix/iepngfix.css +0 -3
  77. data/files/themes/iefix/iepngfix.htc +0 -54
  78. data/files/themes/lighting.css +0 -960
  79. data/files/themes/lighting/background_buttons.gif +0 -0
  80. data/files/themes/lighting/bottom-left-blue.png +0 -0
  81. data/files/themes/lighting/bottom-left-darkblue.png +0 -0
  82. data/files/themes/lighting/bottom-left-green.png +0 -0
  83. data/files/themes/lighting/bottom-left-grey.png +0 -0
  84. data/files/themes/lighting/bottom-middle-blue.png +0 -0
  85. data/files/themes/lighting/bottom-middle-darkblue.png +0 -0
  86. data/files/themes/lighting/bottom-middle-green.png +0 -0
  87. data/files/themes/lighting/bottom-middle-grey.png +0 -0
  88. data/files/themes/lighting/bottom-right-blue.png +0 -0
  89. data/files/themes/lighting/bottom-right-darkblue.png +0 -0
  90. data/files/themes/lighting/bottom-right-green.png +0 -0
  91. data/files/themes/lighting/bottom-right-grey.png +0 -0
  92. data/files/themes/lighting/button-close-blue.png +0 -0
  93. data/files/themes/lighting/button-close-darkblue.png +0 -0
  94. data/files/themes/lighting/button-close-green.png +0 -0
  95. data/files/themes/lighting/button-close-grey.png +0 -0
  96. data/files/themes/lighting/button-maximize-blue.png +0 -0
  97. data/files/themes/lighting/button-maximize-darkblue.png +0 -0
  98. data/files/themes/lighting/button-maximize-green.png +0 -0
  99. data/files/themes/lighting/button-maximize-grey.png +0 -0
  100. data/files/themes/lighting/button-minimize-blue.png +0 -0
  101. data/files/themes/lighting/button-minimize-darkblue.png +0 -0
  102. data/files/themes/lighting/button-minimize-green.png +0 -0
  103. data/files/themes/lighting/button-minimize-grey.png +0 -0
  104. data/files/themes/lighting/left-blue.png +0 -0
  105. data/files/themes/lighting/left-darkblue.png +0 -0
  106. data/files/themes/lighting/left-green.png +0 -0
  107. data/files/themes/lighting/left-grey.png +0 -0
  108. data/files/themes/lighting/pngbehavior.htc +0 -67
  109. data/files/themes/lighting/right-blue.png +0 -0
  110. data/files/themes/lighting/right-darkblue.png +0 -0
  111. data/files/themes/lighting/right-green.png +0 -0
  112. data/files/themes/lighting/right-grey.png +0 -0
  113. data/files/themes/lighting/spinner.gif +0 -0
  114. data/files/themes/lighting/top-left-blue.png +0 -0
  115. data/files/themes/lighting/top-left-darkblue.png +0 -0
  116. data/files/themes/lighting/top-left-green.png +0 -0
  117. data/files/themes/lighting/top-left-grey.png +0 -0
  118. data/files/themes/lighting/top-middle-blue.png +0 -0
  119. data/files/themes/lighting/top-middle-darkblue.png +0 -0
  120. data/files/themes/lighting/top-middle-green.png +0 -0
  121. data/files/themes/lighting/top-middle-grey.png +0 -0
  122. data/files/themes/lighting/top-right-blue.png +0 -0
  123. data/files/themes/lighting/top-right-darkblue.png +0 -0
  124. data/files/themes/lighting/top-right-green.png +0 -0
  125. data/files/themes/lighting/top-right-grey.png +0 -0
  126. data/files/themes/mac_os_x.css +0 -333
  127. data/files/themes/mac_os_x/B.png +0 -0
  128. data/files/themes/mac_os_x/BL.png +0 -0
  129. data/files/themes/mac_os_x/BL_Main.png +0 -0
  130. data/files/themes/mac_os_x/BR.png +0 -0
  131. data/files/themes/mac_os_x/BR_Main.png +0 -0
  132. data/files/themes/mac_os_x/B_Main.png +0 -0
  133. data/files/themes/mac_os_x/L.png +0 -0
  134. data/files/themes/mac_os_x/L_Main.png +0 -0
  135. data/files/themes/mac_os_x/R.png +0 -0
  136. data/files/themes/mac_os_x/R_Main.png +0 -0
  137. data/files/themes/mac_os_x/T.png +0 -0
  138. data/files/themes/mac_os_x/TL.png +0 -0
  139. data/files/themes/mac_os_x/TL_Main.png +0 -0
  140. data/files/themes/mac_os_x/TR.png +0 -0
  141. data/files/themes/mac_os_x/TR_Main.png +0 -0
  142. data/files/themes/mac_os_x/T_Main.png +0 -0
  143. data/files/themes/mac_os_x/close.gif +0 -0
  144. data/files/themes/mac_os_x/maximize.gif +0 -0
  145. data/files/themes/mac_os_x/minimize.gif +0 -0
  146. data/files/themes/mac_os_x_dialog.css +0 -160
  147. data/files/themes/mac_os_x_dialog/B.png +0 -0
  148. data/files/themes/mac_os_x_dialog/BL.png +0 -0
  149. data/files/themes/mac_os_x_dialog/BR.png +0 -0
  150. data/files/themes/mac_os_x_dialog/L.png +0 -0
  151. data/files/themes/mac_os_x_dialog/R.png +0 -0
  152. data/files/themes/mac_os_x_dialog/T.png +0 -0
  153. data/files/themes/mac_os_x_dialog/TL.png +0 -0
  154. data/files/themes/mac_os_x_dialog/TR.png +0 -0
  155. data/files/themes/mac_os_x_dialog/bg.gif +0 -0
  156. data/files/themes/mac_os_x_dialog/close.gif +0 -0
  157. data/files/themes/mac_os_x_dialog/maximize.gif +0 -0
  158. data/files/themes/mac_os_x_dialog/minimize.gif +0 -0
  159. data/files/themes/nuncio.css +0 -164
  160. data/files/themes/nuncio/bottom_left.png +0 -0
  161. data/files/themes/nuncio/bottom_mid.png +0 -0
  162. data/files/themes/nuncio/bottom_right.png +0 -0
  163. data/files/themes/nuncio/center_left.png +0 -0
  164. data/files/themes/nuncio/center_right.png +0 -0
  165. data/files/themes/nuncio/close.png +0 -0
  166. data/files/themes/nuncio/minimize.png +0 -0
  167. data/files/themes/nuncio/overlay.png +0 -0
  168. data/files/themes/nuncio/top_left.png +0 -0
  169. data/files/themes/nuncio/top_mid.png +0 -0
  170. data/files/themes/nuncio/top_right.png +0 -0
  171. data/files/themes/spread.css +0 -108
  172. data/files/themes/spread/bottom-left-c.gif +0 -0
  173. data/files/themes/spread/bottom-middle.gif +0 -0
  174. data/files/themes/spread/bottom-right-c.gif +0 -0
  175. data/files/themes/spread/button-close-focus.gif +0 -0
  176. data/files/themes/spread/button-max-focus.gif +0 -0
  177. data/files/themes/spread/button-min-focus.gif +0 -0
  178. data/files/themes/spread/frame-left.gif +0 -0
  179. data/files/themes/spread/frame-right.gif +0 -0
  180. data/files/themes/spread/left-top.gif +0 -0
  181. data/files/themes/spread/right-top.gif +0 -0
  182. data/files/themes/spread/top-middle.gif +0 -0
  183. data/init.rb +0 -8
  184. data/install.rb +0 -31
  185. data/uninstall.rb +0 -9
@@ -7,8 +7,40 @@ module WindowRailsView
7
7
  # the content is loaded into the window within an IFrame on the page. Generally, if you are calling
8
8
  # a method that simply renders out a partial, you want to use :url. If you are calling something
9
9
  # that returns an entire page, :iframe will likely be the ticket.
10
- def link_to_window(name, options={})
11
- link_to_remote(name, :url => {:controller => :window_rails, :action => :open_window, :window_url => url_for(options.delete(:url)), :iframe_url => url_for(options.delete(:iframe)), :window_options => options})
10
+ def link_to_window(name, options={}, html_opts={})
11
+ frame_url = options.has_key?(:iframe) ? url_for(options.delete(:iframe)) : nil
12
+ window_url = options.has_key?(:url) ? url_for(options.delete(:url)) : nil
13
+ link_to_remote(
14
+ name, {:url =>
15
+ open_window_path(
16
+ :window_url => window_url,
17
+ :iframe_url => frame_url,
18
+ :window_options => options
19
+ )},
20
+ html_opts
21
+ )
22
+ end
23
+
24
+ # options:: Options hash supplied to windowing system
25
+ # Extra options include :method and :delay. :delay is the number
26
+ # of seconds to wait after page load to open window
27
+ def open_window(options={})
28
+ frame_url = options.has_key?(:iframe) ? url_for(options.delete(:iframe)) : nil
29
+ window_url = options.has_key?(:url) ? url_for(options.delete(:url)) : nil
30
+ method = options.delete(:method) || 'get'
31
+ delay = options.delete(:delay) || 0.5
32
+ delay = delay * 1000
33
+ url = open_window_path(
34
+ :window_url => window_url,
35
+ :iframe_url => frame_url,
36
+ :window_options => options
37
+ ).html_safe
38
+ javascript_tag{
39
+ "setTimeout(function(){
40
+ jQuery.#{method}('#{url}');
41
+ }, #{delay.to_i});".html_safe
42
+ }
12
43
  end
13
44
 
14
- end
45
+ end
46
+ ActionView::Base.send :include, WindowRailsView
data/rails/init.rb CHANGED
@@ -1 +1 @@
1
- require File.join(File.dirname(__FILE__), '..', 'init.rb')
1
+ require 'window_rails'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: window_rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 5
10
- version: 0.1.5
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Roberts
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-08 00:00:00 -08:00
18
+ date: 2011-07-12 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -33,6 +33,21 @@ dependencies:
33
33
  version: "2.3"
34
34
  type: :runtime
35
35
  version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: rails_javascript_helpers
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ hash: 15
45
+ segments:
46
+ - 1
47
+ - 0
48
+ version: "1.0"
49
+ type: :runtime
50
+ version_requirements: *id002
36
51
  description: Windows for Rails
37
52
  email: chrisroberts.code@gmail.com
38
53
  executables: []
@@ -47,185 +62,13 @@ files:
47
62
  - LICENSE
48
63
  - README.rdoc
49
64
  - CHANGELOG.rdoc
50
- - init.rb
51
- - install.rb
52
- - uninstall.rb
53
65
  - app/controllers/window_rails_controller.rb
54
- - files/javascripts/window_ext.js
55
- - files/javascripts/window_effects.js
56
- - files/javascripts/extended_debug.js
57
- - files/javascripts/window.js
58
- - files/javascripts/debug.js
59
- - files/javascripts/tooltip.js
60
- - files/themes/spread.css
61
- - files/themes/alphacube/button-min-focus.gif
62
- - files/themes/alphacube/frame-right.gif
63
- - files/themes/alphacube/right-top.gif
64
- - files/themes/alphacube/button-close-focus.gif
65
- - files/themes/alphacube/top-middle.gif
66
- - files/themes/alphacube/frame-left.gif
67
- - files/themes/alphacube/button-max-focus.gif
68
- - files/themes/alphacube/left-top.gif
69
- - files/themes/alphacube/bottom-left-c.gif
70
- - files/themes/alphacube/bottom-middle.gif
71
- - files/themes/alphacube/bottom-right-c.gif
72
- - files/themes/nuncio.css
73
- - files/themes/darkX/frame-bottom-mid-focused.png
74
- - files/themes/darkX/titlebar-right-focused.png
75
- - files/themes/darkX/titlebar-left-focused.png
76
- - files/themes/darkX/button-close-focused.png
77
- - files/themes/darkX/titlebar-mid-focused.png
78
- - files/themes/darkX/button-minimize-focused.png
79
- - files/themes/darkX/frame-bottom-left-focused.png
80
- - files/themes/darkX/button-maximize-focused.png
81
- - files/themes/darkX/frame-bottom-right-focused.png
82
- - files/themes/darkX/frame-left-focused.png
83
- - files/themes/darkX/frame-right-focused.png
84
- - files/themes/mac_os_x/T.png
85
- - files/themes/mac_os_x/BR_Main.png
86
- - files/themes/mac_os_x/TL.png
87
- - files/themes/mac_os_x/T_Main.png
88
- - files/themes/mac_os_x/TL_Main.png
89
- - files/themes/mac_os_x/maximize.gif
90
- - files/themes/mac_os_x/BR.png
91
- - files/themes/mac_os_x/close.gif
92
- - files/themes/mac_os_x/L.png
93
- - files/themes/mac_os_x/B_Main.png
94
- - files/themes/mac_os_x/R.png
95
- - files/themes/mac_os_x/L_Main.png
96
- - files/themes/mac_os_x/TR_Main.png
97
- - files/themes/mac_os_x/R_Main.png
98
- - files/themes/mac_os_x/B.png
99
- - files/themes/mac_os_x/minimize.gif
100
- - files/themes/mac_os_x/BL_Main.png
101
- - files/themes/mac_os_x/TR.png
102
- - files/themes/mac_os_x/BL.png
103
- - files/themes/behavior.htc
104
- - files/themes/lighting.css
105
- - files/themes/default/top_right.gif
106
- - files/themes/default/top_left.gif
107
- - files/themes/default/bottom_right.gif
108
- - files/themes/default/resize.gif
109
- - files/themes/default/top_mid.gif
110
- - files/themes/default/center_right.gif
111
- - files/themes/default/maximize.gif
112
- - files/themes/default/bottom_left.gif
113
- - files/themes/default/inspect.gif
114
- - files/themes/default/sizer.gif
115
- - files/themes/default/bottom_mid.gif
116
- - files/themes/default/close.gif
117
- - files/themes/default/clear.gif
118
- - files/themes/default/minimize.gif
119
- - files/themes/default/bottom_right_resize.gif
120
- - files/themes/default/overlay.png
121
- - files/themes/default/center_left.gif
122
- - files/themes/debug.css
123
- - files/themes/alert/top_right.gif
124
- - files/themes/alert/top_left.gif
125
- - files/themes/alert/bottom_right.gif
126
- - files/themes/alert/top.gif
127
- - files/themes/alert/bottom_left.gif
128
- - files/themes/alert/progress.gif
129
- - files/themes/alert/overlay.png
130
- - files/themes/alert/right.gif
131
- - files/themes/alert/bottom.gif
132
- - files/themes/alert/left.gif
133
- - files/themes/mac_os_x.css
134
- - files/themes/alert_lite.css
135
- - files/themes/default.css
136
- - files/themes/lighting/button-maximize-darkblue.png
137
- - files/themes/lighting/background_buttons.gif
138
- - files/themes/lighting/right-grey.png
139
- - files/themes/lighting/bottom-middle-blue.png
140
- - files/themes/lighting/left-grey.png
141
- - files/themes/lighting/right-blue.png
142
- - files/themes/lighting/bottom-right-blue.png
143
- - files/themes/lighting/bottom-left-green.png
144
- - files/themes/lighting/top-left-grey.png
145
- - files/themes/lighting/bottom-left-darkblue.png
146
- - files/themes/lighting/button-maximize-green.png
147
- - files/themes/lighting/bottom-left-grey.png
148
- - files/themes/lighting/bottom-right-darkblue.png
149
- - files/themes/lighting/top-middle-green.png
150
- - files/themes/lighting/button-minimize-grey.png
151
- - files/themes/lighting/right-green.png
152
- - files/themes/lighting/right-darkblue.png
153
- - files/themes/lighting/left-darkblue.png
154
- - files/themes/lighting/left-blue.png
155
- - files/themes/lighting/top-right-green.png
156
- - files/themes/lighting/spinner.gif
157
- - files/themes/lighting/button-maximize-grey.png
158
- - files/themes/lighting/bottom-middle-green.png
159
- - files/themes/lighting/top-right-grey.png
160
- - files/themes/lighting/bottom-left-blue.png
161
- - files/themes/lighting/top-middle-grey.png
162
- - files/themes/lighting/top-left-darkblue.png
163
- - files/themes/lighting/button-minimize-blue.png
164
- - files/themes/lighting/button-maximize-blue.png
165
- - files/themes/lighting/top-middle-blue.png
166
- - files/themes/lighting/button-close-darkblue.png
167
- - files/themes/lighting/button-close-grey.png
168
- - files/themes/lighting/button-close-green.png
169
- - files/themes/lighting/button-minimize-darkblue.png
170
- - files/themes/lighting/top-left-green.png
171
- - files/themes/lighting/bottom-middle-grey.png
172
- - files/themes/lighting/bottom-right-green.png
173
- - files/themes/lighting/pngbehavior.htc
174
- - files/themes/lighting/top-right-darkblue.png
175
- - files/themes/lighting/top-left-blue.png
176
- - files/themes/lighting/button-close-blue.png
177
- - files/themes/lighting/button-minimize-green.png
178
- - files/themes/lighting/top-right-blue.png
179
- - files/themes/lighting/left-green.png
180
- - files/themes/lighting/bottom-right-grey.png
181
- - files/themes/lighting/top-middle-darkblue.png
182
- - files/themes/lighting/bottom-middle-darkblue.png
183
- - files/themes/darkX.css
184
- - files/themes/mac_os_x_dialog/T.png
185
- - files/themes/mac_os_x_dialog/bg.gif
186
- - files/themes/mac_os_x_dialog/TL.png
187
- - files/themes/mac_os_x_dialog/maximize.gif
188
- - files/themes/mac_os_x_dialog/BR.png
189
- - files/themes/mac_os_x_dialog/close.gif
190
- - files/themes/mac_os_x_dialog/L.png
191
- - files/themes/mac_os_x_dialog/R.png
192
- - files/themes/mac_os_x_dialog/B.png
193
- - files/themes/mac_os_x_dialog/minimize.gif
194
- - files/themes/mac_os_x_dialog/TR.png
195
- - files/themes/mac_os_x_dialog/BL.png
196
- - files/themes/nuncio/top_left.png
197
- - files/themes/nuncio/top_mid.png
198
- - files/themes/nuncio/top_right.png
199
- - files/themes/nuncio/bottom_right.png
200
- - files/themes/nuncio/minimize.png
201
- - files/themes/nuncio/bottom_left.png
202
- - files/themes/nuncio/center_left.png
203
- - files/themes/nuncio/bottom_mid.png
204
- - files/themes/nuncio/overlay.png
205
- - files/themes/nuncio/center_right.png
206
- - files/themes/nuncio/close.png
207
- - files/themes/alphacube.css
208
- - files/themes/iefix/iepngfix.htc
209
- - files/themes/iefix/blank.gif
210
- - files/themes/iefix/iepngfix.css
211
- - files/themes/mac_os_x_dialog.css
212
- - files/themes/spread/button-min-focus.gif
213
- - files/themes/spread/frame-right.gif
214
- - files/themes/spread/right-top.gif
215
- - files/themes/spread/button-close-focus.gif
216
- - files/themes/spread/top-middle.gif
217
- - files/themes/spread/frame-left.gif
218
- - files/themes/spread/button-max-focus.gif
219
- - files/themes/spread/left-top.gif
220
- - files/themes/spread/bottom-left-c.gif
221
- - files/themes/spread/bottom-middle.gif
222
- - files/themes/spread/bottom-right-c.gif
223
- - files/themes/alert.css
224
66
  - lib/window_rails.rb
225
- - lib/window_rails/version.rb
226
- - lib/window_rails/tasks.rb
67
+ - lib/window_rails/engine.rb
227
68
  - lib/window_rails/window_rails_view.rb
69
+ - lib/window_rails/tasks.rb
228
70
  - lib/window_rails/window_rails_generators.rb
71
+ - lib/window_rails/version.rb
229
72
  - rails/init.rb
230
73
  has_rdoc: true
231
74
  homepage: http://github.com/chrisroberts/window_rails
@@ -257,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
100
  requirements: []
258
101
 
259
102
  rubyforge_project:
260
- rubygems_version: 1.5.1
103
+ rubygems_version: 1.6.2
261
104
  signing_key:
262
105
  specification_version: 3
263
106
  summary: Windows for Rails
@@ -1,137 +0,0 @@
1
- var debugWindow = null;
2
- function debug(text, reverse) {
3
- if (debugWindow == null)
4
- return;
5
-
6
- time = "-"; //new Date();
7
- if (reverse) {
8
- $('debug').innerHTML = time + " " + text + "<br>"+ $('debug').innerHTML;
9
- debugWindow.getContent().scrollTop=0;
10
- }
11
- else {
12
- $('debug').innerHTML += time + " " + text + "<br>";
13
- debugWindow.getContent().scrollTop=10000; // Far away
14
- }
15
- }
16
-
17
- function hideDebug() {
18
- if (debugWindow) {
19
- debugWindow.destroy();
20
- debugWindow = null;
21
- }
22
- }
23
-
24
- function showDebug(bShow) {
25
- if (debugWindow == null) {
26
- debugWindow = new Window('debug_window', {className: 'dialog',width:250, height:100, right:4, bottom:42, zIndex:1000, opacity:1, showEffect: Element.show, resizable: true, title: "Debug"})
27
- debugWindow.getContent().innerHTML = "<style>#debug_window .dialog_content {background:#000;}</style> <div id='debug'></div>";
28
- date=new Date;
29
- date.setMonth(date.getMonth()+3);
30
-
31
- //debugWindow.setCookie(null, date);
32
- }
33
- if( typeof bShow == 'undefined' || bShow)debugWindow.show()
34
- }
35
-
36
-
37
- function clearDebug() {
38
- if (debugWindow == null)
39
- return;
40
- $('debug').innerHTML = "";
41
- }
42
-
43
- /**
44
- * document.createElement convenience wrapper
45
- *
46
- * The data parameter is an object that must have the "tag" key, containing
47
- * a string with the tagname of the element to create. It can optionally have
48
- * a "children" key which can be: a string, "data" object, or an array of "data"
49
- * objects to append to this element as children. Any other key is taken as an
50
- * attribute to be applied to this tag.
51
- *
52
- * Available under an MIT license:
53
- * http://www.opensource.org/licenses/mit-license.php
54
- *
55
- * @param {Object} data The data representing the element to create
56
- * @return {Element} The element created.
57
- */
58
- function $E(data) {
59
- var el;
60
- if ('string'==typeof data) {
61
- el=document.createTextNode(data);
62
- } else {
63
- //create the element
64
- el=document.createElement(data.tag);
65
- delete(data.tag);
66
-
67
- //append the children
68
- if ('undefined'!=typeof data.children) {
69
- if ('string'==typeof data.children ||'undefined'==typeof data.children.length) {
70
- //strings and single elements
71
- el.appendChild($E(data.children));
72
- } else {
73
- //arrays of elements
74
- for (var i=0, child=null; 'undefined'!=typeof (child=data.children[i]); i++) {
75
- el.appendChild($E(child));
76
- }
77
- }
78
- delete(data.children);
79
- }
80
-
81
- //any other data is attributes
82
- for (attr in data) {
83
- el[attr]=data[attr];
84
- }
85
- }
86
-
87
- return el;
88
- }
89
-
90
- // FROM Nick Hemsley
91
- var Debug = {
92
- inspectOutput: function (container, within) {
93
- within = within || debugWindow.getContent()
94
-
95
- if (debugWindow == null)
96
- return;
97
-
98
- within.appendChild(container)
99
- },
100
-
101
- inspect: function(object) {
102
- var cont = $E({tag: "div", className: "inspector"})
103
- Debug.inspectObj(object, cont)
104
- debugWindow.getContent().appendChild(cont)
105
- },
106
-
107
- inspectObj: function (object, container) {
108
- for (prop in object) {
109
- Debug.inspectOutput(Debug.inspectable(object, prop), container)
110
- }
111
- },
112
-
113
- inspectable: function(object, prop) {
114
- cont = $E({tag: 'div', className: 'inspectable', children: [prop + " value: " + object[prop] ]})
115
- cont.toInspect = object[prop]
116
- Event.observe(cont, 'click', Debug.inspectClicked, false)
117
- return cont
118
- },
119
-
120
- inspectClicked: function(e) {
121
- Debug.inspectContained(Event.element(e))
122
- Event.stop(e)
123
- },
124
-
125
- inspectContained: function(container) {
126
- if (container.opened) {
127
- container.parentNode.removeChild(container.opened)
128
- delete(container.opened)
129
- } else {
130
- sibling = container.parentNode.insertBefore($E({tag: "div", className: "child"}), container.nextSibling)
131
- if (container.toInspect)
132
- Debug.inspectObj(container.toInspect, sibling)
133
- container.opened = sibling
134
- }
135
- }
136
- }
137
- var inspect = Debug.inspect;
@@ -1,113 +0,0 @@
1
- var commandHistory;
2
- var historyIndex;
3
-
4
- function showExtendedDebug() {
5
- if (debugWindow != null) {
6
- hideDebug();
7
- }
8
-
9
- if (debugWindow == null) {
10
- commandHistory = new Array();
11
- historyIndex = 0;
12
-
13
- debugWindow = new Window('debug_window', {className: 'dialog',width:250, height:100, right:4, minWidth:250, bottom:42, zIndex:1000, opacity:1, showEffect: Element.show, resizable: true, title: "Debug"})
14
- debugWindow.getContent().innerHTML = "<style>#debug_window .dialog_content {background:#000;}</style> <div font='monaco' id='debug' style='padding:3px;color:#0F0;font-family:monaco'></div>";
15
-
16
- //create hourglass icon and attach events to it.
17
- var cont = "<div id=\"debug_window_inspect\" style=\"width: 15px; height: 15px; background: transparent url(themes/default/inspect.gif) no-repeat 0 0; position:absolute; top:5px; left:70px; cursor:pointer; z-index:3000;\"></div>";
18
-
19
- new Insertion.After('debug_window_maximize', cont);
20
- Event.observe('debug_window_inspect', 'click', enterInspectionMode, false);
21
-
22
- //create command text box
23
- cont = "Eval:<input id=\"debug_window_command\" type=\"textbox\" style=\"width:150px; height: 12px; color: black;\">"
24
- debugWindow.setStatusBar(cont);
25
-
26
- Event.observe('debug_window_command', 'mousedown', donothing);
27
- Event.observe('debug_window_command', 'keypress', evalJS, false);
28
- }
29
- debugWindow.show();
30
- }
31
-
32
- function donothing(evt){
33
- Field.activate('debug_window_command');
34
- return false;
35
- }
36
-
37
- function evalJS(evt){
38
- if(evt.keyCode == Event.KEY_RETURN){
39
- var js = $F('debug_window_command');
40
- try{
41
- var ret = eval(js);
42
- if(ret != null)
43
- debug(ret);
44
- }catch(e){
45
- debug(e);
46
- }
47
- $('debug_window_command').value = '';
48
-
49
- Field.activate('debug_window_command');
50
- commandHistory.push(js);
51
- historyIndex = 0;
52
- }
53
-
54
- if(evt.keyCode == Event.KEY_UP){
55
- if(commandHistory.length > historyIndex){
56
- historyIndex++;
57
- var js = commandHistory[commandHistory.length-historyIndex];
58
- $('debug_window_command').value = js;
59
- Event.stop(evt);
60
- Field.activate('debug_window_command');
61
- }
62
- }
63
-
64
- if(evt.keyCode == Event.KEY_DOWN){
65
- if(commandHistory.length >= historyIndex && historyIndex > 1){
66
- historyIndex--;
67
- var js = commandHistory[commandHistory.length-historyIndex];
68
- $('debug_window_command').value = js;
69
- Event.stop(evt);
70
- Field.activate('debug_window_command');
71
- }
72
- }
73
- }
74
-
75
- function enterInspectionMode(evt){
76
- //stop observing magnifying glass
77
- Event.stopObserving('debug_window_inspect', 'click', enterInspectionMode, false);
78
- //change pointer
79
- document.body.style.cursor='help';
80
- //start observing mouse clicks
81
- Event.observe(window, 'click', inspectItem, false);
82
- }
83
-
84
- function inspectItem(evt){
85
- // the element that triggered the event
86
- var element = Event.element(evt);
87
- if(element.id!="debug_window_inspect"){
88
- clearDebug()
89
- //change pointer
90
- document.body.style.cursor='default';
91
- debug(element.id);
92
- inspect(element);
93
- //stop observing mouse clicks
94
- Event.stopObserving(window, 'click', inspectItem, false);
95
- //alert('doing something');
96
- //start observing mag
97
- Event.observe('debug_window_inspect', 'click', enterInspectionMode, false);
98
- }
99
- }
100
-
101
- function clearDebug() {
102
- var win = $('debug');
103
- if (win == null)
104
- return;
105
-
106
- win.innerHTML=" ";
107
- //clear inspections too
108
- var divs = document.getElementsByClassName('inspector');
109
- divs.each(function(div){
110
- Element.remove(div);
111
- });
112
- }
113
-