1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

bundle jquery and enable animations for metadata page

This commit is contained in:
dkanada 2019-09-12 04:01:53 -07:00
parent 26644c06c4
commit 0aca394e1e
6 changed files with 8 additions and 2635 deletions

View file

@ -15,9 +15,10 @@
},
"dependencies": {
"jstree": "^3.3.7",
"jquery": "^3.4.1",
"hls.js": "^0.12.4",
"howler": "^2.1.2",
"libjass": "0.11.0"
"libjass": "^0.11.0"
},
"scripts": {
"dev": "webpack --mode development",

File diff suppressed because it is too large Load diff

View file

@ -7,7 +7,11 @@ var _define = window.define;
// jstree
var jstree = require("jstree");
require("jstree/dist/themes/default/style.css");
_define("jstree", ["jQuery"], function() { return jstree; });
_define("jstree", function() { return jstree; });
// jquery
var jquery = require("jquery");
_define("jQuery", function() { return jquery; });
// hlsjs
var hlsjs = require("hls.js");

View file

@ -241,8 +241,6 @@ define(["datetime", "jQuery", "material-icons"], function (datetime, $) {
$(".libraryTree", page).jstree({
"plugins": ["wholerow"],
core: {
// Disable animations because jQuery slim does not support them
animation: false,
check_callback: true,
data: function (node, callback) {
loadNode(page, this, node, openItems, selectedId, currentUser, callback);

View file

@ -227,12 +227,6 @@ var AppInfo = {};
!function () {
"use strict";
function onApiClientCreated(e, newApiClient) {
if (window.$) {
$.ajax = newApiClient.ajax;
}
}
function defineConnectionManager(connectionManager) {
window.ConnectionManager = connectionManager;
define("connectionManager", [], function () {
@ -242,7 +236,6 @@ var AppInfo = {};
function bindConnectionManagerEvents(connectionManager, events, userSettings) {
window.Events = events;
events.on(ConnectionManager, "apiclientcreated", onApiClientCreated);
connectionManager.currentApiClient = function () {
if (!localApiClient) {
@ -805,7 +798,7 @@ var AppInfo = {};
}
},
bundles: {
bundle: ["jstree", "hlsjs", "howler", "libjass"]
bundle: ["jstree", "jQuery", "hlsjs", "howler", "libjass"]
},
urlArgs: urlArgs,
paths: paths,
@ -854,13 +847,6 @@ var AppInfo = {};
define("queryString", [bowerPath + "/query-string/index"], function () {
return queryString;
});
define("jQuery", [bowerPath + "/jquery/dist/jquery.slim.min"], function () {
if (window.ApiClient) {
jQuery.ajax = ApiClient.ajax;
}
return jQuery;
});
define("fnchecked", ["legacy/fnchecked"], returnFirstDependency);
define("dialogHelper", [componentsPath + "/dialogHelper/dialogHelper"], returnFirstDependency);
define("inputmanager", ["inputManager"], returnFirstDependency);

View file

@ -9,19 +9,11 @@ module.exports = {
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'amd-require'
},
externals: [{
jquery: {
amd: "jQuery"
}
}],
resolve: {
modules: [
path.resolve(__dirname, 'node_modules')
]
},
module: {
rules: [
{
@ -34,7 +26,6 @@ module.exports = {
}
]
},
plugins: [
new CopyPlugin([{
from: '**/*',