Sha256: 39cad28de4770d56a9474b349e39fb2e4588ee62a4d99d4895a8714977c3c734

Contents?: true

Size: 1.29 KB

Versions: 53

Compression:

Stored size: 1.29 KB

Contents

{!
function keys(o) {
  var keys = [];
  for (var k in o) { keys.push(k); }
  return keys;
}

function groupName(path) {
  var parts = path.split('/') ;
  
  var rootIndex = parts.indexOf('frameworks') ;
  if (rootIndex < 0) rootIndex = parts.indexOf('clients') ;
  
  if (rootIndex < 0) {
    return parts[parts.length - 2] ;
    
  } else {
    return parts.slice(rootIndex+2, parts.length-1).join('/') ;
  }
};

function getSymbols(thisClass) {
  var ret = [thisClass.alias.toLowerCase()] ;
  var len = thisClass.properties.length ;
  
  while (--len>=0) {
    ret.push(thisClass.properties[len].alias.toLowerCase()) ;
  }
  
  return ret.join(' ') ;
};

!}
{ records: [
  <for each="thisClass" in="data">
    <if test="groupName(thisClass.srcFile) !== undefined">
      { "type": "Doc", 
        "guid": "{+(thisClass.alias)+}", 
        <if test="!(thisClass.alias == 'SC')">
          "title": "{+(thisClass.alias)+}",
        </if>
        <if test="(thisClass.alias == 'SC')">
          "title": "SproutCore (SC)",
        </if>
        "url": "{+(thisClass.alias)+}.html",
        <if test="!(thisClass.alias == 'SC')">
          "group": "{+groupName(thisClass.srcFile)+}",
        </if>
        "symbols": "{+getSymbols(thisClass)+}",
        "path": "{+thisClass.srcFile+}"
      },
    </if>
  </for>
  ]
}

Version data entries

53 entries across 53 versions & 2 rubygems

Version Path
sproutit-sproutcore-1.0.20090721145236 vendor/jsdoc/templates/sproutcore/index.tmpl
sproutcore-1.6.0.rc.1-x86-mingw32 lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.6.0.rc.1 lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.6.0.rc.1-java lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.6.0.beta.3-x86-mingw32 lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.6.0.beta.3-java lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.6.0.beta.3 lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.6.0.beta.2-x86-mingw32 lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.6.0.beta.2-java lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.6.0.beta.2 lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.6.0.beta.1 lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.5.0-java lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.5.0 lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.5.0.rc.2 lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.5.0.rc.1 lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.5.0.pre.5 lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.5.0.pre.4.1 lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.5.0.pre.4 lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.5.0.pre.3 lib/doc_templates/sproutcore/classes-json.tmpl
sproutcore-1.4.5 lib/doc_templates/sproutcore/classes-json.tmpl