使用emberjs didInsertElement来显示两个独立的日历或两个实例一个jquery fullcalendar插件对象 [英] using emberjs didInsertElement to display two seperate calendars or two instances a jquery fullcalendar plugin object

查看:88
本文介绍了使用emberjs didInsertElement来显示两个独立的日历或两个实例一个jquery fullcalendar插件对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个日历对象,使用jquery fullcalendar和emberjs显示正常。但是,我需要显示一个单独的第二个日历或另一个jquery fullcalendar实例,但第二个日历迄今未能显示。这里是小提琴展示它: http://jsfiddle.net/uUWqf/4/ 。您将在小提琴中看到我尝试调用didInsertElement:function(){}两次,但它仍然只显示一个日历。
但是,当我使用没有emberjs的jquery fullcalendar时,会显示两个单独的日历: http:// jsfiddle .net / CH4qa / 2 /

有没有办法让这个工作。



感谢您的帮助。

解决方案

我制作了一个呈现两个日历的小提琴叉子。 http://jsfiddle.net/duHfN/7/



一般来说,使用模板来实例化视图,而不是创建视图实例并对它们调用附加,您将会获得更好的运气。小提琴还有其他一些问题,我清理了一些。

I have a single calendar object displaying fine using jquery fullcalendar and emberjs. However, i need to display a separate second calendar or another jquery fullcalendar instance but the second calendar has so far failed to display. Here is fiddle showing it: http://jsfiddle.net/uUWqf/4/. You will see in the fiddle that i tried calling didInsertElement: function() {} twice, but it still only displaying one calendar. However, when i use jquery fullcalendar without emberjs, the two separate calendars are displayed: http://jsfiddle.net/CH4qa/2/.

Is there a way to get this to work.

Thanks for helping.

解决方案

I made a fork of your fiddle that renders two calendars. http://jsfiddle.net/duHfN/7/

In general, you will have better luck using templates to instantiate views rather than creating view instances and calling append on them. There were a number of other issues with the fiddle, some which I cleaned up.

这篇关于使用emberjs didInsertElement来显示两个独立的日历或两个实例一个jquery fullcalendar插件对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