comfortable_mexican_sofa 1.12.2 → 1.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/comfortable_mexican_sofa/admin/application.js +1 -1
  3. data/app/assets/javascripts/comfortable_mexican_sofa/application.js.coffee +50 -57
  4. data/app/assets/javascripts/comfortable_mexican_sofa/cms/files.js.coffee +29 -0
  5. data/app/assets/javascripts/comfortable_mexican_sofa/cms/uploader.js.coffee +139 -0
  6. data/app/assets/stylesheets/comfortable_mexican_sofa/admin/application.css +1 -1
  7. data/app/assets/stylesheets/comfortable_mexican_sofa/application.css.sass +1 -0
  8. data/app/assets/stylesheets/comfortable_mexican_sofa/base.css.sass +67 -84
  9. data/app/controllers/comfy/admin/cms/base_controller.rb +11 -8
  10. data/app/controllers/comfy/admin/cms/categories_controller.rb +10 -9
  11. data/app/controllers/comfy/admin/cms/files_controller.rb +38 -69
  12. data/app/controllers/comfy/admin/cms/layouts_controller.rb +4 -3
  13. data/app/controllers/comfy/admin/cms/pages_controller.rb +17 -11
  14. data/app/controllers/comfy/admin/cms/revisions_controller.rb +10 -9
  15. data/app/controllers/comfy/admin/cms/sites_controller.rb +2 -1
  16. data/app/controllers/comfy/admin/cms/snippets_controller.rb +3 -2
  17. data/app/controllers/comfy/cms/assets_controller.rb +17 -9
  18. data/app/controllers/comfy/cms/content_controller.rb +20 -14
  19. data/app/models/comfy/cms/file.rb +16 -15
  20. data/app/models/comfy/cms/page.rb +2 -1
  21. data/app/models/comfy/cms/site.rb +5 -0
  22. data/app/views/comfy/admin/cms/files/_file.html.haml +26 -13
  23. data/app/views/comfy/admin/cms/files/_form.html.haml +8 -5
  24. data/app/views/comfy/admin/cms/files/_modal.html.haml +4 -0
  25. data/app/views/comfy/admin/cms/files/create.js.erb +1 -0
  26. data/app/views/comfy/admin/cms/files/destroy.js.coffee +2 -2
  27. data/app/views/comfy/admin/cms/files/index.html.haml +33 -31
  28. data/app/views/comfy/admin/cms/layouts/_form.html.haml +2 -5
  29. data/app/views/comfy/admin/cms/pages/_form.html.haml +7 -8
  30. data/app/views/comfy/admin/cms/pages/_form_blocks.html.haml +3 -3
  31. data/app/views/comfy/admin/cms/sites/_form.html.haml +2 -2
  32. data/app/views/comfy/admin/cms/sites/index.html.haml +1 -2
  33. data/app/views/comfy/admin/cms/snippets/_form.html.haml +5 -8
  34. data/app/views/kaminari/comfy/_paginator.html.haml +10 -11
  35. data/app/views/layouts/comfy/admin/cms.html.haml +3 -2
  36. data/app/views/layouts/comfy/admin/cms/_body.html.haml +8 -7
  37. data/app/views/layouts/comfy/admin/cms/{_center.html.haml → _flash.html.haml} +0 -3
  38. data/app/views/layouts/comfy/admin/cms/_footer_js.html.haml +0 -4
  39. data/app/views/layouts/comfy/admin/cms/_left.html.haml +10 -5
  40. data/comfortable_mexican_sofa.gemspec +9 -8
  41. data/config/cms_routes.rb +2 -2
  42. data/config/initializers/comfortable_mexican_sofa.rb +31 -13
  43. data/config/initializers/plupload.rb +9 -0
  44. data/config/locales/en.yml +18 -16
  45. data/db/upgrade_migrations/08_upgrade_to_1_12_0.rb +3 -0
  46. data/lib/comfortable_mexican_sofa.rb +6 -5
  47. data/lib/comfortable_mexican_sofa/access_control/admin_authentication.rb +20 -0
  48. data/lib/comfortable_mexican_sofa/access_control/admin_authorization.rb +8 -0
  49. data/lib/comfortable_mexican_sofa/access_control/public_authentication.rb +8 -0
  50. data/lib/comfortable_mexican_sofa/configuration.rb +11 -3
  51. data/lib/comfortable_mexican_sofa/engine.rb +1 -0
  52. data/lib/comfortable_mexican_sofa/fixture.rb +7 -5
  53. data/lib/comfortable_mexican_sofa/fixture/category.rb +10 -3
  54. data/lib/comfortable_mexican_sofa/form_builder.rb +1 -1
  55. data/lib/comfortable_mexican_sofa/routes/cms.rb +3 -0
  56. data/lib/comfortable_mexican_sofa/version.rb +1 -1
  57. data/lib/generators/comfy/cms/assets_generator.rb +15 -0
  58. data/lib/generators/comfy/cms/cms_generator.rb +19 -12
  59. data/lib/generators/comfy/cms/controllers_generator.rb +13 -0
  60. data/lib/generators/comfy/cms/models_generator.rb +13 -0
  61. data/lib/generators/comfy/cms/views_generator.rb +13 -0
  62. data/test/controllers/comfy/admin/cms/files_controller_test.rb +22 -95
  63. data/test/controllers/comfy/admin/cms/layouts_controller_test.rb +9 -10
  64. data/test/controllers/comfy/admin/cms/pages_controller_test.rb +26 -27
  65. data/test/controllers/comfy/admin/cms/snippets_controller_test.rb +7 -8
  66. data/test/controllers/comfy/cms/content_controller_test.rb +30 -4
  67. data/test/gemfiles/Gemfile.rails.4.0 +3 -2
  68. data/test/gemfiles/Gemfile.rails.4.1 +3 -2
  69. data/test/gemfiles/Gemfile.rails.master +3 -2
  70. data/test/generators/cms_assets_generator_test.rb +13 -0
  71. data/test/generators/cms_controllers_generator_test.rb +12 -0
  72. data/test/generators/cms_generator_test.rb +10 -8
  73. data/test/generators/cms_models_generator_test.rb +12 -0
  74. data/test/generators/cms_views_generator_test.rb +12 -0
  75. data/test/generators/scaffold_generator_test.rb +6 -7
  76. data/test/integration/access_control_test.rb +141 -0
  77. data/test/integration/routing_test.rb +19 -0
  78. data/test/lib/configuration_test.rb +8 -7
  79. data/test/lib/fixtures/categories_test.rb +1 -0
  80. data/test/lib/fixtures/files_test.rb +5 -0
  81. data/test/lib/fixtures/pages_test.rb +17 -1
  82. data/test/lib/fixtures/snippets_test.rb +5 -0
  83. data/test/models/page_test.rb +6 -0
  84. data/test/models/site_test.rb +9 -0
  85. data/test/test_helper.rb +28 -19
  86. metadata +82 -48
  87. data/app/views/comfy/admin/cms/files/_index.html.haml +0 -11
  88. data/lib/comfortable_mexican_sofa/authentication/dummy_auth.rb +0 -8
  89. data/lib/comfortable_mexican_sofa/authentication/http_auth.rb +0 -25
  90. data/test/integration/authentication_test.rb +0 -48
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7db18b6f8e81d014cdeaed9da1654a5d44a8e98e
4
- data.tar.gz: cb5272767a11c342a92192f2befa1b6971c1541f
3
+ metadata.gz: 6288406fcc2f264c4289e644ef4968d45c1c127e
4
+ data.tar.gz: 1e60695eae961a65244861eaeed32016d8d399aa
5
5
  SHA512:
