PluginProbe
Edit Flow / 0.8
Edit Flow v0.8
0.11.1 0.11.0 0.7.2 0.7.3 0.7.4 0.7.5 0.7.6 0.8 0.8.1 0.8.2 0.9 0.9.1 0.9.2 0.9.3 0.9.4 0.9.5 0.9.6 0.9.7 0.9.8 0.9.9 trunk 0.1.5 0.10.0 0.10.1 0.10.2 All 44 releases
edit-flow / modules / notifications / lib / notifications.js

notifications.js in Edit Flow 0.8, at modules/notifications/lib/notifications.js

41 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 jQuery(document).ready(function($) {
2 $('#ef-post_following_users_box ul').listFilterizer();
3
4 var params = {
5 action: 'save_notifications',
6 post_id: $('#post_ID').val(),
7 };
8
9 $('.ef-post_following_list li input:checkbox, .ef-following_usergroups li input:checkbox').click(function() {
10 var user_group_ids = [];
11 var parent_this = $(this);
12 params.ef_notifications_name = $(this).attr('name');
13 params._nonce = $("#ef_notifications_nonce").val();
14
15 $(this)
16 .parent()
17 .parent()
18 .parent()
19 .find('input:checked')
20 .map(function(){
21 user_group_ids.push($(this).val());
22 })
23
24 params.user_group_ids = user_group_ids;
25
26 $.ajax({
27 type : 'POST',
28 url : (ajaxurl) ? ajaxurl : wpListL10n.url,
29 data : params,
30 success : function(x) {
31 var backgroundColor = parent_this.css( 'background-color' );
32 $(parent_this.parent().parent())
33 .animate( { 'backgroundColor':'#CCEEBB' }, 200 )
34 .animate( { 'backgroundColor':backgroundColor }, 200 );
35 },
36 error : function(r) {
37 $('#ef-post_following_users_box').prev().append(' <p class="error">There was an error. Please reload the page.</p>');
38 }
39 });
40 });
41 });