Ali Majrashi Posted February 10, 2016 Share Posted February 10, 2016 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 Link to comment Share on other sites More sharing options...
HeadStand Posted February 11, 2016 Share Posted February 11, 2016 Which JS is only loaded in the ACP? Link to comment Share on other sites More sharing options...
Ali Majrashi Posted February 11, 2016 Author Share Posted February 11, 2016 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 Link to comment Share on other sites More sharing options...
HeadStand Posted February 12, 2016 Share Posted February 12, 2016 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. Link to comment Share on other sites More sharing options...
Ali Majrashi Posted February 12, 2016 Author Share Posted February 12, 2016 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 Link to comment Share on other sites More sharing options...
Mark Posted February 17, 2016 Share Posted February 17, 2016 This isn't a question, so I'm going to move it to feedback. Link to comment Share on other sites More sharing options...
Colonel_mortis Posted February 17, 2016 Share Posted February 17, 2016 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.