Author: hlship
Date: Sun Jun 24 11:02:51 2007
New Revision: 550267
URL: http://svn.apache.org/viewvc?view=rev&rev=550267
Log:
TAPESTRY-1493: Grid component should display sort icon next to all sortable
fields
Added:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/sort-asc.png
- copied, changed from r550149,
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/sort-desc.png
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/sort-desc.png
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/sortable.png
(with props)
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridColumns.java
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/GridColumns.html
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/GridColumns.properties
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridColumns.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridColumns.java?view=diff&rev=550267&r1=550266&r2=550267
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridColumns.java
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/GridColumns.java
Sun Jun 24 11:02:51 2007
@@ -63,6 +63,9 @@
@Inject @Path("sort-desc.png")
private Asset _descendingAsset;
+ @Inject @Path("sortable.png")
+ private Asset _sortableAsset;
+
@Inject
private Messages _messages;
@@ -101,12 +104,15 @@
public Asset getIcon()
{
- return _sortAscending ? _ascendingAsset : _descendingAsset;
+ if (isActiveSortColumn())
+ return _sortAscending ? _ascendingAsset : _descendingAsset;
+
+ return _sortableAsset;
}
public String getIconLabel()
{
- String key = _sortAscending ? "ascending" : "descending";
+ String key = isActiveSortColumn() ? (_sortAscending ? "ascending" :
"descending" ) : "sortable";
return _messages.get(key);
}
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/GridColumns.html
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/GridColumns.html?view=diff&rev=550267&r1=550266&r2=550267
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/GridColumns.html
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/GridColumns.html
Sun Jun 24 11:02:51 2007
@@ -2,7 +2,7 @@
<tr>
<th t:type="Loop" source="columnNames" value="columnName"
volatile="true" class="${columnModel.id}-header">
<a t:id="sort">${columnModel.label}</a>
- <t:if test="activeSortColumn">
+ <t:if test="columnModel.sortable">
<a t:id="sort2">
<img src="${icon}" id="${columnModel.id}:sort"
class="t-sort-icon" alt="${iconLabel}"/>
</a>
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/GridColumns.properties
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/GridColumns.properties?view=diff&rev=550267&r1=550266&r2=550267
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/GridColumns.properties
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/GridColumns.properties
Sun Jun 24 11:02:51 2007
@@ -13,4 +13,5 @@
# limitations under the License.
ascending=[Asc]
-descending=[Desc]
\ No newline at end of file
+descending=[Desc]
+sortable=[Sortable]
\ No newline at end of file
Copied:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/sort-asc.png
(from r550149,
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/sort-desc.png)
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/sort-asc.png?view=diff&rev=550267&p1=tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/sort-desc.png&r1=550149&p2=tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/sort-asc.png&r2=550267
==============================================================================
Binary files - no diff available.
Added:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/sort-desc.png
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/sort-desc.png?view=auto&rev=550267
==============================================================================
Binary files /tmp/tmppp6_64 and /tmp/tmpMAsJOB differ
Added:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/sortable.png
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/sortable.png?view=auto&rev=550267
==============================================================================
Binary file - no diff available.
Propchange:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/sortable.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream