Details | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2073 | runge | 1 | |
| 2 | pages.irremotes = { |
||
| 3 | init: function(pageInstance) |
||
| 4 | { |
||
| 5 | /* List to keep referenses to all the different slider elements */ |
||
| 6 | pageInstance.pageButtonElements = {}; |
||
| 7 | |||
| 8 | |||
| 9 | jQuery.each(pageInstance.remotes, function(n, remote) |
||
| 10 | { |
||
| 11 | sendCommand("Storage_ListParametersRaw Remote_" + remote, function(jsonData) |
||
| 12 | { |
||
| 13 | jQuery.each(jsonData.results, function(button, data) |
||
| 14 | { |
||
| 15 | pageInstance.pageButtonElements[remote + "_" + button] = $("#page-irremotes-button-template").tmpl({ button: button }).appendTo(pageInstance.pageContentElement).trigger("create").find("button").on("click", function(event) |
||
| 16 | { |
||
| 17 | jQuery.each(pageInstance.aliases, function(i, alias) |
||
| 18 | { |
||
| 19 | sendCommand("IROut_SendBurst " + alias + " " + remote + " " + button); |
||
| 20 | }); |
||
| 21 | |||
| 22 | event.preventDefault(); |
||
| 23 | }); |
||
| 24 | }); |
||
| 25 | }); |
||
| 26 | }); |
||
| 27 | } |
||
| 28 | }; |