6
- metadata.gz: 22a37316a9dcb0dba85d6747c062f811b0f23b97bc3db2833ffbdcbd1b421f7e74b70b534f91d143a7efd94c8ca586da4bc8e8c6ecac8cd01b1be0ac98647030
7
- data.tar.gz: ece6cf08ce291810b4e89d632379b096772d906d1628b2781c934588e4873a39b3b731011aa251c600674813690e1a0b666496178c9b9fe5164deeca81954a5d
6
+ metadata.gz: d006542f2574fa558cc49b4d4c1a2ac048cc76360598cad83de2becf828c577231a12b5ebc9f85eaaaf49a719389cf2448f4acaf3315e1346843e6258ecab9a6
7
+ data.tar.gz: 6b20e59908397502960f98e1699356b488e8fc8ba0bb1891979d636e8d6c038c2723446fc4ccbdf07366ef27aff85ce714ae505f99020ae9a39f78e1238f756f
@@ -1 +1 @@
1
- // Overwrite this file in your application /app/assets/javascripts/comfortable_mexican_sofa/admin/application.js
1
+ // Overwrite this file in your application /app/assets/javascripts/comfortable_mexican_sofa/admin/application.js
@@ -1,4 +1,5 @@
1
1
  #= require jquery
2
+ #= require bootstrap-sprockets
2
3
  #= require jquery_ujs
