From: Sébastien SAUVAGE Date: Wed, 27 Feb 2013 17:24:07 +0000 (+0100) Subject: After clicking save/cancel on a link, scroll to the link itself. X-Git-Tag: v0.0.41beta~18 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=b342b2a4c70e4771845a68426ac15639ca74292e;hp=b2877611c329725a961b24fa18114f2fd41873b6;p=github%2Fshaarli%2FShaarli.git After clicking save/cancel on a link, scroll to the link itself. --- diff --git a/index.php b/index.php index 0590b2f6..1ac5187b 100644 --- a/index.php +++ b/index.php @@ -1437,6 +1437,7 @@ function renderPage() // If we are called from the bookmarklet, we must close the popup: if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo ''; exit; } $returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' ); + $returnurl .= '#'.smallHash($linkdate); // Scroll to the link which has been edited. header('Location: '.$returnurl); // After saving the link, redirect to the page the user was on. exit; } @@ -1447,6 +1448,7 @@ function renderPage() // If we are called from the bookmarklet, we must close the popup; if (isset($_GET['source']) && $_GET['source']=='bookmarklet') { echo ''; exit; } $returnurl = ( isset($_POST['returnurl']) ? $_POST['returnurl'] : '?' ); + $returnurl .= '#'.smallHash($_POST['lf_linkdate']); // Scroll to the link which has been edited. header('Location: '.$returnurl); // After canceling, redirect to the page the user was on. exit; } diff --git a/tpl/linklist.html b/tpl/linklist.html index 267e13bc..45bd478f 100644 --- a/tpl/linklist.html +++ b/tpl/linklist.html @@ -30,6 +30,7 @@