iav wrote:And this field is empty, when it really needed - for search results.
The field is not empty for me in the Library's bookmark search results. Sorry you're having a problem. Do you want some help?
iav wrote:And this field is empty, when it really needed - for search results.
iav wrote:Maybe. Today I run
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a6pre) Gecko/20100624 Minefield/3.7a6pre - Build ID: 20100624030247
Do you use nightly builds?
terrypin wrote:The major flaw with this Add-On IMO is that you cannot sort by the Parent Folder column. I often find I want to do that, such as after searching for a string and ending up with scores of hits - which then need to be grouped into their folders.
http://dl.dropbox.com/u/4019461/FF-Sorting.jpg
--
Terry, East Grinstead, UK
iav wrote:Maybe. Today I run
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a6pre) Gecko/20100624 Minefield/3.7a6pre - Build ID: 20100624030247
Do you use nightly builds?
Negativeions wrote:Can you please make Show parent folder and go parent folder 1 add-on? It's stupid to have 2 seperate addons for this.
verbatim613 wrote:Show Parent Folder is very helpful Add-on.
http://www.flickr.com/photos/85547812@N ... hotostream
When right clicking on results of a bookmark search, user has option to view properties of that bookmark. Is it possible to add the "Parent Folder" property of the bookmark to this dialog box?
Alice0775 wrote:terrypin wrote:The major flaw with this Add-On IMO is that you cannot sort by the Parent Folder column. I often find I want to do that, such as after searching for a string and ending up with scores of hits - which then need to be grouped into their folders.
http://dl.dropbox.com/u/4019461/FF-Sorting.jpg
--
Terry, East Grinstead, UK
I know that.
But I cannot.
techlivezheng wrote:Alice0775 wrote:terrypin wrote:The major flaw with this Add-On IMO is that you cannot sort by the Parent Folder column. I often find I want to do that, such as after searching for a string and ending up with scores of hits - which then need to be grouped into their folders.
http://dl.dropbox.com/u/4019461/FF-Sorting.jpg
--
Terry, East Grinstead, UK
I know that.
But I cannot.
May I ask why you can't, is it so hard so implement? Where could I find you source code repository, and do something about it, of cause, if that is okay?
Code: Select all
//Bug 196509 Search for bookmark should show parent folder
if ("undefined" == typeof(showparentfolder)) {
var showparentfolder = {};
};
showparentfolder = {
init: function() {
window.removeEventListener("load",showparentfolder.init,false);
window.addEventListener('unload', showparentfolder.uninit,false);
PlacesTreeView.prototype.COLUMN_TYPE_PARENTFOLDER = 999;
showparentfolder._old_cycleHeader = PlacesTreeView.prototype.cycleHeader;
PlacesTreeView.prototype.cycleHeader = showparentfolder.cycleHeader;
showparentfolder._old_getCellText = PlacesTreeView.prototype.getCellText;
PlacesTreeView.prototype.getCellText = showparentfolder.getCellText;
showparentfolder._old_getColumnType = PlacesTreeView.prototype._getColumnType;
PlacesTreeView.prototype._getColumnType = showparentfolder._getColumnType;
},
uninit: function(){
window.removeEventListener("unload",showparentfolder.uninit,false);
},
//xxx Parentfolder column sort will do nothing.
cycleHeader: function PTV_cycleHeader(aColumn) {
switch (this._getColumnType(aColumn)) {
case this.COLUMN_TYPE_PARENTFOLDER:
return;
default:
showparentfolder._old_cycleHeader.apply(this,arguments);
}
},
getCellText: function PTV_getCellText(aRow, aColumn) {
let node = this._getNodeForRow(aRow);
switch (this._getColumnType(aColumn)) {
case this.COLUMN_TYPE_PARENTFOLDER:
if (PlacesUtils.nodeIsQuery(node.parent) &&
PlacesUtils.asQuery(node.parent).queryOptions.queryType ==
Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY &&
node.uri )
return "";
var bmsvc = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"]
.getService(Components.interfaces.nsINavBookmarksService);
var rowId = node.itemId;
try {
var FolderId;
var parentFolderId = bmsvc.getFolderIdForItem(rowId);
var folderTitle = bmsvc.getItemTitle(parentFolderId);
var xpref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch2);
var reverse = xpref.getBoolPref("extensions.showParentFolder.reverseFolderHierarchy");
if (xpref.getBoolPref("extensions.showParentFolder.showFolderHierarchy")){
while ( (FolderId = bmsvc.getFolderIdForItem(parentFolderId)) ){
if (FolderId == parentFolderId)
break;
parentFolderId = FolderId;
var text = bmsvc.getItemTitle(parentFolderId);
if (!text)
break;
if (!reverse)
folderTitle = text + " /"+ folderTitle;
else
folderTitle = folderTitle + "<"+ text;
}
folderTitle = folderTitle.replace(/^\s/,"");
}
} catch(ex) {
var folderTitle = "";
}
return folderTitle;
default:
return showparentfolder._old_getCellText.apply(this,arguments);
}
},
_getColumnType: function PTV__getColumnType(aColumn) {
let columnType = aColumn.element.getAttribute("anonid") || aColumn.id;
switch (columnType) {
case "parentFolder":
return this.COLUMN_TYPE_PARENTFOLDER;
default:
return showparentfolder._old_getColumnType.apply(this,arguments);
}
},
}
window.addEventListener("load",showparentfolder.init,false);