Fixes persistence's mock, adds back the original keycode detection
This commit is contained in:
parent
5a7a06d1a2
commit
06329bef70
2 changed files with 5 additions and 4 deletions
|
@ -175,9 +175,9 @@ angular.module('JamStash')
|
|||
$(this).fadeOut(function () { $(this).remove(); });
|
||||
return false;
|
||||
})
|
||||
// $document.keydown(function (e) {
|
||||
// $scope.scrollToIndex(e);
|
||||
// });
|
||||
$document.keydown(function (e) {
|
||||
$scope.scrollToIndex(e);
|
||||
});
|
||||
$scope.scrollToIndex = function (e) {
|
||||
var source = e.target.id;
|
||||
if (e.target.tagName.toUpperCase() != 'INPUT') {
|
||||
|
|
|
@ -5,6 +5,7 @@ describe("Main controller", function() {
|
|||
beforeEach(function() {
|
||||
mockGlobals = {
|
||||
settings: {
|
||||
SaveTrackPosition: false,
|
||||
ShowQueue: false,
|
||||
Debug: true,
|
||||
Jukebox: false
|
||||
|
@ -21,7 +22,7 @@ describe("Main controller", function() {
|
|||
player.volume = 1.0;
|
||||
|
||||
// Mock the persistence service
|
||||
persistence = jasmine.createSpyObj("persistence", ["getVolume", "saveVolume"]);
|
||||
persistence = jasmine.createSpyObj("persistence", ["loadQueue", "loadTrackPosition", "getVolume", "saveVolume"]);
|
||||
|
||||
inject(function (_$controller_, $rootScope, _$document_, _$window_, _$location_, _$cookieStore_, _utils_, globals, _model_, _notifications_, _Page_) {
|
||||
scope = $rootScope.$new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue