After clicking save/cancel on a link, scroll to the link itself.
This commit is contained in:
parent
b2877611c3
commit
b342b2a4c7
2 changed files with 3 additions and 0 deletions
|
@ -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 '<script language="JavaScript">self.close();</script>'; 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 '<script language="JavaScript">self.close();</script>'; 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;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<ul>
|
||||
{loop="links"}
|
||||
<li{if="$value.class"} class="{$value.class}"{/if}>
|
||||
<a name="{$value.linkdate|smallHash}" id="{$value.linkdate|smallHash}"></a>
|
||||
<div class="thumbnail">{$value.url|thumbnail}</div>
|
||||
<div class="linkcontainer">
|
||||
{if="isLoggedIn()"}
|
||||
|
|
Reference in a new issue