refinerycms 0.9.5.31 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. data/.gitignore +1 -0
  2. data/VERSION +1 -1
  3. data/bin/refinery +2 -1
  4. data/config/environment.rb +1 -1
  5. data/config/environments/development.rb +3 -0
  6. data/contributors.md +2 -0
  7. data/db/migrate/20100202034802_remove_custom_title_image_id_and_image_id_from_pages.rb +13 -0
  8. data/db/migrate/20100204011654_change_part_titles_to_titleized_version_for_new_format.rb +13 -0
  9. data/db/schema.rb +6 -10
  10. data/public/javascripts/admin.js +1 -1
  11. data/public/javascripts/jquery-ui-1.8rc1.min.js +375 -0
  12. data/public/javascripts/jquery.js +4231 -2529
  13. data/public/javascripts/refinery/admin.js +609 -38
  14. data/public/javascripts/refinery/boot_wym.js +3 -3
  15. data/public/javascripts/thickbox.js +116 -129
  16. data/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +3674 -3732
  17. data/public/javascripts/wymeditor/skins/refinery/skin.js +8 -8
  18. data/public/stylesheets/refinery/refinery.css +142 -32
  19. data/public/stylesheets/wymeditor/skins/refinery/skin.css +8 -1
  20. data/readme.md +35 -21
  21. data/test/fixtures/page_parts.yml +9 -0
  22. data/test/fixtures/pages.yml +88 -0
  23. data/test/performance/browsing_test.rb +9 -0
  24. data/test/test_helper.rb +38 -0
  25. data/test/unit/image_test.rb +14 -0
  26. data/test/unit/page_part_test.rb +19 -0
  27. data/test/unit/page_test.rb +130 -0
  28. data/vendor/plugins/authentication/app/controllers/sessions_controller.rb +1 -1
  29. data/vendor/plugins/authentication/app/views/admin/users/index.html.erb +1 -2
  30. data/vendor/plugins/authentication/authentication.md +9 -1
  31. data/vendor/plugins/dashboard/dashboard.md +3 -3
  32. data/vendor/plugins/images/app/controllers/admin/images_controller.rb +17 -13
  33. data/vendor/plugins/images/app/helpers/admin/images_helper.rb +6 -0
  34. data/vendor/plugins/images/app/models/image.rb +24 -39
  35. data/vendor/plugins/images/app/views/admin/images/_form.html.erb +11 -4
  36. data/vendor/plugins/images/app/views/admin/images/_grid_view.html.erb +1 -2
  37. data/vendor/plugins/images/app/views/admin/images/_list_view_image.html.erb +1 -2
  38. data/vendor/plugins/images/app/views/admin/images/index.html.erb +1 -1
  39. data/vendor/plugins/images/app/views/admin/images/insert.html.erb +8 -71
  40. data/vendor/plugins/images/images.md +12 -7
  41. data/vendor/plugins/inquiries/app/views/admin/inquiries/_inquiry.html.erb +6 -13
  42. data/vendor/plugins/inquiries/app/views/admin/inquiry_settings/index.html.erb +1 -2
  43. data/vendor/plugins/inquiries/inquiries.md +8 -8
  44. data/vendor/plugins/news/app/views/admin/news_items/_news_item.html.erb +1 -2
  45. data/vendor/plugins/news/news.md +4 -4
  46. data/vendor/plugins/pages/app/controllers/admin/page_dialogs_controller.rb +11 -10
  47. data/vendor/plugins/pages/app/controllers/admin/page_parts_controller.rb +5 -1
  48. data/vendor/plugins/pages/app/controllers/admin/pages_controller.rb +2 -2
  49. data/vendor/plugins/pages/app/models/page.rb +75 -29
  50. data/vendor/plugins/pages/app/models/page_part.rb +1 -1
  51. data/vendor/plugins/pages/app/views/admin/page_dialogs/_page_link.html.erb +2 -2
  52. data/vendor/plugins/pages/app/views/admin/page_dialogs/link_to.html.erb +8 -112
  53. data/vendor/plugins/pages/app/views/admin/pages/_form.html.erb +50 -154
  54. data/vendor/plugins/pages/app/views/admin/pages/_list.html.erb +10 -10
  55. data/vendor/plugins/pages/app/views/admin/pages/_page_part_field.html.erb +4 -4
  56. data/vendor/plugins/pages/app/views/admin/pages/_sortable_list.html.erb +1 -1
  57. data/vendor/plugins/pages/pages.md +30 -25
  58. data/vendor/plugins/refinery/app/views/admin/_head.html.erb +5 -14
  59. data/vendor/plugins/refinery/app/views/admin/_menu.html.erb +2 -64
  60. data/vendor/plugins/refinery/app/views/shared/_message.html.erb +0 -6
  61. data/vendor/plugins/refinery/app/views/shared/admin/_error_messages_for.html.erb +1 -6
  62. data/vendor/plugins/refinery/app/views/shared/admin/_form_actions.html.erb +8 -10
  63. data/vendor/plugins/refinery/app/views/shared/admin/_image_picker.html.erb +22 -38
  64. data/vendor/plugins/refinery/app/views/shared/admin/_make_sortable.html.erb +6 -65
  65. data/vendor/plugins/refinery/app/views/shared/admin/_resource_picker.html.erb +16 -16
  66. data/vendor/plugins/refinery/app/views/shared/admin/_sortable_list.html.erb +3 -4
  67. data/vendor/plugins/refinery/lib/crud.rb +1 -1
  68. data/vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_singular_name.html.erb +1 -1
  69. data/vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_sortable_list.html.erb +1 -1
  70. data/vendor/plugins/refinery/plugins.md +19 -12
  71. data/vendor/plugins/refinery_dialogs/app/controllers/admin/dialogs_controller.rb +6 -4
  72. data/vendor/plugins/refinery_dialogs/app/views/admin/dialogs/show.html.erb +3 -3
  73. data/vendor/plugins/refinery_dialogs/app/views/layouts/admin_dialog.html.erb +7 -14
  74. data/vendor/plugins/refinery_settings/app/views/admin/refinery_settings/_refinery_setting.html.erb +1 -1
  75. data/vendor/plugins/refinery_settings/settings.md +51 -1
  76. data/vendor/plugins/resources/app/controllers/admin/resources_controller.rb +16 -11
  77. data/vendor/plugins/resources/app/views/admin/resources/_form.html.erb +9 -2
  78. data/vendor/plugins/resources/app/views/admin/resources/_resource.html.erb +1 -3
  79. data/vendor/plugins/resources/app/views/admin/resources/index.html.erb +2 -2
  80. data/vendor/plugins/resources/app/views/admin/resources/insert.html.erb +14 -60
  81. data/vendor/plugins/resources/resources.md +1 -1
  82. data/vendor/plugins/themes/app/controllers/admin/themes_controller.rb +6 -6
  83. data/vendor/plugins/themes/app/models/theme.rb +3 -3
  84. data/vendor/plugins/themes/app/views/admin/themes/_theme.html.erb +14 -20
  85. data/vendor/plugins/themes/themes.md +21 -19
  86. metadata +18 -19
  87. data/public/javascripts/builder.js +0 -136
  88. data/public/javascripts/controls.js +0 -963
  89. data/public/javascripts/dragdrop.js +0 -973
  90. data/public/javascripts/effects.js +0 -1128
  91. data/public/javascripts/fastinit.js +0 -84
  92. data/public/javascripts/livepipe.js +0 -180
  93. data/public/javascripts/prototype.js +0 -4874
  94. data/public/javascripts/refinery/dialog.js +0 -52
  95. data/public/javascripts/refinery/parse_url.js +0 -38
  96. data/public/javascripts/refinery/prototype.enhancements.js +0 -24
  97. data/public/javascripts/refinery/tooltips.js +0 -173
  98. data/public/javascripts/scriptaculous.js +0 -47
  99. data/public/javascripts/slider.js +0 -275
  100. data/public/javascripts/tabs.js +0 -149
  101. data/vendor/plugins/refinery_settings/app/views/admin/refinery_settings/_make_sortable.html.erb +0 -7
