rsence-pre 2.3.0.26 → 3.0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +11 -1
  3. data/VERSION +1 -1
  4. data/client/AUTHORS.txt +63 -0
  5. data/client/MIT-LICENSE.txt +21 -0
  6. data/client/README.md +17 -0
  7. data/client/VERSION +1 -0
  8. data/{conf → client/conf}/client_pkg.yaml +1 -6
  9. data/{js → client/js}/chat/chat_panel/chat_panel.coffee +0 -0
  10. data/{js → client/js}/chat/speech_bubble/speech_bubble.coffee +0 -0
  11. data/{js → client/js}/chat/speech_bubble/themes/default/speech_bubble.css +0 -0
  12. data/{js → client/js}/chat/speech_bubble/themes/default/speech_bubble.html +0 -0
  13. data/{js → client/js}/chat/speech_bubble/themes/default/user_anon.png +0 -0
  14. data/{js → client/js}/comm/autosync/autosync.js +0 -0
  15. data/{js → client/js}/comm/comm.js +0 -0
  16. data/{js → client/js}/comm/jsloader/jsloader.js +0 -0
  17. data/{js → client/js}/comm/queue/queue.js +0 -0
  18. data/{js → client/js}/comm/session/session.js +0 -0
  19. data/{js → client/js}/comm/sessionwatcher/sessionwatcher.js +0 -0
  20. data/{js → client/js}/comm/transporter/transporter.js +0 -0
  21. data/{js → client/js}/comm/urlresponder/urlresponder.js +0 -0
  22. data/{js → client/js}/comm/values/values.js +0 -0
  23. data/{js → client/js}/controls/button/button.js +0 -0
  24. data/{js → client/js}/controls/button/themes/default/button.css +0 -0
  25. data/{js/controls/button/themes/bright → client/js/controls/button/themes/default}/button.html +0 -0
  26. data/{js → client/js}/controls/button/themes/default/button_parts1.png +0 -0
  27. data/{js → client/js}/controls/checkbox/checkbox.js +0 -0
  28. data/{js → client/js}/controls/checkbox/themes/default/checkbox.css +0 -0
  29. data/{js → client/js}/controls/checkbox/themes/default/checkbox.html +0 -0
  30. data/{js → client/js}/controls/checkbox/themes/default/checkbox_parts1.png +0 -0
  31. data/{js → client/js}/controls/dialogs/alert_sheet/alert_sheet.js +0 -0
  32. data/{js → client/js}/controls/dialogs/confirm_sheet/confirm_sheet.js +0 -0
  33. data/{js → client/js}/controls/dialogs/sheet/sheet.js +0 -0
  34. data/{js → client/js}/controls/dialogs/sheet/themes/default/sheet.css +0 -0
  35. data/{js → client/js}/controls/dialogs/sheet/themes/default/sheet.html +0 -0
  36. data/{js → client/js}/controls/dialogs/sheet/themes/default/sheet_bg.png +0 -0
  37. data/{js → client/js}/controls/dialogs/sheet/themes/default/sheet_dim.png +0 -0
  38. data/{js → client/js}/controls/dialogs/sheet/themes/default/sheet_parts1.png +0 -0
  39. data/{js → client/js}/controls/dialogs/sheet/themes/default/sheet_parts2.png +0 -0
  40. data/{js → client/js}/controls/dialogs/sheet/themes/default/sheet_warning.png +0 -0
  41. data/{js → client/js}/controls/imageview/imageview.js +0 -0
  42. data/{js → client/js}/controls/imageview/themes/default/blank.gif +0 -0
  43. data/{js → client/js}/controls/numerictextcontrol/numerictextcontrol.coffee +0 -0
  44. data/{js → client/js}/controls/onoffbutton/onoffbutton.coffee +0 -0
  45. data/{js → client/js}/controls/onoffbutton/themes/default/onoffbutton.css +0 -0
  46. data/{js → client/js}/controls/onoffbutton/themes/default/onoffbutton.html +0 -0
  47. data/{js → client/js}/controls/passwordcontrol/passwordcontrol.js +0 -0
  48. data/{js → client/js}/controls/passwordcontrol/themes/default/passwordcontrol.css +0 -0
  49. data/{js → client/js}/controls/passwordcontrol/themes/default/passwordcontrol.html +0 -0
  50. data/{js → client/js}/controls/progress/progressbar/progressbar.js +0 -0
  51. data/{js → client/js}/controls/progress/progressbar/themes/default/progressbar.css +0 -0
  52. data/{js → client/js}/controls/progress/progressbar/themes/default/progressbar.html +0 -0
  53. data/{js → client/js}/controls/progress/progressindicator/progressindicator.js +0 -0
  54. data/{js → client/js}/controls/radiobutton/radiobutton.js +0 -0
  55. data/{js → client/js}/controls/radiobutton/themes/default/radiobutton.css +0 -0
  56. data/{js → client/js}/controls/radiobutton/themes/default/radiobutton.html +0 -0
  57. data/{js → client/js}/controls/radiobutton/themes/default/radiobutton_parts1.png +0 -0
  58. data/client/js/controls/searchfield/searchfield.coffee +14 -0
  59. data/{js → client/js}/controls/searchfield/themes/default/searchfield.css +9 -0
  60. data/{js → client/js}/controls/searchfield/themes/default/searchfield.html +1 -2
  61. data/{js → client/js}/controls/searchfield/themes/default/searchfield_parts1.png +0 -0
  62. data/{js → client/js}/controls/sliders/slider/slider.js +0 -0
  63. data/{js → client/js}/controls/sliders/slider/themes/default/hslider_tracks.png +0 -0
  64. data/{js → client/js}/controls/sliders/slider/themes/default/slider.css +0 -0
  65. data/{js → client/js}/controls/sliders/slider/themes/default/slider.html +0 -0
  66. data/{js → client/js}/controls/sliders/slider/themes/default/slider_thumbs.png +0 -0
  67. data/{js → client/js}/controls/sliders/vslider/themes/default/vslider.css +0 -0
  68. data/{js → client/js}/controls/sliders/vslider/themes/default/vslider.html +0 -0
  69. data/{js → client/js}/controls/sliders/vslider/themes/default/vslider_tracks.png +0 -0
  70. data/{js → client/js}/controls/sliders/vslider/vslider.js +0 -0
  71. data/{js → client/js}/controls/stepper/stepper.js +0 -0
  72. data/{js → client/js}/controls/stepper/themes/default/stepper.css +0 -0
  73. data/{js → client/js}/controls/stepper/themes/default/stepper.html +0 -0
  74. data/{js → client/js}/controls/stepper/themes/default/stepper.png +0 -0
  75. data/{js → client/js}/controls/stringview/stringview.js +0 -0
  76. data/{js → client/js}/controls/stringview/themes/default/stringview.css +0 -0
  77. data/{js → client/js}/controls/stringview/themes/default/stringview.html +0 -0
  78. data/{js → client/js}/controls/tab/tab.js +0 -0
  79. data/{js → client/js}/controls/tab/themes/default/tab.css +0 -0
  80. data/{js → client/js}/controls/tab/themes/default/tab.html +0 -0
  81. data/{js → client/js}/controls/tab/themes/default/tab_bg_color.png +0 -0
  82. data/{js/controls/tab/themes/bright → client/js/controls/tab/themes/default}/tab_border_pattern.png +0 -0
  83. data/{js → client/js}/controls/tab/themes/default/tab_parts1.png +0 -0
  84. data/{js → client/js}/controls/textarea/textarea.js +0 -0
  85. data/{js → client/js}/controls/textarea/themes/default/textarea.css +0 -0
  86. data/{js → client/js}/controls/textarea/themes/default/textarea.html +0 -0
  87. data/{js → client/js}/controls/textcontrol/textcontrol.coffee +0 -0
  88. data/{js → client/js}/controls/textcontrol/themes/default/textcontrol.css +0 -0
  89. data/{js → client/js}/controls/textcontrol/themes/default/textcontrol.html +0 -0
  90. data/{js → client/js}/controls/textcontrol/themes/default/textcontrol_parts1.png +0 -0
  91. data/{js → client/js}/controls/textcontrol/themes/default/textcontrol_parts2.png +0 -0
  92. data/{js → client/js}/controls/textcontrol/themes/default/textcontrol_parts3.png +0 -0
  93. data/{js → client/js}/controls/uploader/themes/default/upload_progress.gif +0 -0
  94. data/{js → client/js}/controls/uploader/themes/default/uploader.css +0 -0
  95. data/{js → client/js}/controls/uploader/themes/default/uploader.html +0 -0
  96. data/{js → client/js}/controls/uploader/uploader.coffee +0 -0
  97. data/{js → client/js}/controls/validatorview/themes/default/validator.png +0 -0
  98. data/{js → client/js}/controls/validatorview/themes/default/validatorview.css +0 -0
  99. data/{js → client/js}/controls/validatorview/themes/default/validatorview.html +0 -0
  100. data/{js → client/js}/controls/validatorview/validatorview.js +0 -0
  101. data/{js → client/js}/controls/window/themes/default/window.css +0 -0
  102. data/{js → client/js}/controls/window/themes/default/window.html +0 -0
  103. data/{js → client/js}/controls/window/themes/default/window_bg_active.png +0 -0
  104. data/{js → client/js}/controls/window/themes/default/window_bg_inactive.png +0 -0
  105. data/{js → client/js}/controls/window/themes/default/window_buttons.png +0 -0
  106. data/{js → client/js}/controls/window/themes/default/window_parts1.png +0 -0
  107. data/{js → client/js}/controls/window/themes/default/window_parts2.png +0 -0
  108. data/{js → client/js}/controls/window/window.js +0 -0
  109. data/{js → client/js}/core/class/class.js +0 -0
  110. data/{js → client/js}/core/elem/elem.coffee +3 -3
  111. data/{js → client/js}/core/event/event.js +2 -2
  112. data/{js → client/js}/core/rsence_ns/rsence_ns.coffee +0 -0
  113. data/{js → client/js}/core/util/util_methods/util_methods.coffee +0 -0
  114. data/{js → client/js}/datetime/calendar/calendar.coffee +2 -0
  115. data/{js → client/js}/datetime/calendar/themes/default/calendar.css +8 -3
  116. data/{js → client/js}/datetime/calendar/themes/default/calendar.html +0 -0
  117. data/{js → client/js}/datetime/calendar/themes/default/calendar_arrows.png +0 -0
  118. data/{js → client/js}/datetime/calendar/themes/default/calendar_bg.png +0 -0
  119. data/{js → client/js}/datetime/calendar/themes/default/calendar_parts1.png +0 -0
  120. data/{js → client/js}/datetime/calendar/themes/default/calendar_parts2.png +0 -0
  121. data/{js → client/js}/datetime/calendar_pulldown/calendar_pulldown.coffee +11 -4
  122. data/{js → client/js}/datetime/calendar_pulldown/themes/default/calendar_pulldown.css +0 -0
  123. data/{js → client/js}/datetime/calendar_pulldown/themes/default/calendar_pulldown.html +0 -0
  124. data/{js → client/js}/datetime/calendar_pulldown/themes/default/calendar_pulldown.png +0 -0
  125. data/{js → client/js}/datetime/datepicker/datepicker.coffee +5 -0
  126. data/{js → client/js}/datetime/datetimepicker/datetimepicker.coffee +0 -0
  127. data/{js → client/js}/datetime/datetimepicker/datetimepicker.js +0 -0
  128. data/{js → client/js}/datetime/datetimevalue/datetimevalue.js +0 -0
  129. data/{js → client/js}/datetime/momentjs/momentjs.js +0 -0
  130. data/{js → client/js}/datetime/timepicker/timepicker.coffee +0 -0
  131. data/{js → client/js}/datetime/timesheet/themes/default/timesheet.css +0 -0
  132. data/{js → client/js}/datetime/timesheet/themes/default/timesheet.html +0 -0
  133. data/{js → client/js}/datetime/timesheet/timesheet.js +0 -0
  134. data/{js → client/js}/datetime/timesheet_item/themes/default/timesheet_item.css +0 -0
  135. data/{js → client/js}/datetime/timesheet_item/themes/default/timesheet_item.html +0 -0
  136. data/{js → client/js}/datetime/timesheet_item/themes/default/timesheet_item_icons.png +0 -0
  137. data/{js → client/js}/datetime/timesheet_item/timesheet_item.js +0 -0
  138. data/{js → client/js}/datetime/timesheet_item_edit/timesheet_item_edit.js +0 -0
  139. data/{js → client/js}/foundation/application/application.js +0 -0
  140. data/{js → client/js}/foundation/control/control.js +0 -0
  141. data/{js → client/js}/foundation/control/controldefaults/controldefaults.js +0 -0
  142. data/{js → client/js}/foundation/control/dummyvalue/dummyvalue.js +0 -0
  143. data/{js → client/js}/foundation/control/dyncontrol/dyncontrol.js +0 -0
  144. data/{js → client/js}/foundation/control/dyncontrol/themes/default/dyncontrol.css +0 -0
  145. data/{js → client/js}/foundation/control/dyncontrol/themes/default/dyncontrol.html +0 -0
  146. data/{js → client/js}/foundation/control/eventresponder/eventresponder.js +0 -36
  147. data/{js → client/js}/foundation/control/valueaction/valueaction.js +0 -0
  148. data/{js → client/js}/foundation/control/valuematrix/valuematrix.js +0 -0
  149. data/{js → client/js}/foundation/control/valueresponder/valueresponder.js +0 -0
  150. data/{js → client/js}/foundation/eventmanager/eventmanager.coffee +68 -84
  151. data/{js → client/js}/foundation/eventmanager/eventmanager.js +0 -0
  152. data/{js → client/js}/foundation/geom/point/point.js +0 -0
  153. data/{js → client/js}/foundation/geom/rect/rect.js +0 -0
  154. data/{js → client/js}/foundation/json_renderer/json_renderer.js +0 -0
  155. data/{js → client/js}/foundation/locale_settings/locale_settings.js +0 -0
  156. data/{js → client/js}/foundation/system/system.js +0 -0
  157. data/{js → client/js}/foundation/thememanager/thememanager.coffee +0 -0
  158. data/{js → client/js}/foundation/value/value.js +0 -0
  159. data/{js → client/js}/foundation/view/markupview/markupview.js +0 -0
  160. data/{js → client/js}/foundation/view/morphanimation/morphanimation.js +2 -0
  161. data/{js → client/js}/foundation/view/view.js +0 -0
  162. data/{js → client/js}/foundation/view/viewdefaults/viewdefaults.js +0 -0
  163. data/{js → client/js}/graphics/svgcontrol/svgcontrol.js +0 -0
  164. data/{js → client/js}/lists/checkboxlist/checkboxlist.js +0 -0
  165. data/{js → client/js}/lists/listitems/listitems.js +0 -0
  166. data/{js → client/js}/lists/propertylist/propertylist.js +0 -0
  167. data/{js → client/js}/lists/propertylist/propertylisteditor/propertylisteditor.js +0 -0
  168. data/{js → client/js}/lists/radiobuttonlist/radiobuttonlist.js +0 -0
  169. data/{js → client/js}/menus/menuitem/menuitem.js +0 -0
  170. data/{js → client/js}/menus/menuitem/themes/default/menuitem.css +0 -0
  171. data/{js → client/js}/menus/menuitem/themes/default/menuitem.html +0 -0
  172. data/{js → client/js}/menus/minimenu/minimenu.js +26 -11
  173. data/{js → client/js}/menus/minimenu/themes/default/minimenu.css +0 -0
  174. data/{js → client/js}/menus/minimenu/themes/default/minimenu.html +0 -0
  175. data/{js → client/js}/menus/minimenu/themes/default/minimenu.png +0 -0
  176. data/{js → client/js}/menus/minimenuitem/minimenuitem.js +0 -9
  177. data/{js → client/js}/menus/minimenuitem/themes/default/minimenuitem.css +0 -0
  178. data/{js → client/js}/menus/minimenuitem/themes/default/minimenuitem.html +0 -0
  179. data/{js → client/js}/menus/minimenuitem/themes/default/minimenuitem_checkmark.png +0 -0
  180. data/{js → client/js}/menus/popupmenu/popupmenu.js +0 -0
  181. data/{js → client/js}/menus/popupmenu/themes/default/popupmenu.css +0 -0
  182. data/{js → client/js}/menus/popupmenu/themes/default/popupmenu.html +0 -0
  183. data/{js → client/js}/menus/popupmenu/themes/default/popupmenu.png +0 -0
  184. data/{js → client/js}/no_pkg/no_pkg.js +0 -0
  185. data/{js → client/js}/tables/table/table.coffee +0 -0
  186. data/{js → client/js}/tables/table/themes/default/table.css +0 -0
  187. data/{js → client/js}/tables/table/themes/default/table.html +0 -0
  188. data/{js → client/js}/util/reloadapp/reloadapp.js +0 -0
  189. data/{js → client/js}/util/reloadapp/themes/default/reloadapp_warning.png +0 -0
  190. data/{js → client/js}/util/sha/sha.js +0 -0
  191. data/{js → client/js}/views/centerview/centerview.js +0 -0
  192. data/{js → client/js}/views/inlineview/inlineview.js +0 -0
  193. data/{js → client/js}/views/scrollview/scrollview.js +0 -0
  194. data/lib/rsence/default_config.rb +2 -2
  195. metadata +193 -197
  196. data/js/controls/button/themes/bright/button.css +0 -89
  197. data/js/controls/button/themes/bright/button_parts1.png +0 -0
  198. data/js/controls/button/themes/default/button.html +0 -7
  199. data/js/controls/searchfield/searchfield.coffee +0 -2
  200. data/js/controls/tab/themes/bright/tab.css +0 -76
  201. data/js/controls/tab/themes/bright/tab.html +0 -6
  202. data/js/controls/tab/themes/bright/tab_bg_color.png +0 -0
  203. data/js/controls/tab/themes/bright/tab_parts1.png +0 -0
  204. data/js/controls/tab/themes/default/tab_border_pattern.png +0 -0
