Changeset 162
- Timestamp:
- 04/22/2009 04:13:54 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/WordPress/plugin/transposh/js/transposh.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/js/transposh.js
r161 r162 61 61 }); 62 62 63 // close dialog64 if (typeof cClick == 'function' && source == 0) {63 //TODO: fix close dialog 64 /*if (typeof cClick == 'function' && source == 0) { 65 65 cClick(); 66 } 66 }*/ 67 67 }, 68 68 … … 77 77 //function for auto translation 78 78 function do_auto_translate() { 79 if (transposh_params['edit']) { 80 var togo = jQuery("."+transposh_params['prefix']+"u").size(); 81 if (togo) { 82 jQuery("#credit").after('<div style="width: 90%; height: 10px" id="progress_bar"/>') 83 jQuery("#progress_bar").progressbar({ 84 value: 0 85 }); 86 } 87 var done = 0; 88 } 79 89 jQuery("."+transposh_params['prefix']+"u").each(function (i) { 80 90 var translated_id = jQuery(this).attr('id'); … … 84 94 ajax_translate(jQuery("#"+translated_id).text(),jQuery("<div>"+result.translation+"</div>").text(),1,segment_id); 85 95 jQuery("#"+translated_id).addClass(transposh_params['prefix']+"t").removeClass(transposh_params['prefix']+"u"); 96 if (transposh_params['edit']) { 97 done = togo - jQuery("."+transposh_params['prefix']+"u").size(); 98 if (togo) { 99 //alert (done/togo*100); 100 jQuery("#progress_bar").progressbar('value' , done/togo*100); 101 } 102 } 86 103 } 87 104 }); … … 202 219 //read parameters 203 220 var transposh_params = new Array(); 204 jQuery("script[src*='transposh.js']").each(function ( i) {221 jQuery("script[src*='transposh.js']").each(function (j) { 205 222 var query_string = unescape(this.src.substring(this.src.indexOf('?')+1)); 206 223 var parms = query_string.split('&');
Note: See TracChangeset
for help on using the changeset viewer.
