cardboard_cms 0.1.4 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 575d0f91810cee3ed6ceed4224d66422c4a4b0bb
4
- data.tar.gz: a648b9a242e0aefcedad3ef2f3b97a1b4d100de6
3
+ metadata.gz: 79f74648f48e899a4cc6e823888f15ed437fe408
4
+ data.tar.gz: c42474efb3ca96d02db0e23896e26530d9b2b287
5
5
  SHA512:
6
- metadata.gz: f9643eeedddf6d09ab471775c97d10eb7b5de52bb6e6f77f696b4dec5d49a5e89d18b88834ff0de35d25d87a8a3471b83fd27381a48d0826a5c1f488d7ef3301
7
- data.tar.gz: e4292f66de41c65643d3931ab0168f86a7d688753e1a4321b22bdc89804229e6dedfcf21f8da0c59e07d5084699324983b2d18a3c5794adda87fe5018f424ee4
6
+ metadata.gz: 321b542f56a6083e0ab9961b45d776c3d564b306ca33cd87086248a54cd832316b9f1f13b1bb63b7262d26e3e069f36982c3d3da9f95cd91672479ed49083966
7
+ data.tar.gz: 8d74c9ae9ded58328e7536f53d81ae69fe39dfb24a88bf5cb4d54181be48eaa0620d115ae25b594e8cbbeb7a37cc9d02b3bf862aecd07de8ef60f3ef88a5becb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cardboard_cms (0.1.4)
4
+ cardboard_cms (0.1.6)
5
5
  bootstrap-datepicker-rails
6
6
  bootstrap-sass (~> 2.2)
7
7
  bootstrap-wysihtml5-rails
@@ -56,9 +56,19 @@ var rich_text_editor_defaults = {
56
56
  }
57
57
 
58
58
  $(document).on("ready pjax:end", function(e){
59
- // console.log($(".wysihtml5").length);
60
59
  if($(".wysihtml5").length) {
61
60
  $('.wysihtml5').wysihtml5(rich_text_editor_defaults);
61
+ $('iframe.wysihtml5-sandbox').wysihtml5_size_matters();
62
+
63
+ // TODO: find a better way to handle multiple RTE on a single page
64
+ $(".bootstrap-wysihtml5-insert-link-modal .tab-content div").each(function (index) {
65
+ $(this).attr("id", $(this).attr("id") + index.toString());
66
+ });
67
+ $(".bootstrap-wysihtml5-insert-link-modal .nav li a").each(function (index) {
68
+ $(this).attr("href", $(this).attr("href") + index.toString());
69
+ if(index % 3 == 0) $(this).tab('show');
70
+ });
71
+ // END TODO
62
72
  }
63
73
  });
64
74
 
@@ -68,12 +78,14 @@ $(document).on('cocoon:after-insert', function(e, insertedItem) {
68
78
  }
69
79
  });
70
80
 
71
- $(document).on('click', '.bootstrap-wysihtml5-insert-link-modal #link_pages a', function(e){
72
- e.preventDefault;
81
+
82
+
83
+ $(document).on('click', '.bootstrap-wysihtml5-insert-link-modal .link_pages a', function(e){
84
+ e.preventDefault();
85
+ console.log("clicked");
73
86
  modal = $(this).closest(".bootstrap-wysihtml5-insert-link-modal");
74
87
  modal.find("input.bootstrap-wysihtml5-insert-link-url").val($(this).data("url"));
75
88
  modal.find("#insert_link").click();
76
- return false;
77
89
  });
78
90
 
79
91
  $(document).on('change', '.bootstrap-wysihtml5-insert-link-modal .tab-pane input', function(){
@@ -5,24 +5,26 @@ li
5
5
  h3 Insert link
6
6
 
7
7
  .modal-body
8
- ul class="nav nav-tabs"
8
+ ul class="nav nav-pills"
9
9
  li
10
- a href="#link_pages" data-toggle="tab" Pages
10
+ a href="#link_pane_1" data-toggle="pill" Pages
11
11
  li
12
- a href="#link_url" data-toggle="tab" URL
12
+ a href="#link_pane_2" data-toggle="pill" URL
13
13
  li
14
- a href="#link_email" data-toggle="tab" Email
14
+ a href="#link_pane_3" data-toggle="pill" Email
15
15
 
16
16
  div class="tab-content"
17
- div class="tab-pane" id="link_pages"
17
+ div.tab-pane class="link_pages" id="link_pane_1"
18
18
  ul
19
19
  = nested_pages do |page, subpages|
20
20
  li
21
21
  = link_to page.title, "#", "data-url" => page.url
22
22
  = content_tag(:ul, subpages) if subpages
23
- div class="tab-pane" id="link_url"
23
+
24
+ div.tab-pane id="link_pane_2"
24
25
  input placeholder='http://website.com' class='input-xlarge' value='http://'
25
- div class="tab-pane" id="link_email"
26
+
27
+ div.tab-pane id="link_pane_3"
26
28
  input placeholder='mailto:email@example.com' class='input-xlarge'
27
29
 
28
30
  input class='bootstrap-wysihtml5-insert-link-url' type="hidden"
@@ -20,6 +20,7 @@ require 'jquery-ui-rails'
20
20
  require 'decorators'
21
21
  require 'bootstrap-wysihtml5-rails'
22
22
  require 'select2-rails'
23
+ require 'jquery-rails'
23
24
 
24
25
 
25
26
  module Cardboard
@@ -1,3 +1,3 @@
1
1
  module Cardboard
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cardboard_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Elfassy
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-16 00:00:00.000000000 Z
12
+ date: 2014-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails