refinerycms 0.9.9 → 0.9.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (630) hide show
  1. data/.gitignore +1 -1
  2. data/Gemfile +8 -24
  3. data/Gemfile.lock +94 -69
  4. data/Rakefile +1 -1
  5. data/bin/refinerycms +118 -109
  6. data/changelog.md +13 -2
  7. data/config/cucumber.yml +3 -7
  8. data/config/settings.rb +0 -1
  9. data/lib/refinery.rb +14 -1
  10. data/lib/refinerycms.rb +2 -9
  11. data/refinerycms.gemspec +15 -855
  12. data/spec/spec_helper.rb +3 -2
  13. metadata +27 -907
  14. data/authentication/app/controllers/admin/users_controller.rb +0 -90
  15. data/authentication/app/controllers/passwords_controller.rb +0 -43
  16. data/authentication/app/controllers/registrations_controller.rb +0 -67
  17. data/authentication/app/controllers/sessions_controller.rb +0 -23
  18. data/authentication/app/helpers/sessions_helper.rb +0 -2
  19. data/authentication/app/helpers/users_helper.rb +0 -2
  20. data/authentication/app/mailers/user_mailer.rb +0 -20
  21. data/authentication/app/models/role.rb +0 -16
  22. data/authentication/app/models/roles_users.rb +0 -6
  23. data/authentication/app/models/user.rb +0 -58
  24. data/authentication/app/models/user_plugin.rb +0 -5
  25. data/authentication/app/views/admin/users/_form.html.erb +0 -92
  26. data/authentication/app/views/admin/users/_user.html.erb +0 -19
  27. data/authentication/app/views/admin/users/_users.html.erb +0 -4
  28. data/authentication/app/views/admin/users/edit.html.erb +0 -1
  29. data/authentication/app/views/admin/users/index.html.erb +0 -12
  30. data/authentication/app/views/admin/users/new.html.erb +0 -1
  31. data/authentication/app/views/layouts/login.html.erb +0 -21
  32. data/authentication/app/views/passwords/edit.html.erb +0 -31
  33. data/authentication/app/views/passwords/new.html.erb +0 -18
  34. data/authentication/app/views/registrations/new.html.erb +0 -41
  35. data/authentication/app/views/sessions/new.html.erb +0 -29
  36. data/authentication/app/views/user_mailer/reset_notification.html.erb +0 -12
  37. data/authentication/app/views/user_mailer/reset_notification.text.plain.erb +0 -7
  38. data/authentication/config/locales/cs.yml +0 -75
  39. data/authentication/config/locales/da.yml +0 -72
  40. data/authentication/config/locales/de.yml +0 -72
  41. data/authentication/config/locales/el.yml +0 -72
  42. data/authentication/config/locales/en.yml +0 -72
  43. data/authentication/config/locales/es.yml +0 -100
  44. data/authentication/config/locales/fr.yml +0 -72
  45. data/authentication/config/locales/it.yml +0 -97
  46. data/authentication/config/locales/lolcat.yml +0 -55
  47. data/authentication/config/locales/lt.yml +0 -55
  48. data/authentication/config/locales/lv.yml +0 -72
  49. data/authentication/config/locales/nb.yml +0 -72
  50. data/authentication/config/locales/nl.yml +0 -70
  51. data/authentication/config/locales/pl.yml +0 -100
  52. data/authentication/config/locales/pt-BR.yml +0 -68
  53. data/authentication/config/locales/rs.yml +0 -72
  54. data/authentication/config/locales/ru.yml +0 -97
  55. data/authentication/config/locales/sl.yml +0 -61
  56. data/authentication/config/locales/sv.yml +0 -64
  57. data/authentication/config/locales/zh-CN.yml +0 -72
  58. data/authentication/config/locales/zh-TW.yml +0 -72
  59. data/authentication/config/routes.rb +0 -31
  60. data/authentication/db/migrate/20100913234705_create_refinerycms_authentication_schema.rb +0 -43
  61. data/authentication/db/migrate/20100929035252_add_missing_indexes_to_roles_users.rb +0 -11
  62. data/authentication/db/migrate/20101206013505_change_to_devise_users_table.rb +0 -27
  63. data/authentication/db/migrate/20110106184757_add_remember_created_at_to_users.rb +0 -9
  64. data/authentication/features/lost_password.feature +0 -49
  65. data/authentication/features/manage_users.feature +0 -61
  66. data/authentication/features/step_definitions/lost_password.rb +0 -8
  67. data/authentication/features/step_definitions/user_steps.rb +0 -36
  68. data/authentication/features/support/factories.rb +0 -18
  69. data/authentication/features/support/paths.rb +0 -24
  70. data/authentication/lib/authenticated_system.rb +0 -29
  71. data/authentication/lib/authentication.rb +0 -30
  72. data/authentication/lib/generators/refinerycms_authentication_generator.rb +0 -8
  73. data/authentication/license.md +0 -21
  74. data/authentication/readme.md +0 -17
  75. data/authentication/refinerycms-authentication.gemspec +0 -20
  76. data/authentication/spec/models/user_spec.rb +0 -159
  77. data/base/db/migrate/20100913234706_create_refinerycms_core_schema.rb +0 -23
  78. data/base/db/migrate/20101217113424_add_locale_to_slugs.rb +0 -13
  79. data/base/features/step_definitions/web_steps.rb +0 -219
  80. data/base/features/support/env.rb +0 -84
  81. data/base/features/support/factories.rb +0 -1
  82. data/base/features/support/negative_expectations_helper.rb +0 -57
  83. data/base/features/support/paths.rb +0 -91
  84. data/base/lib/base.rb +0 -32
  85. data/base/lib/generators/refinerycms_base_generator.rb +0 -8
  86. data/base/lib/refinery.rb +0 -32
  87. data/base/lib/refinery/version.rb +0 -16
  88. data/base/license.md +0 -21
  89. data/base/refinerycms-base.gemspec +0 -18
  90. data/core/app/controllers/admin/base_controller.rb +0 -10
  91. data/core/app/controllers/admin/dialogs_controller.rb +0 -26
  92. data/core/app/controllers/admin/refinery_core_controller.rb +0 -12
  93. data/core/app/controllers/application_controller.rb +0 -6
  94. data/core/app/controllers/refinery/fast_controller.rb +0 -9
  95. data/core/app/controllers/sitemap_controller.rb +0 -14
  96. data/core/app/helpers/application_helper.rb +0 -5
  97. data/core/app/views/admin/_head.html.erb +0 -43
  98. data/core/app/views/admin/_javascripts.html.erb +0 -32
  99. data/core/app/views/admin/_menu.html.erb +0 -17
  100. data/core/app/views/admin/dialogs/show.html.erb +0 -19
  101. data/core/app/views/layouts/admin.html.erb +0 -24
  102. data/core/app/views/layouts/admin_dialog.html.erb +0 -14
  103. data/core/app/views/layouts/application.html.erb +0 -21
  104. data/core/app/views/shared/_content_page.html.erb +0 -63
  105. data/core/app/views/shared/_draft_page_message.html.erb +0 -3
  106. data/core/app/views/shared/_footer.html.erb +0 -4
  107. data/core/app/views/shared/_google_analytics.html.erb +0 -8
  108. data/core/app/views/shared/_head.html.erb +0 -42
  109. data/core/app/views/shared/_header.html.erb +0 -8
  110. data/core/app/views/shared/_html_tag.html.erb +0 -6
  111. data/core/app/views/shared/_ie6check.html.erb +0 -63
  112. data/core/app/views/shared/_javascripts.html.erb +0 -10
  113. data/core/app/views/shared/_menu.html.erb +0 -30
  114. data/core/app/views/shared/_menu_branch.html.erb +0 -26
  115. data/core/app/views/shared/_message.html.erb +0 -10
  116. data/core/app/views/shared/_no_script.html.erb +0 -9
  117. data/core/app/views/shared/_site_bar.html.erb +0 -25
  118. data/core/app/views/shared/admin/_continue_editing.html.erb +0 -3
  119. data/core/app/views/shared/admin/_error_messages.html.erb +0 -16
  120. data/core/app/views/shared/admin/_form_actions.html.erb +0 -77
  121. data/core/app/views/shared/admin/_image_picker.html.erb +0 -60
  122. data/core/app/views/shared/admin/_make_sortable.html.erb +0 -13
  123. data/core/app/views/shared/admin/_resource_picker.html.erb +0 -66
  124. data/core/app/views/shared/admin/_search.html.erb +0 -6
  125. data/core/app/views/shared/admin/_sortable_list.html.erb +0 -7
  126. data/core/app/views/shared/admin/_tabbed_fields.html.erb +0 -42
  127. data/core/app/views/welcome.html.erb +0 -17
  128. data/core/app/views/wymiframe.html.erb +0 -15
  129. data/core/config/locales/cs.yml +0 -77
  130. data/core/config/locales/da.yml +0 -75
  131. data/core/config/locales/de.yml +0 -75
  132. data/core/config/locales/el.yml +0 -75
  133. data/core/config/locales/en.yml +0 -75
  134. data/core/config/locales/es.yml +0 -68
  135. data/core/config/locales/fr.yml +0 -72
  136. data/core/config/locales/it.yml +0 -96
  137. data/core/config/locales/lolcat.yml +0 -68
  138. data/core/config/locales/lt.yml +0 -75
  139. data/core/config/locales/lv.yml +0 -72
  140. data/core/config/locales/nb.yml +0 -75
  141. data/core/config/locales/nl.yml +0 -75
  142. data/core/config/locales/pl.yml +0 -75
  143. data/core/config/locales/pt-BR.yml +0 -72
  144. data/core/config/locales/rs.yml +0 -76
  145. data/core/config/locales/ru.yml +0 -71
  146. data/core/config/locales/sl.yml +0 -72
  147. data/core/config/locales/sv.yml +0 -75
  148. data/core/config/locales/zh-CN.yml +0 -75
  149. data/core/config/locales/zh-TW.yml +0 -75
  150. data/core/config/routes.rb +0 -19
  151. data/core/crud.md +0 -197
  152. data/core/doc/included-jquery-ui-packages.jpg +0 -0
  153. data/core/engines.md +0 -179
  154. data/core/features/search.feature +0 -55
  155. data/core/features/site_bar.feature +0 -24
  156. data/core/features/step_definitions/core_steps.rb +0 -61
  157. data/core/features/support/paths.rb +0 -14
  158. data/core/features/uploads/beach.jpeg +0 -0
  159. data/core/features/uploads/refinery_is_awesome.txt +0 -1
  160. data/core/lib/core.rb +0 -143
  161. data/core/lib/generators/refinerycms_generator.rb +0 -107
  162. data/core/lib/generators/templates/.gitignore +0 -83
  163. data/core/lib/generators/templates/.rspec +0 -2
  164. data/core/lib/generators/templates/app/views/sitemap/index.xml.builder +0 -22
  165. data/core/lib/generators/templates/autotest/autotest.rb +0 -17
  166. data/core/lib/generators/templates/autotest/discover.rb +0 -2
  167. data/core/lib/generators/templates/config/cucumber.yml +0 -15
  168. data/core/lib/generators/templates/config/database.yml.mysql +0 -20
  169. data/core/lib/generators/templates/config/database.yml.postgresql +0 -57
  170. data/core/lib/generators/templates/config/database.yml.sqlite3 +0 -26
  171. data/core/lib/generators/templates/config/i18n-js.yml +0 -6
  172. data/core/lib/generators/templates/config/initializers/devise.rb +0 -142
  173. data/core/lib/generators/templates/config/settings.rb +0 -3
  174. data/core/lib/generators/templates/db/seeds.rb +0 -5
  175. data/core/lib/generators/templates/spec/rcov.opts +0 -2
  176. data/core/lib/generators/templates/spec/spec_helper.rb +0 -76
  177. data/core/lib/refinery/activity.rb +0 -45
  178. data/core/lib/refinery/admin/base_controller.rb +0 -111
  179. data/core/lib/refinery/admin_base_controller.rb +0 -5
  180. data/core/lib/refinery/application.rb +0 -76
  181. data/core/lib/refinery/application_controller.rb +0 -116
  182. data/core/lib/refinery/application_helper.rb +0 -19
  183. data/core/lib/refinery/base_presenter.rb +0 -27
  184. data/core/lib/refinery/catch_all_routes.rb +0 -11
  185. data/core/lib/refinery/crud.rb +0 -295
  186. data/core/lib/refinery/helpers/form_helper.rb +0 -66
  187. data/core/lib/refinery/helpers/head_helper.rb +0 -17
  188. data/core/lib/refinery/helpers/html_truncation_helper.rb +0 -25
  189. data/core/lib/refinery/helpers/image_helper.rb +0 -49
  190. data/core/lib/refinery/helpers/menu_helper.rb +0 -68
  191. data/core/lib/refinery/helpers/meta_helper.rb +0 -67
  192. data/core/lib/refinery/helpers/pagination_helper.rb +0 -16
  193. data/core/lib/refinery/helpers/script_helper.rb +0 -36
  194. data/core/lib/refinery/helpers/site_bar_helper.rb +0 -24
  195. data/core/lib/refinery/helpers/tag_helper.rb +0 -21
  196. data/core/lib/refinery/helpers/translation_helper.rb +0 -17
  197. data/core/lib/refinery/link_renderer.rb +0 -55
  198. data/core/lib/refinery/plugin.rb +0 -134
  199. data/core/lib/refinery/plugins.rb +0 -75
  200. data/core/lib/tasks/cucumber.rake +0 -53
  201. data/core/lib/tasks/doc.rake +0 -29
  202. data/core/lib/tasks/refinery.rake +0 -231
  203. data/core/lib/tasks/yard.rake +0 -30
  204. data/core/license.md +0 -21
  205. data/core/public/404.html +0 -26
  206. data/core/public/422.html +0 -26
  207. data/core/public/500.html +0 -26
  208. data/core/public/favicon.ico +0 -0
  209. data/core/public/images/refinery/add.png +0 -0
  210. data/core/public/images/refinery/admin_bg.png +0 -0
  211. data/core/public/images/refinery/ajax-loader.gif +0 -0
  212. data/core/public/images/refinery/branch-end.gif +0 -0
  213. data/core/public/images/refinery/branch-start.gif +0 -0
  214. data/core/public/images/refinery/branch.gif +0 -0
  215. data/core/public/images/refinery/carousel-left.png +0 -0
  216. data/core/public/images/refinery/carousel-right.png +0 -0
  217. data/core/public/images/refinery/cross.png +0 -0
  218. data/core/public/images/refinery/dialogLoadingAnimation.gif +0 -0
  219. data/core/public/images/refinery/header_background.png +0 -0
  220. data/core/public/images/refinery/hover-gradient.jpg +0 -0
  221. data/core/public/images/refinery/icons/accept.png +0 -0
  222. data/core/public/images/refinery/icons/add.png +0 -0
  223. data/core/public/images/refinery/icons/ajax-loader.gif +0 -0
  224. data/core/public/images/refinery/icons/application_edit.png +0 -0
  225. data/core/public/images/refinery/icons/application_go.png +0 -0
  226. data/core/public/images/refinery/icons/arrow_left.png +0 -0
  227. data/core/public/images/refinery/icons/arrow_switch.png +0 -0
  228. data/core/public/images/refinery/icons/arrow_up.png +0 -0
  229. data/core/public/images/refinery/icons/bin.png +0 -0
  230. data/core/public/images/refinery/icons/bin_closed.png +0 -0
  231. data/core/public/images/refinery/icons/cancel.png +0 -0
  232. data/core/public/images/refinery/icons/cog_add.png +0 -0
  233. data/core/public/images/refinery/icons/cog_edit.png +0 -0
  234. data/core/public/images/refinery/icons/cross.png +0 -0
  235. data/core/public/images/refinery/icons/delete.png +0 -0
  236. data/core/public/images/refinery/icons/doc.png +0 -0
  237. data/core/public/images/refinery/icons/down.gif +0 -0
  238. data/core/public/images/refinery/icons/edit.png +0 -0
  239. data/core/public/images/refinery/icons/email.png +0 -0
  240. data/core/public/images/refinery/icons/email_edit.png +0 -0
  241. data/core/public/images/refinery/icons/email_go.png +0 -0
  242. data/core/public/images/refinery/icons/email_open.png +0 -0
  243. data/core/public/images/refinery/icons/eye.png +0 -0
  244. data/core/public/images/refinery/icons/folder_page_white.png +0 -0
  245. data/core/public/images/refinery/icons/image_add.png +0 -0
  246. data/core/public/images/refinery/icons/image_edit.png +0 -0
  247. data/core/public/images/refinery/icons/img.png +0 -0
  248. data/core/public/images/refinery/icons/information.png +0 -0
  249. data/core/public/images/refinery/icons/layout_add.png +0 -0
  250. data/core/public/images/refinery/icons/layout_edit.png +0 -0
  251. data/core/public/images/refinery/icons/music.png +0 -0
  252. data/core/public/images/refinery/icons/page_add.png +0 -0
  253. data/core/public/images/refinery/icons/page_edit.png +0 -0
  254. data/core/public/images/refinery/icons/page_white_edit.png +0 -0
  255. data/core/public/images/refinery/icons/page_white_gear.png +0 -0
  256. data/core/public/images/refinery/icons/page_white_put.png +0 -0
  257. data/core/public/images/refinery/icons/pdf.png +0 -0
  258. data/core/public/images/refinery/icons/ppt.png +0 -0
  259. data/core/public/images/refinery/icons/star.png +0 -0
  260. data/core/public/images/refinery/icons/tick.png +0 -0
  261. data/core/public/images/refinery/icons/up.gif +0 -0
  262. data/core/public/images/refinery/icons/user_add.png +0 -0
  263. data/core/public/images/refinery/icons/user_comment.png +0 -0
  264. data/core/public/images/refinery/icons/user_edit.png +0 -0
  265. data/core/public/images/refinery/icons/xls.png +0 -0
  266. data/core/public/images/refinery/icons/zip.png +0 -0
  267. data/core/public/images/refinery/icons/zoom.png +0 -0
  268. data/core/public/images/refinery/logo-large.png +0 -0
  269. data/core/public/images/refinery/logo-medium.png +0 -0
  270. data/core/public/images/refinery/logo-site-bar.png +0 -0
  271. data/core/public/images/refinery/logo-small-medium.png +0 -0
  272. data/core/public/images/refinery/logo-small.png +0 -0
  273. data/core/public/images/refinery/logo-tiny.png +0 -0
  274. data/core/public/images/refinery/logo.png +0 -0
  275. data/core/public/images/refinery/nav-3-background.gif +0 -0
  276. data/core/public/images/refinery/nav_inactive_background.png +0 -0
  277. data/core/public/images/refinery/orange_button.png +0 -0
  278. data/core/public/images/refinery/page_bg.png +0 -0
  279. data/core/public/images/refinery/resolve_digital_footer_logo.png +0 -0
  280. data/core/public/images/refinery/text_field_background.png +0 -0
  281. data/core/public/images/refinery/tooltip-nib.gif +0 -0
  282. data/core/public/images/refinery/tooltip-nib.png +0 -0
  283. data/core/public/images/wymeditor/skins/refinery/arrow_redo.png +0 -0
  284. data/core/public/images/wymeditor/skins/refinery/arrow_undo.png +0 -0
  285. data/core/public/images/wymeditor/skins/refinery/eye.png +0 -0
  286. data/core/public/images/wymeditor/skins/refinery/iframe/lbl-blockquote.png +0 -0
  287. data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h1.png +0 -0
  288. data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h2.png +0 -0
  289. data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h3.png +0 -0
  290. data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h4.png +0 -0
  291. data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h5.png +0 -0
  292. data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h6.png +0 -0
  293. data/core/public/images/wymeditor/skins/refinery/iframe/lbl-p.png +0 -0
  294. data/core/public/images/wymeditor/skins/refinery/iframe/lbl-pre.png +0 -0
  295. data/core/public/images/wymeditor/skins/refinery/link_add.png +0 -0
  296. data/core/public/images/wymeditor/skins/refinery/link_break.png +0 -0
  297. data/core/public/images/wymeditor/skins/refinery/page_code.png +0 -0
  298. data/core/public/images/wymeditor/skins/refinery/page_paste.png +0 -0
  299. data/core/public/images/wymeditor/skins/refinery/photo_add.png +0 -0
  300. data/core/public/images/wymeditor/skins/refinery/right.png +0 -0
  301. data/core/public/images/wymeditor/skins/refinery/style.png +0 -0
  302. data/core/public/images/wymeditor/skins/refinery/table_add.png +0 -0
  303. data/core/public/images/wymeditor/skins/refinery/text_align_center.png +0 -0
  304. data/core/public/images/wymeditor/skins/refinery/text_align_justify.png +0 -0
  305. data/core/public/images/wymeditor/skins/refinery/text_align_left.png +0 -0
  306. data/core/public/images/wymeditor/skins/refinery/text_align_right.png +0 -0
  307. data/core/public/images/wymeditor/skins/refinery/text_bold.png +0 -0
  308. data/core/public/images/wymeditor/skins/refinery/text_heading_1.png +0 -0
  309. data/core/public/images/wymeditor/skins/refinery/text_heading_2.png +0 -0
  310. data/core/public/images/wymeditor/skins/refinery/text_heading_3.png +0 -0
  311. data/core/public/images/wymeditor/skins/refinery/text_heading_4.png +0 -0
  312. data/core/public/images/wymeditor/skins/refinery/text_heading_5.png +0 -0
  313. data/core/public/images/wymeditor/skins/refinery/text_heading_6.png +0 -0
  314. data/core/public/images/wymeditor/skins/refinery/text_indent.png +0 -0
  315. data/core/public/images/wymeditor/skins/refinery/text_indent_remove.png +0 -0
  316. data/core/public/images/wymeditor/skins/refinery/text_italic.png +0 -0
  317. data/core/public/images/wymeditor/skins/refinery/text_list_bullets.png +0 -0
  318. data/core/public/images/wymeditor/skins/refinery/text_list_numbers.png +0 -0
  319. data/core/public/images/wymeditor/skins/refinery/text_paragraph.png +0 -0
  320. data/core/public/images/wymeditor/skins/refinery/text_strikethrough.png +0 -0
  321. data/core/public/images/wymeditor/skins/refinery/text_subscript.png +0 -0
  322. data/core/public/images/wymeditor/skins/refinery/text_superscript.png +0 -0
  323. data/core/public/images/wymeditor/skins/refinery/text_underline.png +0 -0
  324. data/core/public/images/wymeditor/skins/wymeditor_icon.png +0 -0
  325. data/core/public/javascripts/admin.js +0 -7
  326. data/core/public/javascripts/application.js +0 -1
  327. data/core/public/javascripts/dd_belatedpng.js +0 -13
  328. data/core/public/javascripts/i18n-messages.js +0 -2
  329. data/core/public/javascripts/jquery-min.js +0 -154
  330. data/core/public/javascripts/jquery-ui-custom-min.js +0 -249
  331. data/core/public/javascripts/jquery.js +0 -6240
  332. data/core/public/javascripts/jquery/GPL-LICENSE.txt +0 -278
  333. data/core/public/javascripts/jquery/MIT-LICENSE.txt +0 -20
  334. data/core/public/javascripts/jquery/jquery.corner.js +0 -345
  335. data/core/public/javascripts/jquery/jquery.html5-placeholder-shim.js +0 -88
  336. data/core/public/javascripts/jquery/jquery.jcarousel.js +0 -900
  337. data/core/public/javascripts/jquery/jquery.textTruncate.js +0 -174
  338. data/core/public/javascripts/jquery/jquery.timers.js +0 -138
  339. data/core/public/javascripts/modernizr-min.js +0 -30
  340. data/core/public/javascripts/rails.js +0 -152
  341. data/core/public/javascripts/refinery/admin.js +0 -1114
  342. data/core/public/javascripts/refinery/boot_wym.js +0 -285
  343. data/core/public/javascripts/refinery/core.js +0 -18
  344. data/core/public/javascripts/refinery/i18n.js +0 -340
  345. data/core/public/javascripts/refinery/nestedsortables.js +0 -164
  346. data/core/public/javascripts/refinery/serializelist.js +0 -66
  347. data/core/public/javascripts/refinery/site_bar.js +0 -16
  348. data/core/public/javascripts/refinery/submenu.js +0 -49
  349. data/core/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +0 -5142
  350. data/core/public/javascripts/wymeditor/lang/ca.js +0 -45
  351. data/core/public/javascripts/wymeditor/lang/cs.js +0 -45
  352. data/core/public/javascripts/wymeditor/lang/da.js +0 -48
  353. data/core/public/javascripts/wymeditor/lang/de.js +0 -45
  354. data/core/public/javascripts/wymeditor/lang/en.js +0 -47
  355. data/core/public/javascripts/wymeditor/lang/es.js +0 -45
  356. data/core/public/javascripts/wymeditor/lang/fa.js +0 -46
  357. data/core/public/javascripts/wymeditor/lang/fr.js +0 -45
  358. data/core/public/javascripts/wymeditor/lang/he.js +0 -45
  359. data/core/public/javascripts/wymeditor/lang/hu.js +0 -45
  360. data/core/public/javascripts/wymeditor/lang/it.js +0 -45
  361. data/core/public/javascripts/wymeditor/lang/lv.js +0 -47
  362. data/core/public/javascripts/wymeditor/lang/nb.js +0 -48
  363. data/core/public/javascripts/wymeditor/lang/nl.js +0 -47
  364. data/core/public/javascripts/wymeditor/lang/nn.js +0 -45
  365. data/core/public/javascripts/wymeditor/lang/pl.js +0 -45
  366. data/core/public/javascripts/wymeditor/lang/pt-BR.js +0 -47
  367. data/core/public/javascripts/wymeditor/lang/pt.js +0 -45
  368. data/core/public/javascripts/wymeditor/lang/rs.js +0 -47
  369. data/core/public/javascripts/wymeditor/lang/ru.js +0 -45
  370. data/core/public/javascripts/wymeditor/lang/sl.js +0 -47
  371. data/core/public/javascripts/wymeditor/lang/sv.js +0 -45
  372. data/core/public/javascripts/wymeditor/lang/tr.js +0 -45
  373. data/core/public/javascripts/wymeditor/lang/zh_cn.js +0 -47
  374. data/core/public/javascripts/wymeditor/skins/refinery/skin.js +0 -48
  375. data/core/public/robots.txt +0 -3
  376. data/core/public/stylesheets/application.css +0 -4
  377. data/core/public/stylesheets/formatting.css +0 -4
  378. data/core/public/stylesheets/home.css +0 -4
  379. data/core/public/stylesheets/refinery/application.css +0 -72
  380. data/core/public/stylesheets/refinery/formatting.css +0 -57
  381. data/core/public/stylesheets/refinery/home.css +0 -0
  382. data/core/public/stylesheets/refinery/refinery.css +0 -1572
  383. data/core/public/stylesheets/refinery/site_bar.css +0 -87
  384. data/core/public/stylesheets/refinery/submenu.css +0 -22
  385. data/core/public/stylesheets/refinery/theme.css +0 -36
  386. data/core/public/stylesheets/refinery/tooltips.css +0 -34
  387. data/core/public/stylesheets/refinery/ui.css +0 -107
  388. data/core/public/stylesheets/theme.css +0 -4
  389. data/core/public/stylesheets/wymeditor/skins/refinery/skin.css +0 -528
  390. data/core/public/stylesheets/wymeditor/skins/refinery/wymiframe.css +0 -96
  391. data/core/public/wymeditor/GPL-license.txt +0 -278
  392. data/core/public/wymeditor/MIT-license.txt +0 -20
  393. data/core/public/wymeditor/README +0 -35
  394. data/core/refinerycms-core.gemspec +0 -20
  395. data/core/spec/lib/refinery/plugins_spec.rb +0 -90
  396. data/dashboard/app/controllers/admin/dashboard_controller.rb +0 -38
  397. data/dashboard/app/helpers/admin/dashboard_helper.rb +0 -24
  398. data/dashboard/app/views/admin/dashboard/_additional_dashboard_menu_items.html.erb +0 -1
  399. data/dashboard/app/views/admin/dashboard/_recent_activity.html.erb +0 -14
  400. data/dashboard/app/views/admin/dashboard/_recent_inquiries.html.erb +0 -11
  401. data/dashboard/app/views/admin/dashboard/index.html.erb +0 -70
  402. data/dashboard/app/views/admin/dashboard/index.rss.builder +0 -26
  403. data/dashboard/config/locales/cs.yml +0 -25
  404. data/dashboard/config/locales/da.yml +0 -25
  405. data/dashboard/config/locales/de.yml +0 -25
  406. data/dashboard/config/locales/el.yml +0 -25
  407. data/dashboard/config/locales/en.yml +0 -25
  408. data/dashboard/config/locales/es.yml +0 -28
  409. data/dashboard/config/locales/fr.yml +0 -25
  410. data/dashboard/config/locales/it.yml +0 -27
  411. data/dashboard/config/locales/lolcat.yml +0 -24
  412. data/dashboard/config/locales/lt.yml +0 -25
  413. data/dashboard/config/locales/lv.yml +0 -27
  414. data/dashboard/config/locales/nb.yml +0 -25
  415. data/dashboard/config/locales/nl.yml +0 -25
  416. data/dashboard/config/locales/pl.yml +0 -29
  417. data/dashboard/config/locales/pt-BR.yml +0 -29
  418. data/dashboard/config/locales/rs.yml +0 -26
  419. data/dashboard/config/locales/ru.yml +0 -29
  420. data/dashboard/config/locales/sl.yml +0 -24
  421. data/dashboard/config/locales/sv.yml +0 -25
  422. data/dashboard/config/locales/zh-CN.yml +0 -25
  423. data/dashboard/config/locales/zh-TW.yml +0 -25
  424. data/dashboard/config/routes.rb +0 -11
  425. data/dashboard/features/dashboard.feature +0 -35
  426. data/dashboard/features/support/paths.rb +0 -14
  427. data/dashboard/lib/dashboard.rb +0 -19
  428. data/dashboard/license.md +0 -21
  429. data/dashboard/readme.md +0 -22
  430. data/dashboard/refinerycms-dashboard.gemspec +0 -20
  431. data/images/app/controllers/admin/images_controller.rb +0 -108
  432. data/images/app/helpers/admin/images_helper.rb +0 -27
  433. data/images/app/models/image.rb +0 -72
  434. data/images/app/views/admin/images/_existing_image.html.erb +0 -73
  435. data/images/app/views/admin/images/_form.html.erb +0 -54
  436. data/images/app/views/admin/images/_grid_view.html.erb +0 -19
  437. data/images/app/views/admin/images/_images.html.erb +0 -2
  438. data/images/app/views/admin/images/_list_view.html.erb +0 -10
  439. data/images/app/views/admin/images/_list_view_image.html.erb +0 -17
  440. data/images/app/views/admin/images/edit.html.erb +0 -1
  441. data/images/app/views/admin/images/index.html.erb +0 -38
  442. data/images/app/views/admin/images/insert.html.erb +0 -47
  443. data/images/app/views/admin/images/new.html.erb +0 -1
  444. data/images/config/locales/cs.yml +0 -41
  445. data/images/config/locales/da.yml +0 -41
  446. data/images/config/locales/de.yml +0 -41
  447. data/images/config/locales/el.yml +0 -41
  448. data/images/config/locales/en.yml +0 -41
  449. data/images/config/locales/es.yml +0 -40
  450. data/images/config/locales/fr.yml +0 -41
  451. data/images/config/locales/it.yml +0 -47
  452. data/images/config/locales/lolcat.yml +0 -41
  453. data/images/config/locales/lt.yml +0 -41
  454. data/images/config/locales/lv.yml +0 -41
  455. data/images/config/locales/nb.yml +0 -42
  456. data/images/config/locales/nl.yml +0 -40
  457. data/images/config/locales/pl.yml +0 -42
  458. data/images/config/locales/pt-BR.yml +0 -42
  459. data/images/config/locales/rs.yml +0 -42
  460. data/images/config/locales/ru.yml +0 -41
  461. data/images/config/locales/sl.yml +0 -40
  462. data/images/config/locales/sv.yml +0 -41
  463. data/images/config/locales/zh-CN.yml +0 -41
  464. data/images/config/locales/zh-TW.yml +0 -41
  465. data/images/config/routes.rb +0 -11
  466. data/images/db/migrate/20100913234707_create_refinerycms_images_schema.rb +0 -23
  467. data/images/features/manage_images.feature +0 -49
  468. data/images/features/step_definitions/image_steps.rb +0 -40
  469. data/images/features/support/factories.rb +0 -5
  470. data/images/features/support/paths.rb +0 -17
  471. data/images/features/uploads/beach.jpeg +0 -0
  472. data/images/features/uploads/id-rather-be-here.jpg +0 -0
  473. data/images/features/uploads/refinery_is_awesome.txt +0 -1
  474. data/images/lib/generators/refinerycms_images_generator.rb +0 -8
  475. data/images/lib/images.rb +0 -59
  476. data/images/license.md +0 -21
  477. data/images/readme.md +0 -34
  478. data/images/refinerycms-images.gemspec +0 -20
  479. data/images/spec/models/image_spec.rb +0 -87
  480. data/images/spec/uploads/beach.jpeg +0 -0
  481. data/pages/app/controllers/admin/page_parts_controller.rb +0 -24
  482. data/pages/app/controllers/admin/pages_controller.rb +0 -37
  483. data/pages/app/controllers/admin/pages_dialogs_controller.rb +0 -87
  484. data/pages/app/controllers/pages_controller.rb +0 -32
  485. data/pages/app/helpers/pages_helper.rb +0 -2
  486. data/pages/app/models/page.rb +0 -290
  487. data/pages/app/models/page_part.rb +0 -23
  488. data/pages/app/presenters/page_presenter.rb +0 -7
  489. data/pages/app/views/admin/pages/_form.html.erb +0 -61
  490. data/pages/app/views/admin/pages/_form_advanced_options.html.erb +0 -79
  491. data/pages/app/views/admin/pages/_form_advanced_options_seo.html.erb +0 -24
  492. data/pages/app/views/admin/pages/_form_fields_after_title.html.erb +0 -1
  493. data/pages/app/views/admin/pages/_form_new_page_parts.html.erb +0 -14
  494. data/pages/app/views/admin/pages/_form_page_parts.html.erb +0 -47
  495. data/pages/app/views/admin/pages/_locale_picker.html.erb +0 -11
  496. data/pages/app/views/admin/pages/_page.html.erb +0 -33
  497. data/pages/app/views/admin/pages/_page_part_field.html.erb +0 -5
  498. data/pages/app/views/admin/pages/_sortable_list.html.erb +0 -5
  499. data/pages/app/views/admin/pages/edit.html.erb +0 -1
  500. data/pages/app/views/admin/pages/index.html.erb +0 -40
  501. data/pages/app/views/admin/pages/new.html.erb +0 -1
  502. data/pages/app/views/admin/pages_dialogs/_page_link.html.erb +0 -13
  503. data/pages/app/views/admin/pages_dialogs/link_to.html.erb +0 -141
  504. data/pages/app/views/pages/home.html.erb +0 -1
  505. data/pages/app/views/pages/show.html.erb +0 -1
  506. data/pages/config/locales/cs.yml +0 -84
  507. data/pages/config/locales/da.yml +0 -84
  508. data/pages/config/locales/de.yml +0 -84
  509. data/pages/config/locales/el.yml +0 -84
  510. data/pages/config/locales/en.yml +0 -84
  511. data/pages/config/locales/es.yml +0 -83
  512. data/pages/config/locales/fr.yml +0 -84
  513. data/pages/config/locales/it.yml +0 -98
  514. data/pages/config/locales/lolcat.yml +0 -83
  515. data/pages/config/locales/lt.yml +0 -85
  516. data/pages/config/locales/lv.yml +0 -86
  517. data/pages/config/locales/nb.yml +0 -85
  518. data/pages/config/locales/nl.yml +0 -81
  519. data/pages/config/locales/pl.yml +0 -85
  520. data/pages/config/locales/pt-BR.yml +0 -85
  521. data/pages/config/locales/rs.yml +0 -84
  522. data/pages/config/locales/ru.yml +0 -108
  523. data/pages/config/locales/sl.yml +0 -83
  524. data/pages/config/locales/sv.yml +0 -84
  525. data/pages/config/locales/zh-CN.yml +0 -84
  526. data/pages/config/locales/zh-TW.yml +0 -84
  527. data/pages/config/routes.rb +0 -21
  528. data/pages/db/migrate/20100913234708_create_refinerycms_pages_schema.rb +0 -53
  529. data/pages/db/migrate/20101214040815_translate_page_plugin.rb +0 -29
  530. data/pages/db/migrate/20101216194133_remove_cached_slug_from_pages.rb +0 -9
  531. data/pages/db/seeds/pages.rb +0 -43
  532. data/pages/features/manage_pages.feature +0 -47
  533. data/pages/features/step_definitions/page_steps.rb +0 -53
  534. data/pages/features/support/paths.rb +0 -26
  535. data/pages/features/visit_pages.feature +0 -47
  536. data/pages/lib/generators/refinerycms_pages_generator.rb +0 -8
  537. data/pages/lib/pages.rb +0 -36
  538. data/pages/lib/pages/marketable_routes.rb +0 -3
  539. data/pages/lib/pages/tabs.rb +0 -30
  540. data/pages/license.md +0 -21
  541. data/pages/readme.md +0 -156
  542. data/pages/refinerycms-pages.gemspec +0 -21
  543. data/pages/spec/models/page_spec.rb +0 -155
  544. data/resources/app/controllers/admin/resources_controller.rb +0 -89
  545. data/resources/app/models/resource.rb +0 -53
  546. data/resources/app/views/admin/resources/_existing_resource.html.erb +0 -32
  547. data/resources/app/views/admin/resources/_form.html.erb +0 -55
  548. data/resources/app/views/admin/resources/_resource.html.erb +0 -17
  549. data/resources/app/views/admin/resources/_resources.html.erb +0 -10
  550. data/resources/app/views/admin/resources/edit.html.erb +0 -1
  551. data/resources/app/views/admin/resources/index.html.erb +0 -31
  552. data/resources/app/views/admin/resources/insert.html.erb +0 -54
  553. data/resources/app/views/admin/resources/new.html.erb +0 -1
  554. data/resources/config/locales/cs.yml +0 -34
  555. data/resources/config/locales/da.yml +0 -34
  556. data/resources/config/locales/de.yml +0 -34
  557. data/resources/config/locales/el.yml +0 -34
  558. data/resources/config/locales/en.yml +0 -34
  559. data/resources/config/locales/es.yml +0 -33
  560. data/resources/config/locales/fr.yml +0 -34
  561. data/resources/config/locales/it.yml +0 -43
  562. data/resources/config/locales/lolcat.yml +0 -34
  563. data/resources/config/locales/lt.yml +0 -34
  564. data/resources/config/locales/lv.yml +0 -34
  565. data/resources/config/locales/nb.yml +0 -34
  566. data/resources/config/locales/nl.yml +0 -33
  567. data/resources/config/locales/pl.yml +0 -35
  568. data/resources/config/locales/pt-BR.yml +0 -34
  569. data/resources/config/locales/rs.yml +0 -35
  570. data/resources/config/locales/ru.yml +0 -34
  571. data/resources/config/locales/sl.yml +0 -33
  572. data/resources/config/locales/sv.yml +0 -34
  573. data/resources/config/locales/zh-CN.yml +0 -34
  574. data/resources/config/locales/zh-TW.yml +0 -34
  575. data/resources/config/routes.rb +0 -11
  576. data/resources/db/migrate/20100913234709_create_refinerycms_resources_schema.rb +0 -21
  577. data/resources/features/manage_files.feature +0 -43
  578. data/resources/features/step_definitions/file_steps.rb +0 -21
  579. data/resources/features/support/paths.rb +0 -17
  580. data/resources/features/uploads/beach.jpeg +0 -0
  581. data/resources/features/uploads/refinery_is_awesome.txt +0 -1
  582. data/resources/lib/generators/refinerycms_resources_generator.rb +0 -8
  583. data/resources/lib/resources.rb +0 -58
  584. data/resources/license.md +0 -21
  585. data/resources/readme.md +0 -9
  586. data/resources/refinerycms-resources.gemspec +0 -20
  587. data/resources/spec/models/resource_spec.rb +0 -91
  588. data/resources/spec/uploads/refinery_is_awesome.txt +0 -1
  589. data/settings/app/controllers/admin/refinery_settings_controller.rb +0 -77
  590. data/settings/app/helpers/refinery_settings_helper.rb +0 -25
  591. data/settings/app/models/refinery_setting.rb +0 -212
  592. data/settings/app/views/admin/refinery_settings/_form.html.erb +0 -62
  593. data/settings/app/views/admin/refinery_settings/_refinery_setting.html.erb +0 -23
  594. data/settings/app/views/admin/refinery_settings/_refinery_settings.html.erb +0 -5
  595. data/settings/app/views/admin/refinery_settings/edit.html.erb +0 -1
  596. data/settings/app/views/admin/refinery_settings/index.html.erb +0 -49
  597. data/settings/app/views/admin/refinery_settings/new.html.erb +0 -1
  598. data/settings/config/locales/cs.yml +0 -45
  599. data/settings/config/locales/da.yml +0 -46
  600. data/settings/config/locales/de.yml +0 -46
  601. data/settings/config/locales/el.yml +0 -46
  602. data/settings/config/locales/en.yml +0 -46
  603. data/settings/config/locales/es.yml +0 -43
  604. data/settings/config/locales/fr.yml +0 -44
  605. data/settings/config/locales/it.yml +0 -36
  606. data/settings/config/locales/lolcat.yml +0 -43
  607. data/settings/config/locales/lt.yml +0 -46
  608. data/settings/config/locales/lv.yml +0 -46
  609. data/settings/config/locales/nb.yml +0 -47
  610. data/settings/config/locales/nl.yml +0 -46
  611. data/settings/config/locales/pl.yml +0 -46
  612. data/settings/config/locales/pt-BR.yml +0 -44
  613. data/settings/config/locales/rs.yml +0 -46
  614. data/settings/config/locales/ru.yml +0 -43
  615. data/settings/config/locales/sl.yml +0 -25
  616. data/settings/config/locales/sv.yml +0 -45
  617. data/settings/config/locales/zh-CN.yml +0 -46
  618. data/settings/config/locales/zh-TW.yml +0 -46
  619. data/settings/config/routes.rb +0 -8
  620. data/settings/db/migrate/20100913234710_create_refinerycms_settings_schema.rb +0 -24
  621. data/settings/db/migrate/20100926142529_add_value_type_to_refinery_settings.rb +0 -9
  622. data/settings/features/manage_refinery_settings.feature +0 -5
  623. data/settings/features/step_definitions/setting_steps.rb +0 -9
  624. data/settings/features/support/paths.rb +0 -14
  625. data/settings/lib/generators/refinerycms_settings_generator.rb +0 -8
  626. data/settings/lib/settings.rb +0 -16
  627. data/settings/license.md +0 -21
  628. data/settings/readme.md +0 -55
  629. data/settings/refinerycms-settings.gemspec +0 -20
  630. data/settings/spec/models/refinery_setting_spec.rb +0 -101
