Author: ygrego Date: 2015-06-09 13:21:52 +0000 (Tue, 09 Jun 2015) New Revision: 1651 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1651 Log: Deletion of commas in classes which are not required in ES6 + Transformation of severals classes in ES6 classes. Modified: oipf/lib/js/impl/ChannelConfig.js oipf/lib/js/impl/CodManagerObject.js oipf/lib/js/impl/ConfigurationObject.js oipf/lib/js/impl/NotifSocketObject.js Modified: oipf/lib/js/impl/ChannelConfig.js =================================================================== --- oipf/lib/js/impl/ChannelConfig.js 2015-06-09 13:12:47 UTC (rev 1650) +++ oipf/lib/js/impl/ChannelConfig.js 2015-06-09 13:21:52 UTC (rev 1651) @@ -88,7 +88,7 @@ /* Visibility : readonly FavouriteList */ this.currentFavouriteList = this._channelService.currentFavouriteList; - }, + } _getCallback(type) { if (this._callbacks) { @@ -101,6 +101,7 @@ this._callbacks[type] = callback; } } + /* * Description: * This function is the DOM 0 event handler for events relating to channel list updates. Upon receiving a @@ -130,9 +131,9 @@ */ get onChannelScan() { return this._getCallback("ChannelScan"); - }, + } set onChannelScan(callback) { this._setCallback("ChannelScan", callback); - }, + } } Modified: oipf/lib/js/impl/CodManagerObject.js =================================================================== --- oipf/lib/js/impl/CodManagerObject.js 2015-06-09 13:12:47 UTC (rev 1650) +++ oipf/lib/js/impl/CodManagerObject.js 2015-06-09 13:21:52 UTC (rev 1651) @@ -1,7 +1,6 @@ -var CodManagerObject = Class.extend({ +class CodManagerObject { - init : function(){ - + constructor(){ } -}); \ No newline at end of file +} Modified: oipf/lib/js/impl/ConfigurationObject.js =================================================================== --- oipf/lib/js/impl/ConfigurationObject.js 2015-06-09 13:12:47 UTC (rev 1650) +++ oipf/lib/js/impl/ConfigurationObject.js 2015-06-09 13:21:52 UTC (rev 1651) @@ -3,70 +3,69 @@ * The OITF SHALL implement the “ application/oipfConfiguration ” object as defined below. This object * provides an interface to the configuration and user settings facilities within the OITF. */ -var ConfigurationObject = Class.extend({ - - /* - * Description: - * Accesses the configuration object that sets defaults and shows system settings. - * - * Visibility Type: readonly Configuration - */ - configuration: null, - - /* - * Description: - * Accesses the object representing the platform hardware. - * - * Visibility Type: readonly LocalSystem - */ - localSystem: null, +class ConfigurationObject { - init : function(){ + constructor() { + /* + * Description: + * Accesses the configuration object that sets defaults and shows system settings. + * + * Visibility Type: readonly Configuration + */ + this.configuration = null; + + /* + * Description: + * Accesses the object representing the platform hardware. + * + * Visibility Type: readonly LocalSystem + */ + this.localSystem = null; + this._listeners = {}; this._callbacks = {}; var configDefaultProperties = new ConfigDefaultProperties(); this._eventManager = new EventManager(); this.localSystem = new LocalSystem(configDefaultProperties); - this.configuration = - new Configuration(configDefaultProperties.configuration); - }, - - _getCallback : function(type) { + this.configuration = new Configuration(configDefaultProperties.configuration); + } + + _getCallback(type) { if (this._callbacks) { return this._callbacks[type]; } - }, - - _setCallback: function(type, callback) { + } + + _setCallback(type, callback) { if (this._callbacks) { this._callbacks[type] = callback; } - }, - + } + /* * Description: * The function that is called when the IP address of a network interface has changed. The specified function * is called with two arguments (NetworkInterface)item and (String)ipAddress. The ipAddress may have the value undefined if a previously assigned address has been * lost. - * + * */ get onIpAddressChange() { return this._getCallback("IpAddressChange"); - }, - + } + set onIpAddressChange(callback) { this._setCallback("IpAddressChange", callback); - }, - - addEventListener: function(type, listener) { + } + + addEventListener(type, listener) { this._eventManager.addEventListener(type, listener, this); - }, - - _fireEvent: function(event) { + } + + _fireEvent(event) { this._eventManager.fireEvent(event, this); - }, - - removeEventListener: function(type, listener) { + } + + removeEventListener(type, listener) { this._eventManager.removeEventListener(type, listener, this); } -}); +} Modified: oipf/lib/js/impl/NotifSocketObject.js =================================================================== --- oipf/lib/js/impl/NotifSocketObject.js 2015-06-09 13:12:47 UTC (rev 1650) +++ oipf/lib/js/impl/NotifSocketObject.js 2015-06-09 13:21:52 UTC (rev 1651) @@ -1,7 +1,6 @@ -var NotifSocketObject = Class.extend({ +class NotifSocketObject { - init : function(){ - + constructor: function(){ } -}); \ No newline at end of file +}