@@ -5,6 +5,8 @@ HDatePicker = HTextControl.extend
5
5
  preserveTime: true
6
6
  preserveDate: false
7
7
  calendarPicker: false
8
+ calendarHorizontalAlign: 'right'
9
+ calendarVerticalAlign: 'top'
8
10
  valueToField: (_value)->
9
11
  _date = moment.unix(_value).utc()
10
12
  @_datePreserve = [ _date.year(), _date.month(), _date.date() ] if @options.preserveDate
@@ -52,6 +54,9 @@ HDatePicker = HTextControl.extend
52
54
  ).new( [null,0,24,24,1,null], @,
53
55
  value: @value
54
56
  valueObj: @valueObj
57
+ todayStart: @options.todayStart
58
+ calendarHorizontalAlign: @options.calendarHorizontalAlign
59
+ calendarVerticalAlign: @options.calendarVerticalAlign
55
60
  preserveTime: @options.preserveTime
56
61
  style:
57
62
  borderLeft: '1px dotted #666'
File without changes
File without changes
File without changes
@@ -741,42 +741,6 @@ HEventResponder = HClass.extend({
741
741
  *
742
742
  **/
743
743
  textEnter: function() {},
744
-
745
- /** -- DON'T TOUCH _mouseOver, IT IS A LOW-LEVEL HANDLER, use focus() instead ++ **/
746
- _mouseOver: function(e) {
747
- if (!Event.element) {
748
- return;
749
- }
750
- var _that = Event.element(e);
751
- while(_that && _that.ctrl === undefined) {
752
- _that = _that.parentNode;
753
- }
754
- if (!_that) {
755
- return;
756
- }
757
- var _this = _that.ctrl;
758
-
759
- EVENT.focus(_this);
760
- Event.stop(e);
761
- },
762
-
763
- /** -- DON'T TOUCH _mouseOut, IT IS A LOW-LEVEL HANDLER, use blur() instead ++ **/
764
- _mouseOut: function(e) {
765
- if (!Event.element) {
766
- return;
767
- }
768
- var _that = Event.element(e);
769
- while(_that && _that.ctrl === undefined) {
770
- _that = _that.parentNode;
771
- }
772
- if (!_that) {
773
- return;
774
- }
775
- var _this = _that.owner;
776
-
777
- EVENT.blur(_this);
778
- Event.stop(e);
779
- },
780
744
 
781
745
  /** Selection handling; currently under construction
782
746
  **/
@@ -301,7 +301,6 @@ EventManagerApp = HApplication.extend
301
301
  @observe( window, 'resize', 'resize' )
302
302
  @observe( window, 'blur', '_domWindowBlur' )
303
303
  @observe( window, 'focus', '_domWindowFocus' )
304
- # @_legacyStart()
305
304
  #
306
305
  # Stops EventManager
307
306
  stop: ->
@@ -321,56 +320,6 @@ EventManagerApp = HApplication.extend
321
320
  @stopObserving( window, 'blur', '_domWindowBlur' )
322
321
  @stopObserving( window, 'focus', '_domWindowFocus' )
323
322
  #
324
- ## LEGACY; to be removed
325
- #
326
- # Set to false, if your app don't need drop events.
327
- # Setting this to false, when not needed, improves over-all performance,
328
- # because the drop events need constant calculation of where the mouse
329
- # curser (or last touch) was against all possible drop targets.
330
- enableDroppableChecks: true
331
- #
332
- # Initializes the members used by the drop-related events.
333
- # This method is called from within the EventMangaer and is never called,
334
- # if @enableDroppableChecks is false
335
- # startDroppable: ->
336
- # @warn "EventManager#startDroppable is deprecated"
337
- # @hovered = [] # Drop-eligible items under the mouse cursor
338
- # @hoverInterval = 200 # Milliseconds between checks
339
- # @hoverTimer = new Date().getTime() # Time since last check was triggered
340
- #
341
- # Legacy startup, semi-compatible
342
- # _legacyStart: ->
343
- # @warn "EventManager#"+'_'+"legacyStart is deprecated"
344
- # @listeners = [] # NOT SUPPORTED
345
- # @focused = @_listeners.focused # DEPRECATED
346
- # @resizeListeners = @_listeners.byEvent.resize # DEPRECATED
347
- # @eventOptions = @_listeners.byId # DEPRECATED
348
- # @dragItems = @_listeners.dragged # DEPRECATED
349
- # @topmostDroppable = null # NOT SUPPORTED
350
- # @textEnterCtrls = @_listeners.byEvent.textEnter # DEPRECATED
351
- # @_coordCache = [] # NOT SUPPORTED
352
- # @_coordCacheFlag = true # NOT SUPPORTED
353
- # @_lastCoordFlushTimeout = null # NOT SUPPORTED
354
- # @activeControl = null # NOT SUPPORTED
355
- # @_lastKeyDown = null # NOT SUPPORTED
356
- # @_origDroppableChecks = @enableDroppablechecks # DEPRECATED
357
- # @startDroppable() if @enableDroppableChecks # DEPRECATED
358
- #
359
- # Flushes the position cache by elemId. If no elemId is specified,
360
- # everything is flushed.
361
- coordCacheFlush: (_elemId)->
362
- @warn "EventManager#coordCacheFlush is deprecated"
363
- if _elemId
364
- @_coordCache[_elemId] = null
365
- else
366
- @_coordCache = []
367
- #
368
- # Flushed mouseMove timers, actually did more or less all the mouseMove work:
369
- flushMouseMove: (x,y)->
370
- @warn( "EventManager#flushMouseMove => Unsupported call, don't call it!", _ctrl )
371
- return false
372
- ## /LEGACY
373
- #
374
323
  # Ensures the type of the object is a HControl
375
324
  _ensureValidControl: (_ctrl,_warnMethodName)->
376
325
  _warnMethodName = '[unknown]' unless _warnMethodName
@@ -414,7 +363,6 @@ EventManagerApp = HApplication.extend
414
363
  if _ctrl.enabled
415
364
  @_listeners.enabled.unshift( _viewId ) unless ~@_listeners.enabled.indexOf(_viewId)
416
365
  _elem = ELEM.get( _ctrl.elemId )
417
- @observe( _elem, 'mouseover', '_mouseOver' )
418
366
  [ x, y ] = @status.crsr
419
367
  _matchIds = @_findTopmostEnabled( HPoint.new( x, y ), 'contains', null )
420
368
  if ~_matchIds.indexOf( _viewId )
@@ -449,12 +397,9 @@ EventManagerApp = HApplication.extend
449
397
  else if _statusItem == 'active'
450
398
  _ctrl._lostActiveStatus( null )
451
399
  else if _statusItem == 'focused'
452
- # _ctrl._mouseOut()
453
- @stopObserving( _elem, 'mouseout', '_mouseOut' )
400
+ @blur( _ctrl )
454
401
  _wasFocused = true
455
402
  else if _statusItem == 'enabled'
456
- unless _wasFocused
457
- @stopObserving( _elem, 'mouseover', '_mouseOver' )
458
403
  _ctrl.setEnabled( false ) if _ctrl.enabled
459
404
  _viewIdx = @_listeners[_statusItem].indexOf(_viewId)
460
405
  if ~_viewIdx
@@ -503,12 +448,9 @@ EventManagerApp = HApplication.extend
503
448
  for _viewId in @_listeners.byEvent.resize
504
449
  _ctrl = @_views[_viewId]
505
450
  _ctrl.resize() if _ctrl.resize?
506
- ## Deprecate this:
507
- if _ctrl.onResize?
508
- @warn( "EventManager#resize => The 'onResize' event responder is deprecated. Please rename it to 'resize'." )
509
- _ctrl.onResize()
510
- ## /Deprecate
511
- HSystem._updateFlexibleRects()
451
+ setTimeout(->
452
+ HSystem._updateFlexibleRects()
453
+ , 100 )
512
454
  #
513
455
  # Finds the next elem with a view_id attribute
514
456
  _findViewId: (_elem)->
@@ -538,26 +480,12 @@ EventManagerApp = HApplication.extend
538
480
  Event.stop(e) if _stop
539
481
  return _ctrl
540
482
  #
541
- # Enables focused state of enabled HControls by listening to the
542
- # view-element-specific mouseover event.
543
- _mouseOver: (e)->
544
- _ctrl = @_findEventControl(e, '_'+'mouseOver')
545
- @focus(_ctrl) if _ctrl
546
- #
547
- # Disables focused state of enabled HControls by listening to the
548
- # view-element-specific mouseout event.
549
- _mouseOut: (e)->
550
- _ctrl = @_findEventControl(e, '_'+'mouseOut')
551
- @blur(_ctrl) if _ctrl
552
- #
553
483
  # Focuses a control, triggered based on the view-element-specific
554
484
  # mouseover event.
555
485
  focus: (_ctrl)->
556
486
  _viewId = _ctrl.viewId
557
487
  unless ~@_listeners.focused.indexOf(_viewId)
558
488
  _elem = ELEM.get( _ctrl.elemId )
559
- @observe( _elem, 'mouseout', '_mouseOut' )
560
- @stopObserving( _elem, 'mouseover', '_mouseOver' )
561
489
  @_listeners.focused.unshift(_viewId)
562
490
  unless _ctrl.focus?
563
491
  @warn( "EventManager#focus => The viewId:#{_viewId} doesn't have a 'focus' method.")
@@ -571,17 +499,52 @@ EventManagerApp = HApplication.extend
571
499
  _viewIdx = @_listeners.focused.indexOf(_viewId)
572
500
  if ~_viewIdx
573
501
  _elem = ELEM.get( _ctrl.elemId )
574
- @observe( _elem, 'mouseover', '_mouseOver' )
575
- @stopObserving( _elem, 'mouseout', '_mouseOut' )
576
502
  @_listeners.focused.splice(_viewIdx,1)
577
503
  unless _ctrl.blur?
578
504
  @warn( "EventManager#blur => The viewId:#{_viewId} doesn't have a 'blur' method.")
579
505
  return false
580
- ## Should probably perform additional de-registration on active events
581
- ## dependant on focus here.
582
- ##
583
- ##
584
506
  _ctrl.blur()
507
+
508
+ _debugHighlight: (_ctrl)->
509
+ unless @isProduction
510
+ unless @_debugHighlightT?
511
+ @_debugHighlightT = ELEM.make(0,'div')
512
+ @_debugHighlightR = ELEM.make(0,'div')
513
+ @_debugHighlightB = ELEM.make(0,'div')
514
+ @_debugHighlightL = ELEM.make(0,'div')
515
+ for _elemId in [
516
+ @_debugHighlightT, @_debugHighlightL,
517
+ @_debugHighlightB, @_debugHighlightR ]
518
+ ELEM.setStyles( _elemId,
519
+ position: 'absolute'
520
+ left: 0
521
+ top: 0
522
+ width: 0
523
+ height: 0
524
+ background: 'red'
525
+ zIndex: 20000
526
+ )
527
+ for _elemId in [ @_debugHighlightT, @_debugHighlightB ]
528
+ ELEM.setStyle( _elemId, 'height', '1px' )
529
+ for _elemId in [ @_debugHighlightL, @_debugHighlightR ]
530
+ ELEM.setStyle( _elemId, 'width', '1px' )
531
+ _rect = _ctrl.rect
532
+ x = _ctrl.pageX()
533
+ y = _ctrl.pageY()
534
+ w = _rect.width
535
+ h = _rect.height
536
+ for _elemId in [ @_debugHighlightT, @_debugHighlightL ]
537
+ ELEM.setStyle( _elemId, 'left', x+'px' )
538
+ ELEM.setStyle( _elemId, 'top', y+'px' )
539
+ for _elemId in [ @_debugHighlightT, @_debugHighlightB ]
540
+ ELEM.setStyle( _elemId, 'width', w+'px' )
541
+ for _elemId in [ @_debugHighlightL, @_debugHighlightR ]
542
+ ELEM.setStyle( _elemId, 'height', h+'px' )
543
+ ELEM.setStyle( @_debugHighlightB, 'top', (y+h)+'px' )
544
+ ELEM.setStyle( @_debugHighlightB, 'left', x+'px' )
545
+ ELEM.setStyle( @_debugHighlightR, 'top', y+'px' )
546
+ ELEM.setStyle( @_debugHighlightR, 'left', (x+w)+'px' )
547
+
585
548
  #
586
549
  # Mouse movement manager. Triggered by the global mousemove event.
587
550
  # Delegates the following event responder methods to focused HControl instances:
@@ -594,8 +557,30 @@ EventManagerApp = HApplication.extend
594
557
  [ x, y ] = @status.crsr
595
558
  Event.stop(e) if @_handleMouseMove( x, y )
596
559
  #
560
+ # Finds new focusable components after the
561
+ # mouse has been moved (replacement of mouseover/mouseout)
562
+ _findNewFocus: (x,y)->
563
+ _dragged = @_listeners.dragged
564
+ if _dragged.length != 0
565
+ console.log('dragged:',_dragged)
566
+ return
567
+ _matchIds = @_findTopmostEnabled( HPoint.new( x, y ), 'contains', null )
568
+ _focused = @_listeners.focused
569
+ if _matchIds.length == 0
570
+ for _focusId in _focused
571
+ @blur( @_views[_focusId] )
572
+ for _viewId in _matchIds
573
+ continue if ~_focused.indexOf(_viewId)
574
+ _ctrl = @_views[_viewId]
575
+ @_debugHighlight(_ctrl)
576
+ for _focusId in _focused
577
+ @blur( @_views[_focusId] )
578
+ _focused.splice( _focused.indexOf(_focusId), 1 )
579
+ @focus( _ctrl )
580
+ #
597
581
  # Just split to gain namespace:
598
582
  _handleMouseMove: ( x, y )->
583
+ @_findNewFocus(x,y)
599
584
  @_delegateMouseMove(x,y)
600
585
  _currentlyDragging = @_delegateDrag(x,y)
601
586
  return _currentlyDragging
@@ -683,7 +668,7 @@ EventManagerApp = HApplication.extend
683
668
  else
684
669
  _searchArea = _area
685
670
  if _view.hasAncestor? and _view.hasAncestor( HView )
686
- if _view.rect[_matchMethod](_searchArea)
671
+ if _view.rect[_matchMethod](_searchArea) and !_view.isHidden
687
672
  if ~_arrOfIds.indexOf( _viewId )
688
673
  _foundId = _search( _view.viewsZOrder.slice().reverse() )
689
674
  return _foundId if _foundId
@@ -872,7 +857,6 @@ EventManagerApp = HApplication.extend
872
857
  @_listeners.dragged = []
873
858
  @_cancelTextSelection() unless _endDragIds.length == 0 and _mouseUpIds.length == 0
874
859
  Event.stop(e) if _stop
875
- ## /jatka
876
860
  #
877
861
  # Handles mouse button clicks
878
862
  # It's different from mouseUp/mouseDown, because it's a different event,
File without changes
File without changes
File without changes
File without changes
@@ -247,6 +247,7 @@ HMorphAnimation = HClass.extend({
247
247
  if(typeof this.endAnimation == 'function'){
248
248
  this.endAnimation();
249
249
  }
250
+ HSystem._updateFlexibleRects();
250
251
  },
251
252
 
252
253
  /** Extend this method if functionality is desired upon cancellation of animation.
@@ -255,5 +256,6 @@ HMorphAnimation = HClass.extend({
255
256
  if(typeof this.cancelAnimation == 'function'){
256
257
  this.cancelAnimation();
257
258
  }
259
+ HSystem._updateFlexibleRects();
258
260
  }
259
261
  });
File without changes
File without changes
File without changes
File without changes
@@ -22,17 +22,17 @@ HMiniMenu = HRadioButtonList.extend({
22
22
  },
23
23
 
24
24
  repositionMenuItems: function(){
25
- if(!this.listItems || (this.listItems && !this.listItems.length)){ return; }
26
25
  var
27
26
  x = this.pageX(),
28
27
  y = this.pageY(),
29
28
  w = this.rect.width,
30
- h = this.listItems.length*this.subComponentHeight,
29
+ _listItems = this.listItems ? (this.listItems.length ? this.listItems : [] ) : [],
30
+ h = _listItems.length*this.subComponentHeight,
31
31
  i = 0,
32
32
  listItem = null;
33
- for(;i<this.listItems.length && listItem === null;i++){
34
- if(this.listItems[i][0]===this.value){
35
- listItem = this.listItems[i];
33
+ for(;i<_listItems.length && listItem === null;i++){
34
+ if(_listItems[i][0]===this.value){
35
+ listItem = _listItems[i];
36
36
  }
37
37
  }
38
38
  y -= (i-1)*this.subComponentHeight;
@@ -47,13 +47,24 @@ HMiniMenu = HRadioButtonList.extend({
47
47
  x += this.options.menuItemGeom.left;
48
48
  }
49
49
  }
50
- this.menuItemView.rect.set( x, y, x+w, y+h );
50
+ var
51
+ mw = x+w,
52
+ mh = y+h;
53
+ this._menuItemViewShowPos = [ x, y ];
54
+ this._menuItemViewHidePos = [ 0-mw, 0-mh ];
55
+ this.menuItemView.rect.set( x, y, mw, mh );
56
+ this.menuItemView.offsetTo( 0-mw, 0-mh );
51
57
  this.menuItemView.refresh();
58
+ this.menuItemView.hide();
52
59
  },
53
60
 
54
61
  click: function(){
55
62
  if(!this.active){return false;}
56
- this.menuShow();
63
+ if( ELEM.getStyle(this.menuItemView.elemId,'visibility',true) === 'hidden' ) {
64
+ this.menuShow();
65
+ }else{
66
+ this.menuHide();
67
+ }
57
68
  return false;
58
69
  },
59
70
 
@@ -71,6 +82,8 @@ HMiniMenu = HRadioButtonList.extend({
71
82
 
72
83
  menuShow: function(){
73
84
  this.repositionMenuItems();
85
+ var m = this._menuItemViewShowPos, x=m[0], y=m[1];
86
+ this.menuItemView.offsetTo( x, y );
74
87
  this.menuItemView.bringToFront();
75
88
  this.menuItemView.show();
76
89
  return true;
@@ -78,9 +91,10 @@ HMiniMenu = HRadioButtonList.extend({
78
91
 
79
92
  menuHide: function(){
80
93
  if( this.menuItemView ){
94
+ var m = this._menuItemViewHidePos, x=m[0], y=m[1];
95
+ this.menuItemView.offsetTo( x, y );
81
96
  this.menuItemView.sendToBack();
82
97
  this.menuItemView.hide();
83
- this.menuItemView.offsetTo(0-this.menuItemView.rect.width,0-this.menuItemView.rect.height);
84
98
  }
85
99
  },
86
100
 
@@ -101,7 +115,6 @@ HMiniMenu = HRadioButtonList.extend({
101
115
  gainedActiveStatus: function(_prevActive){
102
116
  if( _prevActive && _prevActive.isChildOf( this.menuItemView ) ){
103
117
  this.menuHide();
104
- // EVENT.changeActiveControl(null);
105
118
  }
106
119
  this.base(_prevActive);
107
120
  },
@@ -133,13 +146,15 @@ HMiniMenu = HRadioButtonList.extend({
133
146
  'background-color': '#f6f6f6',
134
147
  'border': '1px solid #999',
135
148
  'overflow': 'auto',
136
- 'overflow-x': 'hidden'
149
+ 'overflow-x': 'hidden',
150
+ 'display': 'none'
137
151
  };
138
152
  if(!BROWSER_TYPE.ie){
139
153
  itemStyle.opacity = 0.9;
140
154
  }
141
155
  this.menuItemView = HView.nu(
142
- [ this.rect.left, this.rect.top, this.rect.width, 10 ],
156
+ // [ this.rect.left, this.rect.top, this.rect.width, 10 ],
157
+ [ 0-this.rect.width, 0-this.rect.height, this.rect.width, 10 ],
143
158
  this.app, {
144
159
  visible: false,
145
160
  style: itemStyle,
@@ -12,16 +12,8 @@ HMiniMenuItem = HRadioButton.extend({
12
12
  mouseUp: true,
13
13
  mouseDown: true
14
14
  },
15
-
16
- _activateParentParent: function(){
17
- var _parentParent = this.parent.options.logicParent;
18
- EVENT.changeActiveControl(_parentParent);
19
- // EVENT.changeActiveControl(null);
20
- // EVENT.blur( _this );
21
- },
22
15
 
23
16
  gainedActiveStatus: function( _prevActive ){
24
- // console.log('menuitem gained active status',_prevActive === this.parent.options.logicParent);
25
17
  this.base( _prevActive );
26
18
  },
27
19
 
@@ -37,7 +29,6 @@ HMiniMenuItem = HRadioButton.extend({
37
29
  this.base();
38
30
  this._parentLastActivation = _now;
39
31
  EVENT.changeActiveControl(null);
40
- // this._activateParentParent();
41
32
  }
42
33
  return true;
43
34
  },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -119,12 +119,12 @@ module RSence
119
119
  end
120
120
 
121
121
  # Load client packaging configuration:
122
- client_pkg_conf = File.join(SERVER_PATH,'conf','client_pkg.yaml')
122
+ client_pkg_conf = File.join(SERVER_PATH,'client','conf','client_pkg.yaml')
123
123
  config[:client_pkg] = YAML.load( File.read( client_pkg_conf ) )
124
124
 
125
125
  # Makes the distribution 'js' directory containing the client core the
126
126
  # first client package source directory.
127
- config[:client_pkg][:src_dirs].unshift( File.join( SERVER_PATH, 'js' ) )
127
+ config[:client_pkg][:src_dirs].unshift( File.join( SERVER_PATH, 'client', 'js' ) )
128
128
 
129
129
  # At this point, configuration files are read and ready.
130
130