From 4347c2947834fe7f2edf2b457b2d513454fc6a03 Mon Sep 17 00:00:00 2001 From: Mike Chen Date: Sun, 5 Jul 2009 10:23:30 +0800 Subject: initiliaze git rep --- templates/404.html | 48 + templates/500.html | 33 + templates/about.html | 71 + templates/answer_edit.html | 139 + templates/ask.html | 191 ++ templates/authopenid/changeemail.html | 39 + templates/authopenid/changeopenid.html | 33 + templates/authopenid/changepw.html | 33 + templates/authopenid/complete.html | 66 + templates/authopenid/confirm_email.txt | 12 + templates/authopenid/delete.html | 38 + templates/authopenid/failure.html | 13 + templates/authopenid/sendpw.html | 33 + templates/authopenid/sendpw_email.txt | 14 + templates/authopenid/settings.html | 41 + templates/authopenid/signin.html | 96 + templates/authopenid/signup.html | 51 + templates/authopenid/yadis.xrdf | 14 + templates/badge.html | 38 + templates/badges.html | 72 + templates/base.html | 82 + templates/base_content.html | 75 + templates/book.html | 150 + templates/close.html | 36 + templates/content/images/box-arrow.gif | Bin 0 -> 69 bytes templates/content/images/bullet_green.gif | Bin 0 -> 64 bytes templates/content/images/cc-88x31.png | Bin 0 -> 5460 bytes templates/content/images/cc-wiki.png | Bin 0 -> 2333 bytes templates/content/images/close-small-hover.png | Bin 0 -> 337 bytes templates/content/images/close-small.png | Bin 0 -> 293 bytes templates/content/images/cnprog_logo_200_56.gif | Bin 0 -> 2114 bytes templates/content/images/dash.gif | Bin 0 -> 44 bytes templates/content/images/djangomade124x25_grey.gif | Bin 0 -> 2035 bytes templates/content/images/dot-g.gif | Bin 0 -> 61 bytes templates/content/images/dot-list.gif | Bin 0 -> 56 bytes templates/content/images/edit.png | Bin 0 -> 758 bytes templates/content/images/expander-arrow-hide.gif | Bin 0 -> 126 bytes templates/content/images/expander-arrow-show.gif | Bin 0 -> 135 bytes templates/content/images/favicon.gif | Bin 0 -> 3918 bytes templates/content/images/favicon.ico | Bin 0 -> 3638 bytes templates/content/images/feed-icon-small.png | Bin 0 -> 689 bytes templates/content/images/grippie.png | Bin 0 -> 162 bytes templates/content/images/indicator.gif | Bin 0 -> 2545 bytes templates/content/images/logo.png | Bin 0 -> 3631 bytes templates/content/images/logo1.png | Bin 0 -> 2752 bytes templates/content/images/logo2.png | Bin 0 -> 2124 bytes templates/content/images/medala.gif | Bin 0 -> 801 bytes templates/content/images/medala_on.gif | Bin 0 -> 957 bytes templates/content/images/new.gif | Bin 0 -> 635 bytes templates/content/images/nophoto.png | Bin 0 -> 696 bytes templates/content/images/openid.gif | Bin 0 -> 910 bytes templates/content/images/openid/aol.gif | Bin 0 -> 2205 bytes templates/content/images/openid/blogger.ico | Bin 0 -> 3638 bytes templates/content/images/openid/claimid.ico | Bin 0 -> 3638 bytes templates/content/images/openid/facebook.gif | Bin 0 -> 2075 bytes templates/content/images/openid/flickr.ico | Bin 0 -> 1150 bytes templates/content/images/openid/google.gif | Bin 0 -> 1596 bytes templates/content/images/openid/livejournal.ico | Bin 0 -> 5222 bytes templates/content/images/openid/myopenid.ico | Bin 0 -> 2862 bytes .../content/images/openid/openid-inputicon.gif | Bin 0 -> 237 bytes templates/content/images/openid/openid.gif | Bin 0 -> 740 bytes templates/content/images/openid/technorati.ico | Bin 0 -> 2294 bytes templates/content/images/openid/verisign.ico | Bin 0 -> 4710 bytes templates/content/images/openid/vidoop.ico | Bin 0 -> 1406 bytes templates/content/images/openid/wordpress.ico | Bin 0 -> 1150 bytes templates/content/images/openid/yahoo.gif | Bin 0 -> 1682 bytes templates/content/images/quest-bg.gif | Bin 0 -> 294 bytes templates/content/images/vote-accepted-on.png | Bin 0 -> 1124 bytes templates/content/images/vote-accepted.png | Bin 0 -> 1058 bytes templates/content/images/vote-arrow-down-on.png | Bin 0 -> 905 bytes templates/content/images/vote-arrow-down.png | Bin 0 -> 876 bytes templates/content/images/vote-arrow-up-on.png | Bin 0 -> 906 bytes templates/content/images/vote-arrow-up.png | Bin 0 -> 843 bytes templates/content/images/vote-favorite-off.png | Bin 0 -> 930 bytes templates/content/images/vote-favorite-on.png | Bin 0 -> 1023 bytes templates/content/js/com.cnprog.editor.js | 68 + templates/content/js/com.cnprog.post.js | 573 ++++ templates/content/js/com.cnprog.post.pack.js | 1 + templates/content/js/com.cnprog.utils.js | 116 + templates/content/js/compress.bat | 6 + templates/content/js/excanvas.pack.js | 1 + templates/content/js/flot-build.bat | 3 + templates/content/js/jquery-1.2.6.js | 3549 ++++++++++++++++++++ templates/content/js/jquery-1.2.6.min.js | 32 + templates/content/js/jquery.ajaxfileupload.js | 195 ++ templates/content/js/jquery.flot.js | 2421 +++++++++++++ templates/content/js/jquery.flot.pack.js | 1 + templates/content/js/jquery.openid.js | 176 + templates/content/js/jquery.validate.pack.js | 15 + templates/content/js/se_hilite.js | 1 + templates/content/js/se_hilite_src.js | 273 ++ templates/content/js/wmd/images/wmd-buttons.png | Bin 0 -> 7465 bytes templates/content/js/wmd/showdown-min.js | 1 + templates/content/js/wmd/showdown.js | 1309 ++++++++ templates/content/js/wmd/wmd-min.js | 1 + templates/content/js/wmd/wmd-test.html | 158 + templates/content/js/wmd/wmd.css | 129 + templates/content/js/wmd/wmd.js | 2390 +++++++++++++ templates/content/js/yuicompressor-2.4.2.jar | Bin 0 -> 851219 bytes templates/content/style/default.css | 1753 ++++++++++ templates/content/style/jquery.autocomplete.css | 49 + templates/content/style/openid.css | 45 + templates/content/style/prettify.css | 27 + templates/content/style/style.css | 999 ++++++ templates/faq.html | 114 + templates/feeds/rss_description.html | 1 + templates/feeds/rss_title.html | 1 + templates/footer.html | 30 + templates/header.html | 64 + templates/index.html | 121 + templates/logout.html | 26 + templates/pagesize.html | 24 + templates/paginator.html | 35 + templates/privacy.html | 40 + templates/question.html | 469 +++ templates/question_edit.html | 185 + templates/question_retag.html | 109 + templates/questions.html | 153 + templates/reopen.html | 37 + templates/revisions_answer.html | 100 + templates/revisions_question.html | 102 + templates/tags.html | 61 + templates/unanswered.html | 115 + templates/user.html | 34 + templates/user_edit.html | 90 + templates/user_favorites.html | 7 + templates/user_footer.html | 3 + templates/user_info.html | 86 + templates/user_preferences.html | 20 + templates/user_recent.html | 25 + templates/user_reputation.html | 40 + templates/user_responses.html | 21 + templates/user_stats.html | 127 + templates/user_tabs.html | 20 + templates/user_votes.html | 28 + templates/users.html | 70 + templates/users_questions.html | 60 + 137 files changed, 18128 insertions(+) create mode 100644 templates/404.html create mode 100644 templates/500.html create mode 100644 templates/about.html create mode 100644 templates/answer_edit.html create mode 100644 templates/ask.html create mode 100644 templates/authopenid/changeemail.html create mode 100644 templates/authopenid/changeopenid.html create mode 100644 templates/authopenid/changepw.html create mode 100644 templates/authopenid/complete.html create mode 100644 templates/authopenid/confirm_email.txt create mode 100644 templates/authopenid/delete.html create mode 100644 templates/authopenid/failure.html create mode 100644 templates/authopenid/sendpw.html create mode 100644 templates/authopenid/sendpw_email.txt create mode 100644 templates/authopenid/settings.html create mode 100644 templates/authopenid/signin.html create mode 100644 templates/authopenid/signup.html create mode 100644 templates/authopenid/yadis.xrdf create mode 100644 templates/badge.html create mode 100644 templates/badges.html create mode 100644 templates/base.html create mode 100644 templates/base_content.html create mode 100644 templates/book.html create mode 100644 templates/close.html create mode 100644 templates/content/images/box-arrow.gif create mode 100644 templates/content/images/bullet_green.gif create mode 100644 templates/content/images/cc-88x31.png create mode 100644 templates/content/images/cc-wiki.png create mode 100644 templates/content/images/close-small-hover.png create mode 100644 templates/content/images/close-small.png create mode 100644 templates/content/images/cnprog_logo_200_56.gif create mode 100644 templates/content/images/dash.gif create mode 100644 templates/content/images/djangomade124x25_grey.gif create mode 100644 templates/content/images/dot-g.gif create mode 100644 templates/content/images/dot-list.gif create mode 100644 templates/content/images/edit.png create mode 100644 templates/content/images/expander-arrow-hide.gif create mode 100644 templates/content/images/expander-arrow-show.gif create mode 100644 templates/content/images/favicon.gif create mode 100644 templates/content/images/favicon.ico create mode 100644 templates/content/images/feed-icon-small.png create mode 100644 templates/content/images/grippie.png create mode 100644 templates/content/images/indicator.gif create mode 100644 templates/content/images/logo.png create mode 100644 templates/content/images/logo1.png create mode 100644 templates/content/images/logo2.png create mode 100644 templates/content/images/medala.gif create mode 100644 templates/content/images/medala_on.gif create mode 100644 templates/content/images/new.gif create mode 100644 templates/content/images/nophoto.png create mode 100644 templates/content/images/openid.gif create mode 100644 templates/content/images/openid/aol.gif create mode 100644 templates/content/images/openid/blogger.ico create mode 100644 templates/content/images/openid/claimid.ico create mode 100644 templates/content/images/openid/facebook.gif create mode 100644 templates/content/images/openid/flickr.ico create mode 100644 templates/content/images/openid/google.gif create mode 100644 templates/content/images/openid/livejournal.ico create mode 100644 templates/content/images/openid/myopenid.ico create mode 100644 templates/content/images/openid/openid-inputicon.gif create mode 100644 templates/content/images/openid/openid.gif create mode 100644 templates/content/images/openid/technorati.ico create mode 100644 templates/content/images/openid/verisign.ico create mode 100644 templates/content/images/openid/vidoop.ico create mode 100644 templates/content/images/openid/wordpress.ico create mode 100644 templates/content/images/openid/yahoo.gif create mode 100644 templates/content/images/quest-bg.gif create mode 100644 templates/content/images/vote-accepted-on.png create mode 100644 templates/content/images/vote-accepted.png create mode 100644 templates/content/images/vote-arrow-down-on.png create mode 100644 templates/content/images/vote-arrow-down.png create mode 100644 templates/content/images/vote-arrow-up-on.png create mode 100644 templates/content/images/vote-arrow-up.png create mode 100644 templates/content/images/vote-favorite-off.png create mode 100644 templates/content/images/vote-favorite-on.png create mode 100644 templates/content/js/com.cnprog.editor.js create mode 100644 templates/content/js/com.cnprog.post.js create mode 100644 templates/content/js/com.cnprog.post.pack.js create mode 100644 templates/content/js/com.cnprog.utils.js create mode 100644 templates/content/js/compress.bat create mode 100644 templates/content/js/excanvas.pack.js create mode 100644 templates/content/js/flot-build.bat create mode 100644 templates/content/js/jquery-1.2.6.js create mode 100644 templates/content/js/jquery-1.2.6.min.js create mode 100644 templates/content/js/jquery.ajaxfileupload.js create mode 100644 templates/content/js/jquery.flot.js create mode 100644 templates/content/js/jquery.flot.pack.js create mode 100644 templates/content/js/jquery.openid.js create mode 100644 templates/content/js/jquery.validate.pack.js create mode 100644 templates/content/js/se_hilite.js create mode 100644 templates/content/js/se_hilite_src.js create mode 100644 templates/content/js/wmd/images/wmd-buttons.png create mode 100644 templates/content/js/wmd/showdown-min.js create mode 100644 templates/content/js/wmd/showdown.js create mode 100644 templates/content/js/wmd/wmd-min.js create mode 100644 templates/content/js/wmd/wmd-test.html create mode 100644 templates/content/js/wmd/wmd.css create mode 100644 templates/content/js/wmd/wmd.js create mode 100644 templates/content/js/yuicompressor-2.4.2.jar create mode 100644 templates/content/style/default.css create mode 100644 templates/content/style/jquery.autocomplete.css create mode 100644 templates/content/style/openid.css create mode 100644 templates/content/style/prettify.css create mode 100644 templates/content/style/style.css create mode 100644 templates/faq.html create mode 100644 templates/feeds/rss_description.html create mode 100644 templates/feeds/rss_title.html create mode 100644 templates/footer.html create mode 100644 templates/header.html create mode 100644 templates/index.html create mode 100644 templates/logout.html create mode 100644 templates/pagesize.html create mode 100644 templates/paginator.html create mode 100644 templates/privacy.html create mode 100644 templates/question.html create mode 100644 templates/question_edit.html create mode 100644 templates/question_retag.html create mode 100644 templates/questions.html create mode 100644 templates/reopen.html create mode 100644 templates/revisions_answer.html create mode 100644 templates/revisions_question.html create mode 100644 templates/tags.html create mode 100644 templates/unanswered.html create mode 100644 templates/user.html create mode 100644 templates/user_edit.html create mode 100644 templates/user_favorites.html create mode 100644 templates/user_footer.html create mode 100644 templates/user_info.html create mode 100644 templates/user_preferences.html create mode 100644 templates/user_recent.html create mode 100644 templates/user_reputation.html create mode 100644 templates/user_responses.html create mode 100644 templates/user_stats.html create mode 100644 templates/user_tabs.html create mode 100644 templates/user_votes.html create mode 100644 templates/users.html create mode 100644 templates/users_questions.html (limited to 'templates') diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 00000000..02725854 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,48 @@ +{% extends "base_content.html" %} +{% block title %}{% spaceless %}404 Error{% endspaceless %}{% endblock %} +{% block forestyle%} + +{% endblock %} +{% block forejs %} + +{% endblock %} +{% block content %} +
+ 404 Not Found +
+
+
+

