Browse Source

- Add little help box in the Login form

pull/16/head
Jaussoin Timothée 13 years ago
parent
commit
7802f39dec
  1. 7
      system/Widget/widgets/Chat/chat.css
  2. 22
      system/Widget/widgets/Login/Login.php
  3. BIN
      system/Widget/widgets/Login/img/beaker.png
  4. BIN
      system/Widget/widgets/Login/img/envelope.png
  5. BIN
      system/Widget/widgets/Login/img/facebook.png
  6. BIN
      system/Widget/widgets/Login/img/jabber.png
  7. 43
      system/Widget/widgets/Login/login.css
  8. 5
      system/Widget/widgets/Login/login.js
  9. 2
      system/Widget/widgets/Logout/Logout.php

7
system/Widget/widgets/Chat/chat.css

@ -145,12 +145,13 @@
#chats .chat .panel .text textarea {
width: 100%;
border: 0px;
padding: 2px;
padding: 0.2em;
overflow: auto;
background-color: white;
resize: none;
height: 17px;
line-height: 17px;
height: 1em;
line-height: 1em;
font-size: 1em;
}
#chats .chat .panel .text textarea:focus {

22
system/Widget/widgets/Login/Login.php

@ -282,6 +282,25 @@ class Login extends WidgetBase {
</div>
<input style="display: none;" type="submit" id="submitb" name="submitb" value="submit"/>
<div class="clear"></div>
<ul id="loginhelp">
<li id="jabber"><?php echo t('You can login using your favorite Jabber account')?>
<a href="#" onclick="fillExample('demonstration@movim.eu', 'demonstration');">
<?php echo t('or with our demonstration account'); ?>
</a>
</li>
<li id="gmail">
<?php echo t('%sGmail accounts are also compatible%s but are not fully supported',
'<a href="#" onclick="fillExample(\'your.id@gmail.com \', \'\');">', '</a>')?>
</li>
<li id="facebook">
<?php echo t('You can login with Facebook (chat only) using %s your.id@chat.facebook.com %s and your password',
'<a href="#" onclick="fillExample(\'your.id@chat.facebook.com \', \'\');">', '</a>'); ?>
</li>
</ul>
<iframe id="passwordiframe" name="passwordiframe" style="display: none;"></iframe>
<div id="warning"><?php echo $this->displayWarning($_GET['err'], true); ?></div>
@ -296,7 +315,8 @@ class Login extends WidgetBase {
<?php echo t('Create one !'); ?>
</a>
</div>
<div class="clear"></div>
<div class="clear"></div>
</form>
<?php

BIN
system/Widget/widgets/Login/img/beaker.png

After

Width: 22  |  Height: 22  |  Size: 316 B

BIN
system/Widget/widgets/Login/img/envelope.png

After

Width: 22  |  Height: 22  |  Size: 336 B

BIN
system/Widget/widgets/Login/img/facebook.png

After

Width: 22  |  Height: 22  |  Size: 259 B

BIN
system/Widget/widgets/Login/img/jabber.png

After

Width: 22  |  Height: 22  |  Size: 616 B

43
system/Widget/widgets/Login/login.css

@ -16,7 +16,7 @@ body {
background-image: url(img/logo.png);
background-repeat: no-repeat;
background-position: center 10%;
background-position: center 1em;
background-size: auto auto;
padding-top: 40%;
@ -54,7 +54,11 @@ body {
margin: 0 auto;
padding: 0px;
width: 100%;
min-height: 40px;
min-height: 2.5em;
}
#loginpage #connectform .element:last-child {
min-height: 1em;
}
#loginpage #connectform .element input {
@ -106,14 +110,6 @@ body {
color: white;
}
#connectform a[name=submit]:active {
/*background: linear-gradient(top, #274950 0%, #455E74 2px, #455E74 32px, #376068 100%);
background: -moz-linear-gradient(top, #274950 0%, #455E74 2px, #455E74 32px, #376068 100%);
background: -webkit-linear-gradient(top, #274950 0%, #455E74 2px, #455E74 32px, #376068 100%);
background: -o-linear-gradient(top, #274950 0%, #455E74 2px, #455E74 32px, #376068 100%);
background-color: #455E74;*/
}
#connectform a[name=submit]:before {
color: white;
}
@ -123,6 +119,33 @@ body {
text-align: center;
}
#loginpage #loginhelp {
list-style-type: none;
color: white;
line-height: 1.2em;
text-align: justify;
transition: height 1s ease;
height: 0em;
overflow: hidden;
}
#loginpage #loginhelp li {
height: 2.5em;
background-repeat: no-repeat;
background-image: url(img/beaker.png);
padding-left: 2.5em;
background-position: 0.2em center;
margin: 0.5em 0em;
}
#loginpage #connectform:hover > #loginhelp {
height: 9em;
}
#loginpage #loginhelp li#jabber { background-image: url(img/jabber.png); }
#loginpage #loginhelp li#gmail { background-image: url(img/envelope.png); }
#loginpage #loginhelp li#facebook { background-image: url(img/facebook.png); }
#footer {
display: none;
}

5
system/Widget/widgets/Login/login.js

@ -9,3 +9,8 @@ function loginButtonSet(val, loading) {
else
document.querySelector('#submit').className = 'button icon yes';
}
function fillExample(login, pass) {
document.querySelector('#login').value = login;
document.querySelector('#pass').value = pass;
}

2
system/Widget/widgets/Logout/Logout.php

@ -98,7 +98,7 @@ class Logout extends WidgetBase
$pd = new \modl\PresenceDAO();
$p = $pd->getPresence($this->user->getLogin(), $session['ressource']);
$html = '<div id="logouttab" class="'.$txts[$p->presence].'" onclick="showLogoutList();">'.$txt[$p->presence].'</div>';
$html .= '

Loading…
Cancel
Save