11-28-2022, 02:32 PM
(This post was last modified: 11-28-2022, 04:04 PM by Vitor Costa (APDCA IT).
Edit Reason: replying myself, possible fix, issue resolved
)
Hi guys :-)
I found that on EXTENDED VERSION OF EMERALD every time I click to expand or collapse the tabs on the user CP it generates a JS error. I tested also here to validade if it was me only or so, but seems that the same error occurs here in this forum ...
Don't know also if that could be related with the fact that when we revisit the user CP the browser don't "remember" the last expanded/collapsed state. Maybe not supposed to... don't know.
EDIT:
A bit replying to myself ...
I tracked the funcion a bit in the general.js file.
I think It can be something to do with the fact that the theme is not using images to represent the maximized and minimized, and its using font awesome icons to make those representation so the tag "img" a his "src" are null.
Also then, as it fails, it doesn't run the saveCollapsed function etc etc...
EDIT again... last time.
By now I edited the file general.js, and in the "expandCollapse: function(element)" I made a check typeof to test if it is undefined before procede.
All work now without erros and the state of the boxes keeps "remembered" as it is saved in the cookie.
I found that on EXTENDED VERSION OF EMERALD every time I click to expand or collapse the tabs on the user CP it generates a JS error. I tested also here to validade if it was me only or so, but seems that the same error occurs here in this forum ...
Don't know also if that could be related with the fact that when we revisit the user CP the browser don't "remember" the last expanded/collapsed state. Maybe not supposed to... don't know.
Code:
general.js?ver=1804:690 Uncaught TypeError: Cannot read properties of undefined (reading 'replace')
at Object.expandCollapse (general.js?ver=1804:690:89)
at HTMLElement.<anonymous> (general.js?ver=1804:666:18)
at HTMLElement.dispatch (jquery.js?ver=1804:2:43090)
at v.handle (jquery.js?ver=1804:2:41074)
EDIT:
A bit replying to myself ...
I tracked the funcion a bit in the general.js file.
I think It can be something to do with the fact that the theme is not using images to represent the maximized and minimized, and its using font awesome icons to make those representation so the tag "img" a his "src" are null.
Also then, as it fails, it doesn't run the saveCollapsed function etc etc...
Code:
if(expandedItem.length)
{
var expState = + !expandedItem.is(":hidden"),
expcolImg = element.attr("src"),
expText = [lang.expcol_collapse, lang.expcol_expand];
expandedItem.toggle("fast", this.expCallback(controls, expState));
element.attr({
"alt": expText[expState],
"title": expText[expState],
"src": expState ? expcolImg.replace('collapse.', 'collapse_collapsed.') : expcolImg.replace('collapse_collapsed.', 'collapse.')
})
.parents(':eq(1)').toggleClass(element.parents(':eq(1)').hasClass('thead') ? 'thead_collapsed' : 'tcat_collapse_collapsed');
this.saveCollapsed(controls, expState);
}
return true;
EDIT again... last time.
By now I edited the file general.js, and in the "expandCollapse: function(element)" I made a check typeof to test if it is undefined before procede.
All work now without erros and the state of the boxes keeps "remembered" as it is saved in the cookie.