Permalink
Browse files

first commit

  • Loading branch information...
pstadler committed Aug 4, 2011
0 parents commit 6e6f84ed5c8a8f0e6855456ba2aa85c5e5f643ed
Showing with 31,598 additions and 0 deletions.
  1. +4 −0 .gitignore
  2. +12 −0 .gitmodules
  3. +8 −0 CREDITS.md
  4. +7 −0 LICENSE
  5. +101 −0 Makefile
  6. +14 −0 README.md
  7. +4,131 −0 candy.bundle.js
  8. +1 −0 candy.min.js
  9. +4 −0 example/htaccess
  10. +26 −0 example/index.html
  11. +127 −0 libs/dateformat/dateFormat.js
  12. +22,445 −0 libs/libs.bundle.js
  13. +1 −0 libs/libs.min.js
  14. BIN res/audioplayer.swf
  15. +581 −0 res/default.css
  16. BIN res/img/action/autoscroll-off.png
  17. BIN res/img/action/autoscroll-on.png
  18. BIN res/img/action/ban.png
  19. BIN res/img/action/emoticons.png
  20. BIN res/img/action/ignore.png
  21. BIN res/img/action/kick.png
  22. BIN res/img/action/menu.png
  23. BIN res/img/action/private.png
  24. BIN res/img/action/settings.png
  25. BIN res/img/action/sound-off.png
  26. BIN res/img/action/sound-on.png
  27. BIN res/img/action/statusmessage-off.png
  28. BIN res/img/action/statusmessage-on.png
  29. BIN res/img/action/subject.png
  30. BIN res/img/action/unignore.png
  31. BIN res/img/action/usercount.png
  32. BIN res/img/context-arrows.gif
  33. BIN res/img/emoticons/Angel.png
  34. BIN res/img/emoticons/Angry.png
  35. BIN res/img/emoticons/Aww.png
  36. BIN res/img/emoticons/Aww_2.png
  37. BIN res/img/emoticons/Blushing.png
  38. BIN res/img/emoticons/Childish.png
  39. BIN res/img/emoticons/Confused.png
  40. BIN res/img/emoticons/Creepy.png
  41. BIN res/img/emoticons/Crying.png
  42. BIN res/img/emoticons/Cthulhu.png
  43. BIN res/img/emoticons/Cute.png
  44. BIN res/img/emoticons/Cute_Winking.png
  45. BIN res/img/emoticons/Devil.png
  46. BIN res/img/emoticons/Gah.png
  47. BIN res/img/emoticons/Gah_2.png
  48. BIN res/img/emoticons/Gasping.png
  49. BIN res/img/emoticons/Greedy.png
  50. BIN res/img/emoticons/Grinning.png
  51. BIN res/img/emoticons/Grinning_Winking.png
  52. BIN res/img/emoticons/Happy.png
  53. BIN res/img/emoticons/Happy_2.png
  54. BIN res/img/emoticons/Happy_3.png
  55. BIN res/img/emoticons/Heart.png
  56. BIN res/img/emoticons/Huh.png
  57. BIN res/img/emoticons/Huh_2.png
  58. BIN res/img/emoticons/Laughing.png
  59. BIN res/img/emoticons/Lips_Sealed.png
  60. BIN res/img/emoticons/Madness.png
  61. BIN res/img/emoticons/Malicious.png
  62. +2 −0 res/img/emoticons/README
  63. BIN res/img/emoticons/Sick.png
  64. BIN res/img/emoticons/Smiling.png
  65. BIN res/img/emoticons/Speechless.png
  66. BIN res/img/emoticons/Spiteful.png
  67. BIN res/img/emoticons/Stupid.png
  68. BIN res/img/emoticons/Sunglasses.png
  69. BIN res/img/emoticons/Terrified.png
  70. BIN res/img/emoticons/Thumb_Down.png
  71. BIN res/img/emoticons/Thumb_Up.png
  72. BIN res/img/emoticons/Tired.png
  73. BIN res/img/emoticons/Tongue_Out.png
  74. BIN res/img/emoticons/Tongue_Out_Laughing.png
  75. BIN res/img/emoticons/Tongue_Out_Left.png
  76. BIN res/img/emoticons/Tongue_Out_Up.png
  77. BIN res/img/emoticons/Tongue_Out_Up_Left.png
  78. BIN res/img/emoticons/Tongue_Out_Winking.png
  79. BIN res/img/emoticons/Uncertain.png
  80. BIN res/img/emoticons/Uncertain_2.png
  81. BIN res/img/emoticons/Unhappy.png
  82. BIN res/img/emoticons/Winking.png
  83. BIN res/img/favicon.png
  84. BIN res/img/modal-bg.png
  85. BIN res/img/modal-spinner.gif
  86. BIN res/img/overlay.png
  87. BIN res/img/roster/affiliation-owner.png
  88. BIN res/img/roster/ignore.png
  89. BIN res/img/roster/role-moderator.png
  90. BIN res/img/tab-transitions.png
  91. BIN res/img/tooltip-arrows.gif
  92. BIN res/notify.mp3
  93. +52 −0 src/candy.js
  94. +296 −0 src/core.js
  95. +253 −0 src/core/action.js
  96. +106 −0 src/core/chatRoom.js
  97. +63 −0 src/core/chatRoster.js
  98. +169 −0 src/core/chatUser.js
  99. +393 −0 src/core/event.js
  100. +481 −0 src/util.js
  101. +159 −0 src/view.js
  102. +195 −0 src/view/event.js
  103. +193 −0 src/view/observer.js
  104. +1,528 −0 src/view/pane.js
  105. +67 −0 src/view/template.js
  106. +179 −0 src/view/translation.js
