x-editable-rails 1.5.1 → 1.5.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -13
- data/lib/x-editable-rails/version.rb +2 -2
- data/lib/x-editable-rails/view_helpers.rb +66 -41
- data/vendor/assets/javascripts/editable/bootstrap-editable.js +336 -203
- data/vendor/assets/javascripts/editable/bootstrap2-editable.js +308 -202
- data/vendor/assets/javascripts/editable/inputs-ext/wysihtml5-editable.js +9 -1
- data/vendor/assets/javascripts/editable/jquery-editable-poshytip.js +315 -202
- data/vendor/assets/javascripts/editable/jqueryui-editable.js +316 -203
- data/vendor/assets/javascripts/editable/rails/editable_form.js.coffee +14 -18
- data/vendor/assets/javascripts/editable/rails/error_handling.js.coffee +4 -0
- data/vendor/assets/javascripts/editable/rails.js.coffee +2 -1
- data/vendor/assets/stylesheets/editable/bootstrap-editable.scss +25 -25
- data/vendor/assets/stylesheets/editable/bootstrap2-editable.scss +25 -25
- metadata +19 -32
- /data/vendor/assets/stylesheets/editable/inputs-ext/{bootstrap-typehead.css → bootstrap-typeahead.css} +0 -0
@@ -72,9 +72,12 @@ $(function(){
|
|
72
72
|
|
73
73
|
return deferred.promise();
|
74
74
|
},
|
75
|
+
|
76
|
+
valueIsEncoded: true,
|
75
77
|
|
76
78
|
value2html: function(value, element) {
|
77
79
|
$(element).html(value);
|
80
|
+
this.valueIsEncoded = false;
|
78
81
|
},
|
79
82
|
|
80
83
|
html2value: function(html) {
|
@@ -82,8 +85,13 @@ $(function(){
|
|
82
85
|
},
|
83
86
|
|
84
87
|
value2input: function(value) {
|
88
|
+
value = (this.valueIsEncoded ? this.base65decode(value) : value);
|
85
89
|
this.$input.data("wysihtml5").editor.setValue(value, true);
|
86
|
-
},
|
90
|
+
},
|
91
|
+
|
92
|
+
base65decode: function(value) {
|
93
|
+
return decodeURIComponent( escape( atob( value.replace(/\s/g, ''))));
|
94
|
+
},
|
87
95
|
|
88
96
|
activate: function() {
|
89
97
|
this.$input.data("wysihtml5").editor.focus();
|