Bug 405010 - "make column changes in places/library (session) persistent" [p=mak77@supereva.it (Marco Bonardo [mak77]) r=Mano a=blocking-firefox3+]

This commit is contained in:
reed@reedloden.com 2008-03-08 03:42:58 -08:00
Родитель 406fbc3289
Коммит ea5d791484
2 изменённых файлов: 14 добавлений и 12 удалений

Просмотреть файл

@ -451,37 +451,38 @@
<tree id="placeContent" class="placesTree" context="placesContext"
flex="1" type="places"
flatList="true"
enableColumnDrag="true"
onkeypress="if (event.keyCode == KeyEvent.DOM_VK_RETURN) PlacesOrganizer.openSelectedNode(event);"
ondblclick="PlacesOrganizer.openSelectedNode(event);"
onopenflatcontainer="PlacesOrganizer.openFlatContainer(aContainer);"
onselect="PlacesOrganizer.onContentTreeSelect();"
onclick="PlacesOrganizer.onTreeClick(event);">
<treecols id="placeContentColumns">
<treecol label="&col.name.label;" anonid="title" flex="5" primary="true"
<treecol label="&col.name.label;" id="placesContentTitle" anonid="title" flex="5" primary="true" ordinal="1"
persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol label="&col.tags.label;" anonid="tags" flex="2"
<treecol label="&col.tags.label;" id="placesContentTags" anonid="tags" flex="2"
persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol label="&col.url.label;" anonid="url" flex="5"
<treecol label="&col.url.label;" id="placesContentUrl" anonid="url" flex="5"
persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol label="&col.lastvisit.label;" anonid="date" flex="1" hidden="true"
<treecol label="&col.lastvisit.label;" id="placesContentDate" anonid="date" flex="1" hidden="true"
persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol label="&col.visitcount.label;" anonid="visitCount" flex="1" hidden="true"
<treecol label="&col.visitcount.label;" id="placesContentVisitCount" anonid="visitCount" flex="1" hidden="true"
persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol label="&col.keyword.label;" anonid="keyword" flex="1" hidden="true"
<treecol label="&col.keyword.label;" id="placesContentKeyword" anonid="keyword" flex="1" hidden="true"
persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol label="&col.description.label;" anonid="description" flex="1" hidden="true"
<treecol label="&col.description.label;" id="placesContentDescription" anonid="description" flex="1" hidden="true"
persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol label="&col.dateadded.label;" anonid="dateAdded" flex="1" hidden="true"
<treecol label="&col.dateadded.label;" id="placesContentDateAdded" anonid="dateAdded" flex="1" hidden="true"
persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol label="&col.lastmodified.label;" anonid="lastModified" flex="1" hidden="true"
<treecol label="&col.lastmodified.label;" id="placesContentLastModified" anonid="lastModified" flex="1" hidden="true"
persist="width hidden ordinal sortActive sortDirection"/>
</treecols>
<treechildren flex="1"/>

Просмотреть файл

@ -438,7 +438,8 @@ PlacesTreeView.prototype = {
COLUMN_TYPE_TAGS: 9,
_getColumnType: function PTV__getColumnType(aColumn) {
var columnType = aColumn.id || aColumn.element.getAttribute("anonid");
var columnType = aColumn.element.getAttribute("anonid") || aColumn.id;
switch (columnType) {
case "title":
return this.COLUMN_TYPE_TITLE;
@ -1095,8 +1096,8 @@ PlacesTreeView.prototype = {
getImageSrc: function PTV_getImageSrc(aRow, aColumn) {
this._ensureValidRow(aRow);
// only the first column has an image
if (aColumn.index != 0)
// only the title column has an image
if (this._getColumnType(aColumn) != this.COLUMN_TYPE_TITLE)
return "";
var node = this._visibleElements[aRow].node;