Skip to content

Commit

Permalink
Merge pull request ezsystems#179 from ezsystems/comments_cs_fixes
Browse files Browse the repository at this point in the history
Various CS and comment fixes
  • Loading branch information
dpobel committed Feb 25, 2015
2 parents 7a4a3f1 + d3a78df commit 4daee1c
Show file tree
Hide file tree
Showing 45 changed files with 62 additions and 89 deletions.
34 changes: 17 additions & 17 deletions Resources/public/js/apps/ez-platformuiapp.js
Expand Up @@ -110,9 +110,7 @@ YUI.add('ez-platformuiapp', function (Y) {
},

/**
* Initialize the application:
*
* * set up the 'close' event that closes the application
* Initializes the application.
*
* @method initializer
*/
Expand All @@ -127,8 +125,6 @@ YUI.add('ez-platformuiapp', function (Y) {
*/
this._initialTitle = Y.config.doc.title;

// Setting events handlers

this.on({
'*:closeApp': this.close,
'*:fatalError': this._handleError,
Expand All @@ -153,7 +149,8 @@ YUI.add('ez-platformuiapp', function (Y) {
},

/**
* Check if there is config to add to the application routes
* Reads the `routeConfig` configuration object and applies the given
* settings to the correct route.
*
* @protected
* @method _routeConfig
Expand All @@ -169,6 +166,9 @@ YUI.add('ez-platformuiapp', function (Y) {
*
* @protected
* @method _enrichRoute
* @param {Object} route a route object (an entry in the `routes`
* attribute)
* @param {Number} index
*/
_enrichRoute: function (route, index) {
if (this.get('routeConfig')[route.name]) {
Expand All @@ -186,7 +186,7 @@ YUI.add('ez-platformuiapp', function (Y) {
* @param {String} routeName the name of the route to look for
* @param {Object} [params] an object containing the key/value to replace
* in the route path
* @return {String} or null if the route was not found
* @return {String|Null} null if the route was not found
*/
routeUri: function (routeName, params) {
var route = Y.Array.find(this.get('routes'), function (elt) {
Expand Down Expand Up @@ -251,7 +251,7 @@ YUI.add('ez-platformuiapp', function (Y) {
},

/**
* Logs in a user using the provided the credentials. If the credentials
* Logs in a user using the provided credentials. If the credentials
* are wrong, the callback is called with the error and response from
* CAPI.logIn. If the credentials are correct, the error and response
* arguments are set with the ones from eZ.UserModel.load method. If the
Expand Down Expand Up @@ -616,8 +616,8 @@ YUI.add('ez-platformuiapp', function (Y) {
},

/**
* Event handler for the loadingChange event. Adds or removes the
* is-app-loading class on the application container.
* `loadingChange` event handler. Adds or removes the `is-app-loading`
* class on the application container.
*
* @method _loading
* @protected
Expand All @@ -631,7 +631,7 @@ YUI.add('ez-platformuiapp', function (Y) {
}
},

/*
/**
* Overrides the default implementation to make sure the view `active`
* attribute is set to true after the view is attached to the
* DOM. It also sets the loading flag to false and make sure the title
Expand Down Expand Up @@ -718,9 +718,9 @@ YUI.add('ez-platformuiapp', function (Y) {
* corresponding side view should be visible.
*
* If a route provides both a `regex` and a `path` properties, the
* `regex` in the route matching process, while the `path` can be
* used in the reverse routing process (generation of a link). If
* no `path` is provided, no reverse routing is possible.
* `regex` is used in the route matching process, while the `path`
* can be used in the reverse routing process (generation of a
* link). If no `path` is provided, no reverse routing is possible.
*
* @attribute routes
*/
Expand Down Expand Up @@ -857,7 +857,7 @@ YUI.add('ez-platformuiapp', function (Y) {
*
* @attribute capi
* @default null
* @type eZ.CAPI
* @type {eZ.CAPI}
* @writeOnce
* @required
*/
Expand All @@ -870,7 +870,7 @@ YUI.add('ez-platformuiapp', function (Y) {
* The logged in user
*
* @attribute user
* @type eZ.User
* @type {eZ.User}
* @readOnly
*/
user: {
Expand All @@ -884,7 +884,7 @@ YUI.add('ez-platformuiapp', function (Y) {
* Active view service instance
*
* @attribute activeViewService
* @type eZ.ViewService
* @type {eZ.ViewService}
* @readOnly
*/
activeViewService: {
Expand Down
Expand Up @@ -13,9 +13,10 @@ YUI.add('ez-universaldiscoveryplugin', function (Y) {

/**
* Universal discovery plugin. It connects the PlatformUI app and the
* universal discovery widget by setting two events handlers. Those events
* allow any component in the application to trigger or disable the
* universal discovery widget.
* universal discovery widget by setting the event handlers for the
* `contentDiscover`, `contentDiscovered` and `cancelDiscover` events.
* By triggering those events, any component can control the universal
* discovery widget.
*
* @namespace eZ.Plugin
* @class DiscoveryWidget
Expand Down
24 changes: 12 additions & 12 deletions Resources/public/js/services/ez-googlemapapiloader.js
Expand Up @@ -5,23 +5,26 @@
/* global google */
YUI.add('ez-googlemapapiloader', function (Y) {
"use strict";

Y.namespace('eZ');
/**
* Provides the Google map api loader service
*
* @module ez-googlemapapiloader
*/
Y.namespace('eZ.services');

var EVENT_MAP_API_READY = 'mapAPIReady',
EVENT_MAP_API_FAILED = 'mapAPIFailed',
GMAP_JSONP_URI = 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&callback={callback}';

/**
* A Component with one specific task - try to load Google Maps API and fire
* the EVENT_MAP_API_READY event in case of success or
* EVENT_MAP_API_FAILED event in case of problems encountered
* Google Maps API loader. It fires the `mapAPIReady` event when the Google
* Map API is ready or `mapAPIFailed` event if a loading error occurs.
*
* @class GoogleMapAPILoader
* @namespace eZ
* @constructor
* @param {Function} [JSONPRequest] constructor function of an object
* havving the same behaviour as Y.JSONPRequest
* having the same behaviour as Y.JSONPRequest
*/
function GoogleMapAPILoader(JSONPRequest) {
/**
Expand All @@ -47,22 +50,22 @@ YUI.add('ez-googlemapapiloader', function (Y) {
/**
* Fired once map API is correctly loaded
*
* @event EVENT_MAP_API_READY
* @event mapAPIReady
*/
this.publish(EVENT_MAP_API_READY, {fireOnce: true});

/**
* Fired once map API have failed to load
*
* @event EVENT_MAP_API_FAILED
* @event mapAPIFailed
*/
this.publish(EVENT_MAP_API_FAILED, {fireOnce: true});
}

GoogleMapAPILoader.prototype = {
/**
* Trying to load Google Maps API via JSONP and firing either
* EVENT_MAP_API_READY or EVENT_MAP_API_FAILED depending on results
* `mapAPIReady` or `mapAPIFailed` depending on results
*
* @method load
*/
Expand Down Expand Up @@ -122,9 +125,6 @@ YUI.add('ez-googlemapapiloader', function (Y) {
};

Y.augment(GoogleMapAPILoader, Y.EventTarget);

Y.eZ.GoogleMapAPILoader = GoogleMapAPILoader;

Y.namespace('eZ.services');
Y.eZ.services.mapAPILoader = new GoogleMapAPILoader();
});
1 change: 0 additions & 1 deletion Resources/public/js/services/ez-pluginregistry.js
Expand Up @@ -5,7 +5,6 @@ YUI.add('ez-pluginregistry', function (Y) {
*
* @module ez-pluginregistry
*/

Y.namespace('eZ');

/**
Expand Down
15 changes: 9 additions & 6 deletions Resources/public/js/views/actions/ez-buttonactionview.js
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-buttonactionview', function (Y) {
*
* @module ez-buttonactionview
*/

Y.namespace('eZ');

var ACTION_SUFFIX = 'Action';
Expand Down Expand Up @@ -77,8 +76,10 @@ YUI.add('ez-buttonactionview', function (Y) {
*/
_handleActionClick: function (e) {
/**
* Fired when the action button is clicked. Name of the event consists of the action view's 'actionId' attribute and 'Action' suffix.
* For example for a view with actionId = "publish", the event fired will be named "publishAction".
* Fired when the action button is clicked. Name of the event
* consists of the action view's 'actionId' attribute and 'Action'
* suffix. For example for a view with actionId = "publish", the
* event fired will be named "publishAction".
*
* @event <actionId>Action
* @param {eZ.Content} the content model object
Expand All @@ -104,8 +105,9 @@ YUI.add('ez-buttonactionview', function (Y) {
}, {
ATTRS: {
/**
* The priority of the action. Actions are orderd by priority (from top to bottom)
* If priority is equal, actions are ordered in the order they are added to list
* The priority of the action. Actions are orderd by priority (from
* top to bottom) If priority is equal, actions are ordered in the
* order they are added to list
*
* @attribute priority
* @default 0
Expand All @@ -116,7 +118,8 @@ YUI.add('ez-buttonactionview', function (Y) {
},

/**
* The primary action id, should be unique among other instances of actions, since it is used for styling, running commands, etc.
* The primary action id, should be unique among other instances of
* actions, since it is used for styling, running commands, etc.
*
* @attribute action
* @default ''
Expand Down
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-createcontentactionview', function (Y) {
*
* @module ez-createcontentactionview
*/

Y.namespace('eZ');

var IS_CONTENTTYPE_SELECTOR_LOADED = 'is-contenttypeselector-loaded';
Expand Down
1 change: 0 additions & 1 deletion Resources/public/js/views/actions/ez-previewactionview.js
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-previewactionview', function (Y) {
*
* @module ez-previewactionview
*/

Y.namespace('eZ');

var EDIT_PREVIEW_CONTAINER = '.ez-editpreviewview-container',
Expand Down
1 change: 0 additions & 1 deletion Resources/public/js/views/ez-actionbarview.js
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-actionbarview', function (Y) {
*
* @module ez-actionbarview
*/

Y.namespace('eZ');

/**
Expand Down
1 change: 0 additions & 1 deletion Resources/public/js/views/ez-barview.js
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-barview', function (Y) {
*
* @module ez-barview
*/

Y.namespace('eZ');

var BAR_VIEW_NAME = 'barView',
Expand Down
1 change: 0 additions & 1 deletion Resources/public/js/views/ez-contenteditformview.js
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-contenteditformview', function (Y) {
*
* @module ez-contenteditformview
*/

Y.namespace('eZ');

var COLLAPSED_CLASS = 'is-collapsed',
Expand Down
1 change: 0 additions & 1 deletion Resources/public/js/views/ez-contenteditview.js
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-contenteditview', function (Y) {
*
* @module ez-contenteditview
*/

Y.namespace('eZ');

var IS_SHOWING_TECH = 'is-showing-technicalinfos',
Expand Down
3 changes: 1 addition & 2 deletions Resources/public/js/views/ez-contenttypeselectorview.js
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-contenttypeselectorview', function (Y) {
*
* @module ez-contenttypeselector
*/

Y.namespace('eZ');

var _GET_NAME = function (type) {
Expand Down Expand Up @@ -40,7 +39,7 @@ YUI.add('ez-contenttypeselectorview', function (Y) {

destructor: function () {
var filter = this.get('filterView');

if ( filter ) {
filter.destroy();
this._set('filterView', undefined);
Expand Down
1 change: 0 additions & 1 deletion Resources/public/js/views/ez-discoverybarview.js
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-discoverybarview', function (Y) {
*
* @module ez-discoverybarview
*/

Y.namespace('eZ');

/**
Expand Down
1 change: 0 additions & 1 deletion Resources/public/js/views/ez-editactionbarview.js
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-editactionbarview', function (Y) {
*
* @module ez-editactionbarview
*/

Y.namespace('eZ');

/**
Expand Down
1 change: 0 additions & 1 deletion Resources/public/js/views/ez-editpreviewview.js
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-editpreviewview', function (Y) {
*
* @module ez-editpreviewview
*/

Y.namespace('eZ');

var IS_HIDDEN_CLASS = 'is-editpreview-hidden',
Expand Down
1 change: 0 additions & 1 deletion Resources/public/js/views/ez-errorview.js
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-errorview', function (Y) {
*
* @module ez-errorview
*/

Y.namespace('eZ');

var IS_HIDDEN_CLASS = 'is-hidden',
Expand Down
1 change: 0 additions & 1 deletion Resources/public/js/views/ez-fieldeditview.js
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-fieldeditview', function (Y) {
*
* @module ez-fieldeditview
*/

Y.namespace('eZ');

var L = Y.Lang,
Expand Down
4 changes: 2 additions & 2 deletions Resources/public/js/views/ez-fieldview.js
Expand Up @@ -40,7 +40,7 @@ YUI.add('ez-fieldview', function (Y) {
value: this._getFieldValue(),
isEmpty: isEmpty,
};

container.addClass(CONTAINER_CLASS_PREFIX + def.fieldType.toLowerCase());
if ( isEmpty ) {
container.addClass(FIELD_EMPTY_CLASS);
Expand Down Expand Up @@ -157,7 +157,7 @@ YUI.add('ez-fieldview', function (Y) {
*/
getFieldView: function (fieldTypeIdentifier) {
var view = Y.eZ.FieldView.REGISTRY[fieldTypeIdentifier];

if ( typeof view === 'function' ) {
return view;
}
Expand Down
1 change: 0 additions & 1 deletion Resources/public/js/views/ez-selectionfilterview.js
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-selectionfilterview', function (Y) {
*
* @module ez-selectionfilterview
*/

Y.namespace('eZ');

var SELECTION_FILTER_CLASS = 'ez-selection-filter',
Expand Down
1 change: 0 additions & 1 deletion Resources/public/js/views/ez-templatebasedview.js
Expand Up @@ -9,7 +9,6 @@ YUI.add('ez-templatebasedview', function (Y) {
*
* @module ez-templatebasedview
*/

Y.namespace('eZ');

var TPL_ELEM_SUFFIX = "-ez-template";
Expand Down

0 comments on commit 4daee1c

Please sign in to comment.