Recently i faced an issue in yii/ajax pagination that running some javascript/jquery function in the randerpartial view.
let me explain the issue here
i have a view.php and the _view.php for partial file. there are some jquery function in randerpartial(_view.php) file which will work with each item ID. so i just add the JQuery codes in the partial(_view.php) file .
on the first page load , the jquery functions are works fine and when i go for the second page using yii pagination . those jquery functions are not working . even when i use fire-bug / inspect element to view the code. those jquery codes are not there in the second page .its appearing on first view only.
while reading some forums and yii notes , found that yii-jquery firing some additional jquery codes on the pagination which overwrite / disabled mine. those says afterAjaxUpdate will help to fix the issue as its will force to fire my jquery on pagination.
here i found thise useful link http://blog.nterms.com/2012/04/yii-clistview-javascript-issue-after.html
but i found another shortcut too.
just made 'afterAjaxUpdate'=>'', on the CListView/TbListView . will solve the problem as its not gonna fire any ajax/jquery code on the pagination , so my jquery will work normally on pagination.
problem solved!!!
my view.php:
_view.php
adding this line helped me alot
'afterAjaxUpdate'=>'',
let me explain the issue here
i have a view.php and the _view.php for partial file. there are some jquery function in randerpartial(_view.php) file which will work with each item ID. so i just add the JQuery codes in the partial(_view.php) file .
on the first page load , the jquery functions are works fine and when i go for the second page using yii pagination . those jquery functions are not working . even when i use fire-bug / inspect element to view the code. those jquery codes are not there in the second page .its appearing on first view only.
while reading some forums and yii notes , found that yii-jquery firing some additional jquery codes on the pagination which overwrite / disabled mine. those says afterAjaxUpdate will help to fix the issue as its will force to fire my jquery on pagination.
here i found thise useful link http://blog.nterms.com/2012/04/yii-clistview-javascript-issue-after.html
but i found another shortcut too.
just made 'afterAjaxUpdate'=>'', on the CListView/TbListView . will solve the problem as its not gonna fire any ajax/jquery code on the pagination , so my jquery will work normally on pagination.
problem solved!!!
my view.php:
1: $this->widget('bootstrap.widgets.TbListView', array(
2: //'type'=>'striped bordered condensed',
3: 'dataProvider'=>$dataProvider,
4: 'id'=>'Manage',
5: 'template'=>'{summary}{sorter}{items}{pager}',
6: 'summaryText' => 'Showing {start} - {end} of {count} Jobs',
7: 'itemView'=>'_view', // refers to the partial view named '_post'
8: //'ajaxUpdate'=>false,
9: 'emptyText'=>'<i> Sorry, there are no items to display</i>',
10: //'htmlOptions' => array('style'=>'margin-top:-20px;'),
11: 'afterAjaxUpdate'=>'',
12: 'sortableAttributes'=>array(
13: 'title'=>'Title',
14: 'created'=>'Date Posted',
15: 'status'=>'Status',
16: ),
17: ));
nilo
_view.php
1: <select class="w-select status_action" id="Status_Action<?php echo $data->ID; ?>"> 2: <option value="">Select one...</option> 3: . 4: . 5: . 6: . 7: </select> 8: <label class="updatestatus_text">Would you like to:</label> 9: <script> 10: $('#Status_Action<?php echo $data->ID; ?>').bind('change', function () { 11: var url = $(this).val(); // get selected value 12: if (url) { // require a URL 13: window.location = url; // redirect 14: } 15: return false; 16: }); 17: </script>
adding this line helped me alot
'afterAjaxUpdate'=>'',
Multisite Privacy is another one of those must-have 
This
plugin gives you a widget that lets you display recent posts from
multiple blogs within your network, as well as choose how many posts you
want to display and change style easily. You can also optionally show
thumbnails and blog titles with the recent posts.
The
Network Plugin Auditor lets you track which plugins were used on which
sites. It adds columns to your network admin to show which sites are
using each plugin, saving you the trouble of having to visit every
dashboard to find out.
If
you need a way to communicate announcements to blog admins across your
network, this is the plugin for you. It enables you to post
notifications for blog admins that will be shown until they mark all
messages as read. Network super admins can view who has not read which
message yet and can delete notifications manually.
The
Multisite Plugin Manager is pretty much a must-have plugin for any
multisite network. Previously known as WPMU Plugin Manager, it lets you
change plugin permissions for sites across your network in one
centralized dashboard panel. One of the best features of this plugin is
the ability to mass activate or deactivate a plugin on all sites in your
network – something that will save you quite a bit of time from having
to do it manually.
New
Blog Templates will simplify your life if you find yourself frequently
setting up new sites on your network. It gives you the ability to create
a template, or multiple templates, and then duplicate every single
setting (content, theme, categories etc.) for every new blog that is
created, saving you a ton of time.
This
is another plugin for showing the latest posts across your network. You
can display the list using the built-in widget or a shortcode that you
can add to any page or post. You can select the number of posts, the
days to limit, and the option to show titles only.
This
is a very useful plugin that will check for inactive sites on your
network, according to the criteria that you set, and will automatically
hide them for you. After you set the parameters for the routine checks,
WP_Cron will kick in to update and hide the inactive sites.
This
is a maintenance mode plugin written specifically for use with
WordPress networks. It allows a super admin to put his entire network,
main site, or subsites into maintenance mode while displaying a
cusotmizable maintenance page.
Multisite
Dashboard Switcher lets multisite admins quickly switch between
dashboards while navigating around the network. It makes managing
settings across sites more convenient with fewer clicks required for
getting from one site to another.
This
is a simple plugin that shows plugin activations across all your sites.
It is particularly useful for checking to see which plugins are not
being used at all so that you can deactivate those as needed. You can
also find out which are the most popularly used plugins on your network.
This
plugin creates four separate RSS 2.0 feeds from posts, comments, pages,
and one combined [posts & pages] across all blogs on your site. It
will exclude the first comment and page of a blog, as well as private,
spam, mature and deleted blogs.
Avatar
Privacy gives you more options when working with Gravatars on your
site. It lets users and commenters opt in or out of using Gravatars and
it doesn’t publish encrypted E-Mail addresses for non-members of
gravatar.com. You also have the option to use default avatar images
hosted on your server rather than gravatar.com.
This
plugin puts in place process for registration moderation. Potential new
site owners can request registration through a form embedded via a
shortcode. Then they must be granted access by the blog admin and then
the super admin before receiving login information.
This
plugin provides a lightweight XML sitemap generator with an easy-to-use
interface. It works perfectly with WordPress multisite, giving each
blog in the network its own unique sitemap.
Visual
Editor Biography adds a TinyMCE visual editor to the “Biographical
Info” profile field. This helps blog authors to more easily enter
information about themselves with the ability to easily add links,
paragraphs, etc.
Hyper
Admins simplifies administration tasks for super-admins. Specifically,
it makes two things more convenient: view any theme on any site without
enabling it and
This
is a super useful plugin for adding new existing to blogs. It adds
autocomplete to Dashboard > Users > Add New > Add Existing
User, which makes this process a breeze.
This
plugin makes use of the WordPress Logging Service to log basic events
in the network, including user profile update, emails sent by WordPress,
logging in, password resets, activated blogs, and much more.
This
is a simple plugin that makes your WordPress blog private unless the
user is logged in. You can also set a minium user level.
This
is a cool widget that lets multisite blogs feature recent images from
all the blogs on the network. It was written to be highly optimized for
performance and scalable for large networks. The plugin grabs images
attached to posts and excludes blogs that have privacy options enabled.
This
plugin gives admins the ability to bulk add WordPress user
registrations using a range of tools available as an extra admin page
under your Users tab. You can add new users using manual input, CSV and
email data, or by adding existing users from a Multisite Network.
User
Switching is for blog admins. It lets you quickly switch between user
accounts in WordPress at the click of a button. This is very useful for
when you are performing tests and have to log in and out with different
accounts. This plugin handles the user switch instantly. It’s secure and
even works with BuddyPress.


