Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
b6ba74f8
Commit
b6ba74f8
authored
Nov 25, 2015
by
Guus der Kinderen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use xml tags instead of programmatic ones.
parent
912419d5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
102 deletions
+47
-102
ContentBoxTag.java
src/java/org/jivesoftware/admin/ContentBoxTag.java
+0
-40
InfoboxTag.java
src/java/org/jivesoftware/admin/InfoboxTag.java
+0
-42
admin.tld
src/web/WEB-INF/admin.tld
+12
-20
contentBox.tagx
src/web/WEB-INF/tags/admin/contentBox.tagx
+14
-0
infoBox.tagx
src/web/WEB-INF/tags/admin/infoBox.tagx
+21
-0
No files found.
src/java/org/jivesoftware/admin/ContentBoxTag.java
deleted
100644 → 0
View file @
912419d5
package
org
.
jivesoftware
.
admin
;
import
javax.servlet.jsp.JspException
;
import
javax.servlet.jsp.tagext.BodyTagSupport
;
import
java.io.IOException
;
public
class
ContentBoxTag
extends
BodyTagSupport
{
private
String
title
;
@Override
public
int
doEndTag
()
throws
JspException
{
final
String
body
=
"<div class=\"jive-contentBoxHeader\">"
+
title
+
"</div>\n"
+
"<div class=\"jive-contentBox\">"
+
bodyContent
.
getString
()
+
"</div>\n"
;
try
{
pageContext
.
getOut
().
write
(
body
);
}
catch
(
IOException
ioe
)
{
throw
new
JspException
(
ioe
.
getMessage
());
}
return
super
.
doEndTag
();
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
}
src/java/org/jivesoftware/admin/InfoboxTag.java
deleted
100644 → 0
View file @
912419d5
package
org
.
jivesoftware
.
admin
;
import
javax.servlet.jsp.JspException
;
import
javax.servlet.jsp.tagext.BodyTagSupport
;
import
java.io.IOException
;
public
class
InfoboxTag
extends
BodyTagSupport
{
private
String
type
;
// success, error, warning
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
@Override
public
int
doEndTag
()
throws
JspException
{
String
body
=
"<div class=\"jive-"
+
type
+
"\">\n"
+
" <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n"
+
" <tbody>\n"
+
" <tr><td class=\"jive-icon\"><img src=\"images/"
+
type
+
"-16x16.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"\"/></td>\n"
+
" <td class=\"jive-icon-label\">\n"
+
bodyContent
.
getString
()
+
" </td></tr>\n"
+
" </tbody>\n"
+
" </table>\n"
+
"</div><br>\n"
;
try
{
pageContext
.
getOut
().
write
(
body
);
}
catch
(
IOException
ioe
)
{
throw
new
JspException
(
ioe
.
getMessage
());
}
return
super
.
doEndTag
();
}
}
src/web/WEB-INF/admin.tld
View file @
b6ba74f8
...
...
@@ -118,26 +118,6 @@
<rtexprvalue>
true
</rtexprvalue>
</attribute>
</tag>
<tag>
<name>
contentBox
</name>
<tag-class>
org.jivesoftware.admin.ContentBoxTag
</tag-class>
<body-content>
JSP
</body-content>
<attribute>
<name>
title
</name>
<required>
true
</required>
<rtexprvalue>
true
</rtexprvalue>
</attribute>
</tag>
<tag>
<name>
infobox
</name>
<tag-class>
org.jivesoftware.admin.InfoboxTag
</tag-class>
<body-content>
JSP
</body-content>
<attribute>
<name>
type
</name>
<required>
true
</required>
<rtexprvalue>
true
</rtexprvalue>
</attribute>
</tag>
<tag>
<name>
ASN1DER
</name>
<tag-class>
org.jivesoftware.admin.ASN1DERTag
</tag-class>
...
...
@@ -148,6 +128,18 @@
<rtexprvalue>
true
</rtexprvalue>
</attribute>
</tag>
<tag-file>
<name>
contentBox
</name>
<path>
/WEB-INF/tags/admin/contentBox.tagx
</path>
</tag-file>
<tag-file>
<name>
infobox
</name>
<path>
/WEB-INF/tags/admin/infoBox.tagx
</path>
</tag-file>
<tag-file>
<name>
infoBox
</name>
<path>
/WEB-INF/tags/admin/infoBox.tagx
</path>
</tag-file>
<function>
<name>
replaceAll
</name>
<function-class>
org.jivesoftware.admin.JSTLFunctions
</function-class>
...
...
src/web/WEB-INF/tags/admin/contentBox.tagx
0 → 100644
View file @
b6ba74f8
<jsp:root xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:jsp="http://java.sun.com/JSP/Page"
version="2.0">
<jsp:directive.attribute name="title" required="true" />
<div class="jive-contentBoxHeader">
<c:out value="${title}" />
</div>
<div class="jive-contentBox">
<jsp:doBody />
</div>
</jsp:root>
\ No newline at end of file
src/web/WEB-INF/tags/admin/infoBox.tagx
0 → 100644
View file @
b6ba74f8
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
version="2.0">
<jsp:directive.attribute name="type" required="true" />
<div class="jive-${type}">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td class="jive-icon"><img src="images/${type}-16x16.gif" width="16" height="16" border="0" alt=""/></td>
<td class="jive-icon-label">
<jsp:doBody />
</td>
</tr>
</tbody>
</table>
</div>
<br />
</jsp:root>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment