glimmer-dsl-opal 0.5.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +46 -0
  3. data/README.md +390 -29
  4. data/VERSION +1 -1
  5. data/app/assets/images/glimmer/images/calendar.gif +0 -0
  6. data/app/assets/images/glimmer/images/ui-icons_222222_256x240.png +0 -0
  7. data/app/assets/images/glimmer/images/ui-icons_444444_256x240.png +0 -0
  8. data/app/assets/images/glimmer/images/ui-icons_555555_256x240.png +0 -0
  9. data/app/assets/images/glimmer/images/ui-icons_777620_256x240.png +0 -0
  10. data/app/assets/images/glimmer/images/ui-icons_777777_256x240.png +0 -0
  11. data/app/assets/images/glimmer/images/ui-icons_cc0000_256x240.png +0 -0
  12. data/app/assets/images/glimmer/images/ui-icons_ffffff_256x240.png +0 -0
  13. data/app/assets/stylesheets/glimmer/glimmer.css +15 -0
  14. data/app/assets/stylesheets/glimmer/jquery-ui.css +1312 -0
  15. data/app/assets/stylesheets/glimmer/jquery-ui.structure.css +886 -0
  16. data/app/assets/stylesheets/glimmer/jquery-ui.theme.css +443 -0
  17. data/app/assets/stylesheets/glimmer/jquery.ui.timepicker.css +57 -0
  18. data/lib/glimmer-dsl-opal.rb +73 -8
  19. data/lib/glimmer-dsl-opal/ext/date.rb +49 -3
  20. data/lib/glimmer-dsl-opal/samples/elaborate/tic_tac_toe.rb +23 -0
  21. data/lib/glimmer-dsl-opal/samples/hello/hello_combo.rb +5 -5
  22. data/lib/glimmer-dsl-opal/samples/hello/hello_date_time.rb +63 -0
  23. data/lib/glimmer-dsl-opal/samples/hello/hello_list_single_selection.rb +1 -1
  24. data/lib/glimmer-dsl-opal/samples/hello/hello_table.rb +283 -0
  25. data/lib/glimmer-dsl-opal/vendor/jquery-ui-timepicker/GPL-LICENSE.txt +278 -0
  26. data/lib/glimmer-dsl-opal/vendor/jquery-ui-timepicker/MIT-LICENSE.txt +20 -0
  27. data/lib/glimmer-dsl-opal/vendor/jquery-ui-timepicker/jquery.ui.timepicker.css +57 -0
  28. data/lib/glimmer-dsl-opal/vendor/jquery-ui-timepicker/jquery.ui.timepicker.js +1496 -0
  29. data/lib/glimmer-dsl-opal/vendor/jquery-ui/AUTHORS.txt +333 -0
  30. data/lib/glimmer-dsl-opal/vendor/jquery-ui/LICENSE.txt +43 -0
  31. data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_444444_256x240.png +0 -0
  32. data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_555555_256x240.png +0 -0
  33. data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_777620_256x240.png +0 -0
  34. data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_777777_256x240.png +0 -0
  35. data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_cc0000_256x240.png +0 -0
  36. data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_ffffff_256x240.png +0 -0
  37. data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.min.css +7 -0
  38. data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.min.js +13 -0
  39. data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.structure.min.css +5 -0
  40. data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.theme.min.css +5 -0
  41. data/lib/glimmer-dsl-opal/vendor/jquery-ui/package.json +74 -0
  42. data/lib/glimmer-dsl-swt.rb +20 -35
  43. data/lib/glimmer/data_binding/table_items_binding.rb +31 -18
  44. data/lib/glimmer/dsl/opal/block_property_expression.rb +41 -0
  45. data/lib/glimmer/dsl/opal/custom_widget_expression.rb +1 -1
  46. data/lib/glimmer/dsl/opal/dsl.rb +2 -0
  47. data/lib/glimmer/dsl/opal/shell_expression.rb +7 -2
  48. data/lib/glimmer/dsl/opal/widget_expression.rb +10 -1
  49. data/lib/glimmer/engine.rb +9 -0
  50. data/lib/glimmer/swt.rb +3 -3
  51. data/lib/glimmer/swt/button_proxy.rb +5 -5
  52. data/lib/glimmer/swt/checkbox_proxy.rb +1 -0
  53. data/lib/glimmer/swt/color_proxy.rb +45 -45
  54. data/lib/glimmer/swt/combo_proxy.rb +2 -2
  55. data/lib/glimmer/swt/composite_proxy.rb +7 -3
  56. data/lib/glimmer/swt/control_editor.rb +53 -0
  57. data/lib/glimmer/swt/date_time_proxy.rb +145 -0
  58. data/lib/glimmer/swt/display_proxy.rb +6 -2
  59. data/lib/glimmer/swt/fill_layout_proxy.rb +1 -1
  60. data/lib/glimmer/swt/label_proxy.rb +2 -2
  61. data/lib/glimmer/swt/layout_data_proxy.rb +8 -8
  62. data/lib/glimmer/swt/layout_proxy.rb +5 -5
  63. data/lib/glimmer/swt/list_proxy.rb +2 -2
  64. data/lib/glimmer/swt/make_shift_shell_proxy.rb +4 -4
  65. data/lib/glimmer/swt/message_box_proxy.rb +10 -8
  66. data/lib/glimmer/swt/property_owner.rb +2 -2
  67. data/lib/glimmer/swt/radio_proxy.rb +1 -0
  68. data/lib/glimmer/swt/row_layout_proxy.rb +1 -1
  69. data/lib/glimmer/swt/shell_proxy.rb +8 -0
  70. data/lib/glimmer/swt/tab_folder_proxy.rb +5 -5
  71. data/lib/glimmer/swt/tab_item_proxy.rb +7 -7
  72. data/lib/glimmer/swt/table_column_proxy.rb +71 -12
  73. data/lib/glimmer/swt/table_editor.rb +65 -0
  74. data/lib/glimmer/swt/table_item_proxy.rb +42 -7
  75. data/lib/glimmer/swt/table_proxy.rb +575 -20
  76. data/lib/glimmer/swt/text_proxy.rb +50 -2
  77. data/lib/glimmer/swt/widget_proxy.rb +120 -23
  78. data/lib/glimmer/ui/custom_widget.rb +8 -8
  79. data/lib/net/http.rb +1 -5
  80. data/lib/uri.rb +3 -3
  81. metadata +45 -9
  82. data/lib/glimmer/data_binding/ext/observable_model.rb +0 -40
