forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SAK-33262 Initial commit of Noodle's My Connections widget (sakaiproj…
…ect#4705) * SAK-33262 Initial commit of Noodle's My Connections widget * spaces
- Loading branch information
1 parent
95f0e73
commit bc1532f
Showing
17 changed files
with
711 additions
and
1 deletion.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
library/src/morpheus-master/sass/modules/tool/myconnections/_myconnections.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
.#{$namespace}sakai-myconnections{ | ||
|
||
/* apply to an element with a background image to make rounded and centred */ | ||
.rounded { | ||
width: 70px; | ||
height: 70px; | ||
display: inline-block; | ||
background-size: auto 100%; | ||
background-position: 50%; | ||
border-radius: 50%; | ||
position: relative; | ||
margin-top: 0; | ||
} | ||
|
||
.myconnections-cell { | ||
position: relative; | ||
text-align: center; | ||
width: 160px; | ||
padding-top: 20px; | ||
vertical-align: top; | ||
} | ||
|
||
nav.#{$namespace}toolTitleNav, div.#{$namespace}toolBody>nav.#{$namespace}toolTitleNav { | ||
border: 1px solid #e0e0e0; | ||
background-color: #f0f0f0; | ||
text-align: center; | ||
box-sizing: border-box; | ||
} | ||
|
||
nav.#{$namespace}toolTitleNav>h2.#{$namespace}toolTitleNav__title, div.#{$namespace}toolBody>nav.#{$namespace}toolTitleNav>h2.#{$namespace}toolTitleNav__title { | ||
color: #333; | ||
font-weight: bold; | ||
font-size: 1em; | ||
} | ||
|
||
div.#{$namespace}toolBody--sakai-myconnections>h3 { | ||
text-align: center; | ||
} | ||
|
||
div.#{$namespace}toolBody--sakai-myconnections>div>table { | ||
margin: 0 auto; | ||
} | ||
|
||
div.online-status { | ||
display: block; | ||
height: 16px; | ||
width: 16px; | ||
position: absolute; | ||
left: 61%; | ||
top: 80px; | ||
border-radius: 8px; | ||
} | ||
|
||
div.online-status.online { | ||
background-color: yellowgreen; | ||
} | ||
div.online-status.away { | ||
background-color: gold | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?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 Connections</name> | ||
<groupId>org.sakaiproject.myconnections</groupId> | ||
<artifactId>myconnections</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.26.0</version> | ||
<type>pom</type> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.wicket</groupId> | ||
<artifactId>wicket-spring</artifactId> | ||
<version>6.26.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.wicket</groupId> | ||
<artifactId>wicket-extensions</artifactId> | ||
<version>6.26.0</version> | ||
</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>org.sakaiproject.portal</groupId> | ||
<artifactId>sakai-portal-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> | ||
<dependency> | ||
<groupId>org.sakaiproject.profile2</groupId> | ||
<artifactId>profile2-api</artifactId> | ||
<scope>provided</scope> | ||
<version>12-SNAPSHOT</version> | ||
</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> |
67 changes: 67 additions & 0 deletions
67
myconnections/src/java/org/sakaiproject/myconnections/WidgetApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package org.sakaiproject.myconnections; | ||
|
||
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.myconnections.ui.WidgetPage; | ||
|
||
/** | ||
* App class for My Connections widget | ||
* | ||
* @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("/myconnections/scripts/wicket/empty.js"))); | ||
getJavaScriptLibrarySettings().setWicketEventReference(new UrlResourceReference(Url.parse("/myconnections/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() { | ||
} | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
myconnections/src/java/org/sakaiproject/myconnections/WidgetApplication.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
app.title=Connections | ||
|
||
label.noconnections=You don't have any connections yet. | ||
heading.request=connection request |
20 changes: 20 additions & 0 deletions
20
myconnections/src/java/org/sakaiproject/myconnections/ui/WidgetPage.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd" > | ||
|
||
<head> | ||
<title><wicket:message key="app.title" /></title> | ||
<script language="javascript"> | ||
$(document).ready(function () { | ||
profile.attachPopups($('td.my-connections-cell a')); | ||
}); | ||
</script> | ||
|
||
</head> | ||
<body> | ||
|
||
<wicket:enclosure> | ||
<div wicket:id="connections"></div> | ||
</wicket:enclosure> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.