Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed: navigation tabs cookie #14

Merged
merged 1 commit into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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