You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
980 B

10 years ago
  1. function sevominJobViewer(settings) {
  2. var jobs = $$jobs;
  3. if (settings.container == undefined || settings.container == '')
  4. throw 'You did not specify any container';
  5. var container = document.querySelector(settings.container);
  6. if (container == undefined)
  7. throw 'You did not specify any container';
  8. this.show = function () {
  9. var content = '<ul class="sevomin-jobs">';
  10. if (settings.linkText == undefined || settings.linkText == '')
  11. settings.linkText = 'مشاهده در سومین';
  12. for (var i = 0; i < jobs.length; i++) {
  13. content += '<li class="sevomin-job"><p class="sevomin-job-summary">';
  14. content += jobs[i].JobSummary + '<a href="http://www.sevom.in/jobs/'
  15. + jobs[i].Id + '">' + settings.linkText + '</a></p>';
  16. content += '</li>';
  17. }
  18. content = content + '</ul>'
  19. container.innerHTML = content;
  20. }
  21. }