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){
+ policiesEntries[i].value=value;
+ }
+ }
+ }
}
PolicyInformation=function(options,defaultOption,id,name){
}
return "";
}
+
+ changePolicyOption=function(id){
+ var value = $("#main-content #policy-"+id + " option:selected").val();
+ self.proxyConnector.updatePolicyEntry(id,value);
+ }
+
+
getPolicyOptions=function(id){
var policyInformations=self.proxyConnectorsViewModel.policyInformations();
for(i=0;i<policyInformations.length;i++){
<th title="${$.i18n.prop('proxy-connectors.grid.remoterepo.title')}">
${$.i18n.prop('proxy-connectors.grid.remoterepo.grid.header')}
</th>
+ <th>
+ ${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}
+ </th>
<th>
${$.i18n.prop('edit')}
</th>
<tr>
<td>${row.sourceRepoId()}</td>
<td>${row.targetRepoId()}-${row.order()}</td>
+ <td><img src="images/utilities-system-monitor.png" id="proxy-connectors-grid-remoterepo-settings-edit-${row.sourceRepoId()}-${row.targetRepoId()}"
+ data-original-title="${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}"
+ data-bind="event: { mouseover: function(){ showSettings(row)},}"></td>
<td>
- <a data-original-title="${$.i18n.prop('proxy-connectors.grid.remoterepo.settings.popover.title')}"
- data-bind="event: { mouseover: function(){ showSettings(row)},},click: function(){ editProxyConnector(row)}"
- id="proxy-connectors-grid-remoterepo-settings-edit-${row.sourceRepoId()}-${row.targetRepoId()}" href="#">
+ <a data-bind="click: function(){ editProxyConnector(row)}" href="#">
${$.i18n.prop('edit')}
</a>
<div id="proxy-connectors-grid-remoterepo-settings-content-${row.sourceRepoId()}-${row.targetRepoId()}"
<tr>
<td data-bind="text: name"></td>
<td>
- <select data-bind="options: getPolicyOptions(id()),value:getSelectedPolicyOption(id()),attr: { id: 'policy-'+id() }"></select>
+ <select
+ data-bind="options: getPolicyOptions(id()),value:getSelectedPolicyOption(id()),
+ attr: { id: 'policy-'+id() },event: { change: function(){ changePolicyOption(id())},}"
+ ></select>
</td>
</tr>
</tbody>