Commit 6d937002 authored by Liam Morland's avatar Liam Morland
Browse files

Coding standards

parent 3d9468ea
.view .event {border-bottom: solid 1px #ddd; margin-bottom: 1em;}
.view .event .event-title {border: none; font-size: 1.1em; font-weight: normal; margin-bottom: .2em;}
.view .event .event-title a {text-decoration: underline;}
.view .event .home-listing-block-date {color: #555; margin-bottom: .5em;}
.view .event img {float: left; margin-right: 10px; margin-bottom: 1em;}
.page-events .view-footer {text-align: right;}
.view .event {
border-bottom: solid 1px #ddd;
margin-bottom: 1em;
}
.view .event .event-title {
border: none;
font-size: 1.1em;
font-weight: normal;
margin-bottom: .2em;
}
.view .event .event-title a {
text-decoration: underline;
}
.view .event .home-listing-block-date {
color: #555;
margin-bottom: .5em;
}
.view .event img {
float: left;
margin-right: 10px;
margin-bottom: 1em;
}
.page-events .view-footer {
text-align: right;
}
.event-content .field_event_date .field-data {font-size: 1.3em; color: #555; margin-bottom: 1em;}
.event-content .field_event_date .date-display-end {white-space: nowrap;}
.event-content .field_event_date .field-data.multiple {font-size: 1em;}
.event-content .field_event_location .address-content {margin-top: .5em; color: #333;}
.event-content .details {border-top: solid 1px #ddd; margin-top: .5em;}
.event-content .details .field {border-bottom: solid 1px #ddd; padding: .5em 0;}
.event-content .details .field .field-label {width: 8em; font-weight: normal; font-style: italic; color: #555;}
.event-content .details .field .field-data .location .adr {margin-left: 8em; margin-bottom: 0.5em;}
.event-content .field_event_date .field-data {
font-size: 1.3em;
color: #555;
margin-bottom: 1em;
}
.event-content .field_event_date .date-display-end {
white-space: nowrap;
}
.event-content .field_event_date .field-data.multiple {
font-size: 1em;
}
.event-content .field_event_location .address-content {
margin-top: .5em;
color: #333;
}
.event-content .details {
border-top: solid 1px #ddd;
margin-top: .5em;
}
.event-content .details .field {
border-bottom: solid 1px #ddd;
padding: .5em 0;
}
.event-content .details .field .field-label {
width: 8em;
font-weight: normal;
font-style: italic;
color: #555;
}
.event-content .details .field .field-data .location .adr {
margin-left: 8em;
margin-bottom: 0.5em;
}
.block-events .feed-icon a {
background: url("images/ical-feed-icon-34x14.png") no-repeat scroll 0 0 transparent;
display: inline-block;
......@@ -20,9 +64,13 @@
margin-bottom: 10px;
padding-left: 40px;
}
a.individual-event-ical {margin-left: 0.5em;}
a.individual-event-ical {
margin-left: 0.5em;
}
/*event calendar view*/
.view-events-with-calendar .attachment {margin-top: 1.5em;}
.view-events-with-calendar .attachment {
margin-top: 1.5em;
}
.view-content .views-row .event-title {
border: medium none;
font-size: 1.1em;
......@@ -30,25 +78,40 @@ a.individual-event-ical {margin-left: 0.5em;}
margin-bottom: 0.2em;
}
.view-events-with-calendar .view-content .views-row {
border-bottom: 1px solid #DDDDDD;
border-bottom: 1px solid #dddddd;
margin-bottom: 1em;
}
.view-content .views-row .home-listing-block-date {
color: #555555;
margin-bottom: 0.5em;
}
.calendar-calendar td .inner div.day a {color: #96172E;}
.calendar-calendar .month-view .full td.date-box.today {border-color: #757575;}
.calendar-calendar .month-view .full tr td.single-day.today {border-bottom: 2px solid #757575;}
.calendar-calendar .month-view .full tr td.today, .calendar-calendar .month-view .full tr.odd td.today, .calendar-calendar .month-view .full tr.even td.today {
.calendar-calendar td .inner div.day a {
color: #96172e;
}
.calendar-calendar .month-view .full td.date-box.today {
border-color: #757575;
}
.calendar-calendar .month-view .full tr td.single-day.today {
border-bottom: 2px solid #757575;
}
.calendar-calendar .month-view .full tr td.today,
.calendar-calendar .month-view .full tr.odd td.today,
.calendar-calendar .month-view .full tr.even td.today {
border-left: 2px solid #757575;
border-right: 2px solid #757575;
}
.calendar-calendar td {color: #000000;}
.calendar-calendar th.days {color: #000000;}
.calendar-calendar td.empty {color: #999999;}
.calendar-calendar td {
color: #000000;
}
.calendar-calendar th.days {
color: #000000;
}
.calendar-calendar td.empty {
color: #999999;
}
#block-views-events-with-calendar-block-1 .view .date-nav-wrapper .date-prev a, #block-views-events-with-calendar-block-1 .view .date-nav-wrapper .date-next a {
#block-views-events-with-calendar-block-1 .view .date-nav-wrapper .date-prev a,
#block-views-events-with-calendar-block-1 .view .date-nav-wrapper .date-next a {
width: 1em;
padding: 0em;
}
......@@ -89,7 +152,8 @@ a.individual-event-ical {margin-left: 0.5em;}
#site-sidebar .view .date-nav-wrapper .date-nav {
margin-bottom: 0;
}
#site-sidebar .view .date-nav-wrapper .date-prev a, #site-sidebar .view .date-nav-wrapper .date-next a {
#site-sidebar .view .date-nav-wrapper .date-prev a,
#site-sidebar .view .date-nav-wrapper .date-next a {
margin: 0;
padding: 0 2px;
line-height: 1.7em;
......@@ -97,7 +161,7 @@ a.individual-event-ical {margin-left: 0.5em;}
}
#site-sidebar #block-views-events-with-calendar-block-1 .date-heading h3 {
margin-top: 0;
border-top: 1px solid #DDD;
border-top: 1px solid #ddd;
font-size: 1em;
text-transform: uppercase;
}
......@@ -109,13 +173,16 @@ a.individual-event-ical {margin-left: 0.5em;}
width: 14.285714285714%;
text-align: center;
}
#site-sidebar .calendar-calendar table.mini td.empty, #site-sidebar .calendar-calendar .mini {
border: 1px solid #DDD;
#site-sidebar .calendar-calendar table.mini td.empty,
#site-sidebar .calendar-calendar .mini {
border: 1px solid #ddd;
}
#site-sidebar .calendar-calendar table.mini td.empty {
background: #f4f4f4;
}
#site-sidebar .calendar-calendar tr td.today, #site-sidebar .calendar-calendar tr.odd td.today, #site-sidebar .calendar-calendar tr.even td.today {
#site-sidebar .calendar-calendar tr td.today,
#site-sidebar .calendar-calendar tr.odd td.today,
#site-sidebar .calendar-calendar tr.even td.today {
background: none;
border: 2px solid #757575;
padding: 2px;
......@@ -127,7 +194,7 @@ a.individual-event-ical {margin-left: 0.5em;}
background: #666666;
}
#site-sidebar .calendar-calendar td.has-events a {
color: #FFF;
color: #fff;
font-weight: bold;
}
/* Full archive section */
......@@ -137,12 +204,16 @@ a.individual-event-ical {margin-left: 0.5em;}
font-size: 1.1em;
}
/* Events by date, Events by audience and Events by type*/
#site-sidebar .block-events h2, #block-views-event-type-block-events-by-type h2, #block-views-events-with-calendar-block-1 h2, #block-views-events-with-calendar-block-1 h3.full-archive {
#site-sidebar .block-events h2,
#block-views-event-type-block-events-by-type h2,
#block-views-events-with-calendar-block-1 h2,
#block-views-events-with-calendar-block-1 h3.full-archive {
/*background: url('images/menu-expanded.png') no-repeat 0px center;
padding-left: 10.5px;
cursor: pointer;*/
}
#site-sidebar h2.closed, #site-sidebar h3.full-archive.closed {
#site-sidebar h2.closed,
#site-sidebar h3.full-archive.closed {
/*background: url('images/menu-collapsed.png') no-repeat 0px center;*/
}
#site-sidebar h3.full-archive.closed {
......@@ -154,18 +225,20 @@ a.individual-event-ical {margin-left: 0.5em;}
#edit-field-audience-tid {
max-width: 200px;
}
.view-id-events .event h3.event-title, .view-id-events .view-empty {
.view-id-events .event h3.event-title,
.view-id-events .view-empty {
margin-top: 1.5em;
}
.view-display-id-page_3 .date-prev, .view-display-id-page_3 .date-next{
.view-display-id-page_3 .date-prev,
.view-display-id-page_3 .date-next {
display: none;
}
/*events exposed filters*/
.view-id-events .views-exposed-form {
font-size: 80%;
position: relative;
border-bottom: 1px solid #DDD;
border-top: 1px solid #DDD;
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
}
.view-id-events .views-exposed-widgets > div {
width: 25%;
......@@ -191,8 +264,8 @@ a.individual-event-ical {margin-left: 0.5em;}
.view-id-events_with_calendar .views-exposed-form {
font-size: 80%;
position: relative;
border-bottom: 1px solid #DDD;
border-top: 1px solid #DDD;
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
}
.view-id-events_with_calendar .views-exposed-widgets > div {
width: 44%;
......@@ -215,7 +288,8 @@ a.individual-event-ical {margin-left: 0.5em;}
width: 100%;
vertical-align: baseline;
}
.view-display-id-page_1 .view-content, .view-display-id-page_3 .view-content {
.view-display-id-page_1 .view-content,
.view-display-id-page_3 .view-content {
padding-top: 1.5em;
}
/* Tags */
......@@ -230,7 +304,8 @@ a.individual-event-ical {margin-left: 0.5em;}
#edit-field-uw-event-type-und .form-item {
padding: 0;
}
#site-sidebar h2.closed button, #site-sidebar h3.full-archive.closed button {
#site-sidebar h2.closed button,
#site-sidebar h3.full-archive.closed button {
background: url("images/menu-collapsed.png") no-repeat scroll 6px center;
border: medium none;
color: inherit;
......@@ -241,7 +316,8 @@ a.individual-event-ical {margin-left: 0.5em;}
text-align: left;
width: 100%;
}
#site-sidebar h2 button, #site-sidebar h3.full-archive button {
#site-sidebar h2 button,
#site-sidebar h3.full-archive button {
background: url("images/menu-expanded.png") no-repeat scroll 6px center;
border: medium none;
color: inherit;
......@@ -253,13 +329,15 @@ a.individual-event-ical {margin-left: 0.5em;}
width: 100%;
}
/* Remove button outline for Google Chrome */
#site-sidebar h2.closed button:focus, #site-sidebar h3.full-archive.closed button:focus {
outline:none;
border:0;
#site-sidebar h2.closed button:focus,
#site-sidebar h3.full-archive.closed button:focus {
outline: none;
border: 0;
}
#site-sidebar h2 button:focus, #site-sidebar h3.full-archive button:focus {
outline:none;
border:0;
#site-sidebar h2 button:focus,
#site-sidebar h3.full-archive button:focus {
outline: none;
border: 0;
}
/* area colours need to be set in the following documents:
* uw_ct_event/css/uw_ct_event.css
......@@ -269,7 +347,7 @@ a.individual-event-ical {margin-left: 0.5em;}
* uw_fdsu_theme/css/colors.css
*/
body.org_ahs .calendar-calendar td .inner div.day a {
color: #007F8A;
color: #007f8a;
}
body.org_ahs .calendar-calendar .month-view .full td.date-box.today,
body.org_ahs .calendar-calendar .month-view .full tr td.single-day.today,
......@@ -279,16 +357,16 @@ body.org_ahs .calendar-calendar .month-view .full tr.even td.today,
body.org_ahs #site-sidebar .calendar-calendar tr td.today,
body.org_ahs #site-sidebar .calendar-calendar tr.odd td.today,
body.org_ahs #site-sidebar .calendar-calendar tr.even td.today {
border-color: #007F8A;
border-color: #007f8a;
}
body.org_ahs #site-sidebar .calendar-calendar tr td.has-events {
background: #007F8A;
background: #007f8a;
}
body.org_ahs #site-sidebar .calendar-calendar tr td.has-events.today {
background: #005E66;
background: #005e66;
}
body.org_art .calendar-calendar td .inner div.day a {
color: #AC6100;
color: #ac6100;
}
body.org_art .calendar-calendar .month-view .full td.date-box.today,
body.org_art .calendar-calendar .month-view .full tr td.single-day.today,
......@@ -298,16 +376,16 @@ body.org_art .calendar-calendar .month-view .full tr.even td.today,
body.org_art #site-sidebar .calendar-calendar tr td.today,
body.org_art #site-sidebar .calendar-calendar tr.odd td.today,
body.org_art #site-sidebar .calendar-calendar tr.even td.today {
border-color: #AC6100;
border-color: #ac6100;
}
body.org_art #site-sidebar .calendar-calendar tr td.has-events {
background: #AC6100;
background: #ac6100;
}
body.org_art #site-sidebar .calendar-calendar tr td.has-events.today {
background: #8F5100;
background: #8f5100;
}
body.org_eng .calendar-calendar td .inner div.day a {
color: #57068C;
color: #57068c;
}
body.org_eng .calendar-calendar .month-view .full td.date-box.today,
body.org_eng .calendar-calendar .month-view .full tr td.single-day.today,
......@@ -317,13 +395,13 @@ body.org_eng .calendar-calendar .month-view .full tr.even td.today,
body.org_eng #site-sidebar .calendar-calendar tr td.today,
body.org_eng #site-sidebar .calendar-calendar tr.odd td.today,
body.org_eng #site-sidebar .calendar-calendar tr.even td.today {
border-color: #57068C;
border-color: #57068c;
}
body.org_eng #site-sidebar .calendar-calendar tr td.has-events {
background: #57068C;
background: #57068c;
}
body.org_eng #site-sidebar .calendar-calendar tr td.has-events.today {
background: #3C0462;
background: #3c0462;
}
body.org_env .calendar-calendar td .inner div.day a {
color: #747800;
......@@ -342,10 +420,10 @@ body.org_env #site-sidebar .calendar-calendar tr td.has-events {
background: #747800;
}
body.org_env #site-sidebar .calendar-calendar tr td.has-events.today {
background: #4F5200;
background: #4f5200;
}
body.org_mat .calendar-calendar td .inner div.day a {
color: #D42293;
color: #d42293;
}
body.org_mat .calendar-calendar .month-view .full td.date-box.today,
body.org_mat .calendar-calendar .month-view .full tr td.single-day.today,
......@@ -355,16 +433,16 @@ body.org_mat .calendar-calendar .month-view .full tr.even td.today,
body.org_mat #site-sidebar .calendar-calendar tr td.today,
body.org_mat #site-sidebar .calendar-calendar tr.odd td.today,
body.org_mat #site-sidebar .calendar-calendar tr.even td.today {
border-color: #D42293;
border-color: #d42293;
}
body.org_mat #site-sidebar .calendar-calendar tr td.has-events {
background: #D42293;
background: #d42293;
}
body.org_mat #site-sidebar .calendar-calendar tr td.has-events.today {
background: #AF1D7A;
background: #af1d7a;
}
body.org_sci .calendar-calendar td .inner div.day a {
color: #0073CF;
color: #0073cf;
}
body.org_sci .calendar-calendar .month-view .full td.date-box.today,
body.org_sci .calendar-calendar .month-view .full tr td.single-day.today,
......@@ -374,16 +452,16 @@ body.org_sci .calendar-calendar .month-view .full tr.even td.today,
body.org_sci #site-sidebar .calendar-calendar tr td.today,
body.org_sci #site-sidebar .calendar-calendar tr.odd td.today,
body.org_sci #site-sidebar .calendar-calendar tr.even td.today {
border-color: #0073CF;
border-color: #0073cf;
}
body.org_sci #site-sidebar .calendar-calendar tr td.has-events {
background: #0073CF;
background: #0073cf;
}
body.org_sci #site-sidebar .calendar-calendar tr td.has-events.today {
background: #005AA3;
background: #005aa3;
}
body.org_cgc .calendar-calendar td .inner div.day a {
color: #C4262E;
color: #c4262e;
}
body.org_cgc .calendar-calendar .month-view .full td.date-box.today,
body.org_cgc .calendar-calendar .month-view .full tr td.single-day.today,
......@@ -393,16 +471,16 @@ body.org_cgc .calendar-calendar .month-view .full tr.even td.today,
body.org_cgc #site-sidebar .calendar-calendar tr td.today,
body.org_cgc #site-sidebar .calendar-calendar tr.odd td.today,
body.org_cgc #site-sidebar .calendar-calendar tr.even td.today {
border-color: #C4262E;
border-color: #c4262e;
}
body.org_cgc #site-sidebar .calendar-calendar tr td.has-events {
background: #C4262E;
background: #c4262e;
}
body.org_cgc #site-sidebar .calendar-calendar tr td.has-events.today {
background: #AB2128;
background: #ab2128;
}
body.org_ren .calendar-calendar td .inner div.day a {
color: #00693C;
color: #00693c;
}
body.org_ren .calendar-calendar .month-view .full td.date-box.today,
body.org_ren .calendar-calendar .month-view .full tr td.single-day.today,
......@@ -412,16 +490,16 @@ body.org_ren .calendar-calendar .month-view .full tr.even td.today,
body.org_ren #site-sidebar .calendar-calendar tr td.today,
body.org_ren #site-sidebar .calendar-calendar tr.odd td.today,
body.org_ren #site-sidebar .calendar-calendar tr.even td.today {
border-color: #00693C;
border-color: #00693c;
}
body.org_ren #site-sidebar .calendar-calendar tr td.has-events {
background: #00693C;
background: #00693c;
}
body.org_ren #site-sidebar .calendar-calendar tr td.has-events.today {
background: #003D23;
background: #003d23;
}
body.org_stj .calendar-calendar td .inner div.day a {
color: #01573E;
color: #01573e;
}
body.org_stj .calendar-calendar .month-view .full td.date-box.today,
body.org_stj .calendar-calendar .month-view .full tr td.single-day.today,
......@@ -431,16 +509,16 @@ body.org_stj .calendar-calendar .month-view .full tr.even td.today,
body.org_stj #site-sidebar .calendar-calendar tr td.today,
body.org_stj #site-sidebar .calendar-calendar tr.odd td.today,
body.org_stj #site-sidebar .calendar-calendar tr.even td.today {
border-color: #01573E;
border-color: #01573e;
}
body.org_stj #site-sidebar .calendar-calendar tr td.has-events {
background: #01573E;
background: #01573e;
}
body.org_stj #site-sidebar .calendar-calendar tr td.has-events.today {
background: #00281D;
background: #00281d;
}
body.org_stp .calendar-calendar td .inner div.day a {
color: #727C2E;
color: #727c2e;
}
body.org_stp .calendar-calendar .month-view .full td.date-box.today,
body.org_stp .calendar-calendar .month-view .full tr td.single-day.today,
......@@ -450,10 +528,10 @@ body.org_stp .calendar-calendar .month-view .full tr.even td.today,
body.org_stp #site-sidebar .calendar-calendar tr td.today,
body.org_stp #site-sidebar .calendar-calendar tr.odd td.today,
body.org_stp #site-sidebar .calendar-calendar tr.even td.today {
border-color: #727C2E;
border-color: #727c2e;
}
body.org_stp #site-sidebar .calendar-calendar tr td.has-events {
background: #727C2E;
background: #727c2e;
}
body.org_stp #site-sidebar .calendar-calendar tr td.has-events.today {
background: #525921;
......
<?php
$view = new view;
/**
* @file
*/
$view = new view();
$view->name = 'event_category_blocks';
$view->description = 'Displays news item categories.';
$view->tag = 'news';
......@@ -129,7 +134,7 @@ $handler = $view->new_display('block', 'Block - News by Audience', 'block');
/* ---------------------------- */
$view = new view;
$view = new view();
$view->name = 'events';
$view->description = '';
$view->tag = 'default';
......@@ -973,7 +978,7 @@ $handler->display->display_options['path'] = 'admin/manage/events';
/* ---------------------------- */
$view = new view;
$view = new view();
$view->name = 'uw_news_item_pages';
$view->description = 'News, news-by-date and news-by-category.';
$view->tag = 'news';
......
......@@ -2,31 +2,32 @@
* @file
* Adds the ability to select a pre-existing location, making an AJAX call to populate the data from a central location.
*/
(function ($) {
Drupal.behaviors.uw_ct_event = {
attach: function (context, settings) {
if($("#autofill-location-data").length === 0){
if ($("#autofill-location-data").length === 0) {
$locations = $('<select>').addClass('form-select').attr('id', settings.uw_ct_event.selectId);
// create the list of locations
// Create the list of locations.
if (settings.uw_ct_event.data) {
// add first location placeholder
// Add first location placeholder.
$locations.append($('<option>').text(settings.uw_ct_event.custom).attr('value', 'custom'));
// add location selections
$.each(settings.uw_ct_event.data, function(key, value) {
// Add location selections.
$.each(settings.uw_ct_event.data, function (key, value) {
$locations.append($('<option>').text(value.name).attr('value', key));
});
//add the list to the page
// Add the list to the page.
$locations.insertBefore('#' + settings.uw_ct_event.containerId, context)
$locations.wrap($('<div>').addClass('form-item'));
$locations.before($('<label>').text(settings.uw_ct_event.label).attr('for', settings.uw_ct_event.selectId));
$locations.after($('<div>').text(settings.uw_ct_event.description).addClass('description'));
//set location data when the list changes
$locations.change(function() {
// Set location data when the list changes.
$locations.change(function () {
if ($locations.val() != 'custom') {
_populate_location_data(settings.uw_ct_event.data[$locations.val()])
}
......@@ -51,7 +52,7 @@
}
};
// TODO: use a variable setting from Drupal for the field name / language id selector
// TODO: use a variable setting from Drupal for the field name / language id selector.
function _populate_location_data(data) {
$('#edit-field-event-location-und-0-name').val(data.name);
$('#edit-field-event-location-und-0-additional').val(data.additional);
......@@ -63,6 +64,5 @@
$('#edit-field-event-location-und-0-locpick-user-latitude').val(data.latitude);
$('#edit-field-event-location-und-0-locpick-user-longitude').val(data.longitude);
}
}(jQuery));
}(jQuery));
/**
* @file
*
*/
(function ($) {
$(function() {
//default state for "Full archive" is closed.
$(function () {
// Default state for "Full archive" is closed.
if (readCookie('Full archive') == null) {
createCookie('Full archive', 'closed', 30);
}
// Removing Calendar button from page if empty.
if($('.feed-icon').length) {
if ($('.feed-icon').length) {
if (!$('.feed-icon').html()) {
$('.feed-icon').remove();
}
}
// Events by audience and Events by type
$('#site-sidebar .block-events h2, #block-views-event-type-block-events-by-type h2').click(function() {
// Events by audience and Events by type.
$('#site-sidebar .block-events h2, #block-views-event-type-block-events-by-type h2').click(function () {
if ($(this).hasClass('closed')) {
//expandable item is closed, open it
// Expandable item is closed, open it.
createCookie($(this).text(), 'open', 30);
$(this).removeClass('closed');
$(this).parent('div').find('.item-list').removeClass('hidden');
} else {
//expandable item is open, close it
}
else {
// Expandable item is open, close it.
createCookie($(this).text(), 'closed', 30);
$(this).addClass('closed');
$(this).parent('div').find('.item-list').addClass('hidden');
}
}).each(function() {
}).each(function () {
if (readCookie($(this).text()) == 'closed') {
$(this).click();