...
HTML |
---|
<div id="confiReport"></div> <script> AJS.toInit(function() { var isPageEdit = AJS.$('#content').hasClass('page edit'); if (!isPageEdit) { var url = 'https://wiki.vertuna.com/ajax/confiforms/rest/filter.action?pageId=23265387&f=f&q=&sort=mydate%20ASC'; var xhr = AJS.$.ajax({ url: url, timeout: 10000, // 10 sec success: function (data) { var currentWeek = confimoment().format('W'); var runningWeek = null; var rows = data.list.entry; for(i=0;i<rows.length;i++) { console.log(rows[i].fields.mydate); console.log(confimoment(new Date(rows[i].fields.mydate)).format('W')); } console.log(data); }, error: function (jqXHR, textStatus, errorThrown) { console.log('request to get data from ConfiForms has failed... ' + textStatus); } }); } }); </script> |