Merge ~mpontillo/maas:remove-es6-for-now into maas:master

Proposed by Mike Pontillo
Status: Merged
Approved by: Mike Pontillo
Approved revision: 7620d84472f610759334f40660346d3bd62f73e7
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~mpontillo/maas:remove-es6-for-now
Merge into: maas:master
Diff against target: 24 lines (+3/-3)
1 file modified
src/maasserver/static/js/angular/directives/maas_obj_form.js (+3/-3)
Reviewer Review Type Date Requested Status
Lee Trager (community) Approve
Review via email: mp+342485@code.launchpad.net

Commit message

Remove ES6 (for now).

Description of the change

The team decided that to stick to ES5 JavaScript for now, to maintain consistency with existing code.

While I would personally prefer to keep the existing ES6 and continue to phase it in, this branch removes the ES6 that I have so far intentionally added.

To post a comment you must log in.
Revision history for this message
Lee Trager (ltrager) wrote :

We should discuss allowing ES6 for next cycle as I agree phasing ES6 in would be a good way forward.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/static/js/angular/directives/maas_obj_form.js b/src/maasserver/static/js/angular/directives/maas_obj_form.js
2index b2c394f..d98820c 100644
3--- a/src/maasserver/static/js/angular/directives/maas_obj_form.js
4+++ b/src/maasserver/static/js/angular/directives/maas_obj_form.js
5@@ -555,7 +555,7 @@ angular.module('MAAS').directive('maasObjField', ['$compile',
6 " are required on maas-obj-field.");
7 }
8 if(angular.isString(attrs.disabled)) {
9- scope.ngDisabled = () => true;
10+ scope.ngDisabled = function() { return true; };
11 }
12
13 // Remove transcluded element.
14@@ -845,8 +845,8 @@ angular.module('MAAS').directive('maasObjField', ['$compile',
15 '</input>'
16 ].join(''));
17 inputElement = $compile(inputElement)(hiddenScope);
18- scope.getValue = () => attrs.value;
19- scope.updateValue = () => null;
20+ scope.getValue = function() { return attrs.value; };
21+ scope.updateValue = function() { return null; };
22 } else if(attrs.type === "onoffswitch") {
23 var switchScope = scope.$new();
24 switchScope._toggle = controller.registerField(

Subscribers

People subscribed via source and target branches