trusty-cms 2.0.2 → 2.0.3.pre.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. checksums.yaml +13 -5
  2. data/.gitignore +0 -2
  3. data/CONTRIBUTORS.md +1 -3
  4. data/Gemfile +1 -6
  5. data/Gemfile.lock +80 -100
  6. data/INSTALL.md +6 -7
  7. data/README.md +1 -3
  8. data/Rakefile +4 -24
  9. data/app/assets/javascripts/admin/jquery-ui.js +2339 -3787
  10. data/app/assets/javascripts/admin/page-edit.js +3 -3
  11. data/app/assets/javascripts/admin/tabcontrol.js.erb +16 -16
  12. data/app/assets/javascripts/admin/treetable.js +2 -4
  13. data/app/assets/stylesheets/admin/_base.scss +4 -4
  14. data/app/assets/stylesheets/admin/modules/_links.scss +1 -1
  15. data/app/assets/stylesheets/admin/partials/_content.scss +2 -9
  16. data/app/assets/stylesheets/admin/partials/_forms.scss +29 -97
  17. data/app/assets/stylesheets/admin/partials/_header.scss +3 -2
  18. data/app/assets/stylesheets/admin/partials/_index.scss +6 -9
  19. data/app/assets/stylesheets/admin/partials/_layout.scss +2 -1
  20. data/app/assets/stylesheets/admin/partials/_popup.scss +11 -0
  21. data/app/assets/stylesheets/admin/partials/_tabcontrol.scss +4 -4
  22. data/app/assets/stylesheets/admin/partials/_typography.scss +0 -4
  23. data/app/controllers/admin/pages_controller.rb +1 -9
  24. data/app/controllers/admin/references_controller.rb +1 -8
  25. data/app/controllers/admin/users_controller.rb +1 -1
  26. data/app/controllers/admin/welcome_controller.rb +3 -3
  27. data/app/controllers/application_controller.rb.rails2 +113 -0
  28. data/app/controllers/site_controller.rb +1 -1
  29. data/app/helpers/admin/node_helper.rb +4 -4
  30. data/app/helpers/application_helper.rb.rails2 +242 -0
  31. data/app/models/trusty_cms/config.rb +1 -2
  32. data/app/views/admin/configuration/edit.html.haml +2 -2
  33. data/app/views/admin/configuration/show.html.haml +1 -1
  34. data/app/views/admin/layouts/_form.html.haml +1 -1
  35. data/app/views/admin/layouts/remove.html.haml +1 -1
  36. data/app/views/admin/pages/_fields.html.haml +1 -1
  37. data/app/views/admin/pages/_node.html.haml +2 -2
  38. data/app/views/admin/pages/edit.html.haml +1 -1
  39. data/app/views/admin/pages/remove.html.haml +2 -2
  40. data/app/views/admin/preferences/edit.html.haml +36 -36
  41. data/app/views/admin/users/_form.html.haml +1 -1
  42. data/app/views/admin/users/_password_fields.html.haml +1 -1
  43. data/app/views/admin/users/remove.html.haml +1 -1
  44. data/app/views/admin/welcome/login.html.haml +1 -1
  45. data/app/views/layouts/application.html.haml +16 -18
  46. data/config/application.rb +1 -2
  47. data/config/boot.rb +1 -0
  48. data/config/database.mysql.yml +3 -3
  49. data/{spec/dummy/config/database.yml → config/database.yml.rails2} +4 -4
  50. data/config/environment.rb.rails2 +89 -0
  51. data/config/environments/development.rb +0 -1
  52. data/config/environments/development.rb.rails2 +17 -0
  53. data/config/environments/production.rb.rails2 +24 -0
  54. data/config/environments/test.rb +4 -2
  55. data/config/initializers/trusty_cms_config.rb +0 -1
  56. data/config/routes.rb +0 -1
  57. data/config/routes.rb.rails2 +41 -0
  58. data/db/migrate/001_create_radiant_tables.rb +0 -1
  59. data/db/migrate/003_rename_behavior_column.rb +9 -0
  60. data/db/migrate/019_add_salt_to_users.rb +11 -0
  61. data/db/migrate/20100805155020_convert_page_metas.rb +13 -0
  62. data/db/migrate/20110902203823_add_allowed_children_cache_to_pages.rb +4 -0
  63. data/db/migrate/20120209231801_change_pages_allowed_children_cache_to_text.rb +1 -0
  64. data/lib/generators/instance/templates/databases/mysql.yml +3 -3
  65. data/lib/generators/instance/templates/instance_gemfile +2 -2
  66. data/lib/generators/trusty_cms/templates/database.yml.erb +4 -4
  67. data/lib/generators/trusty_cms/templates/routes.rb.erb +1 -0
  68. data/lib/login_system.rb +1 -1
  69. data/lib/tasks/database.rake +3 -1
  70. data/lib/tasks/framework.rake +1 -1
  71. data/lib/trusty_cms/admin_ui.rb +0 -2
  72. data/lib/trusty_cms/extension_migrator.rb +2 -1
  73. data/lib/trusty_cms/initializer.rb +1 -1
  74. data/lib/trusty_cms/setup.rb +1 -1
  75. data/lib/trusty_cms.rb +1 -1
  76. data/public/stylesheets/admin/main.css +1 -0
  77. data/{spec/dummy/config/routes.rb → public/stylesheets/admin/overrides.css} +0 -0
  78. data/spec/ci/database.mysql.yml +1 -1
  79. data/spec/features/pages_spec.rb +2 -2
  80. data/spec/helpers/regions_helper_spec.rb +16 -0
  81. data/spec/rails_helper.rb +4 -3
  82. data/spec/spec_helper.rb +77 -13
  83. data/spec/support/custom_actions.rb +0 -1
  84. data/test/test_helper.rb.rails2 +64 -0
  85. data/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
  86. data/tmp/cache/85C/FA0/TrustyCms.cache_mtime +0 -0
  87. data/tmp/cache_files_test/a.txt +1 -0
  88. data/tmp/cache_files_test/all.txt +3 -0
  89. data/tmp/cache_files_test/b.txt +1 -0
  90. data/tmp/config/radiant_config.yml +27 -0
  91. data/tmp/sass-cache/1a137f46a4706893cc07b2aa949a92cf851d936f/_boxes.sassc +0 -0
  92. data/tmp/sass-cache/1a137f46a4706893cc07b2aa949a92cf851d936f/_gradients.sassc +0 -0
  93. data/tmp/sass-cache/1a137f46a4706893cc07b2aa949a92cf851d936f/_links.sassc +0 -0
  94. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_appearance.scssc +0 -0
  95. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_background-clip.scssc +0 -0
  96. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_background-origin.scssc +0 -0
  97. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_background-size.scssc +0 -0
  98. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_border-radius.scssc +0 -0
  99. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_box-shadow.scssc +0 -0
  100. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_box-sizing.scssc +0 -0
  101. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_box.scssc +0 -0
  102. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_columns.scssc +0 -0
  103. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_filter.scssc +0 -0
  104. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_font-face.scssc +0 -0
  105. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_hyphenation.scssc +0 -0
  106. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_images.scssc +0 -0
  107. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_inline-block.scssc +0 -0
  108. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_opacity.scssc +0 -0
  109. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_regions.scssc +0 -0
  110. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_shared.scssc +0 -0
  111. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_text-shadow.scssc +0 -0
  112. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_transform.scssc +0 -0
  113. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_transition.scssc +0 -0
  114. data/tmp/sass-cache/28de5f95620abb7d2385166aed681f8b13104764/_user-interface.scssc +0 -0
  115. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_actions.sassc +0 -0
  116. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_avatars.sassc +0 -0
  117. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_content.sassc +0 -0
  118. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_dateinput.sassc +0 -0
  119. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_deprecated.sassc +0 -0
  120. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_dropdown.sassc +0 -0
  121. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_footer.sassc +0 -0
  122. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_forms.sassc +0 -0
  123. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_header.sassc +0 -0
  124. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_index.sassc +0 -0
  125. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_layout.sassc +0 -0
  126. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_messages.sassc +0 -0
  127. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_popup.sassc +0 -0
  128. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_tabcontrol.sassc +0 -0
  129. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_toolbar.sassc +0 -0
  130. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_typography.sassc +0 -0
  131. data/tmp/sass-cache/2f4278d4f2cc4f21f31aa67430e462fbca6b47a0/_validations.sassc +0 -0
  132. data/tmp/sass-cache/33c9f77b54ab77293741bf5159eedff124a39fc1/_color.scssc +0 -0
  133. data/tmp/sass-cache/33c9f77b54ab77293741bf5159eedff124a39fc1/_general.scssc +0 -0
  134. data/tmp/sass-cache/33c9f77b54ab77293741bf5159eedff124a39fc1/_sprites.scssc +0 -0
  135. data/tmp/sass-cache/33c9f77b54ab77293741bf5159eedff124a39fc1/_tables.scssc +0 -0
  136. data/tmp/sass-cache/5683573556a6b271b3ffade55f4ff32a60e7c0f0/_base.scssc +0 -0
  137. data/tmp/sass-cache/5683573556a6b271b3ffade55f4ff32a60e7c0f0/_sprite-img.scssc +0 -0
  138. data/tmp/sass-cache/6159fdf943b5ffc54b901a34cdfcfc7e6f736834/_alternating-rows-and-columns.scssc +0 -0
  139. data/tmp/sass-cache/6159fdf943b5ffc54b901a34cdfcfc7e6f736834/_borders.scssc +0 -0
  140. data/tmp/sass-cache/6159fdf943b5ffc54b901a34cdfcfc7e6f736834/_scaffolding.scssc +0 -0
  141. data/tmp/sass-cache/81fb0626d3f9dbbcc1f43df416db1c97b6ad512a/_links.scssc +0 -0
  142. data/tmp/sass-cache/81fb0626d3f9dbbcc1f43df416db1c97b6ad512a/_lists.scssc +0 -0
  143. data/tmp/sass-cache/81fb0626d3f9dbbcc1f43df416db1c97b6ad512a/_text.scssc +0 -0
  144. data/tmp/sass-cache/81fb0626d3f9dbbcc1f43df416db1c97b6ad512a/_vertical_rhythm.scssc +0 -0
  145. data/tmp/sass-cache/87c1de4edf14dc5f527f65e2080e0faa325354aa/_hover-link.scssc +0 -0
  146. data/tmp/sass-cache/87c1de4edf14dc5f527f65e2080e0faa325354aa/_link-colors.scssc +0 -0
  147. data/tmp/sass-cache/87c1de4edf14dc5f527f65e2080e0faa325354aa/_unstyled-link.scssc +0 -0
  148. data/tmp/sass-cache/8b412a89f899813981285eadb5f08e52b94dfb65/_css3.scssc +0 -0
  149. data/tmp/sass-cache/8b412a89f899813981285eadb5f08e52b94dfb65/_support.scssc +0 -0
  150. data/tmp/sass-cache/8b412a89f899813981285eadb5f08e52b94dfb65/_typography.scssc +0 -0
  151. data/tmp/sass-cache/8b412a89f899813981285eadb5f08e52b94dfb65/_utilities.scssc +0 -0
  152. data/tmp/sass-cache/92844cd19a320f87ef960171cea4f33d1a07339c/_contrast.scssc +0 -0
  153. data/tmp/sass-cache/a97de1041408f914478b9e7943c5c6c2d221d4c0/_ellipsis.scssc +0 -0
  154. data/tmp/sass-cache/a97de1041408f914478b9e7943c5c6c2d221d4c0/_force-wrap.scssc +0 -0
  155. data/tmp/sass-cache/a97de1041408f914478b9e7943c5c6c2d221d4c0/_nowrap.scssc +0 -0
  156. data/tmp/sass-cache/a97de1041408f914478b9e7943c5c6c2d221d4c0/_replacement.scssc +0 -0
  157. data/tmp/sass-cache/b3d80baefd48593d8c08815ba2d83e209f5dad6f/_grid-background.scssc +0 -0
  158. data/tmp/sass-cache/b92bfc773efa04d930ffa0b3331244a1f378caa7/_compass.scssc +0 -0
  159. data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_clearfix.scssc +0 -0
  160. data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_float.scssc +0 -0
  161. data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_hacks.scssc +0 -0
  162. data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_min.scssc +0 -0
  163. data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_reset.scssc +0 -0
  164. data/tmp/sass-cache/c055a2360b102aff9247707235d9dce9214f6c4f/_tag-cloud.scssc +0 -0
  165. data/tmp/sass-cache/c3fa060b99d9ed1d9740af472ecc747182e2ea93/_base.sassc +0 -0
  166. data/tmp/sass-cache/c3fa060b99d9ed1d9740af472ecc747182e2ea93/main.sassc +0 -0
  167. data/tmp/sass-cache/c3fa060b99d9ed1d9740af472ecc747182e2ea93/overrides.sassc +0 -0
  168. data/tmp/sass-cache/d2bf234de18cb20fe8238c9224b9863ed5d268c6/_bullets.scssc +0 -0
  169. data/tmp/sass-cache/d2bf234de18cb20fe8238c9224b9863ed5d268c6/_horizontal-list.scssc +0 -0
  170. data/tmp/sass-cache/d2bf234de18cb20fe8238c9224b9863ed5d268c6/_inline-block-list.scssc +0 -0
  171. data/tmp/sass-cache/d2bf234de18cb20fe8238c9224b9863ed5d268c6/_inline-list.scssc +0 -0
  172. data/tmp/sass-cache/dc9647e96d50c02214aff50e88308a74bf56d1d7/_utilities.scssc +0 -0
  173. data/trusty_cms.gemspec +2 -4
  174. metadata +180 -171
  175. data/spec/dummy/README.rdoc +0 -28
  176. data/spec/dummy/Rakefile +0 -5
  177. data/spec/dummy/bin/bundle +0 -3
  178. data/spec/dummy/bin/rails +0 -4
  179. data/spec/dummy/bin/rake +0 -4
  180. data/spec/dummy/bin/setup +0 -29
  181. data/spec/dummy/config/application.rb +0 -152
  182. data/spec/dummy/config/boot.rb +0 -6
  183. data/spec/dummy/config/environment.rb +0 -5
  184. data/spec/dummy/config/environments/development.rb +0 -49
  185. data/spec/dummy/config/environments/production.rb +0 -79
  186. data/spec/dummy/config/environments/test.rb +0 -42
  187. data/spec/dummy/config/initializers/assets.rb +0 -11
  188. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  189. data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
  190. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  191. data/spec/dummy/config/initializers/inflections.rb +0 -16
  192. data/spec/dummy/config/initializers/mime_types.rb +0 -4
  193. data/spec/dummy/config/initializers/session_store.rb +0 -3
  194. data/spec/dummy/config/initializers/trusty_cms_config.rb +0 -20
  195. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  196. data/spec/dummy/config/locales/en.yml +0 -23
  197. data/spec/dummy/config/secrets.yml +0 -22
  198. data/spec/dummy/config.ru +0 -4
  199. data/spec/dummy/db/schema.rb +0 -122
  200. data/spec/dummy/log/test.log +0 -25081
  201. data/spec/dummy/public/404.html +0 -67
  202. data/spec/dummy/public/422.html +0 -67
  203. data/spec/dummy/public/500.html +0 -66
  204. data/spec/dummy/public/favicon.ico +0 -0
  205. data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
  206. data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +0 -0
  207. data/spec/dummy/tmp/radiant_config_cache.txt +0 -0
