Skip to content

Commit ccf08bd

Browse files
committed
Small fixes.
1 parent 471bea9 commit ccf08bd

File tree

5 files changed

+20
-18
lines changed

5 files changed

+20
-18
lines changed

js/dico/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Evol.App = Backbone.View.extend({
163163

164164
if(Evol.Config){
165165
if(Evol.Config.localStorage){
166-
var lc = new Backbone.LocalStorage(this.prefix+uiModel.id);
166+
var lc = new Backbone.LocalStorage(this.prefix+(uiModel.table || uiModel.id));
167167
M = Backbone.Model.extend({
168168
localStorage: lc
169169
});

js/view-one/one.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ return Backbone.View.extend({
162162
_.each(this.getFields(), function (f) {
163163
$f=that.$field(f.id);
164164
if(isModel){
165-
fv=model.get(f.attribute || f.id);
165+
fv=model.get(f.attribute || f.id)||'';
166166
}else{
167-
fv=model[f.attribute || f.id];
167+
fv=model[f.attribute || f.id]||'';
168168
}
169169
if(f.readonly){
170170
switch(f.type){
@@ -785,7 +785,7 @@ return Backbone.View.extend({
785785
scInvalid = 0;
786786
_.each(scData, function(rowData, idx){
787787
_.each(sc.elements, function(f){
788-
if(that.validateField(f, f.type==='date' ? rowData[f.id].substring(0,10) : rowData[f.id])){
788+
if(that.validateField(f, (f.type==='date') ? (rowData[f.id]?rowData[f.id].substring(0,10):'') : rowData[f.id])){
789789
trs.eq(idx).find('#'+f.id).parent().addClass('has-error');
790790
scInvalid++;
791791
}

less/demo.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ h1,h2,h3,h4{
2020
.demo-links{
2121
>div {
2222
display: inline-block;
23-
margin: 10px 0 20px 30px;
23+
margin: 10px 0 20px 16px;
2424
}
2525
}
2626
.mt20{

less/many.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
> div {
1515
overflow-x: auto;
16+
overflow-y: hidden;
1617
> .table {
1718

1819
margin-bottom: 0;

ui-models/comics.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ uiModels.comics = {
2323
{
2424
id: 'title', attribute: 'title', type: 'text', label: 'Title', required: true,
2525
maxLength: 255,
26-
width: 62, inMany: true
26+
width: 100, inMany: true
27+
},
28+
{
29+
id: 'authors', attribute: 'authors', type: 'text', width: 62, inMany: true,
30+
label: 'Authors'
2731
},
2832
{
2933
id: 'genre', attribute: 'genre', type: 'lov', label: 'Genre', width: 38, inMany: true,
@@ -43,17 +47,6 @@ uiModels.comics = {
4347
{id: 'wwest', text: 'Western'}
4448
]
4549
},
46-
{
47-
id: 'authors', attribute: 'authors', type: 'text', width: 62, inMany: true,
48-
label: 'Authors'
49-
},
50-
{
51-
id: 'language', attribute: 'language', type: 'lov', label: 'Language', width: 38, inMany: true,
52-
list: [
53-
{id: 'FR', text: 'French', icon:'flag_fr.gif'},
54-
{id: 'EN', text: 'American', icon:'flag_us.gif'}
55-
]
56-
},
5750
{
5851
id: 'serie_nb', attribute: 'serie_nb', type: 'integer', width: 15, inMany: false,
5952
label: 'Albums', inCharts:false
@@ -74,8 +67,16 @@ uiModels.comics = {
7467
id: 'finished', attribute: 'finished', type: 'boolean', width: 19, inMany: true,
7568
label: 'Finished', labelTrue:'Finished', labelFalse:'Not finished', css:'cBlue'
7669
},
70+
71+
{
72+
id: 'language', attribute: 'language', type: 'lov', label: 'Language', width: 30, inMany: true,
73+
list: [
74+
{id: 'FR', text: 'French', icon:'flag_fr.gif'},
75+
{id: 'EN', text: 'American', icon:'flag_us.gif'}
76+
]
77+
},
7778
{
78-
id:'amazon', label:'Amazon', type:'formula', width:62, css:'evol-ellipsis',
79+
id:'amazon', label:'Amazon', type:'formula', width:32, css:'evol-ellipsis',
7980
formula:function(m){
8081
if(m){
8182
var urlData=m.get('title')+' '+(m.get('authors')||''),

0 commit comments

Comments
 (0)