Skip to content

Commit b30ff48

Browse files
committed
Small edits and bug fixes.
1 parent 13cff6b commit b30ff48

9 files changed

Lines changed: 31 additions & 5 deletions

File tree

Gruntfile.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,16 @@ module.exports = function (grunt) {
263263
grunt.registerTask('header', 'Evolutility version', function(arg1) {
264264
var pkg=grunt.file.readJSON('package.json');
265265
console.log(
266+
(new Date()).toString() + '\n' +
266267
'\n ______ _ _ _ _ \n'+
267268
' | ____| | | /| (_) (_)/|\n'+
268269
' | |____ _____ | |_ _| |_ _| |_| |_ _ _ \n'+
269270
' | __\\ \\ / / _ \\| | | | | __| | | | __| | | |\n'+
270271
' | |___\\ V / (_) | | |_| | |_| | | | |_| |_| |\n'+
271272
' |______\\_/ \\___/|_|\\__,_|\\__|_|_|_|\\__|\\__, |\n'+
272273
' __/ |\n'+
273-
' |___/ ' + arg1 + ' '+ pkg.version
274+
' |___/ ' +
275+
arg1 + ' '+ pkg.version
274276
);
275277
});
276278
// *************************************************************************************

demo/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
<li><a href="javascript:showApp('contact')" data-id="contact">addressbook</a></li>
3737
<li><a href="javascript:showApp('winecellar')" data-id="winecellar">wine cellar</a></li>
3838
<li><a href="javascript:showApp('comics', 'cards')" data-id="comics">graphic novels</a></li>
39-
<li><a href="custom-app.html" data-id="custom">your custom app</a></li>
4039
</ul>
4140
</li>
4241
<li><a href="../doc/index.html">doc</a></li>

js/dico/def.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ return {
5050
isViewMany: function(viewName){
5151
return viewName==='list' || viewName==='cards' || viewName==='charts' || viewName==='bubbles';
5252
},
53+
54+
isViewCollection: function(viewName){
55+
return viewName==='list' || viewName==='cards';
56+
},
5357

5458
fieldInCharts: function (f) {
5559
return (_.isUndefined(f.inCharts) || f.inCharts) && Evol.Def.fieldChartable(f);

js/dico/dico.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,21 @@ return {
407407
};
408408
},
409409

410+
bbComparatorFormula: function(fid, fn){
411+
return function(modelA, modelB) {
412+
var mA = fn(modelA),
413+
mB = fn(modelB);
414+
if(mA<mB){
415+
return 1;
416+
}
417+
if(mB<mA){
418+
return -1;
419+
}
420+
return 0;
421+
// return (fn(modelA)||'').localeCompare(fn(modelB)||'');
422+
};
423+
},
424+
410425
sortingNumber: function(fid){
411426
return function(modelA, modelB) {
412427
if(modelA[fid]<modelB[fid]){

js/dico/toolbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ return Backbone.View.extend({
222222
this.model.collection=collec;
223223
}
224224
vw=this.viewsHash[viewName];
225-
if(vw.setCollection){
225+
if(vw && vw.setCollection){
226226
vw.setCollection(collec);
227227
}
228228
if(this.model && !this.model.isNew()){

js/ui-models/apps/comics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ uiModels.comics = {
4747
id: 'language', attribute: 'language', type: 'lov', label: 'Language', width: 38, inMany: true,
4848
list: [
4949
{id: 'FR', text: 'French', icon:'flag_fr.gif'},
50-
{id: 'EN', text: 'English', icon:'flag_us.gif'}
50+
{id: 'EN', text: 'American', icon:'flag_us.gif'}
5151
]
5252
},
5353
{

js/view-many/many-bubbles.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ Evol.ViewMany.Bubbles = Evol.View_Many.extend({
122122

123123
},
124124

125+
_HTMLlegend: function(){
126+
// todo
127+
},
128+
125129
_$body: function(){
126130
return this.$('.evol-bubbles-body');
127131
},

js/view-many/many.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ return Backbone.View.extend({
316316
var sel = this.getSelection();
317317
if (f.type == fts.text || f.type == fts.textml || f.type == fts.email) {
318318
collec.comparator = eDico.bbComparatorText(f.id);
319+
} else if (f.type === fts.formula) {
320+
collec.comparator = eDico.bbComparatorFormula(f.id, f.formula);
319321
} else if (f.value) {
320322
collec.comparator = f.value;
321323
} else {

js/view-one/one.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ return Backbone.View.extend({
643643
_.each(fs, function (f) {
644644
h.push('<td>');
645645
if(row[f.id]){
646-
if(f.type===fts.bool || f.type===fts.lov){
646+
if(f.type===fts.bool || f.type===fts.lov || f.type===fts.pix){
647647
h.push(eDico.fieldHTML_RO(f, row[f.id], Evol.hashLov, iconsPath));
648648
}else{
649649
h.push(_.escape(eDico.fieldHTML_RO(f, row[f.id], Evol.hashLov, iconsPath)));

0 commit comments

Comments
 (0)