r785 - in oipf/js: impl/model initObj
Author: ygrego Date: 2015-02-10 11:09:44 +0000 (Tue, 10 Feb 2015) New Revision: 785 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/785 Log: New creation style for array of channel into 'initChannel' and correction of elements access of object 'ChannelList' into 'ChannelList.getChannel'. Modified: oipf/js/impl/model/ChannelList.js oipf/js/initObj/init.js Modified: oipf/js/impl/model/ChannelList.js =================================================================== --- oipf/js/impl/model/ChannelList.js 2015-02-10 10:58:18 UTC (rev 784) +++ oipf/js/impl/model/ChannelList.js 2015-02-10 11:09:44 UTC (rev 785) @@ -26,7 +26,7 @@ */ getChannel: function(channelID) { for (var i = 0; i < this.length; i++) { - var channel = this.[i]; + var channel = this.elts[i]; if (channel && (channel.channelID == channelID)) { return channel; } Modified: oipf/js/initObj/init.js =================================================================== --- oipf/js/initObj/init.js 2015-02-10 10:58:18 UTC (rev 784) +++ oipf/js/initObj/init.js 2015-02-10 11:09:44 UTC (rev 785) @@ -17,7 +17,9 @@ var channel2 = new Channel(channelName, channelType); channelConfig.currentChannel = channel1; - channelConfig.channelList = new ChannelList([channel1, channel2]); + var channelTab = []; + channelTab.push(channel1, channel2); + channelConfig.channelList = new ChannelList(channelTab); } var oipfObjectFactory = new OipfObjectFactory();
participants (1)
-
ygregoï¼ users.nuiton.org