Author: erwan
Date: Thu Jul 29 18:36:16 2010 New Revision: 980537 URL: http://svn.apache.org/viewvc?rev=980537&view=rev Log: 2nd part of the OFBIZ-3863 : selectall.js jQuery migration Added: ofbiz/branches/jquery/framework/images/webapp/images/jquery/plugins/jeditable/ ofbiz/branches/jquery/framework/images/webapp/images/jquery/plugins/jeditable/jquery.jeditable.js (with props) Modified: ofbiz/branches/jquery/LICENSE ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy ofbiz/branches/jquery/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl ofbiz/branches/jquery/framework/common/webcommon/includes/htmlTemplate.ftl ofbiz/branches/jquery/framework/common/widget/CommonScreens.xml ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js ofbiz/branches/jquery/framework/images/webapp/images/selectall.js ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl ofbiz/branches/jquery/themes/tomahawk/webapp/tomahawk/css/style.css Modified: ofbiz/branches/jquery/LICENSE URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/LICENSE?rev=980537&r1=980536&r2=980537&view=diff ============================================================================== --- ofbiz/branches/jquery/LICENSE (original) +++ ofbiz/branches/jquery/LICENSE Thu Jul 29 18:36:16 2010 @@ -1266,6 +1266,7 @@ ofbiz/trunk/framework/images/webapp/imag ofbiz/trunk/framework/images/webapp/images/jquery/plugins/jquery-ui-timepicker-addon-0.5.js ofbiz/trunk/framework/images/webapp/images/jquery/plugins/jquery-ui-timepicker-addon-0.5.min.js ofbiz/trunk/framework/images/webapp/images/jquery/ui/js/jquery-ui-1.8.2.custom.min.js +ofbiz/trunk/framework/images/webapp/images/jquery/plugins/jeditable/jquery.jeditable.js ========================================================================= The MIT License Modified: ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy?rev=980537&r1=980536&r2=980537&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy (original) +++ ofbiz/branches/jquery/framework/common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy Thu Jul 29 18:36:16 2010 @@ -31,10 +31,9 @@ def andExprs = []; def entityName = context.entityName; def searchFields = context.searchFields; def displayFields = context.displayFields ?: searchFields; -def searchValueFieldName = parameters.searchValueField; -if (searchValueFieldName) fieldValue = parameters.get(searchValueFieldName); +def searchValueFieldName = parameters.term; +if (searchValueFieldName) fieldValue = searchValueFieldName; def searchType = context.searchType; - if (searchFields && fieldValue) { searchFieldsList = StringUtil.toList(searchFields); displayFieldsSet = StringUtil.toSet(displayFields); Modified: ofbiz/branches/jquery/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl?rev=980537&r1=980536&r2=980537&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl (original) +++ ofbiz/branches/jquery/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl Thu Jul 29 18:36:16 2010 @@ -16,11 +16,12 @@ KIND, either express or implied. See th specific language governing permissions and limitations under the License. --> - -<ul> +<script type="text/javascript"> +var autocomp = [ <#if autocompleteOptions?exists> <#assign displayReturnField = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.displayReturnField")> <#list autocompleteOptions as autocompleteOption> + { <#assign displayString = ""/> <#assign returnField = ""/> <#-- <#list autocompleteOption.keySet() as key> instead use the field order of display fields --> @@ -36,8 +37,12 @@ under the License. </#list> <#if ("Y" == displayReturnField)> <#assign displayString = displayString + "[" + returnField + "]"> - </#if> - <li id="${returnField}"><#if (displayString?trim?has_content )>${displayString?trim}<#else>${returnField}</#if></li> + </#if> + "id": " ${returnField}", + "label": "<#if (displayString?trim?has_content )>${displayString?trim}<#else>${returnField}</#if>", + "value": "${returnField}" + }<#if autocompleteOption_has_next>,</#if> </#list> </#if> -</ul> +]; +</script> \ No newline at end of file Modified: ofbiz/branches/jquery/framework/common/webcommon/includes/htmlTemplate.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/webcommon/includes/htmlTemplate.ftl?rev=980537&r1=980536&r2=980537&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/common/webcommon/includes/htmlTemplate.ftl (original) +++ ofbiz/branches/jquery/framework/common/webcommon/includes/htmlTemplate.ftl Thu Jul 29 18:36:16 2010 @@ -19,7 +19,7 @@ under the License. <#include "component://widget/templates/htmlFormMacroLibrary.ftl"/> -<#macro lookupField className="" alert="" name="" value="" size="20" maxlength="20" id="" event="" action="" disabled="" autocomplete="" descriptionFieldName="" formName="" fieldFormName="" targetParameterIter="" imgSrc="" ajaxUrl="" ajaxEnabled="" presentation="" width="20" height="20" position="topleft" fadeBackground="" clearText="" showDescription="" initiallyCollapsed=""> +<#macro lookupField className="" alert="" name="" value="" size="20" maxlength="20" id="" event="" action="" disabled="" autocomplete="" descriptionFieldName="" formName="" fieldFormName="" targetParameterIter="" imgSrc="" ajaxUrl="" ajaxEnabled="" presentation="" width="620" height="500" position="topleft" fadeBackground="" clearText="" showDescription="" initiallyCollapsed=""> <#if (!ajaxEnabled?has_content)> <#assign javascriptEnabled = Static["org.ofbiz.base.util.UtilHttp"].isJavaScriptEnabled(request) /> <#if (javascriptEnabled)> @@ -31,7 +31,7 @@ under the License. </#if> <#if (!ajaxUrl?has_content)> <#local ajaxUrl = requestAttributes._REQUEST_HANDLER_.makeLink(request, response, fieldFormName)/> - <#local ajaxUrl = id + "," + ajaxUrl + ",ajaxLookup=Y&searchValueField=" + name /> + <#local ajaxUrl = id + "," + ajaxUrl + ",ajaxLookup=Y" /> </#if> <#if (!showDescription?has_content)> <#local showDescription = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.lookup.showDescription", "N")> Modified: ofbiz/branches/jquery/framework/common/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/widget/CommonScreens.xml?rev=980537&r1=980536&r2=980537&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/common/widget/CommonScreens.xml (original) +++ ofbiz/branches/jquery/framework/common/widget/CommonScreens.xml Thu Jul 29 18:36:16 2010 @@ -116,6 +116,7 @@ under the License. <!-- The default (global) java scripts --> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/js/jquery-ui-1.8.2.custom.min.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon-0.5.js" global="true"/> + <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/jeditable/jquery.jeditable.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/jquery.ui.datepicker.js" global="true"/> <set field="initialLocale" type="String" value="${parameters.userLogin.lastLocale}" default-value="${groovy:locale.toString()}"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-${initialLocale}.js" global="true"/> @@ -316,6 +317,7 @@ under the License. <!-- The default (global) java scripts --> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/jquery-ui-1.8.2.custom.min.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon-0.5.js" global="true"/> + <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/jeditable/jquery.jeditable.js" global="true"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/jquery.ui.datepicker.js" global="true"/> <set field="initialLocale" type="String" value="${parameters.userLogin.lastLocale}" default-value="${groovy:locale.toString()}"/> <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-${initialLocale}.js" global="true"/> Modified: ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js?rev=980537&r1=980536&r2=980537&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js (original) +++ ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js Thu Jul 29 18:36:16 2010 @@ -181,12 +181,13 @@ function initiallyCollapseDelayed() { /************************************* * Fieldlookup Class & Methods *************************************/ -function ConstructLookup(requestUrl, inputFieldId, dialogTarget, dialogOptionalTarget, formName, width, height, position, modal) { +function ConstructLookup(requestUrl, inputFieldId, dialogTarget, dialogOptionalTarget, formName, width, height, position, modal, ajaxUrl, showDescription) { // create Link Element with unique Key var lookupId = GLOBAL_LOOKUP_REF.createNextKey(); var inputBox = document.getElementById(inputFieldId); - inputBox.id = lookupId + "_" + inputFieldId; + newInputBoxId = lookupId + "_" + inputFieldId; + inputBox.id = newInputBoxId; var parent = inputBox.parentNode; var link = document.createElement('A'); @@ -202,6 +203,14 @@ function ConstructLookup(requestUrl, inp parent.appendChild(hiddenDiv); + // createAjax autocomplete + if (ajaxUrl != "" && showDescription != "") { + //write the new input box id in the ajaxUrl Array + ajaxUrl = ajaxUrl.replace(ajaxUrl.substring(0, ajaxUrl.indexOf(",")), newInputBoxId) + new ajaxAutoCompleter(ajaxUrl, showDescription); + + } + // Lookup Configuration var dialogOpts = { modal: (modal == "true") ? true : false, Added: ofbiz/branches/jquery/framework/images/webapp/images/jquery/plugins/jeditable/jquery.jeditable.js URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/images/webapp/images/jquery/plugins/jeditable/jquery.jeditable.js?rev=980537&view=auto ============================================================================== --- ofbiz/branches/jquery/framework/images/webapp/images/jquery/plugins/jeditable/jquery.jeditable.js (added) +++ ofbiz/branches/jquery/framework/images/webapp/images/jquery/plugins/jeditable/jquery.jeditable.js Thu Jul 29 18:36:16 2010 @@ -0,0 +1,546 @@ +/* + * Jeditable - jQuery in place edit plugin + * + * Copyright (c) 2006-2009 Mika Tuupola, Dylan Verheul + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/mit-license.php + * + * Project home: + * http://www.appelsiini.net/projects/jeditable + * + * Based on editable by Dylan Verheul <dylan_at_dyve.net>: + * http://www.dyve.net/jquery/?editable + * + */ + +/** + * Version 1.7.2-dev + * + * ** means there is basic unit tests for this parameter. + * + * @name Jeditable + * @type jQuery + * @param String target (POST) URL or function to send edited content to ** + * @param Hash options additional options + * @param String options[method] method to use to send edited content (POST or PUT) ** + * @param Function options[callback] Function to run after submitting edited content ** + * @param String options[name] POST parameter name of edited content + * @param String options[id] POST parameter name of edited div id + * @param Hash options[submitdata] Extra parameters to send when submitting edited content. + * @param String options[type] text, textarea or select (or any 3rd party input type) ** + * @param Integer options[rows] number of rows if using textarea ** + * @param Integer options[cols] number of columns if using textarea ** + * @param Mixed options[height] 'auto', 'none' or height in pixels ** + * @param Mixed options[width] 'auto', 'none' or width in pixels ** + * @param String options[loadurl] URL to fetch input content before editing ** + * @param String options[loadtype] Request type for load url. Should be GET or POST. + * @param String options[loadtext] Text to display while loading external content. + * @param Mixed options[loaddata] Extra parameters to pass when fetching content before editing. + * @param Mixed options[data] Or content given as paramameter. String or function.** + * @param String options[indicator] indicator html to show when saving + * @param String options[tooltip] optional tooltip text via title attribute ** + * @param String options[event] jQuery event such as 'click' of 'dblclick' ** + * @param String options[submit] submit button value, empty means no button ** + * @param String options[cancel] cancel button value, empty means no button ** + * @param String options[cssclass] CSS class to apply to input form. 'inherit' to copy from parent. ** + * @param String options[style] Style to apply to input form 'inherit' to copy from parent. ** + * @param String options[select] true or false, when true text is highlighted ?? + * @param String options[placeholder] Placeholder text or html to insert when element is empty. ** + * @param String options[onblur] 'cancel', 'submit', 'ignore' or function ?? + * + * @param Function options[onsubmit] function(settings, original) { ... } called before submit + * @param Function options[onreset] function(settings, original) { ... } called before reset + * @param Function options[onerror] function(settings, original, xhr) { ... } called on error + * + * @param Hash options[ajaxoptions] jQuery Ajax options. See docs.jquery.com. + * + */ + +(function($) { + + $.fn.editable = function(target, options) { + + if ('disable' == target) { + $(this).data('disabled.editable', true); + return; + } + if ('enable' == target) { + $(this).data('disabled.editable', false); + return; + } + if ('destroy' == target) { + $(this) + .unbind($(this).data('event.editable')) + .removeData('disabled.editable') + .removeData('event.editable'); + return; + } + + var settings = $.extend({}, $.fn.editable.defaults, {target:target}, options); + + /* setup some functions */ + var plugin = $.editable.types[settings.type].plugin || function() { }; + var submit = $.editable.types[settings.type].submit || function() { }; + var buttons = $.editable.types[settings.type].buttons + || $.editable.types['defaults'].buttons; + var content = $.editable.types[settings.type].content + || $.editable.types['defaults'].content; + var element = $.editable.types[settings.type].element + || $.editable.types['defaults'].element; + var reset = $.editable.types[settings.type].reset + || $.editable.types['defaults'].reset; + var callback = settings.callback || function() { }; + var onedit = settings.onedit || function() { }; + var onsubmit = settings.onsubmit || function() { }; + var onreset = settings.onreset || function() { }; + var onerror = settings.onerror || reset; + + /* Show tooltip. */ + if (settings.tooltip) { + $(this).attr('title', settings.tooltip); + } + + settings.autowidth = 'auto' == settings.width; + settings.autoheight = 'auto' == settings.height; + + return this.each(function() { + + /* Save this to self because this changes when scope changes. */ + var self = this; + + /* Inlined block elements lose their width and height after first edit. */ + /* Save them for later use as workaround. */ + var savedwidth = $(self).width(); + var savedheight = $(self).height(); + + /* Save so it can be later used by $.editable('destroy') */ + $(this).data('event.editable', settings.event); + + /* If element is empty add something clickable (if requested) */ + if (!$.trim($(this).html())) { + $(this).html(settings.placeholder); + } + + $(this).bind(settings.event, function(e) { + + /* Abort if element is disabled. */ + if (true === $(this).data('disabled.editable')) { + return; + } + + /* Prevent throwing an exeption if edit field is clicked again. */ + if (self.editing) { + return; + } + + /* Abort if onedit hook returns false. */ + if (false === onedit.apply(this, [settings, self])) { + return; + } + + /* Prevent default action and bubbling. */ + e.preventDefault(); + e.stopPropagation(); + + /* Remove tooltip. */ + if (settings.tooltip) { + $(self).removeAttr('title'); + } + + /* Figure out how wide and tall we are, saved width and height. */ + /* Workaround for http://dev.jquery.com/ticket/2190 */ + if (0 == $(self).width()) { + settings.width = savedwidth; + settings.height = savedheight; + } else { + if (settings.width != 'none') { + settings.width = + settings.autowidth ? $(self).width() : settings.width; + } + if (settings.height != 'none') { + settings.height = + settings.autoheight ? $(self).height() : settings.height; + } + } + + /* Remove placeholder text, replace is here because of IE. */ + if ($(this).html().toLowerCase().replace(/(;|"|\/)/g, '') == + settings.placeholder.toLowerCase().replace(/(;|"|\/)/g, '')) { + $(this).html(''); + } + + self.editing = true; + self.revert = $(self).html(); + $(self).html(''); + + /* Create the form object. */ + var form = $('<form />'); + + /* Apply css or style or both. */ + if (settings.cssclass) { + if ('inherit' == settings.cssclass) { + form.attr('class', $(self).attr('class')); + } else { + form.attr('class', settings.cssclass); + } + } + + if (settings.style) { + if ('inherit' == settings.style) { + form.attr('style', $(self).attr('style')); + /* IE needs the second line or display wont be inherited. */ + form.css('display', $(self).css('display')); + } else { + form.attr('style', settings.style); + } + } + + /* Add main input element to form and store it in input. */ + var input = element.apply(form, [settings, self]); + + /* Set input content via POST, GET, given data or existing value. */ + var input_content; + + if (settings.loadurl) { + var t = setTimeout(function() { + input.disabled = true; + content.apply(form, [settings.loadtext, settings, self]); + }, 100); + + var loaddata = {}; + loaddata[settings.id] = self.id; + if ($.isFunction(settings.loaddata)) { + $.extend(loaddata, settings.loaddata.apply(self, [self.revert, settings])); + } else { + $.extend(loaddata, settings.loaddata); + } + $.ajax({ + type : settings.loadtype, + url : settings.loadurl, + data : loaddata, + async : false, + success: function(result) { + window.clearTimeout(t); + input_content = result; + input.disabled = false; + } + }); + } else if (settings.data) { + input_content = settings.data; + if ($.isFunction(settings.data)) { + input_content = settings.data.apply(self, [self.revert, settings]); + } + } else { + input_content = self.revert; + } + content.apply(form, [input_content, settings, self]); + + input.attr('name', settings.name); + + /* Add buttons to the form. */ + buttons.apply(form, [settings, self]); + + /* Add created form to self. */ + $(self).append(form); + + /* Attach 3rd party plugin if requested. */ + plugin.apply(form, [settings, self]); + + /* Focus to first visible form element. */ + $(':input:visible:enabled:first', form).focus(); + + /* Highlight input contents when requested. */ + if (settings.select) { + input.select(); + } + + /* discard changes if pressing esc */ + input.keydown(function(e) { + if (e.keyCode == 27) { + e.preventDefault(); + reset.apply(form, [settings, self]); + } + }); + + /* Discard, submit or nothing with changes when clicking outside. */ + /* Do nothing is usable when navigating with tab. */ + var t; + if ('cancel' == settings.onblur) { + input.blur(function(e) { + /* Prevent canceling if submit was clicked. */ + t = setTimeout(function() { + reset.apply(form, [settings, self]); + }, 500); + }); + } else if ('submit' == settings.onblur) { + input.blur(function(e) { + /* Prevent double submit if submit was clicked. */ + t = setTimeout(function() { + form.submit(); + }, 200); + }); + } else if ($.isFunction(settings.onblur)) { + input.blur(function(e) { + settings.onblur.apply(self, [input.val(), settings]); + }); + } else { + input.blur(function(e) { + /* TODO: maybe something here */ + }); + } + + form.submit(function(e) { + + if (t) { + clearTimeout(t); + } + + /* Do no submit. */ + e.preventDefault(); + + /* Call before submit hook. */ + /* If it returns false abort submitting. */ + if (false !== onsubmit.apply(form, [settings, self])) { + /* Custom inputs call before submit hook. */ + /* If it returns false abort submitting. */ + if (false !== submit.apply(form, [settings, self])) { + + /* Check if given target is function */ + if ($.isFunction(settings.target)) { + var str = settings.target.apply(self, [input.val(), settings]); + $(self).html(str); + self.editing = false; + callback.apply(self, [self.innerHTML, settings]); + /* TODO: this is not dry */ + if (!$.trim($(self).html())) { + $(self).html(settings.placeholder); + } + } else { + /* Add edited content and id of edited element to POST. */ + var submitdata = {}; + submitdata[settings.name] = input.val(); + submitdata[settings.id] = self.id; + /* Add extra data to be POST:ed. */ + if ($.isFunction(settings.submitdata)) { + $.extend(submitdata, settings.submitdata.apply(self, [self.revert, settings])); + } else { + $.extend(submitdata, settings.submitdata); + } + + /* Quick and dirty PUT support. */ + if ('PUT' == settings.method) { + submitdata['_method'] = 'put'; + } + + /* Show the saving indicator. */ + $(self).html(settings.indicator); + + /* Defaults for ajaxoptions. */ + var ajaxoptions = { + type : 'POST', + data : submitdata, + dataType: 'html', + url : settings.target, + success : function(result, status) { + if (ajaxoptions.dataType == 'html') { + $(self).html(result); + } + self.editing = false; + callback.apply(self, [result, settings]); + if (!$.trim($(self).html())) { + $(self).html(settings.placeholder); + } + }, + error : function(xhr, status, error) { + onerror.apply(form, [settings, self, xhr]); + } + }; + + /* Override with what is given in settings.ajaxoptions. */ + $.extend(ajaxoptions, settings.ajaxoptions); + $.ajax(ajaxoptions); + + } + } + } + + /* Show tooltip again. */ + $(self).attr('title', settings.tooltip); + + return false; + }); + }); + + /* Privileged methods */ + this.reset = function(form) { + /* Prevent calling reset twice when blurring. */ + if (this.editing) { + /* Before reset hook, if it returns false abort reseting. */ + if (false !== onreset.apply(form, [settings, self])) { + $(self).html(self.revert); + self.editing = false; + if (!$.trim($(self).html())) { + $(self).html(settings.placeholder); + } + /* Show tooltip again. */ + if (settings.tooltip) { + $(self).attr('title', settings.tooltip); + } + } + } + }; + }); + + }; + + + $.editable = { + types: { + defaults: { + element : function(settings, original) { + var input = $('<input type="hidden"></input>'); + $(this).append(input); + return(input); + }, + content : function(string, settings, original) { + $(':input:first', this).val(string); + }, + reset : function(settings, original) { + original.reset(this); + }, + buttons : function(settings, original) { + var form = this; + if (settings.submit) { + /* If given html string use that. */ + if (settings.submit.match(/>$/)) { + var submit = $(settings.submit).click(function() { + if (submit.attr("type") != "submit") { + form.submit(); + } + }); + /* Otherwise use button with given string as text. */ + } else { + var submit = $('<button type="submit" />'); + submit.html(settings.submit); + } + $(this).append(submit); + } + if (settings.cancel) { + /* If given html string use that. */ + if (settings.cancel.match(/>$/)) { + var cancel = $(settings.cancel); + /* otherwise use button with given string as text */ + } else { + var cancel = $('<button type="cancel" />'); + cancel.html(settings.cancel); + } + $(this).append(cancel); + + $(cancel).click(function(event) { + if ($.isFunction($.editable.types[settings.type].reset)) { + var reset = $.editable.types[settings.type].reset; + } else { + var reset = $.editable.types['defaults'].reset; + } + reset.apply(form, [settings, original]); + return false; + }); + } + } + }, + text: { + element : function(settings, original) { + var input = $('<input />'); + if (settings.width != 'none') { input.attr('width', settings.width); } + if (settings.height != 'none') { input.attr('height', settings.height); } + /* https://bugzilla.mozilla.org/show_bug.cgi?id=236791 */ + //input[0].setAttribute('autocomplete','off'); + input.attr('autocomplete','off'); + $(this).append(input); + return(input); + } + }, + textarea: { + element : function(settings, original) { + var textarea = $('<textarea />'); + if (settings.rows) { + textarea.attr('rows', settings.rows); + } else if (settings.height != "none") { + textarea.height(settings.height); + } + if (settings.cols) { + textarea.attr('cols', settings.cols); + } else if (settings.width != "none") { + textarea.width(settings.width); + } + $(this).append(textarea); + return(textarea); + } + }, + select: { + element : function(settings, original) { + var select = $('<select />'); + $(this).append(select); + return(select); + }, + content : function(data, settings, original) { + /* If it is string assume it is json. */ + if (String == data.constructor) { + eval ('var json = ' + data); + } else { + /* Otherwise assume it is a hash already. */ + var json = data; + } + for (var key in json) { + if (!json.hasOwnProperty(key)) { + continue; + } + if ('selected' == key) { + continue; + } + var option = $('<option />').val(key).append(json[key]); + $('select', this).append(option); + } + /* Loop option again to set selected. IE needed this... */ + $('select', this).children().each(function() { + if ($(this).val() == json['selected'] || + $(this).text() == $.trim(original.revert)) { + $(this).attr('selected', 'selected'); + } + }); + /* Submit on change if no submit button defined. */ + if (!settings.submit) { + var form = this; + $('select', this).change(function() { + form.submit(); + }); + } + } + } + }, + + /* Add new input type */ + addInputType: function(name, input) { + $.editable.types[name] = input; + } + }; + + /* Publicly accessible defaults. */ + $.fn.editable.defaults = { + name : 'value', + id : 'id', + type : 'text', + width : 'auto', + height : 'auto', + event : 'click.editable', + onblur : 'cancel', + loadtype : 'GET', + loadtext : 'Loading...', + placeholder: 'Click to edit', + loaddata : {}, + submitdata : {}, + ajaxoptions: {} + }; + +})(jQuery); Propchange: ofbiz/branches/jquery/framework/images/webapp/images/jquery/plugins/jeditable/jquery.jeditable.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/jquery/framework/images/webapp/images/jquery/plugins/jeditable/jquery.jeditable.js ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/branches/jquery/framework/images/webapp/images/jquery/plugins/jeditable/jquery.jeditable.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/branches/jquery/framework/images/webapp/images/selectall.js URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/images/webapp/images/selectall.js?rev=980537&r1=980536&r2=980537&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/images/webapp/images/selectall.js (original) +++ ofbiz/branches/jquery/framework/images/webapp/images/selectall.js Thu Jul 29 18:36:16 2010 @@ -304,61 +304,38 @@ function submitFormInBackground(form, ar onComplete: updateFunction }); } -/** Submit form, update multiple areas (HTML container elements). - * @param form The form element - * @param areaCsvString The area CSV string. The CSV string is a flat array in the - * form of: areaId, target, target parameters [, areaId, target, target parameters...]. -*/ -function ajaxSubmitFormUpdateAreas(form, areaCsvString) { - submitFormDisableSubmits($(form)); - waitSpinnerShow(); - hideErrorContainer = function() { - $('content-messages').removeClassName('errorMessage'); - new Effect.Fade('content-messages',{duration: 0.0}); - } - updateFunction = function(transport) { - var data = transport.responseText.evalJSON(true); - if (data._ERROR_MESSAGE_LIST_ != undefined || data._ERROR_MESSAGE_ != undefined) { - if(!$('content-messages')) { - //add this div just after app-navigation - if($('content-main-section')){ - $('content-main-section' ).insert({before: '<div id="content-messages" onclick="hideErrorContainer()"></div>'}); - } - } - $('content-messages').addClassName('errorMessage'); - $('content-messages' ).update(data._ERROR_MESSAGE_LIST_ + " " + data._ERROR_MESSAGE_); - new Effect.Appear('content-messages',{duration: 0.5}); - }else { - if($('content-messages')) { - $('content-messages').removeClassName('errorMessage'); - new Effect.Fade('content-messages',{duration: 0.0}); - } - ajaxUpdateAreas(areaCsvString); - } - waitSpinnerHide(); - } - new Ajax.Request($(form).action, { - parameters: $(form).serialize(true), - onComplete: updateFunction }); -} - /** Enable auto-completion for text elements. - * @param areaCsvString The area CSV string. The CSV string is a flat array in the - * form of: areaId, target, target parameters [, areaId, target, target parameters...]. + * @param areaCsvString The area CSV string. The CSV string is a flat array in the + * form of: areaId, target, target parameters [, areaId, target, target parameters...]. */ function ajaxAutoCompleter(areaCsvString, showDescription) { - var areaArray = areaCsvString.replace('&','&').split(","); - var numAreas = parseInt(areaArray.length / 3); - for (var i = 0; i < numAreas * 3; i = i + 3) { - var optionsDivId = areaArray[i] + "_autoCompleterOptions"; - var indicatorId = areaArray[i] + "_indicator"; - $(areaArray[i]).next().insert('<span class="indicator" style="display: none"' + 'id=' + indicatorId + '><img src="/images/ajax-loader.gif" alt=""/></span>'); - $(areaArray[i]).insert({after: '<div class="autocomplete"' + 'id=' + optionsDivId + '></div>'}); - new Ajax.Autocompleter($(areaArray[i]), optionsDivId, areaArray[i + 1], {parameters: areaArray[i + 2], indicator: indicatorId, afterUpdateElement : setSelection}); - if (showDescription) { - new lookupDescriptionLoaded(areaArray[i], areaArray[i + 1], areaArray[i + 2]); - } - } + var areaArray = areaCsvString.replace('&','&').split(","); + var numAreas = parseInt(areaArray.length / 3); + + for (var i = 0; i < numAreas * 3; i = i + 3) { + var url = areaArray[i + 1] + "?" + areaArray[i + 2]; + var div = areaArray[i]; + // create a seperate div where the result JSON Opbject will be placed + if ((jQuery("#" + div + "_auto")).length < 1) { + jQuery("<div id='" + div + "_auto'></div>").insertBefore("#" + areaArray[i]); + } + + jQuery("#" + div).autocomplete({ + source: function(request, response) { + jQuery.ajax({ + url: url, + async: false, + data: {term : request.term}, + success: function(data) { + //update the result div + jQuery("#" + div + "_auto").html(data) + // autocomp is the JSON Object which will be used for the autocomplete box + response(autocomp); + } + }) + } + }); + } } function setSelection(text, li) { @@ -473,8 +450,33 @@ function toggleScreenlet(link, areaId, s */ function ajaxInPlaceEditDisplayField(element, url, options) { - new Ajax.InPlaceEditor($(element), url, options); + var jElement = jQuery("#" + element); + jElement.mouseover(function() { + $(this).css('background-color', 'rgb(255, 255, 153)'); + }); + + jElement.mouseout(function() { + $(this).css('background-color', 'transparent'); + }); + + jElement.editable(function(value, settings){ + // removes all line breaks from the value param, because the parseJSON Function can't work with line breaks + value = value.replace("\n", " "); + var resultField = jQuery.parseJSON('{"' + settings.name + '":"' + value + '"}'); + // merge both parameter objects together + jQuery.extend(settings.submitdata, resultField); + jQuery.ajax({ + type : settings.method, + url : url, + data : settings.submitdata, + success : function(data) { + // adding the new value to the field and make the modified field 'blink' a little bit to show the user that somethink have changed + jElement.html(value).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).css('background-color', 'transparent'); + } + }); + }, options); } + // ===== End of Ajax Functions ===== // function replaceQueryParam(queryString, currentParam, newParam) { Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=980537&r1=980536&r2=980537&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original) +++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Thu Jul 29 18:36:16 2010 @@ -213,81 +213,58 @@ public class MacroFormRenderer implement if (ajaxEnabled) { String url = inPlaceEditor.getUrl(context); + String extraParameter = "{"; Map<String, Object> fieldMap = inPlaceEditor.getFieldMap(context); if (fieldMap != null) { - url += '?'; Set<Entry<String, Object>> fieldSet = fieldMap.entrySet(); Iterator<Entry<String, Object>> fieldIterator = fieldSet.iterator(); int count = 0; while (fieldIterator.hasNext()) { count++; Entry<String, Object> field = fieldIterator.next(); - url += (String) field.getKey() + '=' + (String) field.getValue(); + extraParameter += (String) field.getKey() + ":'" + (String) field.getValue() + "'"; if (count < fieldSet.size()) { - url += '&'; + extraParameter += ','; } } + } + extraParameter += "}"; sr.append("\" inPlaceEditorUrl=\""); sr.append(url); sr.append("\" inPlaceEditorParams=\""); StringWriter inPlaceEditorParams = new StringWriter(); - inPlaceEditorParams.append("{paramName: '"); + inPlaceEditorParams.append("{name: '"); if (UtilValidate.isNotEmpty(inPlaceEditor.getParamName())) { inPlaceEditorParams.append(inPlaceEditor.getParamName()); } else { inPlaceEditorParams.append(modelFormField.getFieldName()); } inPlaceEditorParams.append("'"); - if (UtilValidate.isNotEmpty(inPlaceEditor.getCancelControl())) { - inPlaceEditorParams.append(", cancelControl: "); - if (!"false".equals(inPlaceEditor.getCancelControl())) { - inPlaceEditorParams.append("'"); - } - inPlaceEditorParams.append(inPlaceEditor.getCancelControl()); - if (!"false".equals(inPlaceEditor.getCancelControl())) { - inPlaceEditorParams.append("'"); - } - } + inPlaceEditorParams.append(", method: 'POST'"); + inPlaceEditorParams.append(", submitdata: " + extraParameter); + inPlaceEditorParams.append(", type: 'textarea'"); + inPlaceEditorParams.append(", select: 'true'"); + inPlaceEditorParams.append(", onreset: function(){jQuery('#' + element).css('background-color', 'transparent');}"); + if (UtilValidate.isNotEmpty(inPlaceEditor.getCancelText())) { - inPlaceEditorParams.append(", cancelText: '" +inPlaceEditor.getCancelText()+ "'"); + inPlaceEditorParams.append(", cancel: '" +inPlaceEditor.getCancelText()+ "'"); + } else { + inPlaceEditorParams.append(", cancel: 'Cancel'"); } if (UtilValidate.isNotEmpty(inPlaceEditor.getClickToEditText())) { - inPlaceEditorParams.append(", clickToEditText: '" +inPlaceEditor.getClickToEditText()+ "'"); - } - if (UtilValidate.isNotEmpty(inPlaceEditor.getFieldPostCreation())) { - inPlaceEditorParams.append(", fieldPostCreation: "); - if (!"false".equals(inPlaceEditor.getFieldPostCreation())) { - inPlaceEditorParams.append("'"); - } - inPlaceEditorParams.append(inPlaceEditor.getFieldPostCreation()); - if (!"false".equals(inPlaceEditor.getFieldPostCreation())) { - inPlaceEditorParams.append("'"); - } + inPlaceEditorParams.append(", tooltip: '" +inPlaceEditor.getClickToEditText()+ "'"); } if (UtilValidate.isNotEmpty(inPlaceEditor.getFormClassName())) { - inPlaceEditorParams.append(", formClassName: '" +inPlaceEditor.getFormClassName()+ "'"); - } - if (UtilValidate.isNotEmpty(inPlaceEditor.getHighlightColor())) { - inPlaceEditorParams.append(", highlightColor: '" +inPlaceEditor.getHighlightColor()+ "'"); - } - if (UtilValidate.isNotEmpty(inPlaceEditor.getHighlightEndColor())) { - inPlaceEditorParams.append(", highlightEndColor: '" +inPlaceEditor.getHighlightEndColor()+ "'"); - } - if (UtilValidate.isNotEmpty(inPlaceEditor.getHoverClassName())) { - inPlaceEditorParams.append(", hoverClassName: '" +inPlaceEditor.getHoverClassName()+ "'"); - } - if (UtilValidate.isNotEmpty(inPlaceEditor.getHtmlResponse())) { - inPlaceEditorParams.append(", htmlResponse: " +inPlaceEditor.getHtmlResponse()); - } - if (UtilValidate.isNotEmpty(inPlaceEditor.getLoadingClassName())) { - inPlaceEditorParams.append(", loadingClassName: '" +inPlaceEditor.getLoadingClassName()+ "'"); + inPlaceEditorParams.append(", cssclass: '" + inPlaceEditor.getFormClassName()+ "'"); + } else { + inPlaceEditorParams.append(", cssclass: 'inplaceeditor-form'"); } if (UtilValidate.isNotEmpty(inPlaceEditor.getLoadingText())) { - inPlaceEditorParams.append(", loadingText: '" +inPlaceEditor.getLoadingText()+ "'"); + inPlaceEditorParams.append(", indicator: '" +inPlaceEditor.getLoadingText()+ "'"); } if (UtilValidate.isNotEmpty(inPlaceEditor.getOkControl())) { - inPlaceEditorParams.append(", okControl: "); + inPlaceEditorParams.append(", submit: "); if (!"false".equals(inPlaceEditor.getOkControl())) { inPlaceEditorParams.append("'"); } @@ -295,30 +272,8 @@ public class MacroFormRenderer implement if (!"false".equals(inPlaceEditor.getOkControl())) { inPlaceEditorParams.append("'"); } - } - if (UtilValidate.isNotEmpty(inPlaceEditor.getOkText())) { - inPlaceEditorParams.append(", okText: '" +inPlaceEditor.getOkText()+ "'"); - } - if (UtilValidate.isNotEmpty(inPlaceEditor.getSavingClassName())) { - inPlaceEditorParams.append(", savingClassName: '" +inPlaceEditor.getSavingClassName()+ "', "); - } - if (UtilValidate.isNotEmpty(inPlaceEditor.getSavingText())) { - inPlaceEditorParams.append(", savingText: '" +inPlaceEditor.getSavingText()+ "'"); - } - if (UtilValidate.isNotEmpty(inPlaceEditor.getSubmitOnBlur())) { - inPlaceEditorParams.append(", submitOnBlur: " +inPlaceEditor.getSubmitOnBlur()); - } - if (UtilValidate.isNotEmpty(inPlaceEditor.getTextBeforeControls())) { - inPlaceEditorParams.append(", textBeforeControls: '" +inPlaceEditor.getTextBeforeControls()+ "'"); - } - if (UtilValidate.isNotEmpty(inPlaceEditor.getTextAfterControls())) { - inPlaceEditorParams.append(", textAfterControls: '" +inPlaceEditor.getTextAfterControls()+ "'"); - } - if (UtilValidate.isNotEmpty(inPlaceEditor.getTextBetweenControls())) { - inPlaceEditorParams.append(", textBetweenControls: '" +inPlaceEditor.getTextBetweenControls()+ "'"); - } - if (UtilValidate.isNotEmpty(inPlaceEditor.getUpdateAfterRequestCall())) { - inPlaceEditorParams.append(", updateAfterRequestCall: " +inPlaceEditor.getUpdateAfterRequestCall()); + } else { + inPlaceEditorParams.append(", submit: 'OK'"); } if (UtilValidate.isNotEmpty(inPlaceEditor.getRows())) { inPlaceEditorParams.append(", rows: '" +inPlaceEditor.getRows()+ "'"); Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=980537&r1=980536&r2=980537&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original) +++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Thu Jul 29 18:36:16 2010 @@ -172,7 +172,7 @@ public class HtmlFormRenderer extends Ht str.append(modelFormField.getWidgetStyle()); // add a style of red if this is a date/time field and redWhen is true if (modelFormField.shouldBeRed(context)) { - str.append(" alert"); + str.append(" alert"); } str.append('"'); if (UtilValidate.isNotEmpty(idName)) { @@ -221,9 +221,9 @@ public class HtmlFormRenderer extends Ht writer.append("ajaxInPlaceEditDisplayField('"); writer.append(idName).append("', '").append(url).append("', {"); if (UtilValidate.isNotEmpty(inPlaceEditor.getParamName())) { - writer.append("paramName: '").append(inPlaceEditor.getParamName()).append("'"); + writer.append("name: '").append(inPlaceEditor.getParamName()).append("'"); } else { - writer.append("paramName: '").append(modelFormField.getFieldName()).append("'"); + writer.append("name: '").append(modelFormField.getFieldName()).append("'"); } if (UtilValidate.isNotEmpty(inPlaceEditor.getCancelControl())) { writer.append(", cancelControl: "); @@ -236,10 +236,10 @@ public class HtmlFormRenderer extends Ht } } if (UtilValidate.isNotEmpty(inPlaceEditor.getCancelText())) { - writer.append(", cancelText: '").append(inPlaceEditor.getCancelText()).append("'"); + writer.append(", cancel: '").append(inPlaceEditor.getCancelText()).append("'"); } if (UtilValidate.isNotEmpty(inPlaceEditor.getClickToEditText())) { - writer.append(", clickToEditText: '").append(inPlaceEditor.getClickToEditText()).append("'"); + writer.append(", tooltip: '").append(inPlaceEditor.getClickToEditText()).append("'"); } if (UtilValidate.isNotEmpty(inPlaceEditor.getFieldPostCreation())) { writer.append(", fieldPostCreation: "); @@ -252,7 +252,7 @@ public class HtmlFormRenderer extends Ht } } if (UtilValidate.isNotEmpty(inPlaceEditor.getFormClassName())) { - writer.append(", formClassName: '").append(inPlaceEditor.getFormClassName()).append("'"); + writer.append(", cssclass: '").append(inPlaceEditor.getFormClassName()).append("'"); } if (UtilValidate.isNotEmpty(inPlaceEditor.getHighlightColor())) { writer.append(", highlightColor: '").append(inPlaceEditor.getHighlightColor()).append("'"); @@ -270,10 +270,10 @@ public class HtmlFormRenderer extends Ht writer.append(", loadingClassName: '").append(inPlaceEditor.getLoadingClassName()).append("'"); } if (UtilValidate.isNotEmpty(inPlaceEditor.getLoadingText())) { - writer.append(", loadingText: '").append(inPlaceEditor.getLoadingText()).append("'"); + writer.append(", indicator: '").append(inPlaceEditor.getLoadingText()).append("'"); } if (UtilValidate.isNotEmpty(inPlaceEditor.getOkControl())) { - writer.append(", okControl: "); + writer.append(", submit: "); if (!"false".equals(inPlaceEditor.getOkControl())) { writer.append("'"); } Modified: ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=980537&r1=980536&r2=980537&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl (original) +++ ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl Thu Jul 29 18:36:16 2010 @@ -478,14 +478,11 @@ ${item.description}</span> );"></a><#rt> <#else> <script type="text/javascript"> - new ConstructLookup("${fieldFormName}", "${id}", document.${formName?html}.${name?html}, <#if descriptionFieldName?has_content>document.${formName?html}.${descriptionFieldName}<#else>null</#if>, "${formName?html}", "${width}", "${height}", "${position}", "${fadeBackground}"); + new ConstructLookup("${fieldFormName}", "${id}", document.${formName?html}.${name?html}, <#if descriptionFieldName?has_content>document.${formName?html}.${descriptionFieldName}<#else>null</#if>, "${formName?html}", "${width}", "${height}", "${position}", "${fadeBackground}", <#if ajaxEnabled?has_content && ajaxEnabled>"${ajaxUrl}", "${showDescription}"<#else>"", ""</#if>); </script> </#if> <#if disabled?has_content && disabled><a id="${id}_clear" style="background:none;margin-left:5px;margin-right:15px;" class="clearField" href="javascript:void();" onclick="javascript:document.${formName}.${name}.value='';<#if descriptionFieldName?has_content>document.${formName}.${descriptionFieldName}.value='';</#if>">${clearText}</a></#if> </span> -<#if ajaxEnabled?has_content && ajaxEnabled> - <script language="JavaScript" type="text/javascript">ajaxAutoCompleter('${ajaxUrl}', ${showDescription});</script><#t/> -</#if> </#macro> <#macro renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl paginateFirstLabel paginatePreviousStyle ajaxPreviousUrl previousUrl paginatePreviousLabel pageLabel ajaxSelectUrl selectUrl ajaxSelectSizeUrl selectSizeUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl paginateNextLabel paginateLastStyle ajaxLastUrl lastUrl paginateLastLabel paginateViewSizeLabel> Modified: ofbiz/branches/jquery/themes/tomahawk/webapp/tomahawk/css/style.css URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/themes/tomahawk/webapp/tomahawk/css/style.css?rev=980537&r1=980536&r2=980537&view=diff ============================================================================== --- ofbiz/branches/jquery/themes/tomahawk/webapp/tomahawk/css/style.css (original) +++ ofbiz/branches/jquery/themes/tomahawk/webapp/tomahawk/css/style.css Thu Jul 29 18:36:16 2010 @@ -1334,44 +1334,6 @@ width: 25%; .login-screenlet .screenlet-title-bar { text-align: center; } -/*********************************************** -ajax auto complete -***********************************************/ -div.autocomplete { - position:absolute; - width:auto !important; -/* min-width:154px; */ - background-color:#f8f8f8; - border:1px solid #999999; - margin:0; - padding:0; -} -div.autocomplete ul { - list-style-type:none; - margin:0; - padding:0; -} -div.autocomplete ul li.selected { - background-color: #ffb; -} -div.autocomplete ul li { - list-style-type:none; - display:block; - float: none; - margin:0; - padding:2px; - /*height:32px;*/ - cursor:pointer; -} - -.indicator img { - background: url(/images/ajax-loader.gif) no-repeat 0 0; - display: block; - margin:3px 10px 0px 34px; - width:16px; - height:16px; - border: none; -} /* ======================================================= */ /* ===== Basic Navigation (Vertical Menu) Style ========== */ /* ======================================================= */ @@ -2658,7 +2620,7 @@ background-color:#b29898; .ui-accordion .ui-accordion-content-active { display: block; }/* Autocomplete ----------------------------------*/ .ui-autocomplete { position: absolute; cursor: default; } -.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; } +.ui-autocomplete-loading { background: white url('../images/ui-anim_basic_16x16.gif') right center no-repeat; } /* workarounds */ * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ |
Free forum by Nabble | Edit this page |