twigkit / tempo Goto Github PK
View Code? Open in Web Editor NEWTempo is an easy, intuitive JavaScript rendering engine that enables you to craft data templates in pure HTML.
Home Page: http://tempojs.com/
License: Apache License 2.0
Tempo is an easy, intuitive JavaScript rendering engine that enables you to craft data templates in pure HTML.
Home Page: http://tempojs.com/
License: Apache License 2.0
Yes they should!
We don't find a way to capitalize every word in a string through any filter, so we created a 'capitalize' filter:
'capitalize': function(value, args){
return value.replace( /(^|\s)([a-z])/g , function(m,p1,p2){return p1+p2.toUpperCase();});
}
It would be nice if tempo could also work those who prefer using xhtml5 strict type markup, so instead of just having it work with a "naked" attribute data-template...
that it also could work for those who want to use more xhtml-type strict markup like so...
Is that possible?
This is a wonderful application. Thanks for making it available.
It would be nice if tempo could also work those who prefer using xhtml5 strict type markup, so instead of just having it work with a "naked" attribute data-template...
<li class="row" data-template style="display: none;">
that it also could work for those who want to use more xhtml-type strict markup like so...
<li class="row" data-template="data-template" style="display: none;">
Is that possible?
This is a wonderful application. Thanks for making it available.
I noticed that tempo doesn't seem to handle multiple levels of nesting of templates, especially when data-template names are identical across levels. When I used distinct name for each level of data-template, it seemed to work fine.
Example :
[ { "body" : "1", "children" : [ { "body" : "11", "children" : [ { "body" : "111", "children" : [ ] } ] }, { "body" : "12", "children" : [ { "body" : "121", "children" : [ ] }, { "body" : "122", "children" : [ ] }, { "body" : "123", "children" : [ ] } ] }, { "body" : "13", "children" : [ { "body" : "131", "children" : [ ] }, { "body" : "132", "children" : [ ] }, { "body" : "133", "children" : [ ] } ] } ] }, { "body" : "2", "children" : [ { "body" : "21", "children" : [ { "body" : "211", "children" : [ ] }, { "body" : "212", "children" : [ ] } ] }, { "body" : "22", "children" : [ { "body" : "221", "children" : [ ] }, { "body" : "222", "children" : [ ] } ] } ] }, { "body" : "3", "children" : [ { "body" : "31", "children" : [ ] }, { "body" : "32", "children" : [ { "body" : "321", "children" : [ ] }, { "body" : "322", "children" : [ ] } ] }, { "body" : "33", "children" : [ ] }, { "body" : "34", "children" : [ { "body" : "341", "children" : [ ] } ] } ] }, { "body" : "4", "children" : [ { "body" : "41", "children" : [ ] }, { "body" : "42", "children" : [ { "body" : "421", "children" : [ ] } ] }, { "body" : "42", "children" : [ ] }, { "body" : "43", "children" : [ ] } ] } ]
It would be nice to use some kind of special atribute {{tempo.index}} which would give the index of the element in the rendered collection.
If i try to load template from remote source and add it into element tempo do not consider it:
$(pages).each(function (i, page) {
$.get('/layouts/' + page.layout + '/markup.html',
function (data) {
var p = document.createElement('div');
p.innerHTML = data;
// START ERROR
// p.innerHTML = '<div>{{text}}</div>'
var layout = Tempo.prepare(p);
// p.innerHTML = ''
// END ERROR!
layout.starting();
layout.render(data.layouts);
});
});
is not possible generate tempalte without add it into page?
Adding the prototype JS library to the twitter example produces the following error;
Uncaught TypeError: Object function each(iterator, context) {
var index = 0;
try {
this._each(function(value) {
iterator.call(context, value, index++);
});
} catch (e) {
if (e != $break) throw e;
}
return this;
} has no method 'handler'
I'm having issues re-rendering a list with new data that has been already rendered with Tempo. It would be great to see a working example of how you use the clear() in a real context on your site.
I'm rendering a list like this:
var element = Tempo.prepare(renderContainer);
var templateData = $.parseJSON(searchObj.results.contents[dataRequest]);
element.render(templateData);
Which works the first go around. If I reuse that code to populate the same list with new data from an ajax call, I get a list the same length as the original, and with every item being populated by the last element in the old data (even though I can see the new data coming in fine in the console). So, for example:
This:
-Billboards
-Centennial Exhibition 1876
Turns into this
-Centennial Exhibition 1876
-Centennial Exhibition 1876
This all seems to point to me using the .clear() function. But I've tried putting it in a few different places and I either get the same result as above or I get an empty list.
Your example seems to suggest chaining it after rendering:
Tempo.prepare('marx-brothers').render( data ).clear();
But wouldn't that just clear out the list you just rendered rather than clearing it before you render it?
I've trawled through the docs but can't seem to find a solution;
To put it simply, I'm trying to use the following template.
<li data-template data-user-id="{{user_id}}">{{username}}</li>
My json object has "user_id", but I'm guessing I can only use {{user_id}} inside the li tags?
This is my html code:
<ul id="stuffs">
<li data-template>
[<a href="documents/{{code}}">{{code}}</a>]
{{name}}
</li>
</ul>
Then I trigger the render:
Tempo.prepare("stuffs").render(this.stuffs);
And this is the result:
<ul id="stuffs">
<li data-template="">
[<a href="documents/%7B%7Bcode%7D%7D">1234</a>] foo bar
</li><li data-template="">
[<a href="documents/%7B%7Bcode%7D%7D">4321</a>] 4321 bar foo
</li>
</ul>
(Copied from Firebug) Note the suspicious "%7B%7B"
Support functions to modify and format values before rendering, e.g. {{ some_value | trim }}
Something appears to be broken in the Regex generated in _replaceVariables (var filterSplitter). When trying to split the arguments it will output an array with 3 elements while only 2 filters were specified. This results in the last filter being applied twice.
This wouldn't really be a problem in most (default) filters, but for one of my filters the effects are devastating.
I fixed this the quick and dirt way by doing replacing
var filterSplitter = new RegExp('\\|[ ]?(?=' + utils.memberRegex(renderer.filters) + ')', 'g');
with
var filterSplitter = "|";
This seems to give no further(!) problems, aside from the other issue that states trying to use a pipe in the replace filter makes things explode (or split? :p).
Thanks for building this, loving it so far ;)
One thing I'd like to add is to make it possible to easily create filters externally.
Currently only tags are replaced in the attributes on the template node itself.
Say you wanted to format a dollar amount with tempo.js. You'd do something like this:
{{cost | format | prepend $ }}
However, if you have cents in your dollar amount, it will not be formatted in the traditional way. To be specific: if cost=float(12.10), then the above template would yield "$12.1". This does not match the desired output of "$12.10".
I propose that the format filter's syntax be extended to take up to two optional arguments. The first argument would be the number of digits that must be shown on the left of the decimal point, and the second argument would be the number of digits that must be shown on the right of the decimal point.
Some examples with cost=12.1:
{{ cost | format }} : 12.1
{{ cost | format 4 }}: 0012.1
{{ cost | format 0,2}}: 12.10
{{ cost | format 4,2}}: 0012.10
A complete template for formatting dollar amounts if this feature is implemented would be:
{{ cost | format 0,2 | prepend $ }}
If I have three JSON records to apply to a template and one of them doesn't have rendering match within the template then the template is not output for any of the records - it should output the two records that did have rendering matches.
See http://jsfiddle.net/extcontact/D29U8/3/
If you remove the second JSON record the template will be output, otherwise it won't...it should be output for the two records that have rendering matches.
Example:
If the index = 0 then gives to <select onchange="update_hours_list()>.
100000 to 100.000,00 type thing.
I can not get "_tempo.index" in tempate while using tempo.min.js(packed version), but i can do that with tempo.js(uncompressed version)?
is it something wrong happened when compressing?
I ran into another issue this morning: I was trying to use tempo on a twitter feed and created a regular expression to look for the URLs within the text of the feed. My original expression had (http|https) to look for the token http or https; however, when Tempo was processing the filter, it split the regEx in two when it was performing the split for filter chaining. I found a workaround by just removing the pipe and limitting the expression to just http.
<img src="default.png" data-src="{{actual_image}}" ... /> where src is replaced with data-src.
The library is not working on Android 4, it only creates empty "boxes" with neither text nor images.
The bug can be seen in the home page of this library http://tempojs.com/ checking that the two boxes with the demo content are empty.
Hi,
Tempo looks fantastic, I'm excited to use it in my projects. However, I know I'll need to generate inline-block elements dynamically for one site. It would be great if I could pass in a CSS class to be applied to data templates once they're rendered; adding display: block could remain the fallback behavior if no class is provided. That would give developers more control over how the content is rendered.
If you want, I'd be happy to implement this this week and submit a pull request.
Thanks!
Alex
first of all, I LOVE tempo...
here's my question - I have a list of members that are being rendered to the page using tempo, in a table style format (each row is a member name, address, contact info..).
I would like to be able to click on a user and make a 2nd ajax call to the server, inserting information beneath the selected user with a list of documents that are associated to the user:
user #1 telephone address email <-- these are drawn during initial page render
user #2 telephone address email
-- document #1 <-- user #2 is clicked, and a separate call is made to populate this information
-- document #2
user #3 telephone address email
user #4 telephone address email
I've tried using a nested template but it gets rendered during the initial page draw and the tags are then removed... is tempo set up for this and I just need to find the right sample code..?
I am going thru the example and my person code and the first row is skipped. I've been looking for this type of project for sometime and could really use it in a current project i'm working on. Any ideas?
Again the sample code on you site produces the following results for me vs what you have as the example render.
Results:
-Chico Marx
---Papa Romani
-Harpo Marx
--Stage Door Canteen
-Groucho Marx
--Mr. Music
--Double Dynamite
-Gummo Marx
-Zeppo Marx
-A Kiss in the Dark
Consider the following JSON:
{ "locations" : [ "All",
"Europe",
"Asia",
"America",
"India"
]}
I'm using this JS:
Tempo.prepare("locations").render(data.locations);
I need to render this JSON on a page. What should I use as a placeholder for the name of the location?
e.g.
<ul id="locations" class="menu">
<li data-template>
{{?????}}
</li>
</ul>
As I take time to use this nice js-template engine instead of create Elements on my self with jQuery, I found some strange behavior. Lets say, this is the template:
<div data-template> <ul> <li>{{foo}}</li> <li>{{bar}}</li> <li>{{baz}}</li> </ul> </div>
I can't explain why, but if a Browser renders this directly in HTML everthing is fine. If its rendered with Tempo, some space is generated between each element. If the CSS-Rules "float:left" or "display:inline-block" is used on these "li"s, the space become visible - but only if rendered with Tempo.
I tried the Development-Tools in Chrome, Dragonfly in Opera and Firebug in Firefox to figure out why, but the Dom-tree seems to be the same, the visible result not. After I tried this, the space disappears:
<div data-template> <ul> <li>{{foo}}</li><li>{{bar}}</li><li>{{baz}}</li> </ul> </div>
My conclusion is, that the generated "\n"-Nodes after each Element produces this strange space. It's difficult to explain this with my broken english, but i tried. It would be loveful to see you hunting this bug. I slowly become a Fan of you engine. :)
I have a valid json as follows:
There is a "result" that has "curriculums" where each curriculum has a "jobSeekerId" and a collection of "educations" where each education has and "average".
I would like to show each "jobSeekerId" with all his "educations.average" values, something like this:
jobSeekerId: 1
averages: 1,2,3
jobSeekerId: 2
averages: 1,8,2
jobSeekerId: 3
averages: 1,0,8,100,5
I'm trying a template with a nested template but it's not working:
<div id="_templatePrueba">
<div data-template style="display: none;">
<div data-template="result.curriculums" >
for this {{jobSeekerId}} we have the averages:<br><br>
<div data-template style="display: none;">
<div data-template="educations" >
{{average}} <br>
</div>
</div>
</div>
</div>
</div>
Any help would be appreciated!
Here is the actual json:
{
"result":{
"curriculums":[
{
"careerHistories":[
{
"areaDeTrabajo":{
"id":109,
"name":"Programación",
"shortname":"programacion"
},
"company":"Dridco",
"companyCountry":{
"id":2,
"name":"Argentina"
},
"cvId":759032,
"id":5865036,
"incomingMonth":5,
"incomingYear":2008,
"industriaDeEmpresa":{
"id":175,
"name":"Internet"
},
"jobDescription":"Programacion en asp 3.0 , .net , Java\r\n\r\nActualmente Lider Tecnico",
"jobType":{
"id":3,
"name":"Senior / Semi-Senior",
"shortname":"senior"
},
"outcomingMonth":1,
"outcomingYear":0,
"peopleInCharge":4,
"positionName":"Lider Tecnico",
"totalEmployee":500,
"workAreaName":"Sistemas / Tecnología / IT",
"workedMonth":9,
"workedMonths":9,
"workedYear":3,
"workedYears":3
}
],
"educations":[
{
"average":7,
"certificationType":"Licenciatura en Informatica",
"completionYear":0,
"countryDto":{
"id":2,
"name":"Argentina"
},
"cvId":759032,
"degreeDto":{
"id":11,
"name":"Universitario",
"preponderance":"HIGH"
},
"estadoActualDto":{
"id":2,
"name":"En curso"
},
"id":923766,
"institutionDto":{
"id":76,
"name":"Universidad Tecnológica Nacional (UTN)"
},
"majorDto":{
"id":177,
"name":"Ing. Informática / Sistemas"
},
"quantitySubjects":75,
"quantitySubjectsPassed":67,
"startMonth":1,
"startYear":2005
},
{
"average":8.23,
"certificationType":"Tecnico en electronica",
"completionMonth":2,
"completionYear":2000,
"countryDto":{
"id":2,
"name":"Argentina"
},
"cvId":759032,
"degreeDto":{
"id":6,
"name":"Secundario",
"preponderance":"MEDIUM"
},
"estadoActualDto":{
"id":1,
"name":"Graduado"
},
"id":923736,
"institutionDto":{
"id":78,
"name":"Otra"
},
"majorDto":{
"id":225,
"name":"Técnico"
},
"otherInstitution":"EET Nro 2 de Don Bosco",
"quantitySubjects":40,
"quantitySubjectsPassed":40,
"startMonth":1,
"startYear":1993
}
],
"employerHasVisibility":false,
"jobApplications":[
{
"degreeAffinity":0.001,
"degreeRequirements":1,
"id":82481136,
"jobId":883257,
"status":"No Leído"
}
],
"jobSeekerId":983031,
"jobSeekerSearch":{
"age":30,
"birthdate":{
"date":18,
"day":0,
"hours":0,
"minutes":0,
"month":9,
"nanos":0,
"seconds":0,
"time":372222000000,
"timezoneOffset":180,
"year":81
},
"gender":"M",
"id":983031
},
"languages":[
{
"id":66,
"name":"Inglés"
}
],
"recommended":false
},
{
"careerHistories":[
{
"areaDeTrabajo":{
"id":106,
"name":"Producción",
"shortname":"produccion"
},
"company":"Baliarda S.A.",
"companyCountry":{
"id":2,
"name":"Argentina"
},
"cvId":312769,
"id":583200,
"incomingMonth":9,
"incomingYear":2005,
"industriaDeEmpresa":{
"id":161,
"name":"Farmacéutica"
},
"jobDescription":"manejo de diferentes maquinas: estuchadoras, codificadoras, balanzas de peso dinamico, hornos termocontraibles etc",
"jobType":{
"id":4,
"name":"Junior",
"shortname":"junior"
},
"outcomingYear":0,
"peopleInCharge":1,
"positionName":"operario mecanizado",
"totalEmployee":800,
"workAreaName":"Producción",
"workedMonth":5,
"workedMonths":5,
"workedYear":6,
"workedYears":6
}
],
"educations":[
{
"average":7,
"certificationType":"prof en historia",
"completionYear":0,
"countryDto":{
"id":2,
"name":"Argentina"
},
"cvId":312769,
"degreeDto":{
"id":8,
"name":"Terciario",
"preponderance":"HIGH"
},
"estadoActualDto":{
"id":2,
"name":"En curso"
},
"id":363373,
"institutionDto":{
"id":78,
"name":"Otra"
},
"majorDto":{
"id":144,
"name":"Educación"
},
"otherInstitution":"inst. J.V Gonzalez",
"quantitySubjects":35,
"quantitySubjectsPassed":5,
"startMonth":2,
"startYear":2006
},
{
"average":7,
"certificationType":"bachiller en ciencias exactas",
"completionMonth":11,
"completionYear":1998,
"countryDto":{
"id":2,
"name":"Argentina"
},
"cvId":312769,
"degreeDto":{
"id":6,
"name":"Secundario",
"preponderance":"MEDIUM"
},
"estadoActualDto":{
"id":1,
"name":"Graduado"
},
"id":363372,
"institutionDto":{
"id":78,
"name":"Otra"
},
"majorDto":{
"id":114,
"name":"Bachiller"
},
"otherInstitution":"C.E.M. nº 5",
"startMonth":3,
"startYear":1994
}
],
"employerHasVisibility":false,
"jobApplications":[
{
"degreeAffinity":0.001,
"degreeRequirements":1,
"id":82481134,
"jobId":883257,
"status":"No Leído"
}
],
"jobSeekerId":404364,
"jobSeekerSearch":{
"age":30,
"birthdate":{
"date":6,
"day":3,
"hours":0,
"minutes":0,
"month":4,
"nanos":0,
"seconds":0,
"time":357966000000,
"timezoneOffset":180,
"year":81
},
"gender":"M",
"id":404364
},
"languages":[
{
"id":63,
"name":"Francés"
},
{
"id":66,
"name":"Inglés"
}
],
"recommended":false
},
{
"careerHistories":[
{
"areaDeTrabajo":{
"id":66,
"name":"Educación",
"shortname":"educacion"
},
"company":"Instituto Santa Rosa de Lima",
"companyCountry":{
"id":2,
"name":"Argentina"
},
"cvId":17119,
"id":38252,
"incomingMonth":4,
"incomingYear":2006,
"industriaDeEmpresa":{
"id":154,
"name":"Educación"
},
"jobDescription":"Profesora suplente de Ciencia Sociales en EPB y Profesora suplente de Historia en Polimodal.",
"jobType":{
"id":3,
"name":"Senior / Semi-Senior",
"shortname":"senior"
},
"outcomingMonth":5,
"outcomingYear":2006,
"peopleInCharge":9,
"positionName":"Profesora",
"workAreaName":"Educación y Psicopedagogía",
"workedMonth":1,
"workedMonths":1,
"workedYear":0,
"workedYears":0
}
],
"educations":[
{
"average":7,
"certificationType":"CBC",
"completionMonth":11,
"completionYear":1992,
"countryDto":{
"id":2,
"name":"Argentina"
},
"cvId":17119,
"degreeDto":{
"id":11,
"name":"Universitario",
"preponderance":"HIGH"
},
"description":"CBC para la Licenciatura en Relaciones del trabajo",
"estadoActualDto":{
"id":1,
"name":"Graduado"
},
"id":21220,
"institutionDto":{
"id":37,
"name":"Universidad de Buenos Aires (UBA)"
},
"majorDto":{
"id":161,
"name":"Historia"
},
"quantitySubjects":6,
"quantitySubjectsPassed":6,
"startMonth":4,
"startYear":1990
},
{
"average":7.66,
"certificationType":"Bachiller en Administración de Personal.",
"completionMonth":11,
"completionYear":1989,
"countryDto":{
"id":2,
"name":"Argentina"
},
"cvId":17119,
"degreeDto":{
"id":6,
"name":"Secundario",
"preponderance":"MEDIUM"
},
"description":"Bachiller en administración de personal.",
"estadoActualDto":{
"id":1,
"name":"Graduado"
},
"id":21216,
"institutionDto":{
"id":78,
"name":"Otra"
},
"majorDto":{
"id":114,
"name":"Bachiller"
},
"otherInstitution":"Nuestra Señora de los Buenos A",
"startMonth":3,
"startYear":1983
}
],
"employerHasVisibility":true,
"jobApplications":[
{
"degreeAffinity":0.001,
"degreeRequirements":1,
"id":82481131,
"jobId":883257,
"status":"No Leído"
}
],
"jobSeekerId":22805,
"jobSeekerSearch":{
"age":41,
"birthdate":{
"date":28,
"day":0,
"hours":0,
"minutes":0,
"month":5,
"nanos":0,
"seconds":0,
"time":15390000000,
"timezoneOffset":180,
"year":70
},
"firstname":"Karina Mabel",
"gender":"F",
"id":22805,
"lastname":"Blanc"
},
"languages":[
],
"recommended":false
},
{
"careerHistories":[
{
"areaDeTrabajo":{
"id":109,
"name":"Programación",
"shortname":"programacion"
},
"company":"Oracle Contratado por Tsoft",
"companyCountry":{
"id":2,
"name":"Argentina"
},
"cvId":858182,
"id":2885431,
"incomingMonth":10,
"incomingYear":2008,
"industriaDeEmpresa":{
"id":173,
"name":"Tecnología"
},
"jobDescription":"Desarrollador Java Jr\r\nFrameworks: Swingx y Hibernate. Uso básico de Spring y Struts.\r\n",
"jobType":{
"id":4,
"name":"Junior",
"shortname":"junior"
},
"outcomingMonth":0,
"outcomingYear":0,
"peopleInCharge":1,
"positionName":"Desarrollador Java",
"totalEmployee":0,
"workAreaName":"Sistemas / Tecnología / IT",
"workedMonth":4,
"workedMonths":4,
"workedYear":3,
"workedYears":3
}
],
"educations":[
{
"average":6,
"certificationType":"Ingeniería en Sistemas de Información",
"completionYear":0,
"countryDto":{
"id":2,
"name":"Argentina"
},
"cvId":858182,
"degreeDto":{
"id":11,
"name":"Universitario",
"preponderance":"HIGH"
},
"description":"Actualmente cursando: Ingeniería en Sistemas de Información en la Universidad Tecnológica Nacional Regional Buenos Aires, 30 materias aprobadas.\r\n",
"estadoActualDto":{
"id":2,
"name":"En curso"
},
"id":1043968,
"institutionDto":{
"id":76,
"name":"Universidad Tecnológica Nacional (UTN)"
},
"majorDto":{
"id":177,
"name":"Ing. Informática / Sistemas"
},
"quantitySubjects":39,
"quantitySubjectsPassed":30,
"startMonth":3,
"startYear":2004
}
],
"employerHasVisibility":true,
"jobApplications":[
{
"degreeAffinity":0.001,
"degreeRequirements":1,
"id":82481130,
"jobId":883257,
"status":"No Leído"
}
],
"jobSeekerId":1121701,
"jobSeekerSearch":{
"age":31,
"birthdate":{
"date":8,
"day":1,
"hours":0,
"minutes":0,
"month":8,
"nanos":0,
"seconds":0,
"time":337230000000,
"timezoneOffset":180,
"year":80
},
"firstname":"Pablo Ignacio",
"gender":"M",
"id":1121701,
"lastname":"Krichevsky"
},
"languages":[
{
"id":66,
"name":"Inglés"
}
],
"recommended":false
},
{
"careerHistories":[
{
"areaDeTrabajo":{
"id":32,
"name":"Administración",
"shortname":"administracion"
},
"company":"Editorial Longseller S.A.",
"companyCountry":{
"id":2,
"name":"Argentina"
},
"cvId":289703,
"id":5016338,
"incomingMonth":11,
"incomingYear":2010,
"industriaDeEmpresa":{
"id":153,
"name":"Editorial"
},
"jobDescription":"Ádministración general. \r\nConfección y carga de Contratos correspondientes a los autores de libros. \r\nRegistros de Obra publicadas en la Cámara Arg del libro.\r\nLiquidaciones de los derechos de autor.\r\nContabilizaciones de derechos.\r\n",
"jobType":{
"id":3,
"name":"Senior / Semi-Senior",
"shortname":"senior"
},
"outcomingMonth":0,
"outcomingYear":0,
"peopleInCharge":1,
"positionName":"Administrativa",
"totalEmployee":200,
"workAreaName":"Administración y Contabilidad",
"workedMonth":3,
"workedMonths":3,
"workedYear":1,
"workedYears":1
}
],
"educations":[
{
"certificationType":"Tecnico en Gestion Gastronomica",
"completionMonth":11,
"completionYear":2006,
"countryDto":{
"id":2,
"name":"Argentina"
},
"cvId":289703,
"degreeDto":{
"id":11,
"name":"Universitario",
"preponderance":"HIGH"
},
"estadoActualDto":{
"id":5,
"name":"Abandonado"
},
"id":335212,
"institutionDto":{
"id":42,
"name":"Universidad de Morón (UM)"
},
"majorDto":{
"id":156,
"name":"Gastronomía / Cocina"
},
"startMonth":4,
"startYear":2004
}
],
"employerHasVisibility":false,
"jobApplications":[
{
"degreeAffinity":0,
"degreeRequirements":1,
"id":82481135,
"jobId":883257,
"status":"No Leído"
}
],
"jobSeekerId":376798,
"jobSeekerSearch":{
"age":36,
"birthdate":{
"date":18,
"day":2,
"hours":0,
"minutes":0,
"month":2,
"nanos":0,
"seconds":0,
"time":164343600000,
"timezoneOffset":180,
"year":75
},
"gender":"F",
"id":376798
},
"languages":[
{
"id":66,
"name":"Inglés"
}
],
"recommended":false
},
{
"careerHistories":[
{
"areaDeTrabajo":{
"id":48,
"name":"Comercial / Ventas",
"shortname":"comercial-ventas"
},
"company":"coto cirsa",
"companyCountry":{
"id":2,
"name":"Argentina"
},
"cvId":488451,
"id":2558649,
"incomingMonth":1,
"incomingYear":2007,
"industriaDeEmpresa":{
"id":139,
"name":"Comercio"
},
"jobDescription":"vendedora de electrodomesticos.atencion al cliente",
"jobType":{
"id":4,
"name":"Junior",
"shortname":"junior"
},
"outcomingMonth":8,
"outcomingYear":2009,
"peopleInCharge":1,
"positionName":"vendedora de electrodomesticos",
"totalEmployee":0,
"workAreaName":"Comercial / Ventas",
"workedMonth":7,
"workedMonths":7,
"workedYear":2,
"workedYears":2
}
],
"educations":[
{
"average":8.66,
"certificationType":"bachiller",
"completionMonth":12,
"completionYear":1995,
"countryDto":{
"id":2,
"name":"Argentina"
},
"cvId":488451,
"degreeDto":{
"id":6,
"name":"Secundario",
"preponderance":"MEDIUM"
},
"estadoActualDto":{
"id":1,
"name":"Graduado"
},
"id":1550407,
"institutionDto":{
"id":78,
"name":"Otra"
},
"majorDto":{
"id":114,
"name":"Bachiller"
},
"otherInstitution":"instituto fuce",
"startMonth":3,
"startYear":1991
}
],
"employerHasVisibility":true,
"jobApplications":[
{
"degreeAffinity":0,
"degreeRequirements":1,
"id":82481133,
"jobId":883257,
"status":"No Leído"
}
],
"jobSeekerId":611056,
"jobSeekerSearch":{
"age":34,
"birthdate":{
"date":7,
"day":4,
"hours":0,
"minutes":0,
"month":6,
"nanos":0,
"seconds":0,
"time":237092400000,
"timezoneOffset":180,
"year":77
},
"firstname":"gimena natalia",
"gender":"F",
"id":611056,
"lastname":"dacosta"
},
"languages":[
{
"id":66,
"name":"Inglés"
}
],
"recommended":false
},
{
"careerHistories":[
{
"areaDeTrabajo":{
"id":48,
"name":"Comercial / Ventas",
"shortname":"comercial-ventas"
},
"company":"7 DE AGOSTO (Mayorista)",
"companyCountry":{
"id":2,
"name":"Argentina"
},
"cvId":1697117,
"id":3773563,
"incomingMonth":10,
"incomingYear":2007,
"industriaDeEmpresa":{
"id":139,
"name":"Comercio"
},
"jobDescription":"Control de salida de mercadería y entrada Facturación .Atención al publico supervisión de facturistas",
"jobType":{
"id":3,
"name":"Senior / Semi-Senior",
"shortname":"senior"
},
"outcomingMonth":11,
"outcomingYear":2009,
"peopleInCharge":4,
"positionName":"supervisora",
"totalEmployee":12,
"workAreaName":"Comercial / Ventas",
"workedMonth":1,
"workedMonths":1,
"workedYear":2,
"workedYears":2
}
],
"educations":[
{
"average":8,
"certificationType":"bachiller",
"completionMonth":3,
"completionYear":2001,
"countryDto":{
"id":2,
"name":"Argentina"
},
"cvId":1697117,
"degreeDto":{
"id":6,
"name":"Secundario",
"preponderance":"MEDIUM"
},
"description":"Secundario: Escuela Media Nro 2 de LLavallol",
"estadoActualDto":{
"id":5,
"name":"Abandonado"
},
"id":2236828,
"institutionDto":{
"id":78,
"name":"Otra"
},
"majorDto":{
"id":114,
"name":"Bachiller"
},
"quantitySubjects":0,
"quantitySubjectsPassed":0,
"startMonth":3,
"startYear":1999
}
],
"employerHasVisibility":true,
"jobApplications":[
{
"degreeAffinity":0,
"degreeRequirements":1,
"id":82481132,
"jobId":883257,
"status":"No Leído"
}
],
"jobSeekerId":2187265,
"jobSeekerSearch":{
"age":42,
"birthdate":{
"date":22,
"day":1,
"hours":0,
"minutes":0,
"month":11,
"nanos":0,
"seconds":0,
"time":-853200000,
"timezoneOffset":180,
"year":69
},
"firstname":"sandra elizabeht",
"gender":"F",
"id":2187265,
"lastname":"banza"
},
"languages":[
],
"recommended":false
},
{
"careerHistories":[
{
"areaDeTrabajo":{
"id":87,
"name":"Legales",
"shortname":"legales"
},
"company":"Estudio Jurído Notarial",
"companyCountry":{
"id":2,
"name":"Argentina"
},
"cvId":8128,
"id":73276,
"industriaDeEmpresa":{
"id":176,
"name":"Jurídica"
},
"jobDescription":"Administración de expedientes, atención al cliente, procuración, y manejo de PC.",
"jobType":{
"id":4,
"name":"Junior",
"shortname":"junior"
},
"peopleInCharge":1,
"positionName":"Asistente ",
"workAreaName":"Legales",
"workedMonth":0,
"workedMonths":0,
"workedYear":0,
"workedYears":0
}
],
"educations":[
{
"average":7.2,
"certificationType":"Abogada",
"completionMonth":12,
"completionYear":2005,
"countryDto":{
"id":2,
"name":"Argentina"
},
"cvId":8128,
"degreeDto":{
"id":11,
"name":"Universitario",
"preponderance":"HIGH"
},
"estadoActualDto":{
"id":1,
"name":"Graduado"
},
"id":40183,
"institutionDto":{
"id":37,
"name":"Universidad de Buenos Aires (UBA)"
},
"majorDto":{
"id":136,
"name":"Derecho"
},
"quantitySubjects":52,
"quantitySubjectsPassed":52,
"startMonth":4,
"startYear":1999
},
{
"certificationType":"Magister en Relaciones Internacionales",
"completionMonth":7,
"completionYear":2007,
"countryDto":{
"id":2,
"name":"Argentina"
},
"cvId":8128,
"degreeDto":{
"id":15,
"name":"Master",
"preponderance":"MEDIUM"
},
"description":"Master en Relaciones Internacionales Europa-América Latina",
"estadoActualDto":{
"id":1,
"name":"Graduado"
},
"id":8812,
"institutionDto":{
"id":78,
"name":"Otra"
},
"majorDto":{
"id":219,
"name":"Relaciones Internacionales"
},
"otherInstitution":"Universidad de Bologna",
"startMonth":3,
"startYear":2006
}
],
"employerHasVisibility":true,
"jobApplications":[
{
"degreeAffinity":0,
"degreeRequirements":1,
"id":82481129,
"jobId":883257,
"status":"No Leído"
}
],
"jobSeekerId":10576,
"jobSeekerSearch":{
"age":30,
"birthdate":{
"date":8,
"day":3,
"hours":0,
"minutes":0,
"month":3,
"nanos":0,
"seconds":0,
"time":355546800000,
"timezoneOffset":180,
"year":81
},
"firstname":"Silvina",
"gender":"F",
"id":10576,
"lastname":"Chiara"
},
"languages":[
{
"id":63,
"name":"Francés"
},
{
"id":66,
"name":"Inglés"
},
{
"id":69,
"name":"Italiano"
},
{
"id":73,
"name":"Portugués"
}
],
"recommended":false
}
],
"facetSelections":[
{
"order":999999,
"type":"JOB_ID",
"values":[
{
"facetValue":{
"count":0,
"label":"883257",
"selected":true,
"value":"883257"
},
"query":"/employer/postulation-admin/search.do?keyStatus=18"
}
]
}
],
"facets":[
{
"order":100,
"type":"JOB_APPLICATION_STATUS",
"values":[
{
"facetValue":{
"count":8,
"label":"Seleccionado",
"selected":false,
"value":"SELECTED"
},
"query":"/employer/postulation-admin/search.do?jobId=883257&jobApplicationStatus=SELECTED&keyStatus=18"
}
]
},
{
"order":200,
"type":"AGE",
"values":[
]
},
{
"order":250,
"type":"LANGUAGE",
"values":[
{
"facetValue":{
"count":2,
"label":"Francés",
"selected":false,
"value":"63"
},
"query":"/employer/postulation-admin/search.do?jobId=883257&language=63&keyStatus=18"
},
{
"facetValue":{
"count":6,
"label":"Inglés",
"selected":false,
"value":"66"
},
"query":"/employer/postulation-admin/search.do?jobId=883257&language=66&keyStatus=18"
},
{
"facetValue":{
"count":1,
"label":"Italiano",
"selected":false,
"value":"69"
},
"query":"/employer/postulation-admin/search.do?jobId=883257&language=69&keyStatus=18"
},
{
"facetValue":{
"count":1,
"label":"Portugués",
"selected":false,
"value":"73"
},
"query":"/employer/postulation-admin/search.do?jobId=883257&language=73&keyStatus=18"
}
]
},
{
"order":300,
"type":"GENDER",
"values":[
{
"facetValue":{
"count":5,
"label":"Femenino",
"selected":false,
"value":"F"
},
"query":"/employer/postulation-admin/search.do?jobId=883257&gender=F&keyStatus=18"
},
{
"facetValue":{
"count":3,
"label":"Masculino",
"selected":false,
"value":"M"
},
"query":"/employer/postulation-admin/search.do?jobId=883257&gender=M&keyStatus=18"
}
]
},
{
"order":400,
"type":"LOCATION",
"values":[
{
"facetValue":{
"count":3,
"label":"Capital Federal",
"selected":false,
"value":"28"
},
"query":"/employer/postulation-admin/search.do?jobId=883257&location=28&keyStatus=18"
},
{
"facetValue":{
"count":1,
"label":"Chubut",
"selected":false,
"value":"33"
},
"query":"/employer/postulation-admin/search.do?jobId=883257&location=33&keyStatus=18"
},
{
"facetValue":{
"count":1,
"label":"GBA Norte",
"selected":false,
"value":"107"
},
"query":"/employer/postulation-admin/search.do?jobId=883257&location=107&keyStatus=18"
},
{
"facetValue":{
"count":3,
"label":"GBA Sur",
"selected":false,
"value":"109"
},
"query":"/employer/postulation-admin/search.do?jobId=883257&location=109&keyStatus=18"
}
]
},
{
"order":500,
"type":"DESIRED_SALARY",
"values":[
]
}
],
"invisibleCurriculumsCountforTheWholeJob":3,
"itemsPerPage":20,
"jobId":883257,
"numHits":8,
"paging":{
"currentPage":1,
"pageOptions":[
{
"current":true,
"numberOfPage":1,
"url":""
}
],
"totalPages":1
},
"recommendedCount":0,
"resultFrom":1,
"resultTo":8
},
"parameterMapper":{
},
"recoveryParents":{
},
"backmanager":"bc=0",
"keyStatus":"18",
"userEmployer":{
"activated":{
"date":18,
"day":5,
"hours":7,
"minutes":6,
"month":1,
"seconds":0,
"time":1298023560000,
"timezoneOffset":180,
"year":111
},
"active":true,
"approvedStatus":false,
"authorities":[
],
"birthdate":"10/01/1942",
"confirmEmail":"[email protected]",
"confirmationExpected":false,
"ctaDeshabilitadaDesdeBO":false,
"email":"[email protected]",
"employerId":529461,
"entryDate":{
"date":2,
"day":2,
"hours":14,
"minutes":51,
"month":11,
"seconds":0,
"time":1228236660000,
"timezoneOffset":120,
"year":108
},
"fax":"*",
"faxAreaCode":"",
"faxInt":"",
"firstName":"DesaEmpresa",
"gender":"M",
"id":529461,
"jobPosition":"DesaEmpresa",
"lastName":"DesaEmpresa",
"phoneNumber":{
"areaCode":"11",
"subscriberNumber":"*",
"type":"LAND"
},
"phoneNumberInt":"",
"userName":"DesaEmpresa"
},
"savedSearchesForJob":[
],
"savedSearchesForUser":[
],
"jobAppliedStatus":[
"DEFAULT",
"DISCARDTED",
"READ",
"NEW",
"PRESELECTED",
"SELECTED"
],
"facetValuesSorted":{
},
"job":{
"applied":8,
"company":{
"active":true,
"addressDepartment":"",
"addressFloor":"",
"addressNumber":"326",
"addressStreet":"lacasa",
"city":"",
"corporateName":"DesaEmpresa",
"country":{
"id":2,
"name":"Argentina"
},
"description":"",
"endowment":{
"id":1,
"name":"1-20",
"order":40,
"view":true
},
"fiscalId":"99999999999",
"hasPic":false,
"id":529461,
"industryType":{
"id":124
},
"location1":{
"id":40,
"name":"Mendoza",
"shortName":"mendoza"
},
"location2":{
"id":1134,
"name":"Guaymallén",
"parent":{
"id":40,
"name":"Mendoza",
"shortName":"mendoza"
}
},
"name":"DesaEmpresa",
"order":0,
"postcode":"DesaEmpres",
"promotedCompany":false,
"rrConsulting":true,
"shortName":"desaempresa",
"vatCondition":{
"id":1,
"name":"Consumidor Final",
"order":10,
"view":true
},
"webUrl":""
},
"endDate":{
"date":30,
"day":5,
"hours":0,
"minutes":0,
"month":2,
"nanos":0,
"seconds":0,
"time":1333076400000,
"timezoneOffset":180,
"year":112
},
"id":883257,
"jobCompany":"ddd",
"jobState":"ACTIVE",
"jobTitle":"Analista contable",
"jobrefno":"ddd",
"quantityActiveDays":23,
"quantityVisualizationDays":53,
"startDate":{
"date":29,
"day":3,
"hours":0,
"minutes":0,
"month":1,
"nanos":0,
"seconds":0,
"time":1330484400000,
"timezoneOffset":180,
"year":112
},
"timeInProcess":30
},
"currentQueryString":"jobId=883257&bc=0",
"hasExportCvService":true,
"showSaveSearch":false,
"UserEmployerAccessPoints":{
"empty":false,
"objectWrapper":{
"enumModels":{
"empty":false
},
"exposeFields":false,
"outerIdentity":null,
"simpleMapWrapper":false,
"staticModels":{
"empty":false
},
"strict":false
},
"wrappedObject":{
"SELECTION_PROCESS_LIST_PROCESSES":"SELECTION_PROCESS_LIST_PROCESSES",
"SELECTION_PROCESS_DISPLAY_PROCESS_DASHBOARD":"SELECTION_PROCESS_DISPLAY_PROCESS_DASHBOARD",
"SELECTION_PROCESS_CLOSE_PROCESS":"SELECTION_PROCESS_CLOSE_PROCESS",
"SELECTION_PROCESS_CLOSE_STAGE":"SELECTION_PROCESS_CLOSE_STAGE",
"SELECTION_PROCESS_SUBSCRIBE_INTERNAL_CANDIDATE":"SELECTION_PROCESS_SUBSCRIBE_INTERNAL_CANDIDATE",
"SELECTION_PROCESS_SUBSCRIBE_EXTERNAL_CANDIDATE":"SELECTION_PROCESS_SUBSCRIBE_EXTERNAL_CANDIDATE",
"SELECTION_PROCESS_RATE_CANDIDATE":"SELECTION_PROCESS_RATE_CANDIDATE",
"SELECTION_PROCESS_LIST_CANDIDATE_PROCESSES":"SELECTION_PROCESS_LIST_CANDIDATE_PROCESSES",
"SELECTION_PROCESS_LIST_STAGE_TASKS":"SELECTION_PROCESS_LIST_STAGE_TASKS",
"SELECTION_PROCESS_UNSUBSCRIBE_CANDIDATE":"SELECTION_PROCESS_UNSUBSCRIBE_CANDIDATE",
"SELECTION_PROCESS_REGISTER_PROCESS":"SELECTION_PROCESS_REGISTER_PROCESS",
"SELECTION_PROCESS_REGISTER_TEMPLATE":"SELECTION_PROCESS_REGISTER_TEMPLATE",
"SELECTION_PROCESS_REGISTER_STAGE_TASK":"SELECTION_PROCESS_REGISTER_STAGE_TASK",
"SELECTION_PROCESS_DISPLAY_CANDIDATE_INFO":"SELECTION_PROCESS_DISPLAY_CANDIDATE_INFO",
"SELECTION_PROCESS_REORDER_CANDIDATES":"SELECTION_PROCESS_REORDER_CANDIDATES",
"EMPLOYER_LIST_USER_EMPLOYERS":"EMPLOYER_LIST_USER_EMPLOYERS",
"EMPLOYER_ADD_USER_EMPLOYER":"EMPLOYER_ADD_USER_EMPLOYER",
"EMPLOYER_CHANGE_USER_EMPLOYER_PASSWORD":"EMPLOYER_CHANGE_USER_EMPLOYER_PASSWORD",
"EMPLOYER_MODIFY_USER_EMPLOYER_CONTACT_DATA":"EMPLOYER_MODIFY_USER_EMPLOYER_CONTACT_DATA",
"EMPLOYER_REMOVE_USER_EMPLOYER":"EMPLOYER_REMOVE_USER_EMPLOYER",
"EMPLOYER_MODIFY_CONTACT_DATA":"EMPLOYER_MODIFY_CONTACT_DATA",
"EMPLOYER_VIEW_JOBAPPLIED":"EMPLOYER_VIEW_JOBAPPLIED",
"EMPLOYER_JOB_POSTULATIONS_SEARCH":"EMPLOYER_JOB_POSTULATIONS_SEARCH",
"SECURITY_LIST_USER_EMPLOYER_AUTHORITIES":"SECURITY_LIST_USER_EMPLOYER_AUTHORITIES",
"SECURITY_GRANT_REVOKE_USER_EMPLOYER_AUTHORITIES":"SECURITY_GRANT_REVOKE_USER_EMPLOYER_AUTHORITIES",
"USER_EMPLOYER_CHANGE_PASSWORD":"USER_EMPLOYER_CHANGE_PASSWORD",
"USER_EMPLOYER_MODIFY_CONTACT_DATA":"USER_EMPLOYER_MODIFY_CONTACT_DATA",
"USER_EMPLOYER_EXPORT_CV":"USER_EMPLOYER_EXPORT_CV",
"EMPLOYER_ACQUIRE_PRODUCTS":"EMPLOYER_ACQUIRE_PRODUCTS"
}
}
}
Mostly for allowing "npm install tempo" via npm. But also would be great for handling package management.
Here's a jsfiddle demonstrating the issue:
Should we escape HTML entities by default starting in 2.0? This would be a "secure by default" approach. Then provide an unescape filter that allows inserting HTML entities in the page.
Alternatively, provide an escape filter and leave stuff unescaped by default.
I am pulling a feed from the following URL: http://voicesfromjapan.blogspot.com/feeds/posts/default?alt=json-in-script which contains string ($) characters as the names of fields. For instance, in the object that returns, the text for the title is in the feed.entry.title.$t field. When I put "title.$t" in my template, the field doesn't get rendered. If I use "title.type" (another field in title), it is rendered. I'm assuming this issue has to do with the $ in the title as it is messing up the regex that replaces the text--is that a safe assumption? I would try to fix it myself; however, I'm not that great with regular expressions.
Hi,
I am new to using tempo.js and so far I am enjoying it's flexibility but I have hit a brick wall. I am trying to display some facets:
However, the last facet is totally ignored - I have added some debugging and can see the template does get evaluated, it just seems to be lost when it comes to putting it all together. Another annoyance is the 2nd facet (Job Type's first instance) only shows "Temporary (100)" - Permanent & Contract are missing (I can see them being run!).
Is it something I am doing wrong or is it a bug in Tempo?
ty
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.