|
function sevominJobViewer(settings) {
|
|
var jobs = $$jobs;
|
|
if (settings.container == undefined || settings.container == '')
|
|
throw 'You did not specify any container';
|
|
var container = document.querySelector(settings.container);
|
|
if (container == undefined)
|
|
throw 'You did not specify any container';
|
|
|
|
this.show = function () {
|
|
var content = '<ul class="sevomin-jobs">';
|
|
if (settings.linkText == undefined || settings.linkText == '')
|
|
settings.linkText = 'مشاهده در سومین';
|
|
for (var i = 0; i < jobs.length; i++) {
|
|
content += '<li class="sevomin-job"><p class="sevomin-job-summary">';
|
|
content += jobs[i].JobSummary + '<a href="http://www.sevom.in/jobs/'
|
|
+ jobs[i].Id + '">' + settings.linkText + '</a></p>';
|
|
content += '</li>';
|
|
}
|
|
content = content + '</ul>'
|
|
|
|
container.innerHTML = content;
|
|
}
|
|
}
|