Commit graph

8 commits

Author SHA1 Message Date
Hyzual
58829facd6 Minor code style adjustments to comply with our jscsrc. 2015-07-07 22:10:22 +02:00
Hyzual
9fbd7bcf8e Removes jquery.base64.js (unused), replaced jquery.dateFormat-1.0.js with its bower version
- Adds a unit test in archive-service to test that we do use utils.formatDate
- Minor changes in subsonic-service.js to use a variable name rather than "this", which can change
2015-05-01 13:08:05 +02:00
Hyzual
f1870f2f5b Fixes tsquillario/Jamstash#206
- We no longer use toString() if the album's artist info is missing.
- Moved date formatting to utils-service.js and added TODOs to use angular filters instead
- Cleaned up utils-service.js and remove unused functions
- We no longer exclude vendor js files in karma, so we can test our call to jquery.dateFormat
2015-04-12 21:04:27 +02:00
Hyzual
841336cafd Refactors subsonic-service's search() to use subsonicRequest()
So we can move closer to consistent error-reporting and protocol usage.
- refactors subonic-controller's search().
- Adds a mapAlbumss() method to model-service.js. Just as mapSongs(), it maps an array of albums and returns it.
- Refactors the SearchTypes so their id is an int (0,1,2), just like we already expected it in subsonic-service. This means it might invalidate the existing setting saved in localStorage, so people would have an empty option selected by default until they save their settings.
- Adds unit-tests.
2015-03-24 18:35:48 +01:00
Hyzual
ef57aac043 Refactors subsonic-service's getPodcast() to use subsonicRequest()
So we can move closer to consistent error-reporting and protocol usage.
- refactors subonic-controller's getPodcast().
- Also sets all the selected things (playlist, album, etc.) to null.
- Adds a mapPodcasts() method to model-service.js. Just as mapSongs(), it maps an array of podcast episodes and returns it.
- Adds unit-tests.
2015-03-24 18:35:48 +01:00
Hyzual
f21b6a3ec4 Removes mapArtist, mapIndex and model.Index
Subsonic doesn't seem to ever send undefined names, ids or artists so those are superfluous.
2015-03-24 18:35:45 +01:00
Hyzual
96cd551a84 Adds a mapSongs method to the map service
We no longer have to do the foreach in subsonic-service.
2015-03-24 18:35:44 +01:00
Hyzual
a1d48bbd30 Reorganizes the entire app to follow Google's best practice recommendations for Angular App Structure.
see: https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDzdNvV6pGcuaF4Q9821Es/pub

The files are now grouped by view / component.
Tests are located beside tested js files. The Grunt build will be responsible for only distributing actual files without the tests.
Each partial is at the same level as the js files related to it.
Ideally css files should be at the same level, maybe I'll refactor this later.

Moves all non-bower plugins to app/vendor.
Moves all images to app/images and styles to app/styles.
Merges the test and non-test jshintrc files.

Adds all the Jamstash contributors to the package.json file while I was refactoring.

Conflicts:
	app/app.js
	app/images/vgrabber.gif
	app/images/vgrabber2-active.gif
	app/images/vgrabber2-normal.gif
	app/index.html
2014-11-09 16:10:34 +01:00
Renamed from test/services/model-service_test.js (Browse further)