3
4
  #= require jquery-ui
4
5
  #= require tinymce-jquery
@@ -12,28 +13,29 @@
12
13
  #= require bootstrap
13
14
  #= require comfortable_mexican_sofa/lib/bootstrap-datetimepicker
14
15
  #= require comfortable_mexican_sofa/lib/diff
16
+ #= require comfortable_mexican_sofa/cms/uploader
17
+ #= require comfortable_mexican_sofa/cms/files
18
+
19
+ window.CMS ||= {}
20
+
21
+ window.CMS.current_path = window.location.pathname
22
+ window.CMS.code_mirror_instances = [ ]
15
23
 
16
24
  $ ->
17
25
  CMS.init()
18
26
 
19
- window.CMS =
20
- current_path: window.location.pathname
21
- code_mirror_instances: []
22
-
23
- init: ->
24
- CMS.slugify()
25
- CMS.wysiwyg()
26
- CMS.codemirror()
27
- CMS.sortable_list()
28
- CMS.timepicker()
29
- CMS.page_blocks()
30
- CMS.mirrors()
31
- CMS.page_update_preview()
32
- CMS.page_update_publish()
33
- CMS.categories()
34
- CMS.uploader()
35
- CMS.uploaded_files()
36
-
27
+ window.CMS.init = ->
28
+ CMS.slugify()
29
+ CMS.wysiwyg()
30
+ CMS.codemirror()
31
+ CMS.sortable_list()
32
+ CMS.timepicker()
33
+ CMS.page_blocks()
34
+ CMS.mirrors()
35
+ CMS.page_update_preview()
36
+ CMS.page_update_publish()
37
+ CMS.categories()
38
+ CMS.files()
37
39
 
38
40
  window.CMS.slugify = ->
39
41
  slugify = (str) ->
@@ -46,19 +48,22 @@ window.CMS.slugify = ->
46
48
  str = str.replace(chars_to_replace_with_delimiter, '-')
47
49
  chars_to_remove = new RegExp('[^a-zA-Z0-9 -]', 'g')
48
50
  str = str.replace(chars_to_remove, '').replace(/\s+/g, '-').toLowerCase()
49
-
51
+
50
52
  $('input[data-slugify=true]').bind 'keyup.cms', ->
51
53
  $('input[data-slug=true]').val(slugify($(this).val()))
52
54
 
53
55
 
54
56
  window.CMS.wysiwyg = ->
55
57
  tinymce.init
56
- selector: 'textarea[data-cms-rich-text]'
57
- plugins: ['link', 'image', 'code']
58
- toolbar: 'undo redo | styleselect | bullist numlist | link unlink image | code'
59
- menubar: false
60
- statusbar: false
61
- relative_urls: false
58
+ selector: 'textarea[data-cms-rich-text]'
59
+ plugins: ['link', 'image', 'code', 'autoresize']
60
+ toolbar: 'undo redo | styleselect | bullist numlist | link unlink image | code'
61
+ menubar: false
62
+ statusbar: false
63
+ relative_urls: false
64
+ entity_encoding : 'raw'
65
+ autoresize_bottom_margin : 0
66
+
62
67
 
63
68
  window.CMS.codemirror = ->
64
69
  $('textarea[data-cms-cm-mode]').each (i, element) ->
@@ -75,8 +80,7 @@ window.CMS.codemirror = ->
75
80
  $('a[data-toggle="tab"]').on 'shown', ->
76
81
  for cm in CMS.code_mirror_instances
77
82
  cm.refresh()
78
- return
79
- return
83
+
80
84
 
81
85
  window.CMS.sortable_list = ->
82
86
  $('.sortable').sortable
@@ -103,12 +107,15 @@ window.CMS.page_blocks = ->
103
107
  url: $(this).data('url'),
104
108
  data:
105
109
  layout_id: $(this).val()
110
+ beforeSend: ->
111
+ tinymce.remove()
106
112
  complete: ->
107
113
  CMS.wysiwyg()
108
114
  CMS.timepicker()
109
115
  CMS.codemirror()
110
116
  CMS.reinitialize_page_blocks() if CMS.reinitialize_page_blocks?
