svn commit: r1303062 - in /ofbiz/trunk: framework/common/webcommon/includes/ framework/common/widget/ framework/images/webapp/images/ framework/images/webapp/images/jquery/ui/development-bundle/themes/base/ framework/images/webapp/images/jquery/ui/deve...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1303062 - in /ofbiz/trunk: framework/common/webcommon/includes/ framework/common/widget/ framework/images/webapp/images/ framework/images/webapp/images/jquery/ui/development-bundle/themes/base/ framework/images/webapp/images/jquery/ui/deve...

ashish-18
Author: ashish
Date: Tue Mar 20 18:08:05 2012
New Revision: 1303062

URL: http://svn.apache.org/viewvc?rev=1303062&view=rev
Log:
Bug fix, Applied patch from jira issue - OFBIZ-4734 - User behaviour issue on auto-completer.
Currently if user type in auto-completer text box and if matches found then list display as auto-completer result list but if no matches found then user didn't know that result will come or not, even no matches found.

Change behaviour is when user type in text box then spinner (ajax loader image) shows wchich tells user that search is in progress.
If matches found or not found spinner disapperars and reult/ no result message listed in auto-completer relsult list.
Now user won't see any abnormal behaviour at ui.

Added spinner image for the auto-completer request.
Also added the "No Records Found" message if no matches found for the auto-completer search.

Thanks Nitesh, Deepak and Rishi for the contribution.

Modified:
    ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl
    ofbiz/trunk/framework/common/widget/CommonScreens.xml
    ofbiz/trunk/framework/images/webapp/images/jquery/ui/development-bundle/themes/base/jquery.ui.autocomplete.css
    ofbiz/trunk/framework/images/webapp/images/jquery/ui/development-bundle/themes/ui-lightness/jquery.ui.autocomplete.css
    ofbiz/trunk/framework/images/webapp/images/selectall.js
    ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css
    ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css
    ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css
    ofbiz/trunk/themes/flatgrey/webapp/flatgrey/javascript.css
    ofbiz/trunk/themes/multiflex/webapp/multiflex/style.css
    ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css

Modified: ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl?rev=1303062&r1=1303061&r2=1303062&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl Tue Mar 20 18:08:05 2012
@@ -33,8 +33,8 @@ under the License.
     </#if>
 <#else>
 <script type="text/javascript">
-    <#if autocompleteOptions?exists>
-  var autocomp = [
+var autocomp = [
+    <#if autocompleteOptions?has_content>
         <#if !displayReturnField?exists>
             <#assign displayReturnField = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.displayReturnField")>
         </#if>
@@ -55,12 +55,18 @@ under the License.
             <#if ("Y" == displayReturnField)>
                 <#assign displayString = displayString +  "[" + returnField + "]">
             </#if>
-            "id": " ${returnField}",
+            "id": "${returnField}",
             "label": "<#if (displayString?trim?has_content )>${displayString?trim}<#else>${returnField}</#if>",
             "value": "${returnField}"
             }<#if autocompleteOption_has_next>,</#if>
         </#list>
-  ];
+    <#else>
+      {
+         "id": "",
+         "label": "${uiLabelMap.CommonNoRecordFound}",
+         "value": ""
+      }
     </#if>
+    ];
 </script>
 </#if>

Modified: ofbiz/trunk/framework/common/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=1303062&r1=1303061&r2=1303062&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/framework/common/widget/CommonScreens.xml Tue Mar 20 18:08:05 2012
@@ -406,6 +406,7 @@ under the License.
             <fail-widgets>
                 <section>
                     <actions>
+                        <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
                         <set field="searchType" from-field="parameters.searchType" default-value="${searchType}"/>
                         <script location="component://common/webcommon/WEB-INF/actions/includes/FindAutocompleteOptions.groovy"/>
                     </actions>

Modified: ofbiz/trunk/framework/images/webapp/images/jquery/ui/development-bundle/themes/base/jquery.ui.autocomplete.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/ui/development-bundle/themes/base/jquery.ui.autocomplete.css?rev=1303062&r1=1303061&r2=1303062&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/jquery/ui/development-bundle/themes/base/jquery.ui.autocomplete.css (original)
+++ ofbiz/trunk/framework/images/webapp/images/jquery/ui/development-bundle/themes/base/jquery.ui.autocomplete.css Tue Mar 20 18:08:05 2012
@@ -21,6 +21,7 @@
  *
  * http://docs.jquery.com/UI/Menu#theming
  */
