aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/default/core/account/login_box.php18
-rw-r--r--views/default/core/account/login_dropdown.php35
-rw-r--r--views/default/css/elements/layout_objects.php1
-rw-r--r--views/default/css/elements/misc.php105
-rw-r--r--views/default/css/elements/modules.php24
-rw-r--r--views/default/forms/login.php44
6 files changed, 82 insertions, 145 deletions
diff --git a/views/default/core/account/login_box.php b/views/default/core/account/login_box.php
index c2d19f904..40482c3df 100644
--- a/views/default/core/account/login_box.php
+++ b/views/default/core/account/login_box.php
@@ -10,15 +10,17 @@ $login_url = elgg_get_site_url();
if (elgg_get_config('https_login')) {
$login_url = str_replace("http:", "https:", $login_url);
}
+
+$title = elgg_echo('login');
+$body = elgg_view_form('login', array('action' => "{$login_url}action/login"));
+
+echo elgg_view_module('login', $title, $body);
+
?>
-<div id="login">
-<h2><?php echo elgg_echo('login'); ?></h2>
- <?php
- echo elgg_view_form('login', array('action' => "{$login_url}action/login"));
- ?>
-</div>
-<?php //@todo JS 1.8: no ?>
+
<script type="text/javascript">
- $(document).ready(function() { $('input[name=username]').focus(); });
+ elgg.register_event_handler('init', 'system', function() {
+ $('input[name=username]').focus();
+ });
</script>
diff --git a/views/default/core/account/login_dropdown.php b/views/default/core/account/login_dropdown.php
index a3fdab7ca..fb10ffd1d 100644
--- a/views/default/core/account/login_dropdown.php
+++ b/views/default/core/account/login_dropdown.php
@@ -15,44 +15,25 @@ if (elgg_is_logged_in()) {
* @var unknown_type
*/
$form_body = elgg_view('forms/login');
-$form_body .= "<input type='hidden' name='returntoreferer' value='true' />";
$login_url = elgg_get_site_url();
if (elgg_get_config('https_login')) {
$login_url = str_replace("http", "https", elgg_get_site_url());
}
+$body = elgg_view_form('login', array('action' => "{$login_url}action/login"), array('returntoreferer' => TRUE));
?>
<div id="login-dropdown">
- <div id="signin-button" class="signin-button">
- <a href="<?php echo $CONFIG->url; ?>pg/login" class="signin"><span><?php echo elgg_echo('login') ?></span></a>
- </div>
- <fieldset id="signin-menu">
- <?php echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login")); ?>
- </fieldset>
+ <a href="#" class="elgg-toggle signin" id="elgg-toggler-login-dropdown-box">
+ <?php echo elgg_echo('login') ?>
+ </a>
+ <?php echo elgg_view_module('dropdown', '', $body, array('id' => 'elgg-togglee-login-dropdown-box', 'class' => 'hidden')); ?>
</div>
-<?php //@todo JS 1.8: no ?>
-<script type="text/javascript">
-$(document).ready(function() {
-
- $(".signin").click(function(e) {
+<script>
+$(function() {
+ $('.signin').live('click', function() {
e.preventDefault();
- $("fieldset#signin-menu").toggle();
- $(".signin").toggleClass("menu-open");
- $('.login-textarea.name').focus();
- });
-
- $("fieldset#signin-menu").mouseup(function() {
- return false
});
-
- $(document).mouseup(function(e) {
- if($(e.target).parent("a.signin").length==0) {
- $(".signin").removeClass("menu-open");
- $("fieldset#signin-menu").hide();
- }
- });
-
});
</script> \ No newline at end of file
diff --git a/views/default/css/elements/layout_objects.php b/views/default/css/elements/layout_objects.php
index 56fba7592..50b7cf767 100644
--- a/views/default/css/elements/layout_objects.php
+++ b/views/default/css/elements/layout_objects.php
@@ -16,6 +16,7 @@
* without having to specify the body div's width.
*
* @todo check what happens with long <pre> tags or large images
+ * @todo Move this to its own file -- it is very complicated and should not have to be overridden.
*/
?>
diff --git a/views/default/css/elements/misc.php b/views/default/css/elements/misc.php
index 944f72bc6..f845a65eb 100644
--- a/views/default/css/elements/misc.php
+++ b/views/default/css/elements/misc.php
@@ -12,131 +12,50 @@
/* ***************************************
LOGIN / REGISTER
*************************************** */
-/* login in sidebar */
-.elgg-aside #login {
- width:auto;
-}
-.elgg-aside #login form {
- width:auto;
-}
-.elgg-aside #login .login-textarea {
- width:196px;
-}
-/* default login and register forms */
-#login input[type="text"],
-#login input[type="password"],
-.register input[type="text"],
-.register input[type="password"] {
- margin:0 0 10px 0;
-}
-.register input[type="text"],
-.register input[type="password"] {
- width:380px;
-}
-.rememberme label {
- font-weight:normal;
- font-size:100%;
-}
-.loginbox .elgg-button-submit {
- margin-right: 15px;
-}
-#login .persistent-login {
- float:right;
- display:block;
- margin-top:-34px;
- margin-left:80px;
-}
-#login .persistent-login label {
- font-size:1.0em;
- font-weight: normal;
- cursor: pointer;
-}
#login-dropdown {
- float:right;
position: absolute;
- top:10px;
+ top:0;
right:0;
z-index: 9599;
}
-#login-dropdown #signin-button {
- padding:10px 0px 12px;
- line-height:23px;
- text-align:right;
-}
-#login-dropdown #signin-button a.signin {
+
+.signin {
padding:2px 6px 3px 6px;
text-decoration:none;
font-weight:bold;
position:relative;
margin-left:0;
- color:white;
+ color: white;
border:1px solid #71B9F7;
-webkit-border-radius:4px;
-moz-border-radius:4px;
border-radius:4px;
}
-#login-dropdown #signin-button a.signin span {
+
+.signin span {
padding:4px 0 6px 12px;
background-image:url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png);
background-position:-150px -51px;
background-repeat:no-repeat;
}
-#login-dropdown #signin-button a.signin:hover {
+
+.signin:hover {
background-color:#71B9F7;
/* color:black; */
}
-#login-dropdown #signin-button a.signin:hover span {
+.signin:hover span {
/* background-position:-150px -71px; */
}
-#login-dropdown #signin-button a.signin.menu-open {
+.signin.elgg-state-active {
background:#cccccc !important;
color:#666666 !important;
border:1px solid #cccccc;
outline:none;
}
-#login-dropdown #signin-button a.signin.menu-open span {
- background-position:-150px -71px;
- color:#333333;
-}
-#login-dropdown #signin-menu {
- -moz-border-radius-topleft:5px;
- -moz-border-radius-bottomleft:5px;
- -moz-border-radius-bottomright:5px;
- -webkit-border-top-left-radius:5px;
- -webkit-border-bottom-left-radius:5px;
- -webkit-border-bottom-right-radius:5px;
- display:none;
- background-color:white;
- position:absolute;
- width:210px;
- z-index:100;
- border:5px solid #CCCCCC;
- text-align:left;
- padding:12px;
- top: 26px;
- right: 0px;
- margin-top:5px;
- margin-right: 0px;
+.signin.elgg-state-active {
+ background-position: -150px -71px;
color:#333333;
- -webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.45);
- -moz-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.45);
-}
-#login-dropdown #signin-menu input[type=text],
-#login-dropdown #signin-menu input[type=password] {
- width:203px;
- margin:0 0 5px;
}
-#login-dropdown #signin-menu p {
- margin:0;
-}
-#login-dropdown #signin-menu label {
- font-weight:normal;
- font-size: 100%;
-}
-#login-dropdown #signin-menu .elgg-button-submit {
- margin-right:15px;
-}
-
<?php //@todo needs revamp ?>
/* ***************************************
diff --git a/views/default/css/elements/modules.php b/views/default/css/elements/modules.php
index 0f59e2cad..b16a99d83 100644
--- a/views/default/css/elements/modules.php
+++ b/views/default/css/elements/modules.php
@@ -43,6 +43,30 @@
color: #0054A7;
}
+.elgg-module-dropdown {
+ -moz-border-radius-topleft:5px;
+ -moz-border-radius-bottomleft:5px;
+ -moz-border-radius-bottomright:5px;
+ -webkit-border-top-left-radius:5px;
+ -webkit-border-bottom-left-radius:5px;
+ -webkit-border-bottom-right-radius:5px;
+ display:none;
+ background-color:white;
+ position:absolute;
+ width:210px;
+ z-index:100;
+ border:5px solid #CCCCCC;
+ text-align:left;
+ padding:12px;
+ top: 26px;
+ right: 0px;
+ margin-top:5px;
+ margin-right: 0px;
+ color:#333333;
+ -webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.45);
+ -moz-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.45);
+}
+
/* Featured */
.elgg-module-featured {
border: 1px solid #4690D6;
diff --git a/views/default/forms/login.php b/views/default/forms/login.php
index 862b5ab9d..44d134ba8 100644
--- a/views/default/forms/login.php
+++ b/views/default/forms/login.php
@@ -7,29 +7,39 @@
*/
?>
-<div class='loginbox'>
- <label><?php echo elgg_echo('loginusername'); ?></label><br />
- <?php echo elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea')); ?>
- <label><?php echo elgg_echo('password'); ?></label><br />
- <?php echo elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea')); ?><br />
+<div>
+ <label><?php echo elgg_echo('loginusername'); ?></label>
+ <?php echo elgg_view('input/text', array('internalname' => 'username')); ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('password'); ?></label>
+ <?php echo elgg_view('input/password', array('internalname' => 'password')); ?>
+</div>
- <?php echo elgg_view('input/submit', array('value' => elgg_echo('login'))); ?>
+<?php echo elgg_view('login/extend'); ?>
- <span class='rememberme'>
- <label>
- <input type="checkbox" name="persistent" value="true" />
- <?php echo elgg_echo('user:persistent'); ?>
- </label>
- </span><br />
+<div>
+ <?php echo elgg_view('input/submit', array('value' => elgg_echo('login'))); ?>
- <?php echo elgg_view('login/extend'); ?>
+ <label class="right mtm">
+ <input type="checkbox" name="persistent" value="true" />
+ <?php echo elgg_echo('user:persistent'); ?>
+ </label>
+
+ <?php
+ if ($vars['returntoreferer']) {
+ echo elgg_view('input/hidden', array('name' => 'returntoreferer', 'value' => 'true'));
+ }
+ ?>
+</div>
+<ul class="elgg-menu elgg-menu-footer">
<?php
if (elgg_get_config('allow_registration')) {
- echo '<a class="registration_link" href="' . elgg_get_site_url() . 'pg/register/">' . elgg_echo('register') . '</a> | ';
+ echo '<li><a class="registration_link" href="' . elgg_get_site_url() . 'pg/register/">' . elgg_echo('register') . '</a></li>';
}
?>
- <a class="forgotten_password_link" href="<?php echo elgg_get_site_url(); ?>pages/account/forgotten_password.php">
+ <li><a class="forgotten_password_link" href="<?php echo elgg_get_site_url(); ?>pages/account/forgotten_password.php">
<?php echo elgg_echo('user:password:lost'); ?>
- </a>
-</div> \ No newline at end of file
+ </a></li>
+</ul> \ No newline at end of file