From 25b972bee2a708ab794cabf44f54163eb2edc787 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Fri, 11 Nov 2011 17:00:05 +0100 Subject: [PATCH 1/3] js: start liveupdate after ping returns to stop continuos welcome message As liveupdate start before ping but returns after, it overwrite session edit by ping, restoring already shown and deleted notices and infos --- js/main.js | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/js/main.js b/js/main.js index 15c5b5d1f1..9832b2cbc5 100644 --- a/js/main.js +++ b/js/main.js @@ -168,28 +168,35 @@ function NavUpdate() { - if($('#live-network').length) { src = 'network'; liveUpdate(); } - if($('#live-profile').length) { src = 'profile'; liveUpdate(); } - if($('#live-community').length) { src = 'community'; liveUpdate(); } - if($('#live-notes').length) { src = 'notes'; liveUpdate(); } - if($('#live-display').length) { - if(liking) { - liking = 0; - window.location.href=window.location.href - } - } - if($('#live-photos').length) { - if(liking) { - liking = 0; - window.location.href=window.location.href - } - } - if(! stopped) { $.get("ping",function(data) { $(data).find('result').each(function() { // send nav-update event $('nav').trigger('nav-update', this); + + + // start live update + + if($('#live-network').length) { src = 'network'; liveUpdate(); } + if($('#live-profile').length) { src = 'profile'; liveUpdate(); } + if($('#live-community').length) { src = 'community'; liveUpdate(); } + if($('#live-notes').length) { src = 'notes'; liveUpdate(); } + if($('#live-display').length) { + if(liking) { + liking = 0; + window.location.href=window.location.href + } + } + if($('#live-photos').length) { + if(liking) { + liking = 0; + window.location.href=window.location.href + } + } + + + + }); }) ; } From 1ff8cddeb6b9eb53c2714893c61e378e8efc2768 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Fri, 11 Nov 2011 17:33:32 +0100 Subject: [PATCH 2/3] oembed: replace base64 url for iframe with url site/oembed/url_encoded fix http://bugs.friendika.com/view.php?id=191 --- include/oembed.php | 6 ++++-- mod/oembed.php | 13 +++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 mod/oembed.php diff --git a/include/oembed.php b/include/oembed.php index 3e86627e4d..7c0da45940 100644 --- a/include/oembed.php +++ b/include/oembed.php @@ -56,7 +56,7 @@ function oembed_fetch_url($embedurl){ function oembed_format_object($j){ $embedurl = $j->embedurl; - $jhtml = oembed_iframe($j->html,$j->width,$j->height ); + $jhtml = oembed_iframe($j->embedurl,$j->width,$j->height ); $ret=""; switch ($j->type) { case "video": { @@ -116,7 +116,9 @@ function oembed_iframe($src,$width,$height) { $height = intval($height) + 80; $width = intval($width) + 40; - $s = 'data:text/html;base64,' . base64_encode('' . $src . ''); + $a = get_app(); + + $s = $a->get_baseurl()."/oembed/".base64url_encode($src); return ''; } diff --git a/mod/oembed.php b/mod/oembed.php new file mode 100644 index 0000000000..25995813a3 --- /dev/null +++ b/mod/oembed.php @@ -0,0 +1,13 @@ +argc == 2){ + echo ""; + $url = base64url_decode($a->argv[1]); + $j = oembed_fetch_url($url); + echo $j->html; + echo ""; + } + killme(); +} From e853549bc8a2d37b1be813396d7adb217cbda921 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Fri, 11 Nov 2011 17:34:15 +0100 Subject: [PATCH 3/3] duepuntozero: add notice and info popups css style --- view/theme/duepuntozero/style.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 98b8cd43e2..8677563020 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -2840,3 +2840,15 @@ a.mail-list-link { .acpopupitem.selected { color: #FFFFFF; background: #3465A4; } + +/* popup notifications */ +div.jGrowl div.notice { + background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; + color: #ffffff; + padding-left: 58px; +} +div.jGrowl div.info { + background: #364e59 url("../../../images/icons/48/info.png") no-repeat 5px center; + color: #ffffff; + padding-left: 58px; +}