+.ui-autocomplete-loading { background: white url('../images/ui-anim_basic_16x16.gif') right center no-repeat !important; }
 .ui-menu {
  list-style:none;
  padding: 2px;

Modified: ofbiz/trunk/framework/images/webapp/images/jquery/ui/development-bundle/themes/ui-lightness/jquery.ui.autocomplete.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/ui/development-bundle/themes/ui-lightness/jquery.ui.autocomplete.css?rev=1303062&r1=1303061&r2=1303062&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/jquery/ui/development-bundle/themes/ui-lightness/jquery.ui.autocomplete.css (original)
+++ ofbiz/trunk/framework/images/webapp/images/jquery/ui/development-bundle/themes/ui-lightness/jquery.ui.autocomplete.css Tue Mar 20 18:08:05 2012
@@ -21,6 +21,7 @@
  *
  * http://docs.jquery.com/UI/Menu#theming
  */
+ .ui-autocomplete-loading { background: white url('../images/ui-anim_basic_16x16.gif') right center no-repeat !important; }
 .ui-menu {
  list-style:none;
  padding: 2px;

Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/selectall.js?rev=1303062&r1=1303061&r2=1303062&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/selectall.js Tue Mar 20 18:08:05 2012
@@ -433,7 +433,7 @@ function ajaxAutoCompleter(areaCsvString
             select: function(event, ui){
                 //jQuery("#" + areaArray[0]).html(ui.item);
                 jQuery("#" + areaArray[0]).val(ui.item.value); // setting a text field  
-                if (showDescription) {
+                if (showDescription && (ui.item.value != undefined && ui.item.value != '')) {
                     setLookDescription(areaArray[0], ui.item.label, areaArray[2], formName, showDescription)
                 }
             }

Modified: ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css?rev=1303062&r1=1303061&r2=1303062&view=diff
==============================================================================
--- ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css (original)
+++ ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css Tue Mar 20 18:08:05 2012
@@ -1937,6 +1937,7 @@ img.cssImgSmall {
  *
  * http://docs.jquery.com/UI/Menu#theming
  */
+.ui-autocomplete-loading { background: white url('../images/ui-anim_basic_16x16.gif') right center no-repeat !important; }
 .ui-menu {
     list-style:none;
     padding: 2px;

Modified: ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css?rev=1303062&r1=1303061&r2=1303062&view=diff
==============================================================================
--- ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css (original)
+++ ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css Tue Mar 20 18:08:05 2012
@@ -2441,6 +2441,7 @@ img.cssImgSmall {
  *
  * http://docs.jquery.com/UI/Menu#theming
  */
+.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat !important; }
 .ui-menu {
     list-style:none;
     padding: 2px;

Modified: ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css?rev=1303062&r1=1303061&r2=1303062&view=diff
==============================================================================
--- ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css (original)
+++ ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css Tue Mar 20 18:08:05 2012
@@ -2440,6 +2440,7 @@ img.cssImgSmall {
  *
  * http://docs.jquery.com/UI/Menu#theming
  */
+.ui-autocomplete-loading { background: white url('../images/ui-anim_basic_16x16.gif') right center no-repeat !important; }
 .ui-menu {
     list-style:none;
     padding: 2px;

Modified: ofbiz/trunk/themes/flatgrey/webapp/flatgrey/javascript.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/flatgrey/webapp/flatgrey/javascript.css?rev=1303062&r1=1303061&r2=1303062&view=diff
==============================================================================
--- ofbiz/trunk/themes/flatgrey/webapp/flatgrey/javascript.css (original)
+++ ofbiz/trunk/themes/flatgrey/webapp/flatgrey/javascript.css Tue Mar 20 18:08:05 2012
@@ -446,6 +446,7 @@ div.autocomplete ul li {
  *
  * http://docs.jquery.com/UI/Menu#theming
  */
+.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat !important; }
 .ui-menu {
     list-style:none;
     padding: 2px;

Modified: ofbiz/trunk/themes/multiflex/webapp/multiflex/style.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/multiflex/webapp/multiflex/style.css?rev=1303062&r1=1303061&r2=1303062&view=diff
==============================================================================
--- ofbiz/trunk/themes/multiflex/webapp/multiflex/style.css (original)
+++ ofbiz/trunk/themes/multiflex/webapp/multiflex/style.css Tue Mar 20 18:08:05 2012
@@ -2556,6 +2556,7 @@ img.cssImgSmall {
  *
  * http://docs.jquery.com/UI/Menu#theming
  */
+.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat !important; }
 .ui-menu {
     list-style:none;
     padding: 2px;

Modified: ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css?rev=1303062&r1=1303061&r2=1303062&view=diff
==============================================================================
--- ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css (original)
+++ ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css Tue Mar 20 18:08:05 2012
@@ -2826,6 +2826,7 @@ img.cssImgSmall {
  *
  * http://docs.jquery.com/UI/Menu#theming
  */
+.ui-autocomplete-loading { background: white url('../images/ui-anim_basic_16x16.gif') right center no-repeat !important; }
 .ui-menu {
     list-style:none;
     padding: 2px;