Index: openacs-4/packages/acs-templating/www/resources/tinymce/jscripts/tiny_mce/plugins/oacslink/js/link.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/tinymce/jscripts/tiny_mce/plugins/oacslink/js/link.js,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/acs-templating/www/resources/tinymce/jscripts/tiny_mce/plugins/oacslink/js/link.js 19 May 2009 18:16:20 -0000 1.1.2.1 +++ openacs-4/packages/acs-templating/www/resources/tinymce/jscripts/tiny_mce/plugins/oacslink/js/link.js 19 Jun 2009 14:17:08 -0000 1.1.2.2 @@ -42,11 +42,14 @@ // Setup form data // setFormValue('f_href', href); -// setFormValue('f_title', linkText); + setFormValue('f_title', linkText); } if (action == 'insert') { // setFormValue('f_href', href); -// setFormValue('f_title', linkText); + if (linkText == '') { + linkText = inst.selection.getContent(); + setFormValue('f_title', linkText); + } } window.focus(); @@ -307,9 +310,11 @@ elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); for (i=0; i} $file_name {}] } } - + set file_name [string trim $file_name] if {$f_title eq "" && [info exists file_name]} { element set_value upload_form f_title $file_name } @@ -232,9 +231,10 @@ set f_href "/file/${item_id}/${file_name}" } } + element set_value upload_form f_href $f_href + element set_value upload_form f_title $f_title } - ns_log notice "F_HREF= $f_href" - element set_value upload_form f_href $f_href + } } else { @@ -338,7 +338,9 @@ // document.getElementById('f_href').focus(); var f_href = document.getElementById('f_href'); var url = f_href.value; + alert('title='+document.getElementById('f_title').value); if (url !='') { + insertAction(); }