Changeset 673081
- Timestamp:
- 02/25/2013 04:00:04 PM (13 years ago)
- File:
-
- 1 edited
-
wp-soononline-page/trunk/mobisoft-upload.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-soononline-page/trunk/mobisoft-upload.js
r673078 r673081 1 jQuery(document).ready(function($){ 2 $('.mobicolor-field').wpColorPicker(); 1 jQuery(document).ready(function() { 2 3 var formfield; 4 5 jQuery('.mobisoft-upload-button').click(function() { 6 formfield = jQuery(this).prev('input'); 7 tb_show('','media-upload.php?TB_iframe=true'); 8 return false; 9 }); 10 /* The above code Developed by oneTarek http://onetarek.com 11 Many thanks 12 */ 13 window.old_tb_remove = window.tb_remove; 14 window.tb_remove = function() { 15 window.old_tb_remove(); 16 formfield=null; 17 }; 18 19 window.original_send_to_editor = window.send_to_editor; 20 window.send_to_editor = function(html){ 21 if (formfield) { 22 fileurl = jQuery('img',html).attr('src'); 23 jQuery(formfield).val(fileurl); 24 tb_remove(); 25 } else { 26 window.original_send_to_editor(html); 27 } 28 }; 29 3 30 });
Note: See TracChangeset
for help on using the changeset viewer.