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 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) {
|
||||
|
|
|
@ -116,8 +116,10 @@
|
|||
|
||||
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) {
|
||||
|
|
|
@ -128,7 +128,11 @@ var Dashboard = {
|
|||
}, 2000);
|
||||
},
|
||||
|
||||
alert: function (message) {
|
||||
alert: function (options) {
|
||||
|
||||
if (typeof options == "string") {
|
||||
|
||||
var message = options;
|
||||
|
||||
$.mobile.loading('show', {
|
||||
theme: "b",
|
||||
|
@ -140,6 +144,11 @@ var Dashboard = {
|
|||
setTimeout(function () {
|
||||
$.mobile.loading('hide');
|
||||
}, 4000);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Dashboard.confirmInternal(options.message, options.title || 'Alert', false, options.callback);
|
||||
},
|
||||
|
||||
updateSystemInfo: function (info) {
|
||||
|
@ -372,7 +381,7 @@ var Dashboard = {
|
|||
Dashboard.alert("Settings saved.");
|
||||
},
|
||||
|
||||
confirm: function (message, title, callback) {
|
||||
confirmInternal: function (message, title, showCancel, callback) {
|
||||
|
||||
$('#confirmFlyout').popup("close").remove();
|
||||
|
||||
|
@ -389,7 +398,11 @@ var Dashboard = {
|
|||
html += '</div>';
|
||||
|
||||
html += '<p><button type="button" data-icon="check" onclick="$(\'#confirmFlyout\')[0].confirm=true;$(\'#confirmFlyout\').popup(\'close\');" data-theme="b">Ok</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>';
|
||||
|
@ -406,6 +419,10 @@ var Dashboard = {
|
|||
});
|
||||
},
|
||||
|
||||
confirm: function (message, title, callback) {
|
||||
Dashboard.confirmInternal(message, title, true, callback);
|
||||
},
|
||||
|
||||
refreshSystemInfoFromServer: function () {
|
||||
ApiClient.getSystemInfo().done(function (info) {
|
||||
|
||||
|
@ -1157,7 +1174,10 @@ var Dashboard = {
|
|||
dialog.close();
|
||||
|
||||
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 () {
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
Dashboard.alert("The password has been reset.");
|
||||
|
||||
Dashboard.alert({
|
||||
message: "The password has been reset.",
|
||||
title: "Password Reset"
|
||||
});
|
||||
|
||||
loadUser(page);
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue