基于 jQuery 的调查构建界面
过去,我使用了一些调查构建网站来构建调查。现在,我想构建一个类似的界面。我记得的一些关键功能是:
- 拖放问题“类型”以及排序和排序的能力。
- 创建问题后对内容进行内联编辑。
我熟悉 jQuery。有谁知道有什么好的 jQuery 小部件具有与此类似的功能吗?如果没有,有人对如何将这样的东西放在一起有任何建议吗?
提前致谢!
In the past, I have used a few survey building sites to build, well, surveys. Now, I am wanting to build a similar interface. Some of the key features I remember are:
- Drag/Drop of question "types" and ability to sort and order.
- Inline editing of the content once a question has been created.
I am familiar with jQuery. Does anyone know of any good jQuery widgets that have similar features to this? If not, does anyone have any suggestions for how to go about putting something like this together?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我个人会使用 jQuery UI 的组合来实现拖放功能。对于调查中的问题(单个视图呈现单个模型)的排序和过滤(每个视图都有一个相应模型的单个视图的集合),我将使用 backbone.js.
Backbone 使您能够使用模型和视图创建 JavaScript UI。模型将是问题数据,视图将是问题的显示。 Backbone.js 也有集合的概念。这些模型集合可以进行排序、过滤等。Backbone.js 可以强制执行 MVC 模式。简而言之,您的模型不应该引用其各自的视图。
查看这个简单的 TODO 应用,了解backbone.js 如何让您受益调查申请。
I would personally use a combination of jQuery UI for the drag and drop capability. For the sorting and filtering of the questions (individual view rendering a single model) in the survey (collection of individual views each with a single corresponding model) I would use backbone.js.
Backbone gives you the ability to create an JavaScript UI with models and views. The models would be the question data and the view would be the display of the question. Backbone.js also has the concept of collections as well. These collections of models can be sorted, filted, etc. Backbone.js as makes it possible to enforce the MVC pattern. Simply put, your models should not have a reference to their respective views.
Check out this simple TODO application to get an idea of how backbone.js could benefit your survey application.