对不起,没有找到您请求的页面!

+
+ 有可能是以下原因导致:
+
    +
  • 你正在查看的问题或者回答已经被删除;
  • +
  • 请求的地址有误 - 请核实原始URL地址;
  • +
  • 访问的页面被保护或你的积分不够,参见 faq
  • +
  • 如果你确信不该出现404错误,请报告这个问题
  • + +
+ + +
+ +
+{% endblock %} + + + diff --git a/templates/500.html b/templates/500.html new file mode 100644 index 00000000..2e89783a --- /dev/null +++ b/templates/500.html @@ -0,0 +1,33 @@ +{% extends "base_content.html" %} +{% block title %}{% spaceless %}500 Error{% endspaceless %}{% endblock %} +{% block forejs %} + +{% endblock %} +{% block content %} +
+ 500 Server Error +
+
+
+

对不起,系统发生了错误,不能响应您的请求!

+
+ 系统已经记录错误日志,我们会尽快解决此问题。
+ 如果这个问题长时间没有被修复,请搜索查看当前问题的状态,或者报告新的bug。感谢您的支持! + +
+ +
+{% endblock %} + + + diff --git a/templates/about.html b/templates/about.html new file mode 100644 index 00000000..6638060e --- /dev/null +++ b/templates/about.html @@ -0,0 +1,71 @@ +{% extends "base_content.html" %} +{% load extra_tags %} +{% load humanize %} +{% block title %}{% spaceless %}关于本站{% endspaceless %}{% endblock %} +{% block forejs %} +{% endblock %} +{% block content %} +
+关于本站 +
+ +
+

+ CNProg 是一个面向中国程序员的免费技术问答社区。它是一个介于论坛、博客、维基和Digg之间的社区系统,基于Python和Django开发。
+ 创办CNProg的灵感来自于国外知名QA社区StackOverflow,但是CNProg不仅仅是一个汉化版的SO。
+ 我们通过开源社区来维护和更新源代码,你可以访问这里获取本站的所有源代码(请注意源代码使用的授权许可)。
+

+
+

+ 我们不运作社区,由你来运作。CNProg 是一个由用户来驱动的社区。每个用户不仅是管理员,也是社区功能需求的提出者。
+ 社区内容是协作的,系统越信任你,你就在社区获得更多的管理权限,可以开始编辑问题或回答, + 帮助我们组织问题和答案,帮助需要帮助的广大程序员用户。
+ 透明、开放、全民管理的运作模式是本网站的特点,我们希望通过CNProg让用户能够更加容易地寻求帮助,找到问题答案,解决实际的技术问题。 +

+

+ 我们关注国内程序员的成长! +

+ +
+

你们是谁?

+

+ 我们是一群奋斗在互联网的编程爱好者,和你一样,也是希望自己编写高质量软件的开发人员。 + 我们的团队: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ 欢迎访问我们的团队Blog或查看更多介绍的CNProg FAQ。 +

+
+{% endblock %} + + + diff --git a/templates/answer_edit.html b/templates/answer_edit.html new file mode 100644 index 00000000..f914660a --- /dev/null +++ b/templates/answer_edit.html @@ -0,0 +1,139 @@ +{% extends "base.html" %} +{% block title %}{% spaceless %}修改回答{% endspaceless %}{% endblock %} +{% block forejs %} + + + + + + + +{% endblock %} + +{% block content %} +
+ 修改回答 [返回] +
+
+
+
+
+ {% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul }}{% endif %} +
+ {{ revision_form.revision }} +

+
+
+ {{ form.text }} + +
预览开关
+
+
+
+ + {{ form.summary.label_tag }}
+ {{ form.summary }} {{ form.summary.errors }} +
+ {{ form.summary.help_text }} +
+
+ + +
+
+
+
+
+{% endblock %} + +{% block sidebar %} +
+

受欢迎的提问

+
+
    +
  • + 您的问题与编程相关吗? +
  • +
  • + 建议您提的问题是可以被答复的,而不仅仅是可以讨论。 +
  • +
  • + 请详细描述您的问题。 +
  • +
  • + 我们推荐您使用中文描述问题,这样可以得到更多的答复机会。 +
  • +
+ faq » +
+
+
+ +
+

Markdown快速参考

+ + 有关Markdown详细说明 » +
+
+ +{% endblock %} + +{% block endjs %} +{% endblock %} + diff --git a/templates/ask.html b/templates/ask.html new file mode 100644 index 00000000..ecd176bc --- /dev/null +++ b/templates/ask.html @@ -0,0 +1,191 @@ +{% extends "base.html" %} +{% block title %}{% spaceless %}我要提问{% endspaceless %}{% endblock %} +{% block forejs %} + + + + + + + +{% endblock %} + +{% block content %} +
+ 我要提问 +
+
+
+
+

+
+ {{ form.title }} {{ form.title.errors }} +

+ {{ form.title.help_text }} +
+

+ +

+

+ {{ form.text }} + +
+ + + + + + +
+ 预览开关 + + {{ form.wiki }} {{ form.wiki.label_tag }} +
+
+
+ +
+

+

+ {{ form.tags.label_tag }}:
+ {{ form.tags }} {{ form.tags.errors }} +

+ {{ form.tags.help_text }} +
+

+
+ {% if not request.user.is_authenticated %} + + + + + + +
+ 使用 OpenID 登录:
+ {{ form.openid }} +
+ 获取您自己的OpenID。 +
+
+
+
+
+ 您的大名:
+ {{ form.user }} +

+ 电子邮件:(不会公开显示)
+ {{ form.email }} +

+
+ {% endif %} + +

+
+
+
+{% endblock %} + +{% block sidebar %} +
+

受欢迎的提问

+
+
    +
  • + 您的问题与编程相关吗? +
  • +
  • + 建议您提的问题是可以被答复的,而不仅仅是可以讨论。 +
  • +
  • + 请详细描述您的问题。 +
  • +
  • + 我们推荐您使用中文描述问题,这样可以得到更多的答复机会。 +
  • +
+ faq » +
+
+
+ +
+

Markdown快速参考

+ + 有关Markdown详细说明 » +
+
+ +{% endblock %} + +{% block endjs %} +{% endblock %} + diff --git a/templates/authopenid/changeemail.html b/templates/authopenid/changeemail.html new file mode 100644 index 00000000..a6c53a64 --- /dev/null +++ b/templates/authopenid/changeemail.html @@ -0,0 +1,39 @@ +{% extends "base_content.html" %} +{% load i18n %} + + + + +{% block content %} +
+

+ {% trans "Account: change email" %} +

+
+

{% blocktrans %}This is where you can change the email address associated with your account. Please keep this email address up to date so we can send you a password-reset email if you request one.{% endblocktrans %}

+{% if form.errors %} +

{% trans "Please correct errors below:" %}
+ {% if form.email.errors %} + {{ form.email.errors|join:", " }} + {% endif %} + {% if form.password.errors %} + {{ form.password.errors|join:", " }} + {% endif %} +

+{% endif %} + +{% if msg %} +

{{ msg }}

+{% endif %} + +
+
+ +
{{ form.email }}
+
{{ form.password }}
+ +

+ +
+
+{% endblock %} diff --git a/templates/authopenid/changeopenid.html b/templates/authopenid/changeopenid.html new file mode 100644 index 00000000..c1f3d180 --- /dev/null +++ b/templates/authopenid/changeopenid.html @@ -0,0 +1,33 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +
+

+ {% trans "Account: change OpenID URL" %} +

+
+ +

{% blocktrans %}This is where you can change your OpenID URL. Make sure you remember it!{% endblocktrans %}

+{% if form.errors %} +

{% trans "Please correct errors below:" %}
+ {% if form.openid_url.errors %} + {{ form.openid_url.errors|join:", " }} + {% endif %} + + +

+{% endif %} +{% if msg %} +

{{ msg }}

+{% endif %} + +
+
+ +
{{ form.openid_url }}
+

+ +
+
+{% endblock %} diff --git a/templates/authopenid/changepw.html b/templates/authopenid/changepw.html new file mode 100644 index 00000000..f3cf4be0 --- /dev/null +++ b/templates/authopenid/changepw.html @@ -0,0 +1,33 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block head %} + +{% endblock %} + + + +{% block content %} +
+

+ {% trans "Account: change password" %} +

+
+

{% blocktrans %}This is where you can change your password. Make sure you remember it!{% endblocktrans %}

+{% if form.errors %} +

{% trans "Please correct errors below:" %}
+{{ form.errors }} +

+{% endif %} + +
+
+ +
{{ form.oldpw }}
+
{{ form.password1 }}
+
{{ form.password2 }}
+

+ +
+
+{% endblock %} diff --git a/templates/authopenid/complete.html b/templates/authopenid/complete.html new file mode 100644 index 00000000..fd243f28 --- /dev/null +++ b/templates/authopenid/complete.html @@ -0,0 +1,66 @@ +{% extends "base.html" %} +{% block head %}{% endblock %} +{% block title %}{% spaceless %}绑定OpenID{% endspaceless %}{% endblock %} +{% block content %} +
+ 绑定OpenID帐号 + +
+

+

您的OpenID帐号已经验证通过! 请完成最后一步 - 绑定OpenID到您的帐号。

+

输入您的新帐号或者指定已经存在的帐号。

+

+ + {% if form1.errors %} +

+ 请注意以下错误:
+

+

+ {% endif %} + {% if form2.errors %} +

+ 请注意以下错误:
+

+

+ {% endif %} + +
+
+ {{ form.next }} +
+ 新帐号 +

{{ form1.username }}
+

{{ form1.email }}
+
+
+
+
+ +{% endblock %} + + + diff --git a/templates/authopenid/confirm_email.txt b/templates/authopenid/confirm_email.txt new file mode 100644 index 00000000..9af177ed --- /dev/null +++ b/templates/authopenid/confirm_email.txt @@ -0,0 +1,12 @@ +Thank you for registering. + +Your account details are: + +Username: {{ username }} +Password: {{ password }} + + +You may sign in here: +{{ site_url }}signin/ + + diff --git a/templates/authopenid/delete.html b/templates/authopenid/delete.html new file mode 100644 index 00000000..19e0884a --- /dev/null +++ b/templates/authopenid/delete.html @@ -0,0 +1,38 @@ +{% extends "base.html" %} +{% load i18n %} + + +{% block content %} +
+

+ {% trans "Account: delete account" %} +

+
+ +

{% blocktrans %}Note: After deleting your account, anyone will be able to register this username.{% endblocktrans %}

+{% if form.errors %} +

{% trans "Please correct errors below:" %}
+ {% if form.confirm.errors %} + {% trans "Check confirm box, if you want delete your account." %}
+ {% endif %} + {% if form.password.errors %} + {% trans "Password:" %} {{ form.password.errors|join:", " }} + {% endif %} +

+{% endif %} +{% if msg %} +

{% trans "Please correct errors below:" %}
+ {{ msg }} +

+{% endif %} +
+
+ +
{{ form.confirm }} {% trans "I am sure I want to delete my account." %}
+
{{ form.password }} {% trans "(required for your security)" %}
+ +

+ +
+
+{% endblock %} diff --git a/templates/authopenid/failure.html b/templates/authopenid/failure.html new file mode 100644 index 00000000..87839ab2 --- /dev/null +++ b/templates/authopenid/failure.html @@ -0,0 +1,13 @@ + + + + OpenID failed + + +

OpenID failed

+ +

{{ message|escape }}

+ + + \ No newline at end of file diff --git a/templates/authopenid/sendpw.html b/templates/authopenid/sendpw.html new file mode 100644 index 00000000..237a5cf6 --- /dev/null +++ b/templates/authopenid/sendpw.html @@ -0,0 +1,33 @@ +{% extends "base.html" %} +{% block title %}{% spaceless %}发送新密码{% endspaceless %}{% endblock %} + +{% block content %} +
+

发送新密码

+ +
+
+丢失了您的密码? 你可以在这里重设密码。
+请输入用户名,新的密码会发送到你注册时候填写的电子邮件。 +
+{% if form.errors %} +

请注意以下错误:
+ {% if form.username.errors %} + {{ form.username.errors|join:", " }} + {% endif %} +

