mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix duplicate day name issue
This commit is contained in:
parent
b24a74b9eb
commit
92c1a9acb0
4 changed files with 52 additions and 18 deletions
|
@ -963,7 +963,14 @@
|
||||||
return "Yesterday";
|
return "Yesterday";
|
||||||
}
|
}
|
||||||
|
|
||||||
return weekday[date.getDay()] + " " + date.toLocaleDateString();
|
var day = weekday[date.getDay()];
|
||||||
|
date = date.toLocaleDateString();
|
||||||
|
|
||||||
|
if (date.toLowerCase().indexOf(day.toLowerCase()) == -1) {
|
||||||
|
return day + " " + date;
|
||||||
|
}
|
||||||
|
|
||||||
|
return date;
|
||||||
},
|
},
|
||||||
|
|
||||||
getPremiereDateText: function (item, date) {
|
getPremiereDateText: function (item, date) {
|
||||||
|
|
|
@ -116,8 +116,10 @@
|
||||||
|
|
||||||
changeCollectionType: function () {
|
changeCollectionType: function () {
|
||||||
|
|
||||||
Dashboard.alert("To change the collection type, please remove and rebuild the collection with the new type.");
|
Dashboard.alert({
|
||||||
|
message: "To change the collection type, please remove and rebuild the collection with the new type.",
|
||||||
|
title: "Change Collection Type"
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
getVirtualFolderHtml: function (virtualFolder, isCollapsed, index) {
|
getVirtualFolderHtml: function (virtualFolder, isCollapsed, index) {
|
||||||
|
|
|
@ -128,18 +128,27 @@ var Dashboard = {
|
||||||
}, 2000);
|
}, 2000);
|
||||||
},
|
},
|
||||||
|
|
||||||
alert: function (message) {
|
alert: function (options) {
|
||||||
|
|
||||||
$.mobile.loading('show', {
|
if (typeof options == "string") {
|
||||||
theme: "b",
|
|
||||||
text: message,
|
|
||||||
textonly: true,
|
|
||||||
textVisible: true
|
|
||||||
});
|
|
||||||
|
|
||||||
setTimeout(function () {
|
var message = options;
|
||||||
$.mobile.loading('hide');
|
|
||||||
}, 4000);
|
$.mobile.loading('show', {
|
||||||
|
theme: "b",
|
||||||
|
text: message,
|
||||||
|
textonly: true,
|
||||||
|
textVisible: true
|
||||||
|
});
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
$.mobile.loading('hide');
|
||||||
|
}, 4000);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Dashboard.confirmInternal(options.message, options.title || 'Alert', false, options.callback);
|
||||||
},
|
},
|
||||||
|
|
||||||
updateSystemInfo: function (info) {
|
updateSystemInfo: function (info) {
|
||||||
|
@ -372,7 +381,7 @@ var Dashboard = {
|
||||||
Dashboard.alert("Settings saved.");
|
Dashboard.alert("Settings saved.");
|
||||||
},
|
},
|
||||||
|
|
||||||
confirm: function (message, title, callback) {
|
confirmInternal: function (message, title, showCancel, callback) {
|
||||||
|
|
||||||
$('#confirmFlyout').popup("close").remove();
|
$('#confirmFlyout').popup("close").remove();
|
||||||
|
|
||||||
|
@ -389,7 +398,11 @@ var Dashboard = {
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '<p><button type="button" data-icon="check" onclick="$(\'#confirmFlyout\')[0].confirm=true;$(\'#confirmFlyout\').popup(\'close\');" data-theme="b">Ok</button></p>';
|
html += '<p><button type="button" data-icon="check" onclick="$(\'#confirmFlyout\')[0].confirm=true;$(\'#confirmFlyout\').popup(\'close\');" data-theme="b">Ok</button></p>';
|
||||||
html += '<p><button type="button" data-icon="delete" onclick="$(\'#confirmFlyout\').popup(\'close\');" data-theme="a">Cancel</button></p>';
|
|
||||||
|
if (showCancel) {
|
||||||
|
html += '<p><button type="button" data-icon="delete" onclick="$(\'#confirmFlyout\').popup(\'close\');" data-theme="a">Cancel</button></p>';
|
||||||
|
}
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
@ -406,6 +419,10 @@ var Dashboard = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
confirm: function (message, title, callback) {
|
||||||
|
Dashboard.confirmInternal(message, title, true, callback);
|
||||||
|
},
|
||||||
|
|
||||||
refreshSystemInfoFromServer: function () {
|
refreshSystemInfoFromServer: function () {
|
||||||
ApiClient.getSystemInfo().done(function (info) {
|
ApiClient.getSystemInfo().done(function (info) {
|
||||||
|
|
||||||
|
@ -633,7 +650,7 @@ var Dashboard = {
|
||||||
for (var i = 0, length = links.length; i < length; i++) {
|
for (var i = 0, length = links.length; i < length; i++) {
|
||||||
|
|
||||||
var link = links[i];
|
var link = links[i];
|
||||||
|
|
||||||
if (link.divider) {
|
if (link.divider) {
|
||||||
html += "<div class='sidebarDivider'></div>";
|
html += "<div class='sidebarDivider'></div>";
|
||||||
}
|
}
|
||||||
|
@ -1157,7 +1174,10 @@ var Dashboard = {
|
||||||
dialog.close();
|
dialog.close();
|
||||||
|
|
||||||
ApiClient.createPackageReview(review).done(function () {
|
ApiClient.createPackageReview(review).done(function () {
|
||||||
Dashboard.alert("Thank you for your review");
|
Dashboard.alert({
|
||||||
|
message: "Thank you for your review",
|
||||||
|
title: "Thank You"
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -82,7 +82,12 @@
|
||||||
ApiClient.resetUserPassword(userId).done(function () {
|
ApiClient.resetUserPassword(userId).done(function () {
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
Dashboard.alert("The password has been reset.");
|
|
||||||
|
Dashboard.alert({
|
||||||
|
message: "The password has been reset.",
|
||||||
|
title: "Password Reset"
|
||||||
|
});
|
||||||
|
|
||||||
loadUser(page);
|
loadUser(page);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue