roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject roller git commit: UserAdmin and UserEdit pages converted to Bootstrap, also switched back to Java 8.
Date Sun, 28 Oct 2018 17:17:38 GMT
Repository: roller
Updated Branches:
  refs/heads/bootstrap-ui 2ec0cba5e -> 47049acdd


UserAdmin and UserEdit pages converted to Bootstrap, also switched back to Java 8.


Project: http://git-wip-us.apache.org/repos/asf/roller/repo
Commit: http://git-wip-us.apache.org/repos/asf/roller/commit/47049acd
Tree: http://git-wip-us.apache.org/repos/asf/roller/tree/47049acd
Diff: http://git-wip-us.apache.org/repos/asf/roller/diff/47049acd

Branch: refs/heads/bootstrap-ui
Commit: 47049acdddef133aec4817b5d039ce5ac25fc58a
Parents: 2ec0cba
Author: Dave Johnson <snoopdave@gmail.com>
Authored: Sun Oct 28 13:17:35 2018 -0400
Committer: Dave Johnson <snoopdave@gmail.com>
Committed: Sun Oct 28 13:17:35 2018 -0400

----------------------------------------------------------------------
 .../ui/struts2/admin/CreateUserBean.java        |  16 +-
 .../weblogger/ui/struts2/admin/UserAdmin.java   |  19 ++-
 .../weblogger/ui/struts2/admin/UserEdit.java    |  11 +-
 app/src/main/resources/struts.xml               |   5 +
 .../webapp/WEB-INF/jsps/admin/UserAdmin.jsp     |  45 ++---
 .../main/webapp/WEB-INF/jsps/admin/UserEdit.jsp | 169 +++++++------------
 .../WEB-INF/jsps/tiles/tiles-tabbedpage.jsp     |   7 +-
 app/src/main/webapp/WEB-INF/tiles.xml           |  22 +--
 .../main/webapp/roller-ui/scripts/ajax-user.js  |  22 ++-
 pom.xml                                         |   4 +-
 10 files changed, 153 insertions(+), 167 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/roller/blob/47049acd/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/CreateUserBean.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/CreateUserBean.java
b/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/CreateUserBean.java
index 29df348..5a130db 100644
--- a/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/CreateUserBean.java
+++ b/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/CreateUserBean.java
@@ -18,7 +18,10 @@
 
 package org.apache.roller.weblogger.ui.struts2.admin;
 
+import java.util.ArrayList;
 import java.util.Collections;
+import java.util.List;
+
 import org.apache.roller.weblogger.WebloggerException;
 import org.apache.roller.weblogger.business.WebloggerFactory;
 import org.apache.roller.weblogger.pojos.GlobalPermission;
