Skip to content

Commit

Permalink
SAK-32661 Initial commit of Noodle's MyCalendar widget (sakaiproject#…
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianfish authored Aug 17, 2017
1 parent b9364c1 commit cb53f0f
Show file tree
Hide file tree
Showing 30 changed files with 2,725 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
.#{$namespace}sakai-mycalendar {

li.mycalendar-event {
list-style-type: none;
}
.ui-datepicker-title {
font-weight: 500;
font-size: 16px;
margin: 0 0 !important;
}
.mycalendar-event-heading {
display: flex;
justify-content: center;
align-items: middle;
color: #777;
border-top:1px solid lightgrey;
line-height: 24px;
padding-top: 20px;
padding-bottom: 20px;
font-weight: bold;
}
#mycalendar-event-heading-text {
font-weight: 500;
font-size: 16px;
margin-left: 15px;
margin-right: 15px;
}
.fa-chevron-circle-left:before, .fa-chevron-circle-right:before {
font-size: 24px;
}

.left-arrow, .right-arrow {
cursor: pointer;
}

.mycalendar-event {
margin-bottom: 15px;
}

.mycalendar-event-time {
width: 80px;
}

.mycalendar-event-type {
font-weight: bold;
}
.#{$namespace}container.#{$namespace}sakai-mycalendar {
border:1px solid lightgrey;
}

div.ui-datepicker-inline {
width: 100%;
margin: 0 auto;
display: block;
padding: 0 0 10px;
}
.#{$namespace}sakai-mycalendar .ui-datepicker .ui-datepicker-header {
border-radius: 0;
}
.#{$namespace}sakai-mycalendar .ui-datepicker-header {
display: flex;
justify-content: center;
align-items: center;
color: #777;
}
.#{$namespace}sakai-mycalendar .ui-datepicker-prev
, .#{$namespace}sakai-mycalendar .ui-datepicker-next {
position: relative;
left: 0;
top: 0;
width: 24px;
height: 24px;
line-height: 24px;
}
.#{$namespace}sakai-mycalendar .ui-datepicker-prev {
order: 1;
margin-right: 15px;
}
.#{$namespace}sakai-mycalendar .ui-datepicker-title {
order: 2;
}
.#{$namespace}sakai-mycalendar .ui-datepicker-next {
order: 3;
margin-left: 15px;
}

.#{$namespace}sakai-mycalendar .ui-corner-all {
border: none;
border-radius: 0;
}
.#{$namespace}sakai-mycalendar .ui-icon-circle-triangle-w
, .#{$namespace}sakai-mycalendar .ui-icon-circle-triangle-e {
background-image: none;
}
.#{$namespace}sakai-mycalendar .ui-datepicker-prev span
, .#{$namespace}sakai-mycalendar .ui-datepicker-next span {
position: relative;
margin-top: 0;
top: 0;
padding-left: 1px;
}
.#{$namespace}sakai-mycalendar .ui-datepicker-prev span.ui-icon
, .#{$namespace}sakai-mycalendar .ui-datepicker-next span.ui-icon {
width: 24px;
height: 24px;
display: inline;
text-indent: 0;
overflow: hidden;
left: 0;
top: 0;
margin-left: 0;
margin-top: 0;
background-repeat: no-repeat;
}
.#{$namespace}sakai-mycalendar .ui-datepicker-prev span:before
, .#{$namespace}sakai-mycalendar .ui-datepicker-next span:before {
font-family: FontAwesome;
font-size: 24px;
position: relative;
color: #777;
}
.#{$namespace}sakai-mycalendar .ui-datepicker-prev span:before {
content: "\f137";
}
.#{$namespace}sakai-mycalendar .ui-datepicker-next span:before {
content: "\f138";
}
div.#{$namespace}sakai-mycalendar div.ui-datepicker {
border-color: white;
}

div.#{$namespace}sakai-mycalendar table.ui-datepicker-calendar {
width: 100%;
margin: 0 auto;
}

div.#{$namespace}sakai-mycalendar div.ui-datepicker table.ui-datepicker-calendar td.ui-datepicker-current-day > a {
border: 1px solid #1d5e74;
color: black;
border-radius:50%;
width:27px;
display:block;
margin:0 auto;
}

div.#{$namespace}sakai-mycalendar div.ui-datepicker table.ui-datepicker-calendar td > a {
border-color: white;
background: white;
text-align: center;
}

div.#{$namespace}sakai-mycalendar div.ui-datepicker table.ui-datepicker-calendar td > span {
border-color: white;
background: white;
text-align: center;
}
div.#{$namespace}sakai-mycalendar div.ui-datepicker table.ui-datepicker-calendar td.mycalendar-eventful-day > a {
color: black;
background-color: lightblue;
border-radius:50%;
width:27px;
display:block;
margin:0 auto;
}

