evolutility
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "evolutility", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"homepage": "https://github.com/evoluteur/evolutility", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -1,2 +0,2 @@ | ||
/* evolutility v1.0 sample UI-models and data: todo, addressbook, wine cellar. */ | ||
/* evolutility v1.0.1 sample UI-models and data: todo, addressbook, wine cellar. */ | ||
var uiModels=uiModels||{};uiModels.todo_data=[{id:"1",title:"Release Evolutility v1",priority:"3",category:"others",complete:!1,description:"10 generic views + a ui-modeling language.",notes:""},{id:"2",title:"Fix open bugs",duedate:"2014-07-25",priority:"3",category:"work",complete:!1,description:"bla bla"},{id:"3",title:"Testing App",duedate:"2014-06-11",priority:"3",category:"work",complete:!1,description:"test"},{id:"4",title:"Prepare demo",duedate:"2014-05-12",priority:"1",category:"work",complete:!1,description:"Check this out"},{id:"5",title:"Test latest code",priority:"5",category:"misc",complete:!0,description:"notes for my test todo task."},{id:"6",title:"Car wash",priority:"4",category:"work",complete:!1},{id:"7",title:"Watch Inception",duedate:"2014-01-10",priority:"5",category:"fun",complete:!0},{id:"8",title:"Test TODO",duedate:"2015-01-01",priority:"1",category:"work",complete:!0,description:"Test TODO "},{id:"9",title:"Car wash",priority:"4",category:"work",complete:!1},{id:"10",title:"French translation",priority:"4",category:"work"},{id:"11",title:"Italian translation",priority:"4",category:"work"},{id:"12",title:"Chinese translation",priority:"4",category:"work"},{id:"13",title:"Japanese translation",priority:"4",category:"work"},{id:"14",title:"German translation",priority:"4",category:"work"},{id:"15",title:"Russian translation",priority:"4",category:"work"},{id:"16",title:"Polish translation",priority:"4",category:"work"},{id:"17",title:"Klingon translation",priority:"4",category:"work"},{id:"18",title:"Code optimization",duedate:"2015-01-01",priority:"4",category:"work",complete:!1},{id:"19",title:"Setup demo server",priority:"2",category:"work",complete:!1},{id:"20",title:"Add sample data",duedate:"2014-04-23",priority:"3",category:"work",complete:!0},{id:"21",title:"Make proposal",priority:"2",category:"misc",complete:!1},{id:"22",title:"Checkout cool restaurant",priority:"3",category:"home",complete:!1},{id:"23",title:"Kill the vampires",priority:"3",category:"others"}];var uiModels=uiModels||{};uiModels.contact_data=[{id:"1",lastname:"Smallwood",firstname:"Diane",jobtitle:"Director",company:"EasyDoesIt",email:"vsw@EasyDoesIt.com",phone:"415 234 4323",phonehome:"415 378 3577",phonecell:"415 135 3454",web:"http://EasyDoesIt.com",address1:"12, Liverpool Street",city:"San Francisco",state:"CA",zip:"94123",country:"US",category:"4"},{id:"2",lastname:"Shackleford ",firstname:"Rusty ",email:"rustyshackleford@gmail.com",address1:"123 Main Street",city:"Dallas",state:"TX",country:"US",category:"3"},{id:"3",lastname:"Inoue",firstname:"Akemi",jobtitle:"QA Engineer",company:"Testing evol-utility",email:"test@test.com",phone:"423 233 3523",phonehome:"423 523 4523",address1:"5665 Poplar Street",city:"San Jose",state:"CA",zip:"93112",country:"US",category:"3"},{id:"4",lastname:"Reina Moyano",firstname:"Sergio",jobtitle:"Mr",company:"Innova Creaciones",email:"sreina@innovacreaciones.es",phone:"411 444 2222",phonehome:"411 576 4566",phonecell:"411 579 4566",fax:"411 444 2224",address1:"654 Union Street",address2:"#203",city:"San Francisco",state:"CA",zip:"94567",country:"US",category:"3"},{id:"5",lastname:"Paulus",firstname:"Henry",company:"TEST the TEST",phone:"652 491 2345",address1:"1234 That Street",city:"San Mateo",state:"CA",zip:"94401",country:"US",category:"2"},{id:"6",lastname:"Dupond",firstname:"Patrick",jobtitle:"Sales Manager",company:"Au Bon Pain",email:"pdupond@aubonpain.fr",phone:"45 456 414 45",url:"http://aubonpain.fr",city:"Paris",state:"",country:"FR",category:"1"},{id:"7",lastname:"Giulieri",firstname:"Olivier",company:"Evolutility",city:"San Mateo",state:"",email:"olivier@evolutility.org",url:"http://www.evol-utility.org"},{id:"8",lastname:"Martin",firstname:"Mary",jobtitle:"President",company:"Acme Corp",email:"pm@acme.com",phone:"444 580 7007",phonehome:"449 512 0230",phonecell:"589 499 2065",address1:"123 Redville Lane",city:"Musnonville",state:"NH",zip:"03434",category:"1"},{id:"9",lastname:"Munar",firstname:"Roman",jobtitle:"Mr",company:"Informatics",email:"romano@informatics.com",phone:"322 234 5143",phonehome:"322 784 3453",phonecell:"322 538 2568",fax:"322 234 5345",url:"http://roman.munar.com",address1:"Washington",address2:"Buendia",city:"Makati",state:"",zip:"1300",country:"PH",category:"3"},{id:"10",lastname:"Smith",firstname:"George",company:"Blabla",email:"george@blabla.com",web:"http://www.blabla.com",phone:"415 123 1234",phonecell:"415 789 4556",address1:"768 5th Ave",city:"San Francisco",state:"CA",zip:"93123",country:"US",category:"1"},{id:"11",lastname:"Kumar",firstname:"Madhukar",jobtitle:"CEO",company:"CoolWeb",email:"mkumar@coolweb.com",web:"http://www.coolweb.com",phone:"7225 8252",phonecell:"7325 8245",address1:"434 Cool Place",city:"Bengaluru",state:"",country:"IN",category:"4"},{id:"12",lastname:"Cheng",firstname:"Chris",jobtitle:"CTO",company:"MyGreatCorporation",email:"ccheng@MyGreatCorporation.com",phonecell:"650 234 8245",city:"Sunnyvalle",state:"CA",country:"US",category:"4"}];var uiModels=uiModels||{};uiModels.winecellar_data=[{name:"Macrostie",label_img:"wine/macrostie.gif",vintage:2008,winery:"Mc Williams",bsize:"750",type:"red",price:20,grape:"chard",country:"US",region:"Sonoma",buying_date:"2008-05-12",value:24,purchased:24,remaining:16,drink_from:2009,drink_to:2020,peak_from:2014,peak_to:2017,degustations:[{ddate:"2008-05-08",robe:"light",nose:"fruity",taste:"fruity",notes:"too young"},{ddate:"2011-03-10",robe:"light",nose:"light fruit",taste:"",notes:""},{ddate:"2012-12-12",robe:"light",nose:"light fruit",taste:"",notes:"Great"}]},{name:"Château d'Yquem",label_img:"wine/yquem.gif",vintage:2012,winery:"Lur Saluces",bsize:"750",type:"white",grape:"sem",buying_date:"2012-12-12",price:399,value:460,drink_from:2012,drink_to:2017,purchased:3,remaining:1,country:"FR",region:"Bordeaux",area:"Sauternes and Barsac",score_parker:92,score_winespectator:94,degustations:[{ddate:"2013-04-23",robe:"golden",nose:"fruity",taste:"incredible"},{ddate:"2013-05-12",robe:"clear",nose:"strong and sweet",taste:"outstanding"}]},{name:"Château St Jean",label_img:"wine/stjean.gif",vintage:2008,winery:"Ch St Jean",bsize:"750",type:"red",price:34,value:32,purchased:12,remaining:5,drink_from:2009,grape:"shiraz",country:"FR",score_parker:68,score_winespectator:72,degustations:[{ddate:"2013-24-12",robe:"thick",nose:"strong",taste:"good",notes:"Great w/ beef."}]},{name:"Vine Cliff",label_img:"wine/vinecliff.gif",vintage:2013,winery:"Vine Cliff",bsize:"750",type:"red",buying_date:"2013-05-05",price:28,drink_from:2014,grape:"merlo",country:"US",score_parker:67,score_winespectator:62,degustations:[{ddate:"2013-05-05",robe:"light",nose:"strong",taste:"good"},{ddate:"2013-08-05",robe:"light",nose:"strong",taste:"good"},{ddate:"2013-08-18",robe:"light",nose:"strong",taste:"ok"}]},{name:"Château Montelena",label_img:"wine/montelena.gif",vintage:2005,winery:"Château Montelena",bsize:"1500",grape:"merlo",type:"red",drink_from:2005,region:"California",price:62,value:32,purchased:12,remaining:8,country:"US",score_parker:64,score_winespectator:64,degustations:[{ddate:"2012-05-05",nose:"strong+",taste:"excellent"},{ddate:"2013-10-22",robe:"rich",nose:"strong",taste:"very good"}]}];var uiModels=uiModels||{};uiModels.comics_data=[{title:"Do Androids Dream Of Electric Sheep?",genre:"sf",authors:"Philip K Dick, Tony Parker",complete:!0,finished:!0,have:"1-6",haveNb:6,serieNb:6,language:"EN",notes:"",pix:"comics/androitsheep1.jpeg"},{title:"Saga",genre:"sf",authors:"Brian K. Vaughan and Fiona Staples",complete:!1,finished:!1,have:"1-3",haveNb:3,serieNb:4,language:"EN",notes:"",pix:"comics/saga1.jpeg"},{title:"Alim le Tanneur",genre:"hf",authors:"Wilfrid Lupano, Virginie Augustin",complete:!0,finished:!0,have:"1-4",haveNb:4,serieNb:4,language:"FR",notes:"",pix:"comics/alim1.jpg"},{title:"La Caste des Meta-Barons",genre:"sf",authors:"Alexandro Jodorowsky et Juan Gimenez",complete:!1,finished:!0,have:"1-5",haveNb:5,serieNb:8,language:"FR",notes:"",pix:"comics/metabaron1.jpeg"},{title:"Garulfo",genre:"humor",have:"1-6",haveNb:6,serieNb:6,lang:"FR",authors:"Alain Ayroles et Bruno Maïorana",complete:!0,finished:!0,notes:"",pix:"comics/garulfo1.jpeg"},{title:"Lanfeust de Troy",genre:"hf",authors:"Didier Tarquin, Christophe Arleston",complete:!0,finished:!0,have:"1-8",haveNb:8,serieNb:8,language:"FR",notes:"",pix:"comics/lanfeust1.jpeg"},{title:"Salammbo",genre:"fantasy",authors:"Philippe Druillet et Gustave Flaubert",complete:!0,finished:!0,have:"1-3",haveNb:3,serieNb:3,language:"FR",notes:"",pix:"comics/salammbo1.jpeg"},{title:"Blacksad",genre:"pol",authors:"Juan Díaz Canales et Juanjo Guarnido",complete:!0,finished:!1,have:"1-4",haveNb:4,serieNb:4,language:"FR",notes:"",pix:"comics/blacksad1.jpeg"},{title:"Carmen McCallum",genre:"sf",authors:"Fred Duval et Gess",complete:!1,finished:!1,have:"1-5",haveNb:5,serieNb:12,language:"FR",notes:"",pix:"comics/carmenmc1.jpeg"},{title:"Code McCallum",genre:"sf",authors:"Fred Duval et Didier Cassegrain",complete:!0,finished:!0,have:"5",haveNb:5,serieNb:5,language:"FR",notes:"",pix:"comics/codemc1.jpeg"},{title:"La Nef des Fous",genre:"nocat",authors:"Turf",complete:!0,finished:!0,have:"1-7",haveNb:7,serieNb:7,language:"FR",notes:"",pix:"comics/neffous1.jpeg"},{title:"La Quete de l'Oiseau du Temps",genre:"hf",authors:"Serge Le Tendre et Régis Loisel",complete:!0,finished:!0,have:"1-4",haveNb:4,serieNb:4,language:"FR",notes:"",pix:"comics/quete1.jpeg"},{title:"Le Lama Blanc",genre:"adv",authors:"Alejandro Jodorowsky et Georges Bess",complete:!0,finished:!0,have:"1-6",haveNb:6,serieNb:6,language:"FR",notes:"",pix:"comics/lama1.jpeg"},{title:"Le Surfer d'Argent",genre:"sh",authors:"Moebius, Stan Lee",complete:!0,finished:!0,have:"1",haveNb:1,serieNb:1,language:"FR",notes:"",pix:"comics/surfer.jpeg"},{title:"L'Incal",genre:"sf",authors:"Moebius et Alexandro Jodorowsky",complete:!0,finished:!0,have:"1-6",haveNb:6,serieNb:6,language:"FR",notes:"",pix:"comics/incal1.jpeg"},{title:"Ou le regard ne porte pas",genre:"",authors:"Pont et Abolin",complete:!0,finished:!0,have:"1,2",haveNb:2,serieNb:2,language:"FR",notes:"",pix:"comics/regard1.jpeg"},{title:"Péma Ling",genre:"hist",authors:"Georges Bess",complete:!0,finished:!0,have:"1-5",haveNb:5,serieNb:5,language:"FR",notes:"",pix:"comics/pemaling1.jpeg"},{title:"Sky Doll",genre:"fantasy",authors:"Alessandro Barbucci et Barbara Canepa",complete:!0,finished:!0,have:"1-3",haveNb:3,serieNb:3,language:"FR",notes:"",pix:"comics/skydoll1.jpeg"},{title:"Ronin",genre:"sf",authors:"Franck Miller",complete:!0,finished:!0,have:"1",haveNb:1,serieNb:1,language:"EN",notes:"",pix:"comics/ronin.jpeg"},{title:"Rising Stars",genre:"sh",authors:"Joe Michael Straczynski, Christian Zanier, Keu Cha et Ken Lashley",complete:!0,finished:!0,have:"1",haveNb:1,serieNb:1,language:"EN",notes:"",pix:"comics/risingstars.jpeg"},{title:"Le Fleau des Dieux",genre:"sf",authors:"Valérie Mangin et Aleksa Gajic",complete:!0,finished:!0,have:"1-6",haveNb:6,serieNb:6,language:"FR",notes:"",pix:"comics/fleaudieux1.jpeg"},{title:"The Shaolin Cowboy",genre:"fantasy",authors:"Geof Darrow and Lana and Andy Wachowski",complete:!0,finished:!0,have:"1",haveNb:1,serieNb:1,language:"EN",notes:"",pix:"comics/shaolin-cowboy.jpeg"},{title:"Tales of an Imperfect Future",genre:"sf",authors:"Alfonso Font",complete:!0,finished:!0,have:"1",haveNb:1,serieNb:1,language:"EN",notes:"",pix:"comics/imperfect-future.jpeg"},{title:"Ghost in the Shell",genre:"sf",authors:"Masamune Shirow",complete:!1,finished:!0,have:"1",haveNb:1,serieNb:2,language:"EN",notes:"",pix:"comics/ghost-in-the-shell.jpeg"}]; |
@@ -16,3 +16,3 @@ module.exports = function (grunt) { | ||
bannerDependencies: '/*\n <%= pkg.name %> v<%= pkg.version %> dependencies: \n' + | ||
' bootstrap 3.3.4, jquery 2.1.4, backbone 1.1.2, backbone.localStorage v1.1.7, underscore 1.8.3, d3 3.5.5, bootstrap-datepicker" 1.4.0, select2 3.5.2. */\n', | ||
' bootstrap 3.3.4, jquery 2.1.4, backbone 1.1.2, backbone.localStorage v1.1.7, underscore 1.8.3, d3 3.5.5, bootstrap-datepicker" 1.4.0, select2 3.5.2. \n*/\n', | ||
@@ -209,2 +209,3 @@ // ************************************************************************************* | ||
options: { | ||
banner: '<%= bannerDependencies %>', | ||
compress: true | ||
@@ -211,0 +212,0 @@ }, |
@@ -25,3 +25,3 @@ /*! *************************************************************************** | ||
}, | ||
style: 'panel-info', | ||
style: 'panel-default', | ||
useRouter: true, | ||
@@ -28,0 +28,0 @@ pageSize:20, |
@@ -81,4 +81,4 @@ // Original code and blog post by Steve Hall http://www.delimited.io/blog/2013/12/19/force-bubble-charts-in-d3 | ||
.style("fill", function (d) { return that.fill(d[that.colorFieldId]); }) | ||
.on("mouseover", showPopover) | ||
.on("mouseout", removePopovers); | ||
.on("mouseenter", showPopover) | ||
.on("mouseleave", removePopovers); | ||
@@ -192,3 +192,3 @@ this.nodes | ||
var v=d[sizeFieldId]; | ||
return (v===null || v===isNaN)?0:v; | ||
return (v===null || v===isNaN || _.isUndefined(v))?0:v; | ||
}); | ||
@@ -195,0 +195,0 @@ this.plotScale = d3.scale.log().domain([ _.min(sizes), _.max(sizes)]).range([10, 25]); |
@@ -329,2 +329,9 @@ /*! *************************************************************************** | ||
setViewTitle: function(that, title){ | ||
if(that.titleSelector){ | ||
$(that.titleSelector).html(title?title:that.getTitle()); | ||
} | ||
return that; | ||
}, | ||
viewIsOne: function(viewName){ | ||
@@ -331,0 +338,0 @@ return viewName==='new' || viewName==='edit' || viewName==='browse' || viewName==='json'; |
@@ -42,3 +42,4 @@ /*! *************************************************************************** | ||
var eUI = Evol.UI, | ||
i18n = Evol.i18n; | ||
i18n = Evol.i18n, | ||
i18nTool = i18n.tools; | ||
@@ -76,15 +77,15 @@ return Backbone.View.extend({ | ||
always:[ | ||
{id: 'list', label: i18n.bList, icon:'th-list', n:'x'}, | ||
{id: 'new', label: i18n.bNew, icon:'plus', n:'x', readonly:false} | ||
{id: 'list', label: i18nTool.bList, icon:'th-list', n:'x'}, | ||
{id: 'new', label: i18nTool.bNew, icon:'plus', n:'x', readonly:false} | ||
], | ||
//linkOpt2h('selections','','star'); | ||
actions:[ | ||
//{id:'browse', label: i18n.bBrowse, icon:'eye', n:'1', readonly:false}, | ||
{id:'edit', label: i18n.bEdit, icon:'edit', n:'1', readonly:false}, | ||
{id:'save', label: i18n.bSave, icon:'floppy-disk', n:'1', readonly:false}, | ||
{id:'del', label: i18n.bDelete, icon:'trash', n:'1', readonly:false}, | ||
{id:'filter', label: i18n.bFilter, icon:'filter',n:'n'}, | ||
//{id:'group',label: i18n.bGroup, icon:'resize-horizontal',n:'n'}, | ||
{id:'export', label: i18n.bExport, icon:'cloud-download',n:'n'} | ||
//{id:'cog',label: i18n.bSettings, icon:'cog',n:'n'} | ||
//{id:'browse', label: i18nTool.bBrowse, icon:'eye', n:'1', readonly:false}, | ||
{id:'edit', label: i18nTool.bEdit, icon:'edit', n:'1', readonly:false}, | ||
{id:'save', label: i18nTool.bSave, icon:'floppy-disk', n:'1', readonly:false}, | ||
{id:'del', label: i18nTool.bDelete, icon:'trash', n:'1', readonly:false}, | ||
{id:'filter', label: i18nTool.bFilter, icon:'filter',n:'n'}, | ||
//{id:'group',label: i18nTool.bGroup, icon:'resize-horizontal',n:'n'}, | ||
{id:'export', label: i18nTool.bExport, icon:'cloud-download',n:'n'} | ||
//{id:'cog',label: i18nTool.bSettings, icon:'cog',n:'n'} | ||
], | ||
@@ -97,12 +98,12 @@ prevNext:[ | ||
// -- views ONE --- | ||
{id:'browse', label: i18n.bBrowse, icon:'eye-open',n:'1'},// // ReadOnly | ||
{id:'edit', label: i18n.bEdit, icon:'edit',n:'1', readonly:false},// // All Fields for editing | ||
{id:'mini', label: i18n.bMini, icon:'th-large',n:'1', readonly:false},// // Important Fields only | ||
//{id:'wiz',label: i18n.bWizard, icon:'arrow-right',n:'1'}, | ||
{id:'json', label: i18n.bJSON, icon:'barcode',n:'1', readonly:false}, | ||
{id:'browse', label: i18nTool.bBrowse, icon:'eye-open',n:'1'},// // ReadOnly | ||
{id:'edit', label: i18nTool.bEdit, icon:'edit',n:'1', readonly:false},// // All Fields for editing | ||
{id:'mini', label: i18nTool.bMini, icon:'th-large',n:'1', readonly:false},// // Important Fields only | ||
//{id:'wiz',label: i18nTool.bWizard, icon:'arrow-right',n:'1'}, | ||
{id:'json', label: i18nTool.bJSON, icon:'barcode',n:'1', readonly:false}, | ||
// -- views MANY --- | ||
{id:'list', label: i18n.bList, icon:'th-list',n:'n'}, | ||
{id:'cards', label: i18n.bCards, icon:'th-large',n:'n'}, | ||
{id:'bubbles', label: i18n.bBubbles, icon:'adjust',n:'n'}, | ||
{id:'charts', label: i18n.bCharts, icon:'stats',n:'n'} | ||
{id:'list', label: i18nTool.bList, icon:'th-list',n:'n'}, | ||
{id:'cards', label: i18nTool.bCards, icon:'th-large',n:'n'}, | ||
{id:'bubbles', label: i18nTool.bBubbles, icon:'adjust',n:'n'}, | ||
{id:'charts', label: i18nTool.bCharts, icon:'stats',n:'n'} | ||
], | ||
@@ -295,4 +296,2 @@ search: false | ||
vw = new ViewClass(config).render(); | ||
$v.addClass('panel panel-info') | ||
.slideDown(); | ||
break; | ||
@@ -363,9 +362,5 @@ // --- one --- browse, edit, mini, json, wiz | ||
if(this.curView){ | ||
if(this.curView.viewName==='export'){ | ||
$(this.titleSelector) | ||
.html(this.curView.getTitle()); | ||
}else{ | ||
this.curView.setTitle(); | ||
} | ||
this.curView.setTitle(); | ||
} | ||
return this; | ||
}, | ||
@@ -400,5 +395,5 @@ | ||
[ | ||
{id:'nosave', text:i18n.bNoSave, class:'btn-default'}, | ||
{id:'cancel', text:i18n.bCancel, class:'btn-default'}, | ||
{id:'ok', text:i18n.bSave, class:'btn-primary'} | ||
{id:'nosave', text:i18nTool.bNoSave, class:'btn-default'}, | ||
{id:'cancel', text:i18nTool.bCancel, class:'btn-default'}, | ||
{id:'ok', text:i18nTool.bSave, class:'btn-primary'} | ||
] | ||
@@ -451,12 +446,5 @@ ); | ||
//setVisible(tbBs.customize, mode!='json'); | ||
tbBs.prevNext.hide();//.removeClass('nav-disabled'); | ||
tbBs.prevNext.hide();//.removeClass('disabled'); | ||
setVisible(tbBs.views, !(mode==='export' || mode=='new')); | ||
tbBs.del.hide(); | ||
/*var cssOpen='glyphicon-eye-open', | ||
cssClose='glyphicon-eye-close'; | ||
if(mode==='mini' || mode==='json'){ | ||
tbBs.viewsIcon.removeClass(cssOpen).addClass(cssClose); | ||
}else{ | ||
tbBs.viewsIcon.removeClass(cssClose).addClass(cssOpen); | ||
}*/ | ||
if(Evol.Dico.viewIsMany(mode)){ | ||
@@ -474,10 +462,10 @@ this._prevViewMany=mode; | ||
if(this.curView.pageIndex===0){ | ||
tbBs.prevNext.eq(0).addClass('nav-disabled'); | ||
tbBs.prevNext.eq(0).addClass('disabled'); | ||
}else{ | ||
tbBs.prevNext.eq(0).removeClass('nav-disabled'); | ||
tbBs.prevNext.eq(0).removeClass('disabled'); | ||
} | ||
if(this.collection.length/this.pageSize){ | ||
tbBs.prevNext.eq(1).addClass('nav-disabled'); | ||
tbBs.prevNext.eq(1).addClass('disabled'); | ||
}else{ | ||
tbBs.prevNext.eq(1).removeClass('nav-disabled'); | ||
tbBs.prevNext.eq(1).removeClass('disabled'); | ||
}*/ | ||
@@ -697,3 +685,3 @@ } | ||
return this.curView.setDefaults() //.clear() | ||
.setTitle(i18n.getLabel('NewEntity', this.uiModel.name, vw.getTitle())); | ||
.setTitle(i18n.getLabel('tools.NewEntity', this.uiModel.name, vw.getTitle())); | ||
}, | ||
@@ -753,3 +741,3 @@ | ||
} | ||
}else{ | ||
}/*else{ | ||
if(that.curView.getSelection){ | ||
@@ -764,3 +752,3 @@ var selection=that.curView.getSelection(); | ||
} | ||
} | ||
}*/ | ||
}, | ||
@@ -797,7 +785,3 @@ | ||
case 'cancel': | ||
if(this.curView.cardinality==='1' && !this.model.isNew){ | ||
this.setView(this._prevViewOne || 'browse'); | ||
}else{ | ||
this.setView(this._prevViewMany || 'list'); | ||
} | ||
window.history.back(); | ||
break; | ||
@@ -848,3 +832,3 @@ case 'edit': | ||
var cl=this.curView.collection.length, | ||
cssDisabled='nav-disabled', | ||
cssDisabled='disabled', | ||
pIdx=this.pageIndex||0, | ||
@@ -859,3 +843,3 @@ $item=this.$('[data-id="prev"]'); | ||
this.$('[data-id="prev"],[data-id="next"]') | ||
.removeClass('nav-disabled'); | ||
.removeClass('disabled'); | ||
}, | ||
@@ -928,3 +912,3 @@ | ||
break;*/ | ||
default:// 'edit', 'mini', 'list', 'cards', 'export', 'json', 'new' | ||
default:// 'browse', edit', 'mini', 'json', 'list', 'cards', 'bubbles', 'export' | ||
if(toolId && toolId!==''){ | ||
@@ -931,0 +915,0 @@ this.setView(toolId, true); |
@@ -13,3 +13,2 @@ /*! *************************************************************************** | ||
Evol.ViewAction = {}; | ||
Evol.Version = '0.5'; | ||
@@ -289,3 +288,3 @@ Evol.UI = { | ||
id:'ok', | ||
text: Evol.i18n.bOK, | ||
text: Evol.i18n.tools.bOK, | ||
class: 'btn-primary' | ||
@@ -325,4 +324,4 @@ }])) | ||
buttons=[ | ||
{id:'cancel', text:Evol.i18n.bCancel, class:'btn-default'}, | ||
{id:'ok', text:Evol.i18n.bOK, class:'btn-primary'} | ||
{id:'cancel', text:Evol.i18n.tools.bCancel, class:'btn-default'}, | ||
{id:'ok', text:Evol.i18n.tools.bOK, class:'btn-primary'} | ||
]; | ||
@@ -340,6 +339,6 @@ } | ||
// --- panels --- | ||
HTMLPanelBegin: function (p, css) { | ||
HTMLPanelBegin: function (p, css, noToggle) { | ||
return '<div data-pid="'+p.id+'" class="panel '+(p.css?p.css:css)+'">'+ | ||
'<div class="panel-heading '+(p.cssLabel? p.cssLabel:'')+'">'+ | ||
Evol.UI.icon('chevron-up', 'evol-title-toggle')+ | ||
(!noToggle?Evol.UI.icon('chevron-up', 'evol-title-toggle'):'')+ | ||
'<h3 class="panel-title">'+p.label+'</h3>'+ | ||
@@ -346,0 +345,0 @@ (p.label2?'<div class="evol-subtitle">'+p.label2+'</div>' : '')+ |
@@ -9,3 +9,3 @@ // Evolutility Localization Library ENGLISH | ||
LOCALE:'EN', // ENGLISH | ||
LOCALE: 'EN', // ENGLISH | ||
@@ -30,33 +30,40 @@ getLabel: function(label, string1, string2){ | ||
// --- toolbar & buttons --- | ||
View:'View', | ||
bBrowse:'Browse', | ||
bEdit:'Edit', | ||
bMini: 'Mini', // 'Quick Edit' | ||
// Login:'Login', | ||
bNew:'New', | ||
NewEntity:'New {0}', //'New Item', | ||
//NewUpload:'New Upload', | ||
//Search:'Search', | ||
//AdvSearch:'Advanced Search', | ||
//NewSearch:'New Search', | ||
Selections:'Selections', | ||
Selection:'Selection', | ||
bExport:'Export', | ||
bCharts:'Charts', | ||
//SearchRes:'Search Result', | ||
//MassUpdate:'Mass Update', | ||
bDelete:'Delete', | ||
bAll:'All', | ||
bList:'List', | ||
bFilter: 'Filter', | ||
bBubbles: 'Bubbles', | ||
bCards: 'Cards', | ||
bJSON: 'JSON', | ||
//bRefresh: 'Refresh', | ||
//bPrint:'Print', | ||
bSave:'Save', | ||
bSaveAdd:'Save and Add Another', | ||
bOK:'OK', | ||
bCancel:'Cancel', | ||
tools:{ | ||
View: 'View', | ||
bBrowse: 'Browse', | ||
bEdit: 'Edit', | ||
bMini: 'Mini', // 'Quick Edit' | ||
// Login: 'Login', | ||
bNew: 'New', | ||
NewEntity: 'New {0}', //'New Item', | ||
//NewUpload: 'New Upload', | ||
//Search: 'Search', | ||
//AdvSearch: 'Advanced Search', | ||
//NewSearch: 'New Search', | ||
//Selections: 'Selections', | ||
//Selection: 'Selection', | ||
bExport: 'Export', | ||
bCharts: 'Charts', | ||
//SearchRes: 'Search Result', | ||
//MassUpdate: 'Mass Update', | ||
bDelete: 'Delete', | ||
//bAll: 'All', | ||
bList: 'List', | ||
bFilter: 'Filter', | ||
bBubbles: 'Bubbles', | ||
bCards: 'Cards', | ||
bJSON: 'JSON', | ||
//bRefresh: 'Refresh', | ||
//bPrint: 'Print', | ||
bSave: 'Save', | ||
bSaveAdd: 'Save and Add Another', | ||
bOK: 'OK', | ||
bCancel: 'Cancel', | ||
// --- data visualization --- | ||
vizGroupBy: 'Group by', | ||
vizColorBy: 'Color by', | ||
vizSizeBy: 'Size by' | ||
}, | ||
// --- msg & status --- | ||
@@ -68,23 +75,23 @@ saved: '{0} saved.', | ||
bNoSave: 'Don\'t Save', | ||
deleteX:'Delete {0}',// {0}=entity | ||
delete1:'Do you really want to delete the {0} "{1}"?', // {0}=entity {1}=titlefield value, | ||
deleteX: 'Delete {0}',// {0}=entity | ||
delete1: 'Do you really want to delete the {0} "{1}"?', // {0}=entity {1}=titlefield value, | ||
deleteN: 'Delete {0} {1}?', // delete 5 tasks | ||
deleted1:'{0} deleted.', // {0}=entity , | ||
deleted1: '{0} deleted.', // {0}=entity , | ||
notFound:'Item not found.', | ||
notFound: 'Item not found.', | ||
//this.setMessage(i18n.notFound, i18n.getLabel('notFoundMsg', this.uiModel.name); | ||
notFoundMsg:'No {0} found.', | ||
notFoundMsgId:'No {0} found for ID="{1}".', | ||
notFoundMsg: 'No {0} found.', | ||
notFoundMsgId: 'No {0} found for ID="{1}".', | ||
NoChange:'No Change', | ||
NoX:'No {0}', | ||
//Back2SearchResults:'Back to search results', | ||
NoChange: 'No Change', | ||
NoX: 'No {0}', | ||
//Back2SearchResults: 'Back to search results', | ||
yes: 'Yes', | ||
no: 'No', | ||
none:'None', | ||
na:'N/A', // 'not available' | ||
nodata:'No data available.', | ||
nopix:'No picture.', | ||
nochart:'No charts available.', | ||
badchart:'Not enough information provided to draw charts.', | ||
none: 'None', | ||
na: 'N/A', // 'not available' | ||
nodata: 'No data available.', | ||
nopix: 'No picture.', | ||
nochart: 'No charts available.', | ||
badchart: 'Not enough information provided to draw charts.', | ||
range: '{0} - {1} of {2} {3}', //rangeBegin, '-', rangeEnd, ' of ', mSize, ' ', entities' | ||
@@ -94,13 +101,8 @@ selected: '{0} selected', | ||
'sgn_email': '@', // indicator for email | ||
// --- data visualization --- | ||
vizGroupBy: 'Group by:', | ||
vizColorBy: 'Color by:', | ||
vizSizeBy: 'Size by:', | ||
// --- status --- | ||
status:{ | ||
added:'New {0} "{1}" added.', | ||
updated:'{0} "{1}" updated.', | ||
deleted:'{0} "{1}" deleted.' | ||
added: 'New {0} "{1}" added.', | ||
updated: '{0} "{1}" updated.', | ||
deleted: '{0} "{1}" deleted.' | ||
}, | ||
@@ -114,27 +116,27 @@ | ||
invalidList1: '1 value in "{1}" is invalid.', | ||
//intro:'You are not finished yet:', | ||
empty:'"{0}" must have a value.', | ||
email:'"{0}" must be a valid email formatted like "name@domain.com".', | ||
integer:'"{0}" must only use numbers.', | ||
decimal:'"{0}" must be a valid decimal numbers.', | ||
money:'"{0}" must be a valid number.', | ||
date:'"{0}" must be a valid date, format must be "MM/DD/YYYY" like "12/24/2015".', | ||
datetime:'"{0}" must be a valid date/time, format must be "MM/DD/YYYY hh:mm AM/PM" like "12/24/2015 10:30 AM".', | ||
time:'"{0}" must be a valid date/time, format must be "hh:mm AM/PM" like "10:30 AM".', | ||
max:'"{0}" must be smaller or equal to {1}.', | ||
min:'"{0}" must be greater or equal to {1}.', | ||
maxLength:'"{0}" must be {1} characters long maximum.', | ||
minLength:'"{0}" must be at least {1} characters long.', | ||
minMaxLength:'"{0}" must be between {1} and {2} characters long.', | ||
regExp:'"{0}" is not of the expected format.' | ||
//regExp:'"{0}" must match the regular expression pattern for "{1}".' | ||
//intro: 'You are not finished yet: ', | ||
empty: '"{0}" must have a value.', | ||
email: '"{0}" must be a valid email formatted like "name@domain.com".', | ||
integer: '"{0}" must only use numbers.', | ||
decimal: '"{0}" must be a valid decimal numbers.', | ||
money: '"{0}" must be a valid number.', | ||
date: '"{0}" must be a valid date, format must be "MM/DD/YYYY" like "12/24/2015".', | ||
datetime: '"{0}" must be a valid date/time, format must be "MM/DD/YYYY hh:mm AM/PM" like "12/24/2015 10:30 AM".', | ||
time: '"{0}" must be a valid date/time, format must be "hh:mm AM/PM" like "10:30 AM".', | ||
max: '"{0}" must be smaller or equal to {1}.', | ||
min: '"{0}" must be greater or equal to {1}.', | ||
maxLength: '"{0}" must be {1} characters long maximum.', | ||
minLength: '"{0}" must be at least {1} characters long.', | ||
minMaxLength: '"{0}" must be between {1} and {2} characters long.', | ||
regExp: '"{0}" is not of the expected format.' | ||
//regExp: '"{0}" must match the regular expression pattern for "{1}".' | ||
}, | ||
// --- errors --- | ||
error:'Error', | ||
error: 'Error', | ||
// --- charts --- | ||
charts:{ | ||
aByB:'{0} by {1}', | ||
aB:'{0}: {1}' | ||
aByB: '{0} by {1}', | ||
aB: '{0}: {1}' | ||
}, | ||
@@ -146,7 +148,7 @@ | ||
ExportMany: 'Export {0}', // {0}=entities | ||
preview:'Export preview', | ||
preview: 'Export preview', | ||
header: 'Header', | ||
options: 'options', | ||
separator: 'Separator', | ||
firstLine:'First line for field names', | ||
firstLine: 'First line for field names', | ||
format: 'Export format', | ||
@@ -162,12 +164,12 @@ xpFields: 'Fields to include in the export', | ||
formatJSON: 'Javascript Object Notation (JSON)', | ||
//xpColors:'Header color-Color odd rows-Color even rows', | ||
//xpColMap:'Columns map to', | ||
XMLroot:'Element name', // 'Root element name' | ||
//xpXMLAttr:'Attributes', | ||
//xpXMLElem:'Elements', | ||
SQL:'SQL Options', | ||
SQLTable:'Table name', | ||
SQLTrans:'In transaction', | ||
SQLIdInsert:'Identity insert', | ||
DownloadEntity:'Download {0}' | ||
//xpColors: 'Header color-Color odd rows-Color even rows', | ||
//xpColMap: 'Columns map to', | ||
XMLroot: 'Element name', // 'Root element name' | ||
//xpXMLAttr: 'Attributes', | ||
//xpXMLElem: 'Elements', | ||
SQL: 'SQL Options', | ||
SQLTable: 'Table name', | ||
SQLTrans: 'In transaction', | ||
SQLIdInsert: 'Identity insert', | ||
DownloadEntity: 'Download {0}' | ||
}, | ||
@@ -177,41 +179,41 @@ | ||
filters:{ | ||
sEqual:'equals', | ||
sNotEqual:'not equal', | ||
sStart:'starts with', | ||
sContain:'contains', | ||
sFinish:'finishes with', | ||
sInList:'any of', | ||
sIsNull:'is empty', | ||
sIsNotNull:'is not empty', | ||
sBefore:'before', | ||
sAfter:'after', | ||
sNumEqual:'=', | ||
sNumNotEqual:'!=', | ||
sGreater:'>', | ||
sSmaller:'<', | ||
sOn:'on', | ||
sNotOn:'not on', | ||
sAt:'at', | ||
sNotAt:'not at', | ||
sBetween:'between', | ||
opAnd:'and', | ||
//opOr:'or', | ||
yes:'Yes', | ||
no:'No', | ||
bNewCond:'New filter condition', | ||
bAddCond:'Add condition', | ||
bUpdateFilter:'Update filter', | ||
bSubmit:'Submit', | ||
bCancel:'Cancel' | ||
sEqual: 'equals', | ||
sNotEqual: 'not equal', | ||
sStart: 'starts with', | ||
sContain: 'contains', | ||
sFinish: 'finishes with', | ||
sInList: 'any of', | ||
sIsNull: 'is empty', | ||
sIsNotNull: 'is not empty', | ||
sBefore: 'before', | ||
sAfter: 'after', | ||
sNumEqual: '=', | ||
sNumNotEqual: '!=', | ||
sGreater: '>', | ||
sSmaller: '<', | ||
sOn: 'on', | ||
sNotOn: 'not on', | ||
sAt: 'at', | ||
sNotAt: 'not at', | ||
sBetween: 'between', | ||
opAnd: 'and', | ||
//opOr: 'or', | ||
yes: 'Yes', | ||
no: 'No', | ||
bNewCond: 'New filter condition', | ||
bAddCond: 'Add condition', | ||
bUpdateFilter: 'Update filter', | ||
bSubmit: 'Submit', | ||
bCancel: 'Cancel' | ||
}, | ||
// --- wizard --- | ||
prev:'Previous', | ||
next:'Next', | ||
finish:'Finish !'/*, | ||
prev: 'Previous', | ||
next: 'Next', | ||
finish: 'Finish !'/*, | ||
// --- documentation --- | ||
doc:{ | ||
entity:'Entity', | ||
fields:'Fields', | ||
entity: 'Entity', | ||
fields: 'Fields', | ||
uiModel: 'UI Model' | ||
@@ -218,0 +220,0 @@ }*/ |
@@ -93,3 +93,3 @@ /*! *************************************************************************** | ||
h.push('<div class="evol-xpt-form"><div class="evol-xpt-flds">'+ | ||
h.push('<div class="evol-xpt panel '+this.style+'"><div class="evol-xpt-form clearfix"><div class="evol-xpt-flds">'+ | ||
'<div><label>'+i18nXpt.xpFields+'</label></div>'+ | ||
@@ -149,5 +149,6 @@ '<fieldset class="checkbox">'); | ||
// ## Download button | ||
'<div class="evol-buttons form-actions">'+ | ||
eUI.button('cancel', i18n.bCancel, 'btn-default')+ | ||
'<div class="panel '+this.style +' evol-buttons form-actions">'+ | ||
eUI.button('cancel', i18n.tools.bCancel, 'btn-default')+ | ||
eUI.button('export', i18nXpt.DownloadEntity.replace('{0}', this.uiModel.namePlural), 'btn btn-primary')+ | ||
'</div>'+ | ||
'</div>' | ||
@@ -204,2 +205,6 @@ ); | ||
setTitle: function(){ | ||
eDico.setViewTitle(this); | ||
}, | ||
_preview: function (format) { | ||
@@ -206,0 +211,0 @@ this.$('.evol-xpt-val').html(this.exportContent(format)); |
@@ -20,3 +20,4 @@ /*! *************************************************************************** | ||
//'click .glyphicon-wrench': 'click_customize', | ||
'click .btn': 'changeGroup', | ||
'click .btn': 'clickGroup', | ||
'change .bubble-group': 'changeGroup', | ||
'change .bubble-color': 'changeColor', | ||
@@ -69,4 +70,6 @@ 'change .bubble-size': 'changeSize', | ||
var eUI = Evol.UI, | ||
i18nTools = Evol.i18n.tools, | ||
hOpt = eUI.input.option, | ||
hOptNull = eUI.html.emptyOption, | ||
fo, | ||
fs2 = Evol.Dico.getFields(this.uiModel, Evol.Dico.fieldChartable), | ||
@@ -79,4 +82,10 @@ h = '<div class="evol-many-bubbles panel '+this.style+'"><div class="evol-bubbles-body">'+ | ||
// --- Group --- | ||
h+='<label>'+Evol.i18n.vizGroupBy+'</label>'+ | ||
'<div class="btn-group" data-toggle="buttons">'+ | ||
h+='<label>'+i18nTools.vizGroupBy+': </label>'; | ||
if(fs2.length>5){ | ||
fo=_.map(fs2, function(f, idx){ | ||
return hOpt(f.id, f.label, idx===0); | ||
}); | ||
h+='<select class="form-control bubble-group">'+hOptNull + fo.join('')+'</select>'; | ||
}else{ | ||
h+='<div class="btn-group" data-toggle="buttons">'+ | ||
_.map(fs2, function(f, idx){ | ||
@@ -87,9 +96,12 @@ if(_.isUndefined(f.groupable) || f.groupable){ | ||
} | ||
}).join('')+ | ||
'</div>'; | ||
}).join('')+'</div>'; | ||
} | ||
// --- Color --- | ||
var fo=_.map(fs2, function(f, idx){ | ||
fo=_.map(fs2, function(f, idx){ | ||
return (_.isUndefined(f.colorable) || f.colorable) ? hOpt(f.id, f.label, idx===0) : ''; | ||
}); | ||
h+='<label>'+Evol.i18n.vizColorBy+'</label><select class="form-control bubble-color">'+hOptNull + fo.join('')+'</select>'; | ||
h+='<label>'+i18nTools.vizColorBy+': </label><select class="form-control bubble-color">'+hOptNull + fo.join('')+'</select>'; | ||
// --- Size --- | ||
@@ -103,3 +115,3 @@ fs2=_.filter(fs2, function(f){ | ||
if(fo.length){ | ||
h+='<label>'+Evol.i18n.vizSizeBy+'</label><select class="form-control bubble-size">'+hOptNull+fo.join('')+'</select>'; | ||
h+='<label>'+i18nTools.vizSizeBy+': </label><select class="form-control bubble-size">'+hOptNull+fo.join('')+'</select>'; | ||
} | ||
@@ -131,5 +143,8 @@ //h+=Evol.UI.html.clearer; | ||
changeGroup: function(evt){ | ||
clickGroup: function(evt){ | ||
this.bubbles.changeBubblesGroup(evt.currentTarget.id); | ||
}, | ||
changeGroup: function(evt){ | ||
this.bubbles.changeBubblesGroup(evt.target.value); | ||
}, | ||
@@ -136,0 +151,0 @@ changeColor: function(evt){ |
@@ -54,2 +54,4 @@ /*! *************************************************************************** | ||
v = Evol.UI.input.colorBox(f.id, v, v); | ||
}else if(f.type==='formula'){ | ||
v = Evol.UI.input.formula(null, f, model); | ||
}else{ | ||
@@ -56,0 +58,0 @@ v = that._HTMLField(f, model.escape(f.attribute || f.id)); |
@@ -28,3 +28,3 @@ /*! *************************************************************************** | ||
options: { | ||
style: 'panel-info', | ||
style: 'panel-default', | ||
pageSize: 20, | ||
@@ -166,7 +166,7 @@ pageIndex: 0, | ||
setTitle: function () { | ||
$(this.titleSelector).html(this.getTitle()); | ||
return this; | ||
return eDico.setViewTitle(this); | ||
}, | ||
getTitle: function () { | ||
// -- returns a string like "Contacts list" | ||
return eUI.capitalize(this.uiModel.namePlural) + ' ' + this.viewName; | ||
@@ -173,0 +173,0 @@ }, |
@@ -116,4 +116,4 @@ /*! *************************************************************************** | ||
'<div class="evol-buttons panel '+this.style+'">'+ | ||
Evol.UI.button('cancel', Evol.i18n.bCancel, 'btn-default')+ | ||
Evol.UI.button('edit', Evol.i18n.bEdit, 'btn-primary')+ | ||
Evol.UI.button('cancel', Evol.i18n.tools.bCancel, 'btn-default')+ | ||
Evol.UI.button('edit', Evol.i18n.tools.bEdit, 'btn-primary')+ | ||
'</div>'); | ||
@@ -120,0 +120,0 @@ } |
@@ -26,3 +26,13 @@ /*! *************************************************************************** | ||
h.push(eUI.label('uimjson', 'JSON')+eUI.input.textMJSON('uimjson', jsonStr, 16)); | ||
h.push( | ||
eUI.HTMLPanelBegin({ | ||
id: 'p-json', | ||
label:Evol.UI.capitalize(this.uiModel.name), | ||
label2: 'JSON' | ||
}, this.style+' evo-p-json', true)+ | ||
'<fieldset>'+ | ||
eUI.label('uimjson', 'JSON')+ | ||
eUI.input.textMJSON('uimjson', jsonStr, 16)+ | ||
'</fieldset>'+ | ||
eUI.HTMLPanelEnd()); | ||
this._renderButtons(h, 'json'); | ||
@@ -77,5 +87,5 @@ this.$el.html(h.join('')); | ||
_getDOMField: function(){ | ||
return this.$el.children('textarea'); | ||
return this.$('textarea'); | ||
} | ||
}); |
@@ -55,3 +55,3 @@ /*! *************************************************************************** | ||
h.push('<div data-p-width="100%" class="evol-pnl evol-p-mini">'+ | ||
eUI.HTMLPanelBegin(p, this.style||'panel-default')+ | ||
eUI.HTMLPanelBegin(p, this.style)+ | ||
'<fieldset data-pid="'+p.id+(p.readonly?'" disabled>':'">')); | ||
@@ -58,0 +58,0 @@ _.each(p.elements, function (elem) { |
@@ -19,2 +19,3 @@ /*! *************************************************************************** | ||
i18n = Evol.i18n, | ||
i18nTools = i18n.tools, | ||
eDico = Evol.Dico, | ||
@@ -41,3 +42,3 @@ fts = eDico.fieldTypes; | ||
options: { | ||
style: 'panel-info', | ||
style: 'panel-default', | ||
button_addAnother: false, | ||
@@ -52,3 +53,2 @@ titleSelector: '#title', | ||
this._tabId = false; | ||
this._uTitle = (!_.isUndefined(this.titleSelector)) && this.titleSelector!==''; | ||
this._subCollecs = this._subCollecsOK = false; | ||
@@ -144,14 +144,2 @@ /* | ||
getTitle: function(){ | ||
if(this.model){ | ||
if(this.model.isNew && this.model.isNew()){ | ||
return i18n.getLabel('NewEntity', this.uiModel.name); | ||
} | ||
var lf=this.uiModel.fnTitle; | ||
return _.isFunction(lf)?lf(this.model):this.model.get(lf); | ||
}else{ | ||
return eUI.capitalize(this.uiModel.name); | ||
} | ||
}, | ||
getData: function (skipReadOnlyFields) { | ||
@@ -518,6 +506,6 @@ var that = this, | ||
'<div class="evol-buttons panel '+this.style+'">'+ | ||
eUI.button('cancel', i18n.bCancel, 'btn-default')+ | ||
eUI.button('save', i18n.bSave, 'btn-primary')); | ||
eUI.button('cancel', i18n.tools.bCancel, 'btn-default')+ | ||
eUI.button('save', i18n.tools.bSave, 'btn-primary')); | ||
if (this.model && this.model.isNew() && this.button_addAnother && mode!=='json') { | ||
h.push(eUI.button('save-add', i18n.bSaveAdd, 'btn-default')); | ||
h.push(eUI.button('save-add', i18n.tools.bSaveAdd, 'btn-default')); | ||
} | ||
@@ -736,24 +724,18 @@ h.push('</div>'); | ||
setTitle: function (title){ | ||
if(this._uTitle){ | ||
var selector=this.titleSelector; | ||
if(selector && selector!==''){ | ||
var t, | ||
lf=this.uiModel.fnTitle; | ||
if(title){ | ||
t=title; | ||
}else if((!_.isUndefined(lf)) && lf!==''){ | ||
t=this.getTitle(); | ||
}else{ | ||
t=eUI.capitalize(this.uiModel.entities); | ||
} | ||
$(selector).text(t); | ||
this._uTitle=true; | ||
return this; | ||
getTitle: function(){ | ||
if(this.model){ | ||
if(this.model.isNew && this.model.isNew()){ | ||
return i18n.getLabel('tools.NewEntity', this.uiModel.name); | ||
} | ||
this._uTitle=false; | ||
var lf=this.uiModel.fnTitle; | ||
return _.isFunction(lf)?lf(this.model):this.model.get(lf); | ||
}else{ | ||
return eUI.capitalize(this.uiModel.name); | ||
} | ||
return this; | ||
}, | ||
setTitle: function (title){ | ||
return eDico.setViewTitle(this, title); | ||
}, | ||
validate: function (fields) { | ||
@@ -760,0 +742,0 @@ // --- validate top level fields |
{ | ||
"name": "evolutility", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"copyright": "(c) 2015 Olivier Giulieri", | ||
@@ -5,0 +5,0 @@ "license": "AGPL-3.0", |
@@ -95,3 +95,3 @@ # Evolutility.js | ||
uiModel: myUIModel, | ||
colllection: myCollection | ||
collection: myCollection | ||
}); | ||
@@ -107,3 +107,3 @@ ``` | ||
uiModel: myUIModel, | ||
colllection: myCollection | ||
collection: myCollection | ||
}); | ||
@@ -120,3 +120,3 @@ ``` | ||
uiModel: myUIModel, | ||
colllection: myCollection | ||
collection: myCollection | ||
}); | ||
@@ -132,3 +132,3 @@ ``` | ||
uiModel: myUIModel, | ||
colllection: myCollection | ||
collection: myCollection | ||
}); | ||
@@ -147,3 +147,3 @@ ``` | ||
uiModel: myUIModel, | ||
colllection: myCollection | ||
collection: myCollection | ||
}); | ||
@@ -150,0 +150,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2369227
18864