1jQuery(function () { 2 // build commit popup 3 var fieldsetcontent = 4 '<p>' + 5 '<label for="do__popup_msg">' + 6 PluginDo.getLang("popup_msg") + 7 '</label>' + 8 '<input class="edit" id="do__popup_msg" />' + 9 '</p>'; 10 11 PluginDo.createOverlay( 12 LANG.plugins['do'].finish_popup_title, 13 'do__commit_popup', 14 fieldsetcontent, 15 LANG.plugins['do'].finish_popup_submit, 16 PluginDo.closeSingleTask 17 ); 18 19 //clickable tasks 20 jQuery(document).on('click', 'a.plugin_do_status', PluginDo.toggle_status); 21 22 //update do items at page, so changes after last page render are shown 23 var $items = jQuery('span.plugin_do_item'); 24 if ($items.length > 0) { 25 26 //update titles of items with initial status info especially for tables 27 $items.each(function (i, item) { 28 PluginDo.buildTitle(jQuery(item), [], '', null, null); 29 }); 30 31 // update items with info from sqlite, 32 // ajax returns array with status info per task at page 33 jQuery.ajax({ 34 type: "POST", 35 url: DOKU_BASE + 'lib/exe/ajax.php', 36 data: { 37 call: 'plugin_do_status', 38 do_page: JSINFO.id 39 }, 40 success: PluginDo.updateItems, 41 dataType: 'json' 42 }); 43 } 44}); 45 46