editables 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
1
+ 0.0.7
@@ -79,18 +79,19 @@ module Editables
79
79
  src = "http://placehold.it/#{width}x#{height}"
80
80
  end
81
81
  html = ""
82
- if image.present? or can_edit?
83
- html += "<img src='#{src}' alt='#{name}' width='#{width}' height='#{height}' />"
84
- end
85
82
  if can_edit?
86
83
  html += [
87
- "<form action='/editables/image' method='post' enctype='multipart/form-data' id='#{form_id}' style='width:90px; height:35px; margin:-35px 10px 0 10px; overflow:hidden; position:relative; z-index:10' >",
84
+ "<a class='btn btn-mini pull-right' onclick='$(this).next().find(\"input[type=file]\").click()' style='margin:10px;margin-bottom:-40px;position:relative;z-index:1000;'>Upload</a>",
85
+ "<form action='/editables/image' method='post' enctype='multipart/form-data' id='#{form_id}' style='display:none' >",
88
86
  "<input type='file' name='editable_image[image]' onchange='$(\"##{form_id}\").submit()' style='border:none;padding0' />",
89
87
  "<input type='hidden' name='editable_image[name]' value='#{name}'/>",
90
88
  "<input type='hidden' name='authenticity_token' value='#{form_authenticity_token}'/>",
91
89
  "</form>"
92
90
  ].join(" ")
93
91
  end
92
+ if image.present? or can_edit?
93
+ html += "<img src='#{src}' alt='#{name}' width='#{width}' height='#{height}' />"
94
+ end
94
95
  # html += "</div>"
95
96
  html.html_safe
96
97
  end
data/editables.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "editables"
8
- s.version = "0.0.6"
8
+ s.version = "0.0.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Gabe Coyne"]
12
- s.date = "2013-04-26"
12
+ s.date = "2013-05-21"
13
13
  s.description = "Easy wysiwyg editing of website content and images"
14
14
  s.email = "gabe@killitcreative.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: editables
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
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: 2013-04-26 00:00:00.000000000 Z
12
+ date: 2013-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: shoulda
@@ -143,7 +143,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  segments:
145
145
  - 0
146
- hash: 201992576492553629
146
+ hash: 2958318681057866174
147
147
  required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  none: false
149
149
  requirements: