Commit afe72ca0 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Merge remote-tracking branch 'origin/newstyles' into 0.6.4

Conflicts:
	snf-astakos-app/astakos/im/templates/im/invitations.html
	snf-astakos-app/astakos/im/templates/im/login_base.html
	snf-astakos-app/astakos/im/templates/im/profile.html
	snf-astakos-app/astakos/im/views.py
parents 3084c7dd fcc8ce05
......@@ -3,4 +3,6 @@ docs/build
*.pyc
*.egg-info
.DS_Store
.project
.pydevproject
snf-astakos-app/astakos/version.py
......@@ -94,12 +94,13 @@ class LocalUserCreationForm(UserCreationForm):
super(LocalUserCreationForm, self).__init__(*args, **kwargs)
self.fields.keyOrder = ['email', 'first_name', 'last_name',
'password1', 'password2']
if get_latest_terms():
self.fields.keyOrder.append('has_signed_terms')
if RECAPTCHA_ENABLED:
self.fields.keyOrder.extend(['recaptcha_challenge_field',
'recaptcha_response_field',])
if get_latest_terms():
self.fields.keyOrder.append('has_signed_terms')
if 'has_signed_terms' in self.fields:
# Overriding field label since we need to apply a link
# to the terms within the label
......@@ -528,4 +529,4 @@ def get_astakos_group_policy_creation_form(group):
super(AstakosGroupPolicyCreationForm, self).__init__(*args, **kwargs)
self.fields['group'].widget.attrs['disabled'] = True
return AstakosGroupPolicyCreationForm
\ No newline at end of file
return AstakosGroupPolicyCreationForm
......@@ -50,7 +50,8 @@ SITENAME = getattr(settings, 'ASTAKOS_SITENAME', 'GRNET Cloud')
# Set recaptcha keys
RECAPTCHA_PUBLIC_KEY = getattr(settings, 'ASTAKOS_RECAPTCHA_PUBLIC_KEY', '')
RECAPTCHA_PRIVATE_KEY = getattr(settings, 'ASTAKOS_RECAPTCHA_PRIVATE_KEY', '')
RECAPTCHA_OPTIONS = getattr(settings, 'ASTAKOS_RECAPTCHA_OPTIONS', {'theme': 'white'})
RECAPTCHA_OPTIONS = getattr(settings, 'ASTAKOS_RECAPTCHA_OPTIONS',
{'theme' : 'custom', 'custom_theme_widget': 'okeanos_recaptcha'})
RECAPTCHA_USE_SSL = getattr(settings, 'ASTAKOS_RECAPTCHA_USE_SSL', True)
RECAPTCHA_ENABLED = getattr(settings, 'ASTAKOS_RECAPTCHA_ENABLED', True)
......
/* Variables.less
* Variables to customize the look and feel of Bootstrap
* ----------------------------------------------------- */
/* Mixins.less
* Snippets of reusable CSS to develop faster and keep code readable
* ----------------------------------------------------------------- */
.servicesbar {
font-family: arial, sans-serif !important;
font-size: 13px !important;
line-height: 13px;
letter-spacing: 0px;
zoom: 1;
color: #ccc;
z-index: 1000;
border-bottom: 1px solid #444;
background-color: #000000;
position: relative;
}
.servicesbar ol, .servicesbar ul {
list-style: none;
margin: 0;
padding: 0;
}
.servicesbar li {
margin: 0;
padding: 0;
}
.servicesbar:before, .servicesbar:after {
display: table;
content: "";
zoom: 1;
}
.servicesbar:after {
clear: both;
}
.servicesbar a {
border: none !important;
font-family: arial, sans-serif !important;
font-size: 13px !important;
color: #e6e6e6;
text-decoration: none;
display: block;
float: left;
padding: 11px;
height: 13px;
}
.servicesbar a:hover {
background-color: #444;
}
.servicesbar a.active {
font-weight: bold;
font-size: 13px !important;
background-color: #333;
}
.servicesbar a img {
border: none;
margin: 1px;
margin-bottom: 2px;
}
.servicesbar .services {
zoom: 1;
}
.servicesbar .services:before, .servicesbar .services:after {
display: table;
content: "";
zoom: 1;
}
.servicesbar .services:after {
clear: both;
}
.servicesbar .services a {
font-size: 13px !important;
font-weight: bold;
color: #ccc;
}
.servicesbar .services a.with-icon {
margin: 0 !important;
padding: 0 !important;
width: 35px;
height: 35px;
}
.servicesbar .services a.active {
font-size: 13px !important;
color: #ffffff !important;
}
.servicesbar .services a:hover {
background-color: #444;
}
.servicesbar .profile {
margin-top: -35px;
zoom: 1;
text-align: right;
min-width: 200px;
width: 200px;
background-color: #000000;
zoom: 1;
position: absolute;
right: 0;
float: right;
}
.servicesbar .profile:before, .servicesbar .profile:after {
display: table;
content: "";
zoom: 1;
}
.servicesbar .profile:after {
clear: both;
}
.servicesbar .profile .user > a {
font-weight: bold !important;
font-size: 12px !important;
}
.servicesbar .profile .user.active {
background-color: #333;
}
.servicesbar .profile a {
float: none;
}
.servicesbar .profile ul {
display: none;
}
.servicesbar .profile ul li {
width: 100%;
border-bottom: 1px solid #444;
background-color: #333;
}
.servicesbar .profile ul li a {
float: none;
display: block;
}
.servicesbar .profile:hover, .servicesbar .profile.hover {
background-color: #222;
}
.servicesbar .profile:hover ul, .servicesbar .profile.hover ul {
display: block;
}
.servicesbar .profile:before, .servicesbar .profile:after {
display: table;
content: "";
zoom: 1;
}
.servicesbar .profile:after {
clear: both;
/* helpers ------------------------------------*/
.clearfix:before,
.clearfix:after { content:" "; display:block; height:0; visibility:hidden; } /* http://www.yuiblog.com/blog/2010/09/27/clearfix-reloaded-overflowhidden-demystified/ */
.clearfix:after { clear:both; }
.visuallyhidden { position:absolute !important; clip:rect(0 0 0 0); }
/* cloudbar header */
div.cloudbar { background:#000; color:#fff; line-height:35px; width:100%; font-size:13px; font-family: 'Didact Gothic', Verdana, sans-serif;}
div.cloudbar a,
div.cloudbar .profile span,
div.cloudbar li {font-family:'Didact Gothic',Verdana,sans-serif !important; letter-spacing: 1px !important}
.cloudbar .wrapper { width:auto; padding:0;}
.cloudbar a { color:#fff; text-decoration:none;}
.cloudbar .profile { float:right; background:#3582AC; min-width:190px; padding:0; text-align:right; }
.cloudbar .profile:hover { background:#5A97B8; }
.cloudbar .profile a { text-decoration:none; color:#fff; display:block; width:100%;}
.cloudbar .profile ul { position:absolute; right:0; top:35px; padding:0; margin:0; width:190px; display:none; z-index:9; background:#fff;}
.cloudbar .profile ul li { list-style:none outside; line-height:35px; padding:0 20px;}
.cloudbar .profile ul li:hover a { color:#3582AC;}
.cloudbar .profile .user a { padding-right:20px; width:auto; }
.cloudbar .profile .user a span { padding:0 20px; background:url(../images/arrow-lt.png) no-repeat right center;}
.cloudbar .profile .full a span { background-image:url(../images/arrow-down.png); }
.cloudbar .profile .full a.open span { background-image:url(../images/arrow-up.png); }
.cloudbar .profile .full ul { border:1px dashed #000; border-top:0 none; border-right:0 none;}
.cloudbar .profile ul li a { padding-right:0; background:none; color:#000; display:inline; width:auto;}
.cloudbar ul.services { margin:0; padding:0; }
.cloudbar ul.services li { float:left; height:35px; line-height:35px; text-align:center; padding: 0 30px; list-style:none outside;}
.cloudbar ul.services li:first-child { padding:0 5px;}
.cloudbar ul.services li.active { background:#333;}
.cloudbar ul.services li:hover { background:#444; }
@media screen and (max-width : 480px) {
.cloudbar .profile { float:none; }
.cloudbar .services li:first-child { position:absolute; left:0; top:0; background:#000}
}
function equalWidths ( secondEl, firstEl) {
secondEl.css('width',firstEl.outerWidth() );
}
$(document).ready(function(){
/*
......@@ -21,6 +27,12 @@ $(document).ready(function(){
var css = $("<link />");
css.attr({rel:'stylesheet', type:'text/css', href:cssloc + 'cloudbar.css'});
$("head").append(css);
// load fonts
var font_url = 'http://fonts.googleapis.com/css?family=Didact+Gothic&subset=latin,greek,greek-ext';
var css_font = $("<link />");
css_font.attr({rel:'stylesheet', type:'text/css', href:font_url});
$("head").append(css_font);
// load service specific css
var SKIP_ADDITIONAL_CSS = window.SKIP_ADDITIONAL_CSS == undefined ? false : window.SKIP_ADDITIONAL_CSS;
......@@ -32,8 +44,8 @@ $(document).ready(function(){
}
var root = $('body');
var bar = $('<div class="servicesbar"></div>');
var services = $('<div class="services"></div>');
var bar = $('<div class="cloudbar clearfix"></div>');
var services = $('<ul class="services"></ul>');
var profile = $('<div class="profile"></div>');
var get_services_url = window.GET_SERVICES_URL || window.CLOUDBAR_SERVICES;
......@@ -41,6 +53,7 @@ $(document).ready(function(){
// create services links and set the active class to the current service
$.getJSON(get_services_url + "?callback=?", function(data) {
$.each(data, function(i, el){
var sli = $("<li>");
var slink = $("<a>");
if (el.icon) {
slink.append($('<img src="'+cssloc+el.icon+'"/>'));
......@@ -50,9 +63,10 @@ $(document).ready(function(){
}
slink.attr('href', el.url);
slink.attr('title', el.name);
services.append(slink);
sli.append(slink);
services.append(sli);
if (el.id == ACTIVE_MENU || el.name == ACTIVE_MENU) {
slink.addClass("active");
sli.addClass("active");
}
});
});
......@@ -67,8 +81,9 @@ $(document).ready(function(){
$.getJSON(get_menu_url, function(data) {
$.each(data, function(i,el) {
if (i == 0){
username.text(el.name);
username.html('<span>'+el.name+'</span>');
username.attr('href', el.url);
user.removeClass('full');
}else{
var link = $("<a />");
link.text(el.name);
......@@ -76,6 +91,7 @@ $(document).ready(function(){
var li = $("<li />");
li.append(link);
usermenu.append(li);
user.addClass('full');
}
});
});
......@@ -86,7 +102,7 @@ $(document).ready(function(){
user.append(username);
user.append(usermenu);
profile.append(user);
bar.append(services).append(profile);
bar.append(profile).append(services);
root.prepend(bar);
......@@ -95,4 +111,25 @@ $(document).ready(function(){
// ie fix
user.hover(function(){$(this).addClass("hover")}, function(){$(this).removeClass("hover")});
$('html').live('click', function(e){
$('.cloudbar .profile .full>a').removeClass('open');
$('.cloudbar .profile .full>a').siblings('ul').hide();
});
$('.cloudbar .profile .full>a').live('click', function(e){
e.stopPropagation();
e.preventDefault();
equalWidths ( $('.cloudbar .profile ul'), $('.cloudbar .profile'));
$(this).siblings('ul').toggle();
$(this).toggleClass('open');
});
});
$(window).resize(function() {
equalWidths ( $('.cloudbar .profile ul'), $('.cloudbar .profile'));
});
body { background-position: 0px 34px !important}
This diff is collapsed.
body { -webkit-text-size-adjust:100%; }
/* Mozilla */
@-moz-document url-prefix() {
button::-moz-focus-inner,
input[type="image"]::-moz-focus-inner,
input[type="submit"]::-moz-focus-inner,
input[type="reset"]::-moz-focus-inner,
input[type="button"]::-moz-focus-inner { border:0; }
textarea { resize:none; }
}
/* Webkit */
@media screen and (-webkit-min-device-pixel-ratio:0) {
button,
input[type="submit"],
input[type="reset"],
input[type="button"] { -webkit-appearance:button; }
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus { outline:0 none; }
textarea { resize:none; }
input[type="checkbox"],
input[type="radio"] { vertical-align:-2px; }
input[type="search"] { -webkit-appearance:textfield; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance:none; }
}

#colorbox, #cboxOverlay, #cboxWrapper {
left: 0;
overflow: hidden;
position: absolute;
top: 0;
z-index: 9999;
}
#cboxOverlay {
height: 100%;
position: fixed;
width: 100%;
}
#cboxMiddleLeft, #cboxBottomLeft {
clear: left;
}
#cboxContent {
position: relative;
}
#cboxLoadedContent {
overflow: auto;
}
#cboxTitle {
margin: 0;
}
#cboxLoadingOverlay, #cboxLoadingGraphic {
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow {
cursor: pointer;
}
.cboxPhoto {
border: 0 none;
display: block;
float: left;
margin: auto;
}
.cboxIframe {
border: 0 none;
display: block;
height: 100%;
width: 100%;
}
#cboxOverlay {
background: none repeat scroll 0 0 #000000;
}
#cboxContent {
margin-top: 20px;
}
.cboxIframe {
background: none repeat scroll 0 0 #FFFFFF;
}
#cboxError {
border: 1px solid #CCCCCC;
padding: 50px;
}
#cboxLoadedContent {
background: none repeat scroll 0 0 #FFFFFF;
border: 5px solid #000000;
}
#cboxTitle {
color: #CCCCCC;
left: 0;
position: absolute;
top: -20px;
}
#cboxCurrent {
color: #CCCCCC;
position: absolute;
right: 0;
top: -20px;
}
#cboxSlideshow {
color: #FFFFFF;
position: absolute;
right: 90px;
top: -20px;
}
#cboxPrevious {
background: url("../images/colorbox/controls.png") no-repeat scroll left top transparent;
height: 65px;
left: 5px;
margin-top: -32px;
position: absolute;
text-indent: -9999px;
top: 50%;
width: 28px;
}
#cboxPrevious:hover {
background-position: left bottom;
}
#cboxNext {
background: url("../images/colorbox/controls.png") no-repeat scroll right top transparent;
height: 65px;
margin-top: -32px;
position: absolute;
right: 5px;
text-indent: -9999px;
top: 50%;
width: 28px;
}
#cboxNext:hover {
background-position: right bottom;
}
#cboxLoadingOverlay {
background: none repeat scroll 0 0 #000000;
}
#cboxLoadingGraphic {
background: url("../images/colorbox/loading.gif") no-repeat scroll center center transparent;
}
#cboxClose {
background: url("../images/colorbox/controls.png") no-repeat scroll center top transparent;
display: block;
height: 19px;
position: absolute;
right: 5px;
text-indent: -9999px;
top: 5px;
width: 38px;
}
#cboxClose:hover {
background-position: center bottom;
}
\ No newline at end of file
/**
* Default DropKick theme
*
* Feel free to edit the default theme
* or even add your own.
*
* See the readme for themeing help
*
*/
/***** Begin Theme, feel free to edit in here! ******/
/* One container to bind them... */
.dk_container {
font-family: 'Antic', sans-serif;
font-weight: normal;
line-height: 42px;
letter-spacing: 1px;
border: 1px solid #808080;
height:42px;
display: inline-block;
margin-bottom: -1px;
padding-left:21px;
z-index: 2;
width:308px;
}
.dk_container:focus {
outline: 0;
}
.dk_container a {
cursor: pointer;
text-decoration: none;
color:#808080;
}
/* Opens the dropdown and holds the menu label */
.dk_toggle {
/**
* Help: Arrow image not appearing
* Try updating this property to your correct dk_arrows.png path
*/
background:url(../images/arrow_02.jpg) no-repeat 276px center;
}
.dk_toggle:hover {
}
/* Applied when the dropdown is focused */
.dk_focus .dk_toggle {
}
.dk_focus .dk_toggle {
}
/* Applied whenever the dropdown is open */
.dk_open {
/**
* Help: Dropdown menu is covered by something
* Try setting this value higher
*/
z-index: 10;
}
.dk_open .dk_toggle {
}
/* The outer container of the options */
.dk_options {
}
.dk_options a {
background-color: #fff;
border-bottom: 1px solid #999;
padding: 8px 20px;
}
.dk_options li:last-child a {
border-bottom: none;
}
.dk_options a:hover,
.dk_option_current a {
}
/* Inner container for options, this is what makes the scrollbar possible. */
.dk_options_inner {
padding:0;
margin:0;