Sha256: d57d495a9fc1467ab66a211296102ff95fad7c69baaa4e40820a5e504b28643d

Contents?: true

Size: 1.91 KB

Versions: 11

Compression:

Stored size: 1.91 KB

Contents

// ==========================================================================
// Project:   Showcase
// Copyright: ©2012 7x7 Software, Inc.
// License:   Licensed under MIT license
// ==========================================================================
/*globals Showcase */
sc_require('system/views_item_content.js');
sc_require('views/views_list_view.js');


/**
  This pre-configured view demonstrates SC.ListView.
*/
Showcase.listViews = SC.ScrollView.design({
  contentView: Showcase.ViewsListView.design({
    content: [
      Showcase.ViewsItemContent.create({
        title: 'Regular',
        example: "SC.ScrollView.extend({  classNames: ['my-scroll-view'],  layout: { left: 20, right: 20, top: 20, bottom: 20 },  contentView:  SC.ListView.extend({  classNames: ['my-list-view'],  rowHeight: 48,  contentBinding: SC.Binding.oneWay('Showcase.collectionItems'),  exampleView: SC.ListItemView.extend({  hasContentIcon: true,  hasContentRightIcon: true,  contentCheckboxKey: 'isSelected',  contentIconKey: 'icon',  contentRightIconKey: 'rightIcon',  contentValueKey: 'title'  })  })  })"
      }),
      Showcase.ViewsItemContent.create({
        title: 'Editable',
        example: "SC.ScrollView.extend({  classNames: ['my-scroll-view'],  layout: { left: 20, right: 20, top: 20, bottom: 20 },  contentView:  SC.ListView.extend({  canDeleteContent: true,  canEditContent: true,  canReorderContent: true,  classNames: ['my-list-view'],  rowHeight: 48,  contentBinding: SC.Binding.oneWay('Showcase.editableCollectionItems'),  exampleView: SC.ListItemView.extend({  hasContentIcon: true,  hasContentRightIcon: true,  contentCheckboxKey: 'isSelected',  contentIconKey: 'icon',  contentRightIconKey: 'rightIcon',  contentValueKey: 'title'  })  })  })",
        supportAction: function() {
          Showcase.propertyDidChange('editableCollectionItems');
        },
        supportTitle: 'Reset Content'
      })
    ],
    exampleHeight: 420
  })
});

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sproutcore-1.11.0 lib/frameworks/sproutcore/apps/showcase/views/list_views.js
sproutcore-1.11.0.rc3 lib/frameworks/sproutcore/apps/showcase/views/list_views.js
sproutcore-1.11.0.rc2 lib/frameworks/sproutcore/apps/showcase/views/list_views.js
sproutcore-1.11.0.rc1 lib/frameworks/sproutcore/apps/showcase/views/list_views.js
sproutcore-1.10.3.1 lib/frameworks/sproutcore/apps/showcase/views/list_views.js
sproutcore-1.10.2 lib/frameworks/sproutcore/apps/showcase/views/list_views.js
sproutcore-1.10.1 lib/frameworks/sproutcore/apps/showcase/views/list_views.js
sproutcore-1.10.0 lib/frameworks/sproutcore/apps/showcase/views/list_views.js
sproutcore-1.10.0.rc.3 lib/frameworks/sproutcore/apps/showcase/views/list_views.js
sproutcore-1.10.0.rc.2 lib/frameworks/sproutcore/apps/showcase/views/list_views.js
sproutcore-1.10.0.rc.1 lib/frameworks/sproutcore/apps/showcase/views/list_views.js