1/** 2 * New page dialog plugin 3 * 4 * @author christian studer <christian.studer@meteotest.ch> 5 * @link http://www.dokuwiki.org/plugin:npd 6 */ 7jQuery(function(){ 8 var $button = jQuery('#npd__create_button'); 9 if (!$button) return; 10 11 // Check for link value 12 var npd_clicked_url = $button.attr('href'); 13 14 if(npd_clicked_url == undefined){ 15 // If not, it's in form mode 16 npd_clicked_url = jQuery('#npd__create_form').attr('action'); 17 } 18 19 $button.click(function(event) { 20 event.preventDefault(); 21 22 // Create dialog 23 var w = window.open(npd_clicked_url, 'npd_window', 'width=753,height=400,resizable=no'); 24 w.focus(); 25 }); 26 27 // Show the button 28 $button.show(); 29}); 30