Changeset 261


Ignore:
Timestamp:
12/16/13 16:24:37 (5 years ago)
Author:
nhoyt
Message:

Overview: (1) Moved the Back button to the top of the sidebar, just to the left of the Views menubutton. (2) Moved the Details button in the Rule Category view from left-justified below the Selected Rule text box to right-justified above it on same line as Selected Rule label. (3) Hid the summary grid (colored boxes with labels V, W, MC, H and P) in the Rule Details view.

ai-sidebar.js

  • Added setBackButtonState fn. and calls to it from updateView and selectPreviousView fns.

ai-sidebar.xul

  • Added Back button in hbox that contains ainspector-view-title and ainspector-views-button.

view-category.xul

  • Removed Back button from this view (now moved to top of all views).
  • Moved the Details button from below the Selected Rule box to above it, right-justified (on same horizontal line as Selected Rule label).

view-details.js

  • Because summary grid is now hidden in the Rule Details view, commented out calls to summary.setData in fns. setDetailsView and clearDetailsView.

view-details.xul

  • Removed Back button from this view (now moved to top of all views).

ai-sidebar.dtd, ai-sidebar.properties

  • Moved Back button tooltips from .dtd to .properties file.

back-button.png, fwd-button.png

  • Reduced size of back and forward arrow images in export from 75% to 60%.

install.rdf

  • Updated version ID to 0.15.2
