Browse Source

Update trait view

pull/36/head
Artur Arseniev 9 years ago
parent
commit
78f1de416d
  1. 2
      src/rich_text_editor/config/config.js
  2. 9
      src/trait_manager/view/TraitView.js

2
src/rich_text_editor/config/config.js

@ -24,7 +24,7 @@ define(function () {
command: 'insertHTML',
title: 'Link',
class: 'fa fa-link',
args: '<a href="">${content}</a>',
args: '<a class="link" href="">${content}</a>',
}/*,{
command: 'fontSize',
options: [

9
src/trait_manager/view/TraitView.js

@ -75,14 +75,17 @@ define(['backbone'], function (Backbone) {
getInputEl: function() {
if(!this.$input){
var md = this.model;
var trg = this.target;
var name = md.get('name');
var opts = {
placeholder: md.get('placeholder') || md.get('default'),
type: md.get('type') || 'text',
value: md.get('value')
type: md.get('type') || 'text'
};
if(md.get('changeProp')){
opts.value = this.target.get(name);
opts.value = trg.get(name);
}else{
var attrs = trg.get('attributes');
opts.value = md.get('value') || attrs[name];
}
if(md.get('min'))
opts.min = md.get('min');

Loading…
Cancel
Save