From 07b95dc49b31d131b1fecdabf2059a447935c196 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sun, 06 Feb 2011 17:21:23 -0500
Subject: [PATCH] Delegate contact input validation to rcube_addressbook instance; accept already localized texts in rcube_output::show_message()

---
 program/js/tiny_mce/utils/form_utils.js |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/program/js/tiny_mce/utils/form_utils.js b/program/js/tiny_mce/utils/form_utils.js
index c1f1409..2617a26 100644
--- a/program/js/tiny_mce/utils/form_utils.js
+++ b/program/js/tiny_mce/utils/form_utils.js
@@ -1,10 +1,11 @@
 /**
- * $Id: form_utils.js 673 2008-03-06 13:26:20Z spocke $
+ * form_utils.js
  *
- * Various form utilitiy functions.
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
  *
- * @author Moxiecode
- * @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
  */
 
 var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
@@ -13,7 +14,7 @@
 	var h = "";
 
 	h += '<a id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
-	h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"></span></a>';
+	h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;</span></a>';
 
 	return h;
 }
@@ -50,7 +51,7 @@
 
 	html = "";
 	html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
-	html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"></span></a>';
+	html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;</span></a>';
 
 	return html;
 }
@@ -92,7 +93,7 @@
 function getSelectValue(form_obj, field_name) {
 	var elm = form_obj.elements[field_name];
 
-	if (elm == null || elm.options == null)
+	if (elm == null || elm.options == null || elm.selectedIndex === -1)
 		return "";
 
 	return elm.options[elm.selectedIndex].value;

--
Gitblit v1.9.1