wysihat-engine 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.13
|
@@ -3,19 +3,19 @@ class WysihatFilesController < ApplicationController
|
|
3
3
|
@wysihat_file, @wysihat_files = WysihatFile.new, WysihatFile.all
|
4
4
|
render :layout => false
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
def create
|
8
|
-
@wysihat_file = WysihatFile.new(params[:wysihat_file])
|
9
|
-
|
8
|
+
@wysihat_file = WysihatFile.new(:file => params[:wysihat_file][:file])
|
9
|
+
|
10
10
|
responds_to_parent do
|
11
11
|
render :update do |page|
|
12
12
|
if(@wysihat_file.save)
|
13
|
-
page.insert_html :bottom, :wysihat_files, :partial => 'wysihat_file', :object => @wysihat_file
|
13
|
+
page.insert_html :bottom, :wysihat_files, :partial => 'wysihat_file', :object => @wysihat_file
|
14
14
|
end
|
15
|
-
end
|
15
|
+
end
|
16
16
|
end
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
def destroy
|
20
20
|
@wysihat_file = WysihatFile.find(params[:id])
|
21
21
|
respond_to do |wants|
|
@@ -1,13 +1,18 @@
|
|
1
1
|
module WysihatFilesHelper
|
2
|
-
def include_link(file)
|
2
|
+
def include_link(file)
|
3
3
|
function = file.file_content_type.starts_with?('image') ?
|
4
4
|
".insertImage(this.href);" :
|
5
5
|
".insertHTML('<a href=\"' + this.href + '\">#{file.file_file_name}</a>');"
|
6
6
|
|
7
7
|
link_to_function(
|
8
8
|
file.file_file_name,
|
9
|
-
"$$('iframe##{
|
9
|
+
"$$('iframe##{editor_id}')[0]#{function}facebox.close();",
|
10
10
|
:href => file.file.url
|
11
11
|
)
|
12
12
|
end
|
13
|
+
|
14
|
+
def editor_id
|
15
|
+
return params[:wysihat_file][:editor] if params[:wysihat_file] && params[:wysihat_file][:editor]
|
16
|
+
params[:editor]
|
17
|
+
end
|
13
18
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
<% form_for @wysihat_file, :html => { :multipart => true, :target => 'file_upload' } do |f| %>
|
2
|
-
|
2
|
+
|
3
|
+
<%= f.hidden_field(:editor, :value => params[:editor]) %>
|
4
|
+
|
3
5
|
<p>
|
4
6
|
<%= f.label :file %><br/>
|
5
7
|
<%= f.file_field :file %>
|
@@ -7,7 +9,7 @@
|
|
7
9
|
<p>
|
8
10
|
<%= f.submit %>
|
9
11
|
</p>
|
10
|
-
|
12
|
+
|
11
13
|
<% end %>
|
12
14
|
|
13
15
|
<iframe id='file_upload' name="file_upload" style="width:1px;height:1px;border:0px" src="about:blank"></iframe>
|
data/wysihat-engine.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{wysihat-engine}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.13"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jeff Kreeftmeijer"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-06-04}
|
13
13
|
s.description = %q{A Rails engine to help integrate the 37signals WysiHat rich text editor to your application.}
|
14
14
|
s.email = %q{jeff@80beans.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -78,7 +78,7 @@ Gem::Specification.new do |s|
|
|
78
78
|
s.homepage = %q{http://www.80beans.com/2009/10/01/wysihat-engine/}
|
79
79
|
s.rdoc_options = ["--charset=UTF-8"]
|
80
80
|
s.require_paths = ["lib"]
|
81
|
-
s.rubygems_version = %q{1.3.
|
81
|
+
s.rubygems_version = %q{1.3.6}
|
82
82
|
s.summary = %q{A Rails engine to help integrate the 37signals WysiHat rich text editor to your application.}
|
83
83
|
|
84
84
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wysihat-engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 13
|
9
|
+
version: 0.1.13
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Jeff Kreeftmeijer
|
@@ -9,29 +14,37 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-06-04 00:00:00 +02:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: yui-compressor
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
- 9
|
30
|
+
- 1
|
23
31
|
version: 0.9.1
|
24
|
-
|
32
|
+
type: :development
|
33
|
+
version_requirements: *id001
|
25
34
|
- !ruby/object:Gem::Dependency
|
26
35
|
name: paperclip
|
27
|
-
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
38
|
requirements:
|
31
39
|
- - ">="
|
32
40
|
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 2
|
43
|
+
- 3
|
44
|
+
- 1
|
33
45
|
version: 2.3.1
|
34
|
-
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
35
48
|
description: A Rails engine to help integrate the 37signals WysiHat rich text editor to your application.
|
36
49
|
email: jeff@80beans.com
|
37
50
|
executables: []
|
@@ -112,18 +125,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
125
|
requirements:
|
113
126
|
- - ">="
|
114
127
|
- !ruby/object:Gem::Version
|
128
|
+
segments:
|
129
|
+
- 0
|
115
130
|
version: "0"
|
116
|
-
version:
|
117
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
132
|
requirements:
|
119
133
|
- - ">="
|
120
134
|
- !ruby/object:Gem::Version
|
135
|
+
segments:
|
136
|
+
- 0
|
121
137
|
version: "0"
|
122
|
-
version:
|
123
138
|
requirements: []
|
124
139
|
|
125
140
|
rubyforge_project:
|
126
|
-
rubygems_version: 1.3.
|
141
|
+
rubygems_version: 1.3.6
|
127
142
|
signing_key:
|
128
143
|
specification_version: 3
|
129
144
|
summary: A Rails engine to help integrate the 37signals WysiHat rich text editor to your application.
|