+{% endif %} +{% if msg %} +
{{ msg }}
+{% endif %} + +
+
+
{{ form.username }}
+ +

返回登录

+ +
+ 注意: 新的密码只有您在激活邮件中的链接后才会被激活。 +
+{% endblock %} diff --git a/templates/authopenid/sendpw_email.txt b/templates/authopenid/sendpw_email.txt new file mode 100644 index 00000000..dec062a8 --- /dev/null +++ b/templates/authopenid/sendpw_email.txt @@ -0,0 +1,14 @@ +Someone has requested to reset your password on {{ site_url }}. +If this is not you, it is safe to ignore this email. + +Your new account details are: + +Username: {{ username }} +New password: {{ password }} + +To confirm reset of your password go to this address: +{{ site_url }}{{ url_confirm }}?key={{ confirm_key }} + +Regards, + + diff --git a/templates/authopenid/settings.html b/templates/authopenid/settings.html new file mode 100644 index 00000000..c765b989 --- /dev/null +++ b/templates/authopenid/settings.html @@ -0,0 +1,41 @@ +{% extends "base_content.html" %} +{% load i18n %} + +{% block head %} + +{% endblock %} + +{% block content %} +
+

{{ request.user.username }}账户设置

+
+
+ {% if msg %} +

{{ msg }}

+ {% endif %} + +
+
» 修改密码
+
{% trans "Give your account a new password." %}
+
» 更换电子邮件
+
{% trans "Add or update the email address associated with your account." %}
+ {% if is_openid %} +
» 更换OpenID地址
+
{% trans "Change openid associated to your account" %}
+ {% endif %} + +
» 删除帐号
+
{% trans "Erase your username and all your data from website" %}
+
+
+{% endblock %} diff --git a/templates/authopenid/signin.html b/templates/authopenid/signin.html new file mode 100644 index 00000000..9c5511f2 --- /dev/null +++ b/templates/authopenid/signin.html @@ -0,0 +1,96 @@ +{% extends "base.html" %} +{% block title %}{% spaceless %}用户登录{% endspaceless %}{% endblock %} +{% block forejs %} + + + +{% endblock %} +{% block content %} +
+ 用户登录 +
+
+
+ {{ form2.next }} +

CNProg支持两种登录模式。您可以使用帐号、密码登录,或者使用OpenID登录。

+ {% if msg %} +

{{ msg }}

+ {% endif %} +
+ 使用OpenID登录 +
+

请选择您的帐号类型并完成正确的OpenID地址(如:替换“{username}”为您的对应帐号):

+
+
+
+
+

+

+ {{ form2.openid_url }} +

+
+
+
+
+ {% if form1.errors %} +

+ 请注意以下错误:
+

    + {% if form1.username.errors %} +
  • {{ form1.username.errors|join:", " }}
  • + {% endif %} + {% if form1.password.errors %} +
  • {{ form1.password.errors|join:", " }}
  • + {% endif %} +
+

+ {% endif %} +
+
+ {{ form1.next }} +
+ 使用帐号密码登录 +

{{ form1.username }}
+

{{ form1.password }}
+ + +
+
+
+
+{% endblock %} + +{% block sidebar %} +
+

为什么需要OpenID登录?

+

+

+ 查看更多 »
+ 获取OpenID » +

+
+
+{% endblock%} + diff --git a/templates/authopenid/signup.html b/templates/authopenid/signup.html new file mode 100644 index 00000000..e51544f7 --- /dev/null +++ b/templates/authopenid/signup.html @@ -0,0 +1,51 @@ +{% extends "base.html" %} +{% block title %}{% spaceless %}注册帐号{% endspaceless %}{% endblock %} + +{% block content %} +
+

注册帐号

+ +
+
+

我们支持两种注册方式,你可以使用常规的用户名、密码方式注册,或者使用OpenID帐号注册

+ + {% if form.errors %} + +

+ 请注意以下错误:
+

+

+ {% endif %} +
+
+
+ 常规注册 +

{{ form.username }}
+ +

{{ form.email }}
+

{{ form.password1 }}
+

{{ form.password2 }}
+ +
+
+
+
+
+ +
+
{{ form2.openid_url }}
+
+
+
+{% endblock %} diff --git a/templates/authopenid/yadis.xrdf b/templates/authopenid/yadis.xrdf new file mode 100644 index 00000000..a9ed44fe --- /dev/null +++ b/templates/authopenid/yadis.xrdf @@ -0,0 +1,14 @@ + + + + + http://specs.openid.net/auth/2.0/return_to + {% for uri in return_to %} + {{ uri }} + {% endfor %} + + + \ No newline at end of file diff --git a/templates/badge.html b/templates/badge.html new file mode 100644 index 00000000..4ffedfa6 --- /dev/null +++ b/templates/badge.html @@ -0,0 +1,38 @@ +{% extends "base_content.html" %} +{% load extra_tags %} +{% load humanize %} +{% block title %}{% spaceless %}{{ badge.name }}-奖牌{% endspaceless %}{% endblock %} +{% block forejs %} + +{% endblock %} +{% block content %} +
+ 奖牌 +
+
+

+  {{ badge.name }} {{ badge.description }} +

+
+ {% if badge.awarded_count %} +

{{ awards|length|intcomma }} + 用户已被授予该奖牌:

+ {% endif %} +
+
+ {% for award in awards %} +

{{ award.name }} {% get_score_badge_by_details award.rep award.gold award.silver award.bronze %}

+ {% endfor %} +
+ +
+{% endblock %} + + + + diff --git a/templates/badges.html b/templates/badges.html new file mode 100644 index 00000000..eb5a0233 --- /dev/null +++ b/templates/badges.html @@ -0,0 +1,72 @@ +{% extends "base.html" %} +{% load extra_tags %} +{% load humanize %} +{% block title %}{% spaceless %}奖牌列表{% endspaceless %}{% endblock %} +{% block forejs %} + +{% endblock %} +{% block content %} +
+ 奖牌榜 +
+
+

+ 提出问题,给予回答,投出你的票 - CNProg 会针对你在社区的表现,授予你各类奖牌。
+ 这里列出社区所有的奖牌,以及到目前为此,每个奖牌被授予的用户人数。 +

+
+
+ {% for badge in badges %} +
+
+ {% for a in mybadges %} + {% ifequal a.badge_id badge.id %} + + {% endifequal %} + {% endfor %} +
+
+  {{ badge.name }} × {{ badge.awarded_count|intcomma }} +
+

+ {{ badge.description }} +

+
+ {% endfor %} +
+
+{% endblock %} +{% block sidebar %} + +
+

社区奖牌

+
+

+  金牌 +

+

+ 金牌是十分罕见的。你不仅要参与社区的提问、回答、投票等活动,而且需要有高深的知识和能力才能获得。获得金牌意味着你在某个层次上已经达到了顶峰。 +

+

+  银牌 +

