Author: duncan
Date: Tue Jan  2 18:20:46 2007
New Revision: 8912

Added:
   branches/rel-1/freevo/src/www/htdocs/images/library/music_small.png   
(contents, props changed)
   branches/rel-1/freevo/src/www/htdocs/images/library/www-mp-movies.png   
(contents, props changed)
   branches/rel-1/freevo/src/www/htdocs/images/library/www-mp-music.png   
(contents, props changed)
   branches/rel-1/freevo/src/www/htdocs/images/library/www-mp-pictures.png   
(contents, props changed)
   branches/rel-1/freevo/src/www/htdocs/images/library/www-mp-tv.png   
(contents, props changed)
Modified:
   branches/rel-1/freevo/src/www/htdocs/library.rpy
   branches/rel-1/freevo/src/www/htdocs/styles/main.css
   branches/rel-1/freevo/src/www/web_types.py

Log:
Applied webserver patches From Wout Clymans
Added new images for webserver


Added: branches/rel-1/freevo/src/www/htdocs/images/library/music_small.png
==============================================================================
Binary file. No diff available.

Added: branches/rel-1/freevo/src/www/htdocs/images/library/www-mp-movies.png
==============================================================================
Binary file. No diff available.

Added: branches/rel-1/freevo/src/www/htdocs/images/library/www-mp-music.png
==============================================================================
Binary file. No diff available.

Added: branches/rel-1/freevo/src/www/htdocs/images/library/www-mp-pictures.png
==============================================================================
Binary file. No diff available.

Added: branches/rel-1/freevo/src/www/htdocs/images/library/www-mp-tv.png
==============================================================================
Binary file. No diff available.

Modified: branches/rel-1/freevo/src/www/htdocs/library.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/library.rpy    (original)
+++ branches/rel-1/freevo/src/www/htdocs/library.rpy    Tue Jan  2 18:20:46 2007
@@ -398,23 +398,23 @@
                         if y:
                             image_link = self.convert_dir(mydir + str(y))
                         else:
-                            image_link = "images/library/music.png"
+                            image_link = "images/library/www-mp-music.png"
                         mydirlink = '<a href="'+ action_script 
+'?media='+action_mediatype+'&dir='+urllib.quote(mydir)+'">'\
-                            +'<img src="' + image_link + '" height="200px" 
width="200px" /><br />'+mydispdir+'</a>'
+                            +'<img src="' + image_link + '" class="folder" 
height="200px" width="200px" /><br />'+mydispdir+'</a>'
                     ### show movie cover
                     elif action_mediatype == "movies" or action_mediatype == 
"rectv":
                         y = self.cover_filter(mydir)
                         if y:
                             image_link = self.convert_dir(mydir + str(y))
                         else:
-                            image_link = "images/library/movies.png"
+                            image_link = "images/library/www-mp-movies.png"
                         mydirlink = '<a 
href="'+action_script+'?media='+action_mediatype+'&dir='+urllib.quote(mydir)+'">'\
-                            +'<img src="' + image_link + '" height="200px" 
width="200px" /><br />'+mydispdir+'</a>'
+                            +'<img src="' + image_link + '" class="folder" 
height="200px" width="200px" /><br />'+mydispdir+'</a>'
                     ### show image cover
                     elif action_mediatype == "images":
-                        image_link = "images/library/images.png"
+                        image_link = "images/library/www-mp-pictures.png"
                         mydirlink = '<a 
href="'+action_script+'?media='+action_mediatype+'&dir='+urllib.quote(mydir)+'">'\
-                            +'<img src="'+image_link+'" height="200px" 
width="200px" /><br />'+mydispdir+'</a>'
+                            +'<img src="'+image_link+'" class="folder" 
height="200px" width="200px" /><br />'+mydispdir+'</a>'
 
                     fv.tableCell(mydirlink, 'class="basic" colspan="1"')
                     if i == 2:
@@ -467,9 +467,9 @@
                         size = (info['width'], info['height'])
                         (scaled_image, new_size) = 
self.get_scaled_image_and_size(filepath, size)
                         image_link = self.convert_dir(filepath)
-                        fv.tableCell('<a 
href="javascript:openfoto(\''+image_link+'\','+str(size[0])+','+str(size[1])+')">'\
+                        fv.tableCell('<div class="image"><a 
href="javascript:openfoto(\''+image_link+'\','+str(size[0])+','+str(size[1])+')">'\
                             +'<img src="'+scaled_image+'" 
height="'+str(new_size[1])+'px" width="'+str(new_size[0])+'px" />'\
-                            +'<br />'+Unicode(title)+'</a>', 
'class="'+status+'" colspan="1"')
+                            +'<br />'+Unicode(title)+'</a></div>', 
'class="'+status+'" colspan="1"')
                     ### show movie
                     elif action_mediatype == "movies" or action_mediatype == 
"rectv":
                         if os.path.exists(jpg_file):
@@ -479,19 +479,22 @@
                             size = (image_info['width'], image_info['height'])
                             new_size = self.resize_image(image_link, size)
                             image = '<img src="'+image_link+'" 
height="'+str(new_size[1])+'px" width="'+str(new_size[0])+'px" /><br />'
+                        else:
+                            image = '<img src="images/library/movies.png" 
height="200px" width="200px" /><br />'
                         fv.tableCell('<a onclick="info_click(this, event)" 
id="'+filepath+'">'\
                             +image+Unicode(title)+'</a>',\
                             'class="'+status+'" colspan="1"')
                     ### show music
                     elif action_mediatype == "music":
                         try:
-                            title = 
Unicode(info['trackno']+"-"+info['artist']+"-"+info['title'])
+                            title = Unicode(info['trackno']+" - 
"+info['artist']+" - "+info['title'])
                         except:
                             title = Unicode(file)
                         if len(title) > 45:
                             title = "%s[...]%s" % (title[:20], 
title[len(title)-20:])
+                        image = '<img src="images/library/music_small.png" 
height="30px" width="30px" />'
                         fv.tableCell('<a onclick="info_click(this, event)" 
id="'+filepath+'">'\
-                            +title+'</a>', 'class="'+status+'" colspan="1"')
+                            +image+title+'</a>', 'class="'+status+'" 
colspan="1"')
                     else:
                         fv.tableCell(file, 'class="'+status+'" colspan="1"')
                     if suppressaction:

Modified: branches/rel-1/freevo/src/www/htdocs/styles/main.css
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/styles/main.css        (original)
+++ branches/rel-1/freevo/src/www/htdocs/styles/main.css        Tue Jan  2 
18:20:46 2007
@@ -98,6 +98,16 @@
 TD.basic { 
     background: #2A577E; 
     color: white; 
+    text-align: left; 
+    border: none;
+}
+
+img.folder {
+    border: none;
+}
+TD.back { 
+    background: #2A577E; 
+    color: white; 
     text-align: left 
 }
 
@@ -124,13 +134,49 @@
                  padding-right: 1em; 
                  }
 
+TD.item { 
+    background: #2A577E; 
+    color: white; 
+    text-align: left 
+    border: none;
+}
+
+div.item a {
+    background: #0B1C52;
+    color: white;
+}
+
+div.image a:hover {
+    color:#cccccc;
+}
 
-td.favorite a, td.scheduled a, td.basic a { color: white;
+div.image { 
+    background: #0B1C52; 
+    color: white; 
+    text-align: center;
+    float: left;
+    margin:             9px;
+    padding:            16px;
+    border:             3px outset #0B1C52;
+    -moz-border-radius: 9px;
+}
+
+td.favorite a, td.scheduled a, td.back a { color: white;
+                 border: none; }
+
+
+td.favorite a, td.scheduled a, td.back a { color: white;
                  border: none; }
 
-td.favorite a:hover, td.scheduled a:hover, td.basic a:hover { color: white;
+td.favorite a:hover, td.scheduled a:hover, td.back a:hover { color: white;
                  border-bottom: 1px solid #fff ; }
 
+td.basic a { color: white;
+                 border: none; }
+
+td.basic a:hover { color: #cccccc;
+                 border: none;}
+
 
 TD.favorite { 
     background: #006666; 

Modified: branches/rel-1/freevo/src/www/web_types.py
==============================================================================
--- branches/rel-1/freevo/src/www/web_types.py  (original)
+++ branches/rel-1/freevo/src/www/web_types.py  Tue Jan  2 18:20:46 2007
@@ -442,7 +442,10 @@
         print 'printImagePopup(self)'
         self.res += """<script language="JavaScript" type="text/javascript" 
style="display:none;">
         function openfoto(loc,width,height){
-            var 
params="toolbar=no,location=no,status=no,menubar=no,resizable=no,scrollbars=no,top=0,left=0,width="+width+",height="+height;
+            if (width >= screen.width || height >= screen.height) {
+                scrollbars = 'yes';
+            }
+            var 
params="toolbar=no,location=no,status=no,menubar=no,resizable=no,scrollbars="+scrollbars+",top=0,left=0,width="+width+",height="+height;
             foto = window.open("fileinfo.rpy?img="+loc,"Images",params);
         }
         </script> """
@@ -470,6 +473,7 @@
            <!--
              // AJAX Functions
              var xmlHttp = false;
+             var remoteWin = 0;
 
              function getXMLHttpObject () {
                if (window.XMLHttpRequest) {
@@ -502,8 +506,11 @@
              }
             
             function openremote(){
+              if(remoteWin) {
+                if(!remoteWin.closed) {remoteWin.focus();}
+                }
               var 
params="toolbar=no,location=no,status=no,menubar=no,resizable=no,scrollbars=no,top=0,left=0";
-              remote = window.open("webremote.rpy","WebRemote",params);
+              remoteWin = window.open("webremote.rpy","WebRemote",params);
             }
            -->
            </script>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to