-
-
-
-
-
-
-
+
+
${TitleNotifications}
+
+
diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js
index b87eee15e4..38d2245f4f 100644
--- a/dashboard-ui/scripts/librarymenu.js
+++ b/dashboard-ui/scripts/librarymenu.js
@@ -108,7 +108,7 @@
html += '';
- html += '';
+ html += '';
html += '';
- $(document.body).append(html);
+ $(document.body).append(html).trigger('libraryMenuCreated');
panel = $('#libraryPanel').panel({}).lazyChildren().trigger('create');
diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js
index 78d5dfe14e..7020ae8255 100644
--- a/dashboard-ui/scripts/mediaplayer.js
+++ b/dashboard-ui/scripts/mediaplayer.js
@@ -217,6 +217,15 @@
Protocol: 'http'
});
+ profile.TranscodingProfiles.push({
+ Container: 'mp4',
+ Type: 'Video',
+ AudioCodec: 'aac',
+ VideoCodec: 'h264',
+ Context: 'Static',
+ Protocol: 'http'
+ });
+
if (canPlayAac && $.browser.safari) {
profile.TranscodingProfiles.push({
Container: 'aac',
@@ -225,6 +234,13 @@
Context: 'Streaming',
Protocol: 'http'
});
+ profile.TranscodingProfiles.push({
+ Container: 'aac',
+ Type: 'Audio',
+ AudioCodec: 'aac',
+ Context: 'Static',
+ Protocol: 'http'
+ });
} else {
profile.TranscodingProfiles.push({
Container: 'mp3',
@@ -233,6 +249,13 @@
Context: 'Streaming',
Protocol: 'http'
});
+ profile.TranscodingProfiles.push({
+ Container: 'mp3',
+ Type: 'Audio',
+ AudioCodec: 'mp3',
+ Context: 'Static',
+ Protocol: 'http'
+ });
}
profile.ContainerProfiles = [];
diff --git a/dashboard-ui/scripts/notificationlist.js b/dashboard-ui/scripts/notificationlist.js
index 77b7685c94..6f98c9b7d4 100644
--- a/dashboard-ui/scripts/notificationlist.js
+++ b/dashboard-ui/scripts/notificationlist.js
@@ -1,16 +1,15 @@
(function ($, document, Notifications) {
- $(document).on("pageinit", "#notificationsPage", function () {
+ $(document).on("pageshowready", "#notificationsPage", function () {
// If there is no user logged in there can be no notifications
if (!Dashboard.getCurrentUserId()) return;
-
+
var elem = $(".notificationsList");
- var btn = $(".btnMarkReadContainer");
var startIndex = 0;
var limit = 10;
- Notifications.showNotificationsList(startIndex, limit, elem, btn);
+ Notifications.showNotificationsList(startIndex, limit, elem);
elem.on("click", ".btnPreviousPage", function (e) {
@@ -20,7 +19,7 @@
if (startIndex < 0) startIndex = 0;
- Notifications.showNotificationsList(startIndex, limit, elem, btn);
+ Notifications.showNotificationsList(startIndex, limit, elem);
})
.on("click", ".btnNextPage", function (e) {
@@ -29,25 +28,11 @@
startIndex = startIndex + limit;
- Notifications.showNotificationsList(startIndex, limit, elem, btn);
+ Notifications.showNotificationsList(startIndex, limit, elem);
});
- $(".readOnlyContent").on("click", ".btnMarkRead", function () {
-
- var ids = $(".notificationsList div").map(function () {
-
- return this.getAttribute('data-notificationid');
-
- }).get();
-
- Notifications.markNotificationsRead(ids, function () {
-
- Notifications.showNotificationsList(startIndex, limit, elem, btn);
-
- });
-
- });
+ Notifications.markNotificationsRead([]);
});
diff --git a/dashboard-ui/scripts/notifications.js b/dashboard-ui/scripts/notifications.js
index 8f9b92a3a3..2c67005118 100644
--- a/dashboard-ui/scripts/notifications.js
+++ b/dashboard-ui/scripts/notifications.js
@@ -43,51 +43,6 @@
});
};
- self.showNotificationsFlyout = function () {
-
- Dashboard.getCurrentUser().done(function (user) {
- var html = '
';
-
- html += '
';
- html += '' + Globalize.translate('HeaderNotifications') + '';
-
- if (user.Policy.IsAdministrator) {
- html += '' + Globalize.translate('ButtonViewNotifications') + '';
- }
-
- html += '
';
-
- html += '
';
-
- html += '
Loading...';
-
- html += '
';
-
- html += '
';
-
- html += '
';
-
- $(document.body).append(html);
-
- $('.notificationsFlyout').panel({}).trigger('create').panel("open").on("panelclose", function () {
-
- $(this).off("panelclose").remove();
-
- });
-
- self.isFlyout = true;
-
- var startIndex = 0;
- var limit = 5;
- var elem = $('.notificationsFlyoutlist');
-
- refreshNotifications(startIndex, limit, elem, null, false).done(function () {
-
- self.markNotificationsRead([]);
- });
- });
- };
-
self.markNotificationsRead = function (ids, callback) {
ApiClient.markNotificationsRead(Dashboard.getCurrentUserId(), ids, true).done(function () {
@@ -104,51 +59,36 @@
};
- self.showNotificationsList = function (startIndex, limit, elem, btn) {
+ self.showNotificationsList = function (startIndex, limit, elem) {
- refreshNotifications(startIndex, limit, elem, btn, true);
+ refreshNotifications(startIndex, limit, elem, true);
};
}
- function refreshNotifications(startIndex, limit, elem, btn, showPaging) {
+ function refreshNotifications(startIndex, limit, elem, showPaging) {
var apiClient = window.ApiClient;
if (apiClient) {
return apiClient.getNotifications(Dashboard.getCurrentUserId(), { StartIndex: startIndex, Limit: limit }).done(function (result) {
- listUnreadNotifications(result.Notifications, result.TotalRecordCount, startIndex, limit, elem, btn, showPaging);
+ listUnreadNotifications(result.Notifications, result.TotalRecordCount, startIndex, limit, elem, showPaging);
});
}
}
- function listUnreadNotifications(list, totalRecordCount, startIndex, limit, elem, btn, showPaging) {
+ function listUnreadNotifications(list, totalRecordCount, startIndex, limit, elem, showPaging) {
if (!totalRecordCount) {
elem.html('
' + Globalize.translate('LabelNoUnreadNotifications') + '
');
- if (btn) {
- btn.hide();
- }
return;
}
Notifications.total = totalRecordCount;
- if (btn) {
- if (list.filter(function (n) {
-
- return !n.IsRead;
-
- }).length) {
- btn.show();
- } else {
- btn.hide();
- }
- }
-
var html = '';
if (totalRecordCount > limit && showPaging === true) {
@@ -194,7 +134,7 @@
html += '
' + humane_date(notification.Date) + '
';
if (notification.Description) {
- html += '
' + notification.Description + '
';
+ html += '
' + notification.Description + '
';
}
html += '
';
@@ -223,12 +163,10 @@
window.Notifications = new notifications();
- $(document).on('headercreated', function (e) {
+ $(document).on('libraryMenuCreated', function (e) {
if (window.ApiClient) {
- //$('').insertAfter($('.headerSearchButton')).on('click', Notifications.showNotificationsFlyout);
-
- //Notifications.updateNotificationCount();
+ Notifications.updateNotificationCount();
}
});
diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js
index 28928ac8ed..c41b8d6414 100644
--- a/dashboard-ui/scripts/site.js
+++ b/dashboard-ui/scripts/site.js
@@ -721,7 +721,7 @@ var Dashboard = {
item = items[i];
if (item.divider) {
- menuHtml += "";
+ menuHtml += "";
}
if (item.href) {
@@ -765,11 +765,31 @@ var Dashboard = {
html += '
';
- html += '';
+ html += '';
html += '';
html += '
';
diff --git a/dashboard-ui/thirdparty/cordova/android/iap.js b/dashboard-ui/thirdparty/cordova/android/iap.js
index f5bfb841c8..60e6667505 100644
--- a/dashboard-ui/thirdparty/cordova/android/iap.js
+++ b/dashboard-ui/thirdparty/cordova/android/iap.js
@@ -1,6 +1,6 @@
(function () {
- var unlockId = "premiumunlock";
+ var unlockId = "com.mb.android.unlock";
var updatedProducts = [];
function updateProductInfo(id, owned) {
diff --git a/dashboard-ui/thirdparty/cordova/registrationservices.js b/dashboard-ui/thirdparty/cordova/registrationservices.js
index 232d873092..d25a49b164 100644
--- a/dashboard-ui/thirdparty/cordova/registrationservices.js
+++ b/dashboard-ui/thirdparty/cordova/registrationservices.js
@@ -7,6 +7,15 @@
return platform.indexOf('android') != -1;
}
+ function getPremiumUnlockFeatureId() {
+
+ if (isAndroid()) {
+ return "com.mb.android.unlock";
+ }
+
+ return 'premiumunlock';
+ }
+
function validatePlayback(deferred) {
// Don't require validation on android
@@ -17,37 +26,16 @@
validateFeature({
- id: 'premiumunlock'
+ id: getPremiumUnlockFeatureId()
}, deferred);
}
function validateLiveTV(deferred) {
- // Don't require validation if not android
- if (!isAndroid()) {
- deferred.resolve();
- return;
- }
-
validateFeature({
- id: 'premiumunlock'
-
- }, deferred);
- }
-
- function validateSmb(deferred) {
-
- // Don't require validation if not android
- if (!isAndroid()) {
- deferred.resolve();
- return;
- }
-
- validateFeature({
-
- id: 'premiumunlock'
+ id: getPremiumUnlockFeatureId()
}, deferred);
}
@@ -215,8 +203,10 @@
}
};
- var depends = isAndroid() ? 'thirdparty/cordova/android/iap' : 'thirdparty/cordova/iap';
-
- requirejs([depends]);
+ if (isAndroid()) {
+ requirejs(['thirdparty/cordova/android/iap']);
+ } else {
+ requirejs(['thirdparty/cordova/iap']);
+ }
})();
\ No newline at end of file