Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

v1.0

  • Loading branch information...
commit d3784687943e0bd699d73d82a6bc6cac39689473 1 parent 0f43e98
@randx randx authored
Showing with 9,575 additions and 0 deletions.
  1. +3 −0  .rails_footnotes
  2. +1 −0  .rspec
  3. +1 −0  .rvmrc
  4. +28 −0 CHANGELOG
  5. +50 −0 Gemfile
  6. +277 −0 Gemfile.lock
  7. +19 −0 LICENSE
  8. +85 −0 README.rdoc
  9. +7 −0 Rakefile
  10. +1 −0  VERSION
  11. +4 −0 app/assets/images/.directory
  12. BIN  app/assets/images/ajax-loader.gif
  13. BIN  app/assets/images/blueprint_add.png
  14. BIN  app/assets/images/blueprint_delete.png
  15. BIN  app/assets/images/blueprint_info.png
  16. BIN  app/assets/images/blueprint_notice.png
  17. BIN  app/assets/images/dir.png
  18. BIN  app/assets/images/favicon.ico
  19. BIN  app/assets/images/favicon.png
  20. BIN  app/assets/images/git.png
  21. BIN  app/assets/images/jquery_ui/images/ui-bg_flat_0_aaaaaa_40x100.png
  22. BIN  app/assets/images/jquery_ui/images/ui-bg_flat_75_ffffff_40x100.png
  23. BIN  app/assets/images/jquery_ui/images/ui-bg_glass_55_fbf9ee_1x400.png
  24. BIN  app/assets/images/jquery_ui/images/ui-bg_glass_65_ffffff_1x400.png
  25. BIN  app/assets/images/jquery_ui/images/ui-bg_glass_75_dadada_1x400.png
  26. BIN  app/assets/images/jquery_ui/images/ui-bg_glass_75_e6e6e6_1x400.png
  27. BIN  app/assets/images/jquery_ui/images/ui-bg_glass_95_fef1ec_1x400.png
  28. BIN  app/assets/images/jquery_ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  29. BIN  app/assets/images/jquery_ui/images/ui-icons_222222_256x240.png
  30. BIN  app/assets/images/jquery_ui/images/ui-icons_2e83ff_256x240.png
  31. BIN  app/assets/images/jquery_ui/images/ui-icons_454545_256x240.png
  32. BIN  app/assets/images/jquery_ui/images/ui-icons_888888_256x240.png
  33. BIN  app/assets/images/jquery_ui/images/ui-icons_cd0a0a_256x240.png
  34. BIN  app/assets/images/list_view_icon.jpg
  35. BIN  app/assets/images/no_avatar.png
  36. BIN  app/assets/images/rails.png
  37. BIN  app/assets/images/txt.png
  38. +18 −0 app/assets/javascripts/application.js
  39. +9 −0 app/assets/javascripts/commits.js
  40. +3 −0  app/assets/javascripts/dashboard.js.coffee
  41. +3 −0  app/assets/javascripts/issues.js.coffee
  42. +791 −0 app/assets/javascripts/jquery-ui-1.8.16.custom.min.js
  43. +41 −0 app/assets/javascripts/jquery.cookie.js
  44. +845 −0 app/assets/javascripts/jquery.ui.selectmenu.js
  45. +3 −0  app/assets/javascripts/profile.js.coffee
  46. +41 −0 app/assets/javascripts/projects.js
  47. +7 −0 app/assets/stylesheets/application.css
  48. +3 −0  app/assets/stylesheets/dashboard.css.scss
  49. +135 −0 app/assets/stylesheets/highlight.css.scss
  50. +3 −0  app/assets/stylesheets/issues.css.scss
  51. +33 −0 app/assets/stylesheets/jquery.ui.selectmenu.css
  52. +3 −0  app/assets/stylesheets/profile.css.scss
  53. +541 −0 app/assets/stylesheets/projects.css.scss
  54. +44 −0 app/controllers/admin/mailer_controller.rb
  55. +74 −0 app/controllers/admin/projects_controller.rb
  56. +75 −0 app/controllers/admin/team_members_controller.rb
  57. +84 −0 app/controllers/admin/users_controller.rb
  58. +44 −0 app/controllers/application_controller.rb
  59. +44 −0 app/controllers/commits_controller.rb
  60. +5 −0 app/controllers/dashboard_controller.rb
  61. +5 −0 app/controllers/errors_controller.rb
  62. +72 −0 app/controllers/issues_controller.rb
  63. +38 −0 app/controllers/keys_controller.rb
  64. +49 −0 app/controllers/notes_controller.rb
  65. +21 −0 app/controllers/profile_controller.rb
  66. +152 −0 app/controllers/projects_controller.rb
  67. +66 −0 app/controllers/team_members_controller.rb
  68. +2 −0  app/helpers/admin/projects_helper.rb
  69. +2 −0  app/helpers/admin/users_helper.rb
  70. +77 −0 app/helpers/application_helper.rb
  71. +24 −0 app/helpers/commits_helper.rb
  72. +2 −0  app/helpers/dashboard_helper.rb
  73. +2 −0  app/helpers/issues_helper.rb
  74. +2 −0  app/helpers/keys_helper.rb
  75. +2 −0  app/helpers/profile_helper.rb
  76. +6 −0 app/helpers/projects_helper.rb
  77. +2 −0  app/helpers/team_members_helper.rb
  78. 0  app/mailers/.gitkeep
  79. +41 −0 app/mailers/notify.rb
  80. 0  app/models/.gitkeep
  81. +34 −0 app/models/ability.rb
  82. +39 −0 app/models/issue.rb
  83. +58 −0 app/models/key.rb
  84. +41 −0 app/models/note.rb
  85. +164 −0 app/models/project.rb
  86. +62 −0 app/models/user.rb
  87. +35 −0 app/models/users_project.rb
  88. +49 −0 app/uploaders/attachment_uploader.rb
  89. +6 −0 app/views/admin/_top_menu.html.haml
  90. +29 −0 app/views/admin/mailer/preview.html.haml
  91. +30 −0 app/views/admin/projects/_form.html.haml
  92. +5 −0 app/views/admin/projects/edit.html.haml
  93. +26 −0 app/views/admin/projects/index.html.haml
  94. +5 −0 app/views/admin/projects/new.html.haml
  95. +45 −0 app/views/admin/projects/show.html.haml
  96. +34 −0 app/views/admin/team_members/_form.html.haml
  97. +5 −0 app/views/admin/team_members/edit.html.haml
  98. +30 −0 app/views/admin/team_members/index.html.haml
  99. +5 −0 app/views/admin/team_members/new.html.haml
  100. +32 −0 app/views/admin/team_members/show.html.haml
  101. +38 −0 app/views/admin/users/_form.html.haml
  102. +4 −0 app/views/admin/users/edit.html.haml
  103. +24 −0 app/views/admin/users/index.html.haml
  104. +6 −0 app/views/admin/users/new.html.haml
  105. +45 −0 app/views/admin/users/show.html.haml
  106. +22 −0 app/views/commits/_commits.html.haml
  107. +58 −0 app/views/commits/_diff.html.haml
  108. +9 −0 app/views/commits/_index.html.haml
  109. +13 −0 app/views/commits/index.html.haml
  110. +2 −0  app/views/commits/index.js.erb
  111. +39 −0 app/views/commits/show.html.haml
  112. +6 −0 app/views/commits/show.js.haml
  113. +1 −0  app/views/dashboard/index.html.haml
  114. +12 −0 app/views/devise/confirmations/new.html.erb
  115. +5 −0 app/views/devise/mailer/confirmation_instructions.html.erb
  116. +8 −0 app/views/devise/mailer/reset_password_instructions.html.erb
  117. +7 −0 app/views/devise/mailer/unlock_instructions.html.erb
  118. +16 −0 app/views/devise/passwords/edit.html.erb
  119. +15 −0 app/views/devise/passwords/new.html.erb
  120. +28 −0 app/views/devise/registrations/edit.html.erb
  121. +18 −0 app/views/devise/registrations/new.html.erb
  122. +20 −0 app/views/devise/sessions/new.html.erb
  123. +25 −0 app/views/devise/shared/_links.erb
  124. +12 −0 app/views/devise/unlocks/new.html.erb
  125. +24 −0 app/views/issues/_form.html.haml
  126. +10 −0 app/views/issues/_issues.html.haml
  127. +18 −0 app/views/issues/_show.html.haml
  128. +9 −0 app/views/issues/create.js.haml
  129. +12 −0 app/views/issues/edit.js.haml
  130. +24 −0 app/views/issues/index.html.haml
  131. +2 −0  app/views/issues/index.js.haml
  132. +12 −0 app/views/issues/new.js.haml
  133. +44 −0 app/views/issues/show.html.haml
  134. +14 −0 app/views/issues/update.js.haml
  135. +16 −0 app/views/keys/_form.html.haml
  136. +4 −0 app/views/keys/_show.html.haml
  137. +8 −0 app/views/keys/create.js.haml
  138. +7 −0 app/views/keys/edit.html.haml
  139. +15 −0 app/views/keys/index.html.haml
  140. +5 −0 app/views/keys/new.html.haml
  141. +11 −0 app/views/keys/new.js.haml
  142. +18 −0 app/views/layouts/_flash.html.haml
  143. +34 −0 app/views/layouts/_head_panel.html.erb
  144. +29 −0 app/views/layouts/application.html.haml
  145. +36 −0 app/views/layouts/notify.html.haml
  146. +28 −0 app/views/notes/_form.html.haml
  147. +14 −0 app/views/notes/_notes.html.haml
  148. +19 −0 app/views/notes/_show.html.haml
  149. +8 −0 app/views/notes/create.js.haml
  150. +18 −0 app/views/notify/new_issue_email.html.haml
  151. +23 −0 app/views/notify/new_user_email.html.haml
  152. +23 −0 app/views/notify/note_commit_email.html.haml
  153. +25 −0 app/views/notify/note_issue_email.html.haml
  154. +22 −0 app/views/notify/note_wall_email.html.haml
  155. +5 −0 app/views/profile/_top_menu.html.haml
  156. +1 −0  app/views/profile/index.html.haml
  157. +20 −0 app/views/profile/password.html.haml
  158. +8 −0 app/views/profile/show.html.haml
  159. +50 −0 app/views/projects/_form.html.haml
  160. +26 −0 app/views/projects/_list.html.haml
  161. +16 −0 app/views/projects/_projects_top_menu.html.haml
  162. +14 −0 app/views/projects/_side_panel.html.haml
  163. +18 −0 app/views/projects/_team.html.haml
  164. +16 −0 app/views/projects/_tile.html.haml
  165. +24 −0 app/views/projects/_top_menu.html.haml
  166. +60 −0 app/views/projects/_tree.html.haml
  167. +21 −0 app/views/projects/_tree_file.html.haml
  168. +15 −0 app/views/projects/_tree_item.html.haml
  169. +6 −0 app/views/projects/create.js.haml
  170. +1 −0  app/views/projects/edit.html.erb
  171. +49 −0 app/views/projects/empty.html.erb
  172. +4 −0 app/views/projects/index.html.haml
  173. +1 −0  app/views/projects/new.html.erb
  174. +3 −0  app/views/projects/show.html.haml
  175. +3 −0  app/views/projects/team.html.haml
  176. +5 −0 app/views/projects/tree.html.erb
  177. +5 −0 app/views/projects/tree.js.haml
  178. +6 −0 app/views/projects/update.js.haml
  179. +1 −0  app/views/projects/wall.html.haml
  180. +25 −0 app/views/team_members/_form.html.haml
  181. +18 −0 app/views/team_members/_show.html.haml
  182. +9 −0 app/views/team_members/create.js.haml
  183. +15 −0 app/views/team_members/new.js.haml
  184. +6 −0 app/views/team_members/update.js.haml
  185. +4 −0 config.ru
  186. +48 −0 config/application.rb
  187. +6 −0 config/boot.rb
  188. +25 −0 config/database.yml
  189. +7 −0 config/environment.rb
  190. +32 −0 config/environments/development.rb
  191. +70 −0 config/environments/production.rb
  192. +42 −0 config/environments/test.rb
  193. +4 −0 config/gitosis.yml
  194. +7 −0 config/initializers/backtrace_silencers.rb
  195. +211 −0 config/initializers/devise.rb
  196. +10 −0 config/initializers/inflections.rb
  197. +1 −0  config/initializers/load_config.rb
  198. +5 −0 config/initializers/mime_types.rb
  199. +5 −0 config/initializers/rails_footnotes.rb
  200. +7 −0 config/initializers/secret_token.rb
  201. +8 −0 config/initializers/session_store.rb
  202. +14 −0 config/initializers/wrap_parameters.rb
  203. +58 −0 config/locales/devise.en.yml
  204. +10 −0 config/locales/en.yml
  205. +47 −0 config/routes.rb
  206. +5 −0 configure.rb
  207. +11 −0 db/fixtures/development/001_admin.rb
  208. +10 −0 db/fixtures/production/001_admin.rb
  209. +11 −0 db/fixtures/test/001_repo.rb
  210. +28 −0 db/migrate/20110913200833_devise_create_users.rb
  211. +11 −0 db/migrate/20110913204141_create_projects.rb
  212. +13 −0 db/migrate/20110914221600_create_users_projects.rb
  213. +5 −0 db/migrate/20110915205627_add_private_flag_to_project.rb
  214. +9 −0 db/migrate/20110915213352_create_keys.rb
  215. +5 −0 db/migrate/20110916123731_add_name_to_user.rb
  216. +7 −0 db/migrate/20110916162511_add_key_title_to_key.rb
  217. +5 −0 db/migrate/20110917212932_add_identifier_to_key.rb
  218. +13 −0 db/migrate/20110921192501_create_issues.rb
  219. +5 −0 db/migrate/20110922110156_add_code_to_project.rb
  220. +5 −0 db/migrate/20110923211333_add_status_to_issue.rb
  221. +18 −0 db/migrate/20110924214549_create_rails_admin_histories_table.rb
  222. +5 −0 db/migrate/20110924215658_add_admin_field_to_user.rb
  223. +9 −0 db/migrate/20110926082616_remove_admin.rb
  224. +12 −0 db/migrate/20110927130352_create_notes.rb
  225. +9 −0 db/migrate/20110928140106_add_project_id_for_note.rb
  226. +9 −0 db/migrate/20110928142747_change_noteable_id_for_note.rb
  227. +5 −0 db/migrate/20110928161328_add_attachment_to_note.rb
  228. +9 −0 db/migrate/20111005193700_add_allow_repo_creation_for_user.rb
  229. +5 −0 db/migrate/20111009101738_add_ownerto_project.rb
  230. +5 −0 db/migrate/20111009110913_add_projects_limit_to_user.rb
  231. +9 −0 db/migrate/20111009111204_remove_allow_create_repo_from_user.rb
  232. +3 −0  db/pkey.example
  233. +89 −0 db/schema.rb
  234. 0  db/seeds.rb
  235. +2 −0  doc/README_FOR_APP
  236. +51 −0 install/prepare.rb
  237. 0  lib/assets/.gitkeep
  238. +65 −0 lib/file_size_validator.rb
  239. +73 −0 lib/gitosis.rb
  240. 0  lib/tasks/.gitkeep
  241. +8 −0 lib/utils.rb
  242. 0  log/.gitkeep
  243. +25 −0 public/404.html
  244. +25 −0 public/422.html
  245. +25 −0 public/500.html
  246. 0  public/favicon.ico
  247. +26 −0 public/gitosis_error.html
  248. +241 −0 public/index.html.example
  249. +5 −0 public/robots.txt
  250. +6 −0 script/rails
  251. +45 −0 spec/factories.rb
  252. +29 −0 spec/factory.rb
  253. +42 −0 spec/models/issue_spec.rb
  254. +32 −0 spec/models/key_spec.rb
  255. +78 −0 spec/models/note_spec.rb
  256. +57 −0 spec/models/project_security_spec.rb
  257. +127 −0 spec/models/project_spec.rb
  258. +43 −0 spec/models/user_spec.rb
  259. +32 −0 spec/models/users_project_spec.rb
  260. +31 −0 spec/monkeypatch.rb
  261. +106 −0 spec/requests/admin/admin_projects_spec.rb
  262. +102 −0 spec/requests/admin/admin_users_spec.rb
  263. +27 −0 spec/requests/admin/security_spec.rb
  264. +24 −0 spec/requests/commits_notes_spec.rb
  265. +39 −0 spec/requests/commits_spec.rb
  266. +27 −0 spec/requests/issues_notes_spec.rb
  267. +147 −0 spec/requests/issues_spec.rb
  268. +54 −0 spec/requests/keys_spec.rb
  269. +55 −0 spec/requests/profile_spec.rb
  270. +111 −0 spec/requests/projects_security_spec.rb
  271. +152 −0 spec/requests/projects_spec.rb
  272. +92 −0 spec/requests/projects_tree_spec.rb
  273. +33 −0 spec/requests/projects_wall_spec.rb
  274. +46 −0 spec/requests/team_members_spec.rb
  275. +34 −0 spec/requests/top_panel_spec.rb
  276. +37 −0 spec/requests/user_security_spec.rb
  277. BIN  spec/seed_project.tar.gz
  278. +56 −0 spec/spec_helper.rb
  279. +6 −0 spec/support/js_patch.rb
  280. +29 −0 spec/support/login.rb
  281. +46 −0 spec/support/matchers.rb
  282. 0  spec/support/security.rb
  283. +18 −0 spec/support/shared_examples.rb
  284. +25 −0 spec/support/valid_commit.rb
  285. 0  vendor/assets/stylesheets/.gitkeep
  286. +36 −0 vendor/assets/stylesheets/blueprint/ie.css
  287. BIN  vendor/assets/stylesheets/blueprint/plugins/buttons/icons/cross.png
  288. BIN  vendor/assets/stylesheets/blueprint/plugins/buttons/icons/key.png
  289. BIN  vendor/assets/stylesheets/blueprint/plugins/buttons/icons/tick.png
  290. +32 −0 vendor/assets/stylesheets/blueprint/plugins/buttons/readme.txt
  291. +97 −0 vendor/assets/stylesheets/blueprint/plugins/buttons/screen.css
  292. +14 −0 vendor/assets/stylesheets/blueprint/plugins/fancy-type/readme.txt
  293. +71 −0 vendor/assets/stylesheets/blueprint/plugins/fancy-type/screen.css
  294. BIN  vendor/assets/stylesheets/blueprint/plugins/link-icons/icons/doc.png
  295. BIN  vendor/assets/stylesheets/blueprint/plugins/link-icons/icons/email.png
  296. BIN  vendor/assets/stylesheets/blueprint/plugins/link-icons/icons/external.png
  297. BIN  vendor/assets/stylesheets/blueprint/plugins/link-icons/icons/feed.png
  298. BIN  vendor/assets/stylesheets/blueprint/plugins/link-icons/icons/im.png
  299. BIN  vendor/assets/stylesheets/blueprint/plugins/link-icons/icons/lock.png
  300. BIN  vendor/assets/stylesheets/blueprint/plugins/link-icons/icons/pdf.png
