evolutility
Advanced tools
Comparing version 0.3.5 to 0.3.6
{ | ||
"name": "evolutility", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"dependencies": { | ||
"jquery": "2.1.1", | ||
"backbone": "1.1.2", | ||
"backbone.localStorage": "v1.1.13", | ||
"backbone.localStorage": "v1.1.16", | ||
"underscore": "1.7.0", | ||
"bootstrap": "v3.3.0", | ||
"bootstrap-datepicker": "1.3.0", | ||
"select2": "3.5.1" | ||
"bootstrap": "v3.3.2", | ||
"bootstrap-datepicker": "1.3.1", | ||
"select2": "3.5.2" | ||
}, | ||
"resolutions": { | ||
"bootstrap": "3.3.2", | ||
"backbone": "1.1.2" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
/* evolutility v0.3.5 sample UI-models and data: todo, addressbook, wine cellar. */ | ||
function createSampleDataIfEmpty(a){var b=new Backbone.LocalStorage("evol-"+a),c=Backbone.Model.extend({localStorage:b}),d=Backbone.Collection.extend({model:c,localStorage:b}),e=new d;e.fetch({success:function(b){0===b.length&&Evol.UI.insertCollection(b,uiModels[a+"_data"])}})}function showUIModel(a){_.isString(a)&&(a=uiModels[a]),$("#uimodel").html(Evol.UI.input.textMJSON("uimodel2",a,10)).slideDown(),$("#hide_def").show()}function hideUIModel(){$("#uimodel").slideUp(),$("#hide_def").hide()}function setDemo(a,b,c,d){var e=Backbone.Model.extend({localStorage:new Backbone.LocalStorage(b)}),f=Backbone.Collection.extend({model:e,localStorage:new Backbone.LocalStorage(b)}),g=new f;g.fetch({success:function(b){0===b.length&&Evol.UI.insertCollection(b,c);var h=g.at(0),i=$("#evol"),j=new Evol.ViewToolbar({el:i,mode:"one",style:d,customize:!1,model:h,modelClass:e,collection:g,collectionClass:f,uiModel:a,pageSize:20,titleSelector:"#title"}).render();$("#recs > a").on("click",function(a){var b=$(a.currentTarget).index();j.setModel(g.get(b))})}})}var uidef=null,uiModels=uiModels||{};uiModels.todo={id:"todo",label:"To Do",entity:"task",entities:"tasks",icon:"todo.gif",leadfield:"title",elements:[{type:"panel",label:"Task",width:62,elements:[{id:"title",attribute:"title",type:"text",label:"Title",required:!0,placeholder:"Call John",maxlength:255,width:100,viewmany:!0},{id:"duedate",attribute:"duedate",type:"date",label:"Due Date",width:62,viewmany:!0},{id:"category",attribute:"category",type:"lov",label:"Category",width:38,viewmany:!0,list:[{id:"home",text:"Home"},{id:"work",text:"Work"},{id:"fun",text:"Fun"},{id:"others",text:"Others"},{id:"misc",text:"Misc."}]}]},{type:"panel",label:"Status",width:38,elements:[{id:"priority",attribute:"priority",type:"lov",label:"Priority",required:!0,width:100,viewmany:!0,list:[{id:"1",text:"1 - ASAP"},{id:"2",text:"2 - Urgent"},{id:"3",text:"3 - Important"},{id:"4",text:"4 - Medium"},{id:"5",text:"5 - Low"}]},{id:"complete",attribute:"complete",type:"boolean",width:100,viewmany:!0,label:"Complete",labelcharts:"Tasks completion"}]},{type:"panel",label:"Notes",width:100,elements:[{id:"notes",attribute:"notes",type:"textmultiline",label:"Notes",maxlength:1e3,width:100,height:6,viewmany:!1}]}]},uiModels.todo_data=[{id:"1",title:"Add routing to Evolutility",priority:"2",category:"others",complete:!1,notes:"Use Backbone router."},{id:"2",title:"Fix open bugs",duedate:"2014-07-25",priority:"3",category:"work",complete:!1,notes:"bla bla"},{id:"3",title:"Testing App",duedate:"2014-06-11",priority:"3",category:"work",complete:!1,notes:"test"},{id:"4",title:"Prepare demo",duedate:"2014-05-12",priority:"1",category:"work",complete:!1,notes:"Check this out"},{id:"5",title:"Test latest code",priority:"5",category:"misc",complete:!0,notes:"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,notes:"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 contact_LOVs={categories:[{id:"1",text:"Work"},{id:"2",text:"Fun"},{id:"3",text:"Travel"},{id:"4",text:"Business"},{id:"5",text:"Cars"},{id:"6",text:"Sport"},{id:"7",text:"Misc."}],states:[{id:"AL",text:"Alabama"},{id:"AK",text:"Alaska"},{id:"AZ",text:"Arizona"},{id:"AR",text:"Arkansas"},{id:"CA",text:"California"},{id:"CO",text:"Colorado"},{id:"CT",text:"Connecticut"},{id:"DE",text:"Delaware"},{id:"DC",text:"District of Columbia"},{id:"FL",text:"Florida"},{id:"GA",text:"Georgia"},{id:"HI",text:"Hawaii"},{id:"ID",text:"Idaho"},{id:"IL",text:"Illinois"},{id:"IN",text:"Indiana"},{id:"IA",text:"Iowa"},{id:"KS",text:"Kansas"},{id:"KY",text:"Kentucky"},{id:"LA",text:"Louisiana"},{id:"ME",text:"Maine"},{id:"MD",text:"Maryland"},{id:"MA",text:"Massachusetts"},{id:"MI",text:"Michigan"},{id:"MN",text:"Minnesota"},{id:"MS",text:"Mississippi"},{id:"MO",text:"Missouri"},{id:"MT",text:"Montana"},{id:"NE",text:"Nebraska"},{id:"NV",text:"Nevada"},{id:"NH",text:"New Hampshire"},{id:"NJ",text:"New Jersey"},{id:"NM",text:"New Mexico"},{id:"NY",text:"New York"},{id:"NC",text:"North Carolina"},{id:"ND",text:"North Dakota"},{id:"OH",text:"Ohio"},{id:"OK",text:"Oklahoma"},{id:"OR",text:"Oregon"},{id:"PA",text:"Pennsylvania"},{id:"RI",text:"Rhode Island"},{id:"SC",text:"South Carolina"},{id:"SD",text:"South Dakota"},{id:"TN",text:"Tennessee"},{id:"TX",text:"Texas"},{id:"UT",text:"Utah"},{id:"VT",text:"Vermont"},{id:"VA",text:"Virginia"},{id:"WA",text:"Washington"},{id:"WV",text:"West Virginia"},{id:"WI",text:"Wisconsin"},{id:"WY",text:"Wyoming"}],countries:[{text:"Afghanistan",id:"AF"},{text:"Åland Islands",id:"AX"},{text:"Albania",id:"AL"},{text:"Algeria",id:"DZ"},{text:"American Samoa",id:"AS"},{text:"Andorra",id:"AD"},{text:"Angola",id:"AO"},{text:"Anguilla",id:"AI"},{text:"Antarctica",id:"AQ"},{text:"Antigua and Barbuda",id:"AG"},{text:"Argentina",id:"AR"},{text:"Armenia",id:"AM"},{text:"Aruba",id:"AW"},{text:"Australia",id:"AU"},{text:"Austria",id:"AT"},{text:"Azerbaijan",id:"AZ"},{text:"Bahamas",id:"BS"},{text:"Bahrain",id:"BH"},{text:"Bangladesh",id:"BD"},{text:"Barbados",id:"BB"},{text:"Belarus",id:"BY"},{text:"Belgium",id:"BE"},{text:"Belize",id:"BZ"},{text:"Benin",id:"BJ"},{text:"Bermuda",id:"BM"},{text:"Bhutan",id:"BT"},{text:"Bolivia",id:"BO"},{text:"Bosnia and Herzegovina",id:"BA"},{text:"Botswana",id:"BW"},{text:"Bouvet Island",id:"BV"},{text:"Brazil",id:"BR"},{text:"British Indian Ocean Territory",id:"IO"},{text:"Brunei Darussalam",id:"BN"},{text:"Bulgaria",id:"BG"},{text:"Burkina Faso",id:"BF"},{text:"Burundi",id:"BI"},{text:"Cambodia",id:"KH"},{text:"Cameroon",id:"CM"},{text:"Canada",id:"CA"},{text:"Cape Verde",id:"CV"},{text:"Cayman Islands",id:"KY"},{text:"Central African Republic",id:"CF"},{text:"Chad",id:"TD"},{text:"Chile",id:"CL"},{text:"China",id:"CN"},{text:"Christmas Island",id:"CX"},{text:"Cocos (Keeling) Islands",id:"CC"},{text:"Colombia",id:"CO"},{text:"Comoros",id:"KM"},{text:"Congo",id:"CG"},{text:"Congo, The Democratic Republic of the",id:"CD"},{text:"Cook Islands",id:"CK"},{text:"Costa Rica",id:"CR"},{text:"Cote D'Ivoire",id:"CI"},{text:"Croatia",id:"HR"},{text:"Cuba",id:"CU"},{text:"Cyprus",id:"CY"},{text:"Czech Republic",id:"CZ"},{text:"Denmark",id:"DK"},{text:"Djibouti",id:"DJ"},{text:"Dominica",id:"DM"},{text:"Dominican Republic",id:"DO"},{text:"Ecuador",id:"EC"},{text:"Egypt",id:"EG"},{text:"El Salvador",id:"SV"},{text:"Equatorial Guinea",id:"GQ"},{text:"Eritrea",id:"ER"},{text:"Estonia",id:"EE"},{text:"Ethiopia",id:"ET"},{text:"Falkland Islands (Malvinas)",id:"FK"},{text:"Faroe Islands",id:"FO"},{text:"Fiji",id:"FJ"},{text:"Finland",id:"FI"},{text:"France",id:"FR"},{text:"French Guiana",id:"GF"},{text:"French Polynesia",id:"PF"},{text:"French Southern Territories",id:"TF"},{text:"Gabon",id:"GA"},{text:"Gambia",id:"GM"},{text:"Georgia",id:"GE"},{text:"Germany",id:"DE"},{text:"Ghana",id:"GH"},{text:"Gibraltar",id:"GI"},{text:"Greece",id:"GR"},{text:"Greenland",id:"GL"},{text:"Grenada",id:"GD"},{text:"Guadeloupe",id:"GP"},{text:"Guam",id:"GU"},{text:"Guatemala",id:"GT"},{text:"Guernsey",id:"GG"},{text:"Guinea",id:"GN"},{text:"Guinea-Bissau",id:"GW"},{text:"Guyana",id:"GY"},{text:"Haiti",id:"HT"},{text:"Heard Island and Mcdonald Islands",id:"HM"},{text:"Holy See (Vatican City State)",id:"VA"},{text:"Honduras",id:"HN"},{text:"Hong Kong",id:"HK"},{text:"Hungary",id:"HU"},{text:"Iceland",id:"IS"},{text:"India",id:"IN"},{text:"Indonesia",id:"ID"},{text:"Iran, Islamic Republic Of",id:"IR"},{text:"Iraq",id:"IQ"},{text:"Ireland",id:"IE"},{text:"Isle of Man",id:"IM"},{text:"Israel",id:"IL"},{text:"Italy",id:"IT"},{text:"Jamaica",id:"JM"},{text:"Japan",id:"JP"},{text:"Jersey",id:"JE"},{text:"Jordan",id:"JO"},{text:"Kazakhstan",id:"KZ"},{text:"Kenya",id:"KE"},{text:"Kiribati",id:"KI"},{text:"Korea, Democratic People'S Republic of",id:"KP"},{text:"Korea, Republic of",id:"KR"},{text:"Kuwait",id:"KW"},{text:"Kyrgyzstan",id:"KG"},{text:"Lao People'S Democratic Republic",id:"LA"},{text:"Latvia",id:"LV"},{text:"Lebanon",id:"LB"},{text:"Lesotho",id:"LS"},{text:"Liberia",id:"LR"},{text:"Libyan Arab Jamahiriya",id:"LY"},{text:"Liechtenstein",id:"LI"},{text:"Lithuania",id:"LT"},{text:"Luxembourg",id:"LU"},{text:"Macao",id:"MO"},{text:"Macedonia, The Former Yugoslav Republic of",id:"MK"},{text:"Madagascar",id:"MG"},{text:"Malawi",id:"MW"},{text:"Malaysia",id:"MY"},{text:"Maldives",id:"MV"},{text:"Mali",id:"ML"},{text:"Malta",id:"MT"},{text:"Marshall Islands",id:"MH"},{text:"Martinique",id:"MQ"},{text:"Mauritania",id:"MR"},{text:"Mauritius",id:"MU"},{text:"Mayotte",id:"YT"},{text:"Mexico",id:"MX"},{text:"Micronesia, Federated States of",id:"FM"},{text:"Moldova, Republic of",id:"MD"},{text:"Monaco",id:"MC"},{text:"Mongolia",id:"MN"},{text:"Montserrat",id:"MS"},{text:"Morocco",id:"MA"},{text:"Mozambique",id:"MZ"},{text:"Myanmar",id:"MM"},{text:"Namibia",id:"NA"},{text:"Nauru",id:"NR"},{text:"Nepal",id:"NP"},{text:"Netherlands",id:"NL"},{text:"Netherlands Antilles",id:"AN"},{text:"New Caledonia",id:"NC"},{text:"New Zealand",id:"NZ"},{text:"Nicaragua",id:"NI"},{text:"Niger",id:"NE"},{text:"Nigeria",id:"NG"},{text:"Niue",id:"NU"},{text:"Norfolk Island",id:"NF"},{text:"Northern Mariana Islands",id:"MP"},{text:"Norway",id:"NO"},{text:"Oman",id:"OM"},{text:"Pakistan",id:"PK"},{text:"Palau",id:"PW"},{text:"Palestinian Territory, Occupied",id:"PS"},{text:"Panama",id:"PA"},{text:"Papua New Guinea",id:"PG"},{text:"Paraguay",id:"PY"},{text:"Peru",id:"PE"},{text:"Philippines",id:"PH"},{text:"Pitcairn",id:"PN"},{text:"Poland",id:"PL"},{text:"Portugal",id:"PT"},{text:"Puerto Rico",id:"PR"},{text:"Qatar",id:"QA"},{text:"Reunion",id:"RE"},{text:"Romania",id:"RO"},{text:"Russian Federation",id:"RU"},{text:"RWANDA",id:"RW"},{text:"Saint Helena",id:"SH"},{text:"Saint Kitts and Nevis",id:"KN"},{text:"Saint Lucia",id:"LC"},{text:"Saint Pierre and Miquelon",id:"PM"},{text:"Saint Vincent and the Grenadines",id:"VC"},{text:"Samoa",id:"WS"},{text:"San Marino",id:"SM"},{text:"Sao Tome and Principe",id:"ST"},{text:"Saudi Arabia",id:"SA"},{text:"Senegal",id:"SN"},{text:"Serbia and Montenegro",id:"CS"},{text:"Seychelles",id:"SC"},{text:"Sierra Leone",id:"SL"},{text:"Singapore",id:"SG"},{text:"Slovakia",id:"SK"},{text:"Slovenia",id:"SI"},{text:"Solomon Islands",id:"SB"},{text:"Somalia",id:"SO"},{text:"South Africa",id:"ZA"},{text:"South Georgia and the South Sandwich Islands",id:"GS"},{text:"Spain",id:"ES"},{text:"Sri Lanka",id:"LK"},{text:"Sudan",id:"SD"},{text:"Suriname",id:"SR"},{text:"Svalbard and Jan Mayen",id:"SJ"},{text:"Swaziland",id:"SZ"},{text:"Sweden",id:"SE"},{text:"Switzerland",id:"CH"},{text:"Syrian Arab Republic",id:"SY"},{text:"Taiwan, Province of China",id:"TW"},{text:"Tajikistan",id:"TJ"},{text:"Tanzania, United Republic of",id:"TZ"},{text:"Thailand",id:"TH"},{text:"Timor-Leste",id:"TL"},{text:"Togo",id:"TG"},{text:"Tokelau",id:"TK"},{text:"Tonga",id:"TO"},{text:"Trinidad and Tobago",id:"TT"},{text:"Tunisia",id:"TN"},{text:"Turkey",id:"TR"},{text:"Turkmenistan",id:"TM"},{text:"Turks and Caicos Islands",id:"TC"},{text:"Tuvalu",id:"TV"},{text:"Uganda",id:"UG"},{text:"Ukraine",id:"UA"},{text:"United Arab Emirates",id:"AE"},{text:"United Kingdom",id:"GB"},{text:"United States",id:"US"},{text:"United States Minor Outlying Islands",id:"UM"},{text:"Uruguay",id:"UY"},{text:"Uzbekistan",id:"UZ"},{text:"Vanuatu",id:"VU"},{text:"Venezuela",id:"VE"},{text:"Viet Nam",id:"VN"},{text:"Virgin Islands, British",id:"VG"},{text:"Virgin Islands, U.S.",id:"VI"},{text:"Wallis and Futuna",id:"WF"},{text:"Western Sahara",id:"EH"},{text:"Yemen",id:"YE"},{text:"Zambia",id:"ZM"},{text:"Zimbabwe",id:"ZW"}]},uiModels=uiModels||{};uiModels.contact={id:"contact",label:"Address book",icon:"contact.gif",entity:"contact",entities:"contacts",leadfield:function(a){return a.get("firstname")+" "+a.get("lastname")},elements:[{type:"panel",label:"Identity",width:62,elements:[{type:"text",id:"lastname",label:"Lastname",maxlength:50,required:!0,width:"62",viewmany:!0},{type:"text",id:"firstname",label:"Firstname",maxlength:50,required:!0,width:38,viewmany:!0},{type:"text",id:"jobtitle",label:"Title",maxlength:50,width:62},{type:"text",id:"company",label:"Company",maxlength:50,width:38,viewmany:!0},{type:"email",id:"email",label:"email",maxlength:255,width:100,viewmany:!0},{type:"url",id:"web",label:"web",maxlength:255,width:100}]},{type:"panel",label:"Contact Info",width:38,elements:[{type:"text",id:"phone",label:"Work Phone",maxlength:20,width:100,mini:"1"},{type:"text",id:"phonehome",label:"Home Phone",maxlength:20,width:100},{type:"text",id:"phonecell",label:"Cell.",maxlength:20,width:100,mini:"1"},{type:"text",id:"fax",label:"Fax",maxlength:20,width:100}]},{type:"panel",label:"Address",width:62,elements:[{type:"text",id:"address1",label:"Address",maxlength:150,width:100},{type:"text",id:"address2",label:"",labellist:"Address 2",maxlength:150,width:100},{type:"text",id:"city",label:"City",maxlength:100,width:62},{type:"lov",id:"state",label:"State",width:23,list:contact_LOVs.states},{type:"text",id:"zip",label:"Zip",maxlength:12,width:15},{type:"lov",id:"country",label:"Country",maxlength:60,width:100,list:contact_LOVs.countries}]},{type:"panel",label:"Misc.",width:38,elements:[{type:"lov",id:"category",label:"Category",width:100,viewmany:!0,list:contact_LOVs.categories},{type:"text",id:"custom1",label:"Custom 1",maxlength:250,width:100},{type:"text",id:"custom2",label:"Custom 2",maxlength:250,width:100},{type:"text",id:"custom3",label:"Custom 3",maxlength:250,width:100}]}]},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",country:"FR",category:"1"},{id:"12",lastname:"Giulieri",firstname:"Olivier",company:"Evolutility",city:"San Mateo",email:"olivier@evolutility.org",url:"http://www.evol-utility.org"},{id:"14",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:"15",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:"16",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:"17",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",country:"IN",category:"4"}];var winecellar_lovs={bottleSize:[{id:750,text:"750 ml"},{id:500,text:"500 ml"},{id:375,text:"375 cl"},{id:1500,text:"1.5 L"},{id:3e3,text:"3.0 L"},{id:6e3,text:"6.0 L"},{id:8e3,text:"8.0 L"}],grape:[{id:"chard",text:"Chardonnay"},{id:"shiraz",text:"Shiraz"},{id:"merlo",text:"Merlot"},{id:"pino",text:"Pinot Noir"},{id:"cab",text:"Cabernet"},{id:"zin",text:"Zinfandel"},{id:"sauv",text:"Sauvignon"},{id:"cabsau",text:"Cabernet Sauvignon"},{id:"aligo",text:"Aligoté"},{id:"alva",text:"Alvarinho"},{id:"bf",text:"Blanc Fumé"},{id:"bual",text:"Bual"},{id:"carg",text:"Carignan"},{id:"chass",text:"Chasselas"},{id:"cb",text:"Chemin Blanc"},{id:"cin",text:"Cinsault"},{id:"clair",text:"Clairette"},{id:"colomb",text:"Colombard"},{id:"counoi",text:"Counoise"},{id:"fdt",text:"Fendant"},{id:"fb",text:"Folle Blanche"},{id:"f",text:"Fürmint"},{id:"gamay",text:"Gamay"},{id:"gewurz",text:"Gewürztraminer"},{id:"graub",text:"Grauburgunder"},{id:"grct",text:"Grechetto"},{id:"gb",text:"Grenache Blanc"},{id:"gn",text:"Grenache Noir"},{id:"gp",text:"Gros Plan"},{id:"gv",text:"Grüner Veltliner"},{id:"ir",text:"Italienischer Riestling"},{id:"ka",text:"Kadarka"},{id:"ker",text:"Kerner"},{id:"mcb",text:"Macabeo"},{id:"malm",text:"Malmsey"},{id:"malv",text:"Malvasier"},{id:"mars",text:"Marsanne"},{id:"mdb",text:"Melon de Bourgogne"},{id:"mourv",text:"Mourvèdre"},{id:"mt",text:"Müller-Thurgau"},{id:"mu1",text:"Muscadelle"},{id:"mu2",text:"Muscadet"},{id:"mu3",text:"Musca"},{id:"mu4",text:"Musca d'Alsace"},{id:"mu5",text:"Muskateller"},{id:"neb",text:"Nebbiolo"},{id:"pal",text:"Palomino"},{id:"px",text:"Pedro Ximérez"},{id:"pv",text:"Petit Verdot"},{id:"pb",text:"Pinot Blanc"},{id:"pg",text:"Pinot Gris"},{id:"pn",text:"Pinot Noir"},{id:"pi",text:"Pinotage"},{id:"riesling",text:"Riesling"},{id:"rul",text:"Ruländer"},{id:"sang",text:"Sangiovese"},{id:"sb",text:"Sauvignon Blanc"},{id:"sc",text:"Scheurebe"},{id:"sem",text:"Sémilion"},{id:"ser",text:"Sercial"},{id:"sb2",text:"Seyval Blanc"},{id:"sieg",text:"Siegerrebe"},{id:"silv",text:"Silvaner"},{id:"spa",text:"Spätburgunder"},{id:"steen",text:"Steen"},{id:"syrah",text:"Syrah"},{id:"temp",text:"Tempranillo"},{id:"tokay",text:"Tokay"},{id:"tram",text:"Traminer"},{id:"treb",text:"Trebbiano"},{id:"ub",text:"Ugni Blanc"},{id:"verd",text:"Verdejo"},{id:"verdh",text:"Verdelho"},{id:"verm",text:"Vermentino"},{id:"vern",text:"Vernaccia"},{id:"vio",text:"Viognier"},{id:"viu",text:"Viura"},{id:"w",text:"Weißburgunder"}],type:[{id:"red",text:"Red",icon:"wine/winered.gif"},{id:"white",text:"White",icon:"wine/winewhite.gif"},{id:"sweet",text:"Sweet",icon:"wine/winesweet.gif"},{id:"spark",text:"Sparkling",icon:"wine/winespark.gif"},{id:"rose",text:"Rose",icon:"wine/winerose.gif"}],score:[{id:0,text:""},{id:1,text:"*"},{id:2,text:"**"},{id:3,text:"***"},{id:4,text:"****"},{id:5,text:"*****"}],country:[{id:"AR",text:"Argentina"},{id:"AT",text:"Austria"},{id:"BG",text:"Bulgaria"},{id:"CA",text:"Canada"},{id:"CL",text:"Chile"},{id:"CY",text:"Cyprus"},{id:"FR",text:"France"},{id:"DE",text:"Germany"},{id:"GR",text:"Greece"},{id:"HU",text:"Hungary"},{id:"IT",text:"Italy"},{id:"LU",text:"Luxembourg"},{id:"NZ",text:"New Zealand"},{id:"PT",text:"Portugal"},{id:"ZA",text:"South Africa"},{id:"ES",text:"Spain"},{id:"CH",text:"Switzerland"},{id:"US",text:"United States"}]},uiModels=uiModels||{};uiModels.winecellar={id:"winecellar",entity:"wine",entities:"wines",label:"Wine Cellar",icon:"wine.gif",leadfield:function(a){return a.get("name")+" "+a.get("vintage")},elements:[{type:"panel",label:"Wine",width:100,elements:[{id:"name",type:"text",label:"Name",required:!0,maxlength:150,viewmany:!0,width:62,help:"Name of the wine as indicated on the label."},{id:"vintage",type:"integer",label:"Vintage",required:!0,maxlength:4,viewmany:!0,width:38,min:1900,max:2020,help:"Year the wine was produced."}]},{type:"tab",label:"General",elements:[{type:"panel",label:"Wine",width:80,elements:[{id:"winery",type:"text",label:"Winery",maxlength:100,required:!0,viewmany:!0,width:"62",help:"The establishment where this wine is made."},{id:"bsize",type:"lov",label:"Bottle Size",labellist:"Bottle",width:38,list:winecellar_lovs.bottleSize},{id:"grape",type:"lov",label:"Grape",viewmany:!1,width:62,list:winecellar_lovs.grape},{id:"type",type:"lov",label:"Type",viewmany:!0,width:38,list:winecellar_lovs.type},{id:"appellation",type:"text",label:"Appellation",width:100,help:"An appellation is a legally defined and protected geographical indication used to identify where the grapes for a wine were grown."},{id:"country",type:"lov",label:"Country",width:32,list:winecellar_lovs.country},{id:"region",type:"text",label:"Region",maxlength:100,width:30},{id:"area",type:"text",label:"Area",maxlength:100,width:38}]},{type:"panel",label:"Bottle Label",width:20,elements:[{id:"label_img",type:"image",label:"Label",maxlength:200,width:100,viewmany:!0}]}]},{type:"tab",label:"Purchase",elements:[{type:"panel",label:"Purchase",width:100,elements:[{id:"buying_date",type:"date",label:"Buying Date",width:40},{id:"price",type:"money",label:"Price",viewmany:!0,width:30},{id:"value",type:"money",label:"Value",width:30},{id:"purchased",type:"integer",label:"Bottles Purchased",labellist:"Purchased",maxlength:10,width:40},{id:"remaining",type:"integer",label:"Remaining",labeledit:"Bottles Remaining",maxlength:10,width:60,viewcharts:!1},{id:"notes",type:"textmultiline",label:"Notes",maxlength:150,width:100,height:2}]}]},{type:"tab",label:"Drinking and Score",elements:[{type:"panel",label:"Drinking",width:62,elements:[{id:"drink_from",type:"integer",label:"Drink from (year)",labellist:"Drink",labelcharts:"Wines by Start drinking period",placeholder:"2012",maxlength:10,width:50,min:1900,max:2100},{id:"drink_to",type:"integer",label:"to",labelcharts:"Wines by End drinking period",maxlength:4,width:50,min:1900,max:"2100"},{id:"peak_from",type:"integer",label:"Peak from",labelcharts:"Wines by Start peak period",maxlength:4,width:50,min:1900,max:2100},{id:"peak_to",type:"integer",label:"to",labelcharts:"Wines by End peak period",maxlength:4,width:50,min:1900,max:2100},{id:"meal",type:"textmultiline",label:"Meal",maxlength:200,width:100,height:2}]},{type:"panel",label:"Score",width:38,elements:[{id:"score",type:"lov",label:"My Score",labellist:"Score",list:winecellar_lovs.score,maxlength:100,width:100},{id:"score_parker",type:"integer",label:"Parker",labelcharts:"Parker scores",min:50,max:100,maxlength:3,width:100},{id:"score_winespectator",type:"integer",label:"Wine Spectator",labelcharts:"Wine Spectator scores",min:0,max:100,maxlength:3,width:100}]}]},{type:"tab",label:"Wine Tasting",elements:[{type:"panel-list",id:"degustations",attribute:"degustations",label:"Degustations",width:100,elements:[{id:"ddate",type:"date",label:"Date",maxlength:20,viewmany:!0,required:!0},{id:"robe",type:"text",label:"Robe",maxlength:100,viewmany:!0},{id:"nose",type:"text",label:"Nose",maxlength:100,viewmany:!0},{id:"taste",type:"text",label:"Taste",maxlength:100,viewmany:!0},{id:"notes",type:"textmultiline",label:"Note",maxlength:300,viewmany:!0,width:100,height:2}]}]},{type:"tab",label:"Notes",elements:[{type:"panel",label:"Comments",width:100,elements:[{id:"comments",type:"textmultiline",label:"Comments",maxlength:500,width:100,height:8}]}]}]},uiModels.winecellar_data=[{name:"Macrostie",label_img:"wine/macrostie.gif",vintage:2008,winery:"Mc Williams",bsize:"750",type:"red",price:20,grape:"chard",appellation:"",country:"US",region:"Sonoma",area:"",buying_date:"2008-05-12",value:24,purchased:24,remaining:16,notes:"",drink_from:2009,drink_to:2020,peak_from:2014,peak_to:2017,meal:"",score:"",score_parker:null,score_winespectator:null,comments:"",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",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:"2012-04-23",robe:"golden",nose:"fruity",taste:"incredible"},{ddate:"2013-24-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",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-05-05",robe:"rich",nose:"strong",taste:"very good"}]}]; | ||
/* evolutility v0.3.6 sample UI-models and data: todo, addressbook, wine cellar. */ | ||
function createSampleDataIfEmpty(a){var b=new Backbone.LocalStorage("evol-"+a),c=Backbone.Model.extend({localStorage:b}),d=Backbone.Collection.extend({model:c,localStorage:b}),e=new d;e.fetch({success:function(b){0===b.length&&Evol.UI.insertCollection(b,uiModels[a+"_data"])}})}function showUIModel(a){_.isString(a)&&(a=uiModels[a]),$("#uimodel").html(Evol.UI.input.textMJSON("uimodel2",a,10)).slideDown(),$("#hide_def").show()}function hideUIModel(){$("#uimodel").slideUp(),$("#hide_def").hide()}function setDemo(a,b,c,d){var e=Backbone.Model.extend({localStorage:new Backbone.LocalStorage(b)}),f=Backbone.Collection.extend({model:e,localStorage:new Backbone.LocalStorage(b)}),g=new f;g.fetch({success:function(b){0===b.length&&Evol.UI.insertCollection(b,c);var h=g.at(0),i=$("#evol"),j=new Evol.ViewToolbar({el:i,mode:"one",style:d,customize:!1,model:h,modelClass:e,collection:g,collectionClass:f,uiModel:a,pageSize:20,titleSelector:"#title"}).render();$("#recs > a").on("click",function(a){var b=$(a.currentTarget).index();j.setModel(g.get(b))})}})}var uidef=null,uiModels=uiModels||{};uiModels.todo={id:"todo",label:"To Do",entity:"task",entities:"tasks",icon:"todo.gif",leadfield:"title",elements:[{type:"panel",label:"Task",width:62,elements:[{id:"title",attribute:"title",type:"text",label:"Title",required:!0,placeholder:"Call John",maxlength:255,width:100,viewmany:!0},{id:"duedate",attribute:"duedate",type:"date",label:"Due Date",width:62,viewmany:!0},{id:"category",attribute:"category",type:"lov",label:"Category",width:38,viewmany:!0,list:[{id:"home",text:"Home"},{id:"work",text:"Work"},{id:"fun",text:"Fun"},{id:"others",text:"Others"},{id:"misc",text:"Misc."}]}]},{type:"panel",label:"Status",width:38,elements:[{id:"priority",attribute:"priority",type:"lov",label:"Priority",required:!0,width:100,viewmany:!0,list:[{id:"1",text:"1 - ASAP"},{id:"2",text:"2 - Urgent"},{id:"3",text:"3 - Important"},{id:"4",text:"4 - Medium"},{id:"5",text:"5 - Low"}]},{id:"complete",attribute:"complete",type:"boolean",width:100,viewmany:!0,label:"Complete",labelcharts:"Tasks completion"}]},{type:"panel",label:"Notes",width:100,elements:[{id:"notes",attribute:"notes",type:"textmultiline",label:"Notes",maxlength:1e3,width:100,height:6,viewmany:!1}]}]},uiModels.todo_data=[{id:"1",title:"Add routing to Evolutility",priority:"2",category:"others",complete:!1,notes:"Use Backbone router."},{id:"2",title:"Fix open bugs",duedate:"2014-07-25",priority:"3",category:"work",complete:!1,notes:"bla bla"},{id:"3",title:"Testing App",duedate:"2014-06-11",priority:"3",category:"work",complete:!1,notes:"test"},{id:"4",title:"Prepare demo",duedate:"2014-05-12",priority:"1",category:"work",complete:!1,notes:"Check this out"},{id:"5",title:"Test latest code",priority:"5",category:"misc",complete:!0,notes:"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,notes:"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 contact_LOVs={categories:[{id:"1",text:"Work"},{id:"2",text:"Fun"},{id:"3",text:"Travel"},{id:"4",text:"Business"},{id:"5",text:"Cars"},{id:"6",text:"Sport"},{id:"7",text:"Misc."}],states:[{id:"AL",text:"Alabama"},{id:"AK",text:"Alaska"},{id:"AZ",text:"Arizona"},{id:"AR",text:"Arkansas"},{id:"CA",text:"California"},{id:"CO",text:"Colorado"},{id:"CT",text:"Connecticut"},{id:"DE",text:"Delaware"},{id:"DC",text:"District of Columbia"},{id:"FL",text:"Florida"},{id:"GA",text:"Georgia"},{id:"HI",text:"Hawaii"},{id:"ID",text:"Idaho"},{id:"IL",text:"Illinois"},{id:"IN",text:"Indiana"},{id:"IA",text:"Iowa"},{id:"KS",text:"Kansas"},{id:"KY",text:"Kentucky"},{id:"LA",text:"Louisiana"},{id:"ME",text:"Maine"},{id:"MD",text:"Maryland"},{id:"MA",text:"Massachusetts"},{id:"MI",text:"Michigan"},{id:"MN",text:"Minnesota"},{id:"MS",text:"Mississippi"},{id:"MO",text:"Missouri"},{id:"MT",text:"Montana"},{id:"NE",text:"Nebraska"},{id:"NV",text:"Nevada"},{id:"NH",text:"New Hampshire"},{id:"NJ",text:"New Jersey"},{id:"NM",text:"New Mexico"},{id:"NY",text:"New York"},{id:"NC",text:"North Carolina"},{id:"ND",text:"North Dakota"},{id:"OH",text:"Ohio"},{id:"OK",text:"Oklahoma"},{id:"OR",text:"Oregon"},{id:"PA",text:"Pennsylvania"},{id:"RI",text:"Rhode Island"},{id:"SC",text:"South Carolina"},{id:"SD",text:"South Dakota"},{id:"TN",text:"Tennessee"},{id:"TX",text:"Texas"},{id:"UT",text:"Utah"},{id:"VT",text:"Vermont"},{id:"VA",text:"Virginia"},{id:"WA",text:"Washington"},{id:"WV",text:"West Virginia"},{id:"WI",text:"Wisconsin"},{id:"WY",text:"Wyoming"}],countries:[{text:"Afghanistan",id:"AF"},{text:"Åland Islands",id:"AX"},{text:"Albania",id:"AL"},{text:"Algeria",id:"DZ"},{text:"American Samoa",id:"AS"},{text:"Andorra",id:"AD"},{text:"Angola",id:"AO"},{text:"Anguilla",id:"AI"},{text:"Antarctica",id:"AQ"},{text:"Antigua and Barbuda",id:"AG"},{text:"Argentina",id:"AR"},{text:"Armenia",id:"AM"},{text:"Aruba",id:"AW"},{text:"Australia",id:"AU"},{text:"Austria",id:"AT"},{text:"Azerbaijan",id:"AZ"},{text:"Bahamas",id:"BS"},{text:"Bahrain",id:"BH"},{text:"Bangladesh",id:"BD"},{text:"Barbados",id:"BB"},{text:"Belarus",id:"BY"},{text:"Belgium",id:"BE"},{text:"Belize",id:"BZ"},{text:"Benin",id:"BJ"},{text:"Bermuda",id:"BM"},{text:"Bhutan",id:"BT"},{text:"Bolivia",id:"BO"},{text:"Bosnia and Herzegovina",id:"BA"},{text:"Botswana",id:"BW"},{text:"Bouvet Island",id:"BV"},{text:"Brazil",id:"BR"},{text:"British Indian Ocean Territory",id:"IO"},{text:"Brunei Darussalam",id:"BN"},{text:"Bulgaria",id:"BG"},{text:"Burkina Faso",id:"BF"},{text:"Burundi",id:"BI"},{text:"Cambodia",id:"KH"},{text:"Cameroon",id:"CM"},{text:"Canada",id:"CA"},{text:"Cape Verde",id:"CV"},{text:"Cayman Islands",id:"KY"},{text:"Central African Republic",id:"CF"},{text:"Chad",id:"TD"},{text:"Chile",id:"CL"},{text:"China",id:"CN"},{text:"Christmas Island",id:"CX"},{text:"Cocos (Keeling) Islands",id:"CC"},{text:"Colombia",id:"CO"},{text:"Comoros",id:"KM"},{text:"Congo",id:"CG"},{text:"Congo, The Democratic Republic of the",id:"CD"},{text:"Cook Islands",id:"CK"},{text:"Costa Rica",id:"CR"},{text:"Cote D'Ivoire",id:"CI"},{text:"Croatia",id:"HR"},{text:"Cuba",id:"CU"},{text:"Cyprus",id:"CY"},{text:"Czech Republic",id:"CZ"},{text:"Denmark",id:"DK"},{text:"Djibouti",id:"DJ"},{text:"Dominica",id:"DM"},{text:"Dominican Republic",id:"DO"},{text:"Ecuador",id:"EC"},{text:"Egypt",id:"EG"},{text:"El Salvador",id:"SV"},{text:"Equatorial Guinea",id:"GQ"},{text:"Eritrea",id:"ER"},{text:"Estonia",id:"EE"},{text:"Ethiopia",id:"ET"},{text:"Falkland Islands (Malvinas)",id:"FK"},{text:"Faroe Islands",id:"FO"},{text:"Fiji",id:"FJ"},{text:"Finland",id:"FI"},{text:"France",id:"FR"},{text:"French Guiana",id:"GF"},{text:"French Polynesia",id:"PF"},{text:"French Southern Territories",id:"TF"},{text:"Gabon",id:"GA"},{text:"Gambia",id:"GM"},{text:"Georgia",id:"GE"},{text:"Germany",id:"DE"},{text:"Ghana",id:"GH"},{text:"Gibraltar",id:"GI"},{text:"Greece",id:"GR"},{text:"Greenland",id:"GL"},{text:"Grenada",id:"GD"},{text:"Guadeloupe",id:"GP"},{text:"Guam",id:"GU"},{text:"Guatemala",id:"GT"},{text:"Guernsey",id:"GG"},{text:"Guinea",id:"GN"},{text:"Guinea-Bissau",id:"GW"},{text:"Guyana",id:"GY"},{text:"Haiti",id:"HT"},{text:"Heard Island and Mcdonald Islands",id:"HM"},{text:"Holy See (Vatican City State)",id:"VA"},{text:"Honduras",id:"HN"},{text:"Hong Kong",id:"HK"},{text:"Hungary",id:"HU"},{text:"Iceland",id:"IS"},{text:"India",id:"IN"},{text:"Indonesia",id:"ID"},{text:"Iran, Islamic Republic Of",id:"IR"},{text:"Iraq",id:"IQ"},{text:"Ireland",id:"IE"},{text:"Isle of Man",id:"IM"},{text:"Israel",id:"IL"},{text:"Italy",id:"IT"},{text:"Jamaica",id:"JM"},{text:"Japan",id:"JP"},{text:"Jersey",id:"JE"},{text:"Jordan",id:"JO"},{text:"Kazakhstan",id:"KZ"},{text:"Kenya",id:"KE"},{text:"Kiribati",id:"KI"},{text:"Korea, Democratic People'S Republic of",id:"KP"},{text:"Korea, Republic of",id:"KR"},{text:"Kuwait",id:"KW"},{text:"Kyrgyzstan",id:"KG"},{text:"Lao People'S Democratic Republic",id:"LA"},{text:"Latvia",id:"LV"},{text:"Lebanon",id:"LB"},{text:"Lesotho",id:"LS"},{text:"Liberia",id:"LR"},{text:"Libyan Arab Jamahiriya",id:"LY"},{text:"Liechtenstein",id:"LI"},{text:"Lithuania",id:"LT"},{text:"Luxembourg",id:"LU"},{text:"Macao",id:"MO"},{text:"Macedonia, The Former Yugoslav Republic of",id:"MK"},{text:"Madagascar",id:"MG"},{text:"Malawi",id:"MW"},{text:"Malaysia",id:"MY"},{text:"Maldives",id:"MV"},{text:"Mali",id:"ML"},{text:"Malta",id:"MT"},{text:"Marshall Islands",id:"MH"},{text:"Martinique",id:"MQ"},{text:"Mauritania",id:"MR"},{text:"Mauritius",id:"MU"},{text:"Mayotte",id:"YT"},{text:"Mexico",id:"MX"},{text:"Micronesia, Federated States of",id:"FM"},{text:"Moldova, Republic of",id:"MD"},{text:"Monaco",id:"MC"},{text:"Mongolia",id:"MN"},{text:"Montserrat",id:"MS"},{text:"Morocco",id:"MA"},{text:"Mozambique",id:"MZ"},{text:"Myanmar",id:"MM"},{text:"Namibia",id:"NA"},{text:"Nauru",id:"NR"},{text:"Nepal",id:"NP"},{text:"Netherlands",id:"NL"},{text:"Netherlands Antilles",id:"AN"},{text:"New Caledonia",id:"NC"},{text:"New Zealand",id:"NZ"},{text:"Nicaragua",id:"NI"},{text:"Niger",id:"NE"},{text:"Nigeria",id:"NG"},{text:"Niue",id:"NU"},{text:"Norfolk Island",id:"NF"},{text:"Northern Mariana Islands",id:"MP"},{text:"Norway",id:"NO"},{text:"Oman",id:"OM"},{text:"Pakistan",id:"PK"},{text:"Palau",id:"PW"},{text:"Palestinian Territory, Occupied",id:"PS"},{text:"Panama",id:"PA"},{text:"Papua New Guinea",id:"PG"},{text:"Paraguay",id:"PY"},{text:"Peru",id:"PE"},{text:"Philippines",id:"PH"},{text:"Pitcairn",id:"PN"},{text:"Poland",id:"PL"},{text:"Portugal",id:"PT"},{text:"Puerto Rico",id:"PR"},{text:"Qatar",id:"QA"},{text:"Reunion",id:"RE"},{text:"Romania",id:"RO"},{text:"Russian Federation",id:"RU"},{text:"RWANDA",id:"RW"},{text:"Saint Helena",id:"SH"},{text:"Saint Kitts and Nevis",id:"KN"},{text:"Saint Lucia",id:"LC"},{text:"Saint Pierre and Miquelon",id:"PM"},{text:"Saint Vincent and the Grenadines",id:"VC"},{text:"Samoa",id:"WS"},{text:"San Marino",id:"SM"},{text:"Sao Tome and Principe",id:"ST"},{text:"Saudi Arabia",id:"SA"},{text:"Senegal",id:"SN"},{text:"Serbia and Montenegro",id:"CS"},{text:"Seychelles",id:"SC"},{text:"Sierra Leone",id:"SL"},{text:"Singapore",id:"SG"},{text:"Slovakia",id:"SK"},{text:"Slovenia",id:"SI"},{text:"Solomon Islands",id:"SB"},{text:"Somalia",id:"SO"},{text:"South Africa",id:"ZA"},{text:"South Georgia and the South Sandwich Islands",id:"GS"},{text:"Spain",id:"ES"},{text:"Sri Lanka",id:"LK"},{text:"Sudan",id:"SD"},{text:"Suriname",id:"SR"},{text:"Svalbard and Jan Mayen",id:"SJ"},{text:"Swaziland",id:"SZ"},{text:"Sweden",id:"SE"},{text:"Switzerland",id:"CH"},{text:"Syrian Arab Republic",id:"SY"},{text:"Taiwan, Province of China",id:"TW"},{text:"Tajikistan",id:"TJ"},{text:"Tanzania, United Republic of",id:"TZ"},{text:"Thailand",id:"TH"},{text:"Timor-Leste",id:"TL"},{text:"Togo",id:"TG"},{text:"Tokelau",id:"TK"},{text:"Tonga",id:"TO"},{text:"Trinidad and Tobago",id:"TT"},{text:"Tunisia",id:"TN"},{text:"Turkey",id:"TR"},{text:"Turkmenistan",id:"TM"},{text:"Turks and Caicos Islands",id:"TC"},{text:"Tuvalu",id:"TV"},{text:"Uganda",id:"UG"},{text:"Ukraine",id:"UA"},{text:"United Arab Emirates",id:"AE"},{text:"United Kingdom",id:"GB"},{text:"United States",id:"US"},{text:"United States Minor Outlying Islands",id:"UM"},{text:"Uruguay",id:"UY"},{text:"Uzbekistan",id:"UZ"},{text:"Vanuatu",id:"VU"},{text:"Venezuela",id:"VE"},{text:"Viet Nam",id:"VN"},{text:"Virgin Islands, British",id:"VG"},{text:"Virgin Islands, U.S.",id:"VI"},{text:"Wallis and Futuna",id:"WF"},{text:"Western Sahara",id:"EH"},{text:"Yemen",id:"YE"},{text:"Zambia",id:"ZM"},{text:"Zimbabwe",id:"ZW"}]},uiModels=uiModels||{};uiModels.contact={id:"contact",label:"Address book",icon:"contact.gif",entity:"contact",entities:"contacts",leadfield:function(a){return a.get("firstname")+" "+a.get("lastname")},elements:[{type:"panel",label:"Identity",width:62,elements:[{type:"text",id:"lastname",label:"Lastname",maxlength:50,required:!0,width:"62",viewmany:!0},{type:"text",id:"firstname",label:"Firstname",maxlength:50,required:!0,width:38,viewmany:!0},{type:"text",id:"jobtitle",label:"Title",maxlength:50,width:62},{type:"text",id:"company",label:"Company",maxlength:50,width:38,viewmany:!0},{type:"email",id:"email",label:"email",maxlength:255,width:100,viewmany:!0},{type:"url",id:"web",label:"web",maxlength:255,width:100}]},{type:"panel",label:"Contact Info",width:38,elements:[{type:"text",id:"phone",label:"Work Phone",maxlength:20,width:100,mini:"1"},{type:"text",id:"phonehome",label:"Home Phone",maxlength:20,width:100},{type:"text",id:"phonecell",label:"Cell.",maxlength:20,width:100,mini:"1"},{type:"text",id:"fax",label:"Fax",maxlength:20,width:100}]},{type:"panel",label:"Address",width:62,elements:[{type:"text",id:"address1",label:"Address",maxlength:150,width:100},{type:"text",id:"address2",label:"",labellist:"Address 2",maxlength:150,width:100},{type:"text",id:"city",label:"City",maxlength:100,width:62},{type:"lov",id:"state",label:"State",width:23,list:contact_LOVs.states},{type:"text",id:"zip",label:"Zip",maxlength:12,width:15},{type:"lov",id:"country",label:"Country",maxlength:60,width:100,list:contact_LOVs.countries}]},{type:"panel",label:"Misc.",width:38,elements:[{type:"lov",id:"category",label:"Category",width:100,viewmany:!0,list:contact_LOVs.categories},{type:"text",id:"custom1",label:"Custom 1",maxlength:250,width:100},{type:"text",id:"custom2",label:"Custom 2",maxlength:250,width:100},{type:"text",id:"custom3",label:"Custom 3",maxlength:250,width:100}]}]},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",country:"FR",category:"1"},{id:"12",lastname:"Giulieri",firstname:"Olivier",company:"Evolutility",city:"San Mateo",email:"olivier@evolutility.org",url:"http://www.evol-utility.org"},{id:"14",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:"15",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:"16",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:"17",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",country:"IN",category:"4"}];var winecellar_lovs={bottleSize:[{id:750,text:"750 ml"},{id:500,text:"500 ml"},{id:375,text:"375 cl"},{id:1500,text:"1.5 L"},{id:3e3,text:"3.0 L"},{id:6e3,text:"6.0 L"},{id:8e3,text:"8.0 L"}],grape:[{id:"chard",text:"Chardonnay"},{id:"shiraz",text:"Shiraz"},{id:"merlo",text:"Merlot"},{id:"pino",text:"Pinot Noir"},{id:"cab",text:"Cabernet"},{id:"zin",text:"Zinfandel"},{id:"sauv",text:"Sauvignon"},{id:"cabsau",text:"Cabernet Sauvignon"},{id:"aligo",text:"Aligoté"},{id:"alva",text:"Alvarinho"},{id:"bf",text:"Blanc Fumé"},{id:"bual",text:"Bual"},{id:"carg",text:"Carignan"},{id:"chass",text:"Chasselas"},{id:"cb",text:"Chemin Blanc"},{id:"cin",text:"Cinsault"},{id:"clair",text:"Clairette"},{id:"colomb",text:"Colombard"},{id:"counoi",text:"Counoise"},{id:"fdt",text:"Fendant"},{id:"fb",text:"Folle Blanche"},{id:"f",text:"Fürmint"},{id:"gamay",text:"Gamay"},{id:"gewurz",text:"Gewürztraminer"},{id:"graub",text:"Grauburgunder"},{id:"grct",text:"Grechetto"},{id:"gb",text:"Grenache Blanc"},{id:"gn",text:"Grenache Noir"},{id:"gp",text:"Gros Plan"},{id:"gv",text:"Grüner Veltliner"},{id:"ir",text:"Italienischer Riestling"},{id:"ka",text:"Kadarka"},{id:"ker",text:"Kerner"},{id:"mcb",text:"Macabeo"},{id:"malm",text:"Malmsey"},{id:"malv",text:"Malvasier"},{id:"mars",text:"Marsanne"},{id:"mdb",text:"Melon de Bourgogne"},{id:"mourv",text:"Mourvèdre"},{id:"mt",text:"Müller-Thurgau"},{id:"mu1",text:"Muscadelle"},{id:"mu2",text:"Muscadet"},{id:"mu3",text:"Musca"},{id:"mu4",text:"Musca d'Alsace"},{id:"mu5",text:"Muskateller"},{id:"neb",text:"Nebbiolo"},{id:"pal",text:"Palomino"},{id:"px",text:"Pedro Ximérez"},{id:"pv",text:"Petit Verdot"},{id:"pb",text:"Pinot Blanc"},{id:"pg",text:"Pinot Gris"},{id:"pn",text:"Pinot Noir"},{id:"pi",text:"Pinotage"},{id:"riesling",text:"Riesling"},{id:"rul",text:"Ruländer"},{id:"sang",text:"Sangiovese"},{id:"sb",text:"Sauvignon Blanc"},{id:"sc",text:"Scheurebe"},{id:"sem",text:"Sémilion"},{id:"ser",text:"Sercial"},{id:"sb2",text:"Seyval Blanc"},{id:"sieg",text:"Siegerrebe"},{id:"silv",text:"Silvaner"},{id:"spa",text:"Spätburgunder"},{id:"steen",text:"Steen"},{id:"syrah",text:"Syrah"},{id:"temp",text:"Tempranillo"},{id:"tokay",text:"Tokay"},{id:"tram",text:"Traminer"},{id:"treb",text:"Trebbiano"},{id:"ub",text:"Ugni Blanc"},{id:"verd",text:"Verdejo"},{id:"verdh",text:"Verdelho"},{id:"verm",text:"Vermentino"},{id:"vern",text:"Vernaccia"},{id:"vio",text:"Viognier"},{id:"viu",text:"Viura"},{id:"w",text:"Weißburgunder"}],type:[{id:"red",text:"Red",icon:"wine/winered.gif"},{id:"white",text:"White",icon:"wine/winewhite.gif"},{id:"sweet",text:"Sweet",icon:"wine/winesweet.gif"},{id:"spark",text:"Sparkling",icon:"wine/winespark.gif"},{id:"rose",text:"Rose",icon:"wine/winerose.gif"}],score:[{id:0,text:""},{id:1,text:"*"},{id:2,text:"**"},{id:3,text:"***"},{id:4,text:"****"},{id:5,text:"*****"}],country:[{id:"AR",text:"Argentina"},{id:"AT",text:"Austria"},{id:"BG",text:"Bulgaria"},{id:"CA",text:"Canada"},{id:"CL",text:"Chile"},{id:"CY",text:"Cyprus"},{id:"FR",text:"France"},{id:"DE",text:"Germany"},{id:"GR",text:"Greece"},{id:"HU",text:"Hungary"},{id:"IT",text:"Italy"},{id:"LU",text:"Luxembourg"},{id:"NZ",text:"New Zealand"},{id:"PT",text:"Portugal"},{id:"ZA",text:"South Africa"},{id:"ES",text:"Spain"},{id:"CH",text:"Switzerland"},{id:"US",text:"United States"}]},uiModels=uiModels||{};uiModels.winecellar={id:"winecellar",entity:"wine",entities:"wines",label:"Wine Cellar",icon:"wine.gif",leadfield:function(a){return a.get("name")+" "+a.get("vintage")},badgefield:function(a){return a.get("remaining")||0},elements:[{type:"panel",label:"Wine",width:100,elements:[{id:"name",type:"text",label:"Name",required:!0,maxlength:150,viewmany:!0,width:62,help:"Name of the wine as indicated on the label."},{id:"vintage",type:"integer",label:"Vintage",required:!0,maxlength:4,viewmany:!0,width:38,min:1900,max:2020,help:"Year the wine was produced."}]},{type:"tab",label:"General",elements:[{type:"panel",label:"Wine",width:80,elements:[{id:"winery",type:"text",label:"Winery",maxlength:100,required:!0,viewmany:!0,width:"62",help:"The establishment where this wine is made."},{id:"bsize",type:"lov",label:"Bottle Size",labellist:"Bottle",width:38,list:winecellar_lovs.bottleSize},{id:"grape",type:"lov",label:"Grape",viewmany:!1,width:62,list:winecellar_lovs.grape},{id:"type",type:"lov",label:"Type",viewmany:!0,width:38,list:winecellar_lovs.type},{id:"appellation",type:"text",label:"Appellation",width:100,help:"An appellation is a legally defined and protected geographical indication used to identify where the grapes for a wine were grown."},{id:"country",type:"lov",label:"Country",width:32,list:winecellar_lovs.country},{id:"region",type:"text",label:"Region",maxlength:100,width:30},{id:"area",type:"text",label:"Area",maxlength:100,width:38}]},{type:"panel",label:"Bottle Label",width:20,elements:[{id:"label_img",type:"image",label:"Label",maxlength:200,width:100,viewmany:!0}]}]},{type:"tab",label:"Purchase",elements:[{type:"panel",label:"Purchase",width:100,elements:[{id:"buying_date",type:"date",label:"Buying Date",width:40},{id:"price",type:"money",label:"Price",viewmany:!0,width:30},{id:"value",type:"money",label:"Value",width:30},{id:"purchased",type:"integer",label:"Bottles Purchased",labellist:"Purchased",maxlength:10,width:40},{id:"remaining",type:"integer",label:"Remaining",labeledit:"Bottles Remaining",maxlength:10,width:60,viewcharts:!1},{id:"notes",type:"textmultiline",label:"Notes",maxlength:150,width:100,height:2}]}]},{type:"tab",label:"Drinking and Score",elements:[{type:"panel",label:"Drinking",width:62,elements:[{id:"drink_from",type:"integer",label:"Drink from (year)",labellist:"Drink",labelcharts:"Wines by Start drinking period",placeholder:"2012",maxlength:10,width:50,min:1900,max:2100},{id:"drink_to",type:"integer",label:"to",labelcharts:"Wines by End drinking period",maxlength:4,width:50,min:1900,max:"2100"},{id:"peak_from",type:"integer",label:"Peak from",labelcharts:"Wines by Start peak period",maxlength:4,width:50,min:1900,max:2100},{id:"peak_to",type:"integer",label:"to",labelcharts:"Wines by End peak period",maxlength:4,width:50,min:1900,max:2100},{id:"meal",type:"textmultiline",label:"Meal",maxlength:200,width:100,height:2}]},{type:"panel",label:"Score",width:38,elements:[{id:"score",type:"lov",label:"My Score",labellist:"Score",list:winecellar_lovs.score,maxlength:100,width:100},{id:"score_parker",type:"integer",label:"Parker",labelcharts:"Parker scores",min:50,max:100,maxlength:3,width:100},{id:"score_winespectator",type:"integer",label:"Wine Spectator",labelcharts:"Wine Spectator scores",min:0,max:100,maxlength:3,width:100}]}]},{type:"tab",label:"Wine Tasting",elements:[{type:"panel-list",id:"degustations",attribute:"degustations",label:"Degustations",width:100,elements:[{id:"ddate",type:"date",label:"Date",maxlength:20,viewmany:!0,required:!0},{id:"robe",type:"text",label:"Robe",maxlength:100,viewmany:!0},{id:"nose",type:"text",label:"Nose",maxlength:100,viewmany:!0},{id:"taste",type:"text",label:"Taste",maxlength:100,viewmany:!0},{id:"notes",type:"textmultiline",label:"Note",maxlength:300,viewmany:!0,width:100,height:2}]}]},{type:"tab",label:"Notes",elements:[{type:"panel",label:"Comments",width:100,elements:[{id:"comments",type:"textmultiline",label:"Comments",maxlength:500,width:100,height:8}]}]}]},uiModels.winecellar_data=[{name:"Macrostie",label_img:"wine/macrostie.gif",vintage:2008,winery:"Mc Williams",bsize:"750",type:"red",price:20,grape:"chard",appellation:"",country:"US",region:"Sonoma",area:"",buying_date:"2008-05-12",value:24,purchased:24,remaining:16,notes:"",drink_from:2009,drink_to:2020,peak_from:2014,peak_to:2017,meal:"",score:"",score_parker:null,score_winespectator:null,comments:"",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",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:"2012-04-23",robe:"golden",nose:"fruity",taste:"incredible"},{ddate:"2013-24-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",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-05-05",robe:"rich",nose:"strong",taste:"very good"}]}]; |
@@ -8,3 +8,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -11,0 +11,0 @@ *************************************************************************** */ |
@@ -40,2 +40,3 @@ module.exports = function (grunt) { | ||
'bower_components/bootstrap/js/dropdown.js', | ||
//'bower_components/bootstrap/js/carousel.js', | ||
@@ -95,2 +96,13 @@ // Widgets | ||
// ************************************************************************************* | ||
// COPY | ||
// ************************************************************************************* | ||
copy: { | ||
main: { | ||
files: [ | ||
{expand: true, flatten: true, src: ['bower_components/bootstrap/dist/fonts/*'], dest: '<%= pkg.target %>/fonts/'} | ||
] | ||
} | ||
}, | ||
// ************************************************************************************* | ||
// JSHINT | ||
@@ -198,2 +210,3 @@ // ************************************************************************************* | ||
grunt.loadNpmTasks('grunt-bower-task'); | ||
grunt.loadNpmTasks('grunt-contrib-copy'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
@@ -215,5 +228,5 @@ grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
// Prod task(s). | ||
grunt.registerTask('prod', ['jshint', 'dev', 'concat:demo', 'concat:vendors', 'less:prod', 'uglify']); | ||
grunt.registerTask('prod', ['jshint', 'copy', 'dev', 'concat:demo', 'concat:vendors', 'less:prod', 'uglify']); | ||
}; | ||
@@ -6,3 +6,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -100,7 +100,7 @@ *************************************************************************** */ | ||
'<div><label>', i18nXpt.xpFields, '</label></div>', | ||
'<fieldset>' | ||
'<fieldset class="checkbox">' | ||
); | ||
//### list of columns to export ######################################### | ||
//'<div><label class="checkbox"><input type="checkbox" value="1" id="showID" checked="checked">', i18nXpt.IDkey, '</label></div>' | ||
h.push('<div><label><input type="checkbox" value="1" id="showID">', i18nXpt.IDkey, '</label></div>'); | ||
_.each(fields, function(f, idx){ | ||
@@ -112,3 +112,3 @@ var fLabel = f.labelexport || f.label || f.labellist, | ||
} | ||
h.push('<div><label class="checkbox"><input type="checkbox" value="1" id="', fID, '" checked="checked">', fLabel, '</label></div>'); | ||
h.push('<div><label><input type="checkbox" value="1" id="', fID, '" checked="checked">', fLabel, '</label></div>'); | ||
if (idx === 10 && useMore){ | ||
@@ -225,4 +225,4 @@ h.push(EvoExport.html_more2(i18nXpt.allFields)); | ||
fldsDomHash = {}, | ||
useHeader = this.$('#xptFLH').prop('checked'); | ||
//showID=this.$('#showID').prop('checked'); | ||
useHeader = this.$('#xptFLH').prop('checked'), | ||
showID=this.$('#showID').prop('checked'); | ||
@@ -251,2 +251,5 @@ //if(showID){ | ||
if (useHeader) { | ||
if(showID){ | ||
h.push('ID', sep); | ||
} | ||
_.each(flds, function(f, idx){ | ||
@@ -262,2 +265,5 @@ h.push(f.label); | ||
_.every(data, function(m, idx){ | ||
if(showID){ | ||
h.push(m.id, sep); | ||
} | ||
_.each(flds, function(f, idx){ | ||
@@ -289,4 +295,7 @@ var mv = m.get(f.id); | ||
h.push('<tr>\n'); | ||
if(showID){ | ||
h.push('<th>ID</th>'); | ||
} | ||
_.each(flds, function(f){ | ||
h.push('<th>', f.id, '</th>'); | ||
h.push('<th>', f.label, '</th>'); | ||
}); | ||
@@ -296,6 +305,9 @@ h.push('</tr>\n'); | ||
// -- data | ||
_.every(data, function(d, idx){ | ||
_.every(data, function(m, idx){ | ||
h.push('<tr>'); | ||
if(showID){ | ||
h.push('<td>', m.id, '</td>'); | ||
} | ||
_.each(flds, function(f){ | ||
var mj = d.get(f.id); | ||
var mj = m.get(f.id); | ||
if (!_.isUndefined(mj) && mj!=='') { | ||
@@ -316,2 +328,5 @@ h.push('<td>', mj, '</td>'); | ||
}); | ||
if(showID){ | ||
propList.unshift('id'); | ||
} | ||
_.every(data, function(m, idx){ | ||
@@ -331,2 +346,5 @@ h.push(JSON.stringify(_.pick(m.toJSON(), propList), null, 2)); | ||
} | ||
if(showID){ | ||
sql.push('ID, '); | ||
} | ||
_.each(flds, function(f,idx){ | ||
@@ -351,2 +369,5 @@ sql.push(f.id); | ||
h.push(sql); | ||
if(showID){ | ||
h.push('"', m.id, '", '); | ||
} | ||
_.each(flds, function(f, idx){ | ||
@@ -407,2 +428,5 @@ fValue=m.get(f.id); | ||
h.push('<', elemName, ' '); | ||
if(showID){ | ||
h.push('ID="', m.id, '" '); | ||
} | ||
_.each(flds, function(f){ | ||
@@ -409,0 +433,0 @@ h.push(f.id, '="'); |
@@ -6,3 +6,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -9,0 +9,0 @@ *************************************************************************** */ |
@@ -8,3 +8,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -97,2 +97,5 @@ *************************************************************************** */ | ||
h.push(uiInput.hidden(fid, fv)); | ||
}, | ||
formula: function(h, f, fid, fv){ | ||
h.push(uiInput.text(fid, fv, f, null)); | ||
} | ||
@@ -429,2 +432,5 @@ }, | ||
switch (fld.type) { | ||
case fts.formula: | ||
h.push('<div id="',fid, '" class="form-control">',fld.formula(),'</div>'); | ||
break; | ||
case fts.color: // TODO is the color switch necessary? | ||
@@ -431,0 +437,0 @@ //h.push(uiInput.colorBox(fid, fv), fv); |
// Evolutility Localization Library ENGLISH | ||
// https://github.com/evoluteur/evolutility | ||
// (c) 2014 Olivier Giulieri | ||
// (c) 2015 Olivier Giulieri | ||
@@ -105,4 +105,4 @@ var Evol = Evol || {}; | ||
money:'"{0}" must be a valid number.', | ||
date:'"{0}" must be a valid date, format must be "MM/DD/YYYY" like "12/24/2014".', | ||
datetime:'"{0}" must be a valid date/time, format must be "MM/DD/YYYY hh:mm AM/PM" like "12/24/2014 10:30 AM".', | ||
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".', | ||
@@ -109,0 +109,0 @@ max:'"{0}" must be smaller or equal to {1}.', |
@@ -8,3 +8,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -53,3 +53,16 @@ *************************************************************************** */ | ||
if (idx === 0) { | ||
h.push('<div data-mid="', model.id, '"><h4>', | ||
h.push('<div data-mid="', model.id, '">'); | ||
// Item badge | ||
var bf=that.uiModel.badgefield; | ||
if(bf){ | ||
h.push('<span class="badge pull-right">'); | ||
if(_.isFunction(bf)){ | ||
h.push(bf(model)); | ||
}else if(_.isString(bf)){ | ||
h.push(model.escape(bf)); | ||
} | ||
h.push('</span>'); | ||
} | ||
// Item title | ||
h.push('<h4>', | ||
selectable?that._HTMLCheckbox(model.id):'', | ||
@@ -56,0 +69,0 @@ Evol.Dico.HTMLFieldLink('fg-'+f.id, f, v, icon, !link, route?route+model.id:null), |
@@ -8,3 +8,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -11,0 +11,0 @@ *************************************************************************** */ |
@@ -8,3 +8,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -48,2 +48,3 @@ *************************************************************************** */ | ||
v, | ||
bf = that.uiModel.badgefield, | ||
link = (this.links!==false), | ||
@@ -66,2 +67,12 @@ ft = Evol.Dico.fieldTypes; | ||
v = Evol.Dico.HTMLFieldLink('fv-'+f.id, f, v, icon, !link, route?route+model.id:null); | ||
// Item badge | ||
if(bf){ | ||
v+='<span class="badge badge-list">'; | ||
if(_.isFunction(bf)){ | ||
v+=bf(model); | ||
}else if(_.isString(bf)){ | ||
v+=model.escape(bf); | ||
} | ||
v+='</span>'; | ||
} | ||
} | ||
@@ -68,0 +79,0 @@ if(f.type===ft.textml){ |
@@ -8,3 +8,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -11,0 +11,0 @@ *************************************************************************** */ |
@@ -8,3 +8,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -11,0 +11,0 @@ *************************************************************************** */ |
@@ -8,3 +8,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -11,0 +11,0 @@ *************************************************************************** */ |
@@ -8,3 +8,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -11,0 +11,0 @@ *************************************************************************** */ |
@@ -8,3 +8,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -49,2 +49,5 @@ *************************************************************************** */ | ||
break; | ||
case fts.formula: | ||
$f.html(f.formula(model)); | ||
break; | ||
case fts.pix: | ||
@@ -51,0 +54,0 @@ $f.html((fv)?('<img src="'+iconsPath+fv+'" class="img-thumbnail">'):('<p>'+Evol.i18n.nopix+'</p>')); |
@@ -8,3 +8,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -11,0 +11,0 @@ *************************************************************************** */ |
@@ -8,3 +8,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -216,2 +216,5 @@ *************************************************************************** */ | ||
break;*/ | ||
case fts.formula: | ||
$f.html(f.formula(model)); | ||
break; | ||
default: | ||
@@ -241,2 +244,5 @@ $f.text(eDico.HTMLField4Many(f, _.isUndefined(fv)?'':fv, Evol.hashLov, iconsPath) + ' '); | ||
break; | ||
case fts.formula: | ||
$f.html(f.formula(model)); | ||
break; | ||
default: | ||
@@ -714,3 +720,7 @@ $f.val(fv); | ||
} | ||
h.push(eDico.HTMLField4One(f, this.fieldViewId(f.id), fv, mode, iconsPath)); | ||
if(f.type==='formula'){ | ||
h.push(f.formula(this.model)); | ||
}else{ | ||
h.push(eDico.HTMLField4One(f, this.fieldViewId(f.id), fv, mode, iconsPath)); | ||
} | ||
return this; | ||
@@ -717,0 +727,0 @@ }, |
@@ -6,3 +6,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -177,3 +177,3 @@ *************************************************************************** */ | ||
uiModel: uiModel, | ||
pageSize: 20, | ||
pageSize: that.pageSize, | ||
titleSelector: '#title', | ||
@@ -180,0 +180,0 @@ style: that.style |
@@ -6,3 +6,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -259,2 +259,3 @@ *************************************************************************** */ | ||
case 'export': | ||
config.sampleMaxSize = config.pageSize; | ||
vw = new Evol.ViewAction.Export(config).render(); | ||
@@ -529,2 +530,6 @@ $v.addClass('panel panel-info') | ||
getCollection:function(){ | ||
return this._curCollec(); | ||
}, | ||
setModelById: function(id){ | ||
@@ -531,0 +536,0 @@ var m=this.collection.get(id); |
@@ -6,3 +6,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -9,0 +9,0 @@ *************************************************************************** */ |
@@ -146,2 +146,5 @@ var winecellar_lovs = { | ||
}, | ||
badgefield:function(model){ | ||
return model.get('remaining') || 0; | ||
}, | ||
elements: [ | ||
@@ -259,3 +262,3 @@ { | ||
type: 'image', | ||
label: 'Label', | ||
label: 'Label', | ||
maxlength: 200, | ||
@@ -262,0 +265,0 @@ width: 100, |
20
js/ui.js
@@ -6,3 +6,3 @@ /*! *************************************************************************** | ||
* https://github.com/evoluteur/evolutility | ||
* Copyright (c) 2014, Olivier Giulieri | ||
* Copyright (c) 2015, Olivier Giulieri | ||
* | ||
@@ -28,2 +28,3 @@ *************************************************************************** */ | ||
//html:'html', | ||
formula:'formula', | ||
email: 'email', | ||
@@ -222,11 +223,20 @@ pix: 'image', | ||
}, | ||
buttonsIcon: function(id, cssGlyphIcon){ | ||
return '<div data-id="'+id+'" class="glyphicon glyphicon-'+cssGlyphIcon+'" tabindex="0"></div>'; | ||
}, | ||
buttonsPlus: function(){ | ||
return '<div data-id="bPlus" class="glyphicon glyphicon-plus-sign" tabindex="0"></div>'; | ||
return this.buttonsIcon('bPlus', 'plus-sign'); | ||
}, | ||
buttonsMinus: function(){ | ||
return '<div data-id="bMinus" class="glyphicon glyphicon-minus-sign" tabindex="0"></div>'; | ||
return this.buttonsIcon('bMinus', 'minus-sign'); | ||
}, | ||
buttonsPlusMinus: function(){ | ||
return this.buttonsPlus()+this.buttonsMinus(); | ||
},/* | ||
buttonsPrev: function(){ | ||
return this.buttonsIcon('bPrev', 'chevron-left'); | ||
}, | ||
buttonsNext: function(){ | ||
return this.buttonsIcon('bNext', 'chevron-right'); | ||
},*/ | ||
@@ -424,7 +434,7 @@ // --- links --- | ||
insertCollection: function (collection, dataSet){ | ||
if(collection.length===0){ | ||
//if(collection.length===0){ | ||
_.each(dataSet,function(d){ | ||
collection.create(d); | ||
}); | ||
} | ||
//} | ||
}, | ||
@@ -431,0 +441,0 @@ |
{ | ||
"name": "evolutility", | ||
"version": "0.3.5", | ||
"copyright": "(c) 2014 Olivier Giulieri", | ||
"version": "0.3.6", | ||
"copyright": "(c) 2015 Olivier Giulieri", | ||
"license": "AGPL-3.0", | ||
@@ -22,3 +22,3 @@ "target": "dist", | ||
"grunt-contrib-less": "~0.10.0", | ||
"grunt-contrib-copy": "~0.5.0", | ||
"grunt-contrib-copy": "~0.7.0", | ||
"grunt-contrib-jshint": "~0.8.0", | ||
@@ -25,0 +25,0 @@ "grunt-bower-task": "~0.3.4" |
@@ -12,2 +12,14 @@ # Evolutility.js | ||
## Installation | ||
You can use Bower to install Evolutility. | ||
```bash | ||
# To get the latest stable version, use Bower from the command line. | ||
bower install evolutility | ||
# To get the most recent, latest committed-to-master version use: | ||
bower install evolutility#master | ||
``` | ||
## Views | ||
@@ -193,5 +205,5 @@ | ||
Copyright (c) 2014 Olivier Giulieri. | ||
Copyright (c) 2015 Olivier Giulieri. | ||
Evolutility.js is released under the GNU Affero General Public License version 3 [GNU AGPLv3](http://www.gnu.org/licenses/agpl-3.0.html). | ||
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 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 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
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances 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
2146545
104
15803
208
6