+

+ 银牌需要经过长时间的奋斗才能获得。它是不同寻常的荣誉,只要你付出足够的努力就会得到。 +

+

+  铜牌 +

+

+ 铜牌会在你活跃于社区时产生,它相对容易获得,但也是一种特殊的荣誉。 +

+
+
+{% endblock %} + + + diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 00000000..3ed3b3f4 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,82 @@ +{% load extra_filters %} + + + + {% block title %}{% endblock %} - CNProg.com 程序员问答社区 + {% spaceless %} + {% block meta %}{% endblock %} + {% endspaceless %} + + + + + + + + + + {% with request.user.get_messages as messages%} + {% if messages %} + + + + {% endif %} + {% endwith %} + + {% block forejs %} + {% endblock %} + + + + {% include "header.html" %} +
+
+
+ {% block content%} + {% endblock%} + +
+ +
+ {% block sidebar%} + {% endblock%} + +
+
+ {% block tail %} + {% endblock %} +
+
+
+
+ {% include "footer.html" %} + {% block endjs %} + {% endblock %} + + diff --git a/templates/base_content.html b/templates/base_content.html new file mode 100644 index 00000000..7fec09ed --- /dev/null +++ b/templates/base_content.html @@ -0,0 +1,75 @@ + + + + {% block title %}{% endblock %} - CNProg.com 程序员问答社区 + + + + + {% spaceless %} + {% block forestyle %}{% endblock %} + {% endspaceless %} + + + + + + + {% with request.user.get_messages as messages%} + {% if messages %} + + + {% endif %} + {% endwith %} + + {% block forejs %} + {% endblock %} + + + + {% include "header.html" %} +
+
+
+ {% block content%} + {% endblock%} + +
+
+ {% block tail %} + {% endblock %} +
+
+
+
+ {% include "footer.html" %} + {% block endjs %} + {% endblock %} + + diff --git a/templates/book.html b/templates/book.html new file mode 100644 index 00000000..e5d4396b --- /dev/null +++ b/templates/book.html @@ -0,0 +1,150 @@ +{% extends "base_content.html" %} +{% load extra_tags %} +{% load extra_filters %} +{% load humanize %} +{% block title %}{% spaceless %}{{ book.title }}-读书频道{% endspaceless %}{% endblock %} +{% block forejs %} + +{% endblock %} +{% block content %} +
《{{ book.title }}》
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if author_info.blog_url %} + + + + + + {% endif %} + + + + + + + + +
【作者】{{ book.author }}
【出版社】{{ book.publication }}
【出版日期】{{ book.published_at|date:"Y-m" }}
【价格】{{ book.price }} 元
【页数】{{ book.pages }} 页
【标签】{{ book.tagnames }}
 
作者博客 »
书籍目录 »
网上购买 »
+
+
+ +
+
+ +
+ +
+ +
+ + +
+{% endblock %} +{% block tail %} + +
+ {% cnprog_paginator context %} + +
+
+ +
+ +{% endblock %} \ No newline at end of file diff --git a/templates/close.html b/templates/close.html new file mode 100644 index 00000000..04a22f18 --- /dev/null +++ b/templates/close.html @@ -0,0 +1,36 @@ +{% extends "base_content.html" %} +{% load extra_tags %} +{% load humanize %} +{% block title %}{% spaceless %}关闭问题{% endspaceless %}{% endblock %} +{% block forejs %} + +{% endblock %} +{% block content %} +
+ 关闭问题 +
+
+

由于以下原因,你要关闭这个问题: + {{ question.get_question_title }} +

+ +
+

+ 原因: {{ form.reason }} +

