This is an automated email from the ASF dual-hosted git repository.
brushed pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
The following commit(s) were added to refs/heads/master by this push:
new f99f80e Fixing Admin JSP bugs
f99f80e is described below
commit f99f80ea9d356813794090d3c1237618a196d5de
Author: brushed <[email protected]>
AuthorDate: Sun Feb 25 19:20:29 2018 +0100
Fixing Admin JSP bugs
Quick fix to admin and user management pages: adding proper tabs to
the ADMIN pages, fixing javascript bugs in user management page
(reported by Harry)
---
.../templates/haddock/admin/AdminTemplate.jsp | 31 +++++++++-------------
.../templates/haddock/admin/UserManagement.jsp | 15 +++--------
2 files changed, 16 insertions(+), 30 deletions(-)
diff --git
a/jspwiki-war/src/main/webapp/templates/haddock/admin/AdminTemplate.jsp
b/jspwiki-war/src/main/webapp/templates/haddock/admin/AdminTemplate.jsp
index bab07db..c3bba9d 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/admin/AdminTemplate.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/admin/AdminTemplate.jsp
@@ -14,7 +14,7 @@
"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.
+ under the License.
--%>
<%@ page import="java.util.*" %>
@@ -28,7 +28,7 @@
<head>
<title>JSPWiki administration</title>
<wiki:Include page="commonheader.jsp"/>
- <link rel="stylesheet" media="screen, projection, print" type="text/css"
+ <link rel="stylesheet" media="screen, projection, print" type="text/css"
href="<wiki:Link format='url' templatefile='admin/admin.css'/>"/>
</head>
<body class="container context-view">
@@ -44,15 +44,15 @@ in your <tt>jspwiki.properties</tt> file.</div>
AdminBeanManager mgr = wiki.getAdminBeanManager();
%>
-<wiki:TabbedSection defaultTab="${param['tab-admin']}">
+<div class="tabs admin">
-<wiki:Tab id="core" title="Core">
+<h3>Core</h3>
<p>Contains core setup options.</p>
<wiki:TabbedSection defaultTab="${param['tab-core']}">
<wiki:AdminBeanIterator type="core" id="ab">
<wiki:Tab id="${ab.id}" title="${ab.title}">
-
+
<div class="formcontainer">
<form action="Admin.jsp" method="post" accept-charset="UTF-8">
<input type="hidden" name="tab-admin" value="core"/>
@@ -66,13 +66,11 @@ in your <tt>jspwiki.properties</tt> file.</div>
</wiki:Tab>
</wiki:AdminBeanIterator>
</wiki:TabbedSection>
-</wiki:Tab>
-<wiki:Tab id="users" title="Users">
+<h3>Users</h3>
<wiki:Include page="admin/UserManagement.jsp"/>
-</wiki:Tab>
-<wiki:Tab id="groups" title="Groups">
+<h3>Group</h3>
<div>
<p>This is a list of all groups in this wiki. If you click on the group
name,
you will be taken to the administration page of that particular group.</p>
@@ -80,16 +78,14 @@ in your <tt>jspwiki.properties</tt> file.</div>
<wiki:Plugin plugin="Groups"/>
</p>
</div>
-</wiki:Tab>
+<h3>Editors</h3>
-<wiki:Tab id="editors" title="Editors">
-
<wiki:TabbedSection defaultTab="${param['tab-editors']}">
<wiki:AdminBeanIterator type="editors" id="ab">
<wiki:Tab id="${ab.id}" title="${ab.title}">
-
- <div class="formcontainer">
+
+ <div class="formcontainer">
<form action="Admin.jsp" method="post" accept-charset="UTF-8">
<input type="hidden" name="tab-admin" value="editors"/>
<input type="hidden" name="tab-editors" value="${ab.title}" />
@@ -102,13 +98,10 @@ in your <tt>jspwiki.properties</tt> file.</div>
</wiki:AdminBeanIterator>
</wiki:TabbedSection>
-</wiki:Tab>
-
-<wiki:Tab id="filters" title="Filters">
+<h3>Filters</h3>
<p>There will be more filter stuff here</p>
-</wiki:Tab>
-</wiki:TabbedSection>
+</div>
</div>
</div>
diff --git
a/jspwiki-war/src/main/webapp/templates/haddock/admin/UserManagement.jsp
b/jspwiki-war/src/main/webapp/templates/haddock/admin/UserManagement.jsp
index e61fe5b..a917f4c 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/admin/UserManagement.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/admin/UserManagement.jsp
@@ -27,26 +27,19 @@
<fmt:setLocale value="${prefs.Language}" />
<fmt:setBundle basename="templates.default"/>
<script>
-function constructdate(date)
-{
- var d = new Date();
- d.setTime(date.time);
- return d;
-}
-
function refreshUserInfo()
{
- var userid = $('userid').getValue();
+ var userid = $('userid').value;
if( userid == '--New--' ) return;
- Wiki.ajaxJsonCall("/users",[userid], function(userprofile) {
+ Wiki.jsonrpc("/users", [userid], function(userprofile){
$('loginname').value = userprofile.loginName;
$('loginid').value = userprofile.loginName;
$('fullname').value = userprofile.fullname;
$('email').value = userprofile.email;
- $('lastmodified').setHTML(constructdate(userprofile.lastModified));
- $('creationdate').setHTML(constructdate(userprofile.created));
+ $('lastmodified').innerHTML = userprofile.modified || "";
+ $('creationdate').innerHTML = userprofile.created || "";
});
}
--
To stop receiving notification emails like this one, please contact
[email protected].