compass-jquery-plugin 0.3.2.3 → 0.3.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (235) hide show
  1. data/README.md +54 -37
  2. data/VERSION.yml +1 -1
  3. data/lib/handle_attributes.rb +4 -4
  4. data/lib/handle_js_files.rb +5 -5
  5. data/lib/jqtouch_theme.rb +2 -2
  6. data/lib/jquery/dynatree.rb +2 -2
  7. data/lib/jquery/emulators.rb +1 -1
  8. data/lib/jquery/flash_messages.rb +6 -6
  9. data/lib/jquery/graphics.rb +5 -0
  10. data/lib/jquery/gridify/assertions.rb +1 -1
  11. data/lib/jquery/gridify/grid.rb +76 -59
  12. data/lib/jquery/gridify/grid_column.rb +73 -67
  13. data/lib/jquery/gridify/grid_finder.rb +79 -79
  14. data/lib/jquery/gridify/grid_options.rb +154 -149
  15. data/lib/jquery/gridify/grid_view.rb +143 -143
  16. data/lib/jquery/gridify.rb +25 -25
  17. data/lib/jquery/ical/calendar.rb +2 -2
  18. data/lib/jquery/ical/event.rb +48 -44
  19. data/lib/jquery/ical/helpers/ui_event_helper.rb +3 -3
  20. data/lib/jquery/jqgrid/jqgrid.rb +58 -58
  21. data/lib/jquery/jqgrid.rb +1 -1
  22. data/lib/jquery/jqtouch.rb +1 -1
  23. data/lib/jquery/jquery.rb +117 -117
  24. data/lib/jquery/jquery_auto_complete.rb +9 -9
  25. data/lib/jquery/jquery_json_response.rb +12 -12
  26. data/lib/jquery/jquery_selector_assertions.rb +55 -53
  27. data/lib/jquery/jstree.rb +2 -2
  28. data/lib/jquery/mobile.rb +1 -1
  29. data/lib/jquery/ribbon.rb +2 -2
  30. data/lib/jquery/secret_sauce/controller/ui_dialog_controls.rb +5 -5
  31. data/lib/jquery/secret_sauce/controller/ui_grid_controls.rb +5 -5
  32. data/lib/jquery/secret_sauce/helpers/ui_dialog_helper.rb +1 -1
  33. data/lib/jquery/secret_sauce/helpers/ui_form_helper.rb +39 -39
  34. data/lib/jquery/secret_sauce/helpers/ui_grid_helper.rb +74 -74
  35. data/lib/jquery/secret_sauce/model/find_for_grid.rb +21 -21
  36. data/lib/jquery/secret_sauce.rb +1 -1
  37. data/lib/jquery/tools.rb +1 -1
  38. data/lib/jquery_mobile_theme.rb +2 -2
  39. data/lib/jquery_ui_theme.rb +12 -12
  40. data/templates/dynatree/config/initializers/dynatree.rb +3 -3
  41. data/templates/dynatree/jquery/dynatree/aero.scss +16 -16
  42. data/templates/dynatree/jquery/dynatree/aqua.scss +16 -16
  43. data/templates/dynatree/jquery/dynatree/crystal.scss +16 -16
  44. data/templates/dynatree/jquery/dynatree/xp.scss +17 -17
  45. data/templates/dynatree/jquery.dynatree.js +2926 -2912
  46. data/templates/emulators/config/initializers/emulators.rb +6 -6
  47. data/templates/graphics/config/initializers/graphics.rb +5 -0
  48. data/templates/graphics/jquery/ganttView.scss +89 -0
  49. data/templates/graphics/jquery.ganttView.js +1669 -0
  50. data/templates/graphics/jquery.ganttView.min.js +70 -0
  51. data/templates/{jquery → graphics}/jquery.sparkline.js +466 -438
  52. data/templates/{jquery → graphics}/jquery.sparkline.min.js +0 -0
  53. data/templates/graphics/manifest.rb +9 -0
  54. data/templates/jqgrid/config/initializers/jqgrid.rb +1 -1
  55. data/templates/jqgrid/i18n/jqgrid/locale-ar.js +131 -125
  56. data/templates/jqgrid/i18n/jqgrid/locale-bg.js +135 -131
  57. data/templates/jqgrid/i18n/jqgrid/locale-bg1251.js +135 -131
  58. data/templates/jqgrid/i18n/jqgrid/locale-cat.js +132 -126
  59. data/templates/jqgrid/i18n/jqgrid/locale-cn.js +137 -131
  60. data/templates/jqgrid/i18n/jqgrid/locale-cs.js +133 -127
  61. data/templates/jqgrid/i18n/jqgrid/locale-da.js +132 -126
  62. data/templates/jqgrid/i18n/jqgrid/locale-de.js +138 -132
  63. data/templates/jqgrid/i18n/jqgrid/locale-el.js +131 -125
  64. data/templates/jqgrid/i18n/jqgrid/locale-en.js +133 -127
  65. data/templates/jqgrid/i18n/jqgrid/locale-es.js +133 -127
  66. data/templates/jqgrid/i18n/jqgrid/locale-fa.js +19 -16
  67. data/templates/jqgrid/i18n/jqgrid/locale-fi.js +132 -126
  68. data/templates/jqgrid/i18n/jqgrid/locale-fr.js +131 -125
  69. data/templates/jqgrid/i18n/jqgrid/locale-gl.js +131 -125
  70. data/templates/jqgrid/i18n/jqgrid/locale-he.js +132 -126
  71. data/templates/jqgrid/i18n/jqgrid/locale-hu.js +133 -127
  72. data/templates/jqgrid/i18n/jqgrid/locale-is.js +131 -125
  73. data/templates/jqgrid/i18n/jqgrid/locale-it.js +8 -1
  74. data/templates/jqgrid/i18n/jqgrid/locale-ja.js +139 -136
  75. data/templates/jqgrid/i18n/jqgrid/locale-nl.js +4 -1
  76. data/templates/jqgrid/i18n/jqgrid/locale-no.js +14 -1
  77. data/templates/jqgrid/i18n/jqgrid/locale-pl.js +132 -126
  78. data/templates/jqgrid/i18n/jqgrid/locale-pt-br.js +132 -126
  79. data/templates/jqgrid/i18n/jqgrid/locale-pt.js +130 -124
  80. data/templates/jqgrid/i18n/jqgrid/locale-ro.js +144 -138
  81. data/templates/jqgrid/i18n/jqgrid/locale-ru.js +132 -126
  82. data/templates/jqgrid/i18n/jqgrid/locale-sk.js +132 -126
  83. data/templates/jqgrid/i18n/jqgrid/locale-sr.js +133 -127
  84. data/templates/jqgrid/i18n/jqgrid/locale-sv.js +132 -126
  85. data/templates/jqgrid/i18n/jqgrid/locale-tr.js +131 -125
  86. data/templates/jqgrid/i18n/jqgrid/locale-ua.js +132 -126
  87. data/templates/jqgrid/jquery.jqGrid.js +12735 -10444
  88. data/templates/jqgrid/jquery.jqGrid.min.js +477 -469
  89. data/templates/jqgrid/public/stylesheets/ellipsis-xbl.xml +12 -10
  90. data/templates/jqtouch/config/initializers/jqtouch.rb +3 -3
  91. data/templates/jqtouch/jquery/touch/jqtouch.scss +1 -1
  92. data/templates/jqtouch/jquery.jqtouch.js +10025 -10043
  93. data/templates/jquery/config/initializers/jquery.rb +2 -4
  94. data/templates/jquery/history.adapter.jquery.js +71 -0
  95. data/templates/jquery/history.adapter.jquery.min.js +4 -0
  96. data/templates/jquery/history.html4.js +690 -0
  97. data/templates/jquery/history.html4.min.js +21 -0
  98. data/templates/jquery/history.js +1297 -0
  99. data/templates/jquery/history.min.js +29 -0
  100. data/templates/jquery/i18n/jquery.ui/datepicker-af.js +20 -20
  101. data/templates/jquery/i18n/jquery.ui/datepicker-ar-DZ.js +19 -19
  102. data/templates/jquery/i18n/jquery.ui/datepicker-ar.js +19 -19
  103. data/templates/jquery/i18n/jquery.ui/datepicker-az.js +19 -19
  104. data/templates/jquery/i18n/jquery.ui/datepicker-bg.js +8 -8
  105. data/templates/jquery/i18n/jquery.ui/datepicker-bs.js +20 -20
  106. data/templates/jquery/i18n/jquery.ui/datepicker-ca.js +20 -20
  107. data/templates/jquery/i18n/jquery.ui/datepicker-cs.js +20 -20
  108. data/templates/jquery/i18n/jquery.ui/datepicker-da.js +14 -14
  109. data/templates/jquery/i18n/jquery.ui/datepicker-de.js +20 -20
  110. data/templates/jquery/i18n/jquery.ui/datepicker-el.js +20 -20
  111. data/templates/jquery/i18n/jquery.ui/datepicker-en-AU.js +20 -20
  112. data/templates/jquery/i18n/jquery.ui/datepicker-en-GB.js +20 -20
  113. data/templates/jquery/i18n/jquery.ui/datepicker-en-NZ.js +20 -20
  114. data/templates/jquery/i18n/jquery.ui/datepicker-eo.js +20 -20
  115. data/templates/jquery/i18n/jquery.ui/datepicker-es.js +20 -20
  116. data/templates/jquery/i18n/jquery.ui/datepicker-et.js +20 -20
  117. data/templates/jquery/i18n/jquery.ui/datepicker-eu.js +20 -20
  118. data/templates/jquery/i18n/jquery.ui/datepicker-fa.js +18 -18
  119. data/templates/jquery/i18n/jquery.ui/datepicker-fi.js +15 -15
  120. data/templates/jquery/i18n/jquery.ui/datepicker-fo.js +20 -20
  121. data/templates/jquery/i18n/jquery.ui/datepicker-fr-CH.js +20 -20
  122. data/templates/jquery/i18n/jquery.ui/datepicker-fr.js +22 -22
  123. data/templates/jquery/i18n/jquery.ui/datepicker-gl.js +20 -20
  124. data/templates/jquery/i18n/jquery.ui/datepicker-he.js +20 -20
  125. data/templates/jquery/i18n/jquery.ui/datepicker-hr.js +20 -20
  126. data/templates/jquery/i18n/jquery.ui/datepicker-hu.js +20 -20
  127. data/templates/jquery/i18n/jquery.ui/datepicker-hu.min.js +1 -1
  128. data/templates/jquery/i18n/jquery.ui/datepicker-hy.js +20 -20
  129. data/templates/jquery/i18n/jquery.ui/datepicker-id.js +20 -20
  130. data/templates/jquery/i18n/jquery.ui/datepicker-is.js +20 -20
  131. data/templates/jquery/i18n/jquery.ui/datepicker-it.js +20 -20
  132. data/templates/jquery/i18n/jquery.ui/datepicker-ja.js +20 -20
  133. data/templates/jquery/i18n/jquery.ui/datepicker-ko.js +20 -20
  134. data/templates/jquery/i18n/jquery.ui/datepicker-kz.js +20 -20
  135. data/templates/jquery/i18n/jquery.ui/datepicker-lt.js +20 -20
  136. data/templates/jquery/i18n/jquery.ui/datepicker-lv.js +20 -20
  137. data/templates/jquery/i18n/jquery.ui/datepicker-ml.js +20 -20
  138. data/templates/jquery/i18n/jquery.ui/datepicker-ms.js +20 -20
  139. data/templates/jquery/i18n/jquery.ui/datepicker-nl.js +20 -20
  140. data/templates/jquery/i18n/jquery.ui/datepicker-no.js +16 -16
  141. data/templates/jquery/i18n/jquery.ui/datepicker-no.min.js +2 -2
  142. data/templates/jquery/i18n/jquery.ui/datepicker-pl.js +20 -20
  143. data/templates/jquery/i18n/jquery.ui/datepicker-pt-BR.js +20 -20
  144. data/templates/jquery/i18n/jquery.ui/datepicker-pt.js +20 -20
  145. data/templates/jquery/i18n/jquery.ui/datepicker-rm.js +18 -18
  146. data/templates/jquery/i18n/jquery.ui/datepicker-ro.js +20 -20
  147. data/templates/jquery/i18n/jquery.ui/datepicker-ru.js +20 -20
  148. data/templates/jquery/i18n/jquery.ui/datepicker-sk.js +20 -20
  149. data/templates/jquery/i18n/jquery.ui/datepicker-sl.js +20 -20
  150. data/templates/jquery/i18n/jquery.ui/datepicker-sq.js +20 -20
  151. data/templates/jquery/i18n/jquery.ui/datepicker-sr-SR.js +20 -20
  152. data/templates/jquery/i18n/jquery.ui/datepicker-sr.js +20 -20
  153. data/templates/jquery/i18n/jquery.ui/datepicker-sv.js +14 -14
  154. data/templates/jquery/i18n/jquery.ui/datepicker-ta.js +20 -20
  155. data/templates/jquery/i18n/jquery.ui/datepicker-th.js +20 -20
  156. data/templates/jquery/i18n/jquery.ui/datepicker-tr.js +20 -20
  157. data/templates/jquery/i18n/jquery.ui/datepicker-uk.js +20 -20
  158. data/templates/jquery/i18n/jquery.ui/datepicker-vi.js +20 -20
  159. data/templates/jquery/i18n/jquery.ui/datepicker-zh-CN.js +20 -20
  160. data/templates/jquery/i18n/jquery.ui/datepicker-zh-HK.js +20 -20
  161. data/templates/jquery/i18n/jquery.ui/datepicker-zh-TW.js +20 -20
  162. data/templates/jquery/{partials → jquery/ui}/_flash_messages.scss +0 -0
  163. data/templates/jquery/jquery/ui/_theme.scss +14 -13
  164. data/templates/jquery/jquery/ui/contextMenu/configure.png +0 -0
  165. data/templates/jquery/jquery/ui/contextMenu/copy.png +0 -0
  166. data/templates/jquery/jquery/ui/contextMenu/cut.png +0 -0
  167. data/templates/jquery/jquery/ui/contextMenu/delete.png +0 -0
  168. data/templates/jquery/jquery/ui/contextMenu/edit.png +0 -0
  169. data/templates/jquery/jquery/ui/contextMenu/exit.png +0 -0
  170. data/templates/jquery/jquery/ui/contextMenu/new.png +0 -0
  171. data/templates/jquery/jquery/ui/contextMenu/paste.png +0 -0
  172. data/templates/jquery/jquery/ui/contextMenu/rename.png +0 -0
  173. data/templates/jquery/jquery/ui/contextMenu/show.png +0 -0
  174. data/templates/jquery/jquery/ui/contextMenu/trash.png +0 -0
  175. data/templates/jquery/jquery/ui/contextMenu.scss +16 -10
  176. data/templates/jquery/jquery-ui.js +11839 -23066
  177. data/templates/jquery/jquery-ui.min.js +401 -795
  178. data/templates/jquery/jquery.bgiframe.js +27 -25
  179. data/templates/jquery/jquery.contextMenu.js +209 -196
  180. data/templates/jquery/jquery.cookie.js +3 -1
  181. data/templates/jquery/jquery.dotimeout.js +236 -228
  182. data/templates/jquery/jquery.dst.js +154 -151
  183. data/templates/jquery/jquery.farbtastic.js +293 -293
  184. data/templates/jquery/jquery.flashMessages.js +26 -0
  185. data/templates/jquery/jquery.flashMessages.min.js +1 -0
  186. data/templates/jquery/jquery.form.js +803 -786
  187. data/templates/jquery/jquery.haml.js +248 -247
  188. data/templates/jquery/jquery.hotkeys.js +89 -89
  189. data/templates/jquery/jquery.js +8141 -8106
  190. data/templates/jquery/jquery.layout.js +2451 -2415
  191. data/templates/jquery/jquery.min.js +167 -166
  192. data/templates/jquery/jquery.mousewheel.js +62 -54
  193. data/templates/jquery/jquery.offline.js +171 -171
  194. data/templates/jquery/jquery.pngFix.js +76 -76
  195. data/templates/jquery/jquery.replacetext.js +83 -83
  196. data/templates/jquery/jquery.themeswitchertool.js +202 -177
  197. data/templates/jquery/jquery.tmpl.js +478 -473
  198. data/templates/jquery/jquery.tmplPlus.js +82 -81
  199. data/templates/jquery/jrails.js +178 -175
  200. data/templates/jquery/json.js +77 -7
  201. data/templates/jquery/json2.js +480 -0
  202. data/templates/jquery/json2.min.js +7 -0
  203. data/templates/jquery/lib/tasks/haml.rake +2 -2
  204. data/templates/jquery/manifest.rb +21 -17
  205. data/templates/jstree/jquery.jstree.js +5967 -4536
  206. data/templates/mobile/config/initializers/mobile.rb +1 -1
  207. data/templates/mobile/jquery/mobile/_base.scss +944 -927
  208. data/templates/mobile/jquery/mobile/default.scss +61 -48
  209. data/templates/mobile/jquery/mobile/valencia.scss +56 -42
  210. data/templates/mobile/jquery.mobile.js +4461 -4347
  211. data/templates/mobile/jquery.mobile.min.js +11 -2
  212. data/templates/mobile/lib/tasks/jquery.mobile.rake +12 -12
  213. data/templates/ribbon/config/initializers/ribbon.rb +2 -2
  214. data/templates/ribbon/jquery.ribbon.js +50 -29
  215. data/templates/secret_sauce/secret_sauce.js +8 -8
  216. data/templates/tools/flowplayer.js +945 -1
  217. data/templates/tools/jquery.tools.js +4645 -4335
  218. data/templates/tools/jquery.tools.min.js +37 -37
  219. data/templates/tools/lib/tasks/jquery.tools.rake +4 -4
  220. data/templates/tools/swfobject.js +813 -773
  221. metadata +33 -21
  222. data/templates/jquery/haml.js +0 -506
  223. data/templates/jquery/haml.min.js +0 -5
  224. data/templates/jquery/jquery/ui/contextMenu/door.png +0 -0
  225. data/templates/jquery/jquery/ui/contextMenu/page_white_copy.png +0 -0
  226. data/templates/jquery/jquery/ui/contextMenu/page_white_delete.png +0 -0
  227. data/templates/jquery/jquery/ui/contextMenu/page_white_edit.png +0 -0
  228. data/templates/jquery/jquery/ui/contextMenu/page_white_new.png +0 -0
  229. data/templates/jquery/jquery/ui/contextMenu/page_white_paste.png +0 -0
  230. data/templates/jquery/jquery.compat-1.3.js +0 -291
  231. data/templates/jquery/jquery.compat-1.3.min.js +0 -6
  232. data/templates/jquery/jquery.flash_messages.js +0 -5
  233. data/templates/jquery/jquery.flash_messages.min.js +0 -1
  234. data/templates/jquery/jquery.history.js +0 -194
  235. data/templates/jquery/jquery.history.min.js +0 -5
