Changeset 1322

Show
Ignore:
Timestamp:
06/11/09 22:09:19 (9 months ago)
Author:
admc
Message:

Drawing UI actions correctly in IE without bandaids

Location:
trunk/windmill/html
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/windmill/html/css/windmill.css

    r1316 r1322  
    5252 
    5353.action { 
    54 /*  position:relative; 
    55   border-top: 1px solid #aaa; 
     54  position:relative; 
     55  /*border-top: 1px solid #aaa; 
    5656  background: lightyellow;*/ 
    5757  padding:2px; 
     
    6767.buttons { 
    6868 position:absolute; 
    69  right:5px; 
     69 right:8px; 
     70 z-index:100; 
    7071} 
    7172 
     
    218219.tab { 
    219220 height:100%; 
    220  overflow-x: hidden; 
     221 overflow: hidden; 
    221222} 
    222223 
  • trunk/windmill/html/js/wm/ide/remote.js

    r1316 r1322  
    295295       
    296296      var select = document.createElement('select'); 
    297       select.className = 'smalloption floatLeft'; 
     297      select.className = 'smalloption'; 
    298298      select.id = state.action.id + 'method'; 
    299299      //Setup default method 
     
    536536          return action; 
    537537        } 
    538  
     538         
     539        //Build the buttons 
    539540        var templ = new fleegix.ejs.Template({ node: $('actionButtonsTemplate') }); 
    540541        var buttons = templ.process({ data: { id: action.id } }); 
     
    542543        jQuery(buttonNode).html(buttons); 
    543544         
    544         //IE is breaking because of the absolute positioning 
    545         if (windmill.browser.isIE){ 
    546           buttonNode.style.position = "relative"; 
    547           buttonNode.style.left = "20%"; 
    548         } 
    549545        var state = {method: method, params: params, action: action}; 
    550546         
     547        //Get all the form elements for actions 
    551548        var methods = _this.getMethods(state); 
    552549        var locators = _this.getLocators(state); 
     
    555552        var optionInput = _this.getOptionInput(state); 
    556553         
     554        //add methods and buttons 
    557555        jQuery(action).append(jQuery(methods)); 
    558556        jQuery(action).append(jQuery(buttonNode)); 
    559  
     557         
     558        //if this action has locators, add them in a container 
    560559        if (locators){ 
    561           jQuery(action).append(jQuery($elem('div', {className:'clearBoth'}))); 
    562           jQuery(action).append(jQuery(locators)); 
    563           jQuery(action).append(jQuery(locatorInput)); 
    564         } 
     560          var locCont = document.createElement('div'); 
     561          locCont.appendChild(locators) 
     562          locCont.appendChild(locatorInput); 
     563          jQuery(action).append(jQuery(locCont)); 
     564        } 
     565         
     566        //if this action has options, add them in a container 
    565567        if (options){ 
    566           jQuery(action).append(jQuery($elem('div', {className:'clearBoth'}))); 
    567           jQuery(action).append(jQuery(options)); 
     568          var optCont = document.createElement('div'); 
     569          optCont.appendChild(options); 
    568570           
     571          //if its a string not a drop down: only one option 
    569572          if (options.tagName.toLowerCase() != "select"){ 
    570             jQuery(action).append(jQuery(document.createElement('span')).html(': ').addClass("textSpan")); 
    571           } 
    572           jQuery(action).append(jQuery(optionInput)); 
     573            jQuery(optCont).append(jQuery(document.createElement('span')).html(': ').addClass("textSpan")); 
     574          } 
     575          jQuery(optCont).append(jQuery(optionInput)); 
     576          //append options 
     577          jQuery(action).append(jQuery(optCont)); 
    573578        }         
    574579        return action; 
  • trunk/windmill/html/js/wm/ide/results.js

    r1316 r1322  
    120120      } 
    121121      else { 
    122         resDiv.innerHTML = "<strong>"+method + "</strong>: " + resDiv.innerHTML; 
     122        resDiv.innerHTML = "<strong>"+method + "</strong> " + resDiv.innerHTML; 
    123123      } 
    124124