beef-admin_area 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ begin
10
10
  gem.homepage = "http://github.com/beef/admin"
11
11
  gem.authors = ["Steve England"]
12
12
  gem.add_dependency("clearance", [">= 0.6.6"])
13
- gem.add_dependency("thoughtbot-sortable_table")
13
+ gem.add_dependency("sortable_table")
14
14
  gem.add_dependency("will_paginate", ['>= 2.3.8'])
15
15
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
16
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{beef-admin_area}
8
- s.version = "0.2.4"
8
+ s.version = "0.2.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Steve England"]
12
- s.date = %q{2010-03-11}
12
+ s.date = %q{2010-05-11}
13
13
  s.email = %q{steve@wearebeef.co.uk}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -211,16 +211,16 @@ Gem::Specification.new do |s|
211
211
 
212
212
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
213
213
  s.add_runtime_dependency(%q<clearance>, [">= 0.6.6"])
214
- s.add_runtime_dependency(%q<thoughtbot-sortable_table>, [">= 0"])
214
+ s.add_runtime_dependency(%q<sortable_table>, [">= 0"])
215
215
  s.add_runtime_dependency(%q<will_paginate>, [">= 2.3.8"])
216
216
  else
217
217
  s.add_dependency(%q<clearance>, [">= 0.6.6"])
218
- s.add_dependency(%q<thoughtbot-sortable_table>, [">= 0"])
218
+ s.add_dependency(%q<sortable_table>, [">= 0"])
219
219
  s.add_dependency(%q<will_paginate>, [">= 2.3.8"])
220
220
  end
221
221
  else
222
222
  s.add_dependency(%q<clearance>, [">= 0.6.6"])
223
- s.add_dependency(%q<thoughtbot-sortable_table>, [">= 0"])
223
+ s.add_dependency(%q<sortable_table>, [">= 0"])
224
224
  s.add_dependency(%q<will_paginate>, [">= 2.3.8"])
225
225
  end
226
226
  end
@@ -1,2 +1,5 @@
1
1
  # A route should match 'admin_[entry_name]_path
2
- Beef::AdminArea::ADMIN_MENU = [:articles, :categories]
2
+ Beef::AdminArea::ADMIN_MENU = [:articles, :categories]
3
+
4
+ # http://www.imagemagick.org/RMagick/doc/struct.html#Geometry
5
+ #Asset.attachment_options[:thumbnails] = {:large => '700x395!', :medium => '340x192!', :thumb => '80x80!', :square => '60x60!' }
@@ -92,7 +92,7 @@ insertAtCursor = function(myField, myValue) {
92
92
  // http://www.saynotomilk.com/archives/33
93
93
  var AJ = {
94
94
  encode_authenticity_token:function(token) {
95
- return encodeURIComponent($(token).value);
95
+ return encodeURIComponent(token);
96
96
  },
97
97
 
98
98
  authenticity_token:function() {
@@ -34,6 +34,28 @@ saveEditorToElement = function(inst){
34
34
  inst.save();
35
35
  };
36
36
 
37
+ /*
38
+ This can be expanded as clients report issues with characters not being cufon-ed
39
+ The main reason for this conversion is that alot of fonts we use are not full fonts,
40
+ they do not have extended unicode range (missing Latin A or B most of the time, and forget
41
+ about cyrillic, greek/coptic and russian!)
42
+ */
43
+ tinyMCEcleanup = function(type, value){
44
+ // add more event types here for more cleanup points
45
+ // get_from_editor is trigger on html editor open and form submit
46
+ if(['get_from_editor'].indexOf(type) == -1) return value;
47
+ patterns = ["(\u2018|\u2019|&(r|l)squo;)","(\u201c|\u201d|&(r|l)squo;)"];
48
+ replacements = ["&apos;", '&quot;'];
49
+
50
+ $A(patterns).each(function(p, index){
51
+ r = replacements[index];
52
+ re=new RegExp(p,'ig');
53
+ value = value.replace(re,r);
54
+ });
55
+
56
+ return value;
57
+ }
58
+
37
59
  // Add image. insertAtCursor function in apllcation.js
38
60
  addImage = function(imageurl,alt) {
39
61
  tinyMCE.execInstanceCommand(tinyMCE.activeEditor.id,"mceInsertContent",false, '<img src="' + imageurl + '" alt="' + alt + '" />');
@@ -1,5 +1,5 @@
1
1
  class Admin::<%= controller_class_name %>Controller < Admin::BaseController
2
- sortable_attributes :created_at, :updated_at, :<%= attributes.collect{|a| a.name}.join(', :') %>
2
+ sortable_attributes :created_at, :updated_at<%= ", :" unless attributes.empty? %><%= attributes.collect{|a| a.name}.join(', :') %>
3
3
 
4
4
  def index
5
5
  @<%= table_name %> = <%= class_name %>.paginate :page => params[:page], :order => sort_order
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beef-admin_area
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve England
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-03-11 00:00:00 +00:00
12
+ date: 2010-05-11 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -23,7 +23,7 @@ dependencies:
23
23
  version: 0.6.6
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
- name: thoughtbot-sortable_table
26
+ name: sortable_table
27
27
  type: :runtime
28
28
  version_requirement:
29
29
  version_requirements: !ruby/object:Gem::Requirement