[yelp] Dropped jquery-ui, using CSS transitions



commit bc5deb2253f9e3454b7db291d2e45753827701ff
Author: Shaun McCance <shaunm gnome org>
Date:   Thu Oct 13 14:01:45 2011 -0400

    Dropped jquery-ui, using CSS transitions
    
    We were only using it to be able to animate background colors.

 configure.ac                        |    1 -
 data/Makefile.am                    |    2 +-
 data/js/Makefile.am                 |    4 ----
 data/js/jquery-ui-1.8.custom.min.js |   26 --------------------------
 data/xslt/yelp-common.xsl.in        |   23 +++++++++++++----------
 5 files changed, 14 insertions(+), 42 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0cff9c2..10b05ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -207,7 +207,6 @@ data/icons/hicolor/16x16/status/Makefile
 data/icons/hicolor/scalable/Makefile
 data/icons/hicolor/scalable/actions/Makefile
 data/icons/hicolor/scalable/status/Makefile
-data/js/Makefile
 data/xslt/Makefile
 data/xslt/db2html.xsl
 data/xslt/info2html.xsl
diff --git a/data/Makefile.am b/data/Makefile.am
index 6ad2e1d..6892449 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = dtd icons js xslt
+SUBDIRS = dtd icons xslt
 
 #This has to be defined, because GSETTINGS_CHECK_RULE adds to it
 MOSTLYCLEANFILES =
diff --git a/data/xslt/yelp-common.xsl.in b/data/xslt/yelp-common.xsl.in
index bac81ca..cbdad5b 100644
--- a/data/xslt/yelp-common.xsl.in
+++ b/data/xslt/yelp-common.xsl.in
@@ -89,6 +89,9 @@ div.body {
   padding: 0 0 12px 0;
   border: none;
 }
+.current-location-hash div.hgroup {
+  background-color: </xsl:text><xsl:value-of select="$color.gray_background"/><xsl:text>
+}
 </xsl:text>
 <xsl:call-template name="yelp.css.custom"/>
 </xsl:template>
@@ -105,16 +108,16 @@ div.body {
 <xsl:text>
 $(document).ready (function () {
   if (location.hash != '') {
-    $('#' + location.hash).find('div.hgroup').css({
-      backgroundColor: '</xsl:text><xsl:value-of select="$color.yellow_background"/><xsl:text>'
-    }).animate({
-      backgroundColor: '</xsl:text><xsl:value-of select="$color.gray_background"/><xsl:text>'
-    }, 8000);
-    $('#' + location.hash).css({
-      backgroundColor: '</xsl:text><xsl:value-of select="$color.yellow_background"/><xsl:text>'
-    }).animate({
-      backgroundColor: '</xsl:text><xsl:value-of select="$color.background"/><xsl:text>'
-    }, 4000);
+    var sect = $('#' + location.hash);
+    var hgrp = sect.find('div.hgroup:first')
+    sect.css('background-color',  '</xsl:text><xsl:value-of select="$color.yellow_background"/><xsl:text>');
+    hgrp.css('background-color',  '</xsl:text><xsl:value-of select="$color.yellow_background"/><xsl:text>')
+    window.setTimeout(function () {
+      sect.css('-webkit-transition', 'background-color 2s linear')
+      .css('background-color',  '</xsl:text><xsl:value-of select="$color.background"/><xsl:text>');
+      hgrp.css('-webkit-transition', 'background-color 2s linear')
+      .css('background-color',  '</xsl:text><xsl:value-of select="$color.gray_background"/><xsl:text>');
+    }, 200);
   }
 });
 </xsl:text>



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