gluttonberg-core 2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (704) hide show
  1. data/README +107 -0
  2. data/Rakefile +21 -0
  3. data/app/assets/images/arrow.png +0 -0
  4. data/app/assets/images/bg.png +0 -0
  5. data/app/assets/images/button_bkg_grey.gif +0 -0
  6. data/app/assets/images/content/blogs.png +0 -0
  7. data/app/assets/images/content/pages.png +0 -0
  8. data/app/assets/images/drag_handle.png +0 -0
  9. data/app/assets/images/form/field_bg.jpg +0 -0
  10. data/app/assets/images/form/field_bg_active.jpg +0 -0
  11. data/app/assets/images/form/input_bkg.gif +0 -0
  12. data/app/assets/images/form/input_bkg.jpg +0 -0
  13. data/app/assets/images/form/login_bg.png +0 -0
  14. data/app/assets/images/form/login_form_bg.jpg +0 -0
  15. data/app/assets/images/form/plus_and_minus.gif +0 -0
  16. data/app/assets/images/form/warning.gif +0 -0
  17. data/app/assets/images/gb_logo.png +0 -0
  18. data/app/assets/images/gb_logo_top.png +0 -0
  19. data/app/assets/images/gb_wysiwyg.png +0 -0
  20. data/app/assets/images/help/help.jpg +0 -0
  21. data/app/assets/images/icon_add.png +0 -0
  22. data/app/assets/images/icon_asset.png +0 -0
  23. data/app/assets/images/icon_blog.png +0 -0
  24. data/app/assets/images/icon_collection.png +0 -0
  25. data/app/assets/images/icon_content.png +0 -0
  26. data/app/assets/images/icon_content_2.png +0 -0
  27. data/app/assets/images/icon_dash.png +0 -0
  28. data/app/assets/images/icon_dashboard.png +0 -0
  29. data/app/assets/images/icon_default.png +0 -0
  30. data/app/assets/images/icon_group.png +0 -0
  31. data/app/assets/images/icon_library.png +0 -0
  32. data/app/assets/images/icon_library_2.png +0 -0
  33. data/app/assets/images/icon_member.png +0 -0
  34. data/app/assets/images/icon_members.png +0 -0
  35. data/app/assets/images/icon_pages.png +0 -0
  36. data/app/assets/images/icon_settings.png +0 -0
  37. data/app/assets/images/icon_upload.png +0 -0
  38. data/app/assets/images/icons/collapsed.png +0 -0
  39. data/app/assets/images/icons/cross.png +0 -0
  40. data/app/assets/images/icons/expanded.png +0 -0
  41. data/app/assets/images/icons/folder.png +0 -0
  42. data/app/assets/images/icons/symbol-add.png +0 -0
  43. data/app/assets/images/library/all.png +0 -0
  44. data/app/assets/images/library/audio.png +0 -0
  45. data/app/assets/images/library/back.gif +0 -0
  46. data/app/assets/images/library/dialog_overlay.png +0 -0
  47. data/app/assets/images/library/gb_wysiwyg_pic.png +0 -0
  48. data/app/assets/images/library/icon_document.jpg +0 -0
  49. data/app/assets/images/library/image.png +0 -0
  50. data/app/assets/images/library/inactive_tab.jpg +0 -0
  51. data/app/assets/images/library/other.png +0 -0
  52. data/app/assets/images/library/search_icon.gif +0 -0
  53. data/app/assets/images/library/sort_by_asc.png +0 -0
  54. data/app/assets/images/library/sort_by_desc.png +0 -0
  55. data/app/assets/images/library/video.png +0 -0
  56. data/app/assets/images/page_content_fillin.gif +0 -0
  57. data/app/assets/images/paginator.gif +0 -0
  58. data/app/assets/images/row_divider.jpg +0 -0
  59. data/app/assets/images/settings/config.png +0 -0
  60. data/app/assets/images/settings/locale.jpg +0 -0
  61. data/app/assets/images/settings/stylesheet.gif +0 -0
  62. data/app/assets/images/settings/users.png +0 -0
  63. data/app/assets/images/sidebar/icon_content.png +0 -0
  64. data/app/assets/images/sidebar/icon_dashboard.png +0 -0
  65. data/app/assets/images/sidebar/icon_feedback.png +0 -0
  66. data/app/assets/images/sidebar/icon_library.png +0 -0
  67. data/app/assets/images/sidebar/icon_settings.png +0 -0
  68. data/app/assets/images/sidebar/menu_active.jpg +0 -0
  69. data/app/assets/images/sidebar/menu_expanded_bg.jpg +0 -0
  70. data/app/assets/images/sidebar/menu_off.jpg +0 -0
  71. data/app/assets/images/sidebar/menu_over.jpg +0 -0
  72. data/app/assets/images/sidebar/nav_closed.png +0 -0
  73. data/app/assets/images/sidebar/nav_open.png +0 -0
  74. data/app/assets/images/spinner.gif +0 -0
  75. data/app/assets/images/spinner_for_dialouge.gif +0 -0
  76. data/app/assets/images/sub_nav_back_bkg.gif +0 -0
  77. data/app/assets/images/subnav_bkg.gif +0 -0
  78. data/app/assets/images/table_head_bkg.gif +0 -0
  79. data/app/assets/images/wrapper_bkg.png +0 -0
  80. data/app/assets/javascripts/ajaxfileupload.js +205 -0
  81. data/app/assets/javascripts/bootstrap-datepicker.js +501 -0
  82. data/app/assets/javascripts/bootstrap.js +2027 -0
  83. data/app/assets/javascripts/bootstrap.min.js +1 -0
  84. data/app/assets/javascripts/expander.js +81 -0
  85. data/app/assets/javascripts/gb_application.js +828 -0
  86. data/app/assets/javascripts/gb_login.js +33 -0
  87. data/app/assets/javascripts/gb_tags.js +177 -0
  88. data/app/assets/javascripts/jcrop/MIT-LICENSE.txt +22 -0
  89. data/app/assets/javascripts/jcrop/build/LICENSE +7 -0
  90. data/app/assets/javascripts/jcrop/build/README +11 -0
  91. data/app/assets/javascripts/jcrop/build/minimize.bash +10 -0
  92. data/app/assets/javascripts/jcrop/build/pre-commit.bash +11 -0
  93. data/app/assets/javascripts/jcrop/css/Jcrop.gif +0 -0
  94. data/app/assets/javascripts/jcrop/css/jquery-Jcrop.css +35 -0
  95. data/app/assets/javascripts/jcrop/demos/crop.php +106 -0
  96. data/app/assets/javascripts/jcrop/demos/demo_files/demos.css +36 -0
  97. data/app/assets/javascripts/jcrop/demos/demo_files/flowers.jpg +0 -0
  98. data/app/assets/javascripts/jcrop/demos/demo_files/sago.jpg +0 -0
  99. data/app/assets/javascripts/jcrop/demos/demo_files/sagomod.jpg +0 -0
  100. data/app/assets/javascripts/jcrop/demos/demo_files/sagomod.png +0 -0
  101. data/app/assets/javascripts/jcrop/demos/tutorial1.html +47 -0
  102. data/app/assets/javascripts/jcrop/demos/tutorial2.html +94 -0
  103. data/app/assets/javascripts/jcrop/demos/tutorial3.html +94 -0
  104. data/app/assets/javascripts/jcrop/demos/tutorial4.html +154 -0
  105. data/app/assets/javascripts/jcrop/demos/tutorial5.html +240 -0
  106. data/app/assets/javascripts/jcrop/index.html +63 -0
  107. data/app/assets/javascripts/jcrop/js/jquery-Jcrop-min.js +246 -0
  108. data/app/assets/javascripts/jcrop/js/jquery.Jcrop.js +1605 -0
  109. data/app/assets/javascripts/jcrop/js/jquery.color.js +123 -0
  110. data/app/assets/javascripts/jcrop/js/jquery.min.js +18 -0
  111. data/app/assets/javascripts/jeditable.js +371 -0
  112. data/app/assets/javascripts/jquery-1-4-2-min.js +154 -0
  113. data/app/assets/javascripts/jquery-1-7-1.js +9267 -0
  114. data/app/assets/javascripts/jquery-dimensions-min.js +12 -0
  115. data/app/assets/javascripts/jquery-dragTree.js +525 -0
  116. data/app/assets/javascripts/jquery-tagarea.js +404 -0
  117. data/app/assets/javascripts/jquery-ui-1-8-1-custom-min.js +756 -0
  118. data/app/assets/javascripts/jquery-ui-1-8-18-custom-min.js +356 -0
  119. data/app/assets/javascripts/jquery-ui-1-8-18-custom2-min.js +266 -0
  120. data/app/assets/javascripts/jquery-ui-1-8-23-custom-min.js +85 -0
  121. data/app/assets/javascripts/jquery-ui-datetimepicker-min.js +1060 -0
  122. data/app/assets/javascripts/jquery-validate.js +1297 -0
  123. data/app/assets/javascripts/rails.js +127 -0
  124. data/app/assets/javascripts/tiny_mce/jquery.tinymce.js +1 -0
  125. data/app/assets/javascripts/tiny_mce/langs/en.js +223 -0
  126. data/app/assets/javascripts/tiny_mce/license.txt +504 -0
  127. data/app/assets/javascripts/tiny_mce/plugins/advhr/css/advhr.css +5 -0
  128. data/app/assets/javascripts/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
  129. data/app/assets/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js +57 -0
  130. data/app/assets/javascripts/tiny_mce/plugins/advhr/js/rule.js +43 -0
  131. data/app/assets/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js +7 -0
  132. data/app/assets/javascripts/tiny_mce/plugins/advhr/rule.htm +58 -0
  133. data/app/assets/javascripts/tiny_mce/plugins/advimage/css/advimage.css +13 -0
  134. data/app/assets/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
  135. data/app/assets/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +50 -0
  136. data/app/assets/javascripts/tiny_mce/plugins/advimage/image.htm +235 -0
  137. data/app/assets/javascripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
  138. data/app/assets/javascripts/tiny_mce/plugins/advimage/js/image.js +458 -0
  139. data/app/assets/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +45 -0
  140. data/app/assets/javascripts/tiny_mce/plugins/advlink/css/advlink.css +8 -0
  141. data/app/assets/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +61 -0
  142. data/app/assets/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +61 -0
  143. data/app/assets/javascripts/tiny_mce/plugins/advlink/js/advlink.js +564 -0
  144. data/app/assets/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +54 -0
  145. data/app/assets/javascripts/tiny_mce/plugins/advlink/link.htm +355 -0
  146. data/app/assets/javascripts/tiny_mce/plugins/advlist/editor_plugin.js +1 -0
  147. data/app/assets/javascripts/tiny_mce/plugins/advlist/editor_plugin_src.js +161 -0
  148. data/app/assets/javascripts/tiny_mce/plugins/autolink/editor_plugin.js +1 -0
  149. data/app/assets/javascripts/tiny_mce/plugins/autolink/editor_plugin_src.js +172 -0
  150. data/app/assets/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js +1 -0
  151. data/app/assets/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +137 -0
  152. data/app/assets/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
  153. data/app/assets/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +431 -0
  154. data/app/assets/javascripts/tiny_mce/plugins/autosave/langs/en.js +4 -0
  155. data/app/assets/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
  156. data/app/assets/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +120 -0
  157. data/app/assets/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
  158. data/app/assets/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +160 -0
  159. data/app/assets/javascripts/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
  160. data/app/assets/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js +82 -0
  161. data/app/assets/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
  162. data/app/assets/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +43 -0
  163. data/app/assets/javascripts/tiny_mce/plugins/emotions/emotions.htm +41 -0
  164. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
  165. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
  166. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  167. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  168. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
  169. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
  170. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
  171. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
  172. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  173. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
  174. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
  175. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
  176. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  177. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
  178. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
  179. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
  180. data/app/assets/javascripts/tiny_mce/plugins/emotions/js/emotions.js +22 -0
  181. data/app/assets/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +20 -0
  182. data/app/assets/javascripts/tiny_mce/plugins/example/dialog.htm +22 -0
  183. data/app/assets/javascripts/tiny_mce/plugins/example/editor_plugin.js +1 -0
  184. data/app/assets/javascripts/tiny_mce/plugins/example/editor_plugin_src.js +84 -0
  185. data/app/assets/javascripts/tiny_mce/plugins/example/img/example.gif +0 -0
  186. data/app/assets/javascripts/tiny_mce/plugins/example/js/dialog.js +19 -0
  187. data/app/assets/javascripts/tiny_mce/plugins/example/langs/en.js +3 -0
  188. data/app/assets/javascripts/tiny_mce/plugins/example/langs/en_dlg.js +3 -0
  189. data/app/assets/javascripts/tiny_mce/plugins/example_dependency/editor_plugin.js +1 -0
  190. data/app/assets/javascripts/tiny_mce/plugins/example_dependency/editor_plugin_src.js +50 -0
  191. data/app/assets/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css +143 -0
  192. data/app/assets/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
  193. data/app/assets/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +399 -0
  194. data/app/assets/javascripts/tiny_mce/plugins/fullpage/fullpage.htm +259 -0
  195. data/app/assets/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js +232 -0
  196. data/app/assets/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +85 -0
  197. data/app/assets/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
  198. data/app/assets/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +159 -0
  199. data/app/assets/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm +109 -0
  200. data/app/assets/javascripts/tiny_mce/plugins/gb_assets/editor_plugin.js +47 -0
  201. data/app/assets/javascripts/tiny_mce/plugins/gb_assets/editor_plugin_src.js +43 -0
  202. data/app/assets/javascripts/tiny_mce/plugins/gb_assets/emotions.htm +41 -0
  203. data/app/assets/javascripts/tiny_mce/plugins/gb_assets/js/emotions.js +22 -0
  204. data/app/assets/javascripts/tiny_mce/plugins/gb_assets/langs/en_dlg.js +20 -0
  205. data/app/assets/javascripts/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
  206. data/app/assets/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js +54 -0
  207. data/app/assets/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
  208. data/app/assets/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +696 -0
  209. data/app/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  210. data/app/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  211. data/app/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  212. data/app/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  213. data/app/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  214. data/app/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  215. data/app/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  216. data/app/assets/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
  217. data/app/assets/javascripts/tiny_mce/plugins/inlinepopups/template.htm +387 -0
  218. data/app/assets/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
  219. data/app/assets/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +83 -0
  220. data/app/assets/javascripts/tiny_mce/plugins/layer/editor_plugin.js +1 -0
  221. data/app/assets/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js +214 -0
  222. data/app/assets/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -0
  223. data/app/assets/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +139 -0
  224. data/app/assets/javascripts/tiny_mce/plugins/lists/editor_plugin.js +1 -0
  225. data/app/assets/javascripts/tiny_mce/plugins/lists/editor_plugin_src.js +688 -0
  226. data/app/assets/javascripts/tiny_mce/plugins/media/css/media.css +17 -0
  227. data/app/assets/javascripts/tiny_mce/plugins/media/editor_plugin.js +1 -0
  228. data/app/assets/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +777 -0
  229. data/app/assets/javascripts/tiny_mce/plugins/media/js/embed.js +73 -0
  230. data/app/assets/javascripts/tiny_mce/plugins/media/js/media.js +355 -0
  231. data/app/assets/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +109 -0
  232. data/app/assets/javascripts/tiny_mce/plugins/media/media.htm +812 -0
  233. data/app/assets/javascripts/tiny_mce/plugins/media/moxieplayer.swf +0 -0
  234. data/app/assets/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
  235. data/app/assets/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +53 -0
  236. data/app/assets/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
  237. data/app/assets/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +92 -0
  238. data/app/assets/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -0
  239. data/app/assets/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +74 -0
  240. data/app/assets/javascripts/tiny_mce/plugins/paste/editor_plugin.js +1 -0
  241. data/app/assets/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +941 -0
  242. data/app/assets/javascripts/tiny_mce/plugins/paste/js/pastetext.js +36 -0
  243. data/app/assets/javascripts/tiny_mce/plugins/paste/js/pasteword.js +51 -0
  244. data/app/assets/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js +5 -0
  245. data/app/assets/javascripts/tiny_mce/plugins/paste/pastetext.htm +27 -0
  246. data/app/assets/javascripts/tiny_mce/plugins/paste/pasteword.htm +21 -0
  247. data/app/assets/javascripts/tiny_mce/plugins/preview/editor_plugin.js +1 -0
  248. data/app/assets/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js +53 -0
  249. data/app/assets/javascripts/tiny_mce/plugins/preview/example.html +28 -0
  250. data/app/assets/javascripts/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
  251. data/app/assets/javascripts/tiny_mce/plugins/preview/preview.html +18 -0
  252. data/app/assets/javascripts/tiny_mce/plugins/print/editor_plugin.js +1 -0
  253. data/app/assets/javascripts/tiny_mce/plugins/print/editor_plugin_src.js +34 -0
  254. data/app/assets/javascripts/tiny_mce/plugins/save/editor_plugin.js +1 -0
  255. data/app/assets/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +101 -0
  256. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -0
  257. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
  258. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +61 -0
  259. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +142 -0
  260. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +16 -0
  261. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm +100 -0
  262. data/app/assets/javascripts/tiny_mce/plugins/spellchecker/css/content.css +1 -0
  263. data/app/assets/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
  264. data/app/assets/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +434 -0
  265. data/app/assets/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
  266. data/app/assets/javascripts/tiny_mce/plugins/style/css/props.css +13 -0
  267. data/app/assets/javascripts/tiny_mce/plugins/style/editor_plugin.js +1 -0
  268. data/app/assets/javascripts/tiny_mce/plugins/style/editor_plugin_src.js +55 -0
  269. data/app/assets/javascripts/tiny_mce/plugins/style/js/props.js +635 -0
  270. data/app/assets/javascripts/tiny_mce/plugins/style/langs/en_dlg.js +70 -0
  271. data/app/assets/javascripts/tiny_mce/plugins/style/props.htm +838 -0
  272. data/app/assets/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
  273. data/app/assets/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +114 -0
  274. data/app/assets/javascripts/tiny_mce/plugins/table/cell.htm +180 -0
  275. data/app/assets/javascripts/tiny_mce/plugins/table/css/cell.css +17 -0
  276. data/app/assets/javascripts/tiny_mce/plugins/table/css/row.css +25 -0
  277. data/app/assets/javascripts/tiny_mce/plugins/table/css/table.css +13 -0
  278. data/app/assets/javascripts/tiny_mce/plugins/table/editor_plugin.js +1 -0
  279. data/app/assets/javascripts/tiny_mce/plugins/table/editor_plugin_src.js +1209 -0
  280. data/app/assets/javascripts/tiny_mce/plugins/table/js/cell.js +319 -0
  281. data/app/assets/javascripts/tiny_mce/plugins/table/js/merge_cells.js +27 -0
  282. data/app/assets/javascripts/tiny_mce/plugins/table/js/row.js +237 -0
  283. data/app/assets/javascripts/tiny_mce/plugins/table/js/table.js +450 -0
  284. data/app/assets/javascripts/tiny_mce/plugins/table/langs/en_dlg.js +75 -0
  285. data/app/assets/javascripts/tiny_mce/plugins/table/merge_cells.htm +32 -0
  286. data/app/assets/javascripts/tiny_mce/plugins/table/row.htm +158 -0
  287. data/app/assets/javascripts/tiny_mce/plugins/table/table.htm +188 -0
  288. data/app/assets/javascripts/tiny_mce/plugins/template/blank.htm +12 -0
  289. data/app/assets/javascripts/tiny_mce/plugins/template/css/template.css +23 -0
  290. data/app/assets/javascripts/tiny_mce/plugins/template/editor_plugin.js +1 -0
  291. data/app/assets/javascripts/tiny_mce/plugins/template/editor_plugin_src.js +159 -0
  292. data/app/assets/javascripts/tiny_mce/plugins/template/js/template.js +106 -0
  293. data/app/assets/javascripts/tiny_mce/plugins/template/langs/en_dlg.js +15 -0
  294. data/app/assets/javascripts/tiny_mce/plugins/template/template.htm +31 -0
  295. data/app/assets/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js +1 -0
  296. data/app/assets/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +83 -0
  297. data/app/assets/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
  298. data/app/assets/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +114 -0
  299. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +142 -0
  300. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +142 -0
  301. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +149 -0
  302. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm +142 -0
  303. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -0
  304. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +9 -0
  305. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm +162 -0
  306. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -0
  307. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +132 -0
  308. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm +162 -0
  309. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +28 -0
  310. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +28 -0
  311. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +111 -0
  312. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +28 -0
  313. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js +53 -0
  314. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +229 -0
  315. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +53 -0
  316. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +32 -0
  317. data/app/assets/javascripts/tiny_mce/themes/advanced/about.htm +52 -0
  318. data/app/assets/javascripts/tiny_mce/themes/advanced/anchor.htm +26 -0
  319. data/app/assets/javascripts/tiny_mce/themes/advanced/charmap.htm +51 -0
  320. data/app/assets/javascripts/tiny_mce/themes/advanced/color_picker.htm +74 -0
  321. data/app/assets/javascripts/tiny_mce/themes/advanced/editor_template.js +1 -0
  322. data/app/assets/javascripts/tiny_mce/themes/advanced/editor_template_src.js +1358 -0
  323. data/app/assets/javascripts/tiny_mce/themes/advanced/image.htm +80 -0
  324. data/app/assets/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
  325. data/app/assets/javascripts/tiny_mce/themes/advanced/img/flash.gif +0 -0
  326. data/app/assets/javascripts/tiny_mce/themes/advanced/img/icons.gif +0 -0
  327. data/app/assets/javascripts/tiny_mce/themes/advanced/img/iframe.gif +0 -0
  328. data/app/assets/javascripts/tiny_mce/themes/advanced/img/pagebreak.gif +0 -0
  329. data/app/assets/javascripts/tiny_mce/themes/advanced/img/quicktime.gif +0 -0
  330. data/app/assets/javascripts/tiny_mce/themes/advanced/img/realmedia.gif +0 -0
  331. data/app/assets/javascripts/tiny_mce/themes/advanced/img/shockwave.gif +0 -0
  332. data/app/assets/javascripts/tiny_mce/themes/advanced/img/trans.gif +0 -0
  333. data/app/assets/javascripts/tiny_mce/themes/advanced/img/video.gif +0 -0
  334. data/app/assets/javascripts/tiny_mce/themes/advanced/img/windowsmedia.gif +0 -0
  335. data/app/assets/javascripts/tiny_mce/themes/advanced/js/about.js +73 -0
  336. data/app/assets/javascripts/tiny_mce/themes/advanced/js/anchor.js +42 -0
  337. data/app/assets/javascripts/tiny_mce/themes/advanced/js/charmap.js +355 -0
  338. data/app/assets/javascripts/tiny_mce/themes/advanced/js/color_picker.js +329 -0
  339. data/app/assets/javascripts/tiny_mce/themes/advanced/js/image.js +247 -0
  340. data/app/assets/javascripts/tiny_mce/themes/advanced/js/link.js +153 -0
  341. data/app/assets/javascripts/tiny_mce/themes/advanced/js/source_editor.js +56 -0
  342. data/app/assets/javascripts/tiny_mce/themes/advanced/langs/en.js +68 -0
  343. data/app/assets/javascripts/tiny_mce/themes/advanced/langs/en_dlg.js +54 -0
  344. data/app/assets/javascripts/tiny_mce/themes/advanced/link.htm +57 -0
  345. data/app/assets/javascripts/tiny_mce/themes/advanced/shortcuts.htm +47 -0
  346. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/default/content.css +47 -0
  347. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/default/dialog.css +117 -0
  348. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
  349. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
  350. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  351. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  352. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
  353. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
  354. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/default/ui.css +227 -0
  355. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/content.css +23 -0
  356. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +105 -0
  357. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/ui.css +102 -0
  358. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +46 -0
  359. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +117 -0
  360. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  361. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  362. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  363. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +217 -0
  364. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
  365. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
  366. data/app/assets/javascripts/tiny_mce/themes/advanced/source_editor.htm +25 -0
  367. data/app/assets/javascripts/tiny_mce/themes/simple/editor_template.js +1 -0
  368. data/app/assets/javascripts/tiny_mce/themes/simple/editor_template_src.js +84 -0
  369. data/app/assets/javascripts/tiny_mce/themes/simple/img/icons.gif +0 -0
  370. data/app/assets/javascripts/tiny_mce/themes/simple/langs/en.js +11 -0
  371. data/app/assets/javascripts/tiny_mce/themes/simple/skins/default/content.css +25 -0
  372. data/app/assets/javascripts/tiny_mce/themes/simple/skins/default/ui.css +32 -0
  373. data/app/assets/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css +17 -0
  374. data/app/assets/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  375. data/app/assets/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -0
  376. data/app/assets/javascripts/tiny_mce/tiny_mce.js +1 -0
  377. data/app/assets/javascripts/tiny_mce/tiny_mce_popup.js +5 -0
  378. data/app/assets/javascripts/tiny_mce/tiny_mce_src.js +15216 -0
  379. data/app/assets/javascripts/tiny_mce/utils/editable_selects.js +70 -0
  380. data/app/assets/javascripts/tiny_mce/utils/form_utils.js +210 -0
  381. data/app/assets/javascripts/tiny_mce/utils/mctabs.js +162 -0
  382. data/app/assets/javascripts/tiny_mce/utils/validate.js +252 -0
  383. data/app/assets/stylesheets/admin-ie6.sass +94 -0
  384. data/app/assets/stylesheets/admin-ie7.sass +107 -0
  385. data/app/assets/stylesheets/admin-override.sass +563 -0
  386. data/app/assets/stylesheets/admin.sass +2919 -0
  387. data/app/assets/stylesheets/bootstrap-responsive.css +686 -0
  388. data/app/assets/stylesheets/bootstrap.css +4124 -0
  389. data/app/assets/stylesheets/user-styles.sass +3 -0
  390. data/app/controllers/gluttonberg/admin/asset_library/assets_controller.rb +365 -0
  391. data/app/controllers/gluttonberg/admin/asset_library/collections_controller.rb +91 -0
  392. data/app/controllers/gluttonberg/admin/base_controller.rb +185 -0
  393. data/app/controllers/gluttonberg/admin/content/articles_controller.rb +139 -0
  394. data/app/controllers/gluttonberg/admin/content/blogs_controller.rb +101 -0
  395. data/app/controllers/gluttonberg/admin/content/comments_controller.rb +73 -0
  396. data/app/controllers/gluttonberg/admin/content/flag_controller.rb +19 -0
  397. data/app/controllers/gluttonberg/admin/content/galleries_controller.rb +123 -0
  398. data/app/controllers/gluttonberg/admin/content/main_controller.rb +13 -0
  399. data/app/controllers/gluttonberg/admin/content/page_localizations_controller.rb +78 -0
  400. data/app/controllers/gluttonberg/admin/content/pages_controller.rb +125 -0
  401. data/app/controllers/gluttonberg/admin/help_controller.rb +15 -0
  402. data/app/controllers/gluttonberg/admin/main_controller.rb +32 -0
  403. data/app/controllers/gluttonberg/admin/membership/base_controller.rb +11 -0
  404. data/app/controllers/gluttonberg/admin/membership/groups_controller.rb +74 -0
  405. data/app/controllers/gluttonberg/admin/membership/main_controller.rb +11 -0
  406. data/app/controllers/gluttonberg/admin/membership/members_controller.rb +142 -0
  407. data/app/controllers/gluttonberg/admin/password_resets_controller.rb +55 -0
  408. data/app/controllers/gluttonberg/admin/settings/generic_settings_controller.rb +90 -0
  409. data/app/controllers/gluttonberg/admin/settings/global_history_controller.rb +11 -0
  410. data/app/controllers/gluttonberg/admin/settings/locales_controller.rb +75 -0
  411. data/app/controllers/gluttonberg/admin/settings/main_controller.rb +11 -0
  412. data/app/controllers/gluttonberg/admin/settings/stylesheets_controller.rb +85 -0
  413. data/app/controllers/gluttonberg/admin/settings/users_controller.rb +110 -0
  414. data/app/controllers/gluttonberg/admin/user_sessions_controller.rb +30 -0
  415. data/app/controllers/gluttonberg/public/articles_controller.rb +70 -0
  416. data/app/controllers/gluttonberg/public/base_controller.rb +169 -0
  417. data/app/controllers/gluttonberg/public/blogs_controller.rb +44 -0
  418. data/app/controllers/gluttonberg/public/comments_controller.rb +45 -0
  419. data/app/controllers/gluttonberg/public/flag_controller.rb +45 -0
  420. data/app/controllers/gluttonberg/public/gallery_controller.rb +2 -0
  421. data/app/controllers/gluttonberg/public/member_password_resets_controller.rb +55 -0
  422. data/app/controllers/gluttonberg/public/member_sessions_controller.rb +30 -0
  423. data/app/controllers/gluttonberg/public/members_controller.rb +88 -0
  424. data/app/controllers/gluttonberg/public/pages_controller.rb +79 -0
  425. data/app/controllers/gluttonberg/public/public_assets_controller.rb +18 -0
  426. data/app/helpers/gluttonberg/admin.rb +448 -0
  427. data/app/helpers/gluttonberg/application_helper.rb +23 -0
  428. data/app/helpers/gluttonberg/asset_library.rb +258 -0
  429. data/app/helpers/gluttonberg/content_helpers.rb +100 -0
  430. data/app/helpers/gluttonberg/public.rb +297 -0
  431. data/app/mailer/member_notifier.rb +51 -0
  432. data/app/mailer/notifier.rb +45 -0
  433. data/app/models/ability.rb +46 -0
  434. data/app/models/flag.rb +56 -0
  435. data/app/models/gluttonberg/article.rb +73 -0
  436. data/app/models/gluttonberg/article_localization.rb +21 -0
  437. data/app/models/gluttonberg/asset.rb +194 -0
  438. data/app/models/gluttonberg/asset_category.rb +45 -0
  439. data/app/models/gluttonberg/asset_collection.rb +18 -0
  440. data/app/models/gluttonberg/asset_mime_type.rb +8 -0
  441. data/app/models/gluttonberg/asset_thumbnail.rb +7 -0
  442. data/app/models/gluttonberg/asset_type.rb +63 -0
  443. data/app/models/gluttonberg/audio_asset_attribute.rb +8 -0
  444. data/app/models/gluttonberg/blog.rb +19 -0
  445. data/app/models/gluttonberg/comment.rb +88 -0
  446. data/app/models/gluttonberg/comment_subscription.rb +26 -0
  447. data/app/models/gluttonberg/feed.rb +14 -0
  448. data/app/models/gluttonberg/gallery.rb +24 -0
  449. data/app/models/gluttonberg/gallery_image.rb +9 -0
  450. data/app/models/gluttonberg/group.rb +15 -0
  451. data/app/models/gluttonberg/help.rb +48 -0
  452. data/app/models/gluttonberg/html_content.rb +10 -0
  453. data/app/models/gluttonberg/image_content.rb +10 -0
  454. data/app/models/gluttonberg/locale.rb +37 -0
  455. data/app/models/gluttonberg/member.rb +272 -0
  456. data/app/models/gluttonberg/page.rb +371 -0
  457. data/app/models/gluttonberg/page_localization.rb +119 -0
  458. data/app/models/gluttonberg/plain_text_content.rb +11 -0
  459. data/app/models/gluttonberg/search.rb +125 -0
  460. data/app/models/gluttonberg/setting.rb +104 -0
  461. data/app/models/gluttonberg/sitemap.rb +40 -0
  462. data/app/models/gluttonberg/stylesheet.rb +9 -0
  463. data/app/models/member_session.rb +8 -0
  464. data/app/models/user.rb +59 -0
  465. data/app/models/user_session.rb +7 -0
  466. data/app/observers/gluttonberg/locale_observer.rb +45 -0
  467. data/app/observers/gluttonberg/page_localization_observer.rb +38 -0
  468. data/app/observers/gluttonberg/page_observer.rb +56 -0
  469. data/app/views/gluttonberg/admin/asset_library/assets/_assets_listing_without_sorting.html.haml +40 -0
  470. data/app/views/gluttonberg/admin/asset_library/assets/_browser_root.html.haml +60 -0
  471. data/app/views/gluttonberg/admin/asset_library/assets/_collection_select_form.html.haml +8 -0
  472. data/app/views/gluttonberg/admin/asset_library/assets/_content_panel.html.haml +8 -0
  473. data/app/views/gluttonberg/admin/asset_library/assets/_form.html.haml +31 -0
  474. data/app/views/gluttonberg/admin/asset_library/assets/_search_form.html.haml +3 -0
  475. data/app/views/gluttonberg/admin/asset_library/assets/add_assets_in_bulk.html.haml +51 -0
  476. data/app/views/gluttonberg/admin/asset_library/assets/browser.html.haml +14 -0
  477. data/app/views/gluttonberg/admin/asset_library/assets/category.html.haml +28 -0
  478. data/app/views/gluttonberg/admin/asset_library/assets/category.json.haml +1 -0
  479. data/app/views/gluttonberg/admin/asset_library/assets/create_assets_in_bulk.html.haml +17 -0
  480. data/app/views/gluttonberg/admin/asset_library/assets/crop.html.haml +56 -0
  481. data/app/views/gluttonberg/admin/asset_library/assets/edit.html.haml +13 -0
  482. data/app/views/gluttonberg/admin/asset_library/assets/index.html.haml +24 -0
  483. data/app/views/gluttonberg/admin/asset_library/assets/new.html.haml +30 -0
  484. data/app/views/gluttonberg/admin/asset_library/assets/search.html.haml +28 -0
  485. data/app/views/gluttonberg/admin/asset_library/assets/search.json.haml +2 -0
  486. data/app/views/gluttonberg/admin/asset_library/assets/show.html.haml +119 -0
  487. data/app/views/gluttonberg/admin/asset_library/collections/_form.html.haml +9 -0
  488. data/app/views/gluttonberg/admin/asset_library/collections/edit.html.haml +4 -0
  489. data/app/views/gluttonberg/admin/asset_library/collections/index.html.haml +38 -0
  490. data/app/views/gluttonberg/admin/asset_library/collections/new.html.haml +12 -0
  491. data/app/views/gluttonberg/admin/asset_library/collections/show.html.haml +12 -0
  492. data/app/views/gluttonberg/admin/asset_library/collections/show.json.haml +1 -0
  493. data/app/views/gluttonberg/admin/asset_library/shared/_asset_panels.html.haml +62 -0
  494. data/app/views/gluttonberg/admin/asset_library/shared/_sidebar.html.haml +11 -0
  495. data/app/views/gluttonberg/admin/asset_library/shared/_sorter.html.haml +9 -0
  496. data/app/views/gluttonberg/admin/content/articles/_form.html.haml +102 -0
  497. data/app/views/gluttonberg/admin/content/articles/edit.html.haml +17 -0
  498. data/app/views/gluttonberg/admin/content/articles/index.html.haml +64 -0
  499. data/app/views/gluttonberg/admin/content/articles/new.html.haml +11 -0
  500. data/app/views/gluttonberg/admin/content/blogs/_form.html.haml +56 -0
  501. data/app/views/gluttonberg/admin/content/blogs/edit.html.haml +3 -0
  502. data/app/views/gluttonberg/admin/content/blogs/index.html.haml +35 -0
  503. data/app/views/gluttonberg/admin/content/blogs/new.html.haml +10 -0
  504. data/app/views/gluttonberg/admin/content/comments/index.html.haml +40 -0
  505. data/app/views/gluttonberg/admin/content/editors/_html_content.html.haml +7 -0
  506. data/app/views/gluttonberg/admin/content/editors/_image_content.html.haml +7 -0
  507. data/app/views/gluttonberg/admin/content/editors/_plain_text_content.html.haml +4 -0
  508. data/app/views/gluttonberg/admin/content/flag/index.html.haml +41 -0
  509. data/app/views/gluttonberg/admin/content/galleries/_form.html.haml +30 -0
  510. data/app/views/gluttonberg/admin/content/galleries/_images_list.html.haml +21 -0
  511. data/app/views/gluttonberg/admin/content/galleries/add_image.html.haml +1 -0
  512. data/app/views/gluttonberg/admin/content/galleries/edit.html.haml +23 -0
  513. data/app/views/gluttonberg/admin/content/galleries/index.html.haml +36 -0
  514. data/app/views/gluttonberg/admin/content/galleries/new.html.haml +12 -0
  515. data/app/views/gluttonberg/admin/content/main/_sidebar.html.haml +20 -0
  516. data/app/views/gluttonberg/admin/content/main/index.html.haml +20 -0
  517. data/app/views/gluttonberg/admin/content/page_localizations/_form.html.haml +82 -0
  518. data/app/views/gluttonberg/admin/content/page_localizations/edit.html.haml +15 -0
  519. data/app/views/gluttonberg/admin/content/pages/_form.html.haml +30 -0
  520. data/app/views/gluttonberg/admin/content/pages/_page_settings.html.haml +20 -0
  521. data/app/views/gluttonberg/admin/content/pages/_row.html.haml +35 -0
  522. data/app/views/gluttonberg/admin/content/pages/edit_home.html.haml +11 -0
  523. data/app/views/gluttonberg/admin/content/pages/index.html.haml +31 -0
  524. data/app/views/gluttonberg/admin/content/pages/new.html.haml +10 -0
  525. data/app/views/gluttonberg/admin/content/pages/pages_list_for_tinymce.html.haml +3 -0
  526. data/app/views/gluttonberg/admin/content/pages/show.html.haml +48 -0
  527. data/app/views/gluttonberg/admin/exceptions/access_denied.html.haml +11 -0
  528. data/app/views/gluttonberg/admin/exceptions/internal_server_error.html.haml +11 -0
  529. data/app/views/gluttonberg/admin/exceptions/not_acceptable.html.haml +9 -0
  530. data/app/views/gluttonberg/admin/exceptions/not_found.html.haml +12 -0
  531. data/app/views/gluttonberg/admin/main/index.html.haml +110 -0
  532. data/app/views/gluttonberg/admin/membership/groups/_form.html.haml +15 -0
  533. data/app/views/gluttonberg/admin/membership/groups/edit.html.haml +12 -0
  534. data/app/views/gluttonberg/admin/membership/groups/index.html.haml +35 -0
  535. data/app/views/gluttonberg/admin/membership/groups/new.html.haml +12 -0
  536. data/app/views/gluttonberg/admin/membership/main/_sidebar.html.haml +9 -0
  537. data/app/views/gluttonberg/admin/membership/main/index.html.haml +11 -0
  538. data/app/views/gluttonberg/admin/membership/members/_form.html.haml +56 -0
  539. data/app/views/gluttonberg/admin/membership/members/_list.html.haml +25 -0
  540. data/app/views/gluttonberg/admin/membership/members/create_bulk.html.haml +17 -0
  541. data/app/views/gluttonberg/admin/membership/members/edit.html.haml +12 -0
  542. data/app/views/gluttonberg/admin/membership/members/index.html.haml +51 -0
  543. data/app/views/gluttonberg/admin/membership/members/new.html.haml +13 -0
  544. data/app/views/gluttonberg/admin/membership/members/new_bulk.html.haml +57 -0
  545. data/app/views/gluttonberg/admin/password_resets/edit.html.haml +19 -0
  546. data/app/views/gluttonberg/admin/password_resets/new.html.haml +13 -0
  547. data/app/views/gluttonberg/admin/settings/generic_settings/_form.html.haml +26 -0
  548. data/app/views/gluttonberg/admin/settings/generic_settings/_value_tag.html.haml +4 -0
  549. data/app/views/gluttonberg/admin/settings/generic_settings/edit.html.haml +4 -0
  550. data/app/views/gluttonberg/admin/settings/generic_settings/index.html.haml +53 -0
  551. data/app/views/gluttonberg/admin/settings/generic_settings/new.html.haml +12 -0
  552. data/app/views/gluttonberg/admin/settings/global_history/index.html.haml +41 -0
  553. data/app/views/gluttonberg/admin/settings/locales/_form.html.haml +22 -0
  554. data/app/views/gluttonberg/admin/settings/locales/edit.html.haml +4 -0
  555. data/app/views/gluttonberg/admin/settings/locales/index.html.haml +35 -0
  556. data/app/views/gluttonberg/admin/settings/locales/new.html.haml +4 -0
  557. data/app/views/gluttonberg/admin/settings/main/_sidebar.html.haml +23 -0
  558. data/app/views/gluttonberg/admin/settings/main/index.html.haml +18 -0
  559. data/app/views/gluttonberg/admin/settings/stylesheets/_form.html.haml +28 -0
  560. data/app/views/gluttonberg/admin/settings/stylesheets/edit.html.haml +3 -0
  561. data/app/views/gluttonberg/admin/settings/stylesheets/index.html.haml +39 -0
  562. data/app/views/gluttonberg/admin/settings/stylesheets/new.html.haml +3 -0
  563. data/app/views/gluttonberg/admin/settings/users/_form.html.haml +50 -0
  564. data/app/views/gluttonberg/admin/settings/users/_sidebar.html.haml +36 -0
  565. data/app/views/gluttonberg/admin/settings/users/edit.html.haml +12 -0
  566. data/app/views/gluttonberg/admin/settings/users/index.html.haml +57 -0
  567. data/app/views/gluttonberg/admin/settings/users/new.html.haml +13 -0
  568. data/app/views/gluttonberg/admin/shared/_asset_panel.html.haml +33 -0
  569. data/app/views/gluttonberg/admin/shared/delete.html.haml +48 -0
  570. data/app/views/gluttonberg/admin/shared/generic.html.haml +20 -0
  571. data/app/views/gluttonberg/admin/user_sessions/new.html.haml +42 -0
  572. data/app/views/gluttonberg/public/articles/index.rss.builder +21 -0
  573. data/app/views/gluttonberg/public/blogs/show.rss.builder +21 -0
  574. data/app/views/gluttonberg/public/exceptions/access_denied.html.haml +11 -0
  575. data/app/views/gluttonberg/public/exceptions/internal_server_error.html.haml +11 -0
  576. data/app/views/gluttonberg/public/exceptions/not_acceptable.html.haml +9 -0
  577. data/app/views/gluttonberg/public/exceptions/not_found.html.haml +11 -0
  578. data/app/views/gluttonberg/public/flag/new.html.haml +23 -0
  579. data/app/views/gluttonberg/public/member_password_resets/edit.html.haml +22 -0
  580. data/app/views/gluttonberg/public/member_password_resets/new.html.haml +11 -0
  581. data/app/views/gluttonberg/public/member_sessions/new.html.haml +25 -0
  582. data/app/views/gluttonberg/public/members/_form.html.haml +83 -0
  583. data/app/views/gluttonberg/public/members/edit.html.haml +82 -0
  584. data/app/views/gluttonberg/public/members/new.html.haml +1 -0
  585. data/app/views/gluttonberg/public/members/show.html.haml +35 -0
  586. data/app/views/gluttonberg/public/pages/restrict_site_access.html.haml +57 -0
  587. data/app/views/gluttonberg/public/pages/sitemap.html.haml +11 -0
  588. data/app/views/help/gluttonberg/admin/AssetLibrary/assets/add_assets_in_bulk.html.haml +41 -0
  589. data/app/views/help/gluttonberg/admin/AssetLibrary/assets/edit.html.haml +61 -0
  590. data/app/views/help/gluttonberg/admin/AssetLibrary/assets/index.html.haml +16 -0
  591. data/app/views/help/gluttonberg/admin/AssetLibrary/assets/new.html.haml +57 -0
  592. data/app/views/help/gluttonberg/admin/AssetLibrary/collections/edit.html.haml +15 -0
  593. data/app/views/help/gluttonberg/admin/AssetLibrary/collections/index.html.haml +41 -0
  594. data/app/views/help/gluttonberg/admin/AssetLibrary/collections/new.html.haml +15 -0
  595. data/app/views/help/gluttonberg/admin/AssetLibrary/main/index.html.haml +34 -0
  596. data/app/views/help/gluttonberg/admin/content/page_localizations/edit.html.haml +89 -0
  597. data/app/views/help/gluttonberg/admin/content/pages/_page_description_help.html.haml +14 -0
  598. data/app/views/help/gluttonberg/admin/content/pages/edit.html.haml +62 -0
  599. data/app/views/help/gluttonberg/admin/content/pages/index.html.haml +111 -0
  600. data/app/views/help/gluttonberg/admin/content/pages/new.html.haml +61 -0
  601. data/app/views/help/gluttonberg/admin/settings/dialects/edit.html.haml +47 -0
  602. data/app/views/help/gluttonberg/admin/settings/dialects/index.html.haml +50 -0
  603. data/app/views/help/gluttonberg/admin/settings/dialects/new.html.haml +47 -0
  604. data/app/views/help/gluttonberg/admin/settings/generic_settings/index.html.haml +74 -0
  605. data/app/views/help/gluttonberg/admin/settings/locales/edit.html.haml +71 -0
  606. data/app/views/help/gluttonberg/admin/settings/locales/index.html.haml +57 -0
  607. data/app/views/help/gluttonberg/admin/settings/locales/new.html.haml +71 -0
  608. data/app/views/help/gluttonberg/admin/settings/users/edit.html.haml +63 -0
  609. data/app/views/help/gluttonberg/admin/settings/users/index.html.haml +60 -0
  610. data/app/views/help/gluttonberg/admin/settings/users/new.html.haml +69 -0
  611. data/app/views/layouts/_flash_messages.html.haml +12 -0
  612. data/app/views/layouts/ajax.html.haml +5 -0
  613. data/app/views/layouts/bare.html.haml +32 -0
  614. data/app/views/layouts/gluttonberg.html.haml +79 -0
  615. data/app/views/layouts/help.html.haml +1 -0
  616. data/app/views/member_notifier/confirmation_instructions.html.haml +18 -0
  617. data/app/views/member_notifier/password_reset_instructions.html.haml +8 -0
  618. data/app/views/member_notifier/welcome.html.haml +25 -0
  619. data/app/views/notifier/comment_notification.html.haml +17 -0
  620. data/app/views/notifier/comment_notification_for_admin.html.haml +19 -0
  621. data/app/views/notifier/password_reset_instructions.html.haml +8 -0
  622. data/config/locales/en_au.yml +205 -0
  623. data/config/locales/en_gb.yml +27 -0
  624. data/config/routes.rb +159 -0
  625. data/db/migrate/migrations +1 -0
  626. data/db/migrate/old_migrations/1_untitled.rb +147 -0
  627. data/db/migrate/old_migrations/20101110051141_version_tables.rb +12 -0
  628. data/db/migrate/old_migrations/20101110061505_add_state_column.rb +9 -0
  629. data/db/migrate/old_migrations/20101111002552_create_users.rb +18 -0
  630. data/db/migrate/old_migrations/2_asset_library.rb +87 -0
  631. data/lib/acts_as_versioned.rb +496 -0
  632. data/lib/audio_job.rb +17 -0
  633. data/lib/engine.rb +101 -0
  634. data/lib/generators/gluttonberg/blog/blog_generator.rb +46 -0
  635. data/lib/generators/gluttonberg/blog/templates/articles_index.html.haml +18 -0
  636. data/lib/generators/gluttonberg/blog/templates/articles_show.html.haml +63 -0
  637. data/lib/generators/gluttonberg/blog/templates/articles_tag.html.haml +24 -0
  638. data/lib/generators/gluttonberg/blog/templates/blog_migration.rb +88 -0
  639. data/lib/generators/gluttonberg/blog/templates/blogs_index.html.haml +15 -0
  640. data/lib/generators/gluttonberg/blog/templates/blogs_show.html.haml +25 -0
  641. data/lib/generators/gluttonberg/installer/USAGE +1 -0
  642. data/lib/generators/gluttonberg/installer/installer_generator.rb +105 -0
  643. data/lib/generators/gluttonberg/installer/templates/delayed_job_script +5 -0
  644. data/lib/generators/gluttonberg/installer/templates/gluttonberg_migration.rb +368 -0
  645. data/lib/generators/gluttonberg/installer/templates/page_descriptions.rb +65 -0
  646. data/lib/generators/gluttonberg/installer/templates/public.html.haml +24 -0
  647. data/lib/generators/gluttonberg/installer/templates/sitemap.rb +70 -0
  648. data/lib/generators/gluttonberg/resource/USAGE +1 -0
  649. data/lib/generators/gluttonberg/resource/resource_generator.rb +200 -0
  650. data/lib/generators/gluttonberg/resource/templates/admin_controller.rb +143 -0
  651. data/lib/generators/gluttonberg/resource/templates/backend_view_edit.html.haml +28 -0
  652. data/lib/generators/gluttonberg/resource/templates/backend_view_form.html.haml +43 -0
  653. data/lib/generators/gluttonberg/resource/templates/backend_view_import.html.haml +37 -0
  654. data/lib/generators/gluttonberg/resource/templates/backend_view_index.html.haml +82 -0
  655. data/lib/generators/gluttonberg/resource/templates/backend_view_new.html.haml +14 -0
  656. data/lib/generators/gluttonberg/resource/templates/backend_view_show.html.haml +27 -0
  657. data/lib/generators/gluttonberg/resource/templates/migration.rb +39 -0
  658. data/lib/generators/gluttonberg/resource/templates/model.rb +39 -0
  659. data/lib/generators/gluttonberg/resource/templates/public_controller.rb +18 -0
  660. data/lib/generators/gluttonberg/resource/templates/public_view_index.html.haml +13 -0
  661. data/lib/generators/gluttonberg/resource/templates/public_view_show.html.haml +7 -0
  662. data/lib/gluttonberg/authorizable.rb +51 -0
  663. data/lib/gluttonberg/can_flag/rails_commands.rb +30 -0
  664. data/lib/gluttonberg/can_flag.rb +93 -0
  665. data/lib/gluttonberg/components.rb +62 -0
  666. data/lib/gluttonberg/content/block.rb +147 -0
  667. data/lib/gluttonberg/content/block_localization.rb +38 -0
  668. data/lib/gluttonberg/content/clean_html.rb +74 -0
  669. data/lib/gluttonberg/content/import_export_csv.rb +201 -0
  670. data/lib/gluttonberg/content/localization.rb +238 -0
  671. data/lib/gluttonberg/content/publishable.rb +90 -0
  672. data/lib/gluttonberg/content/slug_management.rb +88 -0
  673. data/lib/gluttonberg/content/versioning.rb +43 -0
  674. data/lib/gluttonberg/content/workflow.rb +68 -0
  675. data/lib/gluttonberg/content.rb +66 -0
  676. data/lib/gluttonberg/drag_tree/action_controller.rb +61 -0
  677. data/lib/gluttonberg/drag_tree/action_view.rb +60 -0
  678. data/lib/gluttonberg/drag_tree/active_record.rb +96 -0
  679. data/lib/gluttonberg/drag_tree.rb +122 -0
  680. data/lib/gluttonberg/extensions/array.rb +13 -0
  681. data/lib/gluttonberg/extensions/kernel.rb +5 -0
  682. data/lib/gluttonberg/extensions.rb +4 -0
  683. data/lib/gluttonberg/helpers/form_builder.rb +57 -0
  684. data/lib/gluttonberg/helpers.rb +20 -0
  685. data/lib/gluttonberg/library/attachment_mixin.rb +380 -0
  686. data/lib/gluttonberg/library/quick_magick/image.rb +471 -0
  687. data/lib/gluttonberg/library/quick_magick/image_list.rb +65 -0
  688. data/lib/gluttonberg/library/quick_magick.rb +205 -0
  689. data/lib/gluttonberg/library.rb +151 -0
  690. data/lib/gluttonberg/middleware/honeypot.rb +23 -0
  691. data/lib/gluttonberg/middleware/locales.rb +39 -0
  692. data/lib/gluttonberg/middleware/rewriter.rb +34 -0
  693. data/lib/gluttonberg/middleware.rb +5 -0
  694. data/lib/gluttonberg/page_description.rb +284 -0
  695. data/lib/gluttonberg/record_history.rb +95 -0
  696. data/lib/gluttonberg/tasks/asset.rake +48 -0
  697. data/lib/gluttonberg/tasks/gluttonberg.rake +59 -0
  698. data/lib/gluttonberg/templates.rb +12 -0
  699. data/lib/gluttonberg/version.rb +3 -0
  700. data/lib/gluttonberg.rb +47 -0
  701. data/lib/pagination_list_link_renderer.rb +67 -0
  702. data/lib/rails/railties/tasks.rake +3 -0
  703. data/lib/version.rb +3 -0
  704. metadata +1012 -0
