diff --git a/example/forms/res/templates/exampleForm.html b/example/forms/res/templates/exampleForm.html index 70c65f3ab4..2360b0df97 100644 --- a/example/forms/res/templates/exampleForm.html +++ b/example/forms/res/templates/exampleForm.html @@ -1,4 +1,7 @@
+ + + diff --git a/example/forms/src/ExampleFormController.js b/example/forms/src/ExampleFormController.js index fd71122085..99af83456e 100644 --- a/example/forms/src/ExampleFormController.js +++ b/example/forms/src/ExampleFormController.js @@ -10,6 +10,88 @@ define( }; + $scope.toolbar = { + name: "An example toolbar.", + sections: [ + { + description: "First section", + items: [ + { + name: "X", + description: "X coordinate", + control: "textfield", + pattern: "^\\d+$", + size: 2, + key: "x" + }, + { + name: "Y", + description: "Y coordinate", + control: "textfield", + pattern: "^\\d+$", + size: 2, + key: "y" + }, + { + name: "W", + description: "Cell width", + control: "textfield", + pattern: "^\\d+$", + size: 2, + key: "w" + }, + { + name: "H", + description: "Cell height", + control: "textfield", + pattern: "^\\d+$", + size: 2, + key: "h" + } + + ] + }, + { + description: "Second section", + items: [ + { + control: "button", + glyph: "1", + description: "Button A", + click: function () { + window.alert("A"); + } + }, + { + control: "button", + glyph: "2", + description: "Button B", + click: function () { + window.alert("B"); + } + }, + { + control: "button", + glyph: "3", + description: "Button C", + disabled: true, + click: function () { + window.alert("C"); + } + } + ] + }, + { + items: [ + { + control: "color", + key: "color" + } + ] + } + ] + }; + $scope.form = { name: "An example form.", sections: [