Skip to content

Commit c0b27dd

Browse files
committed
Cleanups.
1 parent ecad705 commit c0b27dd

3 files changed

Lines changed: 14 additions & 15 deletions

File tree

js/dico.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Evol.Dico = function(){
3333
formula:'formula', // soon to be a field attribute rather than a field type
3434
email: 'email',
3535
pix: 'image',
36+
//geoloc: 'geolocation',
3637
//doc:'document',
3738
url: 'url',
3839
color: 'color',
@@ -150,7 +151,6 @@ return {
150151
h+='<div id="'+fid+'" class="form-control evol-ellipsis">'+fld.formula()+'</div>';
151152
break;
152153
case fts.color: // TODO is the color switch necessary?
153-
//h+=uiInput.colorBox(fid, fv)+fv;
154154
h+='<div id="'+fid+'" class="form-control">'+uiInput.colorBox(fid, fv)+'</div>';
155155
break;
156156
default:

js/many.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ return Backbone.View.extend({
107107
},
108108

109109
_render: function (models) {
110-
alert('_render must be overwritten');
110+
alert('_render must be overridden');
111111
},
112112

113113
_HTMLField: function (f, v) {

js/one.js

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -665,8 +665,7 @@ return Backbone.View.extend({
665665
_.each(vs, function(row, idx){
666666
h.push('<tr data-idx="'+idx+'">');
667667
if(editable){
668-
that._TDsFieldsEdit(h, uiPnl.elements, row);
669-
h.push(TDbPM);
668+
h.push(that._TDsFieldsEdit(uiPnl.elements, row)+TDbPM);
670669
}else{
671670
_.each(fs, function (f) {
672671
h.push('<td>');
@@ -698,18 +697,18 @@ return Backbone.View.extend({
698697
'</td></tr>';
699698
},
700699

701-
_TDsFieldsEdit: function(h, fs, m){
702-
var fv,
700+
_TDsFieldsEdit: function(fs, m){
701+
var h='',
702+
fv,
703703
iconPath=this.iconPath;
704704
_.each(fs, function (f) {
705705
fv=m[f.id];
706706
if(_.isUndefined(fv)){
707707
fv='';
708708
}
709-
h.push('<td>'+
710-
eDico.fieldHTML(f, f.id, fv, 'edit-details', iconPath, true)+
711-
'</td>');
709+
h+='<td>'+eDico.fieldHTML(f, f.id, fv, 'edit-details', iconPath, true)+'</td>';
712710
});
711+
return h;
713712
},
714713

715714
renderField: function (h, f, mode, iconsPath, skipLabel) {
@@ -1136,16 +1135,16 @@ return Backbone.View.extend({
11361135
evt.stopImmediatePropagation();
11371136
if(bId==='bPlus'){
11381137
// - Add row to details
1139-
var h=[],
1138+
var h='',
11401139
subCollecs=this.getSubCollecs(),
11411140
mid=tr.closest('table').data('mid'),
11421141
elems=(subCollecs[mid])?subCollecs[mid].elements:null;
1143-
h.push('<tr>');
1144-
this._TDsFieldsEdit(h, elems, {});
1145-
h.push('<td class="evo-td-plusminus">'+
1142+
h+='<tr>'+
1143+
this._TDsFieldsEdit(elems, {})+
1144+
'<td class="evo-td-plusminus">'+
11461145
eUI.buttonsPlusMinus()+
1147-
'</td></tr>');
1148-
$(h.join('')).insertAfter(tr);
1146+
'</td></tr>';
1147+
$(h).insertAfter(tr);
11491148
if(tr.data('id')==='nodata'){
11501149
tr.remove();
11511150
}

0 commit comments

Comments
 (0)