branding/css/spacewalk-mixins.less | 2 branding/css/spacewalk-theme.less | 16 branding/css/spacewalk-variables.less | 20 java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java | 46 -- java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 6 java/code/src/com/redhat/rhn/frontend/taglibs/ListDisplayTag.java | 6 java/code/src/com/redhat/rhn/frontend/taglibs/list/DataSetManipulator.java | 10 java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java | 53 +- java/code/src/com/redhat/rhn/frontend/taglibs/test/AddressTagTest.java | 18 java/code/src/com/redhat/rhn/frontend/taglibs/test/NavDialogMenuTagTest.java | 5 java/code/src/com/redhat/rhn/frontend/taglibs/test/NavMenuTagTest.java | 8 java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagBasicTest.java | 29 - java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCloneTest.java | 45 +- java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCreationTest.java | 45 -- java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagDeletionTest.java | 45 -- java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagMiscTest.java | 44 +- java/code/src/com/redhat/rhn/frontend/taglibs/test/UnpagedListDisplayTagTest.java | 18 java/code/webapp/WEB-INF/pages/common/fragments/configuration/rankchannels.jspf | 5 java/code/webapp/WEB-INF/pages/common/fragments/systems/system-header.jspf | 28 - java/code/webapp/WEB-INF/pages/common/login.jsp | 9 java/code/webapp/WEB-INF/pages/common/relogin.jsp | 7 java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp | 27 - java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/second.jsp | 4 java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/third.jsp | 4 java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp | 206 +++++----- java/code/webapp/WEB-INF/pages/systems/customkey/createkey.jsp | 86 +--- java/code/webapp/WEB-INF/pages/systems/customkey/deletekey.jsp | 56 -- java/code/webapp/WEB-INF/pages/systems/customkey/listcustomkeys.jsp | 27 - java/code/webapp/WEB-INF/pages/systems/customkey/updatekey.jsp | 18 java/code/webapp/WEB-INF/pages/systems/system-remote-command.jsp | 2 java/conf/rhn_java.conf | 4 web/html/javascript/spacewalk-essentials.js | 11 web/html/javascript/spacewalk-login.js | 8 33 files changed, 452 insertions(+), 466 deletions(-)
New commits: commit 9e3684c1e88c592f9c805eaa3d885a03faa07078 Author: Silvio Moioli smoioli@suse.de Date: Tue Dec 3 12:41:51 2013 +0100
Tag test checkstyle fixes
diff --git a/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java b/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java index 093a667..fb9d3ed 100644 --- a/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java +++ b/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java @@ -43,8 +43,8 @@ public class RendererTest extends RhnBaseTestCase { expectations.put("preNavLevel", "<ul class="nav nav-tabs">"); expectations.put("preNavNode", ""); - expectations.put("navNodeActive", - "<li class="active"><a href="http://rhn.redhat.com%5C%22%3Ename</a></li>\n"); + expectations.put("navNodeActive", "<li class="active">" + + "<a href="http://rhn.redhat.com%5C%22%3Ename</a></li>\n"); expectations.put("navNodeInactive", "<li><a href="http://rhn.redhat.com%5C%22%3Ename</a></li>\n"); expectations.put("postNavNode", ""); @@ -122,10 +122,11 @@ public class RendererTest extends RhnBaseTestCase {
public void testTopnavTrue() { Map expectations = new HashMap(); - expectations.put("preNavLevel", "<ul class="nav navbar-nav collapse main-menu-hor">"); + expectations.put("preNavLevel", "<ul class="nav navbar-nav " + + "collapse main-menu-hor">"); expectations.put("preNavNode", ""); - expectations.put("navNodeActive", - "<li class="active"><a href="http://rhn.redhat.com%5C%22%3Ename</a></li>\n"); + expectations.put("navNodeActive", "<li class="active">" + + "<a href="http://rhn.redhat.com%5C%22%3Ename</a></li>\n"); expectations.put("navNodeInactive", "<li><a href="http://rhn.redhat.com%5C%22%3Ename</a></li>\n"); expectations.put("postNavNode", ""); diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/AddressTagTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/AddressTagTest.java index ac98784..6e5a1b5 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/AddressTagTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/AddressTagTest.java @@ -88,11 +88,12 @@ public class AddressTagTest extends RhnBaseTestCase { }
private String getPopulatedReturnValue(HttpServletRequest req, Long uid) { - return "<div class="jumbotron"><div class="container"><h1>Mailing Address</h1>" + - "<p>444 Castro<br/>#1<br/>Mountain View, CA 94043</p>" + - "<p>Phone: 650-555-1212<br/>Fax: 650-555-1212</p><p>" + - "<a class="btn btn-success btn-lg"href="/EditAddress.do?type=M&uid=" + uid + - "">Edit this address</a></p></div></div>"; + return "<div class="jumbotron"><div class="container">" + + "<h1>Mailing Address</h1>" + + "<p>444 Castro<br/>#1<br/>Mountain View, CA 94043</p>" + + "<p>Phone: 650-555-1212<br/>Fax: 650-555-1212</p><p>" + + "<a class="btn btn-success btn-lg"href="/EditAddress.do?" + + "type=M&uid=" + uid + "">Edit this address</a></p></div></div>"; }
private String getEmptyReturnValue(HttpServletRequest req, Long uid) { diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCloneTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCloneTest.java index 0709a70..08b816d 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCloneTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCloneTest.java @@ -38,8 +38,8 @@ public class ToolbarTagCloneTest extends BaseTestToolbarTag { // setup mock objects String output = "<div class="spacewalk-toolbar-h1">" + "<div class="spacewalk-toolbar"><a href="Clone-url">" + - "<i class="fa fa-files-o" title="clone kickstart"></i>clone kickstart</a></div>" + - "<h1></h1></div>"; + "<i class="fa fa-files-o" title="clone kickstart"></i>" + + "clone kickstart</a></div><h1></h1></div>";
setupCloneTag("h1", "Clone-url", "", "kickstart"); @@ -60,7 +60,8 @@ public class ToolbarTagCloneTest extends BaseTestToolbarTag { public void testCreateAclMultipleMixinsMultipleAcls() throws Exception { String output = "<div class="spacewalk-toolbar-h1">" + "<div class="spacewalk-toolbar"><a href="Clone-url">" + - "<i class="fa fa-files-o" title="clone kickstart"></i>clone kickstart</a></div><h1></h1></div>"; + "<i class="fa fa-files-o" title="clone kickstart"></i>" + + "clone kickstart</a></div><h1></h1></div>";
setupCloneTag("h1", "Clone-url", "first_true_acl(); second_true_acl(); is_foo(foo)", diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCreationTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCreationTest.java index ae96661..e913903 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCreationTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCreationTest.java @@ -59,7 +59,7 @@ public class ToolbarTagCreationTest extends BaseTestToolbarTag { public void testCreateAclMultipleMixinsMultipleAcls() throws Exception { String output = "<div class="spacewalk-toolbar-h1">" + "<div class="spacewalk-toolbar"><a href="creation-url">" + - "<i class="fa fa-plus" title="create new user">"+ + "<i class="fa fa-plus" title="create new user">" + "</i>create new user</a></div><h1></h1></div>";
setupCreationTag("h1", "creation-url", diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagDeletionTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagDeletionTest.java index 84b37dd..3a6e488 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagDeletionTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagDeletionTest.java @@ -38,9 +38,9 @@ public class ToolbarTagDeletionTest extends BaseTestToolbarTag { try { // setup mock objects String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"><a href="deletion-url">" + - "<i class="fa fa-trash-o" title="delete user"></i>delete user</a></div><h1></h1></div>"; - + "<div class="spacewalk-toolbar"><a href="deletion-url">" + + "<i class="fa fa-trash-o" title="delete user">" + + "</i>delete user</a></div><h1></h1></div>";
setupDeletionTag("h1", "deletion-url", "", "user");
@@ -69,8 +69,9 @@ public class ToolbarTagDeletionTest extends BaseTestToolbarTag { public void testCreateAclMultipleMixinsMultipleAcls() { try { String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"><a href="deletion-url">" + - "<i class="fa fa-trash-o" title="delete user"></i>delete user</a></div><h1></h1></div>"; + "<div class="spacewalk-toolbar"><a href="deletion-url">" + + "<i class="fa fa-trash-o" title="delete user"></i>delete user</a>" + + "</div><h1></h1></div>";
setupDeletionTag("h1", "deletion-url", "first_true_acl(); second_true_acl(); is_foo(foo)", @@ -92,8 +93,9 @@ public class ToolbarTagDeletionTest extends BaseTestToolbarTag { public void testCreateAclMultipleAclsSingleMixin() { try { String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"><a href="deletion-url">" + - "<i class="fa fa-trash-o" title="delete user"></i>delete user</a></div><h1></h1></div>"; + "<div class="spacewalk-toolbar"><a href="deletion-url">" + + "<i class="fa fa-trash-o" title="delete user"></i>delete user</a>" + + "</div><h1></h1></div>";
setupDeletionTag("h1", "deletion-url", "first_true_acl(); second_true_acl()", "user"); @@ -137,8 +139,9 @@ public class ToolbarTagDeletionTest extends BaseTestToolbarTag { try { // setup mock objects String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"><a href="deletion-url">" + - "<i class="fa fa-trash-o" title="delete user"></i>delete user</a></div><h1></h1></div>"; + "<div class="spacewalk-toolbar"><a href="deletion-url">" + + "<i class="fa fa-trash-o" title="delete user"></i>delete user</a>" + + "</div><h1></h1></div>";
setupDeletionTag("h1", "deletion-url", "true_test()", "user");
commit e6889c281db7a56d3c88f69e06b6c3a3cadb2858 Author: Maximilian Meister mmeister@suse.de Date: Mon Dec 2 20:55:13 2013 +0100
Some indentation corrections as requested
diff --git a/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java b/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java index 84e6443..093a667 100644 --- a/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java +++ b/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java @@ -167,8 +167,8 @@ public class RendererTest extends RhnBaseTestCase { tr.navNodeInactive(buf, node2, null, null, 4);
String expectation = "<li class="active">" + - "<a href="/newlogin/index.pxt">Sign In</a></li>\n" + - "<li><a href="/newlogin/index.pxt">About</a></li>\n"; + "<a href="/newlogin/index.pxt">Sign In</a></li>\n" + + "<li><a href="/newlogin/index.pxt">About</a></li>\n"; assertEquals(expectation, buf.toString());
// test the case where inactive node runs first diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavDialogMenuTagTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavDialogMenuTagTest.java index c30562e..7d6ff74 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavDialogMenuTagTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavDialogMenuTagTest.java @@ -120,10 +120,10 @@ public class NavDialogMenuTagTest extends RhnBaseTestCase {
private String getReturnValue() { return "<div class="spacewalk-content-nav"><ul class="nav nav-tabs">" + - "<li class="active"><a href="/index.pxt">Sign In</a></li>\n" + - "<li><a href="/help/about.pxt">About</a></li>\n" + - "</ul>\n" + - "</div>\n"; + "<li class="active"><a href="/index.pxt">Sign In</a></li>\n" + + "<li><a href="/help/about.pxt">About</a></li>\n" + + "</ul>\n" + + "</div>\n"; }
public void testSetMaxdepth() { diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavMenuTagTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavMenuTagTest.java index 5db7e45..1ad1234 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavMenuTagTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavMenuTagTest.java @@ -137,10 +137,10 @@ public class NavMenuTagTest extends RhnBaseTestCase { }
private String getReturnValue() { - return "<ul class="nav navbar-nav collapse main-menu-hor">" + - "<li class="active"><a href="/index.pxt">Sign In</a></li>\n" + - "<li><a href="/help/about.pxt">About</a></li>\n" + - "</ul>"; + return "<ul class="nav navbar-nav collapse main-menu-hor">" + + "<li class="active"><a href="/index.pxt">Sign In</a></li>\n" + + "<li><a href="/help/about.pxt">About</a></li>\n" + + "</ul>"; }
public void testSetMaxdepth() { diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCloneTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCloneTest.java index 46985c6..0709a70 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCloneTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCloneTest.java @@ -37,9 +37,9 @@ public class ToolbarTagCloneTest extends BaseTestToolbarTag { public void testCloneNoAcl() throws Exception { // setup mock objects String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"><a href="Clone-url">" + - "<i class="fa fa-files-o" title="clone kickstart"></i>clone kickstart</a></div>" + - "<h1></h1></div>"; + "<div class="spacewalk-toolbar"><a href="Clone-url">" + + "<i class="fa fa-files-o" title="clone kickstart"></i>clone kickstart</a></div>" + + "<h1></h1></div>";
setupCloneTag("h1", "Clone-url", "", "kickstart"); @@ -50,7 +50,7 @@ public class ToolbarTagCloneTest extends BaseTestToolbarTag { public void testCloneWithMissingType() throws Exception { // setup mock objects String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"></div><h1></h1></div>"; + "<div class="spacewalk-toolbar"></div><h1></h1></div>";
setupCloneTag("h1", "Clone-url", "true_test()", "");
@@ -59,8 +59,8 @@ public class ToolbarTagCloneTest extends BaseTestToolbarTag {
public void testCreateAclMultipleMixinsMultipleAcls() throws Exception { String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"><a href="Clone-url">" + - "<i class="fa fa-files-o" title="clone kickstart"></i>clone kickstart</a></div><h1></h1></div>"; + "<div class="spacewalk-toolbar"><a href="Clone-url">" + + "<i class="fa fa-files-o" title="clone kickstart"></i>clone kickstart</a></div><h1></h1></div>";
setupCloneTag("h1", "Clone-url", "first_true_acl(); second_true_acl(); is_foo(foo)", @@ -74,8 +74,9 @@ public class ToolbarTagCloneTest extends BaseTestToolbarTag {
public void testCreateAclMultipleAclsSingleMixin() throws Exception { String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"><a href="Clone-url">" + - "<i class="fa fa-files-o" title="clone kickstart"></i>clone kickstart</a></div><h1></h1></div>"; + "<div class="spacewalk-toolbar"><a href="Clone-url">" + + "<i class="fa fa-files-o" title="clone kickstart">" + + "</i>clone kickstart</a></div><h1></h1></div>";
setupCloneTag("h1", "Clone-url", "first_true_acl(); second_true_acl()", "kickstart"); @@ -109,8 +110,9 @@ public class ToolbarTagCloneTest extends BaseTestToolbarTag { public void testCloneAcl() throws Exception { // setup mock objects String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"><a href="Clone-url">" + - "<i class="fa fa-files-o" title="clone kickstart"></i>clone kickstart</a></div><h1></h1></div>"; + "<div class="spacewalk-toolbar"><a href="Clone-url">" + + "<i class="fa fa-files-o" title="clone kickstart"></i>" + + "clone kickstart</a></div><h1></h1></div>";
setupCloneTag("h1", "Clone-url", "true_test()", "kickstart");
@@ -120,10 +122,11 @@ public class ToolbarTagCloneTest extends BaseTestToolbarTag { public void testCloneWithMissingUrl() throws Exception { // setup mock objects String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"></div><h1></h1></div>"; + "<div class="spacewalk-toolbar"></div><h1></h1></div>";
setupCloneTag("h1", null, "true_test()", "kickstart");
verifyTag(output); } } + diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCreationTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCreationTest.java index e855a02..ae96661 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCreationTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCreationTest.java @@ -37,9 +37,9 @@ public class ToolbarTagCreationTest extends BaseTestToolbarTag { public void testCreationNoAcl() throws Exception { // setup mock objects String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"><a href="creation-url">" + - "<i class="fa fa-plus" title="create new user"></i>" + - "create new user</a></div><h1></h1></div>"; + "<div class="spacewalk-toolbar"><a href="creation-url">" + + "<i class="fa fa-plus" title="create new user"></i>" + + "create new user</a></div><h1></h1></div>";
setupCreationTag("h1", "creation-url", "", "user");
@@ -49,18 +49,18 @@ public class ToolbarTagCreationTest extends BaseTestToolbarTag { public void testCreationWithMissingType() throws Exception { // setup mock objects String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"></div><h1></h1></div>"; - - setupCreationTag("h1", "creation-url", "true_test()", ""); + "<div class="spacewalk-toolbar"></div><h1></h1></div>"; + + setupCreationTag("h1", "creation-url", "true_test()", "");
verifyTag(output); }
public void testCreateAclMultipleMixinsMultipleAcls() throws Exception { String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"><a href="creation-url">" + - "<i class="fa fa-plus" title="create new user">"+ - "</i>create new user</a></div><h1></h1></div>"; + "<div class="spacewalk-toolbar"><a href="creation-url">" + + "<i class="fa fa-plus" title="create new user">"+ + "</i>create new user</a></div><h1></h1></div>";
setupCreationTag("h1", "creation-url", "first_true_acl(); second_true_acl(); is_foo(foo)", @@ -74,9 +74,9 @@ public class ToolbarTagCreationTest extends BaseTestToolbarTag {
public void testCreateAclMultipleAclsSingleMixin() throws Exception { String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"><a href="creation-url">" + - "<i class="fa fa-plus" title="create new user"></i>" + - "create new user</a></div><h1></h1></div>"; + "<div class="spacewalk-toolbar"><a href="creation-url">" + + "<i class="fa fa-plus" title="create new user"></i>" + + "create new user</a></div><h1></h1></div>";
setupCreationTag("h1", "creation-url", "first_true_acl(); second_true_acl()", "user"); @@ -110,9 +110,9 @@ public class ToolbarTagCreationTest extends BaseTestToolbarTag { public void testCreationAcl() throws Exception { // setup mock objects String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"><a href="creation-url">" + - "<i class="fa fa-plus" title="create new user"></i>" + - "create new user</a></div><h1></h1></div>"; + "<div class="spacewalk-toolbar"><a href="creation-url">" + + "<i class="fa fa-plus" title="create new user"></i>" + + "create new user</a></div><h1></h1></div>";
setupCreationTag("h1", "creation-url", "true_test()", "user");
@@ -122,7 +122,7 @@ public class ToolbarTagCreationTest extends BaseTestToolbarTag { public void testCreationWithMissingUrl() throws Exception { // setup mock objects String output = "<div class="spacewalk-toolbar-h1">" + - "<div class="spacewalk-toolbar"></div><h1></h1></div>"; + "<div class="spacewalk-toolbar"></div><h1></h1></div>";
setupCreationTag("h1", null, "true_test()", "user");
commit 692993f0148e51d72c4e6b00b5f383482bbe5724 Author: Maximilian Meister mmeister@suse.de Date: Mon Dec 2 16:28:17 2013 +0100
Fixing expectation
diff --git a/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java b/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java index 2a7f7ac..84e6443 100644 --- a/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java +++ b/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java @@ -122,7 +122,7 @@ public class RendererTest extends RhnBaseTestCase {
public void testTopnavTrue() { Map expectations = new HashMap(); - expectations.put("preNavLevel", "<ul class="nav navbar-nav">"); + expectations.put("preNavLevel", "<ul class="nav navbar-nav collapse main-menu-hor">"); expectations.put("preNavNode", ""); expectations.put("navNodeActive", "<li class="active"><a href="http://rhn.redhat.com%5C%22%3Ename</a></li>\n");
commit 86d9c5a40653f6edc6f876156465b3f0e29dc3f3 Author: Maximilian Meister mmeister@suse.de Date: Thu Nov 28 15:23:58 2013 +0100
Fixing a few JUnit Frontend Tests due to bootstrap UI changes
diff --git a/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java b/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java index 1c0fc74..2a7f7ac 100644 --- a/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java +++ b/java/code/src/com/redhat/rhn/frontend/nav/test/RendererTest.java @@ -41,12 +41,10 @@ public class RendererTest extends RhnBaseTestCase { public void testDialognavTrue() { Map expectations = new HashMap(); expectations.put("preNavLevel", - "<ul class="content-nav-rowthree">"); + "<ul class="nav nav-tabs">"); expectations.put("preNavNode", ""); expectations.put("navNodeActive", - "<li class="content-nav-selected"><a " + - "class="content-nav-selected-link" " + - "href="http://rhn.redhat.com%5C%22%3Ename</a></li>\n"); + "<li class="active"><a href="http://rhn.redhat.com%5C%22%3Ename</a></li>\n"); expectations.put("navNodeInactive", "<li><a href="http://rhn.redhat.com%5C%22%3Ename</a></li>\n"); expectations.put("postNavNode", ""); @@ -57,15 +55,13 @@ public class RendererTest extends RhnBaseTestCase { rendererTest(new DialognavRenderer(), new TrueRenderGuard(), expectations, 4);
// test depth 1 - expectations.put("preNavLevel", "<div class="contentnav-row2">" + - "<div class="top"></div><div class="bottom">" + - "<ul class="content-nav-rowtwo">"); - expectations.put("postNavLevel", "</ul>\n</div></div>"); + expectations.put("preNavLevel", "<ul class="nav nav-tabs">"); + expectations.put("postNavLevel", "</ul>\n"); rendererTest(new DialognavRenderer(), new TrueRenderGuard(), expectations, 1);
// test depth 0 expectations.put("preNavLevel", - "<ul class="content-nav-rowone">"); + "<ul class="nav nav-tabs">"); expectations.put("postNavLevel", "</ul>\n"); rendererTest(new DialognavRenderer(), new TrueRenderGuard(), expectations, 0); } @@ -126,12 +122,10 @@ public class RendererTest extends RhnBaseTestCase {
public void testTopnavTrue() { Map expectations = new HashMap(); - expectations.put("preNavLevel", "<ul id="mainNav">"); + expectations.put("preNavLevel", "<ul class="nav navbar-nav">"); expectations.put("preNavNode", ""); expectations.put("navNodeActive", - "<li id="mainFirst-active">" + - "<a href="http://rhn.redhat.com%5C" class=" + - ""mainFirstLink">name</a></li>\n"); + "<li class="active"><a href="http://rhn.redhat.com%5C%22%3Ename</a></li>\n"); expectations.put("navNodeInactive", "<li><a href="http://rhn.redhat.com%5C%22%3Ename</a></li>\n"); expectations.put("postNavNode", ""); @@ -172,10 +166,9 @@ public class RendererTest extends RhnBaseTestCase { tr.navNodeActive(buf, node1, null, null, 4); tr.navNodeInactive(buf, node2, null, null, 4);
- String expectation = "<li id="mainFirst-active"><a href="" + - "/newlogin/index.pxt" class="mainFirstLink">" + - "Sign In</a></li>\n<li id="mainLast"><a href="" + - "/newlogin/index.pxt" class="mainLastLink">About</a></li>\n"; + String expectation = "<li class="active">" + + "<a href="/newlogin/index.pxt">Sign In</a></li>\n" + + "<li><a href="/newlogin/index.pxt">About</a></li>\n"; assertEquals(expectation, buf.toString());
// test the case where inactive node runs first @@ -183,12 +176,8 @@ public class RendererTest extends RhnBaseTestCase { tr.navNodeInactive(buf, node1, null, null, 4); tr.navNodeActive(buf, node2, null, null, 4);
- String expectation2 = "<li id="mainFirst">" + - "<a href="/newlogin/index.pxt" class="mainFirstLink">Sign In</a>" + - "</li>\n" + - "<li id="mainLast-active"><a href="/newlogin/index.pxt" " + - "class="mainLastLink">About</a>" + - "</li>\n"; + String expectation2 = "<li><a href="/newlogin/index.pxt">Sign In</a></li>\n" + + "<li class="active"><a href="/newlogin/index.pxt">About</a></li>\n"; assertEquals(expectation2, buf.toString()); }
@@ -198,12 +187,12 @@ public class RendererTest extends RhnBaseTestCase {
public void testSidenavTrue() { Map expectations = new HashMap(); - expectations.put("preNavLevel", "<ul>"); + expectations.put("preNavLevel", "<ul class="nav nav-pills nav-stacked">"); expectations.put("preNavNode", ""); - expectations.put("navNodeActive", "<li class="sidenav-selected navparent">" + + expectations.put("navNodeActive", "<li class="active">" + "<a href="http://rhn.redhat.com%5C%22%3Ename</a></li>\n"); expectations.put("navNodeInactive", - "<li class="navparent"><a href="http://rhn.redhat.com%5C%22%3E" + + "<li><a href="http://rhn.redhat.com%5C%22%3E" + "name</a></li>\n"); expectations.put("postNavNode", ""); expectations.put("postNavLevel", "</ul>\n"); diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/AddressTagTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/AddressTagTest.java index ad94373..ac98784 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/AddressTagTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/AddressTagTest.java @@ -88,16 +88,19 @@ public class AddressTagTest extends RhnBaseTestCase { }
private String getPopulatedReturnValue(HttpServletRequest req, Long uid) { - return "<tr><th>Mailing Address</th><td><div>444 Castro<br/>" + - "#1<br/>Mountain View, CA 94043</div><div>Phone: 650-555-1212</div><div>Fax: " + - "650-555-1212</div><div><a href="/EditAddress.do?type=M&" + - ";uid=" + uid + "">Edit this address</a></div></td></tr>"; + return "<div class="jumbotron"><div class="container"><h1>Mailing Address</h1>" + + "<p>444 Castro<br/>#1<br/>Mountain View, CA 94043</p>" + + "<p>Phone: 650-555-1212<br/>Fax: 650-555-1212</p><p>" + + "<a class="btn btn-success btn-lg"href="/EditAddress.do?type=M&uid=" + uid + + "">Edit this address</a></p></div></div>"; }
private String getEmptyReturnValue(HttpServletRequest req, Long uid) { - return "<tr><th>Mailing Address</th><td><div><strong>Address " + - "not filled out</div></strong><a href="/EditAddress.do?" + - "type=M&uid=" + uid + "">Add this address</a></td></tr>"; + return "<div class="jumbotron"><div class="container">" + + "<h1>Mailing Address</h1><div class="alert alert-info">" + + "Address not filled out</div><p><a class="btn btn-success btn-lg" " + + "href="/EditAddress.do?type=M&uid=" + uid + + "">Add this address</a></p></div></div>"; }
} diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavDialogMenuTagTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavDialogMenuTagTest.java index bc0f0e3..c30562e 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavDialogMenuTagTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavDialogMenuTagTest.java @@ -119,12 +119,11 @@ public class NavDialogMenuTagTest extends RhnBaseTestCase { }
private String getReturnValue() { - return "<div class="content-nav"><ul class="content-nav-rowone">" + - "<li class="content-nav-selected"><a class="" + - "content-nav-selected-link" href="/index.pxt">Sign In</a></li>\n" + - "<li><a href="/help/about.pxt">About</a></li>\n" + - "</ul>\n" + - "</div>\n"; + return "<div class="spacewalk-content-nav"><ul class="nav nav-tabs">" + + "<li class="active"><a href="/index.pxt">Sign In</a></li>\n" + + "<li><a href="/help/about.pxt">About</a></li>\n" + + "</ul>\n" + + "</div>\n"; }
public void testSetMaxdepth() { diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavMenuTagTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavMenuTagTest.java index 7720676..5db7e45 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavMenuTagTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/NavMenuTagTest.java @@ -137,10 +137,10 @@ public class NavMenuTagTest extends RhnBaseTestCase { }
private String getReturnValue() { - return "<ul id="mainNav"><li id="mainFirst-active"><a href="/index.pxt" " + - "class="mainFirstLink">Sign In</a>" + - "</li>\n<li id="mainLast"><a href="/help/about.pxt" " + - "class="mainLastLink">About</a></li>\n</ul>"; + return "<ul class="nav navbar-nav collapse main-menu-hor">" + + "<li class="active"><a href="/index.pxt">Sign In</a></li>\n" + + "<li><a href="/help/about.pxt">About</a></li>\n" + + "</ul>"; }
public void testSetMaxdepth() { diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagBasicTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagBasicTest.java index be09384..5405901 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagBasicTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagBasicTest.java @@ -27,13 +27,16 @@ public class ToolbarTagBasicTest extends BaseTestToolbarTag {
try { // setup mock objects - String output = "<div class="toolbar-h1">" + - "<div class="toolbar"></div>" + + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"></div>" + + "<h1>" + "<img src="/img/rhn-icon-preferences.gif" alt="Home Icon" />" + "<a href="/help/provisioning/" + - "s1-sm-your-rhn.html#S2-SM-YOUR-RHN-PREFS" target="_new" " + - "class="help-title">" + - "<img src="/img/rhn-icon-help.gif" alt="Help Icon" /></a></div>"; + "s1-sm-your-rhn.html#S2-SM-YOUR-RHN-PREFS" target="_new">" + + "<span class="fa-stack">" + + "<i class="fa fa-circle fa-stack-1x"></i>" + + "<i class="fa fa-question fa-stack-1x fa-inverse"></i>" + + "</span></a></h1></div>"; out.setExpectedData(output);
tt.setBase("h1"); @@ -53,8 +56,8 @@ public class ToolbarTagBasicTest extends BaseTestToolbarTag {
public void testNoImgUrl() { try { - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"></div></div>"; + String output = "<div class="spacewalk-toolbar-h1"><div class="" + + "spacewalk-toolbar"></div><h1></h1></div>"; out.setExpectedData(output);
tt.setBase("h1"); @@ -72,9 +75,9 @@ public class ToolbarTagBasicTest extends BaseTestToolbarTag {
public void testImgUrl() { try { - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"></div><img src="" + - "/img/rhn-icon-preferences.gif" /></div>"; + String output = "<div class="spacewalk-toolbar-h1"><div class="" + + "spacewalk-toolbar"></div><h1><img src="" + + "/img/rhn-icon-preferences.gif" /></h1></div>"; out.setExpectedData(output);
tt.setBase("h1"); @@ -108,9 +111,9 @@ public class ToolbarTagBasicTest extends BaseTestToolbarTag { try { // make sure we don't generate a messed up help url if // none was specified - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"></div><img src="" + - "/img/rhn-icon-preferences.gif" /></div>"; + String output = "<div class="spacewalk-toolbar-h1"><div class="" + + "spacewalk-toolbar"></div><h1><img src="" + + "/img/rhn-icon-preferences.gif" /></h1></div>";
out.setExpectedData(output);
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCloneTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCloneTest.java index f610d05..46985c6 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCloneTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCloneTest.java @@ -36,11 +36,10 @@ public class ToolbarTagCloneTest extends BaseTestToolbarTag {
public void testCloneNoAcl() throws Exception { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="Clone-url">" + - "<img src="/img/action-clone.gif" alt="clone kickstart"" + - " title="clone kickstart" />clone kickstart</a></span>" + - "</div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="Clone-url">" + + "<i class="fa fa-files-o" title="clone kickstart"></i>clone kickstart</a></div>" + + "<h1></h1></div>";
setupCloneTag("h1", "Clone-url", "", "kickstart"); @@ -50,8 +49,8 @@ public class ToolbarTagCloneTest extends BaseTestToolbarTag {
public void testCloneWithMissingType() throws Exception { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"></div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"></div><h1></h1></div>";
setupCloneTag("h1", "Clone-url", "true_test()", "");
@@ -59,11 +58,9 @@ public class ToolbarTagCloneTest extends BaseTestToolbarTag { }
public void testCreateAclMultipleMixinsMultipleAcls() throws Exception { - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="Clone-url">" + - "<img src="/img/action-clone.gif" alt="clone kickstart"" + - " title="clone kickstart" />clone kickstart</a></span>" + - "</div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="Clone-url">" + + "<i class="fa fa-files-o" title="clone kickstart"></i>clone kickstart</a></div><h1></h1></div>";
setupCloneTag("h1", "Clone-url", "first_true_acl(); second_true_acl(); is_foo(foo)", @@ -76,11 +73,9 @@ public class ToolbarTagCloneTest extends BaseTestToolbarTag { }
public void testCreateAclMultipleAclsSingleMixin() throws Exception { - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="Clone-url">" + - "<img src="/img/action-clone.gif" alt="clone kickstart"" + - " title="clone kickstart" />clone kickstart</a></span>" + - "</div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="Clone-url">" + + "<i class="fa fa-files-o" title="clone kickstart"></i>clone kickstart</a></div><h1></h1></div>";
setupCloneTag("h1", "Clone-url", "first_true_acl(); second_true_acl()", "kickstart"); @@ -113,11 +108,9 @@ public class ToolbarTagCloneTest extends BaseTestToolbarTag {
public void testCloneAcl() throws Exception { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="Clone-url">" + - "<img src="/img/action-clone.gif" alt="clone kickstart"" + - " title="clone kickstart" />clone kickstart</a></span>" + - "</div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="Clone-url">" + + "<i class="fa fa-files-o" title="clone kickstart"></i>clone kickstart</a></div><h1></h1></div>";
setupCloneTag("h1", "Clone-url", "true_test()", "kickstart");
@@ -126,8 +119,8 @@ public class ToolbarTagCloneTest extends BaseTestToolbarTag {
public void testCloneWithMissingUrl() throws Exception { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"></div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"></div><h1></h1></div>";
setupCloneTag("h1", null, "true_test()", "kickstart");
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCreationTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCreationTest.java index de1b532..e855a02 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCreationTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagCreationTest.java @@ -36,12 +36,10 @@ public class ToolbarTagCreationTest extends BaseTestToolbarTag {
public void testCreationNoAcl() throws Exception { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="creation-url">" + - "<img src="/img/action-add.gif" alt="create new user"" + - " title="create new user" />create new user</a></span>" + - "</div></div>"; - + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="creation-url">" + + "<i class="fa fa-plus" title="create new user"></i>" + + "create new user</a></div><h1></h1></div>";
setupCreationTag("h1", "creation-url", "", "user");
@@ -50,20 +48,19 @@ public class ToolbarTagCreationTest extends BaseTestToolbarTag {
public void testCreationWithMissingType() throws Exception { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"></div></div>"; - - setupCreationTag("h1", "creation-url", "true_test()", ""); + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"></div><h1></h1></div>"; + + setupCreationTag("h1", "creation-url", "true_test()", "");
verifyTag(output); }
public void testCreateAclMultipleMixinsMultipleAcls() throws Exception { - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="creation-url">" + - "<img src="/img/action-add.gif" alt="create new user"" + - " title="create new user" />create new user</a></span>" + - "</div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="creation-url">" + + "<i class="fa fa-plus" title="create new user">"+ + "</i>create new user</a></div><h1></h1></div>";
setupCreationTag("h1", "creation-url", "first_true_acl(); second_true_acl(); is_foo(foo)", @@ -76,11 +73,10 @@ public class ToolbarTagCreationTest extends BaseTestToolbarTag { }
public void testCreateAclMultipleAclsSingleMixin() throws Exception { - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="creation-url">" + - "<img src="/img/action-add.gif" alt="create new user"" + - " title="create new user" />create new user</a></span>" + - "</div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="creation-url">" + + "<i class="fa fa-plus" title="create new user"></i>" + + "create new user</a></div><h1></h1></div>";
setupCreationTag("h1", "creation-url", "first_true_acl(); second_true_acl()", "user"); @@ -113,11 +109,10 @@ public class ToolbarTagCreationTest extends BaseTestToolbarTag {
public void testCreationAcl() throws Exception { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="creation-url">" + - "<img src="/img/action-add.gif" alt="create new user"" + - " title="create new user" />create new user</a></span>" + - "</div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="creation-url">" + + "<i class="fa fa-plus" title="create new user"></i>" + + "create new user</a></div><h1></h1></div>";
setupCreationTag("h1", "creation-url", "true_test()", "user");
@@ -126,8 +121,8 @@ public class ToolbarTagCreationTest extends BaseTestToolbarTag {
public void testCreationWithMissingUrl() throws Exception { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"></div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"></div><h1></h1></div>";
setupCreationTag("h1", null, "true_test()", "user");
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagDeletionTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagDeletionTest.java index c5cea64..84b37dd 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagDeletionTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagDeletionTest.java @@ -37,11 +37,9 @@ public class ToolbarTagDeletionTest extends BaseTestToolbarTag { public void testDeletionNoAcl() { try { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="deletion-url">" + - "<i class="icon-trash"" + - " title="delete user" ></i>delete user</a></span>" + - "</div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="deletion-url">" + + "<i class="fa fa-trash-o" title="delete user"></i>delete user</a></div><h1></h1></div>";
setupDeletionTag("h1", "deletion-url", "", "user"); @@ -56,8 +54,8 @@ public class ToolbarTagDeletionTest extends BaseTestToolbarTag { public void testDeletionWithMissingType() { try { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"></div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"></div><h1></h1></div>";
setupDeletionTag("h1", "deletion-url", "true_test()", "");
@@ -70,11 +68,9 @@ public class ToolbarTagDeletionTest extends BaseTestToolbarTag {
public void testCreateAclMultipleMixinsMultipleAcls() { try { - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="deletion-url">" + - "<i class="icon-trash"" + - " title="delete user" ></i>delete user</a></span>" + - "</div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="deletion-url">" + + "<i class="fa fa-trash-o" title="delete user"></i>delete user</a></div><h1></h1></div>";
setupDeletionTag("h1", "deletion-url", "first_true_acl(); second_true_acl(); is_foo(foo)", @@ -95,11 +91,9 @@ public class ToolbarTagDeletionTest extends BaseTestToolbarTag {
public void testCreateAclMultipleAclsSingleMixin() { try { - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="deletion-url">" + - "<i class="icon-trash"" + - " title="delete user" ></i>delete user</a></span>" + - "</div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="deletion-url">" + + "<i class="fa fa-trash-o" title="delete user"></i>delete user</a></div><h1></h1></div>";
setupDeletionTag("h1", "deletion-url", "first_true_acl(); second_true_acl()", "user"); @@ -142,11 +136,9 @@ public class ToolbarTagDeletionTest extends BaseTestToolbarTag {
try { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="deletion-url">" + - "<i class="icon-trash"" + - " title="delete user" ></i>delete user</a></span>" + - "</div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="deletion-url">" + + "<i class="fa fa-trash-o" title="delete user"></i>delete user</a></div><h1></h1></div>";
setupDeletionTag("h1", "deletion-url", "true_test()", "user");
@@ -160,8 +152,8 @@ public class ToolbarTagDeletionTest extends BaseTestToolbarTag { public void testDeletionWithMissingUrl() { try { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"></div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"></div><h1></h1></div>";
setupDeletionTag("h1", null, "true_test()", "user");
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagMiscTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagMiscTest.java index ec078a0..44c6db4 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagMiscTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/ToolbarTagMiscTest.java @@ -40,10 +40,10 @@ public class ToolbarTagMiscTest extends BaseTestToolbarTag { public void testMiscNoAcl() { try { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="misc-url">" + - "<img src="/img/foo.gif" alt="ignore me" title="ignore me" />" + - "ignore me</a></span></div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="misc-url">" + + "<img src="/img/foo.gif" alt="ignore me" title="ignore me" />" + + "ignore me</a></div><h1></h1></div>";
setupMiscTag("h1", "misc-url", "", "jsp.testMessage", "jsp.testMessage", "foo.gif"); @@ -58,8 +58,8 @@ public class ToolbarTagMiscTest extends BaseTestToolbarTag { public void testMiscWithMissingText() { try { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"></div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"></div><h1></h1></div>";
setupMiscTag("h1", "misc-url", "true_test()", "alt", "", "foo.gif"); @@ -73,10 +73,10 @@ public class ToolbarTagMiscTest extends BaseTestToolbarTag {
public void testCreateAclMultipleMixinsMultipleAcls() { try { - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="misc-url">" + - "<img src="/img/foo.gif" alt="ignore me" title="ignore me" />" + - "ignore me</a></span></div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="misc-url">" + + "<img src="/img/foo.gif" alt="ignore me" title="ignore me" />" + + "ignore me</a></div><h1></h1></div>";
setupMiscTag("h1", "misc-url", "first_true_acl(); second_true_acl(); is_foo(foo)", @@ -97,10 +97,10 @@ public class ToolbarTagMiscTest extends BaseTestToolbarTag {
public void testCreateAclMultipleAclsSingleMixin() { try { - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="misc-url">" + - "<img src="/img/foo.gif" alt="ignore me" title="ignore me" />" + - "ignore me</a></span></div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="misc-url">" + + "<img src="/img/foo.gif" alt="ignore me" title="ignore me" />" + + "ignore me</a></div><h1></h1></div>";
setupMiscTag("h1", "misc-url", "first_true_acl(); second_true_acl()", "jsp.testMessage", @@ -144,10 +144,10 @@ public class ToolbarTagMiscTest extends BaseTestToolbarTag {
try { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"><span class="toolbar"><a href="misc-url">" + - "<img src="/img/foo.gif" alt="ignore me" title="ignore me" />" + - "ignore me</a></span></div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"><a href="misc-url">" + + "<img src="/img/foo.gif" alt="ignore me" title="ignore me" />" + + "ignore me</a></div><h1></h1></div>";
setupMiscTag("h1", "misc-url", "true_test()", "jsp.testMessage", "jsp.testMessage", "foo.gif"); @@ -162,8 +162,8 @@ public class ToolbarTagMiscTest extends BaseTestToolbarTag { public void testMiscWithMissingUrl() { try { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"></div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"></div><h1></h1></div>";
setupMiscTag("h1", null, "true_test()", "alt", "text", "foo.gif"); @@ -178,8 +178,8 @@ public class ToolbarTagMiscTest extends BaseTestToolbarTag { public void testMiscWithMissingImg() { try { // setup mock objects - String output = "<div class="toolbar-h1"><div class="" + - "toolbar"></div></div>"; + String output = "<div class="spacewalk-toolbar-h1">" + + "<div class="spacewalk-toolbar"></div><h1></h1></div>";
setupMiscTag("h1", "misc-url", "true_test()", "alt", "text", null); diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/test/UnpagedListDisplayTagTest.java b/java/code/src/com/redhat/rhn/frontend/taglibs/test/UnpagedListDisplayTagTest.java index 0e87628..f7f3e04 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/test/UnpagedListDisplayTagTest.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/test/UnpagedListDisplayTagTest.java @@ -153,14 +153,20 @@ public class UnpagedListDisplayTagTest extends MockObjectTestCase { }
private static final String EXPECTED_HTML_OUT = - "<table width="100%" cellspacing="0" cellpadding="0" " + - "class="list"><thead>\n" + - "<tr></tbody></table>\n"; + "<div class="spacewalk-list"><div class="panel panel-default">" + + "<table class="table table-striped"></tbody></table>\n" + + "</div>\n" + + "</div>\n"; +
private static final String EXPECTED_HTML_OUT_WITH_TITLE = - "<table width="100%" cellspacing="0" cellpadding="0" " + - "class="list"><thead><tr><th>**Inactive " + - "Systems**</th></tr>\n<tr></tbody></table>\n"; + "<div class="spacewalk-list"><div class="panel panel-default">" + + "<div class="panel-heading"><h4 class="panel-title">**Inactive Systems**</h4>" + + "<div class="spacewalk-list-head-addons">" + + "<div class="spacewalk-list-head-addons-extra"></div>" + + "</div></div><table class="table table-striped"></tbody></table>\n" + + "</div>\n" + + "</div>\n";
private static final String EXPECTED_CSV_OUT = "**column1**,**column2**,**column3**\n" +
commit 63df5e7ca7c17f29d7e2a69644c3ffa35ca3a224 Author: Cynthia Sanchez csanchez@suse.com Date: Mon Dec 2 11:44:51 2013 +0100
fixed the class .glow-text-deleted
diff --git a/branding/css/spacewalk-mixins.less b/branding/css/spacewalk-mixins.less index 4815b19..8524dc2 100644 --- a/branding/css/spacewalk-mixins.less +++ b/branding/css/spacewalk-mixins.less @@ -34,7 +34,7 @@ text-shadow: 1px 1px 1px #fff; } .glow-text-deleted { - text-shadow: 0 transparent; + text-shadow: 0 0 0 transparent; } .shadow-text { text-shadow: 1px 1px 1px #333;
commit ec3e9388205171963dfc10bda93644dbab3583d8 Author: Cynthia Sanchez csanchez@suse.com Date: Mon Nov 11 18:22:15 2013 +0100
less: More colours defined as variables
Conflicts: branding/css/spacewalk-variables.less
diff --git a/branding/css/spacewalk-theme.less b/branding/css/spacewalk-theme.less index 4963cac..5321d44 100644 --- a/branding/css/spacewalk-theme.less +++ b/branding/css/spacewalk-theme.less @@ -351,7 +351,11 @@ aside .nav > li > a { } #sidenav { a { - color: #666; + color: @spacewalk-aside-menu-hyperlink; + .glow-text; + } + a:hover { + color: @spacewalk-aside-menu-hyperlink-hover; .glow-text; } a:before { @@ -375,6 +379,9 @@ aside .nav > li > a { -webkit-box-shadow: 0px 1px 1px #fefefe; box-shadow: 0px 1px 1px #fefefe; } + ul li:hover, ul li a:hover { + background: @spacewalk-list-menu-hover; + }
/* ul-submenues */ /* first submenu */ @@ -395,7 +402,7 @@ aside .nav > li > a { background: @spacewalk-list-first-submenu-hover; } ul>ul li:last-child { - border-bottom: 1px solid #c6c6c6; + border-bottom: 1px solid @spacewalk-list-first-submenu-last-line; } /* second submenu */ ul>ul>ul li { diff --git a/branding/css/spacewalk-variables.less b/branding/css/spacewalk-variables.less index 7dddc50..c2ad458 100644 --- a/branding/css/spacewalk-variables.less +++ b/branding/css/spacewalk-variables.less @@ -8,7 +8,17 @@ @gray-light: lighten(#000, 80%); // #999 @gray-lighter: lighten(#000, 95%); // #eee
-@spacewalk-blue: #00aad4; + +/* Colours (or img backgrounds) for Spacewalk */ +@spacewalk-blue: #00aad4; +@spacewalk-header: url('../../img/spacewalk-header-background.png') repeat-x @gray; +@spacewalk-footer: @gray-dark; +@spacewalk-aside: #eeeeee; + +// Colours for the menu in the first column on the left: +@spacewalk-aside-border: darken(@spacewalk-aside, 10%); +@spacewalk-aside-menu-hyperlink: #666; +@spacewalk-aside-menu-hyperlink-hover: #555;
@state-success-text: #7ac142; @state-info-text: #4ea1ee; @@ -21,7 +31,8 @@ @spacewalk-list-menu-hover: lighten(@spacewalk-list-menu, 2%); @spacewalk-list-first-submenu: darken(@spacewalk-list-menu, 8%); @spacewalk-list-first-submenu-active: lighten(@spacewalk-list-first-submenu, 6%); -@spacewalk-list-first-submenu-hover: lighten(@spacewalk-list-first-submenu, 2%);//#f3f3f3 +@spacewalk-list-first-submenu-hover: lighten(@spacewalk-list-first-submenu, 2%); +@spacewalk-list-first-submenu-last-line: darken(@spacewalk-list-first-submenu, 8%); @spacewalk-list-second-submenu: darken(@spacewalk-list-first-submenu, 5%); @spacewalk-list-second-submenu-active: lighten(@spacewalk-list-second-submenu, 6%); @spacewalk-list-second-submenu-hover: lighten(@spacewalk-list-second-submenu, 2%);
commit 82b5ccf777c48dfd44a5ce0db4dd7cef476879bd Author: Cynthia Sanchez csanchez@suse.com Date: Tue Nov 12 13:56:13 2013 +0100
changes for Icon legend in the theme
diff --git a/branding/css/spacewalk-theme.less b/branding/css/spacewalk-theme.less index 204afac..4963cac 100644 --- a/branding/css/spacewalk-theme.less +++ b/branding/css/spacewalk-theme.less @@ -308,8 +308,9 @@ header {
/* Icons Legend */ aside .sideleg { - background: lighten(@gray-lighter, 10%); + background: @spacewalk-icon-legend; width: 90%; + color: @spacewalk-icon-legend-text; padding: .5em 1em; border-radius: 4px; margin: 2em auto; @@ -414,7 +415,7 @@ aside .nav > li > a { background: @spacewalk-list-second-submenu-hover; } ul>ul>ul li:last-child { - border-bottom: 1px solid #c4c4c4; + border-bottom: 1px solid @spacewalk-list-second-submenu-last-line; }
} diff --git a/branding/css/spacewalk-variables.less b/branding/css/spacewalk-variables.less index 6445b31..7dddc50 100644 --- a/branding/css/spacewalk-variables.less +++ b/branding/css/spacewalk-variables.less @@ -25,6 +25,11 @@ @spacewalk-list-second-submenu: darken(@spacewalk-list-first-submenu, 5%); @spacewalk-list-second-submenu-active: lighten(@spacewalk-list-second-submenu, 6%); @spacewalk-list-second-submenu-hover: lighten(@spacewalk-list-second-submenu, 2%); +@spacewalk-list-second-submenu-last-line: darken(@spacewalk-list-second-submenu, 8%); + +//Icons legend: +@spacewalk-icon-legend: lighten(@spacewalk-aside, 10%); +@spacewalk-icon-legend-text: @text-color;
/* Roboto variable: font variable to be applied in different text elements*/ @roboto-light: 'Roboto Light', sans-serif;
commit 655b67293cc7f50818316dcc703d6f2bc939ee2b Author: Johannes Renner jrenner@suse.de Date: Fri Nov 29 15:34:37 2013 +0100
Move the formFocus() function into spacewalk-essentials.js
This makes that function available everywhere instead of on the login screen only.
diff --git a/web/html/javascript/spacewalk-essentials.js b/web/html/javascript/spacewalk-essentials.js index 88f7209..220e7b4 100644 --- a/web/html/javascript/spacewalk-essentials.js +++ b/web/html/javascript/spacewalk-essentials.js @@ -105,4 +105,13 @@ $(document).on("ready", function() { } }); }); -}); \ No newline at end of file +}); + +// Put the focus on a given form element +function formFocus(form, name) { + var focusControl = document.forms[form].elements[name]; + if (focusControl.type != "hidden" && !focusControl.disabled) { + focusControl.focus(); + } +} + diff --git a/web/html/javascript/spacewalk-login.js b/web/html/javascript/spacewalk-login.js index 9593d63..b4b9545 100644 --- a/web/html/javascript/spacewalk-login.js +++ b/web/html/javascript/spacewalk-login.js @@ -7,11 +7,3 @@ $(document).on("ready", function() { formFocus('loginForm', 'username'); });
-// Put focus on a form element -function formFocus(form, name) { - var focusControl = document.forms[form].elements[name]; - if (focusControl.type != "hidden" && !focusControl.disabled) { - focusControl.focus(); - } -} -
commit 4d7aadb42e14c5962f4247b937a2a5bf8ad2a8ce Author: Silvio Moioli smoioli@suse.de Date: Thu Nov 28 13:08:46 2013 +0100
ListDisplayTag: delete image-related POST parameters
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/ListDisplayTag.java b/java/code/src/com/redhat/rhn/frontend/taglibs/ListDisplayTag.java index f79e865..a54b0a9 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/ListDisplayTag.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/ListDisplayTag.java @@ -814,12 +814,6 @@ public class ListDisplayTag extends ListDisplayTagBase { Set result = new HashSet(); for (int i = 0; i < keys.length; i++) { result.add(keys[i]); - //add the .x & .y's becasue these are image files - //so certain browsers may add the .x & .y's - result.add(keys[i] + ".x"); - result.add(keys[i] + ".X"); - result.add(keys[i] + ".y"); - result.add(keys[i] + ".Y"); } return Collections.unmodifiableSet(result); } diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/DataSetManipulator.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/DataSetManipulator.java index a90dc26..fb005ff 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/DataSetManipulator.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/DataSetManipulator.java @@ -279,7 +279,7 @@ public class DataSetManipulator {
for (int x = 0; x < LINK_PREFIXES.length; x++) { String imgLink = "list_" + uniqueName + "_page" + - LINK_PREFIXES[x] + ".x"; + LINK_PREFIXES[x];
if (request.getParameter(imgLink) != null) { return "list_" + uniqueName + "_page" + LINK_PREFIXES[x];
commit 860a7089119ca2bed029a157bd6ad7feccafbacc Author: Duncan Mac-Vicar P dmacvicar@suse.de Date: Wed Nov 27 15:54:59 2013 +0100
/rhn/systems/customdata/DeleteCustomKey.do?cikid=1 style form
diff --git a/java/code/webapp/WEB-INF/pages/systems/customkey/deletekey.jsp b/java/code/webapp/WEB-INF/pages/systems/customkey/deletekey.jsp index 29876a6..fbfd9e1 100644 --- a/java/code/webapp/WEB-INF/pages/systems/customkey/deletekey.jsp +++ b/java/code/webapp/WEB-INF/pages/systems/customkey/deletekey.jsp @@ -12,28 +12,19 @@ </rhn:toolbar>
<form action="/rhn/systems/customdata/DeleteCustomKey.do?cikid=${cikid}" name="edit_token" method="post"> - <rhn:csrf /> - <table class="details"> - <tr> - <th><bean:message key="system.jsp.customkey.keylabel"/>:</th> - <td><input disabled="true" type="text" name="label" length="64" size="30" value="<c:out value="${label}" />"/> - </td> - </tr> - - <tr> - <th><bean:message key="system.jsp.customkey.description"/>:</th> - <td> - <textarea disabled="true" wrap="virtual" rows="6" cols="50" name="description"><c:out value="${description}" /></textarea> - </td> - </tr> - </table> + <rhn:csrf /> + <div class="form-group"> + <label for="customkey-label"><bean:message key="system.jsp.customkey.keylabel"/>:</label> + <input class="form-control" disabled="true" type="text" id="customkey-label" name="label" length="64" value="<c:out value='${label}' />"/> + </div> + <div class="form-group"> + <label for="customkey-desc"><bean:message key="system.jsp.customkey.description"/>:</label> + <textarea class="form-control" id="customkey-desc" disabled="true" wrap="virtual" rows="6" name="description"><c:out value="${description}" /></textarea> + </div>
<div class="text-right"> - <hr /> - - <input type="submit" name="DeleteKey" value="Delete Key" /> - - rhn:submitted/ + <button class="btn btn-primary" type="submit" name="DeleteKey" value="Delete Key">Delete Key</button> + rhn:submitted/ </div> </form> </body>
commit 097de63a8c56a95666fd6982fd2e6a12b8fb6ac3 Author: Duncan Mac-Vicar P dmacvicar@suse.de Date: Wed Nov 27 15:26:47 2013 +0100
/rhn/systems/customdata/DeleteCustomKey.do use rhn:toolbar instead of handwriten html
diff --git a/java/code/webapp/WEB-INF/pages/systems/customkey/deletekey.jsp b/java/code/webapp/WEB-INF/pages/systems/customkey/deletekey.jsp index 668f9c6..29876a6 100644 --- a/java/code/webapp/WEB-INF/pages/systems/customkey/deletekey.jsp +++ b/java/code/webapp/WEB-INF/pages/systems/customkey/deletekey.jsp @@ -6,26 +6,10 @@
<html:html > <body> -<br> - -<div> - - <div class="spacewalk-toolbar-h1"> - <div class="spacewalk-toolbar"></div> - <i class="fa fa-key" title=""></i> + <rhn:toolbar base="h1" icon="fa-key" + helpUrl="/rhn/help/reference/en-US/s1-sm-systems.jsp#s2-sm-system-cust-info"> <bean:message key="system.jsp.customkey.deletetitle"/> - - <a href="/rhn/help/reference/en-US/s1-sm-systems.jsp#s2-sm-system-cust-info" - target="_new" class="help-title"> - <span class="fa-stack"><i class="fa fa-circle fa-stack-1x"></i><i class="fa fa-question fa-stack-1x fa-inverse"></i></span> - </a> - </div> - - <div class="page-summary"> - <p><bean:message key="system.jsp.customkey.deletemsg"/></p> - </div> - - <hr /> + </rhn:toolbar>
<form action="/rhn/systems/customdata/DeleteCustomKey.do?cikid=${cikid}" name="edit_token" method="post"> <rhn:csrf /> @@ -52,8 +36,5 @@ rhn:submitted/ </div> </form> - - </div> - </body> </html:html>
commit 16ebad1f6cac0fe47533254157b6da4e6f67e715 Author: Duncan Mac-Vicar P dmacvicar@suse.de Date: Wed Nov 27 15:05:29 2013 +0100
/rhn/systems/customdata/UpdateCustomKey.do Use rhn:toolbar instead of custom html
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml index 12b1562..d5e9872 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml @@ -19120,6 +19120,9 @@ given channel.</source> <trans-unit id="toolbar.create.customkey"> <source>create new key</source> </trans-unit> + <trans-unit id="toolbar.delete.customkey"> + <source>delete key</source> + </trans-unit> <trans-unit id="system.jsp.customkey.createtitle"> <source>Create Custom Info Key</source> </trans-unit> diff --git a/java/code/webapp/WEB-INF/pages/systems/customkey/updatekey.jsp b/java/code/webapp/WEB-INF/pages/systems/customkey/updatekey.jsp index c509a0c..e775985 100644 --- a/java/code/webapp/WEB-INF/pages/systems/customkey/updatekey.jsp +++ b/java/code/webapp/WEB-INF/pages/systems/customkey/updatekey.jsp @@ -6,20 +6,12 @@
<html:html > <body> - <div class="spacewalk-toolbar-h1"> - <div class="spacewalk-toolbar"> - <span class="spacewalk-toolbar"> - <a href="/rhn/systems/customdata/DeleteCustomKey.do?cikid=${cikid}"> - <i class="fa fa-trash-o" title="delete key"></i>delete key</a> - </span> - </div> - <i class="fa fa-key" title=""></i> + <rhn:toolbar base="h1" icon="fa-key" + helpUrl="/rhn/help/reference/en-US/s1-sm-systems.jsp#s2-sm-system-cust-info" + deletionUrl="/rhn/systems/customdata/DeleteCustomKey.do?cikid=${cikid}" + deletionType="customkey"> <bean:message key="system.jsp.customkey.updatetitle"/> - - <a href="/rhn/help/reference/en-US/s1-sm-systems.jsp#s2-sm-system-cust-info" target="_blank" class="help-title"> - <span class="fa-stack"><i class="fa fa-circle fa-stack-1x"></i><i class="fa fa-question fa-stack-1x fa-inverse"></i></span> - </a> - </div> + </rhn:toolbar>
<div class="page-summary"> <p><bean:message key="system.jsp.customkey.updatemsg"/></p>
commit b73d1b2cf1cf72c176c03efe7766ecc07759ad87 Author: Duncan Mac-Vicar P dmacvicar@suse.de Date: Wed Nov 27 14:49:41 2013 +0100
/rhn/systems/customdata/CustomDataList.do use rhn:toolbar instead of custom html
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml index 89d6ce6..12b1562 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml @@ -19117,6 +19117,9 @@ given channel.</source> <trans-unit id="system.jsp.customkey.createlink"> <source>create new key</source> </trans-unit> + <trans-unit id="toolbar.create.customkey"> + <source>create new key</source> + </trans-unit> <trans-unit id="system.jsp.customkey.createtitle"> <source>Create Custom Info Key</source> </trans-unit> diff --git a/java/code/webapp/WEB-INF/pages/systems/customkey/listcustomkeys.jsp b/java/code/webapp/WEB-INF/pages/systems/customkey/listcustomkeys.jsp index 489a14e..d8c5fac 100644 --- a/java/code/webapp/WEB-INF/pages/systems/customkey/listcustomkeys.jsp +++ b/java/code/webapp/WEB-INF/pages/systems/customkey/listcustomkeys.jsp @@ -7,27 +7,16 @@
<html:html > <body> -<BR>
+ <rhn:toolbar base="h1" icon="fa-key" + creationUrl="/rhn/systems/customdata/CreateCustomKey.do" + creationType="customkey"> + <bean:message key="system.jsp.customkey.title"/> + </rhn:toolbar>
+ <p><bean:message key="system.jsp.customkey.message" arg0="<a href="/rhn/systems/Search.do">" arg1="</a>"/></p>
- -<div> - - <div class="spacewalk-toolbar-h1"><div class="spacewalk-toolbar"> - <span class="spacewalk-toolbar"> - <a href="/rhn/systems/customdata/CreateCustomKey.do"> - <i class="fa fa-plus-circle text-success" title="create new key"></i> - <bean:message key="system.jsp.customkey.createlink"/> - </a> - </span> - </div><i class="fa fa-key" title="keyring"></i> - <bean:message key="system.jsp.customkey.title"/> -</div> - - <bean:message key="system.jsp.customkey.message" arg0="<a href="/rhn/systems/Search.do">" arg1="</a>"/> - <br><br> - <bean:message key="system.jsp.customkey.message2"/> + <p><bean:message key="system.jsp.customkey.message2"/></p>
<rl:listset name="keySet"> @@ -88,7 +77,5 @@
</rl:listset>
-</div> - </body> </html:html>
commit 1259a6a544d99cab50c024c56ac6ed039bd285d0 Author: Duncan Mac-Vicar P dmacvicar@suse.de Date: Wed Nov 27 12:04:22 2013 +0100
Use the toolbar jsp tag to get the right html/styles
diff --git a/java/code/webapp/WEB-INF/pages/systems/customkey/createkey.jsp b/java/code/webapp/WEB-INF/pages/systems/customkey/createkey.jsp index a7e639f..adbead4 100644 --- a/java/code/webapp/WEB-INF/pages/systems/customkey/createkey.jsp +++ b/java/code/webapp/WEB-INF/pages/systems/customkey/createkey.jsp @@ -6,54 +6,48 @@
html:html <body> - <div> - <div class="spacewalk-toolbar-h1"> - <div class="spacewalk-toolbar"></div> - <i class="fa fa-key" title=""></i> - <h2><bean:message key="system.jsp.customkey.createtitle"/></h2> - <a href="/rhn/help/reference/en-US/s1-sm-systems.jsp#s2-sm-system-cust-info" - target="_blank" class="help-title"> - <span class="fa-stack"><i class="fa fa-circle fa-stack-1x"></i><i class="fa fa-question fa-stack-1x fa-inverse"></i></span> - </a> - </div> - <p> - <bean:message key="system.jsp.customkey.createmsg"/> - </p> - <form action="/rhn/systems/customdata/CreateCustomKey.do" - class="form-horizontal" - name="edit_token" method="post"> - <rhn:csrf /> - <div class="form-group"> - <label class="col-lg-3 control-label"> - <bean:message key="system.jsp.customkey.keylabel"/>: - </label> - <div class="col-lg-6"> - <input type="text" name="label" - length="64" size="30" class="form-control" - value="<c:out value="${old_label}" />"/> - </div> + <rhn:toolbar base="h1" icon="fa-key" + helpUrl="/rhn/help/reference/en-US/s1-sm-systems.jsp#s2-sm-system-cust-info"> + <bean:message key="system.jsp.customkey.createtitle"/> + </rhn:toolbar> + + <p> + <bean:message key="system.jsp.customkey.createmsg"/> + </p> + <form action="/rhn/systems/customdata/CreateCustomKey.do" + class="form-horizontal" + name="edit_token" method="post"> + <rhn:csrf /> + <div class="form-group"> + <label class="col-lg-3 control-label"> + <bean:message key="system.jsp.customkey.keylabel"/>: + </label> + <div class="col-lg-6"> + <input type="text" name="label" + length="64" size="30" class="form-control" + value="<c:out value="${old_label}" />"/> </div> - <div class="form-group"> - <label class="col-lg-3 control-label" for="descr"> - <bean:message key="system.jsp.customkey.description"/>: - </label> - <div class="col-lg-6"> - <textarea id="descr" wrap="virtual" rows="6" cols="50" - class="form-control" - name="description"><c:out value="${old_description}" /></textarea> - </div> + </div> + <div class="form-group"> + <label class="col-lg-3 control-label" for="descr"> + <bean:message key="system.jsp.customkey.description"/>: + </label> + <div class="col-lg-6"> + <textarea id="descr" wrap="virtual" rows="6" cols="50" + class="form-control" + name="description"><c:out value="${old_description}" /></textarea> </div> - <div class="form-group"> - <div class="col-lg-offset-3 col-lg-6"> - <button type="submit" class="btn btn-success" - name="CreateKey" - value="Create Key" /> - <bean:message key="keycreate.jsp.submit" /> - </button> - rhn:submitted/ - </div> + </div> + <div class="form-group"> + <div class="col-lg-offset-3 col-lg-6"> + <button type="submit" class="btn btn-success" + name="CreateKey" + value="Create Key" /> + <bean:message key="keycreate.jsp.submit" /> + </button> + rhn:submitted/ </div> - </form> - </div> + </div> + </form> </body> </html:html>
commit ba3c731c3ecc1b0df8664aea000c30f2ba711441 Author: Michael Calmer mc@suse.de Date: Wed Nov 27 12:29:28 2013 +0100
import missing taglib
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/configuration/rankchannels.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/configuration/rankchannels.jspf index f9bc8a5..50cb098 100644 --- a/java/code/webapp/WEB-INF/pages/common/fragments/configuration/rankchannels.jspf +++ b/java/code/webapp/WEB-INF/pages/common/fragments/configuration/rankchannels.jspf @@ -1,3 +1,4 @@ +<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> <div class="form-group">
commit a390157ea142e86a4fa8080c671a21323d2678f2 Author: Michael Calmer mc@suse.de Date: Wed Nov 27 12:16:37 2013 +0100
fix tooltip
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/configuration/rankchannels.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/configuration/rankchannels.jspf index 55b10f6..f9bc8a5 100644 --- a/java/code/webapp/WEB-INF/pages/common/fragments/configuration/rankchannels.jspf +++ b/java/code/webapp/WEB-INF/pages/common/fragments/configuration/rankchannels.jspf @@ -15,10 +15,10 @@ <div class="form-group"> <div class="col-lg-offset-3 col-lg-6"> <div class="btn-group"> - <button type="button" title="ssm.config.rank.jsp.up" class="btn btn-default" value="up" name="dispatch" onclick="return move_selected_up('ranksWidget');"> + <button type="button" title="${rhn:localize('ssm.config.rank.jsp.up')}" class="btn btn-default" value="up" name="dispatch" onclick="return move_selected_up('ranksWidget');"> <i class="fa fa-arrow-circle-up"></i> </button> - <button type="button" title="ssm.config.rank.jsp.down" class="btn btn-default" value="down" name="dispatch" onclick="return move_selected_down('ranksWidget');"> + <button type="button" title="${rhn:localize('ssm.config.rank.jsp.down')}" class="btn btn-default" value="down" name="dispatch" onclick="return move_selected_down('ranksWidget');"> <i class="fa fa-arrow-circle-down"></i> </button> </div>
commit 542939be9510406a8ffc8ec954936cb6003fadc7 Author: Johannes Renner jrenner@suse.de Date: Wed Nov 27 11:52:22 2013 +0100
Re-add the 'name' attribute to form
diff --git a/java/code/webapp/WEB-INF/pages/systems/system-remote-command.jsp b/java/code/webapp/WEB-INF/pages/systems/system-remote-command.jsp index 5568381..bfdfb87 100644 --- a/java/code/webapp/WEB-INF/pages/systems/system-remote-command.jsp +++ b/java/code/webapp/WEB-INF/pages/systems/system-remote-command.jsp @@ -16,7 +16,7 @@ <h4><bean:message key="ssm.overview.provisioning.remotecommand.header" arg0="${system.name}"/></h4> </div> <div class="panel-body"> - <form action="/rhn/systems/details/SystemRemoteCommand.do" method="post" class="form-horizontal" role="form"> + <form name="remoteCommandForm" action="/rhn/systems/details/SystemRemoteCommand.do" method="post" class="form-horizontal" role="form"> <rhn:csrf /> <div class="form-group"> <label class="col-lg-3 control-label" for="fUidInput">
commit 106e2a9a138561be3f6aace5f1c49e9f69fdd4bc Author: Johannes Renner jrenner@suse.de Date: Wed Nov 27 11:49:09 2013 +0100
Optionally show a legal note on login/relogin
diff --git a/java/code/webapp/WEB-INF/pages/common/login.jsp b/java/code/webapp/WEB-INF/pages/common/login.jsp index 286e40d..e13ca8b 100644 --- a/java/code/webapp/WEB-INF/pages/common/login.jsp +++ b/java/code/webapp/WEB-INF/pages/common/login.jsp @@ -39,6 +39,13 @@ <p><bean:message key="login.jsp.satbody3"/></p> </div> </c:if> + + <c:set var="legal_note" scope="page" value="${rhn:getConfig('java.legal_note')}" /> + <c:if test="${! empty legal_note}"> + <p class="legal-note"> + <small><c:out value="${legal_note}" escapeXml="false" /></small> + </p> + </c:if> </div> </c:if>
diff --git a/java/code/webapp/WEB-INF/pages/common/relogin.jsp b/java/code/webapp/WEB-INF/pages/common/relogin.jsp index a1a904f..3398046 100644 --- a/java/code/webapp/WEB-INF/pages/common/relogin.jsp +++ b/java/code/webapp/WEB-INF/pages/common/relogin.jsp @@ -28,6 +28,13 @@ <html:hidden property="url_bounce" /> <html:hidden property="request_method" /> </html:form> + + <c:set var="legal_note" scope="page" value="${rhn:getConfig('java.legal_note')}" /> + <c:if test="${! empty legal_note}"> + <p class="legal-note"> + <small><c:out value="${legal_note}" escapeXml="false" /></small> + </p> + </c:if> </div> </c:if> </rhn:require> diff --git a/java/conf/rhn_java.conf b/java/conf/rhn_java.conf index d603442..4048893 100644 --- a/java/conf/rhn_java.conf +++ b/java/conf/rhn_java.conf @@ -54,6 +54,10 @@ java.custom_footer = # (join long lines with , HTML is okay to use) java.login_banner =
+# legal note to be displayed on the login page +# (join long lines with , HTML is okay to use) +java.legal_note = + # default values for system currency multipliers # needed by spacewalk-report for system currency report
commit cbbc6fbdfe20f7366680f7089f7c8ce3ab8d31b3 Author: Duncan Mac-Vicar P dmacvicar@suse.de Date: Wed Nov 27 09:41:16 2013 +0100
fix a non-reinitialized variable in release()
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java index 64bc57f..05c04d1 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java @@ -934,6 +934,7 @@ public class ListTag extends BodyTagSupport { haveColHeadersRendered = false; haveTblAddonsRendered = false; haveTblFootersRendered = false; + haveTblHeadingRendered = false; getDecorators().clear(); decorators = null; decoratorName = null;
commit df1e9ea6af32688add6f0cdb6793860eb16f3c4f Author: Duncan Mac-Vicar P dmacvicar@suse.de Date: Wed Nov 27 09:40:51 2013 +0100
Decorators are specified in the body so the decorators we output in doStartTag will never be shown. Also one has to have extra care that decorators are only added during the ENUMERATE command, so we move the output of the beginning of the list to this state.
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java index ee03aa9..64bc57f 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java @@ -734,6 +734,24 @@ public class ListTag extends BodyTagSupport { return BodyTagSupport.SKIP_BODY; }
+ private void doAfterBodyRenderListBegin() throws JspException { + ListTagUtil.write(pageContext, "<!-- START LIST " + getUniqueName() + " -->"); + + String listId = (getStyleId() != null) ? getStyleId() : getUniqueName(); + + for (ListDecorator dec : getDecorators()) { + dec.beforeList(); + } + + ListTagUtil.write(pageContext, "<div class="spacewalk-list"); + if (styleClass != null) { + ListTagUtil.write(pageContext, " " + styleClass); + } + ListTagUtil.write(pageContext, "" id="" + listId + "">"); + ListTagUtil.setCurrentCommand(pageContext, getUniqueName(), + ListCommand.TBL_HEADING); + } + /** * ${@inheritDoc} */ @@ -750,8 +768,7 @@ public class ListTag extends BodyTagSupport { setState();
if (haveColsEnumerated && !haveTblHeadingRendered) { - ListTagUtil.setCurrentCommand(pageContext, getUniqueName(), - ListCommand.TBL_HEADING); + doAfterBodyRenderListBegin(); } else if (haveColsEnumerated && !haveTblAddonsRendered) { doAfterBodyRenderTopAddons(); @@ -829,22 +846,8 @@ public class ListTag extends BodyTagSupport { manip = new DataSetManipulator(pageSize, pageData, (HttpServletRequest) pageContext.getRequest(), getUniqueName(), isParentAnElement(), searchParent, searchChild); - - ListTagUtil.write(pageContext, "<!-- START LIST " + getUniqueName() + " -->"); - - String listId = (getStyleId() != null) ? getStyleId() : getUniqueName(); ListTagUtil.setCurrentCommand(pageContext, getUniqueName(), - ListCommand.ENUMERATE); - - for (ListDecorator dec : getDecorators()) { - dec.beforeList(); - } - - ListTagUtil.write(pageContext, "<div class="spacewalk-list"); - if (styleClass != null) { - ListTagUtil.write(pageContext, " " + styleClass); - } - ListTagUtil.write(pageContext, "" id="" + listId + "">"); + ListCommand.ENUMERATE); return BodyTagSupport.EVAL_BODY_INCLUDE; }
commit ee4be7a71dee59b43b61845a3c890fc08b0951db Author: Silvio Moioli smoioli@suse.de Date: Tue Nov 26 15:37:48 2013 +0100
DataSetManipulator: backward/forward icons fixed
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/DataSetManipulator.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/DataSetManipulator.java index 2aee70e..a90dc26 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/DataSetManipulator.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/DataSetManipulator.java @@ -65,10 +65,10 @@ public class DataSetManipulator { private final boolean searchChild;
private String defaultSortAttribute; - private static final String ICON_FIRST = "fa-fast-backward"; - private static final String ICON_PREV = "fa-backward"; - private static final String ICON_NEXT = "fa-forward"; - private static final String ICON_LAST = "fa-fast-forward"; + private static final String ICON_FIRST = "fa fa-fast-backward"; + private static final String ICON_PREV = "fa fa-backward"; + private static final String ICON_NEXT = "fa fa-forward"; + private static final String ICON_LAST = "fa fa-fast-forward";
/**
commit d9560d3c86067cae067d072c13fa295f9760ccfd Author: Silvio Moioli smoioli@suse.de Date: Tue Nov 26 15:10:57 2013 +0100
Do not rely on form IDs, as html:form does not output them
Now that the XHTML mode has been switched off, Struts' html:form tags will output the name attribute instead of the id attribute in <form> tags. Javascript code has been adapted accordingly.
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp b/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp index 376ff7b..c19a181 100644 --- a/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp +++ b/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/first.jsp @@ -15,36 +15,41 @@ function swapValues(fromCtlId, toCtlId) { }
function moveNext() { - var form = document.getElementById("kickstartCreateWizardForm"); + var form = $("form[name='kickstartCreateWizardForm']"); swapValues("wizard-nextstep", "wizard-curstep"); form.submit(); }
function refresh() { - var form = document.getElementById("kickstartCreateWizardForm"); + var form = $("form[name='kickstartCreateWizardForm']"); form.submit(); }
function toggleKSTree(what) { - var form = document.getElementById("kickstartCreateWizardForm"); + var form = $("form[name='kickstartCreateWizardForm']"); + var select = form.find("select[name='kstreeId']"); if(what.checked) { - form.kstreeId.disabled=1; + select.prop("disabled", "disabled"); } else { - form.kstreeId.disabled=0; + select.prop("disabled", false); } }
function clickNewestRHTree() { - var form = document.getElementById("kickstartCreateWizardForm"); - if(form.useNewestRHTree.checked) { - form.useNewestTree.checked = false; + var form = $("form[name='kickstartCreateWizardForm']"); + var treeCheckbox = form.find("input[name='useNewestTree']") + var rhTreeCheckbox = form.find("input[name='useNewestRHTree']") + if(rhTreeCheckbox.is(':checked')) { + treeCheckbox.attr('checked', false); } }
function clickNewestTree() { - var form = document.getElementById("kickstartCreateWizardForm"); - if(form.useNewestTree.checked) { - form.useNewestRHTree.checked = false; + var form = $("form[name='kickstartCreateWizardForm']"); + var treeCheckbox = form.find("input[name='useNewestTree']") + var rhTreeCheckbox = form.find("input[name='useNewestRHTree']") + if(treeCheckbox.is(':checked')) { + rhTreeCheckbox.attr('checked', false); } } </script> diff --git a/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/second.jsp b/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/second.jsp index f265b13..a17a601 100644 --- a/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/second.jsp +++ b/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/second.jsp @@ -32,13 +32,13 @@ function swapValues(fromCtlId, toCtlId) { }
function moveNext() { - var form = document.getElementById("kickstartCreateWizardForm"); + var form = $("form[name='kickstartCreateWizardForm']"); swapValues("wizard-nextstep", "wizard-curstep"); form.submit(); }
function movePrevious() { - var form = document.getElementById("kickstartCreateWizardForm"); + var form = $("form[name='kickstartCreateWizardForm']"); swapValues("wizard-prevstep", "wizard-curstep"); form.submit(); } diff --git a/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/third.jsp b/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/third.jsp index 8f6b024..bfa2b87 100644 --- a/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/third.jsp +++ b/java/code/webapp/WEB-INF/pages/kickstart/wizard/profile/third.jsp @@ -16,13 +16,13 @@ function swapValues(fromCtlId, toCtlId) { }
function moveNext() { - var form = document.getElementById("kickstartCreateWizardForm"); + var form = $("form[name='kickstartCreateWizardForm']"); swapValues("wizard-nextstep", "wizard-curstep"); form.submit(); }
function movePrevious() { - var form = document.getElementById("kickstartCreateWizardForm"); + var form = $("form[name='kickstartCreateWizardForm']"); swapValues("wizard-prevstep", "wizard-curstep"); form.submit(); }
commit 90109dc145d993502151b95af6f4d3cfcc5028a6 Author: Duncan Mac-Vicar P dmacvicar@suse.de Date: Tue Nov 26 11:24:25 2013 +0100
Set the current list for decorators as they are added in addDecorator()
Even if counter-intuitive, some decorators like ElaboratorDecorator do side effects when setCurrentList is called, so we can't call it "just to be sure".
On the other hand, decorators are added at different points, one as an attribute to the list tag, others after the columns therefore there is no clear place where to set the current list, why not do it when they are about to be added.
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java index 2f66cb9..ee03aa9 100644 --- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java +++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java @@ -141,6 +141,7 @@ public class ListTag extends BodyTagSupport { ListDecorator dec = getDecorator(decName); if (dec != null) { getDecorators().add(dec); + dec.setCurrentList(this); } }
@@ -420,7 +421,6 @@ public class ListTag extends BodyTagSupport {
// here decorators should insert other e.g hidden input fields for (ListDecorator dec : getDecorators()) { - dec.setCurrentList(this); dec.afterList(); }
@@ -449,7 +449,6 @@ public class ListTag extends BodyTagSupport { pageContext.pushBody(topPaginationContent); if (!isEmpty()) { for (ListDecorator dec : getDecorators()) { - dec.setCurrentList(this); dec.beforeTopPagination(); } } @@ -459,7 +458,6 @@ public class ListTag extends BodyTagSupport { pageContext.pushBody(topAddonsContent); if (!isEmpty()) { for (ListDecorator dec : getDecorators()) { - dec.setCurrentList(this); dec.onTopExtraAddons(); } } @@ -503,7 +501,6 @@ public class ListTag extends BodyTagSupport { pageContext.pushBody(headAddons); if (!isEmpty()) { for (ListDecorator dec : getDecorators()) { - dec.setCurrentList(this); dec.onHeadExtraAddons(); } } @@ -520,7 +517,6 @@ public class ListTag extends BodyTagSupport { pageContext.pushBody(headExtraContent); if (!isEmpty()) { for (ListDecorator dec : getDecorators()) { - dec.setCurrentList(this); dec.onHeadExtraContent(); } } @@ -645,9 +641,7 @@ public class ListTag extends BodyTagSupport { pageContext.pushBody(footAddonsContent); if (!manip.isListEmpty()) { for (ListDecorator dec : getDecorators()) { - dec.setCurrentList(this); dec.onFooterExtraAddons(); - dec.setCurrentList(null); } } pageContext.popBody(); @@ -655,9 +649,7 @@ public class ListTag extends BodyTagSupport { pageContext.pushBody(footExtraContent); if (!manip.isListEmpty()) { for (ListDecorator dec : getDecorators()) { - dec.setCurrentList(this); dec.onFooterExtraContent(); - dec.setCurrentList(null); } } pageContext.popBody(); @@ -722,7 +714,6 @@ public class ListTag extends BodyTagSupport { "<div class="spacewalk-list-bottom-addons-extra">"); if (!isEmpty()) { for (ListDecorator dec : getDecorators()) { - dec.setCurrentList(this); dec.onBottomExtraAddons(); } } @@ -732,7 +723,6 @@ public class ListTag extends BodyTagSupport { "<div class="spacewalk-list-bottom-addons-extra">"); if (!isEmpty()) { for (ListDecorator dec : getDecorators()) { - dec.setCurrentList(this); dec.onBottomExtraContent(); } } @@ -847,7 +837,6 @@ public class ListTag extends BodyTagSupport { ListCommand.ENUMERATE);
for (ListDecorator dec : getDecorators()) { - dec.setCurrentList(this); dec.beforeList(); }
@@ -1040,9 +1029,7 @@ public class ListTag extends BodyTagSupport {
if (!manip.isListEmpty()) { for (ListDecorator dec : getDecorators()) { - dec.setCurrentList(this); dec.afterBottomPagination(); - dec.setCurrentList(null); } }
commit 6cd97c2c4b37524f55e08eec9f9a87784aa54215 Author: Silvio Moioli smoioli@suse.de Date: Tue Nov 26 07:46:16 2013 +0100
ssm/index.do: Font Awesome icon replaced
diff --git a/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp b/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp index 1204f28..d3f75ec 100644 --- a/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp +++ b/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp @@ -4,113 +4,123 @@ <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
- <html> <body>
<%@ include file="/WEB-INF/pages/common/fragments/ssm/header.jspf" %>
<h2><bean:message key="ssm.overview.header"/></h2> - -<table class="ssm-overview" align="center"> <div class="page-summary"> - <p><bean:message key="ssm.overview.summary"/></p> - <p><bean:message key="ssm.overview.summary2"/></p> + <ul><bean:message key="ssm.overview.summary"/></ul> + <ul><bean:message key="ssm.overview.summary2"/></ul> </div> - <tr> - <td><i class="fa fa-desktop fa-2x fa-fw" title="<bean:message key='ssm.overview.systems' />"></i></td> - <th><b><bean:message key="ssm.overview.systems"/>:</b></th> - <td><bean:message key="ssm.overview.systems.list"/></td> - </tr> - - <tr> - <td><i class="fa spacewalk-icon-patches fa-2x fa-fw" title="Errata"></i></td> - <th><b><bean:message key="ssm.overview.errata"/>:</b></th> - <td><bean:message key="ssm.overview.errata.schedule"/></td> - </tr> - - <tr> - <td><i class="fa spacewalk-icon-packages fa-2x fa-fw" title="<bean:message key='ssm.overview.packages'/>"></i></td> - <th><b><bean:message key="ssm.overview.packages"/>:</b></th> - <td><bean:message key="ssm.overview.packages.upgrade"/></td> - </tr> - -<rhn:require acl="is(enable_solaris_support)"> - <tr> - <td><i class="fa spacewalk-icon-patches" title="<bean:message key='ssm.overview.patches'/>"></i></td> - <th><bean:message key="ssm.overview.patches"/>:</th> - <td> -<a href="/network/systems/ssm/patches/install.pxt"><bean:message key="ssm.overview.patches.install"/></a> / <a href="/network/systems/ssm/patches/remove.pxt"><bean:message key="ssm.overview.patches.remove"/></a> - <bean:message key="ssm.overview.patches.patches"/><br /> - </td> - </tr> - - <tr> - <td><i class="fa spacewalk-icon-patch-set fa-2x fa-fw" title="<bean:message key='ssm.overview.patch.clusters'/>"></i></td> - <th><bean:message key="ssm.overview.patch.clusters"/>:</th> - <td> <bean:message key="ssm.overview.patch.clusters.install"/><br /> - </td> - </tr> -</rhn:require> - -<rhn:require acl="user_role(org_admin)"> - <tr> - <td><i class="fa spacewalk-icon-system-groups fa-2x fa-fw" title="<bean:message key='ssm.overview.groups'/>"></i></td> - <th><b><bean:message key="ssm.overview.groups"/>:</b></th> - <td><bean:message key="ssm.overview.groups.create"/></td> - </tr> -</rhn:require> - - <tr> - <td><i class="fa spacewalk-icon-software-channels fa-2x fa-fw" title="<bean:message key='ssm.overview.channels'/>"></i></td> - <th><b><bean:message key="ssm.overview.channels"/>:</b></th> - <td> - <p> - <bean:message key="ssm.overview.channels.memberships"/> - <rhn:require acl="org_entitlement(rhn_provisioning); user_role(config_admin)"> - <br /> - <bean:message key="ssm.overview.channels.subscriptions"/><br /> - <bean:message key="ssm.overview.channels.deploy"/><br /> - </rhn:require> - </p> - </td> - </tr> - -<rhn:require acl="org_entitlement(rhn_provisioning)"> - <tr> - <td><i class="fa fa-rocket fa-2x fa-fw" title="<bean:message key='ssm.overview.provisioning'/>"></i></td> - <th><b><bean:message key="ssm.overview.provisioning"/>:</b></th> - <td> - <p> - <bean:message key="ssm.overview.provisioning.kickstart"/><br /> - <bean:message key="ssm.overview.provisioning.rollback"/><br /> - <bean:message key="ssm.overview.provisioning.remotecommands"/><br /> - </p> - </td> - </tr> -</rhn:require> - - <tr> - <td><i class="fa fa-suitcase fa-2x fa-fw" title="<bean:message key='ssm.overview.misc'/>"></i></td> - <th><b><bean:message key="ssm.overview.misc"/>:</b></th> - <td> - <p> - <bean:message key="ssm.overview.misc.updateprofiles"/><br /> - <rhn:require acl="org_entitlement(rhn_provisioning)"> - <bean:message key="ssm.overview.misc.customvalues"/><br /> - </rhn:require> - <rhn:require acl="user_role(org_admin);org_entitlement(rhn_provisioning) or org_entitlement(rhn_monitor)"> - <bean:message key="ssm.overview.misc.entitlements"/><br /> - </rhn:require> - <bean:message key="ssm.overview.misc.deletereboot"/><br /> - <bean:message key="ssm.overview.misc.migrate"/><br /> - <bean:message key="ssm.overview.misc.scap"/><br /> - </p> - </td> - </tr> - -</table>
+<div class="panel panel-default"> + <div class="panel-heading"> + <i class="fa fa-desktop fa-fw" title="<bean:message key="ssm.overview.systems" />"></i> + <bean:message key="ssm.overview.systems"/> + </div> + <div class="panel-body"> + <bean:message key="ssm.overview.systems.list"/> + </div> + <rhn:require acl="no_bootstrap_systems_in_set()"> + <div class="panel-heading"> + <i class="fa spacewalk-icon-patches fa-fw" title="Errata"></i> + <bean:message key="ssm.overview.errata"/> + </div> + <div class="panel-body"> + <bean:message key="ssm.overview.errata.schedule"/> + </div> + <div class="panel-heading"> + <i class="fa spacewalk-icon-packages fa-fw" title="<bean:message key='ssm.overview.packages'/>"></i> + <bean:message key="ssm.overview.packages"/> + </div> + <div class="panel-body"> + <bean:message key="ssm.overview.packages.upgrade"/> + </div> + <rhn:require acl="is(enable_solaris_support)"> + <div class="panel-heading"> + <i class="fa spacewalk-icon-patches fa-fw" title="<bean:message key='ssm.overview.patches'/>"></i> + <bean:message key="ssm.overview.patches"/> + </div> + <div class="panel-body"> + <a href="/network/systems/ssm/patches/install.pxt"><bean:message key="ssm.overview.patches.install"/></a> / <a href="/network/systems/ssm/patches/remove.pxt"><bean:message key="ssm.overview.patches.remove"/></a> + <bean:message key="ssm.overview.patches.patches"/> + </div> + <div class="panel-heading"> + <i class="fa spacewalk-icon-patch-set fa-fw" title="<bean:message key='ssm.overview.patch.clusters'/>"></i> + <bean:message key="ssm.overview.patch.clusters"/> + </div> + <div class="panel-body"> + <bean:message key="ssm.overview.patch.clusters.install"/> + </div> + </rhn:require> + <rhn:require acl="user_role(org_admin)"> + <div class="panel-heading"> + <i class="fa spacewalk-icon-system-groups fa-fw" title="<bean:message key='ssm.overview.groups'/>"></i> + <bean:message key="ssm.overview.groups"/> + </div> + <div class="panel-body"> + <bean:message key="ssm.overview.groups.create"/> + </div> + </rhn:require> + <div class="panel-heading"> + <i class="fa spacewalk-icon-software-channels fa-fw" title="<bean:message key='ssm.overview.channels'/>"></i> + <bean:message key="ssm.overview.channels"/> + </div> + <div class="panel-body"> + <ul> + <li><bean:message key="ssm.overview.channels.memberships"/></li> + <rhn:require acl="org_entitlement(rhn_provisioning); user_role(config_admin)"> + <li><bean:message key="ssm.overview.channels.subscriptions"/></li> + <li><bean:message key="ssm.overview.channels.deploy"/></li> + </rhn:require> + </ul> + </div> + </rhn:require> + <rhn:require acl="org_entitlement(rhn_provisioning);"> + <div class="panel-heading"> + <i class="fa fa-rocket fa-fw" title="<bean:message key='ssm.overview.provisioning'/>"></i> + <bean:message key="ssm.overview.provisioning"/> + </div> + <div class="panel-body"> + <ul> + <li><bean:message key="ssm.overview.provisioning.kickstart"/></li> + <rhn:require acl="no_bootstrap_systems_in_set()"> + <li><bean:message key="ssm.overview.provisioning.rollback"/></li> + <li><bean:message key="ssm.overview.provisioning.remotecommands"/></li> + </rhn:require> + <li><bean:message key="ssm.overview.provisioning.powermanagement.configure"/></li> + <li><bean:message key="ssm.overview.provisioning.powermanagement.operations"/></li> + </ul> + </div> + </rhn:require> + <div class="panel-heading"> + <i class="fa fa-suitcase fa-fw" title="<bean:message key='ssm.overview.misc'/>"></i> + <bean:message key="ssm.overview.misc"/> + </div> + <div class="panel-body"> + <ul> + <rhn:require acl="no_bootstrap_systems_in_set()"> + <li><bean:message key="ssm.overview.misc.updateprofiles"/></li> + </rhn:require> + <rhn:require acl="org_entitlement(rhn_provisioning); no_bootstrap_systems_in_set()"> + <li><bean:message key="ssm.overview.misc.customvalues"/></li> + </rhn:require> + <rhn:require acl="user_role(org_admin);org_entitlement(rhn_provisioning) or org_entitlement(rhn_monitor); no_bootstrap_systems_in_set()"> + <li><bean:message key="ssm.overview.misc.entitlements"/></li> + </rhn:require> + <li><bean:message key="ssm.overview.misc.delete"/></li> + <rhn:require acl="no_bootstrap_systems_in_set()"> + <li><bean:message key="ssm.overview.misc.reboot"/></li> + </rhn:require> + <li><bean:message key="ssm.overview.misc.migrate"/></li> + <rhn:require acl="no_bootstrap_systems_in_set()"> + <li><bean:message key="ssm.overview.misc.scap"/></li> + </rhn:require> + </ul> + </div> +</div>
</body> </html>
commit 8720ab78f177161961a375767f7653e1410aab83 Author: Michael Calmer mc@suse.de Date: Mon Nov 25 17:04:24 2013 +0100
Use translated welcome message
diff --git a/java/code/webapp/WEB-INF/pages/common/login.jsp b/java/code/webapp/WEB-INF/pages/common/login.jsp index fed4c61..286e40d 100644 --- a/java/code/webapp/WEB-INF/pages/common/login.jsp +++ b/java/code/webapp/WEB-INF/pages/common/login.jsp @@ -23,7 +23,7 @@ <p><c:out value="${login_banner}" escapeXml="false" /></p> </c:when> <c:otherwise> - <h1>Welcome to Spacewalk</h1> + <h1><bean:message key="login.jsp.welcomemessage" /></h1> <p><bean:message key="login.jsp.satbody1" /></p> </c:otherwise> </c:choose>
commit e1a9f2e7312c391005991871e69e7ca2f81227ee Author: Silvio Moioli smoioli@suse.de Date: Fri Nov 22 12:50:50 2013 +0100
Acl check restored
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/systems/system-header.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/systems/system-header.jspf index ff1e211..38d5c43 100644 --- a/java/code/webapp/WEB-INF/pages/common/fragments/systems/system-header.jspf +++ b/java/code/webapp/WEB-INF/pages/common/fragments/systems/system-header.jspf @@ -6,18 +6,20 @@
-<c:choose> - <c:when test="${!inSSM}"> - <c:set var="actionLink" value="/rhn/systems/details/AddToSSM.do?sid=${system.id}"/> - <c:set var="actionMessage" value="toolbar.ssm.add"/> - <c:set var="actionIcon" value="fa-plus-circle"/> - </c:when> - <c:otherwise> - <c:set var="actionLink" value="/rhn/systems/details/RemoveFromSSM.do?sid=${system.id}"/> - <c:set var="actionMessage" value="toolbar.ssm.remove"/> - <c:set var="actionIcon" value="fa-times-circle-o"/> - </c:otherwise> -</c:choose> +<rhn:require acl="system_has_management_entitlement()"> + <c:choose> + <c:when test="${!inSSM}"> + <c:set var="actionLink" value="/rhn/systems/details/AddToSSM.do?sid=${system.id}"/> + <c:set var="actionMessage" value="toolbar.ssm.add"/> + <c:set var="actionIcon" value="fa-plus-circle"/> + </c:when> + <c:otherwise> + <c:set var="actionLink" value="/rhn/systems/details/RemoveFromSSM.do?sid=${system.id}"/> + <c:set var="actionMessage" value="toolbar.ssm.remove"/> + <c:set var="actionIcon" value="fa-times-circle-o"/> + </c:otherwise> + </c:choose> +</rhn:require>
<c:choose> <c:when test="${system.virtualGuest}">
commit 0d1af366e1ac21df2acb54f7341f335400398deb Author: Silvio Moioli smoioli@suse.de Date: Fri Nov 22 11:55:45 2013 +0100
Header system deletion link fixed
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/systems/system-header.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/systems/system-header.jspf index 97b5aef..ff1e211 100644 --- a/java/code/webapp/WEB-INF/pages/common/fragments/systems/system-header.jspf +++ b/java/code/webapp/WEB-INF/pages/common/fragments/systems/system-header.jspf @@ -35,7 +35,7 @@ icon="${systemIcon}" miscUrl="${actionLink}" miscIcon="${actionIcon}" miscText="${actionMessage}" miscAcl="system_has_management_entitlement()" helpUrl="/rhn/help/reference/en-US/s1-sm-systems.jsp#s3-sm-system-details" - deletionUrl="/rhn/systems/details/RemoveFromSSM.do?sid=${system.id}" + deletionUrl="/rhn/systems/details/DeleteConfirm.do?sid=${system.id}" deletionType="system"> <c:if test="${empty system}"> <decorator:getProperty property="meta.name" />