vendor/assets/javascripts/rails_qx.js in rails_qx-0.0.9 vs vendor/assets/javascripts/rails_qx.js in rails_qx-0.0.10
- old
+ new
@@ -16612,11 +16612,11 @@
/* Generated by Opal 0.8.1 */
Opal.modules["core/qx_wrap"] = function(Opal) {
Opal.dynamic_require_severity = "ignore";
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass;
- Opal.add_stubs(['$require', '$include', '$attr_accessor', '$lib_io_server', '$instance', '$Native', '$ui_style_stylesheet', '$core_object', '$data_array', '$data_controller_list', '$to_n', '$lib_data_list_model', '$lib_ui_grid_grid', '$ui_basic_atom', '$ui_basic_image', '$ui_basic_label', '$ui_container_composite', '$ui_container_scroll', '$ui_container_stack', '$ui_core_widget', '$ui_embed_html', '$ui_form_button', '$ui_form_form', '$ui_form_list', '$ui_form_list_item', '$ui_form_renderer_double', '$ui_form_renderer_single', '$ui_form_renderer_single_placeholder', '$ui_form_text_area', '$ui_form_text_field', '$ui_layout_basic', '$ui_layout_canvas', '$ui_layout_hbox', '$ui_layout_vbox', '$ui_menu_button', '$ui_menu_menu', '$ui_menubar_button', '$ui_menubar_menubar', '$ui_splitpane_pane', '$ui_tabview_page', '$ui_tabview_tab_button', '$ui_tabview_tab_view', '$ui_tree_file', '$ui_tree_folder', '$ui_tree_virtual_tree', '$ui_window_window']);
+ Opal.add_stubs(['$require', '$include', '$attr_reader', '$lib_io_server', '$instance', '$Native', '$ui_style_stylesheet', '$core_object', '$data_array', '$data_controller_list', '$to_n', '$lib_data_list_model', '$lib_ui_grid_grid', '$ui_basic_atom', '$ui_basic_image', '$ui_basic_label', '$ui_container_composite', '$ui_container_scroll', '$ui_container_stack', '$ui_core_widget', '$ui_embed_html', '$ui_form_button', '$ui_form_combo_box', '$ui_form_form', '$ui_form_list', '$ui_form_list_item', '$ui_form_password_field', '$ui_form_radio_button', '$ui_form_radio_group', '$ui_form_radio_button_group', '$ui_form_renderer_double', '$ui_form_renderer_single', '$ui_form_renderer_single_placeholder', '$ui_form_select_box', '$ui_form_text_area', '$ui_form_text_field', '$ui_layout_basic', '$ui_layout_canvas', '$ui_layout_hbox', '$ui_layout_vbox', '$ui_menu_button', '$ui_menu_menu', '$ui_menubar_button', '$ui_menubar_menubar', '$ui_splitpane_pane', '$ui_tabview_page', '$ui_tabview_tab_button', '$ui_tabview_tab_view', '$ui_tree_file', '$ui_tree_folder', '$ui_tree_tree', '$ui_tree_virtual_tree', '$ui_tree_virtual_tree_item', '$ui_window_window']);
self.$require("native");
self.$require("singleton");
self.$require("core/util");
return (function($base, $super) {
function $QxWrap(){};
@@ -16626,90 +16626,106 @@
self.$include($scope.get('Singleton'));
self.$include($scope.get('Util'));
- self.$attr_accessor("core_object");
+ self.$attr_reader("core_object");
- self.$attr_accessor("data_array");
+ self.$attr_reader("data_array");
- self.$attr_accessor("data_controller_list");
+ self.$attr_reader("data_controller_list");
- self.$attr_accessor("lib_data_list_model");
+ self.$attr_reader("lib_data_list_model");
- self.$attr_accessor("lib_io_server");
+ self.$attr_reader("lib_io_server");
- self.$attr_accessor("lib_ui_grid_grid");
+ self.$attr_reader("lib_ui_grid_grid");
- self.$attr_accessor("ui_basic_atom");
+ self.$attr_reader("ui_basic_atom");
- self.$attr_accessor("ui_basic_image");
+ self.$attr_reader("ui_basic_image");
- self.$attr_accessor("ui_basic_label");
+ self.$attr_reader("ui_basic_label");
- self.$attr_accessor("ui_container_composite");
+ self.$attr_reader("ui_container_composite");
- self.$attr_accessor("ui_container_scroll");
+ self.$attr_reader("ui_container_scroll");
- self.$attr_accessor("ui_container_stack");
+ self.$attr_reader("ui_container_stack");
- self.$attr_accessor("ui_core_widget");
+ self.$attr_reader("ui_core_widget");
- self.$attr_accessor("ui_embed_html");
+ self.$attr_reader("ui_embed_html");
- self.$attr_accessor("ui_form_button");
+ self.$attr_reader("ui_form_button");
- self.$attr_accessor("ui_form_form");
+ self.$attr_reader("ui_form_combo_box");
- self.$attr_accessor("ui_form_list");
+ self.$attr_reader("ui_form_form");
- self.$attr_accessor("ui_form_list_item");
+ self.$attr_reader("ui_form_list");
- self.$attr_accessor("ui_form_renderer_double");
+ self.$attr_reader("ui_form_list_item");
- self.$attr_accessor("ui_form_renderer_single");
+ self.$attr_reader("ui_form_password_field");
- self.$attr_accessor("ui_form_renderer_single_placeholder");
+ self.$attr_reader("ui_form_radio_button");
- self.$attr_accessor("ui_form_text_area");
+ self.$attr_reader("ui_form_radio_button_group");
- self.$attr_accessor("ui_form_text_field");
+ self.$attr_reader("ui_form_radio_group");
- self.$attr_accessor("ui_layout_basic");
+ self.$attr_reader("ui_form_renderer_double");
- self.$attr_accessor("ui_layout_canvas");
+ self.$attr_reader("ui_form_renderer_single");
- self.$attr_accessor("ui_layout_hbox");
+ self.$attr_reader("ui_form_renderer_single_placeholder");
- self.$attr_accessor("ui_layout_vbox");
+ self.$attr_reader("ui_form_select_box");
- self.$attr_accessor("ui_menu_button");
+ self.$attr_reader("ui_form_text_area");
- self.$attr_accessor("ui_menu_menu");
+ self.$attr_reader("ui_form_text_field");
- self.$attr_accessor("ui_menubar_button");
+ self.$attr_reader("ui_layout_basic");
- self.$attr_accessor("ui_menubar_menubar");
+ self.$attr_reader("ui_layout_canvas");
- self.$attr_accessor("ui_splitpane_pane");
+ self.$attr_reader("ui_layout_hbox");
- self.$attr_accessor("ui_style_stylesheet");
+ self.$attr_reader("ui_layout_vbox");
- self.$attr_accessor("ui_tabview_page");
+ self.$attr_reader("ui_menu_button");
- self.$attr_accessor("ui_tabview_tab_button");
+ self.$attr_reader("ui_menu_menu");
- self.$attr_accessor("ui_tabview_tab_view");
+ self.$attr_reader("ui_menubar_button");
- self.$attr_accessor("ui_tree_file");
+ self.$attr_reader("ui_menubar_menubar");
- self.$attr_accessor("ui_tree_folder");
+ self.$attr_reader("ui_splitpane_pane");
- self.$attr_accessor("ui_tree_virtual_tree");
+ self.$attr_reader("ui_style_stylesheet");
- self.$attr_accessor("ui_window_window");
+ self.$attr_reader("ui_tabview_page");
+ self.$attr_reader("ui_tabview_tab_button");
+
+ self.$attr_reader("ui_tabview_tab_view");
+
+ self.$attr_reader("ui_tree_file");
+
+ self.$attr_reader("ui_tree_folder");
+
+ self.$attr_reader("ui_tree_tree");
+
+ self.$attr_reader("ui_tree_virtual_tree");
+
+ self.$attr_reader("ui_tree_virtual_tree_item");
+
+ self.$attr_reader("ui_window_window");
+
Opal.defs(self, '$lib_io_delete_server_api', function(controller, selector, params, handler) {
var self = this, lib_io_server = nil;
lib_io_server = self.$instance().$lib_io_server();
return self.$Native(lib_io_server.apiDelete(controller, selector, params, handler));
@@ -16835,17 +16851,27 @@
ui_embed_html = self.$instance().$ui_embed_html();
return self.$Native(new ui_embed_html());
});
- Opal.defs(self, '$new_ui_form_button', function() {
+ Opal.defs(self, '$new_ui_form_button', function(label) {
var self = this, ui_form_button = nil;
+ if (label == null) {
+ label = "Button"
+ }
ui_form_button = self.$instance().$ui_form_button();
- return self.$Native(new ui_form_button('Button', null));
+ return self.$Native(new ui_form_button(label, null));
});
+ Opal.defs(self, '$new_ui_form_combo_box', function() {
+ var self = this, ui_form_combo_box = nil;
+
+ ui_form_combo_box = self.$instance().$ui_form_combo_box();
+ return self.$Native(new ui_form_combo_box());
+ });
+
Opal.defs(self, '$new_ui_form_form', function() {
var self = this, ui_form_form = nil;
ui_form_form = self.$instance().$ui_form_form();
return self.$Native(new ui_form_form());
@@ -16856,17 +16882,55 @@
ui_form_list = self.$instance().$ui_form_list();
return self.$Native(new ui_form_list());
});
- Opal.defs(self, '$new_ui_form_list_item', function() {
+ Opal.defs(self, '$new_ui_form_list_item', function(label) {
var self = this, ui_form_list_item = nil;
ui_form_list_item = self.$instance().$ui_form_list_item();
- return self.$Native(new ui_form_list_item());
+ return new ui_form_list_item(label);
});
+ Opal.defs(self, '$new_ui_form_password_field', function(value) {
+ var self = this, ui_form_password_field = nil;
+
+ if (value == null) {
+ value = ""
+ }
+ ui_form_password_field = self.$instance().$ui_form_password_field();
+ return self.$Native(new ui_form_password_field(value));
+ });
+
+ Opal.defs(self, '$new_ui_form_radio_button', function(label) {
+ var self = this, ui_form_radio_button = nil;
+
+ if (label == null) {
+ label = nil
+ }
+ ui_form_radio_button = self.$instance().$ui_form_radio_button();
+ return self.$Native(new ui_form_radio_button(label));
+ });
+
+ Opal.defs(self, '$new_ui_form_radio_button_group', function(items) {
+ var self = this, ui_form_radio_group = nil;
+
+ items = $slice.call(arguments, 0);
+ ui_form_radio_group = self.$instance().$ui_form_radio_group();
+ return self.$Native(new ui_form_radio_group(items));
+ });
+
+ Opal.defs(self, '$new_ui_form_radio_group', function(layout) {
+ var self = this, ui_form_radio_button_group = nil;
+
+ if (layout == null) {
+ layout = nil
+ }
+ ui_form_radio_button_group = self.$instance().$ui_form_radio_button_group();
+ return self.$Native(new ui_form_radio_button_group(layout));
+ });
+
Opal.defs(self, '$new_ui_form_renderer_double', function(nativeForm) {
var self = this, ui_form_renderer_double = nil;
ui_form_renderer_double = self.$instance().$ui_form_renderer_double();
return self.$Native(new ui_form_renderer_double(nativeForm));
@@ -16884,22 +16948,32 @@
ui_form_renderer_single_placeholder = self.$instance().$ui_form_renderer_single_placeholder();
return self.$Native(new ui_form_renderer_single_placeholder(nativeForm));
});
+ Opal.defs(self, '$new_ui_form_select_box', function() {
+ var self = this, ui_form_select_box = nil;
+
+ ui_form_select_box = self.$instance().$ui_form_select_box();
+ return self.$Native(new ui_form_select_box());
+ });
+
Opal.defs(self, '$new_ui_form_text_area', function() {
var self = this, ui_form_text_area = nil;
ui_form_text_area = self.$instance().$ui_form_text_area();
return self.$Native(new ui_form_text_area(''));
});
- Opal.defs(self, '$new_ui_form_text_field', function() {
+ Opal.defs(self, '$new_ui_form_text_field', function(value) {
var self = this, ui_form_text_field = nil;
+ if (value == null) {
+ value = ""
+ }
ui_form_text_field = self.$instance().$ui_form_text_field();
- return self.$Native(new ui_form_text_field(''));
+ return self.$Native(new ui_form_text_field(value));
});
Opal.defs(self, '$new_ui_layout_basic', function() {
var self = this, ui_layout_basic = nil;
@@ -16982,31 +17056,63 @@
new_ui_tabview_tab_view = self.$instance().$ui_tabview_tab_view();
return self.$Native(new new_ui_tabview_tab_view());
});
- Opal.defs(self, '$new_ui_tree_file', function() {
+ Opal.defs(self, '$new_ui_tree_file', function(label) {
var self = this, ui_tree_file = nil;
+ if (label == null) {
+ label = nil
+ }
ui_tree_file = self.$instance().$ui_tree_file();
- return self.$Native(new ui_tree_file());
+ return self.$Native(new ui_tree_file(label));
});
- Opal.defs(self, '$new_ui_tree_folder', function() {
+ Opal.defs(self, '$new_ui_tree_folder', function(label) {
var self = this, ui_tree_folder = nil;
+ if (label == null) {
+ label = nil
+ }
ui_tree_folder = self.$instance().$ui_tree_folder();
- return self.$Native(new ui_tree_folder());
+ return self.$Native(new ui_tree_folder(label));
});
- Opal.defs(self, '$new_ui_tree_virtual_tree', function() {
+ Opal.defs(self, '$new_ui_tree_tree', function() {
+ var self = this, ui_tree_tree = nil;
+
+ ui_tree_tree = self.$instance().$ui_tree_tree();
+ return self.$Native(new ui_tree_tree());
+ });
+
+ Opal.defs(self, '$new_ui_tree_virtual_tree', function(model, label_path, child_property) {
var self = this, ui_tree_virtual_tree = nil;
+ if (model == null) {
+ model = nil
+ }
+ if (label_path == null) {
+ label_path = nil
+ }
+ if (child_property == null) {
+ child_property = nil
+ }
ui_tree_virtual_tree = self.$instance().$ui_tree_virtual_tree();
- return self.$Native(new ui_tree_virtual_tree());
+ return self.$Native(new ui_tree_virtual_tree(model,label_path,child_property));
});
+ Opal.defs(self, '$new_ui_tree_virtual_tree_item', function(label) {
+ var self = this, ui_tree_virtual_tree_item = nil;
+
+ if (label == null) {
+ label = nil
+ }
+ ui_tree_virtual_tree_item = self.$instance().$ui_tree_virtual_tree_item();
+ return self.$Native(new ui_tree_virtual_tree_item(label));
+ });
+
Opal.defs(self, '$new_ui_window_window', function() {
var self = this, ui_window_window = nil;
ui_window_window = self.$instance().$ui_window_window();
return self.$Native(new ui_window_window());
@@ -17028,16 +17134,22 @@
self.ui_container_scroll = self.$Native(qx.ui.container.Scroll);
self.ui_container_stack = self.$Native(qx.ui.container.Stack);
self.ui_core_widget = self.$Native(qx.ui.core.Widget);
self.ui_embed_html = self.$Native(qx.ui.embed.Html);
self.ui_form_button = self.$Native(qx.ui.form.Button);
+ self.ui_form_combo_box = self.$Native(qx.ui.form.ComboBox);
self.ui_form_form = self.$Native(qx.ui.form.Form);
self.ui_form_list = self.$Native(qx.ui.form.List);
self.ui_form_list_item = self.$Native(qx.ui.form.ListItem);
+ self.ui_form_password_field = self.$Native(qx.ui.form.PasswordField);
+ self.ui_form_radio_button = self.$Native(qx.ui.form.RadioButton);
+ self.ui_form_radio_button_group = self.$Native(qx.ui.form.RadioButtonGroup);
+ self.ui_form_radio_group = self.$Native(qx.ui.form.RadioGroup);
self.ui_form_renderer_double = self.$Native(qx.ui.form.renderer.Double);
self.ui_form_renderer_single = self.$Native(qx.ui.form.renderer.Single);
self.ui_form_renderer_single_placeholder = self.$Native(qx.ui.form.renderer.SinglePlaceholder);
+ self.ui_form_select_box = self.$Native(qx.ui.form.SelectBox);
self.ui_form_text_area = self.$Native(qx.ui.form.TextArea);
self.ui_form_text_field = self.$Native(qx.ui.form.TextField);
self.ui_layout_basic = self.$Native(qx.ui.layout.Basic);
self.ui_layout_canvas = self.$Native(qx.ui.layout.Canvas);
self.ui_layout_hbox = self.$Native(qx.ui.layout.HBox);
@@ -17051,11 +17163,13 @@
self.ui_tabview_page = self.$Native(qx.ui.tabview.Page);
self.ui_tabview_tab_button = self.$Native(qx.ui.tabview.TabButton);
self.ui_tabview_tab_view = self.$Native(qx.ui.tabview.TabView);
self.ui_tree_file = self.$Native(qx.ui.tree.TreeFile);
self.ui_tree_folder = self.$Native(qx.ui.tree.TreeFolder);
+ self.ui_tree_tree = self.$Native(qx.ui.tree.Tree);
self.ui_tree_virtual_tree = self.$Native(qx.ui.tree.VirtualTree);
+ self.ui_tree_virtual_tree_item = self.$Native(qx.ui.tree.VirtualTreeItem);
return self.ui_window_window = self.$Native(qx.ui.window.Window);
}, nil) && 'initialize';
})(self, null);
};
/* Generated by Opal 0.8.1 */
@@ -33066,10 +33180,94 @@
return $scope.get('FOOTER_PADDING');
}, nil) && 'initial_padding';
})(self, $scope.get('Container'));
};
/* Generated by Opal 0.8.1 */
+Opal.modules["widgets/form_combo_box"] = function(Opal) {
+ Opal.dynamic_require_severity = "ignore";
+ var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass;
+
+ Opal.add_stubs(['$require', '$add_items', '$set_value', '$on_change_value', '$each', '$new_ui_form_list_item', '$add', '$widget', '$getValue', '$new_ui_form_combo_box', '$nil?', '$lambda', '$call', '$add_listener', '$resetValue', '$setValue']);
+ self.$require("core/qx_wrap");
+ self.$require("qx/ui/component");
+ return (function($base, $super) {
+ function $FormComboBox(){};
+ var self = $FormComboBox = $klass($base, $super, 'FormComboBox', $FormComboBox);
+
+ var def = self.$$proto, $scope = self.$$scope, TMP_1;
+
+ def.$initialize = TMP_1 = function(item_labels, value, fn) {
+ var self = this, $iter = TMP_1.$$p, $yield = $iter || nil;
+
+ if (item_labels == null) {
+ item_labels = []
+ }
+ if (value == null) {
+ value = nil
+ }
+ if (fn == null) {
+ fn = nil
+ }
+ TMP_1.$$p = null;
+ Opal.find_super_dispatcher(self, 'initialize', TMP_1, null).apply(self, []);
+ self.$add_items(item_labels);
+ self.$set_value(value);
+ return self.$on_change_value(fn);
+ };
+
+ def.$add_items = function(item_labels) {
+ var $a, $b, TMP_2, self = this;
+
+ return ($a = ($b = item_labels).$each, $a.$$p = (TMP_2 = function(label){var self = TMP_2.$$s || this, item = nil;
+if (label == null) label = nil;
+ item = $scope.get('QxWrap').$new_ui_form_list_item(label);
+ return self.$widget().$add(item);}, TMP_2.$$s = self, TMP_2), $a).call($b);
+ };
+
+ def.$get_value = function() {
+ var self = this;
+
+ return self.$widget().$getValue();
+ };
+
+ def.$initial_widget = function() {
+ var self = this;
+
+ return $scope.get('QxWrap').$new_ui_form_combo_box();
+ };
+
+ def.$on_change_value = function(fn) {
+ var $a, $b, TMP_3, self = this, listener_fn = nil;
+
+ if ((($a = fn['$nil?']()) !== nil && (!$a.$$is_boolean || $a == true))) {
+ return nil
+ } else {
+ listener_fn = ($a = ($b = self).$lambda, $a.$$p = (TMP_3 = function(data_event){var self = TMP_3.$$s || this;
+if (data_event == null) data_event = nil;
+ return fn.$call(data_event.getData())}, TMP_3.$$s = self, TMP_3), $a).call($b);
+ return self.$add_listener("changeValue", listener_fn);
+ };
+ };
+
+ def.$reset_value = function() {
+ var self = this;
+
+ return self.$widget().$resetValue();
+ };
+
+ return (def.$set_value = function(str) {
+ var $a, self = this;
+
+ if ((($a = str['$nil?']()) !== nil && (!$a.$$is_boolean || $a == true))) {
+ return nil
+ } else {
+ return self.$widget().$setValue(str)
+ };
+ }, nil) && 'set_value';
+ })(self, $scope.get('Component'));
+};
+/* Generated by Opal 0.8.1 */
Opal.modules["widgets/form_list"] = function(Opal) {
Opal.dynamic_require_severity = "ignore";
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2;
Opal.add_stubs(['$require', '$attr_reader', '$add_controller', '$setDecorator', '$widget', '$setPadding', '$setMargin', '$set_model', '$set_template', '$new_data_array', '$new_data_controller_list', '$items', '$setDelegate', '$controller', '$lambda', '$new_lib_data_list_model', '$push', '$new', '$model', '$render', '$template', '$add_item', '$new_ui_form_list', '$getSelection', '$Native', '$call', '$addListener', '$removeAll', '$removeAt', '$find_model', '$find_template']);
@@ -33187,10 +33385,68 @@
return self.template = $scope.get('TemplateManager').$find_template(template_name);
}, nil) && 'set_template';
})(self, $scope.get('Component'));
};
/* Generated by Opal 0.8.1 */
+Opal.modules["widgets/form_select_box"] = function(Opal) {
+ Opal.dynamic_require_severity = "ignore";
+ var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass;
+
+ Opal.add_stubs(['$require', '$add_items', '$on_change_selection', '$each', '$new_ui_form_list_item', '$add', '$widget', '$new_ui_form_select_box', '$nil?', '$lambda', '$call', '$add_listener']);
+ self.$require("core/qx_wrap");
+ self.$require("qx/ui/component");
+ return (function($base, $super) {
+ function $FormSelectBox(){};
+ var self = $FormSelectBox = $klass($base, $super, 'FormSelectBox', $FormSelectBox);
+
+ var def = self.$$proto, $scope = self.$$scope, TMP_1;
+
+ def.$initialize = TMP_1 = function(item_labels, fn) {
+ var self = this, $iter = TMP_1.$$p, $yield = $iter || nil;
+
+ if (item_labels == null) {
+ item_labels = []
+ }
+ if (fn == null) {
+ fn = nil
+ }
+ TMP_1.$$p = null;
+ Opal.find_super_dispatcher(self, 'initialize', TMP_1, null).apply(self, []);
+ self.$add_items(item_labels);
+ return self.$on_change_selection(fn);
+ };
+
+ def.$add_items = function(item_labels) {
+ var $a, $b, TMP_2, self = this;
+
+ return ($a = ($b = item_labels).$each, $a.$$p = (TMP_2 = function(label){var self = TMP_2.$$s || this, item = nil;
+if (label == null) label = nil;
+ item = $scope.get('QxWrap').$new_ui_form_list_item(label);
+ return self.$widget().$add(item);}, TMP_2.$$s = self, TMP_2), $a).call($b);
+ };
+
+ def.$initial_widget = function() {
+ var self = this;
+
+ return $scope.get('QxWrap').$new_ui_form_select_box();
+ };
+
+ return (def.$on_change_selection = function(fn) {
+ var $a, $b, TMP_3, self = this, listener_fn = nil;
+
+ if ((($a = fn['$nil?']()) !== nil && (!$a.$$is_boolean || $a == true))) {
+ return nil
+ } else {
+ listener_fn = ($a = ($b = self).$lambda, $a.$$p = (TMP_3 = function(data_event){var self = TMP_3.$$s || this;
+if (data_event == null) data_event = nil;
+ return fn.$call(data_event.getData()[0].getLabel())}, TMP_3.$$s = self, TMP_3), $a).call($b);
+ return self.$add_listener("changeSelection", listener_fn);
+ };
+ }, nil) && 'on_change_selection';
+ })(self, $scope.get('Component'));
+};
+/* Generated by Opal 0.8.1 */
Opal.modules["widgets/h_separator"] = function(Opal) {
Opal.dynamic_require_severity = "ignore";
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass;
Opal.add_stubs(['$require']);
@@ -34086,11 +34342,11 @@
def.$add_pages = function() {
var self = this;
self.$content_panel().$add_item("welcome", $scope.get('WelcomePage').$new());
self.$content_panel().$add_item("demos", $scope.get('DemosPage').$new());
- self.$content_panel().$add_item("guides", $scope.get('GuidesPage').$new());
+ self.$content_panel().$add_item("widgets", $scope.get('WidgetsPage').$new());
return self.$content_panel().$add_item("license", $scope.get('LicensePage').$new());
};
def.$initial_background_color = function() {
var self = this;
@@ -34105,11 +34361,11 @@
};
def.$nav_panel_config = function() {
var self = this;
- return $hash2(["buttons"], {"buttons": [$hash2(["text", "action", "arg"], {"text": "Welcome", "action": "select_page", "arg": "welcome"}), $hash2(["text", "action", "arg"], {"text": "Demos", "action": "select_page", "arg": "demos"}), $hash2(["text", "action", "arg"], {"text": "Guides", "action": "select_page", "arg": "guides"}), $hash2(["text", "action", "arg"], {"text": "License", "action": "select_page", "arg": "license"})]});
+ return $hash2(["buttons"], {"buttons": [$hash2(["text", "action", "arg"], {"text": "Welcome", "action": "select_page", "arg": "welcome"}), $hash2(["text", "action", "arg"], {"text": "Demos", "action": "select_page", "arg": "demos"}), $hash2(["text", "action", "arg"], {"text": "Widgets", "action": "select_page", "arg": "widgets"}), $hash2(["text", "action", "arg"], {"text": "License", "action": "select_page", "arg": "license"})]});
};
return (def.$nav_panel_controller = function() {
var $a, $b, self = this, controller = nil;
@@ -34616,49 +34872,10 @@
return self.$add_tab_pages();
}, nil) && 'add_tabview';
})(self, $scope.get('Container'));
};
/* Generated by Opal 0.8.1 */
-Opal.modules["views/pages/guides_page"] = function(Opal) {
- Opal.dynamic_require_severity = "ignore";
- var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2;
-
- Opal.add_stubs(['$add_guides', '$title_template', '$add']);
- return (function($base, $super) {
- function $GuidesPage(){};
- var self = $GuidesPage = $klass($base, $super, 'GuidesPage', $GuidesPage);
-
- var def = self.$$proto, $scope = self.$$scope;
-
- def.$add_items = function() {
- var self = this;
-
- return self.$add_guides();
- };
-
- def.$add_guides = function() {
- var self = this, title = nil, html = nil;
-
- title = "Development Guides";
- html = $scope.get('PanelHtml').$title_template(title, "guides");
- return self.$add(html, $hash2(["flex"], {"flex": 1}));
- };
-
- def.$initial_background_color = function() {
- var self = this;
-
- return $scope.get('WHITE');
- };
-
- return (def.$initial_padding = function() {
- var self = this;
-
- return 25;
- }, nil) && 'initial_padding';
- })(self, $scope.get('Container'))
-};
-/* Generated by Opal 0.8.1 */
Opal.modules["views/pages/license_page"] = function(Opal) {
Opal.dynamic_require_severity = "ignore";
var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2;
Opal.add_stubs(['$require', '$add_license', '$title_template', '$add']);
@@ -34681,16 +34898,10 @@
title = "MIT License";
html = $scope.get('PanelHtml').$title_template(title, "license");
return self.$add(html, $hash2(["flex"], {"flex": 1}));
};
- def.$initial_background_color = function() {
- var self = this;
-
- return $scope.get('WHITE');
- };
-
return (def.$initial_padding = function() {
var self = this;
return 25;
}, nil) && 'initial_padding';
@@ -34731,22 +34942,66 @@
html.$widget().$setOverflowX("auto");
html.$widget().$setOverflowY("auto");
return self.$bottom_panel().$add(html, $hash2(["flex"], {"flex": 1}));
};
- def.$add_top_panel = function() {
+ return (def.$add_top_panel = function() {
var self = this, title = nil, html = nil;
self.top_panel = $scope.get('Container').$new();
self.$add(self.$top_panel(), $hash2(["height"], {"height": 17}));
title = "RailsQx Introduction";
html = $scope.get('PanelHtml').$title_template(title, "welcome_tp");
return self.$top_panel().$add(html, $hash2(["flex"], {"flex": 1}));
+ }, nil) && 'add_top_panel';
+ })(self, $scope.get('Container'));
+};
+/* Generated by Opal 0.8.1 */
+Opal.modules["views/pages/widgets_page"] = function(Opal) {
+ Opal.dynamic_require_severity = "ignore";
+ var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass;
+
+ Opal.add_stubs(['$attr_reader', '$add_combo_box', '$add_select_box', '$new', '$items', '$set_value', '$first', '$on_change_value', '$lambda', '$puts', '$add', '$on_change_selection']);
+ return (function($base, $super) {
+ function $WidgetsPage(){};
+ var self = $WidgetsPage = $klass($base, $super, 'WidgetsPage', $WidgetsPage);
+
+ var def = self.$$proto, $scope = self.$$scope;
+
+ self.$attr_reader("items");
+
+ def.$add_items = function() {
+ var self = this;
+
+ self.items = ["One", "Two", "Three", "Four", "Five"];
+ self.$add_combo_box();
+ return self.$add_select_box();
};
- return (def.$initial_background_color = function() {
+ def.$add_combo_box = function() {
+ var $a, $b, TMP_1, self = this, combo_box = nil;
+
+ combo_box = $scope.get('FormComboBox').$new(self.$items());
+ combo_box.$set_value(self.$items().$first());
+ combo_box.$on_change_value(($a = ($b = self).$lambda, $a.$$p = (TMP_1 = function(x){var self = TMP_1.$$s || this;
+if (x == null) x = nil;
+ return self.$puts("on_change_value", x)}, TMP_1.$$s = self, TMP_1), $a).call($b));
+ return self.$add(combo_box);
+ };
+
+ def.$add_select_box = function() {
+ var $a, $b, TMP_2, self = this, select_box = nil;
+
+ select_box = $scope.get('FormSelectBox').$new(self.$items());
+ select_box.$on_change_selection(($a = ($b = self).$lambda, $a.$$p = (TMP_2 = function(x){var self = TMP_2.$$s || this;
+if (x == null) x = nil;
+ return self.$puts("on_change_selection", x)}, TMP_2.$$s = self, TMP_2), $a).call($b));
+ return self.$add(select_box);
+ };
+
+ return (def.$initial_padding = function() {
var self = this;
- return $scope.get('WHITE');
- }, nil) && 'initial_background_color';
- })(self, $scope.get('Container'));
+ return 25;
+ }, nil) && 'initial_padding';
+ })(self, $scope.get('Container'))
};