Author: orbiter
Date: 2008-02-19 00:49:03 +0100 (Tue, 19 Feb 2008)
New Revision: 4495

Modified:
   trunk/.classpath
   trunk/htroot/env/highslide.css
   trunk/htroot/js/highslide.js
   trunk/htroot/yacy/user/
   trunk/htroot/yacy/user/default.css
   trunk/htroot/yacy/user/ysearch.html
   trunk/htroot/yacy/user/ysearchitem.html
   trunk/htroot/yacysearch.html
   trunk/htroot/yacysearchitem.html
   trunk/source/de/anomic/plasma/plasmaParser.java
Log:
- some small changes to highslide integration to get it working... (does not 
work yet)
- performance enhancement for url list parser

Modified: trunk/.classpath
===================================================================
--- trunk/.classpath    2008-02-18 16:38:06 UTC (rev 4494)
+++ trunk/.classpath    2008-02-18 23:49:03 UTC (rev 4495)
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry 
excluding="env/|htdocsdefault/|proxymsg/|yacy/|env/|yacy/user/" kind="src" 
path="htroot"/>
-       <classpathentry excluding="user/" kind="src" path="htroot/yacy"/>
+       <classpathentry 
excluding="env/|htdocsdefault/|proxymsg/|yacy/|env/|yacy/user/|yacy/user/" 
kind="src" path="htroot"/>
+       <classpathentry excluding="user/|user/" kind="src" path="htroot/yacy"/>
        <classpathentry kind="src" path="htroot/env"/>
        <classpathentry kind="src" path="source"/>
+       <classpathentry kind="src" path="htroot/yacy/user"/>
        <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry kind="lib" path="lib/tar.jar"/>
        <classpathentry kind="lib" path="libx/axis-ant.jar"/>

Modified: trunk/htroot/env/highslide.css
===================================================================
--- trunk/htroot/env/highslide.css      2008-02-18 16:38:06 UTC (rev 4494)
+++ trunk/htroot/env/highslide.css      2008-02-18 23:49:03 UTC (rev 4495)
@@ -1,20 +1,20 @@
 /* highslide styles for rounded boxes, taken from highslide demo page */
 .highslide {
-          cursor: url(highslide/graphics/zoomin.cur), pointer;
+       cursor: pointer;
     outline: none;
 }
 .highslide-active-anchor img {
-                        visibility: hidden;
+       visibility: hidden;
 }
 .highslide img {
           border: 2px solid gray;
 }
 .highslide:hover img {
-                border: 2px solid white;
+       border: 2px solid white;
 }
 
 .highslide-wrapper {
-                  background: white;
+       background: white;
 }
 .highslide-image {
     border: 2px solid white;
@@ -43,7 +43,6 @@
     background-color: white;
     
     padding-left: 22px;
-    background-image: url(highslide/graphics/loader.white.gif);
     background-repeat: no-repeat;
     background-position: 3px 1px;
 }
@@ -61,11 +60,10 @@
 }
 
 a.highslide-full-expand {
-                       background: url(highslide/graphics/fullexpand.gif) 
no-repeat;
-                       display: block;
-                       margin: 0 10px 10px 0;
-                       width: 34px;
-                       height: 34px;
+       display: block;
+       margin: 0 10px 10px 0;
+       width: 34px;
+       height: 34px;
 }
 
 /* These must always be last */

