Author: smaisonneuve Date: 2015-06-09 15:38:00 +0000 (Tue, 09 Jun 2015) New Revision: 1666 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1666 Log: [Refactor] Turning Source into es6 class Modified: oipf/lib/js/impl/model/Source.js Modified: oipf/lib/js/impl/model/Source.js =================================================================== --- oipf/lib/js/impl/model/Source.js 2015-06-09 15:37:51 UTC (rev 1665) +++ oipf/lib/js/impl/model/Source.js 2015-06-09 15:38:00 UTC (rev 1666) @@ -1,24 +1,19 @@ -/* - * Just a object which represent the access to broadcasted contents.s - * +/* + * Just a object which represent the access to broadcasted contents.s + * */ -var Source = Class.extend({ - - currentChannel: null, - - tuner: null, - - init: function(currentChannel) { +class Source { + + constructor(currentChannel) { + this.tuner = null; this.currentChannel = currentChannel; - }, - - switch: function(tuner, channel, vidBroadObjTenantID){ + } + + switch(tuner, channel, vidBroadObjTenantID) { this.currentChannel = channel; this.tuner = tuner; this.tuner._tenant = vidBroadObjTenantID; - - } -}); - + } +}