Skip to content

Commit

Permalink
Updated: es5 function expressions to es6 arrow functions
Browse files Browse the repository at this point in the history
  • Loading branch information
nervgh committed Jul 29, 2015
1 parent f7457d2 commit f7b0bf7
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 94 deletions.
8 changes: 4 additions & 4 deletions src/directives/FileDrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import CONFIG from './../config.json';


export default function __($parse, FileUploader, FileDrop) {
export default ($parse, FileUploader, FileDrop) => {


return {
link: function(scope, element, attributes) {
link: (scope, element, attributes) => {
var uploader = scope.$eval(attributes.uploader);

if (!(uploader instanceof FileUploader)) {
Expand All @@ -23,15 +23,15 @@ export default function __($parse, FileUploader, FileDrop) {
});

object.getOptions = $parse(attributes.options).bind(object, scope);
object.getFilters = function() {return attributes.filters;};
object.getFilters = () => attributes.filters;
}
};


}


__.$inject = [
module.exports.$inject = [
'$parse',
'FileUploader',
'FileDrop'
Expand Down
10 changes: 4 additions & 6 deletions src/directives/FileOver.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import CONFIG from './../config.json';


export default function __(FileUploader, FileOver) {
export default (FileUploader, FileOver) => {


return {
link: function(scope, element, attributes) {
link: (scope, element, attributes) => {
var uploader = scope.$eval(attributes.uploader);

if (!(uploader instanceof FileUploader)) {
Expand All @@ -20,17 +20,15 @@ export default function __(FileUploader, FileOver) {
element: element
});

object.getOverClass = function() {
return attributes.overClass || this.overClass;
};
object.getOverClass = () => attributes.overClass || object.overClass;
}
};


}


__.$inject = [
module.exports.$inject = [
'FileUploader',
'FileOver'
];
8 changes: 4 additions & 4 deletions src/directives/FileSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import CONFIG from './../config.json';


export default function __($parse, FileUploader, FileSelect) {
export default ($parse, FileUploader, FileSelect) => {


return {
link: function(scope, element, attributes) {
link: (scope, element, attributes) => {
var uploader = scope.$eval(attributes.uploader);

if (!(uploader instanceof FileUploader)) {
Expand All @@ -21,15 +21,15 @@ export default function __($parse, FileUploader, FileSelect) {
});

object.getOptions = $parse(attributes.options).bind(object, scope);
object.getFilters = function() {return attributes.filters;};
object.getFilters = () => attributes.filters;
}
};


}


__.$inject = [
module.exports.$inject = [
'$parse',
'FileUploader',
'FileSelect'
Expand Down
4 changes: 2 additions & 2 deletions src/services/FileDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let {
} = angular;


export default function __() {
export default () => {


class FileDirective {
Expand Down Expand Up @@ -78,5 +78,5 @@ export default function __() {
}


__.$inject = [
module.exports.$inject = [
];
4 changes: 2 additions & 2 deletions src/services/FileDrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let {
} = angular;


export default function __(FileDirective) {
export default (FileDirective) => {


class FileDrop extends FileDirective {
Expand Down Expand Up @@ -119,6 +119,6 @@ export default function __(FileDirective) {
}


__.$inject = [
module.exports.$inject = [
'FileDirective'
];
4 changes: 2 additions & 2 deletions src/services/FileItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let {
} = angular;


export default function __($compile, FileLikeObject) {
export default ($compile, FileLikeObject) => {


class FileItem {
Expand Down Expand Up @@ -250,7 +250,7 @@ export default function __($compile, FileLikeObject) {
}


__.$inject = [
module.exports.$inject = [
'$compile',
'FileLikeObject'
];
4 changes: 2 additions & 2 deletions src/services/FileLikeObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let {
} = angular;


export default function __() {
export default () => {


class FileLikeObject {
Expand Down Expand Up @@ -56,5 +56,5 @@ export default function __() {
}


__.$inject = [
module.exports.$inject = [
];
4 changes: 2 additions & 2 deletions src/services/FileOver.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import CONFIG from './../config.json';


export default function __(FileDirective) {
export default (FileDirective) => {


class FileOver extends FileDirective {
Expand Down Expand Up @@ -51,6 +51,6 @@ export default function __(FileDirective) {
}


__.$inject = [
module.exports.$inject = [
'FileDirective'
];
4 changes: 2 additions & 2 deletions src/services/FileSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import CONFIG from './../config.json';


export default function __(FileDirective) {
export default (FileDirective) => {


class FileSelect extends FileDirective {
Expand Down Expand Up @@ -67,6 +67,6 @@ export default function __(FileDirective) {
}


__.$inject = [
module.exports.$inject = [
'FileDirective'
];
Loading

0 comments on commit f7b0bf7

Please sign in to comment.