Modified: trunk/htroot/js/highslide.js
===================================================================
--- trunk/htroot/js/highslide.js        2008-02-18 16:38:06 UTC (rev 4494)
+++ trunk/htroot/js/highslide.js        2008-02-18 23:49:03 UTC (rev 4495)
@@ -1,4 +1,4 @@
-       
/******************************************************************************
+/******************************************************************************
 Name:    Highslide JS
 Version: 3.3.9 (February 15 2008)
 Config:  default +positioning +events +unobtrusive +transitions +inline +ajax 
+iframe +flash
@@ -28,8 +28,7 @@
 
 var hs = {
 
-// Apply your own settings here, or override them in the html file.  
-graphicsDir : '/env/grafics/highslide/',
+// Apply your own settings here, or override them in the html file.
 restoreCursor : 'zoomout.cur', // necessary for preload
 expandSteps : 10, // number of steps in zoom. Each step lasts for 
duration/step milliseconds.
 expandDuration : 250, // milliseconds
@@ -64,7 +63,6 @@
 dimmingOpacity: 0, // Lightbox style dimming background
 dimmingDuration: 50, // 0 for instant dimming
 
-
 // HTML extension
 
 previousText : 'Previous',
@@ -438,10 +436,7 @@
        hs.dimmer.style.display = '';
        hs.setDimmerSize();
        hs.dimmer.owner = exp.key;
-       if (hs.geckoMac && hs.dimmingGeckoFix) 
-               hs.dimmer.style.background = 'url('+ hs.graphicsDir + 
'geckodimmer.png)';               
-       else
-               hs.fade(hs.dimmer, 0, exp.dimmingOpacity, hs.dimmingDuration); 
+       hs.fade(hs.dimmer, 0, exp.dimmingOpacity, hs.dimmingDuration); 
 },
 unDim : function(key) {
        if (!hs.dimmer) return;
@@ -708,10 +703,6 @@
        
        // preload outlines
        new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} );
-       
-       
-       // preload cursor
-       var cur = hs.createElement('img', { src: hs.graphicsDir + 
hs.restoreCursor });
 },
 
 
@@ -824,17 +815,13 @@
 };
 
 hs.Outline.prototype = {
-preloadGraphic : function () { 
-       var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ 
this.outlineType +".png";
-                               
+preloadGraphic : function () {
        var appendTo = hs.safari ? hs.container : null;
        this.graphic = hs.createElement('img', null, { position: 'absolute', 
left: '-9999px', 
                top: '-9999px' }, appendTo, true); // for onload trigger
        
        var pThis = this;
        this.graphic.onload = function() { pThis.onGraphicLoad(); };
-       
-       this.graphic.src = src;
 },
 
 onGraphicLoad : function () {
@@ -857,8 +844,6 @@
                                        }, 
                                div,
                                true);
-                       } else {
-                               hs.setStyles(this.td[i], { background: 'url('+ 
this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'});
                        }
                        
                        if (window.opera && (i == 3 || i ==5)) 
@@ -1884,7 +1869,7 @@
        if (this.isImage) {
                this.content.title = hs.restoreTitle;
                
-               hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ 
hs.graphicsDir + hs.restoreCursor +'), pointer';
+               hs.styleRestoreCursor = 'pointer';
                if (hs.ie && hs.ieVersion() < 6) hs.styleRestoreCursor = 'hand';
                this.content.style.cursor = hs.styleRestoreCursor;
        }


Property changes on: trunk/htroot/yacy/user
___________________________________________________________________
Name: svn:ignore
   + 
*.class


Modified: trunk/htroot/yacy/user/default.css
===================================================================
--- trunk/htroot/yacy/user/default.css  2008-02-18 16:38:06 UTC (rev 4494)
+++ trunk/htroot/yacy/user/default.css  2008-02-18 23:49:03 UTC (rev 4495)
@@ -528,3 +528,24 @@
        left: 0px;
        top: 0px;
 }
+
+.thumbcontainer {
+  margin: 2px;
+  width: 100px;
+  height: 160px; /* 96px thumbnail + some lines of text */
+  float: left;
+}
+
+a.thumblink {
+  display:block;
+  width: 96px;
+  height: 96px;
+  margin: 2px;
+  line-height: 96px;
+  text-align: center;
+  overflow: hidden;
+}
+
+.thumblink img {
+  vertical-align: bottom;
+}

Modified: trunk/htroot/yacy/user/ysearch.html
===================================================================
--- trunk/htroot/yacy/user/ysearch.html 2008-02-18 16:38:06 UTC (rev 4494)
+++ trunk/htroot/yacy/user/ysearch.html 2008-02-18 23:49:03 UTC (rev 4495)
@@ -11,12 +11,11 @@
   <meta name="keywords" content="" />
   <meta name="description" content="" />
   <link href="default.css" rel="stylesheet" type="text/css" />
-     
   <script type="text/javascript" src="/js/ajax.js"></script>
   <script type="text/javascript" src="/js/xml.js"></script>
   <script type="text/javascript" src="/js/yacysearch.js"></script>
   <script type="text/javascript" src="/js/highslide.js"></script>
-  <link rel="stylesheet" type="text/css" media="screen" 
href="env/highslide.css" />
+  <link rel="stylesheet" type="text/css" media="screen" 
href="/env/highslide.css" />
   <script type="text/javascript">hs.outlineType = 'rounded-white';</script>
 </head>
 <body>

Modified: trunk/htroot/yacy/user/ysearchitem.html
===================================================================
--- trunk/htroot/yacy/user/ysearchitem.html     2008-02-18 16:38:06 UTC (rev 
4494)
+++ trunk/htroot/yacy/user/ysearchitem.html     2008-02-18 23:49:03 UTC (rev 
4495)
@@ -12,8 +12,8 @@
     <a href="#[href]#" class="thumblink" onclick="return hs.expand(this)">
       <img src="/ViewImage.png?maxwidth=96&maxheight=96&code=#[code]#" 
