summernote-rails 0.8.1.1 → 0.8.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/lib/summernote-rails/engine.rb +7 -1
  3. data/lib/summernote-rails/version.rb +1 -1
  4. data/vendor/assets/fonts/summernote.eot +0 -0
  5. data/vendor/assets/fonts/summernote.ttf +0 -0
  6. data/vendor/assets/fonts/summernote.woff +0 -0
  7. data/vendor/assets/javascripts/summernote/locales/ar-AR.js +1 -1
  8. data/vendor/assets/javascripts/summernote/locales/bg-BG.js +1 -1
  9. data/vendor/assets/javascripts/summernote/locales/ca-ES.js +3 -3
  10. data/vendor/assets/javascripts/summernote/locales/cs-CZ.js +1 -1
  11. data/vendor/assets/javascripts/summernote/locales/da-DK.js +1 -1
  12. data/vendor/assets/javascripts/summernote/locales/de-DE.js +2 -2
  13. data/vendor/assets/javascripts/summernote/locales/es-ES.js +3 -3
  14. data/vendor/assets/javascripts/summernote/locales/es-EU.js +2 -2
  15. data/vendor/assets/javascripts/summernote/locales/fa-IR.js +2 -2
  16. data/vendor/assets/javascripts/summernote/locales/fi-FI.js +1 -1
  17. data/vendor/assets/javascripts/summernote/locales/fr-FR.js +1 -1
  18. data/vendor/assets/javascripts/summernote/locales/gl-ES.js +147 -0
  19. data/vendor/assets/javascripts/summernote/locales/he-IL.js +1 -1
  20. data/vendor/assets/javascripts/summernote/locales/hr-HR.js +104 -0
  21. data/vendor/assets/javascripts/summernote/locales/hu-HU.js +2 -2
  22. data/vendor/assets/javascripts/summernote/locales/id-ID.js +2 -2
  23. data/vendor/assets/javascripts/summernote/locales/it-IT.js +1 -1
  24. data/vendor/assets/javascripts/summernote/locales/ja-JP.js +30 -1
  25. data/vendor/assets/javascripts/summernote/locales/ko-KR.js +1 -1
  26. data/vendor/assets/javascripts/summernote/locales/lt-LT.js +1 -1
  27. data/vendor/assets/javascripts/summernote/locales/lt-LV.js +135 -0
  28. data/vendor/assets/javascripts/summernote/locales/nb-NO.js +1 -1
  29. data/vendor/assets/javascripts/summernote/locales/nl-NL.js +1 -1
  30. data/vendor/assets/javascripts/summernote/locales/pl-PL.js +2 -2
  31. data/vendor/assets/javascripts/summernote/locales/pt-BR.js +37 -8
  32. data/vendor/assets/javascripts/summernote/locales/pt-PT.js +8 -1
  33. data/vendor/assets/javascripts/summernote/locales/ro-RO.js +2 -2
  34. data/vendor/assets/javascripts/summernote/locales/ru-RU.js +1 -1
  35. data/vendor/assets/javascripts/summernote/locales/sk-SK.js +1 -1
  36. data/vendor/assets/javascripts/summernote/locales/sl-SI.js +1 -1
  37. data/vendor/assets/javascripts/summernote/locales/sr-RS-Latin.js +1 -1
  38. data/vendor/assets/javascripts/summernote/locales/sr-RS.js +1 -1
  39. data/vendor/assets/javascripts/summernote/locales/sv-SE.js +1 -1
  40. data/vendor/assets/javascripts/summernote/locales/th-TH.js +1 -1
  41. data/vendor/assets/javascripts/summernote/locales/tr-TR.js +40 -4
  42. data/vendor/assets/javascripts/summernote/locales/uk-UA.js +1 -1
  43. data/vendor/assets/javascripts/summernote/locales/vi-VN.js +51 -51
  44. data/vendor/assets/javascripts/summernote/locales/zh-CN.js +1 -1
  45. data/vendor/assets/javascripts/summernote/locales/zh-TW.js +1 -1
  46. data/vendor/assets/javascripts/summernote/plugin/databasic/summernote-ext-databasic.css +16 -0
  47. data/vendor/assets/javascripts/summernote/plugin/databasic/summernote-ext-databasic.js +303 -0
  48. data/vendor/assets/javascripts/summernote/plugin/specialchars/summernote-ext-specialchars.js +3 -4
  49. data/vendor/assets/javascripts/summernote/summernote.js +175 -70
  50. data/vendor/assets/stylesheets/summernote.css +1 -1
  51. metadata +7 -2
@@ -51,7 +51,7 @@
51
51
  },
52
52
  style: {
53
53
  style: 'รูปแบบ',
54
- normal: 'ปกติ',
54
+ p: 'ปกติ',
55
55
  blockquote: 'ข้อความ',
56
56
  pre: 'โค้ด',
57
57
  h1: 'หัวข้อ 1',
@@ -27,7 +27,10 @@
27
27
  shapeThumbnail: 'Şekil: K.Resim',
28
28
  shapeNone: 'Şekil: Yok',
29
29
  dragImageHere: 'Buraya sürükleyin',
30
+ dropImage: 'Resim veya metni bırakın',
30
31
  selectFromFiles: 'Dosya seçin',
32
+ maximumFileSize: 'Maksimum dosya boyutu',
33
+ maximumFileSizeError: 'Maksimum dosya boyutu aşıldı.',
31
34
  url: 'Resim bağlantısı',
32
35
  remove: 'Resimi Kaldır'
33
36
  },
@@ -55,7 +58,7 @@
55
58
  },
56
59
  style: {
57
60
  style: 'Biçim',
58
- normal: 'Normal',
61
+ p: 'p',
59
62
  blockquote: 'Alıntı',
60
63
  pre: 'Önbiçimli',
61
64
  h1: 'Başlık 1',
@@ -99,13 +102,46 @@
99
102
  textFormatting: 'Yazı biçimlendirme',
100
103
  action: 'Eylem',
101
104
  paragraphFormatting: 'Paragraf biçimlendirme',
102
- documentStyle: 'Biçim'
105
+ documentStyle: 'Biçim',
106
+ extraKeys: 'İlave anahtarlar'
107
+ },
108
+ help: {
109
+ 'insertParagraph': 'Paragraf ekler',
110
+ 'undo': 'Son komudu geri alır',
111
+ 'redo': 'Son komudu yineler',
112
+ 'tab': 'Girintiyi artırır',
113
+ 'untab': 'Girintiyi azaltır',
114
+ 'bold': 'Kalın yazma stilini ayarlar',
115
+ 'italic': 'İtalik yazma stilini ayarlar',
116
+ 'underline': 'Altı çizgili yazma stilini ayarlar',
117
+ 'strikethrough': 'Üstü çizgili yazma stilini ayarlar',
118
+ 'removeFormat': 'Biçimlendirmeyi temizler',
119
+ 'justifyLeft': 'Yazıyı sola hizalar',
120
+ 'justifyCenter': 'Yazıyı ortalar',
121
+ 'justifyRight': 'Yazıyı sağa hizalar',
122
+ 'justifyFull': 'Yazıyı her iki tarafa yazlar',
123
+ 'insertUnorderedList': 'Madde işaretli liste ekler',
124
+ 'insertOrderedList': 'Numaralı liste ekler',
125
+ 'outdent': 'Aktif paragrafın girintisini azaltır',
126
+ 'indent': 'Aktif paragrafın girintisini artırır',
127
+ 'formatPara': 'Aktif bloğun biçimini paragraf (p) olarak değiştirir',
128
+ 'formatH1': 'Aktif bloğun biçimini başlık 1 (h1) olarak değiştirir',
129
+ 'formatH2': 'Aktif bloğun biçimini başlık 2 (h2) olarak değiştirir',
130
+ 'formatH3': 'Aktif bloğun biçimini başlık 3 (h3) olarak değiştirir',
131
+ 'formatH4': 'Aktif bloğun biçimini başlık 4 (h4) olarak değiştirir',
132
+ 'formatH5': 'Aktif bloğun biçimini başlık 5 (h5) olarak değiştirir',
133
+ 'formatH6': 'Aktif bloğun biçimini başlık 6 (h6) olarak değiştirir',
134
+ 'insertHorizontalRule': 'Yatay çizgi ekler',
135
+ 'linkDialog.show': 'Bağlantı ayar kutusunu gösterir'
103
136
  },
104
137
  history: {
105
138
  undo: 'Geri al',
106
- redo: 'Yeniden yap'
139
+ redo: 'Yinele'
140
+ },
141
+ specialChar: {
142
+ specialChar: 'ÖZEL KARAKTERLER',
143
+ select: 'Özel Karakterleri seçin'
107
144
  }
108
-
109
145
  }
110
146
  });
111
147
  })(jQuery);