111
117
 
118
+
112
119
  window.CMS.mirrors = ->
113
120
  $('#mirrors select').change ->
114
121
  window.location = $(this).val()
@@ -125,7 +132,7 @@ window.CMS.page_update_publish = ->
125
132
  widget = $('#form-save')
126
133
  $('input', widget).prop('checked', $('input#page_is_published').is(':checked'))
127
134
  $('button', widget).html($('input[name=commit]').val())
128
-
135
+
129
136
  $('input', widget).click ->
130
137
  $('input#page_is_published').prop('checked', $(this).is(':checked'))
131
138
  $('input#page_is_published').click ->
@@ -143,32 +150,18 @@ window.CMS.categories = ->
143
150
  $('.done', '.categories-widget').toggle()
144
151
 
145
152
 
146
- window.CMS.uploader = ->
147
- form = $('.file-uploader form')
148
- iframe = $('iframe#file-upload-frame')
149
-
150
- $('input[type=file]', form).change -> form.submit()
151
-
152
- iframe.load -> upload_loaded()
153
-
154
- upload_loaded = ->
155
- i = iframe[0]
156
- d = if i.contentDocument
157
- i.contentDocument
158
- else if i.contentWindow
159
- i.contentWindow.document
160
- else
161
- i.document
162
-
163
- if d.body.innerHTML
164
- raw_string = d.body.innerHTML
165
- json_string = raw_string.match(/\{(.|\n)*\}/)[0]
166
- json = $.parseJSON(json_string)
167
- files = $('<div/>').html(json.view).hide()
168
- $('.uploaded-files').prepend(files)
169
- files.map ->
170
- $(this).fadeIn()
171
-
172
- window.CMS.uploaded_files = ->
173
- $('.uploaded-files').on 'click', 'input', ->
174
- $(this).select()
153
+ # If we are inside an iframe remove the columns and just keep the center column content.
154
+ # This is used for the files widget that opens in a modal window.
155
+ window.CMS.set_iframe_layout = ->
156
+ in_iframe = ->
157
+ try
158
+ return window.self != window.top
159
+ catch e
160
+ return true
161
+
162
+ $('body').ready ->
163
+ if in_iframe()
164
+ $('body').addClass('in-iframe')
165
+
166
+ # Triggering this right away to prevent flicker
167
+ window.CMS.set_iframe_layout()
@@ -0,0 +1,29 @@
1
+ (($) ->
2
+ window.CMS or (window.CMS = {})
3
+ window.CMS.files = ->
4
+ modal = $('.cms-files-modal')
5
+ $('.cms-files-open-modal').on 'click', (e) ->
6
+ modal.on 'show.bs.modal', ->
7
+ iframe = modal.find('iframe')
8
+ iframeSrc = modal.data('iframe-src')
9
+ if iframe.attr('src') != iframeSrc
10
+ iframe.attr('src', iframeSrc)
11
+
12
+ modal.modal(show: true)
13
+ e.preventDefault()
14
+
15
+ # Make the files library modal window fill the browsers available height.
16
+ modal.on 'show.bs.modal', (e) ->
17
+ height = $(window).height() - 60
18
+ $(e.target).find('.modal-content').css('height', "#{height}px")
19
+
20
+ $(window).on 'resize', ->
21
+ height = $(window).height() - 60
22
+ modal.find('.modal-content').css('height', "#{height}px")
23
+
24
+ # When clicking a file path in the file list select it to make
25
+ # it easy to copy&paste.
26
+ $(document).on 'click', '.cms-uploader-filelist input[type=text]', ->
27
+ $(this).select()
28
+
29
+ ) jQuery
@@ -0,0 +1,139 @@
1
+ # CMS Uploader using plupload http://www.plupload.com/. Code inspired by
2
+ # plupload queue widget https://github.com/moxiecode/plupload/tree/master/js/jquery.plupload.queue
3
+ #
4
+ #= require moxie
5
+ #= require plupload.dev
6
+
7
+ (($, o) ->
8
+ window.CMS or (window.CMS = {})
9
+ window.CMS.uploader = (target, settings) ->
10
+
11
+ # Add a file to the file list.
12
+ addFile = (file) ->
13
+ fileList = $(".cms-uploader-filelist", target)
14
+
15
+ fileList.prepend("
16
+ <tr id='#{file.id}' class='temp'>
17
+ <td><div class='icon'></div></td>
18
+ <td class='main' colspan=2>
19
+ <div class='progress'>
20
+ <div class='progress-bar progress-bar-striped active'>
21
+ <span>#{file.name}</span>
22
+ </div>
23
+ </div>
24
+ </td>
25
+ <td>
26
+ <a class='btn btn-sm btn-danger pull-right cms-uploader-file-delete' href='#'>Delete</a>
27
+ </td>
28
+ </tr>
29
+ ")
30
+
31
+ $("#" + file.id + " a.cms-uploader-file-delete").click (e) ->
32
+ uploader.removeFile(file)
33
+ e.preventDefault()
34
+
35
+ updateFileStatus(file)
36
+
37
+ # Remove a file from the file list.
38
+ removeFile = (file) ->
39
+ $("#" + file.id).remove()
40
+
41
+ # Update a files upload status in the file list.
42
+ updateFileStatus = (file) ->
43
+ progress_bar = $("##{file.id} .progress-bar", target)
44
+ if file.status == plupload.UPLOADING
45
+ progress_bar.css('width', "#{file.percent}%")
46
+ if file.status == plupload.FAILED
47
+ progress_bar.css('width', '100%').addClass('progress-bar-danger')
48
+ $('span', progress_bar).html(file.error_message)
49
+
50
+ uploader = undefined
51
+ id = target.attr("id")
52
+
53
+ unless id
54
+ id = plupload.guid()
55
+ target.attr('id', id)
56
+
57
+ settings = $.extend(
58
+ runtimes: "html5,browserplus,silverlight,flash,gears"
59
+ dragdrop: true
60
+ drop_element: "#{id}-drag-drop-target"
61
+ browse_button: "#{id}-browse"
62
+ container: id
63
+ file_data_name: "file[file]"
64
+ headers:
65
+ Accept: "text/plupload"
66
+ , settings)
67
+
68
+ uploader = new plupload.Uploader(settings)
69
+ uploader.bind "PostInit", (up) ->
70
+
71
+ # Show drag and drop info and attach events if drag and drop is
72
+ # supported and enabled.
73
+ if up.settings.dragdrop and up.features.dragdrop
74
+ drop_element = $(up.settings.drop_element)
75
+
76
+ # When dragging over the document add a class to the drop target
77
+ # that puts it ontop of every element and remove that class when
78
+ # dropping or leaving the drop target. Otherwise the dragleave
79
+ # event would fire whenever we dragging over a child element inside
80
+ # the drop target such as text nodes or stuff.
81
+ $(document).bind 'dragenter', (e) ->
82
+ drop_element.addClass('cms-uploader-drag-drop-target-active')
83
+
84
+ drop_element.bind 'drop dragleave', (e) ->
85
+ drop_element.removeClass('cms-uploader-drag-drop-target-active')
86
+
87
+ else
88
+ $('.cms-uploader-drag-drop-info', target).hide()
89
+
90
+ # Need to bind this before initialization to handle initialization errors too.
91
+ uploader.bind 'Error', (up, err) ->
92
+ file = err.file
93
+ message = undefined
94
+
95
+ if file
96
+ # Get error message from the server response. Not all runtimes
97
+ # support this though.
98
+ message = err.response
99
+
100
+ # If no error message is in the server response get standard
101
+ # plupload error messages. This will have descriptive error message
102
+ # for something like file size or file format errors but for
103
+ # server errors it will only display a general error message.
104
+ unless message
105
+ message = err.message
106
+ if err.details
107
+ message += " (#{err.details})"
108
+ file.status = plupload.FAILED
109
+ file.error_message = message
110
+ updateFileStatus file
111
+
112
+ if err.code == plupload.INIT_ERROR
113
+ alert _('Error: Initialisation error. Reload to try again.')
114
+
115
+ uploader.init()
116
+ uploader.bind 'FilesAdded', (up, files) ->
117
+ $.each files, (i, file) ->
118
+ addFile file
119
+
120
+ # Auto start upload when files are added.
121
+ uploader.start()
122
+
123
+ uploader.bind 'UploadProgress', (up, file) ->
124
+ updateFileStatus(file)
125
+
126
+ uploader.bind "FileUploaded", (up, file, info) ->
127
+ # Replace the dummy file entry in the file list with the the entry
128
+ # from the server response.
129
+ $("tr##{file.id}").replaceWith(info.response)
130
+
131
+ uploader.bind 'FilesRemoved', (up, files) ->
132
+ $.each files, (i, file) ->
133
+ removeFile file
134
+
135
+ # Call setup function
136
+ if settings.setup
137
+ settings.setup(uploader)
138
+
139
+ ) jQuery, mOxie
@@ -1 +1 @@
1
- /* Overwrite this file in your application /app/assets/stylesheets/comfortable_mexican_sofa/admin/application.css */
1
+ /* Overwrite this file in your application /app/assets/stylesheets/comfortable_mexican_sofa/admin/application.css */
@@ -1,5 +1,6 @@
1
1
  @import "jquery-ui"
2
2
  @import "codemirror"
3
+ @import "bootstrap-sprockets"
3
4
  @import "bootstrap"
4
5
  @import "comfortable_mexican_sofa/lib/bootstrap-datetimepicker"
5
6
  @import "comfortable_mexican_sofa/bootstrap_overrides"
@@ -11,10 +11,18 @@
11
11
 
12
12
  html, body#comfy
13
13
  height: 100%
14
-
14
+
15
+ body#comfy.in-iframe
16
+ background: transparent
17
+ .left-column, .right-column, .body-footer
18
+ display: none
19
+ .body-wrapper .center-column
20
+ background: transparent
21
+ margin: 0
22
+
15
23
  body#comfy
16
24
  background-color: #252525
17
-
25
+
18
26
  // -- Containers ----------------------------------------------------------
19
27
  .body-wrapper
20
28
  height: 100%
@@ -39,7 +47,7 @@ body#comfy
39
47
  padding: 25px 10px
40
48
  width: 250px
41
49
  position: fixed
42
-
50
+
43
51
  // -- Navigation ----------------------------------------------------------
44
52
  .left-column-content ul.navigation
45
53
  list-style: none
@@ -64,16 +72,20 @@ body#comfy
64
72
  position: absolute
65
73
  top: 10px
66
74
  right: 0px
67
- z-index: 9999
75
+ z-index: 2
68
76
  content: ''
69
77
  display: block
78
+ a.cms-files-open-modal
79
+ float: right
80
+ position: relative
81
+ z-index: 2
70
82
  ul
71
83
  list-style: none
72
84
  margin: 0
73
85
  padding: 0
74
86
  a
75
87
  padding: 7px 15px 7px 30px
76
-
88
+
77
89
  // -- Right Side Boxes ----------------------------------------------------
78
90
  .right-column-content
79
91
  .box
@@ -88,71 +100,7 @@ body#comfy
88
100
  #form-save
89
101
  label
90
102
  padding-top: 0
91
-
92
- // -- File Uploads --------------------------------------------------------
93
- .right-column-content .file-uploader
94
- form
95
- margin-bottom: 5px
96
- .btn-file
97
- width: 100%
98
- position: relative
99
- overflow: hidden
100
- input
101
- position: absolute
102
- top: 0
103
- left: 0
104
- margin: 0
105
- font-size: 23px
106
- cursor: pointer
107
- opacity: 0
108
- .uploaded-files
109
- margin: 0 -5px
110
- max-height: 500px
111
- overflow: auto
112
- padding: 0 5px
113
- .file
114
- overflow: hidden
115
- padding-bottom: 2px
116
- &:hover .file-info
117
- display: block
118
- .file-name
119
- overflow: hidden
120
- border: 1px solid #ddd
121
- border-radius: 3px
122
- padding: 0 7px
123
- &:hover
124
- background-color: #f5f5f5
125
- a.filename
126
- display: block
127
- margin-right: 20px
128
- white-space: nowrap
129
- overflow: hidden
130
- font-size: 11px
131
- a.delete
132
- float: right
133
- .file-info
134
- display: none
135
- padding: 1px 0
136
- .thumb
137
- height: 60px
138
- width: 80px
139
- float: left
140
- background: url(image-path("comfortable_mexican_sofa/checkerboard.gif"))
141
- .details
142
- margin-left: 85px
143
- font-size: 11px
144
- line-height: 16px
145
- input
146
- padding: 2px
147
- margin: 0
148
- font-size: 11px
149
- width: 100%
150
- line-height: 12px
151
- &:hover
152
- cursor: default
153
- iframe#file-upload-frame
154
- display: none
155
-
103
+
156
104
  // -- Common Elements -----------------------------------------------------
157
105
  table.table, ul.list
158
106
  .icon
@@ -186,7 +134,7 @@ body#comfy
186
134
  .item-meta
187
135
  font-size: 11px
188
136
  line-height: 14px
189
-
137
+
190
138
  .cms-partial
191
139
  background-color: #252525
192
140
  color: #fff
@@ -197,7 +145,7 @@ body#comfy
197
145
  margin: 3px
198
146
  background-image: linear-gradient(-45deg, rgba(255, 255, 255, .05) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .05) 50%, rgba(255, 255, 255, .05) 75%, transparent 75%, transparent)
199
147
  background-size: 50px 50px
200
-
148
+
201
149
  // -- Sofa Version --------------------------------------------------------
202
150
  .center-column .body-footer
203
151
  position: absolute
@@ -215,7 +163,7 @@ body#comfy
215
163
  span.version
216
164
  color: #f1f1f1
217
165
  margin-left: 2px
218
-
166
+
219
167
  // -- Categories Widget ---------------------------------------------------
220
168
  .categories-widget
221
169
  background: #f5f5f5
@@ -259,7 +207,7 @@ body#comfy
259
207
  padding: 3px
260
208
  font-size: 11px
261
209
  line-height: 11px
262
-
210
+
263
211
  // -- Sortable List -------------------------------------------------------
264
212
  ul.list
265
213
  padding: 0
@@ -300,12 +248,12 @@ body#comfy
300
248
  list-style: none
301
249
  padding: 0
302
250
  margin: 0 0 0 28px
303
-
251
+
304
252
  // -- Sites ---------------------------------------------------------------
305
253
  &.c-comfy-admin-cms-sites
306
254
  table .icon
307
255
  background: url(image-path("comfortable_mexican_sofa/icon_site.gif"))
308
-
256
+
309
257
  // -- Layouts -------------------------------------------------------------
310
258
  &.c-comfy-admin-cms-layouts