Sorry, we could not display the entire diff because too many files (317) changed.
View
3  .rails_footnotes
@@ -0,0 +1,3 @@
+#this code temporarily disables notes for all controllers
+# Footnotes::Filter.notes = []
+
View
1  .rspec
@@ -0,0 +1 @@
+--colour
View
1  .rvmrc
@@ -0,0 +1 @@
+rvm use 1.9.2-p290
View
28 CHANGELOG
@@ -0,0 +1,28 @@
+v 1.0.0
+ - bug fix
+ - projects preview mode
+v 0.9.6
+ - css fix
+ - new repo empty tree until restart server - fixed
+v 0.9.4
+ - security improved
+ - authorization improved
+ - html escaping
+ - bug fix
+ - increassed test coverage
+ - design improvements
+
+v 0.9.1
+ - increassed test coverage
+ - design improvements
+ - new issue email notification
+ - updated app name
+ - issue redesigned
+ - issue can be edit
+v 0.8.0
+ - sytax highlight for main file types
+ - redesign
+ - stability
+ - security fixes
+ - increased test coverage
+ - email notification
View
50 Gemfile
@@ -0,0 +1,50 @@
+source 'http://rubygems.org'
+
+gem 'rails', '3.1.0'
+
+gem 'sqlite3'
+gem 'devise', "1.4.7"
+gem 'stamp'
+gem 'will_paginate', '~> 3.0'
+gem 'haml-rails'
+gem 'jquery-rails'
+gem 'grit', :git => 'git://github.com/gitlabhq/grit.git'
+gem "carrierwave"
+gem 'six'
+gem 'therubyracer'
+gem 'faker'
+gem 'seed-fu', :branch => 'rails-3-1', :git => 'git://github.com/mbleigh/seed-fu.git'
+gem "inifile"
+gem "albino", :git => "git://github.com/gitlabhq/albino.git"
+gem "kaminari"
+gem "thin"
+gem "git"
+
+group :assets do
+ gem 'sass-rails', " ~> 3.1.0"
+ gem 'coffee-rails', "~> 3.1.0"
+ gem 'uglifier'
+end
+
+group :development do
+ gem 'rails-footnotes', '>= 3.7.5.rc4'
+ gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
+end
+
+group :development, :test do
+ gem 'rspec-rails'
+ gem 'shoulda'
+ gem 'capybara'
+ gem 'autotest'
+ gem 'autotest-rails'
+ gem 'ruby-debug19', :require => 'ruby-debug'
+ gem 'awesome_print'
+ gem 'database_cleaner'
+ gem 'launchy'
+end
+
+
+group :test do
+ gem 'turn', :require => false
+ gem 'simplecov', :require => false
+end
View
277 Gemfile.lock
@@ -0,0 +1,277 @@
+GIT
+ remote: git://github.com/ctran/annotate_models.git
+ revision: cfeec96c9ca0fa5035b10be3d73e798cc4fc52f7
+ specs:
+ annotate (2.4.1.beta1)
+
+GIT
+ remote: git://github.com/gitlabhq/albino.git
+ revision: 118380924969f3a856659f86ea1f40c1ba7bfcb1
+ specs:
+ albino (1.3.3)
+ posix-spawn (>= 0.3.6)
+
+GIT
+ remote: git://github.com/gitlabhq/grit.git
+ revision: ff015074ef35bd94cba943f9c0f98e161ab5851c
+ specs:
+ grit (2.4.1)
+ diff-lcs (~> 1.1)
+ mime-types (~> 1.15)
+ posix-spawn (~> 0.3.6)
+
+GIT
+ remote: git://github.com/mbleigh/seed-fu.git
+ revision: 29fe8c61ca6cc4408115ea7475fe2647081bd348
+ branch: rails-3-1
+ specs:
+ seed-fu (2.0.1.rails31)
+ activerecord (~> 3.1.0.rc4)
+ activesupport (~> 3.1.0.rc4)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ ZenTest (4.5.0)
+ actionmailer (3.1.0)
+ actionpack (= 3.1.0)
+ mail (~> 2.3.0)
+ actionpack (3.1.0)
+ activemodel (= 3.1.0)
+ activesupport (= 3.1.0)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ i18n (~> 0.6)
+ rack (~> 1.3.2)
+ rack-cache (~> 1.0.3)
+ rack-mount (~> 0.8.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.0.0)
+ activemodel (3.1.0)
+ activesupport (= 3.1.0)
+ bcrypt-ruby (~> 3.0.0)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.0)
+ activemodel (= 3.1.0)
+ activesupport (= 3.1.0)
+ arel (~> 2.2.1)
+ tzinfo (~> 0.3.29)
+ activeresource (3.1.0)
+ activemodel (= 3.1.0)
+ activesupport (= 3.1.0)
+ activesupport (3.1.0)
+ multi_json (~> 1.0)
+ addressable (2.2.6)
+ ansi (1.3.0)
+ archive-tar-minitar (0.5.2)
+ arel (2.2.1)
+ autotest (4.4.6)
+ ZenTest (>= 4.4.1)
+ autotest-rails (4.1.1)
+ ZenTest (= 4.5)
+ awesome_print (0.4.0)
+ bcrypt-ruby (3.0.1)
+ builder (3.0.0)
+ capybara (1.0.1)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (~> 2.0)
+ xpath (~> 0.1.4)
+ carrierwave (0.5.7)
+ activesupport (~> 3.0)
+ childprocess (0.2.2)
+ ffi (~> 1.0.6)
+ coffee-rails (3.1.1)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.1.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.1.2)
+ columnize (0.3.4)
+ daemons (1.1.4)
+ database_cleaner (0.6.7)
+ devise (1.4.7)
+ bcrypt-ruby (~> 3.0)
+ orm_adapter (~> 0.0.3)
+ warden (~> 1.0.3)
+ diff-lcs (1.1.3)
+ erubis (2.7.0)
+ eventmachine (0.12.10)
+ execjs (1.2.6)
+ multi_json (~> 1.0)
+ faker (0.9.5)
+ i18n (~> 0.4)
+ ffi (1.0.9)
+ git (1.2.5)
+ haml (3.1.3)
+ haml-rails (0.3.4)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ haml (~> 3.0)
+ railties (~> 3.0)
+ hike (1.2.1)
+ i18n (0.6.0)
+ inifile (0.4.1)
+ jquery-rails (1.0.14)
+ railties (~> 3.0)
+ thor (~> 0.14)
+ json_pure (1.5.4)
+ spruz (~> 0.2.8)
+ kaminari (0.12.4)
+ rails (>= 3.0.0)
+ launchy (2.0.5)
+ addressable (~> 2.2.6)
+ libv8 (3.3.10.2)
+ linecache19 (0.5.12)
+ ruby_core_source (>= 0.1.4)
+ mail (2.3.0)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
+ multi_json (1.0.3)
+ nokogiri (1.5.0)
+ orm_adapter (0.0.5)
+ polyglot (0.3.2)
+ posix-spawn (0.3.6)
+ rack (1.3.2)
+ rack-cache (1.0.3)
+ rack (>= 0.4)
+ rack-mount (0.8.3)
+ rack (>= 1.0.0)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rails (3.1.0)
+ actionmailer (= 3.1.0)
+ actionpack (= 3.1.0)
+ activerecord (= 3.1.0)
+ activeresource (= 3.1.0)
+ activesupport (= 3.1.0)
+ bundler (~> 1.0)
+ railties (= 3.1.0)
+ rails-footnotes (3.7.5.rc4)
+ rails (>= 3.0.0)
+ railties (3.1.0)
+ actionpack (= 3.1.0)
+ activesupport (= 3.1.0)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2)
+ rdoc (3.9.4)
+ rspec (2.6.0)
+ rspec-core (~> 2.6.0)
+ rspec-expectations (~> 2.6.0)
+ rspec-mocks (~> 2.6.0)
+ rspec-core (2.6.4)
+ rspec-expectations (2.6.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.6.0)
+ rspec-rails (2.6.1)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ railties (~> 3.0)
+ rspec (~> 2.6.0)
+ ruby-debug-base19 (0.11.25)
+ columnize (>= 0.3.1)
+ linecache19 (>= 0.5.11)
+ ruby_core_source (>= 0.1.4)
+ ruby-debug19 (0.11.6)
+ columnize (>= 0.3.1)
+ linecache19 (>= 0.5.11)
+ ruby-debug-base19 (>= 0.11.19)
+ ruby_core_source (0.1.5)
+ archive-tar-minitar (>= 0.5.2)
+ rubyzip (0.9.4)
+ sass (3.1.7)
+ sass-rails (3.1.1)
+ actionpack (~> 3.1.0)
+ railties (~> 3.1.0)
+ sass (>= 3.1.4)
+ tilt (~> 1.3.2)
+ selenium-webdriver (2.5.0)
+ childprocess (>= 0.2.1)
+ ffi (>= 1.0.7)
+ json_pure
+ rubyzip
+ shoulda (2.11.3)
+ simplecov (0.5.3)
+ multi_json (~> 1.0.3)
+ simplecov-html (~> 0.5.3)
+ simplecov-html (0.5.3)
+ six (0.2.0)
+ sprockets (2.0.0)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ spruz (0.2.13)
+ sqlite3 (1.3.4)
+ stamp (0.1.6)
+ therubyracer (0.9.4)
+ libv8 (~> 3.3.10)
+ thin (1.2.11)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ turn (0.8.2)
+ ansi (>= 1.2.2)
+ tzinfo (0.3.29)
+ uglifier (1.0.3)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
+ warden (1.0.5)
+ rack (>= 1.0)
+ will_paginate (3.0.0)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ albino!
+ annotate!
+ autotest
+ autotest-rails
+ awesome_print
+ capybara
+ carrierwave
+ coffee-rails (~> 3.1.0)
+ database_cleaner
+ devise (= 1.4.7)
+ faker
+ git
+ grit!
+ haml-rails
+ inifile
+ jquery-rails
+ kaminari
+ launchy
+ rails (= 3.1.0)
+ rails-footnotes (>= 3.7.5.rc4)
+ rspec-rails
+ ruby-debug19
+ sass-rails (~> 3.1.0)
+ seed-fu!
+ shoulda
+ simplecov
+ six
+ sqlite3
+ stamp
+ therubyracer
+ thin
+ turn
+ uglifier
+ will_paginate (~> 3.0)
View
19 LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Dmitriy Zaporozhets
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
85 README.rdoc
@@ -0,0 +1,85 @@
+== Welcome to GitLab
+
+GitLAb is a free Project/Repository managment application
+
+== Application details
+
+rails 3.1
+works only with gitosis
+sqlite as default db
+
+
+== Requirements
+
+* ruby 1.9.2
+
+* sqlite
+
+* git
+
+* gitosis
+
+* ubuntu/debian
+
+* pygments lib - sudo easy_install pygments
+
+
+== Install Project
+
+
+ git clone git://github.com/gitlabhq/gitlabhq.git
+ cd gitlabhq/
+
+ # install this library first
+ sudo easy_install pygments
+
+ sudo gem install bundler
+ bundle
+
+ RAILS_ENV=production rake db:setup
+
+ # create admin user
+ # login....admin@local.host
+ # pass.....5iveL!fe
+ RAILS_ENV=production rake db:seed_fu
+
+Install gitosis, edit conf/gitosis.yml & start server
+
+ rails s
+
+== Install Gitosis
+ sudo aptitude install gitosis
+
+ sudo adduser \
+ --system \
+ --shell /bin/sh \
+ --gecos 'git version control' \
+ --group \
+ --disabled-password \
+ --home /home/git \
+ git
+
+
+ ssh-keygen -t rsa
+
+ sudo -H -u git gitosis-init < ~/.ssh/id_rsa.pub
+ sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
+
+
+== Install ruby 1.9.2
+
+ sudo aptitude install git-core curl gcc checkinstall libxml2-dev libxslt-dev sqlite3 libsqlite3-dev libcurl4-openssl-dev libreadline5-dev libc6-dev libssl-dev libmysql++-dev make build-essential zlib1g-dev
+
+ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
+
+ tar xfvz ruby-1.9.2-p290.tar.gz
+
+ cd ruby-1.9.2-p290
+ ./configure
+ make
+ sudo checkinstall -D
+
+ sudo gem update --system
+
+
+ echo "gem: --no-rdoc --no-ri" > ~/.gemrc
View
7 Rakefile
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Gitlab::Application.load_tasks
View
1  VERSION
@@ -0,0 +1 @@
+1.0.0
View
4 app/assets/images/.directory
@@ -0,0 +1,4 @@
+[Dolphin]
+ShowPreview=true
+Timestamp=2011,9,14,20,34,18
+Version=2
View
BIN  app/assets/images/ajax-loader.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/blueprint_add.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/blueprint_delete.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/blueprint_info.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/blueprint_notice.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/dir.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/favicon.ico
Binary file not shown
View
BIN  app/assets/images/favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/git.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/jquery_ui/images/ui-bg_flat_0_aaaaaa_40x100.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/jquery_ui/images/ui-bg_flat_75_ffffff_40x100.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/jquery_ui/images/ui-bg_glass_55_fbf9ee_1x400.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/jquery_ui/images/ui-bg_glass_65_ffffff_1x400.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/jquery_ui/images/ui-bg_glass_75_dadada_1x400.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/jquery_ui/images/ui-bg_glass_75_e6e6e6_1x400.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/jquery_ui/images/ui-bg_glass_95_fef1ec_1x400.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/jquery_ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/jquery_ui/images/ui-icons_222222_256x240.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/jquery_ui/images/ui-icons_2e83ff_256x240.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/jquery_ui/images/ui-icons_454545_256x240.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/jquery_ui/images/ui-icons_888888_256x240.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/jquery_ui/images/ui-icons_cd0a0a_256x240.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/list_view_icon.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/no_avatar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/rails.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/assets/images/txt.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
18 app/assets/javascripts/application.js
@@ -0,0 +1,18 @@
+// This is a manifest file that'll be compiled into including all the files listed below.
+// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
+// be included in the compiled file accessible from http://example.com/assets/application.js
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
+
+$(function(){
+ $(".one_click_select").click(function(){
+ $(this).select();
+ });
+
+ $('select#branch').selectmenu({style:'popup', width:200});
+ $('select#tag').selectmenu({style:'popup', width:200});
+});
View
9 app/assets/javascripts/commits.js
@@ -0,0 +1,9 @@
+$(document).ready(function(){
+ $(".day-commits-table li.commit").live('click', function(e){
+ if(e.target.nodeName != "A") {
+ location.href = $(this).attr("url");
+ e.stopPropagation();
+ return false;
+ }
+ });
+});
View
3  app/assets/javascripts/dashboard.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
3  app/assets/javascripts/issues.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
791 app/assets/javascripts/jquery-ui-1.8.16.custom.min.js
791 additions, 0 deletions not shown
View
41 app/assets/javascripts/jquery.cookie.js
@@ -0,0 +1,41 @@
+/**
+ * jQuery Cookie plugin
+ *
+ * Copyright (c) 2010 Klaus Hartl (stilbuero.de)
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+jQuery.cookie = function (key, value, options) {
+
+ // key and at least value given, set cookie...
+ if (arguments.length > 1 && String(value) !== "[object Object]") {
+ options = jQuery.extend({}, options);
+
+ if (value === null || value === undefined) {
+ options.expires = -1;
+ }
+
+ if (typeof options.expires === 'number') {
+ var days = options.expires, t = options.expires = new Date();
+ t.setDate(t.getDate() + days);
+ }
+
+ value = String(value);
+
+ return (document.cookie = [
+ encodeURIComponent(key), '=',
+ options.raw ? value : encodeURIComponent(value),
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
+ options.path ? '; path=' + options.path : '',
+ options.domain ? '; domain=' + options.domain : '',
+ options.secure ? '; secure' : ''
+ ].join(''));
+ }
+
+ // key and possibly options given, get cookie...
+ options = value || {};
+ var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
+ return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
+};
View
845 app/assets/javascripts/jquery.ui.selectmenu.js
@@ -0,0 +1,845 @@
+ /*
+ * jQuery UI selectmenu dev version
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI
+ * https://github.com/fnagel/jquery-ui/wiki/Selectmenu
+ */
+
+(function($) {
+
+$.widget("ui.selectmenu", {
+ getter: "value",
+ version: "1.8",
+ eventPrefix: "selectmenu",
+ options: {
+ transferClasses: true,
+ typeAhead: "sequential",
+ style: 'dropdown',
+ positionOptions: {
+ my: "left top",
+ at: "left bottom",
+ offset: null
+ },
+ width: null,
+ menuWidth: null,
+ handleWidth: 26,
+ maxHeight: null,
+ icons: null,
+ format: null,
+ bgImage: function() {},
+ wrapperElement: "<div />"
+ },
+
+ _create: function() {
+ var self = this, o = this.options;
+
+ // set a default id value, generate a new random one if not set by developer
+ var selectmenuId = this.element.attr( 'id' ) || 'ui-selectmenu-' + Math.random().toString( 16 ).slice( 2, 10 );
+
+ // quick array of button and menu id's
+ this.ids = [ selectmenuId + '-button', selectmenuId + '-menu' ];
+
+ // define safe mouseup for future toggling
+ this._safemouseup = true;
+
+ // create menu button wrapper
+ this.newelement = $( '<a />', {
+ 'class': this.widgetBaseClass + ' ui-widget ui-state-default ui-corner-all',
+ 'id' : this.ids[ 0 ],
+ 'role': 'button',
+ 'href': '#nogo',
+ 'tabindex': this.element.attr( 'disabled' ) ? 1 : 0,
+ 'aria-haspopup': true,
+ 'aria-owns': this.ids[ 1 ]
+ });
+ this.newelementWrap = $( o.wrapperElement )
+ .append( this.newelement )
+ .insertAfter( this.element );
+
+ // transfer tabindex
+ var tabindex = this.element.attr( 'tabindex' );
+ if ( tabindex ) {
+ this.newelement.attr( 'tabindex', tabindex );
+ }
+
+ // save reference to select in data for ease in calling methods
+ this.newelement.data( 'selectelement', this.element );
+
+ // menu icon
+ this.selectmenuIcon = $( '<span class="' + this.widgetBaseClass + '-icon ui-icon"></span>' )
+ .prependTo( this.newelement );
+
+ // append status span to button
+ this.newelement.prepend( '<span class="' + self.widgetBaseClass + '-status" />' );
+
+ // make associated form label trigger focus
+ $( 'label[for="' + selectmenuId + '"]' )
+ .attr( 'for', this.ids[0] )
+ .bind( 'click.selectmenu', function() {
+ self.newelement[0].focus();
+ return false;
+ });
+
+ // click toggle for menu visibility
+ this.newelement
+ .bind('mousedown.selectmenu', function(event) {
+ self._toggle(event, true);
+ // make sure a click won't open/close instantly
+ if (o.style == "popup") {
+ self._safemouseup = false;
+ setTimeout(function() { self._safemouseup = true; }, 300);
+ }
+ return false;
+ })
+ .bind('click.selectmenu', function() {
+ return false;
+ })
+ .bind("keydown.selectmenu", function(event) {
+ var ret = false;
+ switch (event.keyCode) {
+ case $.ui.keyCode.ENTER:
+ ret = true;
+ break;
+ case $.ui.keyCode.SPACE:
+ self._toggle(event);
+ break;
+ case $.ui.keyCode.UP:
+ if (event.altKey) {
+ self.open(event);
+ } else {
+ self._moveSelection(-1);
+ }
+ break;
+ case $.ui.keyCode.DOWN:
+ if (event.altKey) {
+ self.open(event);
+ } else {
+ self._moveSelection(1);
+ }
+ break;
+ case $.ui.keyCode.LEFT:
+ self._moveSelection(-1);
+ break;
+ case $.ui.keyCode.RIGHT:
+ self._moveSelection(1);
+ break;
+ case $.ui.keyCode.TAB:
+ ret = true;
+ break;
+ default:
+ ret = true;
+ }
+ return ret;
+ })
+ .bind('keypress.selectmenu', function(event) {
+ self._typeAhead(event.which, 'mouseup');
+ return true;
+ })
+ .bind('mouseover.selectmenu focus.selectmenu', function() {
+ if (!o.disabled) {
+ $(this).addClass(self.widgetBaseClass + '-focus ui-state-hover');
+ }
+ })
+ .bind('mouseout.selectmenu blur.selectmenu', function() {
+ if (!o.disabled) {
+ $(this).removeClass(self.widgetBaseClass + '-focus ui-state-hover');
+ }
+ });
+
+ // document click closes menu
+ $(document).bind("mousedown.selectmenu", function(event) {
+ self.close(event);
+ });
+
+ // change event on original selectmenu
+ this.element
+ .bind("click.selectmenu", function() {
+ self._refreshValue();
+ })
+ // FIXME: newelement can be null under unclear circumstances in IE8
+ // TODO not sure if this is still a problem (fnagel 20.03.11)
+ .bind("focus.selectmenu", function() {
+ if (self.newelement) {
+ self.newelement[0].focus();
+ }
+ });
+
+ // set width when not set via options
+ if (!o.width) {
+ o.width = this.element.outerWidth();
+ }
+ // set menu button width
+ this.newelement.width(o.width);
+
+ // hide original selectmenu element
+ this.element.hide();
+
+ // create menu portion, append to body
+ this.list = $( '<ul />', {
+ 'class': 'ui-widget ui-widget-content',
+ 'aria-hidden': true,
+ 'role': 'listbox',
+ 'aria-labelledby': this.ids[0],
+ 'id': this.ids[1]
+ });
+ this.listWrap = $( o.wrapperElement )
+ .addClass( self.widgetBaseClass + '-menu' )
+ .append( this.list )
+ .appendTo( 'body' );
+
+ // transfer menu click to menu button
+ this.list
+ .bind("keydown.selectmenu", function(event) {
+ var ret = false;
+ switch (event.keyCode) {
+ case $.ui.keyCode.UP:
+ if (event.altKey) {
+ self.close(event, true);
+ } else {
+ self._moveFocus(-1);
+ }
+ break;
+ case $.ui.keyCode.DOWN:
+ if (event.altKey) {
+ self.close(event, true);
+ } else {
+ self._moveFocus(1);
+ }
+ break;
+ case $.ui.keyCode.LEFT:
+ self._moveFocus(-1);
+ break;
+ case $.ui.keyCode.RIGHT:
+ self._moveFocus(1);
+ break;
+ case $.ui.keyCode.HOME:
+ self._moveFocus(':first');
+ break;
+ case $.ui.keyCode.PAGE_UP:
+ self._scrollPage('up');
+ break;
+ case $.ui.keyCode.PAGE_DOWN:
+ self._scrollPage('down');
+ break;
+ case $.ui.keyCode.END:
+ self._moveFocus(':last');
+ break;
+ case $.ui.keyCode.ENTER:
+ case $.ui.keyCode.SPACE:
+ self.close(event, true);
+ $(event.target).parents('li:eq(0)').trigger('mouseup');
+ break;
+ case $.ui.keyCode.TAB:
+ ret = true;
+ self.close(event, true);
+ $(event.target).parents('li:eq(0)').trigger('mouseup');
+ break;
+ case $.ui.keyCode.ESCAPE:
+ self.close(event, true);
+ break;
+ default:
+ ret = true;
+ }
+ return ret;
+ })
+ .bind('keypress.selectmenu', function(event) {
+ self._typeAhead(event.which, 'focus');
+ return true;
+ })
+ // this allows for using the scrollbar in an overflowed list
+ .bind( 'mousedown.selectmenu mouseup.selectmenu', function() { return false; });
+
+ // needed when window is resized
+ // TODO seems to be useless, but causes errors (fnagel 01.08.11)
+ // see: https://github.com/fnagel/jquery-ui/issues/147
+ // $(window).bind( "resize.selectmenu", $.proxy( self._refreshPosition, this ) );
+ },
+
+ _init: function() {
+ var self = this, o = this.options;
+
+ // serialize selectmenu element options
+ var selectOptionData = [];
+ this.element
+ .find('option')
+ .each(function() {
+ var opt = $(this);
+ selectOptionData.push({
+ value: opt.attr('value'),
+ text: self._formatText(opt.text()),
+ selected: opt.attr('selected'),
+ disabled: opt.attr('disabled'),
+ classes: opt.attr('class'),
+ typeahead: opt.attr('typeahead'),
+ parentOptGroup: opt.parent('optgroup'),
+ bgImage: o.bgImage.call(opt)
+ });
+ });
+
+ // active state class is only used in popup style
+ var activeClass = (self.options.style == "popup") ? " ui-state-active" : "";
+
+ // empty list so we can refresh the selectmenu via selectmenu()
+ this.list.html("");
+
+ // write li's
+ if (selectOptionData.length) {
+ for (var i = 0; i < selectOptionData.length; i++) {
+ var thisLiAttr = { role : 'presentation' };
+ if ( selectOptionData[ i ].disabled ) {
+ thisLiAttr[ 'class' ] = this.namespace + '-state-disabled';
+ }
+ var thisAAttr = {
+ html: selectOptionData[i].text,
+ href : '#nogo',
+ tabindex : -1,
+ role : 'option',
+ 'aria-selected' : false
+ };
+ if ( selectOptionData[ i ].disabled ) {
+ thisAAttr[ 'aria-disabled' ] = selectOptionData[ i ].disabled;
+ }
+ if ( selectOptionData[ i ].typeahead ) {
+ thisAAttr[ 'typeahead' ] = selectOptionData[ i ].typeahead;
+ }
+ var thisA = $('<a/>', thisAAttr);
+ var thisLi = $('<li/>', thisLiAttr)
+ .append(thisA)
+ .data('index', i)
+ .addClass(selectOptionData[i].classes)
+ .data('optionClasses', selectOptionData[i].classes || '')
+ .bind("mouseup.selectmenu", function(event) {
+ if (self._safemouseup && !self._disabled(event.currentTarget) && !self._disabled($( event.currentTarget ).parents( "ul>li." + self.widgetBaseClass + "-group " )) ) {
+ var changed = $(this).data('index') != self._selectedIndex();
+ self.index($(this).data('index'));
+ self.select(event);
+ if (changed) {
+ self.change(event);
+ }
+ self.close(event, true);
+ }
+ return false;
+ })
+ .bind("click.selectmenu", function() {
+ return false;
+ })
+ .bind('mouseover.selectmenu focus.selectmenu', function(e) {
+ // no hover if diabled
+ if (!$(e.currentTarget).hasClass(self.namespace + '-state-disabled') && !$(e.currentTarget).parent("ul").parent("li").hasClass(self.namespace + '-state-disabled')) {
+ self._selectedOptionLi().addClass(activeClass);
+ self._focusedOptionLi().removeClass(self.widgetBaseClass + '-item-focus ui-state-hover');
+ $(this).removeClass('ui-state-active').addClass(self.widgetBaseClass + '-item-focus ui-state-hover');
+ }
+ })
+ .bind('mouseout.selectmenu blur.selectmenu', function() {
+ if ($(this).is(self._selectedOptionLi().selector)) {
+ $(this).addClass(activeClass);
+ }
+ $(this).removeClass(self.widgetBaseClass + '-item-focus ui-state-hover');
+ });
+
+ // optgroup or not...
+ if ( selectOptionData[i].parentOptGroup.length ) {
+ var optGroupName = self.widgetBaseClass + '-group-' + this.element.find( 'optgroup' ).index( selectOptionData[i].parentOptGroup );
+ if (this.list.find( 'li.' + optGroupName ).length ) {
+ this.list.find( 'li.' + optGroupName + ':last ul' ).append( thisLi );
+ } else {
+ $(' <li role="presentation" class="' + self.widgetBaseClass + '-group ' + optGroupName + (selectOptionData[i].parentOptGroup.attr("disabled") ? ' ' + this.namespace + '-state-disabled" aria-disabled="true"' : '"' ) + '><span class="' + self.widgetBaseClass + '-group-label">' + selectOptionData[i].parentOptGroup.attr('label') + '</span><ul></ul></li> ')
+ .appendTo( this.list )
+ .find( 'ul' )
+ .append( thisLi );
+ }
+ } else {
+ thisLi.appendTo(this.list);
+ }
+
+ // append icon if option is specified
+ if (o.icons) {
+ for (var j in o.icons) {
+ if (thisLi.is(o.icons[j].find)) {
+ thisLi
+ .data('optionClasses', selectOptionData[i].classes + ' ' + self.widgetBaseClass + '-hasIcon')
+ .addClass(self.widgetBaseClass + '-hasIcon');
+ var iconClass = o.icons[j].icon || "";
+ thisLi
+ .find('a:eq(0)')
+ .prepend('<span class="' + self.widgetBaseClass + '-item-icon ui-icon ' + iconClass + '"></span>');
+ if (selectOptionData[i].bgImage) {
+ thisLi.find('span').css('background-image', selectOptionData[i].bgImage);
+ }
+ }
+ }
+ }
+ }
+ } else {
+ $('<li role="presentation"><a href="#nogo" tabindex="-1" role="option"></a></li>').appendTo(this.list);
+ }
+ // we need to set and unset the CSS classes for dropdown and popup style
+ var isDropDown = ( o.style == 'dropdown' );
+ this.newelement
+ .toggleClass( self.widgetBaseClass + '-dropdown', isDropDown )
+ .toggleClass( self.widgetBaseClass + '-popup', !isDropDown );
+ this.list
+ .toggleClass( self.widgetBaseClass + '-menu-dropdown ui-corner-bottom', isDropDown )
+ .toggleClass( self.widgetBaseClass + '-menu-popup ui-corner-all', !isDropDown )
+ // add corners to top and bottom menu items
+ .find( 'li:first' )
+ .toggleClass( 'ui-corner-top', !isDropDown )
+ .end().find( 'li:last' )
+ .addClass( 'ui-corner-bottom' );
+ this.selectmenuIcon
+ .toggleClass( 'ui-icon-triangle-1-s', isDropDown )
+ .toggleClass( 'ui-icon-triangle-2-n-s', !isDropDown );
+
+ // transfer classes to selectmenu and list
+ if ( o.transferClasses ) {
+ var transferClasses = this.element.attr( 'class' ) || '';
+ this.newelement.add( this.list ).addClass( transferClasses );
+ }
+
+ // set menu width to either menuWidth option value, width option value, or select width
+ if ( o.style == 'dropdown' ) {
+ this.list.width( o.menuWidth ? o.menuWidth : o.width );
+ } else {
+ this.list.width( o.menuWidth ? o.menuWidth : o.width - o.handleWidth );
+ }
+
+ // reset height to auto
+ this.list.css( 'height', 'auto' );
+ var listH = this.listWrap.height();
+ // calculate default max height
+ if ( o.maxHeight && o.maxHeight < listH ) {
+ this.list.height( o.maxHeight );
+ } else {
+ var winH = $( window ).height() / 3;
+ if ( winH < listH ) this.list.height( winH );
+ }
+
+ // save reference to actionable li's (not group label li's)
+ this._optionLis = this.list.find( 'li:not(.' + self.widgetBaseClass + '-group)' );
+
+ // transfer disabled state
+ if ( this.element.attr( 'disabled' ) ) {
+ this.disable();
+ } else {
+ this.enable()
+ }
+
+ // update value
+ this.index( this._selectedIndex() );
+
+ // needed when selectmenu is placed at the very bottom / top of the page
+ window.setTimeout( function() {
+ self._refreshPosition();
+ }, 200 );
+ },
+
+ destroy: function() {
+ this.element.removeData( this.widgetName )
+ .removeClass( this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled' )
+ .removeAttr( 'aria-disabled' )
+ .unbind( ".selectmenu" );
+
+ // TODO unneded as event binding has been disabled
+ // $( window ).unbind( ".selectmenu" );
+ $( document ).unbind( ".selectmenu" );
+
+ // unbind click on label, reset its for attr
+ $( 'label[for=' + this.newelement.attr('id') + ']' )
+ .attr( 'for', this.element.attr( 'id' ) )
+ .unbind( '.selectmenu' );
+
+ this.newelementWrap.remove();
+ this.listWrap.remove();
+
+ this.element.show();
+
+ // call widget destroy function
+ $.Widget.prototype.destroy.apply(this, arguments);
+ },
+
+ _typeAhead: function( code, eventType ){
+ var self = this, focusFound = false, C = String.fromCharCode(code).toUpperCase();
+ c = C.toLowerCase();
+
+ if ( self.options.typeAhead == 'sequential' ) {
+ // clear the timeout so we can use _prevChar
+ window.clearTimeout('ui.selectmenu-' + self.selectmenuId);
+
+ // define our find var
+ var find = typeof( self._prevChar ) == 'undefined' ? '' : self._prevChar.join( '' );
+
+ function focusOptSeq( elem, ind, c ){
+ focusFound = true;
+ $( elem ).trigger( eventType );
+ typeof( self._prevChar ) == 'undefined' ? self._prevChar = [ c ] : self._prevChar[ self._prevChar.length ] = c;
+ }
+ this.list.find( 'li a' ).each( function( i ) {
+ if ( !focusFound ) {
+ // allow the typeahead attribute on the option tag for a more specific lookup
+ var thisText = $( this ).attr( 'typeahead' ) || $(this).text();
+ if ( thisText.indexOf( find + C ) === 0 ) {
+ focusOptSeq( this, i, C );
+ } else if (thisText.indexOf(find+c) === 0 ) {
+ focusOptSeq( this, i, c );
+ }
+ }
+ });
+ // set a 1 second timeout for sequenctial typeahead
+ // keep this set even if we have no matches so it doesnt typeahead somewhere else
+ window.setTimeout( function( el ) {
+ self._prevChar = undefined;
+ }, 1000, self );
+
+ } else {
+ // define self._prevChar if needed
+ if ( !self._prevChar ) { self._prevChar = [ '' , 0 ]; }
+
+ focusFound = false;
+ function focusOpt( elem, ind ){
+ focusFound = true;
+ $( elem ).trigger( eventType );
+ self._prevChar[ 1 ] = ind;
+ }
+ this.list.find( 'li a' ).each(function( i ){
+ if (!focusFound){
+ var thisText = $(this).text();
+ if ( thisText.indexOf( C ) === 0 || thisText.indexOf( c ) === 0 ) {
+ if (self._prevChar[0] == C){
+ if ( self._prevChar[ 1 ] < i ){ focusOpt( this, i ); }
+ } else{
+ focusOpt( this, i );
+ }
+ }
+ }
+ });
+ this._prevChar[ 0 ] = C;
+ }
+ },
+
+ // returns some usefull information, called by callbacks only
+ _uiHash: function() {
+ var index = this.index();
+ return {
+ index: index,
+ option: $("option", this.element).get(index),
+ value: this.element[0].value
+ };
+ },
+
+ open: function(event) {
+ var self = this, o = this.options;
+ if ( self.newelement.attr("aria-disabled") != 'true' ) {
+ self._closeOthers(event);
+ self.newelement.addClass('ui-state-active');
+
+ self.listWrap.appendTo( o.appendTo );
+ self.list.attr('aria-hidden', false);
+
+ if ( o.style == "dropdown" ) {
+ self.newelement.removeClass('ui-corner-all').addClass('ui-corner-top');
+ }
+
+ self.listWrap.addClass( self.widgetBaseClass + '-open' );
+ // positioning needed for IE7 (tested 01.08.11 on MS VPC Image)
+ // see https://github.com/fnagel/jquery-ui/issues/147
+ if ( $.browser.msie && $.browser.version.substr( 0,1 ) == 7 ) {
+ self._refreshPosition();
+ }
+ var selected = self.list.attr('aria-hidden', false).find('li:not(.' + self.widgetBaseClass + '-group):eq(' + self._selectedIndex() + '):visible a');
+ if (selected.length) selected[0].focus();
+ // positioning needed for FF, Chrome, IE8, IE7, IE6 (tested 01.08.11 on MS VPC Image)
+ self._refreshPosition();
+
+ self._trigger("open", event, self._uiHash());
+ }
+ },
+
+ close: function(event, retainFocus) {
+ if ( this.newelement.is('.ui-state-active') ) {
+ this.newelement
+ .removeClass('ui-state-active');
+ this.listWrap.removeClass(this.widgetBaseClass + '-open');
+ this.list.attr('aria-hidden', true);
+ if ( this.options.style == "dropdown" ) {
+ this.newelement.removeClass('ui-corner-top').addClass('ui-corner-all');
+ }
+ if ( retainFocus ) {
+ this.newelement.focus();
+ }
+ this._trigger("close", event, this._uiHash());
+ }
+ },
+
+ change: function(event) {
+ this.element.trigger("change");
+ this._trigger("change", event, this._uiHash());
+ },
+
+ select: function(event) {
+ if (this._disabled(event.currentTarget)) { return false; }
+ this._trigger("select", event, this._uiHash());
+ },
+
+ _closeOthers: function(event) {
+ $('.' + this.widgetBaseClass + '.ui-state-active').not(this.newelement).each(function() {
+ $(this).data('selectelement').selectmenu('close', event);
+ });
+ $('.' + this.widgetBaseClass + '.ui-state-hover').trigger('mouseout');
+ },
+
+ _toggle: function(event, retainFocus) {
+ if ( this.list.parent().is('.' + this.widgetBaseClass + '-open') ) {
+ this.close(event, retainFocus);
+ } else {
+ this.open(event);
+ }
+ },
+
+ _formatText: function(text) {
+ return (this.options.format ? this.options.format(text) : text);
+ },
+
+ _selectedIndex: function() {
+ return this.element[0].selectedIndex;
+ },
+
+ _selectedOptionLi: function() {
+ return this._optionLis.eq(this._selectedIndex());
+ },
+
+ _focusedOptionLi: function() {
+ return this.list.find('.' + this.widgetBaseClass + '-item-focus');
+ },
+
+ _moveSelection: function(amt, recIndex) {
+ // do nothing if disabled
+ if (!this.options.disabled) {
+ var currIndex = parseInt(this._selectedOptionLi().data('index') || 0, 10);
+ var newIndex = currIndex + amt;
+ // do not loop when using up key
+
+ if (newIndex < 0) {
+ newIndex = 0;
+ }
+ if (newIndex > this._optionLis.size() - 1) {
+ newIndex = this._optionLis.size() - 1;
+ }
+ // Occurs when a full loop has been made
+ if (newIndex === recIndex) { return false; }
+
+ if (this._optionLis.eq(newIndex).hasClass( this.namespace + '-state-disabled' )) {
+ // if option at newIndex is disabled, call _moveFocus, incrementing amt by one
+ (amt > 0) ? ++amt : --amt;
+ this._moveSelection(amt, newIndex);
+ } else {
+ return this._optionLis.eq(newIndex).trigger('mouseup');
+ }
+ }
+ },
+
+ _moveFocus: function(amt, recIndex) {
+ if (!isNaN(amt)) {
+ var currIndex = parseInt(this._focusedOptionLi().data('index') || 0, 10);
+ var newIndex = currIndex + amt;
+ } else {
+ var newIndex = parseInt(this._optionLis.filter(amt).data('index'), 10);
+ }
+
+ if (newIndex < 0) {
+ newIndex = 0;
+ }
+ if (newIndex > this._optionLis.size() - 1) {
+ newIndex = this._optionLis.size() - 1;
+ }
+
+ //Occurs when a full loop has been made
+ if (newIndex === recIndex) { return false; }
+
+ var activeID = this.widgetBaseClass + '-item-' + Math.round(Math.random() * 1000);
+
+ this._focusedOptionLi().find('a:eq(0)').attr('id', '');
+
+ if (this._optionLis.eq(newIndex).hasClass( this.namespace + '-state-disabled' )) {
+ // if option at newIndex is disabled, call _moveFocus, incrementing amt by one
+ (amt > 0) ? ++amt : --amt;
+ this._moveFocus(amt, newIndex);
+ } else {
+ this._optionLis.eq(newIndex).find('a:eq(0)').attr('id',activeID).focus();
+ }
+
+ this.list.attr('aria-activedescendant', activeID);
+ },
+
+ _scrollPage: function(direction) {
+ var numPerPage = Math.floor(this.list.outerHeight() / this.list.find('li:first').outerHeight());
+ numPerPage = (direction == 'up' ? -numPerPage : numPerPage);
+ this._moveFocus(numPerPage);
+ },
+
+ _setOption: function(key, value) {
+ this.options[key] = value;
+ // set
+ if (key == 'disabled') {
+ this.close();
+ this.element
+ .add(this.newelement)
+ .add(this.list)[value ? 'addClass' : 'removeClass'](
+ this.widgetBaseClass + '-disabled' + ' ' +
+ this.namespace + '-state-disabled')
+ .attr("aria-disabled", value);
+ }
+ },
+
+ disable: function(index, type){
+ // if options is not provided, call the parents disable function
+ if ( typeof( index ) == 'undefined' ) {
+ this._setOption( 'disabled', true );
+ } else {
+ if ( type == "optgroup" ) {
+ this._disableOptgroup(index);
+ } else {
+ this._disableOption(index);
+ }
+ }
+ },
+
+ enable: function(index, type) {
+ // if options is not provided, call the parents enable function
+ if ( typeof( index ) == 'undefined' ) {
+ this._setOption('disabled', false);
+ } else {
+ if ( type == "optgroup" ) {
+ this._enableOptgroup(index);
+ } else {
+ this._enableOption(index);
+ }
+ }
+ },
+
+ _disabled: function(elem) {
+ return $(elem).hasClass( this.namespace + '-state-disabled' );
+ },
+
+
+ _disableOption: function(index) {
+ var optionElem = this._optionLis.eq(index);
+ if (optionElem) {
+ optionElem.addClass(this.namespace + '-state-disabled')
+ .find("a").attr("aria-disabled", true);
+ this.element.find("option").eq(index).attr("disabled", "disabled");
+ }
+ },
+
+ _enableOption: function(index) {
+ var optionElem = this._optionLis.eq(index);
+ if (optionElem) {
+ optionElem.removeClass( this.namespace + '-state-disabled' )
+ .find("a").attr("aria-disabled", false);
+ this.element.find("option").eq(index).removeAttr("disabled");
+ }
+ },
+
+ _disableOptgroup: function(index) {
+ var optGroupElem = this.list.find( 'li.' + this.widgetBaseClass + '-group-' + index );
+ if (optGroupElem) {
+ optGroupElem.addClass(this.namespace + '-state-disabled')
+ .attr("aria-disabled", true);
+ this.element.find("optgroup").eq(index).attr("disabled", "disabled");
+ }
+ },
+
+ _enableOptgroup: function(index) {
+ var optGroupElem = this.list.find( 'li.' + this.widgetBaseClass + '-group-' + index );
+ if (optGroupElem) {
+ optGroupElem.removeClass(this.namespace + '-state-disabled')
+ .attr("aria-disabled", false);
+ this.element.find("optgroup").eq(index).removeAttr("disabled");
+ }
+ },
+
+ index: function(newValue) {
+ if (arguments.length) {
+ if (!this._disabled($(this._optionLis[newValue]))) {
+ this.element[0].selectedIndex = newValue;
+ this._refreshValue();
+ } else {
+ return false;
+ }
+ } else {
+ return this._selectedIndex();
+ }
+ },
+
+ value: function(newValue) {
+ if (arguments.length) {
+ this.element[0].value = newValue;
+ this._refreshValue();
+ } else {
+ return this.element[0].value;
+ }
+ },
+
+ _refreshValue: function() {
+ var activeClass = (this.options.style == "popup") ? " ui-state-active" : "";
+ var activeID = this.widgetBaseClass + '-item-' + Math.round(Math.random() * 1000);
+ // deselect previous
+ this.list
+ .find('.' + this.widgetBaseClass + '-item-selected')
+ .removeClass(this.widgetBaseClass + "-item-selected" + activeClass)
+ .find('a')
+ .attr('aria-selected', 'false')
+ .attr('id', '');
+ // select new
+ this._selectedOptionLi()
+ .addClass(this.widgetBaseClass + "-item-selected" + activeClass)
+ .find('a')
+ .attr('aria-selected', 'true')
+ .attr('id', activeID);
+
+ // toggle any class brought in from option
+ var currentOptionClasses = (this.newelement.data('optionClasses') ? this.newelement.data('optionClasses') : "");
+ var newOptionClasses = (this._selectedOptionLi().data('optionClasses') ? this._selectedOptionLi().data('optionClasses') : "");
+ this.newelement
+ .removeClass(currentOptionClasses)
+ .data('optionClasses', newOptionClasses)
+ .addClass( newOptionClasses )
+ .find('.' + this.widgetBaseClass + '-status')
+ .html(
+ this._selectedOptionLi()
+ .find('a:eq(0)')
+ .html()
+ );
+
+ this.list.attr('aria-activedescendant', activeID);
+ },
+
+ _refreshPosition: function() {
+ var o = this.options;
+
+ // if its a native pop-up we need to calculate the position of the selected li
+ if ( o.style == "popup" && !o.positionOptions.offset ) {
+ var selected = this._selectedOptionLi();
+ var _offset = "0 -" + ( selected.outerHeight() + selected.offset().top - this.list.offset().top );
+ }
+ // update zIndex if jQuery UI is able to process
+ var zIndexElement = this.element.zIndex();
+ if ( zIndexElement ) {
+ this.listWrap.css( 'zIndex', zIndexElement );
+ }
+ this.listWrap.position({
+ // set options for position plugin
+ of: o.positionOptions.of || this.newelement,
+ my: o.positionOptions.my,
+ at: o.positionOptions.at,
+ offset: o.positionOptions.offset || _offset,
+ collision: o.positionOptions.collision || 'flip'
+ });
+ }
+});
+
+})(jQuery);
View
3  app/assets/javascripts/profile.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
View
41 app/assets/javascripts/projects.js
@@ -0,0 +1,41 @@
+$(document).ready(function(){
+ $('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live("click", function() {
+ history.pushState({ path: this.path }, '', this.href)
+ })
+
+ $("#tree-slider tr.tree-item").live('click', function(e){
+ if(e.target.nodeName != "A") {
+ e.stopPropagation();
+ $(this).find("td.tree-item-file-name a").click();
+ return false;
+ }
+ });
+
+ $("#projects-list .project").live('click', function(e){
+ if(e.target.nodeName != "A" && e.target.nodeName != "INPUT") {
+ location.href = $(this).attr("url");
+ e.stopPropagation();
+ return false;
+ }
+ });
+
+ $("#issues-table .issue").live('click', function(e){
+ if(e.target.nodeName != "A" && e.target.nodeName != "INPUT") {
+ location.href = $(this).attr("url");
+ e.stopPropagation();
+ return false;
+ }
+ });
+
+ $(document).keypress(function(e) {
+ if( $(e.target).is(":input") ) return;
+ switch(e.which) {
+ case 115: focusSearch();
+ e.preventDefault();
+ }
+ });
+});
+
+function focusSearch() {
+ $("#search").focus();
+}
View
7 app/assets/stylesheets/application.css
@@ -0,0 +1,7 @@
+/*
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
+ *= require_self
+ *= require_tree .
+*/
View
3  app/assets/stylesheets/dashboard.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the Dashboard controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
135 app/assets/stylesheets/highlight.css.scss
@@ -0,0 +1,135 @@
+@mixin round-borders-all($radius) {
+ border: 1px solid #eaeaea;
+ -moz-border-radius: $radius;
+ -webkit-border-radius: $radius;
+ border-radius: $radius;
+}
+
+table.highlighttable
+{
+ margin:0px;
+ padding:0px;
+ font-size:12px;
+ table-layout:fixed
+}
+
+td.code,
+td.linenos{
+ padding:0;
+ margin:0;
+ vertical-align:top;
+}
+
+.highlight{
+ background:none;
+ padding:10px 0px 0px 0;
+ margin-left:10px;
+}
+.highlight pre{
+}
+
+.linenodiv pre {
+ white-space:pre-line;
+}
+
+td.linenos {
+ background:#ECECEC;
+ color:#777;
+ padding:10px 0px 0px 10px;
+ float:left;
+ width:45px;
+ border-right: 1px solid #ccc;
+
+}
+
+td.code .highlight {
+ overflow-x: scroll;
+}
+table.highlighttable pre{
+ padding:0;
+ margin:0;
+ font-family: 'Courier New', 'andale mono','lucida console',monospace;
+ color: #333;
+ text-align:left;
+}
+
+
+.git-empty .highlight {
+ @include round-borders-all(4px);
+ background:#eee;
+ padding:5px;
+ //overflow-x:scroll;
+ pre{
+ padding:0;
+ line-height:2.0;
+ margin:0;
+ font-family: 'Courier New', 'andale mono','lucida console',monospace;
+ color: #333;
+ text-align:left;}
+ }
+
+.shadow{
+ -webkit-box-shadow:0 5px 15px #000;
+ -moz-box-shadow:0 5px 15px #000;
+ box-shadow:0 5px 15px #000;
+}
+
+
+.hll { background-color: #ffffff }
+.c { color: #888888; font-style: italic } /* Comment */
+.err { color: #a61717; background-color: #e3d2d2 } /* Error */
+.k { color: #000000; font-weight: bold } /* Keyword */
+.cm { color: #888888 } /* Comment.Multiline */
+.cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
+.c1 { color: #888888 } /* Comment.Single */
+.cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
+.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
+.ge { font-style: italic } /* Generic.Emph */
+.gr { color: #aa0000 } /* Generic.Error */
+.gh { color: #303030 } /* Generic.Heading */
+.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
+.go { color: #888888 } /* Generic.Output */
+.gp { color: #555555 } /* Generic.Prompt */
+.gs { font-weight: bold } /* Generic.Strong */
+.gu { color: #606060 } /* Generic.Subheading */
+.gt { color: #aa0000 } /* Generic.Traceback */
+.highlight .kc{font-weight:bold;} /* Keyword.Constant */
+.highlight .kd{font-weight:bold;} /* Keyword.Declaration */
+.highlight .kn{font-weight:bold;} /* Keyword.Namespace */
+.highlight .kp{font-weight:bold;} /* Keyword.Pseudo */
+.highlight .kr{font-weight:bold;} /* Keyword.Reserved */
+.highlight .kt{color:#458;font-weight:bold;} /* Keyword.Type */
+.m { color: #0000DD; font-weight: bold } /* Literal.Number */
+.s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
+.highlight .na{color:#008080;} /* Name.Attribute */
+.highlight .nb{color:#0086B3;} /* Name.Builtin */
+.highlight .nc{color:#458;font-weight:bold;} /* Name.Class */
+.highlight .no{color:#008080;} /* Name.Constant */
+.highlight .ni{color:#800080;}
+.highlight .ne{color:#900;font-weight:bold;} /* Name.Exception */
+.highlight .nf{color:#900;font-weight:bold;} /* Name.Function */
+.highlight .nn{color:#005;font-weight:bold;} /* Name.Namespace */
+.highlight .nt{color:#000080;} /* Name.Tag */
+.highlight .nv{color:#008080;} /* Name.Variable */
+.py { color: #336699; font-weight: bold } /* Name.Property */
+.ow { color: #008800 } /* Operator.Word */
+.w { color: #bbbbbb } /* Text.Whitespace */
+.mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
+.mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
+.highlight .mi {color:#099;} /* Literal.Number.Integer */
+.mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
+.sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
+.highlight .sc{color:#d14;} /* Literal.String.Char */
+.sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
+.highlight .s2{color:#d14;} /* Literal.String.Double */
+.highlight .se{color:#d14;} /* Literal.String.Escape */
+.highlight .sh{color:#d14;} /* Literal.String.Heredoc */
+.highlight .si{color:#d14;} /* Literal.String.Interpol */
+.highlight .sx{color:#d14;} /* Literal.String.Other */
+.highlight .sr{color:#d14;} /* Literal.String.Regex */
+.highlight .s1{color:#d14;} /* Literal.String.Single */
+.highlight .ss{color:#d14;} /* Literal.String.Symbol */
+.bp { color: #003388 } /* Name.Builtin.Pseudo */
+.vc { color: #336699 } /* Name.Variable.Class */
+.vg { color: #dd7700 } /* Name.Variable.Global */
+.vi { color: #3333bb }
View
3  app/assets/stylesheets/issues.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the Issues controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
33 app/assets/stylesheets/jquery.ui.selectmenu.css
@@ -0,0 +1,33 @@
+/* Selectmenu
+----------------------------------*/
+.ui-selectmenu { background:none; font-size:12px;display: block; display: inline-block; position: relative; height: 2.2em; vertical-align: middle; text-decoration: none; overflow: hidden; zoom: 1; }
+.ui-selectmenu-icon { position:absolute; right:6px; margin-top:-8px; top: 50%; }
+.ui-selectmenu-menu { padding:0; margin:0; position:absolute; top: 0; display: none; z-index: 1005;} /* z-index: 1005