-
+
diff --git a/core/src/main/resources/hudson/PluginManager/sidepanel.groovy b/core/src/main/resources/hudson/PluginManager/sidepanel.groovy
index 89ff2bf823..98aeab3470 100644
--- a/core/src/main/resources/hudson/PluginManager/sidepanel.groovy
+++ b/core/src/main/resources/hudson/PluginManager/sidepanel.groovy
@@ -27,10 +27,10 @@ l=namespace(lib.LayoutTagLib)
l.header()
l.side_panel {
l.tasks {
- l.task(icon:"images/24x24/up.png", href:rootURL+'/', title:_("Back to Dashboard"))
- l.task(icon:"images/24x24/setting.png", href:"${rootURL}/manage", title:_("Manage Jenkins"), permission:app.ADMINISTER, it:app)
+ l.task(icon:"icon-up icon-md", href:rootURL+'/', title:_("Back to Dashboard"))
+ l.task(icon:"icon-setting icon-md", href:"${rootURL}/manage", title:_("Manage Jenkins"), permission:app.ADMINISTER, it:app)
if (!app.updateCenter.jobs.isEmpty()) {
- l.task(icon:"images/24x24/plugin.png", href:"${rootURL}/updateCenter/", title:_("Update Center"))
+ l.task(icon:"icon-plugin icon-md", href:"${rootURL}/updateCenter/", title:_("Update Center"))
}
}
}
diff --git a/core/src/main/resources/hudson/PluginWrapper/uninstall.groovy b/core/src/main/resources/hudson/PluginWrapper/uninstall.groovy
index 79ccd42e00..a47356a1a5 100644
--- a/core/src/main/resources/hudson/PluginWrapper/uninstall.groovy
+++ b/core/src/main/resources/hudson/PluginWrapper/uninstall.groovy
@@ -8,7 +8,7 @@ l.layout {
l.header(title:title)
l.main_panel {
h1 {
- img(src:"${imagesURL}/48x48/error.png",alt:"[!]",height:48,width:48)
+ l.icon(class: 'icon-error icon-xlg')
text(" ")
text(title)
}
diff --git a/core/src/main/resources/hudson/cli/CLIAction/command.jelly b/core/src/main/resources/hudson/cli/CLIAction/command.jelly
index c52cf2eb22..dab20f2867 100644
--- a/core/src/main/resources/hudson/cli/CLIAction/command.jelly
+++ b/core/src/main/resources/hudson/cli/CLIAction/command.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
-
+
Command ${command.name}
diff --git a/core/src/main/resources/hudson/cli/CLIAction/index.jelly b/core/src/main/resources/hudson/cli/CLIAction/index.jelly
index f9d40ee46c..8164710908 100644
--- a/core/src/main/resources/hudson/cli/CLIAction/index.jelly
+++ b/core/src/main/resources/hudson/cli/CLIAction/index.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
-
+
${%Jenkins CLI}
diff --git a/core/src/main/resources/hudson/diagnosis/HudsonHomeDiskUsageMonitor/index.jelly b/core/src/main/resources/hudson/diagnosis/HudsonHomeDiskUsageMonitor/index.jelly
index eb39beade4..b752609f48 100644
--- a/core/src/main/resources/hudson/diagnosis/HudsonHomeDiskUsageMonitor/index.jelly
+++ b/core/src/main/resources/hudson/diagnosis/HudsonHomeDiskUsageMonitor/index.jelly
@@ -27,7 +27,7 @@ THE SOFTWARE.
-
+
${%blurb}
diff --git a/core/src/main/resources/hudson/diagnosis/MemoryUsageMonitor/index.jelly b/core/src/main/resources/hudson/diagnosis/MemoryUsageMonitor/index.jelly
index cc9e7da206..fa1b767e27 100644
--- a/core/src/main/resources/hudson/diagnosis/MemoryUsageMonitor/index.jelly
+++ b/core/src/main/resources/hudson/diagnosis/MemoryUsageMonitor/index.jelly
@@ -29,7 +29,7 @@ THE SOFTWARE.
-
+
${%JVM Memory Usage}
diff --git a/core/src/main/resources/hudson/lifecycle/WindowsInstallerLink/index.jelly b/core/src/main/resources/hudson/lifecycle/WindowsInstallerLink/index.jelly
index d30fe68361..15480784a0 100644
--- a/core/src/main/resources/hudson/lifecycle/WindowsInstallerLink/index.jelly
+++ b/core/src/main/resources/hudson/lifecycle/WindowsInstallerLink/index.jelly
@@ -30,7 +30,7 @@ THE SOFTWARE.
-
+
${%Install as Windows Service}
@@ -51,7 +51,7 @@ THE SOFTWARE.
-
+
${%Installation Complete}
diff --git a/core/src/main/resources/hudson/logging/LogRecorder/index.jelly b/core/src/main/resources/hudson/logging/LogRecorder/index.jelly
index 6841b60549..a413db503c 100644
--- a/core/src/main/resources/hudson/logging/LogRecorder/index.jelly
+++ b/core/src/main/resources/hudson/logging/LogRecorder/index.jelly
@@ -30,7 +30,7 @@ THE SOFTWARE.
- ${it.displayName}
+ ${it.displayName}
@@ -41,7 +41,7 @@ THE SOFTWARE.
-
+
diff --git a/core/src/main/resources/hudson/logging/LogRecorder/sidepanel.jelly b/core/src/main/resources/hudson/logging/LogRecorder/sidepanel.jelly
index 717f919ef6..b9c8884ff2 100644
--- a/core/src/main/resources/hudson/logging/LogRecorder/sidepanel.jelly
+++ b/core/src/main/resources/hudson/logging/LogRecorder/sidepanel.jelly
@@ -30,10 +30,10 @@ THE SOFTWARE.
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/core/src/main/resources/hudson/logging/LogRecorderManager/all.jelly b/core/src/main/resources/hudson/logging/LogRecorderManager/all.jelly
index 8fb6e56b63..9e38528207 100644
--- a/core/src/main/resources/hudson/logging/LogRecorderManager/all.jelly
+++ b/core/src/main/resources/hudson/logging/LogRecorderManager/all.jelly
@@ -30,7 +30,7 @@ THE SOFTWARE.
- ${%Jenkins Log}
+ ${%Jenkins Log}
diff --git a/core/src/main/resources/hudson/logging/LogRecorderManager/index.jelly b/core/src/main/resources/hudson/logging/LogRecorderManager/index.jelly
index 9948ce70b7..7b6e2d677e 100644
--- a/core/src/main/resources/hudson/logging/LogRecorderManager/index.jelly
+++ b/core/src/main/resources/hudson/logging/LogRecorderManager/index.jelly
@@ -30,7 +30,7 @@ THE SOFTWARE.
-
+
${%Log Recorders}
@@ -39,7 +39,7 @@ THE SOFTWARE.
-
+
${name}
@@ -59,7 +59,7 @@ THE SOFTWARE.
-
+
diff --git a/core/src/main/resources/hudson/logging/LogRecorderManager/sidepanel.jelly b/core/src/main/resources/hudson/logging/LogRecorderManager/sidepanel.jelly
index 3e598f66e6..d3d6da9935 100644
--- a/core/src/main/resources/hudson/logging/LogRecorderManager/sidepanel.jelly
+++ b/core/src/main/resources/hudson/logging/LogRecorderManager/sidepanel.jelly
@@ -30,12 +30,12 @@ THE SOFTWARE.
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/core/src/main/resources/hudson/model/AbstractBuild/index.jelly b/core/src/main/resources/hudson/model/AbstractBuild/index.jelly
index 092907fc60..dddc1a9e6a 100644
--- a/core/src/main/resources/hudson/model/AbstractBuild/index.jelly
+++ b/core/src/main/resources/hudson/model/AbstractBuild/index.jelly
@@ -78,8 +78,7 @@ THE SOFTWARE.
- ${dep.from.displayName}
+ ${dep.from.displayName}
?
@@ -89,8 +88,7 @@ THE SOFTWARE.
→
- ${dep.to.displayName}
+ ${dep.to.displayName}
(${%detail} )
diff --git a/core/src/main/resources/hudson/model/AbstractBuild/sidepanel.jelly b/core/src/main/resources/hudson/model/AbstractBuild/sidepanel.jelly
index 7a1a7f33b4..8a30ce641a 100644
--- a/core/src/main/resources/hudson/model/AbstractBuild/sidepanel.jelly
+++ b/core/src/main/resources/hudson/model/AbstractBuild/sidepanel.jelly
@@ -36,10 +36,10 @@ THE SOFTWARE.
-
+
-
+
diff --git a/core/src/main/resources/hudson/model/AbstractBuild/tasks.jelly b/core/src/main/resources/hudson/model/AbstractBuild/tasks.jelly
index 69574ab902..5431e64918 100644
--- a/core/src/main/resources/hudson/model/AbstractBuild/tasks.jelly
+++ b/core/src/main/resources/hudson/model/AbstractBuild/tasks.jelly
@@ -27,9 +27,9 @@ THE SOFTWARE.
-->
-
-
-
+
+
+
-
+
\ No newline at end of file
diff --git a/core/src/main/resources/hudson/model/AbstractItem/noWorkspace.jelly b/core/src/main/resources/hudson/model/AbstractItem/noWorkspace.jelly
index 1105ae84a7..62384198cd 100644
--- a/core/src/main/resources/hudson/model/AbstractItem/noWorkspace.jelly
+++ b/core/src/main/resources/hudson/model/AbstractItem/noWorkspace.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
- ${%Error: no workspace}
+ ${%Error: no workspace}
diff --git a/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly b/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly
index 04b58ba053..3a40490166 100644
--- a/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly
+++ b/core/src/main/resources/hudson/model/AbstractProject/sidepanel.jelly
@@ -39,16 +39,16 @@ THE SOFTWARE.
-
+
-
+
-
-
+
+
-
+
diff --git a/core/src/main/resources/hudson/model/AbstractProject/wipeOutWorkspaceBlocked.jelly b/core/src/main/resources/hudson/model/AbstractProject/wipeOutWorkspaceBlocked.jelly
index 994372e35f..ac2a43d415 100644
--- a/core/src/main/resources/hudson/model/AbstractProject/wipeOutWorkspaceBlocked.jelly
+++ b/core/src/main/resources/hudson/model/AbstractProject/wipeOutWorkspaceBlocked.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
- ${%Error: Wipe Out Workspace blocked by SCM}
+ ${%Error: Wipe Out Workspace blocked by SCM}
${%The SCM for this project has blocked this attempt to wipe out the project's workspace.}
diff --git a/core/src/main/resources/hudson/model/Computer/builds.jelly b/core/src/main/resources/hudson/model/Computer/builds.jelly
index 2864dee11c..1ef0f89f50 100644
--- a/core/src/main/resources/hudson/model/Computer/builds.jelly
+++ b/core/src/main/resources/hudson/model/Computer/builds.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
-
+
${%title(it.displayName)}
diff --git a/core/src/main/resources/hudson/model/Computer/index.jelly b/core/src/main/resources/hudson/model/Computer/index.jelly
index d72e064d7a..9adde755c6 100644
--- a/core/src/main/resources/hudson/model/Computer/index.jelly
+++ b/core/src/main/resources/hudson/model/Computer/index.jelly
@@ -52,7 +52,7 @@ THE SOFTWARE.
-
+
${it.caption}
(${it.node.nodeDescription})
diff --git a/core/src/main/resources/hudson/model/Computer/sidepanel.jelly b/core/src/main/resources/hudson/model/Computer/sidepanel.jelly
index 059880771d..7e99044ad9 100644
--- a/core/src/main/resources/hudson/model/Computer/sidepanel.jelly
+++ b/core/src/main/resources/hudson/model/Computer/sidepanel.jelly
@@ -30,13 +30,13 @@ THE SOFTWARE.
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/core/src/main/resources/hudson/model/ComputerSet/index.jelly b/core/src/main/resources/hudson/model/ComputerSet/index.jelly
index ae93983d86..421865bd2c 100644
--- a/core/src/main/resources/hudson/model/ComputerSet/index.jelly
+++ b/core/src/main/resources/hudson/model/ComputerSet/index.jelly
@@ -55,7 +55,7 @@ THE SOFTWARE.
-
+
${c.displayName}
@@ -68,9 +68,7 @@ THE SOFTWARE.
-
+
diff --git a/core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly b/core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly
index f388a7314e..a0036a1727 100644
--- a/core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly
+++ b/core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly
@@ -31,10 +31,10 @@ THE SOFTWARE.
-
-
-
-
+
+
+
+
diff --git a/core/src/main/resources/hudson/model/DirectoryBrowserSupport/dir.jelly b/core/src/main/resources/hudson/model/DirectoryBrowserSupport/dir.jelly
index c95f0a39a6..16a08537ed 100644
--- a/core/src/main/resources/hudson/model/DirectoryBrowserSupport/dir.jelly
+++ b/core/src/main/resources/hudson/model/DirectoryBrowserSupport/dir.jelly
@@ -33,14 +33,13 @@ THE SOFTWARE.
@@ -53,7 +52,7 @@ THE SOFTWARE.
-
+
@@ -78,7 +77,7 @@ THE SOFTWARE.
-
+
@@ -92,7 +91,7 @@ THE SOFTWARE.
diff --git a/core/src/main/resources/hudson/model/Executor/causeOfDeath.jelly b/core/src/main/resources/hudson/model/Executor/causeOfDeath.jelly
index d4e0966589..55559f68e8 100644
--- a/core/src/main/resources/hudson/model/Executor/causeOfDeath.jelly
+++ b/core/src/main/resources/hudson/model/Executor/causeOfDeath.jelly
@@ -28,20 +28,20 @@ THE SOFTWARE.
-
+
-
+
${%Thread is still alive}
-
+
${%Thread has died}
${h.printThrowable(it.causeOfDeath)}
diff --git a/core/src/main/resources/hudson/model/Fingerprint/index.jelly b/core/src/main/resources/hudson/model/Fingerprint/index.jelly
index 5952dad602..88cf473961 100644
--- a/core/src/main/resources/hudson/model/Fingerprint/index.jelly
+++ b/core/src/main/resources/hudson/model/Fingerprint/index.jelly
@@ -30,13 +30,13 @@ THE SOFTWARE.
-
+
-
+
${it.fileName}
diff --git a/core/src/main/resources/hudson/model/Label/index.jelly b/core/src/main/resources/hudson/model/Label/index.jelly
index 6ea6438edb..b927c43979 100644
--- a/core/src/main/resources/hudson/model/Label/index.jelly
+++ b/core/src/main/resources/hudson/model/Label/index.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
-
+
${it.name}
@@ -42,7 +42,7 @@ THE SOFTWARE.
-
+
${c.displayName}
diff --git a/core/src/main/resources/hudson/model/Label/sidepanel.jelly b/core/src/main/resources/hudson/model/Label/sidepanel.jelly
index b167d2f458..8513e962d2 100644
--- a/core/src/main/resources/hudson/model/Label/sidepanel.jelly
+++ b/core/src/main/resources/hudson/model/Label/sidepanel.jelly
@@ -31,9 +31,9 @@ THE SOFTWARE.
-
-
-
+
+
+
diff --git a/core/src/main/resources/hudson/model/LoadStatistics/main.jelly b/core/src/main/resources/hudson/model/LoadStatistics/main.jelly
index 7cad622c0d..fc241545db 100644
--- a/core/src/main/resources/hudson/model/LoadStatistics/main.jelly
+++ b/core/src/main/resources/hudson/model/LoadStatistics/main.jelly
@@ -26,7 +26,7 @@ THE SOFTWARE.
-
+
${%title(it.displayName)}
diff --git a/core/src/main/resources/hudson/model/NoFingerprintMatch/index.jelly b/core/src/main/resources/hudson/model/NoFingerprintMatch/index.jelly
index 5055a12813..21ceb2d4f7 100644
--- a/core/src/main/resources/hudson/model/NoFingerprintMatch/index.jelly
+++ b/core/src/main/resources/hudson/model/NoFingerprintMatch/index.jelly
@@ -29,12 +29,12 @@ THE SOFTWARE.
-
+
-
+
${%No matching record found}
diff --git a/core/src/main/resources/hudson/model/Run/KeepLogBuildBadge/badge.jelly b/core/src/main/resources/hudson/model/Run/KeepLogBuildBadge/badge.jelly
index e10c5da7f7..f8e913656f 100644
--- a/core/src/main/resources/hudson/model/Run/KeepLogBuildBadge/badge.jelly
+++ b/core/src/main/resources/hudson/model/Run/KeepLogBuildBadge/badge.jelly
@@ -23,6 +23,4 @@ THE SOFTWARE.
-->
-
+
diff --git a/core/src/main/resources/hudson/model/Run/artifacts-index.jelly b/core/src/main/resources/hudson/model/Run/artifacts-index.jelly
index d7dabb75c4..b954198257 100644
--- a/core/src/main/resources/hudson/model/Run/artifacts-index.jelly
+++ b/core/src/main/resources/hudson/model/Run/artifacts-index.jelly
@@ -35,7 +35,7 @@ THE SOFTWARE.
-
+
${f.displayPath}
diff --git a/core/src/main/resources/hudson/model/Run/delete.jelly b/core/src/main/resources/hudson/model/Run/delete.jelly
index 00a06528c8..f366d982a5 100644
--- a/core/src/main/resources/hudson/model/Run/delete.jelly
+++ b/core/src/main/resources/hudson/model/Run/delete.jelly
@@ -28,6 +28,6 @@ THE SOFTWARE.
-
+
\ No newline at end of file
diff --git a/core/src/main/resources/hudson/model/TreeView/sidepanel2.jelly b/core/src/main/resources/hudson/model/TreeView/sidepanel2.jelly
index 20e64e7e3a..dc3d0e7938 100644
--- a/core/src/main/resources/hudson/model/TreeView/sidepanel2.jelly
+++ b/core/src/main/resources/hudson/model/TreeView/sidepanel2.jelly
@@ -27,5 +27,5 @@ THE SOFTWARE.
-->
-
+
diff --git a/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Failure/status.jelly b/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Failure/status.jelly
index 1ee9ee5775..4c1e2ffeac 100644
--- a/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Failure/status.jelly
+++ b/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Failure/status.jelly
@@ -25,7 +25,7 @@ THE SOFTWARE.
-
${%Failure}
+
${%Failure}
-
${%Details}
diff --git a/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Installing/status.jelly b/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Installing/status.jelly
index fe7c17549f..0ad05240e9 100644
--- a/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Installing/status.jelly
+++ b/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Installing/status.jelly
@@ -25,7 +25,7 @@ THE SOFTWARE.
-
${%Installing}
+
${%Installing}
diff --git a/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Pending/status.jelly b/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Pending/status.jelly
index c3b2c01813..a6c5fa00fb 100644
--- a/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Pending/status.jelly
+++ b/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Pending/status.jelly
@@ -24,5 +24,5 @@ THE SOFTWARE.
- ${%Pending}
+ ${%Pending}
diff --git a/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Success/status.jelly b/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Success/status.jelly
index ffc97887f8..1561831789 100644
--- a/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Success/status.jelly
+++ b/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/Success/status.jelly
@@ -24,5 +24,5 @@ THE SOFTWARE.
- ${%Success}
+ ${%Success}
diff --git a/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/SuccessButRequiresRestart/status.groovy b/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/SuccessButRequiresRestart/status.groovy
index c331b5c3f9..0b9a57e2df 100644
--- a/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/SuccessButRequiresRestart/status.groovy
+++ b/core/src/main/resources/hudson/model/UpdateCenter/DownloadJob/SuccessButRequiresRestart/status.groovy
@@ -22,6 +22,8 @@
* THE SOFTWARE.
*/
-img(src:"${imagesURL}/24x24/yellow.png",height:24,width:24)
+def l = namespace(lib.LayoutTagLib)
+
+l.icon(class: 'icon-yellow icon-md')
text(" ");
text(my.message)
diff --git a/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Canceled/status.jelly b/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Canceled/status.jelly
index 455201d230..d514aa48d7 100644
--- a/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Canceled/status.jelly
+++ b/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Canceled/status.jelly
@@ -24,5 +24,5 @@ THE SOFTWARE.
- ${%Canceled}
+ ${%Canceled}
diff --git a/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Failure/status.jelly b/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Failure/status.jelly
index 59ce737e9b..b1f14ba02a 100644
--- a/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Failure/status.jelly
+++ b/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Failure/status.jelly
@@ -24,5 +24,5 @@ THE SOFTWARE.
- ${%Failure}
+ ${%Failure}
diff --git a/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Pending/status.jelly b/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Pending/status.jelly
index c3b2c01813..a6c5fa00fb 100644
--- a/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Pending/status.jelly
+++ b/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Pending/status.jelly
@@ -24,5 +24,5 @@ THE SOFTWARE.
- ${%Pending}
+ ${%Pending}
diff --git a/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Running/status.jelly b/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Running/status.jelly
index 5e4708f242..a8d871fe18 100644
--- a/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Running/status.jelly
+++ b/core/src/main/resources/hudson/model/UpdateCenter/RestartJenkinsJob/Running/status.jelly
@@ -24,5 +24,5 @@ THE SOFTWARE.
- ${%Running}
+ ${%Running}
diff --git a/core/src/main/resources/hudson/model/UpdateCenter/sidepanel.jelly b/core/src/main/resources/hudson/model/UpdateCenter/sidepanel.jelly
index ba68bf5e53..3880cfa74c 100644
--- a/core/src/main/resources/hudson/model/UpdateCenter/sidepanel.jelly
+++ b/core/src/main/resources/hudson/model/UpdateCenter/sidepanel.jelly
@@ -30,10 +30,10 @@ THE SOFTWARE.
-
+
-
-
+
+
diff --git a/core/src/main/resources/hudson/model/User/sidepanel.jelly b/core/src/main/resources/hudson/model/User/sidepanel.jelly
index cae891f3a4..126bdae5d8 100644
--- a/core/src/main/resources/hudson/model/User/sidepanel.jelly
+++ b/core/src/main/resources/hudson/model/User/sidepanel.jelly
@@ -31,14 +31,14 @@ THE SOFTWARE.
-
-
-
-
+
+
+
+
-
+
diff --git a/core/src/main/resources/hudson/model/View/AsynchPeople/index.jelly b/core/src/main/resources/hudson/model/View/AsynchPeople/index.jelly
index 2119cce0c2..d593a45941 100644
--- a/core/src/main/resources/hudson/model/View/AsynchPeople/index.jelly
+++ b/core/src/main/resources/hudson/model/View/AsynchPeople/index.jelly
@@ -29,7 +29,7 @@ THE SOFTWARE.
-
+
${%People}
diff --git a/core/src/main/resources/hudson/model/View/builds.jelly b/core/src/main/resources/hudson/model/View/builds.jelly
index a6f0945035..f7c1fc97c5 100644
--- a/core/src/main/resources/hudson/model/View/builds.jelly
+++ b/core/src/main/resources/hudson/model/View/builds.jelly
@@ -29,7 +29,7 @@ THE SOFTWARE.
-
+
${%buildHistory(it.class.name=='hudson.model.AllView' ? app.displayName : it.displayName)}
diff --git a/core/src/main/resources/hudson/model/View/sidepanel.jelly b/core/src/main/resources/hudson/model/View/sidepanel.jelly
index 0e6336039a..98cbbbd637 100644
--- a/core/src/main/resources/hudson/model/View/sidepanel.jelly
+++ b/core/src/main/resources/hudson/model/View/sidepanel.jelly
@@ -40,28 +40,28 @@ THE SOFTWARE.
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
diff --git a/core/src/main/resources/hudson/os/solaris/ZFSInstaller/askRootPassword.jelly b/core/src/main/resources/hudson/os/solaris/ZFSInstaller/askRootPassword.jelly
index 0d6f09500c..f852a63255 100644
--- a/core/src/main/resources/hudson/os/solaris/ZFSInstaller/askRootPassword.jelly
+++ b/core/src/main/resources/hudson/os/solaris/ZFSInstaller/askRootPassword.jelly
@@ -29,7 +29,7 @@ THE SOFTWARE.
-
+
${%Permission Denied}
diff --git a/core/src/main/resources/hudson/scm/AbstractScmTagAction/badge.jelly b/core/src/main/resources/hudson/scm/AbstractScmTagAction/badge.jelly
index 0d20b81d1f..268bc70992 100644
--- a/core/src/main/resources/hudson/scm/AbstractScmTagAction/badge.jelly
+++ b/core/src/main/resources/hudson/scm/AbstractScmTagAction/badge.jelly
@@ -23,11 +23,8 @@ THE SOFTWARE.
-->
-
+
-
+
\ No newline at end of file
diff --git a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy
index af2ba45f8d..249d4cfbe8 100644
--- a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy
+++ b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy
@@ -14,7 +14,7 @@ def st=namespace("jelly:stapler")
l.layout(norefresh:true, permission:app.ADMINISTER, title:my.displayName) {
l.main_panel {
h1 {
- img(src:"${imagesURL}/48x48/secure.png", height:48,width:48)
+ l.icon(class: 'icon-secure icon-xlg')
text(my.displayName)
}
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index.jelly b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index.jelly
index 44c1e66138..d39afff6f9 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index.jelly
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index.jelly
@@ -43,9 +43,9 @@ THE SOFTWARE.
${user.id}
${user}
-
+
-
+
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/sidepanel.jelly b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/sidepanel.jelly
index 941a4651fb..49ef418e78 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/sidepanel.jelly
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/sidepanel.jelly
@@ -27,9 +27,9 @@ THE SOFTWARE.
-
-
-
+
+
+
\ No newline at end of file
diff --git a/core/src/main/resources/hudson/slaves/SlaveComputer/sidepanel2.jelly b/core/src/main/resources/hudson/slaves/SlaveComputer/sidepanel2.jelly
index cd370a0149..42fe8fef58 100644
--- a/core/src/main/resources/hudson/slaves/SlaveComputer/sidepanel2.jelly
+++ b/core/src/main/resources/hudson/slaves/SlaveComputer/sidepanel2.jelly
@@ -24,10 +24,10 @@ THE SOFTWARE.
-
+
-
-
+
+
\ No newline at end of file
diff --git a/core/src/main/resources/hudson/tasks/Fingerprinter/FingerprintAction/index.jelly b/core/src/main/resources/hudson/tasks/Fingerprinter/FingerprintAction/index.jelly
index 3f9230984f..afa4c07814 100644
--- a/core/src/main/resources/hudson/tasks/Fingerprinter/FingerprintAction/index.jelly
+++ b/core/src/main/resources/hudson/tasks/Fingerprinter/FingerprintAction/index.jelly
@@ -33,7 +33,7 @@ THE SOFTWARE.
-
+
${%Recorded Fingerprints}
@@ -67,7 +67,7 @@ THE SOFTWARE.
- ${%more details}
+ ${%more details}
diff --git a/core/src/main/resources/hudson/tasks/junit/CaseResult/summary.jelly b/core/src/main/resources/hudson/tasks/junit/CaseResult/summary.jelly
index 32bd19575e..25ce3acda0 100644
--- a/core/src/main/resources/hudson/tasks/junit/CaseResult/summary.jelly
+++ b/core/src/main/resources/hudson/tasks/junit/CaseResult/summary.jelly
@@ -35,10 +35,10 @@ THE SOFTWARE.
diff --git a/core/src/main/resources/hudson/tasks/test/TestObject/sidepanel.jelly b/core/src/main/resources/hudson/tasks/test/TestObject/sidepanel.jelly
index 9150dab294..d6578f0e99 100644
--- a/core/src/main/resources/hudson/tasks/test/TestObject/sidepanel.jelly
+++ b/core/src/main/resources/hudson/tasks/test/TestObject/sidepanel.jelly
@@ -33,16 +33,16 @@ THE SOFTWARE.
-
+
-
+
-
+
diff --git a/core/src/main/resources/hudson/tools/JDKInstaller/DescriptorImpl/enterCredential.jelly b/core/src/main/resources/hudson/tools/JDKInstaller/DescriptorImpl/enterCredential.jelly
index 555d8b3737..0bd42bc9a2 100644
--- a/core/src/main/resources/hudson/tools/JDKInstaller/DescriptorImpl/enterCredential.jelly
+++ b/core/src/main/resources/hudson/tools/JDKInstaller/DescriptorImpl/enterCredential.jelly
@@ -27,7 +27,7 @@ THE SOFTWARE.
-
+
${%Enter Your Oracle Account}
diff --git a/core/src/main/resources/hudson/triggers/SCMTrigger/BuildAction/index.jelly b/core/src/main/resources/hudson/triggers/SCMTrigger/BuildAction/index.jelly
index baa24edc34..558a5f4e20 100644
--- a/core/src/main/resources/hudson/triggers/SCMTrigger/BuildAction/index.jelly
+++ b/core/src/main/resources/hudson/triggers/SCMTrigger/BuildAction/index.jelly
@@ -33,7 +33,7 @@ THE SOFTWARE.
${%Polling Log}
- ${%View as plain text}
+ ${%View as plain text}
diff --git a/core/src/main/resources/hudson/util/AWTProblem/index.jelly b/core/src/main/resources/hudson/util/AWTProblem/index.jelly
index fec5507e9d..c5acf32c36 100644
--- a/core/src/main/resources/hudson/util/AWTProblem/index.jelly
+++ b/core/src/main/resources/hudson/util/AWTProblem/index.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
- ${%Error}
+ ${%Error}
${%errorMessage}
diff --git a/core/src/main/resources/hudson/util/HudsonFailedToLoad/index.jelly b/core/src/main/resources/hudson/util/HudsonFailedToLoad/index.jelly
index b9875ec52f..a69eb1d4db 100644
--- a/core/src/main/resources/hudson/util/HudsonFailedToLoad/index.jelly
+++ b/core/src/main/resources/hudson/util/HudsonFailedToLoad/index.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
- ${%Error}
+ ${%Error}
${it.stackTraceString}
diff --git a/core/src/main/resources/hudson/util/IncompatibleAntVersionDetected/index.jelly b/core/src/main/resources/hudson/util/IncompatibleAntVersionDetected/index.jelly
index e272dc4743..6c88a89b90 100644
--- a/core/src/main/resources/hudson/util/IncompatibleAntVersionDetected/index.jelly
+++ b/core/src/main/resources/hudson/util/IncompatibleAntVersionDetected/index.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
- ${%Error}
+ ${%Error}
${%errorMessage(it.whereAntIsLoaded)}
diff --git a/core/src/main/resources/hudson/util/IncompatibleServletVersionDetected/index.jelly b/core/src/main/resources/hudson/util/IncompatibleServletVersionDetected/index.jelly
index 8ac6ced778..76407ab939 100644
--- a/core/src/main/resources/hudson/util/IncompatibleServletVersionDetected/index.jelly
+++ b/core/src/main/resources/hudson/util/IncompatibleServletVersionDetected/index.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
- ${%Error}
+ ${%Error}
${%errorMessage(it.whereServletIsLoaded)}
diff --git a/core/src/main/resources/hudson/util/IncompatibleVMDetected/index.jelly b/core/src/main/resources/hudson/util/IncompatibleVMDetected/index.jelly
index 60b20b8413..ee1d8a0797 100644
--- a/core/src/main/resources/hudson/util/IncompatibleVMDetected/index.jelly
+++ b/core/src/main/resources/hudson/util/IncompatibleVMDetected/index.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
- ${%Error}
+ ${%Error}
${%errorMessage}
diff --git a/core/src/main/resources/hudson/util/InsufficientPermissionDetected/index.jelly b/core/src/main/resources/hudson/util/InsufficientPermissionDetected/index.jelly
index 4b7031456e..e3ef38d31b 100644
--- a/core/src/main/resources/hudson/util/InsufficientPermissionDetected/index.jelly
+++ b/core/src/main/resources/hudson/util/InsufficientPermissionDetected/index.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
- ${%Error}
+ ${%Error}
${%errorMessage.1}
diff --git a/core/src/main/resources/hudson/util/JNADoublyLoaded/index.jelly b/core/src/main/resources/hudson/util/JNADoublyLoaded/index.jelly
index b87254c68b..933c57f940 100644
--- a/core/src/main/resources/hudson/util/JNADoublyLoaded/index.jelly
+++ b/core/src/main/resources/hudson/util/JNADoublyLoaded/index.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
- ${%Failed to load JNA}
+ ${%Failed to load JNA}
${%blurb}
${it.stackTraceString}
diff --git a/core/src/main/resources/hudson/util/JenkinsReloadFailed/index.groovy b/core/src/main/resources/hudson/util/JenkinsReloadFailed/index.groovy
index da5c5fd2c1..761ec1c4e0 100644
--- a/core/src/main/resources/hudson/util/JenkinsReloadFailed/index.groovy
+++ b/core/src/main/resources/hudson/util/JenkinsReloadFailed/index.groovy
@@ -6,7 +6,7 @@ l.layout {
l.header(title:"Jenkins")
l.main_panel {
h1 {
- img(src:"${imagesURL}/48x48/error.png",alt:"[!]",height:48,width:48)
+ l.icon(class: 'icon-error icon-xlg')
text(" ")
text(_("Error"))
}
diff --git a/core/src/main/resources/hudson/util/NoHomeDir/index.jelly b/core/src/main/resources/hudson/util/NoHomeDir/index.jelly
index 4c11e339b1..a75b653e04 100644
--- a/core/src/main/resources/hudson/util/NoHomeDir/index.jelly
+++ b/core/src/main/resources/hudson/util/NoHomeDir/index.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
- ${%Error}
+ ${%Error}
${%errorMessage.1(it.home)}
diff --git a/core/src/main/resources/hudson/util/NoTempDir/index.jelly b/core/src/main/resources/hudson/util/NoTempDir/index.jelly
index 6729a4e741..c78d70f11c 100644
--- a/core/src/main/resources/hudson/util/NoTempDir/index.jelly
+++ b/core/src/main/resources/hudson/util/NoTempDir/index.jelly
@@ -28,7 +28,7 @@ THE SOFTWARE.
- ${%Error}
+ ${%Error}
${%description(it.tempDir)}
${it.stackTraceString}
diff --git a/core/src/main/resources/hudson/views/BuildButtonColumn/column.jelly b/core/src/main/resources/hudson/views/BuildButtonColumn/column.jelly
index f5ea7912ed..fbc09de2d7 100644
--- a/core/src/main/resources/hudson/views/BuildButtonColumn/column.jelly
+++ b/core/src/main/resources/hudson/views/BuildButtonColumn/column.jelly
@@ -38,11 +38,10 @@ THE SOFTWARE.
-
-
+
+ onclick="${onclick}"/>
-
+
-
+
-
+
diff --git a/core/src/main/resources/lib/hudson/project/console-link.jelly b/core/src/main/resources/lib/hudson/project/console-link.jelly
index d6df0977bf..646313aad3 100644
--- a/core/src/main/resources/lib/hudson/project/console-link.jelly
+++ b/core/src/main/resources/lib/hudson/project/console-link.jelly
@@ -28,12 +28,12 @@ THE SOFTWARE.
-
-
+
+
-
+
diff --git a/core/src/main/resources/lib/hudson/project/upstream-downstream.jelly b/core/src/main/resources/lib/hudson/project/upstream-downstream.jelly
index d55ea88086..e254af5447 100644
--- a/core/src/main/resources/lib/hudson/project/upstream-downstream.jelly
+++ b/core/src/main/resources/lib/hudson/project/upstream-downstream.jelly
@@ -32,7 +32,7 @@ THE SOFTWARE.
-
+
diff --git a/core/src/main/resources/lib/hudson/projectViewNested.jelly b/core/src/main/resources/lib/hudson/projectViewNested.jelly
index 1dc5044c53..ccae308599 100644
--- a/core/src/main/resources/lib/hudson/projectViewNested.jelly
+++ b/core/src/main/resources/lib/hudson/projectViewNested.jelly
@@ -44,7 +44,7 @@ THE SOFTWARE.
-
+
diff --git a/core/src/main/resources/lib/hudson/queue.jelly b/core/src/main/resources/lib/hudson/queue.jelly
index 3efe9cf345..1b9996a9e5 100644
--- a/core/src/main/resources/lib/hudson/queue.jelly
+++ b/core/src/main/resources/lib/hudson/queue.jelly
@@ -80,7 +80,7 @@ THE SOFTWARE.
-
+
diff --git a/core/src/main/resources/lib/hudson/setIconSize.jelly b/core/src/main/resources/lib/hudson/setIconSize.jelly
index bf9e7a0c05..4ad00534fe 100644
--- a/core/src/main/resources/lib/hudson/setIconSize.jelly
+++ b/core/src/main/resources/lib/hudson/setIconSize.jelly
@@ -28,10 +28,12 @@ THE SOFTWARE.
+
+
\ No newline at end of file
diff --git a/core/src/main/resources/lib/hudson/summary.jelly b/core/src/main/resources/lib/hudson/summary.jelly
index 681873631f..3208c87fc0 100644
--- a/core/src/main/resources/lib/hudson/summary.jelly
+++ b/core/src/main/resources/lib/hudson/summary.jelly
@@ -28,8 +28,11 @@ THE SOFTWARE.
Displays a link with a large icon. Used in the project top page.
- link to the icon image. relative paths will be resolved against images/48x48,
- and absolute paths (that start with '/') will be resolved against the context root of Hudson
+ The icon class name e.g. 'icon-folder'.
+
+ On older versions of Jenkins, this attribute value used to be a link to the raw icon image, where relative
+ paths were resolved against images/48x48 and absolute paths (that start with '/') were resolved against
+ the context root of Hudson.
where the summary icon links to.
@@ -45,16 +48,44 @@ THE SOFTWARE.
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
diff --git a/core/src/main/resources/lib/layout/icon.jelly b/core/src/main/resources/lib/layout/icon.jelly
new file mode 100644
index 0000000000..a0ec409a84
--- /dev/null
+++ b/core/src/main/resources/lib/layout/icon.jelly
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+ The icon class specification e.g. 'icon-help icon-sm', 'icon-blue icon-md', 'icon-blue-anime icon-xlg'.
+
+
+
+ Icon source raw URL. Only relevant if the 'class' attribute is NOT specified.
+
+
+ onclick handler.
+ title
+ style
+ tooltip
+
+ alt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/core/src/main/resources/lib/layout/layout.jelly b/core/src/main/resources/lib/layout/layout.jelly
index 57810651ba..9f84ebe0e7 100644
--- a/core/src/main/resources/lib/layout/layout.jelly
+++ b/core/src/main/resources/lib/layout/layout.jelly
@@ -203,7 +203,7 @@ ${h.initPageVariables(context)}
@@ -213,7 +213,7 @@ ${h.initPageVariables(context)}
-
+
diff --git a/core/src/main/resources/lib/layout/pane.jelly b/core/src/main/resources/lib/layout/pane.jelly
index 706f7851e5..3196313ece 100644
--- a/core/src/main/resources/lib/layout/pane.jelly
+++ b/core/src/main/resources/lib/layout/pane.jelly
@@ -23,7 +23,7 @@ THE SOFTWARE.
-->
-
+
Used in the <l:side-panel> to draw a box with a title.
@@ -48,15 +48,12 @@ THE SOFTWARE.
Footer of the box. Can include HTML.
-
diff --git a/core/src/main/resources/lib/layout/stopButton.jelly b/core/src/main/resources/lib/layout/stopButton.jelly
index c5413a341e..4d19c004f4 100644
--- a/core/src/main/resources/lib/layout/stopButton.jelly
+++ b/core/src/main/resources/lib/layout/stopButton.jelly
@@ -24,7 +24,7 @@ THE SOFTWARE.
-->
-
+
Creates a clickable "Stop" button.
@@ -35,6 +35,6 @@ THE SOFTWARE.
-
+
diff --git a/core/src/main/resources/lib/layout/task.jelly b/core/src/main/resources/lib/layout/task.jelly
index 6c3fa24a57..9d3d4722a6 100644
--- a/core/src/main/resources/lib/layout/task.jelly
+++ b/core/src/main/resources/lib/layout/task.jelly
@@ -32,11 +32,12 @@ THE SOFTWARE.
Link target. Relative to the current page.
- URL to the icon, which should be 24x24 in size.
- It's relative to the context path of Hudson.
+ URL to an icon image, or the icon class specification. If using an image URL,
+ the image should be 24x24 in size and relative to the context path of Hudson.
- The common values include:
+ Common values include:
+ # "icon-folder icon-md" is an example of using a class spec for a medium folder icon
# "images/24x24/..." then points to the stock icon resources
# "plugin/foobar/abc/def.png" that points to "src/main/webapp/abc/def.png" in your plugin resources
@@ -91,10 +92,34 @@ THE SOFTWARE.
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
@@ -112,7 +137,6 @@ THE SOFTWARE.
-
${taskTags!=null and attrs.contextMenu!='false' ? taskTags.add(href, icon, title, post == 'true', requiresConfirmation == 'true') : null}
@@ -129,12 +153,26 @@ THE SOFTWARE.
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
diff --git a/core/src/test/java/hudson/model/BallColorTest.java b/core/src/test/java/hudson/model/BallColorTest.java
index 7c2b4b0381..1d6f27f66f 100644
--- a/core/src/test/java/hudson/model/BallColorTest.java
+++ b/core/src/test/java/hudson/model/BallColorTest.java
@@ -9,4 +9,9 @@ public class BallColorTest extends TestCase {
public void testHtmlColor() {
assertEquals("#EF2929",BallColor.RED.getHtmlBaseColor());
}
+
+ public void testIconClassName() {
+ assertEquals("icon-red",BallColor.RED.getIconClassName());
+ assertEquals("icon-aborted-anime",BallColor.ABORTED_ANIME.getIconClassName());
+ }
}
diff --git a/pom.xml b/pom.xml
index aa06d8a39f..89979f45d4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -47,11 +47,14 @@ THE SOFTWARE.
+ ui-ext
+ ui-ext/icon/module
core
war
test
cli
plugins
+ ui-ext/icon/shim-plugin
diff --git a/ui-ext/icon/module/pom.xml b/ui-ext/icon/module/pom.xml
new file mode 100644
index 0000000000..da193a8a33
--- /dev/null
+++ b/ui-ext/icon/module/pom.xml
@@ -0,0 +1,43 @@
+
+
+
+ 4.0.0
+
+
+ org.jenkins-ci.main
+ ui-ext-pom
+ 1.576-SNAPSHOT
+ ../../pom.xml
+
+
+ ui-ext-icon-module
+
+ Jenkins icon ui extension core module
+
+ Contains Jenkins icon ui extension code relied upon by both Jenkins Core and the icon "shim" plugin.
+
+
+
diff --git a/ui-ext/icon/module/src/main/java/org/jenkins/ui/icon/Icon.java b/ui-ext/icon/module/src/main/java/org/jenkins/ui/icon/Icon.java
new file mode 100644
index 0000000000..440691c93b
--- /dev/null
+++ b/ui-ext/icon/module/src/main/java/org/jenkins/ui/icon/Icon.java
@@ -0,0 +1,251 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package org.jenkins.ui.icon;
+
+import org.apache.commons.jelly.JellyContext;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Simple icon metadata class.
+ *
+ * @author tom.fennelly@gmail.com
+ */
+public class Icon {
+
+ public static final String ICON_SMALL_STYLE = "width: 16px; height: 16px;";
+ public static final String ICON_MEDIUM_STYLE = "width: 24px; height: 24px;";
+ public static final String ICON_LARGE_STYLE = "width: 32px; height: 32px;";
+ public static final String ICON_XLARGE_STYLE = "width: 48px; height: 48px;";
+
+ private static final Map iconDims = new HashMap();
+
+ static {
+ iconDims.put("16x16", "icon-sm");
+ iconDims.put("24x24", "icon-md");
+ iconDims.put("32x32", "icon-lg");
+ iconDims.put("48x48", "icon-xlg");
+ }
+
+ private final String classSpec;
+ private final String normalizedSelector;
+ private final String url;
+ private final String style;
+ private IconType iconType;
+
+ /**
+ * Icon instance.
+ *
+ * Creates a {@link IconType#CORE core} icon.
+ *
+ * @param classSpec The icon class names.
+ * @param url The icon image url.
+ * @param style The icon style.
+ */
+ public Icon(String classSpec, String url, String style) {
+ this(classSpec, url, style, IconType.CORE);
+ if (url.startsWith("images/")) {
+ this.iconType = IconType.CORE;
+ } else if (url.startsWith("plugin/")) {
+ this.iconType = IconType.PLUGIN;
+ }
+ }
+
+ /**
+ * Icon instance.
+ *
+ * @param classSpec The icon class specification.
+ * @param url The icon image url.
+ * @param style The icon style.
+ * @param iconType The icon type.
+ */
+ public Icon(String classSpec, String url, String style, IconType iconType) {
+ this.classSpec = classSpec;
+ this.normalizedSelector = toNormalizedCSSSelector(classSpec);
+ this.url = toNormalizedIconUrl(url);
+ this.style = style;
+ this.iconType = iconType;
+ }
+
+ /**
+ * Get the class specification for this Icon.
+ * @return The class specification for this Icon.
+ */
+ public String getClassSpec() {
+ return classSpec;
+ }
+
+ /**
+ * Get the icon's normalized CSS selector.
+ *
+ * @return The icon normalized CSS selector.
+ * @see #toNormalizedCSSSelector(String)
+ */
+ public String getNormalizedSelector() {
+ return normalizedSelector;
+ }
+
+ /**
+ * Get the icon url.
+ *
+ * @return The icon url.
+ */
+ public String getUrl() {
+ return url;
+ }
+
+ /**
+ * Get the qualified icon url.
+ *
+ * Qualifying the URL involves prefixing it depending on whether the icon is a core or plugin icon.
+ * Core icons are prefixed with the
+ *
+ * @param context The JellyContext.
+ * @return The qualified icon url.
+ */
+ public String getQualifiedUrl(JellyContext context) {
+ return iconType.toQualifiedUrl(url, context);
+ }
+
+ /**
+ * Get the icon style.
+ *
+ * @return The icon style.
+ */
+ public String getStyle() {
+ return style;
+ }
+
+ /**
+ * Normalize the supplied string to an Icon name class e.g. "blue_anime" to "icon-blue-anime".
+ *
+ * @param string The string to be normalized.
+ * @return The normalized icon name class.
+ */
+ public static String toNormalizedIconNameClass(String string) {
+ if (string == null) {
+ return null;
+ }
+ if (string.endsWith(".png") || string.endsWith(".gif")) {
+ string = string.substring(0, string.length() - 4);
+ }
+ return "icon-" + string.replace("_", "-");
+ }
+
+ /**
+ * Normalize the supplied string to an Icon size class e.g. "16x16" to "icon-sm".
+ *
+ * @param string The string to be normalized.
+ * @return The normalized icon size class, or the unmodified {@code string} arg
+ * if it was an unrecognised icon size.
+ */
+ public static String toNormalizedIconSizeClass(String string) {
+ if (string == null) {
+ return null;
+ }
+ String normalizedSizeClass = iconDims.get(string.trim());
+ return (normalizedSizeClass != null ? normalizedSizeClass : string);
+ }
+
+ /**
+ * Generate a normalized CSS selector from the space separated list of icon class names.
+ *
+ * The normalized CSS selector is the list of class names, alphabetically sorted and dot separated.
+ * This means that "icon-help icon-xlg" and "icon-xlg icon-help" have the same normalized
+ * selector ".icon-help.icon-xlg". Spaces are not relevant etc.
+ *
+ * @param classNames The space separated list of icon class names.
+ * @return The normalized CSS selector.
+ */
+ public static String toNormalizedCSSSelector(String classNames) {
+ if (classNames == null) {
+ return null;
+ }
+
+ String[] classNameTokA = classNames.split(" ");
+ List classNameTokL = new ArrayList();
+
+ // Trim all tokens first
+ for (int i = 0; i < classNameTokA.length; i++) {
+ String trimmedToken = classNameTokA[i].trim();
+ if (trimmedToken.length() > 0) {
+ classNameTokL.add(trimmedToken);
+ }
+ }
+
+ // Refill classNameTokA
+ classNameTokA = new String[classNameTokL.size()];
+ classNameTokL.toArray(classNameTokA);
+
+ // Sort classNameTokA
+ Arrays.sort(classNameTokA, new StringComparator());
+
+ // Build the compound name
+ StringBuilder stringBuilder = new StringBuilder();
+ for (int i = 0; i < classNameTokA.length; i++) {
+ stringBuilder.append(".").append(classNameTokA[i]);
+ }
+
+ return stringBuilder.toString();
+ }
+
+ /**
+ * Normalize the supplied url.
+ *
+ * @param url The url to be normalized.
+ * @return The normalized url.
+ */
+ public static String toNormalizedIconUrl(String url) {
+ if (url == null) {
+ return null;
+ }
+
+ final String originalUrl = url;
+
+ if (url.startsWith("/")) {
+ url = url.substring(1);
+ }
+ if (url.startsWith("images/")) {
+ return url.substring("images/".length());
+ }
+ if (url.startsWith("plugin/")) {
+ return url.substring("plugin/".length());
+ }
+
+ return originalUrl;
+ }
+
+ private static class StringComparator implements Comparator {
+
+ @Override
+ public int compare(String s1, String s2) {
+ return s1.compareTo(s2);
+ }
+ }
+}
diff --git a/ui-ext/icon/module/src/main/java/org/jenkins/ui/icon/IconSet.java b/ui-ext/icon/module/src/main/java/org/jenkins/ui/icon/IconSet.java
new file mode 100644
index 0000000000..38d1c81689
--- /dev/null
+++ b/ui-ext/icon/module/src/main/java/org/jenkins/ui/icon/IconSet.java
@@ -0,0 +1,628 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package org.jenkins.ui.icon;
+
+import groovy.lang.GString;
+import org.apache.commons.jelly.JellyContext;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * An icon set.
+ * @author tom.fennelly@gmail.com
+ */
+public class IconSet {
+
+ public static final IconSet icons = new IconSet();
+
+ private Map iconsByCSSSelector = new ConcurrentHashMap();
+ private Map iconsByUrl = new ConcurrentHashMap();
+ private Map iconsByClassSpec = new ConcurrentHashMap();
+
+ private static final Icon NO_ICON = new Icon("_", "_", "_");
+
+ private IconSet() {
+ }
+
+ public static void initPageVariables(JellyContext context) {
+ context.setVariable("icons", icons);
+ }
+
+ public IconSet addIcon(Icon icon) {
+ iconsByCSSSelector.put(icon.getNormalizedSelector(), icon);
+ iconsByUrl.put(icon.getUrl(), icon);
+ return this;
+ }
+
+ /**
+ * Get an icon instance from it's {@link Icon#toNormalizedCSSSelector(String) normalized CSS selector}.
+ * @param cssSelector The icon's normalized CSS selector.
+ * @return The icon instance, or {@code null} if no such icon.
+ */
+ public Icon getIconByNormalizedCSSSelector(GString cssSelector) {
+ if (cssSelector == null) {
+ return null;
+ }
+ return iconsByCSSSelector.get(cssSelector.toString());
+ }
+
+ /**
+ * Get an icon instance from it's {@link Icon#toNormalizedCSSSelector(String) normalized CSS selector}.
+ * @param cssSelector The icon's normalized CSS selector.
+ * @return The icon instance, or {@code null} if no such icon.
+ */
+ public Icon getIconByNormalizedCSSSelector(String cssSelector) {
+ if (cssSelector == null) {
+ return null;
+ }
+ return iconsByCSSSelector.get(cssSelector);
+ }
+
+ /**
+ * Get an icon instance from a class specification.
+ * @param iconClassSpec The icon's class spec as defined on the <l:icon class> attribute.
+ * @return The icon instance, or {@code null} if no such icon.
+ */
+ public Icon getIconByClassSpec(GString iconClassSpec) {
+ if (iconClassSpec == null) {
+ return null;
+ }
+ return getIconByClassSpec(iconClassSpec.toString());
+ }
+
+ /**
+ * Get an icon instance from a class specification.
+ * @param iconClassSpec The icon's class spec as defined on the <l:icon class> attribute.
+ * @return The icon instance, or {@code null} if no such icon.
+ */
+ public Icon getIconByClassSpec(String iconClassSpec) {
+ if (iconClassSpec == null) {
+ return null;
+ }
+
+ Icon icon = iconsByClassSpec.get(iconClassSpec);
+
+ if (icon == NO_ICON) {
+ return null;
+ }
+
+ if (icon != null) {
+ return icon;
+ }
+
+ String normalizedCSSSelector = Icon.toNormalizedCSSSelector(iconClassSpec);
+
+ icon = getIconByNormalizedCSSSelector(normalizedCSSSelector);
+ if (icon != null) {
+ iconsByClassSpec.put(iconClassSpec, icon);
+ return icon;
+ } else {
+ iconsByClassSpec.put(iconClassSpec, NO_ICON);
+ return null;
+ }
+ }
+
+ /**
+ * Get an icon instance from it's url.
+ * @param url The icon url.
+ * @return The icon instance, or {@code null} if no such icon.
+ */
+ public Icon getIconByUrl(GString url) {
+ if (url == null) {
+ return null;
+ }
+ return getIconByUrl(url.toString());
+ }
+
+ /**
+ * Get an icon instance from it's url.
+ * @param url The icon url.
+ * @return The icon instance, or {@code null} if no such icon.
+ */
+ public Icon getIconByUrl(String url) {
+ if (url == null) {
+ return null;
+ }
+
+ url = Icon.toNormalizedIconUrl(url);
+
+ return iconsByUrl.get(url);
+ }
+
+ /**
+ * Normalize the supplied string to an Icon name class e.g. "blue_anime" to "icon-blue-anime".
+ *
+ * @param string The string to be normalized.
+ * @return The normalized icon name class.
+ */
+ public static String toNormalizedIconNameClass(GString string) {
+ return Icon.toNormalizedIconNameClass(string.toString());
+ }
+
+ /**
+ * Normalize the supplied string to an Icon name class e.g. "blue_anime" to "icon-blue-anime".
+ *
+ * @param string The string to be normalized.
+ * @return The normalized icon name class.
+ */
+ public static String toNormalizedIconNameClass(String string) {
+ return Icon.toNormalizedIconNameClass(string);
+ }
+
+ /**
+ * Normalize the supplied string to an Icon size class e.g. "16x16" to "icon-sm".
+ *
+ * @param string The string to be normalized.
+ * @return The normalized icon size class, or the unmodified {@code string} arg
+ * if it was an unrecognised icon size.
+ */
+ public static String toNormalizedIconSizeClass(GString string) {
+ return Icon.toNormalizedIconSizeClass(string.toString());
+ }
+
+ /**
+ * Normalize the supplied string to an Icon size class e.g. "16x16" to "icon-sm".
+ *
+ * @param string The string to be normalized.
+ * @return The normalized icon size class, or the unmodified {@code string} arg
+ * if it was an unrecognised icon size.
+ */
+ public static String toNormalizedIconSizeClass(String string) {
+ return Icon.toNormalizedIconSizeClass(string);
+ }
+
+ /**
+ * Normalize the supplied url.
+ *
+ * @param url The url to be normalized.
+ * @return The normalized url.
+ */
+ public static String toNormalizedIconUrl(GString url) {
+ return Icon.toNormalizedIconUrl(url.toString());
+ }
+
+ /**
+ * Normalize the supplied url.
+ *
+ * @param url The url to be normalized.
+ * @return The normalized url.
+ */
+ public static String toNormalizedIconUrl(String url) {
+ return Icon.toNormalizedIconUrl(url);
+ }
+
+ // Initialize the core Jenkins icons. We need all this stuff so as to maintain
+ // backward compatibility.
+ static {
+ // Small icons.
+ // .png versions will override .gif versions => only time a gif should be returned by
+ // name is when it's an animated status icon ("-anime-")
+ icons.addIcon(new Icon("icon-aborted icon-sm", "16x16/aborted.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-aborted-anime icon-sm", "16x16/aborted_anime.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-blue icon-sm", "16x16/blue.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-blue-anime icon-sm", "16x16/blue_anime.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-clock icon-sm", "16x16/clock.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-clock-anime icon-sm", "16x16/clock_anime.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-computer-flash icon-sm", "16x16/computer-flash.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-computer-x icon-sm", "16x16/computer-x.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-computer icon-sm", "16x16/computer.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-disabled icon-sm", "16x16/disabled.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-disabled-anime icon-sm", "16x16/disabled_anime.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-document-add icon-sm", "16x16/document_add.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-document-delete icon-sm", "16x16/document_delete.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-document-edit icon-sm", "16x16/document_edit.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-edit-delete icon-sm", "16x16/edit-delete.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-edit-select-all icon-sm", "16x16/edit-select-all.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-empty icon-sm", "16x16/empty.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-error icon-sm", "16x16/error.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-fingerprint icon-sm", "16x16/fingerprint.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-folder-error icon-sm", "16x16/folder-error.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-folder-open icon-sm", "16x16/folder-open.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-folder icon-sm", "16x16/folder.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-gear2 icon-sm", "16x16/gear2.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-go-next icon-sm", "16x16/go-next.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-green icon-sm", "16x16/green.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-green-anime icon-sm", "16x16/green_anime.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-grey icon-sm", "16x16/grey.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-grey-anime icon-sm", "16x16/grey_anime.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-health-00to19 icon-sm", "16x16/health-00to19.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-health-20to39 icon-sm", "16x16/health-20to39.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-health-40to59 icon-sm", "16x16/health-40to59.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-health-60to79 icon-sm", "16x16/health-60to79.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-health-80plus icon-sm", "16x16/health-80plus.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-help icon-sm", "16x16/help.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-hourglass icon-sm", "16x16/hourglass.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-lock icon-sm", "16x16/lock.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-nobuilt icon-sm", "16x16/nobuilt.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-nobuilt-anime icon-sm", "16x16/nobuilt_anime.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-notepad icon-sm", "16x16/notepad.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-package icon-sm", "16x16/package.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-person icon-sm", "16x16/person.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-plugin icon-sm", "16x16/plugin.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-red icon-sm", "16x16/red.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-red-anime icon-sm", "16x16/red_anime.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-redo icon-sm", "16x16/redo.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-save icon-sm", "16x16/save.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-search icon-sm", "16x16/search.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-star-gold icon-sm", "16x16/star-gold.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-star icon-sm", "16x16/star.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-stop icon-sm", "16x16/stop.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-terminal icon-sm", "16x16/terminal.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-text-error icon-sm", "16x16/text-error.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-text icon-sm", "16x16/text.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-user icon-sm", "16x16/user.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-warning icon-sm", "16x16/warning.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-yellow icon-sm", "16x16/yellow.gif", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-yellow-anime icon-sm", "16x16/yellow_anime.gif", Icon.ICON_SMALL_STYLE));
+
+ icons.addIcon(new Icon("icon-aborted icon-sm", "16x16/aborted.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-accept icon-sm", "16x16/accept.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-attribute icon-sm", "16x16/attribute.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-blue icon-sm", "16x16/blue.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-clock icon-sm", "16x16/clock.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-collapse icon-sm", "16x16/collapse.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-computer-x icon-sm", "16x16/computer-x.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-computer icon-sm", "16x16/computer.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-disabled icon-sm", "16x16/disabled.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-document-add icon-sm", "16x16/document_add.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-document-delete icon-sm", "16x16/document_delete.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-document-edit icon-sm", "16x16/document_edit.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-edit-delete icon-sm", "16x16/edit-delete.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-edit-select-all icon-sm", "16x16/edit-select-all.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-empty icon-sm", "16x16/empty.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-error icon-sm", "16x16/error.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-expand icon-sm", "16x16/expand.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-fingerprint icon-sm", "16x16/fingerprint.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-folder-error icon-sm", "16x16/folder-error.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-folder-open icon-sm", "16x16/folder-open.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-folder icon-sm", "16x16/folder.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-gear2 icon-sm", "16x16/gear2.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-go-next icon-sm", "16x16/go-next.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-grey icon-sm", "16x16/grey.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-health-00to19 icon-sm", "16x16/health-00to19.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-health-20to39 icon-sm", "16x16/health-20to39.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-health-40to59 icon-sm", "16x16/health-40to59.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-health-60to79 icon-sm", "16x16/health-60to79.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-health-80plus icon-sm", "16x16/health-80plus.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-help icon-sm", "16x16/help.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-hourglass icon-sm", "16x16/hourglass.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-lock icon-sm", "16x16/lock.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-nobuilt icon-sm", "16x16/nobuilt.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-notepad icon-sm", "16x16/notepad.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-orange-square icon-sm", "16x16/orange-square.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-package icon-sm", "16x16/package.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-person icon-sm", "16x16/person.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-plugin icon-sm", "16x16/plugin.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-red icon-sm", "16x16/red.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-redo icon-sm", "16x16/redo.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-save icon-sm", "16x16/save.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-search icon-sm", "16x16/search.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-secure icon-sm", "16x16/secure.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-setting icon-sm", "16x16/setting.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-star-gold icon-sm", "16x16/star-gold.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-star icon-sm", "16x16/star.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-stop icon-sm", "16x16/stop.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-terminal icon-sm", "16x16/terminal.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-text-error icon-sm", "16x16/text-error.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-text icon-sm", "16x16/text.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-user icon-sm", "16x16/user.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-warning icon-sm", "16x16/warning.png", Icon.ICON_SMALL_STYLE));
+ icons.addIcon(new Icon("icon-yellow icon-sm", "16x16/yellow.png", Icon.ICON_SMALL_STYLE));
+
+ // Medium icons.
+ // .png versions will override .gif versions => only time a gif should be returned by
+ // name is when it's an animated status icon ("-anime-")
+ icons.addIcon(new Icon("icon-aborted icon-md", "24x24/aborted.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-aborted-anime icon-md", "24x24/aborted_anime.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-blue icon-md", "24x24/blue.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-blue-anime icon-md", "24x24/blue_anime.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-clipboard icon-md", "24x24/clipboard.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-clock icon-md", "24x24/clock.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-clock-anime icon-md", "24x24/clock_anime.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-computer-flash icon-md", "24x24/computer-flash.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-computer-x icon-md", "24x24/computer-x.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-computer icon-md", "24x24/computer.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-delete-document icon-md", "24x24/delete-document.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-disabled icon-md", "24x24/disabled.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-disabled-anime icon-md", "24x24/disabled_anime.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-document-properties icon-md", "24x24/document-properties.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-document icon-md", "24x24/document.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-edit-delete icon-md", "24x24/edit-delete.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-empty icon-md", "24x24/empty.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-fingerprint icon-md", "24x24/fingerprint.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-folder-delete icon-md", "24x24/folder-delete.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-folder icon-md", "24x24/folder.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-gear icon-md", "24x24/gear.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-gear2 icon-md", "24x24/gear2.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-graph icon-md", "24x24/graph.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-green icon-md", "24x24/green.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-green-anime icon-md", "24x24/green_anime.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-grey icon-md", "24x24/grey.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-grey-anime icon-md", "24x24/grey_anime.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-health-00to19 icon-md", "24x24/health-00to19.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-health-20to39 icon-md", "24x24/health-20to39.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-health-40to59 icon-md", "24x24/health-40to59.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-health-60to79 icon-md", "24x24/health-60to79.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-health-80plus icon-md", "24x24/health-80plus.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-help icon-md", "24x24/help.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-installer icon-md", "24x24/installer.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-monitor icon-md", "24x24/monitor.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-new-computer icon-md", "24x24/new-computer.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-new-document icon-md", "24x24/new-document.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-new-package icon-md", "24x24/new-package.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-new-user icon-md", "24x24/new-user.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-next icon-md", "24x24/next.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-nobuilt icon-md", "24x24/nobuilt.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-nobuilt-anime icon-md", "24x24/nobuilt_anime.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-notepad icon-md", "24x24/notepad.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-orange-square icon-md", "24x24/orange-square.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-package icon-md", "24x24/package.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-previous icon-md", "24x24/previous.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-red icon-md", "24x24/red.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-red-anime icon-md", "24x24/red_anime.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-redo icon-md", "24x24/redo.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-refresh icon-md", "24x24/refresh.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-save icon-md", "24x24/save.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-search icon-md", "24x24/search.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-setting icon-md", "24x24/setting.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-star-gold icon-md", "24x24/star-gold.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-star icon-md", "24x24/star.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-terminal icon-md", "24x24/terminal.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-up icon-md", "24x24/up.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-user icon-md", "24x24/user.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-yellow icon-md", "24x24/yellow.gif", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-yellow-anime icon-md", "24x24/yellow_anime.gif", Icon.ICON_MEDIUM_STYLE));
+
+ icons.addIcon(new Icon("icon-aborted icon-md", "24x24/aborted.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-accept icon-md", "24x24/accept.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-attribute icon-md", "24x24/attribute.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-blue icon-md", "24x24/blue.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-clipboard icon-md", "24x24/clipboard.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-clock icon-md", "24x24/clock.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-computer-x icon-md", "24x24/computer-x.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-computer icon-md", "24x24/computer.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-delete-document icon-md", "24x24/delete-document.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-disabled icon-md", "24x24/disabled.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-document-properties icon-md", "24x24/document-properties.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-document icon-md", "24x24/document.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-edit-delete icon-md", "24x24/edit-delete.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-empty icon-md", "24x24/empty.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-fingerprint icon-md", "24x24/fingerprint.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-folder-delete icon-md", "24x24/folder-delete.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-folder icon-md", "24x24/folder.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-gear icon-md", "24x24/gear.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-gear2 icon-md", "24x24/gear2.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-graph icon-md", "24x24/graph.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-grey icon-md", "24x24/grey.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-health-00to19 icon-md", "24x24/health-00to19.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-health-20to39 icon-md", "24x24/health-20to39.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-health-40to59 icon-md", "24x24/health-40to59.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-health-60to79 icon-md", "24x24/health-60to79.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-health-80plus icon-md", "24x24/health-80plus.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-help icon-md", "24x24/help.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-installer icon-md", "24x24/installer.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-lock icon-md", "24x24/lock.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-monitor icon-md", "24x24/monitor.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-new-computer icon-md", "24x24/new-computer.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-new-document icon-md", "24x24/new-document.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-new-package icon-md", "24x24/new-package.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-new-user icon-md", "24x24/new-user.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-next icon-md", "24x24/next.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-nobuilt icon-md", "24x24/nobuilt.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-notepad icon-md", "24x24/notepad.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-orange-square icon-md", "24x24/orange-square.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-package icon-md", "24x24/package.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-plugin icon-md", "24x24/plugin.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-previous icon-md", "24x24/previous.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-red icon-md", "24x24/red.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-redo icon-md", "24x24/redo.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-refresh icon-md", "24x24/refresh.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-save icon-md", "24x24/save.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-search icon-md", "24x24/search.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-secure icon-md", "24x24/secure.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-setting icon-md", "24x24/setting.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-star-gold icon-md", "24x24/star-gold.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-star icon-md", "24x24/star.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-terminal icon-md", "24x24/terminal.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-up icon-md", "24x24/up.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-user icon-md", "24x24/user.png", Icon.ICON_MEDIUM_STYLE));
+ icons.addIcon(new Icon("icon-yellow icon-md", "24x24/yellow.png", Icon.ICON_MEDIUM_STYLE));
+
+ // Large icons.
+ // .png versions will override .gif versions => only time a gif should be returned by
+ // name is when it's an animated status icon ("-anime")
+ icons.addIcon(new Icon("icon-aborted icon-lg", "32x32/aborted.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-aborted-anime icon-lg", "32x32/aborted_anime.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-blue icon-lg", "32x32/blue.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-blue-anime icon-lg", "32x32/blue_anime.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-clipboard icon-lg", "32x32/clipboard.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-clock icon-lg", "32x32/clock.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-clock-anime icon-lg", "32x32/clock_anime.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-computer-flash icon-lg", "32x32/computer-flash.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-computer-x icon-lg", "32x32/computer-x.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-computer icon-lg", "32x32/computer.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-disabled icon-lg", "32x32/disabled.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-disabled-anime icon-lg", "32x32/disabled_anime.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-empty icon-lg", "32x32/empty.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-error icon-lg", "32x32/error.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-folder icon-lg", "32x32/folder.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-graph icon-lg", "32x32/graph.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-green icon-lg", "32x32/green.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-green-anime icon-lg", "32x32/green_anime.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-grey icon-lg", "32x32/grey.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-grey-anime icon-lg", "32x32/grey_anime.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-00to19 icon-lg", "32x32/health-00to19.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-20to39 icon-lg", "32x32/health-20to39.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-40to59 icon-lg", "32x32/health-40to59.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-60to79 icon-lg", "32x32/health-60to79.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-80plus icon-lg", "32x32/health-80plus.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-nobuilt icon-lg", "32x32/nobuilt.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-nobuilt-anime icon-lg", "32x32/nobuilt_anime.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-plugin icon-lg", "32x32/plugin.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-red icon-lg", "32x32/red.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-red-anime icon-lg", "32x32/red_anime.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-setting icon-lg", "32x32/setting.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-star-gold icon-lg", "32x32/star-gold.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-star icon-lg", "32x32/star.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-user icon-lg", "32x32/user.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-yellow icon-lg", "32x32/yellow.gif", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-yellow-anime icon-lg", "32x32/yellow_anime.gif", Icon.ICON_LARGE_STYLE));
+
+ icons.addIcon(new Icon("icon-aborted icon-lg", "32x32/aborted.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-accept icon-lg", "32x32/accept.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-attribute icon-lg", "32x32/attribute.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-blue icon-lg", "32x32/blue.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-clipboard icon-lg", "32x32/clipboard.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-clock icon-lg", "32x32/clock.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-computer-x icon-lg", "32x32/computer-x.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-computer icon-lg", "32x32/computer.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-disabled icon-lg", "32x32/disabled.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-empty icon-lg", "32x32/empty.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-error icon-lg", "32x32/error.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-folder icon-lg", "32x32/folder.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-gear2 icon-lg", "32x32/gear2.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-graph icon-lg", "32x32/graph.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-grey icon-lg", "32x32/grey.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-00to19 icon-lg", "32x32/health-00to19.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-20to39 icon-lg", "32x32/health-20to39.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-40to59 icon-lg", "32x32/health-40to59.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-60to79 icon-lg", "32x32/health-60to79.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-80plus icon-lg", "32x32/health-80plus.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-lock icon-lg", "32x32/lock.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-nobuilt icon-lg", "32x32/nobuilt.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-orange-square icon-lg", "32x32/orange-square.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-package icon-lg", "32x32/package.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-plugin icon-lg", "32x32/plugin.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-red icon-lg", "32x32/red.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-secure icon-lg", "32x32/secure.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-setting icon-lg", "32x32/setting.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-star-gold icon-lg", "32x32/star-gold.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-star icon-lg", "32x32/star.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-user icon-lg", "32x32/user.png", Icon.ICON_LARGE_STYLE));
+ icons.addIcon(new Icon("icon-yellow icon-lg", "32x32/yellow.png", Icon.ICON_LARGE_STYLE));
+
+ // X icon-lg icons.
+ // .png versions will override .gif versions => only time a gif should be returned by
+ // name is when it's an animated status icon ("-anime-")
+ icons.addIcon(new Icon("icon-aborted icon-xlg", "48x48/aborted.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-aborted-anime icon-xlg", "48x48/aborted_anime.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-blue icon-xlg", "48x48/blue.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-blue-anime icon-xlg", "48x48/blue_anime.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-clipboard icon-xlg", "48x48/clipboard.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-computer-flash icon-xlg", "48x48/computer-flash.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-computer-x icon-xlg", "48x48/computer-x.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-computer icon-xlg", "48x48/computer.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-disabled icon-xlg", "48x48/disabled.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-disabled-anime icon-xlg", "48x48/disabled_anime.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-document icon-xlg", "48x48/document.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-empty icon-xlg", "48x48/empty.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-error icon-xlg", "48x48/error.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-fingerprint icon-xlg", "48x48/fingerprint.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-folder-delete icon-xlg", "48x48/folder-delete.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-folder icon-xlg", "48x48/folder.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-gear2 icon-xlg", "48x48/gear2.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-graph icon-xlg", "48x48/graph.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-green icon-xlg", "48x48/green.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-green-anime icon-xlg", "48x48/green_anime.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-grey icon-xlg", "48x48/grey.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-grey-anime icon-xlg", "48x48/grey_anime.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-00to19 icon-xlg", "48x48/health-00to19.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-20to39 icon-xlg", "48x48/health-20to39.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-40to59 icon-xlg", "48x48/health-40to59.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-60to79 icon-xlg", "48x48/health-60to79.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-80plus icon-xlg", "48x48/health-80plus.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-help icon-xlg", "48x48/help.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-installer icon-xlg", "48x48/installer.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-monitor icon-xlg", "48x48/monitor.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-network icon-xlg", "48x48/network.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-nobuilt icon-xlg", "48x48/nobuilt.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-nobuilt-anime icon-xlg", "48x48/nobuilt_anime.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-notepad icon-xlg", "48x48/notepad.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-orange-square icon-xlg", "48x48/orange-square.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-package icon-xlg", "48x48/package.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-plugin icon-xlg", "48x48/plugin.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-red icon-xlg", "48x48/red.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-red-anime icon-xlg", "48x48/red_anime.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-redo icon-xlg", "48x48/redo.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-refresh icon-xlg", "48x48/refresh.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-search icon-xlg", "48x48/search.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-secure icon-xlg", "48x48/secure.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-setting icon-xlg", "48x48/setting.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-star-gold icon-xlg", "48x48/star-gold.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-star icon-xlg", "48x48/star.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-system-log-out icon-xlg", "48x48/system-log-out.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-terminal icon-xlg", "48x48/terminal.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-user icon-xlg", "48x48/user.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-warning icon-xlg", "48x48/warning.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-yellow icon-xlg", "48x48/yellow.gif", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-yellow-anime icon-xlg", "48x48/yellow_anime.gif", Icon.ICON_XLARGE_STYLE));
+
+ icons.addIcon(new Icon("icon-aborted icon-xlg", "48x48/aborted.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-accept icon-xlg", "48x48/accept.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-attribute icon-xlg", "48x48/attribute.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-blue icon-xlg", "48x48/blue.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-clipboard icon-xlg", "48x48/clipboard.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-computer-x icon-xlg", "48x48/computer-x.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-computer icon-xlg", "48x48/computer.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-disabled icon-xlg", "48x48/disabled.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-document icon-xlg", "48x48/document.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-empty icon-xlg", "48x48/empty.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-error icon-xlg", "48x48/error.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-fingerprint icon-xlg", "48x48/fingerprint.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-folder-delete icon-xlg", "48x48/folder-delete.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-folder icon-xlg", "48x48/folder.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-gear2 icon-xlg", "48x48/gear2.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-graph icon-xlg", "48x48/graph.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-grey icon-xlg", "48x48/grey.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-00to19 icon-xlg", "48x48/health-00to19.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-20to39 icon-xlg", "48x48/health-20to39.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-40to59 icon-xlg", "48x48/health-40to59.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-60to79 icon-xlg", "48x48/health-60to79.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-health-80plus icon-xlg", "48x48/health-80plus.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-help icon-xlg", "48x48/help.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-installer icon-xlg", "48x48/installer.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-lock icon-xlg", "48x48/lock.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-monitor icon-xlg", "48x48/monitor.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-network icon-xlg", "48x48/network.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-nobuilt icon-xlg", "48x48/nobuilt.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-notepad icon-xlg", "48x48/notepad.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-orange-square icon-xlg", "48x48/orange-square.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-package icon-xlg", "48x48/package.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-plugin icon-xlg", "48x48/plugin.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-red icon-xlg", "48x48/red.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-redo icon-xlg", "48x48/redo.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-refresh icon-xlg", "48x48/refresh.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-search icon-xlg", "48x48/search.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-secure icon-xlg", "48x48/secure.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-setting icon-xlg", "48x48/setting.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-star-gold icon-xlg", "48x48/star-gold.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-star icon-xlg", "48x48/star.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-system-log-out icon-xlg", "48x48/system-log-out.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-terminal icon-xlg", "48x48/terminal.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-user icon-xlg", "48x48/user.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-warning icon-xlg", "48x48/warning.png", Icon.ICON_XLARGE_STYLE));
+ icons.addIcon(new Icon("icon-yellow icon-xlg", "48x48/yellow.png", Icon.ICON_XLARGE_STYLE));
+ }
+}
diff --git a/ui-ext/icon/module/src/main/java/org/jenkins/ui/icon/IconType.java b/ui-ext/icon/module/src/main/java/org/jenkins/ui/icon/IconType.java
new file mode 100644
index 0000000000..bb0c11fa9f
--- /dev/null
+++ b/ui-ext/icon/module/src/main/java/org/jenkins/ui/icon/IconType.java
@@ -0,0 +1,61 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package org.jenkins.ui.icon;
+
+import org.apache.commons.jelly.JellyContext;
+import org.kohsuke.stapler.Stapler;
+
+/**
+ * Icon type.
+ *
+ * @author tom.fennelly@gmail.com
+ */
+public enum IconType {
+ CORE,
+ PLUGIN,;
+
+ /**
+ * Qualify the supplied icon url.
+ *
+ * Qualifying the URL involves prefixing it depending on whether the icon is a core or plugin icon.
+ *
+ * @param url The url to be qualified.
+ * @param context The JellyContext.
+ * @return The qualified icon url.
+ */
+ public String toQualifiedUrl(String url, JellyContext context) {
+ String resURL = context.getVariable("resURL").toString();
+
+ switch (this) {
+ case CORE: {
+ return resURL + "/images/" + url;
+ }
+ case PLUGIN: {
+ return resURL + "/plugin/" + url;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/ui-ext/icon/module/src/test/java/org/jenkins/ui/icon/IconSetTest.java b/ui-ext/icon/module/src/test/java/org/jenkins/ui/icon/IconSetTest.java
new file mode 100644
index 0000000000..3b77b4db32
--- /dev/null
+++ b/ui-ext/icon/module/src/test/java/org/jenkins/ui/icon/IconSetTest.java
@@ -0,0 +1,69 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi,
+ * Yahoo! Inc., Stephen Connolly, Tom Huybrechts, Alan Harder, Manufacture
+ * Francaise des Pneumatiques Michelin, Romain Seguy
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package org.jenkins.ui.icon;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author tom.fennelly@gmail.com
+ */
+public class IconSetTest {
+
+ @Test
+ public void test() {
+ test("icon-sm", "16x16", Icon.ICON_SMALL_STYLE);
+ test("icon-md", "24x24", Icon.ICON_MEDIUM_STYLE);
+ test("icon-lg", "32x32", Icon.ICON_LARGE_STYLE);
+ test("icon-xlg", "48x48", Icon.ICON_XLARGE_STYLE);
+ }
+
+ @Test
+ public void test_toNormalizedIconUrl() {
+ Assert.assertEquals(null, IconSet.toNormalizedIconUrl((String)null));
+ Assert.assertEquals("aaaa", IconSet.toNormalizedIconUrl("aaaa"));
+ Assert.assertEquals("aaaa", IconSet.toNormalizedIconUrl("images/aaaa"));
+ Assert.assertEquals("aaaa", IconSet.toNormalizedIconUrl("plugin/aaaa"));
+ Assert.assertEquals("aaaa", IconSet.toNormalizedIconUrl("/images/aaaa"));
+ Assert.assertEquals("aaaa", IconSet.toNormalizedIconUrl("/plugin/aaaa"));
+ }
+
+ private void test(String sizeClass, String sizeDims, String expectedStyle) {
+ Icon icon;
+
+ icon = IconSet.icons.getIconByClassSpec("icon-blue " + sizeClass);
+ Assert.assertEquals(sizeDims + "/blue.png", icon.getUrl());
+ icon = IconSet.icons.getIconByUrl(sizeDims + "/blue.png");
+ Assert.assertEquals(".icon-blue." + sizeClass, icon.getNormalizedSelector());
+ Assert.assertEquals(expectedStyle, icon.getStyle());
+
+ icon = IconSet.icons.getIconByClassSpec("icon-blue-anime " + sizeClass);
+ Assert.assertEquals(sizeDims + "/blue_anime.gif", icon.getUrl());
+ icon = IconSet.icons.getIconByUrl(sizeDims + "/blue_anime.gif");
+ Assert.assertEquals(".icon-blue-anime." + sizeClass, icon.getNormalizedSelector());
+ Assert.assertEquals(expectedStyle, icon.getStyle());
+ }
+}
diff --git a/ui-ext/icon/module/src/test/java/org/jenkins/ui/icon/IconTest.java b/ui-ext/icon/module/src/test/java/org/jenkins/ui/icon/IconTest.java
new file mode 100644
index 0000000000..dc790bbaa8
--- /dev/null
+++ b/ui-ext/icon/module/src/test/java/org/jenkins/ui/icon/IconTest.java
@@ -0,0 +1,54 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi,
+ * Yahoo! Inc., Stephen Connolly, Tom Huybrechts, Alan Harder, Manufacture
+ * Francaise des Pneumatiques Michelin, Romain Seguy
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package org.jenkins.ui.icon;
+
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author tom.fennelly@gmail.com
+ */
+public class IconTest {
+
+ @Test
+ public void test_toNormalizedCSSSelector() {
+ Assert.assertEquals(".a.b.c", Icon.toNormalizedCSSSelector(" b c a"));
+ }
+
+ @Test
+ public void test_toNormalizedIconNameClass() {
+ Assert.assertEquals("icon-blue-anime", Icon.toNormalizedIconNameClass("blue_anime"));
+ Assert.assertEquals("icon-blue-anime", Icon.toNormalizedIconNameClass("blue_anime.gif"));
+ Assert.assertEquals("icon-blue", Icon.toNormalizedIconNameClass("blue.png"));
+ }
+
+ @Test
+ public void test_toNormalizedIconSizeClass() {
+ Assert.assertEquals("icon-sm", Icon.toNormalizedIconSizeClass("16x16"));
+ Assert.assertEquals("xxx", Icon.toNormalizedIconSizeClass("xxx"));
+ }
+}
diff --git a/ui-ext/icon/shim-plugin/pom.xml b/ui-ext/icon/shim-plugin/pom.xml
new file mode 100644
index 0000000000..9ead3a9ab3
--- /dev/null
+++ b/ui-ext/icon/shim-plugin/pom.xml
@@ -0,0 +1,139 @@
+
+
+
+ 4.0.0
+
+ org.jenkins-ci.plugins
+ plugin
+ 1.480
+
+
+ org.jenkins-ci.plugins
+ ui-ext-icon-shim-plugin
+ 1.576-SNAPSHOT
+ hpi
+
+ Icon Shim Plugin
+ Allows plugins make full use of the <l:icon> layout tag when running on newer versions of Jenkins, while still being compatible with older versions.
+
+
+
+ org.jenkins-ci.main
+ ui-ext-icon-module
+ ${project.version}
+
+
+
+
+
+
+
+
+ maven-enforcer-plugin
+ 1.3.1
+
+
+ enforce-maven
+
+ enforce
+
+
+
+
+ (,2.1.0),(2.1.0,2.2.0),(2.2.0,)
+ Maven 2.1.0 and 2.2.0 produce incorrect GPG signatures and checksums respectively.
+
+
+
+ (,3.0),[3.0.4,)
+ Maven 3.0 through 3.0.3 inclusive do not pass correct settings.xml to Maven Release
+ Plugin.
+
+
+
+
+
+
+
+
+ maven-release-plugin
+ 2.5
+
+
+
+
+
+ org.codehaus.mojo
+ findbugs-maven-plugin
+ 2.5.2
+
+ src/findbugs/excludesFilter.xml
+ true
+
+
+
+ verify
+
+ check
+
+
+
+
+
+ org.jenkins-ci.tools
+ maven-hpi-plugin
+
+
+
+ generate-taglib-interface
+
+
+
+
+
+
+
+
+
+ MIT License
+ http://opensource.org/licenses/MIT
+
+
+
+
+
+ repo.jenkins-ci.org
+ http://repo.jenkins-ci.org/public/
+
+
+
+
+
+ repo.jenkins-ci.org
+ http://repo.jenkins-ci.org/public/
+
+
+
+
diff --git a/ui-ext/icon/shim-plugin/src/findbugs/excludesFilter.xml b/ui-ext/icon/shim-plugin/src/findbugs/excludesFilter.xml
new file mode 100644
index 0000000000..e530200717
--- /dev/null
+++ b/ui-ext/icon/shim-plugin/src/findbugs/excludesFilter.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/ui-ext/icon/shim-plugin/src/main/java/org/jenkins/ui/icon/shim/CoreIconTagDetector.java b/ui-ext/icon/shim-plugin/src/main/java/org/jenkins/ui/icon/shim/CoreIconTagDetector.java
new file mode 100644
index 0000000000..ee8c0e7749
--- /dev/null
+++ b/ui-ext/icon/shim-plugin/src/main/java/org/jenkins/ui/icon/shim/CoreIconTagDetector.java
@@ -0,0 +1,51 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package org.jenkins.ui.icon.shim;
+
+import jenkins.model.Jenkins;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * @author tom.fennelly@gmail.com
+ */
+public class CoreIconTagDetector {
+
+ public static final boolean TAG_AVAILABLE;
+
+ static {
+ InputStream coreTagFile = Jenkins.class.getResourceAsStream("/lib/layout/icon.jelly");
+ if (coreTagFile != null) {
+ TAG_AVAILABLE = true;
+ try {
+ coreTagFile.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ } else {
+ TAG_AVAILABLE = false;
+ }
+ }
+}
diff --git a/ui-ext/icon/shim-plugin/src/main/resources/shim/layout/icon/icon.groovy b/ui-ext/icon/shim-plugin/src/main/resources/shim/layout/icon/icon.groovy
new file mode 100644
index 0000000000..bd84c57052
--- /dev/null
+++ b/ui-ext/icon/shim-plugin/src/main/resources/shim/layout/icon/icon.groovy
@@ -0,0 +1,72 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package shim.layout.icon
+
+import org.jenkins.ui.icon.IconSet
+import org.jenkins.ui.icon.shim.CoreIconTagDetector
+import org.xml.sax.helpers.AttributesImpl
+
+def attrs = context.getVariable('attrs')
+def iconSpec = attrs['class']
+def iconSize = attrs.iconSize
+
+def mapAttribute(def name, def attributes) {
+ def attributeValue = attrs[name];
+ if (attributeValue != null) {
+ attributes.addAttribute("", name, name, "CDATA", attributeValue)
+ }
+}
+
+if (iconSize != null) {
+ iconSpec += ' ' + IconSet.toNormalizedIconSizeClass(iconSize)
+}
+
+if (iconSpec != null) {
+ if (CoreIconTagDetector.TAG_AVAILABLE) {
+ def l = namespace(lib.LayoutTagLib)
+
+ l.icon(class: iconSpec, onclick: attrs.onclick,
+ title: attrs.title, style: attrs.style,
+ tooltip: attrs.tooltip, alt: attrs.alt)
+ } else {
+ def iconDef = IconSet.icons.getIconByClassSpec(iconSpec);
+ if (iconDef != null) {
+ def AttributesImpl attributes = new AttributesImpl()
+ def style = attrs.style
+
+ attributes.addAttribute("", "src", "src", "CDATA", iconDef.getQualifiedUrl(context))
+ if (style == null) {
+ style = iconDef.getStyle()
+ }
+ attributes.addAttribute("", "style", "style", "CDATA", style)
+ mapAttribute("onclick", attributes)
+ mapAttribute("title", attributes)
+ mapAttribute("tooltip", attributes)
+ mapAttribute("alt", attributes)
+
+ output.startElement("img", attributes)
+ output.endElement("img")
+ }
+ }
+}
diff --git a/ui-ext/icon/shim-plugin/src/main/resources/shim/layout/icon/setIcons.groovy b/ui-ext/icon/shim-plugin/src/main/resources/shim/layout/icon/setIcons.groovy
new file mode 100644
index 0000000000..0725103e4f
--- /dev/null
+++ b/ui-ext/icon/shim-plugin/src/main/resources/shim/layout/icon/setIcons.groovy
@@ -0,0 +1,28 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+package shim.layout.icon
+
+import org.jenkins.ui.icon.IconSet
+
+IconSet.initPageVariables(context)
\ No newline at end of file
diff --git a/ui-ext/icon/shim-plugin/src/main/resources/shim/layout/icon/taglib b/ui-ext/icon/shim-plugin/src/main/resources/shim/layout/icon/taglib
new file mode 100644
index 0000000000..3da74c9354
--- /dev/null
+++ b/ui-ext/icon/shim-plugin/src/main/resources/shim/layout/icon/taglib
@@ -0,0 +1 @@
+Tag library that defines the shim for the core icon tag in /lib/layout.
\ No newline at end of file
diff --git a/ui-ext/pom.xml b/ui-ext/pom.xml
new file mode 100644
index 0000000000..887979bc7c
--- /dev/null
+++ b/ui-ext/pom.xml
@@ -0,0 +1,88 @@
+
+
+
+ 4.0.0
+
+
+ org.jenkins-ci.main
+ pom
+ 1.576-SNAPSHOT
+ ../pom.xml
+
+
+ ui-ext-pom
+ pom
+
+ Jenkins UI Extensions.
+
+ Contains Jenkins UI extension taglib modules and plugins.
+
+
+
+ 1.227
+
+
+
+
+
+ org.kohsuke.stapler
+ stapler-groovy
+ ${stapler.version}
+ provided
+
+
+ commons-jelly
+ commons-jelly
+
+
+ commons-jexl
+ commons-jexl
+
+
+ org.jvnet.hudson
+ commons-jexl
+
+
+
+ org.codehaus.groovy
+ groovy
+
+
+
+
+ javax.servlet
+ servlet-api
+ 2.4
+ provided
+
+
+
+ junit
+ junit
+ test
+
+
+