this.modified=ko.observable(false);
this.modified.subscribe(function(newValue){$.log("ProxyConnector modified:"+newValue)});
-
- this.deleteProperty=function(key){
- $.log("delete property key:"+key());
- for(i=0;i<self.propertiesEntries().length;i++){
- var entry=self.propertiesEntries()[i];
- if (entry.key()==key()){
- self.propertiesEntries.remove(entry);
- }
- }
-
- }
-
- this.addProperty=function(){
- var mainContent=$("#main-content");
- var key=mainContent.find("#property-key").val();
- var value=mainContent.find("#property-value").val();
- var oldTab = self.propertiesEntries();
- oldTab.push(new Entry(key,value));
- self.propertiesEntries(oldTab);
- }
-
this.updatePolicyEntry=function(key,value){
for(i=0;i<policiesEntries.length;i++){
if (policiesEntries[i].key==key){
}
}
}
+
}
PolicyInformation=function(options,defaultOption,id,name){
}
}
+ this.deleteProperty=function(key){
+ $.log("delete property key:"+key());
+ for(i=0;i<self.proxyConnector.propertiesEntries().length;i++){
+ var entry=self.proxyConnector.propertiesEntries()[i];
+ if (entry.key()==key()){
+ self.proxyConnector.propertiesEntries.remove(entry);
+ }
+ }
+
+ }
+
+ this.addProperty=function(){
+ var mainContent=$("#main-content");
+ var key=mainContent.find("#property-key").val();
+ var value=mainContent.find("#property-value").val();
+ var oldTab = self.proxyConnector.propertiesEntries();
+ oldTab.push(new Entry(key,value));
+ self.proxyConnector.propertiesEntries(oldTab);
+ mainContent.find("#property-key").val("");
+ mainContent.find("#property-value").val("");
+ }
+
displayGrid=function(){
activateProxyConnectorsGridTab();
}
<thead>
<th><input type="text" id="property-key"/></th>
<th><input type="text" id="property-value"/></th>
- <th><a href="#" data-bind="click: function(){ proxyConnector.addProperty() }">${$.i18n.prop('add')}</a></th>
+ <th><a href="#" data-bind="click: function(){ addProperty() }">${$.i18n.prop('add')}</a></th>
</thead>
<tbody data-bind="foreach: proxyConnector.propertiesEntries">
<tr>
<td data-bind="text: key"></td>
<td data-bind="text: value"></td>
- <td><a href="#" data-bind="click: function(){$data.deleteProperty(key)}">${$.i18n.prop('delete')}</a></td>
+ <td><a href="#" data-bind="click: function(){ $parent.deleteProperty(key)}">${$.i18n.prop('delete')}</a></td>
</tr>
</tbody>
</table>