@@ -2,41 +2,41 @@ require 'jquery/gridify/grid'
2
2
 
3
3
  module Gridify
4
4
 
5
- def self.included(base)
6
- base.extend(ClassMethods)
7
- end
5
+ def self.included(base)
6
+ base.extend(ClassMethods)
7
+ end
8
8
 
9
- module ClassMethods
10
- attr_accessor :grids
9
+ module ClassMethods
10
+ attr_accessor :grids
11
11
 
12
- def gridify(*args, &block)
13
- # debugger
14
- grid = Gridify::Grid.new( self, *args, &block)
15
- @grids ||= {}
16
- @grids[grid.name.to_sym] = grid
12
+ def gridify(*args, &block)
13
+ # debugger
14
+ grid = Gridify::Grid.new(self, *args, &block)
15
+ @grids ||= {}
16
+ @grids[grid.name.to_sym] = grid
17
17
 
18
- unless self.respond_to?(:find_for_grid)
19
- class_eval <<-EOV
18
+ unless self.respond_to?(:find_for_grid)
19
+ class_eval <<-EOV
20
20
  named_scope :find_for_grid, lambda {|name, params|
21
21
  grid = grids[name]
22
22
  grid.update_from_params( params )
23
23
  grid.current_scope
24
24
  }
25
- EOV
26
- end
27
- end
28
-
29
- def grids
30
- @grids || {}
31
- end
32
-
33
- def grid(name=nil)
34
- name ? grids[name] : grids[:grid]
35
- end
36
- end
25
+ EOV
26
+ end
27
+ end
28
+
29
+ def grids
30
+ @grids || {}
31
+ end
32
+
33
+ def grid(name=nil)
34
+ name ? grids[name] : grids[:grid]
35
+ end
36
+ end
37
37
  end
