16
Beta / This NEW TPL for build 272 allow one user to redefine his redirect login
« on: December 12, 2010, 12:42:01 AM »
on import the template create a new group ""can change redirect"
each user which belong this group can define the current folder as default on redirect login
after login, click on the user name allow to display the commands submenu

template attached
each user which belong this group can define the current folder as default on redirect login
after login, click on the user name allow to display the commands submenu

template attached
Quote
[]
......
<fieldset id='login'>
<legend><img src="/~img27"> {.!User.}</legend>
<center>
{.if not| %user% |<a href="~login">Login</a>|{:
<div><a href="#" style='font-size:medium;position:relative; top:5px; left:middle;'>%user%</a></div>
<div style='margin-top:0.5em;' class='hidden popup'>
<div id='folder-stats'></div>
{.if|{.can change pwd.} |{:
<button onclick='changePwd.call(this)' style='font-size:x-small;cursor:pointer;'>{.!Change password.}</button>
:}/if.}
{.if|{.can redirect.}|{:
<button onclick='var s=("{.encodeURI|%folder%.}");
$.post("?mode=section&id=ajax.changeredirect",{"redirect":s},getStdAjaxCB());'
style='font-size:x-small;cursor:pointer;'>{.!Set folder as default on login.}</button>
:}/if.}
</div>
:}/if not.}
</center>
</fieldset>
......
**********************************************************************************
[+special:alias]
can redirect=member of|can change redirect
[ajax.changeredirect|no log]
{.break|if={.not|{.can redirect.}.}|result=forbidden.}
{.if|{.postvar|redirect.}|
{:{.if|{.length|{.set account||redirect={.decodeuri|{.postvar|redirect.}.}.}/length.}|ok|failed.}:}
|failed
.}
**********************************************************************************
.......
// login menu appear when it gets focus
$('#login').focusin(function(evt){
inLogin = 1;
if (evt.target.getAttribute('type') == 'submit') return; // the submitter button won't expand the popup, but sets the flag to avoid the popup to be closed
$("#login .popup").slideDown();
}).focusout(function(evt){
inLogin = 0;
setTimeout(function(){
if (!inLogin)
$("#login .popup").fadeOut();
});
});
// search options appear when it gets focus
........