@@ -11,7 +11,7 @@
11
11
  }
12
12
  )
13
13
  }
14
- };
14
+ }
15
15
 
16
16
  PageEdit.partAdded = function (tabId) {
17
17
  $('#add_part_busy').hide();
@@ -20,12 +20,12 @@
20
20
  $('#part_name_field').val('');
21
21
  TabControl.updateTabsBasedOnPages();
22
22
  TabControl.selectTab($('div#tab_control .tabs .tab').last().attr('id'));
23
- };
23
+ }
24
24
 
25
25
  PageEdit.partLoading = function () {
26
26
  $('#add_part_button').attr('disabled', true);
27
27
  $('#add_part_busy').show();
28
- };
28
+ }
29
29
 
30
30
  PageEdit.validPartName = function () {
31
31
  var partNameField = $('#part_name_field');
@@ -15,32 +15,32 @@
15
15
  TabControl.removeTab($(this).closest('.tab').attr('id'));
16
16
  });
17
17
 
18
- TabControl.selectTab($pages.first().attr('id').replace(/-/, "_"));
18
+ TabControl.selectTab($pages.first().attr('id'));
19
19
  }
20
20
  }
21
21
 
22
- TabControl.selectTab = function(id) {
23
- id = id.replace(/^tab_/, '').replace(/^page_/, '');
24
- var underscored_id = id.replace(/_/g, "-").toLowerCase();
25
- var $pages = $('div#tab_control .pages .page');
26
- var $tabs = $('div#tab_control .tabs .tab');
27
-
28
- $pages.hide();
29
- $tabs.removeClass('here');
30
-
31
- $pages.filter('#page_' + underscored_id).show();
32
- $tabs.filter('#tab_' + id).addClass('here');
33
- }
34
-
35
22
  TabControl.addTab = function(tabText) {
36
23
  $('div#tab_control .tabs').append("<a id='tab_" + tabText + "' href='#' class='tab'><span>" + tabText + "</span><img src='" + relative_url_root + "<%= asset_path('admin/tab_close.png') %>' class='close' alt='Remove part' title='Remove part' /></a>");
37
24
  var $page_part_index = $('#page_part_index_field');
38
25
  $page_part_index.val(parseInt($page_part_index.val()) + 1);
39
26
  }