@@ -0,0 +1,2027 @@
1
+ /* ===================================================
2
+ * bootstrap-transition.js v2.1.0
3
+ * http://twitter.github.com/bootstrap/javascript.html#transitions
4
+ * ===================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ========================================================== */
19
+
20
+
21
+ !function ($) {
22
+
23
+ $(function () {
24
+
25
+ "use strict"; // jshint ;_;
26
+
27
+
28
+ /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
29
+ * ======================================================= */
30
+
31
+ $.support.transition = (function () {
32
+
33
+ var transitionEnd = (function () {
34
+
35
+ var el = document.createElement('bootstrap')
36
+ , transEndEventNames = {
37
+ 'WebkitTransition' : 'webkitTransitionEnd'
38
+ , 'MozTransition' : 'transitionend'
39
+ , 'OTransition' : 'oTransitionEnd otransitionend'
40
+ , 'transition' : 'transitionend'
41
+ }
42
+ , name
43
+
44
+ for (name in transEndEventNames){
45
+ if (el.style[name] !== undefined) {
46
+ return transEndEventNames[name]
47
+ }
48
+ }
49
+
50
+ }())
51
+
52
+ return transitionEnd && {
53
+ end: transitionEnd
54
+ }
55
+
56
+ })()
57
+
58
+ })
59
+
60
+ }(window.jQuery);/* ==========================================================
61
+ * bootstrap-alert.js v2.1.0
62
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
63
+ * ==========================================================
64
+ * Copyright 2012 Twitter, Inc.
65
+ *
66
+ * Licensed under the Apache License, Version 2.0 (the "License");
67
+ * you may not use this file except in compliance with the License.
68
+ * You may obtain a copy of the License at
69
+ *
70
+ * http://www.apache.org/licenses/LICENSE-2.0
71
+ *
72
+ * Unless required by applicable law or agreed to in writing, software
73
+ * distributed under the License is distributed on an "AS IS" BASIS,
74
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
75
+ * See the License for the specific language governing permissions and
76
+ * limitations under the License.
77
+ * ========================================================== */
78
+
79
+
80
+ !function ($) {
81
+
82
+ "use strict"; // jshint ;_;
83
+
84
+
85
+ /* ALERT CLASS DEFINITION
86
+ * ====================== */
87
+
88
+ var dismiss = '[data-dismiss="alert"]'
89
+ , Alert = function (el) {
90
+ $(el).on('click', dismiss, this.close)
91
+ }
92
+
93
+ Alert.prototype.close = function (e) {
94
+ var $this = $(this)
95
+ , selector = $this.attr('data-target')
96
+ , $parent
97
+
98
+ if (!selector) {
99
+ selector = $this.attr('href')
100
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
101
+ }
102
+
103
+ $parent = $(selector)
104
+
105
+ e && e.preventDefault()
106
+
107
+ $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
108
+
109
+ $parent.trigger(e = $.Event('close'))
110
+
111
+ if (e.isDefaultPrevented()) return
112
+
113
+ $parent.removeClass('in')
114
+
115
+ function removeElement() {
116
+ $parent
117
+ .trigger('closed')
118
+ .remove()
119
+ }
120
+
121
+ $.support.transition && $parent.hasClass('fade') ?
122
+ $parent.on($.support.transition.end, removeElement) :
123
+ removeElement()
124
+ }
125
+
126
+
127
+ /* ALERT PLUGIN DEFINITION
128
+ * ======================= */
129
+
130
+ $.fn.alert = function (option) {
131
+ return this.each(function () {
132
+ var $this = $(this)
133
+ , data = $this.data('alert')
134
+ if (!data) $this.data('alert', (data = new Alert(this)))
135
+ if (typeof option == 'string') data[option].call($this)
136
+ })
137
+ }
138
+
139
+ $.fn.alert.Constructor = Alert
140
+
141
+
142
+ /* ALERT DATA-API
143
+ * ============== */
144
+
145
+ $(function () {
146
+ $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
147
+ })
148
+
149
+ }(window.jQuery);/* ============================================================
150
+ * bootstrap-button.js v2.1.0
151
+ * http://twitter.github.com/bootstrap/javascript.html#buttons
152
+ * ============================================================
153
+ * Copyright 2012 Twitter, Inc.
154
+ *
155
+ * Licensed under the Apache License, Version 2.0 (the "License");
156
+ * you may not use this file except in compliance with the License.
157
+ * You may obtain a copy of the License at
158
+ *
159
+ * http://www.apache.org/licenses/LICENSE-2.0
160
+ *
161
+ * Unless required by applicable law or agreed to in writing, software
162
+ * distributed under the License is distributed on an "AS IS" BASIS,
163
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
164
+ * See the License for the specific language governing permissions and
165
+ * limitations under the License.
166
+ * ============================================================ */
167
+
168
+
169
+ !function ($) {
170
+
171
+ "use strict"; // jshint ;_;
172
+
173
+
174
+ /* BUTTON PUBLIC CLASS DEFINITION
175
+ * ============================== */
176
+
177
+ var Button = function (element, options) {
178
+ this.$element = $(element)
179
+ this.options = $.extend({}, $.fn.button.defaults, options)
180
+ }
181
+
182
+ Button.prototype.setState = function (state) {
183
+ var d = 'disabled'
184
+ , $el = this.$element
185
+ , data = $el.data()
186
+ , val = $el.is('input') ? 'val' : 'html'
187
+
188
+ state = state + 'Text'
189
+ data.resetText || $el.data('resetText', $el[val]())
190
+
191
+ $el[val](data[state] || this.options[state])
192
+
193
+ // push to event loop to allow forms to submit
194
+ setTimeout(function () {
195
+ state == 'loadingText' ?
196
+ $el.addClass(d).attr(d, d) :
197
+ $el.removeClass(d).removeAttr(d)
198
+ }, 0)
199
+ }
200
+
201
+ Button.prototype.toggle = function () {
202
+ var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
203
+
204
+ $parent && $parent
205
+ .find('.active')
206
+ .removeClass('active')
207
+
208
+ this.$element.toggleClass('active')
209
+ }
210
+
211
+
212
+ /* BUTTON PLUGIN DEFINITION
213
+ * ======================== */
214
+
215
+ $.fn.button = function (option) {
216
+ return this.each(function () {
217
+ var $this = $(this)
218
+ , data = $this.data('button')
219
+ , options = typeof option == 'object' && option
220
+ if (!data) $this.data('button', (data = new Button(this, options)))
221
+ if (option == 'toggle') data.toggle()
222
+ else if (option) data.setState(option)
223
+ })
224
+ }
225
+
226
+ $.fn.button.defaults = {
227
+ loadingText: 'loading...'
228
+ }
229
+
230
+ $.fn.button.Constructor = Button
231
+
232
+
233
+ /* BUTTON DATA-API
234
+ * =============== */
235
+
236
+ $(function () {
237
+ $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
238
+ var $btn = $(e.target)
239
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
240
+ $btn.button('toggle')
241
+ })
242
+ })
243
+
244
+ }(window.jQuery);/* ==========================================================
245
+ * bootstrap-carousel.js v2.1.0
246
+ * http://twitter.github.com/bootstrap/javascript.html#carousel
247
+ * ==========================================================
248
+ * Copyright 2012 Twitter, Inc.
249
+ *
250
+ * Licensed under the Apache License, Version 2.0 (the "License");
251
+ * you may not use this file except in compliance with the License.
252
+ * You may obtain a copy of the License at
253
+ *
254
+ * http://www.apache.org/licenses/LICENSE-2.0
255
+ *
256
+ * Unless required by applicable law or agreed to in writing, software
257
+ * distributed under the License is distributed on an "AS IS" BASIS,
258
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
259
+ * See the License for the specific language governing permissions and
260
+ * limitations under the License.
261
+ * ========================================================== */
262
+
263
+
264
+ !function ($) {
265
+
266
+ "use strict"; // jshint ;_;
267
+
268
+
269
+ /* CAROUSEL CLASS DEFINITION
270
+ * ========================= */
271
+
272
+ var Carousel = function (element, options) {
273
+ this.$element = $(element)
274
+ this.options = options
275
+ this.options.slide && this.slide(this.options.slide)
276
+ this.options.pause == 'hover' && this.$element
277
+ .on('mouseenter', $.proxy(this.pause, this))
278
+ .on('mouseleave', $.proxy(this.cycle, this))
279
+ }
280
+
281
+ Carousel.prototype = {
282
+
283
+ cycle: function (e) {
284
+ if (!e) this.paused = false
285
+ this.options.interval
286
+ && !this.paused
287
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
288
+ return this
289
+ }
290
+
291
+ , to: function (pos) {
292
+ var $active = this.$element.find('.item.active')
293
+ , children = $active.parent().children()
294
+ , activePos = children.index($active)
295
+ , that = this
296
+
297
+ if (pos > (children.length - 1) || pos < 0) return
298
+
299
+ if (this.sliding) {
300
+ return this.$element.one('slid', function () {
301
+ that.to(pos)
302
+ })
303
+ }
304
+
305
+ if (activePos == pos) {
306
+ return this.pause().cycle()
307
+ }
308
+
309
+ return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
310
+ }
311
+
312
+ , pause: function (e) {
313
+ if (!e) this.paused = true
314
+ if (this.$element.find('.next, .prev').length && $.support.transition.end) {
315
+ this.$element.trigger($.support.transition.end)
316
+ this.cycle()
317
+ }
318
+ clearInterval(this.interval)
319
+ this.interval = null
320
+ return this
321
+ }
322
+
323
+ , next: function () {
324
+ if (this.sliding) return
325
+ return this.slide('next')
326
+ }
327
+
328
+ , prev: function () {
329
+ if (this.sliding) return
330
+ return this.slide('prev')
331
+ }
332
+
333
+ , slide: function (type, next) {
334
+ var $active = this.$element.find('.item.active')
335
+ , $next = next || $active[type]()
336
+ , isCycling = this.interval
337
+ , direction = type == 'next' ? 'left' : 'right'
338
+ , fallback = type == 'next' ? 'first' : 'last'
339
+ , that = this
340
+ , e = $.Event('slide', {
341
+ relatedTarget: $next[0]
342
+ })
343
+
344
+ this.sliding = true
345
+
346
+ isCycling && this.pause()
347
+
348
+ $next = $next.length ? $next : this.$element.find('.item')[fallback]()
349
+
350
+ if ($next.hasClass('active')) return
351
+
352
+ if ($.support.transition && this.$element.hasClass('slide')) {
353
+ this.$element.trigger(e)
354
+ if (e.isDefaultPrevented()) return
355
+ $next.addClass(type)
356
+ $next[0].offsetWidth // force reflow
357
+ $active.addClass(direction)
358
+ $next.addClass(direction)
359
+ this.$element.one($.support.transition.end, function () {
360
+ $next.removeClass([type, direction].join(' ')).addClass('active')
361
+ $active.removeClass(['active', direction].join(' '))
362
+ that.sliding = false
363
+ setTimeout(function () { that.$element.trigger('slid') }, 0)
364
+ })
365
+ } else {
366
+ this.$element.trigger(e)
367
+ if (e.isDefaultPrevented()) return
368
+ $active.removeClass('active')
369
+ $next.addClass('active')
370
+ this.sliding = false
371
+ this.$element.trigger('slid')
372
+ }
373
+
374
+ isCycling && this.cycle()
375
+
376
+ return this
377
+ }
378
+
379
+ }
380
+
381
+
382
+ /* CAROUSEL PLUGIN DEFINITION
383
+ * ========================== */
384
+
385
+ $.fn.carousel = function (option) {
386
+ return this.each(function () {
387
+ var $this = $(this)
388
+ , data = $this.data('carousel')
389
+ , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
390
+ , action = typeof option == 'string' ? option : options.slide
391
+ if (!data) $this.data('carousel', (data = new Carousel(this, options)))
392
+ if (typeof option == 'number') data.to(option)
393
+ else if (action) data[action]()
394
+ else if (options.interval) data.cycle()
395
+ })
396
+ }
397
+
398
+ $.fn.carousel.defaults = {
399
+ interval: 5000
400
+ , pause: 'hover'
401
+ }
402
+
403
+ $.fn.carousel.Constructor = Carousel
404
+
405
+
406
+ /* CAROUSEL DATA-API
407
+ * ================= */
408
+
409
+ $(function () {
410
+ $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
411
+ var $this = $(this), href
412
+ , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
413
+ , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
414
+ $target.carousel(options)
415
+ e.preventDefault()
416
+ })
417
+ })
418
+
419
+ }(window.jQuery);/* =============================================================
420
+ * bootstrap-collapse.js v2.1.0
421
+ * http://twitter.github.com/bootstrap/javascript.html#collapse
422
+ * =============================================================
423
+ * Copyright 2012 Twitter, Inc.
424
+ *
425
+ * Licensed under the Apache License, Version 2.0 (the "License");
426
+ * you may not use this file except in compliance with the License.
427
+ * You may obtain a copy of the License at
428
+ *
429
+ * http://www.apache.org/licenses/LICENSE-2.0
430
+ *
431
+ * Unless required by applicable law or agreed to in writing, software
432
+ * distributed under the License is distributed on an "AS IS" BASIS,
433
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
434
+ * See the License for the specific language governing permissions and
435
+ * limitations under the License.
436
+ * ============================================================ */
437
+
438
+
439
+ !function ($) {
440
+
441
+ "use strict"; // jshint ;_;
442
+
443
+
444
+ /* COLLAPSE PUBLIC CLASS DEFINITION
445
+ * ================================ */
446
+
447
+ var Collapse = function (element, options) {
448
+ this.$element = $(element)
449
+ this.options = $.extend({}, $.fn.collapse.defaults, options)
450
+
451
+ if (this.options.parent) {
452
+ this.$parent = $(this.options.parent)
453
+ }
454
+
455
+ this.options.toggle && this.toggle()
456
+ }
457
+
458
+ Collapse.prototype = {
459
+
460
+ constructor: Collapse
461
+
462
+ , dimension: function () {
463
+ var hasWidth = this.$element.hasClass('width')
464
+ return hasWidth ? 'width' : 'height'
465
+ }
466
+
467
+ , show: function () {
468
+ var dimension
469
+ , scroll
470
+ , actives
471
+ , hasData
472
+
473
+ if (this.transitioning) return
474
+
475
+ dimension = this.dimension()
476
+ scroll = $.camelCase(['scroll', dimension].join('-'))
477
+ actives = this.$parent && this.$parent.find('> .accordion-group > .in')
478
+
479
+ if (actives && actives.length) {
480
+ hasData = actives.data('collapse')
481
+ if (hasData && hasData.transitioning) return
482
+ actives.collapse('hide')
483
+ hasData || actives.data('collapse', null)
484
+ }
485
+
486
+ this.$element[dimension](0)
487
+ this.transition('addClass', $.Event('show'), 'shown')
488
+ $.support.transition && this.$element[dimension](this.$element[0][scroll])
489
+ }
490
+
491
+ , hide: function () {
492
+ var dimension
493
+ if (this.transitioning) return
494
+ dimension = this.dimension()
495
+ this.reset(this.$element[dimension]())
496
+ this.transition('removeClass', $.Event('hide'), 'hidden')
497
+ this.$element[dimension](0)
498
+ }
499
+
500
+ , reset: function (size) {
501
+ var dimension = this.dimension()
502
+
503
+ this.$element
504
+ .removeClass('collapse')
505
+ [dimension](size || 'auto')
506
+ [0].offsetWidth
507
+
508
+ this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
509
+
510
+ return this
511
+ }
512
+
513
+ , transition: function (method, startEvent, completeEvent) {
514
+ var that = this
515
+ , complete = function () {
516
+ if (startEvent.type == 'show') that.reset()
517
+ that.transitioning = 0
518
+ that.$element.trigger(completeEvent)
519
+ }
520
+
521
+ this.$element.trigger(startEvent)
522
+
523
+ if (startEvent.isDefaultPrevented()) return
524
+
525
+ this.transitioning = 1
526
+
527
+ this.$element[method]('in')
528
+
529
+ $.support.transition && this.$element.hasClass('collapse') ?
530
+ this.$element.one($.support.transition.end, complete) :
531
+ complete()
532
+ }
533
+
534
+ , toggle: function () {
535
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
536
+ }
537
+
538
+ }
539
+
540
+
541
+ /* COLLAPSIBLE PLUGIN DEFINITION
542
+ * ============================== */
543
+
544
+ $.fn.collapse = function (option) {
545
+ return this.each(function () {
546
+ var $this = $(this)
547
+ , data = $this.data('collapse')
548
+ , options = typeof option == 'object' && option
549
+ if (!data) $this.data('collapse', (data = new Collapse(this, options)))
550
+ if (typeof option == 'string') data[option]()
551
+ })
552
+ }
553
+
554
+ $.fn.collapse.defaults = {
555
+ toggle: true
556
+ }
557
+
558
+ $.fn.collapse.Constructor = Collapse
559
+
560
+
561
+ /* COLLAPSIBLE DATA-API
562
+ * ==================== */
563
+
564
+ $(function () {
565
+ $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
566
+ var $this = $(this), href
567
+ , target = $this.attr('data-target')
568
+ || e.preventDefault()
569
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
570
+ , option = $(target).data('collapse') ? 'toggle' : $this.data()
571
+ $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
572
+ $(target).collapse(option)
573
+ })
574
+ })
575
+
576
+ }(window.jQuery);/* ============================================================
577
+ * bootstrap-dropdown.js v2.1.0
578
+ * http://twitter.github.com/bootstrap/javascript.html#dropdowns
579
+ * ============================================================
580
+ * Copyright 2012 Twitter, Inc.
581
+ *
582
+ * Licensed under the Apache License, Version 2.0 (the "License");
583
+ * you may not use this file except in compliance with the License.
584
+ * You may obtain a copy of the License at
585
+ *
586
+ * http://www.apache.org/licenses/LICENSE-2.0
587
+ *
588
+ * Unless required by applicable law or agreed to in writing, software
589
+ * distributed under the License is distributed on an "AS IS" BASIS,
590
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
591
+ * See the License for the specific language governing permissions and
592
+ * limitations under the License.
593
+ * ============================================================ */
594
+
595
+
596
+ !function ($) {
597
+
598
+ "use strict"; // jshint ;_;
599
+
600
+
601
+ /* DROPDOWN CLASS DEFINITION
602
+ * ========================= */
603
+
604
+ var toggle = '[data-toggle=dropdown]'
605
+ , Dropdown = function (element) {
606
+ var $el = $(element).on('click.dropdown.data-api', this.toggle)
607
+ $('html').on('click.dropdown.data-api', function () {
608
+ $el.parent().removeClass('open')
609
+ })
610
+ }
611
+
612
+ Dropdown.prototype = {
613
+
614
+ constructor: Dropdown
615
+
616
+ , toggle: function (e) {
617
+ var $this = $(this)
618
+ , $parent
619
+ , isActive
620
+
621
+ if ($this.is('.disabled, :disabled')) return
622
+
623
+ $parent = getParent($this)
624
+
625
+ isActive = $parent.hasClass('open')
626
+
627
+ clearMenus()
628
+
629
+ if (!isActive) {
630
+ $parent.toggleClass('open')
631
+ $this.focus()
632
+ }
633
+
634
+ return false
635
+ }
636
+
637
+ , keydown: function (e) {
638
+ var $this
639
+ , $items
640
+ , $active
641
+ , $parent
642
+ , isActive
643
+ , index
644
+
645
+ if (!/(38|40|27)/.test(e.keyCode)) return
646
+
647
+ $this = $(this)
648
+
649
+ e.preventDefault()
650
+ e.stopPropagation()
651
+
652
+ if ($this.is('.disabled, :disabled')) return
653
+
654
+ $parent = getParent($this)
655
+
656
+ isActive = $parent.hasClass('open')
657
+
658
+ if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
659
+
660
+ $items = $('[role=menu] li:not(.divider) a', $parent)
661
+
662
+ if (!$items.length) return
663
+
664
+ index = $items.index($items.filter(':focus'))
665
+
666
+ if (e.keyCode == 38 && index > 0) index-- // up
667
+ if (e.keyCode == 40 && index < $items.length - 1) index++ // down
668
+ if (!~index) index = 0
669
+
670
+ $items
671
+ .eq(index)
672
+ .focus()
673
+ }
674
+
675
+ }
676
+
677
+ function clearMenus() {
678
+ getParent($(toggle))
679
+ .removeClass('open')
680
+ }
681
+
682
+ function getParent($this) {
683
+ var selector = $this.attr('data-target')
684
+ , $parent
685
+
686
+ if (!selector) {
687
+ selector = $this.attr('href')
688
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
689
+ }
690
+
691
+ $parent = $(selector)
692
+ $parent.length || ($parent = $this.parent())
693
+
694
+ return $parent
695
+ }
696
+
697
+
698
+ /* DROPDOWN PLUGIN DEFINITION
699
+ * ========================== */
700
+
701
+ $.fn.dropdown = function (option) {
702
+ return this.each(function () {
703
+ var $this = $(this)
704
+ , data = $this.data('dropdown')
705
+ if (!data) $this.data('dropdown', (data = new Dropdown(this)))
706
+ if (typeof option == 'string') data[option].call($this)
707
+ })
708
+ }
709
+
710
+ $.fn.dropdown.Constructor = Dropdown
711
+
712
+
713
+ /* APPLY TO STANDARD DROPDOWN ELEMENTS
714
+ * =================================== */
715
+
716
+ $(function () {
717
+ $('html')
718
+ .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
719
+ $('body')
720
+ .on('click.dropdown touchstart.dropdown.data-api', '.dropdown', function (e) { e.stopPropagation() })
721
+ .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
722
+ .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
723
+ })
724
+
725
+ }(window.jQuery);/* =========================================================
726
+ * bootstrap-modal.js v2.1.0
727
+ * http://twitter.github.com/bootstrap/javascript.html#modals
728
+ * =========================================================
729
+ * Copyright 2012 Twitter, Inc.
730
+ *
731
+ * Licensed under the Apache License, Version 2.0 (the "License");
732
+ * you may not use this file except in compliance with the License.
733
+ * You may obtain a copy of the License at
734
+ *
735
+ * http://www.apache.org/licenses/LICENSE-2.0
736
+ *
737
+ * Unless required by applicable law or agreed to in writing, software
738
+ * distributed under the License is distributed on an "AS IS" BASIS,
739
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
740
+ * See the License for the specific language governing permissions and
741
+ * limitations under the License.
742
+ * ========================================================= */
743
+
744
+
745
+ !function ($) {
746
+
747
+ "use strict"; // jshint ;_;
748
+
749
+
750
+ /* MODAL CLASS DEFINITION
751
+ * ====================== */
752
+
753
+ var Modal = function (element, options) {
754
+ this.options = options
755
+ this.$element = $(element)
756
+ .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
757
+ this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
758
+ }
759
+
760
+ Modal.prototype = {
761
+
762
+ constructor: Modal
763
+
764
+ , toggle: function () {
765
+ return this[!this.isShown ? 'show' : 'hide']()
766
+ }
767
+
768
+ , show: function () {
769
+ var that = this
770
+ , e = $.Event('show')
771
+
772
+ this.$element.trigger(e)
773
+
774
+ if (this.isShown || e.isDefaultPrevented()) return
775
+
776
+ $('body').addClass('modal-open')
777
+
778
+ this.isShown = true
779
+
780
+ this.escape()
781
+
782
+ this.backdrop(function () {
783
+ var transition = $.support.transition && that.$element.hasClass('fade')
784
+
785
+ if (!that.$element.parent().length) {
786
+ that.$element.appendTo(document.body) //don't move modals dom position
787
+ }
788
+
789
+ that.$element
790
+ .show()
791
+
792
+ if (transition) {
793
+ that.$element[0].offsetWidth // force reflow
794
+ }
795
+
796
+ that.$element
797
+ .addClass('in')
798
+ .attr('aria-hidden', false)
799
+ .focus()
800
+
801
+ that.enforceFocus()
802
+
803
+ transition ?
804
+ that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
805
+ that.$element.trigger('shown')
806
+
807
+ })
808
+ }
809
+
810
+ , hide: function (e) {
811
+ e && e.preventDefault()
812
+
813
+ var that = this
814
+
815
+ e = $.Event('hide')
816
+
817
+ this.$element.trigger(e)
818
+
819
+ if (!this.isShown || e.isDefaultPrevented()) return
820
+
821
+ this.isShown = false
822
+
823
+ $('body').removeClass('modal-open')
824
+
825
+ this.escape()
826
+
827
+ $(document).off('focusin.modal')
828
+
829
+ this.$element
830
+ .removeClass('in')
831
+ .attr('aria-hidden', true)
832
+
833
+ $.support.transition && this.$element.hasClass('fade') ?
834
+ this.hideWithTransition() :
835
+ this.hideModal()
836
+ }
837
+
838
+ , enforceFocus: function () {
839
+ var that = this
840
+ $(document).on('focusin.modal', function (e) {
841
+ if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
842
+ that.$element.focus()
843
+ }
844
+ })
845
+ }
846
+
847
+ , escape: function () {
848
+ var that = this
849
+ if (this.isShown && this.options.keyboard) {
850
+ this.$element.on('keyup.dismiss.modal', function ( e ) {
851
+ e.which == 27 && that.hide()
852
+ })
853
+ } else if (!this.isShown) {
854
+ this.$element.off('keyup.dismiss.modal')
855
+ }
856
+ }
857
+
858
+ , hideWithTransition: function () {
859
+ var that = this
860
+ , timeout = setTimeout(function () {
861
+ that.$element.off($.support.transition.end)
862
+ that.hideModal()
863
+ }, 500)
864
+
865
+ this.$element.one($.support.transition.end, function () {
866
+ clearTimeout(timeout)
867
+ that.hideModal()
868
+ })
869
+ }
870
+
871
+ , hideModal: function (that) {
872
+ this.$element
873
+ .hide()
874
+ .trigger('hidden')
875
+
876
+ this.backdrop()
877
+ }
878
+
879
+ , removeBackdrop: function () {
880
+ this.$backdrop.remove()
881
+ this.$backdrop = null
882
+ }
883
+
884
+ , backdrop: function (callback) {
885
+ var that = this
886
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
887
+
888
+ if (this.isShown && this.options.backdrop) {
889
+ var doAnimate = $.support.transition && animate
890
+
891
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
892
+ .appendTo(document.body)
893
+
894
+ if (this.options.backdrop != 'static') {
895
+ this.$backdrop.click($.proxy(this.hide, this))
896
+ }
897
+
898
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
899
+
900
+ this.$backdrop.addClass('in')
901
+
902
+ doAnimate ?
903
+ this.$backdrop.one($.support.transition.end, callback) :
904
+ callback()
905
+
906
+ } else if (!this.isShown && this.$backdrop) {
907
+ this.$backdrop.removeClass('in')
908
+
909
+ $.support.transition && this.$element.hasClass('fade')?
910
+ this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
911
+ this.removeBackdrop()
912
+
913
+ } else if (callback) {
914
+ callback()
915
+ }
916
+ }
917
+ }
918
+
919
+
920
+ /* MODAL PLUGIN DEFINITION
921
+ * ======================= */
922
+
923
+ $.fn.modal = function (option) {
924
+ return this.each(function () {
925
+ var $this = $(this)
926
+ , data = $this.data('modal')
927
+ , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
928
+ if (!data) $this.data('modal', (data = new Modal(this, options)))
929
+ if (typeof option == 'string') data[option]()
930
+ else if (options.show) data.show()
931
+ })
932
+ }
933
+
934
+ $.fn.modal.defaults = {
935
+ backdrop: true
936
+ , keyboard: true
937
+ , show: true
938
+ }
939
+
940
+ $.fn.modal.Constructor = Modal
941
+
942
+
943
+ /* MODAL DATA-API
944
+ * ============== */
945
+
946
+ $(function () {
947
+ $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
948
+ var $this = $(this)
949
+ , href = $this.attr('href')
950
+ , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
951
+ , option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
952
+
953
+ e.preventDefault()
954
+
955
+ $target
956
+ .modal(option)
957
+ .one('hide', function () {
958
+ $this.focus()
959
+ })
960
+ })
961
+ })
962
+
963
+ }(window.jQuery);/* ===========================================================
964
+ * bootstrap-tooltip.js v2.1.0
965
+ * http://twitter.github.com/bootstrap/javascript.html#tooltips
966
+ * Inspired by the original jQuery.tipsy by Jason Frame
967
+ * ===========================================================
968
+ * Copyright 2012 Twitter, Inc.
969
+ *
970
+ * Licensed under the Apache License, Version 2.0 (the "License");
971
+ * you may not use this file except in compliance with the License.
972
+ * You may obtain a copy of the License at
973
+ *
974
+ * http://www.apache.org/licenses/LICENSE-2.0
975
+ *
976
+ * Unless required by applicable law or agreed to in writing, software
977
+ * distributed under the License is distributed on an "AS IS" BASIS,
978
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
979
+ * See the License for the specific language governing permissions and
980
+ * limitations under the License.
981
+ * ========================================================== */
982
+
983
+
984
+ !function ($) {
985
+
986
+ "use strict"; // jshint ;_;
987
+
988
+
989
+ /* TOOLTIP PUBLIC CLASS DEFINITION
990
+ * =============================== */
991
+
992
+ var Tooltip = function (element, options) {
993
+ this.init('tooltip', element, options)
994
+ }
995
+
996
+ Tooltip.prototype = {
997
+
998
+ constructor: Tooltip
999
+
1000
+ , init: function (type, element, options) {
1001
+ var eventIn
1002
+ , eventOut
1003
+
1004
+ this.type = type
1005
+ this.$element = $(element)
1006
+ this.options = this.getOptions(options)
1007
+ this.enabled = true
1008
+
1009
+ if (this.options.trigger == 'click') {
1010
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
1011
+ } else if (this.options.trigger != 'manual') {
1012
+ eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
1013
+ eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
1014
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
1015
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
1016
+ }
1017
+
1018
+ this.options.selector ?
1019
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
1020
+ this.fixTitle()
1021
+ }
1022
+
1023
+ , getOptions: function (options) {
1024
+ options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
1025
+
1026
+ if (options.delay && typeof options.delay == 'number') {
1027
+ options.delay = {
1028
+ show: options.delay
1029
+ , hide: options.delay
1030
+ }
1031
+ }
1032
+
1033
+ return options
1034
+ }
1035
+
1036
+ , enter: function (e) {
1037
+ var self = $(e.currentTarget)[this.type](this._options).data(this.type)
1038
+
1039
+ if (!self.options.delay || !self.options.delay.show) return self.show()
1040
+
1041
+ clearTimeout(this.timeout)
1042
+ self.hoverState = 'in'
1043
+ this.timeout = setTimeout(function() {
1044
+ if (self.hoverState == 'in') self.show()
1045
+ }, self.options.delay.show)
1046
+ }
1047
+
1048
+ , leave: function (e) {
1049
+ var self = $(e.currentTarget)[this.type](this._options).data(this.type)
1050
+
1051
+ if (this.timeout) clearTimeout(this.timeout)
1052
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
1053
+
1054
+ self.hoverState = 'out'
1055
+ this.timeout = setTimeout(function() {
1056
+ if (self.hoverState == 'out') self.hide()
1057
+ }, self.options.delay.hide)
1058
+ }
1059
+
1060
+ , show: function () {
1061
+ var $tip
1062
+ , inside
1063
+ , pos
1064
+ , actualWidth
1065
+ , actualHeight
1066
+ , placement
1067
+ , tp
1068
+
1069
+ if (this.hasContent() && this.enabled) {
1070
+ $tip = this.tip()
1071
+ this.setContent()
1072
+
1073
+ if (this.options.animation) {
1074
+ $tip.addClass('fade')
1075
+ }
1076
+
1077
+ placement = typeof this.options.placement == 'function' ?
1078
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
1079
+ this.options.placement
1080
+
1081
+ inside = /in/.test(placement)
1082
+
1083
+ $tip
1084
+ .remove()
1085
+ .css({ top: 0, left: 0, display: 'block' })
1086
+ .appendTo(inside ? this.$element : document.body)
1087
+
1088
+ pos = this.getPosition(inside)
1089
+
1090
+ actualWidth = $tip[0].offsetWidth
1091
+ actualHeight = $tip[0].offsetHeight
1092
+
1093
+ switch (inside ? placement.split(' ')[1] : placement) {
1094
+ case 'bottom':
1095
+ tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
1096
+ break
1097
+ case 'top':
1098
+ tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
1099
+ break
1100
+ case 'left':
1101
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
1102
+ break
1103
+ case 'right':
1104
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
1105
+ break
1106
+ }
1107
+
1108
+ $tip
1109
+ .css(tp)
1110
+ .addClass(placement)
1111
+ .addClass('in')
1112
+ }
1113
+ }
1114
+
1115
+ , setContent: function () {
1116
+ var $tip = this.tip()
1117
+ , title = this.getTitle()
1118
+
1119
+ $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
1120
+ $tip.removeClass('fade in top bottom left right')
1121
+ }
1122
+
1123
+ , hide: function () {
1124
+ var that = this
1125
+ , $tip = this.tip()
1126
+
1127
+ $tip.removeClass('in')
1128
+
1129
+ function removeWithAnimation() {
1130
+ var timeout = setTimeout(function () {
1131
+ $tip.off($.support.transition.end).remove()
1132
+ }, 500)
1133
+
1134
+ $tip.one($.support.transition.end, function () {
1135
+ clearTimeout(timeout)
1136
+ $tip.remove()
1137
+ })
1138
+ }
1139
+
1140
+ $.support.transition && this.$tip.hasClass('fade') ?
1141
+ removeWithAnimation() :
1142
+ $tip.remove()
1143
+
1144
+ return this
1145
+ }
1146
+
1147
+ , fixTitle: function () {
1148
+ var $e = this.$element
1149
+ if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
1150
+ $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
1151
+ }
1152
+ }
1153
+
1154
+ , hasContent: function () {
1155
+ return this.getTitle()
1156
+ }
1157
+
1158
+ , getPosition: function (inside) {
1159
+ return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
1160
+ width: this.$element[0].offsetWidth
1161
+ , height: this.$element[0].offsetHeight
1162
+ })
1163
+ }
1164
+
1165
+ , getTitle: function () {
1166
+ var title
1167
+ , $e = this.$element
1168
+ , o = this.options
1169
+
1170
+ title = $e.attr('data-original-title')
1171
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
1172
+
1173
+ return title
1174
+ }
1175
+
1176
+ , tip: function () {
1177
+ return this.$tip = this.$tip || $(this.options.template)
1178
+ }
1179
+
1180
+ , validate: function () {
1181
+ if (!this.$element[0].parentNode) {
1182
+ this.hide()
1183
+ this.$element = null
1184
+ this.options = null
1185
+ }
1186
+ }
1187
+
1188
+ , enable: function () {
1189
+ this.enabled = true
1190
+ }
1191
+
1192
+ , disable: function () {
1193
+ this.enabled = false
1194
+ }
1195
+
1196
+ , toggleEnabled: function () {
1197
+ this.enabled = !this.enabled
1198
+ }
1199
+
1200
+ , toggle: function () {
1201
+ this[this.tip().hasClass('in') ? 'hide' : 'show']()
1202
+ }
1203
+
1204
+ , destroy: function () {
1205
+ this.hide().$element.off('.' + this.type).removeData(this.type)
1206
+ }
1207
+
1208
+ }
1209
+
1210
+
1211
+ /* TOOLTIP PLUGIN DEFINITION
1212
+ * ========================= */
1213
+
1214
+ $.fn.tooltip = function ( option ) {
1215
+ return this.each(function () {
1216
+ var $this = $(this)
1217
+ , data = $this.data('tooltip')
1218
+ , options = typeof option == 'object' && option
1219
+ if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
1220
+ if (typeof option == 'string') data[option]()
1221
+ })
1222
+ }
1223
+
1224
+ $.fn.tooltip.Constructor = Tooltip
1225
+
1226
+ $.fn.tooltip.defaults = {
1227
+ animation: true
1228
+ , placement: 'top'
1229
+ , selector: false
1230
+ , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
1231
+ , trigger: 'hover'
1232
+ , title: ''
1233
+ , delay: 0
1234
+ , html: true
1235
+ }
1236
+
1237
+ }(window.jQuery);
1238
+ /* ===========================================================
1239
+ * bootstrap-popover.js v2.1.0
1240
+ * http://twitter.github.com/bootstrap/javascript.html#popovers
1241
+ * ===========================================================
1242
+ * Copyright 2012 Twitter, Inc.
1243
+ *
1244
+ * Licensed under the Apache License, Version 2.0 (the "License");
1245
+ * you may not use this file except in compliance with the License.
1246
+ * You may obtain a copy of the License at
1247
+ *
1248
+ * http://www.apache.org/licenses/LICENSE-2.0
1249
+ *
1250
+ * Unless required by applicable law or agreed to in writing, software
1251
+ * distributed under the License is distributed on an "AS IS" BASIS,
1252
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1253
+ * See the License for the specific language governing permissions and
1254
+ * limitations under the License.
1255
+ * =========================================================== */
1256
+
1257
+
1258
+ !function ($) {
1259
+
1260
+ "use strict"; // jshint ;_;
1261
+
1262
+
1263
+ /* POPOVER PUBLIC CLASS DEFINITION
1264
+ * =============================== */
1265
+
1266
+ var Popover = function (element, options) {
1267
+ this.init('popover', element, options)
1268
+ }
1269
+
1270
+
1271
+ /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
1272
+ ========================================== */
1273
+
1274
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
1275
+
1276
+ constructor: Popover
1277
+
1278
+ , setContent: function () {
1279
+ var $tip = this.tip()
1280
+ , title = this.getTitle()
1281
+ , content = this.getContent()
1282
+
1283
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1284
+ $tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content)
1285
+
1286
+ $tip.removeClass('fade top bottom left right in')
1287
+ }
1288
+
1289
+ , hasContent: function () {
1290
+ return this.getTitle() || this.getContent()
1291
+ }
1292
+
1293
+ , getContent: function () {
1294
+ var content
1295
+ , $e = this.$element
1296
+ , o = this.options
1297
+
1298
+ content = $e.attr('data-content')
1299
+ || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
1300
+
1301
+ return content
1302
+ }
1303
+
1304
+ , tip: function () {
1305
+ if (!this.$tip) {
1306
+ this.$tip = $(this.options.template)
1307
+ }
1308
+ return this.$tip
1309
+ }
1310
+
1311
+ , destroy: function () {
1312
+ this.hide().$element.off('.' + this.type).removeData(this.type)
1313
+ }
1314
+
1315
+ })
1316
+
1317
+
1318
+ /* POPOVER PLUGIN DEFINITION
1319
+ * ======================= */
1320
+
1321
+ $.fn.popover = function (option) {
1322
+ return this.each(function () {
1323
+ var $this = $(this)
1324
+ , data = $this.data('popover')
1325
+ , options = typeof option == 'object' && option
1326
+ if (!data) $this.data('popover', (data = new Popover(this, options)))
1327
+ if (typeof option == 'string') data[option]()
1328
+ })
1329
+ }
1330
+
1331
+ $.fn.popover.Constructor = Popover
1332
+
1333
+ $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
1334
+ placement: 'right'
1335
+ , trigger: 'click'
1336
+ , content: ''
1337
+ , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
1338
+ })
1339
+
1340
+ }(window.jQuery);/* =============================================================
1341
+ * bootstrap-scrollspy.js v2.1.0
1342
+ * http://twitter.github.com/bootstrap/javascript.html#scrollspy
1343
+ * =============================================================
1344
+ * Copyright 2012 Twitter, Inc.
1345
+ *
1346
+ * Licensed under the Apache License, Version 2.0 (the "License");
1347
+ * you may not use this file except in compliance with the License.
1348
+ * You may obtain a copy of the License at
1349
+ *
1350
+ * http://www.apache.org/licenses/LICENSE-2.0
1351
+ *
1352
+ * Unless required by applicable law or agreed to in writing, software
1353
+ * distributed under the License is distributed on an "AS IS" BASIS,
1354
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1355
+ * See the License for the specific language governing permissions and
1356
+ * limitations under the License.
1357
+ * ============================================================== */
1358
+
1359
+
1360
+ !function ($) {
1361
+
1362
+ "use strict"; // jshint ;_;
1363
+
1364
+
1365
+ /* SCROLLSPY CLASS DEFINITION
1366
+ * ========================== */
1367
+
1368
+ function ScrollSpy(element, options) {
1369
+ var process = $.proxy(this.process, this)
1370
+ , $element = $(element).is('body') ? $(window) : $(element)
1371
+ , href
1372
+ this.options = $.extend({}, $.fn.scrollspy.defaults, options)
1373
+ this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
1374
+ this.selector = (this.options.target
1375
+ || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
1376
+ || '') + ' .nav li > a'
1377
+ this.$body = $('body')
1378
+ this.refresh()
1379
+ this.process()
1380
+ }
1381
+
1382
+ ScrollSpy.prototype = {
1383
+
1384
+ constructor: ScrollSpy
1385
+
1386
+ , refresh: function () {
1387
+ var self = this
1388
+ , $targets
1389
+
1390
+ this.offsets = $([])
1391
+ this.targets = $([])
1392
+
1393
+ $targets = this.$body
1394
+ .find(this.selector)
1395
+ .map(function () {
1396
+ var $el = $(this)
1397
+ , href = $el.data('target') || $el.attr('href')
1398
+ , $href = /^#\w/.test(href) && $(href)
1399
+ return ( $href
1400
+ && $href.length
1401
+ && [[ $href.position().top, href ]] ) || null
1402
+ })
1403
+ .sort(function (a, b) { return a[0] - b[0] })
1404
+ .each(function () {
1405
+ self.offsets.push(this[0])
1406
+ self.targets.push(this[1])
1407
+ })
1408
+ }
1409
+
1410
+ , process: function () {
1411
+ var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
1412
+ , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
1413
+ , maxScroll = scrollHeight - this.$scrollElement.height()
1414
+ , offsets = this.offsets
1415
+ , targets = this.targets
1416
+ , activeTarget = this.activeTarget
1417
+ , i
1418
+
1419
+ if (scrollTop >= maxScroll) {
1420
+ return activeTarget != (i = targets.last()[0])
1421
+ && this.activate ( i )
1422
+ }
1423
+
1424
+ for (i = offsets.length; i--;) {
1425
+ activeTarget != targets[i]
1426
+ && scrollTop >= offsets[i]
1427
+ && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
1428
+ && this.activate( targets[i] )
1429
+ }
1430
+ }
1431
+
1432
+ , activate: function (target) {
1433
+ var active
1434
+ , selector
1435
+
1436
+ this.activeTarget = target
1437
+
1438
+ $(this.selector)
1439
+ .parent('.active')
1440
+ .removeClass('active')
1441
+
1442
+ selector = this.selector
1443
+ + '[data-target="' + target + '"],'
1444
+ + this.selector + '[href="' + target + '"]'
1445
+
1446
+ active = $(selector)
1447
+ .parent('li')
1448
+ .addClass('active')
1449
+
1450
+ if (active.parent('.dropdown-menu').length) {
1451
+ active = active.closest('li.dropdown').addClass('active')
1452
+ }
1453
+
1454
+ active.trigger('activate')
1455
+ }
1456
+
1457
+ }
1458
+
1459
+
1460
+ /* SCROLLSPY PLUGIN DEFINITION
1461
+ * =========================== */
1462
+
1463
+ $.fn.scrollspy = function (option) {
1464
+ return this.each(function () {
1465
+ var $this = $(this)
1466
+ , data = $this.data('scrollspy')
1467
+ , options = typeof option == 'object' && option
1468
+ if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
1469
+ if (typeof option == 'string') data[option]()
1470
+ })
1471
+ }
1472
+
1473
+ $.fn.scrollspy.Constructor = ScrollSpy
1474
+
1475
+ $.fn.scrollspy.defaults = {
1476
+ offset: 10
1477
+ }
1478
+
1479
+
1480
+ /* SCROLLSPY DATA-API
1481
+ * ================== */
1482
+
1483
+ $(window).on('load', function () {
1484
+ $('[data-spy="scroll"]').each(function () {
1485
+ var $spy = $(this)
1486
+ $spy.scrollspy($spy.data())
1487
+ })
1488
+ })
1489
+
1490
+ }(window.jQuery);/* ========================================================
1491
+ * bootstrap-tab.js v2.1.0
1492
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
1493
+ * ========================================================
1494
+ * Copyright 2012 Twitter, Inc.
1495
+ *
1496
+ * Licensed under the Apache License, Version 2.0 (the "License");
1497
+ * you may not use this file except in compliance with the License.
1498
+ * You may obtain a copy of the License at
1499
+ *
1500
+ * http://www.apache.org/licenses/LICENSE-2.0
1501
+ *
1502
+ * Unless required by applicable law or agreed to in writing, software
1503
+ * distributed under the License is distributed on an "AS IS" BASIS,
1504
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1505
+ * See the License for the specific language governing permissions and
1506
+ * limitations under the License.
1507
+ * ======================================================== */
1508
+
1509
+
1510
+ !function ($) {
1511
+
1512
+ "use strict"; // jshint ;_;
1513
+
1514
+
1515
+ /* TAB CLASS DEFINITION
1516
+ * ==================== */
1517
+
1518
+ var Tab = function (element) {
1519
+ this.element = $(element)
1520
+ }
1521
+
1522
+ Tab.prototype = {
1523
+
1524
+ constructor: Tab
1525
+
1526
+ , show: function () {
1527
+ var $this = this.element
1528
+ , $ul = $this.closest('ul:not(.dropdown-menu)')
1529
+ , selector = $this.attr('data-target')
1530
+ , previous
1531
+ , $target
1532
+ , e
1533
+
1534
+ if (!selector) {
1535
+ selector = $this.attr('href')
1536
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
1537
+ }
1538
+
1539
+ if ( $this.parent('li').hasClass('active') ) return
1540
+
1541
+ previous = $ul.find('.active a').last()[0]
1542
+
1543
+ e = $.Event('show', {
1544
+ relatedTarget: previous
1545
+ })
1546
+
1547
+ $this.trigger(e)
1548
+
1549
+ if (e.isDefaultPrevented()) return
1550
+
1551
+ $target = $(selector)
1552
+
1553
+ this.activate($this.parent('li'), $ul)
1554
+ this.activate($target, $target.parent(), function () {
1555
+ $this.trigger({
1556
+ type: 'shown'
1557
+ , relatedTarget: previous
1558
+ })
1559
+ })
1560
+ }
1561
+
1562
+ , activate: function ( element, container, callback) {
1563
+ var $active = container.find('> .active')
1564
+ , transition = callback
1565
+ && $.support.transition
1566
+ && $active.hasClass('fade')
1567
+
1568
+ function next() {
1569
+ $active
1570
+ .removeClass('active')
1571
+ .find('> .dropdown-menu > .active')
1572
+ .removeClass('active')
1573
+
1574
+ element.addClass('active')
1575
+
1576
+ if (transition) {
1577
+ element[0].offsetWidth // reflow for transition
1578
+ element.addClass('in')
1579
+ } else {
1580
+ element.removeClass('fade')
1581
+ }
1582
+
1583
+ if ( element.parent('.dropdown-menu') ) {
1584
+ element.closest('li.dropdown').addClass('active')
1585
+ }
1586
+
1587
+ callback && callback()
1588
+ }
1589
+
1590
+ transition ?
1591
+ $active.one($.support.transition.end, next) :
1592
+ next()
1593
+
1594
+ $active.removeClass('in')
1595
+ }
1596
+ }
1597
+
1598
+
1599
+ /* TAB PLUGIN DEFINITION
1600
+ * ===================== */
1601
+
1602
+ $.fn.tab = function ( option ) {
1603
+ return this.each(function () {
1604
+ var $this = $(this)
1605
+ , data = $this.data('tab')
1606
+ if (!data) $this.data('tab', (data = new Tab(this)))
1607
+ if (typeof option == 'string') data[option]()
1608
+ })
1609
+ }
1610
+
1611
+ $.fn.tab.Constructor = Tab
1612
+
1613
+
1614
+ /* TAB DATA-API
1615
+ * ============ */
1616
+
1617
+ $(function () {
1618
+ $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
1619
+ e.preventDefault()
1620
+ $(this).tab('show')
1621
+ })
1622
+ })
1623
+
1624
+ }(window.jQuery);/* =============================================================
1625
+ * bootstrap-typeahead.js v2.1.0
1626
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
1627
+ * =============================================================
1628
+ * Copyright 2012 Twitter, Inc.
1629
+ *
1630
+ * Licensed under the Apache License, Version 2.0 (the "License");
1631
+ * you may not use this file except in compliance with the License.
1632
+ * You may obtain a copy of the License at
1633
+ *
1634
+ * http://www.apache.org/licenses/LICENSE-2.0
1635
+ *
1636
+ * Unless required by applicable law or agreed to in writing, software
1637
+ * distributed under the License is distributed on an "AS IS" BASIS,
1638
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1639
+ * See the License for the specific language governing permissions and
1640
+ * limitations under the License.
1641
+ * ============================================================ */
1642
+
1643
+
1644
+ !function($){
1645
+
1646
+ "use strict"; // jshint ;_;
1647
+
1648
+
1649
+ /* TYPEAHEAD PUBLIC CLASS DEFINITION
1650
+ * ================================= */
1651
+
1652
+ var Typeahead = function (element, options) {
1653
+ this.$element = $(element)
1654
+ this.options = $.extend({}, $.fn.typeahead.defaults, options)
1655
+ this.matcher = this.options.matcher || this.matcher
1656
+ this.sorter = this.options.sorter || this.sorter
1657
+ this.highlighter = this.options.highlighter || this.highlighter
1658
+ this.updater = this.options.updater || this.updater
1659
+ this.$menu = $(this.options.menu).appendTo('body')
1660
+ this.source = this.options.source
1661
+ this.shown = false
1662
+ this.listen()
1663
+ }
1664
+
1665
+ Typeahead.prototype = {
1666
+
1667
+ constructor: Typeahead
1668
+
1669
+ , select: function () {
1670
+ var val = this.$menu.find('.active').attr('data-value')
1671
+ this.$element
1672
+ .val(this.updater(val))
1673
+ .change()
1674
+ return this.hide()
1675
+ }
1676
+
1677
+ , updater: function (item) {
1678
+ return item
1679
+ }
1680
+
1681
+ , show: function () {
1682
+ var pos = $.extend({}, this.$element.offset(), {
1683
+ height: this.$element[0].offsetHeight
1684
+ })
1685
+
1686
+ this.$menu.css({
1687
+ top: pos.top + pos.height
1688
+ , left: pos.left
1689
+ })
1690
+
1691
+ this.$menu.show()
1692
+ this.shown = true
1693
+ return this
1694
+ }
1695
+
1696
+ , hide: function () {
1697
+ this.$menu.hide()
1698
+ this.shown = false
1699
+ return this
1700
+ }
1701
+
1702
+ , lookup: function (event) {
1703
+ var items
1704
+
1705
+ this.query = this.$element.val()
1706
+
1707
+ if (!this.query || this.query.length < this.options.minLength) {
1708
+ return this.shown ? this.hide() : this
1709
+ }
1710
+
1711
+ items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
1712
+
1713
+ return items ? this.process(items) : this
1714
+ }
1715
+
1716
+ , process: function (items) {
1717
+ var that = this
1718
+
1719
+ items = $.grep(items, function (item) {
1720
+ return that.matcher(item)
1721
+ })
1722
+
1723
+ items = this.sorter(items)
1724
+
1725
+ if (!items.length) {
1726
+ return this.shown ? this.hide() : this
1727
+ }
1728
+
1729
+ return this.render(items.slice(0, this.options.items)).show()
1730
+ }
1731
+
1732
+ , matcher: function (item) {
1733
+ return ~item.toLowerCase().indexOf(this.query.toLowerCase())
1734
+ }
1735
+
1736
+ , sorter: function (items) {
1737
+ var beginswith = []
1738
+ , caseSensitive = []
1739
+ , caseInsensitive = []
1740
+ , item
1741
+
1742
+ while (item = items.shift()) {
1743
+ if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
1744
+ else if (~item.indexOf(this.query)) caseSensitive.push(item)
1745
+ else caseInsensitive.push(item)
1746
+ }
1747
+
1748
+ return beginswith.concat(caseSensitive, caseInsensitive)
1749
+ }
1750
+
1751
+ , highlighter: function (item) {
1752
+ var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
1753
+ return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
1754
+ return '<strong>' + match + '</strong>'
1755
+ })
1756
+ }
1757
+
1758
+ , render: function (items) {
1759
+ var that = this
1760
+
1761
+ items = $(items).map(function (i, item) {
1762
+ i = $(that.options.item).attr('data-value', item)
1763
+ i.find('a').html(that.highlighter(item))
1764
+ return i[0]
1765
+ })
1766
+
1767
+ items.first().addClass('active')
1768
+ this.$menu.html(items)
1769
+ return this
1770
+ }
1771
+
1772
+ , next: function (event) {
1773
+ var active = this.$menu.find('.active').removeClass('active')
1774
+ , next = active.next()
1775
+
1776
+ if (!next.length) {
1777
+ next = $(this.$menu.find('li')[0])
1778
+ }
1779
+
1780
+ next.addClass('active')
1781
+ }
1782
+
1783
+ , prev: function (event) {
1784
+ var active = this.$menu.find('.active').removeClass('active')
1785
+ , prev = active.prev()
1786
+
1787
+ if (!prev.length) {
1788
+ prev = this.$menu.find('li').last()
1789
+ }
1790
+
1791
+ prev.addClass('active')
1792
+ }
1793
+
1794
+ , listen: function () {
1795
+ this.$element
1796
+ .on('blur', $.proxy(this.blur, this))
1797
+ .on('keypress', $.proxy(this.keypress, this))
1798
+ .on('keyup', $.proxy(this.keyup, this))
1799
+
1800
+ if ($.browser.webkit || $.browser.msie) {
1801
+ this.$element.on('keydown', $.proxy(this.keydown, this))
1802
+ }
1803
+
1804
+ this.$menu
1805
+ .on('click', $.proxy(this.click, this))
1806
+ .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
1807
+ }
1808
+
1809
+ , move: function (e) {
1810
+ if (!this.shown) return
1811
+
1812
+ switch(e.keyCode) {
1813
+ case 9: // tab
1814
+ case 13: // enter
1815
+ case 27: // escape
1816
+ e.preventDefault()
1817
+ break
1818
+
1819
+ case 38: // up arrow
1820
+ e.preventDefault()
1821
+ this.prev()
1822
+ break
1823
+
1824
+ case 40: // down arrow
1825
+ e.preventDefault()
1826
+ this.next()
1827
+ break
1828
+ }
1829
+
1830
+ e.stopPropagation()
1831
+ }
1832
+
1833
+ , keydown: function (e) {
1834
+ this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
1835
+ this.move(e)
1836
+ }
1837
+
1838
+ , keypress: function (e) {
1839
+ if (this.suppressKeyPressRepeat) return
1840
+ this.move(e)
1841
+ }
1842
+
1843
+ , keyup: function (e) {
1844
+ switch(e.keyCode) {
1845
+ case 40: // down arrow
1846
+ case 38: // up arrow
1847
+ break
1848
+
1849
+ case 9: // tab
1850
+ case 13: // enter
1851
+ if (!this.shown) return
1852
+ this.select()
1853
+ break
1854
+
1855
+ case 27: // escape
1856
+ if (!this.shown) return
1857
+ this.hide()
1858
+ break
1859
+
1860
+ default:
1861
+ this.lookup()
1862
+ }
1863
+
1864
+ e.stopPropagation()
1865
+ e.preventDefault()
1866
+ }
1867
+
1868
+ , blur: function (e) {
1869
+ var that = this
1870
+ setTimeout(function () { that.hide() }, 150)
1871
+ }
1872
+
1873
+ , click: function (e) {
1874
+ e.stopPropagation()
1875
+ e.preventDefault()
1876
+ this.select()
1877
+ }
1878
+
1879
+ , mouseenter: function (e) {
1880
+ this.$menu.find('.active').removeClass('active')
1881
+ $(e.currentTarget).addClass('active')
1882
+ }
1883
+
1884
+ }
1885
+
1886
+
1887
+ /* TYPEAHEAD PLUGIN DEFINITION
1888
+ * =========================== */
1889
+
1890
+ $.fn.typeahead = function (option) {
1891
+ return this.each(function () {
1892
+ var $this = $(this)
1893
+ , data = $this.data('typeahead')
1894
+ , options = typeof option == 'object' && option
1895
+ if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
1896
+ if (typeof option == 'string') data[option]()
1897
+ })
1898
+ }
1899
+
1900
+ $.fn.typeahead.defaults = {
1901
+ source: []
1902
+ , items: 8
1903
+ , menu: '<ul class="typeahead dropdown-menu"></ul>'
1904
+ , item: '<li><a href="#"></a></li>'
1905
+ , minLength: 1
1906
+ }
1907
+
1908
+ $.fn.typeahead.Constructor = Typeahead
1909
+
1910
+
1911
+ /* TYPEAHEAD DATA-API
1912
+ * ================== */
1913
+
1914
+ $(function () {
1915
+ $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
1916
+ var $this = $(this)
1917
+ if ($this.data('typeahead')) return
1918
+ e.preventDefault()
1919
+ $this.typeahead($this.data())
1920
+ })
1921
+ })
1922
+
1923
+ }(window.jQuery);
1924
+ /* ==========================================================
1925
+ * bootstrap-affix.js v2.1.0
1926
+ * http://twitter.github.com/bootstrap/javascript.html#affix
1927
+ * ==========================================================
1928
+ * Copyright 2012 Twitter, Inc.
1929
+ *
1930
+ * Licensed under the Apache License, Version 2.0 (the "License");
1931
+ * you may not use this file except in compliance with the License.
1932
+ * You may obtain a copy of the License at
1933
+ *
1934
+ * http://www.apache.org/licenses/LICENSE-2.0
1935
+ *
1936
+ * Unless required by applicable law or agreed to in writing, software
1937
+ * distributed under the License is distributed on an "AS IS" BASIS,
1938
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1939
+ * See the License for the specific language governing permissions and
1940
+ * limitations under the License.
1941
+ * ========================================================== */
1942
+
1943
+
1944
+ !function ($) {
1945
+
1946
+ "use strict"; // jshint ;_;
1947
+
1948
+
1949
+ /* AFFIX CLASS DEFINITION
1950
+ * ====================== */
1951
+
1952
+ var Affix = function (element, options) {
1953
+ this.options = $.extend({}, $.fn.affix.defaults, options)
1954
+ this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
1955
+ this.$element = $(element)
1956
+ this.checkPosition()
1957
+ }
1958
+
1959
+ Affix.prototype.checkPosition = function () {
1960
+ if (!this.$element.is(':visible')) return
1961
+
1962
+ var scrollHeight = $(document).height()
1963
+ , scrollTop = this.$window.scrollTop()
1964
+ , position = this.$element.offset()
1965
+ , offset = this.options.offset
1966
+ , offsetBottom = offset.bottom
1967
+ , offsetTop = offset.top
1968
+ , reset = 'affix affix-top affix-bottom'
1969
+ , affix
1970
+
1971
+ if (typeof offset != 'object') offsetBottom = offsetTop = offset
1972
+ if (typeof offsetTop == 'function') offsetTop = offset.top()
1973
+ if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
1974
+
1975
+ affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
1976
+ false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
1977
+ 'bottom' : offsetTop != null && scrollTop <= offsetTop ?
1978
+ 'top' : false
1979
+
1980
+ if (this.affixed === affix) return
1981
+
1982
+ this.affixed = affix
1983
+ this.unpin = affix == 'bottom' ? position.top - scrollTop : null
1984
+
1985
+ this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
1986
+ }
1987
+
1988
+
1989
+ /* AFFIX PLUGIN DEFINITION
1990
+ * ======================= */
1991
+
1992
+ $.fn.affix = function (option) {
1993
+ return this.each(function () {
1994
+ var $this = $(this)
1995
+ , data = $this.data('affix')
1996
+ , options = typeof option == 'object' && option
1997
+ if (!data) $this.data('affix', (data = new Affix(this, options)))
1998
+ if (typeof option == 'string') data[option]()
1999
+ })
2000
+ }
2001
+
2002
+ $.fn.affix.Constructor = Affix
2003
+
2004
+ $.fn.affix.defaults = {
2005
+ offset: 0
2006
+ }
2007
+
2008
+
2009
+ /* AFFIX DATA-API
2010
+ * ============== */
2011
+
2012
+ $(window).on('load', function () {
2013
+ $('[data-spy="affix"]').each(function () {
2014
+ var $spy = $(this)
2015
+ , data = $spy.data()
2016
+
2017
+ data.offset = data.offset || {}
2018
+
2019
+ data.offsetBottom && (data.offset.bottom = data.offsetBottom)
2020
+ data.offsetTop && (data.offset.top = data.offsetTop)
2021
+
2022
+ $spy.affix(data)
2023
+ })
2024
+ })
2025
+
2026
+
2027
+ }(window.jQuery);