Esempio n. 1
0
def timeline_details(request, tl_id):
    tl = models.Timeline.objects.get(pk=tl_id)
    dajax = Dajax()
    context = RequestContext(request)
    dajax.append("#accordion", "innerHTML", tl.baby.to_html(context))
    milestones = [ms.to_html(context) for ms in tl.get_sorted_milestones()]
    dajax.append("#babydetails_" + str(tl_id), "innerHTML", "\n".join(milestones))
    dajax.addData("", "load_finished")
    return dajax.json()
Esempio n. 2
0
def show_photo_editor(request):
    dajax = Dajax()
    context = RequestContext(request)
    dict = {"title": "Photo hinzufügen",
            "name": "add_photo",
            "id": "add_photo",
            "form": forms.PhotoForm()
    }
    form = render_to_string("timeline/photo_editor.html", dict, context)
    dajax.addData(form, "show_editor")
    return dajax.json()
Esempio n. 3
0
def adddata_test(request):
	dajax = Dajax()
	dajax.addData(range(0,10),'my_callback')
	dajax.append('#console','innerHTML',"dajax.addData(range(0,10),'my_callback')<br/>")
	return dajax