You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by ja...@apache.org on 2011/10/10 13:35:28 UTC
svn commit: r1180880 - in /incubator/rave/trunk:
rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/
rave-components/rave-web/src/main/java/org/apache/rave/portal/web/util/
rave-components/rave-web/src/test/java/org/apache/rav...
Author: jasha
Date: Mon Oct 10 11:35:28 2011
New Revision: 1180880
URL: http://svn.apache.org/viewvc?rev=1180880&view=rev
Log:
RAVE-295 initial design of table with paging and link to user detail.
No logic yet for the paging or retrieving actual data
Added:
incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/userdetail.jsp
- copied, changed from r1180792, incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/home.jsp
incubator/rave/trunk/rave-portal-resources/src/main/webapp/script/rave_admin.js
Modified:
incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/AdminController.java
incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/util/ViewNames.java
incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/controller/AdminControllerTest.java
incubator/rave/trunk/rave-portal-resources/src/main/resources/messages.properties
incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_generic_page.tag
incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/home.jsp
incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/users.jsp
incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/widgets.jsp
incubator/rave/trunk/rave-portal-resources/src/main/webapp/css/default.css
Modified: incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/AdminController.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/AdminController.java?rev=1180880&r1=1180879&r2=1180880&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/AdminController.java (original)
+++ incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/AdminController.java Mon Oct 10 11:35:28 2011
@@ -24,6 +24,7 @@ import org.apache.rave.portal.web.model.
import org.apache.rave.portal.web.util.ViewNames;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -46,6 +47,13 @@ public class AdminController {
return ViewNames.ADMIN_USERS;
}
+ @RequestMapping(value = "userdetail/{userid}", method = RequestMethod.GET)
+ public String viewUserDetail(@PathVariable("userid") String userid, Model model) {
+ addNavigationMenusToModel("users", model);
+ model.addAttribute("userid", userid);
+ return ViewNames.ADMIN_USERDETAIL;
+ }
+
@RequestMapping(value = "widgets", method = RequestMethod.GET)
public String viewWidgets(Model model) {
addNavigationMenusToModel("widgets", model);
Modified: incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/util/ViewNames.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/util/ViewNames.java?rev=1180880&r1=1180879&r2=1180880&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/util/ViewNames.java (original)
+++ incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/util/ViewNames.java Mon Oct 10 11:35:28 2011
@@ -33,6 +33,7 @@ public class ViewNames {
public static final String ADMIN_HOME = "admin/home";
public static final String ADMIN_USERS = "admin/users";
+ public static final String ADMIN_USERDETAIL = "admin/userdetail";
public static final String ADMIN_WIDGETS = "admin/widgets";
public static final String REDIRECT = "redirect:/";
Modified: incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/controller/AdminControllerTest.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/controller/AdminControllerTest.java?rev=1180880&r1=1180879&r2=1180880&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/controller/AdminControllerTest.java (original)
+++ incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/controller/AdminControllerTest.java Mon Oct 10 11:35:28 2011
@@ -52,6 +52,17 @@ public class AdminControllerTest {
}
@Test
+ public void testAdminUserDetail() throws Exception {
+ Model model = new ExtendedModelMap();
+ String userid = "dummyUserId";
+ String adminUserDetailView = controller.viewUserDetail(userid, model);
+ assertEquals(ViewNames.ADMIN_USERDETAIL, adminUserDetailView);
+ assertTrue(model.containsAttribute("tabs"));
+ assertEquals(userid, model.asMap().get("userid"));
+
+ }
+
+ @Test
public void adminWidgets() throws Exception {
Model model = new ExtendedModelMap();
String adminWidgetsView = controller.viewWidgets(model);
Modified: incubator/rave/trunk/rave-portal-resources/src/main/resources/messages.properties
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/resources/messages.properties?rev=1180880&r1=1180879&r2=1180880&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/resources/messages.properties (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/resources/messages.properties Mon Oct 10 11:35:28 2011
@@ -114,6 +114,7 @@ admin.widgets.title=Rave admin interface
admin.widgets.shorttitle=Widgets
admin.users.title=Rave admin interface - Users
admin.users.shorttitle=Users
+admin.userdetail.title=Rave admin interface - User detail
widget.author=Author
widget.authorEmail=Author's email address
Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_generic_page.tag
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_generic_page.tag?rev=1180880&r1=1180879&r2=1180880&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_generic_page.tag (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_generic_page.tag Mon Oct 10 11:35:28 2011
@@ -30,7 +30,7 @@ This tag will provide simple template la
<html>
<head>
<meta charset="UTF-8"/>
- <title><c:out value="${pageTitle}"/><fmt:message key="page.general.titlesuffix"/></title>
+ <title><c:out value="${pageTitle}"/> <fmt:message key="page.general.titlesuffix"/></title>
<link rel="stylesheet" href="//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.13/themes/base/jquery-ui.css"/>
<link rel="stylesheet" href="<c:url value="/css/default.css" />" />
<rave:custom_css/>
Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/home.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/home.jsp?rev=1180880&r1=1180879&r2=1180880&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/home.jsp (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/home.jsp Mon Oct 10 11:35:28 2011
@@ -19,6 +19,7 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="rave" %>
<fmt:setBundle basename="messages"/>
Copied: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/userdetail.jsp (from r1180792, incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/home.jsp)
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/userdetail.jsp?p2=incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/userdetail.jsp&p1=incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/home.jsp&r1=1180792&r2=1180880&rev=1180880&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/home.jsp (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/userdetail.jsp Mon Oct 10 11:35:28 2011
@@ -19,14 +19,15 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="rave" %>
<fmt:setBundle basename="messages"/>
-<fmt:message key="admin.home.title" var="pagetitle"/>
+<fmt:message key="admin.userdetail.title" var="pagetitle"/>
<rave:rave_generic_page pageTitle="${pagetitle}">
<rave:header pageTitle="${pagetitle}"/>
<rave:admin_tabsheader/>
<div id="pageContent">
- <p>Content goes here</p>
+ <p>User detail goes here</p>
</div>
</rave:rave_generic_page>
\ No newline at end of file
Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/users.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/users.jsp?rev=1180880&r1=1180879&r2=1180880&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/users.jsp (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/users.jsp Mon Oct 10 11:35:28 2011
@@ -19,14 +19,147 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="rave" %>
<fmt:setBundle basename="messages"/>
+<%--@elvariable id="searchResult" type="org.apache.rave.portal.model.util.SearchResult"--%>
<fmt:message key="admin.users.title" var="pagetitle"/>
<rave:rave_generic_page pageTitle="${pagetitle}">
<rave:header pageTitle="${pagetitle}"/>
<rave:admin_tabsheader/>
- <div id="pageContent">
- <p>Content goes here</p>
+ <div class="pageContent">
+ <article class="admincontent">
+ <ul class="horizontal-list searchbox">
+ <li><a href="<spring:url value="/app/newaccount.jsp"/>">__Add user</a></li>
+ <li>
+ <form action="" method="GET">
+ <fieldset>
+ <input type="hidden" name="referringPageId" value="${referringPageId}">
+ <label for="searchTerm">__Search users</label>
+ <input type="search" id="searchTerm" name="searchTerm"
+ value="<c:out value="${searchTerm}"/>"/>
+ <fmt:message key="page.store.search.button" var="searchButtonText"/>
+ <input type="submit" value="${searchButtonText}">
+ </fieldset>
+ </form>
+ </li>
+ </ul>
+ <c:choose>
+ <c:when test="${empty searchTerm and (empty searchResult or searchResult.totalResults eq 0)}">
+ <fmt:message key="page.store.list.noresult" var="listheader"/>
+ </c:when>
+ <c:when test="${empty searchTerm}">
+ <fmt:message key="page.store.list.result.x.to.y" var="listheader">
+ <fmt:param value="${offset + 1}"/>
+ <fmt:param value="${offset + fn:length(searchResult.resultSet)}"/>
+ <fmt:param value="${searchResult.totalResults}"/>
+ </fmt:message>
+ </c:when>
+ <c:when test="${not empty searchTerm and searchResult.totalResults eq 0}">
+ <fmt:message key="page.store.list.search.noresult" var="listheader">
+ <fmt:param><c:out value="${searchTerm}"/></fmt:param>
+ </fmt:message>
+ </c:when>
+ <c:otherwise>
+ <fmt:message key="page.store.list.search.result.x.to.y" var="listheader">
+ <fmt:param value="${offset + 1}"/>
+ <fmt:param value="${offset + fn:length(searchResult.resultSet)}"/>
+ <fmt:param value="${searchResult.totalResults}"/>
+ <fmt:param><c:out value="${searchTerm}"/></fmt:param>
+ </fmt:message>
+ </c:otherwise>
+ </c:choose>
+ <h2>__${listheader}</h2>
+
+ <ul class="paging">
+ <li><a href="#"><</a></li>
+ <li><a href="#">1</a></li>
+ <li>2</li>
+ <li><a href="#">3</a></li>
+ <li><a href="#">4</a></li>
+ <li><a href="#">5</a></li>
+ <li><a href="#">></a></li>
+ </ul>
+
+ <table class="datatable userstable">
+ <thead>
+ <tr>
+ <th class="textcell">Username</th>
+ <th class="largetextcell">Email</th>
+ <th class="booleancell">Enabled</th>
+ </tr>
+ </thead>
+ <tbody>
+ <spring:url value="/app/admin/userdetail/john.doe" var="userdetail"/>
+ <tr data-detaillink="${userdetail}">
+ <td><a href="${userdetail}">canonical</a></td>
+ <td><a href="${userdetail}">canonical@example.com</a></td>
+ <td><a href="${userdetail}">X</a></td>
+ </tr>
+ <tr>
+ <td>john.doe</td>
+ <td>john.doe@example.com</td>
+ <td>X</td>
+ </tr>
+ <tr>
+ <td>jane.doe</td>
+ <td>jane.doe@example.com</td>
+ <td>X</td>
+ </tr>
+ <tr>
+ <td>canonical</td>
+ <td>canonical@example.com</td>
+ <td>X</td>
+ </tr>
+ <tr>
+ <td>john.doe</td>
+ <td>john.doe@example.com</td>
+ <td>X</td>
+ </tr>
+ <tr>
+ <td>jane.doe</td>
+ <td>jane.doe@example.com</td>
+ <td>X</td>
+ </tr>
+ <tr>
+ <td>canonical</td>
+ <td>canonical@example.com</td>
+ <td>X</td>
+ </tr>
+ <tr>
+ <td>john.doe</td>
+ <td>john.doe@example.com</td>
+ <td>X</td>
+ </tr>
+ <tr>
+ <td>jane.doe</td>
+ <td>jane.doe@example.com</td>
+ <td>X</td>
+ </tr>
+ <tr>
+ <td>jane.doe</td>
+ <td>jane.doe@example.com</td>
+ <td>X</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <ul class="paging">
+ <li><a href="#"><</a></li>
+ <li><a href="#">1</a></li>
+ <li>2</li>
+ <li><a href="#">3</a></li>
+ <li><a href="#">4</a></li>
+ <li><a href="#">5</a></li>
+ <li><a href="#">></a></li>
+ </ul>
+ </article>
</div>
+
+ <script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.1.min.js"></script>
+ <script src="<spring:url value="/script/rave_admin.js"/>"></script>
+ <script>$(function() {
+ rave.admin.initAdminUi();
+ });</script>
</rave:rave_generic_page>
\ No newline at end of file
Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/widgets.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/widgets.jsp?rev=1180880&r1=1180879&r2=1180880&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/widgets.jsp (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/widgets.jsp Mon Oct 10 11:35:28 2011
@@ -19,6 +19,7 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="rave" %>
<fmt:setBundle basename="messages"/>
Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/css/default.css
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/css/default.css?rev=1180880&r1=1180879&r2=1180880&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/css/default.css (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/css/default.css Mon Oct 10 11:35:28 2011
@@ -33,12 +33,17 @@ body {
/* general html fields */
-header, nav, article, section, footer, ul {
+header, nav, article, section, footer{
display: block;
margin: 0;
padding: 0;
}
+ul, ol, table, p {
+ margin: 0;
+ padding: 0;
+}
+
h1, h2, h3, h4, h5, h6 {
color: #193240;
text-transform: uppercase;
@@ -65,11 +70,28 @@ a img {
clear: both;
}
-.horizontal-list li {
+.horizontal-list li, .paging li {
display: inline;
list-style: none;
padding:0 10px;
}
+.horizontal-list li:last-child, .paging li:last-child {
+ padding-right: 0;
+}
+
+.paging li {
+ padding: 0;
+}
+
+.paging li:after {
+ margin: 0 10px;
+ content: "|";
+}
+
+.paging li:last-child:after {
+ margin-right: 0;
+ content: "";
+}
#banner {
padding: 0 0 10px 10px;
@@ -142,6 +164,10 @@ header h1 {
margin-bottom: 0;
}
+#content p {
+ margin: 1em 0;
+}
+
/* Widgets */
.widget {
padding: 5px;
@@ -365,28 +391,8 @@ ul.storeItems li{
visibility: hidden;
}
-ul.paging {
- list-style: none;
- padding: 0;
-}
-
-ul.paging li {
- display: inline;
-}
-
-
-#footer {
- margin: 20px 150px 20px 250px;
- border-top: 1px solid #ccc;
- color: #666;
- font-size: 0.8em;
- padding: 0 8px;
- text-align: center;
-}
-
-
button.widget-toolbar-btn {
- width: 1em;
+ width: 1em;
}
button.widget-toolbar-btn-prefs {
@@ -506,7 +512,7 @@ span.error, label.error {
padding-top: 3px;
}
-#pageContent {
+#pageContent, .pageContent {
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#D7D7D3", endColorstr="#EBEBEB");
background: -moz-linear-gradient(center top , #D7D7D3 0%, #EBEBEB 50%) repeat scroll 0 0 transparent;
background: -webkit-gradient(linear, left top, left bottom, from(#D7D7D3), to(#EBEBEB));
@@ -550,7 +556,6 @@ span.error, label.error {
}
#errorStack {
display: none;
-
}
.errorMessage {
@@ -559,4 +564,119 @@ span.error, label.error {
}
.errorLogo {
text-align: center;
-}
\ No newline at end of file
+}
+
+/** Admin interface **/
+.admincontent {
+ margin: 0 auto;
+ width: 80%;
+ padding:0 20px;
+ font-size:1.1em;
+}
+
+.admincontent .searchbox {
+ float:right;
+ margin-top:1em;
+}
+
+.searchbox form, .searchbox fieldset {
+ display:inline;
+ height:1em;
+ margin:0;
+ padding:0;
+}
+
+.admincontent h2 {
+ margin-top: 0;
+ padding-top:1em;
+}
+
+.admincontent table {
+ margin: 1.5em 0;
+ padding: 0;
+ border-collapse: collapse;
+ font-size: 13px;
+ border: 1px solid #ddd;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.admincontent table th,.admincontent table td {
+ padding: 5px 5px 4px;
+ line-height: 1.5em;
+ text-align: left;
+}
+
+.admincontent table th {
+ padding-top: 4px;
+ font-weight: bold;
+ vertical-align: middle;
+ border-bottom: 1px solid #ddd;
+ background-color: #000000;
+ color: #ffffff;
+}
+
+.admincontent table td {
+ vertical-align: top;
+}
+
+.admincontent table th+th, .admincontent table td+td {
+ border-left: 1px solid #ddd;
+}
+
+.admincontent table tr+tr td {
+ border-top: 1px solid #ddd;
+}
+
+.admincontent table tbody tr:first-child td:first-child {
+ -webkit-border-radius: 4px 0 0 0;
+ -moz-border-radius: 4px 0 0 0;
+ border-radius: 4px 0 0 0;
+}
+
+.admincontent table tbody tr:first-child td:last-child {
+ -webkit-border-radius: 0 4px 0 0;
+ -moz-border-radius: 0 4px 0 0;
+ border-radius: 0 4px 0 0;
+}
+
+.admincontent table tbody tr:last-child td:first-child {
+ -webkit-border-radius: 0 0 0 4px;
+ -moz-border-radius: 0 0 0 4px;
+ border-radius: 0 0 0 4px;
+}
+
+.admincontent table tbody tr:last-child td:last-child {
+ -webkit-border-radius: 0 0 4px 0;
+ -moz-border-radius: 0 0 4px 0;
+ border-radius: 0 0 4px 0;
+}
+
+.admincontent tbody tr:nth-child(odd) {
+ background-color: #D3D3D3;
+}
+
+.admincontent tbody tr:hover {
+ background-color: #B4C4CF;
+}
+
+.admincontent table a, .admincontent table a:visited {
+ color: #000000;
+ text-decoration:none;
+}
+
+.admincontent tbody tr:hover a, .admincontent table a:hover {
+ background-color: transparent;
+ text-decoration: underline;
+}
+
+.booleancell {
+ width: 50px;
+}
+.textcell {
+ width: 150px;
+}
+.largetextcell {
+ width: 300px
+}
Added: incubator/rave/trunk/rave-portal-resources/src/main/webapp/script/rave_admin.js
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/script/rave_admin.js?rev=1180880&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/script/rave_admin.js (added)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/script/rave_admin.js Mon Oct 10 11:35:28 2011
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+var rave = rave || {};
+rave.admin = rave.admin || (function() {
+
+ var adminUi = (function() {
+
+ function datatableClick() {
+ $('.datatable tr').bind('click', function() {
+ var link = $(this).attr('data-detaillink');
+ if (link != undefined && link != '') {
+ window.location = link;
+ }
+ });
+ }
+
+ function init() {
+ datatableClick();
+ }
+
+ return {
+ init:init
+ }
+ })();
+
+ return {
+ initAdminUi : adminUi.init
+ }
+
+})();
+