I would like to create my data type in which i would like put together a text area with a checkBox as a table with two columns (in which the first column contains the text area and the second contains the checkbox).
I want to add functionality on the checkbox and i don't know how i can save the stage after the save.
(In all tries where i done after the save the checkbox lost its value)
For more informations : In my template i want to show only fields which have selected the checkbox
Here is my code :
package.manifest :
{
propertyEditors: [
{
alias: "XMLGames",
name: "XML Games",
editor: {
view: "~/App_Plugins/XMLGames/xmlgameseditor.html",
valueType: "JSON"
},
prevalues: {
fields: [
{
label: "Number of columns",
description: "Enter the number of columns",
key: "cols",
view: "number",
validation: [
{
type: "Required"
}
]
},
{
label: "Number of rows",
description: "Enter the number of rows",
key: "rows",
view: "number",
validation: [
{
type: "Required"
}
]
},
{
label: "Manage rows",
description: "Let user add/remove and sort rows",
key: "manageRows",
view: "boolean"
}
]
}
},
],
javascript: [
'~/App_Plugins/XMLGames/xmlgames36.controller.js'
]
}
I've not ran your code, or for that matter really understood what you are trying to achieve, but if you want binding to happen on the checkbox, its normal to add ng-model to it.
Maybe change to
<td ng-repeat="col in row track by $id($index)">
<textarea type="text" ng-model="row[$index].text" ng-class="{dimmed: isDisabled(fieldset)}"></textarea>
</td>
<td>
<input type="checkbox" ng-model="row[$index].checkbox" name="checkboxlist"/>
</td>
Property Editor
Hi,
I would like to create my data type in which i would like put together a text area with a checkBox as a table with two columns (in which the first column contains the text area and the second contains the checkbox).
I want to add functionality on the checkbox and i don't know how i can save the stage after the save. (In all tries where i done after the save the checkbox lost its value)
For more informations : In my template i want to show only fields which have selected the checkbox
Here is my code :
package.manifest :
the HTML file :
and the controller.js :
Thanks in advance.
Hi Ismini,
I've not ran your code, or for that matter really understood what you are trying to achieve, but if you want binding to happen on the checkbox, its normal to add ng-model to it.
Maybe change to
Cheers
Jonathan
I solved it :) thank you ....
I added the ng-model="row[$index]" and i had a mistake in .js file in addition.
is working on a reply...