Blesta Addons Posted August 28, 2017 Report Share Posted August 28, 2017 i want to disable the ajax class from herf links in the pagination, but it appear is not taking effect even if, i have added the new class to the pagination parametre but is affecting the class 'navigation' => array( // All numeric links 'numerical' => [ 'link_attributes' => ['class' => 'none'] ] ) i want to disable the ajax call from the pagination links (admin side). how to do this ? Quote Link to comment Share on other sites More sharing options...
0 Tyson Posted August 28, 2017 Report Share Posted August 28, 2017 What you have would work to disable AJAX for numerical pagination links, but not the current page, first, last, previous, or next links. I assume you updated the Blesta.pagination_ajax config file values for this? Quote Link to comment Share on other sites More sharing options...
0 Blesta Addons Posted August 28, 2017 Author Report Share Posted August 28, 2017 1 hour ago, Tyson said: What you have would work to disable AJAX for numerical pagination links, but not the current page, first, last, previous, or next links. I assume you updated the Blesta.pagination_ajax config file values for this? i have tried all, but nothing work, can you test override the pagination class and links class, i begin to feel is a bug . Quote Link to comment Share on other sites More sharing options...
0 Tyson Posted August 28, 2017 Report Share Posted August 28, 2017 I tested updating the Blesta.pagination_ajax config value to remove the ajax class (i.e. changed from 'class' => "ajax" to 'class' => ""), and observed the Invoices widget on a client profile to no longer load via ajax when clicking any of the pagination links. Do you not encounter this behavior? I'm using v4.1. Quote Link to comment Share on other sites More sharing options...
0 Blesta Addons Posted August 28, 2017 Author Report Share Posted August 28, 2017 3 hours ago, Tyson said: I tested updating the Blesta.pagination_ajax config value to remove the ajax class (i.e. changed from 'class' => "ajax" to 'class' => ""), and observed the Invoices widget on a client profile to no longer load via ajax when clicking any of the pagination links. Do you not encounter this behavior? I'm using v4.1. i'm using v4.1 too, and i tried to change the pagination attributes but no result, i'm using the pagination in the admin_manage_plugin.php file . can you post your array merge . i think you are testing in the client side . Quote Link to comment Share on other sites More sharing options...
0 Tyson Posted August 29, 2017 Report Share Posted August 29, 2017 So you're using it in a plugin? Most plugins make a call to AppController::setPagination($get, $settings, $ajax) to load and set the pagination from the config. The Blesta.pagination_ajax value in the config is used when the third argument, $ajax, is true. This value does not get overridden. If you want to override the AJAX pagination behavior, don't call AppController::setPagination. Instead, load and set the pagination yourself. // Load pagination $this->Pagination = $this->getFromContainer('pagination'); // Set GET params $this->Pagination->setGet($this->get); // Your pagination settings merged with your custom pagination settings $this->Pagination->setSettings(Configure::get('Blesta.pagination')); // Make Pagination available to the view $this->view->Pagination = $this->Pagination; Blesta Addons 1 Quote Link to comment Share on other sites More sharing options...
0 Blesta Addons Posted September 9, 2017 Author Report Share Posted September 9, 2017 On 29/08/2017 at 5:42 PM, Tyson said: So you're using it in a plugin? Most plugins make a call to AppController::setPagination($get, $settings, $ajax) to load and set the pagination from the config. The Blesta.pagination_ajax value in the config is used when the third argument, $ajax, is true. This value does not get overridden. If you want to override the AJAX pagination behavior, don't call AppController::setPagination. Instead, load and set the pagination yourself. // Load pagination $this->Pagination = $this->getFromContainer('pagination'); // Set GET params $this->Pagination->setGet($this->get); // Your pagination settings merged with your custom pagination settings $this->Pagination->setSettings(Configure::get('Blesta.pagination')); // Make Pagination available to the view $this->view->Pagination = $this->Pagination; Thanks i will try your solution this weekend. also i noticed that the $this->renderAjaxWidgetIfAsync() is not working in the admin_manage_plugin . i can see the ajax loading new data as expected, but the loaded data in not inserted in the content div! how we can make it working ? Quote Link to comment Share on other sites More sharing options...
Question
Blesta Addons
i want to disable the ajax class from herf links in the pagination, but it appear is not taking effect even if, i have added the new class to the pagination parametre but is affecting the class
'navigation' => array( // All numeric links 'numerical' => [ 'link_attributes' => ['class' => 'none'] ] )
i want to disable the ajax call from the pagination links (admin side). how to do this ?
Link to comment
Share on other sites
6 answers to this question
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.