Commit 49f2022030c21ed15e37b2bc2fb19e60307eda60
- Diff rendering mode:
- inline
- side by side
dss-setup-interface/dSS/util/Util.js
(27 / 0)
|   | |||
| 33 | 33 | } | |
| 34 | 34 | }); | |
| 35 | 35 | } | |
| 36 | |||
| 37 | dSS.util.callSceneOnZone = function(zoneId, sceneNumber, groupId) { | ||
| 38 | Ext.Ajax.request({ | ||
| 39 | url: '/json/zone/callScene', | ||
| 40 | disableCaching: true, | ||
| 41 | method: "GET", | ||
| 42 | params: { id : zoneId, | ||
| 43 | sceneNumber : sceneNumber, | ||
| 44 | groupID : groupId}, | ||
| 45 | success: function(result, request) { | ||
| 46 | try { | ||
| 47 | var jsonData = Ext.util.JSON.decode(result.responseText); | ||
| 48 | if (!jsonData.ok) { | ||
| 49 | Ext.MessageBox.alert(_("Could not call scene") + " " + | ||
| 50 | sceneNumber, jsonData.message); | ||
| 51 | } | ||
| 52 | } catch (err) { | ||
| 53 | Ext.MessageBox.alert(_("Error"), | ||
| 54 | _("Could not send callScene command to dSS") + ": " + err); | ||
| 55 | } | ||
| 56 | }, | ||
| 57 | failure: function(result, request) { | ||
| 58 | Ext.MessageBox.alert(_("Error"), | ||
| 59 | _("Could not send callScene command to dSS")); | ||
| 60 | } | ||
| 61 | }); | ||
| 62 | } |