div.#{$namespace}sakai-mycalendar div.ui-datepicker table.ui-datepicker-calendar td.ui-datepicker-today > a {
border: 1px solid #1d5e74;
color: white;
display:block;
margin:0 auto;
background-color:black;
border-radius:50%;
width:27px;
}

div.#{$namespace}sakai-mycalendar div.ui-datepicker table.ui-datepicker-calendar td.mycalendar-eventful-day.ui-datepicker-today > a {
background-color: darkblue;
}

div.mycalendar-events-div {
margin-bottom: 9px;
}

table.mycalendar-events {
margin: 0 auto;
}

table.mycalendar-event {
margin: 0 auto;
}

#{$nonPhone} {
.ui-datepicker td {
width:120px;
}
}

#{$phone} {
.ui-datepicker td {
width:80px;
}
}
}
1 change: 1 addition & 0 deletions library/src/morpheus-master/sass/tool.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
@import "modules/tool/announcements/announcements";
@import "modules/tool/assignments/assignments";
@import "modules/tool/messages/messages";
@import "modules/tool/mycalendar/mycalendar";
@import "modules/tool/polls/polls";
@import "modules/tool/lessonbuilder/lessonbuilder";
@import "modules/tool/samigo/samigo";
Expand Down
95 changes: 95 additions & 0 deletions mycalendar/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>My Calendar</name>
<groupId>org.sakaiproject.mycalendar</groupId>
<artifactId>mycalendar</artifactId>
<parent>
<groupId>org.sakaiproject</groupId>
<artifactId>master</artifactId>
<version>12-SNAPSHOT</version>
<relativePath>../master/pom.xml</relativePath>
</parent>
<packaging>war</packaging>
<dependencies>
<!-- third party dependencies -->
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket</artifactId>
<version>6.18.0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-spring</artifactId>
<version>6.18.0</version>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-extensions</artifactId>
<version>6.18.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.kernel</groupId>
<artifactId>sakai-kernel-api</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.kernel</groupId>
<artifactId>sakai-component-manager</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.kernel</groupId>
<artifactId>sakai-kernel-util</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<scope>provided</scope> <!-- to satisfy EB and eclipse -->
</dependency>
</dependencies>
<build>
<resources>
<!-- include everything except the Java source -->
<resource>
<directory>src/java</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<!-- include our log4j.properties -->
<resource>
<directory>src/resources</directory>
<includes>
<include>*.properties</include>
</includes>
</resource>
</resources>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package org.sakaiproject.mycalendar;

import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.Url;
import org.apache.wicket.request.resource.UrlResourceReference;
import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
import org.sakaiproject.mycalendar.ui.WidgetPage;

/**
* Main application class
*
* @author Steve Swinsburg ([email protected])
*
*/
public class WidgetApplication extends WebApplication {

@Override
public void init() {
super.init();

// Configure for Spring injection
getComponentInstantiationListeners().add(new SpringComponentInjector(this));

// Don't throw an exception if we are missing a property, just fallback
getResourceSettings().setThrowExceptionOnMissingResource(false);

// Remove the wicket specific tags from the generated markup
getMarkupSettings().setStripWicketTags(true);

// Don't add any extra tags around a disabled link (default is <em></em>)
getMarkupSettings().setDefaultBeforeDisabledLink(null);
getMarkupSettings().setDefaultAfterDisabledLink(null);

// On Wicket session timeout, redirect to main page
getApplicationSettings().setPageExpiredErrorPage(getHomePage());

// cleanup the HTML
getMarkupSettings().setStripWicketTags(true);
getMarkupSettings().setStripComments(true);
getMarkupSettings().setCompressWhitespace(true);

// Suppress internal javascript references
// When rendered inline, the URLs these generate are incorrect - the context path is /page/ instead of the webapp name.
// However it is cleaner if we just handle this manually in the page
getJavaScriptLibrarySettings().setJQueryReference(new UrlResourceReference(Url.parse("/mycalendar/scripts/wicket/empty.js")));
getJavaScriptLibrarySettings().setWicketEventReference(new UrlResourceReference(Url.parse("/mycalendar/scripts/wicket/empty.js")));

// to put this app into deployment mode, see web.xml
}

/**
* The main page for our app
*
* @see org.apache.wicket.Application#getHomePage()
*/
@Override
public Class<WidgetPage> getHomePage() {
return WidgetPage.class;
}

/**
* Constructor
*/
public WidgetApplication() {
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
app.title=My Calendar
Loading

0 comments on commit cb53f0f

Please sign in to comment.