Changeset 167


Ignore:
Timestamp:
05/01/13 04:34:59 (6 years ago)
Author:
nhoyt
Message:

datasource.js - Updated getSummaryData fn. to utilize new ResultSummary? API.
view-category.js - Updated getRuleResultStrings and getRulesData fns. to utilize new ResultSummary? API.
view-category.xul - Removed ignoreincolumnpicker attribute from Level column.
ai-sidebar.properties - Added rule.no-results string with unicode value for endash.

Location:
trunk/proto-13/chrome
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/proto-13/chrome/content/datasource.js

    r159 r167  
    156156ainspectorSidebar.getSummaryData = function (viewIndex) { 
    157157  var results = ainspectorSidebar.getRuleGroupResults(viewIndex); 
    158  
     158  var summary = results.getResultSummary(); 
     159   
    159160  // return null data if no results 
    160   if (!results.has_results) return ainspector.nullData; 
     161  if (!summary.hasResults()) return ainspector.nullData; 
    161162   
    162163  var data = { 
    163     pctpass: results.percent_passed, 
    164     viol:    results.violations_count, 
    165     warn:    results.warnings_count, 
    166     mc:      results.manual_checks_count 
     164    pctpass: summary.percent_passed, 
     165    viol:    summary.violations, 
     166    warn:    summary.warnings, 
     167    mc:      summary.manual_checks 
    167168  }; 
    168169 
  • trunk/proto-13/chrome/content/view-category.js

    r166 r167  
    3535    LEVEL_AAA:   nls.getString("rule.level.aaa"), 
    3636    REQUIRED_Y:  nls.getString("rule.required.yes"), 
    37     REQUIRED_N:  nls.getString("rule.required.no") 
     37    REQUIRED_N:  nls.getString("rule.required.no"), 
     38    NO_RESULTS:  nls.getString("rule.no-results") 
    3839  } 
    3940}; 
     
    5455  for (var i = 0; i < resultsCount; i++) { 
    5556    var filteredResult = filteredRuleResults[i]; 
     57    var summaryData = filteredResult.getResultSummary(); 
     58    var hasResults = summaryData.hasResults(); 
    5659    table.push({ 
    5760      "ainspector-rule-col":     filteredResult.getRuleSummary(), 
     
    5962      "ainspector-required-col": filteredResult.isRuleRequired(), 
    6063      "ainspector-wcag-sc-col":  filteredResult.getPrimarySuccessCriterion().id, 
    61       "ainspector-viol-col":     filteredResult.failures_count, 
    62       "ainspector-pass-col":     filteredResult.passed_count, 
    63       "ainspector-mc-col":       filteredResult.manual_checks_count, 
     64      "ainspector-viol-col":     hasResults ? summaryData.failures : -1, 
     65      "ainspector-pass-col":     hasResults ? summaryData.passed : -1, 
     66      "ainspector-mc-col":       hasResults ? summaryData.manual_checks : -1, 
    6467      filteredResult:            filteredResult 
    6568    }); 
     
    103106 
    104107      default: 
    105         return value; 
     108        return value === -1 ? resultStrings.NO_RESULTS : value; 
    106109        break; 
    107110    } 
  • trunk/proto-13/chrome/content/view-category.xul

    r165 r167  
    5656        <treecol id="ainspector-level-col" 
    5757          width="44" minwidth="44" maxwidth="60" 
    58           ignoreincolumnpicker="true" 
    5958          label="&ai-treecol.level;" 
    6059          style="text-align: left" 
  • trunk/proto-13/chrome/locale/en-US/ai-sidebar.properties

    r164 r167  
    4040rule.required.no  = N 
    4141 
     42rule.no-results = \u2013 
     43 
    4244# Preference Options 
    4345 
Note: See TracChangeset for help on using the changeset viewer.