311
259
  ul.list
@@ -314,14 +262,13 @@ body#comfy
314
262
  background: url(image-path("comfortable_mexican_sofa/icon_layout.gif"))
315
263
  .item-content
316
264
  margin-left: 35px
317
-
265
+
318
266
  // -- Pages ---------------------------------------------------------------
319
267
  &.c-comfy-admin-cms-pages
320
268
  #form-blocks
321
269
  ul.nav-tabs
322
- margin-left: 180px
270
+ margin-bottom: 10px
323
271
  .no-tags
324
- margin-left: 180px
325
272
  text-align: center
326
273
  padding: 10px
327
274
  background-color: #f5f5f5
@@ -335,17 +282,53 @@ body#comfy
335
282
  padding: 0 5px
336
283
  margin-bottom: 5px
337
284
  font-size: 12px
338
-
285
+
339
286
  // -- Snippets ------------------------------------------------------------
340
287
  &.c-comfy-admin-cms-snippets
341
288
  table .icon
342
289
  background: url(image-path("comfortable_mexican_sofa/icon_snippet.gif"))
343
-
290
+
344
291
  // -- Files ---------------------------------------------------------------
292
+ .cms-files-modal iframe
293
+ width: 100%
294
+ height: 100%
295
+ border: 0
296
+
345
297
  &.c-comfy-admin-cms-files
346
- table .icon
347
- background: url(image-path("comfortable_mexican_sofa/icon_file.gif"))
348
-
298
+ .file-image img
299
+ width: 100%
300
+ table
301
+ .icon
302
+ background: url(image-path("comfortable_mexican_sofa/icon_file.gif"))
303
+ .content-type
304
+ font-size: 9px
305
+ text-transform: uppercase
306
+ input.file-path
307
+ width: 400px
308
+ font-size: 10px
309
+
310
+ tr.temp td.main
311
+ vertical-align: middle
312
+ .progress
313
+ margin: 0
314
+ box-shadow: none
315
+ background-color: #424242
316
+ .progress-bar
317
+ text-align: left
318
+ padding-left: 8px
319
+ span
320
+ white-space: nowrap
321
+
322
+ .cms-uploader-drag-drop-target-active
323
+ position: fixed !important
324
+ z-index: 1000
325
+ top: 0
326
+ left: 0
327
+ width: 100%
328
+ height: 100%
329
+ border: dotted #ccc 1px
330
+ background-color: rgba(255, 255, 255, 0.7)
331
+
349
332
  // -- Revisions -----------------------------------------------------------
350
333
  &.c-comfy-admin-cms-revisions
351
334
  td.with-table