38
38
 
39
39
  class ActiveRecord::Base
40
- include Gridify
40
+ include Gridify
41
41
  end
42
42
 
@@ -1,5 +1,5 @@
1
1
  module Ical
2
- module Calendar
3
-
2
+ module Calendar
3
+
4
4
  end
5
5
  end
@@ -1,118 +1,122 @@
1
1
  module Ical
2
2
  module Event
3
-
3
+
4
4
  def ical_event
5
5
  @ical_event ||= RiCal.parse_string(ical_string || '').first || RiCal.Event
6
6
  end
7
-
7
+
8
8
  def starts_at
9
9
  @starts_at ||= ical_event.dtstart ? ical_event.dtstart.to_datetime : DateTime.now
10
10
  end
11
-
11
+
12
12
  def starts_at=(date_time)
13
13
  @start_time = @start_date = nil
14
14
  @starts_at = date_time
15
15
  end
16
-
16
+
17
17
  def start_date
18
18
  @start_date ||= I18n.l(Date.parse(starts_at.to_s))
19
19
  end
20
-
20
+
21
21
  def start_date=(string_date)
22
22
  if parsed = DateTime.parse("#{string_date} #{start_time}") rescue nil
23
23
  @starts_at = parsed
24
24
  end
25
25
  @start_date = string_date
