From d1bc0d3e8b3ab3341105c3e29dd2ca11a20d8931 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 15 Feb 2012 00:01:28 -0800 Subject: Adding the button and the dropdown control. Signed-off-by: Valerio Virgillito --- .../ComponentsPanelBase.js | 3 ++ node_modules/components-data/button.json | 51 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js index 4a0ac2b5..987cd6b5 100644 --- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js +++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js @@ -164,6 +164,7 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component row.prop = props.name; row.defaultValue = props["default"]; row.label = props.name; + row.items = props.possibleValues; section.Section.push([row]); } @@ -192,6 +193,8 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component return "textbox"; case "boolean": return "checkbox"; + case "select": + return "dropdown"; default: alert("Conversion not implemented for ", type); } diff --git a/node_modules/components-data/button.json b/node_modules/components-data/button.json index a931afcb..3f30030e 100644 --- a/node_modules/components-data/button.json +++ b/node_modules/components-data/button.json @@ -12,10 +12,61 @@ "type": "string", "default": "Button" }, + { + "name": "autofocus", + "type": "boolean", + "default": "false" + }, { "name": "enabled", "type": "boolean", "default": "true" + }, + { + "name": "form", + "type": "string", + "default": "" + }, + { + "name": "formaction", + "type": "string", + "default": "" + }, + { + "name": "formenctype", + "type": "string", + "default": "" + }, + { + "name": "formmethod", + "type": "string", + "default": "" + }, + { + "name": "formnovalidate", + "type": "boolean", + "default": "" + }, + { + "name": "formtarget", + "type": "string", + "default": "" + }, + { + "name": "name", + "type": "string", + "default": "" + }, + { + "name": "type", + "type": "select", + "default": "submit", + "possibleValues": ["submit", "reset", "button"] + }, + { + "name": "value", + "type": "string", + "default": "" } ] } \ No newline at end of file -- cgit v1.2.3