--
BobFurber - 28 Apr 2009
Perhaps along the following lines:
- Click on a "New" button or r-clicking on the canvas --> New?
- A simple (to view, not to build) property sheet pops up with 2 fields: a nodeSelect and a widgetTypeSelect.
- Select a node -> onBlur --> The widgetTypeSelect pick-list is filled with compatible widgets
- Select a widgetType -> onBlur --> The nodeSelect pick-list is filled with compatible target nodes
- Clicking "Ok" closes this property sheet does a couple of things:
- it creates a row in the hmiDescription object with empty attributes, save for the widgetType and the tnID
- if the label and hint attributes are empty, these are retrieved from the tnId row of targetDescription object --> descrip value.
- a property sheet for the chosen widgetType is opened or made visible, populated from the newly created/edited row in the hmiDescription object.
- the designer edits this property sheet.
- onOk, the property sheet is hidden and
- a. The row in the hmiDescription object is updated
- b. If it does not already exist, a new widget is created from this row in the hmiDescription object
To create a
NewWidget?
dojo.declare("hmi.PopUpPS", // declare a new popup
[dijit._Widget, // derived from these existing widgets
dijit._Templated,
dijit.Dialog],
{
values: "",
filterSelect: null,
dataStore: null,
templateString: null,
widgetsInTemplate: true,
templatePath: dojo.moduleUrl("hmi", "templates/popup3Prop.htm"),
postCreate: function( ) {
this.attr("content", this.popupNode); // add template to popup
this.filterSelect = new dijit.form.FilteringSelect({
id: "tnId",
name: "tnId",
value: "2",
store: this.dataStore,
searchAttr: "tnId",
}, "tnIdSelect");
// this.show();
console.log("PopUpPS postCreate: " + this.id);
},
editValues: function(title, values) {
this.attr('title', title);
console.log("editValues: " + title);
this.attr('value', values);
console.log("editValues: " + values);
this.show();
}
}
);
--
BobFurber - 28 Apr 2009
Perhaps along the following lines:
- Click on a "New" button or r-clicking on the canvas --> New?
- A simple (to view, not to build) property sheet pops up with 2 fields: a nodeSelect and a widgetTypeSelect.
- Select a node -> onBlur --> The widgetTypeSelect pick-list is filled with compatible widgets
- Select a widgetType -> onBlur --> The nodeSelect pick-list is filled with compatible target nodes
- Clicking "Ok" closes this property sheet does a couple of things:
- it creates a row in the hmiDescription object with empty attributes, save for the widgetType and the tnID
- if the label and hint attributes are empty, these are retrieved from the tnId row of targetDescription object --> descrip value.
- a property sheet for the chosen widgetType is opened or made visible, populated from the newly created/edited row in the hmiDescription object.
- the designer edits this property sheet.
- onOk, the property sheet is hidden and
- a. The row in the hmiDescription object is updated
- b. If it does not already exist, a new widget is created from this row in the hmiDescription object
To create a
NewWidget?
http://www.foswiki.org/pub/Sandbox/WidgetWiki
This topic: Sandbox
> WidgetWiki
Topic revision:
28 Apr 2009, BobFurber
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. 