@@ -0,0 +1,4 @@
+.DS_Store
+._*
+.ndproj
+docs
@@ -0,0 +1,12 @@
+[submodule "libs/jquery-i18n"]
+ path = libs/jquery-i18n
+ url = git://github.com/recurser/jquery-i18n.git
+[submodule "libs/strophejs"]
+ path = libs/strophejs
+ url = git@github.com:amiadogroup/strophejs.git
+[submodule "libs/strophejs-plugins"]
+ path = libs/strophejs-plugins
+ url = git://github.com/metajack/strophejs-plugins.git
+[submodule "libs/mustache.js"]
+ path = libs/mustache.js
+ url = git://github.com/janl/mustache.js.git
@@ -0,0 +1,8 @@
+Credits
+=======
+- [famfamfam silk icons](http://www.famfamfam.com/lab/icons/silk/) is a smooth, free icon set, containing over 700 16-by-16 pixel icons.
+- [Simple Smileys](http://simplesmileys.org) are beautifully simple emoticons.
+- [Flash MP3 Player](http://flash-mp3-player.net/players/js) is a very simple flash audio player used by Candy for audio notifications.
+- [Colin Snover](http://zetafleet.com/blog/javascript-dateparse-for-iso-8601) provides a fix for browsers not supporting latest Date.parse().
+- [Ben Cherry](http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth) wrote a great article about the JS module pattern.
+- [Amiado Group](http://www.amiadogroup.com) allowed us to make Candy freely available for everyone! :)
@@ -0,0 +1,7 @@
+Copyright (c) 2011 Amiado Group AG
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
101 Makefile
@@ -0,0 +1,101 @@
+#
+# Makefile for Candy
+# Candy - Chats are not dead yet
+#
+# Copyright:
+# (c) 2011 Amiado Group AG
+#
+# Authors:
+# - Patrick Stadler <patrick.stadler@amiadogroup.com>
+# - Michael Weibel <michael.weibel@amiadogroup.com>
+#
+
+SHELL=/bin/bash
+
+DOC_DIR = docs
+NDPROJ_DIR = .ndproj
+SRC_DIR = src
+LIBS_DIR = libs
+
+CANDY_BUNDLE = candy.bundle.js
+CANDY_BUNDLE_MIN = candy.min.js
+CANDY_BUNDLE_LIBRARIES = libs/libs.bundle.js
+CANDY_BUNDLE_LIBRARIES_MIN = libs/libs.min.js
+CANDY_FILES = $(SRC_DIR)/candy.js $(SRC_DIR)/core.js $(SRC_DIR)/view.js $(SRC_DIR)/util.js $(SRC_DIR)/core/action.js $(SRC_DIR)/core/chatRoom.js $(SRC_DIR)/core/chatRoster.js $(SRC_DIR)/core/chatUser.js $(SRC_DIR)/core/event.js $(SRC_DIR)/view/event.js $(SRC_DIR)/view/observer.js $(SRC_DIR)/view/pane.js $(SRC_DIR)/view/template.js $(SRC_DIR)/view/translation.js
+CANDY_LIBS_FILES = $(LIBS_DIR)/strophejs/strophe.js $(LIBS_DIR)/strophejs-plugins/muc/strophe.muc.js $(LIBS_DIR)/mustache.js/mustache.js $(LIBS_DIR)/jquery-i18n/jquery.i18n.js $(LIBS_DIR)/dateformat/dateFormat.js
+CANDY_FILES_BUNDLE = $(CANDY_FILES:.js=.bundle)
+CANDY_LIBS_FILES_BUNDLE = $(CANDY_LIBS_FILES:.js=.libs-bundle)
+
+all: clean-bundle bundle min
+
+bundle: $(CANDY_FILES_BUNDLE)
+
+%.bundle: %.js
+ @@echo -n "Bundling" $< "..."
+ @@cat $< >> $(CANDY_BUNDLE)
+ @@echo "done"
+
+min: $(CANDY_BUNDLE)
+ @@echo -n "Compressing" $(CANDY_BUNDLE) "..."
+ifdef YUI_COMPRESSOR
+ @@java -jar $(YUI_COMPRESSOR) --type js $(CANDY_BUNDLE) -o $(CANDY_BUNDLE_MIN) --charset utf-8
+ @@echo "done ("$(CANDY_BUNDLE_MIN)")"
+else
+ @@echo "aborted"
+ @@echo "** You can safely use the uncompressed bundle ("$(CANDY_BUNDLE)")"
+ @@echo "** YUI Compressor is required to build the minified version."
+ @@echo "** Please set YUI_COMPRESSOR to the path to the jar file."
+endif
+
+libs: $(CANDY_LIBS_FILES_BUNDLE) libs-min
+
+%.libs-bundle: %.js
+ @@echo -n "Bundling" $< "..."
+ @@cat $< >> $(CANDY_BUNDLE_LIBRARIES)
+ @@echo "done"
+
+libs-min: $(CANDY_BUNDLE_LIBRARIES)
+ @@echo -n "Compressing" $(CANDY_BUNDLE_LIBRARIES) "..."
+ifdef YUI_COMPRESSOR
+ @@java -jar $(YUI_COMPRESSOR) --type js $(CANDY_BUNDLE_LIBRARIES) -o $(CANDY_BUNDLE_LIBRARIES_MIN) --charset utf-8
+ @@echo "done ("$(CANDY_BUNDLE_LIBRARIES_MIN)")"
+else
+ @@echo "aborted"
+ @@echo "** You can safely use the uncompressed bundle ("$(CANDY_BUNDLE_LIBRARIES)")"
+ @@echo "** YUI Compressor is required to build the minified version."
+ @@echo "** Please set YUI_COMPRESSOR to the path to the jar file."
+endif
+
+docs:
+ @@echo "Building candy documentation ..."
+ifdef NATURALDOCS_DIR
+ @@if [ ! -d $(NDPROJ_DIR) ]; then mkdir $(NDPROJ_DIR); fi
+ @@if [ ! -d $(DOC_DIR) ]; then mkdir $(DOC_DIR); fi
+ @@$(NATURALDOCS_DIR)/NaturalDocs -q --exclude-source libs --exclude-source res --exclude-source candy.min.js --exclude-source candy.bundle.js -i . -o html $(DOC_DIR) -p $(NDPROJ_DIR)
+ @@rm -r $(NDPROJ_DIR)
+ @@echo "Documentation built."
+ @@echo
+else
+ @@echo "aborted"
+ @@echo "** NaturalDocs is required to build the documentation."
+ @@echo "** Please set NATURALDOCS_DIR to the path to the NaturalDocs executable"
+endif
+
+clean: clean-bundle clean-libs
+
+clean-bundle:
+ @@echo -n "Cleaning bundles ..."
+ @@rm -f $(CANDY_BUNDLE) $(CANDY_BUNDLE_MIN)
+ @@echo "done"
+
+clean-libs:
+ @@echo -n "Cleaning library bundles ..."
+ @@rm -f $(CANDY_BUNDLE_LIBRARIES) $(CANDY_BUNDLE_LIBRARIES_MIN)
+ @@echo "done"
+
+clean-docs:
+ @@echo -n "Cleaning documentation ..."
+ @@rm -rf $(NDPROJ_DIR) $(DOC_DIR)
+ @@echo "done"
+
+.PHONY: all docs clean libs
@@ -0,0 +1,14 @@
+Candy — a JavaScript-based multi-user chat client
+==================================================
+
+Visit the official project page: http://amiadogroup.github.com/candy
+
+Features
+--------
+- Focused on real-time multi-user chatting
+- Easy to configure, easy to run, easy to use
+- Highly customizable
+- 100% well-documented JavaScript source code
+- Built for Jabber (XMPP), using famous technologies
+- Used and approved in a productive environment with up to 400 concurrent users
+- Works with all major web browsers including IE7
Oops, something went wrong.

0 comments on commit 6e6f84e

Please sign in to comment.