forked from volumio/Volumio2-UI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added custom jshint & jscs and validated all JS - Before theme restru…
…cturing
- Loading branch information
Showing
44 changed files
with
618 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"requireCurlyBraces": [ | ||
"if", | ||
"else", | ||
"for", | ||
"while", | ||
"do", | ||
"try", | ||
"catch" | ||
], | ||
"esnext": true, | ||
"requireCamelCaseOrUpperCaseIdentifiers": true, | ||
"maximumLineLength": { | ||
"value": 120, | ||
"allowComments": true, | ||
"allowRegex": true | ||
}, | ||
"validateIndentation": 2, | ||
"validateQuoteMarks": "'", | ||
"validateParameterSeparator": ", ", | ||
|
||
"disallowMultipleLineStrings": true, | ||
"disallowMixedSpacesAndTabs": true, | ||
"disallowTrailingWhitespace": true, | ||
"disallowTrailingComma": true, | ||
"disallowSpaceAfterPrefixUnaryOperators": true, | ||
"disallowSpacesInCallExpression": true, | ||
"disallowPaddingNewlinesInBlocks": true, | ||
"requireCommaBeforeLineBreak": true, | ||
"requireCapitalizedConstructors": true, | ||
|
||
"disallowKeywordsOnNewLine": ["else", "catch", "finally"], | ||
|
||
"requireSpaceAfterKeywords": [ | ||
"if", | ||
"else", | ||
"for", | ||
"switch", | ||
"return", | ||
"try" | ||
], | ||
"requireSpaceBeforeBinaryOperators": [ | ||
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", | ||
"&=", "|=", "^=", "+=", | ||
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&", | ||
"|", "^", "&&", "||", "===", "==", ">=", | ||
"<=", "<", ">", "!=", "!==" | ||
], | ||
"requireSpaceAfterBinaryOperators": true, | ||
"requireSpacesInConditionalExpression": true, | ||
"requireSpaceBeforeBlockStatements": true, | ||
"requireLineFeedAtFileEnd": true, | ||
"requireSpacesInFunctionExpression": { | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
"disallowSpacesInAnonymousFunctionExpression": { | ||
"beforeOpeningRoundBrace": true | ||
}, | ||
"disallowSpacesInsideObjectBrackets": "nested", | ||
"disallowSpacesInsideArrayBrackets": "nested", | ||
"disallowSpacesInsideParentheses": true, | ||
"disallowSpaceAfterObjectKeys": true, | ||
"requireSpaceBeforeObjectValues": true, | ||
|
||
"disallowNewlineBeforeBlockStatements": true, | ||
|
||
"fileExtensions": [ ".js", "jscs", ".es6" ], | ||
|
||
"requireSpaceBetweenArguments": true, | ||
"requireParenthesesAroundIIFE": true, | ||
|
||
"disallowKeywords": ["with"], | ||
"disallowImplicitTypeConversion": ["string"], | ||
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], | ||
|
||
"safeContextKeyword": "_this", | ||
"requireBlocksOnNewline": 1, | ||
"requireLineBreakAfterVariableAssignment": true, | ||
"requireMultipleVarDecl": "onevar", | ||
|
||
"excludeFiles": [ | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,90 @@ | ||
{ | ||
"passfail": false, | ||
"maxerr": 100, | ||
"browser": true, | ||
"node": true, | ||
"rhino": false, | ||
"couch": false, | ||
"wsh": true, | ||
"jquery": true, | ||
"prototypejs": false, | ||
"mootools": false, | ||
"dojo": false, | ||
"debug": true, | ||
"devel": true, | ||
"strict": false, | ||
"globalstrict": false, | ||
"esnext": true, | ||
"bitwise": true, | ||
"asi": false, | ||
"laxbreak": false, | ||
"bitwise": false, | ||
"boss": false, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"eqnull": false, | ||
"evil": false, | ||
"expr": true, | ||
"forin": false, | ||
"immed": true, | ||
"latedef": false, | ||
"loopfunc": false, | ||
"noarg": true, | ||
"regexp": true, | ||
"regexdash": false, | ||
"scripturl": true, | ||
"shadow": true, | ||
"supernew": false, | ||
"undef": true, | ||
"unused": true, | ||
"validthis": true, | ||
"jasmine": true, | ||
"globals": { | ||
"angular": false, | ||
"inject": false, | ||
"module": false, | ||
"io": true, | ||
"socket": true, | ||
"toastr": true | ||
}, | ||
"devel": { | ||
"console": true | ||
} | ||
"funcscope": false, | ||
"iterator": false, | ||
"lastsemic": false, | ||
"laxcomma": false, | ||
"nonstandard": true, | ||
"onecase": false, | ||
"proto": false, | ||
"smarttabs": false, | ||
"validthis": false, | ||
"unused": false, | ||
"newcap": true, | ||
"noempty": false, | ||
"nonew": true, | ||
"nomen": false, | ||
"onevar": false, | ||
"plusplus": false, | ||
"sub": true, | ||
"trailing": true, | ||
"white": true, | ||
"indent": 2, | ||
"predef": [ | ||
"define", | ||
"describe", | ||
"beforeEach", | ||
"afterEach", | ||
"beforeAll", | ||
"afterAll", | ||
"expect", | ||
"it", | ||
"xit", | ||
"IScroll", | ||
"moment", | ||
"inject", | ||
"jasmine", | ||
"xdescribe", | ||
"Snap", | ||
"mina", | ||
"TestElement", | ||
"TestUtils", | ||
"sprintf", | ||
"angular", | ||
"_", | ||
"wrapGenerator", | ||
"bouncefix", | ||
"spyOn", | ||
"google", | ||
"d3", | ||
"_satellite", | ||
"picturefill", | ||
"io", | ||
"socket" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"esnext": true, | ||
"bitwise": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"latedef": false, | ||
"noarg": true, | ||
"undef": true, | ||
"unused": true, | ||
"validthis": true, | ||
"jasmine": true, | ||
"globals": { | ||
"angular": false, | ||
"inject": false, | ||
"module": false, | ||
"io": true, | ||
"socket": true, | ||
"toastr": true | ||
}, | ||
"devel": { | ||
"console": true | ||
} | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<!doctype html><html ng-app="volumio"><head><meta charset="utf-8"><title>Volumio</title><meta name="description" content=""><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"><link rel="stylesheet" href="styles/vendor-cd4f69ac82.css"><link rel="stylesheet" href="styles/app-2fc5dea85d.css"></head><body><!--[if lt IE 10]> | ||
<!doctype html><html ng-app="volumio"><head><meta charset="utf-8"><title>Axiom air</title><meta name="description" content=""><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"><link rel="shortcut icon" type="image/png" href="favicon.png"><link rel="stylesheet" href="styles/vendor-cd4f69ac82.css"><link rel="stylesheet" href="styles/app-83f16077a4.css"></head><body><!--[if lt IE 10]> | ||
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> | ||
<![endif]--><div ui-view="layout"></div><script src="scripts/vendor-f1865dec62.js"></script><script src="scripts/app-47a349f7e2.js"></script></body></html> | ||
<![endif]--><div ui-view="layout"></div><script src="scripts/vendor-f1865dec62.js"></script><script src="scripts/app-5feaddcfe9.js"></script></body></html> |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// jshint ignore: start | ||
// jscs:disable | ||
'use strict'; | ||
|
||
var path = require('path'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// jshint ignore: start | ||
// jscs:disable | ||
'use strict'; | ||
|
||
var path = require('path'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// jshint ignore: start | ||
// jscs:disable | ||
'use strict'; | ||
|
||
var path = require('path'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// jshint ignore: start | ||
// jscs:disable | ||
'use strict'; | ||
|
||
var path = require('path'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
<div class="modal-header"> | ||
<h3 class="modal-title">{{modalPlaylist.params.title}}</h3> | ||
</div> | ||
<div class="modal-body"> | ||
<ul class="list-group"> | ||
<li class="list-group-item"> | ||
<input type="text" ng-model="modalPlaylist.customPlaylist"> | ||
<button type="button" ng-click="modalPlaylist.addToCustomPlaylist()">New</button> | ||
</li> | ||
<li class="list-group-item" | ||
ng-click="modalPlaylist.addToFavourite()" | ||
> | ||
Favourites | ||
</li> | ||
<li ng-repeat="playlist in modalPlaylist.params.playlists track by $index" | ||
class="list-group-item" | ||
ng-click="modalPlaylist.addToPlaylist(playlist)" | ||
> | ||
{{playlist}} | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="modal-footer"> | ||
<!-- <button class="btn btn-primary" ng-click="modalPlaylist.ok()">Add</button> --> | ||
<button class="btn btn-warning" ng-click="modalPlaylist.cancel()">Cancel</button> | ||
<div id="modalPlaylist"> | ||
<div class="modal-header"> | ||
<h3 class="modal-title">{{modalPlaylist.params.title}}</h3> | ||
</div> | ||
<div class="modal-body"> | ||
<input type="text" ng-model="modalPlaylist.customPlaylist"> | ||
<button type="button" ng-click="modalPlaylist.addToCustomPlaylist()"> | ||
New | ||
</button> | ||
<ul class="list-group"> | ||
<li class="list-group-item" | ||
ng-click="modalPlaylist.addToFavourite()"> | ||
Favourites | ||
</li> | ||
<li ng-repeat="playlist in modalPlaylist.params.playlists track by $index" | ||
class="list-group-item" | ||
ng-click="modalPlaylist.addToPlaylist(playlist)"> | ||
{{playlist}} | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="modal-footer"> | ||
<!-- <button class="btn btn-primary" ng-click="modalPlaylist.ok()">Add</button> --> | ||
<button class="btn btn-warning" ng-click="modalPlaylist.cancel()"> | ||
Cancel | ||
</button> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/app/components/side-menu/elements/modal-alarm-clock.controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
class ModalAlarmClockController { | ||
constructor ($modalInstance, socketService, params) { | ||
'ngInject'; | ||
this.$modalInstance = $modalInstance; | ||
this.socketService = socketService; | ||
this.params = params; | ||
console.log(params); | ||
this.init(); | ||
} | ||
|
||
cancel() { | ||
this.$modalInstance.dismiss('cancel'); | ||
} | ||
|
||
init() { | ||
this.registerListner(); | ||
this.initService(); | ||
} | ||
|
||
registerListner() { | ||
// this.socketService.on('pushSleep', (data) => { | ||
// console.warn('pushSleep', data); | ||
// //this.menuItems = data; | ||
// }); | ||
} | ||
|
||
initService() { | ||
//this.socketService.emit('getSleep'); | ||
} | ||
} | ||
|
||
export default ModalAlarmClockController; |
Oops, something went wrong.