Author: croberts Date: 2011-05-24 16:42:01 +0000 (Tue, 24 May 2011) New Revision: 4780
Modified: trunk/cumin/python/cumin/objectselector.strings Log: To address BZ https://bugzilla.redhat.com/show_bug.cgi?id=703279 we now reset our offset to 0 whenever submitting a new search query as an onclick action.
Modified: trunk/cumin/python/cumin/objectselector.strings =================================================================== --- trunk/cumin/python/cumin/objectselector.strings 2011-05-24 02:39:26 UTC (rev 4779) +++ trunk/cumin/python/cumin/objectselector.strings 2011-05-24 16:42:01 UTC (rev 4780) @@ -112,10 +112,28 @@ return true; }
+function clearOffsetInput(id) { + if (id) { + var regex = new RegExp(".offset$"); + var inputs = id.getElements("input"); + if(inputs) { + for (i = 0; i < inputs.length; i++) { + var input_name = inputs[i].name; + var match = regex.exec(input_name); + if(match != null) { + inputs[i].value = 0; + } + } + } + } + return true; +} + + [ObjectSelectorFilters.html] <div id="{id}" class="{class}"> <ul>{widgets}</ul> - <input type="submit" value="Search" tabindex="100"/><input type="submit" value="Clear" onclick="return clearSearchInput('{id}')" tabindex="100"/> + <input type="submit" value="Search" onclick="return clearOffsetInput(this.form)" tabindex="100"/><input type="submit" value="Clear" onclick="return clearSearchInput('{id}')" tabindex="100"/> </div><div style="margin-bottom: 0.5em; clear:both;"></div>
[ExportButton.css]