40
27
 
28
+ TabControl.selectTab = function(id) {
29
+ id = id.replace(/^tab_/, '').replace(/^page_/, '');
30
+ var underscored_id = id.replace("_", "-");
31
+ var $pages = $('div#tab_control .pages .page');
32
+ var $tabs = $('div#tab_control .tabs .tab');
33
+
34
+ $pages.hide();
35
+ $tabs.removeClass('here');
36
+
37
+ $pages.filter('#page_' + underscored_id).show();
38
+ $tabs.filter('#tab_' + id).addClass('here');
39
+ }
40
+
41
41
  TabControl.removeTab = function(id) {
42
- id = id.replace(/^tab_/, '').replace(/^page_/, '').toLowerCase();
43
- var underscored_id = id.replace("_", "-").toLowerCase();
42
+ id = id.replace(/^tab_/, '').replace(/^page_/, '');
43
+ var underscored_id = id.replace("_", "-");
44
44
  if(confirm('Remove the "' + id + '" part?')) {
45
45
  var $pages = $('div#tab_control .pages .page');
46
46
  var $tabs = $('div#tab_control .tabs .tab');
@@ -25,16 +25,15 @@ $(function() {
25
25
  },
26
26
  onNodeExpand: function() {
27
27
  var node = this;
28
- var spinner = $($(node.row[0]).find(".busy")[0]);
29
- spinner.show();
30
28
  persistStore.set(node.id, 'expanded');
31
29
  // Render loader/spinner while loading
32
30
  $.ajax({
33
- async: true, // Must be false, otherwise loadBranch happens after showChildren?
31
+ async: false, // Must be false, otherwise loadBranch happens after showChildren?
34
32
  url: "/admin/pages/" + node.row.data('ttPageId') + "/children?index=" + node.id
35
33
  }).done(function(html) {
36
34
  var rows = $(html).filter("tr");
37
35
 
36
+
38
37
  $("#pages").treetable("loadBranch", node, rows);
39
38
  $.each(node.children, function() {
40
39
  var state = persistStore.get(this.id);
@@ -45,7 +44,6 @@ $(function() {
45
44
  $('a.dropdown').each(function(){
46
45
  Dropdown.setup(this);
47
46
  });
48
- spinner.hide();
49
47
  });
50
48
  }
51
49
  });
@@ -1,14 +1,14 @@
1
1
  // Fonts
2
- $base-font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
2
+ $base-font-family: "Lucida Grande", "Bitstream Vera Sans", Helvetica, Verdana, Arial, sans-serif;
3
3
  $base-font-size: 15px;
4
4
 
5
5
  // Links
6
- $base-link-color:#94BDC3 ;
6
+ $base-link-color: #0066cc;
7
7
  $alt-link-color: red;
8
8
 
9
9
  // Header
10
- $header: #000 !default;
11
- $primary-tab: rgba(236, 6, 115, 0.6);
10
+ $header: #ca0000 !default;
11
+ $primary-tab: rgba(white, 0.3);
12
12
  $primary-tab-current: white;
13
13
 
14
14
  // Modules
@@ -8,7 +8,7 @@
8
8
 
9
9
  @mixin alt-link {
10
10
  color: $alt-link-color;
11
- text-decoration: none;
11
+ text-decoration: underline;
12
12
  &:hover {
13
13
  text-decoration: none;
14
14
  }
@@ -25,16 +25,9 @@ table.fieldset {
25
25
  }
26
26
 
27
27
  body.reversed {
28
- fieldset h1 {
29
- font-size: 1.5em;
30
- }
31
- #content > h1:first-of-type {
32
- font-size: 2em;
33
- }
34
28
  h1 {
35
- color: #94BDC3;
36
- border-bottom: 1px solid #94BDC3;
37
- background: #fff;
29
+ border-bottom: 1px solid #ababab;
30
+ background: #7e7e7e;
38
31
  font-size: 125%;
39
32
  margin: -20px -20px 20px;
40
33
  padding: 15px 20px;
@@ -16,14 +16,12 @@
16
16
  p {
17
17
  label {
18
18
  display: block;
19
- &.checkbox,
20
- &.radio {
19
+ &.checkbox, &.radio {
21
20
  display: inline;
22
21
  font-weight: normal;
23
22
  font-size: 95%;
24
23
  text-shadow: none;
25
24
  margin-right: 1em;
26
- text-align: left;
27
25
  }
28
26
  &.multi_option {
29
27
  margin-bottom: 0.3em;
@@ -34,8 +32,7 @@
34
32
  font-size: 140%;
35
33
  margin-bottom: 0;
36
34
  }
37
- input.checkbox,
38
- input.radio {
35
+ input.checkbox, input.radio {
39
36
  margin-top: 0.3em;
40
37
  }
41
38
  textarea {
@@ -54,6 +51,7 @@
54
51
  text-shadow: 0px 0px 20px rgba(255, 255, 255, 0.1);
55
52
  }
56
53
  a {
54
+ color: white;
57
55
  &.action {
58
56
  background-color: #7e7e7e;
59
57
  font-size: 75%;
@@ -85,6 +83,17 @@
85
83
  margin: 0 1em 0 0;
86
84
  }
87
85
  }
86
+ .buttons {
87
+ color: #666666;
88
+ font-size: 80%;
89
+ margin: 2.5em 0 1em;
90
+ button, input.button {
91
+ font-size: 150%;
92
+ }
93
+ a {
94
+ @include alt-link;
95
+ }
96
+ }
88
97
  }
89
98
  }
90
99
 
@@ -94,7 +103,7 @@
94
103
  }
95
104
 
96
105
  .drawer_contents {
97
- background: #c9c9c9;
106
+ background: #7e7e7e;
98
107
  @include border-bottom-right-radius(6px);
99
108
  margin: 0;
100
109
  margin-right: 2px;
@@ -112,8 +121,7 @@
112
121
  margin: 0;
113
122
  padding: 0;
114
123
  width: 100%;
115
- th,
116
- td {
124
+ th, td {
117
125
  border-top: 1px #999999 solid;
118
126
  padding: 6px;
119
127
  }
@@ -145,8 +153,7 @@
145
153
  }
146
154
  }
147
155
  tr:first-child {
148
- td,
149
- th {
156
+ td, th {
150
157
  border-top: none;
151
158
  }
152
159
  }
@@ -168,9 +175,7 @@
168
175
  text-shadow: #666666 1px 1px 0;
169
176
  text-decoration: none;
170
177
  @include border-bottom-radius(6px);
171
- &:hover,
172
- &:active,
173
- &:focus {
178
+ &:hover, &:active, &:focus {
174
179
  text-decoration: underline;
175
180
  }
176
181
  &.more {
@@ -184,7 +189,7 @@
184
189
 
185
190
  .box {
186
191
  color: #333333;
187
- background: #ffffff;
192
+ background: #f5f1e2;
188
193
  font-size: 90%;
189
194
  padding: 1px 15px 10px;
190
195
  position: relative;
@@ -195,9 +200,7 @@
195
200
  position: relative;
196
201
  }
197
202
  &:before {
198
- @include linear-gradient(color-stops(white,
199
- #f5f1e2 50%,
200
- #f5f1e2));
203
+ @include linear-gradient(color-stops(white, #f5f1e2 50%, #f5f1e2));
201
204
  @include border-top-radius(10px);
202
205
  content: "\0020";
203
206
  display: block;
@@ -279,8 +282,9 @@ body.reversed {
279
282
  form {
280
283
  p {
281
284
  label {
282
- color: #B9B9B9;
285
+ color: whitesmoke;
283
286
  font-weight: normal;
287
+ text-shadow: 1px 1px 0 #888888;
284
288
  .hint {
285
289
  display: inline;
286
290
  }
@@ -294,14 +298,11 @@ body.reversed {
294
298
  @include alt-box;
295
299
  }
296
300
  fieldset {
297
- background: #fff;
301
+ background: #858585;
298
302
  padding: 20px 15px;
299
303
  margin-bottom: 20px;
300
304
  overflow: hidden;
301
- @include single-box-shadow(#ababab,
302
- 1px,
303
- 1px,
304
- 0);
305
+ @include single-box-shadow(#ababab, 1px, 1px, 0);
305
306
  @include border-radius(8px);
306
307
  h3 {
307
308
  font-weight: bold;
@@ -319,27 +320,10 @@ body.reversed {
319
320
  color: #eeeeee;
320
321
  }
321
322
  textarea {
322
- border: 1px solid #EAEAEA;
323
- }
324
- input:not([type=submit]):focus,
325
- textarea:focus {
326
- border: 1px #EC65A5;
327
- -webkit-box-shadow: 0 0 10px #EC65A5;
328
- -moz-box-shadow: 0 0 10px #EC65A5;
329
- box-shadow: 0 0 10px #EC65A5;
330
- outline: 0;
331
- }
332
- input[type=checkbox] {
333
- border-radius: 5px;
323
+ border: 1px solid white;
334
324
  }
335
325
  .box {
336
- @include single-box-shadow(rgba(0,
337
- 0,
338
- 0,
339
- 0.15),
340
- 2px,
341
- 2px,
342
- 3px);
326
+ @include single-box-shadow(rgba(0, 0, 0, 0.15), 2px, 2px, 3px);
343
327
  }
344
328
  }
345
329
  }
@@ -348,9 +332,7 @@ body.single_form {
348
332
  #content {
349
333
  #single_form {
350
334
  background: #f5f1e2;
351
- @include linear-gradient(color-stops(#fdfcf9,
352
- #f5f1e2 25%,
353
- #f5f1e2));
335
+ @include linear-gradient(color-stops(#fdfcf9, #f5f1e2 25%, #f5f1e2));
354
336
  border: 0.35em solid #efead3;
355
337
  padding: 0.5em 1.5em;
356
338
  padding-right: 22px;
@@ -363,8 +345,7 @@ body.single_form {
363
345
  }
364
346
  p {
365
347
  font-size: 90%;
366
- &.intro,
367
- &.error {
348
+ &.intro, &.error {
368
349
  font-size: 100%;
369
350
  line-height: 1.4;
370
351
  }
@@ -423,8 +404,7 @@ body.single_form {
423
404
  }
424
405
  }
425
406
 
426
- body.edit_user,
427
- body.edit_personal_preferences {
407
+ body.edit_user, body.edit_personal_preferences {
428
408
  #avatar {
429
409
  left: 26em;
430
410
  position: absolute;
@@ -437,51 +417,3 @@ body.edit_personal_preferences {
437
417
  }
438
418
  }
439
419
  }
440
-
441
- .button,
442
- button,
443
- input[type=button],
444
- input[type=submit],
445
- input[type=file] {
446
- .fa {
447
- color: #f3f3f3;
448
- }
449
- -webkit-appearance: none;
450
- font-size: 1.1em;
451
- padding: .5em 3em;
452
- margin: 0.5em;
453
- color: #f3f3f3;
454
- background-color: #94BDC3;
455
- border: 0;
456
- -webkit-border-radius: 5px;
457
- -moz-border-radius: 5px;
458
- border-radius: 5px;
459
- text-decoration: none;
460
- &:hover {
461
- color: #94BDC3;
462
- background-color: #f3f3f3;
463
- -webkit-transition: all .2s;
464
- -moz-transition: all .2s;
465
- -ms-transition: all .2s;
466
- -o-transition: all .2s;
467
- transition: all .2s;
468
- }
469
- &:hover > .fa {
470
- color: #94BDC3;
471
- -webkit-transition: all .2s;
472
- -moz-transition: all .2s;
473
- -ms-transition: all .2s;
474
- -o-transition: all .2s;
475
- transition: all .2s;
476
- }
477
- }
478
-
479
- .hover {
480
- color: #94BDC3;
481
- background-color: #f3f3f3;
482
- -webkit-transition: all .2s;
483
- -moz-transition: all .2s;
484
- -ms-transition: all .2s;
485
- -o-transition: all .2s;
486
- transition: all .2s;
487
- }
@@ -19,7 +19,7 @@
19
19
  color: mix($header, white, 15%);
20
20
  font-size: 80%;
21
21
  float: right;
22
- padding: 12px 10px 0 5px;
22
+ padding: 15px 10px 0 5px;
23
23
  height: 16px;
24
24
  a {
25
25
  color: white;
@@ -104,7 +104,8 @@ ul#secondary_navigation {
104
104
  li {
105
105
  float: left;
106
106
  display: block;
107
- border-right: 1px solid #d3d3d3;
107
+ background: image-url("admin/navigation_secondary_separator.gif") bottom right no-repeat;
108
+ padding-right: 2px;
108
109
  a {
109
110
  color: #555555;
110
111
  display: block;
@@ -35,8 +35,7 @@ table.index {
35
35
  text-align: left;
36
36
  padding: 4px 9px;
37
37
  border-top: 1px solid #f0f0f0;
38
- a.action,
39
- span.action.disabled {
38
+ a.action, span.action.disabled {
40
39
  padding: 6px;
41
40
  margin: 0 25px 0 1px;
42
41
  img {
@@ -82,7 +81,7 @@ table.index {
82
81
  color: black;
83
82
  text-decoration: none;
84
83
  &:hover {
85
- color: #EC0673;
84
+ color: #0066cc;
86
85
  text-decoration: underline;
87
86
  }
88
87
  }
@@ -96,8 +95,7 @@ table.index {
96
95
  &:first-child {
97
96
  border-top: 1px solid white;
98
97
  }
99
- &.hover,
100
- &:hover {
98
+ &.hover, &:hover {
101
99
  td {
102
100
  border-top: 1px solid #d5f0ff;
103
101
  border-bottom: 1px solid #c5dff5;
@@ -107,8 +105,7 @@ table.index {
107
105
  }
108
106
  }
109
107
  thead {
110
- tr,
111
- tr:first-child {
108
+ tr, tr:first-child {
112
109
  border-top: none;
113
110
  }
114
111
  }
@@ -140,7 +137,7 @@ table.index#pages {
140
137
  text-decoration: none;
141
138
  }
142
139
  &:hover .title {
143
- color: #EC0673;
140
+ color: #0066cc;
144
141
  text-decoration: underline;
145
142
  }
146
143
  }
@@ -198,4 +195,4 @@ table.index#users {
198
195
  font-weight: normal;
199
196
  }
200
197
  }
201
- }
198
+ }
@@ -1,5 +1,6 @@
1
1
  body.reversed {
2
- background-color: #737272;
2
+ background-color: #9e9e9e;
3
+ color: white;
3
4
  }
4
5
 
5
6
  body.single_form {
@@ -54,11 +54,22 @@ div.popup {
54
54
  }
55
55
  .buttons {
56
56
  border-top: 1px solid #e5e5e5;
57
+ background: whitesmoke;
58
+ font-size: 85%;
59
+ margin: 1.5em -20px -10px;
60
+ padding: 10px;
57
61
  text-align: right;
58
62
  input.button {
59
63
  font-size: 120%;
60
64
  }
61
65
  button {
66
+ font-size: 110%;
67
+ padding: 4px 15px 5px;
68
+ background: whitesmoke;
69
+ border: 1px solid #959595;
70
+ @include border-radius(100px);
71
+ @include single-box-shadow(white, 0, 2px, 0, inset);
72
+ @include linear-gradient(color-stops(#dddddd 0%, #eeeeee 15%, white 100%));
62
73
  &.default {
63
74
  border: 1px solid #154ca6;
64
75
  @include single-box-shadow(#c7e0f6, 0, 2px, 1px, inset);
@@ -6,8 +6,8 @@
6
6
  width: 100%;
7
7
  margin-right: -4px;
8
8
  .tab {
9
- background-color: #e4e4e4;
10
- color: black;
9
+ background-color: #cac8c0;
10
+ color: #7f7f7f;
11
11
  display: inline-block;
12
12
  font-size: 90%;
13
13
  text-align: left;
@@ -18,11 +18,11 @@
18
18
  @include border-top-radius(6px);
19
19
  &.here {
20
20
  background-color: white;
21
- color: #737272;
21
+ color: black;
22
22
  font-weight: bold;
23
23
  }
24
24
  span:hover {
25
- color: #737272;
25
+ color: black;
26
26
  }
27
27
  .close {
28
28
  margin-top: -4px;
@@ -75,7 +75,3 @@ input.big {
75
75
  table {
76
76
  border-collapse: collapse;
77
77
  }
78
-
79
- .fa{
80
- color: #94BDC3;
81
- }
@@ -47,7 +47,7 @@ class Admin::PagesController < Admin::ResourceController
47
47
 
48
48
  def model_class
49
49
  if Page.descendants.any? { |d| d.to_s == params[:page_class] }
50
- verify_page_class(params[:page_class])
50
+ params[:page_class].constantize
51
51
  elsif params[:page_id]
52
52
  Page.find(params[:page_id]).children
53
53
  else
@@ -89,12 +89,4 @@ class Admin::PagesController < Admin::ResourceController
89
89
  @meta << {:field => "slug", :type => "text_field", :args => [{:class => 'textbox', :maxlength => 100}]}
90
90
  @meta << {:field => "breadcrumb", :type => "text_field", :args => [{:class => 'textbox', :maxlength => 160}]}
91
91
  end
92
-
93
- def verify_page_class(page_class)
94
- if page_class.constantize.ancestors.include?(Page)
95
- page_class.constantize
96
- else
97
- raise "I'm not allowed to constantize #{page_class}!"
98
- end
99
- end
100
92
  end
@@ -1,14 +1,7 @@
1
1
  class Admin::ReferencesController < ApplicationController
2
2
  def show
3
3
  respond_to do |format|
4
- render_allowed_type(params[:type])
5
- format.any { render :action => @type, :content_type => "text/html", :layout => false }
4
+ format.any { render :action => params[:type], :content_type => "text/html", :layout => false }
6
5
  end
7
6
  end
8
-
9
- private
10
-
11
- def render_allowed_type(type)
12
- @type = type
13
- end
14
7
  end
@@ -24,7 +24,7 @@ class Admin::UsersController < Admin::ResourceController
24
24
  def ensure_deletable
25
25
  if current_user.id.to_s == params[:id].to_s
26
26
  announce_cannot_delete_self
27
- redirect_to admin_users_path
27
+ redirect_to admin_users_url
28
28
  end
29
29
  end
30
30
 
@@ -4,7 +4,7 @@ class Admin::WelcomeController < ApplicationController
4
4
  skip_before_filter :verify_authenticity_token
5
5
 
6
6
  def index
7
- redirect_to admin_pages_path
7
+ redirect_to admin_pages_url
8
8
  end
9
9
 
10
10
  def login
@@ -18,7 +18,7 @@ class Admin::WelcomeController < ApplicationController
18
18
  current_user.remember_me
19
19
  set_session_cookie
20
20
  end
21
- redirect_to(session[:return_to] || welcome_path)
21
+ redirect_to(session[:return_to] || welcome_url)
22
22
  session[:return_to] = nil
23
23
  end
24
24
  end
@@ -28,7 +28,7 @@ class Admin::WelcomeController < ApplicationController
28
28
  self.current_user.forget_me if self.current_user
29
29
  self.current_user = nil
30
30
  announce_logged_out
31
- redirect_to login_path
31
+ redirect_to login_url
32
32
  end
33
33
 
34
34
  private