From 175b323cf30b90705eebdecf5ebc516aff90ca7d Mon Sep 17 00:00:00 2001 From: "slamm%netscape.com" Date: Tue, 3 Aug 1999 22:50:42 +0000 Subject: [PATCH] Move sidebar files into componnent directory git-svn-id: svn://10.0.0.236/trunk@42046 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/rdf/resources/Makefile.in | 31 +-- mozilla/rdf/resources/customize.css | 64 ----- mozilla/rdf/resources/customize.js | 300 --------------------- mozilla/rdf/resources/customize.xul | 115 -------- mozilla/rdf/resources/dummy-flash.rdf | 15 -- mozilla/rdf/resources/flames.gif | Bin 2911 -> 0 bytes mozilla/rdf/resources/flash-registry.rdf | 30 --- mozilla/rdf/resources/flash.css | 21 -- mozilla/rdf/resources/flash.js | 156 ----------- mozilla/rdf/resources/flash.xul | 80 ------ mozilla/rdf/resources/list-down-dis.gif | Bin 76 -> 0 bytes mozilla/rdf/resources/list-down.gif | Bin 77 -> 0 bytes mozilla/rdf/resources/list-up-dis.gif | Bin 77 -> 0 bytes mozilla/rdf/resources/list-up.gif | Bin 79 -> 0 bytes mozilla/rdf/resources/makefile.win | 26 -- mozilla/rdf/resources/sidebar-browser.rdf | 44 --- mozilla/rdf/resources/sidebar-browser.xul | 30 --- mozilla/rdf/resources/sidebar-registry.rdf | 36 --- mozilla/rdf/resources/sidebar.css | 142 ---------- mozilla/rdf/resources/sidebar.js | 162 ----------- 20 files changed, 5 insertions(+), 1247 deletions(-) delete mode 100644 mozilla/rdf/resources/customize.css delete mode 100644 mozilla/rdf/resources/customize.js delete mode 100644 mozilla/rdf/resources/customize.xul delete mode 100644 mozilla/rdf/resources/dummy-flash.rdf delete mode 100644 mozilla/rdf/resources/flames.gif delete mode 100644 mozilla/rdf/resources/flash-registry.rdf delete mode 100644 mozilla/rdf/resources/flash.css delete mode 100644 mozilla/rdf/resources/flash.js delete mode 100644 mozilla/rdf/resources/flash.xul delete mode 100644 mozilla/rdf/resources/list-down-dis.gif delete mode 100644 mozilla/rdf/resources/list-down.gif delete mode 100644 mozilla/rdf/resources/list-up-dis.gif delete mode 100644 mozilla/rdf/resources/list-up.gif delete mode 100644 mozilla/rdf/resources/sidebar-browser.rdf delete mode 100644 mozilla/rdf/resources/sidebar-browser.xul delete mode 100644 mozilla/rdf/resources/sidebar-registry.rdf delete mode 100644 mozilla/rdf/resources/sidebar.css delete mode 100644 mozilla/rdf/resources/sidebar.js diff --git a/mozilla/rdf/resources/Makefile.in b/mozilla/rdf/resources/Makefile.in index 7e2caff329c..825e838bd3a 100644 --- a/mozilla/rdf/resources/Makefile.in +++ b/mozilla/rdf/resources/Makefile.in @@ -27,11 +27,11 @@ include $(topsrcdir)/config/config.mk include $(topsrcdir)/config/rules.mk FILES = \ - article.gif \ - customize.css \ - customize.js \ - customize.xul \ - document.gif \ + article.gif \ + document.gif \ + folder-closed.gif \ + folder-open.gif \ + loading.gif \ dom-test-1.xul \ dom-test-2.xul \ dom-test-3.xul \ @@ -41,28 +41,7 @@ FILES = \ dom-test-6.xul \ dom-test-7.xul \ dom-test-8.xul \ - dummy-flash.rdf \ - flash-registry.rdf \ - flash.css \ - flash.js \ - flash.xul \ - flames.gif \ - folder-closed.gif \ - folder-open.gif \ ignore-test.xul \ - list-down.gif \ - list-down-dis.gif \ - list-up.gif \ - list-up-dis.gif \ - loading.gif \ - online.gif \ - sidebar.css \ - sidebar.js \ - sidebar-browser.rdf \ - sidebar-browser.xul \ - sidebar-registry.rdf \ - stock.gif \ - unread.gif \ xpidl-test-1.xul \ $(NULL) diff --git a/mozilla/rdf/resources/customize.css b/mozilla/rdf/resources/customize.css deleted file mode 100644 index e5d82354714..00000000000 --- a/mozilla/rdf/resources/customize.css +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ - -/* - - Style rules specific to the Customize dialog. - -*/ - -#main-box { - padding: 1px; -} - -div.title { - font: 4mm tahoma,arial,helvetica,sans-serif; - margin: 2px; -} - -box.box-group { - padding: 2px; -} -box.button-group { - padding: 1mm; -} - -#selectList { - width: 12em; -} - -#tree { - width: 17em; -} - -titledbutton.up { - list-style-image:url(resource:/res/rdf/list-up.gif); -} - -titledbutton.up[disabled="true"] { - list-style-image:url(resource:/res/rdf/list-up-dis.gif); -} - -titledbutton.down { - list-style-image:url(resource:/res/rdf/list-down.gif); -} - -titledbutton.down[disabled="true"] { - list-style-image:url(resource:/res/rdf/list-down-dis.gif); -} - diff --git a/mozilla/rdf/resources/customize.js b/mozilla/rdf/resources/customize.js deleted file mode 100644 index 4c043beb3bf..00000000000 --- a/mozilla/rdf/resources/customize.js +++ /dev/null @@ -1,300 +0,0 @@ -// -*- Mode: Java -*- - -// the rdf service -var RDF; -var NC = "http://home.netscape.com/NC-rdf#"; - -var sidebar; - -function Init() -{ - RDF=Components.classes['component://netscape/rdf/rdf-service'].getService(); - RDF=RDF.QueryInterface(Components.interfaces.nsIRDFService); - - sidebar = new Object; - sidebar.db = window.arguments[0]; - sidebar.resource = window.arguments[1]; - - var registry; - try { - // First try to construct a new one and load it - // synchronously. nsIRDFService::GetDataSource() loads RDF/XML - // asynchronously by default. - registry = Components.classes['component://netscape/rdf/datasource?name=xml-datasource'].createInstance(); - registry = registry.QueryInterface(Components.interfaces.nsIRDFDataSource); - - var remote = registry.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); - remote.Init(sidebar.db); // this will throw if it's already been opened and registered. - - // read it in synchronously. - remote.Refresh(true); - } - catch (ex) { - // if we get here, then the RDF/XML has been opened and read - // once. We just need to grab the datasource. - registry = RDF.GetDataSource(sidebar.db); - } - - // Create a 'container' wrapper around the sidebar.resources - // resource so we can use some utility routines that make access a - // bit easier. - var sb_datasource = Components.classes['component://netscape/rdf/container'].createInstance(); - sb_datasource = sb_datasource.QueryInterface(Components.interfaces.nsIRDFContainer); - sb_datasource.Init(registry, RDF.GetResource(sidebar.resource)); - - // Now enumerate all of the flash datasources. - var enumerator = sb_datasource.GetElements(); - var count = 0; - while (enumerator.HasMoreElements()) { - count = ++count; - var service = enumerator.GetNext(); - service = service.QueryInterface(Components.interfaces.nsIRDFResource); - - addOption(registry, service); - } - enableButtons(); -} - -function addOption(registry, service) { - - var option_title = getAttr(registry, service, 'title'); - var option_customize = getAttr(registry, service, 'customize'); - var option_content = getAttr(registry, service, 'content'); - - var optionSelect = createOptionTitle(option_title); - var option = document.createElement('html:option'); - - option.setAttribute('title', option_title); - option.setAttribute('customize', option_customize); - option.setAttribute('content', option_content); - - - option.appendChild(optionSelect); - - var sideoption = document.getElementById('selectList'); - sideoption.appendChild(option); -} - -function createOptionTitle(titletext) -{ - var title = document.createElement('html:option'); - var textOption = document.createTextNode(titletext); - title.appendChild(textOption); - - return textOption; -} - -function getAttr(registry,service,attr_name) { - var attr = registry.GetTarget(service, - RDF.GetResource(NC + attr_name), - true); - if (attr) - attr = attr.QueryInterface(Components.interfaces.nsIRDFLiteral); - if (attr) - attr = attr.Value; - return attr; -} - -function selectChange() { - enableButtons(); -} - -function moveUp() { - var list = document.getElementById('selectList'); - var index = list.selectedIndex; - if (index > 0) { - var optionBefore = list.childNodes.item(index-1); - var selectedOption = list.childNodes.item(index); - list.remove(index); - list.insertBefore(selectedOption, optionBefore); - list.selectedIndex = index - 1; - enableButtons(); - enableSave(); - } -} - -function moveDown() { - var list = document.getElementById('selectList'); - var index = list.selectedIndex; - if (index != -1 && - index != list.options.length - 1) { - var selectedOption = list.childNodes.item(index); - var optionAfter = list.childNodes.item(index+1); - list.remove(index+1); - list.insertBefore(optionAfter, selectedOption); - enableButtons(); - enableSave(); - } -} - -function enableButtons() { - var up = document.getElementById('up'); - var down = document.getElementById('down'); - var list = document.getElementById('selectList'); - var customize = document.getElementById('customize-button'); - var index = list.selectedIndex; - var isFirst = index == 0; - var isLast = index == list.options.length - 1; - - // up /\ button - if (isFirst) { - up.setAttribute('disabled', 'true'); - } else { - up.setAttribute('disabled', ''); - } - // down \/ button - if (isLast) { - down.setAttribute('disabled', 'true'); - } else { - down.setAttribute('disabled', ''); - } - // "Customize..." button - var customizeURL = null; - if (index != -1) { - var option = list.childNodes.item(index); - customizeURL = option.getAttribute('customize'); - } - if (customizeURL == 'null') { - customize.setAttribute('disabled','true'); - } else { - customize.setAttribute('disabled',''); - } -} - -function RemovePanel() -{ - var list = document.getElementById('selectList'); - var index = list.selectedIndex; - if (index != -1) { - // XXX prompt user - list.options[index] = null; - } - enableSave(); -} - -// Note that there is a bug with resource: URLs right now. -var FileURL = "file:////u/slamm/tt/sidebar-browser.rdf"; - -// var the "NC" namespace. Used to construct resources -function Save() -{ - // Open the RDF file synchronously. This is tricky, because - // GetDataSource() will do it asynchronously. So, what we do is - // this. First try to manually construct the RDF/XML datasource - // and read it in. This might throw an exception if the datasource - // has already been read in once. In which case, we'll just get - // the existing datasource from the RDF service. - var datasource; - - try { - datasource = Components.classes["component://netscape/rdf/datasource?name=xml-datasource"].createInstance(); - datasource = datasource.QueryInterface(Components.interfaces.nsIRDFXMLDataSource); - //datasource.Init(FileURL); - datasource.Init(sidebar.db); - datasource.Open(true); - dump("datasource = " + datasource + ", opened for the first time.\n"); - } - catch (ex) { - //datasource = RDF.GetDataSource(FileURL); - datasource = RDF.GetDataSource(sidebar.db); - dump("datasource = " + datasource + ", using registered datasource.\n"); - } - - // Create a "container" wrapper around the "NC:BrowserSidebarRoot" - // object. This makes it easier to manipulate the RDF:Seq correctly. - var container = Components.classes["component://netscape/rdf/container"].createInstance(); - container = container.QueryInterface(Components.interfaces.nsIRDFContainer); - - container.Init(datasource, RDF.GetResource(sidebar.resource)); - dump("initialized container " + container + " on " + sidebar.resource+"\n"); - - // Remove all the current panels - // - var enumerator = container.GetElements(); - - while (enumerator.HasMoreElements()) { - var service = enumerator.GetNext(); - service = service.QueryInterface(Components.interfaces.nsIRDFResource); - container.RemoveElement(service, true); - } - - // Add the new panel list - // - var count = container.GetCount(); - dump("container has " + count + " elements\n"); - - var list = document.getElementById('selectList'); - var list_length = list.childNodes.length; - - for (var ii=0; ii < list_length; ii++, count++) { - dump(list.childNodes.item(ii).getAttribute('title') + '\n'); - - var title = list.childNodes.item(ii).getAttribute('title'); - var content = list.childNodes.item(ii).getAttribute('content'); - var customize = list.childNodes.item(ii).getAttribute('customize'); - - var element = RDF.GetResource(FileURL + "#" + count); - dump(FileURL + "#" + count + "\n"); - - container.AppendElement(element); - dump("appended " + element + " to the container\n"); - - // Now make some sidebar-ish assertions about it... - datasource.Assert(element, - RDF.GetResource(NC + "title"), - RDF.GetLiteral(title + ' ' + count), - true); - datasource.Assert(element, - RDF.GetResource(NC + "content"), - RDF.GetLiteral(content), - true); - datasource.Assert(element, - RDF.GetResource(NC + "customize"), - RDF.GetLiteral(customize), - true); - - dump("added assertions about " + element + "\n"); - } - - // Now serialize it back to disk - datasource.Flush(); - dump("wrote " + FileURL + " back to disk.\n"); - - //window.close(); -} - -function selected() -{ - var add_button = document.getElementById('add_button'); - var preview_button = document.getElementById('preview_button'); - var select_list = document.getElementsByAttribute("selected", "true"); - if (select_list.length >= 1) { - add_button.setAttribute('disabled',''); - preview_button.setAttribute('disabled',''); - } else { - add_button.setAttribute('disabled','true'); - preview_button.setAttribute('disabled','true'); - } -} - -function AddPanel() -{ - var tree = document.getElementById('other-panels'); - var database = tree.database; - var select_list = document.getElementsByAttribute("selected", "true"); - for (var nodeIndex=0; nodeIndex - - - - - - - - - - - - - - Current Panels - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Select a Panel to Add - - - - - - - - - - - - Name - - - - - - - - - - - - - - - Find more panels - - | - - Create a panel - - - - - - - - - - - - - - - diff --git a/mozilla/rdf/resources/dummy-flash.rdf b/mozilla/rdf/resources/dummy-flash.rdf deleted file mode 100644 index 76cbc5f32cd..00000000000 --- a/mozilla/rdf/resources/dummy-flash.rdf +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - Dummy - Testing 1-2-3 - Jul 30 15:02 1999 - - - - \ No newline at end of file diff --git a/mozilla/rdf/resources/flames.gif b/mozilla/rdf/resources/flames.gif deleted file mode 100644 index acfa829c456e4eb45a96e03c70f702350028e29a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2911 zcmc&$eNYqW8Q+8?Y{JL9$cHZo+%809(c`ix)Wy?=CFF2HCM+Q%+w&$E@1%)#kkr;| zoM{pwBM=p2ol+Y;5Tp6H^zbw{&UCl|YPr)pEL7rnPJ5Hy)%K?Cb*in?yBRy}8?3!R z+rPW>n`hqLywCGK&+qwo^U_ZJR;Clj0QR>Sh8`RNy(NGHfB}F*9D@J>hY%+LMgp9K z7zuF-019FhT97ymF`7icX%f&BPE&v(F^0q$5-=3bpjQgAB*u~?OW`a9SQ-IxB;+WZ zqaa7)91S@1g@HT;c#7m{jHhv)20VlF43dy%5lDfe1R4l56c}7!fWSb31p*5Nj8*2a=56!uajb zZzuf@=yxDV`5m+$efN-l59Rlu1sidY5f1_t@z4=374ag;M7(U&Lq@$+)JsRbOccF} zR8*v+A`=zSnwt`-DUqHMnJJN-^3hX1X3B>a+?_eu}UP#HgIGk z6}8y&$VUC7)*Q_lzGVoQI!^}-{an}e!)YCr5O1NI=5+D%oj>-%X0z6;UEzgt*$)h_ z#EOjguRoEytyQ``dmF;@Sk~;fNJoReK-%(w#~+w`=&jtN-)g!#6er$ut}uZk6A34_ zVBuDc%dK)-%S{i?dZ@vW5a`sxCVV~&*)AdWEN6s{lM%KpO)!O>%&8J>lP~%VTaB!_FZ_QSK zCdz+d_G?)9#Nwi}E($JG{%S_1W{XY7|3n1y$o!2NDIs#9dJ`M9*6Zo8;o$UyY4+&R zE%E7@Rlz9`!%7q!@`(xPhvFyHX?SM0Q^(=iu{D#!RhVRk?!j}6o?yKH#mg1IIPtrs zbhi>{h-9Cnh#=W=wn;3U5ztSXt5ZwxzV7--?z{|t)I6a1jp0(ROa%gYNs)Y|Rf6){ zL;#oERb#^6e5i|$>QZaHKNM$g{iwb)q$CW_ClM({EFSopA3i|O8|*v^-)dA08(Y*B~WOIIDCM0*pv ziWdqpZ1=R&y6O-dd6g)} zGE~p&cJJyvzP2cI44!Gslw`i8+a6RrXpa=fKD*%-ho&)iax+O$dY-CMSa_Zon-HqY zcK#JME*t~dshbP`{>X4*Q1e<(=$jwq+Ul#Nav4ltL0{^>w966a>*89oJL44vz7)UQ zixmy-Gp=i`_-Mqcw`MrnPBevDvO;oMGBwG{gXTJOG`&z(W^Pln)tQqfWA@C>(KoC` zT@Py8K0j5a&HW$BWy{$%n8kc)Lvumv{H(f_DtPy7EU2w+xz=U8!@oCtd=LMK-A<3f$V+9vGv(7K=e60SD+DtSQ;z_yBkWsfbHP&;019c;lC9zvygjx>{Qm*ft z4=>F2FJ-$@R)w0V&@`l6gOt_8WPwZ}fBhmf9DF~JDg6Q7M0S4|WTdv~0pid7&$;p% z&k3!&(kfbC4rM`N<=~TIQe-LvnW{zZZzc?cBv&3@e~8d1bNga}4R zpbnES_aqui?cp&tj?o8sW78GIsbMSk;$lc^{&{KRb~KlghuK$G7oG4_qaD-IWV-1m z(z3qk%z@oE`whE37;DQ7t=FEhjSO35PrB~kXdomKc{sV~CFtCzqZK8yy_7JRrGz|O z)b&$!UETI0bLoMa`r%+jX2^f!!TwLM9dGGA57tb#26yRYRX}q^Sb2**GleGpdS`0{ z-Gc+Kz`~)IhEGc5^UaG{ zrspIN2FdaWOH@W3@(m#0syBT%-84}Wa?hwv|MJ7~t=I@GQ>!X|v3ZQ>-8WEZ3V)h@ d?}9aDFa3vOm*UUuj-1cgGBoXUB|3N8KLOy)E}#Ga diff --git a/mozilla/rdf/resources/flash-registry.rdf b/mozilla/rdf/resources/flash-registry.rdf deleted file mode 100644 index 0d5792aa9e1..00000000000 --- a/mozilla/rdf/resources/flash-registry.rdf +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - 300 - - - - - - - - - - - - - - - diff --git a/mozilla/rdf/resources/flash.css b/mozilla/rdf/resources/flash.css deleted file mode 100644 index 839e4c64f0b..00000000000 --- a/mozilla/rdf/resources/flash.css +++ /dev/null @@ -1,21 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 2 -*- - - Style rules specific to the Flash Panel. These are kludged right now. - - */ - -window { - background-color: white; -} - -treeitem[type="http://www.mozilla.org/RDF#TinderboxFlash"] > treerow > treecell > titledbutton { - list-style-image: url("resource:/res/rdf/flames.gif"); -} - -treeitem[type="http://home.netscape.com/NC-rdf#MsgNewMessages"] > treerow > treecell > titledbutton { - list-style-image: url("chrome://messenger/skin/folderHasMail.gif"); -} - -treeitem[type="http://www.mozilla.org/rdf#XPInstallNotification"] > treerow > treecell > titledbutton { - list-style-image: url("resource:/res/rdf/document.gif"); -} diff --git a/mozilla/rdf/resources/flash.js b/mozilla/rdf/resources/flash.js deleted file mode 100644 index 382dd55f0c3..00000000000 --- a/mozilla/rdf/resources/flash.js +++ /dev/null @@ -1,156 +0,0 @@ -/* -*- Mode: Java; tab-width: 4; c-basic-offset: 4 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ - -// the rdf service -var RDF = Components.classes['component://netscape/rdf/rdf-service'].getService(); -RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); - -// the current profile directory -// XXX obviously, this shouldn't be hard-coded -var profiledir = 'resource:/res/rdf/'; - -// the location of the flash registry. -var flashdb = profiledir + 'flash-registry.rdf'; - -function Init() -{ - // Initialize the Flash panel. - dump('Init!\n'); - - var tree = document.getElementById('tree'); - - // Install all the datasources named in the Flash Registry into - // the tree control. Datasources are listed as members of the - // NC:FlashDataSources sequence, and are loaded in the order that - // they appear in that sequence. - var registry; - try { - // First try to construct a new one and load it - // synchronously. nsIRDFService::GetDataSource() loads RDF/XML - // asynchronously by default. - registry = Components.classes['component://netscape/rdf/datasource?name=xml-datasource'].createInstance(); - registry = registry.QueryInterface(Components.interfaces.nsIRDFDataSource); - - var remote = registry.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); - remote.Init(flashdb); // this will throw if it's already been opened and registered. - - // read it in synchronously. - remote.Refresh(true); - } - catch (ex) { - // if we get here, then the RDF/XML has been opened and read - // once. We just need to grab the datasource. - registry = RDF.GetDataSource(flashdb); - } - - // Create a 'container' wrapper around the NC:FlashDataSources - // resource so we can use some utility routines that make access a - // bit easier. - var flashdatasources = Components.classes['component://netscape/rdf/container'].createInstance(); - flashdatasources = flashdatasources.QueryInterface(Components.interfaces.nsIRDFContainer); - - flashdatasources.Init(registry, RDF.GetResource('NC:FlashDataSources')); - - // Now enumerate all of the flash datasources. - var enumerator = flashdatasources.GetElements(); - while (enumerator.HasMoreElements()) { - var service = enumerator.GetNext(); - service = service.QueryInterface(Components.interfaces.nsIRDFResource); - - dump('adding "' + service.Value + '" to the tree\n'); - try { - // Create a new RDF/XML datasource. If this is a 'remote' - // datasource (e.g., a 'http:' URL), it will be loaded - // asynchronously. - var flashservice = RDF.GetDataSource(service.Value); - flashservice = flashservice.QueryInterface(Components.interfaces.nsIRDFDataSource); - - // Add it to the tree control's composite datasource. - tree.database.AddDataSource(flashservice); - - var pollInterval = - registry.GetTarget(service, - RDF.GetResource('http://home.netscape.com/NC-rdf#poll-interval'), - true); - - if (pollInterval) - pollInterval = pollInterval.QueryInterface(Components.interfaces.nsIRDFLiteral); - - if (pollInterval) - pollInterval = pollInterval.Value; - - if (pollInterval) { - dump(service.Value + ': setting poll interval to ' + pollInterval + 'sec.\n'); - Schedule(service.Value, pollInterval); - } - } - catch (ex) { - dump('an exception occurred trying to load "' + service.Value + '":\n'); - dump(ex + '\n'); - } - } - - // Install all of the stylesheets in the Flash Registry into the - // panel. - - // TODO - - // XXX hack to force the tree to rebuild - tree.setAttribute('ref', 'NC:FlashRoot'); -} - - -function Reload(url, pollInterval) -{ - // Reload the specified datasource and reschedule. - dump('Reload(' + url + ', ' + pollInterval + ')\n'); - - var datasource = RDF.GetDataSource(url); - datasource = datasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); - - // Reload, asynchronously. - datasource.Refresh(false); - - // Reschedule - Schedule(url, pollInterval); -} - -function Schedule(url, pollInterval) -{ - setTimeout('Reload("' + url + '", ' + pollInterval + ')', pollInterval * 1000); -} - -function OpenURL(node) -{ - dump("open-url(" + node + ")\n"); -} - - -// To get around "window.onload" not working in viewer. -function Boot() -{ - var tree = document.getElementById('tree'); - if (tree == null) { - setTimeout(Boot, 0); - } - else { - Init(); - } -} - -setTimeout('Boot()', 0); diff --git a/mozilla/rdf/resources/flash.xul b/mozilla/rdf/resources/flash.xul deleted file mode 100644 index c3f8bdff31f..00000000000 --- a/mozilla/rdf/resources/flash.xul +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - diff --git a/mozilla/rdf/resources/list-down-dis.gif b/mozilla/rdf/resources/list-down-dis.gif deleted file mode 100644 index a77508c45853d9d7862af8a0657223e4cf37be4b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 76 zcmZ?wbhEHb6krfw_`tyM|NsAtf(?p4Sr{3BKnFyCWEhx~U3!+!*!#Mnrf3sa_GWkY bSAmfdl~Nf+(NUXLRUax;kKY>2z+epkc=QpGP5#R0|3xF8)g6i diff --git a/mozilla/rdf/resources/list-up.gif b/mozilla/rdf/resources/list-up.gif deleted file mode 100644 index 614ad37c59853c1904cb7db1c28e19920e9ed3e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 79 zcmZ?wbhEHb6krfw_`tyM|NsAtf(?p4Sr{3BKnFyCWEhy#TKF4JpOSx+T{N#_?ZMJd eZ)*8e`#f&O#%!AR`gzkDo_yV?a}{9>4Aubja~yyG diff --git a/mozilla/rdf/resources/makefile.win b/mozilla/rdf/resources/makefile.win index 845c60cf5ce..7fa61021bbd 100644 --- a/mozilla/rdf/resources/makefile.win +++ b/mozilla/rdf/resources/makefile.win @@ -21,12 +21,6 @@ MODULE=rdf include <$(DEPTH)\config\rules.mak> FILES=\ - article.gif \ - customize.css \ - customize.js \ - customize.xul \ - sidebar-registry.rdf \ - document.gif \ dom-test-1.xul \ dom-test-2.xul \ dom-test-3.xul \ @@ -36,27 +30,7 @@ FILES=\ dom-test-6.xul \ dom-test-7.xul \ dom-test-8.xul \ - dummy-flash.rdf \ - flash-registry.rdf \ - flash.css \ - flash.js \ - flash.xul \ - flames.gif \ - folder-closed.gif \ - folder-open.gif \ ignore-test.xul \ - list-down.gif \ - list-down-dis.gif \ - list-up.gif \ - list-up-dis.gif \ - loading.gif \ - online.gif \ - sidebar.css \ - sidebar.js \ - sidebar-browser.rdf \ - sidebar-browser.xul \ - stock.gif \ - unread.gif \ xpidl-test-1.xul \ $(NULL) diff --git a/mozilla/rdf/resources/sidebar-browser.rdf b/mozilla/rdf/resources/sidebar-browser.rdf deleted file mode 100644 index 4109bb64350..00000000000 --- a/mozilla/rdf/resources/sidebar-browser.rdf +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - -]> - - - - - - - &sidebar.whats-related.label; - resource:/res/samples/related-panel.xul - resource:/res/samples/related-panel-cust.xul - - - - - &sidebar.flash.label; - resource:/res/rdf/flash.xul - resource:/res/rdf/flash-cust.xul - 5em - - - - - &sidebar.tinderbox.label; - http://cvs-mirror.mozilla.org/webtools/tinderbox/SeaMonkey/panel.html - - - - - &sidebar.bookmarks.label; - resource:/res/samples/bm-panel.xul - resource:/res/samples/bm-panel-cust.xul - - - - diff --git a/mozilla/rdf/resources/sidebar-browser.xul b/mozilla/rdf/resources/sidebar-browser.xul deleted file mode 100644 index 44f5bffbc22..00000000000 --- a/mozilla/rdf/resources/sidebar-browser.xul +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - -]> - - - - - - - - - - - - diff --git a/mozilla/rdf/resources/sidebar-registry.rdf b/mozilla/rdf/resources/sidebar-registry.rdf deleted file mode 100644 index fc60aebd247..00000000000 --- a/mozilla/rdf/resources/sidebar-registry.rdf +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - -]> - - - - - - - Headlines - http://my.netscape.com/topstories_subchannel.tmpl - resource:/res/samples/related-panel-cust.xul - - - - - Local News - http://my.netscape.com/localnews_content.tmpl - resource:/res/rdf/flash-cust.xul - - - - - Weather - http://my.netscape.com/weather_content.tmpl - - - - diff --git a/mozilla/rdf/resources/sidebar.css b/mozilla/rdf/resources/sidebar.css deleted file mode 100644 index 90d149cfd3b..00000000000 --- a/mozilla/rdf/resources/sidebar.css +++ /dev/null @@ -1,142 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ - -/* - - Style rules specific to the Sidebar. - -*/ - -iframe -{ - height: 125px; - border: 0px; -} - -treecell -{ - font-family: Verdana, Sans-Serif; - font-size: 8pt; -} - -treecell[sortActive="true"][sortDirection="ascending"] -{ - background-color: green; -} - -treecell[sortActive="true"][sortDirection="descending"] -{ - background-color: red; -} - -treecol[sortActive="true"] -{ - background-color: lightgreen; -} - -treehead > treerow > treecell -{ - background-color: #c0c0c0; - border: outset 1px; - border-color: white #707070 #707070 white; - vertical-align: middle; -} - -treeitem[container="true"][open="true"][loading="true"] > treerow > treecell > titledbutton -{ - list-style-image: url("resource:/res/rdf/loading.gif") ! important ; -} - -treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"][container="true"][open="true"] > treerow > treecell > titledbutton -{ - list-style-image: url("resource:/res/rdf/folder-open.gif"); -} - -treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"][container="true"] > treerow > treecell > titledbutton -{ - list-style-image: url("resource:/res/rdf/folder-closed.gif"); -} - -treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"] > treerow > treecell > titledbutton -{ - list-style-image: url("resource:/res/rdf/article.gif"); -} - -treeitem[container="true"][open="true"] > treerow > treecell > titledbutton -{ - list-style-image: url("resource:/res/rdf/folder-open.gif"); -} - -treeitem[container="true"] > treerow > treecell > titledbutton -{ - list-style-image: url("resource:/res/rdf/folder-closed.gif"); -} - -treeitem > treerow > treecell > titledbutton -{ - height: 16px; - width: 16px; - color: inherit; - border: none; - padding: 0px; - margin: 0px; - font: inherit; -} - -/* - * Sidebar and Panel title buttons - */ -box#sidebox -{ - width: 100%; - height: 100%; -} - -box.sidebartitle -{ - background-color: #505888; - font: 10pt sans-serif; -} - -box.panelbar -{ - background-color: #006870; - font: 10pt sans-serif; -} - -div.sidebartitlelabel -{ - color: white; - padding: 5px; - font: 3mm tahoma,arial,helvetica,sans-serif; -} - -titledbutton.paneltitle -{ - margin: 1px; - padding: 1px; - color: white; - font: 3mm tahoma,arial,helvetica,sans-serif; -} - -treecell titledbutton -{ - color: inherit; -} - - diff --git a/mozilla/rdf/resources/sidebar.js b/mozilla/rdf/resources/sidebar.js deleted file mode 100644 index 8f9a5c390e6..00000000000 --- a/mozilla/rdf/resources/sidebar.js +++ /dev/null @@ -1,162 +0,0 @@ -/* -*- Mode: Java; tab-width: 2; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public License - * Version 1.0 (the "NPL"); you may not use this file except in - * compliance with the NPL. You may obtain a copy of the NPL at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the NPL is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL - * for the specific language governing rights and limitations under the - * NPL. - * - * The Initial Developer of this code under the NPL is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights - * Reserved. - */ - -// the rdf service -var RDF = Components.classes['component://netscape/rdf/rdf-service'].getService(); -RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); - -var sidebar = new Object; - -function Init(sidebar_db, sidebar_resource) -{ - // Initialize the Sidebar - sidebar.db = sidebar_db; - sidebar.resource = sidebar_resource; - - var registry; - try { - // First try to construct a new one and load it - // synchronously. nsIRDFService::GetDataSource() loads RDF/XML - // asynchronously by default. - registry = Components.classes['component://netscape/rdf/datasource?name=xml-datasource'].createInstance(); - registry = registry.QueryInterface(Components.interfaces.nsIRDFDataSource); - - var remote = registry.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); - remote.Init(sidebar.db); // this will throw if it's already been opened and registered. - - // read it in synchronously. - remote.Refresh(true); - } - catch (ex) { - // if we get here, then the RDF/XML has been opened and read - // once. We just need to grab the datasource. - registry = RDF.GetDataSource(sidebar.db); - } - - // Create a 'container' wrapper around the sidebar.resources - // resource so we can use some utility routines that make access a - // bit easier. - var sb_datasource = Components.classes['component://netscape/rdf/container'].createInstance(); - sb_datasource = sb_datasource.QueryInterface(Components.interfaces.nsIRDFContainer); - - sb_datasource.Init(registry, RDF.GetResource(sidebar.resource)); - - var sidebox = document.getElementById('sidebox'); - - // Now enumerate all of the flash datasources. - var enumerator = sb_datasource.GetElements(); - - while (enumerator.HasMoreElements()) { - var service = enumerator.GetNext(); - service = service.QueryInterface(Components.interfaces.nsIRDFResource); - - var new_panel = createPanel(registry, service); - if (new_panel) { - sidebox.appendChild(new_panel); - } - } -} - -function createPanel(registry, service) { - var panel_title = getAttr(registry, service, 'title'); - var panel_content = getAttr(registry, service, 'content'); - var panel_height = getAttr(registry, service, 'height'); - - var box = document.createElement('box'); - var iframe = document.createElement('html:iframe'); - - var iframeId = iframe.getAttribute('id'); - var panelbar = createPanelTitle(panel_title, iframeId); - - box.setAttribute('align', 'vertical'); - iframe.setAttribute('src', panel_content); - if (panel_height) { - var height_style = 'height:' + panel_height + ';'; - iframe.setAttribute('style', height_style); - iframe.setAttribute('save_height', height_style); - } - box.appendChild(panelbar); - box.appendChild(iframe); - - return box; -} - -function createPanelTitle(titletext, id) -{ - var panelbar = document.createElement('box'); - var title = document.createElement('titledbutton'); - var spring = document.createElement('spring'); - - title.setAttribute('value', titletext); - title.setAttribute('class', 'borderless paneltitle'); - title.setAttribute('onclick', 'resize("'+id+'")'); - spring.setAttribute('flex', '100%'); - panelbar.setAttribute('class', 'panelbar'); - - panelbar.appendChild(title); - panelbar.appendChild(spring); - - return panelbar; -} - -function getAttr(registry,service,attr_name) { - var attr = registry.GetTarget(service, - RDF.GetResource('http://home.netscape.com/NC-rdf#' + attr_name), - true); - if (attr) - attr = attr.QueryInterface( - Components.interfaces.nsIRDFLiteral); - if (attr) - attr = attr.Value; - return attr; -} - -function resize(id) { - var box = document.getElementById('sidebox'); - var iframe = document.getElementById(id); - - if (iframe.getAttribute('display') == 'none') { - var height_style = iframe.getAttribute('save_height'); - iframe.setAttribute('style', height_style + 'visibility:visible'); - iframe.setAttribute('display','block'); - } else { - iframe.setAttribute('style', 'height:0px; visibility:hidden'); - iframe.setAttribute('display','none'); - } -} - -function customize() { - var newWin = window.openDialog('resource:/res/rdf/customize.xul','New','chrome', sidebar.db, sidebar.resource); - return newWin; -} - -function dumpTree(node, depth) { - var indent = "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | + "; - var kids = node.childNodes; - dump(indent.substr(indent.length - depth*2)); - - // Print your favorite attributes here - dump(node.nodeName) - dump(" "+node.getAttribute('id')); - dump("\n"); - - for (var ii=0; ii < kids.length; ii++) { - dumpTree(kids[ii], depth + 1); - } -} -