When I use fullcalendar scheduler and call controller from menu. After 
calling the controller and see the view menu item changing. It disappear 
the arrow to click and it's not usable.
This is the menu

response.menu = [
     ('Sede Pordenone', False, None,
     [
            (T('Scheduler'), URL()==URL('default', 'sched'), 
URL('default','sched',args='1')),

....


controller
def sched():
    sede = request.args(0)
    query = (db.risorsa.sede == sede)
    rowssedi = db(query).select()
    queryeventi = (db.evento.risorsa == db.risorsa.id) & (db.risorsa.sede 
== sede)
    rowseventi = db(queryeventi).select()
    return locals()

view
{{response.files.append(URL('static','moment.min.js'))}}
{{response.files.append(URL('static','jquery.min.css'))}}
{{response.files.append(URL('static','fullcalendar.min.css'))}}
{{response.files.append(URL('static','scheduler.min.css'))}}
{{response.files.append(URL('static','jquery.min.js'))}}
{{response.files.append(URL('static','fullcalendar.min.js'))}}
{{response.files.append(URL('static','it.js'))}}
{{response.files.append(URL('static','scheduler.min.js'))}}
{{extend 'layout.html'}}

<script type='text/javascript'>

//$(document).ready(function() { // document ready
      $(function() { // document ready
        
$('#calendar').fullCalendar({
            locale: 'it',
droppable: true, // this allows things to be dropped onto the calendar
eventDrop: function(event, delta, revertFunc) {
                 // alert(event.title + " was dropped on " + 
event.start.format());
                if (!confirm("Sei sicuro di fare questa modifica?")) {
                      revertFunc();
                 }
                else
                {
                    // alert('sono qua');
                    //return 'document.location = "%s";' % URL('default', 
'test');
                     var valore = 'test-variabile';
                    //ajax('{{=URL('default','test')}}',['value',42],'');
                    $.get('{{=URL('default', 'test')}}',{name:valore});
                }
            },
            aspectRatio: 6.0,
// scrollTime: '00:00',
            minTime: '09:00:00',
            maxTime: '22:00:00',
navLinks: true,
selectable: true,
selectHelper: true,
eventOverlap: false, // will cause the event to take up entire resource 
height
selectOverlap: false,
            allowCalEventOverlap:false,
            select: function(start, end, event, ui, resource) {
var tempo = end - start;
                if (tempo < 3600000) {
                    alert('STAI CREANDO UN EVENTO MINORE DI 1 ORA');
                          }
                var title = prompt('Event Title:','titolo evento');
                var eventData;
                console.log(resource);
if (title) {
                      eventData = {
                                   resourceId: resource.id,
                                   title: title,
                                   start: start,
                                   end: end
                                };
                 $('#calendar').fullCalendar('renderEvent', eventData, 
true); // stick? = true
                  var valore = 'test-creazione evento';
                 $.get('{{=URL('default', 'test')}}',{name:valore});
                }
                       $('#calendar').fullCalendar('unselect'); 
                },
            resourceLabelText: 'Aule',
resourceAreaWidth: '10%',
            allDayDefault: false,
            header: {
left: 'today prev,next',
center: 'title',
right: 'timelineDay,timelineWeek'
},
defaultView: 'timelineDay',
views: {
timelineDay: {
                    slotWidth: '15',
slotDuration: '00:15:00',
                    slotLabelFormat: [
                                'dddd',
                                'H:mm'
                    ]
},
timelineWeek: {
type: 'timeline',
slotWidth: '15',
slotDuration: '00:15:00',
                    slotLabelFormat: [
                                'dddd D/M',
                                'H:mm'
                    ],
}
},
resources: [
{{for row in rowssedi:}}
                   {
                         id: '{{=row.id}}',
                         title: '{{=row.nome}}, {{=row.sede.nome}}'
                   },
                {{pass}}
                ],
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [
                {{for row in rowseventi:}}
                   {
                        id: '{{=row.evento.id}}',
                        resourceId: '{{=row.evento.risorsa}}',
                        start: '{{=row.evento.inizio}}',
                        end: '{{=row.evento.fine}}',
                        // allDay: false,
                        title: '{{=row.evento.titolo}}',
                        url: '{{=URL('mostra_evento',args=row.evento.id)}}'
                   },
                {{pass}}
                ]
});
});
    
</script>

<div id='calendar'></div>



For my opinion the problem is regarding the response.files.append 
declaration...


Thanks

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to