stuff_to_do_plugin 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. data/COPYRIGHT.txt +18 -0
  2. data/CREDITS.txt +6 -0
  3. data/GPL.txt +339 -0
  4. data/README.rdoc +61 -0
  5. data/Rakefile +38 -0
  6. data/VERSION +1 -0
  7. data/app/controllers/stuff_to_do_controller.rb +161 -0
  8. data/app/helpers/stuff_to_do_helper.rb +88 -0
  9. data/app/models/stuff_to_do.rb +208 -0
  10. data/app/models/stuff_to_do_filter.rb +32 -0
  11. data/app/models/stuff_to_do_mailer.rb +16 -0
  12. data/app/views/settings/_stuff_to_do_settings.html.erb +27 -0
  13. data/app/views/stuff_to_do/_issue.html.erb +16 -0
  14. data/app/views/stuff_to_do/_item.html.erb +5 -0
  15. data/app/views/stuff_to_do/_left_panes.html.erb +51 -0
  16. data/app/views/stuff_to_do/_panes.html.erb +11 -0
  17. data/app/views/stuff_to_do/_project.html.erb +6 -0
  18. data/app/views/stuff_to_do/_right_panes.html.erb +25 -0
  19. data/app/views/stuff_to_do/_time_grid.html.erb +113 -0
  20. data/app/views/stuff_to_do/_time_grid_form.html.erb +32 -0
  21. data/app/views/stuff_to_do/index.html.erb +44 -0
  22. data/app/views/stuff_to_do_mailer/recommended_below_threshold.erb +3 -0
  23. data/app/views/stuff_to_do_mailer/recommended_below_threshold.text.html.rhtml +1 -0
  24. data/assets/images/b.png +0 -0
  25. data/assets/images/bl.png +0 -0
  26. data/assets/images/br.png +0 -0
  27. data/assets/images/closelabel.gif +0 -0
  28. data/assets/images/loading.gif +0 -0
  29. data/assets/images/tl.png +0 -0
  30. data/assets/images/tr.png +0 -0
  31. data/assets/javascripts/facebox.js +319 -0
  32. data/assets/javascripts/jquery-1.2.6.min.js +32 -0
  33. data/assets/javascripts/jquery-ui.js +2839 -0
  34. data/assets/javascripts/jquery.contextMenu.js +212 -0
  35. data/assets/javascripts/semantic.cache +15 -0
  36. data/assets/javascripts/stuff-to-do.js +270 -0
  37. data/assets/javascripts/ui/build.xml +24 -0
  38. data/assets/javascripts/ui/effects.blind.js +49 -0
  39. data/assets/javascripts/ui/effects.bounce.js +78 -0
  40. data/assets/javascripts/ui/effects.clip.js +54 -0
  41. data/assets/javascripts/ui/effects.core.js +510 -0
  42. data/assets/javascripts/ui/effects.drop.js +50 -0
  43. data/assets/javascripts/ui/effects.explode.js +79 -0
  44. data/assets/javascripts/ui/effects.fold.js +55 -0
  45. data/assets/javascripts/ui/effects.highlight.js +48 -0
  46. data/assets/javascripts/ui/effects.pulsate.js +55 -0
  47. data/assets/javascripts/ui/effects.scale.js +180 -0
  48. data/assets/javascripts/ui/effects.shake.js +57 -0
  49. data/assets/javascripts/ui/effects.slide.js +50 -0
  50. data/assets/javascripts/ui/effects.transfer.js +59 -0
  51. data/assets/javascripts/ui/i18n/ui.datepicker-ar.js +26 -0
  52. data/assets/javascripts/ui/i18n/ui.datepicker-bg.js +25 -0
  53. data/assets/javascripts/ui/i18n/ui.datepicker-ca.js +25 -0
  54. data/assets/javascripts/ui/i18n/ui.datepicker-cs.js +25 -0
  55. data/assets/javascripts/ui/i18n/ui.datepicker-da.js +25 -0
  56. data/assets/javascripts/ui/i18n/ui.datepicker-de.js +25 -0
  57. data/assets/javascripts/ui/i18n/ui.datepicker-eo.js +25 -0
  58. data/assets/javascripts/ui/i18n/ui.datepicker-es.js +25 -0
  59. data/assets/javascripts/ui/i18n/ui.datepicker-fa.js +25 -0
  60. data/assets/javascripts/ui/i18n/ui.datepicker-fi.js +25 -0
  61. data/assets/javascripts/ui/i18n/ui.datepicker-fr.js +25 -0
  62. data/assets/javascripts/ui/i18n/ui.datepicker-he.js +25 -0
  63. data/assets/javascripts/ui/i18n/ui.datepicker-hr.js +25 -0
  64. data/assets/javascripts/ui/i18n/ui.datepicker-hu.js +25 -0
  65. data/assets/javascripts/ui/i18n/ui.datepicker-hy.js +25 -0
  66. data/assets/javascripts/ui/i18n/ui.datepicker-id.js +25 -0
  67. data/assets/javascripts/ui/i18n/ui.datepicker-is.js +25 -0
  68. data/assets/javascripts/ui/i18n/ui.datepicker-it.js +25 -0
  69. data/assets/javascripts/ui/i18n/ui.datepicker-ja.js +26 -0
  70. data/assets/javascripts/ui/i18n/ui.datepicker-ko.js +25 -0
  71. data/assets/javascripts/ui/i18n/ui.datepicker-lt.js +25 -0
  72. data/assets/javascripts/ui/i18n/ui.datepicker-lv.js +25 -0
  73. data/assets/javascripts/ui/i18n/ui.datepicker-nl.js +25 -0
  74. data/assets/javascripts/ui/i18n/ui.datepicker-no.js +25 -0
  75. data/assets/javascripts/ui/i18n/ui.datepicker-pl.js +25 -0
  76. data/assets/javascripts/ui/i18n/ui.datepicker-pt-BR.js +25 -0
  77. data/assets/javascripts/ui/i18n/ui.datepicker-ro.js +25 -0
  78. data/assets/javascripts/ui/i18n/ui.datepicker-ru.js +25 -0
  79. data/assets/javascripts/ui/i18n/ui.datepicker-sk.js +25 -0
  80. data/assets/javascripts/ui/i18n/ui.datepicker-sl.js +26 -0
  81. data/assets/javascripts/ui/i18n/ui.datepicker-sq.js +25 -0
  82. data/assets/javascripts/ui/i18n/ui.datepicker-sv.js +25 -0
  83. data/assets/javascripts/ui/i18n/ui.datepicker-th.js +25 -0
  84. data/assets/javascripts/ui/i18n/ui.datepicker-tr.js +25 -0
  85. data/assets/javascripts/ui/i18n/ui.datepicker-uk.js +25 -0
  86. data/assets/javascripts/ui/i18n/ui.datepicker-zh-CN.js +25 -0
  87. data/assets/javascripts/ui/i18n/ui.datepicker-zh-TW.js +25 -0
  88. data/assets/javascripts/ui/svn.log +11 -0
  89. data/assets/javascripts/ui/ui.accordion.js +400 -0
  90. data/assets/javascripts/ui/ui.core.js +533 -0
  91. data/assets/javascripts/ui/ui.datepicker.js +1754 -0
  92. data/assets/javascripts/ui/ui.dialog.js +630 -0
  93. data/assets/javascripts/ui/ui.draggable.js +696 -0
  94. data/assets/javascripts/ui/ui.droppable.js +314 -0
  95. data/assets/javascripts/ui/ui.progressbar.js +114 -0
  96. data/assets/javascripts/ui/ui.resizable.js +805 -0
  97. data/assets/javascripts/ui/ui.selectable.js +266 -0
  98. data/assets/javascripts/ui/ui.slider.js +552 -0
  99. data/assets/javascripts/ui/ui.sortable.js +1012 -0
  100. data/assets/javascripts/ui/ui.tabs.js +572 -0
  101. data/assets/stylesheets/stuff_to_do.css +216 -0
  102. data/config/locales/bg.yml +18 -0
  103. data/config/locales/ca-fr.yml +18 -0
  104. data/config/locales/cs.yml +16 -0
  105. data/config/locales/da.yml +16 -0
  106. data/config/locales/de.yml +18 -0
  107. data/config/locales/en.yml +24 -0
  108. data/config/locales/es.yml +19 -0
  109. data/config/locales/fr.yml +17 -0
  110. data/config/locales/hu.yml +16 -0
  111. data/config/locales/it.yml +16 -0
  112. data/config/locales/ja.yml +18 -0
  113. data/config/locales/ko.yml +18 -0
  114. data/config/locales/lt.yml +18 -0
  115. data/config/locales/nl.yml +20 -0
  116. data/config/locales/pt-BR.yml +18 -0
  117. data/config/locales/ru.yml +19 -0
  118. data/config/locales/sv.yml +19 -0
  119. data/config/locales/tr.yml +18 -0
  120. data/config/routes.rb +3 -0
  121. data/init.rb +54 -0
  122. data/lang/bg.yml +17 -0
  123. data/lang/ca-fr.yml +17 -0
  124. data/lang/cs.yml +15 -0
  125. data/lang/da.yml +15 -0
  126. data/lang/de.yml +17 -0
  127. data/lang/en.yml +21 -0
  128. data/lang/es.yml +18 -0
  129. data/lang/fr.yml +16 -0
  130. data/lang/hu.yml +15 -0
  131. data/lang/it.yml +15 -0
  132. data/lang/ja.yml +17 -0
  133. data/lang/ko.yml +17 -0
  134. data/lang/lt.yml +17 -0
  135. data/lang/pt-br.yml +17 -0
  136. data/lang/ru.yml +15 -0
  137. data/lang/sv.yml +18 -0
  138. data/lang/tr.yml +17 -0
  139. data/lib/redmine_stuff_to_do/stuff_to_do_compatibility.rb +15 -0
  140. data/lib/stuff_to_do_array_patch.rb +8 -0
  141. data/lib/stuff_to_do_issue_patch.rb +57 -0
  142. data/lib/stuff_to_do_project_patch.rb +31 -0
  143. data/lib/stuff_to_do_user_patch.rb +10 -0
  144. data/rails/init.rb +1 -0
  145. data/spec/controllers/stuff_to_do_controller_add_to_time_grid_spec.rb +58 -0
  146. data/spec/controllers/stuff_to_do_controller_index_spec.rb +155 -0
  147. data/spec/controllers/stuff_to_do_controller_remove_from_time_grid_spec.rb +56 -0
  148. data/spec/controllers/stuff_to_do_controller_reorder_spec.rb +179 -0
  149. data/spec/controllers/stuff_to_do_controller_save_time_entries_spec.rb +56 -0
  150. data/spec/controllers/stuff_to_do_private_methods_spec.rb +82 -0
  151. data/spec/lib/stuff_to_do_issue_patch_spec.rb +60 -0
  152. data/spec/lib/stuff_to_do_project_patch_spec.rb +50 -0
  153. data/spec/lib/stuff_to_do_user_patch_spec.rb +8 -0
  154. data/spec/models/stuff_to_do_filter_spec.rb +3 -0
  155. data/spec/models/stuff_to_do_mailer_spec.rb +42 -0
  156. data/spec/models/stuff_to_do_spec.rb +426 -0
  157. data/spec/sanity_spec.rb +7 -0
  158. data/spec/spec_helper.rb +130 -0
  159. metadata +211 -0
@@ -0,0 +1,25 @@
1
+ /* Slovak initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Vojtech Rinik (vojto@hmm.sk). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['sk'] = {
5
+ clearText: 'Zmazať', clearStatus: '',
6
+ closeText: 'Zavrieť', closeStatus: '',
7
+ prevText: '<Predchádzajúci', prevStatus: '',
8
+ prevBigText: '<<', prevBigStatus: '',
9
+ nextText: 'Nasledujúci>', nextStatus: '',
10
+ nextBigText: '>>', nextBigStatus: '',
11
+ currentText: 'Dnes', currentStatus: '',
12
+ monthNames: ['Január','Február','Marec','Apríl','Máj','Jún',
13
+ 'Júl','August','September','Október','November','December'],
14
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
15
+ 'Júl','Aug','Sep','Okt','Nov','Dec'],
16
+ monthStatus: '', yearStatus: '',
17
+ weekHeader: 'Ty', weekStatus: '',
18
+ dayNames: ['Nedel\'a','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'],
19
+ dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
20
+ dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
21
+ dayStatus: 'DD', dateStatus: 'D, M d',
22
+ dateFormat: 'dd.mm.yy', firstDay: 0,
23
+ initStatus: '', isRTL: false};
24
+ $.datepicker.setDefaults($.datepicker.regional['sk']);
25
+ });
@@ -0,0 +1,26 @@
1
+ /* Slovenian initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Jaka Jancar (jaka@kubje.org). */
3
+ /* c = č, s = š z = ž C = Č S = Š Z = Ž */
4
+ jQuery(function($){
5
+ $.datepicker.regional['sl'] = {
6
+ clearText: 'Izbriši', clearStatus: 'Izbriši trenutni datum',
7
+ closeText: 'Zapri', closeStatus: 'Zapri brez spreminjanja',
8
+ prevText: '<Prejšnji', prevStatus: 'Prikaži prejšnji mesec',
9
+ prevBigText: '<<', prevBigStatus: '',
10
+ nextText: 'Naslednji>', nextStatus: 'Prikaži naslednji mesec',
11
+ nextBigText: '>>', nextBigStatus: '',
12
+ currentText: 'Trenutni', currentStatus: 'Prikaži trenutni mesec',
13
+ monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
14
+ 'Julij','Avgust','September','Oktober','November','December'],
15
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
16
+ 'Jul','Avg','Sep','Okt','Nov','Dec'],
17
+ monthStatus: 'Prikaži drug mesec', yearStatus: 'Prikaži drugo leto',
18
+ weekHeader: 'Teden', weekStatus: 'Teden v letu',
19
+ dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'],
20
+ dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'],
21
+ dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'],
22
+ dayStatus: 'Nastavi DD za prvi dan v tednu', dateStatus: 'Izberi DD, d MM yy',
23
+ dateFormat: 'dd.mm.yy', firstDay: 1,
24
+ initStatus: 'Izbira datuma', isRTL: false};
25
+ $.datepicker.setDefaults($.datepicker.regional['sl']);
26
+ });
@@ -0,0 +1,25 @@
1
+ /* Albanian initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Flakron Bytyqi (flakron@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['sq'] = {
5
+ clearText: 'fshije', clearStatus: 'fshije datën aktuale',
6
+ closeText: 'mbylle', closeStatus: 'mbylle pa ndryshime',
7
+ prevText: '<mbrapa', prevStatus: 'trego muajin e fundit',
8
+ prevBigText: '<<', prevBigStatus: '',
9
+ nextText: 'Përpara>', nextStatus: 'trego muajin tjetër',
10
+ nextBigText: '>>', nextBigStatus: '',
11
+ currentText: 'sot', currentStatus: '',
12
+ monthNames: ['Janar','Shkurt','Mars','Pril','Maj','Qershor',
13
+ 'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'],
14
+ monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer',
15
+ 'Kor','Gus','Sht','Tet','Nën','Dhj'],
16
+ monthStatus: 'trego muajin tjetër', yearStatus: 'trego tjetër vit',
17
+ weekHeader: 'Ja', weekStatus: 'Java e muajit',
18
+ dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'],
19
+ dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'],
20
+ dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'],
21
+ dayStatus: 'Vendose DD si ditë të parë të javës', dateStatus: '\'Zgjedh\' D, M d',
22
+ dateFormat: 'dd.mm.yy', firstDay: 1,
23
+ initStatus: 'Zgjedhe një datë', isRTL: false};
24
+ $.datepicker.setDefaults($.datepicker.regional['sq']);
25
+ });
@@ -0,0 +1,25 @@
1
+ /* Swedish initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Anders Ekdahl ( anders@nomadiz.se). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['sv'] = {
5
+ clearText: 'Rensa', clearStatus: '',
6
+ closeText: 'Stäng', closeStatus: '',
7
+ prevText: '«Förra', prevStatus: '',
8
+ prevBigText: '<<', prevBigStatus: '',
9
+ nextText: 'Nästa»', nextStatus: '',
10
+ nextBigText: '>>', nextBigStatus: '',
11
+ currentText: 'Idag', currentStatus: '',
12
+ monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
13
+ 'Juli','Augusti','September','Oktober','November','December'],
14
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
15
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
16
+ monthStatus: '', yearStatus: '',
17
+ weekHeader: 'Ve', weekStatus: '',
18
+ dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
19
+ dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
20
+ dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
21
+ dayStatus: 'DD', dateStatus: 'D, M d',
22
+ dateFormat: 'yy-mm-dd', firstDay: 1,
23
+ initStatus: '', isRTL: false};
24
+ $.datepicker.setDefaults($.datepicker.regional['sv']);
25
+ });
@@ -0,0 +1,25 @@
1
+ /* Thai initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by pipo (pipo@sixhead.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['th'] = {
5
+ clearText: 'ลบ', clearStatus: '',
6
+ closeText: 'ปิด', closeStatus: '',
7
+ prevText: '« ย้อน', prevStatus: '',
8
+ prevBigText: '<<', prevBigStatus: '',
9
+ nextText: 'ถัดไป »', nextStatus: '',
10
+ nextBigText: '>>', nextBigStatus: '',
11
+ currentText: 'วันนี้', currentStatus: '',
12
+ monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
13
+ 'กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
14
+ monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
15
+ 'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
16
+ monthStatus: '', yearStatus: '',
17
+ weekHeader: 'Sm', weekStatus: '',
18
+ dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
19
+ dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
20
+ dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
21
+ dayStatus: 'DD', dateStatus: 'D, M d',
22
+ dateFormat: 'dd/mm/yy', firstDay: 0,
23
+ initStatus: '', isRTL: false};
24
+ $.datepicker.setDefaults($.datepicker.regional['th']);
25
+ });
@@ -0,0 +1,25 @@
1
+ /* Turkish initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Izzet Emre Erkan (kara@karalamalar.net). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['tr'] = {
5
+ clearText: 'temizle', clearStatus: 'geçerli tarihi temizler',
6
+ closeText: 'kapat', closeStatus: 'sadece göstergeyi kapat',
7
+ prevText: '<geri', prevStatus: 'önceki ayı göster',
8
+ prevBigText: '<<', prevBigStatus: '',
9
+ nextText: 'ileri&#x3e', nextStatus: 'sonraki ayı göster',
10
+ nextBigText: '>>', nextBigStatus: '',
11
+ currentText: 'bugün', currentStatus: '',
12
+ monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
13
+ 'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
14
+ monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
15
+ 'Tem','Ağu','Eyl','Eki','Kas','Ara'],
16
+ monthStatus: 'başka ay', yearStatus: 'başka yıl',
17
+ weekHeader: 'Hf', weekStatus: 'Ayın haftaları',
18
+ dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
19
+ dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
20
+ dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
21
+ dayStatus: 'Haftanın ilk gününü belirleyin', dateStatus: 'D, M d seçiniz',
22
+ dateFormat: 'dd.mm.yy', firstDay: 1,
23
+ initStatus: 'Bir tarih seçiniz', isRTL: false};
24
+ $.datepicker.setDefaults($.datepicker.regional['tr']);
25
+ });
@@ -0,0 +1,25 @@
1
+ /* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['uk'] = {
5
+ clearText: 'Очистити', clearStatus: '',
6
+ closeText: 'Закрити', closeStatus: '',
7
+ prevText: '<', prevStatus: '',
8
+ prevBigText: '<<', prevBigStatus: '',
9
+ nextText: '>', nextStatus: '',
10
+ nextBigText: '>>', nextBigStatus: '',
11
+ currentText: 'Сьогодні', currentStatus: '',
12
+ monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
13
+ 'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'],
14
+ monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер',
15
+ 'Лип','Сер','Вер','Жов','Лис','Гру'],
16
+ monthStatus: '', yearStatus: '',
17
+ weekHeader: 'Не', weekStatus: '',
18
+ dayNames: ['неділя','понеділок','вівторок','середа','четвер','пятниця','суббота'],
19
+ dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
20
+ dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
21
+ dayStatus: 'DD', dateStatus: 'D, M d',
22
+ dateFormat: 'dd.mm.yy', firstDay: 1,
23
+ initStatus: '', isRTL: false};
24
+ $.datepicker.setDefaults($.datepicker.regional['uk']);
25
+ });
@@ -0,0 +1,25 @@
1
+ /* Chinese initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Cloudream (cloudream@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['zh-CN'] = {
5
+ clearText: '清除', clearStatus: '清除已选日期',
6
+ closeText: '关闭', closeStatus: '不改变当前选择',
7
+ prevText: '<上月', prevStatus: '显示上月',
8
+ prevBigText: '<<', prevBigStatus: '显示上一年',
9
+ nextText: '下月>', nextStatus: '显示下月',
10
+ nextBigText: '>>', nextBigStatus: '显示下一年',
11
+ currentText: '今天', currentStatus: '显示本月',
12
+ monthNames: ['一月','二月','三月','四月','五月','六月',
13
+ '七月','八月','九月','十月','十一月','十二月'],
14
+ monthNamesShort: ['一','二','三','四','五','六',
15
+ '七','八','九','十','十一','十二'],
16
+ monthStatus: '选择月份', yearStatus: '选择年份',
17
+ weekHeader: '周', weekStatus: '年内周次',
18
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
19
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
20
+ dayNamesMin: ['日','一','二','三','四','五','六'],
21
+ dayStatus: '设置 DD 为一周起始', dateStatus: '选择 m月 d日, DD',
22
+ dateFormat: 'yy-mm-dd', firstDay: 1,
23
+ initStatus: '请选择日期', isRTL: false};
24
+ $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
25
+ });
@@ -0,0 +1,25 @@
1
+ /* Chinese initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Ressol (ressol@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['zh-TW'] = {
5
+ clearText: '清除', clearStatus: '清除已選日期',
6
+ closeText: '關閉', closeStatus: '不改變目前的選擇',
7
+ prevText: '<上月', prevStatus: '顯示上月',
8
+ prevBigText: '<<', prevBigStatus: '顯示上一年',
9
+ nextText: '下月>', nextStatus: '顯示下月',
10
+ nextBigText: '>>', nextBigStatus: '顯示下一年',
11
+ currentText: '今天', currentStatus: '顯示本月',
12
+ monthNames: ['一月','二月','三月','四月','五月','六月',
13
+ '七月','八月','九月','十月','十一月','十二月'],
14
+ monthNamesShort: ['一','二','三','四','五','六',
15
+ '七','八','九','十','十一','十二'],
16
+ monthStatus: '選擇月份', yearStatus: '選擇年份',
17
+ weekHeader: '周', weekStatus: '年內周次',
18
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
19
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
20
+ dayNamesMin: ['日','一','二','三','四','五','六'],
21
+ dayStatus: '設定 DD 為一周起始', dateStatus: '選擇 m月 d日, DD',
22
+ dateFormat: 'yy/mm/dd', firstDay: 1,
23
+ initStatus: '請選擇日期', isRTL: false};
24
+ $.datepicker.setDefaults($.datepicker.regional['zh-TW']);
25
+ });
@@ -0,0 +1,11 @@
1
+ Path: .
2
+ URL: http://jquery-ui.googlecode.com/svn/trunk/ui
3
+ Repository Root: http://jquery-ui.googlecode.com/svn
4
+ Repository UUID: a1defee3-d24d-0410-b1e3-3171fe540af7
5
+ Revision: 1171
6
+ Node Kind: directory
7
+ Schedule: normal
8
+ Last Changed Author: paul.bakaus
9
+ Last Changed Rev: 1171
10
+ Last Changed Date: 2008-12-17 11:35:13 -0800 (Wed, 17 Dec 2008)
11
+
@@ -0,0 +1,400 @@
1
+ /*
2
+ * jQuery UI Accordion @VERSION
3
+ *
4
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
5
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
6
+ * and GPL (GPL-LICENSE.txt) licenses.
7
+ *
8
+ * http://docs.jquery.com/UI/Accordion
9
+ *
10
+ * Depends:
11
+ * ui.core.js
12
+ */
13
+ (function($) {
14
+
15
+ $.widget("ui.accordion", {
16
+
17
+ _init: function() {
18
+ var options = this.options;
19
+
20
+ if ( options.navigation ) {
21
+ var current = this.element.find("a").filter(options.navigationFilter);
22
+ if ( current.length ) {
23
+ if ( current.filter(options.header).length ) {
24
+ options.active = current;
25
+ } else {
26
+ options.active = current.parent().parent().prev();
27
+ current.addClass("current");
28
+ }
29
+ }
30
+ }
31
+
32
+ this.element.addClass("ui-accordion ui-widget ui-helper-reset");
33
+ var groups = this.element.children().addClass("ui-accordion-group");
34
+ var headers = options.headers = groups.find("> :first-child").addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all")
35
+ .bind("mouseenter.accordion", function(){ $(this).addClass('ui-state-hover'); })
36
+ .bind("mouseleave.accordion", function(){ $(this).removeClass('ui-state-hover'); });
37
+ // wrap content elements in div against animation issues
38
+ headers.next().wrap("<div></div>").addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
39
+
40
+ var active = options.active = findActive(headers, options.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");
41
+ active.parent().addClass("selected");
42
+ $("<span/>").addClass("ui-icon " + this.options.headerIcon).prependTo(headers);
43
+ active.find(".ui-icon").toggleClass(this.options.headerIcon).toggleClass(this.options.headerIconSelected);
44
+
45
+ // IE7-/Win - Extra vertical space in Lists fixed
46
+ if ($.browser.msie) {
47
+ this.element.find('a').css('zoom', '1');
48
+ }
49
+
50
+ var maxHeight;
51
+ if ( options.fillSpace ) {
52
+ maxHeight = this.element.parent().height();
53
+ options.headers.each(function() {
54
+ maxHeight -= $(this).outerHeight();
55
+ });
56
+ var maxPadding = 0;
57
+ options.headers.next().each(function() {
58
+ maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
59
+ }).height(maxHeight - maxPadding);
60
+ } else if ( options.autoHeight ) {
61
+ maxHeight = 0;
62
+ options.headers.next().each(function() {
63
+ maxHeight = Math.max(maxHeight, $(this).outerHeight());
64
+ }).height(maxHeight);
65
+ }
66
+
67
+ this.element.attr('role','tablist');
68
+
69
+ var self=this;
70
+ options.headers
71
+ .attr('role','tab')
72
+ .bind('keydown', function(event) { return self._keydown(event); })
73
+ .next()
74
+ .attr('role','tabpanel');
75
+
76
+ options.headers
77
+ .not(options.active || "")
78
+ .attr('aria-expanded','false')
79
+ .attr("tabIndex", "-1")
80
+ .next()
81
+ .hide();
82
+
83
+ // make sure at least one header is in the tab order
84
+ if (!options.active.length) {
85
+ options.headers.eq(0).attr('tabIndex','0');
86
+ } else {
87
+ options.active
88
+ .attr('aria-expanded','true')
89
+ .attr("tabIndex", "0");
90
+ }
91
+
92
+ // only need links in taborder for Safari
93
+ if (!$.browser.safari)
94
+ options.headers.find('a').attr('tabIndex','-1');
95
+
96
+ if (options.event) {
97
+ this.element.bind((options.event) + ".accordion", clickHandler);
98
+ }
99
+ },
100
+
101
+ destroy: function() {
102
+ this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion");
103
+ $.removeData(this.element[0], "accordion");
104
+ var groups = this.element.children().removeClass("ui-accordion-group selected");
105
+ var headers = this.options.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top")
106
+ .removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");
107
+ headers.find("a").removeAttr("tabindex");
108
+ headers.children(".ui-icon").remove();
109
+ headers.next().children().removeClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").each(function(){
110
+ $(this).parent().replaceWith(this);
111
+ })
112
+ },
113
+
114
+ _keydown: function(event) {
115
+ if (this.options.disabled || event.altKey || event.ctrlKey)
116
+ return;
117
+
118
+ var keyCode = $.ui.keyCode;
119
+
120
+ var length = this.options.headers.length;
121
+ var currentIndex = this.options.headers.index(event.target);
122
+ var toFocus = false;
123
+
124
+ switch(event.keyCode) {
125
+ case keyCode.RIGHT:
126
+ case keyCode.DOWN:
127
+ toFocus = this.options.headers[(currentIndex + 1) % length];
128
+ break;
129
+ case keyCode.LEFT:
130
+ case keyCode.UP:
131
+ toFocus = this.options.headers[(currentIndex - 1 + length) % length];
132
+ break;
133
+ case keyCode.SPACE:
134
+ case keyCode.ENTER:
135
+ return clickHandler.call(this.element[0], { target: event.target });
136
+ }
137
+
138
+ if (toFocus) {
139
+ $(event.target).attr('tabIndex','-1');
140
+ $(toFocus).attr('tabIndex','0');
141
+ toFocus.focus();
142
+ return false;
143
+ }
144
+
145
+ return true;
146
+ },
147
+
148
+ activate: function(index) {
149
+ // call clickHandler with custom event
150
+ clickHandler.call(this.element[0], {
151
+ target: findActive( this.options.headers, index )[0]
152
+ });
153
+ }
154
+
155
+ });
156
+
157
+ function scopeCallback(callback, scope) {
158
+ return function() {
159
+ return callback.apply(scope, arguments);
160
+ };
161
+ };
162
+
163
+ function completed(cancel) {
164
+ // if removed while animated data can be empty
165
+ if (!$.data(this, "accordion")) {
166
+ return;
167
+ }
168
+
169
+ var instance = $.data(this, "accordion");
170
+ var options = instance.options;
171
+ options.running = cancel ? 0 : --options.running;
172
+ if ( options.running ) {
173
+ return;
174
+ }
175
+ if ( options.clearStyle ) {
176
+ options.toShow.add(options.toHide).css({
177
+ height: "",
178
+ overflow: ""
179
+ });
180
+ }
181
+ instance._trigger('change', null, options.data);
182
+ }
183
+
184
+ function toggle(toShow, toHide, data, clickedActive, down) {
185
+ var options = $.data(this, "accordion").options;
186
+ options.toShow = toShow;
187
+ options.toHide = toHide;
188
+ options.data = data;
189
+ var complete = scopeCallback(completed, this);
190
+
191
+ $.data(this, "accordion")._trigger("changestart", null, options.data);
192
+
193
+ // count elements to animate
194
+ options.running = toHide.size() === 0 ? toShow.size() : toHide.size();
195
+
196
+ if ( options.animated ) {
197
+ var animOptions = {};
198
+
199
+ if ( !options.alwaysOpen && clickedActive ) {
200
+ animOptions = {
201
+ toShow: $([]),
202
+ toHide: toHide,
203
+ complete: complete,
204
+ down: down,
205
+ autoHeight: options.autoHeight
206
+ };
207
+ } else {
208
+ animOptions = {
209
+ toShow: toShow,
210
+ toHide: toHide,
211
+ complete: complete,
212
+ down: down,
213
+ autoHeight: options.autoHeight
214
+ };
215
+ }
216
+
217
+ if (!options.proxied) {
218
+ options.proxied = options.animated;
219
+ }
220
+
221
+ if (!options.proxiedDuration) {
222
+ options.proxiedDuration = options.duration;
223
+ }
224
+
225
+ options.animated = $.isFunction(options.proxied) ?
226
+ options.proxied(animOptions) : options.proxied;
227
+
228
+ options.duration = $.isFunction(options.proxiedDuration) ?
229
+ options.proxiedDuration(animOptions) : options.proxiedDuration;
230
+
231
+ var animations = $.ui.accordion.animations,
232
+ duration = options.duration,
233
+ easing = options.animated;
234
+
235
+ if (!animations[easing]) {
236
+ animations[easing] = function(options) {
237
+ this.slide(options, {
238
+ easing: easing,
239
+ duration: duration || 700
240
+ });
241
+ };
242
+ }
243
+
244
+ animations[easing](animOptions);
245
+
246
+ } else {
247
+ if ( !options.alwaysOpen && clickedActive ) {
248
+ toShow.toggle();
249
+ } else {
250
+ toHide.hide();
251
+ toShow.show();
252
+ }
253
+ complete(true);
254
+ }
255
+ toHide.prev().attr('aria-expanded','false').attr("tabIndex", "-1");
256
+ toShow.prev().attr('aria-expanded','true').attr("tabIndex", "0").focus();;
257
+ }
258
+
259
+ function clickHandler(event) {
260
+ var options = $.data(this, "accordion").options;
261
+ if (options.disabled) {
262
+ return false;
263
+ }
264
+ // called only when using activate(false) to close all parts programmatically
265
+ if ( !event.target && !options.alwaysOpen ) {
266
+ options.active.parent().toggleClass(options.selectedClass);
267
+ var toHide = options.active.next(),
268
+ data = {
269
+ options: options,
270
+ newHeader: $([]),
271
+ oldHeader: options.active,
272
+ newContent: $([]),
273
+ oldContent: toHide
274
+ },
275
+ toShow = (options.active = $([]));
276
+ toggle.call(this, toShow, toHide, data );
277
+ return false;
278
+ }
279
+ // get the click target
280
+ var clicked = $(event.target);
281
+
282
+ // due to the event delegation model, we have to check if one
283
+ // of the parent elements is our actual header, and find that
284
+ // otherwise stick with the initial target
285
+ clicked = $( clicked.parents(options.header)[0] || clicked );
286
+
287
+ var clickedActive = clicked[0] == options.active[0];
288
+
289
+ // if animations are still active, or the active header is the target, ignore click
290
+ if (options.running || (options.alwaysOpen && clickedActive)) {
291
+ return false;
292
+ }
293
+ if (!clicked.is(options.header)) {
294
+ return;
295
+ }
296
+
297
+ // switch classes
298
+ options.active.parent().toggleClass(options.selectedClass);
299
+ options.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all")
300
+ .find(".ui-icon").removeClass(options.headerIconSelected).addClass(options.headerIcon);
301
+ if ( !clickedActive ) {
302
+ clicked.parent().addClass(options.selectedClass);
303
+ clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top")
304
+ .find(".ui-icon").removeClass(options.headerIcon).addClass(options.headerIconSelected);
305
+ }
306
+
307
+ // find elements to show and hide
308
+ var toShow = clicked.next(),
309
+ toHide = options.active.next(),
310
+ data = {
311
+ options: options,
312
+ newHeader: clickedActive && !options.alwaysOpen ? $([]) : clicked,
313
+ oldHeader: options.active,
314
+ newContent: clickedActive && !options.alwaysOpen ? $([]) : toShow,
315
+ oldContent: toHide
316
+ },
317
+ down = options.headers.index( options.active[0] ) > options.headers.index( clicked[0] );
318
+
319
+ options.active = clickedActive ? $([]) : clicked;
320
+ toggle.call(this, toShow, toHide, data, clickedActive, down );
321
+
322
+ return false;
323
+ };
324
+
325
+ function findActive(headers, selector) {
326
+ return selector
327
+ ? typeof selector == "number"
328
+ ? headers.filter(":eq(" + selector + ")")
329
+ : headers.not(headers.not(selector))
330
+ : selector === false
331
+ ? $([])
332
+ : headers.filter(":eq(0)");
333
+ }
334
+
335
+ $.extend($.ui.accordion, {
336
+ version: "@VERSION",
337
+ defaults: {
338
+ autoHeight: true,
339
+ alwaysOpen: true,
340
+ animated: 'slide',
341
+ event: "click",
342
+ header: "a",
343
+ headerIcon: "ui-icon-triangle-1-e",
344
+ headerIconSelected: "ui-icon-triangle-1-s",
345
+ navigationFilter: function() {
346
+ return this.href.toLowerCase() == location.href.toLowerCase();
347
+ },
348
+ running: 0,
349
+ selectedClass: "selected"
350
+ },
351
+ animations: {
352
+ slide: function(options, additions) {
353
+ options = $.extend({
354
+ easing: "swing",
355
+ duration: 300
356
+ }, options, additions);
357
+ if ( !options.toHide.size() ) {
358
+ options.toShow.animate({height: "show"}, options);
359
+ return;
360
+ }
361
+ var hideHeight = options.toHide.height(),
362
+ showHeight = options.toShow.height(),
363
+ difference = showHeight / hideHeight,
364
+ overflow = options.toShow.css('overflow');
365
+ options.toShow.css({ height: 0, overflow: 'hidden' }).show();
366
+ options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{
367
+ step: function(now) {
368
+ var current = (hideHeight - now) * difference;
369
+ if ($.browser.msie || $.browser.opera) {
370
+ current = Math.ceil(current);
371
+ }
372
+ options.toShow.height( current );
373
+ },
374
+ duration: options.duration,
375
+ easing: options.easing,
376
+ complete: function() {
377
+ if ( !options.autoHeight ) {
378
+ options.toShow.css("height", "auto");
379
+ }
380
+ options.toShow.css({overflow: overflow});
381
+ options.complete();
382
+ }
383
+ });
384
+ },
385
+ bounceslide: function(options) {
386
+ this.slide(options, {
387
+ easing: options.down ? "easeOutBounce" : "swing",
388
+ duration: options.down ? 1000 : 200
389
+ });
390
+ },
391
+ easeslide: function(options) {
392
+ this.slide(options, {
393
+ easing: "easeinout",
394
+ duration: 700
395
+ });
396
+ }
397
+ }
398
+ });
399
+
400
+ })(jQuery);