rich_cms 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,14 @@
1
1
  = Rich-CMS CHANGELOG
2
2
 
3
+ == Version 3.0.1 (April 6, 2011)
4
+
5
+ * Bugfix: Corrected contains operator into equals within Rich.Cms.afterUpdate function. Thanks Chris Obdam (@chrisobdam) for contributing
6
+ * Bugfix: Fixed logging into Rich-CMS when using Devise > 1.1.5
7
+ * Using RaccoonTip v1.0.9 (which includes bugfix regarding Chrome and inputs)
8
+ * Bugfix: always rendering passed HTML attributes with CMS items (it was only when logged in as admin at first). Thanks Jeroen Bulters (@bulters) for contributing
9
+ * Allow no wrapping tag in cases when no user is logged in (essential in case the extra 'span' will bork the layout). Thanks Jeroen Bulters (@bulters) for contributing
10
+ * Bugfix: setting the data-value attribute after editing content
11
+
3
12
  == Version 3.0.0 (February 7, 2011)
4
13
 
5
14
  * Refactored the authentication code. Being able to run Rich-CMS with:
@@ -6,6 +6,7 @@ A Rails gem (and also plugin) for a pluggable CMS frontend
6
6
  h2. Introduction
7
7
 
8
8
  Rich-CMS is a module of E9s ("http://github.com/archan937/e9s":http://github.com/archan937/e9s) which provides a frontend for your CMS content.
9
+ Please check out an online demo of Rich-CMS at the "Rich-CMS":http://codehero.es/rails_gems_plugins/rich_cms or "E9s":http://codehero.es/rails_gems_plugins/e9s page at "http://codehero.es":http://codehero.es.
9
10
 
10
11
  h2. Installation
11
12
 
@@ -229,7 +230,7 @@ When specifying a custom after update Javascript function, you probably want to
229
230
  end
230
231
  </pre>
231
232
 
232
- The JSON data provided will be look like:
233
+ The JSON data provided will look like:
233
234
 
234
235
  <pre>
235
236
  {"__selector__": ".i18n", "__identifier__": {"locale": "nl", "key": "word.user"}, "value": "gebruiker", "translations": {"users": "gebruikers"}}
@@ -274,6 +275,8 @@ h2. Contributors
274
275
 
275
276
  Mark Mulder - "@bitterzoet":http://twitter.com/bitterzoet - "http://ikbenbitterzoet.com":http://ikbenbitterzoet.com
276
277
  Stephan Kaag - "@stephankaag":http://twitter.com/stephankaag - "http://hollandonrails.nl":http://hollandonrails.nl
278
+ Jeroen Bulters – "@bulters":http://twitter.com/bulters – "http://bulte.rs":http://bulte.rs
279
+ Chris Obdam - "@chrisobdam":http://twitter.com/chrisobdam - "http://holder.nl":http://holder.nl
277
280
 
278
281
  h2. ToDo's
279
282
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0
1
+ 3.0.1
@@ -1,16 +1,16 @@
1
1
  if (typeof(RaccoonTip) == "undefined") {
2
2
 
3
3
  // *
4
- // * RaccoonTip 1.0.8 (Uncompressed)
4
+ // * RaccoonTip 1.0.9 (Uncompressed)
5
5
  // * A lightweight jQuery based balloon tip library
6
6
  // *
7
7
  // * This library requires jQuery (http://jquery.com)
8
8
  // *
9
- // * (c) 2010 Paul Engel (Internetbureau Holder B.V.)
9
+ // * (c) 2011 Paul Engel (Internetbureau Holder B.V.)
10
10
  // * Except otherwise noted, RaccoonTip is licensed under
11
11
  // * http://creativecommons.org/licenses/by-sa/3.0
12
12
  // *
13
- // * $Date: 2010-10-17 13:37:39 +0100 (Sun, 17 October 2010) $
13
+ // * $Date: 2011-02-24 02:43:21 +0100 (Thu, 24 February 2011) $
14
14
  // *
15
15
 
16
16
  RaccoonTip = (function() {
@@ -18,7 +18,6 @@ RaccoonTip = (function() {
18
18
  var css = '<style>#raccoon_tip{*padding:14px;position:absolute;z-index:9999}#raccoon_tip .rt_tip{width:0;font-size:0;line-height:0;position:absolute;filter:chroma(color=pink)}#raccoon_tip.rt_bottom_right{margin-left:-28px;padding-top:14px}#raccoon_tip.rt_bottom_right .rt_tip{top:0;left:14px;border-bottom-width:14px;border-bottom-style:solid;border-bottom-color:#f9e98e;border-right-width:14px;border-right-style:solid;border-right-color:transparent;*border-right-color:pink}#raccoon_tip.rt_bottom_middle{padding-top:14px}#raccoon_tip.rt_bottom_middle .rt_tip{top:0;left:50%;margin-left:-7px;border-bottom-width:14px;border-bottom-style:solid;border-bottom-color:#f9e98e;border-left-width:7px;border-left-style:solid;border-left-color:transparent;*border-left-color:pink;border-right-width:7px;border-right-style:solid;border-right-color:transparent;*border-right-color:pink}#raccoon_tip.rt_bottom_left{margin-left:28px;padding-top:14px}#raccoon_tip.rt_bottom_left .rt_tip{top:0;right:14px;border-bottom-width:14px;border-bottom-style:solid;border-bottom-color:#f9e98e;border-left-width:14px;border-left-style:solid;border-left-color:transparent;*border-left-color:pink}#raccoon_tip.rt_middle_left{margin-left:-7px;padding-right:14px}#raccoon_tip.rt_middle_left .rt_tip{top:50%;right:0;margin-top:-7px;border-left-width:14px;border-left-style:solid;border-left-color:#f9e98e;border-top-width:7px;border-top-style:solid;border-top-color:transparent;*border-top-color:pink;border-bottom-width:7px;border-bottom-style:solid;border-bottom-color:transparent;*border-bottom-color:pink}#raccoon_tip.rt_top_left{margin-left:28px;padding-bottom:14px}#raccoon_tip.rt_top_left .rt_tip{bottom:0;right:14px;border-top-width:14px;border-top-style:solid;border-top-color:#f9e98e;border-left-width:14px;border-left-style:solid;border-left-color:transparent;*border-left-color:pink}#raccoon_tip.rt_top_middle{padding-bottom:14px}#raccoon_tip.rt_top_middle .rt_tip{bottom:0;left:50%;margin-left:-7px;border-top-width:14px;border-top-style:solid;border-top-color:#f9e98e;border-left-width:7px;border-left-style:solid;border-left-color:transparent;*border-left-color:pink;border-right-width:7px;border-right-style:solid;border-right-color:transparent;*border-right-color:pink}#raccoon_tip.rt_top_right{margin-left:-28px;padding-bottom:14px}#raccoon_tip.rt_top_right .rt_tip{bottom:0;left:14px;border-top-width:14px;border-top-style:solid;border-top-color:#f9e98e;border-right-width:14px;border-right-style:solid;border-right-color:transparent;*border-right-color:pink}#raccoon_tip.rt_middle_right{margin-left:7px;padding-left:14px}#raccoon_tip.rt_middle_right .rt_tip{top:50%;left:0;margin-top:-7px;border-right-width:14px;border-right-style:solid;border-right-color:#f9e98e;border-top-width:7px;border-top-style:solid;border-top-color:transparent;*border-top-color:pink;border-bottom-width:7px;border-bottom-style:solid;border-bottom-color:transparent;*border-bottom-color:pink}#raccoon_tip .rt_content{padding:6px 12px 8px 12px;overflow:hidden;background:#fbf7aa;border-width:10px;border-style:solid;border-color:#f9e98e;*border-width:7px;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;box-shadow:rgba(0, 0, 0, 0.1) 0 1px 3px;-moz-box-shadow:rgba(0, 0, 0, 0.1) 0 1px 3px;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0 1px 3px}#raccoon_tip .rt_content,#raccoon_tip .rt_content a{color:#a27d35;text-shadow:none}#raccoon_tip .rt_content a{outline:0}</style>';
19
19
 
20
20
  var default_options = {event: "click", duration: "fast", position: "bottom_right", beforeShow: function() {}, canHide: function() { return true; }, afterHide: function() {}}, opts = null;
21
- var displaying = false, mouseover = false;
22
21
 
23
22
  var register = function(target, content, options) {
24
23
  var attachFunction = $.inArray(options.event || default_options.event, ["focus"]) == -1 ? "live" : "bind";
@@ -29,11 +28,9 @@ RaccoonTip = (function() {
29
28
  };
30
29
 
31
30
  var display = function(target, content, options) {
32
- displaying = true;
33
31
  setup();
34
32
  deriveOptions(target, content, options);
35
33
  show();
36
- displaying = false;
37
34
  };
38
35
 
39
36
  var close = function() {
@@ -42,8 +39,9 @@ RaccoonTip = (function() {
42
39
 
43
40
  var setup = function() {
44
41
  if (!$("#raccoon_tip").length) {
45
- $("body").mouseup(function(event) {
46
- if (!displaying && !mouseover && opts.canHide.apply()) {
42
+ $("body").mousedown(function(event) {
43
+ var target = $(event.target);
44
+ if (opts.canHide.apply() && target.closest("#raccoon_tip").length == 0) {
47
45
  hide();
48
46
  }
49
47
  });
@@ -51,7 +49,7 @@ RaccoonTip = (function() {
51
49
  $(document.body).before("<head></head>");
52
50
  }
53
51
  $(css).prependTo("head");
54
- $(html).appendTo("body").find(".rt_content").mouseenter(function() { mouseover = true; }).mouseleave(function() { mouseover = false; });
52
+ $(html).appendTo("body");
55
53
  } else {
56
54
  hide();
57
55
  }
@@ -163,7 +161,7 @@ RaccoonTip = (function() {
163
161
  };
164
162
 
165
163
  return {
166
- version: "1.0.8",
164
+ version: "1.0.9",
167
165
  init: function() {
168
166
  if (typeof(onRaccoonTipReady) == "function") {
169
167
  onRaccoonTipReady();
@@ -1,4 +1,3 @@
1
-
2
1
  Rich.Cms.Editor = (function() {
3
2
  var content_class = "rich_cms_content", mark_class = "marked", edit_panel = "#rich_cms_panel",
4
3
  editable_content = {}, content_items = "",
@@ -16,7 +15,7 @@ Rich.Cms.Editor = (function() {
16
15
  var toggler = $(event.target);
17
16
  toggler.hide().closest(".keys").find("select[name=" + toggler.attr("data-name") + "]").show();
18
17
  });
19
-
18
+
20
19
  $("#rich_cms_panel .edit a.close").bind("click", function(event) {
21
20
  event.preventDefault();
22
21
  RaccoonTip.close();
@@ -107,15 +106,15 @@ Rich.Cms.Editor = (function() {
107
106
  } else if (specs.keys.indexOf(attr) != -1) {
108
107
  var available_keys = $.map(value.split(","), function(key) { return $.trim(key); });
109
108
  var default_key = available_keys[0];
110
-
109
+
111
110
  if (specs.keys.length > 1 && keys.find("select").length > 0) {
112
111
  keys.append("<span>, <span>");
113
112
  }
114
-
113
+
115
114
  keys.append(available_keys.length == 1 ?
116
115
  "<span>" + default_key + "<span>" :
117
116
  "<a href='#' class='toggler' data-attr='" + attr + "' data-name='" + name + "'>" + default_key + "</a>");
118
- keys.append("<select name='" + name + "' style='display: none'>" +
117
+ keys.append("<select name='" + name + "' style='display: none'>" +
119
118
  $.map(available_keys, function(key) { return "<option value='" + key + "'>" + key + "</option>"; }).join("") +
120
119
  "</select>");
121
120
  } else {
@@ -123,7 +122,7 @@ Rich.Cms.Editor = (function() {
123
122
  }
124
123
  }
125
124
  });
126
-
125
+
127
126
  $("#rich_cms_panel .edit form fieldset.inputs div.keys select").bind("blur", function(event) {
128
127
  var select = $(event.target);
129
128
  var toggler = select.hide().closest(".keys").find(".toggler[data-name=" + select.attr("name") + "]").html(select.val()).show();
@@ -135,7 +134,7 @@ Rich.Cms.Editor = (function() {
135
134
  values.push(value);
136
135
  }
137
136
  });
138
-
137
+
139
138
  content_item.attr(toggler.attr("data-attr"), values.join(", "));
140
139
  });
141
140
 
@@ -159,10 +158,11 @@ Rich.Cms.Editor = (function() {
159
158
  var afterUpdate = function(form, response) {
160
159
  var selector = response["__selector__"];
161
160
  var specs = editable_content[selector];
162
- var identifier = $.map(specs.keys, function(key) { return "[" + key + "^=" + response["__identifier__"][key.replace(/^data-/, "")] + "]"; }).join("");
161
+ var identifier = $.map(specs.keys, function(key) { return "[" + key + "=" + response["__identifier__"][key.replace(/^data-/, "")] + "]"; }).join("");
163
162
 
164
163
  var defaultFunction = function(form, response, selector, specs, identifier) {
165
- $(identifier).html(response[specs.value.replace(/^data-/, "")]);
164
+ var value = response[specs.value.replace(/^data-/, "")];
165
+ $(identifier).html(value).attr(specs.value, value);
166
166
  if (typeof(SeatHolder) != "undefined") {
167
167
  SeatHolder.rebind();
168
168
  }
@@ -26,10 +26,9 @@ module Rich
26
26
  user_session = "#{klass.name}Session".constantize.new params[klass_symbol]
27
27
  user_session.save
28
28
  when :devise
29
- case Devise::VERSION
30
- when "1.0.8", "1.0.9"
29
+ if Devise::VERSION.to_f < 1.1
31
30
  warden.authenticate(:scope => klass_symbol)
32
- when "1.1.5"
31
+ else
33
32
  begin
34
33
  sessions = Devise.mappings[klass_symbol].controllers[:sessions]
35
34
  Devise.mappings[klass_symbol].controllers[:sessions] = "rich/cms_sessions"
@@ -59,17 +59,24 @@ module Rich
59
59
  (options[:html] ||= {}).store :class, [class_name.to_s.gsub(/^\./, ""), options[:html].try(:fetch, :class, nil)].compact.join(" ")
60
60
  end
61
61
 
62
- attrs << options[:html].collect{|k, v| "#{k}=\"#{::ERB::Util.html_escape v}\""}.join(" ") if options[:html]
63
62
  attrs << data .collect{|k, v| "data-#{k}=\"#{::ERB::Util.html_escape v}\""}.join(" ")
64
63
  end
65
64
 
65
+ attrs << options[:html].collect{|k, v| "#{k}=\"#{::ERB::Util.html_escape v}\""}.join(" ") if options[:html]
66
+
66
67
  tag = options[:tag] || @group.tag || (%w(text html).include?(options[:as].to_s.downcase) ? :div : :span)
67
68
 
68
- "<#{tag} #{attrs.join(" ")}>#{value.blank? ? default : value}</#{tag}>".html_safe
69
+ if options[:tag] == :none && !Auth.can_edit?(@object)
70
+ "#{value.blank? ? default : value}"
71
+ else
72
+ # Make default for editable
73
+ tag = :span if tag == :none
74
+ "<#{tag} #{attrs.join(" ")}>#{value.blank? ? default : value}</#{tag}>".html_safe
75
+ end
69
76
  end
70
77
 
71
78
  end
72
79
 
73
80
  end
74
81
  end
75
- end
82
+ end
@@ -3,7 +3,7 @@ module Rich
3
3
  module VERSION
4
4
  MAJOR = 3
5
5
  MINOR = 0
6
- TINY = 0
6
+ TINY = 1
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join(".")
9
9
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rich_cms}
8
- s.version = "3.0.0"
8
+ s.version = "3.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Engel"]
12
- s.date = %q{2011-02-07}
12
+ s.date = %q{2011-04-06}
13
13
  s.description = %q{Rich-CMS is a module of E9s (http://github.com/archan937/e9s) which provides a frontend for your CMS content. You can use this gem to manage CMS content or translations (in an internationalized application). The installation and setup process is very easily done. You will have to register content at the Rich-CMS engine and also you will have to specify the authentication mechanism. Both are one-liners.}
14
14
  s.email = %q{paul.engel@holder.nl}
15
15
  s.extra_rdoc_files = [
@@ -112,7 +112,6 @@ Gem::Specification.new do |s|
112
112
  "test/integrator.rb",
113
113
  "test/rails-2/dummy/.bundle/config",
114
114
  "test/rails-2/dummy/Gemfile",
115
- "test/rails-2/dummy/Gemfile.lock",
116
115
  "test/rails-2/dummy/Rakefile",
117
116
  "test/rails-2/dummy/app/controllers/application_controller.rb",
118
117
  "test/rails-2/dummy/app/helpers/application_helper.rb",
@@ -165,7 +164,6 @@ Gem::Specification.new do |s|
165
164
  "test/rails-2/test_helper.rb",
166
165
  "test/rails-3/dummy/.bundle/config",
167
166
  "test/rails-3/dummy/Gemfile",
168
- "test/rails-3/dummy/Gemfile.lock",
169
167
  "test/rails-3/dummy/Rakefile",
170
168
  "test/rails-3/dummy/app/controllers/application_controller.rb",
171
169
  "test/rails-3/dummy/app/helpers/application_helper.rb",
@@ -238,7 +236,7 @@ Gem::Specification.new do |s|
238
236
  ]
239
237
  s.homepage = %q{http://codehero.es/rails_gems_plugins/rich_cms}
240
238
  s.require_paths = ["lib"]
241
- s.rubygems_version = %q{1.5.0}
239
+ s.rubygems_version = %q{1.6.2}
242
240
  s.summary = %q{Enrichments (e9s) module for a pluggable CMS frontend}
243
241
  s.test_files = [
244
242
  "test/integrator.rb",
@@ -1293,7 +1293,7 @@ Rich.Cms.Editor = (function() {
1293
1293
  var toggler = $(event.target);
1294
1294
  toggler.hide().closest(".keys").find("select[name=" + toggler.attr("data-name") + "]").show();
1295
1295
  });
1296
-
1296
+
1297
1297
  $("#rich_cms_panel .edit a.close").bind("click", function(event) {
1298
1298
  event.preventDefault();
1299
1299
  RaccoonTip.close();
@@ -1384,15 +1384,15 @@ Rich.Cms.Editor = (function() {
1384
1384
  } else if (specs.keys.indexOf(attr) != -1) {
1385
1385
  var available_keys = $.map(value.split(","), function(key) { return $.trim(key); });
1386
1386
  var default_key = available_keys[0];
1387
-
1387
+
1388
1388
  if (specs.keys.length > 1 && keys.find("select").length > 0) {
1389
1389
  keys.append("<span>, <span>");
1390
1390
  }
1391
-
1391
+
1392
1392
  keys.append(available_keys.length == 1 ?
1393
1393
  "<span>" + default_key + "<span>" :
1394
1394
  "<a href='#' class='toggler' data-attr='" + attr + "' data-name='" + name + "'>" + default_key + "</a>");
1395
- keys.append("<select name='" + name + "' style='display: none'>" +
1395
+ keys.append("<select name='" + name + "' style='display: none'>" +
1396
1396
  $.map(available_keys, function(key) { return "<option value='" + key + "'>" + key + "</option>"; }).join("") +
1397
1397
  "</select>");
1398
1398
  } else {
@@ -1400,7 +1400,7 @@ Rich.Cms.Editor = (function() {
1400
1400
  }
1401
1401
  }
1402
1402
  });
1403
-
1403
+
1404
1404
  $("#rich_cms_panel .edit form fieldset.inputs div.keys select").bind("blur", function(event) {
1405
1405
  var select = $(event.target);
1406
1406
  var toggler = select.hide().closest(".keys").find(".toggler[data-name=" + select.attr("name") + "]").html(select.val()).show();
@@ -1412,7 +1412,7 @@ Rich.Cms.Editor = (function() {
1412
1412
  values.push(value);
1413
1413
  }
1414
1414
  });
1415
-
1415
+
1416
1416
  content_item.attr(toggler.attr("data-attr"), values.join(", "));
1417
1417
  });
1418
1418
 
@@ -1439,7 +1439,8 @@ Rich.Cms.Editor = (function() {
1439
1439
  var identifier = $.map(specs.keys, function(key) { return "[" + key + "^=" + response["__identifier__"][key.replace(/^data-/, "")] + "]"; }).join("");
1440
1440
 
1441
1441
  var defaultFunction = function(form, response, selector, specs, identifier) {
1442
- $(identifier).html(response[specs.value.replace(/^data-/, "")]);
1442
+ var value = response[specs.value.replace(/^data-/, "")];
1443
+ $(identifier).html(value).attr(specs.value, value);
1443
1444
  if (typeof(SeatHolder) != "undefined") {
1444
1445
  SeatHolder.rebind();
1445
1446
  }
@@ -1293,7 +1293,7 @@ Rich.Cms.Editor = (function() {
1293
1293
  var toggler = $(event.target);
1294
1294
  toggler.hide().closest(".keys").find("select[name=" + toggler.attr("data-name") + "]").show();
1295
1295
  });
1296
-
1296
+
1297
1297
  $("#rich_cms_panel .edit a.close").bind("click", function(event) {
1298
1298
  event.preventDefault();
1299
1299
  RaccoonTip.close();
@@ -1384,15 +1384,15 @@ Rich.Cms.Editor = (function() {
1384
1384
  } else if (specs.keys.indexOf(attr) != -1) {
1385
1385
  var available_keys = $.map(value.split(","), function(key) { return $.trim(key); });
1386
1386
  var default_key = available_keys[0];
1387
-
1387
+
1388
1388
  if (specs.keys.length > 1 && keys.find("select").length > 0) {
1389
1389
  keys.append("<span>, <span>");
1390
1390
  }
1391
-
1391
+
1392
1392
  keys.append(available_keys.length == 1 ?
1393
1393
  "<span>" + default_key + "<span>" :
1394
1394
  "<a href='#' class='toggler' data-attr='" + attr + "' data-name='" + name + "'>" + default_key + "</a>");
1395
- keys.append("<select name='" + name + "' style='display: none'>" +
1395
+ keys.append("<select name='" + name + "' style='display: none'>" +
1396
1396
  $.map(available_keys, function(key) { return "<option value='" + key + "'>" + key + "</option>"; }).join("") +
1397
1397
  "</select>");
1398
1398
  } else {
@@ -1400,7 +1400,7 @@ Rich.Cms.Editor = (function() {
1400
1400
  }
1401
1401
  }
1402
1402
  });
1403
-
1403
+
1404
1404
  $("#rich_cms_panel .edit form fieldset.inputs div.keys select").bind("blur", function(event) {
1405
1405
  var select = $(event.target);
1406
1406
  var toggler = select.hide().closest(".keys").find(".toggler[data-name=" + select.attr("name") + "]").html(select.val()).show();
@@ -1412,7 +1412,7 @@ Rich.Cms.Editor = (function() {
1412
1412
  values.push(value);
1413
1413
  }
1414
1414
  });
1415
-
1415
+
1416
1416
  content_item.attr(toggler.attr("data-attr"), values.join(", "));
1417
1417
  });
1418
1418
 
@@ -1439,7 +1439,8 @@ Rich.Cms.Editor = (function() {
1439
1439
  var identifier = $.map(specs.keys, function(key) { return "[" + key + "^=" + response["__identifier__"][key.replace(/^data-/, "")] + "]"; }).join("");
1440
1440
 
1441
1441
  var defaultFunction = function(form, response, selector, specs, identifier) {
1442
- $(identifier).html(response[specs.value.replace(/^data-/, "")]);
1442
+ var value = response[specs.value.replace(/^data-/, "")];
1443
+ $(identifier).html(value).attr(specs.value, value);
1443
1444
  if (typeof(SeatHolder) != "undefined") {
1444
1445
  SeatHolder.rebind();
1445
1446
  }
@@ -1542,16 +1543,16 @@ Rich.Cms.Menu = (function() {
1542
1543
  if (typeof(RaccoonTip) == "undefined") {
1543
1544
 
1544
1545
  // *
1545
- // * RaccoonTip 1.0.8 (Uncompressed)
1546
+ // * RaccoonTip 1.0.9 (Uncompressed)
1546
1547
  // * A lightweight jQuery based balloon tip library
1547
1548
  // *
1548
1549
  // * This library requires jQuery (http://jquery.com)
1549
1550
  // *
1550
- // * (c) 2010 Paul Engel (Internetbureau Holder B.V.)
1551
+ // * (c) 2011 Paul Engel (Internetbureau Holder B.V.)
1551
1552
  // * Except otherwise noted, RaccoonTip is licensed under
1552
1553
  // * http://creativecommons.org/licenses/by-sa/3.0
1553
1554
  // *
1554
- // * $Date: 2010-10-17 13:37:39 +0100 (Sun, 17 October 2010) $
1555
+ // * $Date: 2011-02-24 02:43:21 +0100 (Thu, 24 February 2011) $
1555
1556
  // *
1556
1557
 
1557
1558
  RaccoonTip = (function() {
@@ -1559,7 +1560,6 @@ RaccoonTip = (function() {
1559
1560
  var css = '<style>#raccoon_tip{*padding:14px;position:absolute;z-index:9999}#raccoon_tip .rt_tip{width:0;font-size:0;line-height:0;position:absolute;filter:chroma(color=pink)}#raccoon_tip.rt_bottom_right{margin-left:-28px;padding-top:14px}#raccoon_tip.rt_bottom_right .rt_tip{top:0;left:14px;border-bottom-width:14px;border-bottom-style:solid;border-bottom-color:#f9e98e;border-right-width:14px;border-right-style:solid;border-right-color:transparent;*border-right-color:pink}#raccoon_tip.rt_bottom_middle{padding-top:14px}#raccoon_tip.rt_bottom_middle .rt_tip{top:0;left:50%;margin-left:-7px;border-bottom-width:14px;border-bottom-style:solid;border-bottom-color:#f9e98e;border-left-width:7px;border-left-style:solid;border-left-color:transparent;*border-left-color:pink;border-right-width:7px;border-right-style:solid;border-right-color:transparent;*border-right-color:pink}#raccoon_tip.rt_bottom_left{margin-left:28px;padding-top:14px}#raccoon_tip.rt_bottom_left .rt_tip{top:0;right:14px;border-bottom-width:14px;border-bottom-style:solid;border-bottom-color:#f9e98e;border-left-width:14px;border-left-style:solid;border-left-color:transparent;*border-left-color:pink}#raccoon_tip.rt_middle_left{margin-left:-7px;padding-right:14px}#raccoon_tip.rt_middle_left .rt_tip{top:50%;right:0;margin-top:-7px;border-left-width:14px;border-left-style:solid;border-left-color:#f9e98e;border-top-width:7px;border-top-style:solid;border-top-color:transparent;*border-top-color:pink;border-bottom-width:7px;border-bottom-style:solid;border-bottom-color:transparent;*border-bottom-color:pink}#raccoon_tip.rt_top_left{margin-left:28px;padding-bottom:14px}#raccoon_tip.rt_top_left .rt_tip{bottom:0;right:14px;border-top-width:14px;border-top-style:solid;border-top-color:#f9e98e;border-left-width:14px;border-left-style:solid;border-left-color:transparent;*border-left-color:pink}#raccoon_tip.rt_top_middle{padding-bottom:14px}#raccoon_tip.rt_top_middle .rt_tip{bottom:0;left:50%;margin-left:-7px;border-top-width:14px;border-top-style:solid;border-top-color:#f9e98e;border-left-width:7px;border-left-style:solid;border-left-color:transparent;*border-left-color:pink;border-right-width:7px;border-right-style:solid;border-right-color:transparent;*border-right-color:pink}#raccoon_tip.rt_top_right{margin-left:-28px;padding-bottom:14px}#raccoon_tip.rt_top_right .rt_tip{bottom:0;left:14px;border-top-width:14px;border-top-style:solid;border-top-color:#f9e98e;border-right-width:14px;border-right-style:solid;border-right-color:transparent;*border-right-color:pink}#raccoon_tip.rt_middle_right{margin-left:7px;padding-left:14px}#raccoon_tip.rt_middle_right .rt_tip{top:50%;left:0;margin-top:-7px;border-right-width:14px;border-right-style:solid;border-right-color:#f9e98e;border-top-width:7px;border-top-style:solid;border-top-color:transparent;*border-top-color:pink;border-bottom-width:7px;border-bottom-style:solid;border-bottom-color:transparent;*border-bottom-color:pink}#raccoon_tip .rt_content{padding:6px 12px 8px 12px;overflow:hidden;background:#fbf7aa;border-width:10px;border-style:solid;border-color:#f9e98e;*border-width:7px;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;box-shadow:rgba(0, 0, 0, 0.1) 0 1px 3px;-moz-box-shadow:rgba(0, 0, 0, 0.1) 0 1px 3px;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0 1px 3px}#raccoon_tip .rt_content,#raccoon_tip .rt_content a{color:#a27d35;text-shadow:none}#raccoon_tip .rt_content a{outline:0}</style>';
1560
1561
 
1561
1562
  var default_options = {event: "click", duration: "fast", position: "bottom_right", beforeShow: function() {}, canHide: function() { return true; }, afterHide: function() {}}, opts = null;
1562
- var displaying = false, mouseover = false;
1563
1563
 
1564
1564
  var register = function(target, content, options) {
1565
1565
  var attachFunction = $.inArray(options.event || default_options.event, ["focus"]) == -1 ? "live" : "bind";
@@ -1570,11 +1570,9 @@ RaccoonTip = (function() {
1570
1570
  };
1571
1571
 
1572
1572
  var display = function(target, content, options) {
1573
- displaying = true;
1574
1573
  setup();
1575
1574
  deriveOptions(target, content, options);
1576
1575
  show();
1577
- displaying = false;
1578
1576
  };
1579
1577
 
1580
1578
  var close = function() {
@@ -1583,8 +1581,9 @@ RaccoonTip = (function() {
1583
1581
 
1584
1582
  var setup = function() {
1585
1583
  if (!$("#raccoon_tip").length) {
1586
- $("body").mouseup(function(event) {
1587
- if (!displaying && !mouseover && opts.canHide.apply()) {
1584
+ $("body").mousedown(function(event) {
1585
+ var target = $(event.target);
1586
+ if (opts.canHide.apply() && target.closest("#raccoon_tip").length == 0) {
1588
1587
  hide();
1589
1588
  }
1590
1589
  });
@@ -1592,7 +1591,7 @@ RaccoonTip = (function() {
1592
1591
  $(document.body).before("<head></head>");
1593
1592
  }
1594
1593
  $(css).prependTo("head");
1595
- $(html).appendTo("body").find(".rt_content").mouseenter(function() { mouseover = true; }).mouseleave(function() { mouseover = false; });
1594
+ $(html).appendTo("body");
1596
1595
  } else {
1597
1596
  hide();
1598
1597
  }
@@ -1704,7 +1703,7 @@ RaccoonTip = (function() {
1704
1703
  };
1705
1704
 
1706
1705
  return {
1707
- version: "1.0.8",
1706
+ version: "1.0.9",
1708
1707
  init: function() {
1709
1708
  if (typeof(onRaccoonTipReady) == "function") {
1710
1709
  onRaccoonTipReady();
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rich_cms
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 0
10
- version: 3.0.0
9
+ - 1
10
+ version: 3.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Paul Engel
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-07 00:00:00 +01:00
18
+ date: 2011-04-06 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -155,7 +155,6 @@ files:
155
155
  - test/integrator.rb
156
156
  - test/rails-2/dummy/.bundle/config
157
157
  - test/rails-2/dummy/Gemfile
158
- - test/rails-2/dummy/Gemfile.lock
159
158
  - test/rails-2/dummy/Rakefile
160
159
  - test/rails-2/dummy/app/controllers/application_controller.rb
161
160
  - test/rails-2/dummy/app/helpers/application_helper.rb
@@ -208,7 +207,6 @@ files:
208
207
  - test/rails-2/test_helper.rb
209
208
  - test/rails-3/dummy/.bundle/config
210
209
  - test/rails-3/dummy/Gemfile
211
- - test/rails-3/dummy/Gemfile.lock
212
210
  - test/rails-3/dummy/Rakefile
213
211
  - test/rails-3/dummy/app/controllers/application_controller.rb
214
212
  - test/rails-3/dummy/app/helpers/application_helper.rb
@@ -308,7 +306,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
308
306
  requirements: []
309
307
 
310
308
  rubyforge_project:
311
- rubygems_version: 1.5.0
309
+ rubygems_version: 1.6.2
312
310
  signing_key:
313
311
  specification_version: 3
314
312
  summary: Enrichments (e9s) module for a pluggable CMS frontend
@@ -1,97 +0,0 @@
1
- PATH
2
- remote: /Users/paulengel/Sites/enrichments/vendor/foo/rich_cms
3
- specs:
4
- rich_cms (3.0.0)
5
- haml (~> 3.0.25)
6
- jzip (~> 1.0.11)
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- actionmailer (2.3.10)
12
- actionpack (= 2.3.10)
13
- actionpack (2.3.10)
14
- activesupport (= 2.3.10)
15
- rack (~> 1.1.0)
16
- activerecord (2.3.10)
17
- activesupport (= 2.3.10)
18
- activeresource (2.3.10)
19
- activesupport (= 2.3.10)
20
- activesupport (2.3.10)
21
- authlogic (2.1.6)
22
- activesupport
23
- capybara (0.4.1.1)
24
- celerity (>= 0.7.9)
25
- culerity (>= 0.2.4)
26
- mime-types (>= 1.16)
27
- nokogiri (>= 1.3.3)
28
- rack (>= 1.0.0)
29
- rack-test (>= 0.5.4)
30
- selenium-webdriver (>= 0.0.27)
31
- xpath (~> 0.1.3)
32
- celerity (0.8.7)
33
- childprocess (0.1.6)
34
- ffi (~> 0.6.3)
35
- configuration (1.2.0)
36
- culerity (0.2.15)
37
- devise (1.0.9)
38
- warden (~> 0.10.3)
39
- ffi (0.6.3)
40
- rake (>= 0.8.7)
41
- git (1.2.5)
42
- haml (3.0.25)
43
- jeweler (1.5.2)
44
- bundler (~> 1.0.0)
45
- git (>= 1.2.5)
46
- rake
47
- json_pure (1.5.1)
48
- jzip (1.0.11)
49
- launchy (0.3.7)
50
- configuration (>= 0.0.5)
51
- rake (>= 0.8.1)
52
- mime-types (1.16)
53
- mocha (0.9.10)
54
- rake
55
- mysql2 (0.2.6)
56
- nokogiri (1.4.4)
57
- rack (1.1.0)
58
- rack-test (0.5.7)
59
- rack (>= 1.0)
60
- rails (2.3.10)
61
- actionmailer (= 2.3.10)
62
- actionpack (= 2.3.10)
63
- activerecord (= 2.3.10)
64
- activeresource (= 2.3.10)
65
- activesupport (= 2.3.10)
66
- rake (>= 0.8.3)
67
- rake (0.8.7)
68
- rubyzip (0.9.4)
69
- selenium-webdriver (0.1.2)
70
- childprocess (~> 0.1.5)
71
- ffi (~> 0.6.3)
72
- json_pure
73
- rubyzip
74
- shoulda (2.11.3)
75
- sqlite3 (1.3.3)
76
- sqlite3-ruby (1.3.3)
77
- sqlite3 (>= 1.3.3)
78
- warden (0.10.7)
79
- rack (>= 1.0.0)
80
- xpath (0.1.3)
81
- nokogiri (~> 1.3)
82
-
83
- PLATFORMS
84
- ruby
85
-
86
- DEPENDENCIES
87
- authlogic
88
- capybara
89
- devise (~> 1.0.9)
90
- jeweler
91
- launchy
92
- mocha
93
- mysql2
94
- rails (= 2.3.10)
95
- rich_cms!
96
- shoulda
97
- sqlite3-ruby
@@ -1,139 +0,0 @@
1
- PATH
2
- remote: /Users/paulengel/Sites/enrichments/vendor/foo/rich_cms
3
- specs:
4
- rich_cms (3.0.0)
5
- haml (~> 3.0.25)
6
- jzip (~> 1.0.11)
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- abstract (1.0.0)
12
- actionmailer (3.0.3)
13
- actionpack (= 3.0.3)
14
- mail (~> 2.2.9)
15
- actionpack (3.0.3)
16
- activemodel (= 3.0.3)
17
- activesupport (= 3.0.3)
18
- builder (~> 2.1.2)
19
- erubis (~> 2.6.6)
20
- i18n (~> 0.4)
21
- rack (~> 1.2.1)
22
- rack-mount (~> 0.6.13)
23
- rack-test (~> 0.5.6)
24
- tzinfo (~> 0.3.23)
25
- activemodel (3.0.3)
26
- activesupport (= 3.0.3)
27
- builder (~> 2.1.2)
28
- i18n (~> 0.4)
29
- activerecord (3.0.3)
30
- activemodel (= 3.0.3)
31
- activesupport (= 3.0.3)
32
- arel (~> 2.0.2)
33
- tzinfo (~> 0.3.23)
34
- activeresource (3.0.3)
35
- activemodel (= 3.0.3)
36
- activesupport (= 3.0.3)
37
- activesupport (3.0.3)
38
- arel (2.0.7)
39
- authlogic (2.1.6)
40
- activesupport
41
- bcrypt-ruby (2.1.4)
42
- builder (2.1.2)
43
- capybara (0.4.1.1)
44
- celerity (>= 0.7.9)
45
- culerity (>= 0.2.4)
46
- mime-types (>= 1.16)
47
- nokogiri (>= 1.3.3)
48
- rack (>= 1.0.0)
49
- rack-test (>= 0.5.4)
50
- selenium-webdriver (>= 0.0.27)
51
- xpath (~> 0.1.3)
52
- celerity (0.8.7)
53
- childprocess (0.1.6)
54
- ffi (~> 0.6.3)
55
- configuration (1.2.0)
56
- culerity (0.2.15)
57
- devise (1.1.5)
58
- bcrypt-ruby (~> 2.1.2)
59
- warden (~> 1.0.2)
60
- erubis (2.6.6)
61
- abstract (>= 1.0.0)
62
- ffi (0.6.3)
63
- rake (>= 0.8.7)
64
- git (1.2.5)
65
- haml (3.0.25)
66
- i18n (0.5.0)
67
- jeweler (1.5.2)
68
- bundler (~> 1.0.0)
69
- git (>= 1.2.5)
70
- rake
71
- json_pure (1.5.1)
72
- jzip (1.0.11)
73
- launchy (0.3.7)
74
- configuration (>= 0.0.5)
75
- rake (>= 0.8.1)
76
- mail (2.2.15)
77
- activesupport (>= 2.3.6)
78
- i18n (>= 0.4.0)
79
- mime-types (~> 1.16)
80
- treetop (~> 1.4.8)
81
- mime-types (1.16)
82
- mocha (0.9.10)
83
- rake
84
- mysql2 (0.2.6)
85
- nokogiri (1.4.4)
86
- polyglot (0.3.1)
87
- rack (1.2.1)
88
- rack-mount (0.6.13)
89
- rack (>= 1.0.0)
90
- rack-test (0.5.7)
91
- rack (>= 1.0)
92
- rails (3.0.3)
93
- actionmailer (= 3.0.3)
94
- actionpack (= 3.0.3)
95
- activerecord (= 3.0.3)
96
- activeresource (= 3.0.3)
97
- activesupport (= 3.0.3)
98
- bundler (~> 1.0)
99
- railties (= 3.0.3)
100
- railties (3.0.3)
101
- actionpack (= 3.0.3)
102
- activesupport (= 3.0.3)
103
- rake (>= 0.8.7)
104
- thor (~> 0.14.4)
105
- rake (0.8.7)
106
- rubyzip (0.9.4)
107
- selenium-webdriver (0.1.2)
108
- childprocess (~> 0.1.5)
109
- ffi (~> 0.6.3)
110
- json_pure
111
- rubyzip
112
- shoulda (2.11.3)
113
- sqlite3 (1.3.3)
114
- sqlite3-ruby (1.3.3)
115
- sqlite3 (>= 1.3.3)
116
- thor (0.14.6)
117
- treetop (1.4.9)
118
- polyglot (>= 0.3.1)
119
- tzinfo (0.3.24)
120
- warden (1.0.3)
121
- rack (>= 1.0.0)
122
- xpath (0.1.3)
123
- nokogiri (~> 1.3)
124
-
125
- PLATFORMS
126
- ruby
127
-
128
- DEPENDENCIES
129
- authlogic
130
- capybara
131
- devise (~> 1.1.5)
132
- jeweler
133
- launchy
134
- mocha
135
- mysql2
136
- rails (= 3.0.3)
137
- rich_cms!
138
- shoulda
139
- sqlite3-ruby