Permalink
Browse files

Drawing UI actions correctly in IE without bandaids

git-svn-id: http://svn.getwindmill.com/trunk@1322 78c7df6f-8922-0410-bcd3-9426b1ad491b
  • Loading branch information...
1 parent 418e013 commit 70257b8a74c84c7dcc5c62815016f1e37702148a admc committed Jun 12, 2009
Showing with 26 additions and 20 deletions.
  1. +5 −4 windmill/html/css/windmill.css
  2. +20 −15 windmill/html/js/wm/ide/remote.js
  3. +1 −1 windmill/html/js/wm/ide/results.js
@@ -51,8 +51,8 @@ img {
}
.action {
-/* position:relative;
- border-top: 1px solid #aaa;
+ position:relative;
+ /*border-top: 1px solid #aaa;
background: lightyellow;*/
padding:2px;
margin:1px;
@@ -66,7 +66,8 @@ img {
.buttons {
position:absolute;
- right:5px;
+ right:8px;
+ z-index:100;
}
.textSpan {
@@ -217,7 +218,7 @@ img {
.tab {
height:100%;
- overflow-x: hidden;
+ overflow: hidden;
}
#tooltip {
@@ -294,7 +294,7 @@ windmill.ui.remote = new function() {
var reg = windmill.registry;
var select = document.createElement('select');
- select.className = 'smalloption floatLeft';
+ select.className = 'smalloption';
select.id = state.action.id + 'method';
//Setup default method
var option = document.createElement('option');
@@ -535,41 +535,46 @@ windmill.ui.remote = new function() {
jQuery(action).html(method + JSON.stringify(params));
return action;
}
-
+
+ //Build the buttons
var templ = new fleegix.ejs.Template({ node: $('actionButtonsTemplate') });
var buttons = templ.process({ data: { id: action.id } });
var buttonNode = $elem('span', {className:'buttons'});
jQuery(buttonNode).html(buttons);
- //IE is breaking because of the absolute positioning
- if (windmill.browser.isIE){
- buttonNode.style.position = "relative";
- buttonNode.style.left = "20%";
- }
var state = {method: method, params: params, action: action};
+ //Get all the form elements for actions
var methods = _this.getMethods(state);
var locators = _this.getLocators(state);
var options = _this.getOptions(state);
var locatorInput = _this.getLocatorInput(state);
var optionInput = _this.getOptionInput(state);
+ //add methods and buttons
jQuery(action).append(jQuery(methods));
jQuery(action).append(jQuery(buttonNode));
-
+
+ //if this action has locators, add them in a container
if (locators){
- jQuery(action).append(jQuery($elem('div', {className:'clearBoth'})));
- jQuery(action).append(jQuery(locators));
- jQuery(action).append(jQuery(locatorInput));
+ var locCont = document.createElement('div');
+ locCont.appendChild(locators)
+ locCont.appendChild(locatorInput);
+ jQuery(action).append(jQuery(locCont));
}
+
+ //if this action has options, add them in a container
if (options){
- jQuery(action).append(jQuery($elem('div', {className:'clearBoth'})));
- jQuery(action).append(jQuery(options));
+ var optCont = document.createElement('div');
+ optCont.appendChild(options);
+ //if its a string not a drop down: only one option
if (options.tagName.toLowerCase() != "select"){
- jQuery(action).append(jQuery(document.createElement('span')).html(': ').addClass("textSpan"));
+ jQuery(optCont).append(jQuery(document.createElement('span')).html(': ').addClass("textSpan"));
}
- jQuery(action).append(jQuery(optionInput));
+ jQuery(optCont).append(jQuery(optionInput));
+ //append options
+ jQuery(action).append(jQuery(optCont));
}
return action;
};
@@ -119,7 +119,7 @@ windmill.ui.results = new function() {
resDiv.innerHTML = "<strong>"+method + "</strong>&nbsp;<a class='moreLink' href='#'>more</a>" + resDiv.innerHTML;
}
else {
- resDiv.innerHTML = "<strong>"+method + "</strong>: " + resDiv.innerHTML;
+ resDiv.innerHTML = "<strong>"+method + "</strong> " + resDiv.innerHTML;
}
//Depending if there are any child nodes yet

0 comments on commit 70257b8

Please sign in to comment.