Permalink
Browse files

Merge bootstrap UI into master

  • Loading branch information...
2 parents 27945e5 + 345dc13 commit 7da47c0975476d85612a75ae606e4966fbf6b684 @peakpg peakpg committed Oct 29, 2012
Showing with 1,997 additions and 1,562 deletions.
  1. +5 −0 Gemfile
  2. +6 −2 Gemfile.lock
  3. +1 −0 app/assets/javascripts/cms/application.js
  4. +27 −12 app/assets/javascripts/cms/content_library.js
  5. +8 −0 app/assets/javascripts/cms/page_editing.js
  6. +6 −1 app/assets/javascripts/cms/toolbar.js
  7. +0 −7 app/assets/stylesheets/browsercms/application.css
  8. +0 −171 app/assets/stylesheets/cms/application.css.erb
  9. +16 −0 app/assets/stylesheets/cms/application.css.scss
  10. +20 −0 app/assets/stylesheets/cms/bootstrap_corrections.css.scss
  11. +1 −0 app/assets/stylesheets/cms/load_bootstrap.css.scss
  12. +44 −0 app/assets/stylesheets/cms/page_content_editing.css.scss
  13. +4 −0 app/assets/stylesheets/cms/page_editor.css
  14. +100 −78 app/assets/stylesheets/cms/page_toolbar.css.erb
  15. +167 −0 app/assets/stylesheets/cms/styles.css.scss.erb
  16. +30 −29 app/controllers/cms/application_controller.rb
  17. +8 −12 app/controllers/cms/base_controller.rb
  18. +16 −17 app/controllers/cms/cache_controller.rb
  19. +5 −4 app/controllers/cms/content_block_controller.rb
  20. +28 −24 app/controllers/cms/content_controller.rb
  21. +5 −5 app/controllers/cms/content_types_controller.rb
  22. +1 −2 app/controllers/cms/dynamic_views_controller.rb
  23. +18 −13 app/controllers/cms/email_messages_controller.rb
  24. +16 −16 app/controllers/cms/groups_controller.rb
  25. +13 −9 app/controllers/cms/redirects_controller.rb
  26. +2 −5 app/controllers/cms/users_controller.rb
  27. +12 −27 app/helpers/cms/application_helper.rb
  28. +1 −1 app/helpers/cms/content_block_helper.rb
  29. +23 −0 app/helpers/cms/nav_menu_helper.rb
  30. +16 −10 app/helpers/cms/page_helper.rb
  31. +1 −7 app/helpers/cms/template_support.rb
  32. +140 −1 app/helpers/cms/ui_elements_helper.rb
  33. +5 −0 app/models/cms/dynamic_view.rb
  34. +5 −0 app/models/cms/portlet.rb
  35. +0 −1 app/models/cms/templates.rb
  36. +17 −0 app/views/cms/blocks/_buttonbar.html.erb
  37. +1 −1 app/views/cms/blocks/edit.html.erb
  38. +1 −1 app/views/cms/blocks/index.html.erb
  39. +1 −1 app/views/cms/blocks/new.html.erb
  40. +1 −2 app/views/cms/blocks/show.html.erb
  41. +1 −1 app/views/cms/blocks/usages.html.erb
  42. +3 −3 app/views/cms/blocks/versions.html.erb
  43. +2 −3 app/views/cms/cache/show.html.erb
  44. +41 −39 app/views/cms/connectors/new.html.erb
  45. +4 −0 app/views/cms/content/editing_frame.html.erb
  46. +0 −3 app/views/cms/content/no_page.html.erb
  47. +10 −13 app/views/cms/content/show.html.erb
  48. +1 −2 app/views/cms/content_types/index.html.erb
  49. +1 −0 app/views/cms/dynamic_views/_form.html.erb
  50. +10 −0 app/views/cms/dynamic_views/_toolbar.html.erb
  51. +1 −2 app/views/cms/dynamic_views/edit.html.erb
  52. +1 −6 app/views/cms/dynamic_views/index.html.erb
  53. +1 −2 app/views/cms/dynamic_views/new.html.erb
  54. +1 −6 app/views/cms/groups/_form.html.erb
  55. +6 −0 app/views/cms/groups/_toolbar.html.erb
  56. +2 −3 app/views/cms/groups/edit.html.erb
  57. +1 −5 app/views/cms/groups/index.html.erb
  58. +0 −1 app/views/cms/groups/new.html.erb
  59. +1 −5 app/views/cms/links/edit.html.erb
  60. +8 −12 app/views/cms/links/new.html.erb
  61. +3 −0 app/views/cms/page_routes/_back_to_routes.html.erb
  62. +7 −0 app/views/cms/page_routes/_toolbar.html.erb
  63. +2 −2 app/views/cms/page_routes/edit.html.erb
  64. +1 −8 app/views/cms/page_routes/index.html.erb
  65. +2 −2 app/views/cms/page_routes/new.html.erb
  66. +8 −8 app/views/cms/page_routes/show.html.erb
  67. +20 −12 app/views/cms/pages/_edit_connector.html.erb
  68. +4 −4 app/views/cms/pages/_edit_container.html.erb
  69. +3 −5 app/views/cms/pages/edit.html.erb
  70. +1 −6 app/views/cms/pages/new.html.erb
  71. +9 −9 app/views/cms/pages/versions.html.erb
  72. +2 −0 app/views/cms/redirects/_form.html.erb
  73. +2 −3 app/views/cms/redirects/edit.html.erb
  74. +5 −5 app/views/cms/redirects/index.html.erb
  75. +2 −3 app/views/cms/redirects/new.html.erb
  76. +2 −3 app/views/cms/routes/index.html.erb
  77. +3 −0 app/views/cms/section_nodes/_button_bar.html.erb
  78. +13 −11 app/views/cms/section_nodes/index.html.erb
  79. +1 −5 app/views/cms/sections/edit.html.erb
  80. +12 −16 app/views/cms/sections/new.html.erb
  81. +0 −1 app/views/cms/shared/access_denied.html.erb
  82. +0 −3 app/views/cms/shared/error.html.erb
  83. +2 −4 app/views/cms/tasks/new.html.erb
  84. +20 −0 app/views/cms/toolbar/_editor_toolbar.html.erb
  85. +0 −33 app/views/cms/toolbar/_mobile_toggle.html.erb
  86. +17 −0 app/views/cms/toolbar/_mobile_toolbar.html.erb
  87. +10 −0 app/views/cms/toolbar/_new_pages_menu.html.erb
  88. +80 −0 app/views/cms/toolbar/_toolbar.html.erb
  89. +82 −1 app/views/cms/toolbar/index.html.erb
  90. +19 −22 app/views/cms/users/_toolbar.html.erb
  91. +2 −9 app/views/cms/users/change_password.html.erb
  92. +2 −15 app/views/cms/users/edit.html.erb
  93. +54 −48 app/views/cms/users/index.html.erb
  94. +2 −12 app/views/cms/users/new.html.erb
  95. +2 −14 app/views/cms/users/show.html.erb
  96. +1 −32 app/views/layouts/_cms_toolbar.html.erb
  97. +0 −119 app/views/layouts/_page_toolbar.html.erb
  98. +2 −2 app/views/layouts/cms/_head.html.erb
  99. +122 −0 app/views/layouts/cms/_thin_toolbar.html.erb
  100. +2 −9 app/views/layouts/cms/administration.html.erb
  101. +2 −1 app/views/layouts/cms/application.html.erb
  102. +1 −3 app/views/layouts/cms/content_library.html.erb
  103. +9 −9 app/views/layouts/cms/dashboard.html.erb
  104. +20 −0 app/views/layouts/cms/page_editor.html.erb
  105. +17 −16 app/views/layouts/cms/section_nodes.html.erb
  106. +4 −6 app/views/layouts/cms/toolbar.html.erb
  107. +1 −0 browsercms.gemspec
  108. +12 −1 doc/release_notes.md
  109. +7 −9 features/add_content_to_pages.feature
  110. +1 −1 features/ckeditor.feature
  111. +3 −4 features/content_blocks/manage_custom_blocks.feature
  112. +8 −1 features/content_blocks/manage_html_blocks.feature
  113. +64 −1 features/manage_users.feature
  114. +4 −5 features/mobile_templates.feature
  115. +44 −0 features/navigation_menu/new_button.feature
  116. +4 −4 features/page_templates.feature
  117. +1 −2 features/portlets/email_friend_portlet.feature
  118. +1 −1 features/portlets/portlet_helpers.feature
  119. +10 −11 features/portlets/portlets.feature
  120. +3 −4 features/portlets/tag_cloud_portlet.feature
  121. +22 −43 features/step_definitions/content_pages_steps.rb
  122. +25 −0 features/step_definitions/manage_content_blocks_steps.rb
  123. +3 −0 features/step_definitions/manage_user_steps.rb
  124. +1 −1 features/step_definitions/mobile_steps.rb
  125. +38 −0 features/step_definitions/new_button_steps.rb
  126. +7 −2 features/step_definitions/portlets_steps.rb
  127. +113 −0 features/step_definitions/user_steps.rb
  128. +7 −0 features/support/cms_api.rb
  129. +25 −0 features/support/factories.rb
  130. +18 −0 features/support/page_inspector.rb
  131. +3 −1 features/support/slowest_scenarios.rb
  132. +17 −1 features/support/transforms.rb
  133. +11 −5 features/taxonomy/manage_categories.feature
  134. +23 −0 features/user_self_service.feature
  135. +1 −0 lib/browsercms.rb
  136. +3 −0 lib/cms/acts/content_page.rb
  137. +17 −0 lib/cms/admin_tab.rb
  138. +0 −4 lib/cms/domain_support.rb
  139. +0 −2 lib/generators/browser_cms/demo_site/templates/demo.seeds.rb
  140. +1 −1 test/dummy/app/portlets/uses_helper_portlet.rb
  141. +0 −1 test/dummy/app/views/layouts/mobile/mobile-ready.html.erb
  142. +0 −1 test/dummy/app/views/layouts/templates/default.html.erb
  143. +0 −1 test/dummy/app/views/layouts/templates/desktop-only.html.erb
  144. +0 −1 test/dummy/app/views/layouts/templates/mobile-ready.html.erb
  145. +0 −1 test/dummy/app/views/layouts/templates/subpage.html.erb
  146. +6 −1 test/factories/factories.rb
  147. +0 −28 test/functional/cms/categories_controller_test.rb
  148. +0 −12 test/functional/cms/content_controller_test.rb
  149. +0 −20 test/functional/cms/dashboard_controller_test.rb
  150. +0 −23 test/functional/cms/html_blocks_controller_test.rb
  151. +0 −57 test/functional/cms/portlets_controller_test.rb
  152. +0 −76 test/functional/cms/toolbar_controller_test.rb
  153. +0 −205 test/functional/cms/users_controller_test.rb
  154. +1 −2 test/unit/helpers/application_helper_test.rb
  155. +3 −3 test/unit/lib/cms/domain_support_test.rb
  156. +5 −0 test/unit/models/dynamic_views_test.rb
  157. +7 −0 test/unit/models/portlet_test.rb
  158. +37 −0 todo_bootstrap.md
