Commit 3db5d4fc4e8b56748cf01787c7c3f9e1cc961d59

  • avatar
  • Sergey 'Jin' Bostandzhyan <jin @deve…per.digitalstrom.org>
  • Wed Jul 28 16:02:20 CEST 2010
Added zone/saveScene method
dss-setup-interface/dSS/util/Util.js
(27 / 0)
  
6060 }
6161 });
6262}
63
64dSS.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}