Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getDayDetails(diffmonth,month,day){
- if ( diffmonth != 0 ) {
- url = '/cal/feeds/day/getDayChanges/{{year}}/'+diffmonth+'/'+day+'/{{type}}/?{% if canc %}canc=True&{% endif %}search={{search}}&';
- } else{
- url = '/cal/feeds/day/getDayChanges/{{year}}/'+month+'/'+day+'/{{type}}/?{% if canc %}canc=True&{% endif %}search={{search}}&';
- }
- request = new Request.HTML({
- method: 'get',
- url: url ,
- //update:'result',
- async: true,
- onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript) {
- var response = responseHTML;
- if ( diffmonth != 0 ) {
- id = 'id'+diffmonth+day
- } else{
- id = 'id'+month+day
- }
- $(id).innerHTML = response
- }
- }).send();
- myRequestStack.include(request)
- }
- function initiateLoad(){
- {% for week in month_days %}
- {% for day, entries, diffmonth in week %}
- getDayDetails({{diffmonth}},{{month}}, {{day}})
- {% endfor %}
- {% endfor %}
- }
- var myRequestStack = []; // public!
- window.addEvent('domready', function() {
- $$('a').addEvent('click', function(){myRequestStack.invoke('cancel')});
- initiateLoad();
- });
Add Comment
Please, Sign In to add comment