[Xfce4-commits] <postler:master> Only show extra headers when More is clicked
Christian Dywan
noreply at xfce.org
Sun Mar 27 17:34:01 CEST 2011
Updating branch refs/heads/master
to 0f195da174dd4f64297c1e719d2c5f44d6430d68 (commit)
from e05671ebe5ef9733f0b4808e5894dd4b4aef550b (commit)
commit 0f195da174dd4f64297c1e719d2c5f44d6430d68
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun Mar 27 13:56:46 2011 +0200
Only show extra headers when More is clicked
Fixes: https://bugs.launchpad.net/postler/+bug/725666
postler/postler-content.vala | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index 7cf230e..5f0b3d6 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -110,12 +110,9 @@ public class Postler.Content : WebKit.WebView {
background-color: Window !important; color: WindowText !important;
font: 9pt sans-serif !important;
}
- .headers .extra_headers {
+ .headers #extra_headers {
display: none;
}
- .headers:hover .extra_headers {
- display: inline;
- }
.body {
background-color: Window !important; color: WindowText !important;
font: 10pt sans-serif !important;
@@ -1098,9 +1095,9 @@ public class Postler.Content : WebKit.WebView {
<b>%s</b> %s<br>
%s
%s
- %s <span style="float: right;"><a href="#">%s</a></span>
+ %s <span style="float: right;"><a href="#more" id="more">%s</a></span>
<b>%s</b> %s <br>
- <span class="extra_headers">
+ <span id="extra_headers">
%s
%s
%s
@@ -1155,6 +1152,17 @@ public class Postler.Content : WebKit.WebView {
return true;
}
+ if (uri.has_suffix ("#more")) {
+ decision.ignore ();
+ settings.set ("enable-scripts", true);
+ execute_script ("""
+ document.getElementById ('more').style.display = 'none';
+ document.getElementById ('extra_headers').style.display = 'block';
+ """);
+ settings.set ("enable-scripts", false);
+ return true;
+ }
+
if (uri != null && uri.has_prefix ("about:"))
return false;
More information about the Xfce4-commits
mailing list