1/** 2 * Attach AJAX action to the star 3 */ 4jQuery(function(){ 5 'use strict'; 6 var obj = jQuery('#plugin__starred'); 7 8 obj.click(function(e) { 9 jQuery.post(DOKU_BASE + 'lib/exe/ajax.php', { 10 call: 'startoggle', 11 id: JSINFO['id'] 12 }).done(function (data) { 13 obj.html(data); 14 obj.blur(); 15 }); 16 17 e.preventDefault(); 18 e.stopPropagation(); 19 return false; 20 }); 21 22 var starred_list = jQuery('div.plugin_starred'); 23 starred_list.find('a.plugin__starred').click(function(e) { 24 jQuery.post(DOKU_BASE + 'lib/exe/ajax.php', { 25 call: 'startoggle', 26 id: jQuery(this).data('pageid') 27 }).done(function (data) { 28 }); 29 30 e.preventDefault(); 31 e.stopPropagation(); 32 33 jQuery(this).closest('li').remove(); 34 }); 35 36}); 37