Changeset 178


Ignore:
Timestamp:
05/15/13 13:12:19 (6 years ago)
Author:
nhoyt
Message:

ai-common.js

  • added ainspector.html namespace

ff-overlay.js

  • added ainspector.utils namespace for utils.js and inspection.js symbols

view-category.js, view-details.js

  • modified references to ainspector.html objects

Previous Commit (rev 177):

view-details.js, view-details.xul

  • added summary grid to rule details view
Location:
trunk/proto-13/chrome/content
Files:
4 edited

Legend:

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

    r172 r178  
    5050  }, 
    5151 
    52   // XHTML styling objects 
    53   h2FirstStyle: { "style": "margin: 0; margin-top: 0; font-size: inherit; font-weight: bold" }, 
    54   h2Style:      { "style": "margin: 0; margin-top: 1em; font-size: inherit; font-weight: bold" }, 
    55   pStyle:       { "style": "margin: 0" }, 
    56   ulStyle:      { "style": "margin: 0; padding: 0; padding-left: 2em" } 
     52  // HTML styling objects 
     53  html: { 
     54    h2FirstStyle: { "style": "margin: 0; margin-top: 0; font-size: inherit; font-weight: bold" }, 
     55    h2Style:      { "style": "margin: 0; margin-top: 1em; font-size: inherit; font-weight: bold" }, 
     56    pStyle:       { "style": "margin: 0" }, 
     57    ulStyle:      { "style": "margin: 0; padding: 0; padding-left: 2em" } 
     58  } 
    5759}; 
  • trunk/proto-13/chrome/content/ff-overlay.js

    r176 r178  
    66 
    77Components.utils.import("chrome://ai-sidebar/content/ai-common.js"); 
    8 Components.utils.import("chrome://ai-sidebar/content/utilities/utils.js", ainspector); 
    98Components.utils.import("chrome://ai-sidebar/content/utilities/logging.js", ainspector); 
    10 Components.utils.import("chrome://ai-sidebar/content/utilities/inspection.js", ainspector); 
     9 
     10// namespace container for utilities 
     11ainspector.utils = {}; 
     12 
     13// import Enum 
     14Components.utils.import("chrome://ai-sidebar/content/utilities/utils.js", ainspector.utils); 
     15 
     16// import getProperties, getMethods, et al. 
     17Components.utils.import("chrome://ai-sidebar/content/utilities/inspection.js", ainspector.utils); 
    1118 
    1219// create constants for view selection 
    13 ainspector.viewEnum = new ainspector.Enum(ainspector.viewStrings); 
     20ainspector.viewEnum = new ainspector.utils.Enum(ainspector.viewStrings); 
    1421 
    1522// create constants for view types 
    16 ainspector.viewType = new ainspector.Enum(['SUMMARY', 'CATEGORY', 'DETAILS']); 
     23ainspector.viewType = new ainspector.utils.Enum(['SUMMARY', 'CATEGORY', 'DETAILS']); 
    1724 
    18 // Important: value of DETAILS constant must be distinct from all values in viewEnum 
    19 ainspector.viewConst = { 
    20   DETAILS: -1 
    21 }; 
     25// IMPORTANT: value of DETAILS constant must be distinct from all values in viewEnum 
     26ainspector.viewConst = { DETAILS: -1 }; 
    2227 
    2328// create constant for tab attribute 
     
    150155  parent.AINSPECTOR.startTime = Date.now(); 
    151156  for (var mult = 1; mult <= 4; mult++) setTimeout(ainspector.closeSidebarIfOpen, 150 * mult); 
     157 
     158  /* check namespace setup 
     159  ainspector.logger.log.debug(ainspector.utils.getProperties(ainspector, "ainspector")); 
     160  ainspector.logger.log.debug(ainspector.utils.getMethods(ainspector, "ainspector")); 
     161  */ 
    152162}; 
    153163 
  • trunk/proto-13/chrome/content/view-category.js

    r176 r178  
    302302 
    303303  var h2, p; 
    304   var h2FirstStyle = ainspector.h2FirstStyle; 
    305   var h2Style = ainspector.h2Style; 
    306   var pStyle  = ainspector.pStyle; 
     304  var h2FirstStyle = ainspector.html.h2FirstStyle; 
     305  var h2Style = ainspector.html.h2Style; 
     306  var pStyle  = ainspector.html.pStyle; 
    307307  var vbox = ainspectorSidebar.selectedRule; 
    308308 
  • trunk/proto-13/chrome/content/view-details.js

    r177 r178  
    129129  var getHTML = ainspectorSidebar.createXHTMLElement; 
    130130  var h2, p; 
    131   var h2FirstStyle = ainspector.h2FirstStyle; 
    132   var h2Style = ainspector.h2Style; 
    133   var pStyle  = ainspector.pStyle; 
     131  var h2FirstStyle = ainspector.html.h2FirstStyle; 
     132  var h2Style = ainspector.html.h2Style; 
     133  var pStyle  = ainspector.html.pStyle; 
    134134 
    135135  var vbox = document.getElementById("ainspector-details-summary"); 
     
    162162  var getHTML = ainspectorSidebar.createXHTMLElement; 
    163163  var h2, p, ul, li, a; 
    164   var h2FirstStyle = ainspector.h2FirstStyle; 
    165   var h2Style = ainspector.h2Style; 
    166   var pStyle  = ainspector.pStyle; 
    167   var ulStyle = ainspector.ulStyle; 
     164  var h2FirstStyle = ainspector.html.h2FirstStyle; 
     165  var h2Style = ainspector.html.h2Style; 
     166  var pStyle  = ainspector.html.pStyle; 
     167  var ulStyle = ainspector.html.ulStyle; 
    168168 
    169169  var vbox = document.getElementById("ainspector-details-rule-info"); 
Note: See TracChangeset for help on using the changeset viewer.