@@ -56,7 +56,7 @@
56
56
  },
57
57
  style: {
58
58
  style: 'Стиль',
59
- normal: 'Нормальний',
59
+ p: 'Нормальний',
60
60
  blockquote: 'Цитата',
61
61
  pre: 'Код',
62
62
  h1: 'Заголовок 1',
@@ -3,54 +3,54 @@
3
3
  'vi-VN': {
4
4
  font: {
5
5
  bold: 'In Đậm',
6
- italic: 'In Nghiên',
7
- underline: 'Gạch Dưới',
8
- clear: 'Bỏ Định Dạng',
9
- height: 'Khoảng Cách Hàng',
10
- name: 'Phông Chữ',
11
- strikethrough: 'Gạch Ngang',
12
- size: 'Cỡ Chữ'
6
+ italic: 'In Nghiêng',
7
+ underline: 'Gạch dưới',
8
+ clear: 'Bỏ định dạng',
9
+ height: 'Chiều cao dòng',
10
+ name: 'Phông chữ',
11
+ strikethrough: 'Gạch ngang',
12
+ size: 'Cỡ chữ'
13
13
  },
14
14
  image: {
15
- image: 'Hình Ảnh',
15
+ image: 'Hình ảnh',
16
16
  insert: 'Chèn',
17
17
  resizeFull: '100%',
18
18
  resizeHalf: '50%',
19
19
  resizeQuarter: '25%',
20
- floatLeft: 'Canh Trái',
21
- floatRight: 'Canh Phải',
22
- floatNone: 'Canh Đều',
23
- dragImageHere: 'Thả Ảnh Đây',
24
- selectFromFiles: 'Chọn Từ Files',
20
+ floatLeft: 'Trôi về trái',
21
+ floatRight: 'Trôi về phải',
22
+ floatNone: 'Không trôi',
23
+ dragImageHere: 'Thả Ảnh vùng này',
24
+ selectFromFiles: 'Chọn từ File',
25
25
  url: 'URL',
26
- remove: 'Ghỡ Bỏ'
26
+ remove: 'Xóa'
27
27
  },
28
28
  video: {
29
29
  video: 'Video',
30
- videoLink: 'Đường Dẫn đến Video',
30
+ videoLink: 'Link đến Video',
31
31
  insert: 'Chèn Video',
32
32
  url: 'URL',
33
33
  providers: '(YouTube, Vimeo, Vine, Instagram, DailyMotion và Youku)'
34
34
  },
35
35
  link: {
36
- link: 'Đường Dẫn',
37
- insert: 'Chèn Đường Dẫn',
38
- unlink: 'Ghỡ Đường Dẫn',
36
+ link: 'Link',
37
+ insert: 'Chèn Link',
38
+ unlink: 'Gỡ Link',
39
39
  edit: 'Sửa',
40
- textToDisplay: 'Text Hiển Thị',
40
+ textToDisplay: 'Văn bản hiển thị',
41
41
  url: 'URL',
42
- openInNewWindow: 'Mở ở Cửa Sổ Mới'
42
+ openInNewWindow: 'Mở ở Cửa sổ mới'
43
43
  },
44
44
  table: {
45
45
  table: 'Bảng'
46
46
  },
47
47
  hr: {
48
- insert: 'Chèn Vào'
48
+ insert: 'Chèn'
49
49
  },
50
50
  style: {
51
- style: 'Kiểu Chữ',
52
- normal: 'Chữ Thường',
53
- blockquote: 'Đoạn Trích',
51
+ style: 'Kiểu chữ',
52
+ p: 'Chữ thường',
53
+ blockquote: 'Đoạn trích',
54
54
  pre: 'Mã Code',
55
55
  h1: 'H1',
56
56
  h2: 'H2',
@@ -60,44 +60,44 @@
60
60
  h6: 'H6'
61
61
  },
62
62
  lists: {
63
- unordered: 'Liệt Danh Sách',
64
- ordered: 'Liệt Theo Số'
63
+ unordered: 'Liệt danh sách',
64
+ ordered: 'Liệt theo thứ tự'
65
65
  },
66
66
  options: {
67
- help: 'Trợ Giúp',
68
- fullscreen: 'Đầy Màn Hình',
69
- codeview: 'Xem Dạng Code'
67
+ help: 'Trợ giúp',
68
+ fullscreen: 'Toàn Màn hình',
69
+ codeview: 'Xem Code'
70
70
  },
71
71
  paragraph: {
72
- paragraph: 'Canh Lề',
73
- outdent: 'Dịch Sang Trái',
74
- indent: 'Dịch Sang Phải',
75
- left: 'Canh Trái',
76
- center: 'Canh Giữa',
77
- right: 'Canh Phải',
78
- justify: 'Canh Đều'
72
+ paragraph: 'Canh lề',
73
+ outdent: 'Dịch sang trái',
74
+ indent: 'Dịch sang phải',
75
+ left: 'Canh trái',
76
+ center: 'Canh giữa',
77
+ right: 'Canh phải',
78
+ justify: 'Canh đều'
79
79
  },
80
80
  color: {
81
- recent: 'Màu Chữ',
82
- more: 'Mở Rộng',
83
- background: 'Màu Nền',
84
- foreground: 'Màu Chữ',
85
- transparent: 'Trong Suốt',
86
- setTransparent: 'Nền Trong Suốt',
87
- reset: 'Thiệt Lập Lại',
88
- resetToDefault: 'Trở Lại Ban Đầu'
81
+ recent: 'Màu chữ',
82
+ more: 'Mở rộng',
83
+ background: 'Màu nền',
84
+ foreground: 'Màu chữ',
85
+ transparent: 'trong suốt',
86
+ setTransparent: 'Nền trong suốt',
87
+ reset: 'Thiết lập lại',
88
+ resetToDefault: 'Trở lại ban đầu'
89
89
  },
90
90
  shortcut: {
91
- shortcuts: 'Phím Tắt',
91
+ shortcuts: 'Phím tắt',
92
92
  close: 'Đóng',
93
- textFormatting: 'Định Dạng Văn Bản',
94
- action: 'Hành Động',
95
- paragraphFormatting: 'Định Dạng',
96
- documentStyle: 'Kiểu Văn Bản'
93
+ textFormatting: 'Định dạng Văn bản',
94
+ action: 'Hành động',
95
+ paragraphFormatting: 'Định dạng',
96
+ documentStyle: 'Kiểu văn bản'
97
97
  },
98
98
  history: {
99
- undo: 'Lùi Lại',
100
- redo: 'Làm Lại'
99
+ undo: 'Lùi lại',
100
+ redo: 'Làm lại'
101
101
  }
102
102
  }
103
103
  });
