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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +46 -0
- data/README.md +390 -29
- data/VERSION +1 -1
- data/app/assets/images/glimmer/images/calendar.gif +0 -0
- data/app/assets/images/glimmer/images/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/glimmer/images/ui-icons_444444_256x240.png +0 -0
- data/app/assets/images/glimmer/images/ui-icons_555555_256x240.png +0 -0
- data/app/assets/images/glimmer/images/ui-icons_777620_256x240.png +0 -0
- data/app/assets/images/glimmer/images/ui-icons_777777_256x240.png +0 -0
- data/app/assets/images/glimmer/images/ui-icons_cc0000_256x240.png +0 -0
- data/app/assets/images/glimmer/images/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/stylesheets/glimmer/glimmer.css +15 -0
- data/app/assets/stylesheets/glimmer/jquery-ui.css +1312 -0
- data/app/assets/stylesheets/glimmer/jquery-ui.structure.css +886 -0
- data/app/assets/stylesheets/glimmer/jquery-ui.theme.css +443 -0
- data/app/assets/stylesheets/glimmer/jquery.ui.timepicker.css +57 -0
- data/lib/glimmer-dsl-opal.rb +73 -8
- data/lib/glimmer-dsl-opal/ext/date.rb +49 -3
- data/lib/glimmer-dsl-opal/samples/elaborate/tic_tac_toe.rb +23 -0
- data/lib/glimmer-dsl-opal/samples/hello/hello_combo.rb +5 -5
- data/lib/glimmer-dsl-opal/samples/hello/hello_date_time.rb +63 -0
- data/lib/glimmer-dsl-opal/samples/hello/hello_list_single_selection.rb +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_table.rb +283 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui-timepicker/GPL-LICENSE.txt +278 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui-timepicker/MIT-LICENSE.txt +20 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui-timepicker/jquery.ui.timepicker.css +57 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui-timepicker/jquery.ui.timepicker.js +1496 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/AUTHORS.txt +333 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/LICENSE.txt +43 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_444444_256x240.png +0 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_555555_256x240.png +0 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_777620_256x240.png +0 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_777777_256x240.png +0 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_cc0000_256x240.png +0 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/images/ui-icons_ffffff_256x240.png +0 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.min.css +7 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.min.js +13 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.structure.min.css +5 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/jquery-ui.theme.min.css +5 -0
- data/lib/glimmer-dsl-opal/vendor/jquery-ui/package.json +74 -0
- data/lib/glimmer-dsl-swt.rb +20 -35
- data/lib/glimmer/data_binding/table_items_binding.rb +31 -18
- data/lib/glimmer/dsl/opal/block_property_expression.rb +41 -0
- data/lib/glimmer/dsl/opal/custom_widget_expression.rb +1 -1
- data/lib/glimmer/dsl/opal/dsl.rb +2 -0
- data/lib/glimmer/dsl/opal/shell_expression.rb +7 -2
- data/lib/glimmer/dsl/opal/widget_expression.rb +10 -1
- data/lib/glimmer/engine.rb +9 -0
- data/lib/glimmer/swt.rb +3 -3
- data/lib/glimmer/swt/button_proxy.rb +5 -5
- data/lib/glimmer/swt/checkbox_proxy.rb +1 -0
- data/lib/glimmer/swt/color_proxy.rb +45 -45
- data/lib/glimmer/swt/combo_proxy.rb +2 -2
- data/lib/glimmer/swt/composite_proxy.rb +7 -3
- data/lib/glimmer/swt/control_editor.rb +53 -0
- data/lib/glimmer/swt/date_time_proxy.rb +145 -0
- data/lib/glimmer/swt/display_proxy.rb +6 -2
- data/lib/glimmer/swt/fill_layout_proxy.rb +1 -1
- data/lib/glimmer/swt/label_proxy.rb +2 -2
- data/lib/glimmer/swt/layout_data_proxy.rb +8 -8
- data/lib/glimmer/swt/layout_proxy.rb +5 -5
- data/lib/glimmer/swt/list_proxy.rb +2 -2
- data/lib/glimmer/swt/make_shift_shell_proxy.rb +4 -4
- data/lib/glimmer/swt/message_box_proxy.rb +10 -8
- data/lib/glimmer/swt/property_owner.rb +2 -2
- data/lib/glimmer/swt/radio_proxy.rb +1 -0
- data/lib/glimmer/swt/row_layout_proxy.rb +1 -1
- data/lib/glimmer/swt/shell_proxy.rb +8 -0
- data/lib/glimmer/swt/tab_folder_proxy.rb +5 -5
- data/lib/glimmer/swt/tab_item_proxy.rb +7 -7
- data/lib/glimmer/swt/table_column_proxy.rb +71 -12
- data/lib/glimmer/swt/table_editor.rb +65 -0
- data/lib/glimmer/swt/table_item_proxy.rb +42 -7
- data/lib/glimmer/swt/table_proxy.rb +575 -20
- data/lib/glimmer/swt/text_proxy.rb +50 -2
- data/lib/glimmer/swt/widget_proxy.rb +120 -23
- data/lib/glimmer/ui/custom_widget.rb +8 -8
- data/lib/net/http.rb +1 -5
- data/lib/uri.rb +3 -3
- metadata +45 -9
- 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
|