26
26
  end
27
-
27
+
28
28
  def start_time
29
29
  @start_time ||= I18n.l(Time.parse(starts_at.to_s), :format => :time)
30
30
  end
31
-
31
+
32
32
  def start_time=(string_time)
33
33
  if parsed = DateTime.parse("#{start_date} #{string_time}") rescue nil
34
34
  @starts_at = parsed
35
35
  end
36
36
  @start_time = string_time
37
37
  end
38
-
38
+
39
39
  def ends_at
40
40
  @ends_at ||= ical_event.dtend ? ical_event.dtend.to_datetime : starts_at + 60.minutes
41
41
  end
42
-
42
+
43
43
  def ends_at=(date_time)
44
44
  @end_time = @end_date = nil
45
45
  @ends_at = date_time
46
46
  end
47
-
47
+
48
48
  def end_date
49
49
  @end_date ||= I18n.l(Date.parse(ends_at.to_s))
50
50
  end
51
-
51
+
52
52
  def end_date=(string_date)
53
53
  if parsed = DateTime.parse("#{string_date} #{end_time}") rescue nil
54
54
  @ends_at = parsed
55
55
  end
56
56
  @end_date = string_date
57
57
  end
58
-
58
+
59
59
  def end_time
60
60
  @end_time ||= I18n.l(Time.parse(ends_at.to_s), :format => :time)
