diff options
| author | Alex Rudyy <orudyy@apache.org> | 2013-04-23 11:11:11 +0000 |
|---|---|---|
| committer | Alex Rudyy <orudyy@apache.org> | 2013-04-23 11:11:11 +0000 |
| commit | 2c820faa7bf393ec518de5a5254f0e851c19580b (patch) | |
| tree | da1bbe5d1ffab59c64596bbd2a0ca5abeb893027 | |
| parent | 9f13c5d5426732ed5b7414caecc65cb9b3ec3307 (diff) | |
| download | qpid-python-2c820faa7bf393ec518de5a5254f0e851c19580b.tar.gz | |
QPID-4768: Resolve compatibility issues in web management console for old versions of IE and FF
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1470897 13f79535-47bb-0310-9956-ffa450edef68
3 files changed, 5 insertions, 48 deletions
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css b/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css index f5ca3e68dd..4c8b79ab82 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css @@ -43,7 +43,6 @@ button { -moz-border-radius: 4px 4px 4px 4px; -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); background-color: #E4F2FF; - background-image: url("../dojo/dijit/themes/claro/form/images/button.png"); background-position: center top; background-repeat: repeat-x; border: 1px solid #769DC0; diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/index.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/index.html index c0a512d829..2117ef361d 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/index.html +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/index.html @@ -75,7 +75,7 @@ <div id="pageLayout" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design: 'headline', gutters: false"> <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'"> <div id="header" class="header" style="float: left; width: 300px"></div> - <div id="login" style="float: right"></div> + <div id="login" style="float: right; display:none"><strong>User: </strong> <span id="authenticatedUser"></span><a href="logout">[logout]</a></div> </div> <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'leading', splitter: true" style="width:20%"> <div qpid-type="treeView" qpid-props="query: 'rest/structure'" ></div> diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/authorization/checkUser.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/authorization/checkUser.js index 6b843d8d06..878cf9e3fe 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/authorization/checkUser.js +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/authorization/checkUser.js @@ -19,60 +19,18 @@ * */ -require(["dijit/form/DropDownButton", - "dijit/TooltipDialog", - "dijit/form/TextBox", - "dojo/_base/xhr", - "dojo/dom", - "dojo/dom-construct", +require(["dojo/dom", "qpid/authorization/sasl", - "dojo/domReady!"], function(DropDownButton, TooltipDialog, TextBox, xhr, dom, domConstruct, sasl){ - -var dialog = new TooltipDialog({ - content: - '<strong><label for="username" style="display:inline-block;width:100px;">Username:</label></strong>' + - '<div data-dojo-type="dijit.form.TextBox" id="username"></div><br/>' + - '<strong><label for="pass" style="display:inline-block;width:100px;">Password:</label></strong>' + - '<div data-dojo-type="dijit.form.TextBox" type="password" id="pass"></div><br/>' + - '<button data-dojo-type="dijit.form.Button" type="submit" id="loginButton">Login</button>' -}); - -var button = new DropDownButton({ - label: "Login", - dropDown: dialog -}); - -var usernameSpan = domConstruct.create("span", { - innerHTML: '<strong>User: </strong> <span id="authenticatedUser"></span><a href="logout">[logout]</a>', - style: { display: "none" } -}); - - -var loginDiv = dom.byId("login"); -loginDiv.appendChild(usernameSpan); -loginDiv.appendChild(button.domNode); + "dojo/domReady!"], function(dom, sasl){ var updateUI = function updateUI(data) { if(data.user) { - dojo.byId("authenticatedUser").innerHTML = data.user; - dojo.style(button.domNode, {display: 'none'}); - dojo.style(usernameSpan, {display: 'block'}); - } - else - { - dojo.style(button.domNode, {display: 'block'}); - dojo.style(usernameSpan, {display: 'none'}); + dom.byId("authenticatedUser").innerHTML = data.user; + dojo.style(dom.byId("login"), {display: 'block'}); } }; -dijit.byId("loginButton").on("click", function(){ - sasl.authenticate(dojo.byId("username").value, dojo.byId("pass").value, updateUI); -}); - -dialog.startup(); - sasl.getUser(updateUI); - });
\ No newline at end of file |
