editables 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/app/helpers/editables/application_helper.rb +5 -4
- data/editables.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
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
|
-
"<
|
|
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.
|
|
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-
|
|
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.
|
|
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-
|
|
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:
|
|
146
|
+
hash: 2958318681057866174
|
|
147
147
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
none: false
|
|
149
149
|
requirements:
|