Posted February 10, 20169 yr Hello, i'm developing new simple app that show statistics and it's difficult to use \IPS\Helpers\Chart\Dynamic in front end every things work fine except javascript since this class use javascript that only load in ACP the same thing with other Helper classes that only work in ACP i think all helpers should be global and we can use them in front end and admin panel without limitations i hope there is workaround on this limitation for now
February 11, 20169 yr Author 9 hours ago, HeadStand said: Which JS is only loaded in the ACP? ips.core.dynamicChart.js for the Dynamic Chart Helper to work without issues
February 12, 20169 yr Have you tried loading it manually? \IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'admin_core.js', 'core', 'admin' ) ); I don't see why that shouldn't work.
February 12, 20169 yr Author 2 hours ago, HeadStand said: Have you tried loading it manually? \IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'admin_core.js', 'core', 'admin' ) ); I don't see why that shouldn't work. by inspecting the console the JS files load without issues i'm lost now this is the logged info in the console Quote [Info] Enabled logging (Debug.js, line 184) [Log] Loading: core/interface/jquery/jquery-ui.js (Debug.js, line 180) [Log] Loading: core/front/controllers/widgets/ips.widgets.block.js (Debug.js, line 180) [Log] Loading: core/admin/controllers/core/ips.core.dynamicChart.js (Debug.js, line 180) [Log] Loaded: core/interface/jquery/jquery-ui.js (Debug.js, line 180) [Log] Loaded: core/front/controllers/widgets/ips.widgets.block.js (Debug.js, line 180) [Log] Loaded: core/admin/controllers/core/ips.core.dynamicChart.js (Debug.js, line 180) they load twice and ajax request will keep firing Quote [Log] Notifications: sending ajax request (Debug.js, line 180, x7) [Log] Notifications: Resetting inactive poll. (Debug.js, line 180) [Log] Notifications: sending ajax request (Debug.js, line 180, x2) [Log] Notifications: Resetting inactive poll. (Debug.js, line 180, x3) [Log] Notifications: sending ajax request (Debug.js, line 180) [Log] Notifications: Resetting inactive poll. (Debug.js, line 180) i'm using the same code in core\modules\admin\stats\registrationstats.php in ACP this is the log info Quote [Info] Enabled logging (Debug.js, line 184) [Log] Loading: core/interface/jquery/jquery-ui.js (Debug.js, line 180) [Log] Loaded: core/interface/jquery/jquery-ui.js (Debug.js, line 180) [Info] contentChange event, reinitializing widgets in ips_uid_4713_2 (Debug.js, line 184) the same with Matrix Form helper it's only work in ACP
February 17, 20169 yr On 12/02/2016 at 3:48 AM, Ali Majrashi said: by inspecting the console the JS files load without issues i'm lost now this is the logged info in the console they load twice and ajax request will keep firing i'm using the same code in core\modules\admin\stats\registrationstats.php in ACP this is the log info the same with Matrix Form helper it's only work in ACP It only loads it once - it logs "loading" and "loaded". The ajax things logged are for the notification polling that goes on, and aren't because you've added more scripts. It doesn't show up in ACP because there's no live notification polling in ACP.
Archived
This topic is now archived and is closed to further replies.