Sha256: 5290907271fa881c1eb025e4f669cda579610b7726c94a2878b2db51ee69ef3e

Contents?: true

Size: 1.18 KB

Versions: 7

Compression:

Stored size: 1.18 KB

Contents

// ==========================================================================
// Project:   Greenhouse.PlistItemView
// Copyright: ©2009 Mike Ball
// ==========================================================================
/*globals Greenhouse */
/** @class

  This class is here to receive custom editor events
  @extends SC.View
*/
Greenhouse.PlistItemView = SC.ListItemView.extend(
/** @scope Greenhouse.ListItem.prototype */ {
 
 
 render: function(context, firstTime){
   var content = this.get('content'),
       del     = this.displayDelegate,
       key, value;
   
   // handle label -- always invoke
   key = this.getDelegateProperty('contentValueKey', del) ;
   value = (key && content) ? (content.get ? content.get(key) : content[key]) : content ;
   if (value && SC.typeOf(value) !== SC.T_STRING) value = value.toString();
   if (this.get('escapeHTML')) value = SC.RenderContext.escapeHTML(value);
   value = value + ": " + content.get('value');
   
   this.renderLabel(context, value);
   
   //this.renderValue(context, content);
 },
 
 renderValue: function(context, content){
   
   context.begin('span')
     .addStyle({left: '50%'})
     .push(content.get('value'))
   .end();
 }
});

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sproutcore-1.4.0.rc.5 lib/frameworks/sproutcore/apps/greenhouse/views/plist_item.js
sproutcore-1.4.0.rc.4 lib/frameworks/sproutcore/apps/greenhouse/views/plist_item.js
sproutcore-1.4.0.rc.3 lib/frameworks/sproutcore/apps/greenhouse/views/plist_item.js
sproutcore-1.4.0.rc.2 lib/frameworks/sproutcore/apps/greenhouse/views/plist_item.js
sproutcore-1.4.0.rc lib/frameworks/sproutcore/apps/greenhouse/views/plist_item.js
sproutcore-1.0.1049.pre.2 lib/frameworks/sproutcore/apps/greenhouse/views/plist_item.js
sproutcore-1.0.1049.pre.1 frameworks/sproutcore/apps/greenhouse/views/plist_item.js