Commit 49f2022030c21ed15e37b2bc2fb19e60307eda60

  • avatar
  • Sergey 'Jin' Bostandzhyan <jin @deve…per.digitalstrom.org>
  • Wed Jul 28 13:30:07 CEST 2010
Added zone/callScene method
dss-setup-interface/dSS/util/Util.js
(27 / 0)
  
3333 }
3434 });
3535}
36
37dSS.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}