61
61
  end
62
-
62
+
63
63
  def end_time=(string_time)
64
64
  if parsed = DateTime.parse("#{end_date} #{string_time}") rescue nil
65
65
  @ends_at = parsed
66
66
  end
67
67
  @end_time = string_time
68
68
  end
69
-
69
+
70
70
  def summary
71
71
  @summary ||= ical_event.summary
72
72
  end
73
+
73
74
  attr_writer :summary
74
-
75
+
75
76
  def location
76
77
  @location ||= ical_event.location
77
78
  end
78
- attr_writer :location
79
-
79
+
80
+ attr_writer :location
81
+
80
82
  def description
81
83
  @description ||= ical_event.description
82
84
  end
85
+
83
86
  attr_writer :description
84
-
87
+
85
88
  def all_day
86
89
  @all_day ||= ical_event.x_properties["X-MICROSOFT-CDO-ALLDAYEVENT"][0] ? 1 : 0
87
90
  end
91
+
88
92
  attr_writer :all_day
89
-
93
+
90
94
  private
91
- def serialize_ical_event
92
- ical_event.summary = summary
93
- ical_event.location = location
94
- ical_event.description = description
95
- ical_event.x_properties["X-MICROSOFT-CDO-ALLDAYEVENT"] = []
96
-
97
- if all_day == "1"
98
- ical_event.add_x_property("X-MICROSOFT-CDO-ALLDAYEVENT", "1")
99
- if starts_at <= ends_at
100
- ical_event.dtstart = DateTime.parse("#{start_date}T00:00")
101
- ical_event.dtend = DateTime.parse("#{end_date}T23:59")
102
- else
103
- ical_event.dtstart = DateTime.parse("#{start_date}T00:00")
104
- ical_event.dtend = ical_event.dtstart+1.day-1.minute
105
- end
95
+ def serialize_ical_event
96
+ ical_event.summary = summary
97
+ ical_event.location = location
98
+ ical_event.description = description
99
+ ical_event.x_properties["X-MICROSOFT-CDO-ALLDAYEVENT"] = []
100
+
101
+ if all_day == "1"
102
+ ical_event.add_x_property("X-MICROSOFT-CDO-ALLDAYEVENT", "1")
103
+ if starts_at <= ends_at
104
+ ical_event.dtstart = DateTime.parse("#{start_date}T00:00")
105
+ ical_event.dtend = DateTime.parse("#{end_date}T23:59")
106
106
  else
