javascript 使用 jquery 安排约会
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9232899/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
appointment scheduling with jquery
提问by Asma Gheisari
I'm going to create a simple appointment scheduling to set appointment for doctor,some thing like this : http://arshaw.com/fullcalendar/
我将创建一个简单的预约安排来为医生设置预约,例如:http: //arshaw.com/fullcalendar/
I almost know anything about jquery and javascript but I hope this be a commence to learn more and of course my boss has asked me to do that.because the created appointment scheduling plugins don't support persian date,they're useless for me,where should I start form?I wanna set appointment be done bye drag and drop on the surface,like google calendar:
我几乎对 jquery 和 javascript 一无所知,但我希望这是学习更多的开始,当然我的老板让我这样做。因为创建的约会安排插件不支持波斯语日期,它们对我没用,我应该从哪里开始表单?我想设置约会,在表面上进行拖放操作,就像谷歌日历一样:
please suggest me references and some required steps to study and do this.
请建议我参考资料和一些必要的步骤来学习和做到这一点。
I appreciate any help
我感谢任何帮助
回答by Downpour046
You will need to make sure you have a comfortable understanding of server-side language, and saving these calendar dates to a database. jQuery will only act on client-side, meaning once the browser is "refreshed" you will lose all of your calendar modifications. Typically how a calendar like that works or can work is based on AJAX calls (as the documentation states on the website you listed)
您需要确保对服务器端语言有一个很好的理解,并将这些日历日期保存到数据库中。jQuery 只会在客户端起作用,这意味着一旦浏览器“刷新”,您将丢失所有日历修改。通常,像这样的日历如何工作或可以工作是基于 AJAX 调用(如您列出的网站上的文档所述)
You will need to know what server-side coding language is being used on the place you wish to host this calendar. .NET, PHP, Ruby, etc. You'll need to know how to create and connect to your database(Oracle, MySql, MSSQL, etc) via your server-side code .
您需要知道在您希望托管此日历的地方使用的是哪种服务器端编码语言。.NET、PHP、Ruby 等。您需要知道如何通过服务器端代码创建和连接到您的数据库(Oracle、MySql、MSSQL 等)。
So if I were to give you a guide, from a generic standpoint it'd go like this:
所以如果我给你一个指南,从一般的角度来看,它会是这样的:
- Identify what language server environment you will be running on (PHP, .NET. Ruby, etc)
- Create and identify what type of database you will need to use (MySQL, MSSQL, + others). This is also not simple for a novice developer. You will need to identify sever host information, and create a database, create users with username(s) and password(s) so that you can access the DB from your code with proper permissions.
- Locate the folder / location of where all your files will be hosted. Ex: http://www.eventscalendar.com/youreventscalendergoeshere/
- Start creating the page template within that folder that will contain your calendar, and drop in all the files that were given to you from that website.
- Try to get the calendar working (if possible) without any database calls or just empty ajax calls.
- Once the calendar appears to be working, just not saving anything, then you can start looking into the AJAX calls and how they will need to post and request data from your database.
- Begin tying ajax + server-side code requests (Post/Get) together until you have confirmed values are now being successfully pended to your database tables.
- 确定您将运行的语言服务器环境(PHP、.NET、Ruby 等)
- 创建并确定您需要使用的数据库类型(MySQL、MSSQL 和其他)。这对于新手开发人员来说也并不简单。您将需要识别服务器主机信息,并创建一个数据库,使用用户名和密码创建用户,以便您可以从具有适当权限的代码访问数据库。
- 找到将托管所有文件的文件夹/位置。例如:http: //www.eventscalendar.com/youreventscalendergoeshere/
- 开始在该文件夹中创建包含您的日历的页面模板,然后放入从该网站提供给您的所有文件。
- 尝试在没有任何数据库调用或空的 ajax 调用的情况下使日历正常工作(如果可能)。
- 一旦日历看起来正常工作,只是不保存任何内容,然后您就可以开始查看 AJAX 调用以及它们需要如何从您的数据库发布和请求数据。
- 开始将 ajax + 服务器端代码请求 (Post/Get) 绑定在一起,直到您确认值现在已成功挂起到您的数据库表。
You will need to learn primarily about jQuery AJAX for this calendar to work: http://api.jquery.com/jQuery.ajax/
您需要主要了解 jQuery AJAX 才能使此日历正常工作:http: //api.jquery.com/jQuery.ajax/
It really is not that complicated if you are well acclimated to server-side technology.
如果您非常熟悉服务器端技术,这真的没有那么复杂。
If you do not understand the majority of the terminology I have used in this guide, then this project is probably not for you and too advanced.
如果您不理解我在本指南中使用的大部分术语,那么这个项目可能不适合您并且太高级了。
Cheers and good luck.
干杯,祝你好运。
回答by netalex
if the problem is persian date\calendar, momentjs.comwich is the lib on wich fullcalendar is based has it supported already
如果问题是波斯日期\日历,momentjs.com至极是至极fullcalendar的lib是基于有它已经支持