Fix issue where selecting new device in rnav caused exception

Correct window.location redirect syntax
This commit is contained in:
stevenA 2022-01-09 13:05:35 +01:00
parent 88f4fba2c0
commit 8013474e75
2 changed files with 8 additions and 3 deletions

View file

@ -1,7 +1,7 @@
<module> <module>
<rawname>sccp_manager</rawname> <rawname>sccp_manager</rawname>
<name>SCCP Manager</name> <name>SCCP Manager</name>
<version>14.3.0.27</version> <version>14.3.0.28</version>
<type>setup</type> <type>setup</type>
<category>SCCP Connectivity</category> <category>SCCP Connectivity</category>
<publisher>Steve Lad, Alex GP</publisher> <publisher>Steve Lad, Alex GP</publisher>
@ -33,6 +33,7 @@
* Version 14.3.0.25 * - Fix Issue 55 * Version 14.3.0.25 * - Fix Issue 55
* Version 14.3.0.26 * - Fix Issue 54 * Version 14.3.0.26 * - Fix Issue 54
* Version 14.3.0.27 * - Standardise treatment of SIP and SCCP hardware. * Version 14.3.0.27 * - Standardise treatment of SIP and SCCP hardware.
* Version 14.3.0.28 * - Fix issue with RNav which caused exception with new device
</changelog> </changelog>
<location>https://github.com/chan-sccp/sccp_manager</location> <location>https://github.com/chan-sccp/sccp_manager</location>
<supported> <supported>

View file

@ -17,13 +17,17 @@
class="table"> class="table">
<thead> <thead>
<tr> <tr>
<th data-sortable="true" data-field="mac"><?php echo _('SEP ID')?></th> <th data-sortable="true" data-field="name"><?php echo _('SEP ID')?></th>
<th data-sortable="true" data-field="description"><?php echo _('Descriptions')?></th> <th data-sortable="true" data-field="description"><?php echo _('Descriptions')?></th>
</tr> </tr>
</thead> </thead>
</table> </table>
<script type="text/javascript"> <script type="text/javascript">
$("#sccpnavgrid").on('click-row.bs.table',function(e,row,elem){ $("#sccpnavgrid").on('click-row.bs.table',function(e,row,elem){
window.location = '?display=sccp_phone&tech_hardware=cisco&id='+row['mac']; if (row['new_hw'] == 'Y' ) {
window.location = '?display=sccp_phone&tech_hardware=cisco&new_id=' +row['name'] +'&' +row['type'];
} else {
window.location = '?display=sccp_phone&tech_hardware=cisco&id='+row['name'];
};
}) })
</script> </script>