@@ -42,8 +45,16 @@ public class CreateUserBean {
     private Boolean enabled = Boolean.TRUE;
     private String activationCode = null;
     private boolean administrator = false;
-    
-    
+    private List<String> list = new ArrayList<>();
+
+    public List<String> getList() {
+        return list;
+    }
+
+    public void setList(List<String> list) {
+        this.list = list;
+    }
+
     public String getId() {
         return id;
     }
@@ -140,7 +151,6 @@ public class CreateUserBean {
         this.administrator = administrator;
     }
     
-    
     public void copyTo(User dataHolder) {
         
         dataHolder.setScreenName(this.screenName);

http://git-wip-us.apache.org/repos/asf/roller/blob/47049acd/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/UserAdmin.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/UserAdmin.java
b/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/UserAdmin.java
index 63613a5..29b0e24 100644
--- a/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/UserAdmin.java
+++ b/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/UserAdmin.java
@@ -18,6 +18,7 @@
 
 package org.apache.roller.weblogger.ui.struts2.admin;
 
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
@@ -33,7 +34,8 @@ import org.apache.struts2.convention.annotation.AllowedMethods;
  */
 // TODO: make this work @AllowedMethods({"execute"})
 public class UserAdmin extends UIAction {
-    
+    private CreateUserBean bean = new CreateUserBean();
+
     public UserAdmin() {
         this.actionName = "userAdmin";
         this.desiredMenu = "admin";
@@ -52,15 +54,24 @@ public class UserAdmin extends UIAction {
         return false;
     }
 
-    /**
-     * Show user admin search page.
-     */
+    // show user admin search page
     public String execute() {
         return SUCCESS;
     }
 
+    public String edit() {
+        return "edit";
+    }
+
     public String getAuthMethod() {
         return authMethod.name();
     }
 
+    public CreateUserBean getBean() {
+        return bean;
+    }
+
+    public void setBean(CreateUserBean bean) {
+        this.bean = bean;
+    }
 }

http://git-wip-us.apache.org/repos/asf/roller/blob/47049acd/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/UserEdit.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/UserEdit.java
b/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/UserEdit.java
index afdc522..73d5b01 100644
--- a/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/UserEdit.java
+++ b/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/UserEdit.java
@@ -80,20 +80,25 @@ public class UserEdit extends UIAction {
 
     // prepare for action by loading user object we are modifying
     public void myPrepare() {
+
         if (isAdd()) {
-            // create new User
             user = new User();
+
         } else {
             try {
                 // load the user object we are modifying
                 UserManager mgr = WebloggerFactory.getWeblogger().getUserManager();
-                if (bean.getId() != null) {
+                if ( !StringUtils.isEmpty( getBean().getId() ) ) {
+
                     // action came from CreateUser or return from ModifyUser
                     user = mgr.getUser(getBean().getId());
-                } else if (bean.getUserName() != null) {
+
+                } else if ( !StringUtils.isEmpty( bean.getUserName())) {
+
                     // action came from UserAdmin screen.
                     user = mgr.getUserByUserName(getBean().getUserName(), null);
                 }
+
             } catch (Exception e) {
                 log.error("Error looking up user (id/username) :" + bean.getId() + "/" +
bean.getUserName(), e);
             }

http://git-wip-us.apache.org/repos/asf/roller/blob/47049acd/app/src/main/resources/struts.xml
----------------------------------------------------------------------
diff --git a/app/src/main/resources/struts.xml b/app/src/main/resources/struts.xml
index ac41d8d..0a8f5aa 100644
--- a/app/src/main/resources/struts.xml
+++ b/app/src/main/resources/struts.xml
@@ -181,6 +181,7 @@
             disable,
             delete,
             deleteConfirm,
+            edit,
             enable,
             execute,
             firstSave,
@@ -201,6 +202,10 @@
             <result name="success" type="tiles">.UserAdmin</result>
             <result name="error" type="tiles">.UserAdmin</result>
             <result name="input" type="tiles">.UserAdmin</result>
+            <result name="edit" type="redirectAction">
+                <param name="actionName">modifyUser</param>
+                <param name="bean.userName">${bean.userName}</param>
+            </result>
         </action>
         
         <action name="createUser"

http://git-wip-us.apache.org/repos/asf/roller/blob/47049acd/app/src/main/webapp/WEB-INF/jsps/admin/UserAdmin.jsp
----------------------------------------------------------------------
diff --git a/app/src/main/webapp/WEB-INF/jsps/admin/UserAdmin.jsp b/app/src/main/webapp/WEB-INF/jsps/admin/UserAdmin.jsp
index f822594..6310997 100644
--- a/app/src/main/webapp/WEB-INF/jsps/admin/UserAdmin.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/admin/UserAdmin.jsp
@@ -21,35 +21,38 @@
 <%@ include file="/roller-ui/scripts/ajax-user.js" %>
 </script>
 
-<p class="subtitle"><s:text name="userAdmin.subtitle.searchUser" /></p>
-<p><s:text name="userAdmin.prompt.searchUser" /></p>
+<p class="subtitle">
+<b><s:text name="userAdmin.subtitle.searchUser" /></b>
+<s:text name="userAdmin.prompt.searchUser" />
+</p>
 
-<s:form action="modifyUser" method="GET">
+<s:form action="userAdmin!edit" method="POST" theme="bootstrap" cssClass="form-vertical">
    	<s:hidden name="salt" />
- 
-    <span style="margin:4px"><s:text name="inviteMember.userName" /></span>
-    <input name="bean.userName" id="userName" size="30" maxlength="30"
-           onfocus="onUserNameFocus(null)" onkeyup="onUserNameChange(null)" 
-           style="margin:4px" />
-    <input type="submit" value='<s:text name="generic.edit" />'
-           style="margin:4px" />
-    <br />
-    <select id="userList" size="10" onchange="onUserSelected()" 
-            style="width:400px; margin:4px" ></select>
-    
+
+    <s:textfield cssClass="form-control"
+        id="userName"
+        name="bean.userName"
+        label="%{getText('inviteMember.userName')}"
+        onfocus="onUserNameFocus(null)"
+        onkeyup="onUserNameChange(null)" />
+
+    <s:select class="form-control" id="userList" size="10" onchange="onUserSelected()"
list="bean.list" />
+
+    <button type="submit" class="btn btn-default" id="user-submit">
+        <s:text name="generic.edit" />
+    </button>
+
 </s:form>
 
-<%-- LDAP uses external user creation --%>
-<s:if test="authMethod != 'LDAP'">
-    <p class="subtitle"><s:text name="userAdmin.subtitle.userCreation" /></p>
+<s:if test="authMethod != 'LDAP'"> <%-- if we're not doing LDAP we can create new
users in Roller --%>
+
+    <h3><s:text name="userAdmin.subtitle.userCreation" /></h3>
     <s:text name="userAdmin.prompt.orYouCan" />
     <s:url action="createUser" var="createUser" />
     <a href="<s:property value="createUser" />">
         <s:text name="userAdmin.prompt.createANewUser" />
     </a>
+
 </s:if>
 
-<%-- this forces focus to the userName field --%>
-<script>
-    document.getElementById('userName').focus();
-</script>
+<script> document.getElementById('userName').focus(); </script>

http://git-wip-us.apache.org/repos/asf/roller/blob/47049acd/app/src/main/webapp/WEB-INF/jsps/admin/UserEdit.jsp
----------------------------------------------------------------------
diff --git a/app/src/main/webapp/WEB-INF/jsps/admin/UserEdit.jsp b/app/src/main/webapp/WEB-INF/jsps/admin/UserEdit.jsp
index 79b08ef..9478e9c 100644
--- a/app/src/main/webapp/WEB-INF/jsps/admin/UserEdit.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/admin/UserEdit.jsp
@@ -15,16 +15,17 @@
   copyright in this work, please see the NOTICE file in the top level
   directory of this distribution.
 --%>
-<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %> 
+<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %>
+
 
 <%-- Titling, processing actions different between add and edit --%>
-<s:if test="actionName == 'modifyUser'">
-    <s:set var="subtitleKey">userAdmin.subtitle.editUser</s:set>
-    <s:set var="mainAction">modifyUser</s:set>
-</s:if>
-<s:else>
+<s:if test="actionName == 'createUser'">
     <s:set var="subtitleKey">userAdmin.subtitle.createNewUser</s:set>
     <s:set var="mainAction">createUser</s:set>
+</s:if>
+<s:else>
+    <s:set var="subtitleKey">userAdmin.subtitle.editUser</s:set>
+    <s:set var="mainAction">modifyUser</s:set>
 </s:else>
 
 <p class="subtitle">
@@ -38,116 +39,76 @@
         <s:text name="userAdmin.addInstructions"/>
     </s:if>
     <s:if test="authMethod == 'DB_OPENID'">
-        <p class="pagetip">
-            <s:text name="userAdmin.noPasswordForOpenID"/>
-        </p>
+         <s:text name="userAdmin.noPasswordForOpenID"/>
     </s:if>
 </p>
 
-<s:form>
+<s:form theme="bootstrap" cssClass="form-horizontal">
 	<s:hidden name="salt" />
     <s:if test="actionName == 'modifyUser'">
         <%-- bean for add does not have a bean id yet --%>
         <s:hidden name="bean.id" />
     </s:if>
 
-    <table class="formtable">
-        <tr>
-            <td class="label"><label for="userName" /><s:text name="userSettings.username"
/></label></td>
-            <td class="field">
-                <s:if test="actionName == 'modifyUser'">
-                    <s:textfield name="bean.userName" size="30" maxlength="30" readonly="true"
cssStyle="background: #e5e5e5" />
-                </s:if>
-                <s:else>
-                    <s:textfield name="bean.userName" size="30" maxlength="30" />
-                </s:else>
-            </td>
-            <td class="description">
-                <s:if test="actionName == 'modifyUser'">
-                    <s:text name="userSettings.tip.username" />
-                </s:if>
-                <s:else>
-                    <s:text name="userAdmin.tip.userName" />
-                </s:else>
-            </td>
-        </tr>
-
-        <tr>
-            <td class="label"><label for="screenName" /><s:text name="userSettings.screenname"
/></label></td>
-            <td class="field"><s:textfield name="bean.screenName" size="30" maxlength="30"
/></td>
-            <td class="description"><s:text name="userAdmin.tip.screenName" /></td>
-        </tr>
-        
-        <tr>
-            <td class="label"><label for="fullName" /><s:text name="userSettings.fullname"
/></label></td>
-            <td class="field"><s:textfield name="bean.fullName" size="30" maxlength="30"
/></td>
-            <td class="description"><s:text name="userAdmin.tip.fullName" /></td>
-        </tr>
-        
-        <s:if test="authMethod == 'ROLLERDB' || authMethod == 'DB_OPENID'">
-            <tr>
-                <td class="label"><label for="passwordText" /><s:text name="userSettings.password"
/></label></td>
-                <td class="field"><s:password name="bean.password" size="20" maxlength="20"
/></td>
-                <td class="description"><s:text name="userAdmin.tip.password" /></td>
-            </tr>
-        </s:if>
+    <s:if test="actionName == 'modifyUser'">
+        <s:textfield name="bean.userName" size="30" maxlength="30"
+                label="%{getText('userSettings.username')}"
+                tooltip="%{getText('userSettings.tip.username')}"
+                readonly="true" cssStyle="background: #e5e5e5" />
+    </s:if>
+    <s:else>
+        <s:textfield name="bean.userName" size="30" maxlength="30"
+                label="%{getText('userSettings.username')}"
+                tooltip="%{getText('userAdmin.tip.username')}" />
+    </s:else>
+
+    <s:textfield name="bean.screenName" size="30" maxlength="30"
+                label="%{getText('userSettings.screenname')}"
+                tooltip="%{getText('userAdmin.tip.screenName')}" />
+
+    <s:textfield name="bean.fullName" size="30" maxlength="30"
+                 label="%{getText('userSettings.fullname')}"
+                 tooltip="%{getText('userAdmin.tip.fullName')}" />
+
+    <s:if test="authMethod == 'ROLLERDB' || authMethod == 'DB_OPENID'">
+        <s:password name="bean.password" size="30" maxlength="30"
+                     label="%{getText('userSettings.password')}"
+                     tooltip="%{getText('userAdmin.tip.password')}" />
+    </s:if>
+
+    <s:if test="authMethod == 'OPENID' || authMethod == 'DB_OPENID'">
+        <s:textfield name="bean.openIdUrl" size="30" maxlength="255" id="f_openid_identifier"
+                     label="%{getText('userSettings.openIdUrl')}"
+                     tooltip="%{getText('userAdmin.tip.openIdUrl')}" />
+    </s:if>
+
+    <s:textfield name="bean.emailAddress" size="30" maxlength="30"
+                 label="%{getText('userSettings.email')}"
+                 tooltip="%{getText('userAdmin.tip.email')}" />
+
+    <s:select name="bean.locale" size="1" list="localesList" listValue="displayName"
+                 label="%{getText('userSettings.locale')}"
+                 tooltip="%{getText('userAdmin.tip.locale')}" />
+
+    <s:select name="bean.timeZone" size="1" list="timeZonesList"
+                 label="%{getText('userSettings.timeZone')}"
+                 tooltip="%{getText('userAdmin.tip.timeZone')}" />
+
+    <s:checkbox name="bean.enabled" size="30" maxlength="30"
+                 label="%{getText('userAdmin.enabled')}"
+                 tooltip="%{getText('userAdmin.tip.userEnabled')}" />
+
+    <s:checkbox name="bean.administrator" size="30" maxlength="30"
+                 label="%{getText('userAdmin.userAdmin')}"
+                 tooltip="%{getText('userAdmin.tip.userAdmin')}" />
 
-        <s:if test="authMethod == 'OPENID' || authMethod == 'DB_OPENID'">
-            <tr>
-                <td class="label"><label for="openIdUrl" /><s:text name="userSettings.openIdUrl"
/></label></td>
-                <td class="field"><s:textfield name="bean.openIdUrl" size="40" maxlength="255"
style="width:75%" id="f_openid_identifier" /></td>
-                <td class="description"><s:text name="userAdmin.tip.openIdUrl" /></td>
-            </tr>
-        </s:if>
 
-        <tr>
-            <td class="label"><label for="emailAddress" /><s:text name="userSettings.email"
/></label></td>
-            <td class="field"><s:textfield name="bean.emailAddress" size="40" maxlength="40"
/></td>
-            <td class="description"><s:text name="userAdmin.tip.email" /></td>
-        </tr>
-        
-        <tr>
-            <td class="label"><label for="locale" /><s:text name="userSettings.locale"
/></label></td>
-            <td class="field">
-                <s:select name="bean.locale" size="1" list="localesList" listValue="displayName"
/>
-            </td>
-            <td class="description"><s:text name="userAdmin.tip.locale" /></td>
-        </tr>
-        
-        <tr>
-            <td class="label"><label for="timeZone" /><s:text name="userSettings.timeZone"
/></label></td>
-            <td class="field">
-                <s:select name="bean.timeZone" size="1" list="timeZonesList" />
-            </td>
-            <td class="description"><s:text name="userAdmin.tip.timeZone" /></td>
-        </tr>
-        
-        <tr>
-            <td class="label"><label for="userEnabled" /><s:text name="userAdmin.enabled"
/></label></td>
-            <td class="field">
-                <s:checkbox name="bean.enabled" />
-            </td>
-            <td class="description"><s:text name="userAdmin.tip.enabled" /></td>
-        </tr>
-        
-        <tr>
-            <td class="label"><label for="userAdmin" /><s:text name="userAdmin.userAdmin"
/></label></td>
-            <td class="field">
-                <s:checkbox name="bean.administrator" />
-            </td>
-            <td class="description"><s:text name="userAdmin.tip.userAdmin" /></td>
-        </tr>
-        
-    </table>
-    
-    <br />
-    
     <s:if test="actionName == 'modifyUser'">
-        <p class="subtitle"><s:text name="userAdmin.userWeblogs" /></p>
+        <h2><s:text name="userAdmin.userWeblogs" /></h2>
 
         <s:if test="permissions != null && !permissions.isEmpty() > 0">
             <p><s:text name="userAdmin.userMemberOf" />:</p>
-            <table class="rollertable" style="width: 80%">
+            <table class="table" style="width: 80%">
                 <s:iterator var="perms" value="permissions">
                     <tr>
                         <td width="%30">
@@ -192,8 +153,8 @@
     <br />
 
     <div class="control">
-        <s:submit value="%{getText('generic.save')}" action="%{#mainAction}!save"/>
-        <s:submit value="%{getText('generic.cancel')}" action="modifyUser!cancel" />
+        <s:submit cssClass="btn btn-default" value="%{getText('generic.save')}" action="%{#mainAction}!save"/>
+        <s:submit cssClass="btn" value="%{getText('generic.cancel')}" action="modifyUser!cancel"
/>
     </div>
-    
+
 </s:form>

http://git-wip-us.apache.org/repos/asf/roller/blob/47049acd/app/src/main/webapp/WEB-INF/jsps/tiles/tiles-tabbedpage.jsp
----------------------------------------------------------------------
diff --git a/app/src/main/webapp/WEB-INF/jsps/tiles/tiles-tabbedpage.jsp b/app/src/main/webapp/WEB-INF/jsps/tiles/tiles-tabbedpage.jsp
index 9186684..5b7da0b 100644
--- a/app/src/main/webapp/WEB-INF/jsps/tiles/tiles-tabbedpage.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/tiles/tiles-tabbedpage.jsp
@@ -28,9 +28,9 @@
 </head>
 <body>
 
-<tiles:insertAttribute name="bannerStatus"/>
+<tiles:insertAttribute name="bannerStatus" />
 
-<tilesx:useAttribute name="sidebar">
+<tilesx:useAttribute name="sidebar" />
 
 <div class="row">
 
@@ -53,7 +53,7 @@
             </div>
         </div>
 
-        <c:if test="${sidebar != '/WEB-INF/jsps/tiles/empty.jsp'}">
+        <c:if test="${sidebar} != '/WEB-INF/jsps/tiles/empty.jsp'}">
             <s:property value="sidebar" />
             <div class="panel panel-default">
                 <div class="panel-body">
@@ -74,3 +74,4 @@
 
 </body>
 </html>
+

http://git-wip-us.apache.org/repos/asf/roller/blob/47049acd/app/src/main/webapp/WEB-INF/tiles.xml
----------------------------------------------------------------------
diff --git a/app/src/main/webapp/WEB-INF/tiles.xml b/app/src/main/webapp/WEB-INF/tiles.xml
index cc7704e..beaea81 100644
--- a/app/src/main/webapp/WEB-INF/tiles.xml
+++ b/app/src/main/webapp/WEB-INF/tiles.xml
@@ -37,7 +37,7 @@
         <put-attribute name="head"         value="/WEB-INF/jsps/tiles/head.jsp" />
         <put-attribute name="styles"       value="/WEB-INF/jsps/tiles/empty.jsp" />
         <put-attribute name="menu"         value="/WEB-INF/jsps/tiles/empty.jsp" />
-        <put-attribute name="sidemenu"     value="/WEB-INF/jsps/tiles/sidemenu.jsp" />
+        <put-attribute name="sidemenu"     value="/WEB-INF/jsps/tiles/empty.jsp" />
         <put-attribute name="messages"     value="/WEB-INF/jsps/tiles/messages.jsp" />
         <put-attribute name="content"      value="${content}" />
         <put-attribute name="sidebar"      value="/WEB-INF/jsps/tiles/empty.jsp" />
@@ -173,10 +173,6 @@
         <put-attribute name="content" value="/WEB-INF/jsps/admin/GlobalConfig.jsp" />
     </definition>
     
-    <definition name=".FrontpageConfig" extends=".tiles-simplepage" >
-        <put-attribute name="content" value="/WEB-INF/jsps/admin/FrontpageConfig.jsp"
/>
-    </definition>
-    
     <definition name=".UserAdmin" extends=".tiles-tabbedpage" >
         <put-attribute name="content" value="/WEB-INF/jsps/admin/UserAdmin.jsp" />
     </definition>
@@ -248,11 +244,6 @@
         <put-attribute name="head" value="/WEB-INF/jsps/tiles/head.jsp" />
         <put-attribute name="content" value="/WEB-INF/jsps/editor/MediaFileImageDimension.jsp"
/>
     </definition>
-    
-    <definition name=".MediaFileSearchInclude" extends=".tiles-popuppage" >
-        <put-attribute name="head" value="/WEB-INF/jsps/tiles/head.jsp" />
-        <put-attribute name="content" value="/WEB-INF/jsps/editor/MediaFileSearch.jsp"
/>
-    </definition>
 
     <definition name=".MediaFileAddInclude" extends=".tiles-popuppage" >
         <put-attribute name="head" value="/WEB-INF/jsps/tiles/head.jsp" />
@@ -283,13 +274,6 @@
         <put-attribute name="styles" value="/WEB-INF/jsps/tiles/empty.jsp" />
     </definition>
 
-    <definition name=".TabularView" extends=".tiles-tabbedpage" >
-        <put-attribute name="head" value="/WEB-INF/jsps/tiles/head.jsp" />
-        <put-attribute name="content" value="/WEB-INF/jsps/editor/TabularView.jsp" />
-        <put-attribute name="sidebar" value="/WEB-INF/jsps/editor/MediaFileSidebar.jsp"
/>
-        <put-attribute name="styles" value="/WEB-INF/jsps/tiles/empty.jsp" />
-    </definition>
-
     <definition name=".EntryEdit" extends=".tiles-tabbedpage" >
         <put-attribute name="head" value="/WEB-INF/jsps/tiles/head.jsp" />
         <put-attribute name="content" value="/WEB-INF/jsps/editor/EntryEdit.jsp" />
@@ -328,10 +312,6 @@
         <put-attribute name="styles" value="/WEB-INF/jsps/tiles/empty.jsp" />
     </definition>
 
-    <definition name=".Resources" extends=".tiles-tabbedpage" >
-        <put-attribute name="content" value="/WEB-INF/jsps/editor/Resources.jsp" />
-    </definition>
-    
     <!-- weblog admin pages (and associates) -->
     <definition name=".WeblogConfig" extends=".tiles-tabbedpage" >
         <put-attribute name="content" value="/WEB-INF/jsps/editor/WeblogConfig.jsp" />

http://git-wip-us.apache.org/repos/asf/roller/blob/47049acd/app/src/main/webapp/roller-ui/scripts/ajax-user.js
----------------------------------------------------------------------
diff --git a/app/src/main/webapp/roller-ui/scripts/ajax-user.js b/app/src/main/webapp/roller-ui/scripts/ajax-user.js
index 3eed2da..1cb578c 100644
--- a/app/src/main/webapp/roller-ui/scripts/ajax-user.js
+++ b/app/src/main/webapp/roller-ui/scripts/ajax-user.js
@@ -15,18 +15,20 @@
 * copyright in this work, please see the NOTICE file in the top level
 * directory of this distribution.
 */
+
 // Used in: InviteMember.jsp, UserAdmin.jsp
 
 function createRequestObject() {
     var ro;
     var browser = navigator.appName;
-    if (browser == "Microsoft Internet Explorer") {
+    if (browser === "Microsoft Internet Explorer") {
         ro = new ActiveXObject("Microsoft.XMLHTTP");
     } else {
         ro = new XMLHttpRequest();
     }
     return ro;
 }
+
 var http = createRequestObject();
 var init = false;
 var isBusy = false;
@@ -38,8 +40,11 @@ function onUserNameFocus(enabled) {
         u = userURL;
         if (enabled != null) u = u + "&enabled=" + enabled;
         sendUserRequest(u);
+    } else {
+        userSubmitButton.disabled = true;
     }
 }
+
 function onUserNameChange(enabled) {
     u = userURL;
     if (enabled != null) u = u + "&enabled=" + enabled;
@@ -47,12 +52,17 @@ function onUserNameChange(enabled) {
     if (userName.value.length > 0) u = u + "&startsWith=" + userName.value;
     sendUserRequest(u);
 }
+
 function onUserSelected() {
     userList = document.getElementById("userList");
     user = userList.options[userList.options.selectedIndex];
     userName = document.getElementById("userName");
     userName.value = user.value;
+
+    userSubmitButton = document.getElementById("user-submit");
+    userSubmitButton.disabled = false;
 }
+
 function sendUserRequest(url) {
     if (isBusy) return;
     isBusy = true;
@@ -60,18 +70,18 @@ function sendUserRequest(url) {
     http.onreadystatechange = handleUserResponse;
     http.send(null);
 }
+
 function handleUserResponse() {
-    if (http.readyState == 4) {
+    if (http.readyState === 4) {
         userList = document.getElementById("userList");
         for (i = userList.options.length; i >= 0; i--) {
             userList.options[i] = null;
         }   
-        //userList.onchange = null;
-        data = http.responseText;  
-        if (data.indexOf("\n") != -1) {
+        data = http.responseText;
+        if (data.indexOf("\n") !== -1) {
             lines = data.split('\n');
             for (i = 0; i < lines.length; i++) {
-                if (lines[i].indexOf(',') != -1) {
+                if (lines[i].indexOf(',') !== -1) {
                    userArray = lines[i].split(',');
                    userList.options[userList.length] = 
                       new Option(userArray[0] + " (" + userArray[1] + ")", userArray[0]);

http://git-wip-us.apache.org/repos/asf/roller/blob/47049acd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b004224..4188bff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,8 +63,8 @@ limitations under the License.
                     <artifactId>maven-compiler-plugin</artifactId>
                     <version>3.8.0</version>
                     <configuration>
-                        <source>10</source>
-                        <target>10</target>
+                        <source>1.8</source>
+                        <target>1.8</target>
                         <fork>true</fork>
                         <encoding>${project.build.sourceEncoding}</encoding>
                     </configuration>


Mime
View raw message