107
- if starts_at <= ends_at
108
- ical_event.dtstart = DateTime.parse("#{start_date}T#{start_time}")
109
- ical_event.dtend = DateTime.parse("#{end_date}T#{end_time}")
110
- else
111
- ical_event.dtstart = DateTime.parse("#{start_date}T#{start_time}")
112
- ical_event.dtend = ical_event.dtstart+1.hour
113
- end
107
+ ical_event.dtstart = DateTime.parse("#{start_date}T00:00")
108
+ ical_event.dtend = ical_event.dtstart+1.day-1.minute
114
109
  end
115
- self.ical_string = ical_event.to_s
116
- end
117
- end
110
+ else
111
+ if starts_at <= ends_at
112
+ ical_event.dtstart = DateTime.parse("#{start_date}T#{start_time}")
113
+ ical_event.dtend = DateTime.parse("#{end_date}T#{end_time}")
114
+ else
115
+ ical_event.dtstart = DateTime.parse("#{start_date}T#{start_time}")
116
+ ical_event.dtend = ical_event.dtstart+1.hour
117
+ end
118
+ end
119
+ self.ical_string = ical_event.to_s
120
+ end
121
+ end
118
122
  end
@@ -4,10 +4,10 @@ module Ical
4
4
  def ui_event_for(*args)