@@ -1,88 +0,0 @@
1
- (function($) {
2
- $.extend($,{ placeholder: {
3
- browser_supported: function() {
4
- return this._supported !== undefined ?
5
- this._supported :
6
- ( this._supported = !!('placeholder' in $('<input type="text">')[0]) );
7
- },
8
- shim: function(opts) {
9
- var config = {
10
- color: '#888',
11
- cls: '',
12
- lr_padding:4,
13
- selector: 'input[placeholder], textarea[placeholder]'
14
- };
15
- $.extend(config,opts);
16
- !this.browser_supported() && $(config.selector)._placeholder_shim(config);
17
- }
18
- }});
19
-
20
- $.extend($.fn,{
21
- _placeholder_shim: function(config) {
22
- function calcPositionCss(target)
23
- {
24
- var op = $(target).offsetParent().offset();
25
- var ot = $(target).offset();
26
-
27
- return {
28
- top: ot.top - op.top + ($(target).outerHeight() - $(target).height()) /2,
29
- left: ot.left - op.left + config.lr_padding,
30
- width: $(target).width() - config.lr_padding
31
- };
32
- }
33
- return this.each(function() {
34
- if( $(this).data('placeholder') ) {
35
- var $ol = $(this).data('placeholder');
36
- $ol.css(calcPositionCss($(this)));
37
- return true;
38
- }
39
-
40
- var possible_line_height = {};
41
- if( $(this).css('height') != 'auto') {
42
- possible_line_height = { lineHeight: $(this).css('height') };
43
- }
44
-
45
- var ol = $('<label />')
46
- .text($(this).attr('placeholder'))
47
- .addClass(config.cls)
48
- .css($.extend({
49
- position:'absolute',
50
- display: 'inline',
51
- float:'none',
52
- overflow:'hidden',
53
- whiteSpace:'nowrap',
54
- textAlign: 'left',
55
- color: config.color,
56
- cursor: 'text',
57
- fontSize: $(this).css('font-size')
58
- }, possible_line_height))
59
- .css(calcPositionCss(this))
60
- .attr('for', this.id)
61
- .data('target',$(this))
62
- .click(function(){
63
- $(this).data('target').focus()
64
- })
65
- .insertBefore(this);
66
- $(this)
67
- .data('placeholder',ol)
68
- .focus(function(){
69
- ol.hide();
70
- }).blur(function() {
71
- ol[$(this).val().length ? 'hide' : 'show']();
72
- }).triggerHandler('blur');
73
- $(window)
74
- .resize(function() {
75
- var $target = ol.data('target')
76
- ol.css(calcPositionCss($target))
77
- });
78
- });
79
- }
80
- });
81
-
82
- })(jQuery);
83
-
84
- $(document).ready(function() {
85
- if ($.placeholder) {
86
- $.placeholder.shim();
87
- }
88
- });
@@ -1,900 +0,0 @@
1
- /*!
2
- * jCarousel - Riding carousels with jQuery
3
- * http://sorgalla.com/jcarousel/
4
- *
5
- * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
6
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
7
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
8
- *
9
- * Built on top of the jQuery library
10
- * http://jquery.com
11
- *
12
- * Inspired by the "Carousel Component" by Bill Scott
13
- * http://billwscott.com/carousel/
14
- */
15
-
16
- (function($) {
17
- /**
18
- * Creates a carousel for all matched elements.
19
- *
20
- * @example $("#mycarousel").jcarousel();
21
- * @before <ul id="mycarousel" class="jcarousel-skin-name"><li>First item</li><li>Second item</li></ul>
22
- * @result
23
- *
24
- * <div class="jcarousel-skin-name">
25
- * <div class="jcarousel-container">
26
- * <div disabled="disabled" class="jcarousel-prev jcarousel-prev-disabled"></div>
27
- * <div class="jcarousel-clip">
28
- * <ul class="jcarousel-list">
29
- * <li class="jcarousel-item-1">First item</li>
30
- * <li class="jcarousel-item-2">Second item</li>
31
- * </ul>
32
- * </div>
33
- * <div class="jcarousel-next"></div>
34
- * </div>
35
- * </div>
36
- *
37
- * @method jcarousel
38
- * @return jQuery
39
- * @param o {Hash|String} A set of key/value pairs to set as configuration properties or a method name to call on a formerly created instance.
40
- */
41
- $.fn.jcarousel = function(o) {
42
- if (typeof o == 'string') {
43
- var instance = $(this).data('jcarousel'), args = Array.prototype.slice.call(arguments, 1);
44
- return instance[o].apply(instance, args);
45
- } else
46
- return this.each(function() {
47
- $(this).data('jcarousel', new $jc(this, o));
48
- });
49
- };
50
-
51
- // Default configuration properties.
52
- var defaults = {
53
- vertical: false,
54
- listTag: 'ul',
55
- itemTag: 'li',
56
- start: 1,
57
- offset: 1,
58
- size: null,
59
- scroll: 3,
60
- visible: null,
61
- animation: 'normal',
62
- easing: 'swing',
63
- auto: 0,
64
- wrap: null,
65
- initCallback: null,
66
- reloadCallback: null,
67
- itemLoadCallback: null,
68
- itemFirstInCallback: null,
69
- itemFirstOutCallback: null,
70
- itemLastInCallback: null,
71
- itemLastOutCallback: null,
72
- itemVisibleInCallback: null,
73
- itemVisibleOutCallback: null,
74
- buttonNextHTML: '<div></div>',
75
- buttonPrevHTML: '<div></div>',
76
- buttonNextEvent: 'click',
77
- buttonPrevEvent: 'click',
78
- buttonNextCallback: null,
79
- buttonPrevCallback: null
80
- };
81
-
82
- /**
83
- * The jCarousel object.
84
- *
85
- * @constructor
86
- * @class jcarousel
87
- * @param e {HTMLElement} The element to create the carousel for.
88
- * @param o {Object} A set of key/value pairs to set as configuration properties.
89
- * @cat Plugins/jCarousel
90
- */
91
- $.jcarousel = function(e, o) {
92
- this.options = $.extend({}, defaults, o || {});
93
-
94
- this.locked = false;
95
-
96
- this.container = null;
97
- this.clip = null;
98
- this.list = null;
99
- this.buttonNext = null;
100
- this.buttonPrev = null;
101
-
102
- this.wh = !this.options.vertical ? 'width' : 'height';
103
- this.lt = !this.options.vertical ? 'left' : 'top';
104
-
105
- // Extract skin class
106
- var skin = '', split = e.className.split(' ');
107
-
108
- for (var i = 0; i < split.length; i++) {
109
- if (split[i].indexOf('jcarousel-skin') != -1) {
110
- $(e).removeClass(split[i]);
111
- skin = split[i];
112
- break;
113
- }
114
- }
115
-
116
- if (e.nodeName.toUpperCase() == this.options.listTag.toUpperCase()) {
117
- this.list = $(e);
118
- this.container = this.list.parent();
119
-
120
- if (this.container.hasClass('jcarousel-clip')) {
121
- if (!this.container.parent().hasClass('jcarousel-container'))
122
- this.container = this.container.wrap('<div></div>');
123
-
124
- this.container = this.container.parent();
125
- } else if (!this.container.hasClass('jcarousel-container'))
126
- this.container = this.list.wrap('<div></div>').parent();
127
- } else {
128
- this.container = $(e);
129
- this.list = this.container.find(this.options.listTag).eq(0);
130
- }
131
-
132
- if (skin != '' && this.container.parent()[0].className.indexOf('jcarousel-skin') == -1)
133
- this.container.wrap('<div class=" '+ skin + '"></div>');
134
-
135
- this.clip = this.list.parent();
136
-
137
- if (!this.clip.length || !this.clip.hasClass('jcarousel-clip'))
138
- this.clip = this.list.wrap('<div></div>').parent();
139
-
140
- this.buttonNext = $('.jcarousel-next', this.container);
141
-
142
- if (this.buttonNext.size() == 0 && this.options.buttonNextHTML != null)
143
- this.buttonNext = this.clip.after(this.options.buttonNextHTML).next();
144
-
145
- this.buttonNext.addClass(this.className('jcarousel-next'));
146
-
147
- this.buttonPrev = $('.jcarousel-prev', this.container);
148
-
149
- if (this.buttonPrev.size() == 0 && this.options.buttonPrevHTML != null)
150
- this.buttonPrev = this.clip.before(this.options.buttonPrevHTML).prev();
151
-
152
- this.buttonPrev.addClass(this.className('jcarousel-prev'));
153
-
154
- this.clip.addClass(this.className('jcarousel-clip')).css({
155
- overflow: 'hidden',
156
- position: 'relative'
157
- });
158
- this.list.addClass(this.className('jcarousel-list')).css({
159
- overflow: 'hidden',
160
- position: 'relative',
161
- top: 0,
162
- left: 0,
163
- margin: 0,
164
- padding: 0
165
- });
166
- this.container.addClass(this.className('jcarousel-container')).css({
167
- position: 'relative'
168
- });
169
-
170
- var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null;
171
- var li = this.list.children(this.options.itemTag);
172
-
173
- var self = this;
174
-
175
- if (li.size() > 0) {
176
- var wh = 0, i = this.options.offset;
177
- li.each(function() {
178
- self.format(this, i++);
179
- wh += self.dimension(this, di);
180
- });
181
-
182
- this.list.css(this.wh, wh + 'px');
183
-
184
- // Only set if not explicitly passed as option
185
- if (!o || o.size === undefined)
186
- this.options.size = li.size();
187
- }
188
-
189
- // For whatever reason, .show() does not work in Safari...
190
- this.container.css('display', 'block');
191
- this.buttonNext.css('display', 'block');
192
- this.buttonPrev.css('display', 'block');
193
-
194
- this.funcNext = function() { self.next(); };
195
- this.funcPrev = function() { self.prev(); };
196
- this.funcResize = function() { self.reload(); };
197
-
198
- if (this.options.initCallback != null)
199
- this.options.initCallback(this, 'init');
200
-
201
- if ($.browser.safari) {
202
- this.buttons(false, false);
203
- $(window).bind('load.jcarousel', function() { self.setup(); });
204
- } else
205
- this.setup();
206
- };
207
-
208
- // Create shortcut for internal use
209
- var $jc = $.jcarousel;
210
-
211
- $jc.fn = $jc.prototype = {
212
- jcarousel: '0.2.4'
213
- };
214
-
215
- $jc.fn.extend = $jc.extend = $.extend;
216
-
217
- $jc.fn.extend({
218
- /**
219
- * Setups the carousel.
220
- *
221
- * @method setup
222
- * @return undefined
223
- */
224
- setup: function() {
225
- this.first = null;
226
- this.last = null;
227
- this.prevFirst = null;
228
- this.prevLast = null;
229
- this.animating = false;
230
- this.timer = null;
231
- this.tail = null;
232
- this.inTail = false;
233
-
234
- if (this.locked)
235
- return;
236
-
237
- this.list.css(this.lt, this.pos(this.options.offset) + 'px');
238
- var p = this.pos(this.options.start);
239
- this.prevFirst = this.prevLast = null;
240
- this.animate(p, false);
241
-
242
- $(window).unbind('resize.jcarousel', this.funcResize).bind('resize.jcarousel', this.funcResize);
243
- },
244
-
245
- /**
246
- * Clears the list and resets the carousel.
247
- *
248
- * @method reset
249
- * @return undefined
250
- */
251
- reset: function() {
252
- this.list.empty();
253
-
254
- this.list.css(this.lt, '0px');
255
- this.list.css(this.wh, '10px');
256
-
257
- if (this.options.initCallback != null)
258
- this.options.initCallback(this, 'reset');
259
-
260
- this.setup();
261
- },
262
-
263
- /**
264
- * Reloads the carousel and adjusts positions.
265
- *
266
- * @method reload
267
- * @return undefined
268
- */
269
- reload: function() {
270
- if (this.tail != null && this.inTail)
271
- this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + this.tail);
272
-
273
- this.tail = null;
274
- this.inTail = false;
275
-
276
- if (this.options.reloadCallback != null)
277
- this.options.reloadCallback(this);
278
-
279
- if (this.options.visible != null) {
280
- var self = this;
281
- var di = Math.ceil(this.clipping() / this.options.visible), wh = 0, lt = 0;
282
- $(this.options.itemTag, this.list).each(function(i) {
283
- wh += self.dimension(this, di);
284
- if (i + 1 < self.first)
285
- lt = wh;
286
- });
287
-
288
- this.list.css(this.wh, wh + 'px');
289
- this.list.css(this.lt, -lt + 'px');
290
- }
291
-
292
- this.scroll(this.first, false);
293
- },
294
-
295
- /**
296
- * Locks the carousel.
297
- *
298
- * @method lock
299
- * @return undefined
300
- */
301
- lock: function() {
302
- this.locked = true;
303
- this.buttons();
304
- },
305
-
306
- /**
307
- * Unlocks the carousel.
308
- *
309
- * @method unlock
310
- * @return undefined
311
- */
312
- unlock: function() {
313
- this.locked = false;
314
- this.buttons();
315
- },
316
-
317
- /**
318
- * Sets the size of the carousel.
319
- *
320
- * @method size
321
- * @return undefined
322
- * @param s {Number} The size of the carousel.
323
- */
324
- size: function(s) {
325
- if (s != undefined) {
326
- this.options.size = s;
327
- if (!this.locked)
328
- this.buttons();
329
- }
330
-
331
- return this.options.size;
332
- },
333
-
334
- /**
335
- * Checks whether a list element exists for the given index (or index range).
336
- *
337
- * @method get
338
- * @return bool
339
- * @param i {Number} The index of the (first) element.
340
- * @param i2 {Number} The index of the last element.
341
- */
342
- has: function(i, i2) {
343
- if (i2 == undefined || !i2)
344
- i2 = i;
345
-
346
- if (this.options.size !== null && i2 > this.options.size)
347
- i2 = this.options.size;
348
-
349
- for (var j = i; j <= i2; j++) {
350
- var e = this.get(j);
351
- if (!e.length || e.hasClass('jcarousel-item-placeholder'))
352
- return false;
353
- }
354
-
355
- return true;
356
- },
357
-
358
- /**
359
- * Returns a jQuery object with list element for the given index.
360
- *
361
- * @method get
362
- * @return jQuery
363
- * @param i {Number} The index of the element.
364
- */
365
- get: function(i) {
366
- return $('.jcarousel-item-' + i, this.list);
367
- },
368
-
369
- /**
370
- * Adds an element for the given index to the list.
371
- * If the element already exists, it updates the inner html.
372
- * Returns the created element as jQuery object.
373
- *
374
- * @method add
375
- * @return jQuery
376
- * @param i {Number} The index of the element.
377
- * @param s {String} The innerHTML of the element.
378
- */
379
- add: function(i, s) {
380
- var e = this.get(i), old = 0, add = 0;
381
-
382
- if (e.length == 0) {
383
- var c, e = this.create(i), j = $jc.intval(i);
384
- while (c = this.get(--j)) {
385
- if (j <= 0 || c.length) {
386
- j <= 0 ? this.list.prepend(e) : c.after(e);
387
- break;
388
- }
389
- }
390
- } else
391
- old = this.dimension(e);
392
-
393
- e.removeClass(this.className('jcarousel-item-placeholder'));
394
- typeof s == 'string' ? e.html(s) : e.empty().append(s);
395
-
396
- var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null;
397
- var wh = this.dimension(e, di) - old;
398
-
399
- if (i > 0 && i < this.first)
400
- this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - wh + 'px');
401
-
402
- this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) + wh + 'px');
403
-
404
- return e;
405
- },
406
-
407
- /**
408
- * Removes an element for the given index from the list.
409
- *
410
- * @method remove
411
- * @return undefined
412
- * @param i {Number} The index of the element.
413
- */
414
- remove: function(i) {
415
- var e = this.get(i);
416
-
417
- // Check if item exists and is not currently visible
418
- if (!e.length || (i >= this.first && i <= this.last))
419
- return;
420
-
421
- var d = this.dimension(e);
422
-
423
- if (i < this.first)
424
- this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + d + 'px');
425
-
426
- e.remove();
427
-
428
- this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) - d + 'px');
429
- },
430
-
431
- /**
432
- * Moves the carousel forwards.
433
- *
434
- * @method next
435
- * @return undefined
436
- */
437
- next: function() {
438
- this.stopAuto();
439
-
440
- if (this.tail != null && !this.inTail)
441
- this.scrollTail(false);
442
- else
443
- this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'last') && this.options.size != null && this.last == this.options.size) ? 1 : this.first + this.options.scroll);
444
- },
445
-
446
- /**
447
- * Moves the carousel backwards.
448
- *
449
- * @method prev
450
- * @return undefined
451
- */
452
- prev: function() {
453
- this.stopAuto();
454
-
455
- if (this.tail != null && this.inTail)
456
- this.scrollTail(true);
457
- else
458
- this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'first') && this.options.size != null && this.first == 1) ? this.options.size : this.first - this.options.scroll);
459
- },
460
-
461
- /**
462
- * Scrolls the tail of the carousel.
463
- *
464
- * @method scrollTail
465
- * @return undefined
466
- * @param b {Boolean} Whether scroll the tail back or forward.
467
- */
468
- scrollTail: function(b) {
469
- if (this.locked || this.animating || !this.tail)
470
- return;
471
-
472
- var pos = $jc.intval(this.list.css(this.lt));
473
-
474
- !b ? pos -= this.tail : pos += this.tail;
475
- this.inTail = !b;
476
-
477
- // Save for callbacks
478
- this.prevFirst = this.first;
479
- this.prevLast = this.last;
480
-
481
- this.animate(pos);
482
- },
483
-
484
- /**
485
- * Scrolls the carousel to a certain position.
486
- *
487
- * @method scroll
488
- * @return undefined
489
- * @param i {Number} The index of the element to scoll to.
490
- * @param a {Boolean} Flag indicating whether to perform animation.
491
- */
492
- scroll: function(i, a) {
493
- if (this.locked || this.animating)
494
- return;
495
-
496
- this.animate(this.pos(i), a);
497
- },
498
-
499
- /**
500
- * Prepares the carousel and return the position for a certian index.
501
- *
502
- * @method pos
503
- * @return {Number}
504
- * @param i {Number} The index of the element to scoll to.
505
- */
506
- pos: function(i) {
507
- var pos = $jc.intval(this.list.css(this.lt));
508
-
509
- if (this.locked || this.animating)
510
- return pos;
511
-
512
- if (this.options.wrap != 'circular')
513
- i = i < 1 ? 1 : (this.options.size && i > this.options.size ? this.options.size : i);
514
-
515
- var back = this.first > i;
516
-
517
- // Create placeholders, new list width/height
518
- // and new list position
519
- var f = this.options.wrap != 'circular' && this.first <= 1 ? 1 : this.first;
520
- var c = back ? this.get(f) : this.get(this.last);
521
- var j = back ? f : f - 1;
522
- var e = null, l = 0, p = false, d = 0, g;
523
-
524
- while (back ? --j >= i : ++j < i) {
525
- e = this.get(j);
526
- p = !e.length;
527
- if (e.length == 0) {
528
- e = this.create(j).addClass(this.className('jcarousel-item-placeholder'));
529
- c[back ? 'before' : 'after' ](e);
530
-
531
- if (this.first != null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) {
532
- g = this.get(this.index(j));
533
- if (g.length)
534
- this.add(j, g.children().clone(true));
535
- }
536
- }
537
-
538
- c = e;
539
- d = this.dimension(e);
540
-
541
- if (p)
542
- l += d;
543
-
544
- if (this.first != null && (this.options.wrap == 'circular' || (j >= 1 && (this.options.size == null || j <= this.options.size))))
545
- pos = back ? pos + d : pos - d;
546
- }
547
-
548
- // Calculate visible items
549
- var clipping = this.clipping();
550
- var cache = [];
551
- var visible = 0, j = i, v = 0;
552
- var c = this.get(i - 1);
553
-
554
- while (++visible) {
555
- e = this.get(j);
556
- p = !e.length;
557
- if (e.length == 0) {
558
- e = this.create(j).addClass(this.className('jcarousel-item-placeholder'));
559
- // This should only happen on a next scroll
560
- c.length == 0 ? this.list.prepend(e) : c[back ? 'before' : 'after' ](e);
561
-
562
- if (this.first != null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) {
563
- g = this.get(this.index(j));
564
- if (g.length)
565
- this.add(j, g.find('>*').clone(true));
566
- }
567
- }
568
-
569
- c = e;
570
- var d = this.dimension(e);
571
- if (d == 0) {
572
- if (console && $.isFunction(console.log)) {
573
- console.log('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...');
574
- }
575
- return 0;
576
- }
577
-
578
- if (this.options.wrap != 'circular' && this.options.size !== null && j > this.options.size)
579
- cache.push(e);
580
- else if (p)
581
- l += d;
582
-
583
- v += d;
584
-
585
- if (v >= clipping)
586
- break;
587
-
588
- j++;
589
- }
590
-
591
- // Remove out-of-range placeholders
592
- for (var x = 0; x < cache.length; x++)
593
- cache[x].remove();
594
-
595
- // Resize list
596
- if (l > 0) {
597
- this.list.css(this.wh, this.dimension(this.list) + l + 'px');
598
-
599
- if (back) {
600
- pos -= l;
601
- this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - l + 'px');
602
- }
603
- }
604
-
605
- // Calculate first and last item
606
- var last = i + visible - 1;
607
- if (this.options.wrap != 'circular' && this.options.size && last > this.options.size)
608
- last = this.options.size;
609
-
610
- if (j > last) {
611
- visible = 0, j = last, v = 0;
612
- while (++visible) {
613
- var e = this.get(j--);
614
- if (!e.length)
615
- break;
616
- v += this.dimension(e);
617
- if (v >= clipping)
618
- break;
619
- }
620
- }
621
-
622
- var first = last - visible + 1;
623
- if (this.options.wrap != 'circular' && first < 1)
624
- first = 1;
625
-
626
- if (this.inTail && back) {
627
- pos += this.tail;
628
- this.inTail = false;
629
- }
630
-
631
- this.tail = null;
632
- if (this.options.wrap != 'circular' && last == this.options.size && (last - visible + 1) >= 1) {
633
- var m = $jc.margin(this.get(last), !this.options.vertical ? 'marginRight' : 'marginBottom');
634
- if ((v - m) > clipping)
635
- this.tail = v - clipping - m;
636
- }
637
-
638
- // Adjust position
639
- while (i-- > first)
640
- pos += this.dimension(this.get(i));
641
-
642
- // Save visible item range
643
- this.prevFirst = this.first;
644
- this.prevLast = this.last;
645
- this.first = first;
646
- this.last = last;
647
-
648
- return pos;
649
- },
650
-
651
- /**
652
- * Animates the carousel to a certain position.
653
- *
654
- * @method animate
655
- * @return undefined
656
- * @param p {Number} Position to scroll to.
657
- * @param a {Boolean} Flag indicating whether to perform animation.
658
- */
659
- animate: function(p, a) {
660
- if (this.locked || this.animating)
661
- return;
662
-
663
- this.animating = true;
664
-
665
- var self = this;
666
- var scrolled = function() {
667
- self.animating = false;
668
-
669
- if (p == 0)
670
- self.list.css(self.lt, 0);
671
-
672
- if (self.options.wrap == 'circular' || self.options.wrap == 'both' || self.options.wrap == 'last' || self.options.size == null || self.last < self.options.size)
673
- self.startAuto();
674
-
675
- self.buttons();
676
- self.notify('onAfterAnimation');
677
- };
678
-
679
- this.notify('onBeforeAnimation');
680
-
681
- // Animate
682
- if (!this.options.animation || a == false) {
683
- this.list.css(this.lt, p + 'px');
684
- scrolled();
685
- } else {
686
- var o = !this.options.vertical ? {'left': p} : {'top': p};
687
- this.list.animate(o, this.options.animation, this.options.easing, scrolled);
688
- }
689
- },
690
-
691
- /**
692
- * Starts autoscrolling.
693
- *
694
- * @method auto
695
- * @return undefined
696
- * @param s {Number} Seconds to periodically autoscroll the content.
697
- */
698
- startAuto: function(s) {
699
- if (s != undefined)
700
- this.options.auto = s;
701
-
702
- if (this.options.auto == 0)
703
- return this.stopAuto();
704
-
705
- if (this.timer != null)
706
- return;
707
-
708
- var self = this;
709
- this.timer = setTimeout(function() { self.next(); }, this.options.auto * 1000);
710
- },
711
-
712
- /**
713
- * Stops autoscrolling.
714
- *
715
- * @method stopAuto
716
- * @return undefined
717
- */
718
- stopAuto: function() {
719
- if (this.timer == null)
720
- return;
721
-
722
- clearTimeout(this.timer);
723
- this.timer = null;
724
- },
725
-
726
- /**
727
- * Sets the states of the prev/next buttons.
728
- *
729
- * @method buttons
730
- * @return undefined
731
- */
732
- buttons: function(n, p) {
733
- if (n == undefined || n == null) {
734
- var n = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'first') || this.options.size == null || this.last < this.options.size);
735
- if (!this.locked && (!this.options.wrap || this.options.wrap == 'first') && this.options.size != null && this.last >= this.options.size)
736
- n = this.tail != null && !this.inTail;
737
- }
738
-
739
- if (p == undefined || p == null) {
740
- var p = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'last') || this.first > 1);
741
- if (!this.locked && (!this.options.wrap || this.options.wrap == 'last') && this.options.size != null && this.first == 1)
742
- p = this.tail != null && this.inTail;
743
- }
744
-
745
- var self = this;
746
-
747
- this.buttonNext[n ? 'bind' : 'unbind'](this.options.buttonNextEvent + '.jcarousel', this.funcNext)[n ? 'removeClass' : 'addClass'](this.className('jcarousel-next-disabled')).attr('disabled', n ? false : true);
748
- this.buttonPrev[p ? 'bind' : 'unbind'](this.options.buttonPrevEvent + '.jcarousel', this.funcPrev)[p ? 'removeClass' : 'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled', p ? false : true);
749
-
750
- if (this.buttonNext.length > 0 && (this.buttonNext[0].jcarouselstate == undefined || this.buttonNext[0].jcarouselstate != n) && this.options.buttonNextCallback != null) {
751
- this.buttonNext.each(function() { self.options.buttonNextCallback(self, this, n); });
752
- this.buttonNext[0].jcarouselstate = n;
753
- }
754
-
755
- if (this.buttonPrev.length > 0 && (this.buttonPrev[0].jcarouselstate == undefined || this.buttonPrev[0].jcarouselstate != p) && this.options.buttonPrevCallback != null) {
756
- this.buttonPrev.each(function() { self.options.buttonPrevCallback(self, this, p); });
757
- this.buttonPrev[0].jcarouselstate = p;
758
- }
759
- },
760
-
761
- /**
762
- * Notify callback of a specified event.
763
- *
764
- * @method notify
765
- * @return undefined
766
- * @param evt {String} The event name
767
- */
768
- notify: function(evt) {
769
- var state = this.prevFirst == null ? 'init' : (this.prevFirst < this.first ? 'next' : 'prev');
770
-
771
- // Load items
772
- this.callback('itemLoadCallback', evt, state);
773
-
774
- if (this.prevFirst !== this.first) {
775
- this.callback('itemFirstInCallback', evt, state, this.first);
776
- this.callback('itemFirstOutCallback', evt, state, this.prevFirst);
777
- }
778
-
779
- if (this.prevLast !== this.last) {
780
- this.callback('itemLastInCallback', evt, state, this.last);
781
- this.callback('itemLastOutCallback', evt, state, this.prevLast);
782
- }
783
-
784
- this.callback('itemVisibleInCallback', evt, state, this.first, this.last, this.prevFirst, this.prevLast);
785
- this.callback('itemVisibleOutCallback', evt, state, this.prevFirst, this.prevLast, this.first, this.last);
786
- },
787
-
788
- callback: function(cb, evt, state, i1, i2, i3, i4) {
789
- if (this.options[cb] == undefined || (typeof this.options[cb] != 'object' && evt != 'onAfterAnimation'))
790
- return;
791
-
792
- var callback = typeof this.options[cb] == 'object' ? this.options[cb][evt] : this.options[cb];
793
-
794
- if (!$.isFunction(callback))
795
- return;
796
-
797
- var self = this;
798
-
799
- if (i1 === undefined)
800
- callback(self, state, evt);
801
- else if (i2 === undefined)
802
- this.get(i1).each(function() { callback(self, this, i1, state, evt); });
803
- else {
804
- for (var i = i1; i <= i2; i++)
805
- if (i !== null && !(i >= i3 && i <= i4))
806
- this.get(i).each(function() { callback(self, this, i, state, evt); });
807
- }
808
- },
809
-
810
- create: function(i) {
811
- return this.format('<' + this.options.itemTag + '></' + this.options.itemTag + '>', i);
812
- },
813
-
814
- format: function(e, i) {
815
- var $e = $(e).addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-' + i)).css({
816
- 'float': 'left',
817
- 'list-style': 'none'
818
- });
819
- $e.attr('jcarouselindex', i);
820
- return $e;
821
- },
822
-
823
- className: function(c) {
824
- return c + ' ' + c + (!this.options.vertical ? '-horizontal' : '-vertical');
825
- },
826
-
827
- dimension: function(e, d) {
828
- var el = e.jquery != undefined ? e[0] : e;
829
-
830
- var old = !this.options.vertical ?
831
- el.offsetWidth + $jc.margin(el, 'marginLeft') + $jc.margin(el, 'marginRight') :
832
- el.offsetHeight + $jc.margin(el, 'marginTop') + $jc.margin(el, 'marginBottom');
833
-
834
- if (d == undefined || old == d)
835
- return old;
836
-
837
- var w = !this.options.vertical ?
838
- d - $jc.margin(el, 'marginLeft') - $jc.margin(el, 'marginRight') :
839
- d - $jc.margin(el, 'marginTop') - $jc.margin(el, 'marginBottom');
840
-
841
- $(el).css(this.wh, w + 'px');
842
-
843
- return this.dimension(el);
844
- },
845
-
846
- clipping: function() {
847
- if (this.clip[0] != null) {
848
- return !this.options.vertical ?
849
- this.clip[0].offsetWidth - $jc.intval(this.clip.css('borderLeftWidth')) - $jc.intval(this.clip.css('borderRightWidth')) :
850
- this.clip[0].offsetHeight - $jc.intval(this.clip.css('borderTopWidth')) - $jc.intval(this.clip.css('borderBottomWidth'));
851
- }
852
- },
853
-
854
- index: function(i, s) {
855
- if (s == undefined)
856
- s = this.options.size;
857
-
858
- return Math.round((((i-1) / s) - Math.floor((i-1) / s)) * s) + 1;
859
- }
860
- });
861
-
862
- $jc.extend({
863
- /**
864
- * Gets/Sets the global default configuration properties.
865
- *
866
- * @method defaults
867
- * @return {Object}
868
- * @param d {Object} A set of key/value pairs to set as configuration properties.
869
- */
870
- defaults: function(d) {
871
- return $.extend(defaults, d || {});
872
- },
873
-
874
- margin: function(e, p) {
875
- if (!e)
876
- return 0;
877
-
878
- var el = e.jquery != undefined ? e[0] : e;
879
-
880
- if (p == 'marginRight' && $.browser.safari) {
881
- var old = {'display': 'block', 'float': 'none', 'width': 'auto'}, oWidth, oWidth2;
882
-
883
- $.swap(el, old, function() { oWidth = el.offsetWidth; });
884
-
885
- old['marginRight'] = 0;
886
- $.swap(el, old, function() { oWidth2 = el.offsetWidth; });
887
-
888
- return oWidth2 - oWidth;
889
- }
890
-
891
- return $jc.intval($.css(el, p));
892
- },
893
-
894
- intval: function(v) {
895
- v = parseInt(v);
896
- return isNaN(v) ? 0 : v;
897
- }
898
- });
899
-
900
- })(jQuery);