website updates changes

This commit is contained in:
Rushabh Mehta 2012-12-10 18:25:30 +05:30
parent 275c04c1f7
commit c50f088a22
7 changed files with 89 additions and 96 deletions

View File

@ -1,11 +1,10 @@
.content {
width: 800px;
.content, div#body_div {
width: 780px;
}
div#body_div {
padding: 0px;
min-height: 400px;
width: 800px;
margin: 40px auto;
box-shadow: 1px 1px 3px 3px #ccc;
}
@ -26,6 +25,10 @@ p, li {
-moz-box-shadow: none;
}
.layout-main {
min-height: 400px;
}
.layout-side-section {
padding: 8px;
}
@ -58,10 +61,9 @@ footer {
border-right: 0px solid #777 !important;
}
.web-footer-powered {
.web-footer-powered, .web-footer-powered a {
color: #888;
float: right;
margin-top: -12px;
margin-top: 20px;
}
.two-column {

View File

@ -1,4 +1,4 @@
#body_div {
body {
{% if doc.background_image %}
background: url("../files/{{ doc.background_image }}") repeat;
{% elif doc.background_color %}

View File

@ -1,9 +1,15 @@
<style>
#login_wrapper {
height: 300px;
padding-top: 50px;
width: 300px;
margin: 70px auto;
}
.layout-wrapper {
padding: 10px;
box-shadow: 1px 1px 3px 3px #ccc;
font-size: 12px;
min-height: 100px;
}
#login_wrapper h3 {
text-align: center;
@ -16,4 +22,11 @@
.login-box td {
padding: 8px;
}
.login-footer {
text-align: center;
padding: 15px;
}
.login-footer, .login-footer a {
color: #999;
}
</style>

View File

@ -71,8 +71,9 @@
{% endfor %}
</ul></div>
{% if copyright %}
<div class="web-footer-copyright">&copy; {{ copyright }}
<div class="web-footer-copyright">&copy; {{ copyright }}</div>
{% endif %}
<div class="web-footer-powered">Powered by <a href="https://erpnext.com">ERPNext.com</a></div>
</div>
</footer>

View File

@ -1,25 +1,7 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
wn.provide('erpnext.login');
wn.pages["{{ name }}"].onload = function(wrapper) {
var lw = $i('login_wrapper');
$bs(lw, '1px 1px 3px #888');
$(document).ready(function(wrapper) {
$('#login_btn').click(erpnext.login.doLogin)
$('#password').keypress(function(ev){
@ -31,33 +13,32 @@ wn.pages["{{ name }}"].onload = function(wrapper) {
}
});
$(document).trigger('login_rendered');
}
// Login Callback
erpnext.login.onLoginReply = function(r, rtext) {
$('#login_btn').done_working();
if(r.message=="Logged In"){
window.location.href='app.html' + (get_url_arg('page') ? ('?page='+get_url_arg('page')) : '');
} else {
$i('login_message').innerHTML = '<span style="color: RED;">'+(r.message)+'</span>';
//if(r.exc)alert(r.exc);
}
}
})
// Login
erpnext.login.doLogin = function(){
var args = {};
args['usr']=$i("login_id").value;
args['pwd']=$i("password").value;
//if($i('remember_me').checked)
//args['remember_me'] = 1;
args['usr']=$("#login_id").val();
args['pwd']=$("#password").val();
if(!args.usr || !args.pwd) {
msgprint("Sorry, you can't login if you don't enter both the email id and password.")
}
$('#login_btn').set_working();
$('#login_message').empty();
$c("login", args, erpnext.login.onLoginReply);
$c("login", args, function(r, rtext) {
$('#login_btn').done_working();
if(r.message=="Logged In"){
window.location.href='app.html' + (get_url_arg('page')
? ('?page='+get_url_arg('page')) : '');
} else {
$i('login_message').innerHTML = '<span style="color: RED;">'
+(r.message)+'</span>';
}
});
return false;
}

View File

@ -15,20 +15,13 @@
<div class="layout-wrapper layout-wrapper-background">
<div class="web-content" id="content-blog">
<div class="layout-main-section">
<div class="layout-main">
<h1>Blog</h1>
<br>
<div id="blog-list">
<!-- blog list will be generated dynamically -->
</div>
</div>
<div class="layout-side-section">
{% block blog_subscribe %}
{% include "html/blog_subscribe.html" %}
{% endblock %}
</div>
<div style="clear: both"></div>
</div>
</div>
{% endblock %}

View File

@ -1,10 +1,9 @@
{% extends "html/page.html" %}
{% extends "html/base.html" %}
{% block javascript %}
{% include "js/login.js" %}
{% endblock %}
{% block css %}
{% block header %}
<script>
{% include "js/login.js" %}
</script>
{% include "css/login.css" %}
{% endblock %}
@ -12,41 +11,45 @@
Login Page
{% endblock %}
{% block content %}
<div class="layout-wrapper layout-wrapper-appframe" id='login_wrapper'>
<div style="width: 40px; margin: auto;">
<h3>Login</h3>
<form autocomplete="on">
<table border="0" class="login-box">
<tbody>
<tr>
<td>Login Id</td>
<td><input id="login_id" type="text" style="width: 180px"/></td>
</tr>
<tr>
<td>Password</td>
<td><input id="password" type="password" style="width: 180px" /></td>
</tr>
<!--<tr>
<td style="text-align:right"><input id="remember_me" type="checkbox" /></td>
<td>Remember Me</td>
</tr>-->
<tr>
<td>&nbsp;</td>
<td>
<button type="submit" id="login_btn" class="btn btn-small btn-primary">Login</button>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td id="login_message">&nbsp;</td>
</tr>
</tbody>
</table>
</form>
<p style="margin-left: 80px;"><span class="link_type"
onclick="erpnext.login.show_forgot_password()">Forgot Password</span></p>
</div>
{% block body %}
<div id='login_wrapper'>
<div class='layout-wrapper layout-main'>
<h3><i class="icon-lock" style="margin-top: 7px"></i> Login</h3>
<form autocomplete="on">
<table border="0" class="login-box">
<tbody>
<tr>
<td style="text-align: right;">Login Id</td>
<td><input id="login_id" type="text" style="width: 180px"/></td>
</tr>
<tr>
<td style="text-align: right;">Password</td>
<td><input id="password" type="password" style="width: 180px" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<button type="submit" id="login_btn"
class="btn btn-small btn-primary">Login</button>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td id="login_message">&nbsp;</td>
</tr>
</tbody>
</table>
</form>
<p style="text-align: center"><span class="link_type"
onclick="erpnext.login.show_forgot_password()">Forgot Password</span></p>
</div>
<div class="login-footer">
<a href="index.html">Home</a> |
<a href="https://erpnext.com">ERPNext</a><br><br>
{% if copyright %}
<div class="web-footer-copyright">&copy; {{ copyright }}
{% endif %}
</div>
</div>
{% endblock %}