5
5
  domid = args.first
6
6
  options = args.extract_options!
7
- options[:url] = {} unless options[:url]
7
+ options[:url] = {} unless options[:url]
8
8
  options[:actions] = {} unless options[:actions]
9
- render(:file => 'shared/_ui_event_for.js.haml', :locals => { :domid => domid, :url => options[:url], :actions => options[:actions]})
9
+ render(:file => 'shared/_ui_event_for.js.haml', :locals => {:domid => domid, :url => options[:url], :actions => options[:actions]})
10
10
  end
11
- end
11
+ end
12
12
  end
13
13
  end
@@ -1,42 +1,42 @@
1
1
  module ActionView
2
2
  module Helpers
3
-
3
+
4
4
  def jqgrid_javascripts(locale)
5
- js = capture { javascript_include_tag "i18n/jqgrid/locale-#{locale}.min" }
6
- js << capture {javascript_tag "jQuery.jgrid.no_legacy_api = true;" }
5
+ js = capture { javascript_include_tag "i18n/jqgrid/locale-#{locale}.min" }
6
+ js << capture { javascript_tag "jQuery.jgrid.no_legacy_api = true;" }
7
7
  js << capture { javascript_include_tag 'jquery.jqGrid.min' }
8
8
  end
9
9
 
10
- def jqgrid(title, id, action, columns = {},
11
- options = {}, edit_options = "", add_options = "", del_options = "", search_options = "",
12
- custom1_button = nil, custom2_button = nil, custom3_button = nil, custom4_button = nil, custom5_button = nil )
13
-
10
+ def jqgrid(title, id, action, columns = {},
11
+ options = {}, edit_options = "", add_options = "", del_options = "", search_options = "",
12
+ custom1_button = nil, custom2_button = nil, custom3_button = nil, custom4_button = nil, custom5_button = nil)
13
+
14
14
  # Default options
15
- options =
16
- {
17
- :rows_per_page => '10',
18
- :sort_column => '',
19
- :sort_order => '',
20
- :height => '150',
21
- :gridview => 'false',
22
- :error_handler => 'null',
23
- :inline_edit_handler => 'null',
24
- :add => 'false',
25
- :delete => 'false',
26
- :search => 'true',
27
- :edit => 'false',
28
- :inline_edit => 'false',
29
- :autowidth => 'false',
30
- :hidegrid => 'false',
31
- :rownumbers => 'false'
32
- }.merge(options)
33
-
15
+ options =
16
+ {
17
+ :rows_per_page => '10',
18
+ :sort_column => '',
19
+ :sort_order => '',
20
+ :height => '150',
21
+ :gridview => 'false',
22
+ :error_handler => 'null',
23
+ :inline_edit_handler => 'null',
24
+ :add => 'false',
25
+ :delete => 'false',
26
+ :search => 'true',
27
+ :edit => 'false',
28
+ :inline_edit => 'false',
29
+ :autowidth => 'false',
30
+ :hidegrid => 'false',
31
+ :rownumbers => 'false'
32
+ }.merge(options)
33
+
34
34
  # Stringify options values
35
35
  options.inject({}) do |options, (key, value)|
36
36
  options[key] = (key != :subgrid) ? value.to_s : value
37
37
  options
38
38
  end
39
-
39
+
40
40
  options[:error_handler_return_value] = (options[:error_handler] == 'null') ? 'true;' : options[:error_handler]
41
41
  edit_button = (options[:edit] == 'true' && options[:inline_edit] == 'false').to_s
42
42
 
@@ -130,32 +130,32 @@ module ActionView
130
130
  }
131
131
  },/
132
132
  end
133
-
133
+
134
134
  # Enable subgrids
135
135
  subgrid = ""
136
136
  subgrid_enabled = "subGrid:false,"
137
137
 
138
138
  if options[:subgrid].present?
