simple link dialog. good enough for now
Oleg
committed Dec 14, 2011
commit fa0d3b21ad32542737f6e4fd65f8843bba8db3e1
Showing 5
changed files with
48 additions
and 47 deletions
app/assets/javascripts/comfortable_mexican_sofa/application.js
+1
-1
| @@ | @@ -34,7 +34,7 @@ $.CMS = function(){ |
| // $.CMS.config.elRTE.toolbar = ['undoredo'] | |
| config: { | |
| 'elRTE': { | |
| - | toolbar: ['undoredo', 'sofa_format', 'sofa_style', 'sofa_alignment', 'lists', 'sofa_copypaste', 'sofa_links', 'sofa_image'] |
| + | toolbar: ['undoredo', 'sofa_format', 'sofa_style', 'sofa_alignment', 'lists', 'sofa_copypaste', 'sofa_image', 'sofa_links'] |
| } | |
| }, | |
app/assets/javascripts/comfortable_mexican_sofa/elrte/elrte.sofa_link.js
+1
-3
| @@ | @@ -14,9 +14,7 @@ |
| this.set = function(){ | |
| self.rte.history.add(); | |
| - | |
| - | var link = $(this.rte.dom.create('a')).attr('href', href); |
| - | |
| + | self.rte.doc.execCommand('createLink', false, self.link_url); |
| self.rte.ui.update(); | |
| self.dialog.dialog('close'); | |
| } | |
app/assets/stylesheets/comfortable_mexican_sofa/application.css
+1
-0
| @@ | @@ -8,5 +8,6 @@ |
| = require comfortable_mexican_sofa/codemirror.css | |
| = require comfortable_mexican_sofa/jquery_ui.css | |
| = require comfortable_mexican_sofa/widgets.css | |
| + | = require comfortable_mexican_sofa/dialogs.css |
| = require comfortable_mexican_sofa/elrte.css | |
| */ | |
| \ No newline at end of file | |
app/assets/stylesheets/comfortable_mexican_sofa/dialogs.css
+45
-0
| @@ | @@ -0,0 +1,45 @@ |
| + | #cms_body #cms_dialog form.image_url, |
| + | #cms_body #cms_dialog form.link_url { |
| + | position: absolute; |
| + | z-index: 9999; |
| + | width: 650px; |
| + | } |
| + | #cms_body #cms_dialog form.image_url label, |
| + | #cms_body #cms_dialog form.link_url label { |
| + | font: 13px/19px 'Lucida Grande', Tahoma, sans-serif; |
| + | padding: 0px 10px; |
| + | } |
| + | #cms_body #cms_dialog form.image_url input[type=text], |
| + | #cms_body #cms_dialog form.link_url input[type=text] { |
| + | width: 300px; |
| + | } |
| + | /* -- Files -------------------------------------------------------------- */ |
| + | #cms_body #cms_dialog .uploaded_files .file { |
| + | width: 185px; |
| + | float: left; |
| + | margin: 0px 5px 5px 0px; |
| + | } |
| + | #cms_body #cms_dialog .uploaded_files .file .file_name { |
| + | border-radius: 0px; |
| + | background-color: #ccc; |
| + | border-top: 0px; |
| + | } |
| + | #cms_body #cms_dialog .uploaded_files .file .file_name a.filename { |
| + | color: #252525; |
| + | width: 155px; |
| + | } |
| + | #cms_body #cms_dialog .uploaded_files .file .file_info { |
| + | background-color: #eee; |
| + | border-color: #ccc; |
| + | display: block; |
| + | } |
| + | #cms_body #cms_dialog .uploaded_files .file .file_info .details { |
| + | color: #444; |
| + | } |
| + | #cms_body #cms_dialog .uploaded_files .file .file_info input { |
| + | display: none; |
| + | } |
| + | #cms_body #cms_dialog .uploaded_files .file .file_info:hover { |
| + | background-color: #ccc; |
| + | cursor: pointer; |
| + | } |
| \ No newline at end of file | |
app/assets/stylesheets/comfortable_mexican_sofa/files.css
+0
-43
| @@ | @@ -79,47 +79,4 @@ |
| width: 100%; | |
| background-color: #e6e6e6; | |
| margin-bottom: 3px; | |
| - | } |
| - | |
| - | /* -- Dialog ------------------------------------------------------------- */ |
| - | #cms_body #cms_dialog .uploaded_files .file { |
| - | width: 185px; |
| - | float: left; |
| - | margin: 0px 5px 5px 0px; |
| - | } |
| - | #cms_body #cms_dialog .uploaded_files .file .file_name { |
| - | border-radius: 0px; |
| - | background-color: #ccc; |
| - | border-top: 0px; |
| - | } |
| - | #cms_body #cms_dialog .uploaded_files .file .file_name a.filename { |
| - | color: #252525; |
| - | width: 155px; |
| - | } |
| - | #cms_body #cms_dialog .uploaded_files .file .file_info { |
| - | background-color: #eee; |
| - | border-color: #ccc; |
| - | display: block; |
| - | } |
| - | #cms_body #cms_dialog .uploaded_files .file .file_info .details { |
| - | color: #444; |
| - | } |
| - | #cms_body #cms_dialog .uploaded_files .file .file_info input { |
| - | display: none; |
| - | } |
| - | #cms_body #cms_dialog .uploaded_files .file .file_info:hover { |
| - | background-color: #ccc; |
| - | cursor: pointer; |
| - | } |
| - | #cms_body #cms_dialog form.image_url { |
| - | position: absolute; |
| - | z-index: 9999; |
| - | width: 650px; |
| - | } |
| - | #cms_body #cms_dialog form.image_url label { |
| - | font: 13px/19px 'Lucida Grande', Tahoma, sans-serif; |
| - | padding: 0px 10px; |
| - | } |
| - | #cms_body #cms_dialog form.image_url input[type=text] { |
| - | width: 300px; |
| } | |
| \ No newline at end of file | |