将“事件”重命名为jQuery FullCalendar 插件中的对象
很棒的插件!!!但是...选择“事件”一词来表示“日历条目”是特别不幸的,
这是一个写得非常好的插件,我对这个东西的功能给这里的工作人员留下了深刻的印象。该文档非常全面和清晰。
恭喜亚当!
然而,这个插件将日历中的条目称为“事件”——这在我的开发团队的对话中引起了很多混乱,因为当我们使用“事件”这个词时,我们会想到诸如 onmouseover< /code>、
click
等。我们确实更喜欢 CalendarEvent
或 CalendarEntry
这样的术语。
我对 jQuery 还不太有经验,所以我想知道是否有一种简单的方法可以将这些术语之一别名为该插件的 Event/Events 对象?(我知道我们可以重新编码该插件-in 直接,但是当我们下载更新时我们的代码将会中断。)
谢谢!
GREAT PLUGIN!!! BUT... choice of word "Event" to mean a "calendar entry" was particularly unfortunate
This is a wonderfully well-written plug in, and I've really impressed people here at work with what this thing can do. The documentation is astonishingly thorough and clear.
Congratulations to Adam!
HOWEVER, this plug-in refers to entries in the calendar as "Events" -- this has caused a lot of confusion in my development team's conversations, because when we use the word "Event" we think of things like onmouseover
, click
, etc. We would really prefer a term like CalendarEvent
or CalendarEntry
.
I am not all that experienced with jQuery yet, so am wondering if there is a simple way to alias one of those terms to this plug-in's Event/Events object? (I know we could recode the plug-in directly, but our code will then break when we download an update.)
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为什么不编写一个名为 CalendarEvent 的 Facade 类,它只从 Event 类中调用适当的函数?
Why don't you write a Facade class called CalendarEvent that will just call the appropriate function from the Event class?
我明白。在原始文档中,它们被称为“calEvents”,但为了简洁起见,我将其改回“events”。
当前的文档是这个术语的创造者,但您始终可以对函数参数使用不同的名称。但是,显然您仍然需要使用相同的选项名称,因此解决方案是创建一个类似这样的包装器...
将允许您重命名“events”和“eventSources”选项。基本上是插件的包装
i understand. in the original docs, they were called "calEvents" but i changed it back to "events" for brevity.
the current docs are what coined the term, but you can always use different names for function arguments. however, you'll obviously still need to use the same option names, so a solution would be to create a wrapper sort of like this...
will let you rename the 'events' and 'eventSources' options. basically a wrapper around the plugin