Author: ygrego Date: 2015-05-29 12:56:02 +0000 (Fri, 29 May 2015) New Revision: 1569 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1569 Log: Addition of an element in map "dispatcher" contained in constructor. Addition of the new method "_createChannelFromConf". Modified: oipf/js/impl/model/Channel.js Modified: oipf/js/impl/model/Channel.js =================================================================== --- oipf/js/impl/model/Channel.js 2015-05-29 12:48:27 UTC (rev 1568) +++ oipf/js/impl/model/Channel.js 2015-05-29 12:56:02 UTC (rev 1569) @@ -122,7 +122,14 @@ locked: null, init: function () { - var dispatcher = { 3: "_createChannelATSC_T", 4: "_createChannelDVB_SI_DIRECT", 5: "_createChannelDVBOrISDB", 6: "_createChannelIPTV"}; + var dispatcher = { + 1: "_createChannelFromConf", + 3: "_createChannelATSC_T", + 4: "_createChannelDVB_SI_DIRECT", + 5: "_createChannelDVBOrISDB", + 6: "_createChannelIPTV" + }; + (arguments.length != 6) && this._setCcid(createUUID()); this[dispatcher[arguments.length]].apply(this, arguments); @@ -162,6 +169,10 @@ _setCcid: function(ccid) { this.ccid = ccid.toString(); + }, + + _createChannelFromConf: function(channelConf) { + oipf.utils.initProperties.call(this, channelConf); } }); \ No newline at end of file
participants (1)
-
ygregoï¼ users.nuiton.org