| 770 | | this.nextButton.style.display = (dataObject.count == results.length) ? "" : "none"; |
| 771 | | dojo.attr(this.nextButton,"id", this.id + "_next") |
| | 776 | var displayMore = false; |
| | 777 | //Try to determine if we should show 'more'... |
| | 778 | if(dataObject._maxOptions && dataObject._maxOptions != -1){ |
| | 779 | if((dataObject.start + dataObject.count) < dataObject._maxOptions){ |
| | 780 | displayMore = true; |
| | 781 | }else if((dataObject.start + dataObject.length) > (dataObject._maxOptions - 1)){ |
| | 782 | //Weird return from a datastore, where a start + count > maxOptions |
| | 783 | //implies maxOptions isn't really valid and we have to go into faking it. |
| | 784 | //And more or less assume more if count == results.length |
| | 785 | if(dataObject.count == results.length){ |
| | 786 | displayMore = true; |
| | 787 | } |
| | 788 | } |
| | 789 | }else if(dataObject.count == results.length){ |
| | 790 | //Don't know the size, so we do the best we can based off count alone. |
| | 791 | //So, if we have an exact match to count, assume more. |
| | 792 | displayMore = true; |
| | 793 | } |
| | 794 | |
| | 795 | this.nextButton.style.display = displayMore ? "" : "none"; |
| | 796 | dojo.attr(this.nextButton,"id", this.id + "_next"); |