sparkks Posted December 2, 2019 Share Posted December 2, 2019 I do apologize for the following: If this is the wrong community to post this bug but I'm new so... yeah. If this issue has already been discussed. I did a tiny bit of searching, but couldn't find anything. The Post Title; I tried to create a title that would be as simplistic as possible while being descriptive to reach the most amount of users searching for this issue. --- TL;DR Bug: jQuery Knob Format function is not working ( i.e: Percent sign is not displaying after usage statistic percentage on the product details page ) Fix: Update jQuery Knob from the currently installed version of 1.2.0 to latest version of 1.2.12. --- I was trying to figure out why the format function for jQuery Knob was not displaying the percent sign behind the usage percentage number on the product details page... Here's the default code: <script src="{$BASE_PATH_JS}/jquery.knob.js"></script> <script type="text/javascript"> jQuery(function() { jQuery(".usage-dial").knob({ 'format': function (value) { return value + '%'; } }); }); </script> I found that snip of code in the "/modules/servers/cpanel/templates/overview.tpl" file, but I'm sure it can be found else where as well. (That piece of code is not the problem.) Everything look to be fine, but after scrolling through the "assets/js/jquery.knob.js" file to troubleshoot, I noticed that there wasn't a format function in this file. I then scroll up to the top of the file to try to find the credit section to instantly notice that it's out of date. I did find out that jQuery Knob did not release the format function until version 1.2.6. [source] So I just updated the old version (1.2.0) with the newest version (1.2.12) and presto! The version 1.2.12 source I used was from here: https://github.com/aterrien/jQuery-Knob/blob/master/js/jquery.knob.js 0 Quote Link to comment Share on other sites More sharing options...
sparkks Posted December 2, 2019 Author Share Posted December 2, 2019 Lastly, I want to add that I do have the latest version 7.8.3 installed. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 3, 2019 Share Posted December 3, 2019 On 02/12/2019 at 05:45, sparkks said: I do apologize for the following: If this is the wrong community to post this bug but I'm new so... yeah. If this issue has already been discussed. I did a tiny bit of searching, but couldn't find anything. The Post Title; I tried to create a title that would be as simplistic as possible while being descriptive to reach the most amount of users searching for this issue. well done for taking the time to post this - the v7.9 beta 1 is still using the old knob file, so hopefully later beta releases will include the updated version of knob to fix this bug. I can confirm updating that file in v7.8.3 does fix the percentage display issue. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.