| 1 |
|
| 2 |
jQuery(document).ready(function(){ |
| 3 |
|
| 4 |
jQuery('#wpsc_popup_background,.wpsc_popup_close').click(function(){ |
| 5 |
wpsc_modal_close(); |
| 6 |
}); |
| 7 |
|
| 8 |
jQuery(document).keyup(function(e){ |
| 9 |
if (e.keyCode == 27) { |
| 10 |
wpsc_modal_close(); |
| 11 |
} |
| 12 |
}); |
| 13 |
|
| 14 |
}); |
| 15 |
|
| 16 |
function wpsc_modal_open(title){ |
| 17 |
jQuery('#wpsc_popup_title h3').text(title); |
| 18 |
jQuery('#wpsc_popup_body').html(wpsc_admin.loading_html); |
| 19 |
jQuery('.wpsc_popup_action').hide(); |
| 20 |
jQuery('#wpsc_popup_container,#wpsc_popup_background').show(); |
| 21 |
} |
| 22 |
|
| 23 |
function wpsc_modal_close(){ |
| 24 |
jQuery('#wpsc_popup_container,#wpsc_popup_background').hide(); |
| 25 |
} |
| 26 |
|
| 27 |
function wpsc_modal_close_thread(tinymce_toolbar){ |
| 28 |
|
| 29 |
jQuery('#wpsc_popup_container,#wpsc_popup_background').hide(); |
| 30 |
var is_tinymce = (typeof tinyMCE != "undefined") && tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden(); |
| 31 |
if(is_tinymce){ |
| 32 |
tinymce.init({ |
| 33 |
selector:'#wpsc_reply_box', |
| 34 |
body_id: 'wpsc_reply_box', |
| 35 |
menubar: false, |
| 36 |
statusbar: false, |
| 37 |
autoresize_min_height: 150, |
| 38 |
wp_autoresize_on: true, |
| 39 |
plugins: [ |
| 40 |
'wpautoresize lists link image directionality' |
| 41 |
], |
| 42 |
toolbar: tinymce_toolbar.join() +' | wpsc_templates', |
| 43 |
branding: false, |
| 44 |
autoresize_bottom_margin: 20, |
| 45 |
browser_spellcheck : true, |
| 46 |
relative_urls : false, |
| 47 |
remove_script_host : false, |
| 48 |
convert_urls : true |
| 49 |
}); |
| 50 |
} |
| 51 |
} |
| 52 |
|