Update of 
/var/cvs/contributions/CMSContainer/cmsc/richtext/src/webapp/mmbase/edit/wizard/xinha
In directory james.mmbase.org:/tmp/cvs-serv22772

Modified Files:
        my-htmlarea.js 
Log Message:
CMSC-1310 Unable to make a link in the richtext editors unless you add a 
tooltip, error message says, no title.


See also: 
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/richtext/src/webapp/mmbase/edit/wizard/xinha
See also: http://www.mmbase.org/jira/browse/CMSC-1310


Index: my-htmlarea.js
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer/cmsc/richtext/src/webapp/mmbase/edit/wizard/xinha/my-htmlarea.js,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- my-htmlarea.js      6 Feb 2009 10:58:48 -0000       1.11
+++ my-htmlarea.js      5 Mar 2009 10:06:35 -0000       1.12
@@ -211,8 +211,7 @@
                outparam = {
                        f_href   : HTMLArea.is_ie ? 
editor.stripBaseURL(link.href) : link.getAttribute("href"),
                   f_destination : link.destination ,
-                       f_name   : link.name?link.name: sel_value,
-                       f_title  :link.title?link.title:'',
+                       f_title   : link.title?link.title: sel_value,
                        f_target : link.target,
                        f_usetarget : editor.config.makeLinkShowsTarget
                };
@@ -221,8 +220,7 @@
                outparam = {
                        f_href   : "Click \"New Url\" to enter URL",
                   f_destination : null,
-                       f_name   : sel_value?sel_value:'',
-                       f_title  : '',
+                       f_title   : sel_value?sel_value:'',
                        f_target : '',
                        f_usetarget : editor.config.makeLinkShowsTarget
                };
@@ -239,7 +237,7 @@
                         var range = editor._createRange(sel);
                         if(editor._selectionEmpty(sel))
                         {
-                              editor.insertHTML("<a 
href='"+param.f_href+"'title='"+param.f_title+"' 
name='"+param.f_name+"'>"+param.f_name+"</a>");
+                              editor.insertHTML("<a href='" + param.f_href + 
"' title='" + param.f_title + "'>" + param.f_title+ "</a>");
                         }
                         else{
                               if ( !HTMLArea.is_ie )
@@ -253,7 +251,7 @@
                                                 a = 
range.startContainer.parentNode;
                                           }
                                     }
-                                    a.innerHTML = param.f_name.trim();
+                                    a.innerHTML = param.f_title.trim();
                               }
                         }
                        } catch(ex) {}
@@ -271,12 +269,11 @@
                        else
                        {
                          a.href = href;
-                          a.innerHTML = param.f_name.trim();
+                          a.innerHTML = param.f_title.trim();
                        }
                }
                a.target = param.f_target.trim();
                a.title = param.f_title.trim();
-               a.name = param.f_name.trim();
                
             if (HTMLArea.is_ie) {
                   a.destination = param.f_destination.trim();
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to