includes/clientside/tinymce/plugins/advlink/js/advlink.js
changeset 778 57ce13805b6f
parent 543 dffcbfbc4e59
child 1193 e3b94bd055dc
equal deleted inserted replaced
777:488665d49417 778:57ce13805b6f
   426 	var formObj = document.forms[0];
   426 	var formObj = document.forms[0];
   427 	var href = formObj.href.value;
   427 	var href = formObj.href.value;
   428 	var target = getSelectValue(formObj, 'targetlist');
   428 	var target = getSelectValue(formObj, 'targetlist');
   429 
   429 
   430 	setAttrib(elm, 'href', href);
   430 	setAttrib(elm, 'href', href);
   431 	setAttrib(elm, 'mce_href', href);
       
   432 	setAttrib(elm, 'title');
   431 	setAttrib(elm, 'title');
   433 	setAttrib(elm, 'target', target == '_self' ? '' : target);
   432 	setAttrib(elm, 'target', target == '_self' ? '' : target);
   434 	setAttrib(elm, 'id');
   433 	setAttrib(elm, 'id');
   435 	setAttrib(elm, 'style');
   434 	setAttrib(elm, 'style');
   436 	setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
   435 	setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
   462 }
   461 }
   463 
   462 
   464 function getSelectValue(form_obj, field_name) {
   463 function getSelectValue(form_obj, field_name) {
   465 	var elm = form_obj.elements[field_name];
   464 	var elm = form_obj.elements[field_name];
   466 
   465 
   467 	if (elm == null || elm.options == null)
   466 	if (!elm || elm.options == null || elm.selectedIndex == -1)
   468 		return "";
   467 		return "";
   469 
   468 
   470 	return elm.options[elm.selectedIndex].value;
   469 	return elm.options[elm.selectedIndex].value;
   471 }
   470 }
   472 
   471