Mercurial > public > sg101
comparison media/js/tiny_mce/utils/form_utils.js @ 183:149c3567fec1
Updated to TinyMCE version 3.3.2. This is for #57.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 28 Mar 2010 21:47:48 +0000 |
parents | a5b4c5ce0658 |
children |
comparison
equal
deleted
inserted
replaced
182:5c889b587416 | 183:149c3567fec1 |
---|---|
1 /** | 1 /** |
2 * $Id: form_utils.js 996 2009-02-06 17:32:20Z spocke $ | 2 * form_utils.js |
3 * | 3 * |
4 * Various form utilitiy functions. | 4 * Copyright 2009, Moxiecode Systems AB |
5 * Released under LGPL License. | |
5 * | 6 * |
6 * @author Moxiecode | 7 * License: http://tinymce.moxiecode.com/license |
7 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | 8 * Contributing: http://tinymce.moxiecode.com/contributing |
8 */ | 9 */ |
9 | 10 |
10 var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme")); | 11 var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme")); |
11 | 12 |
12 function getColorPickerHTML(id, target_form_element) { | 13 function getColorPickerHTML(id, target_form_element) { |
90 } | 91 } |
91 | 92 |
92 function getSelectValue(form_obj, field_name) { | 93 function getSelectValue(form_obj, field_name) { |
93 var elm = form_obj.elements[field_name]; | 94 var elm = form_obj.elements[field_name]; |
94 | 95 |
95 if (elm == null || elm.options == null) | 96 if (elm == null || elm.options == null || elm.selectedIndex === -1) |
96 return ""; | 97 return ""; |
97 | 98 |
98 return elm.options[elm.selectedIndex].value; | 99 return elm.options[elm.selectedIndex].value; |
99 } | 100 } |
100 | 101 |