This commit is contained in:
rjy7 2010-07-22 18:47:44 +00:00
parent fa77c80a91
commit a82411b2f0
13 changed files with 256 additions and 27 deletions

182
webapp/web/css/login.css Normal file
View file

@ -0,0 +1,182 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
/* styles for log in */
#formLogin{
width:600px;
padding:0px;
margin:0px;
text-align:left;
background-color:#FFF;
}
.noOutterBox{
width:340px;
padding:0px;
border: none;
margin:0px;
}
#formLogin h2 {
font-size:1.3em;
line-height:1em;
margin-top:0px;
margin-bottom:1em;
color:#111;
}
#formLogin h6 {
font-size:1.2em;
line-height:1em;
margin-top:0px;
margin-bottom:1em;
color:#111;
}
#formLogin form {
margin: 0;
padding: 0;
}
#formLogin label{
display:block;
margin-bottom:0.5em;
font-weight:bold;
}
#formLogin label span{
color:#900;
}
#formLogin input{
display:block;
margin-bottom:1.5em;
width: 200px;
}
#formLogin textarea{
width: 300px;
display:block;
margin-bottom:1.5em;
}
#formLogin .checkBox{
display:inline;
width:1em;
margin-bottom: 1em;
}
#formLogin p.small{
font-size: 0.8em;
}
#formLogin input.submit{
width: auto;
padding: 0 0.9em;
display:inline;
}
.requestAccount{
padding: 1em 0 0 2em;
margin-bottom:0;
}
.requestAccountNoOutterBox{
padding: 1em 0 0 0;
margin-bottom:0;
}
#errorAlert{
color:#900;
padding:0px;
margin-bottom:5px;
height:30px;
}
#errorAlert img{
float:left;
margin:0;
padding:0;
vertical-align:middle;
}
#errorAlert p{
padding-left:35px;
font-size:0.9em;
line-height:30px;
}
##confirmationAlert {
color:#169f43;
padding:0px;
margin-bottom:5px;
height:30px;
}
##confirmationAlert img{
float:left;
margin:0;
padding:0;
vertical-align:middle;
}
#confirmationAlert p{
padding-left:30px;
font-size:0.9em;
line-height:30px;
}
.formFieldAlert{
border:2px solid #900;
}
.red{
color:#900;
}
/* In IE6/7, .hidden defined in screen.css doesn't override
* display: inline-block defined for #adminDashboard .pageBodyGroup,
* so define again with context selector here.
*/
#adminDashboard .pageBodyGroup.hidden {
display: none !important;
}
p.passwordNote{
margin:0;
padding:0;
margin-top:-8px;
font-size:0.8em;
color:#615e5e;
}

View file

@ -9,10 +9,14 @@
onSelect: showPreview,
setSelect: [ 0, 0, 115, 115 ],
minSize: [ 115, 115 ],
boxWidth: 450,
aspectRatio: 1
});
var bounds = jcrop_api.getBounds();
var boundx = bounds[0];
var boundy = bounds[1];

View file

