From 036656469e83590efd495d463930498a5a96d647 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Sun, 10 Mar 2024 19:08:48 +0900 Subject: [PATCH] =?UTF-8?q?=E7=B5=9E=E3=82=8A=E8=BE=BC=E3=81=BF=E3=81=AE?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E7=8A=B6=E6=B3=81=E4=BF=9D=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- broadcast/index.frm.php | 3 ++- broadcast/modules/jquery.cookie-1.4.1.min.js | 2 ++ broadcast/script.js | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 broadcast/modules/jquery.cookie-1.4.1.min.js diff --git a/broadcast/index.frm.php b/broadcast/index.frm.php index a5c15b5..8b3720f 100644 --- a/broadcast/index.frm.php +++ b/broadcast/index.frm.php @@ -5,6 +5,7 @@ + @@ -17,7 +18,7 @@

-

diff --git a/broadcast/modules/jquery.cookie-1.4.1.min.js b/broadcast/modules/jquery.cookie-1.4.1.min.js new file mode 100644 index 0000000..c0f19d8 --- /dev/null +++ b/broadcast/modules/jquery.cookie-1.4.1.min.js @@ -0,0 +1,2 @@ +/*! jquery.cookie v1.4.1 | MIT */ +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}); \ No newline at end of file diff --git a/broadcast/script.js b/broadcast/script.js index c7e9245..a75ddc3 100644 --- a/broadcast/script.js +++ b/broadcast/script.js @@ -67,6 +67,22 @@ Script $ (window).resize (this.setPagination); this.setPagination (); $ ('.pagination').removeClass ('opacity-0'); + + $ ('#accordion-filter').on ('shown.bs.collapse', function () + { + $.cookie ('expand-filter', '1'); + }); + + $ ('#accordion-filter').on ('hidden.bs.collapse', function () + { + $.cookie ('expand-filter', '0'); + }); + + if ($.cookie ('expand-filter') === '0') + { + $ ('#collapse-filter').removeClass ('show'); + $ ('#accordion-filter .accordion-button').addClass ('collapsed'); + } } static