View
@@ -16,6 +16,11 @@ group :production do
gem 'uglifier'
end
+group :assets do
+ gem 'sass-rails'
+ gem 'bootstrap-sass'
+end
+
group :test do
gem 'factory_girl_rails', '3.3.0'
gem 'test-unit', '2.1.1'
View
@@ -1,8 +1,9 @@
PATH
remote: .
specs:
- browsercms (3.5.5)
+ browsercms (4.0.0.a)
ancestry (~> 1.2.4)
+ bootstrap-sass
ckeditor_rails (~> 3.6.4)
jquery-rails (~> 2.0)
paperclip (~> 3.0.3)
@@ -50,6 +51,7 @@ GEM
ffi (>= 1.0.11)
rspec (>= 2.7.0)
bluecloth (2.2.0)
+ bootstrap-sass (2.1.0.1)
builder (3.0.4)
capybara (1.1.2)
mime-types (>= 1.16)
@@ -179,7 +181,7 @@ GEM
treetop (1.4.11)
polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.33)
+ tzinfo (0.3.34)
uglifier (1.3.0)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
@@ -193,6 +195,7 @@ PLATFORMS
DEPENDENCIES
aruba
bluecloth
+ bootstrap-sass
browsercms!
capybara
cucumber
@@ -203,6 +206,7 @@ DEPENDENCIES
mocha (= 0.9.8)
mysql2
ruby-prof
+ sass-rails
sqlite3-ruby
test-unit (= 2.1.1)
thin
@@ -8,5 +8,6 @@
//= require jquery.taglist
//= require cms/core_library
//= require cms/attachment_manager
+//= require bootstrap
//
@@ -1,4 +1,4 @@
-jQuery(function($) {
+jQuery(function ($) {
//----- Helper Functions -----------------------------------------------------
//In all of this code, we are defining functions that we use later
@@ -8,12 +8,12 @@ jQuery(function($) {
//For example, if you have section_node_5,
//you pass this 'section_node_5', 'section_node'
//and this returns 5
- var getId = function(elementId, s) {
+ var getId = function (elementId, s) {
return elementId.replace(s, '')
}
- var nodeOnDoubleClick = function() {
+ var nodeOnDoubleClick = function () {
if ($('#edit_button').hasClass('disabled')) {
//$('#view_button').click()
location.href = $('#view_button')[0].href
@@ -23,7 +23,7 @@ jQuery(function($) {
}
}
- var addNodeOnDoubleClick = function() {
+ var addNodeOnDoubleClick = function () {
$('#blocks tr').dblclick(nodeOnDoubleClick)
}
@@ -39,21 +39,20 @@ jQuery(function($) {
// I.e. Select a row, the 'View' button becomes active and the URL goes to the right path.
//
// Any element with class='cms-content-table' will have this applied to it.
-(function($) {
- $.fn.cmsContentToolbar = function() {
-
+(function ($) {
+ $.fn.cmsContentToolbar = function () {
var content_type = this.data('content_type')
var is_versioned = this.data('versioned')
var can_publish = this.data('can_publish')
var plural_title = this.data('plural_title')
$('table.data tbody tr').hover(
- function() {
+ function () {
$(this).addClass('hover')
},
- function() {
+ function () {
$(this).removeClass('hover')
- }).click(function() {
+ }).click(function () {
var view_path = $(this).data('view_path');
var edit_path = $(this).data('edit_path');
var delete_path = $(this).data('delete_path');
@@ -89,14 +88,30 @@ jQuery(function($) {
}
if (can_publish) {
if (status == 'draft' && publishable) {
- $('#publish_button').removeClass('disabled').attr('href', publish_path);
+ $('#publish_button')
+ .attr('href', publish_path)
+ .enable_menu_button();
+ } else {
+ $('#publish_button')
+ .disable_menu_button();
}
}
})
};
})(jQuery);
-$(function() {
+(function ($) {
+ $.fn.disable_menu_button = function () {
+ $(this).addClass('disabled');
+ $(this).attr("href", "#");
+ }
+ $.fn.enable_menu_button = function () {
+ $(this).removeClass('disabled');
+ return $(this);
+ }
+})(jQuery);
+
+$(function () {
$('.cms-content-table').cmsContentToolbar();
});
@@ -0,0 +1,8 @@
+//= require 'jquery'
+//= require 'jquery_ujs'
+//= require 'cms/core_library'
+
+// Since we are within the page editing iframe, add a 'target=_top' to all links so links refresh the entire page.
+$(function () {
+ $('a').attr('target', '_top');
+});
@@ -2,4 +2,9 @@
// A manifest file for all CMS toolbar related js.
//= require jquery
//= require jquery.selectbox
-//= require cms/application
+//= require cms/application
+
+// Add an information popup to the Edit Properties button on the Page Toolbar
+$(function(){
+ $('#edit_properties_button').popover({placement: 'bottom'});
+});
@@ -1,7 +0,0 @@
-/*
- * This is a manifest file that'll automatically include all the stylesheets available in this directory
- * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
- * the top of the compiled file, but it's generally better to create a new file per style scope.
- *= require_self
- *= require_tree .
-*/
@@ -1,171 +0,0 @@
-/**
-*
-*= require cms/reset
-*= require cms/nav
-*= require cms/menu
-*= require cms/buttons
-*= require cms/data_table
-*= require cms/attachment_manager
-*= require_self
-*/
-
-body {
-background: #FFF url(<%= asset_path "cms/bg.png" %>) repeat-x 0 0;
-text-align: center;
-font: 62.5%/100% "Trebuchet MS", Helvetica, Verdana, Arial, sans-serif;
-color: #727171;
-}
-
-
-
-a img { border: 0 }
-
-a {
- color: #36659D;
- text-decoration: none;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-.check_uncheck { font-size: 80%; }
-
-/* Layout
-*/
-
-#wrapper {
-margin: 0 auto;
-text-align: left;
-width: 1000px;
-}
-
-
-#main {
-margin-top: 30px;
-}
-
-
-#contentwrap {
- background: transparent url(<%= asset_path "cms/dot.png" %>) repeat 0 0;
-float: left;
-width: 826px;
-}
-div.bottom_cap_content {
-height: 10px;
-background: transparent url(<%= asset_path "cms/bottom_cap_content.png" %>) no-repeat 100% 0;
-}
-div.top_cap_content {
-height: 5px;
-background: transparent url(<%= asset_path "cms/top_cap_content.png" %>) no-repeat 100% 0;
-}
-
- #contentwrapbig {
- width: 1000px;
- background: transparent url(<%= asset_path "cms/dot.png" %>) repeat 0 0;
- float: left;
- }
-
-#content {
-background: #FFF;
-width: 816px;
-margin-left: 5px;
-}
-
- #contentwrapbig #content {
- width: 990px;
- }
-
-#footer {
-text-align: right;
-padding: 16px 15px 100px 0;
-color: #A1A1A1;
-}
-#footer p{
-margin-bottom: 7px;
-}
-
- #footer a {
- color: #5489C7;
- text-decoration: none;
- }
- #footer a:hover {
- text-decoration: underline;
- }
-
-
-/* Utility
-*/
-
-
-/* FUNCTION BUTTONS
-*/
-
-
-.searchbox {
- background: #FFF;
- padding: 6px;
- font-size: 100%;
-}
-.searchbox select {
-width: 160px;
-}
-
-#search_term {
- width: 132px;
- height: 18px;
-* width: 130px;
- border: 1px solid #B9B9B9;
- border-right: none;
-}
-#search_term_container, #search_submit_container {
-float: left;
-}
-
-#search_submit_container{
-* margin-top: 1px;
-}
-
-
-#flash {
- position: absolute;
- top: 0;
- left: 250px;
- background: #ffff99;
- padding: 5px;
- color: #000;
- width: 500px;
- text-align: center;
- font-weight: bold
-}
-
-
-#functions h1 {
-color: #FFF;
-font-size: large;
-text-transform: capitalize;
-margin: 0 0 10px 0;
-padding-bottom: 10px;
-border-bottom: 3px solid #505358;
-line-height: 1;
-}
-#functions {
-padding: 10px 20px 10px 20px;
-text-transform: uppercase;
-}
-#functions .button {
-* margin-bottom: 10px;
-}
-#content .pad {
- padding: 1px 5px 5px 5px;
-}
-#content .top_pad {
- padding: 5px;
-}
-#content .bottom_pad {
- padding: 5px
-}
-div.top_cap {
-height: 9px;
-background: transparent url(<%= asset_path "cms/top_cap.png" %>) no-repeat 0 0;
-}
@@ -0,0 +1,16 @@
+/**
+* Manifest file for the CMS Admin interface
+*
+*= require cms/load_bootstrap
+*= require cms/reset
+*= require cms/nav
+*= require cms/menu
+*= require cms/buttons
+*= require cms/data_table
+*= require cms/attachment_manager
+*= require cms/styles
+*= require cms/content_library
+*= require cms/administration
+*= require cms/bootstrap_corrections
+*
+*/
@@ -0,0 +1,20 @@
+/**
+* Correct styles for bootstrap that the CSS has broken
+*/
+
+.navbar {
+ a {
+ font-size: 13px;
+ text-align: left;
+ }
+}
+
+#button-bar {
+ padding-top: 40px;
+}
+
+// Pushes body below fixed nav menu for admin.
+body {
+ padding-top: 75px;
+}
+
@@ -0,0 +1 @@
+@import "bootstrap";
Oops, something went wrong.

1 comment on commit 7da47c0

So cool!

Please sign in to comment.