зеркало из https://github.com/mozilla/gecko-dev.git
315940 - unified 'places' view... checking in some stub files so we can start building out the components. NOT PART OF BUILD.
This commit is contained in:
Родитель
fe417391e2
Коммит
40a15e993e
|
@ -0,0 +1,59 @@
|
|||
//* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla History System
|
||||
*
|
||||
* The Initial Developer of the Original Code is Google Inc.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2005
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Ben Goodger <beng@google.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cr = Components.results;
|
||||
|
||||
var gPlaces = {
|
||||
|
||||
init: function() {
|
||||
var wm =
|
||||
Cc["@mozilla.org/appshell/window-mediator;1"].
|
||||
getService(Ci.nsIWindowMediator);
|
||||
var topWindow = wm.getMostRecentWindow("navigator:browser");
|
||||
var tabbrowser = topWindow.getBrowser();
|
||||
tabbrowser.setAttribute("places", "true");
|
||||
|
||||
var statusbar = topWindow.document.getElementById("status-bar");
|
||||
statusbar.hidden = true;
|
||||
|
||||
|
||||
dump("*** browser = "+ tabbrowser + "\n");
|
||||
},
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
//* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla History System
|
||||
*
|
||||
* The Initial Developer of the Original Code is Google Inc.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2005
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Ben Goodger <beng@google.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
|
||||
|
||||
<window id="places"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="gPlaces.init();">
|
||||
|
||||
<script type="application/x-javascript"
|
||||
src="chrome://browser/content/places/places.js"/>
|
||||
|
||||
<hbox flex="1" id="placesView">
|
||||
<vbox flex="1">
|
||||
<tree id="placesList" class="placesTree" flex="1" datasources="rdf:bookmarks" ref="NC:BookmarksTopRoot"
|
||||
flags="dont-build-content" hidecolumnpicker="true">
|
||||
<treecols>
|
||||
<treecol id="Name" flex="1" primary="true" hideheader="true"/>
|
||||
</treecols>
|
||||
<template>
|
||||
<conditions>
|
||||
<content uri="?uri"/>
|
||||
<member container="?uri" child="?folder"/>
|
||||
<triple subject="?folder" predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
|
||||
object="http://home.netscape.com/NC-rdf#Folder"/>
|
||||
<triple subject="?folder" predicate="http://home.netscape.com/NC-rdf#Name"
|
||||
object="?Name"/>
|
||||
</conditions>
|
||||
<action>
|
||||
<treechildren>
|
||||
<treeitem uri="?folder">
|
||||
<treerow>
|
||||
<treecell label="?Name"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</action>
|
||||
</template>
|
||||
</tree>
|
||||
<hbox>
|
||||
<button label="New Folder"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<splitter id="splitter"/>
|
||||
<vbox flex="4">
|
||||
<hbox align="center">
|
||||
<label>Search:</label>
|
||||
<textbox id="search"/>
|
||||
<button label="+"/>
|
||||
</hbox>
|
||||
<deck id="content" flex="1">
|
||||
<tree id="placeContent" class="placesTree"></tree>
|
||||
</deck>
|
||||
<hbox>
|
||||
<button label="New Folder"/>
|
||||
<button label="Save Search..."/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</hbox>
|
||||
|
||||
</window>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
browser.jar:
|
||||
* content/browser/places/places.xul (content/places.xul)
|
||||
* content/browser/places/places.js (content/places.js)
|
||||
* content/browser/places/places.xml (content/places.xml)
|
||||
|
||||
classic.jar:
|
||||
skin/classic/browser/places/places.css (skin-win/places.css)
|
||||
|
|
@ -0,0 +1 @@
|
|||
this directory will be moved to browser/themes/winstripe|pinstripe places once this is turned on
|
|
@ -0,0 +1,25 @@
|
|||
#placesView {
|
||||
-moz-appearance: tabpanels;
|
||||
margin: -10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.placesTree {
|
||||
margin: 0px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#placesList {
|
||||
margin: 7px 0px 10px 6px;
|
||||
}
|
||||
|
||||
#placeContent {
|
||||
margin: 7px 6px 10px 0px;
|
||||
}
|
||||
|
||||
#splitter {
|
||||
border: 0px;
|
||||
width: 10px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче