[art-web] [views/backgrounds] highlight the users current resolution



commit ab4d7bcba4662355bd89e64812aa1d60f130ca09
Author: Thomas Wood <thos gnome org>
Date:   Wed Dec 30 12:06:31 2009 +0000

    [views/backgrounds] highlight the users current resolution
    
    Highlight the current screen resolution in the resolution filter list

 views/backgrounds.php |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/views/backgrounds.php b/views/backgrounds.php
index eb0da8a..2fc5797 100644
--- a/views/backgrounds.php
+++ b/views/backgrounds.php
@@ -103,6 +103,19 @@ function selected ($a, $b)
     <?php echo $name ?></option>
   <?php endforeach ?>
   </select>
+  <script type="text/javascript">
+  /* highlight the user's screen resolution */
+  var options = document.forms[0].resolution.options;
+  var screenres = screen.width + 'x' + screen.height;
+  for (var i = 0; i < options.length; i++)
+  {
+    if (options[i].text == screenres)
+    {
+      options[i].text = options[i].text + ' *'
+      break;
+    }
+  }
+  </script>
   </label>
 
   <?php if ($search_text): ?>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]