32Bit Posted April 18, 2012 at 09:57 PM Share Posted April 18, 2012 at 09:57 PM Having added a custom fields based dropdown for the location (Country/Region/City) into Jreviews I was uncomfortable with how long it was taking to load each fields data via Ajax. When selecting a category a spinner appears while the the new data is fetched however this isn't implemented for custom fields. I've gone through the code and figured out what changes to make to add this functionality. It's just two additions: In jreviews.fields.js (around line 570) beneath the following: if((cachedResp == null && sel_val != '' && sel_val != null)) { Add this: jQuery('#'+fname).parent().append('<span class="jr_loadingSmall"></span>'); Then several lines below line 570 there's the following line: 'onComplete':function(valResp){ Add this: jQuery('#'+fname).siblings('.jr_loadingSmall').remove(); It would be great if this change (or something similar) could be incorporated into Jreviews. Also, looking at the POST date that is returned i noticed that there appears to be a fair amount of text being transferred for each entry. Loads of entrys like this: {"optionid":"342734","text":"Brighton","value":"U23","image":"","ordering":"0"} We sometimes have ~100 entries that can take up to 5 seconds to download but we're not using the Image or Ordering options. It's just a thought but perhaps in situations where certain parameters aren't used the data could be shortened to this: {"oid":"342734","text":"Brighton","value":"U23"} Thanks Link to comment
32Bit Posted July 24, 2012 at 09:15 AM Author Share Posted July 24, 2012 at 09:15 AM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Alejandro Posted July 24, 2012 at 01:10 PM Share Posted July 24, 2012 at 01:10 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Recommended Posts