bootstrap-wysihtml5-rails 0.3.1.13 → 0.3.1.14
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.
- data/Rakefile +10 -10
- data/lib/bootstrap-wysihtml5-rails/version.rb +1 -1
- data/testapp/config/environments/development.rb +2 -0
- data/vendor/assets/javascripts/bootstrap-wysihtml5/core.js.erb +14 -0
- data/vendor/assets/javascripts/bootstrap-wysihtml5/locales/bg-BG.js +49 -0
- data/vendor/assets/javascripts/bootstrap-wysihtml5/locales/ko-KR.js +49 -0
- metadata +6 -4
data/Rakefile
CHANGED
@@ -7,31 +7,31 @@ task 'update' do
|
|
7
7
|
origin_src_path = "bootstrap-wysihtml5/src"
|
8
8
|
dest_javascript_path = "vendor/assets/javascripts/bootstrap-wysihtml5"
|
9
9
|
dest_css_path = "vendor/assets/stylesheets/bootstrap-wysihtml5"
|
10
|
-
|
10
|
+
|
11
11
|
system("rm -rf bootstrap-wysihtml5")
|
12
12
|
system("git clone git://github.com/jhollingworth/bootstrap-wysihtml5.git")
|
13
|
-
|
13
|
+
|
14
14
|
system("cp #{origin_src_path}/bootstrap-wysihtml5.css #{dest_css_path}/core.css")
|
15
|
-
|
15
|
+
|
16
16
|
Dir.foreach("bootstrap-wysihtml5/src/locales") do |file|
|
17
17
|
unless file == '.' || file == '..'
|
18
18
|
abbreviated_file_name = file.gsub('bootstrap-wysihtml5.', '')
|
19
19
|
system("cp #{origin_src_path}/locales/#{file} #{dest_javascript_path}/locales/#{abbreviated_file_name}")
|
20
20
|
end
|
21
|
-
end
|
21
|
+
end
|
22
22
|
|
23
23
|
core_file = File.read("#{origin_src_path}/bootstrap-wysihtml5.js")
|
24
24
|
original_string = /stylesheets: \[".\/lib\/css\/wysiwyg-color.css"\]/
|
25
|
-
objective_string = 'stylesheets: ["<%= Rails.configuration.assets.prefix + \'/bootstrap-wysihtml5/wysiwyg-color.css\' %>"]'
|
26
|
-
|
25
|
+
objective_string = 'stylesheets: ["<%= Rails.configuration.assets.prefix + \'/bootstrap-wysihtml5/wysiwyg-color.css\' %>"]'
|
26
|
+
|
27
27
|
replaced = core_file.gsub(original_string, objective_string)
|
28
28
|
|
29
29
|
File.open("#{dest_javascript_path}/core.js.erb", "w") { |file| file.puts replaced }
|
30
|
-
|
30
|
+
|
31
31
|
system("cp #{origin_lib_path}/js/wysihtml5-0.3.0.js #{dest_javascript_path}/wysihtml5.js")
|
32
32
|
system("cp #{origin_lib_path}/css/wysiwyg-color.css #{dest_css_path}/wysiwyg-color.css")
|
33
|
-
|
34
|
-
|
33
|
+
|
34
|
+
|
35
35
|
system("git status")
|
36
36
|
end
|
37
37
|
|
@@ -41,7 +41,7 @@ task "build" do
|
|
41
41
|
end
|
42
42
|
|
43
43
|
desc "Publish a new version"
|
44
|
-
task
|
44
|
+
task :publish => :build do
|
45
45
|
system("gem push bootstrap-wysihtml5-rails-#{BootstrapWysihtml5Rails::Rails::VERSION}.gem")
|
46
46
|
system("git push")
|
47
47
|
end
|
@@ -15,6 +15,8 @@ Testapp::Application.configure do
|
|
15
15
|
|
16
16
|
# Don't care if the mailer can't send
|
17
17
|
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# config.action_controller.asset_host = 'testing'
|
18
20
|
|
19
21
|
# Print deprecation notices to the Rails logger
|
20
22
|
config.active_support.deprecation = :log
|
@@ -226,11 +226,16 @@
|
|
226
226
|
var urlInput = insertImageModal.find('.bootstrap-wysihtml5-insert-image-url');
|
227
227
|
var insertButton = insertImageModal.find('a.btn-primary');
|
228
228
|
var initialValue = urlInput.val();
|
229
|
+
var caretBookmark;
|
229
230
|
|
230
231
|
var insertImage = function() {
|
231
232
|
var url = urlInput.val();
|
232
233
|
urlInput.val(initialValue);
|
233
234
|
self.editor.currentView.element.focus();
|
235
|
+
if (caretBookmark) {
|
236
|
+
self.editor.composer.selection.setBookmark(caretBookmark);
|
237
|
+
caretBookmark = null;
|
238
|
+
}
|
234
239
|
self.editor.composer.commands.exec("insertImage", url);
|
235
240
|
};
|
236
241
|
|
@@ -255,6 +260,8 @@
|
|
255
260
|
var activeButton = $(this).hasClass("wysihtml5-command-active");
|
256
261
|
|
257
262
|
if (!activeButton) {
|
263
|
+
self.editor.currentView.element.focus(false);
|
264
|
+
caretBookmark = self.editor.composer.selection.getBookmark();
|
258
265
|
insertImageModal.modal('show');
|
259
266
|
insertImageModal.on('click.dismiss.modal', '[data-dismiss="modal"]', function(e) {
|
260
267
|
e.stopPropagation();
|
@@ -273,11 +280,16 @@
|
|
273
280
|
var urlInput = insertLinkModal.find('.bootstrap-wysihtml5-insert-link-url');
|
274
281
|
var insertButton = insertLinkModal.find('a.btn-primary');
|
275
282
|
var initialValue = urlInput.val();
|
283
|
+
var caretBookmark;
|
276
284
|
|
277
285
|
var insertLink = function() {
|
278
286
|
var url = urlInput.val();
|
279
287
|
urlInput.val(initialValue);
|
280
288
|
self.editor.currentView.element.focus();
|
289
|
+
if (caretBookmark) {
|
290
|
+
self.editor.composer.selection.setBookmark(caretBookmark);
|
291
|
+
caretBookmark = null;
|
292
|
+
}
|
281
293
|
self.editor.composer.commands.exec("createLink", {
|
282
294
|
href: url,
|
283
295
|
target: "_blank",
|
@@ -307,6 +319,8 @@
|
|
307
319
|
var activeButton = $(this).hasClass("wysihtml5-command-active");
|
308
320
|
|
309
321
|
if (!activeButton) {
|
322
|
+
self.editor.currentView.element.focus(false);
|
323
|
+
caretBookmark = self.editor.composer.selection.getBookmark();
|
310
324
|
insertLinkModal.appendTo('body').modal('show');
|
311
325
|
insertLinkModal.on('click.dismiss.modal', '[data-dismiss="modal"]', function(e) {
|
312
326
|
e.stopPropagation();
|
@@ -0,0 +1,49 @@
|
|
1
|
+
/**
|
2
|
+
* Bulgarian translation for bootstrap-wysihtml5
|
3
|
+
*/
|
4
|
+
(function($){
|
5
|
+
$.fn.wysihtml5.locale["bg-BG"] = {
|
6
|
+
font_styles: {
|
7
|
+
normal: "Нормален текст",
|
8
|
+
h1: "Заглавие 1",
|
9
|
+
h2: "Заглавие 2",
|
10
|
+
h3: "Заглавие 3"
|
11
|
+
},
|
12
|
+
emphasis: {
|
13
|
+
bold: "Удебелен",
|
14
|
+
italic: "Курсив",
|
15
|
+
underline: "Подчертан"
|
16
|
+
},
|
17
|
+
lists: {
|
18
|
+
unordered: "Неподреден списък",
|
19
|
+
ordered: "Подреден списък",
|
20
|
+
outdent: "Намали отстояние",
|
21
|
+
indent: "Увеличи отстояние"
|
22
|
+
},
|
23
|
+
link: {
|
24
|
+
insert: "Вмъкни връзка",
|
25
|
+
cancel: "Отмени"
|
26
|
+
},
|
27
|
+
image: {
|
28
|
+
insert: "Вмъкни картинка",
|
29
|
+
cancel: "Отмени"
|
30
|
+
},
|
31
|
+
html: {
|
32
|
+
edit: "Редакртирай HTML"
|
33
|
+
},
|
34
|
+
colours: {
|
35
|
+
black: "Черен",
|
36
|
+
silver: "Сребърен",
|
37
|
+
gray: "Сив",
|
38
|
+
maroon: "Коричневый",
|
39
|
+
red: "Червен",
|
40
|
+
purple: "Виолетов",
|
41
|
+
green: "Зелен",
|
42
|
+
olive: "Маслинен",
|
43
|
+
navy: "Морско син",
|
44
|
+
blue: "Син",
|
45
|
+
orange: "Оранжев"
|
46
|
+
}
|
47
|
+
};
|
48
|
+
}(jQuery));
|
49
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
/**
|
2
|
+
* Korean translation for bootstrap-wysihtml5
|
3
|
+
*/
|
4
|
+
(function($){
|
5
|
+
$.fn.wysihtml5.locale["ko-KR"] = {
|
6
|
+
font_styles: {
|
7
|
+
normal: "일반",
|
8
|
+
h1: "헤드라인 1",
|
9
|
+
h2: "헤드라인 2",
|
10
|
+
h3: "헤드라인 3"
|
11
|
+
},
|
12
|
+
emphasis: {
|
13
|
+
bold: "굵게",
|
14
|
+
italic: "기울게",
|
15
|
+
underline: "밑줄"
|
16
|
+
},
|
17
|
+
lists: {
|
18
|
+
unordered: "기호목록",
|
19
|
+
ordered: "숫자목록",
|
20
|
+
outdent: "내어쓰기",
|
21
|
+
indent: "들여쓰기"
|
22
|
+
},
|
23
|
+
link: {
|
24
|
+
insert: "링크 삽입",
|
25
|
+
cancel: "취소"
|
26
|
+
},
|
27
|
+
image: {
|
28
|
+
insert: "이미지 삽입",
|
29
|
+
cancel: "취소"
|
30
|
+
},
|
31
|
+
html: {
|
32
|
+
edit: "HTML 편집"
|
33
|
+
},
|
34
|
+
colours: {
|
35
|
+
black: "검은색",
|
36
|
+
silver: "은색",
|
37
|
+
gray: "회색",
|
38
|
+
maroon: "고동색",
|
39
|
+
red: "빨간색",
|
40
|
+
purple: "보라색",
|
41
|
+
green: "초록색",
|
42
|
+
olive: "올리브",
|
43
|
+
navy: "네이비",
|
44
|
+
blue: "파란색",
|
45
|
+
orange: "주황색"
|
46
|
+
}
|
47
|
+
|
48
|
+
};
|
49
|
+
}(jQuery));
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-wysihtml5-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.1.
|
4
|
+
version: 0.3.1.14
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- testapp/vendor/plugins/.gitkeep
|
133
133
|
- vendor/assets/javascripts/bootstrap-wysihtml5/core.js.erb
|
134
134
|
- vendor/assets/javascripts/bootstrap-wysihtml5/index.js
|
135
|
+
- vendor/assets/javascripts/bootstrap-wysihtml5/locales/bg-BG.js
|
135
136
|
- vendor/assets/javascripts/bootstrap-wysihtml5/locales/ca-CT.js
|
136
137
|
- vendor/assets/javascripts/bootstrap-wysihtml5/locales/cs-CZ.js
|
137
138
|
- vendor/assets/javascripts/bootstrap-wysihtml5/locales/de-DE.js
|
@@ -144,6 +145,7 @@ files:
|
|
144
145
|
- vendor/assets/javascripts/bootstrap-wysihtml5/locales/index.js
|
145
146
|
- vendor/assets/javascripts/bootstrap-wysihtml5/locales/it-IT.js
|
146
147
|
- vendor/assets/javascripts/bootstrap-wysihtml5/locales/ja-JP.js
|
148
|
+
- vendor/assets/javascripts/bootstrap-wysihtml5/locales/ko-KR.js
|
147
149
|
- vendor/assets/javascripts/bootstrap-wysihtml5/locales/lt-LT.js
|
148
150
|
- vendor/assets/javascripts/bootstrap-wysihtml5/locales/mo-MD.js
|
149
151
|
- vendor/assets/javascripts/bootstrap-wysihtml5/locales/nb-NB.js
|
@@ -172,7 +174,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
174
|
version: '0'
|
173
175
|
segments:
|
174
176
|
- 0
|
175
|
-
hash: -
|
177
|
+
hash: -2396781461152925529
|
176
178
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
179
|
none: false
|
178
180
|
requirements:
|
@@ -181,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
183
|
version: '0'
|
182
184
|
segments:
|
183
185
|
- 0
|
184
|
-
hash: -
|
186
|
+
hash: -2396781461152925529
|
185
187
|
requirements: []
|
186
188
|
rubyforge_project:
|
187
189
|
rubygems_version: 1.8.24
|