Beispiel #1
0
  createDom: function() {
  _$jscoverage['/control.js'].functionData[1]++;
  _$jscoverage['/control.js'].lineData[43]++;
  var self = this, Render = self.get('xrender'), view = self.get('view'), id = self.get("id"), el;
  _$jscoverage['/control.js'].lineData[50]++;
  if (visit56_50_1(view)) {
    _$jscoverage['/control.js'].lineData[51]++;
    view.set('control', self);
  } else {
    _$jscoverage['/control.js'].lineData[53]++;
    self.set('view', this.view = view = new Render({
  control: self}));
  }
  _$jscoverage['/control.js'].lineData[57]++;
  view.create();
  _$jscoverage['/control.js'].lineData[58]++;
  el = view.getKeyEventTarget();
  _$jscoverage['/control.js'].lineData[59]++;
  if (visit57_59_1(!self.get("allowTextSelection"))) {
    _$jscoverage['/control.js'].lineData[60]++;
    el.unselectable();
  }
  _$jscoverage['/control.js'].lineData[63]++;
  Manager.addComponent(id, self);
}, 
Beispiel #2
0
 var Control = ControlProcess.extend({isControl:true, createDom:function() {
   var self = this, Render = self.get("xrender"), view = self.get("view"), id = self.get("id"), el;
   if(view) {
     view.set("control", self)
   }else {
     self.set("view", this.view = view = new Render({control:self}))
   }
   view.create();
   el = view.getKeyEventTarget();
   if(!self.get("allowTextSelection")) {
     el.unselectable()
   }
   Manager.addComponent(id, self)
 }, renderUI:function() {
Beispiel #3
0
 renderUI: function () {
     var self = this;
     // after create
     Manager.addComponent(self);
     var $el = self.$el;
     if (!self.get('allowTextSelection')) {
         $el.unselectable();
     }
     // need to insert created dom into body
     if (!self.get('srcNode')) {
         var render = self.get('render'),
             renderBefore = self.get('elBefore');
         if (renderBefore) {
             $el.insertBefore(renderBefore, undefined);
         } else if (render) {
             $el.appendTo(render, undefined);
         } else {
             $el.appendTo(doc.body, undefined);
         }
     }
 },
Beispiel #4
0
 createDom: function () {
     var self = this,
         Render = self.get('xrender'),
         view = self.get('view'),
         id = self.get('id'),
         el;
     // initialize view
     // allow custom view instance
     if (view) {
         view.set('control', self);
     } else {
         self.set('view', this.view = view = new Render({
             control: self
         }));
     }
     view.create();
     el = view.getKeyEventTarget();
     if (!self.get('allowTextSelection')) {
         el.unselectable();
     }
     // after retrieve id from srcNode
     Manager.addComponent(id, self);
 },