@@ -1,40 +0,0 @@
1
- require 'glimmer/data_binding/observable'
2
- require 'glimmer/data_binding/observer'
3
- require 'glimmer/swt/display_proxy'
4
-
5
- # This ensures all data-binding events happen async and block on modal display
6
-
7
- module Glimmer
8
- module DataBinding
9
- # TODO prefix utility methods with double-underscore
10
- module ObservableModel
11
- include Observable
12
- # include Glimmer
13
-
14
- def add_property_writer_observers(property_name)
15
- property_writer_name = "#{property_name}="
16
- method(property_writer_name)
17
- ensure_array_object_observer(property_name, send(property_name))
18
- begin
19
- method("__original_#{property_writer_name}")
20
- rescue
21
- old_method = self.class.instance_method(property_writer_name)
22
- define_singleton_method("__original_#{property_writer_name}", old_method)
23
- define_singleton_method(property_writer_name) do |value|
24
- old_value = self.send(property_name)
25
- unregister_dependent_observers(property_name, old_value)
26
- self.send("__original_#{property_writer_name}", value)
27
- # Glimmer::Opal::DisplayProxy.instance.async_exec do
28
- notify_observers(property_name)
29
- ensure_array_object_observer(property_name, value, old_value)
30
- # end
31
- end
32
- end
33
- rescue => e
34
- # ignore writing if no property writer exists
35
- Glimmer::Config.logger&.debug "No need to observe property writer: #{property_writer_name}\n#{e.message}\n#{e.backtrace.join("\n")}"
36
- end
37
-
38
- end
39
- end
40
- end