Commit 3db5d4fc4e8b56748cf01787c7c3f9e1cc961d59
- Diff rendering mode:
- inline
- side by side
dss-setup-interface/dSS/util/Util.js
(27 / 0)
|   | |||
| 60 | 60 | } | |
| 61 | 61 | }); | |
| 62 | 62 | } | |
| 63 | |||
| 64 | dSS.util.saveSceneOnZone = function(zoneId, sceneNumber, groupId) { | ||
| 65 | Ext.Ajax.request({ | ||
| 66 | url: '/json/zone/callScene', | ||
| 67 | disableCaching: true, | ||
| 68 | method: "GET", | ||
| 69 | params: { id : zoneId, | ||
| 70 | sceneNumber : sceneNumber, | ||
| 71 | groupID : groupId}, | ||
| 72 | success: function(result, request) { | ||
| 73 | try { | ||
| 74 | var jsonData = Ext.util.JSON.decode(result.responseText); | ||
| 75 | if (!jsonData.ok) { | ||
| 76 | Ext.MessageBox.alert(_("Could not call scene") + " " + | ||
| 77 | sceneNumber, jsonData.message); | ||
| 78 | } | ||
| 79 | } catch (err) { | ||
| 80 | Ext.MessageBox.alert(_("Error"), | ||
| 81 | _("Could not send callScene command to dSS") + ": " + err); | ||
| 82 | } | ||
| 83 | }, | ||
| 84 | failure: function(result, request) { | ||
| 85 | Ext.MessageBox.alert(_("Error"), | ||
| 86 | _("Could not send callScene command to dSS")); | ||
| 87 | } | ||
| 88 | }); | ||
| 89 | } |

