caboose-cms 0.9.136 → 0.9.137

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7aab172d514a078354712d2e901138f20b37e30
4
- data.tar.gz: 59818bc8e34f7045526d6ab0ed20567082ab3984
3
+ metadata.gz: 3cbefac74a3129d8da10bd3c9e6a7b7b42744292
4
+ data.tar.gz: f899356389647067fbab2e3920c6ddf7f16476a4
5
5
  SHA512:
6
- metadata.gz: 6e18ed335191fda464d69ba666773bdb601bed75c770401fc2426f25cf04f4fe508fc2d604b1e3205be52f22d51e120223896abb1bc8c508669a44b7a3ac3f92
7
- data.tar.gz: f0e09160bc323b8b892dec0ab85ed57e1b98de5e93d3aac83a482935b95852bd6309af565af7b486d3e2656eda4c15147d67d88c09eb605171a2123a34f7db81
6
+ metadata.gz: 7ab3bb6a373b4a87a032c524f4b5bb0a20b02d46789c12ab37ef96f7073548874c723aedc6a9209ca0a9449ee3b1420c23890bc7c3d3f2e7c18ef49b96e87b8f
7
+ data.tar.gz: 77cd58c747d7ef0e03a711e733d5cbefeb493c2257206df440ae0f22161f646ac6ce8065c93540d459242c921e33d8e0afa4389c22cb972e5990b62b672e7c88
@@ -48,27 +48,48 @@ BlockContentController.prototype = {
48
48
  $.each(that.inline_classes, function(k1, c) {
49
49
  $.each($('.' + c), function(k2, b) {
50
50
  // var el = $(b).find('.value').first();
51
- if ( !$(b).hasClass('cke_editable') ) {
51
+ if ( !$(b).hasClass('cke_editable') && $(b).closest("#the_modal").length == 0 ) {
52
+
52
53
  $(b).attr('contenteditable','true');
53
54
  var target_id = $(b).data('rtid');
54
- // var block_id = $(b).attr('id').replace('block_','');
55
55
  var editor = CKEDITOR.inline( $(b).attr('id') );
56
56
 
57
+ var is_saved = true;
58
+
57
59
  editor.on('change', function(ev) {
58
60
  that.is_modified();
59
61
  $(b).css('background-color','#ffffd0').css('color','black');
62
+ is_saved = false;
60
63
  });
61
64
 
62
65
  editor.on('blur', function(ev) {
63
- var html = $(b).html();
64
- $.ajax({
65
- url: that.base_url() + '/' + target_id + '/value',
66
- type: 'put',
67
- data: { value: html },
68
- success: function(resp) {
69
- $(b).css('background-color','').css('color','');
70
- }
71
- });
66
+ if ( !is_saved ) {
67
+ var html = $(b).html();
68
+ $.ajax({
69
+ url: that.base_url() + '/' + target_id + '/value',
70
+ type: 'put',
71
+ data: { value: html },
72
+ success: function(resp) {
73
+ $(b).css('background-color','').css('color','');
74
+ is_saved = true;
75
+ }
76
+ });
77
+ }
78
+ });
79
+
80
+ $(b).on('mouseleave', function(ev) {
81
+ if ( !is_saved ) {
82
+ var html = $(b).html();
83
+ $.ajax({
84
+ url: that.base_url() + '/' + target_id + '/value',
85
+ type: 'put',
86
+ data: { value: html },
87
+ success: function(resp) {
88
+ $(b).css('background-color','').css('color','');
89
+ is_saved = true;
90
+ }
91
+ });
92
+ }
72
93
  });
73
94
 
74
95
  }
@@ -9,7 +9,7 @@ var RichtextModalController = BlockModalController.extend({
9
9
  assets_to_include: function()
10
10
  {
11
11
  return [
12
- '//cdn.tinymce.com/4/tinymce.min.js'
12
+ '//cdnjs.cloudflare.com/ajax/libs/tinymce/4.7.13/tinymce.min.js'
13
13
  //'//tinymce.cachefly.net/4.0/tinymce.min.js',
14
14
  //'caboose/tinymce_init.js'
15
15
  ]
@@ -48,7 +48,7 @@ var RichtextModalController = BlockModalController.extend({
48
48
  nice_name: 'Content',
49
49
  type: 'richtext',
50
50
  value: that.block.value,
51
- width: 800,
51
+ width: 798,
52
52
  height: 300,
53
53
  fixed_placeholder: false,
54
54
  after_update: function() {
@@ -74,7 +74,7 @@ var RichtextModalController = BlockModalController.extend({
74
74
  {
75
75
  tinymce.init({
76
76
  selector: 'textarea.tinymce',
77
- width: '800px',
77
+ width: '798px',
78
78
  height: '300px',
79
79
  convert_urls: false,
80
80
  plugins: 'advlist autolink lists link image charmap print preview hr anchor pagebreak searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking table contextmenu directionality emoticons template paste textcolor caboose',
@@ -80,6 +80,11 @@
80
80
  top: 0;
81
81
  }
82
82
  }
83
+ #the_modal {
84
+ #modal_controls {
85
+ margin-top: 10px;
86
+ }
87
+ }
83
88
 
84
89
  #cboxTopLeft, #cboxTopRight, #cboxBottomLeft, #cboxBottomRight, #cboxMiddleLeft, #cboxMiddleRight, #cboxTopCenter, #cboxBottomCenter, #cboxClose {
85
90
  background: #fff !important;
@@ -125,9 +130,9 @@
125
130
  .richtext-block {
126
131
  z-index: 6;
127
132
  }
128
- #colorbox, #cboxOverlay, #cboxWrapper {
129
- z-index: 10000000;
130
- }
133
+ // #colorbox, #cboxOverlay, #cboxWrapper {
134
+ // z-index: 10000000;
135
+ // }
131
136
 
132
137
  body > .ui-draggable-dragging {
133
138
  width: 95px;
@@ -290,7 +295,7 @@ body > .container, body > .mm-page > .container {
290
295
  &.published {
291
296
  background-color: #353535;
292
297
  #m-unpub { display: none; }
293
- a[href*="revert"], a[href*="publish"] {
298
+ a[href*="revert"], a[href*="publish"], a[href*="preview"] {
294
299
  display: none;
295
300
  }
296
301
  }
@@ -2,7 +2,7 @@ module Caboose
2
2
  module ApplicationHelper
3
3
  def caboose_tinymce
4
4
  return "
5
- <script src='https://cdn.tinymce.com/4/tinymce.min.js'></script>
5
+ <script src='https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.7.13/tinymce.min.js'></script>
6
6
  <script type='text/javascript'>
7
7
  //<![CDATA[
8
8
  tinyMCE.init({
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.136'
2
+ VERSION = '0.9.137'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.136
4
+ version: 0.9.137
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-22 00:00:00.000000000 Z
11
+ date: 2018-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg