зеркало из https://github.com/mozilla/gecko-dev.git
Handle clicks properly. Fix for 14857 and 11986. r=rjc
This commit is contained in:
Родитель
70d12bee41
Коммит
b95ce6697b
|
@ -29,7 +29,6 @@
|
|||
align="vertical">
|
||||
|
||||
<html:div style="width:100px;height:100px" flex="1">
|
||||
<html:script src="bookmarks.js"/>
|
||||
|
||||
<popup id="contextual" oncreate="return fillContextMenu('contextual');" >
|
||||
<menu />
|
||||
|
@ -38,7 +37,7 @@
|
|||
<tree id="bookmarksTree" context="contextual" ref="NC:BookmarksRoot"
|
||||
style="height: 100%; width:100%;"
|
||||
datasources="rdf:bookmarks rdf:files rdf:ftp rdf:localsearch rdf:internetsearch"
|
||||
ondblclick="return OpenURL(event, event.target.parentNode.parentNode, 'bookmarksTree');">
|
||||
onclick="if (event.clickCount == 2) return top.OpenBookmarkURL(event.target.parentNode.parentNode, 'bookmarksTree');">
|
||||
|
||||
<template>
|
||||
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
</menubar>
|
||||
<html:div flex="100%">
|
||||
<tree rdf:datasources="rdf:history rdf:localsearch"
|
||||
ondblclick="OpenURL(event,event.target.parentNode.parentNode);"
|
||||
onclick="if (event.clickCount == 2) OpenURL(event,event.target.parentNode.parentNode);"
|
||||
ref="NC:HistoryRoot"
|
||||
style="height:100%;">
|
||||
|
||||
|
@ -92,16 +92,16 @@
|
|||
<treehead>
|
||||
<treerow>
|
||||
<treecell onclick="return doSort('NameColumn');">
|
||||
<xul:observes element="NameColumn" attribute="sortActive"/>
|
||||
<xul:observes element="NameColumn" attribute="sortDirection"/>
|
||||
<observes element="NameColumn" attribute="sortActive"/>
|
||||
<observes element="NameColumn" attribute="sortDirection"/>
|
||||
&name.column.label;</treecell>
|
||||
<treecell onclick="return doSort('URLColumn');">
|
||||
<xul:observes element="URLColumn" attribute="sortActive"/>
|
||||
<xul:observes element="URLColumn" attribute="sortDirection"/>
|
||||
<observes element="URLColumn" attribute="sortActive"/>
|
||||
<observes element="URLColumn" attribute="sortDirection"/>
|
||||
&url.column.label;</treecell>
|
||||
<treecell onclick="return doSort('DateColumn');">
|
||||
<xul:observes element="DateColumn" attribute="sortActive"/>
|
||||
<xul:observes element="DateColumn" attribute="sortDirection"/>
|
||||
<observes element="DateColumn" attribute="sortActive"/>
|
||||
<observes element="DateColumn" attribute="sortDirection"/>
|
||||
&lastvisited.column.label;</treecell>
|
||||
</treerow>
|
||||
</treehead>
|
||||
|
|
|
@ -104,10 +104,8 @@ function Init()
|
|||
|
||||
|
||||
|
||||
function OnDblClick(treeitem, root)
|
||||
function openURL(treeitem, root)
|
||||
{
|
||||
// Deal with a double-click
|
||||
|
||||
// First, see if they're opening the related links node. If so,
|
||||
// we'll need to go out and fetch related links _now_.
|
||||
if (treeitem.getAttribute('id') == 'NC:RelatedLinks' &&
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<tree id="Tree"
|
||||
style="width: 100%; height: 100%"
|
||||
datasources="rdf:internetsearch"
|
||||
ondblclick="return OnDblClick(event.target.parentNode.parentNode, 'Tree')">
|
||||
onclick="if (event.clickCount == 2) return openURL(event.target.parentNode.parentNode, 'Tree')">
|
||||
|
||||
<template>
|
||||
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
align="vertical">
|
||||
|
||||
<html:div style="width:100px;height:100px" flex="1">
|
||||
<html:script src="bookmarks.js"/>
|
||||
|
||||
<popup id="contextual" oncreate="return fillContextMenu('contextual');" >
|
||||
<menu />
|
||||
|
@ -38,7 +37,7 @@
|
|||
<tree id="bookmarksTree" context="contextual" ref="NC:BookmarksRoot"
|
||||
style="height: 100%; width:100%;"
|
||||
datasources="rdf:bookmarks rdf:files rdf:ftp rdf:localsearch rdf:internetsearch"
|
||||
ondblclick="return OpenURL(event, event.target.parentNode.parentNode, 'bookmarksTree');">
|
||||
onclick="if (event.clickCount == 2) return top.OpenBookmarkURL(event.target.parentNode.parentNode, 'bookmarksTree');">
|
||||
|
||||
<template>
|
||||
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<html:div style="width: 100px; height: 100px;" flex="1">
|
||||
<tree id="bookmarksTree" ref="NC:BookmarksRoot" context="contextual"
|
||||
datasources="rdf:bookmarks rdf:files rdf:ftp rdf:localsearch rdf:internetsearch"
|
||||
ondblclick="return OpenURL(event, event.target.parentNode.parentNode, 'bookmarksTree');"
|
||||
onclick="if (event.clickCount == 2) return OpenURL(event, event.target.parentNode.parentNode, 'bookmarksTree');"
|
||||
style="width:100%;height:100%">
|
||||
|
||||
<template>
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
</menubar>
|
||||
<html:div flex="100%">
|
||||
<tree rdf:datasources="rdf:history rdf:localsearch"
|
||||
ondblclick="OpenURL(event,event.target.parentNode.parentNode);"
|
||||
onclick="if (event.clickCount == 2) OpenURL(event,event.target.parentNode.parentNode);"
|
||||
ref="NC:HistoryRoot"
|
||||
style="height:100%;">
|
||||
|
||||
|
@ -92,16 +92,16 @@
|
|||
<treehead>
|
||||
<treerow>
|
||||
<treecell onclick="return doSort('NameColumn');">
|
||||
<xul:observes element="NameColumn" attribute="sortActive"/>
|
||||
<xul:observes element="NameColumn" attribute="sortDirection"/>
|
||||
<observes element="NameColumn" attribute="sortActive"/>
|
||||
<observes element="NameColumn" attribute="sortDirection"/>
|
||||
&name.column.label;</treecell>
|
||||
<treecell onclick="return doSort('URLColumn');">
|
||||
<xul:observes element="URLColumn" attribute="sortActive"/>
|
||||
<xul:observes element="URLColumn" attribute="sortDirection"/>
|
||||
<observes element="URLColumn" attribute="sortActive"/>
|
||||
<observes element="URLColumn" attribute="sortDirection"/>
|
||||
&url.column.label;</treecell>
|
||||
<treecell onclick="return doSort('DateColumn');">
|
||||
<xul:observes element="DateColumn" attribute="sortActive"/>
|
||||
<xul:observes element="DateColumn" attribute="sortDirection"/>
|
||||
<observes element="DateColumn" attribute="sortActive"/>
|
||||
<observes element="DateColumn" attribute="sortDirection"/>
|
||||
&lastvisited.column.label;</treecell>
|
||||
</treerow>
|
||||
</treehead>
|
||||
|
|
|
@ -104,10 +104,8 @@ function Init()
|
|||
|
||||
|
||||
|
||||
function OnDblClick(treeitem, root)
|
||||
function openURL(treeitem, root)
|
||||
{
|
||||
// Deal with a double-click
|
||||
|
||||
// First, see if they're opening the related links node. If so,
|
||||
// we'll need to go out and fetch related links _now_.
|
||||
if (treeitem.getAttribute('id') == 'NC:RelatedLinks' &&
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<tree id="Tree"
|
||||
style="width: 100%; height: 100%"
|
||||
datasources="rdf:internetsearch"
|
||||
ondblclick="return OnDblClick(event.target.parentNode.parentNode, 'Tree')">
|
||||
onclick="if (event.clickCount == 2) return openURL(event.target.parentNode.parentNode, 'Tree')">
|
||||
|
||||
<template>
|
||||
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
|
||||
|
|
Загрузка…
Ссылка в новой задаче