moving some stuff to assets... breaking things
Oleg
committed May 24, 2011
commit ba0d5e0a934f8bb008ad401dd8f2d81ad0d64498
Showing 13
changed files with
699 additions
and 484 deletions
app/assets/javascripts/comfortable_mexican_sofa/application.js
+205
-0
| @@ | @@ -0,0 +1,205 @@ |
| + | //= require jquery |
| + | //= require jquery-ui |
| + | |
| + | $.CMS = function(){ |
| + | var current_path = window.location.pathname; |
| + | var admin_path_prefix = $('meta[name="cms-admin-path"]').attr('content'); |
| + | |
| + | $(function(){ |
| + | $.CMS.slugify(); |
| + | $.CMS.tree_methods(); |
| + | $.CMS.load_page_blocks(); |
| + | // $.CMS.enable_rich_text(); |
| + | // $.CMS.enable_codemirror(); |
| + | $.CMS.enable_date_picker(); |
| + | $.CMS.enable_sortable_list(); |
| + | if($('form.new_cms_page, form.edit_cms_page').get(0)) $.CMS.enable_page_save_form(); |
| + | if($('#mirrors').get(0)) $.CMS.enable_mirrors_widget(); |
| + | if($('#page_save').get(0)) $.CMS.enable_page_save_widget(); |
| + | if($('#uploader_button').get(0)) $.CMS.enable_uploader(); |
| + | }); |
| + | |
| + | return { |
| + | |
| + | enable_sortable_list: function(){ |
| + | $('ul.sortable, ul.sortable ul').sortable({ |
| + | handle: 'div.dragger', |
| + | axis: 'y', |
| + | update: function(){ |
| + | $.post(current_path + '/reorder', '_method=put&'+$(this).sortable('serialize')); |
| + | } |
| + | }) |
| + | }, |
| + | |
| + | slugify: function(){ |
| + | $('input#slugify').bind('keyup.cms', function() { |
| + | var slug_input = $('input#slug'); |
| + | var delimiter = slug_input.hasClass('delimiter-underscore') ? '_' : '-'; |
| + | slug_input.val( slugify( $(this).val(), delimiter ) ); |
| + | }); |
| + | |
| + | function slugify(str, delimiter){ |
| + | var opposite_delimiter = (delimiter == '-') ? '_' : '-'; |
| + | str = str.replace(/^\s+|\s+$/g, ''); |
| + | var from = "ÀÁÄÂÈÉËÊÌÍÏÎÒÓÖÔÙÚÜÛàáäâèéëêìíïîòóöôùúüûÑñÇç"; |
| + | var to = "aaaaeeeeiiiioooouuuuaaaaeeeeiiiioooouuuunncc"; |
| + | for (var i=0, l=from.length ; i<l ; i++) { |
| + | str = str.replace(new RegExp(from[i], "g"), to[i]); |
| + | } |
| + | var chars_to_replace_with_delimiter = new RegExp('[·/,:;'+ opposite_delimiter +']', 'g'); |
| + | str = str.replace(chars_to_replace_with_delimiter, delimiter); |
| + | var chars_to_remove = new RegExp('[^a-zA-Z0-9 '+ delimiter +']', 'g'); |
| + | str = str.replace(chars_to_remove, '').replace(/\s+/g, delimiter).toLowerCase(); |
| + | return str; |
| + | } |
| + | }, |
| + | |
| + | // Load Page Blocks on layout change |
| + | load_page_blocks: function(){ |
| + | $('select#cms_page_layout_id').bind('change.cms', function() { |
| + | $.ajax({ |
| + | url: ['/' + admin_path_prefix, 'pages', $(this).attr('data-page-id'), 'form_blocks'].join('/'), |
| + | data: ({ |
| + | layout_id: $(this).val() |
| + | }), |
| + | complete: function(){ |
| + | $.CMS.enable_rich_text(); |
| + | $.CMS.enable_date_picker(); |
| + | } |
| + | }) |
| + | }); |
| + | }, |
| + | |
| + | enable_rich_text: function(){ |
| + | $('textarea.rich_text').tinymce({ |
| + | theme : "advanced", |
| + | plugins: "", |
| + | theme_advanced_buttons1 : "formatselect,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,link,unlink,anchor,image,|,code", |
| + | theme_advanced_buttons2 : "", |
| + | theme_advanced_buttons3 : "", |
| + | theme_advanced_buttons4 : "", |
| + | theme_advanced_toolbar_location : "top", |
| + | theme_advanced_toolbar_align : "left", |
| + | theme_advanced_statusbar_location : "bottom", |
| + | theme_advanced_resizing : true, |
| + | theme_advanced_resize_horizontal : false |
| + | }); |
| + | }, |
| + | |
| + | enable_codemirror: function(){ |
| + | $('textarea.code').each(function(i, element){ |
| + | CodeMirror.fromTextArea(element, { |
| + | basefiles: [ |
| + | "/javascripts/comfortable_mexican_sofa/codemirror/codemirror_base.js", |
| + | "/javascripts/comfortable_mexican_sofa/codemirror/parse_xml.js", |
| + | "/javascripts/comfortable_mexican_sofa/codemirror/parse_css.js", |
| + | "/javascripts/comfortable_mexican_sofa/codemirror/parse_js.js", |
| + | "/javascripts/comfortable_mexican_sofa/codemirror/parse_html_mixed.js" |
| + | ], |
| + | stylesheet: "/javascripts/comfortable_mexican_sofa/codemirror/codemirror.css" |
| + | }); |
| + | }); |
| + | |
| + | $('textarea.code_css').each(function(i, element){ |
| + | CodeMirror.fromTextArea(element, { |
| + | basefiles: [ |
| + | "/javascripts/comfortable_mexican_sofa/codemirror/codemirror_base.js", |
| + | "/javascripts/comfortable_mexican_sofa/codemirror/parse_css.js" |
| + | ], |
| + | stylesheet: "/javascripts/comfortable_mexican_sofa/codemirror/codemirror.css" |
| + | }); |
| + | }); |
| + | |
| + | $('textarea.code_js').each(function(i, element){ |
| + | CodeMirror.fromTextArea(element, { |
| + | basefiles: [ |
| + | "/javascripts/comfortable_mexican_sofa/codemirror/codemirror_base.js", |
| + | "/javascripts/comfortable_mexican_sofa/codemirror/parse_js.js" |
| + | ], |
| + | stylesheet: "/javascripts/comfortable_mexican_sofa/codemirror/codemirror.css" |
| + | }); |
| + | }); |
| + | }, |
| + | |
| + | enable_date_picker: function(){ |
| + | $('input[type=datetime]').datepicker(); |
| + | }, |
| + | |
| + | tree_methods: function(){ |
| + | $('a.tree_toggle').bind('click.cms', function() { |
| + | $(this).siblings('ul').toggle(); |
| + | $(this).toggleClass('closed'); |
| + | // object_id are set in the helper (check cms_helper.rb) |
| + | $.ajax({url: [current_path, object_id, 'toggle'].join('/')}); |
| + | }); |
| + | |
| + | $('ul.sortable').each(function(){ |
| + | $(this).sortable({ |
| + | handle: 'div.dragger', |
| + | axis: 'y', |
| + | update: function() { |
| + | $.post(current_path + '/reorder', '_method=put&'+$(this).sortable('serialize')); |
| + | } |
| + | }) |
| + | }); |
| + | }, |
| + | |
| + | enable_mirrors_widget: function(){ |
| + | $('#mirrors select').change(function(){ |
| + | window.location = $(this).val(); |
| + | }) |
| + | }, |
| + | |
| + | enable_page_save_widget : function(){ |
| + | $('#page_save input').attr('checked', $('input#cms_page_is_published').is(':checked')); |
| + | $('#page_save button').html($('input#cms_page_submit').val()); |
| + | |
| + | $('#page_save input').bind('click', function(){ |
| + | $('input#cms_page_is_published').attr('checked', $(this).is(':checked')); |
| + | }) |
| + | $('input#cms_page_is_published').bind('click', function(){ |
| + | $('#page_save input').attr('checked', $(this).is(':checked')); |
| + | }) |
| + | $('#page_save button').bind('click', function(){ |
| + | $('input#cms_page_submit').click(); |
| + | }) |
| + | }, |
| + | |
| + | enable_page_save_form : function(){ |
| + | $('input[name=commit]').click(function() { |
| + | $(this).parents('form').attr('target', ''); |
| + | }); |
| + | $('input[name=preview]').click(function() { |
| + | $(this).parents('form').attr('target', '_blank'); |
| + | }); |
| + | }, |
| + | |
| + | enable_uploader : function(){ |
| + | auth_token = $("meta[name=csrf-token]").attr('content'); |
| + | var uploader = new plupload.Uploader({ |
| + | container: 'file_uploads', |
| + | browse_button: 'uploader_button', |
| + | runtimes: 'html5', |
| + | unique_names: true, |
| + | multipart: true, |
| + | multipart_params: { authenticity_token: auth_token, format: 'js' }, |
| + | url: '/' + admin_path_prefix + '/uploads' |
| + | }); |
| + | uploader.init(); |
| + | uploader.bind('FilesAdded', function(up, files) { |
| + | $.each(files, function(i, file){ |
| + | $('#uploaded_files').prepend( |
| + | '<div class="file pending" id="' + file.id + '">' + file.name + '</div>' |
| + | ); |
| + | }); |
| + | uploader.start(); |
| + | }); |
| + | uploader.bind('Error', function(up, err) { |
| + | alert('File Upload failed') |
| + | }); |
| + | uploader.bind('FileUploaded', function(up, file, response){ |
| + | $('#' + file.id).replaceWith(response.response); |
| + | }); |
| + | } |
| + | } |
| + | }(); |
| \ No newline at end of file | |
app/assets/stylesheets/comfortable_mexican_sofa/application.css
+7
-0
| @@ | @@ -0,0 +1,7 @@ |
| + | /* |
| + | = require comfortable_mexican_sofa/reset.css |
| + | = require comfortable_mexican_sofa/typography.css |
| + | = require comfortable_mexican_sofa/structure.css |
| + | = require comfortable_mexican_sofa/form.css |
| + | = require comfortable_mexican_sofa/content.css |
| + | */ |
| \ No newline at end of file | |
app/assets/stylesheets/comfortable_mexican_sofa/content.css
+181
-0
| @@ | @@ -0,0 +1,181 @@ |
| + | /* -- Mirrors widget ----------------------------------------------------- */ |
| + | #mirrors.box select { |
| + | width: 100%; |
| + | } |
| + | |
| + | /* -- Page saving widget ------------------------------------------------- */ |
| + | #page_save button { |
| + | float: right; |
| + | } |
| + | #page_save label { |
| + | line-height: 20px; |
| + | padding-left: 5px; |
| + | } |
| + | #page_save input { |
| + | margin-right: 5px; |
| + | } |
| + | /* -- File Upload widget ------------------------------------------------- */ |
| + | #file_uploads .actions { |
| + | overflow: hidden; |
| + | } |
| + | #file_uploads .actions a.button { |
| + | float: right; |
| + | } |
| + | #file_uploads #uploaded_files { |
| + | max-height: 500px; |
| + | overflow-y: auto; |
| + | } |
| + | #file_uploads #uploaded_files .file { |
| + | position: relative; |
| + | overflow: hidden; |
| + | font-size: 11px; |
| + | background-color: #252525; |
| + | margin-top: 2px; |
| + | padding: 0px 3px; |
| + | opacity: 0.5; |
| + | border-radius: 2px; |
| + | -moz-border-radius: 2px; |
| + | } |
| + | #file_uploads #uploaded_files .file.pending { |
| + | opacity: 0.3; |
| + | } |
| + | #file_uploads #uploaded_files .file:hover { |
| + | opacity: 1; |
| + | } |
| + | #file_uploads #uploaded_files .file a { |
| + | color: #fff; |
| + | } |
| + | #file_uploads #uploaded_files .file a.delete { |
| + | position: absolute; |
| + | display: block; |
| + | right: 0px; |
| + | top: 0px; |
| + | height: 13px; |
| + | width: 13px; |
| + | font-weight: bold; |
| + | } |
| + | #file_uploads #uploaded_files .file:hover a.delete { |
| + | color: #9e0b0f; |
| + | } |
| + | |
| + | /* -- Listings ----------------------------------------------------------- */ |
| + | ul.list li .item { |
| + | overflow: hidden; |
| + | padding: 5px; |
| + | background-color: #f1f1f1; |
| + | border-radius: 3px; |
| + | -moz-border-radius: 3px; |
| + | margin-bottom: 5px; |
| + | } |
| + | ul.list li .item .toggle { |
| + | float: left; |
| + | height: 28px; |
| + | width: 28px; |
| + | } |
| + | ul.list li .item .toggle a { |
| + | display: block; |
| + | height: 28px; |
| + | width: 28px; |
| + | background: url(/images/comfortable_mexican_sofa/arrow_right.gif) center center no-repeat; |
| + | } |
| + | ul.list li .item .toggle a span { |
| + | display: none; |
| + | } |
| + | ul.list li .item .toggle.open a { |
| + | background-image: url(/images/comfortable_mexican_sofa/arrow_bottom.gif); |
| + | } |
| + | ul.list li .item .icon { |
| + | float: left; |
| + | width: 28px; |
| + | height: 28px; |
| + | background: url(/images/comfortable_mexican_sofa/icon_regular.gif); |
| + | } |
| + | ul.list li .item .icon .dragger { |
| + | width: 28px; |
| + | height: 28px; |
| + | background: url(/images/comfortable_mexican_sofa/icon_move.gif); |
| + | cursor: move; |
| + | display: none; |
| + | } |
| + | ul.list li .item .icon:hover .dragger { |
| + | display: block; |
| + | } |
| + | ul.list li .item .icon .dragger span { |
| + | display: none; |
| + | } |
| + | ul.list li .item .label { |
| + | margin-left: 60px; |
| + | font-size: 14px; |
| + | font-weight: bold; |
| + | } |
| + | ul.list li .item .label .sublabel { |
| + | font-size: 10px; |
| + | font-weight: normal; |
| + | } |
| + | ul.list li ul { |
| + | margin-left: 28px; |
| + | } |
| + | ul.list li .action_links { |
| + | float: right; |
| + | opacity: 0.2; |
| + | } |
| + | ul.list li .item:hover .action_links { |
| + | opacity: 1; |
| + | } |
| + | ul.list li .item:hover { |
| + | background-color: #fff; |
| + | } |
| + | |
| + | /* -- Page Specific stuff ------------------------------------------------ */ |
| + | .c_cms_admin_sites.a_index ul.list li .item .label, |
| + | .c_cms_admin_layouts.a_index ul.list li .item .label, |
| + | .c_cms_admin_snippets.a_index ul.list li .item .label { |
| + | margin-left: 32px; |
| + | } |
| + | .c_cms_admin_layouts.a_index ul.list li .item .icon { |
| + | background-image: url(/images/comfortable_mexican_sofa/icon_layout.gif); |
| + | } |
| + | .c_cms_admin_snippets.a_index ul.list li .item .icon { |
| + | background-image: url(/images/comfortable_mexican_sofa/icon_snippet.gif); |
| + | } |
| + | /* -- Revisions ---------------------------------------------------------- */ |
| + | .c_cms_admin_revisions.a_show .form_element.submit_element .value { |
| + | margin-left: 0px; |
| + | } |
| + | .c_cms_admin_revisions.a_show .current { |
| + | width: 50%; |
| + | float: left; |
| + | } |
| + | .c_cms_admin_revisions.a_show .versioned { |
| + | width: 50%; |
| + | float: right; |
| + | } |
| + | .c_cms_admin_revisions.a_show .title, |
| + | .c_cms_admin_revisions.a_show .content { |
| + | padding: 2px 5px; |
| + | margin: 0px 3px; |
| + | } |
| + | .c_cms_admin_revisions.a_show .title { |
| + | background: #f1f1f1; |
| + | border-bottom: 2px solid #bbb; |
| + | } |
| + | .c_cms_admin_revisions.a_show .content { |
| + | min-height: 16px; |
| + | border: 1px dashed #f1f1f1; |
| + | } |
| + | .c_cms_admin_revisions.a_show .revisions a { |
| + | display: block; |
| + | background-color: #252525; |
| + | border-radius: 2px; |
| + | padding: 0px 3px; |
| + | opacity: 0.5; |
| + | margin-bottom: 2px; |
| + | color: #fff; |
| + | } |
| + | .c_cms_admin_revisions.a_show .revisions a:hover, |
| + | .c_cms_admin_revisions.a_show .revisions a.active { |
| + | opacity: 1; |
| + | } |
| + | .c_cms_admin_revisions.a_show .revisions a:last-child { |
| + | margin-bottom: 0px; |
| + | } |
| \ No newline at end of file | |
app/assets/stylesheets/comfortable_mexican_sofa/form.css
+116
-0
| @@ | @@ -0,0 +1,116 @@ |
| + | /* -- Forms -------------------------------------------------------------- */ |
| + | .form_element { |
| + | overflow: hidden; |
| + | margin-bottom: 5px; |
| + | } |
| + | .form_element .label { |
| + | width: 117px; |
| + | float: left; |
| + | text-align: right; |
| + | font: 13px/19px 'Lucida Grande', 'Tahoma', serif; |
| + | text-shadow: #fff 1px 1px; |
| + | padding: 0px 10px; |
| + | background-color: #f1f1f1; |
| + | border-top-left-radius: 3px; |
| + | border-bottom-left-radius: 3px ; |
| + | -moz-border-radius-topleft: 3px; |
| + | -moz-border-radius-bottomleft: 3px; |
| + | border-right: 3px solid #bbb; |
| + | } |
| + | .form_element .value { |
| + | margin-left: 150px; |
| + | overflow: hidden; |
| + | } |
| + | .form_element .value input[type='text'], |
| + | .form_element .value input[type='password'], |
| + | .form_element .value select, |
| + | .form_element .value textarea { |
| + | border: 0px; |
| + | width: 100%; |
| + | padding: 2px 0px; |
| + | font-family: 'Courier New', Courier, monospace; |
| + | } |
| + | .form_element .value textarea { |
| + | height: 300px; |
| + | } |
| + | .form_element .value .CodeMirror-wrapping { |
| + | background-color: #fff; |
| + | } |
| + | .form_element.check_box_element input { |
| + | width: auto; |
| + | } |
| + | .page_form_extras { |
| + | margin-bottom: 10px; |
| + | } |
| + | #form_blocks .no_tags { |
| + | background-color: #252525; |
| + | color: #aaa; |
| + | border-radius: 3px; |
| + | margin-left: 150px; |
| + | text-align: center; |
| + | padding: 10px; |
| + | } |
| + | #form_blocks .no_tags a { |
| + | color: #fff; |
| + | } |
| + | #form_blocks .no_tags a:hover { |
| + | color: #aaa; |
| + | text-decoration: underline; |
| + | } |
| + | #form_blocks .no_tags code { |
| + | color: #B85042; |
| + | } |
| + | .form_element.field_datetime .label, |
| + | .form_element.field_integer .label, |
| + | .form_element.field_string .label, |
| + | .form_element.field_text .label { |
| + | border-color: #48699C; |
| + | } |
| + | .form_element.page_datetime .label, |
| + | .form_element.page_integer .label, |
| + | .form_element.page_string .label, |
| + | .form_element.page_text .label, |
| + | .form_element.page_rich_text .label { |
| + | border-color: #3F7300; |
| + | } |
| + | .form_error { |
| + | background-color: #9e0b0f; |
| + | font-size: 14px; |
| + | color: #fff; |
| + | padding: 5px; |
| + | text-align: center; |
| + | margin-bottom: 10px; |
| + | } |
| + | .form_element.errors .label { |
| + | border-color: #9e0b0f; |
| + | } |
| + | .form_element.errors .errors { |
| + | margin: 2px 0px 0px 150px; |
| + | font-size: 11px; |
| + | color: #9e0b0f; |
| + | } |
| + | .form_element.submit_element { |
| + | margin-top: 10px; |
| + | } |
| + | .form_element.submit_element .value { |
| + | background-color: #f1f1f1; |
| + | border-radius: 3px; |
| + | -moz-border-radius: 3px; |
| + | padding: 5px; |
| + | } |
| + | .form_element.submit_element label { |
| + | margin: 0px 5px; |
| + | } |
| + | .form_element.submit_element input[name='commit'], |
| + | .form_element.submit_element input[name='save'] { |
| + | float: right; |
| + | } |
| + | .form_element .desc { |
| + | margin: 2px 0px 0px 150px; |
| + | font-size: 11px; |
| + | color: #777; |
| + | background-color: #fff; |
| + | padding: 5px; |
| + | border-radius: 3px; |
| + | -moz-border-radius: 3px; |
| + | } |
| \ No newline at end of file | |
app/assets/stylesheets/comfortable_mexican_sofa/reset.css
+1
-0
| @@ | @@ -0,0 +1 @@ |
| + | html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;} |
| \ No newline at end of file | |
app/assets/stylesheets/comfortable_mexican_sofa/structure.css
+148
-0
| @@ | @@ -0,0 +1,148 @@ |
| + | /* -- Containers --------------------------------------------------------- */ |
| + | html, body { |
| + | height: 100%; |
| + | background-color: #252525; |
| + | } |
| + | .body_wrapper { |
| + | height: 100%; |
| + | } |
| + | .left_column { |
| + | width: 175px; |
| + | float: left; |
| + | } |
| + | .center_column { |
| + | position: relative; |
| + | margin: 0px 250px 0px 175px; |
| + | min-height: 100%; |
| + | background-color: #D8D8D8; |
| + | } |
| + | .center_column .center_column_content { |
| + | padding: 25px; |
| + | } |
| + | .right_column { |
| + | width: 250px; |
| + | float: right; |
| + | } |
| + | .right_column_content { |
| + | padding: 25px 10px; |
| + | width: 230px; |
| + | position: fixed; |
| + | } |
| + | .left_column_content { |
| + | padding: 25px 0px 25px 10px; |
| + | width: 165px; |
| + | position: fixed; |
| + | } |
| + | .left_column_content ul.nav a { |
| + | display: block; |
| + | padding: 3px 10px; |
| + | margin-bottom: 5px; |
| + | font: 15px/25px 'Lucida Grande', 'Tahoma', serif; |
| + | border-top-left-radius: 4px; |
| + | border-bottom-left-radius: 4px; |
| + | -moz-border-radius-topleft: 4px; |
| + | -moz-border-radius-bottomleft: 4px; |
| + | background: #2D2D2D; |
| + | background: -moz-linear-gradient(left, #2D2D2D 0%, #484848 100%); |
| + | background: -webkit-gradient(linear, left top, right top, color-stop(0%,#2D2D2D), color-stop(100%,#484848)); |
| + | color: #fff; |
| + | opacity: 0.3; |
| + | } |
| + | .left_column_content ul.nav a:hover, |
| + | .left_column_content ul.nav a.active { |
| + | color: #fff; |
| + | opacity: 1; |
| + | } |
| + | .right_column_content h2 { |
| + | color: #d8d8d8; |
| + | text-shadow: #000 1px 1px; |
| + | margin-bottom: 5px; |
| + | } |
| + | .right_column_content .box { |
| + | background-color: #484848; |
| + | padding: 5px; |
| + | border-radius: 3px; |
| + | -moz-border-radius: 3px; |
| + | margin-bottom: 10px; |
| + | overflow: hidden; |
| + | color: #fff; |
| + | } |
| + | /* -- Flash Messages ----------------------------------------------------- */ |
| + | .flash { |
| + | text-align: center; |
| + | padding: 8px; |
| + | color: #fff; |
| + | background-color: #066B12; |
| + | } |
| + | .flash.error { |
| + | background-color: #9e0b0f; |
| + | } |
| + | /* -- Buttons ------------------------------------------------------------ */ |
| + | a.button, |
| + | button, |
| + | input[type='button'], |
| + | input[type='submit'], |
| + | input[type='reset'], |
| + | input[type='file'], |
| + | ul.list .action_links a, |
| + | table.formatted td.action_links a { |
| + | margin-left: 3px; |
| + | background-color: #b4b4b4; |
| + | color: #1b1b1b; |
| + | padding: 3px 5px; |
| + | font: 9px Arial, sans-serif; |
| + | text-transform: uppercase; |
| + | border-radius: 3px; |
| + | -moz-border-radius: 3px; |
| + | border: 1px solid #9f9f9f; |
| + | background: -moz-linear-gradient(top, #F9F9F9 0%, #D5D5D5 34%, #B4B4B4 100%); |
| + | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F9F9F9), color-stop(34%,#D5D5D5), color-stop(100%,#B4B4B4)); |
| + | text-shadow: #f5f5f5 1px 1px; |
| + | } |
| + | a.button:hover, |
| + | button:hover, |
| + | input[type='button']:hover, |
| + | input[type='submit']:hover, |
| + | input[type='reset']:hover, |
| + | input[type='file']:hover, |
| + | ul.list .action_links a:hover, |
| + | table.formatted td.action_links a:hover { |
| + | box-shadow: inset 0px 0px 5px #aaa; |
| + | -moz-box-shadow: inset 0px 0px 5px #aaa; |
| + | -webkit-box-shadow: inset 0px 0px 5px #aaa; |
| + | border-color: #484848; |
| + | } |
| + | a.button.big, |
| + | button, |
| + | input[type='button'], |
| + | input[type='submit'], |
| + | input[type='reset'], |
| + | input[type='file'] { |
| + | padding: 3px 10px; |
| + | font-size: 10px; |
| + | letter-spacing: 0.5px; |
| + | } |
| + | a.button.big { |
| + | float: right; |
| + | } |
| + | /* -- Sofa Version ------------------------------------------------------- */ |
| + | .center_column .sofa { |
| + | position: absolute; |
| + | background: #000; |
| + | bottom: 0px; |
| + | left: -175px; |
| + | width: 155px; |
| + | padding: 5px 10px; |
| + | font-size: 10px; |
| + | } |
| + | .center_column .sofa a { |
| + | color: #484848; |
| + | } |
| + | .center_column .sofa a:hover { |
| + | color: #f1f1f1; |
| + | } |
| + | .center_column .sofa span.version { |
| + | color: #f1f1f1; |
| + | font-size: 9px; |
| + | margin-left: 2px; |
| + | } |
| \ No newline at end of file | |
app/assets/stylesheets/comfortable_mexican_sofa/typography.css
+36
-0
| @@ | @@ -0,0 +1,36 @@ |
| + | body { |
| + | font: 13px 'Lucida Grande', 'Tahoma', sans-serif; |
| + | } |
| + | |
| + | h1 { |
| + | font: bold 25px/25px 'Lucida Grande', 'Tahoma', serif; |
| + | margin-bottom: 25px; |
| + | padding-bottom: 5px; |
| + | color: #1C1F22; |
| + | text-shadow: #fff 1px 1px; |
| + | border-bottom: 2px solid #9f9f9f; |
| + | } |
| + | h2 { |
| + | font: bold 16px/16px 'Lucida Grande', 'Tahoma', serif; |
| + | text-shadow: #fff 1px 1px; |
| + | margin-bottom: 15px; |
| + | } |
| + | h1 + h2 { |
| + | margin-top: -15px; |
| + | } |
| + | a { |
| + | text-decoration: none; |
| + | color: #384E66; |
| + | } |
| + | a:hover { |
| + | color: #1C2733; |
| + | } |
| + | strong { |
| + | font-weight: bold; |
| + | } |
| + | em { |
| + | font-style: italic; |
| + | } |
| + | code { |
| + | font: 13px Consolas, Monaco, Courier New, Courier, monospace; |
| + | } |
| \ No newline at end of file | |
app/views/layouts/cms_admin/_head.html.erb
+5
-2
| @@ | @@ -3,8 +3,11 @@ |
| <title><%= ComfortableMexicanSofa.config.cms_title %></title> | |
| <%= csrf_meta_tag %> | |
| <meta name="cms-admin-path" content="<%= ComfortableMexicanSofa.config.admin_route_prefix %>" /> | |
| - | <%= stylesheet_link_tag :cms, :cache => ('_cms' if ComfortableMexicanSofa.config.enable_caching) %> |
| - | <%= javascript_include_tag :cms, :cache => ('_cms' if ComfortableMexicanSofa.config.enable_caching) %> |
| + | |
| + | <%= stylesheet_link_tag 'comfortable_mexican_sofa/application' %> |
| + | <%= javascript_include_tag 'comfortable_mexican_sofa/application' %> |
| + | |
| + | |
| <%= javascript_include_tag :tiny_mce %> | |
| <%= yield :head %> | |
public/stylesheets/comfortable_mexican_sofa/content.css
+0
-181
| @@ | @@ -1,181 +0,0 @@ |
| - | /* -- Mirrors widget ----------------------------------------------------- */ |
| - | #mirrors.box select { |
| - | width: 100%; |
| - | } |
| - | |
| - | /* -- Page saving widget ------------------------------------------------- */ |
| - | #page_save button { |
| - | float: right; |
| - | } |
| - | #page_save label { |
| - | line-height: 20px; |
| - | padding-left: 5px; |
| - | } |
| - | #page_save input { |
| - | margin-right: 5px; |
| - | } |
| - | /* -- File Upload widget ------------------------------------------------- */ |
| - | #file_uploads .actions { |
| - | overflow: hidden; |
| - | } |
| - | #file_uploads .actions a.button { |
| - | float: right; |
| - | } |
| - | #file_uploads #uploaded_files { |
| - | max-height: 500px; |
| - | overflow-y: auto; |
| - | } |
| - | #file_uploads #uploaded_files .file { |
| - | position: relative; |
| - | overflow: hidden; |
| - | font-size: 11px; |
| - | background-color: #252525; |
| - | margin-top: 2px; |
| - | padding: 0px 3px; |
| - | opacity: 0.5; |
| - | border-radius: 2px; |
| - | -moz-border-radius: 2px; |
| - | } |
| - | #file_uploads #uploaded_files .file.pending { |
| - | opacity: 0.3; |
| - | } |
| - | #file_uploads #uploaded_files .file:hover { |
| - | opacity: 1; |
| - | } |
| - | #file_uploads #uploaded_files .file a { |
| - | color: #fff; |
| - | } |
| - | #file_uploads #uploaded_files .file a.delete { |
| - | position: absolute; |
| - | display: block; |
| - | right: 0px; |
| - | top: 0px; |
| - | height: 13px; |
| - | width: 13px; |
| - | font-weight: bold; |
| - | } |
| - | #file_uploads #uploaded_files .file:hover a.delete { |
| - | color: #9e0b0f; |
| - | } |
| - | |
| - | /* -- Listings ----------------------------------------------------------- */ |
| - | ul.list li .item { |
| - | overflow: hidden; |
| - | padding: 5px; |
| - | background-color: #f1f1f1; |
| - | border-radius: 3px; |
| - | -moz-border-radius: 3px; |
| - | margin-bottom: 5px; |
| - | } |
| - | ul.list li .item .toggle { |
| - | float: left; |
| - | height: 28px; |
| - | width: 28px; |
| - | } |
| - | ul.list li .item .toggle a { |
| - | display: block; |
| - | height: 28px; |
| - | width: 28px; |
| - | background: url(/images/comfortable_mexican_sofa/arrow_right.gif) center center no-repeat; |
| - | } |
| - | ul.list li .item .toggle a span { |
| - | display: none; |
| - | } |
| - | ul.list li .item .toggle.open a { |
| - | background-image: url(/images/comfortable_mexican_sofa/arrow_bottom.gif); |
| - | } |
| - | ul.list li .item .icon { |
| - | float: left; |
| - | width: 28px; |
| - | height: 28px; |
| - | background: url(/images/comfortable_mexican_sofa/icon_regular.gif); |
| - | } |
| - | ul.list li .item .icon .dragger { |
| - | width: 28px; |
| - | height: 28px; |
| - | background: url(/images/comfortable_mexican_sofa/icon_move.gif); |
| - | cursor: move; |
| - | display: none; |
| - | } |
| - | ul.list li .item .icon:hover .dragger { |
| - | display: block; |
| - | } |
| - | ul.list li .item .icon .dragger span { |
| - | display: none; |
| - | } |
| - | ul.list li .item .label { |
| - | margin-left: 60px; |
| - | font-size: 14px; |
| - | font-weight: bold; |
| - | } |
| - | ul.list li .item .label .sublabel { |
| - | font-size: 10px; |
| - | font-weight: normal; |
| - | } |
| - | ul.list li ul { |
| - | margin-left: 28px; |
| - | } |
| - | ul.list li .action_links { |
| - | float: right; |
| - | opacity: 0.2; |
| - | } |
| - | ul.list li .item:hover .action_links { |
| - | opacity: 1; |
| - | } |
| - | ul.list li .item:hover { |
| - | background-color: #fff; |
| - | } |
| - | |
| - | /* -- Page Specific stuff ------------------------------------------------ */ |
| - | .c_cms_admin_sites.a_index ul.list li .item .label, |
| - | .c_cms_admin_layouts.a_index ul.list li .item .label, |
| - | .c_cms_admin_snippets.a_index ul.list li .item .label { |
| - | margin-left: 32px; |
| - | } |
| - | .c_cms_admin_layouts.a_index ul.list li .item .icon { |
| - | background-image: url(/images/comfortable_mexican_sofa/icon_layout.gif); |
| - | } |
| - | .c_cms_admin_snippets.a_index ul.list li .item .icon { |
| - | background-image: url(/images/comfortable_mexican_sofa/icon_snippet.gif); |
| - | } |
| - | /* -- Revisions ---------------------------------------------------------- */ |
| - | .c_cms_admin_revisions.a_show .form_element.submit_element .value { |
| - | margin-left: 0px; |
| - | } |
| - | .c_cms_admin_revisions.a_show .current { |
| - | width: 50%; |
| - | float: left; |
| - | } |
| - | .c_cms_admin_revisions.a_show .versioned { |
| - | width: 50%; |
| - | float: right; |
| - | } |
| - | .c_cms_admin_revisions.a_show .title, |
| - | .c_cms_admin_revisions.a_show .content { |
| - | padding: 2px 5px; |
| - | margin: 0px 3px; |
| - | } |
| - | .c_cms_admin_revisions.a_show .title { |
| - | background: #f1f1f1; |
| - | border-bottom: 2px solid #bbb; |
| - | } |
| - | .c_cms_admin_revisions.a_show .content { |
| - | min-height: 16px; |
| - | border: 1px dashed #f1f1f1; |
| - | } |
| - | .c_cms_admin_revisions.a_show .revisions a { |
| - | display: block; |
| - | background-color: #252525; |
| - | border-radius: 2px; |
| - | padding: 0px 3px; |
| - | opacity: 0.5; |
| - | margin-bottom: 2px; |
| - | color: #fff; |
| - | } |
| - | .c_cms_admin_revisions.a_show .revisions a:hover, |
| - | .c_cms_admin_revisions.a_show .revisions a.active { |
| - | opacity: 1; |
| - | } |
| - | .c_cms_admin_revisions.a_show .revisions a:last-child { |
| - | margin-bottom: 0px; |
| - | } |
| \ No newline at end of file | |
public/stylesheets/comfortable_mexican_sofa/form.css
+0
-116
| @@ | @@ -1,116 +0,0 @@ |
| - | /* -- Forms -------------------------------------------------------------- */ |
| - | .form_element { |
| - | overflow: hidden; |
| - | margin-bottom: 5px; |
| - | } |
| - | .form_element .label { |
| - | width: 117px; |
| - | float: left; |
| - | text-align: right; |
| - | font: 13px/19px 'Lucida Grande', 'Tahoma', serif; |
| - | text-shadow: #fff 1px 1px; |
| - | padding: 0px 10px; |
| - | background-color: #f1f1f1; |
| - | border-top-left-radius: 3px; |
| - | border-bottom-left-radius: 3px ; |
| - | -moz-border-radius-topleft: 3px; |
| - | -moz-border-radius-bottomleft: 3px; |
| - | border-right: 3px solid #bbb; |
| - | } |
| - | .form_element .value { |
| - | margin-left: 150px; |
| - | overflow: hidden; |
| - | } |
| - | .form_element .value input[type='text'], |
| - | .form_element .value input[type='password'], |
| - | .form_element .value select, |
| - | .form_element .value textarea { |
| - | border: 0px; |
| - | width: 100%; |
| - | padding: 2px 0px; |
| - | font-family: 'Courier New', Courier, monospace; |
| - | } |
| - | .form_element .value textarea { |
| - | height: 300px; |
| - | } |
| - | .form_element .value .CodeMirror-wrapping { |
| - | background-color: #fff; |
| - | } |
| - | .form_element.check_box_element input { |
| - | width: auto; |
| - | } |
| - | .page_form_extras { |
| - | margin-bottom: 10px; |
| - | } |
| - | #form_blocks .no_tags { |
| - | background-color: #252525; |
| - | color: #aaa; |
| - | border-radius: 3px; |
| - | margin-left: 150px; |
| - | text-align: center; |
| - | padding: 10px; |
| - | } |
| - | #form_blocks .no_tags a { |
| - | color: #fff; |
| - | } |
| - | #form_blocks .no_tags a:hover { |
| - | color: #aaa; |
| - | text-decoration: underline; |
| - | } |
| - | #form_blocks .no_tags code { |
| - | color: #B85042; |
| - | } |
| - | .form_element.field_datetime .label, |
| - | .form_element.field_integer .label, |
| - | .form_element.field_string .label, |
| - | .form_element.field_text .label { |
| - | border-color: #48699C; |
| - | } |
| - | .form_element.page_datetime .label, |
| - | .form_element.page_integer .label, |
| - | .form_element.page_string .label, |
| - | .form_element.page_text .label, |
| - | .form_element.page_rich_text .label { |
| - | border-color: #3F7300; |
| - | } |
| - | .form_error { |
| - | background-color: #9e0b0f; |
| - | font-size: 14px; |
| - | color: #fff; |
| - | padding: 5px; |
| - | text-align: center; |
| - | margin-bottom: 10px; |
| - | } |
| - | .form_element.errors .label { |
| - | border-color: #9e0b0f; |
| - | } |
| - | .form_element.errors .errors { |
| - | margin: 2px 0px 0px 150px; |
| - | font-size: 11px; |
| - | color: #9e0b0f; |
| - | } |
| - | .form_element.submit_element { |
| - | margin-top: 10px; |
| - | } |
| - | .form_element.submit_element .value { |
| - | background-color: #f1f1f1; |
| - | border-radius: 3px; |
| - | -moz-border-radius: 3px; |
| - | padding: 5px; |
| - | } |
| - | .form_element.submit_element label { |
| - | margin: 0px 5px; |
| - | } |
| - | .form_element.submit_element input[name='commit'], |
| - | .form_element.submit_element input[name='save'] { |
| - | float: right; |
| - | } |
| - | .form_element .desc { |
| - | margin: 2px 0px 0px 150px; |
| - | font-size: 11px; |
| - | color: #777; |
| - | background-color: #fff; |
| - | padding: 5px; |
| - | border-radius: 3px; |
| - | -moz-border-radius: 3px; |
| - | } |
| \ No newline at end of file | |
public/stylesheets/comfortable_mexican_sofa/reset.css
+0
-1
| @@ | @@ -1 +0,0 @@ |
| - | html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;} |
| \ No newline at end of file | |
public/stylesheets/comfortable_mexican_sofa/structure.css
+0
-148
| @@ | @@ -1,148 +0,0 @@ |
| - | /* -- Containers --------------------------------------------------------- */ |
| - | html, body { |
| - | height: 100%; |
| - | background-color: #252525; |
| - | } |
| - | .body_wrapper { |
| - | height: 100%; |
| - | } |
| - | .left_column { |
| - | width: 175px; |
| - | float: left; |
| - | } |
| - | .center_column { |
| - | position: relative; |
| - | margin: 0px 250px 0px 175px; |
| - | min-height: 100%; |
| - | background-color: #D8D8D8; |
| - | } |
| - | .center_column .center_column_content { |
| - | padding: 25px; |
| - | } |
| - | .right_column { |
| - | width: 250px; |
| - | float: right; |
| - | } |
| - | .right_column_content { |
| - | padding: 25px 10px; |
| - | width: 230px; |
| - | position: fixed; |
| - | } |
| - | .left_column_content { |
| - | padding: 25px 0px 25px 10px; |
| - | width: 165px; |
| - | position: fixed; |
| - | } |
| - | .left_column_content ul.nav a { |
| - | display: block; |
| - | padding: 3px 10px; |
| - | margin-bottom: 5px; |
| - | font: 15px/25px 'Lucida Grande', 'Tahoma', serif; |
| - | border-top-left-radius: 4px; |
| - | border-bottom-left-radius: 4px; |
| - | -moz-border-radius-topleft: 4px; |
| - | -moz-border-radius-bottomleft: 4px; |
| - | background: #2D2D2D; |
| - | background: -moz-linear-gradient(left, #2D2D2D 0%, #484848 100%); |
| - | background: -webkit-gradient(linear, left top, right top, color-stop(0%,#2D2D2D), color-stop(100%,#484848)); |
| - | color: #fff; |
| - | opacity: 0.3; |
| - | } |
| - | .left_column_content ul.nav a:hover, |
| - | .left_column_content ul.nav a.active { |
| - | color: #fff; |
| - | opacity: 1; |
| - | } |
| - | .right_column_content h2 { |
| - | color: #d8d8d8; |
| - | text-shadow: #000 1px 1px; |
| - | margin-bottom: 5px; |
| - | } |
| - | .right_column_content .box { |
| - | background-color: #484848; |
| - | padding: 5px; |
| - | border-radius: 3px; |
| - | -moz-border-radius: 3px; |
| - | margin-bottom: 10px; |
| - | overflow: hidden; |
| - | color: #fff; |
| - | } |
| - | /* -- Flash Messages ----------------------------------------------------- */ |
| - | .flash { |
| - | text-align: center; |
| - | padding: 8px; |
| - | color: #fff; |
| - | background-color: #066B12; |
| - | } |
| - | .flash.error { |
| - | background-color: #9e0b0f; |
| - | } |
| - | /* -- Buttons ------------------------------------------------------------ */ |
| - | a.button, |
| - | button, |
| - | input[type='button'], |
| - | input[type='submit'], |
| - | input[type='reset'], |
| - | input[type='file'], |
| - | ul.list .action_links a, |
| - | table.formatted td.action_links a { |
| - | margin-left: 3px; |
| - | background-color: #b4b4b4; |
| - | color: #1b1b1b; |
| - | padding: 3px 5px; |
| - | font: 9px Arial, sans-serif; |
| - | text-transform: uppercase; |
| - | border-radius: 3px; |
| - | -moz-border-radius: 3px; |
| - | border: 1px solid #9f9f9f; |
| - | background: -moz-linear-gradient(top, #F9F9F9 0%, #D5D5D5 34%, #B4B4B4 100%); |
| - | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F9F9F9), color-stop(34%,#D5D5D5), color-stop(100%,#B4B4B4)); |
| - | text-shadow: #f5f5f5 1px 1px; |
| - | } |
| - | a.button:hover, |
| - | button:hover, |
| - | input[type='button']:hover, |
| - | input[type='submit']:hover, |
| - | input[type='reset']:hover, |
| - | input[type='file']:hover, |
| - | ul.list .action_links a:hover, |
| - | table.formatted td.action_links a:hover { |
| - | box-shadow: inset 0px 0px 5px #aaa; |
| - | -moz-box-shadow: inset 0px 0px 5px #aaa; |
| - | -webkit-box-shadow: inset 0px 0px 5px #aaa; |
| - | border-color: #484848; |
| - | } |
| - | a.button.big, |
| - | button, |
| - | input[type='button'], |
| - | input[type='submit'], |
| - | input[type='reset'], |
| - | input[type='file'] { |
| - | padding: 3px 10px; |
| - | font-size: 10px; |
| - | letter-spacing: 0.5px; |
| - | } |
| - | a.button.big { |
| - | float: right; |
| - | } |
| - | /* -- Sofa Version ------------------------------------------------------- */ |
| - | .center_column .sofa { |
| - | position: absolute; |
| - | background: #000; |
| - | bottom: 0px; |
| - | left: -175px; |
| - | width: 155px; |
| - | padding: 5px 10px; |
| - | font-size: 10px; |
| - | } |
| - | .center_column .sofa a { |
| - | color: #484848; |
| - | } |
| - | .center_column .sofa a:hover { |
| - | color: #f1f1f1; |
| - | } |
| - | .center_column .sofa span.version { |
| - | color: #f1f1f1; |
| - | font-size: 9px; |
| - | margin-left: 2px; |
| - | } |
| \ No newline at end of file | |
public/stylesheets/comfortable_mexican_sofa/typography.css
+0
-36
| @@ | @@ -1,36 +0,0 @@ |
| - | body { |
| - | font: 13px 'Lucida Grande', 'Tahoma', sans-serif; |
| - | } |
| - | |
| - | h1 { |
| - | font: bold 25px/25px 'Lucida Grande', 'Tahoma', serif; |
| - | margin-bottom: 25px; |
| - | padding-bottom: 5px; |
| - | color: #1C1F22; |
| - | text-shadow: #fff 1px 1px; |
| - | border-bottom: 2px solid #9f9f9f; |
| - | } |
| - | h2 { |
| - | font: bold 16px/16px 'Lucida Grande', 'Tahoma', serif; |
| - | text-shadow: #fff 1px 1px; |
| - | margin-bottom: 15px; |
| - | } |
| - | h1 + h2 { |
| - | margin-top: -15px; |
| - | } |
| - | a { |
| - | text-decoration: none; |
| - | color: #384E66; |
| - | } |
| - | a:hover { |
| - | color: #1C2733; |
| - | } |
| - | strong { |
| - | font-weight: bold; |
| - | } |
| - | em { |
| - | font-style: italic; |
| - | } |
| - | code { |
| - | font: 13px Consolas, Monaco, Courier New, Courier, monospace; |
| - | } |
| \ No newline at end of file | |