Hi @ all,
I wrote a CUTE extension with the plugin "Cute for Jira" and i have an issue I can't find.
The following jQuery load on any page reload and inject a text in the Service Desk Customer Portal footer section.
#cute-jsd-footer {
text-align: center;
color: #7a869a;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
font-size: 12px;
}
// Execute after the page was fully loaded
setTimeout(function(){
if (jQuery('#jsonPayload').length) {
jQuery("#cute-jsd-footer").insertBefore('#footer');
}
}, 1)(jQuery);
<div id="cute-jsd-footer">
@message
</div>
It works fine. Only if I switch between the request type groups it adds the string once more.
Anyone out there that can show me how to avoid that?
Best regards,
Stephan
Hi@ all
I fixed the problem with transferring the element not in #footer.
now i load it in
jQuery("#cute-jsd-footer").insertAfter('#content .cv-page-body');
It works now because if I click on a group. not the hole page is refreshed. only the content part was refreshed and that was the problem.
Thank you alot,
Stephan
Great!
Thanks for sharing and glad you've found this out!
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not familiar with CUTE but your code seems not to go the right way.
Using setTimeout on a jquery payload does not run each time the page is refreshed IMO but more each time an XHR response is received which would explain why your message is popping multiple time.
Can you check the XHR console and see if it's in sync with requests?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Micky,
thank you for the quick reply.
I'm not familier with jquery. I have only transfer some code snipits to work like I think it should work. I don't know what to do here because on Network analysis i can't see anything from the jquery code.
BTW: The text is only duplicated if I klick on a issue group. If I refresh the page I see only on textline.
Best regards,
Stephan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.