139
-
139
+
140
140
  subgrid_enabled = "subGrid:true,"
141
-
142
- options[:subgrid] =
143
- {
144
- :rows_per_page => '10',
145
- :sort_column => 'id',
146
- :sort_order => 'asc',
147
- :add => 'false',
148
- :edit => 'false',
149
- :delete => 'false',
150
- :search => 'false'
151
- }.merge(options[:subgrid])
141
+
142
+ options[:subgrid] =
143
+ {
144
+ :rows_per_page => '10',
145
+ :sort_column => 'id',
146
+ :sort_order => 'asc',
147
+ :add => 'false',
148
+ :edit => 'false',
149
+ :delete => 'false',
150
+ :search => 'false'
151
+ }.merge(options[:subgrid])
152
152
 
153
153
  # Stringify options values
154
154
  options[:subgrid].inject({}) do |suboptions, (key, value)|
155
155
  suboptions[key] = value.to_s
156
156
  suboptions
157
157
  end
158
-
158
+
159
159
  subgrid_inline_edit = ""
160
160
  if options[:subgrid][:inline_edit] == true
161
161
  options[:subgrid][:edit] = 'false'
@@ -169,7 +169,7 @@ module ActionView
169
169
  },
170
170
  /
171
171
  end
172
-
172
+
173
173
  if options[:subgrid][:direct_selection] && options[:subgrid][:selection_handler].present?
174
174
  subgrid_direct_link = %Q/
175
175
  onSelectRow: function(id){
@@ -178,10 +178,10 @@ module ActionView
178
178
  }
179
179
  },
180
180
  /
181
- end
182
-
181
+ end
182
+
183
183
  sub_col_names, sub_col_model = gen_columns(options[:subgrid][:columns])
184
-
184
+
185
185
  subgrid = %Q(
186
186
  subGridRowExpanded: function(subgrid_id, row_id) {
187
187
  var subgrid_table_id, pager_id;
@@ -201,7 +201,7 @@ module ActionView
201
201
  viewrecords: true,
202
202
  //toolbar : [true,"top"],
203
203
  #{subgrid_inline_edit}
204
- #{subgrid_direct_link}
204
+ #{subgrid_direct_link}
205
205
  height: '100%'
206
206
  });
207
207
  jQuery("#"+subgrid_table_id).jqGrid('navGrid', "#"+pager_id,{edit:#{options[:subgrid][:edit]},add:#{options[:subgrid][:add]},del:#{options[:subgrid][:delete]},search:false})
@@ -319,12 +319,12 @@ module ActionView
319
319
  // ajaxGridOptions :{},
320
320
  // direction : "ltr",
321
321
  #{multiselect}
322
- #{masterdetails}
323
- #{grid_loaded}
324
- #{direct_link}
325
- #{editable}
326
- #{subgrid_enabled}
327
- #{subgrid}
322
+ #{masterdetails}
323
+ #{grid_loaded}
324
+ #{direct_link}
325
+ #{editable}
326
+ #{subgrid_enabled}
327
+ #{subgrid}
328
328
  // toppager: false,
329
329
  // headertitles: false,
330
330
  // scrollTimeout: 40,
@@ -343,14 +343,14 @@ module ActionView
343
343
  {#{search_options}}
344
344
  );
345
345
  #{multihandler}
346
- #{selection_link}
346
+ #{selection_link}
347
347
  });
348
348
  </script>
349
349
  )
350
- end
350
+ end
351
351
 
352
352
  private
353
-
353
+
354
354
  def gen_columns(columns)
355
355
  # Generate columns data
356
356
  col_names = "[" # Labels
@@ -362,8 +362,8 @@ module ActionView
362
362
  col_names.chop! << "]"
363
363
  col_model.chop! << "]"
364
364
  [col_names, col_model]
365
- end
366
-
365
+ end
366
+
367
367
  # Generate a list of attributes for related column (align:'right', sortable:true, resizable:false, ...)
368
368
  def get_attributes(column)
369
369
  options = ","
@@ -407,7 +407,7 @@ module ActionView
407
407
  if couple[1].instance_of?(Fixnum) || couple[1] == 'true' || couple[1] == 'false' || couple[1] == true || couple[1] == false
408
408
  options << %Q/#{couple[0]}:#{couple[1]},/
409
409
  else
410
- options << %Q/#{couple[0]}:"#{couple[1]}",/
410
+ options << %Q/#{couple[0]}:"#{couple[1]}",/
411
411
  end
412
412
  end
413
413
  end