brightcontent-core 2.0.15 → 2.0.16

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brightcontent-core (2.0.15)
4
+ brightcontent-core (2.0.16)
5
5
  bcrypt-ruby
6
6
  bootstrap-wysihtml5-rails
7
7
  has_scope
@@ -2,7 +2,26 @@ $(document).ready(function(){
2
2
  $('textarea').each(function(i, elem) {
3
3
  $(elem).wysihtml5({
4
4
  html: true,
5
- locale: "nl-NL"
5
+ locale: "nl-NL",
6
+ "events": {
7
+ "load": function() {
8
+ editor = $('#insertable').data("wysihtml5").editor;
9
+ editor.focus();
10
+ }
11
+ }
6
12
  });
7
13
  });
14
+
15
+ $(".insert_image").click(function(e){
16
+ e.preventDefault();
17
+ console.log($(this).data("insertImage"));
18
+ editor.composer.commands.exec("insertImage", { src: $(this).data("insertImage") });
19
+ });
20
+
21
+ $(".insert_link").click(function(e){
22
+ e.preventDefault();
23
+ console.log($(this).data());
24
+ editor.composer.commands.exec("createLink", { href: $(this).data("insertUrl"), target: "_blank", rel: "nofollow", text: $(this).data("insertName") });
25
+ });
26
+
8
27
  });
@@ -51,14 +51,29 @@ td.list-actions {
51
51
  margin: 0 5px 5px 0;
52
52
  }
53
53
 
54
- #attachments .attachment a {
54
+ #attachments .attachment .delete,
55
+ #attachments .attachment .insert {
55
56
  position: absolute;
56
57
  top: 3px;
57
58
  right: 3px;
58
59
  display: none;
59
60
  }
60
61
 
61
- #attachments .attachment:hover a {
62
+ #attachments .attachment .insert {
63
+ top: 30px;
64
+ }
65
+
66
+ #attachments .attachment:hover .delete,
67
+ #attachments .attachment:hover .insert {
62
68
  display: block;
63
69
  }
64
70
 
71
+ #attachments .attachment-file {
72
+ display: block;
73
+ background: #ccc;
74
+ width: 80px;
75
+ height: 90px;
76
+ font-size: 11px;
77
+ overflow: hidden;
78
+ padding: 5px 10px;
79
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brightcontent-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.15
4
+ version: 2.0.16
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -347,7 +347,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
347
347
  version: '0'
348
348
  segments:
349
349
  - 0
350
- hash: -3307239442689940031
350
+ hash: 501242800650588630
351
351
  required_rubygems_version: !ruby/object:Gem::Requirement
352
352
  none: false
353
353
  requirements:
@@ -356,7 +356,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
356
356
  version: '0'
357
357
  segments:
358
358
  - 0
359
- hash: -3307239442689940031
359
+ hash: 501242800650588630
360
360
  requirements: []
361
361
  rubyforge_project:
362
362
  rubygems_version: 1.8.24