Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(7) |
Sep
(5) |
Oct
(194) |
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(43) |
Mar
(140) |
Apr
(65) |
May
(36) |
Jun
(67) |
Jul
(178) |
Aug
(72) |
Sep
(112) |
Oct
(71) |
Nov
(29) |
Dec
(14) |
2008 |
Jan
(65) |
Feb
(112) |
Mar
(55) |
Apr
(52) |
May
(29) |
Jun
(25) |
Jul
(116) |
Aug
(24) |
Sep
(38) |
Oct
(128) |
Nov
(199) |
Dec
(210) |
2009 |
Jan
(178) |
Feb
(376) |
Mar
(418) |
Apr
(768) |
May
(828) |
Jun
(324) |
Jul
(280) |
Aug
(434) |
Sep
(214) |
Oct
(125) |
Nov
(154) |
Dec
(165) |
2010 |
Jan
(96) |
Feb
(63) |
Mar
(113) |
Apr
(150) |
May
(48) |
Jun
(170) |
Jul
(83) |
Aug
(196) |
Sep
(90) |
Oct
(100) |
Nov
(198) |
Dec
(152) |
2011 |
Jan
(165) |
Feb
(131) |
Mar
(223) |
Apr
(79) |
May
(134) |
Jun
(144) |
Jul
(107) |
Aug
(108) |
Sep
(61) |
Oct
(164) |
Nov
(70) |
Dec
(65) |
2012 |
Jan
(100) |
Feb
(92) |
Mar
(223) |
Apr
(126) |
May
(83) |
Jun
(150) |
Jul
(55) |
Aug
(13) |
Sep
(28) |
Oct
(73) |
Nov
(74) |
Dec
(129) |
2013 |
Jan
(105) |
Feb
(72) |
Mar
(21) |
Apr
(64) |
May
(101) |
Jun
(46) |
Jul
(26) |
Aug
(4) |
Sep
(1) |
Oct
(44) |
Nov
(60) |
Dec
(48) |
2014 |
Jan
(73) |
Feb
(31) |
Mar
(12) |
Apr
(20) |
May
(33) |
Jun
(72) |
Jul
(17) |
Aug
(12) |
Sep
(12) |
Oct
(15) |
Nov
(24) |
Dec
(94) |
2015 |
Jan
(146) |
Feb
(103) |
Mar
(91) |
Apr
(65) |
May
(23) |
Jun
(46) |
Jul
(49) |
Aug
(23) |
Sep
(20) |
Oct
(21) |
Nov
(42) |
Dec
(70) |
2016 |
Jan
(43) |
Feb
(90) |
Mar
(89) |
Apr
(37) |
May
(58) |
Jun
(103) |
Jul
(90) |
Aug
(37) |
Sep
(55) |
Oct
(57) |
Nov
(50) |
Dec
(42) |
2017 |
Jan
(42) |
Feb
(77) |
Mar
(26) |
Apr
(18) |
May
(49) |
Jun
(48) |
Jul
(36) |
Aug
(25) |
Sep
(41) |
Oct
(21) |
Nov
(45) |
Dec
(21) |
2018 |
Jan
(14) |
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
1
(5) |
2
(6) |
3
(16) |
4
(12) |
5
(3) |
6
|
7
|
8
(2) |
9
(9) |
10
(2) |
11
(5) |
12
(5) |
13
|
14
|
15
(21) |
16
(24) |
17
(24) |
18
(13) |
19
(12) |
20
(3) |
21
(8) |
22
(49) |
23
(43) |
24
(19) |
25
(10) |
26
(19) |
27
(3) |
28
(1) |
29
(1) |
30
(9) |
|
|
|
|
From: <mcoudert@us...> - 2009-06-09 15:32:40
|
Revision: 4229 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=4229&view=rev Author: mcoudert Date: 2009-06-09 15:32:33 +0000 (Tue, 09 Jun 2009) Log Message: ----------- Modified xlink management (first draft). Main improvements are : Handle multiple xlinks, switch Modalbox to Ext window, GUI. Modified Paths: -------------- sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/kernel/DataManager.java sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/kernel/EditLib.java sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/services/metadata/AddXLink.java sandbox/GeoSource/GeoNetwork/web/geonetwork/css/geosource.css sandbox/GeoSource/GeoNetwork/web/geonetwork/loc/fr/xml/strings.xml sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/header.xsl sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/metadata-edit.xsl sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/metadata-utils.xsl sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/metadata.xsl sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/thesaurus/thesaurus-autosearchlist.xsl sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/thesaurus/thesaurus-util.xsl Added Paths: ----------- sandbox/GeoSource/GeoNetwork/web/geonetwork/images/geosource/spinner.gif sandbox/GeoSource/GeoNetwork/web/geonetwork/scripts/ed.js Modified: sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/kernel/DataManager.java =================================================================== --- sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/kernel/DataManager.java 2009-06-09 15:28:34 UTC (rev 4228) +++ sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/kernel/DataManager.java 2009-06-09 15:32:33 UTC (rev 4229) @@ -1413,8 +1413,9 @@ * * TODO : add simple XLink att */ - public synchronized boolean addXLinkForElement(Dbms dbms, String id, - String ref, String classOf, String name, XLink xl, String currVersion) throws Exception { + public synchronized boolean addXLinkForElement(Dbms dbms, String id, String ref, String name, + XLink xl, String currVersion) throws Exception + { Element md = XmlSerializer.select(dbms, "Metadata", id); // --- check if the metadata has been deleted @@ -1439,7 +1440,7 @@ // FIXME is schema needed ? String schema = getMetadataSchema(dbms, id); - Element child = editLib.addXLinkedElement(schema, el, classOf, name, xl); + Element child = editLib.addXLinkedElement(schema, el, name, xl); md = updateFixedInfo(schema, id, md, dbms); XmlSerializer.update(dbms, id, md); Modified: sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/kernel/EditLib.java =================================================================== --- sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/kernel/EditLib.java 2009-06-09 15:28:34 UTC (rev 4228) +++ sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/kernel/EditLib.java 2009-06-09 15:32:33 UTC (rev 4229) @@ -201,22 +201,22 @@ return el; } - public Element addXLinkedElement(String schema, Element el, String classOf, String qname, XLink xl) throws Exception + public Element addXLinkedElement(String schema, Element el, String qname, XLink xl) throws Exception { String name = getUnqualifiedName(qname); String ns = getNamespace(qname, el, getSchema(schema)); - String childName = getUnqualifiedName(classOf); - String childNs = getNamespace(classOf, el, getSchema(schema)); +// String childName = getUnqualifiedName(classOf); +// String childNs = getNamespace(classOf, el, getSchema(schema)); String prefix = getPrefix(qname); - String childPrefix = getPrefix(classOf); +// String childPrefix = getPrefix(classOf); String parentName = getParentNameFromChild(el); Element root = new Element(name, prefix, ns); - Element child = new Element(childName, childPrefix, childNs); - child.setAttribute(XLink.HREF, xl.getHref(), XLink.NAMESPACE_XLINK); - child.setAttribute(XLink.TITLE, xl.getTitle(), XLink.NAMESPACE_XLINK); - child.setAttribute(XLink.ROLE, xl.getRole(), XLink.NAMESPACE_XLINK); - root.addContent(child); +// Element child = new Element(childName, childPrefix, childNs); + root.setAttribute(XLink.HREF, xl.getHref(), XLink.NAMESPACE_XLINK); + root.setAttribute(XLink.TITLE, xl.getTitle(), XLink.NAMESPACE_XLINK); + root.setAttribute(XLink.ROLE, xl.getRole(), XLink.NAMESPACE_XLINK); +// root.addContent(child); MetadataSchema mdSchema = getSchema(schema); String typeName = mdSchema.getElementType(el.getQualifiedName(), parentName); @@ -251,7 +251,7 @@ //--- add mandatory sub-tags //fillElement(mdSchema, mdSugg, el, child); - return child; + return root; } Modified: sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/services/metadata/AddXLink.java =================================================================== --- sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/services/metadata/AddXLink.java 2009-06-09 15:28:34 UTC (rev 4228) +++ sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/services/metadata/AddXLink.java 2009-06-09 15:32:33 UTC (rev 4229) @@ -82,11 +82,13 @@ String id = Util.getParam(params, Params.ID); String ref = Util.getParam(params, Params.REF); - String classOf = Util.getParam(params, Params.CLASS); +// String classOf = Util.getParam(params, Params.CLASS); String name = Util.getParam(params, Params.NAME); - String href = Util.getParam(params, Params.HREF); - String title = Util.getParam(params, Params.TITLE); - String role = Util.getParam(params, Params.ROLE); + String href = Util.getParam(params, Params.HREF, ""); + + String title = Util.getParam(params, Params.TITLE, ""); + String role = Util.getParam(params, Params.ROLE, "pointOfContact"); + String version = Util.getParam(params, Params.VERSION); @@ -94,9 +96,31 @@ // TODO : check resource exist ? // TODO : create a XLink Class in Jeeves - if (!href.equals("")) - if (!dataMan.addXLinkForElement(dbms, id, ref, classOf, name, new XLink (href.replace("&", "&").replace("#", "%23"), title, role), version)) - throw new Exception(id); + if (!href.equals("")) { + if (!dataMan.addXLinkForElement(dbms, id, ref, name, + new XLink (href.replace("&", "&").replace("#", "%23"), title, role), version)) + throw new Exception(id); + } + + //--- Add all element starting with prefix href_ if exist. + // Gui only available for keywords. + List<Element> list = params.getChildren(); + for (Element el : list) { + if (el.getName().startsWith("href_")) { + String link = Util.getParam(params, el.getName(), ""); + + if (!link.equals("")) { + //--- add metadata locales in order to retrieve keywords needed + // by the metadata record. + String locales = Util.getParam(params, "keyword.locales", ""); + if (!locales.equals("")) + link += "&locales=" + locales; + + if (!dataMan.addXLinkForElement(dbms, id, ref, name, new XLink (link, "", role), version)) + throw new Exception(id); + } + } + } Element elResp = new Element(Jeeves.Elem.RESPONSE); elResp.addContent(new Element(Geonet.Elem.ID).setText(id)); Modified: sandbox/GeoSource/GeoNetwork/web/geonetwork/css/geosource.css =================================================================== --- sandbox/GeoSource/GeoNetwork/web/geonetwork/css/geosource.css 2009-06-09 15:28:34 UTC (rev 4228) +++ sandbox/GeoSource/GeoNetwork/web/geonetwork/css/geosource.css 2009-06-09 15:32:33 UTC (rev 4229) @@ -728,11 +728,33 @@ Ajax Keyword list *******************************************************************************/ +div.keywordSelectorFrame { + background: #fff; + position: absolute; + margin: 2px; + padding: 2px; + left: 300px; + top: 225px; +} + +div.keywordSelector { + background: #fff; + border: 4px solid #064377; + margin: 2px; + padding: 5px; + cursor: pointer; + overflow: auto; + max-height: 200px; + max-width: 300px; +} + div.keywordList { + z-index: 1000; background: #fff; cursor: pointer; overflow: auto; - max-height: 300px; + max-height: 200px; + overflow: hidden; } @@ -743,18 +765,20 @@ width: 100%; list-style-type: circle; cursor: pointer; - overflow: hidden; } div.keywordList ul li { margin: 0; padding: 1px; cursor: pointer; - list-style-type:none; + list-style-type:none; } +div.keywordList ul li * { +} + div.keywordList ul li.selected { - background-color: #beb800; + background-color: #beb800; /* #dfe8f6; */ cursor: pointer; } @@ -766,22 +790,43 @@ } div.keywordList ul li span { - display :none; + display :none; } div.keywordResults ul { margin: 3px; padding: 0; - border-style:dashed; - border-width:1px 0px 0px 1px; - list-style-type:none; + border-style:dashed; + border-width:1px 0px 0px 1px; + list-style-type:none; } div.keywordResults ul li { margin: 4px; - list-style-type:none; + list-style-type:none; } +/* OLD GEOSOURCE THESAURUS + +div.keywordList { + background: #fff; + cursor: pointer; + overflow: auto; + max-height: 300px; +} + + +div.keywordList ul { + border: 1px solid #888; + margin: 0; + padding: 0; + width: 100%; + list-style-type: circle; + cursor: pointer; + overflow: hidden; +} +*/ + div.legend { margin: 3px; padding: 3px; Added: sandbox/GeoSource/GeoNetwork/web/geonetwork/images/geosource/spinner.gif =================================================================== (Binary files differ) Property changes on: sandbox/GeoSource/GeoNetwork/web/geonetwork/images/geosource/spinner.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: sandbox/GeoSource/GeoNetwork/web/geonetwork/loc/fr/xml/strings.xml =================================================================== --- sandbox/GeoSource/GeoNetwork/web/geonetwork/loc/fr/xml/strings.xml 2009-06-09 15:28:34 UTC (rev 4228) +++ sandbox/GeoSource/GeoNetwork/web/geonetwork/loc/fr/xml/strings.xml 2009-06-09 15:32:33 UTC (rev 4229) @@ -95,6 +95,7 @@ <addAsXLink>Ajouter un nouvel élément lié</addAsXLink> <xlink>Rechercher un élément :</xlink> <xlink.contact>Un contact :</xlink.contact> + <xlink.contact.action>Ajouter cet élément à la fiche de métadonnée</xlink.contact.action> <xlink.keyword>Un mot-clé :</xlink.keyword> <xlink.crs>Un système de coordonnée :</xlink.crs> <xlink.info></xlink.info> Added: sandbox/GeoSource/GeoNetwork/web/geonetwork/scripts/ed.js =================================================================== --- sandbox/GeoSource/GeoNetwork/web/geonetwork/scripts/ed.js (rev 0) +++ sandbox/GeoSource/GeoNetwork/web/geonetwork/scripts/ed.js 2009-06-09 15:32:33 UTC (rev 4229) @@ -0,0 +1,341 @@ +/** + * Editor helper + */ + +var dialogRequest = { + action: '', + ref: '', + name: '', + id: '' +}; + +/** + * Popup for searching contact, keywords, crs elements and add the + * xlink element to the metadata. This will set up an autocompletion + * list on search action. + */ +function popXLink (action, ref, name, id){ + /** + * Display popup according to ref element. + * Contact could be gmd:pointOfContact, gmd:contact, ... + */ + if (name.toUpperCase().indexOf("CONTACT") != -1 || + name.toUpperCase().indexOf("PARTY") != -1) { + mode = "CONTACT"; + contactInit(); + } else if (name.toUpperCase().indexOf("KEYWORD") != -1) { + /** + * Keywords allow selection of a keyword in + * a thesaurus registered in the catalogue. + */ + mode = "KEYWORD"; + keywordInit(); + } else { + /** + * Extents allow selection of a geotag. + * + */ + mode = "CRS"; + crsInit(); + + } +} + + +/** + * Contacts allow search in the contact directory + * and selection of a role for the contact. + */ +function contactInit () { + $("xlink.contact").style.display = "block"; + $("contact.role").selectedIndex = 0; + $("_xlinkedContact").value = ""; + + var _acc = new Ajax.Autocompleter('_xlinkedContact', + '_xlinkedContactList', + 'contacts.search?ref=all&mode=text/html/li&type=contains', + { + method:'get', + paramName: 'name', + indicator:'xlink.indicator', + afterUpdateElement: updateXLink + } + ); +} + +/** + * Keywords allow search in the thesaurus directory + */ +function keywordInit () { + $("xlink.keyword").style.display = "block"; + + // insert divs for the text field and button + Ext.DomHelper.insertFirst("popXLink", { + tag: "div", id: "pop-kw", children: [ + {tag: "div", id: "pop-kw-txt", style: "float:left;margin-right:3px;"}, + {tag: "div", id: "pop-kw-btn"}, + {tag: "div", style: "clear:left;"} + ] + }); + + // insert text field + var tf = new Ext.form.TextField({ + id: "pop-kw-txt", + renderTo: "pop-kw-txt", + fieldLabel: translateStrings("xlink.keywords") + }); + + // insert button + new Ext.Button({ + text: translateStrings("search"), + id: "pop-kw-btn", + renderTo: "pop-kw-btn", + handler: function() { + Ext.Ajax.request({ + url: "xml.search.keywords", + method: "GET", + params: { + "pNewSearch": "true", + "pTypeSearch": "1", + "pMode": "searchCheckbox", + "pKeyword": tf.getValue() + }, + success: function(response) { + // FIXME ??? + // var el = Ext.get("keywordList").select(".href"); + // if (el) { + // el.remove(); + // } + + // Clean keywords result list + $('keywordList').innerHTML = "" + + var txt = response.responseText; + + if (txt && txt.length > 0) { + Ext.DomHelper.append("keywordList", response.responseText); + } + }, + failure: function() { + alert(translateStrings("ajaxRequestFailed")); + } + }); + } + }); +} + +/** + * Format allow search in the format table + */ +function crsInit () { + $("xlink.crs").style.display = "block"; + + $("_xlinkedCRS").value = ""; +} + +function displayXLinkSearchBox (action, ref, name, id){ + // Clean href element on each popup init in order + // to avoid mix of elements. + document.mainForm.href.value = ""; + + // store the variables of the request for use by the Create button + dialogRequest.action = action; + dialogRequest.ref = ref; + dialogRequest.name = name; + dialogRequest.id = id; + + // Hide all form contents + var optionalFields = ['xlink.contact', 'xlink.crs', 'xlink.keyword']; + optionalFields.each(function(id) { + $(id).style.display = 'none'; + }); + + // Clean keywords result list + $('keywordList').innerHTML = ''; + + displayModalBox('popXLink', translateStrings('searchElements')); + + popXLink (action, ref, name, id); + + document.mainForm.ref.value = ref; + document.mainForm.name.value = name; + + /* + * Old ajax autocompleter + + var _acp = new Ajax.Autocompleter('_xlinkedCRS', + '_xlinkedList', + 'crs.search?mode=text/html/li&', + { + method:'get', + paramName: 'any', + afterUpdateElement: updateXLink + } + ); + + //return false; + */ +} + +var modalBox; + +function displayModalBox(contentDivId, boxTitle) { +/* + var el; + el = Ext.get("popXLink").first("#xlink-s"); + if (!el) { + Ext.DomHelper.insertFirst("popXLink", { + tag: "input", id: "xlink-s", value: "" + }); + } +*/ + el = Ext.get("pop-kw"); + if (el) { + el.remove(); + } + el = Ext.get("mainForm").select(".href"); + if (el) { + el.remove(); + } + + $(contentDivId).style.display = 'block'; + if (!modalBox) { + modalBox = new Ext.Window({ + title: boxTitle, + id: "modalwindow", + layout: 'fit', + modal: true, + constrain: true, + autoScroll: true, + iconCls: 'searchIcon', + //width: 200, + //height: 150, + closeAction: 'hide', + listeners: { + hide: function() { + $(contentDivId).style.display = 'none'; + } + }, + contentEl: contentDivId + }); + } + + if (modalBox) { + modalBox.show(); + modalBox.setHeight(400); + modalBox.setTitle(boxTitle); + modalBox.setWidth(Ext.get(contentDivId).getWidth()+14); + modalBox.center(); + } + +} + + +/** +* ModalBox for searching metadata used for linking +* dataset and service +*/ +function displaySearchBox (type, boxTitle, ref){ + if (type=="service") { + $('mdsButton').style.display = 'block'; + $('createService').style.display = 'block'; + } else { + $('mdsButton').style.display = 'none'; + $('createService').style.display = 'none'; + } + + if (type=="dataset") + $('createDataset').style.display = 'block'; + else + $('createDataset').style.display = 'none'; + + Modalbox.show($('popSearcher'), + {title:boxTitle, + width:'500', + height:'350', + overlayClose:false}); + + initSearcher (type); + + if (type=="dataset" || type=="parentIdentifier") + GNSearcher.target = ref; + + return false; +} + +/* + * GeoNetwork searcher Class + */ +var GNSearcher; + +function initSearcher(type) { + var defaultParams = null; + if (type=="serviceTpl") + defaultParams = { + type: "service", + template:"y", + output: "simpleList" + }; + else if (type=="service") + defaultParams = { + any: "", + type: "service", + template:"n", + output: "simpleService" + }; + else + defaultParams = { + any: "", + type: "dataset", // search only for datasets by default + output: "simpleUuid" + }; + GNSearcher = new GeoNetworkSearcher ("catResults", defaultParams, "popSearcher"); +} + + +/* + * Event for OnLineSrc information + */ +function eventOnlineSrcLinkage (event) { + var ele = null; + if (event.srcElement) + ele = event.srcElement; + else + ele = event.element(); + + initOnlineSrc (parseInt (ele.id.replace ('_', '')) + 2); +} + +function eventOnlineSrcLinkagePopup (event) { + var element = null; + if (event.srcElement) + element = event.srcElement; + else + element = event.element(); + var ref = parseInt (element.id.replace ('_', '')) + 2; + popUpload(ref, event); +} + +/* + * Init OnlineSrc block to set user interaction + */ +function initOnlineSrc (ref) { + + // Get elements (protocol, linkage) info based on OnLineSrc tree + var protocolId = "_" + parseInt (ref); + var linkageId = "_" + parseInt (ref - 2); + + var protocol = $(protocolId).value; + var linkage = $(linkageId).value; + + // Register events + // $(linkageId).observe('change', eventOnlineSrcLinkage); + + // Register conditional events + // Popup for document upload FIXME : should not be active for FTP ? + if (protocol.indexOf ('WWW:DOWNLOAD-') != -1) { + $(linkageId).observe('focus', eventOnlineSrcLinkagePopup); + } else { + $(linkageId).stopObserving('focus', eventOnlineSrcLinkagePopup); + } +} \ No newline at end of file Modified: sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/header.xsl =================================================================== --- sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/header.xsl 2009-06-09 15:28:34 UTC (rev 4228) +++ sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/header.xsl 2009-06-09 15:32:33 UTC (rev 4229) @@ -68,9 +68,20 @@ runAdvancedSearch(); } }; - </xsl:if> - - + </xsl:if> + + var strings = { + <xsl:for-each select="/root/gui/strings/*[@mode='js']"> + "<xsl:value-of select="name(.)"/>":"<xsl:value-of select="normalize-space(translate(.,'"', '`'))"/>" + <xsl:if test="position()!=last()">,</xsl:if> + </xsl:for-each> + }; + + + function translateStrings(text) { + return strings[text] || text; + } + </script> </xsl:template> Modified: sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/metadata-edit.xsl =================================================================== --- sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/metadata-edit.xsl 2009-06-09 15:28:34 UTC (rev 4228) +++ sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/metadata-edit.xsl 2009-06-09 15:32:33 UTC (rev 4229) @@ -13,7 +13,8 @@ --> <xsl:template mode="script" match="/"> <script type="text/javascript" src="{/root/gui/url}/scripts/prototype.js"></script> - <script type="text/javascript" src="{/root/gui/url}/scripts/scriptaculous/scriptaculous.js?load=slider,effects,controls"/> + <script type="text/javascript" src="{/root/gui/url}/scripts/ed.js"></script> + <script type="text/javascript" src="{/root/gui/url}/scripts/scriptaculous/scriptaculous.js?load=slider,effects,controls"/> <script type="text/javascript" src="{/root/gui/url}/scripts/modalbox.js"></script> <style type="text/css">@import url(<xsl:value-of select="/root/gui/url"/>/scripts/calendar/calendar-blue2.css);</style> <script type="text/javascript" src="{/root/gui/url}/scripts/calendar/calendar.js"></script> @@ -21,6 +22,13 @@ <script type="text/javascript" src="{/root/gui/url}/scripts/calendar/calendar-setup.js"></script> <script type="text/javascript" src="{/root/gui/url}/scripts/core/kernel/kernel.js"/> <script type="text/javascript" src="{/root/gui/url}/scripts/editor/tooltip-manager.js"></script> + + <script type="text/javascript" src="{/root/gui/url}/scripts/extjs/ext-base.js"></script> + <script type="text/javascript" src="{/root/gui/url}/scripts/extjs/ext-all.js"/> + <script type="text/javascript" src="{/root/gui/url}/scripts/extjs/Ext.ux.grid.CellActions.js"/> + <link rel="stylesheet" type="text/css" href="{/root/gui/url}/grid.css"/> + <link rel="stylesheet" type="text/css" href="{/root/gui/url}/scripts/extjs/resources/css/ext-all.css" /> + <script language="JavaScript1.2" type="text/javascript"> var labelWms = "<xsl:value-of select="/root/gui/strings/interactiveMap"/>"; var labelKml = "<xsl:value-of select="/root/gui/strings/viewInGE"/>"; @@ -34,101 +42,6 @@ timeId = setTimeout('scrollIt()',500); } - - /* - * OGCService Interaction - */ - function OGCService () { - - this.getCapabilities = function (type, url, version) { - alert (type + "-" + url); - // TODO - } - } - - var wms = new OGCService (); - - function setBunload (bool){ - return bool; - } - - /* - * GeoNetwork searcher Class - */ - var GNSearcher; - - function initSearcher(type) { - var defaultParams = null; - if (type=="serviceTpl") - defaultParams = { - type: "service", - template:"y", - output: "simpleList" - }; - else if (type=="service") - defaultParams = { - any: "", - type: "service", - template:"n", - output: "simpleService" - }; - else - defaultParams = { - any: "", - type: "dataset", // search only for datasets by default - output: "simpleUuid" - }; - GNSearcher = new GeoNetworkSearcher ("catResults", defaultParams, "popSearcher"); - } - - - /* - * Event for OnLineSrc information - */ - function eventOnlineSrcLinkage (event) { - var ele = null; - if (event.srcElement) - ele = event.srcElement; - else - ele = event.element(); - - initOnlineSrc (parseInt (ele.id.replace ('_', '')) + 2); - } - - function eventOnlineSrcLinkagePopup (event) { - var element = null; - if (event.srcElement) - element = event.srcElement; - else - element = event.element(); - var ref = parseInt (element.id.replace ('_', '')) + 2; - popUpload(ref, event); - } - - /* - * Init OnlineSrc block to set user interaction - */ - function initOnlineSrc (ref) { - - // Get elements (protocol, linkage) info based on OnLineSrc tree - var protocolId = "_" + parseInt (ref); - var linkageId = "_" + parseInt (ref - 2); - - var protocol = $(protocolId).value; - var linkage = $(linkageId).value; - - // Register events - // $(linkageId).observe('change', eventOnlineSrcLinkage); - - // Register conditional events - // Popup for document upload FIXME : should not be active for FTP ? - if (protocol.indexOf ('WWW:DOWNLOAD-') != -1) { - $(linkageId).observe('focus', eventOnlineSrcLinkagePopup); - } else { - $(linkageId).stopObserving('focus', eventOnlineSrcLinkagePopup); - } - } - ]]> /* @@ -176,21 +89,43 @@ } } - - - function initKeyword (ref) { - var __ac = new Ajax.Autocompleter('_' + ref, - 'keywordList', - 'xml.search.keywords?pNewSearch=true&pTypeSearch=1&pMode=search', - { - method:'get', - paramName: 'pKeyword' - } - ); + // Update XLink on item selected + function updateXLink (text, li) { + if (li != null) { + $('xlink.title').value = li.innerHTML; + $('href').value = li.getAttribute('xlink'); + $('xlink.hrefcontact').value = li.getAttribute('xlink'); + } + + name = document.mainForm.name.value; + if (name == 'gmd:contact' || name == 'gmd:citedResponsibleParty' || name == 'gmd:pointOfContact' || name == 'gmd:distributorContact') + $('href').value = $('xlink.hrefcontact').value + $('contact.role').value; } + function submitXLink () { + + // Move xlink element to mainForm before submit + var el = Ext.get("keywordList").select("input.href"); + + var hiddenFormElements = Ext.get("hiddenFormElements"); + el.each(function(item) { hiddenFormElements.insertFirst(item); }); + + // Check xlink exist + // FIXME : should check only non empty one and selected + if (($('href') == undefined || $('href').value == '') && + ($('href_1') == undefined || $('href_1').value == '')) { + alert("<xsl:value-of select="/root/gui/strings/noXlink"/>"); + return; + } + + // Submit form + doAction('metadata.xlink.add'); + + if (modalBox) { + modalBox.hide(); + } + } - // findPos comes from http://www.quirksmode.org // prototype 1.6 will make findPos redundant function findPos(obj) { @@ -440,7 +375,7 @@ } else { $("popXLink").style.display = "none"; - if ($('xlink.href').value == "") { + if ($('href').value == "") { alert ('Missing URL'); return; } @@ -518,121 +453,6 @@ document.uploadForm.target.value = target; } - /** - * Popup for searching contact, keywords, crs elements - * and add the xlink element to the metadata - */ - function popXLink (action, ref, name, id, event){ - if (!poped(event.element(), $("popXLink"))) - return; - - document.mainForm.ref.value = ref; - document.mainForm.name.value = name; - - // Display input element according to selected name - $('xlink.contact').style.display = 'none'; - $('xlink.crs').style.display = 'none'; - $('xlink.keyword').style.display = 'none'; - - if (name == 'gmd:contact' || name == 'gmd:citedResponsibleParty' || name == 'gmd:pointOfContact' || name == 'gmd:distributorContact') - $('xlink.contact').style.display = 'block'; - else if (name == 'gmd:referenceSystemInfo') - $('xlink.crs').style.display = 'block'; - else if (name == 'gmd:descriptiveKeywords') - $('xlink.keyword').style.display = 'block'; - - } - function displayXLinkSearchBox (action, ref, name, id){ - document.mainForm.ref.value = ref; - document.mainForm.name.value = name; - - Modalbox.show($('popXLink'), - {title:'Recherche un élément', - width:'500', - height:'350', - overlayClose:false}); - - // Display input element according to selected name - $('xlink.contact').style.display = 'none'; - $('xlink.crs').style.display = 'none'; - $('xlink.keyword').style.display = 'none'; - - if (name == 'gmd:contact' || name == 'gmd:citedResponsibleParty' || name == 'gmd:pointOfContact' || name == 'gmd:distributorContact') - $('xlink.contact').style.display = 'block'; - else if (name == 'gmd:referenceSystemInfo') - $('xlink.crs').style.display = 'block'; - else if (name == 'gmd:descriptiveKeywords') - $('xlink.keyword').style.display = 'block'; - - - // Init autocompleter - var _ack = new Ajax.Autocompleter('_xlinkedKeyword', - '_xlinkedList', - 'xml.search.keywords?pNewSearch=true&pTypeSearch=1&pMode=search', - { - method:'get', - paramName: 'pKeyword', - minChars:3, - afterUpdateElement: updateXLink - } - ); - var _acc = new Ajax.Autocompleter('_xlinkedContact', - '_xlinkedList', - 'contacts.search?ref=all&mode=text/html/li&type=contains', - { - method:'get', - paramName: 'name', - afterUpdateElement: updateXLink - } - ); - var _acp = new Ajax.Autocompleter('_xlinkedCRS', - '_xlinkedList', - 'crs.search?mode=text/html/li&', - { - method:'get', - paramName: 'any', - afterUpdateElement: updateXLink - } - ); - - //return false; - } - - - /** - * ModalBox for searching metadata used for linking - * dataset and service - */ - function displaySearchBox (type, boxTitle, ref){ - if (type=="service") { - $('mdsButton').style.display = 'block'; - $('createService').style.display = 'block'; - } else { - $('mdsButton').style.display = 'none'; - $('createService').style.display = 'none'; - } - - if (type=="dataset") - $('createDataset').style.display = 'block'; - else - $('createDataset').style.display = 'none'; - - Modalbox.show($('popSearcher'), - {title:boxTitle, - width:'500', - height:'350', - overlayClose:false}); - - initSearcher (type); - - if (type=="dataset" || type=="parentIdentifier") - GNSearcher.target = ref; - - return false; - } - - - //function doFileUploadAction(action, ref, fname, access, id) function doFileUploadAction() { @@ -819,80 +639,66 @@ <xsl:template name="xlinkSelector"> - <div id="popXLink" name="popXLink" style="display:none;"> - <fieldset> - <input type="hidden" id="xlink.type" name="type" value="simple"/> - <input type="hidden" id="xlink.show" name="show" value="embed"/> - <input type="hidden" id="xlink.role" name="role" value="embed"/> - <input type="hidden" id="xlink.title" name="title" value=""/> - <input type="hidden" id="xlink.href" name="href" value=""/> - <input type="hidden" id="xlink.hrefcontact" name="hrefcontact" value=""/> + + <div id="popXLink" name="popXLink" style="display:none;width:460px;padding:10px"> + - <div id="xlink.contact"> - <xsl:value-of select="/root/gui/strings/xlink.contact"/><input type="text" size="30" id="_xlinkedContact"/><br/> - <xsl:value-of select="/root/gui/strings/contactRole"/> - <select name="contact.role" id="contact.role" onChange="updateXLink('update', null);"> - <xsl:for-each select="/root/gui/iso19139/codelist[@name='gmd:CI_RoleCode']/entry"> - <xsl:sort select="label" order="ascending"/> - <option value="{code}"> - <xsl:value-of select="label"/> - </option> - </xsl:for-each> - </select> - </div> - <div id="xlink.crs"> - <xsl:value-of select="/root/gui/strings/xlink.crs"/><input type="text" size="30" id="_xlinkedCRS"/> - </div> - <div id="xlink.keyword"> - <xsl:value-of select="/root/gui/strings/xlink.keywords"/><input type="text" size="30" id="_xlinkedKeyword"/> - </div> - <div id='_xlinkedList' class="keywordList" ></div> - - <script language="JavaScript1.2" type="text/javascript"> - // Update XLink on item selected - function updateXLink (text, li) { - - if (li != null) { - $('xlink.title').value = li.innerHTML; - $('xlink.href').value = li.getAttribute('xlink'); - $('xlink.hrefcontact').value = li.getAttribute('xlink'); - } - - name = document.mainForm.name.value; - if (name == 'gmd:contact' || name == 'gmd:citedResponsibleParty' || name == 'gmd:pointOfContact' || name == 'gmd:distributorContact') - $('xlink.href').value = $('xlink.hrefcontact').value + $('contact.role').value; - } - - function submitXLink () { - if ($('xlink.href').value=='') { - alert ("<xsl:value-of select="/root/gui/strings/noXlink"/>"); - return; - } - - doNewElementAction('metadata.xlink.add?title='+ $('xlink.title').value+'&role='+ $('xlink.role').value+'&href=' + $('xlink.href').value, - document.mainForm.ref.value, - document.mainForm.name.value, - document.mainForm.id.value); - - $('xlink.title').value = ''; - $('xlink.href').value = ''; - $('_xlinkedKeyword').value = ''; - $('_xlinkedContact').value = ''; - $('_xlinkedCRS').value = ''; - - Modalbox.hide(); - } - - - </script> - - <button onClick="submitXLink();"><xsl:value-of select="/root/gui/strings/add"/></button> -<!-- - <div class="important"> - <xsl:copy-of select="/root/gui/strings/xlink.info"/> - </div> --> - - </fieldset> + <div id="xlink.contact"> + <xsl:value-of select="/root/gui/strings/xlink.contact"/><br/> + <input type="text" size="30" id="_xlinkedContact"/> + <span id="xlink.indicator" style="display: none"> + <img src="../../images/geosource/spinner.gif" alt="{/root/gui/strings/searching}" title="{/root/gui/strings/searching}"/> + </span> + <div id="_xlinkedContactList" class="keywordList"/> + <br/><br/> + <!-- FIXME MCT : Should we keep the role list here?? How to handle role already defined in contacts ?? --> + <xsl:value-of select="/root/gui/strings/contactRole"/> + <select name="contact.role" id="contact.role" onChange="updateXLink('update', null);"> <!-- " --> + <xsl:for-each select="/root/gui/iso19139/codelist[@name='gmd:CI_RoleCode']/entry"> + <xsl:sort select="label" order="ascending"/> + <option value="{code}"> + <xsl:value-of select="label"/> + </option> + </xsl:for-each> + </select> + <br/><br/> + <xsl:value-of select="/root/gui/strings/xlink.contact.action"/><br/> + </div> + + <div id="xlink.crs"> + <xsl:value-of select="/root/gui/strings/xlink.crs"/> + <input type="text" size="30" id="_xlinkedCRS"/> + <span id="xlink.indicator" style="display: none"> + <img src="../../images/geosource/spinner.gif" alt="{/root/gui/strings/searching}" title="{/root/gui/strings/searching}"/> + </span> + <!-- Autocompletion list --> + <!-- TODO / FIXME MCT --> + </div> + + <div id="xlink.keyword"> + <!-- + <xsl:value-of select="/root/gui/strings/xlink.keywords"/> + <input type="text" size="30" id="_xlinkedKeyword"/> + --> + <span id="xlink.indicator" style="display: none"> + <img src="../../images/geosource/spinner.gif" alt="{/root/gui/strings/searching}" title="{/root/gui/strings/searching}"/> + </span> + <!-- Div which contains keyword list. --> + <div id='keywordList' style="padding:2px;margin:2px;"/> + </div> + + <!-- <div id='_xlinkedList' class="keywordList" /> --> + + <button onClick="submitXLink();"><xsl:value-of select="/root/gui/strings/add"/></button> + <!-- FIXME MCT : Should we add a create button here ? Or add always create a new one ? --> + + + <!-- + <div class="important"> + <xsl:copy-of select="/root/gui/strings/xlink.info"/> + </div> + --> + </div> </xsl:template> Modified: sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/metadata-utils.xsl =================================================================== --- sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/metadata-utils.xsl 2009-06-09 15:28:34 UTC (rev 4228) +++ sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/metadata-utils.xsl 2009-06-09 15:32:33 UTC (rev 4229) @@ -531,10 +531,23 @@ <input type="hidden" name="position" value="{/root/gui/position}"/> <input type="hidden" name="related" value="{/root/request/id}"/> <input type="hidden" name="context" id="context" value="{/root/gui/locService}"/> <!-- Use for contact editing --> + <!-- Use for metadata for service --> <input type="hidden" name="srvIds" id="srvIds"/> <input type="hidden" name="upMdd" id="upMdd"/> + <!-- Use for adding xlink --> + <input type="hidden" id="xlink.schema" name="schema" value="{geonet:info/schema}"/> + <input type="hidden" id="xlink.type" name="type" value="simple"/> + <input type="hidden" id="xlink.show" name="show" value="embed"/> + <input type="hidden" id="xlink.role" name="role" value=""/> + <input type="hidden" id="xlink.title" name="title" value=""/> + <input type="hidden" id="href" name="href" value=""/> + <input type="hidden" id="xlink.hrefcontact" name="hrefcontact" value=""/> + + <!-- Hidden div to contains extra elements like when posting multiple keywords. --> + <div id="hiddenFormElements" style="display:none;"/> + <xsl:choose> <xsl:when test="$currTab='xml'"> <table class="md" width="100%"> Modified: sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/metadata.xsl =================================================================== --- sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/metadata.xsl 2009-06-09 15:28:34 UTC (rev 4228) +++ sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/metadata.xsl 2009-06-09 15:32:33 UTC (rev 4229) @@ -985,7 +985,10 @@ </xsl:if> </input> - <div id='keywordList' class="keywordList" ></div> + <!-- + FIXME : remove this div or not? / eg. geocat + <div id='keywordList' class="keywordList" /> + --> </xsl:when> <xsl:otherwise> Modified: sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/thesaurus/thesaurus-autosearchlist.xsl =================================================================== --- sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/thesaurus/thesaurus-autosearchlist.xsl 2009-06-09 15:28:34 UTC (rev 4228) +++ sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/thesaurus/thesaurus-autosearchlist.xsl 2009-06-09 15:32:33 UTC (rev 4229) @@ -5,17 +5,37 @@ <xsl:include href="thesaurus-util.xsl"/> <xsl:template match="/"> - <ul> - <xsl:for-each select="/root/response/descKeys/keyword"> - <xsl:call-template name="keywordRow"> - <xsl:with-param name="keyword" select="."/> - <xsl:with-param name="mode" select="/root/request/pMode"/> - <xsl:with-param name="thesaurus" select="/root/request/thesaurus"/> - <xsl:with-param name="url" select="/root/gui/url"/> - <xsl:with-param name="depth" select="/root/request/level"/> - </xsl:call-template> - </xsl:for-each> - </ul> -</xsl:template> + <xsl:choose> + <xsl:when test="/root/request/pMode='searchCheckbox'"> + <!-- Output mode with checkbox for multiple selection --> + <xsl:for-each select="/root/response/descKeys/keyword"> + <xsl:call-template name="keywordRow"> + <xsl:with-param name="keyword" select="."/> + <xsl:with-param name="mode" select="/root/request/pMode"/> + <xsl:with-param name="thesaurus" select="/root/request/thesaurus"/> + <xsl:with-param name="url" select="/root/gui/url"/> + <xsl:with-param name="depth" select="/root/request/level"/> + </xsl:call-template> + <br class="href"/> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <!-- List mode for scriptaculos autocompletion --> + <ul> + <xsl:for-each select="/root/response/descKeys/keyword"> + <li> + <xsl:call-template name="keywordRow"> + <xsl:with-param name="keyword" select="."/> + <xsl:with-param name="mode" select="/root/request/pMode"/> + <xsl:with-param name="thesaurus" select="/root/request/thesaurus"/> + <xsl:with-param name="url" select="/root/gui/url"/> + <xsl:with-param name="depth" select="/root/request/level"/> + </xsl:call-template> + </li> + </xsl:for-each> + </ul> + </xsl:otherwise> + </xsl:choose> +</xsl:template> </xsl:stylesheet> \ No newline at end of file Modified: sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/thesaurus/thesaurus-util.xsl =================================================================== --- sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/thesaurus/thesaurus-util.xsl 2009-06-09 15:28:34 UTC (rev 4228) +++ sandbox/GeoSource/GeoNetwork/web/geonetwork/xsl/thesaurus/thesaurus-util.xsl 2009-06-09 15:32:33 UTC (rev 4229) @@ -81,56 +81,68 @@ <xsl:param name="thesaurus"/> <xsl:param name="mode"/> <xsl:param name="url"/> - <!-- Add keyword as xlink in current gui language - --> - <li> - <xsl:attribute name="xlink"> - <xsl:choose> - <xsl:when test="contains ($keyword/uri, '#')"> - <xsl:value-of select="concat('http://';, //server/host, ':', //server/port, /root/gui/locService, '/xml.keyword.get?thesaurus=', $keyword/thesaurus, '%26id=', substring-before($keyword/uri, '#'), '%23', substring-after($keyword/uri, '#'))"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="concat('http://';, //server/host, ':', //server/port, /root/gui/locService, '/xml.keyword.get?thesaurus=', $keyword/thesaurus, '%26id=', $keyword/uri)"/> - </xsl:otherwise> - </xsl:choose> - </xsl:attribute> - <xsl:if test="$mode='edit'"> - <xsl:variable name="selected" select="selected"/> - <xsl:if test="selected='true'"> - <input type="checkbox" id="chk{$keyword/id}" - value="{$keyword/id}" checked="checked" onclick="javascript:ksearching.select({$keyword/id})"/> - </xsl:if> - <xsl:if test="selected='false'"> - <input type="checkbox" id="chk{$keyword/id}" - value="{$keyword/id}" onclick="javascript:ksearching.select({$keyword/id})"/> - </xsl:if> - </xsl:if> - - <xsl:choose> - <xsl:when test="$mode='search'"> - <xsl:value-of select="$keyword/value"/> - </xsl:when> - <xsl:when test="$mode='legend'"> - <form id="{./uri}" name="{./uri}" action="{/root/gui/locService}/thesaurus.editelement" method="POST"> - <a onclick="$('{./uri}').submit();"><xsl:value-of select="$keyword/value"/></a> - <input type="hidden" name="mode" value="consult"/> - <input type="hidden" name="ref" value="{$thesaurus}"/> - <input type="hidden" name="uri" value="{./uri}"/> - </form> - - </xsl:when> - <xsl:otherwise> - <a href="javascript:popWindow('{/root/gui/locService}/thesaurus.editelement?mode={$mode}&ref={$thesaurus}&id={./id}');"> - <xsl:value-of select="$keyword/value"/></a> - </xsl:otherwise> - </xsl:choose> - - </li> - </xsl:template> - - - - - - + <!-- Edit mode : add check box --> + <xsl:if test="$mode='edit'"> + <xsl:variable name="selected" select="selected"/> + <xsl:if test="selected='true'"> + <input type="checkbox" id="chk{$keyword/id}" + value="{$keyword/id}" checked="checked" onclick="javascript:ksearching.select({$keyword/id})"/> + </xsl:if> + <xsl:if test="selected='false'"> + <input type="checkbox" id="chk{$keyword/id}" + value="{$keyword/id}" onclick="javascript:ksearching.select({$keyword/id})"/> + </xsl:if> + </xsl:if> + + <xsl:choose> + <xsl:when test="$mode='search' or $mode='searchCheckbox'"> + <!-- Add XLink attribute to be used for reusable elements --> + <xsl:variable name="link"> + <!-- Escape # sign in URL --> + <xsl:choose> + <xsl:when test="contains ($keyword/uri, '#')"> + <xsl:value-of select="concat('http://';, /root/gui/env/server/host, ':', /root/gui/env/server/port, /root/gui/locService, '/xml.keyword.get?thesaurus=', $keyword/thesaurus, '&id=', substring-before($keyword/uri, '#'), '%23', substring-after($keyword/uri, '#'))"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="concat('http://';, /root/gui/env/server/host, ':', /root/gui/env/server/port, /root/gui/locService, '/xml.keyword.get?thesaurus=', $keyword/thesaurus, '&id=', $keyword/uri)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:attribute name="xlink:href"> + <xsl:value-of select="$link"/> + </xsl:attribute> + <xsl:choose> + <xsl:when test="$mode='searchCheckbox'"> + <input type="checkbox" id="href_{position()}" name="href_{position()}" class="href" value="{$link}"/> + <xsl:text> </xsl:text> + <label class="href" for="href_{position()}"> + <xsl:value-of select="$keyword/value"/> + </label> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$keyword/value"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:when test="$mode='legend'"> + <form id="{./uri}" name="{./uri}" action="{/root/gui/locService}/thesaurus.editelement" method="POST"> + <a onclick="$('{./uri}').submit();"><xsl:value-of select="$keyword/value"/></a> + <input type="hidden" name="mode" value="consult"/> + <input type="hidden" name="ref" value="{$thesaurus}"/> + <input type="hidden" name="uri" value="{./uri}"/> + </form> + </xsl:when> + <xsl:otherwise> + <a href="javascript:popWindow('{/root/gui/locService}/thesaurus.editelement?locales=en,fr,it,de&mode={$mode}&ref={$thesaurus}&id={./id}');"> + <xsl:choose> + <xsl:when test="$keyword/value and string-length($keyword/value)"> + <xsl:value-of select="$keyword/value"/> + </xsl:when> + <xsl:otherwise>n/a</xsl:otherwise> + </xsl:choose> + </a> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + </xsl:stylesheet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcoudert@us...> - 2009-06-09 15:28:49
|
Revision: 4228 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=4228&view=rev Author: mcoudert Date: 2009-06-09 15:28:34 +0000 (Tue, 09 Jun 2009) Log Message: ----------- Added XML service to get thesaurus list. Modified Paths: -------------- sandbox/GeoSource/GeoNetwork/web/geonetwork/WEB-INF/config-thesaurus.xml sandbox/GeoSource/GeoNetwork/web/geonetwork/xml/user-profiles.xml Added Paths: ----------- sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/services/thesaurus/GetList.java Added: sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/services/thesaurus/GetList.java =================================================================== --- sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/services/thesaurus/GetList.java (rev 0) +++ sandbox/GeoSource/GeoNetwork/src/org/fao/geonet/services/thesaurus/GetList.java 2009-06-09 15:28:34 UTC (rev 4228) @@ -0,0 +1,117 @@ +//============================================================================= +//=== Copyright (C) 2001-2005 Food and Agriculture Organization of the +//=== United Nations (FAO-UN), United Nations World Food Programme (WFP) +//=== and United Nations Environment Programme (UNEP) +//=== +//=== This program is free software; you can redistribute it and/or modify +//=== it under the terms of the GNU General Public License as published by +//=== the Free Software Foundation; either version 2 of the License, or (at +//=== your option) any later version. +//=== +//=== This program is distributed in the hope that it will be useful, but +//=== WITHOUT ANY WARRANTY; without even the implied warranty of +//=== MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +//=== General Public License for more details. +//=== +//=== You should have received a copy of the GNU General Public License +//=== along with this program; if not, write to the Free Software +//=== Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//=== +//=== Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, +//=== Rome - Italy. email: GeoNetwork@... +//============================================================================== + +package org.fao.geonet.services.thesaurus; + +import java.util.Enumeration; +import java.util.Hashtable; + +import jeeves.constants.Jeeves; +import jeeves.interfaces.Service; +import jeeves.server.ServiceConfig; +import jeeves.server.context.ServiceContext; + +import org.fao.geonet.GeonetContext; +import org.fao.geonet.constants.Geonet; +import org.fao.geonet.kernel.Thesaurus; +import org.fao.geonet.kernel.ThesaurusManager; +import org.jdom.Element; + +//============================================================================= + +/** + * + * Retrieve Thesauri list. + * + * @author mcoudert + * + */ +public class GetList implements Service { + public void init(String appPath, ServiceConfig params) throws Exception { + } + + // -------------------------------------------------------------------------- + // --- + // --- Service + // --- + // -------------------------------------------------------------------------- + + public Element exec(Element params, ServiceContext context) + throws Exception { + Element response = new Element(Jeeves.Elem.RESPONSE); + + GeonetContext gc = (GeonetContext) context + .getHandlerContext(Geonet.CONTEXT_NAME); + + ThesaurusManager th = gc.getThesaurusManager(); + Hashtable<String, Thesaurus> thTable = th.getThesauriTable(); + + response.addContent(buildResultfromThTable(thTable)); + + return response; + } + + + /** + * @param thTable + * @return {@link Element} + */ + private Element buildResultfromThTable(Hashtable<String, Thesaurus> thTable) { + + Element elRoot = new Element("thesauri"); + + Enumeration<Thesaurus> e = thTable.elements(); + while (e.hasMoreElements()) { + Element elLoop = new Element("thesaurus"); + Thesaurus currentTh = e.nextElement(); + + Element elKey = new Element("key"); + String key = currentTh.getKey(); + elKey.addContent(key); + + Element elDname = new Element("dname"); + String dname = currentTh.getDname(); + elDname.addContent(dname); + + Element elFname = new Element("filename"); + String fname = currentTh.getFname(); + elFname.addContent(fname); + + Element elType = new Element("type"); + String type = currentTh.getType(); + elType.addContent(type); + + elLoop.addContent(elKey); + elLoop.addContent(elDname); + elLoop.addContent(elFname); + elLoop.addContent(elType); + + elRoot.addContent(elLoop); + } + + return elRoot; + } +} + +// ============================================================================= + Modified: sandbox/GeoSource/GeoNetwork/web/geonetwork/WEB-INF/config-thesaurus.xml =================================================================== --- sandbox/GeoSource/GeoNetwork/web/geonetwork/WEB-INF/config-thesaurus.xml 2009-06-09 15:23:39 UTC (rev 4227) +++ sandbox/GeoSource/GeoNetwork/web/geonetwork/WEB-INF/config-thesaurus.xml 2009-06-09 15:28:34 UTC (rev 4228) @@ -140,6 +140,10 @@ <class name=".services.thesaurus.DeleteElement" /> <!--<output forward="thesaurus.edit"/>--> </service> + <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <service name="xml.thesaurus.getList" type="xml"> + <class name=".services.thesaurus.GetList"/> + </service> </services> </geonet> \ No newline at end of file Modified: sandbox/GeoSource/GeoNetwork/web/geonetwork/xml/user-profiles.xml =================================================================== --- sandbox/GeoSource/GeoNetwork/web/geonetwork/xml/user-profiles.xml 2009-06-09 15:23:39 UTC (rev 4227) +++ sandbox/GeoSource/GeoNetwork/web/geonetwork/xml/user-profiles.xml 2009-06-09 15:28:34 UTC (rev 4228) @@ -358,6 +358,7 @@ <allow service="keywords.getselected"/> <allow service="thesaurus.list"/> <allow service="thesaurus.view"/><!-- FIXME : Check if needed --> + <allow service="xml.thesaurus.getList"/> <!-- Contact search services --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jesseeichar@us...> - 2009-06-09 15:24:31
|
Revision: 4227 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=4227&view=rev Author: jesseeichar Date: 2009-06-09 15:23:39 +0000 (Tue, 09 Jun 2009) Log Message: ----------- got reusable objects to validate Modified Paths: -------------- sandbox/geocat.ch/trunk/src/org/fao/geonet/kernel/DataManager.java sandbox/geocat.ch/trunk/src/org/fao/geonet/util/LangUtils.java sandbox/geocat.ch/trunk/web/geonetwork/xsl/iso-internal-multilingual-conversion.xsl sandbox/geocat.ch/trunk/web/geonetwork/xsl/user-xml.xsl sandbox/geocat.ch/trunk/web/geoserver/data/services.xml Modified: sandbox/geocat.ch/trunk/src/org/fao/geonet/kernel/DataManager.java =================================================================== --- sandbox/geocat.ch/trunk/src/org/fao/geonet/kernel/DataManager.java 2009-06-09 11:24:51 UTC (rev 4226) +++ sandbox/geocat.ch/trunk/src/org/fao/geonet/kernel/DataManager.java 2009-06-09 15:23:39 UTC (rev 4227) @@ -1224,10 +1224,10 @@ if( child!=null){ Element pos = xlinkAncestorOrSelf(child); - if( pos==child ){ + if( pos==child && pos.getParentElement()!=null ){ Element xlinked = processReusableObjects(dbms, (Element) pos.clone(), true); + int indexOf = pos.getParentElement().indexOf(pos); Processor.removeXLink(pos); - int indexOf = pos.getParentElement().indexOf(pos); pos.getParentElement().setContent(indexOf, xlinked.detach()); }else{ updateXlinkObjects(dbms, md, pos); Modified: sandbox/geocat.ch/trunk/src/org/fao/geonet/util/LangUtils.java =================================================================== --- sandbox/geocat.ch/trunk/src/org/fao/geonet/util/LangUtils.java 2009-06-09 11:24:51 UTC (rev 4226) +++ sandbox/geocat.ch/trunk/src/org/fao/geonet/util/LangUtils.java 2009-06-09 15:23:39 UTC (rev 4227) @@ -266,14 +266,6 @@ List<Element> allTranslations = converted.getChildren(); StringBuilder builder = new StringBuilder(converted.getTextTrim()); - if(builder.length()==0){ - for (Element element : allTranslations) { - if( metadataLang.substring(0,2).equalsIgnoreCase(element.getAttributeValue("locale")) ){ - builder.append(element.getTextTrim()); - break; - } - } - } for (Element element : allTranslations) { builder.append(Xml.getString(element)); Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/iso-internal-multilingual-conversion.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/iso-internal-multilingual-conversion.xsl 2009-06-09 11:24:51 UTC (rev 4226) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/iso-internal-multilingual-conversion.xsl 2009-06-09 15:23:39 UTC (rev 4227) @@ -14,32 +14,55 @@ <!-- Converting the simple format to iso --> <xsl:template match="/description"> - <gmd:description xsi:type="gmd:PT_FreeText_PropertyType"> - <xsl:if test="normalize-space(text()) = ''"> - <xsl:attribute name="gco:nilReason">missing</xsl:attribute> - <gco:CharacterString/> - </xsl:if> - <xsl:apply-templates mode="convert-inner-to-iso"/> - </gmd:description> + <gmd:description xsi:type="gmd:PT_FreeText_PropertyType"> + <xsl:call-template name="composeTranslations"> + <xsl:with-param name="elem" select="."/> + </xsl:call-template> + </gmd:description> </xsl:template> + + <xsl:template name="composeTranslations"> + <xsl:param name="elem" /> + <xsl:choose> + <xsl:when test="count($elem/child::*)>0 and normalize-space($elem/text())=''"/> + <xsl:when test="normalize-space($elem/text())=''"> + <xsl:attribute name="gco:nilReason">missing</xsl:attribute> + <gco:CharacterString/> + </xsl:when> + <xsl:otherwise> + <gco:CharacterString> + <xsl:value-of select="normalize-space($elem/text())" /> + </gco:CharacterString> + </xsl:otherwise> + </xsl:choose> + + <xsl:choose> + <xsl:when test="count($elem/child::*)>0"> + <gmd:PT_FreeText> + <xsl:apply-templates mode="convert-inner-to-iso" select="$elem/*"/> + </gmd:PT_FreeText> + </xsl:when> + <xsl:otherwise> + + <xsl:apply-templates mode="convert-inner-to-iso" select="$elem/*"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> - <xsl:template mode="convert-inner-to-iso" match="text()" priority="2"> - <gco:CharacterString> - <xsl:value-of select="normalize-space(.)" /> - </gco:CharacterString> - </xsl:template> - + <xsl:template mode="convert-inner-to-iso" match="text()"/> + <xsl:template mode="convert-inner-to-iso" match="node()" priority="1"> - <gmd:PT_FreeText> - <gmd:textGroup> - <gmd:LocalisedCharacterString> - <xsl:attribute name="locale"> - <xsl:value-of select="concat('#', normalize-space(name(.)))" /> - </xsl:attribute> - <xsl:value-of select="normalize-space(.)" /> - </gmd:LocalisedCharacterString> - </gmd:textGroup> - </gmd:PT_FreeText> + + <xsl:if test="normalize-space(string(.))!=''"> + <gmd:textGroup> + <gmd:LocalisedCharacterString> + <xsl:attribute name="locale"> + <xsl:value-of select="concat('#', normalize-space(name(.)))" /> + </xsl:attribute> + <xsl:value-of select="normalize-space(.)" /> + </gmd:LocalisedCharacterString> + </gmd:textGroup> + </xsl:if> </xsl:template> @@ -52,13 +75,18 @@ </xsl:template> <xsl:template mode="convert-iso-to-inner" match="gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString"> - <xsl:variable name="code" select="substring(string(@locale),2)"/> - <xsl:element name="{$code}"><xsl:value-of select="."/></xsl:element> + <xsl:if test="string(text())!=''"> + <xsl:variable name="code" select="substring(string(@locale),2)"/> + <xsl:element name="{$code}"><xsl:value-of select="."/></xsl:element> + </xsl:if> </xsl:template> <xsl:template mode="convert-iso-to-inner" match="gco:CharacterString"> - <xsl:value-of select="."/> - <xsl:element name="{$metadataLang}"><xsl:value-of select="."/></xsl:element> + + <xsl:if test="string(text())!=''"> + <xsl:value-of select="."/> + </xsl:if> + <!-- <xsl:element name="{$metadataLang}"><xsl:value-of select="."/></xsl:element> --> </xsl:template> </xsl:stylesheet> \ No newline at end of file Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/user-xml.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/user-xml.xsl 2009-06-09 11:24:51 UTC (rev 4226) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/user-xml.xsl 2009-06-09 15:23:39 UTC (rev 4227) @@ -35,28 +35,15 @@ </gco:CharacterString> </gmd:individualName> <gmd:organisationName xsi:type="gmd:PT_FreeText_PropertyType"> - <xsl:choose> - <xsl:when test="normalize-space(organisation/text())=''"> - <xsl:attribute name="gco:nilReason">missing</xsl:attribute> - <gco:CharacterString/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates mode="convert-inner-to-iso" select="organisation/text()"/> - </xsl:otherwise> - </xsl:choose> - <xsl:apply-templates mode="convert-inner-to-iso" select="organisation/*"/> + <xsl:call-template name="composeTranslations"> + <xsl:with-param name="elem" select="organisation"/> + </xsl:call-template> + </gmd:organisationName> <gmd:positionName xsi:type="gmd:PT_FreeText_PropertyType"> - <xsl:choose> - <xsl:when test="normalize-space(positionname/text())=''"> - <xsl:attribute name="gco:nilReason">missing</xsl:attribute> - <gco:CharacterString/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates mode="convert-inner-to-iso" select="positionname/text()"/> - </xsl:otherwise> - </xsl:choose> - <xsl:apply-templates mode="convert-inner-to-iso" select="positionname/*"/> + <xsl:call-template name="composeTranslations"> + <xsl:with-param name="elem" select="positionname"/> + </xsl:call-template> </gmd:positionName> <gmd:contactInfo> <gmd:CI_Contact> @@ -71,15 +58,21 @@ <xsl:value-of select="phone"/> </gco:CharacterString> </gmd:voice> - <xsl:if test="normalize-space(phone1)!=''"> + <xsl:if test="phone1!=''"> <gmd:voice> + <xsl:if test="normalize-space(phone1)=''"> + <xsl:attribute name="gco:nilReason">missing</xsl:attribute> + </xsl:if> <gco:CharacterString> <xsl:value-of select="normalize-space(phone1)"/> </gco:CharacterString> </gmd:voice> </xsl:if> - <xsl:if test="normalize-space(phone2)!=''"> + <xsl:if test="phone2!=''"> <gmd:voice> + <xsl:if test="normalize-space(phone2)=''"> + <xsl:attribute name="gco:nilReason">missing</xsl:attribute> + </xsl:if> <gco:CharacterString> <xsl:value-of select="normalize-space(phone2)"/> </gco:CharacterString> @@ -94,15 +87,21 @@ <xsl:value-of select="normalize-space(facsimile)"/> </gco:CharacterString> </gmd:facsimile> - <xsl:if test="normalize-space(facsimile1)!=''"> + <xsl:if test="facsimile1!=''"> <gmd:facsimile> + <xsl:if test="normalize-space(facsimile1)=''"> + <xsl:attribute name="gco:nilReason">missing</xsl:attribute> + </xsl:if> <gco:CharacterString> <xsl:value-of select="normalize-space(facsimile1)"/> </gco:CharacterString> </gmd:facsimile> </xsl:if> - <xsl:if test="normalize-space(facsimile2)!=''"> + <xsl:if test="facsimile2!=''"> <gmd:facsimile> + <xsl:if test="normalize-space(facsimile1)=''"> + <xsl:attribute name="gco:nilReason">missing</xsl:attribute> + </xsl:if> <gco:CharacterString> <xsl:value-of select="normalize-space(facsimile2)"/> </gco:CharacterString> @@ -156,16 +155,9 @@ </gco:CharacterString> </gmd:postalCode> <gmd:country xsi:type="gmd:PT_FreeText_PropertyType"> - <xsl:choose> - <xsl:when test="normalize-space(country/text())=''"> - <xsl:attribute name="gco:nilReason">missing</xsl:attribute> - <gco:CharacterString/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates mode="convert-inner-to-iso" select="country/text()"/> - </xsl:otherwise> - </xsl:choose> - <xsl:apply-templates mode="convert-inner-to-iso" select="country/*" /> + <xsl:call-template name="composeTranslations"> + <xsl:with-param name="elem" select="country"/> + </xsl:call-template> </gmd:country> <gmd:electronicMailAddress> <xsl:if test="normalize-space(email)=''"> @@ -176,15 +168,21 @@ <xsl:value-of select="normalize-space(email)"/> </gco:CharacterString> </gmd:electronicMailAddress> - <xsl:if test="normalize-space(email1)!=''"> + <xsl:if test="email1!=''"> <gmd:electronicMailAddress> + <xsl:if test="normalize-space(email1)=''"> + <xsl:attribute name="gco:nilReason">missing</xsl:attribute> + </xsl:if> <gco:CharacterString> <xsl:value-of select="normalize-space(email1)"/> </gco:CharacterString> </gmd:electronicMailAddress> </xsl:if> - <xsl:if test="normalize-space(email2)!=''"> + <xsl:if test="email2!=''"> <gmd:electronicMailAddress> + <xsl:if test="phone1=''"> + <xsl:attribute name="gco:nilReason">missing</xsl:attribute> + </xsl:if> <gco:CharacterString> <xsl:value-of select="normalize-space(email2)"/> </gco:CharacterString> @@ -202,28 +200,14 @@ <gco:CharacterString>text/html</gco:CharacterString> </gmd:protocol> <gmd:name> - <xsl:choose> - <xsl:when test="normalize-space(onlinename/text())=''"> - <xsl:attribute name="gco:nilReason">missing</xsl:attribute> - <gco:CharacterString/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates mode="convert-inner-to-iso" select="onlinename/text()"/> - </xsl:otherwise> - </xsl:choose> - <xsl:apply-templates mode="convert-inner-to-iso" select="onlinename/*"/> + <xsl:call-template name="composeTranslations"> + <xsl:with-param name="elem" select="onlinename"/> + </xsl:call-template> </gmd:name> <gmd:description> - <xsl:choose> - <xsl:when test="normalize-space(country/text())=''"> - <xsl:attribute name="gco:nilReason">missing</xsl:attribute> - <gco:CharacterString/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates mode="convert-inner-to-iso" select="country/text()"/> - </xsl:otherwise> - </xsl:choose> - <xsl:apply-templates mode="convert-inner-to-iso" select="onlinedescription/*"/> + <xsl:call-template name="composeTranslations"> + <xsl:with-param name="elem" select="onlinedescription"/> + </xsl:call-template> </gmd:description> </gmd:CI_OnlineResource> </gmd:onlineResource> @@ -254,28 +238,14 @@ <xsl:template match="record" mode="iso19139.che"> <che:CHE_CI_ResponsibleParty gco:isoType="gmd:CI_ResponsibleParty"> <gmd:organisationName xsi:type="gmd:PT_FreeText_PropertyType"> - <xsl:choose> - <xsl:when test="normalize-space(organisation/text())=''"> - <xsl:attribute name="gco:nilReason">missing</xsl:attribute> - <gco:CharacterString/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates mode="convert-inner-to-iso" select="organisation/text()"/> - </xsl:otherwise> - </xsl:choose> - <xsl:apply-templates mode="convert-inner-to-iso" select="organisation/*"/> + <xsl:call-template name="composeTranslations"> + <xsl:with-param name="elem" select="organisation"/> + </xsl:call-template> </gmd:organisationName> <gmd:positionName xsi:type="gmd:PT_FreeText_PropertyType"> - <xsl:choose> - <xsl:when test="normalize-space(positionname/text())=''"> - <xsl:attribute name="gco:nilReason">missing</xsl:attribute> - <gco:CharacterString/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates mode="convert-inner-to-iso" select="positionname/text()"/> - </xsl:otherwise> - </xsl:choose> - <xsl:apply-templates mode="convert-inner-to-iso" select="positionname/*"/> + <xsl:call-template name="composeTranslations"> + <xsl:with-param name="elem" select="positionname/*"/> + </xsl:call-template> </gmd:positionName> <gmd:contactInfo> <gmd:CI_Contact> @@ -290,15 +260,21 @@ <xsl:value-of select="normalize-space(phone)"/> </gco:CharacterString> </gmd:voice> - <xsl:if test="normalize-space(phone1)!=''"> + <xsl:if test="phone1!=''"> <gmd:voice> + <xsl:if test="normalize-space(phone1)=''"> + <xsl:attribute name="gco:nilReason">missing</xsl:attribute> + </xsl:if> <gco:CharacterString> <xsl:value-of select="normalize-space(phone1)"/> </gco:CharacterString> </gmd:voice> </xsl:if> - <xsl:if test="normalize-space(phone2)!=''"> + <xsl:if test="phone2!=''"> <gmd:voice> + <xsl:if test="normalize-space(phone2)=''"> + <xsl:attribute name="gco:nilReason">missing</xsl:attribute> + </xsl:if> <gco:CharacterString> <xsl:value-of select="normalize-space(phone2)"/> </gco:CharacterString> @@ -313,15 +289,21 @@ <xsl:value-of select="normalize-space(facsimile)"/> </gco:CharacterString> </gmd:facsimile> - <xsl:if test="normalize-space(facsimile1)!=''"> + <xsl:if test="facsimile1!=''"> <gmd:facsimile> + <xsl:if test="normalize-space(facsimile1)=''"> + <xsl:attribute name="gco:nilReason">missing</xsl:attribute> + </xsl:if> <gco:CharacterString> <xsl:value-of select="normalize-space(facsimile1)"/> </gco:CharacterString> </gmd:facsimile> </xsl:if> - <xsl:if test="normalize-space(facsimile2)!=''"> + <xsl:if test="facsimile2!=''"> <gmd:facsimile> + <xsl:if test="normalize-space(facsimile2)=''"> + <xsl:attribute name="gco:nilReason">missing</xsl:attribute> + </xsl:if> <gco:CharacterString> <xsl:value-of select="normalize-space(facsimile2)"/> </gco:CharacterString> @@ -377,16 +359,9 @@ </gco:CharacterString> </gmd:postalCode> <gmd:country xsi:type="gmd:PT_FreeText_PropertyType"> - <xsl:choose> - <xsl:when test="normalize-space(country/text())=''"> - <xsl:attribute name="gco:nilReason">missing</xsl:attribute> - <gco:CharacterString/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates mode="convert-inner-to-iso" select="country/text()"/> - </xsl:otherwise> - </xsl:choose> - <xsl:apply-templates mode="convert-inner-to-iso" select="country/*"/> + <xsl:call-template name="composeTranslations"> + <xsl:with-param name="elem" select="country/*"/> + </xsl:call-template> </gmd:country> <gmd:electronicMailAddress> <xsl:if test="normalize-space(email)=''"> @@ -397,15 +372,21 @@ <xsl:value-of select="normalize-space(email)"/> </gco:CharacterString> </gmd:electronicMailAddress> - <xsl:if test="normalize-space(email1)!=''"> + <xsl:if test="email1!=''"> <gmd:electronicMailAddress> + <xsl:if test="normalize-space(email1)=''"> + <xsl:attribute name="gco:nilReason">missing</xsl:attribute> + </xsl:if> <gco:CharacterString> <xsl:value-of select="normalize-space(email1)"/> </gco:CharacterString> </gmd:electronicMailAddress> </xsl:if> - <xsl:if test="normalize-space(email2)!=''"> + <xsl:if test="email2!=''"> <gmd:electronicMailAddress> + <xsl:if test="normalize-space(email2)=''"> + <xsl:attribute name="gco:nilReason">missing</xsl:attribute> + </xsl:if> <gco:CharacterString> <xsl:value-of select="normalize-space(email2)"/> </gco:CharacterString> @@ -463,28 +444,14 @@ <gco:CharacterString>text/html</gco:CharacterString> </gmd:protocol> <gmd:name> - <xsl:choose> - <xsl:when test="normalize-space(onlinename/text())=''"> - <xsl:attribute name="gco:nilReason">missing</xsl:attribute> - <gco:CharacterString/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates mode="convert-inner-to-iso" select="onlinename/text()"/> - </xsl:otherwise> - </xsl:choose> - <xsl:apply-templates mode="convert-inner-to-iso" select="onlinename/*"/> + <xsl:call-template name="composeTranslations"> + <xsl:with-param name="elem" select="onlinename/*"/> + </xsl:call-template> </gmd:name> <gmd:description> - <xsl:choose> - <xsl:when test="normalize-space(onlinedescription/text())=''"> - <xsl:attribute name="gco:nilReason">missing</xsl:attribute> - <gco:CharacterString/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates mode="convert-inner-to-iso" select="onlinedescription/text()"/> - </xsl:otherwise> - </xsl:choose> - <xsl:apply-templates mode="convert-inner-to-iso" select="onlinedescription/*"/> + <xsl:call-template name="composeTranslations"> + <xsl:with-param name="elem" select="onlinedescription/*"/> + </xsl:call-template> </gmd:description> </gmd:CI_OnlineResource> </gmd:onlineResource> @@ -526,16 +493,9 @@ </gco:CharacterString> </che:individualLastName> <che:organisationAcronym xsi:type="gmd:PT_FreeText_PropertyType"> - <xsl:choose> - <xsl:when test="normalize-space(orgacronym/text())=''"> - <xsl:attribute name="gco:nilReason">missing</xsl:attribute> - <gco:CharacterString/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates mode="convert-inner-to-iso" select="orgacronym/text()"/> - </xsl:otherwise> - </xsl:choose> - <xsl:apply-templates mode="convert-inner-to-iso" select="orgacronym/*"/> + <xsl:call-template name="composeTranslations"> + <xsl:with-param name="elem" select="orgacronym/*"/> + </xsl:call-template> </che:organisationAcronym> </che:CHE_CI_ResponsibleParty> </xsl:template> Modified: sandbox/geocat.ch/trunk/web/geoserver/data/services.xml =================================================================== --- sandbox/geocat.ch/trunk/web/geoserver/data/services.xml 2009-06-09 11:24:51 UTC (rev 4226) +++ sandbox/geocat.ch/trunk/web/geoserver/data/services.xml 2009-06-09 15:23:39 UTC (rev 4227) @@ -60,25 +60,6 @@ to the web based administration tool. --> <adminPassword>geoserver</adminPassword> - <ContactInformation > - <ContactPersonPrimary > - <ContactPerson></ContactPerson> - <ContactOrganization></ContactOrganization> - </ContactPersonPrimary> - <ContactPosition></ContactPosition> - <ContactAddress > - <AddressType></AddressType> - <Address></Address> - <City></City> - <StateOrProvince></StateOrProvince> - <PostCode></PostCode> - <Country></Country> - </ContactAddress> - <ContactVoiceTelephone></ContactVoiceTelephone> - <ContactFacsimileTelephone></ContactFacsimileTelephone> - <ContactElectronicMailAddress></ContactElectronicMailAddress> - <ContactOnlineResource></ContactOnlineResource> - </ContactInformation> </global> <services > <service enabled = "false" type = "WCS" > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jesseeichar@us...> - 2009-06-09 11:25:07
|
Revision: 4226 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=4226&view=rev Author: jesseeichar Date: 2009-06-09 11:24:51 +0000 (Tue, 09 Jun 2009) Log Message: ----------- Merge branch 'fix_validation_rejection' Modified Paths: -------------- sandbox/geocat.ch/trunk/jeeves/src/jeeves/xlink/Processor.java sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/ExtentsStrategy.java sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/KeywordsStrategy.java sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/Validate.java sandbox/geocat.ch/trunk/src/org/fao/geonet/services/user/Update.java sandbox/geocat.ch/trunk/web/geonetwork/xsl/user-update.xsl Modified: sandbox/geocat.ch/trunk/jeeves/src/jeeves/xlink/Processor.java =================================================================== --- sandbox/geocat.ch/trunk/jeeves/src/jeeves/xlink/Processor.java 2009-06-09 07:40:36 UTC (rev 4225) +++ sandbox/geocat.ch/trunk/jeeves/src/jeeves/xlink/Processor.java 2009-06-09 11:24:51 UTC (rev 4226) @@ -257,7 +257,9 @@ public static void removeFromCache(String xlinkUri) throws CacheException{ JeevesJCS xlinkCache = JeevesJCS.getInstance(XLINK_JCS); - xlinkCache.remove(xlinkUri); + if(xlinkCache.get(xlinkUri)!=null){ + xlinkCache.remove(xlinkUri); + } } public static void clearCache() throws CacheException Modified: sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/ExtentsStrategy.java =================================================================== --- sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/ExtentsStrategy.java 2009-06-09 07:40:36 UTC (rev 4225) +++ sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/ExtentsStrategy.java 2009-06-09 11:24:51 UTC (rev 4226) @@ -305,7 +305,9 @@ public String updateHrefToValidatedRef(String oldHref, String id, UserSession session) { - return oldHref.replace(NON_VALIDATED_TYPE, XLINK_TYPE); + String xlinkhref = oldHref.replace(NON_VALIDATED_TYPE, XLINK_TYPE); + String updatedId = xlinkhref.replaceFirst("&id=\\d+&?", "&id="+id+"&"); + return updatedId; } public Map<String, String> markAsValidated(String[] ids, Dbms dbms, UserSession session) throws Exception @@ -322,21 +324,25 @@ Map<String, String> idMap = new HashMap<String, String>(); try { - FeatureCollection<SimpleFeatureType, SimpleFeature> featureCollection = FeatureCollections.newCollection(); + FeatureCollection<SimpleFeatureType, SimpleFeature> featureCollection = FeatureCollections.newCollection(); + int base = Integer.valueOf(ExtentHelper.findNextId(destSource, dest)); while (features.hasNext()) { SimpleFeature feature = features.next(); SimpleFeature newFeature = SimpleFeatureBuilder.template(destSource.getSchema(),null); - Object id = feature.getAttribute(from.idColumn); - Object desc = feature.getAttribute(from.descColumn); + Number id = (Number) feature.getAttribute(from.idColumn); + + Object desc = ExtentHelper.encodeDescription(feature.getAttribute(from.descColumn).toString()); + Object search = ExtentHelper.encodeDescription(feature.getAttribute(from.searchColumn).toString()); Object geom = feature.getDefaultGeometry(); - String newId = ExtentHelper.findNextId(fromSource, from); - idMap.put((String) id, newId); + String newId = String.valueOf(base++); + idMap.put(String.valueOf(id.intValue()), newId); newFeature.setAttribute(dest.idColumn, newId); newFeature.setAttribute(dest.descColumn, desc); + newFeature.setAttribute(dest.searchColumn, search); newFeature.setDefaultGeometry(geom); featureCollection.add(newFeature); Modified: sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/KeywordsStrategy.java =================================================================== --- sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/KeywordsStrategy.java 2009-06-09 07:40:36 UTC (rev 4225) +++ sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/KeywordsStrategy.java 2009-06-09 11:24:51 UTC (rev 4226) @@ -127,7 +127,7 @@ KeywordsSearcher searcher = new KeywordsSearcher(_thesaurusMan); - searcher.search(null, searchParams); + searcher.search("*", searchParams); searcher.sortResults("label"); return searcher; } @@ -141,7 +141,7 @@ thesParam.setText(ThesaurusManager.NON_VALID_THESAURUS_NAME); params.addContent(thesParam ); - searcher.search(_currentLocale, params); + searcher.search("*", params); searcher.sortResults("label"); session.setProperty(Geonet.Session.SEARCH_KEYWORDS_RESULT, searcher); Modified: sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/Validate.java =================================================================== --- sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/Validate.java 2009-06-09 07:40:36 UTC (rev 4225) +++ sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/Validate.java 2009-06-09 11:24:51 UTC (rev 4226) @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.Set; import jeeves.interfaces.Service; @@ -70,7 +71,7 @@ private List<Element> performValidation(String[] ids, ReplacementStrategy strategy, Dbms dbms, UserSession session, String baseUrl) throws Exception { - strategy.markAsValidated(ids, dbms, session); + Map<String, String> idMapping = strategy.markAsValidated(ids, dbms, session); List<Element> result = new ArrayList<Element>(); for (String id : ids) { @@ -83,7 +84,9 @@ xlink.removeAttribute(XLink.ROLE, XLink.NAMESPACE_XLINK); String oldHref = xlink.getAttributeValue(XLink.HREF, XLink.NAMESPACE_XLINK); - String newHref = strategy.updateHrefToValidatedRef(oldHref, id, session); + String newId = idMapping.get(id); + if(newId==null) newId=id; + String newHref = strategy.updateHrefToValidatedRef(oldHref, newId, session); xlink.setAttribute(XLink.HREF, newHref, XLink.NAMESPACE_XLINK); } metadataRecord.commit(dbms); Modified: sandbox/geocat.ch/trunk/src/org/fao/geonet/services/user/Update.java =================================================================== --- sandbox/geocat.ch/trunk/src/org/fao/geonet/services/user/Update.java 2009-06-09 07:40:36 UTC (rev 4225) +++ sandbox/geocat.ch/trunk/src/org/fao/geonet/services/user/Update.java 2009-06-09 11:24:51 UTC (rev 4226) @@ -23,7 +23,6 @@ package org.fao.geonet.services.user; -import java.sql.SQLException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -36,7 +35,6 @@ import jeeves.utils.Util; import jeeves.xlink.Processor; -import org.fao.geonet.GeonetContext; import org.fao.geonet.constants.Geonet; import org.fao.geonet.constants.Params; import org.fao.geonet.util.LangUtils; @@ -77,7 +75,7 @@ String address = Util.getParam(params, Params.ADDRESS, ""); String state = Util.getParam(params, Params.STATE, ""); String zip = Util.getParam(params, Params.ZIP, ""); - String country = Util.getParam(params, Params.COUNTRY, ""); + String country = LangUtils.createDescFromParams(params, Params.COUNTRY); String email = Util.getParam(params, Params.EMAIL, ""); String phone = Util.getParam(params, Params.PHONE, ""); @@ -111,13 +109,16 @@ if (!context.getProfileManager().exists(profile)) throw new Exception("Unkown profile : "+ profile); + if( profile.equals(Geonet.Profile.SHARED) ){ + publicacc = "y"; + } + java.util.List listGroups = params.getChildren(Params.GROUPS); if (profile.equals(Geonet.Profile.ADMINISTRATOR)) listGroups = new ArrayList(); Dbms dbms = (Dbms) context.getResourceManager().open (Geonet.Res.MAIN_DB); - country = processCountryCode(dbms,country); if( !profile.equals(Geonet.Profile.SHARED) && password.length()<6 ){ throw new IllegalArgumentException(password+" is not long enough"); @@ -187,30 +188,6 @@ //--- //-------------------------------------------------------------------------- - private String processCountryCode(Dbms dbms, String countryCode) throws SQLException - { - try{ - Element results = dbms.select("SELECT label,langid FROM regionsdes WHERE iddes=?", Integer.parseInt(countryCode)); - StringBuilder builder = new StringBuilder(); - for (Element country : (Collection<Element>)results.getChildren()) { - if( supportedLangs.contains(country.getChildTextTrim("langid").toLowerCase()) ){ - String code = country.getChildTextTrim("langid").toUpperCase().substring(0,2); - builder.append("<"); - builder.append(code); - builder.append(">"); - builder.append(country.getChildTextTrim("label")); - builder.append("</"); - builder.append(code); - builder.append(">"); - - } - } - return builder.toString(); - }catch (NumberFormatException e) { - return ""; - } - } - /** Adds a user to a group */ Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/user-update.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/user-update.xsl 2009-06-09 07:40:36 UTC (rev 4225) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/user-update.xsl 2009-06-09 11:24:51 UTC (rev 4226) @@ -84,6 +84,7 @@ editI18n.init('positionname', lang); editI18n.init('onlinename', lang); editI18n.init('onlinedescription', lang); + editI18n.init('country', lang); profileChanged(); } </script> @@ -208,21 +209,15 @@ <label for="country" accesskey="C"> <xsl:value-of select="/root/gui/strings/country"/> </label> - <select class="content" size="1" id="country" name="country"> - <xsl:if test="string(/root/response/record/country)=''"> - <option selected="true" value=""/> - </xsl:if> - <xsl:variable name="langCode" select="translate(substring(string(/root/gui/language),1,2),$LOWER,$UPPER)"/> - <xsl:for-each select="/root/gui/countries/country"> - <xsl:sort select="text()"/> - <option value="{iddes}"> - <xsl:if test="util:countryMatch(string(/root/response/record/country), string(.)) = true()"> - <xsl:attribute name="selected"/> - </xsl:if> - <xsl:value-of select="."/> - </option> - </xsl:for-each> - </select> + <xsl:call-template name="translationWidgetInputs"> + <xsl:with-param name="key" select="'country'"/> + <xsl:with-param name="root" select="/root/response/record/country"/> + </xsl:call-template> + + <xsl:call-template name="translationWidgetSelect"> + <xsl:with-param name="key" select="'country'"/> + <xsl:with-param name="class" select="'left-indent'"/> + </xsl:call-template> </fieldset> <fieldset class="users"> <legend> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <anninah@us...> - 2009-06-09 07:40:40
|
Revision: 4225 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=4225&view=rev Author: anninah Date: 2009-06-09 07:40:36 +0000 (Tue, 09 Jun 2009) Log Message: ----------- sort by date of METADATA-revision (not geodata) Modified Paths: -------------- sandbox/geocat.ch/trunk/web/geonetwork/loc/deu/xml/strings.xml sandbox/geocat.ch/trunk/web/geonetwork/loc/eng/xml/strings.xml sandbox/geocat.ch/trunk/web/geonetwork/loc/fra/xml/strings.xml Modified: sandbox/geocat.ch/trunk/web/geonetwork/loc/deu/xml/strings.xml =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/loc/deu/xml/strings.xml 2009-06-09 07:29:45 UTC (rev 4224) +++ sandbox/geocat.ch/trunk/web/geonetwork/loc/deu/xml/strings.xml 2009-06-09 07:40:36 UTC (rev 4225) @@ -2,7 +2,7 @@ <strings> <ajaxRequestFailed mode="js">Ajax-Anfrage fehlgeschlagen</ajaxRequestFailed> <searchElements mode="js">Suche ein Element</searchElements> - <viewCapabilities>"GetCapabilities"-Dokument öffnen</viewCapabilities> + <viewCapabilities>GetCapabilities-Dokument öffnen</viewCapabilities> <viewCapabilitiesHelp>Wählen Sie einen Layer Namen aus dem GetCapabilities-Dokument des Dienstes.</viewCapabilitiesHelp> <createAssoServiceHelp> <ul> @@ -11,7 +11,7 @@ Wenn Sie über die nötigen Rechte verfügen, werden nach der Auswahl des Dienste-Metadatensatzes die Elemente "bezieht sich auf" (operatesOn) und "angehängte Ressource" (coupledResource) im Dienste-Metadatensatz ergänzt. </li> <li class="arrow"> - "Layer Name" ist die Bezeichnung des Layers, so wie er im OGC-Webdienst definiert ist (z.B. "layername" im "GetCapabilities"-Dokument) + "Layer Name" ist die Bezeichnung des Layers, so wie er im OGC-Webdienst definiert ist (z.B. "layername" im GetCapabilities-Dokument) </li> <li class="arrow"> Nutzen Sie diese Checkbox nur, wenn Sie nicht die nötigen Rechte haben, den Dienste-Metadatensatz zu aktualisiseren, oder wenn Sie unbedingt eine Dienste-spezifische "Online Ressource"-Klasse ausfüllen wollen. @@ -114,7 +114,7 @@ <stat.graphicalStats>Grafische Statistik</stat.graphicalStats> <stat.tip2>(Datumsart (Jahr, Monat, Tag) und Zeitspanne wählen, OK klicken um eine Grafik anzuzeigen)</stat.tip2> <stat.numberOfRequests>Anzahl Abfragen</stat.numberOfRequests> - <stat.chooseDateFrom>Bitte wählen Sie ein Start Datum</stat.chooseDateFrom> + <stat.chooseDateFrom>Bitte wählen Sie ein Startdatum</stat.chooseDateFrom> <stat.dateFrom>Von</stat.dateFrom> <stat.dateTo>Bis</stat.dateTo> <stat.md>Metadaten</stat.md> @@ -657,7 +657,7 @@ <sortByType id="relevance">Relevanz</sortByType> <!-- <sortByType id="rating">Bewertung</sortByType> --> <sortByType id="popularity">Popularität</sortByType> - <sortByType id="date">Nachführung Geodaten</sortByType> + <sortByType id="date">Aktualisierung Metadaten</sortByType> <sortByType id="title">Titel</sortByType> <southbc>südliche Grenzkoordinate</southbc> <spatial2Tab>Struktur der räumlichen Daten</spatial2Tab> Modified: sandbox/geocat.ch/trunk/web/geonetwork/loc/eng/xml/strings.xml =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/loc/eng/xml/strings.xml 2009-06-09 07:29:45 UTC (rev 4224) +++ sandbox/geocat.ch/trunk/web/geonetwork/loc/eng/xml/strings.xml 2009-06-09 07:40:36 UTC (rev 4225) @@ -610,7 +610,7 @@ <sortByType id="relevance">Relevance</sortByType> <!-- <sortByType id="rating">Rating</sortByType> --> <sortByType id="popularity">Popularity</sortByType> - <sortByType id="date">Revision date of the geodata</sortByType> + <sortByType id="date">Metadata revision</sortByType> <sortByType id="title">Title</sortByType> <southbc>South Bounding Coordinate</southbc> <spatial2Tab>Spat. Repr.</spatial2Tab> Modified: sandbox/geocat.ch/trunk/web/geonetwork/loc/fra/xml/strings.xml =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/loc/fra/xml/strings.xml 2009-06-09 07:29:45 UTC (rev 4224) +++ sandbox/geocat.ch/trunk/web/geonetwork/loc/fra/xml/strings.xml 2009-06-09 07:40:36 UTC (rev 4225) @@ -630,7 +630,7 @@ <sortByType id="relevance">Pertinence</sortByType> <!-- <sortByType id="rating">Note</sortByType> --> <sortByType id="popularity">Popularité</sortByType> - <sortByType id="date">Date de mise à jour des géodonnées</sortByType> + <sortByType id="date">Mise à jour des métadonnées</sortByType> <sortByType id="title">Titre</sortByType> <southbc>Coordonnée sud de l'emprise</southbc> <spatial2Tab>Représentation spatiale</spatial2Tab> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jesseeichar@us...> - 2009-06-09 07:30:17
|
Revision: 4224 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=4224&view=rev Author: jesseeichar Date: 2009-06-09 07:29:45 +0000 (Tue, 09 Jun 2009) Log Message: ----------- fixed language selectors on page load Modified Paths: -------------- sandbox/geocat.ch/trunk/src/org/fao/geonet/util/XslUtil.java sandbox/geocat.ch/trunk/web/geonetwork/xsl/metadata-edit.xsl Modified: sandbox/geocat.ch/trunk/src/org/fao/geonet/util/XslUtil.java =================================================================== --- sandbox/geocat.ch/trunk/src/org/fao/geonet/util/XslUtil.java 2009-06-09 06:43:44 UTC (rev 4223) +++ sandbox/geocat.ch/trunk/src/org/fao/geonet/util/XslUtil.java 2009-06-09 07:29:45 UTC (rev 4224) @@ -39,7 +39,7 @@ if( src.toString().trim().length()==0){ return "false"; } - boolean result = src.toString().contains(pattern.toString()); + boolean result = src.toString().toLowerCase().contains(pattern.toString().toLowerCase()); return String.valueOf(result); } Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/metadata-edit.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/metadata-edit.xsl 2009-06-09 06:43:44 UTC (rev 4223) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/metadata-edit.xsl 2009-06-09 07:29:45 UTC (rev 4224) @@ -30,6 +30,7 @@ var selectors = Ext.query("select.lang_selector"); for( var i=0; i < selectors.length; i++){ selectors[i].options[0].selected=true; + enableLocalInput(selectors[i],false) } } @@ -218,18 +219,18 @@ }); } - function enableLocalInput(node) { + function enableLocalInput(node, focus) { var ref = node.value; var parent = node.parentNode.parentNode; var nodes = parent.getElementsByTagName("input"); var textarea = parent.getElementsByTagName("textarea"); - show(nodes,ref); - show(textarea,ref); + show(nodes,ref,focus); + show(textarea,ref,focus); }; - function show(nodes,ref){ + function show(nodes,ref,focus){ for ( index in nodes ) { var input = nodes[index]; if( input.style!=null && input.style.display != "none" ) input.style.display = "none"; @@ -238,7 +239,7 @@ var input = nodes[index]; if( input.name == ref ){ input.style.display = "block"; - input.focus(); + if(focus) input.focus(); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jesseeichar@us...> - 2009-06-09 06:44:15
|
Revision: 4223 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=4223&view=rev Author: jesseeichar Date: 2009-06-09 06:43:44 +0000 (Tue, 09 Jun 2009) Log Message: ----------- now shared users do not need password Modified Paths: -------------- sandbox/geocat.ch/trunk/src/org/fao/geonet/services/user/Update.java sandbox/geocat.ch/trunk/web/geonetwork/xsl/user-update.xsl Modified: sandbox/geocat.ch/trunk/src/org/fao/geonet/services/user/Update.java =================================================================== --- sandbox/geocat.ch/trunk/src/org/fao/geonet/services/user/Update.java 2009-06-09 04:57:20 UTC (rev 4222) +++ sandbox/geocat.ch/trunk/src/org/fao/geonet/services/user/Update.java 2009-06-09 06:43:44 UTC (rev 4223) @@ -70,7 +70,7 @@ { String id = params.getChildText(Params.ID); String username = Util.getParam(params, Params.USERNAME); - String password = Util.getParam(params, Params.PASSWORD); + String password = Util.getParam(params, Params.PASSWORD,""); String surname = Util.getParam(params, Params.SURNAME, ""); String name = Util.getParam(params, Params.NAME, ""); String profile = Util.getParam(params, Params.PROFILE); @@ -119,6 +119,10 @@ Dbms dbms = (Dbms) context.getResourceManager().open (Geonet.Res.MAIN_DB); country = processCountryCode(dbms,country); + if( !profile.equals(Geonet.Profile.SHARED) && password.length()<6 ){ + throw new IllegalArgumentException(password+" is not long enough"); + } + if (id == null) // For Adding new user { id = context.getSerialFactory().getSerial(dbms, "Users") +""; Modified: sandbox/geocat.ch/trunk/web/geonetwork/xsl/user-update.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/user-update.xsl 2009-06-09 04:57:20 UTC (rev 4222) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/user-update.xsl 2009-06-09 06:43:44 UTC (rev 4223) @@ -27,31 +27,34 @@ var pw1 = document.userupdateform.password.value; var pw2 = document.userupdateform.password2.value; + var noSharedProfile = $F('user.profile')!='Shared'; + // check for a value in both fields. - if (pw1 == '' || pw2 == '') { + if (noSharedProfile && (pw1 == '' || pw2 == '')) { alert('Please enter your password twice.'); return; } + // check for minimum length - if (document.userupdateform.password.value.length < minLength) { + if (noSharedProfile && document.userupdateform.password.value.length < minLength) { alert('Your password must be at least ' + minLength + ' characters long. Try again.'); return; } // check for spaces - if (document.userupdateform.password.value.indexOf(invalid) > -1) { + if (noSharedProfile && document.userupdateform.password.value.indexOf(invalid) > -1) { alert("Sorry, spaces are not allowed."); return; } // check for bad password confirmation - if (pw1 != pw2) { + if (pw1 != pw2 && noSharedProfile) { alert ("You did not enter the same new password twice. Please re-enter your password."); return; } // check at least one group selected if ($F('groups') == '') - if ($F('user.profile') != 'Administrator' && $F('user.profile') != 'Shared') { + if ($F('user.profile') != 'Administrator' && noSharedProfile) { alert('Please, select at least one group'); return; } @@ -213,7 +216,7 @@ <xsl:for-each select="/root/gui/countries/country"> <xsl:sort select="text()"/> <option value="{iddes}"> - <xsl:if test="util:matches(string(/root/response/record/country), string(.)) = true()"> + <xsl:if test="util:countryMatch(string(/root/response/record/country), string(.)) = true()"> <xsl:attribute name="selected"/> </xsl:if> <xsl:value-of select="."/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rdewit@us...> - 2009-06-09 04:57:58
|
Revision: 4222 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=4222&view=rev Author: rdewit Date: 2009-06-09 04:57:20 +0000 (Tue, 09 Jun 2009) Log Message: ----------- Some changes to make the app work with the latest version of Orbeon: 3.7.1. Older versions will not work anymore. Modified Paths: -------------- sandbox/geonetworkui/BlueNetMEST/build.xml sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/theme/bluenet.css Added Paths: ----------- sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/properties-base.xml sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/properties.xml.old Removed Paths: ------------- sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/properties.xml Modified: sandbox/geonetworkui/BlueNetMEST/build.xml =================================================================== --- sandbox/geonetworkui/BlueNetMEST/build.xml 2009-06-09 04:48:52 UTC (rev 4221) +++ sandbox/geonetworkui/BlueNetMEST/build.xml 2009-06-09 04:57:20 UTC (rev 4222) @@ -168,6 +168,7 @@ <target name="war-orbeon" depends="init"> <property name="orbeon.apps" value="${dist.web}/orbeon/WEB-INF/resources/apps"/> + <delete dir="${dist.web}/orbeon"/> <mkdir dir="${dist.web}/orbeon"/> <unzip src="orbeon/orbeon.war" dest="${dist.web}/orbeon"/> Added: sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/properties-base.xml =================================================================== --- sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/properties-base.xml (rev 0) +++ sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/properties-base.xml 2009-06-09 04:57:20 UTC (rev 4222) @@ -0,0 +1,59 @@ +<!-- + Copyright (C) 2008 Orbeon, Inc. + + This program is free software; you can redistribute it and/or modify it under the terms of the + GNU Lesser General Public License as published by the Free Software Foundation; either version + 2.1 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + The full text of the license is available at http://www.gnu.org/copyleft/lesser.html +--> +<properties xmlns:xs="http://www.w3.org/2001/XMLSchema"; + xmlns:oxf="http://www.orbeon.com/oxf/processors"; + xmlns:xi="http://www.w3.org/2001/XInclude"> + + <!-- Global properties --> + <property as="xs:anyURI" name="oxf.log4j-config" value="oxf:/config/log4j.xml"/> + <property as="xs:integer" name="oxf.cache.size" value="500"/> + <property as="xs:integer" name="oxf.cache.xpath.size" value="600"/> + <property as="xs:boolean" name="oxf.sax.inspection" value="false"/> + <property as="xs:boolean" name="oxf.resources.versioned" value="false"/> + <property as="xs:string" name="oxf.resources.version-number" value="3.1415"/> + + <property as="xs:anyURI" name="oxf.url-rewriting.service.base-uri" value=""/> + <property as="xs:string" name="oxf.url-rewriting.strategy.servlet" value="servlet"/> + <!-- TODO: support for base context for servlet rewriting strategy --> + <!--<property as="xs:string" name="oxf.url-rewriting.portlet.context" value=""/>--> + <property as="xs:string" name="oxf.url-rewriting.portlet2.context" value=""/> + + <!--<property as="xs:string" name="oxf.http.proxy.host" value="localhost"/>--> + <!--<property as="xs:integer" name="oxf.http.proxy.port" value="8090"/>--> + + <!-- Epilogue configuration --> + <!-- + <property as="xs:anyURI" name="oxf.epilogue.theme" value="oxf:/config/theme-examples.xsl"/> + --> + <property as="xs:anyURI" name="oxf.epilogue.theme" value="oxf:/config/theme-bluenet.xsl"/> + <property as="xs:boolean" name="oxf.epilogue.use-theme" value="true"/> + <property as="xs:anyURI" name="oxf.epilogue.theme.error" value="oxf:/config/theme-error.xsl"/> + <property as="xs:anyURI" name="oxf.epilogue.theme.portlet" value="oxf:/config/theme-portlet-examples.xsl"/> + <property as="xs:boolean" name="oxf.epilogue.output-xhtml" value="false"/> + <property as="xs:boolean" name="oxf.epilogue.renderer-rewrite" value="true"/> + <property as="xs:boolean" name="oxf.epilogue.process-svg" value="true"/> + <property as="xs:boolean" name="oxf.epilogue.embeddable" value="false"/> + + <!-- Processor-specific properties --> + <property as="xs:integer" processor-name="oxf:request" name="max-upload-size" value="100000000"/> + <property as="xs:integer" processor-name="oxf:request" name="max-upload-memory-size" value="10240"/> + <property as="xs:string" processor-name="oxf:page-flow" name="instance-passing" value="redirect"/> + <property as="xs:string" processor-name="oxf:page-flow" name="xforms-submission-path" value="/xforms-server-submit"/> + <property as="xs:anyURI" processor-name="oxf:page-flow" name="xforms-submission-model" value="oxf:/ops/xforms/xforms-server-submit.xpl"/> + <property as="xs:boolean" processor-name="oxf:saxon8" name="generate-source-location" value="false"/> + <property as="xs:boolean" processor-name="oxf:sql" name="legacy-implicit-prefixes" value="false"/> + + <!--<property as="xs:boolean" processor-name="oxf:xml-converter" name="serialize-xml-11" value="true"/>--> + +</properties> Deleted: sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/properties.xml =================================================================== --- sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/properties.xml 2009-06-09 04:48:52 UTC (rev 4221) +++ sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/properties.xml 2009-06-09 04:57:20 UTC (rev 4222) @@ -1,114 +0,0 @@ -<!-- - Copyright (C) 2004 Orbeon, Inc. - - This program is free software; you can redistribute it and/or modify it under the terms of the - GNU Lesser General Public License as published by the Free Software Foundation; either version - 2.1 of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - The full text of the license is available at http://www.gnu.org/copyleft/lesser.html ---> -<properties xmlns:xs="http://www.w3.org/2001/XMLSchema"; - xmlns:oxf="http://www.orbeon.com/oxf/processors"> - - <!-- Global properties --> - <property as="xs:anyURI" name="oxf.log4j-config" value="oxf:/config/log4j.xml"/> - <property as="xs:integer" name="oxf.cache.size" value="500"/> - <property as="xs:integer" name="oxf.cache.xpath.size" value="600"/> - <property as="xs:boolean" name="oxf.sax.inspection" value="false"/> - <property as="xs:boolean" name="oxf.resources.versioned" value="false"/> - <property as="xs:string" name="oxf.resources.version-number" value="3.1415"/> - - <!-- Epilogue configuration --> - <!--<property as="xs:anyURI" name="oxf.epilogue.theme" value="oxf:/config/theme-examples.xsl"/>--> - <property as="xs:anyURI" name="oxf.epilogue.theme" value="oxf:/config/theme-bluenet.xsl"/> - <property as="xs:boolean" name="oxf.epilogue.use-theme" value="true"/> - <property as="xs:boolean" name="oxf.epilogue.output-xhtml" value="false"/> - <property as="xs:boolean" name="oxf.epilogue.renderer-rewrite" value="true"/> - <property as="xs:boolean" name="oxf.epilogue.process-svg" value="true"/> - <property as="xs:boolean" name="oxf.epilogue.xforms.widgets" value="true"/> - - <!-- Processor-specific properties --> - <property as="xs:integer" processor-name="oxf:request" name="max-upload-size" value="100000000"/> - <property as="xs:integer" processor-name="oxf:request" name="max-upload-memory-size" value="10240"/> - <property as="xs:string" processor-name="oxf:page-flow" name="instance-passing" value="redirect"/> - <property as="xs:string" processor-name="oxf:page-flow" name="xforms-submission-path" value="/xforms-server-submit"/> - <property as="xs:anyURI" processor-name="oxf:page-flow" name="xforms-submission-model" value="oxf:/ops/xforms/xforms-server-submit.xpl"/> - <property as="xs:boolean" processor-name="oxf:saxon8" name="generate-source-location" value="false"/> - <property as="xs:boolean" processor-name="oxf:sql" name="legacy-implicit-prefixes" value="false"/> - - <!--<property as="xs:boolean" processor-name="oxf:xml-converter" name="serialize-xml-11" value="true"/>--> - - <!-- Encryption of XForms hidden fields and field names --> - <property as="xs:string" name="oxf.xforms.password" value="Password used for encryption"/> - <property as="xs:boolean" name="oxf.xforms.encrypt-hidden" value="true"/> - <property as="xs:boolean" name="oxf.xforms.encrypt-names" value="true"/> - - <!-- Default formatting of XForms types --> - <property as="xs:string" name="oxf.xforms.format.date" value="if (. castable as xs:date) then format-date(xs:date(.), '[FNn] [MNn] [D], [Y] [ZN]', 'en', (), ()) else ."/> - <property as="xs:string" name="oxf.xforms.format.dateTime" value="if (. castable as xs:dateTime) then format-dateTime(xs:dateTime(.), '[FNn] [MNn] [D], [Y] [H01]:[m01]:[s01] [ZN]', 'en', (), ()) else ."/> - <property as="xs:string" name="oxf.xforms.format.time" value="if (. castable as xs:time) then format-time(xs:time(.), '[H01]:[m01]:[s01] [ZN]', 'en', (), ()) else ."/> - <property as="xs:string" name="oxf.xforms.format.decimal" value="if (. castable as xs:decimal) then format-number(xs:decimal(.),'###,###,###,##0.00') else ."/> - <property as="xs:string" name="oxf.xforms.format.integer" value="if (. castable as xs:integer) then format-number(xs:integer(.),'###,###,###,##0') else ."/> - <property as="xs:string" name="oxf.xforms.format.float" value="if (. castable as xs:float) then format-number(xs:float(.),'#,##0.000') else ."/> - <property as="xs:string" name="oxf.xforms.format.double" value="if (. castable as xs:double) then format-number(xs:double(.),'#,##0.000') else ."/> - - <!-- XForms cache configuration --> - <property as="xs:string" name="oxf.xforms.state-handling" value="server"/> - <property as="xs:integer" name="oxf.xforms.store.application.size" value="20000000"/> - <property as="xs:string" name="oxf.xforms.store.application.username" value="guest"/> - <property as="xs:string" name="oxf.xforms.store.application.password" value="guest"/> - <property as="xs:anyURI" name="oxf.xforms.store.application.uri" value="xmldb:exist:///"/> - <property as="xs:string" name="oxf.xforms.store.application.collection" value="/db/orbeon/xforms/cache/"/> - <property as="xs:boolean" name="oxf.xforms.cache.document" value="true"/> - <property as="xs:integer" name="oxf.xforms.cache.documents.size" value="10"/> - <property as="xs:integer" name="oxf.xforms.cache.shared-instances.size" value="40"/> - - <!-- Other XForms options --> - <property as="xs:string" name="oxf.xforms.order" value="label control help alert hint"/> - <property as="xs:boolean" name="oxf.xforms.optimize-get-all" value="true"/> - <property as="xs:boolean" name="oxf.xforms.optimize-local-submission" value="true"/> - <property as="xs:boolean" name="oxf.xforms.ajax.show-loading-icon" value="true"/> - <property as="xs:boolean" name="oxf.xforms.ajax.show-errors" value="true"/> - <property as="xs:boolean" name="oxf.xforms.gzip-state" value="true"/> - <property as="xs:boolean" name="oxf.xforms.minimal-resources" value="true"/> - <property as="xs:boolean" name="oxf.xforms.combine-resources" value="true"/> - <property as="xs:boolean" name="oxf.xforms.cache-combined-resources" value="false"/> - <property as="xs:boolean" name="oxf.xforms.optimize-relevance" value="false"/> - <property as="xs:boolean" name="oxf.xforms.session-heartbeat" value="true"/> - <property as="xs:boolean" name="oxf.xforms.host-language-avts" value="true"/> - - <!-- Form Runner / Form Builder properties --> - <property as="xs:anyURI" name="oxf.fr.persistence.app.*.uri" value="/fr/service/exist"/> - <property as="xs:anyURI" name="oxf.fr.persistence.app.orbeon.builder.form.uri" value="/fr/service/resource"/> - <property as="xs:anyURI" name="oxf.fr.persistence.app.orbeon.bookcast.form.uri" value="/fr/service/resource"/> - - <property as="xs:anyURI" name="oxf.fr.persistence.service.exist.uri" value="/exist/rest/db"/> - - <!-- Deprecated XForms cache configuration --> - <property as="xs:integer" name="oxf.xforms.cache.session.size" value="500000"/> - <property as="xs:integer" name="oxf.xforms.cache.application.size" value="2000000"/> - - <!-- Rarely used global properties --> - <property as="xs:string" name="oxf.servlet.externalize-form-values-prefix" value="$extnode^"/> - - <!-- Test properties --> - <!--<property as="xs:string" name="oxf.cache.display-statistics" value="cache.main cache.xpath xforms.cache.documents xforms.cache.shared-instances"/>--> - <!--<property as="xs:boolean" name="oxf.xforms.test.ajax" value="false"/>--> - - <!-- XPL profiling support --> - <!-- Currently one of org.orbeon.oxf.processor.NetworkTrace, - org.orbeon.oxf.processor.StdOutTrace, - org.orbeon.oxf.processor.SessionTrace --> - <!--<property as="xs:NCName" name="processor.trace" value="org.orbeon.oxf.processor.SessionTrace"/>--> - <!-- Host for NetworkTrace. Default is localhost. --> - <!--<property as="xs:NMTOKEN" name="processor.trace.host" value="localhost"/>--> - <!-- Port for NetworkTrace. Default is 9191 --> - <!--<property as="xs:nonNegativeInteger" name="processor.trace.port" value="9999"/>--> - -</properties> - - Copied: sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/properties.xml.old (from rev 1930, sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/properties.xml) =================================================================== --- sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/properties.xml.old (rev 0) +++ sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/properties.xml.old 2009-06-09 04:57:20 UTC (rev 4222) @@ -0,0 +1,114 @@ +<!-- + Copyright (C) 2004 Orbeon, Inc. + + This program is free software; you can redistribute it and/or modify it under the terms of the + GNU Lesser General Public License as published by the Free Software Foundation; either version + 2.1 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + The full text of the license is available at http://www.gnu.org/copyleft/lesser.html +--> +<properties xmlns:xs="http://www.w3.org/2001/XMLSchema"; + xmlns:oxf="http://www.orbeon.com/oxf/processors"> + + <!-- Global properties --> + <property as="xs:anyURI" name="oxf.log4j-config" value="oxf:/config/log4j.xml"/> + <property as="xs:integer" name="oxf.cache.size" value="500"/> + <property as="xs:integer" name="oxf.cache.xpath.size" value="600"/> + <property as="xs:boolean" name="oxf.sax.inspection" value="false"/> + <property as="xs:boolean" name="oxf.resources.versioned" value="false"/> + <property as="xs:string" name="oxf.resources.version-number" value="3.1415"/> + + <!-- Epilogue configuration --> + <!--<property as="xs:anyURI" name="oxf.epilogue.theme" value="oxf:/config/theme-examples.xsl"/>--> + <property as="xs:anyURI" name="oxf.epilogue.theme" value="oxf:/config/theme-bluenet.xsl"/> + <property as="xs:boolean" name="oxf.epilogue.use-theme" value="true"/> + <property as="xs:boolean" name="oxf.epilogue.output-xhtml" value="false"/> + <property as="xs:boolean" name="oxf.epilogue.renderer-rewrite" value="true"/> + <property as="xs:boolean" name="oxf.epilogue.process-svg" value="true"/> + <property as="xs:boolean" name="oxf.epilogue.xforms.widgets" value="true"/> + + <!-- Processor-specific properties --> + <property as="xs:integer" processor-name="oxf:request" name="max-upload-size" value="100000000"/> + <property as="xs:integer" processor-name="oxf:request" name="max-upload-memory-size" value="10240"/> + <property as="xs:string" processor-name="oxf:page-flow" name="instance-passing" value="redirect"/> + <property as="xs:string" processor-name="oxf:page-flow" name="xforms-submission-path" value="/xforms-server-submit"/> + <property as="xs:anyURI" processor-name="oxf:page-flow" name="xforms-submission-model" value="oxf:/ops/xforms/xforms-server-submit.xpl"/> + <property as="xs:boolean" processor-name="oxf:saxon8" name="generate-source-location" value="false"/> + <property as="xs:boolean" processor-name="oxf:sql" name="legacy-implicit-prefixes" value="false"/> + + <!--<property as="xs:boolean" processor-name="oxf:xml-converter" name="serialize-xml-11" value="true"/>--> + + <!-- Encryption of XForms hidden fields and field names --> + <property as="xs:string" name="oxf.xforms.password" value="Password used for encryption"/> + <property as="xs:boolean" name="oxf.xforms.encrypt-hidden" value="true"/> + <property as="xs:boolean" name="oxf.xforms.encrypt-names" value="true"/> + + <!-- Default formatting of XForms types --> + <property as="xs:string" name="oxf.xforms.format.date" value="if (. castable as xs:date) then format-date(xs:date(.), '[FNn] [MNn] [D], [Y] [ZN]', 'en', (), ()) else ."/> + <property as="xs:string" name="oxf.xforms.format.dateTime" value="if (. castable as xs:dateTime) then format-dateTime(xs:dateTime(.), '[FNn] [MNn] [D], [Y] [H01]:[m01]:[s01] [ZN]', 'en', (), ()) else ."/> + <property as="xs:string" name="oxf.xforms.format.time" value="if (. castable as xs:time) then format-time(xs:time(.), '[H01]:[m01]:[s01] [ZN]', 'en', (), ()) else ."/> + <property as="xs:string" name="oxf.xforms.format.decimal" value="if (. castable as xs:decimal) then format-number(xs:decimal(.),'###,###,###,##0.00') else ."/> + <property as="xs:string" name="oxf.xforms.format.integer" value="if (. castable as xs:integer) then format-number(xs:integer(.),'###,###,###,##0') else ."/> + <property as="xs:string" name="oxf.xforms.format.float" value="if (. castable as xs:float) then format-number(xs:float(.),'#,##0.000') else ."/> + <property as="xs:string" name="oxf.xforms.format.double" value="if (. castable as xs:double) then format-number(xs:double(.),'#,##0.000') else ."/> + + <!-- XForms cache configuration --> + <property as="xs:string" name="oxf.xforms.state-handling" value="server"/> + <property as="xs:integer" name="oxf.xforms.store.application.size" value="20000000"/> + <property as="xs:string" name="oxf.xforms.store.application.username" value="guest"/> + <property as="xs:string" name="oxf.xforms.store.application.password" value="guest"/> + <property as="xs:anyURI" name="oxf.xforms.store.application.uri" value="xmldb:exist:///"/> + <property as="xs:string" name="oxf.xforms.store.application.collection" value="/db/orbeon/xforms/cache/"/> + <property as="xs:boolean" name="oxf.xforms.cache.document" value="true"/> + <property as="xs:integer" name="oxf.xforms.cache.documents.size" value="10"/> + <property as="xs:integer" name="oxf.xforms.cache.shared-instances.size" value="40"/> + + <!-- Other XForms options --> + <property as="xs:string" name="oxf.xforms.order" value="label control help alert hint"/> + <property as="xs:boolean" name="oxf.xforms.optimize-get-all" value="true"/> + <property as="xs:boolean" name="oxf.xforms.optimize-local-submission" value="true"/> + <property as="xs:boolean" name="oxf.xforms.ajax.show-loading-icon" value="true"/> + <property as="xs:boolean" name="oxf.xforms.ajax.show-errors" value="true"/> + <property as="xs:boolean" name="oxf.xforms.gzip-state" value="true"/> + <property as="xs:boolean" name="oxf.xforms.minimal-resources" value="true"/> + <property as="xs:boolean" name="oxf.xforms.combine-resources" value="true"/> + <property as="xs:boolean" name="oxf.xforms.cache-combined-resources" value="false"/> + <property as="xs:boolean" name="oxf.xforms.optimize-relevance" value="false"/> + <property as="xs:boolean" name="oxf.xforms.session-heartbeat" value="true"/> + <property as="xs:boolean" name="oxf.xforms.host-language-avts" value="true"/> + + <!-- Form Runner / Form Builder properties --> + <property as="xs:anyURI" name="oxf.fr.persistence.app.*.uri" value="/fr/service/exist"/> + <property as="xs:anyURI" name="oxf.fr.persistence.app.orbeon.builder.form.uri" value="/fr/service/resource"/> + <property as="xs:anyURI" name="oxf.fr.persistence.app.orbeon.bookcast.form.uri" value="/fr/service/resource"/> + + <property as="xs:anyURI" name="oxf.fr.persistence.service.exist.uri" value="/exist/rest/db"/> + + <!-- Deprecated XForms cache configuration --> + <property as="xs:integer" name="oxf.xforms.cache.session.size" value="500000"/> + <property as="xs:integer" name="oxf.xforms.cache.application.size" value="2000000"/> + + <!-- Rarely used global properties --> + <property as="xs:string" name="oxf.servlet.externalize-form-values-prefix" value="$extnode^"/> + + <!-- Test properties --> + <!--<property as="xs:string" name="oxf.cache.display-statistics" value="cache.main cache.xpath xforms.cache.documents xforms.cache.shared-instances"/>--> + <!--<property as="xs:boolean" name="oxf.xforms.test.ajax" value="false"/>--> + + <!-- XPL profiling support --> + <!-- Currently one of org.orbeon.oxf.processor.NetworkTrace, + org.orbeon.oxf.processor.StdOutTrace, + org.orbeon.oxf.processor.SessionTrace --> + <!--<property as="xs:NCName" name="processor.trace" value="org.orbeon.oxf.processor.SessionTrace"/>--> + <!-- Host for NetworkTrace. Default is localhost. --> + <!--<property as="xs:NMTOKEN" name="processor.trace.host" value="localhost"/>--> + <!-- Port for NetworkTrace. Default is 9191 --> + <!--<property as="xs:nonNegativeInteger" name="processor.trace.port" value="9999"/>--> + +</properties> + + Property changes on: sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/properties.xml.old ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:keywords + Id Added: svn:mergeinfo + Added: svn:eol-style + native Modified: sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/theme/bluenet.css =================================================================== --- sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/theme/bluenet.css 2009-06-09 04:48:52 UTC (rev 4221) +++ sandbox/geonetworkui/BlueNetMEST/web/orbeon/WEB-INF/resources/config/theme/bluenet.css 2009-06-09 04:57:20 UTC (rev 4222) @@ -92,6 +92,7 @@ margin-bottom: 10px; padding: 0.2em; padding-left:2.5em; + border: solid 1px lightgray; } .gn-menu { @@ -148,10 +149,6 @@ display:none; } - - - - - - - +.gn-group { + border: solid 1px lightgray; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sppigot@us...> - 2009-06-09 04:50:00
|
Revision: 4221 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=4221&view=rev Author: sppigot Date: 2009-06-09 04:48:52 +0000 (Tue, 09 Jun 2009) Log Message: ----------- Back changes/fixes from eMII - revisions r160, r161, r302, r318, r327, r328, r338, r344, r366, r374 Thanks to Craig Jones & Penny Lyle @ eMII Modified Paths: -------------- sandbox/BlueNetMEST/web/geonetwork/loc/ar/xml/strings.xml sandbox/BlueNetMEST/web/geonetwork/loc/cn/xml/strings.xml sandbox/BlueNetMEST/web/geonetwork/loc/de/xml/strings.xml sandbox/BlueNetMEST/web/geonetwork/loc/en/xml/strings.xml sandbox/BlueNetMEST/web/geonetwork/loc/es/xml/strings.xml sandbox/BlueNetMEST/web/geonetwork/loc/fr/xml/strings.xml sandbox/BlueNetMEST/web/geonetwork/scripts/modalbox.js sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139/index-fields.xsl sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.ADO/index-fields.xsl sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.mcp/index-fields.xsl sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.mcp/schema/resources/Codelist/gmxCodelists.xml sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.mcp/update-fixed-info.xsl sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.wmo/index-fields.xsl sandbox/BlueNetMEST/web/geonetwork/xml/search/lucene.xsl sandbox/BlueNetMEST/web/geonetwork/xsl/category-list.xsl sandbox/BlueNetMEST/web/geonetwork/xsl/config/config.xsl sandbox/BlueNetMEST/web/geonetwork/xsl/file-download-list.xsl sandbox/BlueNetMEST/web/geonetwork/xsl/group-list.xsl sandbox/BlueNetMEST/web/geonetwork/xsl/localization/localization.xsl sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-admin.xsl sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-category.xsl sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-iso19139.mcp.xsl sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-iso19139.xsl sandbox/BlueNetMEST/web/geonetwork/xsl/search-results-html4.xsl sandbox/BlueNetMEST/web/geonetwork/xsl/search-results-xhtml.xsl sandbox/BlueNetMEST/web/geonetwork/xsl/user-list.xsl Modified: sandbox/BlueNetMEST/web/geonetwork/loc/ar/xml/strings.xml =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/loc/ar/xml/strings.xml 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/loc/ar/xml/strings.xml 2009-06-09 04:48:52 UTC (rev 4221) @@ -91,7 +91,10 @@ <down>إلى الأسفل</down> <download>تحميل</download> <downloadable>Downloadable</downloadable> - <downloadData>بيانات للتحميل</downloadData> + <downloadDataUrl>Data URL</downloadDataUrl> + <downloadData id="data">بيانات للتحميل</downloadData> + <downloadData id="other">Other file for download</downloadData> + <downloadData id="file">File for download</downloadData> <downloadEmail>Download Email</downloadEmail> <dsgpoly>Data Set G-Polygon</dsgpoly> <dynamic>Interactive</dynamic> Modified: sandbox/BlueNetMEST/web/geonetwork/loc/cn/xml/strings.xml =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/loc/cn/xml/strings.xml 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/loc/cn/xml/strings.xml 2009-06-09 04:48:52 UTC (rev 4221) @@ -194,7 +194,10 @@ <distributionTab>分发信息</distributionTab> <down>下移</down> <download>下载</download> - <downloadData>可下载的数据</downloadData> + <downloadDataUrl>Data URL</downloadDataUrl> + <downloadData id="data">>可下载的数据</downloadData> + <downloadData id="other">Other file for download</downloadData> + <downloadData id="file">Data for download</downloadData> <dsgpoly>数据集G-Polygon</dsgpoly> <eastbc>覆盖范围东边坐标</eastbc> <edit>编辑</edit> @@ -503,4 +506,4 @@ <fromDateSelector>Select FROM date</fromDateSelector> <toDateSelector>Select TO date</toDateSelector> -</strings> \ No newline at end of file +</strings> Modified: sandbox/BlueNetMEST/web/geonetwork/loc/de/xml/strings.xml =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/loc/de/xml/strings.xml 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/loc/de/xml/strings.xml 2009-06-09 04:48:52 UTC (rev 4221) @@ -159,6 +159,7 @@ <disclaimer2>Haftungsausschluptext hier</disclaimer2> <distributionTab>Vertrieb</distributionTab> <down>runter</down> + <downloadDataUrl>Data URL</downloadDataUrl> <download>Download</download> <downloadable>Herunterladbar</downloadable> <dynamic>Interaktiv</dynamic> Modified: sandbox/BlueNetMEST/web/geonetwork/loc/en/xml/strings.xml =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/loc/en/xml/strings.xml 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/loc/en/xml/strings.xml 2009-06-09 04:48:52 UTC (rev 4221) @@ -216,7 +216,10 @@ <downloadThemAll>Download All Local</downloadThemAll> <duplicate>Create a copy of</duplicate> <dynamic>Interactive</dynamic> - <downloadData>Data for download</downloadData> + <downloadDataUrl>Data URL</downloadDataUrl> + <downloadData id="data">Data for download</downloadData> + <downloadData id="other">Other file for download</downloadData> + <downloadData id="file">File for download</downloadData> <dsgpoly>Data Set G-Polygon</dsgpoly> <eastbc>East Bounding Coordinate</eastbc> <edit>Edit</edit> @@ -259,6 +262,7 @@ <groupManDes>Add/modify/delete and show groups</groupManDes> <groups>Groups</groups> <groupSelect>Apply selected groups as owner groups</groupSelect> + <guestDownload><font class="error">Data is available for registered users. Login or register using the link above.</font></guestDownload> <harvestingManagement>Harvesting management</harvestingManagement> <harvestingManDes>Add/modify/delete/start/stop harvesting tasks</harvestingManDes> <transferOwnership>Transfer ownership</transferOwnership> @@ -444,6 +448,7 @@ <protocol>Protocol</protocol> <protocolChoice show="y" value="WWW:LINK-1.0-http--metadata-URL">Metadata URL</protocolChoice> <protocolChoice show="y" value="WWW:LINK-1.0-http--link">Web address (URL)</protocolChoice> + <protocolChoice show="y" value="WWW:LINK-1.0-http--downloaddata">Data for download (URL)</protocolChoice> <protocolChoice show="y" value="WWW:LINK-1.0-http--samples">Showcase product (URL)</protocolChoice> <protocolChoice show="y" value="WWW:LINK-1.0-http--related">Related link (URL)</protocolChoice> <protocolChoice show="y" value="WWW:LINK-1.0-http--partners">Partner web address (URL)</protocolChoice> Modified: sandbox/BlueNetMEST/web/geonetwork/loc/es/xml/strings.xml =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/loc/es/xml/strings.xml 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/loc/es/xml/strings.xml 2009-06-09 04:48:52 UTC (rev 4221) @@ -191,7 +191,10 @@ <distributionTab>Distribución</distributionTab> <down>bajar</down> <download>Descarga</download> - <downloadData>Datos para la descarga</downloadData> + <downloadDataUrl>Data URL</downloadDataUrl> + <downloadData id="data">Datos para la descarga</downloadData> + <downloadData id="other">Other file for download</downloadData> + <downloadData id="file">File for download</downloadData> <dsgpoly>Conjunto de datos tipo G-Polygon</dsgpoly> <eastbc>Coordenadas Este</eastbc> <edit>Editar</edit> Modified: sandbox/BlueNetMEST/web/geonetwork/loc/fr/xml/strings.xml =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/loc/fr/xml/strings.xml 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/loc/fr/xml/strings.xml 2009-06-09 04:48:52 UTC (rev 4221) @@ -183,7 +183,10 @@ <distributionTab>Distribution</distributionTab> <down>Descendre</down> <download>Télécharger</download> - <downloadData>Données à télécharger</downloadData> + <downloadDataUrl>Data URL</downloadDataUrl> + <downloadData id="data">Données à télécharger</downloadData> + <downloadData id="other">Other file for download</downloadData> + <downloadData id="file">File for download</downloadData> <dsgpoly>Data Set G-Polygon</dsgpoly> <eastbc>Coordonnée est de l'emprise</eastbc> <edit>Editer</edit> Modified: sandbox/BlueNetMEST/web/geonetwork/scripts/modalbox.js =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/scripts/modalbox.js 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/scripts/modalbox.js 2009-06-09 04:48:52 UTC (rev 4221) @@ -378,7 +378,18 @@ }, _findFocusableElements: function(){ // Collect form elements or links from MB content - var mycontent = this.MBcontent.select('input:not([type~=hidden])', 'select', 'textarea', 'button', 'a[href]'); + var mycontent = []; + var content = this.MBcontent.descendants(); + for (var index = 0, len = content.length; index < len; ++index) { + var elem = content[index]; + if (["textarea","select","button"].include(elem.tagName.toLowerCase())) { + mycontent.push(elem); + } else if (elem.tagName.toLowerCase() == "input" && elem.visible() && elem.type != "hidden") { + mycontent.push(elem); + } else if (elem.tagName.toLowerCase() == "a" && elem.href) { + mycontent.push(elem); + } + } mycontent.invoke('addClassName', 'MB_focusable'); return mycontent; }, Modified: sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139/index-fields.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139/index-fields.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139/index-fields.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -184,8 +184,13 @@ <!-- index online protocol --> <xsl:for-each select="gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:protocol/gco:CharacterString"> - <Field name="protocol" string="{string(.)}" store="true" index="true" token="false"/> - </xsl:for-each> + <xsl:variable name="download_check"><xsl:text>&fname=&access</xsl:text></xsl:variable> + <xsl:variable name="linkage" select="../../gmd:linkage/gmd:URL" /> + <!-- ignore empty downloads --> + <xsl:if test="string($linkage)!='' and not(contains($linkage,$download_check))"> + <Field name="protocol" string="{string(.)}" store="true" index="true" token="false"/> + </xsl:if> + </xsl:for-each> </xsl:for-each> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> Modified: sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.ADO/index-fields.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.ADO/index-fields.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.ADO/index-fields.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -181,8 +181,13 @@ <!-- index online protocol --> <xsl:for-each select="gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:protocol/gco:CharacterString"> - <Field name="protocol" string="{string(.)}" store="true" index="true" token="false"/> - </xsl:for-each> + <xsl:variable name="download_check"><xsl:text>&fname=&access</xsl:text></xsl:variable> + <xsl:variable name="linkage" select="../../gmd:linkage/gmd:URL" /> + <!-- ignore empty downloads --> + <xsl:if test="string($linkage)!='' and not(contains($linkage,$download_check))"> + <Field name="protocol" string="{string(.)}" store="true" index="true" token="false"/> + </xsl:if> + </xsl:for-each> </xsl:for-each> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> Modified: sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.mcp/index-fields.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.mcp/index-fields.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.mcp/index-fields.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -193,8 +193,13 @@ <!-- index online protocol --> <xsl:for-each select="gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:protocol/gco:CharacterString"> - <Field name="protocol" string="{string(.)}" store="true" index="true" token="false"/> - </xsl:for-each> + <xsl:variable name="download_check"><xsl:text>&fname=&access</xsl:text></xsl:variable> + <xsl:variable name="linkage" select="../../gmd:linkage/gmd:URL" /> + <!-- ignore empty downloads --> + <xsl:if test="string($linkage)!='' and not(contains($linkage,$download_check))"> + <Field name="protocol" string="{string(.)}" store="true" index="true" token="false"/> + </xsl:if> + </xsl:for-each> </xsl:for-each> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> Modified: sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.mcp/schema/resources/Codelist/gmxCodelists.xml =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.mcp/schema/resources/Codelist/gmxCodelists.xml 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.mcp/schema/resources/Codelist/gmxCodelists.xml 2009-06-09 04:48:52 UTC (rev 4221) @@ -285,6 +285,13 @@ <gml:identifier codeSpace="MCP version 1.4">moralRightsOwner</gml:identifier> </CodeDefinition> </codeEntry> +<!-- MCP --> + <codeEntry> + <CodeDefinition gml:id="CI_RoleCode_MetadataContact"> + <gml:description>party who can be contacted about the metadata</gml:description> + <gml:identifier codeSpace="MCP version 1.4">metadataContact</gml:identifier> + </CodeDefinition> + </codeEntry> </CodeListDictionary> </codelistItem> <!--=== DQ_EvaluationMethodTypeCode ===--> @@ -1544,6 +1551,13 @@ <gml:identifier codeSpace="MCP version 1.2">derived</gml:identifier> </CodeDefinition> </codeEntry> +<!-- MCP --> + <codeEntry> + <CodeDefinition gml:id="MD_ScopeCode_publication"> + <gml:description>information applies to publications</gml:description> + <gml:identifier codeSpace="MCP version 1.2">publication</gml:identifier> + </CodeDefinition> + </codeEntry> </CodeListDictionary> </codelistItem> <!--=== MD_SpatialRepresentationTypeCode ===--> Modified: sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.mcp/update-fixed-info.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.mcp/update-fixed-info.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.mcp/update-fixed-info.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -133,7 +133,7 @@ <xsl:template match="gmd:metadataStandardVersion" priority="10"> <xsl:copy> - <gco:CharacterString>1.3-19139</gco:CharacterString> + <gco:CharacterString>MCP:BlueNet V1.4</gco:CharacterString> </xsl:copy> </xsl:template> Modified: sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.wmo/index-fields.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.wmo/index-fields.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xml/schemas/iso19139.wmo/index-fields.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -181,8 +181,13 @@ <!-- index online protocol --> <xsl:for-each select="gmd:transferOptions/gmd:MD_DigitalTransferOptions/gmd:onLine/gmd:CI_OnlineResource/gmd:protocol/gco:CharacterString"> - <Field name="protocol" string="{string(.)}" store="true" index="true" token="false"/> - </xsl:for-each> + <xsl:variable name="download_check"><xsl:text>&fname=&access</xsl:text></xsl:variable> + <xsl:variable name="linkage" select="../../gmd:linkage/gmd:URL" /> + <!-- ignore empty downloads --> + <xsl:if test="string($linkage)!='' and not(contains($linkage,$download_check))"> + <Field name="protocol" string="{string(.)}" store="true" index="true" token="false"/> + </xsl:if> + </xsl:for-each> </xsl:for-each> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> Modified: sandbox/BlueNetMEST/web/geonetwork/xml/search/lucene.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xml/search/lucene.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xml/search/lucene.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -147,6 +147,28 @@ </BooleanClause> </BooleanQuery> </BooleanClause> + <!-- Only select if have access to download or GUEST has access to download --> + <BooleanClause required="true" prohibited="false"> + <BooleanQuery> + <xsl:choose> + <xsl:when test="string(/request/isAdmin)!='on'"> + <xsl:for-each select="/request/mygroups"> + <BooleanClause required="false" prohibited="false"> + <TermQuery fld="{$opDownload}" txt="{string(.)}"/> + </BooleanClause> + </xsl:for-each> + <BooleanClause required="false" prohibited="false"> + <TermQuery fld="{$opDownload}" txt="-1"/> + </BooleanClause> + </xsl:when> + <xsl:otherwise> + <BooleanClause required="false" prohibited="false"> + <TermQuery fld="_dummy" txt="0"/> + </BooleanClause> + </xsl:otherwise> + </xsl:choose> + </BooleanQuery> + </BooleanClause> </xsl:if> <!-- dynamic - - - - - - - - - - - - - - - - - - - - - - - - - --> Modified: sandbox/BlueNetMEST/web/geonetwork/xsl/category-list.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xsl/category-list.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xsl/category-list.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -39,6 +39,7 @@ --> <xsl:template name="form"> <div class="important"><xsl:copy-of select="/root/gui/strings/localizationHelpCategory/node()"/></div> + <button class="content" onclick="load('{/root/gui/locService}/category.get')"><xsl:value-of select="/root/gui/strings/newCategory"/></button> <table width="70%"> <tr> <th class="padded, bottom_border"><xsl:value-of select="/root/gui/strings/name"/></th> Modified: sandbox/BlueNetMEST/web/geonetwork/xsl/config/config.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xsl/config/config.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xsl/config/config.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -28,6 +28,7 @@ <xsl:with-param name="title" select="/root/gui/strings/systemConfig"/> <xsl:with-param name="content"> + <xsl:call-template name="buttons"/> <xsl:call-template name="panel"/> </xsl:with-param> Modified: sandbox/BlueNetMEST/web/geonetwork/xsl/file-download-list.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xsl/file-download-list.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xsl/file-download-list.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -13,6 +13,20 @@ <div id="downloadlist"> <table align="center"> + <tr width="100%"> + <td align="center" colspan="6"> + <button class="content" onclick="doDownload('{/root/response/id}')"><xsl:value-of select="/root/gui/strings/downloadSelected"/></button> +   + <button class="content" onclick="doDownload('{/root/response/id}', 'all')"><xsl:value-of select="/root/gui/strings/downloadThemAll"/></button> + </td> + </tr> + + <tr width="100%"> + <td align="center" colspan="6"> +   + </td> + </tr> + <tr> <th class="padded"><xsl:value-of select="/root/gui/strings/type"/></th> <th class="padded"><xsl:value-of select="/root/gui/strings/downloadSelect"/></th> Modified: sandbox/BlueNetMEST/web/geonetwork/xsl/group-list.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xsl/group-list.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xsl/group-list.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -36,6 +36,7 @@ --> <xsl:template name="form"> <div class="important"><xsl:copy-of select="/root/gui/strings/localizationHelpGroup/node()"/></div> + <button class="content" onclick="load('{/root/gui/locService}/group.get')"><xsl:value-of select="/root/gui/strings/newGroup"/></button> <table width="100%"> <tr> <th class="padded, bottom_border"><xsl:value-of select="/root/gui/strings/name"/></th> Modified: sandbox/BlueNetMEST/web/geonetwork/xsl/localization/localization.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xsl/localization/localization.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xsl/localization/localization.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -23,6 +23,7 @@ <xsl:with-param name="title" select="/root/gui/strings/localiz"/> <xsl:with-param name="content"> + <xsl:call-template name="buttons"/> <xsl:call-template name="panel"/> </xsl:with-param> Modified: sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-admin.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-admin.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-admin.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -20,6 +20,21 @@ <div id="privileges"> <input name="metadataid" id="metadataid" type="hidden" value="{/root/response/id}"/> <table> + <xsl:if test="not($disabled)"> + <tr width="100%"> + <td align="center" colspan="8"> + <xsl:choose> + <xsl:when test="contains(/root/gui/reqService,'metadata.massive')"> + <button class="content" onclick="checkBoxModalUpdate('privileges','metadata.massive.update.privileges',true,'{concat(/root/gui/strings/results,' ',/root/gui/strings/massiveUpdatePrivilegesTitle)}')"><xsl:value-of select="/root/gui/strings/submit"/></button> + </xsl:when> + <xsl:otherwise> + <button class="content" onclick="checkBoxModalUpdate('privileges','metadata.admin')"><xsl:value-of select="/root/gui/strings/submit"/></button> + </xsl:otherwise> + </xsl:choose> + </td> + </tr> + </xsl:if> + <tr> <th class="padded"><xsl:value-of select="/root/gui/strings/groups"/></th> <!-- loop on all operations leaving editing and notify to last --> Modified: sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-category.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-category.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-category.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -16,6 +16,21 @@ <div id="categories" align="center"> <input name="metadataid" id="metadataid" type="hidden" value="{/root/response/id}"/> <table> + <xsl:if test="not($disabled)"> + <tr width="100%"> + <td align="center" colspan="2"> + <xsl:choose> + <xsl:when test="contains(/root/gui/reqService,'metadata.massive')"> + <button class="content" onclick="checkBoxModalUpdate('categories','metadata.massive.update.categories','true','{concat(/root/gui/strings/results,' ',/root/gui/strings/massiveUpdateCategoriesTitle)}')"><xsl:value-of select="/root/gui/strings/submit"/></button> + </xsl:when> + <xsl:otherwise> + <button class="content" onclick="checkBoxModalUpdate('categories','metadata.category');"><xsl:value-of select="/root/gui/strings/submit"/></button> + </xsl:otherwise> + </xsl:choose> + </td> + </tr> + </xsl:if> + <tr> <th class="padded"><xsl:value-of select="/root/gui/strings/categories"/></th> <th class="padded"><xsl:value-of select="/root/gui/strings/assigned"/></th> Modified: sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-iso19139.mcp.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-iso19139.mcp.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-iso19139.mcp.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -858,13 +858,13 @@ <xsl:param name="tabLink"/> <xsl:call-template name="displayTab"> - <xsl:with-param name="tab" select="'simple'"/> + <xsl:with-param name="tab" select="'mcpMinimum'"/> <xsl:with-param name="text" select="'MCP Minimum'"/> <xsl:with-param name="indent" select="$indent"/> <xsl:with-param name="tabLink" select="$tabLink"/> </xsl:call-template> <xsl:call-template name="displayTab"> - <xsl:with-param name="tab" select="'mcpCore'"/> + <xsl:with-param name="tab" select="'simple'"/> <xsl:with-param name="text" select="'MCP Core'"/> <xsl:with-param name="indent" select="$indent"/> <xsl:with-param name="tabLink" select="$tabLink"/> Modified: sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-iso19139.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-iso19139.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xsl/metadata-iso19139.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -1197,7 +1197,7 @@ <xsl:choose> <xsl:when test="$schema='iso19139.mcp' and $currTab='simple'"> - <xsl:value-of select="'mcpMinimum'"/> + <xsl:value-of select="'mcpCore'"/> </xsl:when> <xsl:when test="$schema='iso19139.ADO' and $currTab='simple'"> <xsl:value-of select="'complete'"/> @@ -2453,6 +2453,48 @@ </xsl:template> <!-- ===================================================================== --> + <!-- online resources: link to data for download --> + <!-- ===================================================================== --> + + <xsl:template mode="iso19139" match="gmd:CI_OnlineResource[starts-with(gmd:protocol/gco:CharacterString,'WWW:LINK-') and contains(gmd:protocol/gco:CharacterString,'http--downloaddata')]" priority="4"> + <xsl:param name="schema"/> + <xsl:param name="edit"/> + <xsl:variable name="linkage" select="gmd:linkage/gmd:URL" /> + <xsl:variable name="name" select="normalize-space(gmd:name/gco:CharacterString)" /> + <xsl:variable name="description" select="normalize-space(gmd:description/gco:CharacterString)" /> + <xsl:variable name="protocol" select="normalize-space(gmd:protocol/gco:CharacterString)" /> + + <xsl:choose> + <xsl:when test="$edit=true()"> + <xsl:apply-templates mode="iso19139EditOnlineRes" select="."> + <xsl:with-param name="schema" select="$schema"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="string($linkage)!=''"> + <xsl:apply-templates mode="simpleElement" select="."> + <xsl:with-param name="schema" select="$schema"/> + <xsl:with-param name="title" select="/root/gui/strings/downloadDataUrl"/> + <xsl:with-param name="text"> + <a href="{$linkage}" target="_new"> + <xsl:choose> + <xsl:when test="string($description)!=''"> + <xsl:value-of select="$description"/> + </xsl:when> + <xsl:when test="string($name)!=''"> + <xsl:value-of select="$name"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$linkage"/> + </xsl:otherwise> + </xsl:choose> + </a> + </xsl:with-param> + </xsl:apply-templates> + </xsl:when> + </xsl:choose> + </xsl:template> + + <!-- ===================================================================== --> <!-- protocol --> <!-- ===================================================================== --> Modified: sandbox/BlueNetMEST/web/geonetwork/xsl/search-results-html4.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xsl/search-results-html4.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xsl/search-results-html4.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -300,7 +300,7 @@ count($metadata/link[@type='download'])>0 and /root/gui/session/userId=''">   - <b class="padded"><xsl:value-of select="'Data attached but you cannot download unless you Register'"/></b> + <xsl:copy-of select="/root/gui/strings/guestDownload/node()"/> </xsl:when> <xsl:when test="$metadata/geonet:info/download='true' and count($metadata/link[@type='download'])>0"> Modified: sandbox/BlueNetMEST/web/geonetwork/xsl/search-results-xhtml.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xsl/search-results-xhtml.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xsl/search-results-xhtml.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -60,6 +60,19 @@ <xsl:with-param name="remote" select="$remote"/> </xsl:call-template> + <!-- duplicate page list for top of search results area --> + <!-- page list --> + <!-- <xsl:call-template name="formSeparator"/> --> + <xsl:call-template name="formContent"> + <xsl:with-param name="content"> + <xsl:call-template name="pageList"> + <xsl:with-param name="remote" select="$remote"/> + </xsl:call-template> + </xsl:with-param> + <xsl:with-param name="indent" select="50"/> + <xsl:with-param name="remote" select="$remote"/> + </xsl:call-template> + <!-- list of metadata --> <xsl:call-template name="hits"> <xsl:with-param name="remote" select="$remote"/> @@ -462,7 +475,7 @@ /root/gui/session/userId=''">   <xsl:if test="count($metadata/link[@type='download'])>0"> - <b class="padded"><xsl:value-of select="'Data attached but you cannot download unless you Register'"/></b> + <xsl:copy-of select="/root/gui/strings/guestDownload/node()"/> </xsl:if> </xsl:when> <xsl:when test="$metadata/geonet:info/download='true'"> Modified: sandbox/BlueNetMEST/web/geonetwork/xsl/user-list.xsl =================================================================== --- sandbox/BlueNetMEST/web/geonetwork/xsl/user-list.xsl 2009-06-08 16:33:00 UTC (rev 4220) +++ sandbox/BlueNetMEST/web/geonetwork/xsl/user-list.xsl 2009-06-09 04:48:52 UTC (rev 4221) @@ -11,6 +11,7 @@ <xsl:call-template name="formLayout"> <xsl:with-param name="title" select="/root/gui/strings/userManagement"/> <xsl:with-param name="content"> + <button class="content" onclick="load('{/root/gui/locService}/user.get')"><xsl:value-of select="/root/gui/strings/newUser"/></button> <xsl:call-template name="form"/> </xsl:with-param> <xsl:with-param name="buttons"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |