mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
auto-organize fix
This commit is contained in:
parent
bbfda77868
commit
f64e0c7c53
54 changed files with 838 additions and 666 deletions
|
@ -47,10 +47,6 @@ Array.prototype.remove = function (from, to) {
|
|||
return this.push.apply(this, rest);
|
||||
};
|
||||
|
||||
String.prototype.endsWith = function (suffix) {
|
||||
return this.indexOf(suffix, this.length - suffix.length) !== -1;
|
||||
};
|
||||
|
||||
$.fn.checked = function (value) {
|
||||
if (value === true || value === false) {
|
||||
// Set the value of the checkbox
|
||||
|
@ -68,31 +64,6 @@ $.fn.buttonEnabled = function (enabled) {
|
|||
return enabled ? this.attr('disabled', '').removeAttr('disabled') : this.attr('disabled', 'disabled');
|
||||
};
|
||||
|
||||
$.fn.dateTimeVal = function (val) {
|
||||
|
||||
if (val != null) {
|
||||
|
||||
var now = val;
|
||||
|
||||
var year = now.getFullYear();
|
||||
var month = now.getMonth().toString().length === 1 ? '0' + (now.getMonth() + 1).toString() : now.getMonth() + 1;
|
||||
var date = now.getDate().toString().length === 1 ? '0' + (now.getDate()).toString() : now.getDate();
|
||||
var hours = now.getHours().toString().length === 1 ? '0' + now.getHours().toString() : now.getHours();
|
||||
var minutes = now.getMinutes().toString().length === 1 ? '0' + now.getMinutes().toString() : now.getMinutes();
|
||||
var seconds = now.getSeconds().toString().length === 1 ? '0' + now.getSeconds().toString() : now.getSeconds();
|
||||
|
||||
var formattedDateTime = year + '-' + month + '-' + date + 'T' + hours + ':' + minutes + ':' + seconds;
|
||||
|
||||
//if (onlyBlank === true && $(this).val()) {
|
||||
// return this;
|
||||
//}
|
||||
|
||||
return this.val(formattedDateTime);
|
||||
}
|
||||
|
||||
return this.val();
|
||||
};
|
||||
|
||||
if (!Array.prototype.filter) {
|
||||
Array.prototype.filter = function (fun /*, thisp*/) {
|
||||
"use strict";
|
||||
|
@ -125,7 +96,7 @@ var WebNotifications = {
|
|||
show: function (data) {
|
||||
|
||||
// Seeing crashes in android
|
||||
if (window.cordova && window.cordova.plugins && window.cordova.plugins.notification && !$.browser.android) {
|
||||
if (window.cordova && window.cordova.plugins && window.cordova.plugins.notification) {
|
||||
|
||||
if (!WebNotifications.lastId) {
|
||||
// Cordova plugin will crash on android with long. need an int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue