trusty-cms 1.1.26 → 1.1.27

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDIzZGRiNDdmM2Q2ODUwNTdkMWVlMDllNmJiNjFkYzIwMjYzN2JhYg==
4
+ ZmNhM2FkMGQ1YjM4MjI4OGI4NjI3NmRhYWM0YWU1ZWY5NGY1OTgxMg==
5
5
  data.tar.gz: !binary |-
6
- NmM1MjI0Y2JhMzcxZWFkZDI3MjcyMDg4MWU1NzUxNmM1OGI0NjQ5MQ==
6
+ OGRhYTM0ZGIyNDYxZGRiOTE0YjI1MzY1ZjVmMWZlMGY3Nzg3ODIwMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzNmZDFjZDZlYzkxNjI1MDViNTFkMGZjNzZjNzJjMjM0M2Y2MWI3MDQzMmZj
10
- M2JhYzNjMGFlNzZhODVhNWE4MzhhMWFiYjRhZWUyOTY3ZDc0NjUwNjM1NzA5
11
- NmE5NTZmOTY4MGEzMWIwZTA1ODc3ZGYwYmIyY2Q3MmIyMDIwZGU=
9
+ NDAxOWM3MDZjZmExYWM1MDU1ODEyNjEyODk1MTYwYmQzOGZmNTE4NjEzZjNm
10
+ ZjI1YzljZGIzYzA0ZGZkMGE5MDEyYTIyMjhiOWM0MzNiMjY4ODI0MzVkY2I3
11
+ OWIwMDU1MDZjOGZjZTk4ODU2YmU3NjQwZTRiZjgxYmFmMjJmYTc=
12
12
  data.tar.gz: !binary |-
13
- NDk3MjRkMmIzYTg4NzVmODAxNGVlNTg3YTVlYzA0MDc3OTc4NjVkZTBkZjIx
14
- NmE1MDM1YzY0NWVkZDM0YTdjYWE0YTUxZGEwZjk0NzFiMjlhOTgwYjYzYmE5
15
- MzkzODFlMjY0MzUzNmU2MzkxN2M1ZWYyMWI3NGY0YmZiODhlYmM=
13
+ MGVlMDZlM2QxYjlmMWIxZmI4ZmMyNmRhZDIyNjc5M2QwMzY1Yzc4MGVmYmZh
14
+ NDc5ZWI1OGU5YjA0YjRkMDEwZDZlOTlmMmFhMjQ0YWY2MDNjNTQyZjQwMWY1
15
+ NTM3MzJjOWYzMjRjNGIwNTBmYmQ5MmQ2ODgwNzliZDFmNWVmMmY=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trusty-cms (1.1.25)
4
+ trusty-cms (1.1.26)
5
5
  RedCloth (~> 4.2)
6
6
  acts_as_tree (~> 0.1.1)
7
7
  bundler (~> 1.7)
@@ -13,6 +13,7 @@
13
13
  //= require jquery
14
14
  //= require jquery_ujs
15
15
  //= require 'admin/jquery-ui'
16
+ //= require 'admin/jquery.cookie'
16
17
  //= require 'admin/jquery.validate.min'
17
18
  //= require 'admin/jquery.treetable'
18
19
  //= require_tree './admin/validations'
