From d999c53f9f6b30b4c3ab39beb25691e64657e6bd Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 2 Jul 2015 08:55:07 -0400 Subject: [PATCH] fix sync job deletion --- dashboard-ui/apiclient/device.js | 2 ++ dashboard-ui/bower_components/iron-meta/.bower.json | 6 +++--- dashboard-ui/bower_components/paper-styles/.bower.json | 4 ++-- dashboard-ui/cordova/android/mediasession.js | 2 +- dashboard-ui/cordova/chromecast.js | 7 +++++-- dashboard-ui/css/site.css | 4 ++-- dashboard-ui/scripts/librarybrowser.js | 1 + dashboard-ui/scripts/sharingmanager.js | 4 ++-- dashboard-ui/scripts/syncactivity.js | 8 ++++---- 9 files changed, 22 insertions(+), 16 deletions(-) diff --git a/dashboard-ui/apiclient/device.js b/dashboard-ui/apiclient/device.js index 8f51acbfb7..16f33e7e7b 100644 --- a/dashboard-ui/apiclient/device.js +++ b/dashboard-ui/apiclient/device.js @@ -6,6 +6,8 @@ globalScope.MediaBrowser.generateDeviceId = function (keyName, seed) { + keyName = keyName || 'randomId'; + var keys = []; keys.push(navigator.userAgent); diff --git a/dashboard-ui/bower_components/iron-meta/.bower.json b/dashboard-ui/bower_components/iron-meta/.bower.json index 9e650790be..8119ebcf41 100644 --- a/dashboard-ui/bower_components/iron-meta/.bower.json +++ b/dashboard-ui/bower_components/iron-meta/.bower.json @@ -25,14 +25,14 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "homepage": "https://github.com/PolymerElements/iron-meta", + "homepage": "https://github.com/polymerelements/iron-meta", "_release": "1.0.3", "_resolution": { "type": "version", "tag": "v1.0.3", "commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04" }, - "_source": "git://github.com/PolymerElements/iron-meta.git", + "_source": "git://github.com/polymerelements/iron-meta.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-meta" + "_originalSource": "polymerelements/iron-meta" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-styles/.bower.json b/dashboard-ui/bower_components/paper-styles/.bower.json index 32205aaa01..f16c89e87a 100644 --- a/dashboard-ui/bower_components/paper-styles/.bower.json +++ b/dashboard-ui/bower_components/paper-styles/.bower.json @@ -34,7 +34,7 @@ "tag": "v1.0.7", "commit": "c65f5ce6b898bb756fca35cedaa53c3e8011abeb" }, - "_source": "git://github.com/PolymerElements/paper-styles.git", + "_source": "git://github.com/polymerelements/paper-styles.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/paper-styles" + "_originalSource": "polymerelements/paper-styles" } \ No newline at end of file diff --git a/dashboard-ui/cordova/android/mediasession.js b/dashboard-ui/cordova/android/mediasession.js index 860726fdbe..036ff85da9 100644 --- a/dashboard-ui/cordova/android/mediasession.js +++ b/dashboard-ui/cordova/android/mediasession.js @@ -146,7 +146,7 @@ currentPlayer = player; - Logger.log('binding remotecontrols to MediaPlayer'); + Logger.log('binding remotecontrols to ' + player.name); player.getPlayerState().done(function (state) { diff --git a/dashboard-ui/cordova/chromecast.js b/dashboard-ui/cordova/chromecast.js index 6cbe56e3d2..1ddde4edbd 100644 --- a/dashboard-ui/cordova/chromecast.js +++ b/dashboard-ui/cordova/chromecast.js @@ -474,9 +474,9 @@ Logger.log('session.connect succeeded'); webAppSession.setWebAppSessionListener(); - MediaController.setActivePlayer(PlayerName, convertDeviceToTarget(device)); currentDevice = device; currentDeviceId = device.getId(); + MediaController.setActivePlayer(PlayerName, convertDeviceToTarget(device)); $(castPlayer).trigger('connect'); @@ -538,7 +538,8 @@ Logger.log('launchWebApp success. calling onSessionConnected'); if ($.browser.android) { - tryJoinWebSession(device, true, false); + //tryJoinWebSession(device, true, false); + setupWebAppSession(device, session, true); } else { setupWebAppSession(device, session, true); } @@ -646,6 +647,8 @@ if (newTarget.id != currentDeviceId) { if (currentWebAppSession) { Logger.log('Disconnecting from chromecast'); + Logger.log('New target info: ' + JSON.stringify(newTarget)); + Logger.log('currentDeviceId: ' + currentDeviceId); //currentDevice.disconnect(); cleanupSession(); currentDevice = null; diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 05e401b7e0..b8e296a865 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -500,8 +500,8 @@ h1 a:hover { } .paperLibraryViewNav.headroom--unpinned:not(.headroomDisabled) { - -webkit-transform: translateY(-203.5%); - transform: translateY(-203.5%); + -webkit-transform: translateY(-204%); + transform: translateY(-204%); } .largePanel { diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 75c16c35b0..4e115d4525 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -175,6 +175,7 @@ tabs.alignBottom = true; tabs.classList.add('bottomTabs'); } + tabs.noink = true; if (LibraryBrowser.enableFullPaperTabs()) { diff --git a/dashboard-ui/scripts/sharingmanager.js b/dashboard-ui/scripts/sharingmanager.js index d87fb6fae3..7b6f9330b2 100644 --- a/dashboard-ui/scripts/sharingmanager.js +++ b/dashboard-ui/scripts/sharingmanager.js @@ -2,7 +2,7 @@ function onSharingSuccess(options) { - console.log('share success. shareId: ' + options.share.Id); + Logger.log('share success. shareId: ' + options.share.Id); } @@ -10,7 +10,7 @@ var shareId = options.share.Id; - console.log('share cancelled. shareId: ' + shareId); + Logger.log('share cancelled. shareId: ' + shareId); // Delete the share since it was cancelled ApiClient.ajax({ diff --git a/dashboard-ui/scripts/syncactivity.js b/dashboard-ui/scripts/syncactivity.js index 90497c9fad..2b0d32f0a8 100644 --- a/dashboard-ui/scripts/syncactivity.js +++ b/dashboard-ui/scripts/syncactivity.js @@ -181,7 +181,7 @@ Events.trigger(elem[0], 'create'); $('.btnJobMenu', elem).on('click', function () { - showJobMenu(this); + showJobMenu(page, this); }); if (!jobs.length) { @@ -190,7 +190,7 @@ } } - function showJobMenu(elem) { + function showJobMenu(page, elem) { var card = $(elem).parents('.card'); var jobId = card.attr('data-id'); @@ -222,10 +222,10 @@ switch (id) { case 'delete': - cancelJob(jobId); + cancelJob(page, jobId); break; case 'cancel': - cancelJob(jobId); + cancelJob(page, jobId); break; default: break;