@ -2,9 +2,6 @@
$(document).ready(function(){
// upload form is hidden by default; use JavaScript to reveal
$("#photoUploadContainer").removeClass("hidden");
// Confirmation alert for photo deletion
$('a.thumbnail').click(function(){
var answer = confirm('Are you sure you want to delete your photo?');
@ -12,3 +9,5 @@ $(document).ready(function(){
});
});

View file

@ -9,4 +9,3 @@ $(document).ready(function(){
$('.focus').focus();
});

View file

@ -0,0 +1,11 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
$(document).ready(function(){
// login form is hidden by default; use JavaScript to reveal
$("#formLogin").removeClass("hidden");
// focus on email or newpassword field
$('.focus').focus();
});

View file

@ -0,0 +1,28 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
$(document).ready(function(){
// login form is hidden by default; use JavaScript to reveal
$("#formLogin").removeClass("hidden");
// focus on email or newpassword field
$('.focus').focus();
});
//The above code for revealing the login form doesn't work IE 6 or 7. The code below fix the problem
var Browser = {
Version: function() {
var version;
if (navigator.appVersion.indexOf("MSIE") != -1)
version = parseFloat(navigator.appVersion.split("MSIE")[1]);
return version;
}
}
if (Browser.Version() <= 7) {
document.getElementById('formLogin').style.display = 'block';
}

View file

@ -0,0 +1,12 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
$(document).ready(function(){
// login form is hidden by default; use JavaScript to reveal
$("#formLogin").removeClass("hidden");
// focus on email or newpassword field
$('.focus').focus();
});

View file

@ -8,8 +8,8 @@
<c:set var="contextPath"><c:out value="${pageContext.request.contextPath}" /></c:set>
<c:set var="themeDir" value="${contextPath}/${portal.themeDir}"/>
<link rel="stylesheet" type="text/css" href="${themeDir}css/login.css"/>
<link rel="stylesheet" type="text/css" href="${contextPath}/css/login.css"/>
<link rel="stylesheet" type="text/css" href="${themeDir}css/formedit.css"/>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/login/loginUtils.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.js"></script>
<script type="text/javascript" src="${contextPath}/js/login/loginUtils.js"></script>

View file

@ -16,11 +16,11 @@ ${stylesheets.add("/js/jquery_plugins/jcrop/jquery.Jcrop.css")}
the script below will reduce the width to 500 pixels and
the height will be in proportion to the new height-->
<#macro newImageSize>
<#--<#macro newImageSize>
<#if (imageWidth >= 500)>
width="500" height="${(500*imageHeight)/imageWidth}"
</#if>
</#macro>
</#macro>-->
<div id="photoCroppingContainer">
@ -47,7 +47,7 @@ ${stylesheets.add("/js/jquery_plugins/jcrop/jquery.Jcrop.css")}
</div>
<div id="photoCropping">
<img style="border:1px solid green;" src="${imageUrl}" <@newImageSize/> id="cropbox" />
<img style="border:1px solid green;" src="${imageUrl}" <#--<@newImageSize/>--> id="cropbox" />
</div>
</div>

View file

@ -10,19 +10,9 @@ ${scripts.add("/js/imageUpload/imageUploadUtils.js")}
${stylesheets.addFromTheme("/uploadImages.css")}
<noscript>
<div id="javascriptDisableWrapper">
<div id="javascriptDisableContent">
<img src="${urls.siteIcons}/iconAlertBig.png" alt="Alert Icon"/>
<p>In order to upload or edit a photo, you'll need to enable JavaScript.</p>
</div>
</div>
</noscript>
<div id="photoUploadContainer" class="hidden">
<div id="photoUploadContainer">
<h2>Photo Upload</h2>
@ -42,8 +32,10 @@ ${stylesheets.addFromTheme("/uploadImages.css")}
<form action="${formAction}" enctype="multipart/form-data" method="post">
<label>Upload a photo <span> (JPEG, GIF or PNG)</span></label>
<input id="datafile" type="file" name="datafile" size="30">
<input type="submit" value="Upload photo"> or <a class="cancelUpload" href="${cancelUrl}">Cancel</a>
<input id="datafile" type="file" name="datafile" size="30" />
<input type="submit" value="Upload photo"/>
<span class="or"> or
<a class="cancelUpload" href="${cancelUrl}">Cancel</a></span>
</form>
</div>
</div>

View file

@ -27,7 +27,9 @@ ${stylesheets.addFromTheme("/uploadImages.css")}
<form action="${formAction}" enctype="multipart/form-data" method="post">
<label>Replace Photo <span> (JPEG, GIF or PNG)</span></label>
<input type="file" name="datafile" size="30">
<input type="submit" value="Upload photo"> or <a class="cancelUpload" href="${cancelUrl}">Cancel</a>
<input type="submit" value="Upload photo">
<span class="or"> or
<a class="cancelUpload" href="${cancelUrl}">Cancel</a></span>
</form>
</div>

View file

@ -3,7 +3,7 @@
<#-- Log in template for accessing site admin -->
<div id="formLogin" class="pageBodyGroup">
<div id="formLogin">
<h2>Create Your New Password</h2>
<#if errorMessage??>

View file

@ -11,7 +11,7 @@
</div>
</noscript>
<div id="formLogin" class="pageBodyGroup hidden" >
<div id="formLogin" class="hidden" >
<h2>Log in</h2>