+
+ + + +
+ +
+
+{% endblock %} + + + diff --git a/templates/content/images/box-arrow.gif b/templates/content/images/box-arrow.gif new file mode 100644 index 00000000..89dcf5b3 Binary files /dev/null and b/templates/content/images/box-arrow.gif differ diff --git a/templates/content/images/bullet_green.gif b/templates/content/images/bullet_green.gif new file mode 100644 index 00000000..fa530910 Binary files /dev/null and b/templates/content/images/bullet_green.gif differ diff --git a/templates/content/images/cc-88x31.png b/templates/content/images/cc-88x31.png new file mode 100644 index 00000000..0f2a0f10 Binary files /dev/null and b/templates/content/images/cc-88x31.png differ diff --git a/templates/content/images/cc-wiki.png b/templates/content/images/cc-wiki.png new file mode 100644 index 00000000..3e680538 Binary files /dev/null and b/templates/content/images/cc-wiki.png differ diff --git a/templates/content/images/close-small-hover.png b/templates/content/images/close-small-hover.png new file mode 100644 index 00000000..7899aec7 Binary files /dev/null and b/templates/content/images/close-small-hover.png differ diff --git a/templates/content/images/close-small.png b/templates/content/images/close-small.png new file mode 100644 index 00000000..5a99d31f Binary files /dev/null and b/templates/content/images/close-small.png differ diff --git a/templates/content/images/cnprog_logo_200_56.gif b/templates/content/images/cnprog_logo_200_56.gif new file mode 100644 index 00000000..ab690de2 Binary files /dev/null and b/templates/content/images/cnprog_logo_200_56.gif differ diff --git a/templates/content/images/dash.gif b/templates/content/images/dash.gif new file mode 100644 index 00000000..d1ddc507 Binary files /dev/null and b/templates/content/images/dash.gif differ diff --git a/templates/content/images/djangomade124x25_grey.gif b/templates/content/images/djangomade124x25_grey.gif new file mode 100644 index 00000000..d34bb311 Binary files /dev/null and b/templates/content/images/djangomade124x25_grey.gif differ diff --git a/templates/content/images/dot-g.gif b/templates/content/images/dot-g.gif new file mode 100644 index 00000000..5d6bb28e Binary files /dev/null and b/templates/content/images/dot-g.gif differ diff --git a/templates/content/images/dot-list.gif b/templates/content/images/dot-list.gif new file mode 100644 index 00000000..f6a6b865 Binary files /dev/null and b/templates/content/images/dot-list.gif differ diff --git a/templates/content/images/edit.png b/templates/content/images/edit.png new file mode 100644 index 00000000..dcb09be0 Binary files /dev/null and b/templates/content/images/edit.png differ diff --git a/templates/content/images/expander-arrow-hide.gif b/templates/content/images/expander-arrow-hide.gif new file mode 100644 index 00000000..feb6a618 Binary files /dev/null and b/templates/content/images/expander-arrow-hide.gif differ diff --git a/templates/content/images/expander-arrow-show.gif b/templates/content/images/expander-arrow-show.gif new file mode 100644 index 00000000..6825c56e Binary files /dev/null and b/templates/content/images/expander-arrow-show.gif differ diff --git a/templates/content/images/favicon.gif b/templates/content/images/favicon.gif new file mode 100644 index 00000000..910c2666 Binary files /dev/null and b/templates/content/images/favicon.gif differ diff --git a/templates/content/images/favicon.ico b/templates/content/images/favicon.ico new file mode 100644 index 00000000..b5c6f578 Binary files /dev/null and b/templates/content/images/favicon.ico differ diff --git a/templates/content/images/feed-icon-small.png b/templates/content/images/feed-icon-small.png new file mode 100644 index 00000000..b3c949d2 Binary files /dev/null and b/templates/content/images/feed-icon-small.png differ diff --git a/templates/content/images/grippie.png b/templates/content/images/grippie.png new file mode 100644 index 00000000..6524d416 Binary files /dev/null and b/templates/content/images/grippie.png differ diff --git a/templates/content/images/indicator.gif b/templates/content/images/indicator.gif new file mode 100644 index 00000000..1c72ebb5 Binary files /dev/null and b/templates/content/images/indicator.gif differ diff --git a/templates/content/images/logo.png b/templates/content/images/logo.png new file mode 100644 index 00000000..640eb1da Binary files /dev/null and b/templates/content/images/logo.png differ diff --git a/templates/content/images/logo1.png b/templates/content/images/logo1.png new file mode 100644 index 00000000..d79a6271 Binary files /dev/null and b/templates/content/images/logo1.png differ diff --git a/templates/content/images/logo2.png b/templates/content/images/logo2.png new file mode 100644 index 00000000..bd3cccd9 Binary files /dev/null and b/templates/content/images/logo2.png differ diff --git a/templates/content/images/medala.gif b/templates/content/images/medala.gif new file mode 100644 index 00000000..93dd1a39 Binary files /dev/null and b/templates/content/images/medala.gif differ diff --git a/templates/content/images/medala_on.gif b/templates/content/images/medala_on.gif new file mode 100644 index 00000000..a18f9e85 Binary files /dev/null and b/templates/content/images/medala_on.gif differ diff --git a/templates/content/images/new.gif b/templates/content/images/new.gif new file mode 100644 index 00000000..8a220b53 Binary files /dev/null and b/templates/content/images/new.gif differ diff --git a/templates/content/images/nophoto.png b/templates/content/images/nophoto.png new file mode 100644 index 00000000..2daf0ffd Binary files /dev/null and b/templates/content/images/nophoto.png differ diff --git a/templates/content/images/openid.gif b/templates/content/images/openid.gif new file mode 100644 index 00000000..8540e12b Binary files /dev/null and b/templates/content/images/openid.gif differ diff --git a/templates/content/images/openid/aol.gif b/templates/content/images/openid/aol.gif new file mode 100644 index 00000000..decc4f12 Binary files /dev/null and b/templates/content/images/openid/aol.gif differ diff --git a/templates/content/images/openid/blogger.ico b/templates/content/images/openid/blogger.ico new file mode 100644 index 00000000..1b9730b0 Binary files /dev/null and b/templates/content/images/openid/blogger.ico differ diff --git a/templates/content/images/openid/claimid.ico b/templates/content/images/openid/claimid.ico new file mode 100644 index 00000000..2b80f491 Binary files /dev/null and b/templates/content/images/openid/claimid.ico differ diff --git a/templates/content/images/openid/facebook.gif b/templates/content/images/openid/facebook.gif new file mode 100644 index 00000000..b997b358 Binary files /dev/null and b/templates/content/images/openid/facebook.gif differ diff --git a/templates/content/images/openid/flickr.ico b/templates/content/images/openid/flickr.ico new file mode 100644 index 00000000..11f6e07f Binary files /dev/null and b/templates/content/images/openid/flickr.ico differ diff --git a/templates/content/images/openid/google.gif b/templates/content/images/openid/google.gif new file mode 100644 index 00000000..1b6cd07b Binary files /dev/null and b/templates/content/images/openid/google.gif differ diff --git a/templates/content/images/openid/livejournal.ico b/templates/content/images/openid/livejournal.ico new file mode 100644 index 00000000..f3d21ec5 Binary files /dev/null and b/templates/content/images/openid/livejournal.ico differ diff --git a/templates/content/images/openid/myopenid.ico b/templates/content/images/openid/myopenid.ico new file mode 100644 index 00000000..ceb06e6a Binary files /dev/null and b/templates/content/images/openid/myopenid.ico differ diff --git a/templates/content/images/openid/openid-inputicon.gif b/templates/content/images/openid/openid-inputicon.gif new file mode 100644 index 00000000..cde836c8 Binary files /dev/null and b/templates/content/images/openid/openid-inputicon.gif differ diff --git a/templates/content/images/openid/openid.gif b/templates/content/images/openid/openid.gif new file mode 100644 index 00000000..c718b0e6 Binary files /dev/null and b/templates/content/images/openid/openid.gif differ diff --git a/templates/content/images/openid/technorati.ico b/templates/content/images/openid/technorati.ico new file mode 100644 index 00000000..fa1083c1 Binary files /dev/null and b/templates/content/images/openid/technorati.ico differ diff --git a/templates/content/images/openid/verisign.ico b/templates/content/images/openid/verisign.ico new file mode 100644 index 00000000..3953af93 Binary files /dev/null and b/templates/content/images/openid/verisign.ico differ diff --git a/templates/content/images/openid/vidoop.ico b/templates/content/images/openid/vidoop.ico new file mode 100644 index 00000000..bbd9a0d5 Binary files /dev/null and b/templates/content/images/openid/vidoop.ico differ diff --git a/templates/content/images/openid/wordpress.ico b/templates/content/images/openid/wordpress.ico new file mode 100644 index 00000000..31b7d2c2 Binary files /dev/null and b/templates/content/images/openid/wordpress.ico differ diff --git a/templates/content/images/openid/yahoo.gif b/templates/content/images/openid/yahoo.gif new file mode 100644 index 00000000..42adbfa5 Binary files /dev/null and b/templates/content/images/openid/yahoo.gif differ diff --git a/templates/content/images/quest-bg.gif b/templates/content/images/quest-bg.gif new file mode 100644 index 00000000..b7540238 Binary files /dev/null and b/templates/content/images/quest-bg.gif differ diff --git a/templates/content/images/vote-accepted-on.png b/templates/content/images/vote-accepted-on.png new file mode 100644 index 00000000..2026f3bc Binary files /dev/null and b/templates/content/images/vote-accepted-on.png differ diff --git a/templates/content/images/vote-accepted.png b/templates/content/images/vote-accepted.png new file mode 100644 index 00000000..ecd18551 Binary files /dev/null and b/templates/content/images/vote-accepted.png differ diff --git a/templates/content/images/vote-arrow-down-on.png b/templates/content/images/vote-arrow-down-on.png new file mode 100644 index 00000000..048dbb44 Binary files /dev/null and b/templates/content/images/vote-arrow-down-on.png differ diff --git a/templates/content/images/vote-arrow-down.png b/templates/content/images/vote-arrow-down.png new file mode 100644 index 00000000..e4fdec0a Binary files /dev/null and b/templates/content/images/vote-arrow-down.png differ diff --git a/templates/content/images/vote-arrow-up-on.png b/templates/content/images/vote-arrow-up-on.png new file mode 100644 index 00000000..56ad0c25 Binary files /dev/null and b/templates/content/images/vote-arrow-up-on.png differ diff --git a/templates/content/images/vote-arrow-up.png b/templates/content/images/vote-arrow-up.png new file mode 100644 index 00000000..6e9a51c7 Binary files /dev/null and b/templates/content/images/vote-arrow-up.png differ diff --git a/templates/content/images/vote-favorite-off.png b/templates/content/images/vote-favorite-off.png new file mode 100644 index 00000000..c1bef074 Binary files /dev/null and b/templates/content/images/vote-favorite-off.png differ diff --git a/templates/content/images/vote-favorite-on.png b/templates/content/images/vote-favorite-on.png new file mode 100644 index 00000000..1f9c14ab Binary files /dev/null and b/templates/content/images/vote-favorite-on.png differ diff --git a/templates/content/js/com.cnprog.editor.js b/templates/content/js/com.cnprog.editor.js new file mode 100644 index 00000000..289d9866 --- /dev/null +++ b/templates/content/js/com.cnprog.editor.js @@ -0,0 +1,68 @@ +/* + jQuery TextAreaResizer plugin + Created on 17th January 2008 by Ryan O'Dell + Version 1.0.4 +*/(function($){var textarea,staticOffset;var iLastMousePos=0;var iMin=32;var grip;$.fn.TextAreaResizer=function(){return this.each(function(){textarea=$(this).addClass('processed'),staticOffset=null;$(this).wrap('
').parent().append($('
').bind("mousedown",{el:this},startDrag));var grippie=$('div.grippie',$(this).parent())[0];grippie.style.marginRight=(grippie.offsetWidth-$(this)[0].offsetWidth)+'px'})};function startDrag(e){textarea=$(e.data.el);textarea.blur();iLastMousePos=mousePosition(e).y;staticOffset=textarea.height()-iLastMousePos;textarea.css('opacity',0.25);$(document).mousemove(performDrag).mouseup(endDrag);return false}function performDrag(e){var iThisMousePos=mousePosition(e).y;var iMousePos=staticOffset+iThisMousePos;if(iLastMousePos>=(iThisMousePos)){iMousePos-=5}iLastMousePos=iThisMousePos;iMousePos=Math.max(iMin,iMousePos);textarea.height(iMousePos+'px');if(iMousePos1&&!select.visible()){onChange(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i1){v=words.slice(0,words.length-1).join(options.multipleSeparator)+options.multipleSeparator+v;}v+=options.multipleSeparator;}$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true;}function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return;}var currentValue=$input.val();if(!skipPrevCheck&¤tValue==previousValue)return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow);}else{stopLoading();select.hide();}};function trimWords(value){if(!value){return[""];}var words=value.split(options.multipleSeparator);var result=[];$.each(words,function(i,value){if($.trim(value))result[i]=$.trim(value);});return result;}function lastWord(value){if(!options.multiple)return value;var words=trimWords(value);return words[words.length-1];}function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$.Autocompleter.Selection(input,previousValue.length,previousValue.length+sValue.length);}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""));}else +$input.val("");}});}if(wasVisible)$.Autocompleter.Selection(input,input.value.length,input.value.length);};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show();}else{hideResultsNow();}};function request(term,success,failure){if(!options.matchCase)term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data);}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param;});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed);}});}else{select.emptyList();failure(term);}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"$1");},scroll:true,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)s=s.toLowerCase();var i=s.indexOf(sub);if(i==-1)return false;return i==0||options.matchContains;};function add(q,value){if(length>options.cacheLength){flush();}if(!data[q]){length++;}data[q]=value;}function populate(){if(!options.data)return false;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x);}});}}return csub;}else +if(data[q]){return data[q];}else +if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x;}});return csub;}}}return null;}};};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit)return;element=$("
").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("
    ").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function(){config.mouseDownOnSelect=true;}).mouseup(function(){config.mouseDownOnSelect=false;});if(options.width>0)element.css("width",options.width);needsInit=false;}function target(event){var element=event.target;while(element&&element.tagName!="LI")element=element.parentNode;if(!element)return[];return element;}function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight;});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else if(offset=listItems.size()){active=0;}}function limitNumberOfItems(available){return options.max&&options.max").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i]);}listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0;}if($.fn.bgiframe)list.bgiframe();}return{display:function(d,q){init();data=d;term=q;fillList();},next:function(){moveSelect(1);},prev:function(){moveSelect(-1);},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active);}else{moveSelect(-8);}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active);}else{moveSelect(8);}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1;},visible:function(){return element&&element.is(":visible");},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.scrollTop(0);list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight;});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data");},emptyList:function(){list&&list.empty();},unbind:function(){element&&element.remove();}};};$.Autocompleter.Selection=function(field,start,end){if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}else if(field.setSelectionRange){field.setSelectionRange(start,end);}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end;}}field.focus();};})(jQuery); +/* + * TypeWatch 2.0 - Original by Denny Ferrassoli / Refactored by Charles Christolini + * Copyright(c) 2007 Denny Ferrassoli - DennyDotNet.com + * Coprright(c) 2008 Charles Christolini - BinaryPie.com + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html +*/(function(jQuery){jQuery.fn.typeWatch=function(o){var options=jQuery.extend({wait:750,callback:function(){},highlight:true,captureLength:2},o);function checkElement(timer,override){var elTxt=jQuery(timer.el).val();if((elTxt.length>options.captureLength&&elTxt.toUpperCase()!=timer.text)||(override&&elTxt.length>options.captureLength)){timer.text=elTxt.toUpperCase();timer.cb(elTxt)}};function watchElement(elem){if(elem.type.toUpperCase()=="TEXT"||elem.nodeName.toUpperCase()=="TEXTAREA"){var timer={timer:null,text:jQuery(elem).val().toUpperCase(),cb:options.callback,el:elem,wait:options.wait};if(options.highlight){jQuery(elem).focus(function(){this.select()})}var startWatch=function(evt){var timerWait=timer.wait;var overrideBool=false;if(evt.keyCode==13&&this.type.toUpperCase()=="TEXT"){timerWait=1;overrideBool=true}var timerCallbackFx=function(){checkElement(timer,overrideBool)};clearTimeout(timer.timer);timer.timer=setTimeout(timerCallbackFx,timerWait)};jQuery(elem).keydown(startWatch)}};return this.each(function(index){watchElement(this)})}})(jQuery); +/* +Ajax upload +*/jQuery.extend({createUploadIframe:function(d,b){var a="jUploadFrame"+d;if(window.ActiveXObject){var c=document.createElement('