mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 581073 - Search pane needs to expose the relevancy sort order. r=dtownsend, a=blocking-beta5
This commit is contained in:
parent
b2536d0df5
commit
c89bea4e77
@ -94,8 +94,8 @@
|
||||
<!ENTITY sort.name.tooltip "Sort by name">
|
||||
<!ENTITY sort.dateUpdated.label "Last Updated">
|
||||
<!ENTITY sort.dateUpdated.tooltip "Sort by date updated">
|
||||
<!ENTITY sort.rating.label "Rating">
|
||||
<!ENTITY sort.rating.tooltip "Sort by average rating">
|
||||
<!ENTITY sort.relevance.label "Best match">
|
||||
<!ENTITY sort.relevance.tooltip "Sort by relevance">
|
||||
|
||||
<!ENTITY search.filter2.label "Search:">
|
||||
<!ENTITY search.filter2.installed.label "My Add-ons">
|
||||
|
@ -244,6 +244,10 @@
|
||||
label="&sort.dateUpdated.label;"
|
||||
tooltiptext="&sort.dateUpdated.tooltip;"
|
||||
oncommand="this.parentNode._handleChange('dateUpdated');"/>
|
||||
<xul:button anonid="btn-relevance" class="sorter" hidden="true"
|
||||
label="&sort.relevance.label;"
|
||||
tooltiptext="&sort.relevance.tooltip;"
|
||||
oncommand="this.parentNode._handleChange('relevancescore');"/>
|
||||
</content>
|
||||
|
||||
<implementation>
|
||||
@ -251,6 +255,9 @@
|
||||
if (!this.hasAttribute("sortby"))
|
||||
this.setAttribute("sortby", "name");
|
||||
|
||||
if (this.getAttribute("showrelevance") == "true")
|
||||
this._btnRelevance.hidden = false;
|
||||
|
||||
this._refreshState();
|
||||
]]></constructor>
|
||||
|
||||
@ -261,6 +268,9 @@
|
||||
<field name="_btnDate">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "btn-date");
|
||||
</field>
|
||||
<field name="_btnRelevance">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "btn-relevance");
|
||||
</field>
|
||||
|
||||
<property name="sortBy">
|
||||
<getter><![CDATA[
|
||||
@ -337,6 +347,10 @@
|
||||
else
|
||||
this._btnDate.checkState = 0;
|
||||
|
||||
if (sortBy == "relevancescore")
|
||||
this._btnRelevance.checkState = checkState;
|
||||
else
|
||||
this._btnRelevance.checkState = 0;
|
||||
|
||||
if (this.handler && "onSortChanged" in this.handler)
|
||||
this.handler.onSortChanged(sortBy, this.ascending);
|
||||
|
@ -215,8 +215,8 @@
|
||||
</radiogroup>
|
||||
</hbox>
|
||||
<hbox class="view-header" pack="end">
|
||||
<hbox id="search-sorters" class="sort-controls" sortby="name"
|
||||
ascending="true"/>
|
||||
<hbox id="search-sorters" class="sort-controls"
|
||||
showrelevance="true" sortby="relevancescore" ascending="false"/>
|
||||
</hbox>
|
||||
<richlistbox id="search-list" class="list" flex="1">
|
||||
<vbox id="search-list-empty" class="empty-list-notice"
|
||||
|
Loading…
Reference in New Issue
Block a user