@@ -0,0 +1,117 @@
1
+ /*!
2
+ * jQuery Cookie Plugin v1.4.1
3
+ * https://github.com/carhartl/jquery-cookie
4
+ *
5
+ * Copyright 2006, 2014 Klaus Hartl
6
+ * Released under the MIT license
7
+ */
8
+ (function (factory) {
9
+ if (typeof define === 'function' && define.amd) {
10
+ // AMD
11
+ define(['jquery'], factory);
12
+ } else if (typeof exports === 'object') {
13
+ // CommonJS
14
+ factory(require('jquery'));
15
+ } else {
16
+ // Browser globals
17
+ factory(jQuery);
18
+ }
19
+ }(function ($) {
20
+
21
+ var pluses = /\+/g;
22
+
23
+ function encode(s) {
24
+ return config.raw ? s : encodeURIComponent(s);
25
+ }
26
+
27
+ function decode(s) {
28
+ return config.raw ? s : decodeURIComponent(s);
29
+ }
30
+
31
+ function stringifyCookieValue(value) {
32
+ return encode(config.json ? JSON.stringify(value) : String(value));
33
+ }
34
+
35
+ function parseCookieValue(s) {
36
+ if (s.indexOf('"') === 0) {
37
+ // This is a quoted cookie as according to RFC2068, unescape...
38
+ s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
39
+ }
40
+
41
+ try {
42
+ // Replace server-side written pluses with spaces.
43
+ // If we can't decode the cookie, ignore it, it's unusable.
44
+ // If we can't parse the cookie, ignore it, it's unusable.
45
+ s = decodeURIComponent(s.replace(pluses, ' '));
46
+ return config.json ? JSON.parse(s) : s;
47
+ } catch(e) {}
48
+ }
49
+
50
+ function read(s, converter) {
51
+ var value = config.raw ? s : parseCookieValue(s);
52
+ return $.isFunction(converter) ? converter(value) : value;
53
+ }
54
+
55
+ var config = $.cookie = function (key, value, options) {
56
+
57
+ // Write
58
+
59
+ if (arguments.length > 1 && !$.isFunction(value)) {
60
+ options = $.extend({}, config.defaults, options);
61
+
62
+ if (typeof options.expires === 'number') {
63
+ var days = options.expires, t = options.expires = new Date();
64
+ t.setTime(+t + days * 864e+5);
65
+ }
66
+
67
+ return (document.cookie = [
68
+ encode(key), '=', stringifyCookieValue(value),
69
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
70
+ options.path ? '; path=' + options.path : '',
71
+ options.domain ? '; domain=' + options.domain : '',
72
+ options.secure ? '; secure' : ''
73
+ ].join(''));
74
+ }
75
+
76
+ // Read
77
+
78
+ var result = key ? undefined : {};
79
+
80
+ // To prevent the for loop in the first place assign an empty array
81
+ // in case there are no cookies at all. Also prevents odd result when
82
+ // calling $.cookie().
83
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
84
+
85
+ for (var i = 0, l = cookies.length; i < l; i++) {
86
+ var parts = cookies[i].split('=');
87
+ var name = decode(parts.shift());
88
+ var cookie = parts.join('=');
89
+
90
+ if (key && key === name) {
91
+ // If second argument (value) is a function it's a converter...
92
+ result = read(cookie, value);
93
+ break;
94
+ }
95
+
96
+ // Prevent storing a cookie that we couldn't decode.
97
+ if (!key && (cookie = read(cookie)) !== undefined) {
98
+ result[name] = cookie;
99
+ }
100
+ }
101
+
102
+ return result;
103
+ };
104
+
105
+ config.defaults = {};
106
+
107
+ $.removeCookie = function (key, options) {
108
+ if ($.cookie(key) === undefined) {
109
+ return false;
110
+ }
111
+
112
+ // Must not alter options, thus extending a fresh object...
113
+ $.cookie(key, '', $.extend({}, options, { expires: -1 }));
114
+ return !$.cookie(key);
115
+ };
116
+
117
+ }));
@@ -3,8 +3,19 @@ CKEDITOR.editorConfig = function( config ) {
3
3
  config.removeFormatTags = "";
4
4
  config.protectedSource.push(/<r:([\S]+).*<\/r:\1>/g);
5
5
  config.protectedSource.push(/<r:[^>\/]*\/>/g);
6
+
6
7
  config.forcePasteAsPlainText = true;
7
8
  // if you want to remove clipboard, you have to remove all of these:
8
9
  // clipboard, pastetext, pastefromword
9
10
  config.removePlugins = "save, newpage, preview, print, templates, forms, flash, smiley, language, pagebreak, iframe, bidi";
11
+
12
+ var startupMode = $.cookie('ckeditor.startupMode');
13
+ if (startupMode == 'source' || startupMode == 'wysiwyg' ) {
14
+ config.startupMode = startupMode;
15
+ }
16
+
17
+ this.on('mode', function(){
18
+ $.cookie('ckeditor.startupMode', this.mode);
19
+ })
20
+
10
21
  };
data/lib/trusty_cms.rb CHANGED
@@ -5,7 +5,7 @@ unless defined? TrustyCms::Version
5
5
  module Version
6
6
  Major = '1'
7
7
  Minor = '1'
8
- Tiny = '26'
8
+ Tiny = '27'
9
9
  Patch = nil # set to nil for normal release
10
10
 
11
11
  class << self
@@ -8,7 +8,7 @@ module TrustyCms
8
8
  end
9
9
 
10
10
  def migrate_extensions
11
- TrustyCms::Application.config.enabled_extensions.each do |ext|
11
+ TrustyCms::Application.config.extensions.each do |ext|
12
12
  to_migrate = Extension.descendants.detect{|descendant| descendant.name == "#{ext.to_s.camelize}Extension" }
13
13
  to_migrate.migrator.migrate
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.26
4
+ version: 1.1.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - TrustyCms CMS dev team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-19 00:00:00.000000000 Z
11
+ date: 2015-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tzinfo
@@ -411,6 +411,7 @@ files:
411
411
  - app/assets/javascripts/admin/datecheck.js
412
412
  - app/assets/javascripts/admin/dropdown.js
413
413
  - app/assets/javascripts/admin/jquery-ui.js
414
+ - app/assets/javascripts/admin/jquery.cookie.js
414
415
  - app/assets/javascripts/admin/jquery.treetable.js
415
416
  - app/assets/javascripts/admin/jquery.validate.min.js
416
417
  - app/assets/javascripts/admin/modernizr.js