Skip to content

Commit

Permalink
Replaced jquery-cookie with js-cookie (#2900)
Browse files Browse the repository at this point in the history
* Replaced jquery-cookie with js-cookie

Co-authored-by: Mitch Ray <git_account@mitchray.id.au>
  • Loading branch information
mitchray and mitchray committed May 4, 2021
1 parent 2fff5f1 commit 50ceb1b
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 32 deletions.
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"ampache/ampacheapi-php": "^1.0",
"aterrien/jquery-knob": "1.2.*",
"blueimp/jquery-file-upload": "v10.2.0",
"carhartl/jquery-cookie": "1.*",
"cboden/ratchet": "0.4.*",
"clue/multicast-react": "^1.1.0",
"components/bootstrap": "3.*",
Expand All @@ -61,6 +60,7 @@
"happyworm/jplayer": "2.*",
"james-heinrich/getid3": "dev-master",
"jeromeetienne/jquery-qrcode": "dev-master",
"js-cookie/js-cookie": "2.*",
"jwilsson/spotify-web-api-php": "^3.5",
"krixon/xbmc-php-rpc": "dev-master",
"kumailht/responsive-elements": "dev-master",
Expand Down Expand Up @@ -155,18 +155,18 @@
{
"type": "package",
"package": {
"name": "carhartl/jquery-cookie",
"name": "js-cookie/js-cookie",
"type": "component",
"version": "1.4.1",
"version": "2.2.1",
"source": {
"url": "https://github.com/carhartl/jquery-cookie.git",
"url": "https://github.com/js-cookie/js-cookie.git",
"type": "git",
"reference": "v1.4.1"
"reference": "v2.2.1"
},
"extra": {
"component": {
"scripts": [
"jquery.cookie.js"
"src/js.cookie.js"
]
}
}
Expand Down
36 changes: 18 additions & 18 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions public/templates/header.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<script src="<?php echo $web_path; ?>/lib/components/jquery-ui/jquery-ui.min.js"></script>
<script src="<?php echo $web_path; ?>/lib/components/prettyphoto/js/jquery.prettyPhoto.js"></script>
<script src="<?php echo $web_path; ?>/lib/components/tag-it/js/tag-it.js"></script>
<script src="<?php echo $web_path; ?>/lib/components/jquery-cookie/jquery.cookie.js"></script>
<script src="<?php echo $web_path; ?>/lib/components/js-cookie/js-cookie-built.js"></script>
<script src="<?php echo $web_path; ?>/lib/components/jscroll/jquery.jscroll.min.js" defer></script>
<script src="<?php echo $web_path; ?>/lib/components/jquery-qrcode/jquery-qrcode-built.js" defer></script>
<script src="<?php echo $web_path; ?>/lib/modules/rhinoslider/js/rhinoslider-1.05.min.js" defer></script>
Expand Down Expand Up @@ -485,7 +485,7 @@ function libitem_action(item, action)
$('#sidebar').show(500);
});

$.cookie('sidebar_state', newstate, { expires: 30, path: '/; samesite=strict'});
Cookies.set('sidebar_state', newstate, { expires: 30, path: '/; samesite=strict'});
});
</script>
<div id="rightbar" class="rightbar-fixed">
Expand Down
8 changes: 4 additions & 4 deletions public/templates/show_html5_player.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@

$(document).ready(function(){

if (!isNaN($.cookie('jp_volume'))) {
var jp_volume = $.cookie('jp_volume');
if (!isNaN(Cookies.get('jp_volume'))) {
var jp_volume = Cookies.get('jp_volume');
} else {
var jp_volume = 0.80;
}

var replaygainPersist = $.cookie('replaygain');
var replaygainPersist = Cookies.get('replaygain');

jplaylist = new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
Expand Down Expand Up @@ -258,7 +258,7 @@
});

$("#jquery_jplayer_1").bind($.jPlayer.event.volumechange, function(event) {
$.cookie('jp_volume', event.jPlayer.options.volume, { expires: 7, path: '/; samesite=strict'});
Cookies.set('jp_volume', event.jPlayer.options.volume, { expires: 7, path: '/; samesite=strict'});
});

$("#jquery_jplayer_1").bind($.jPlayer.event.resize, function (event) {
Expand Down
2 changes: 1 addition & 1 deletion public/templates/show_html5_player_headers.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<link rel="stylesheet" href="<?php echo AmpConfig::get('web_path'); ?>/lib/modules/jquery-ui-ampache/jquery-ui.min.css" type="text/css" media="screen" />
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/components/jquery/jquery.min.js"></script>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/components/jquery-ui/jquery-ui.min.js"></script>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/components/jquery-cookie/jquery.cookie.js"></script>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/components/js-cookie/js-cookie-built.js"></script>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/base.js"></script>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/ajax.js"></script>
<script src="<?php echo AmpConfig::get('web_path'); ?>/lib/javascript/tools.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion public/templates/sidebar.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
if ($header.children(".header-img").hasClass("collapsed")) {
sbstate = "collapsed";
}
$.cookie('sb_' + $header.children(".header-img").attr('id'), sbstate, { expires: 30, path: '/; samesite=strict'});
Cookies.set('sb_' + $header.children(".header-img").attr('id'), sbstate, { expires: 30, path: '/; samesite=strict'});
});

});
Expand Down

0 comments on commit 50ceb1b

Please sign in to comment.