Sha256: 07eb991c87e49cf8033bee1fa3042213a3b960481a2d2aa95f95a1f9b4bff9dc

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2008-2011 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

Docs.MasterListView = SC.ListView.extend({

  detailPropertyPath: 'mainPage.mainPane.detailView.workspace.symbolList.contentView',

  keyDown: function(evt){

    if(evt.keyCode === 39) {
      var propPath = this.get('detailPropertyPath');
      var detailView = Docs.getPath(propPath);

      detailView.becomeFirstResponder();

      var sel = Docs.selectedClassController.get('symbolSelection');
      if (!sel || !sel.get('length')) {
        console.log('getting content');
        var firstObject = Docs.selectedClassController.getPath('symbols.firstObject');

        var sel = SC.SelectionSet.create();
        sel.addObjects([firstObject]).freeze();

        Docs.selectedClassController.set('symbolSelection',sel);
      }

      //return YES;
    }

    return sc_super();
  }
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sc-docs-0.0.3 lib/sc_docs/docs/apps/docs/views/master_list.js
sc-docs-0.0.2 lib/sc_docs/docs/apps/docs/views/master_list.js
sc-docs-0.0.1 lib/sc_docs/docs/apps/docs/views/master_list.js