Skip to content

@mattdipasquale /body.rhtml
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
SC custom test view
<%= view :test_view, :view => 'Admin.TestView',
:bind => {:value => 'Admin.masterController.test'} %>
// ==========================================================================
// Admin.TestView
// ==========================================================================
require('core');
require('views/label');
require('views/view');
require('mixins/delegate_support');
/** @class
(Document Your View Here)
@extends SC.View
@author AuthorName
@version 0.1
*/
Admin.TestView = SC.View.extend(SC.DelegateSupport,
/** @scope Admin.TestView.prototype */ {
emptyElement: '<span class="cell-label"></span>',
value: 'work please',
render: function() {
var html = [];
var value = this.get('value');
var cellLabel = this.outlet('cellLabel');
cellLabel.set('value', value);
// the newlines and spaces are for well formatted html
html.push('<span class="cell-label"></span>');
// Finally set the innerHTML of the view
html = html.join('');
this.set('innerHTML', html);
}.observes('value'),
/** @private */
cellLabel: SC.LabelView.extend({
isEditable: YES,
}).outletFor('.cell-label?'),
}) ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.