Skip to content

Commit

Permalink
Merge pull request #14 from Khorsa/dev
Browse files Browse the repository at this point in the history
fixed: navigation tabs cookie
  • Loading branch information
Khorsa committed Oct 13, 2021
2 parents 832bee8 + 18e4a7b commit 5125808
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions assets/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var mirrors = {

init: function()
{
mirrors.editors = new Array();
mirrors.editors = [];


$('.code-wrapper .editor-control').each(function()
Expand Down Expand Up @@ -191,7 +191,15 @@ var flexyCookie = {
{
var cookieName = name + "_" + MD5(document.location.href);
$.cookie(cookieName, value, { expires : 365, path: "/;SameSite=Lax"});
}
},

getCommon: function(name) {
return $.cookie(name);
},
setCommon: function(name, value)
{
$.cookie(name, value, { expires : 365, path: "/;SameSite=Lax"});
},
}


Expand Down Expand Up @@ -506,7 +514,7 @@ $(document).ready(function() {
$(this).data('ulHeight', h);

let id = $(this).attr('id');
let oldState = flexyCookie.get("admin-nav-menu-item-" + id);
let oldState = flexyCookie.getCommon("admin-nav-menu-item-" + id);
if (oldState === 'closed') {
$(this).addClass("closed");
}
Expand All @@ -528,7 +536,7 @@ $(document).ready(function() {
if ($(this).hasClass('closed')) {
itemState = 'closed';
}
flexyCookie.set("admin-nav-menu-item-" + id, itemState);
flexyCookie.setCommon("admin-nav-menu-item-" + id, itemState);

return false;
});
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flexycms/flexyadminframe-bundle",
"version": "0.1.6.0",
"version": "0.1.6.1",
"type": "symfony-bundle",
"description": "Main frame for admin panel",
"license": "proprietary",
Expand Down

0 comments on commit 5125808

Please sign in to comment.