@@ -1,149 +0,0 @@
1
- /**
2
- * @author Ryan Johnson <http://syntacticx.com/>
3
- * @copyright 2008 PersonalGrid Corporation <http://personalgrid.com/>
4
- * @package LivePipe UI
5
- * @license MIT
6
- * @url http://livepipe.net/control/tabs
7
- * @require prototype.js, livepipe.js
8
- */
9
-
10
- /*global window, document, Prototype, $, $A, $H, $break, Class, Element, Event, Control */
11
-
12
- if(typeof(Prototype) == "undefined") {
13
- throw "Control.Tabs requires Prototype to be loaded."; }
14
- if(typeof(Object.Event) == "undefined") {
15
- throw "Control.Tabs requires Object.Event to be loaded."; }
16
-
17
- Control.Tabs = Class.create({
18
- initialize: function(tab_list_container,options){
19
- if(!$(tab_list_container)) {
20
- throw "Control.Tabs could not find the element: " + tab_list_container; }
21
- this.activeContainer = false;
22
- this.activeLink = false;
23
- this.containers = $H({});
24
- this.links = [];
25
- Control.Tabs.instances.push(this);
26
- this.options = {
27
- beforeChange: Prototype.emptyFunction,
28
- afterChange: Prototype.emptyFunction,
29
- hover: false,
30
- linkSelector: 'li a',
31
- setClassOnContainer: false,
32
- activeClassName: 'active',
33
- defaultTab: 'first',
34
- autoLinkExternal: true,
35
- targetRegExp: /#(.+)$/,
36
- showFunction: Element.show,
37
- hideFunction: Element.hide
38
- };
39
- Object.extend(this.options,options || {});
40
- (typeof(this.options.linkSelector == 'string') ?
41
- $(tab_list_container).select(this.options.linkSelector) :
42
- this.options.linkSelector($(tab_list_container))
43
- ).findAll(function(link){
44
- return (/^#/).exec((Prototype.Browser.WebKit ? decodeURIComponent(link.href) : link.href).replace(window.location.href.split('#')[0],''));
45
- }).each(function(link){
46
- this.addTab(link);
47
- }.bind(this));
48
- this.containers.values().each(Element.hide);
49
- if(this.options.defaultTab == 'first') {
50
- this.setActiveTab(this.links.first());
51
- } else if(this.options.defaultTab == 'last') {
52
- this.setActiveTab(this.links.last());
53
- } else {
54
- this.setActiveTab(this.options.defaultTab); }
55
- var targets = this.options.targetRegExp.exec(window.location);
56
- if(targets && targets[1]){
57
- targets[1].split(',').each(function(target){
58
- this.setActiveTab(this.links.find(function(link){
59
- return link.key == target;
60
- }));
61
- }.bind(this));
62
- }
63
- if(this.options.autoLinkExternal){
64
- $A(document.getElementsByTagName('a')).each(function(a){
65
- if(!this.links.include(a)){
66
- var clean_href = a.href.replace(window.location.href.split('#')[0],'');
67
- if(clean_href.substring(0,1) == '#'){
68
- if(this.containers.keys().include(clean_href.substring(1))){
69
- $(a).observe('click',function(event,clean_href){
70
- this.setActiveTab(clean_href.substring(1));
71
- }.bindAsEventListener(this,clean_href));
72
- }
73
- }
74
- }
75
- }.bind(this));
76
- }
77
- },
78
- addTab: function(link){
79
- this.links.push(link);
80
- link.key = link.getAttribute('href').replace(window.location.href.split('#')[0],'').split('#').last().replace(/#/,'');
81
- var container = $(link.key);
82
- if(!container) {
83
- throw "Control.Tabs: #" + link.key + " was not found on the page."; }
84
- this.containers.set(link.key,container);
85
- link[this.options.hover ? 'onmouseover' : 'onclick'] = function(link){
86
- if(window.event) {
87
- Event.stop(window.event); }
88
- this.setActiveTab(link);
89
- return false;
90
- }.bind(this,link);
91
- },
92
- setActiveTab: function(link){
93
- if(!link && typeof(link) == 'undefined') {
94
- return; }
95
- if(typeof(link) == 'string'){
96
- this.setActiveTab(this.links.find(function(_link){
97
- return _link.key == link;
98
- }));
99
- }else if(typeof(link) == 'number'){
100
- this.setActiveTab(this.links[link]);
101
- }else{
102
- if(this.notify('beforeChange',this.activeContainer,this.containers.get(link.key)) === false) {
103
- return; }
104
- if(this.activeContainer) {
105
- this.options.hideFunction(this.activeContainer); }
106
- this.links.each(function(item){
107
- (this.options.setClassOnContainer ? $(item.parentNode) : item).removeClassName(this.options.activeClassName);
108
- }.bind(this));
109
- (this.options.setClassOnContainer ? $(link.parentNode) : link).addClassName(this.options.activeClassName);
110
- this.activeContainer = this.containers.get(link.key);
111
- this.activeLink = link;
112
- this.options.showFunction(this.containers.get(link.key));
113
- this.notify('afterChange',this.containers.get(link.key));
114
- }
115
- },
116
- next: function(){
117
- this.links.each(function(link,i){
118
- if(this.activeLink == link && this.links[i + 1]){
119
- this.setActiveTab(this.links[i + 1]);
120
- throw $break;
121
- }
122
- }.bind(this));
123
- },
124
- previous: function(){
125
- this.links.each(function(link,i){
126
- if(this.activeLink == link && this.links[i - 1]){
127
- this.setActiveTab(this.links[i - 1]);
128
- throw $break;
129
- }
130
- }.bind(this));
131
- },
132
- first: function(){
133
- this.setActiveTab(this.links.first());
134
- },
135
- last: function(){
136
- this.setActiveTab(this.links.last());
137
- }
138
- });
139
- Object.extend(Control.Tabs,{
140
- instances: [],
141
- findByTabId: function(id){
142
- return Control.Tabs.instances.find(function(tab){
143
- return tab.links.find(function(link){
144
- return link.key == id;
145
- });
146
- });
147
- }
148
- });
149
- Object.Event.extend(Control.Tabs);
@@ -1,7 +0,0 @@
1
- <%= sortable_element('sortable_list',
2
- :loading => "$('sort-status').innerHTML = 'Saving order...'",
3
- :loaded => "$('sort-status').innerHTML = 'New Order Saved.';
4
- new Effect.Highlight('sort-status', {startcolor:'#00a017', endcolor:'#f2f1ed'})",
5
- :update => 'refinery_settings_list',
6
- :url => {:action => :update_positions}
7
- ) -%>