@@ -57,7 +57,7 @@
57
57
  },
58
58
  style: {
59
59
  style: '样式',
60
- normal: '普通',
60
+ p: '普通',
61
61
  blockquote: '引用',
62
62
  pre: '代码',
63
63
  h1: '标题 1',
@@ -57,7 +57,7 @@
57
57
  },
58
58
  style: {
59
59
  style: '樣式',
60
- normal: '一般',
60
+ p: '一般',
61
61
  blockquote: '引用區塊',
62
62
  pre: '程式碼區塊',
63
63
  h1: '標題 1',
@@ -0,0 +1,16 @@
1
+ .ext-databasic {
2
+ position: relative;
3
+ display: block;
4
+ min-height: 50px;
5
+ background-color: cyan;
6
+ text-align: center;
7
+ padding: 20px;
8
+ border: 1px solid white;
9
+ border-radius: 10px;
10
+ }
11
+
12
+ .ext-databasic p {
13
+ color: white;
14
+ font-size: 1.2em;
15
+ margin: 0;
16
+ }
@@ -0,0 +1,303 @@
1
+ (function (factory) {
2
+ /* global define */
3
+ if (typeof define === 'function' && define.amd) {
4
+ // AMD. Register as an anonymous module.
5
+ define(['jquery'], factory);
6
+ } else if (typeof module === 'object' && module.exports) {
7
+ // Node/CommonJS
8
+ module.exports = factory(require('jquery'));
9
+ } else {
10
+ // Browser globals
11
+ factory(window.jQuery);
12
+ }
13
+ }(function ($) {
14
+
15
+ // pull in some summernote core functions
16
+ var ui = $.summernote.ui;
17
+ var dom = $.summernote.dom;
18
+
19
+ // define the popover plugin
20
+ var DataBasicPlugin = function (context) {
21
+ var self = this;
22
+ var options = context.options;
23
+ var lang = options.langInfo;
24
+
25
+ self.icon = '<i class="fa fa-object-group"/>';
26
+
27
+ // add context menu button for dialog
28
+ context.memo('button.databasic', function () {
29
+ return ui.button({
30
+ contents: self.icon,
31
+ tooltip: lang.databasic.insert,
32
+ click: context.createInvokeHandler('databasic.showDialog')
33
+ }).render();
34
+ });
35
+
36
+ // add popover edit button
37
+ context.memo('button.databasicDialog', function () {
38
+ return ui.button({
39
+ contents: self.icon,
40
+ tooltip: lang.databasic.edit,
41
+ click: context.createInvokeHandler('databasic.showDialog')
42
+ }).render();
43
+ });
44
+
45
+ // add popover size buttons
46
+ context.memo('button.databasicSize100', function () {
47
+ return ui.button({
48
+ contents: '<span class="note-fontsize-10">100%</span>',
49
+ tooltip: lang.image.resizeFull,
50
+ click: context.createInvokeHandler('editor.resize', '1')
51
+ }).render();
52
+ });
53
+ context.memo('button.databasicSize50', function () {
54
+ return ui.button({
55
+ contents: '<span class="note-fontsize-10">50%</span>',
56
+ tooltip: lang.image.resizeHalf,
57
+ click: context.createInvokeHandler('editor.resize', '0.5')
58
+ }).render();
59
+ });
60
+ context.memo('button.databasicSize25', function () {
61
+ return ui.button({
62
+ contents: '<span class="note-fontsize-10">25%</span>',
63
+ tooltip: lang.image.resizeQuarter,
64
+ click: context.createInvokeHandler('editor.resize', '0.25')
65
+ }).render();
66
+ });
67
+
68
+ self.events = {
69
+ 'summernote.init': function (we, e) {
70
+ // update existing containers
71
+ $('data.ext-databasic', e.editable).each(function () { self.setContent($(this)); });
72
+ // TODO: make this an undo snapshot...
73
+ },
74
+ 'summernote.keyup summernote.mouseup summernote.change summernote.scroll': function () {
75
+ self.update();
76
+ },
77
+ 'summernote.dialog.shown': function () {
78
+ self.hidePopover();
79
+ }
80
+ };
81
+
82
+ self.initialize = function () {
83
+ // create dialog markup
84
+ var $container = options.dialogsInBody ? $(document.body) : context.layoutInfo.editor;
85
+
86
+ var body = '<div class="form-group row-fluid">' +
87
+ '<label>' + lang.databasic.testLabel + '</label>' +
88
+ '<input class="ext-databasic-test form-control" type="text" />' +
89
+ '</div>';
90
+ var footer = '<button href="#" class="btn btn-primary ext-databasic-save">' + lang.databasic.insert + '</button>';
91
+
92
+ self.$dialog = ui.dialog({
93
+ title: lang.databasic.name,
94
+ fade: options.dialogsFade,
95
+ body: body,
96
+ footer: footer
97
+ }).render().appendTo($container);
98
+
99
+ // create popover
100
+ self.$popover = ui.popover({
101
+ className: 'ext-databasic-popover'
102
+ }).render().appendTo('body');
103
+ var $content = self.$popover.find('.popover-content');
104
+
105
+ context.invoke('buttons.build', $content, options.popover.databasic);
106
+ };
107
+
108
+ self.destroy = function () {
109
+ self.$popover.remove();
110
+ self.$popover = null;
111
+ self.$dialog.remove();
112
+ self.$dialog = null;
113
+ };
114
+
115
+ self.update = function () {
116
+ // Prevent focusing on editable when invoke('code') is executed
117
+ if (!context.invoke('editor.hasFocus')) {
118
+ self.hidePopover();
119
+ return;
120
+ }
121
+
122
+ var rng = context.invoke('editor.createRange');
123
+ var visible = false;
124
+
125
+ if (rng.isOnData())
126
+ {
127
+ var $data = $(rng.sc).closest('data.ext-databasic');
128
+
129
+ if ($data.length)
130
+ {
131
+ var pos = dom.posFromPlaceholder($data[0]);
132
+
133
+ self.$popover.css({
134
+ display: 'block',
135
+ left: pos.left,
136
+ top: pos.top
137
+ });
138
+
139
+ // save editor target to let size buttons resize the container
140
+ context.invoke('editor.saveTarget', $data[0]);
141
+
142
+ visible = true;
143
+ }
144
+
145
+ }
146
+
147
+ // hide if not visible
148
+ if (!visible) {
149
+ self.hidePopover();
150
+ }
151
+
152
+ };
153
+
154
+ self.hidePopover = function () {
155
+ self.$popover.hide();
156
+ };
157
+
158
+ // define plugin dialog
159
+ self.getInfo = function () {
160
+ var rng = context.invoke('editor.createRange');
161
+
162
+ if (rng.isOnData())
163
+ {
164
+ var $data = $(rng.sc).closest('data.ext-databasic');
165
+
166
+ if ($data.length)
167
+ {
168
+ // Get the first node on range(for edit).
169
+ return {
170
+ node: $data,
171
+ test: $data.attr('data-test')
172
+ };
173
+ }
174
+ }
175
+
176
+ return {};
177
+ };
178
+
179
+ self.setContent = function ($node) {
180
+ $node.html('<p contenteditable="false">' + self.icon + ' ' + lang.databasic.name + ': ' +
181
+ $node.attr('data-test') + '</p>');
182
+ };
183
+
184
+ self.updateNode = function (info) {
185
+ self.setContent(info.node
186
+ .attr('data-test', info.test));
187
+ };
188
+
189
+ self.createNode = function (info) {
190
+ var $node = $('<data class="ext-databasic"></data>');
191
+
192
+ if ($node) {
193
+ // save node to info structure
194
+ info.node = $node;
195
+ // insert node into editor dom
196
+ context.invoke('editor.insertNode', $node[0]);
197
+ }
198
+
199
+ return $node;
200
+ };
201
+
202
+ self.showDialog = function () {
203
+ var info = self.getInfo();
204
+ var newNode = !info.node;
205
+ context.invoke('editor.saveRange');
206
+
207
+ self
208
+ .openDialog(info)
209
+ .then(function (dialogInfo) {
210
+ // [workaround] hide dialog before restore range for IE range focus
211
+ ui.hideDialog(self.$dialog);
212
+ context.invoke('editor.restoreRange');
213
+
214
+ // insert a new node
215
+ if (newNode)
216
+ {
217
+ self.createNode(info);
218
+ }
219
+
220
+ // update info with dialog info
221
+ $.extend(info, dialogInfo);
222
+
223
+ self.updateNode(info);
224
+ })
225
+ .fail(function () {
226
+ context.invoke('editor.restoreRange');
227
+ });
228
+
229
+ };
230
+
231
+ self.openDialog = function (info) {
232
+ return $.Deferred(function (deferred) {
233
+ var $inpTest = self.$dialog.find('.ext-databasic-test');
234
+ var $saveBtn = self.$dialog.find('.ext-databasic-save');
235
+ var onKeyup = function (event) {
236
+ if (event.keyCode === 13)
237
+ {
238
+ $saveBtn.trigger('click');
239
+ }
240
+ };
241
+
242
+ ui.onDialogShown(self.$dialog, function () {
243
+ context.triggerEvent('dialog.shown');
244
+
245
+ $inpTest.val(info.test).on('input', function () {
246
+ ui.toggleBtn($saveBtn, $inpTest.val());
247
+ }).trigger('focus').on('keyup', onKeyup);
248
+
249
+ $saveBtn
250
+ .text(info.node ? lang.databasic.edit : lang.databasic.insert)
251
+ .click(function (event) {
252
+ event.preventDefault();
253
+
254
+ deferred.resolve({ test: $inpTest.val() });
255
+ });
256
+
257
+ // init save button
258
+ ui.toggleBtn($saveBtn, $inpTest.val());
259
+ });
260
+
261
+ ui.onDialogHidden(self.$dialog, function () {
262
+ $inpTest.off('input keyup');
263
+ $saveBtn.off('click');
264
+
265
+ if (deferred.state() === 'pending') {
266
+ deferred.reject();
267
+ }
268
+ });
269
+
270
+ ui.showDialog(self.$dialog);
271
+ });
272
+ };
273
+ };
274
+
275
+ // Extends summernote
276
+ $.extend(true, $.summernote, {
277
+ plugins: {
278
+ databasic: DataBasicPlugin
279
+ },
280
+
281
+ options: {
282
+ popover: {
283
+ databasic: [
284
+ ['databasic', ['databasicDialog', 'databasicSize100', 'databasicSize50', 'databasicSize25']]
285
+ ]
286
+ }
287
+ },
288
+
289
+ // add localization texts
290
+ lang: {
291
+ 'en-US': {
292
+ databasic: {
293
+ name: 'Basic Data Container',
294
+ insert: 'insert basic data container',
295
+ edit: 'edit basic data container',
296
+ testLabel: 'test input'
297
+ }
298
+ }
299
+ }
300
+
301
+ });
302
+
303
+ }));