alt="#[name]#">
     </a>
-    <div class="highslide-caption">#[name]#</div>
-  <div class="TableCellDark"><a href="#[href]#">#[name]#</a></div>
+    <div class="highslide-caption"><a href="#[href]#">#[name]#</a></div>
+    <div class="snippet"><a href="#[href]#">#[name]#</a></div>
   </div>
   #{/items}#
   ::

Modified: trunk/htroot/yacysearch.html
===================================================================
--- trunk/htroot/yacysearch.html        2008-02-18 16:38:06 UTC (rev 4494)
+++ trunk/htroot/yacysearch.html        2008-02-18 23:49:03 UTC (rev 4495)
@@ -8,7 +8,7 @@
   <script type="text/javascript" src="/js/xml.js"></script>
   <script type="text/javascript" src="/js/yacysearch.js"></script>
   <script type="text/javascript" src="/js/highslide.js"></script>
-  <link rel="stylesheet" type="text/css" media="screen" 
href="env/highslide.css" />
+  <link rel="stylesheet" type="text/css" media="screen" 
href="/env/highslide.css" />
   <script type="text/javascript">hs.outlineType = 'rounded-white';</script>
 </head>
 <body id="yacysearch"#(input)#:: 
onload="document.getElementById('search').focus()":: 
onload="document.getElementById('search').focus()"#(/input)#>

Modified: trunk/htroot/yacysearchitem.html
===================================================================
--- trunk/htroot/yacysearchitem.html    2008-02-18 16:38:06 UTC (rev 4494)
+++ trunk/htroot/yacysearchitem.html    2008-02-18 23:49:03 UTC (rev 4495)
@@ -25,8 +25,8 @@
     <a href="#[href]#" class="thumblink" onclick="return hs.expand(this)">
       <img src="/ViewImage.png?maxwidth=96&maxheight=96&code=#[code]#" 
alt="#[name]#">
     </a>
-    <div class="highslide-caption">#[name]#</div>
-  <div class="TableCellDark"><a href="#[href]#">#[name]#</a></div>
+    <div class="highslide-caption"><a href="#[href]#">#[name]#</a></div>
+    <div class="TableCellDark"><a href="#[href]#">#[name]#</a></div>
   </div>
   #{/items}#
   ::

Modified: trunk/source/de/anomic/plasma/plasmaParser.java
===================================================================
--- trunk/source/de/anomic/plasma/plasmaParser.java     2008-02-18 16:38:06 UTC 
(rev 4494)
+++ trunk/source/de/anomic/plasma/plasmaParser.java     2008-02-18 23:49:03 UTC 
(rev 4495)
@@ -788,12 +788,13 @@
     
     static Map<yacyURL, String> allSubpaths(Set<?> links) {
         // links is either a Set of Strings (urls) or a Set of 
htmlFilterImageEntries
-        HashMap<yacyURL, String> v = new HashMap<yacyURL, String>();
+        HashSet<String> h = new HashSet<String>();
         Iterator<?> i = links.iterator();
         Object o;
         yacyURL url;
         String u;
         int pos;
+        int l;
         while (i.hasNext()) try {
             o = i.next();
             if (o instanceof yacyURL) url = (yacyURL) o;
@@ -805,15 +806,26 @@
             }
             u = url.toNormalform(true, true);
             if (u.endsWith("/")) u = u.substring(0, u.length() - 1);
-            pos = u.lastIndexOf("/");
+            pos = u.lastIndexOf('/');
             while (pos > 8) {
+                l = u.length();
                 u = u.substring(0, pos + 1);
-                url = new yacyURL(u, null);
-                if (!(v.containsKey(url))) v.put(url, "sub");
+                h.add(u);
                 u = u.substring(0, pos);
-                pos = u.lastIndexOf("/");
+                assert (u.length() < l) : "u = " + u;
+                pos = u.lastIndexOf('/');
             }
         } catch (MalformedURLException e) {}
+        // now convert the strings to yacyURLs
+        i = h.iterator();
+        HashMap<yacyURL, String> v = new HashMap<yacyURL, String>();
+        while (i.hasNext()) {
+            u = (String) i.next();
+            try {
+                url = new yacyURL(u, null);
+                v.put(url, "sub");
+            } catch (MalformedURLException e) {}
+        }
         return v;
     }
     

_______________________________________________
YaCy-svn mailing list
YaCy-svn@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/yacy-svn

Antwort per Email an