Location:
trunk/proto-15
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/proto-15/chrome/content/ai-sidebar.js

    r255 r261  
    324324 
    325325/** 
     326 * @function setBackButtonState 
     327 * 
     328 * @memberOf ainspectorSidebar 
     329 * 
     330 * @desc Set state of Back button based on currentView 
     331 */ 
     332 
     333ainspectorSidebar.setBackButtonState = function () { 
     334  var button = document.getElementById("ainspector-back-button"); 
     335  var previousView = parent.AINSPECTOR.previousView; 
     336  var nls = ainspectorSidebar.nlsProperties; 
     337 
     338  switch (parent.AINSPECTOR.currentView) { 
     339    case ainspector.viewEnum.SUMMARY: 
     340      button.disabled = true; 
     341      button.setAttribute("tooltiptext", ""); 
     342      break; 
     343    case ainspector.viewConst.DETAILS: 
     344      button.disabled = false; 
     345      button.setAttribute("tooltiptext", (previousView > ainspector.viewEnum.ALL_RULES) ? 
     346        nls.getString("button.tooltip.backToGuideline") : 
     347        nls.getString("button.tooltip.backToCategory")); 
     348      break; 
     349    default: 
     350      button.disabled = false; 
     351      button.setAttribute("tooltiptext", nls.getString("button.tooltip.backToSummary")); 
     352      break; 
     353  } 
     354}; 
     355 
     356/** 
    326357 * @function updateView 
    327358 * 
     
    336367 
    337368  ainspectorSidebar.closePageInspector(); 
     369  ainspectorSidebar.setBackButtonState(); 
    338370  ainspectorSidebar.viewTitle.value = ainspectorSidebar.getViewTitle(parent.AINSPECTOR.currentView); 
    339371 
     
    405437  ainspector.log.debug("selectPreviousView: " + ainspector.getViewName(parent.AINSPECTOR.previousView)); 
    406438 
    407   ainspectorSidebar.closePageInspector(); 
    408  
    409439  // remove highlighting 
    410440  ainspectorSidebar.highlightModule.removeHighlight(content.document); 
     
    415445  // update viewTitle 
    416446  ainspectorSidebar.viewTitle.value = ainspectorSidebar.getViewTitle(parent.AINSPECTOR.currentView); 
     447 
     448  // manage Inspector and Back button states 
     449  ainspectorSidebar.closePageInspector(); 
     450  ainspectorSidebar.setBackButtonState(); 
    417451 
    418452  // select rule category template 
  • trunk/proto-15/chrome/content/ai-sidebar.xul

    r240 r261  
    149149  <hbox align="center"> 
    150150    <label id="ainspector-view-title" class="header-label"/> 
    151     <spacer flex="5"/> 
     151    <spacer flex="4"/> 
     152    <button id="ainspector-back-button" 
     153    label="&ai-button.label.back;" 
     154    image="chrome://ai-sidebar/skin/back-button.png" 
     155    style="margin-left: 0px; margin-right: 2px; min-width: 0" 
     156    oncommand="ainspectorSidebar.backOneLevel()"/> 
    152157    <button id="ainspector-views-button"/> 
    153158  </hbox> 
  • trunk/proto-15/chrome/content/view-category.xul

    r258 r261  
    100100    </tree> 
    101101 
    102     <spacer height="14"/> 
     102    <spacer height="10"/> 
    103103 
    104104    <vbox> 
    105       <hbox style="padding: 3px 0"> 
     105      <hbox align="center" style="padding: 2px 0"> 
    106106        <label class="header-label" value="&ai-label.selectedRule;"/> 
     107        <spacer flex="2"/> 
     108        <button id="ainspector-rule-details-button" 
     109          label="&ai-button.label.ruleDetails;" 
     110          image="chrome://ai-sidebar/skin/fwd-button.png" dir="reverse" 
     111          tooltiptext="&ai-button.tooltip.ruleDetails;" 
     112          style="margin: 0; min-width: 0" 
     113          oncommand="ainspectorSidebar.selectView(ainspector.viewConst.DETAILS)"/> 
    107114      </hbox> 
    108115    </vbox> 
     
    111118      width="360" height="108"/> 
    112119 
    113     <spacer height="6"/> 
     120    <!--spacer height="2"/--> 
    114121 
    115     <vbox> 
     122    <!--vbox> 
    116123      <hbox> 
    117         <button 
    118           label="&ai-button.label.back;" 
    119           image="chrome://ai-sidebar/skin/back-button.png" 
    120           tooltiptext="&ai-button.tooltip.backToSummary;" 
    121           style="margin-left: 0px; margin-right: 0; min-width: 0" 
    122           oncommand="ainspectorSidebar.selectView(ainspector.viewEnum.SUMMARY)"/> 
    123124        <button id="ainspector-rule-details-button" 
    124125          label="&ai-button.label.ruleDetails;" 
    125126          image="chrome://ai-sidebar/skin/fwd-button.png" dir="reverse" 
    126127          tooltiptext="&ai-button.tooltip.ruleDetails;" 
    127           style="margin-left: 2px; min-width: 0" 
     128          style="margin-left: 0px; min-width: 0" 
    128129          oncommand="ainspectorSidebar.selectView(ainspector.viewConst.DETAILS)"/> 
    129130      </hbox> 
    130     </vbox> 
     131    </vbox--> 
    131132 
    132133  </vbox> 
  • trunk/proto-15/chrome/content/view-details.js

    r255 r261  
    3838 
    3939  // update summary grid 
    40   summary.setData(ainspectorSidebar.getRuleResultSummaryData(ruleResult)); 
     40  // summary.setData(ainspectorSidebar.getRuleResultSummaryData(ruleResult)); 
    4141 
    4242  // update element results 
     
    8383  // clear summary grid 
    8484  var summary = ainspectorSidebar.ruleDetailsSummary; 
    85   summary.setData(ainspector.nullData); 
     85  // summary.setData(ainspector.nullData); 
    8686 
    8787  // close Page Inspector and disable Inspect Element button 
  • trunk/proto-15/chrome/content/view-details.xul

    r258 r261  
    8989    </tabbox> 
    9090 
    91     <spacer height="10"/> 
     91    <!--spacer height="10"/--> 
    9292 
    93     <vbox> 
     93    <vbox hidden="true"> 
    9494      <hbox> 
    9595        <spacer flex="4"/> 
     
    105105    </vbox> 
    106106 
    107     <spacer height="10"/> 
     107    <spacer height="2"/> 
    108108 
    109109    <vbox> 
    110110      <hbox align="baseline"> 
    111111        <button 
    112           label="&ai-button.label.back;" 
    113           image="chrome://ai-sidebar/skin/back-button.png" 
    114           tooltiptext="&ai-button.tooltip.backToCategory;" 
    115           style="margin-left: 0px; margin-right: 0; min-width: 0" 
    116           oncommand="ainspectorSidebar.selectPreviousView()"/> 
    117         <button 
    118112          id="ainspector-inspect-element" 
    119113          label="&ai-button.label.inspect;" 
    120114          tooltiptext="&ai-button.tooltip.inspect;" 
    121           style="margin-left: 2px; min-width: 0" 
     115          style="margin-left: 0px; min-width: 0" 
    122116          oncommand="ainspectorSidebar.inspectSelectedElement()"/> 
    123         <spacer flex="1"/> 
     117        <spacer flex="2"/> 
    124118        <description>Highlight: </description> 
    125119        <menulist id="ainspector-highlight-option" 
  • trunk/proto-15/chrome/locale/en-US/ai-sidebar.dtd

    r257 r261  
    1111<!ENTITY ai-button.label.views             "Views"> 
    1212 
    13 <!ENTITY ai-button.tooltip.backToCategory  "Back to Rule Category view"> 
    14 <!ENTITY ai-button.tooltip.backToGuideline "Back to WCAG Guideline view"> 
    15 <!ENTITY ai-button.tooltip.backToSummary   "Back to Summary view"> 
    1613<!ENTITY ai-button.tooltip.evaluate        "Re-evaluate current page"> 
    1714<!ENTITY ai-button.tooltip.inspect         "View element details with the Inspector tool"> 
    1815<!ENTITY ai-button.tooltip.preferences     "Open Preferences dialog"> 
    1916<!ENTITY ai-button.tooltip.reports         "Generate HTML report"> 
    20 <!ENTITY ai-button.tooltip.ruleDetails     "Rule Result details"> 
     17<!ENTITY ai-button.tooltip.ruleDetails     "Selected Rule Result details"> 
    2118<!ENTITY ai-button.tooltip.sort            "Apply default sorting"> 
    2219<!ENTITY ai-button.tooltip.toggle          "Show/Hide &ai-sidebar.title;"> 
     
    7976<!ENTITY ai-summary.tooltip.category  "Rule Category"> 
    8077<!ENTITY ai-summary.tooltip.guideline "WCAG Guideline"> 
    81 <!ENTITY ai-summary.tooltip.viol      "Violations"> 
    82 <!ENTITY ai-summary.tooltip.warn      "Warnings"> 
    83 <!ENTITY ai-summary.tooltip.mc        "Manual checks"> 
    84 <!ENTITY ai-summary.tooltip.pass      "Passes"> 
    85 <!ENTITY ai-summary.tooltip.hidden    "Hidden"> 
     78<!ENTITY ai-summary.tooltip.viol      "Violations (number of rules)"> 
     79<!ENTITY ai-summary.tooltip.warn      "Warnings (number of rules)"> 
     80<!ENTITY ai-summary.tooltip.mc        "Manual checks (number of rules)"> 
     81<!ENTITY ai-summary.tooltip.pass      "Passes (number of rules)"> 
     82<!ENTITY ai-summary.tooltip.hidden    "Hidden (number of rules)"> 
    8683 
    8784<!-- rule details labels and tooltips --> 
  • trunk/proto-15/chrome/locale/en-US/ai-sidebar.properties

    r255 r261  
    7373element.no-results = no elements 
    7474 
     75# Button Tooltips 
     76 
     77button.tooltip.backToCategory  = Back to Category view 
     78button.tooltip.backToGuideline = Back to Guideline view 
     79button.tooltip.backToSummary   = Back to Summary view 
     80 
     81# Dialog Text 
     82 
     83inspector.notEnabled.title = Firefox Inspector Not Enabled 
     84inspector.notEnabled.message = Please enable the Firefox Inspector to use the \u2035Inspect Element\u2032 feature. 
     85 
    7586# Preference Options 
    7687 
     
    8495option.recommended-rules.yes = Included 
    8596option.recommended-rules.no  = Excluded 
    86  
    87 inspector.notEnabled.title = Firefox Inspector Not Enabled 
    88 inspector.notEnabled.message = Please enable the Firefox Inspector to use the \u2035Inspect Element\u2032 feature. 
  • trunk/proto-15/install.rdf

    r257 r261  
    1010        <em:name>AInspector Sidebar</em:name> 
    1111        <em:type>2</em:type> 
    12         <em:version>0.15.1</em:version> 
     12        <em:version>0.15.2</em:version> 
    1313 
    1414        <em:targetApplication> 
Note: See TracChangeset for help on using the changeset viewer.