My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 67 attachment: tinymce_diff (5.6 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
Index: plugins/substruct/app/controllers/admin/content_nodes_controller.rb
===================================================================
--- plugins/substruct/app/controllers/admin/content_nodes_controller.rb (revision 43)
+++ plugins/substruct/app/controllers/admin/content_nodes_controller.rb (working copy)
@@ -1,4 +1,6 @@
class Admin::ContentNodesController < Admin::BaseController
+
+ uses_tiny_mce(:options => TinyMCEOptions)
before_filter :set_sections

def index
Index: plugins/substruct/app/controllers/admin/products_controller.rb
===================================================================
--- plugins/substruct/app/controllers/admin/products_controller.rb (revision 43)
+++ plugins/substruct/app/controllers/admin/products_controller.rb (working copy)
@@ -1,4 +1,6 @@
class Admin::ProductsController < Admin::BaseController
+
+ uses_tiny_mce(:options => TinyMCEOptions.merge({ :width => "500"}))
before_filter :set_tags

def index
@@ -242,4 +244,4 @@
#
def set_tags
@tags = Tag.find_ordered_parents
- end
\ No newline at end of file
+ end
Index: plugins/substruct/app/views/layouts/admin.rhtml
===================================================================
--- plugins/substruct/app/views/layouts/admin.rhtml (revision 43)
+++ plugins/substruct/app/views/layouts/admin.rhtml (working copy)
@@ -9,6 +9,8 @@
h controller.controller_name
end
-%> : Substruct ADMIN</title>
+ <%= javascript_include_tiny_mce_if_used %>
+ <%= tiny_mce if using_tiny_mce? %>
<%= javascript_include_tag :defaults %>
<%= javascript_include_tag 'substruct', 'subModal', :plugin => 'substruct' %>
<%= stylesheet_link_tag 'admin', 'subModal', :plugin => 'substruct' %>
Index: plugins/substruct/app/views/admin/products/_form.rhtml
===================================================================
--- plugins/substruct/app/views/admin/products/_form.rhtml (revision 43)
+++ plugins/substruct/app/views/admin/products/_form.rhtml (working copy)
@@ -68,52 +68,56 @@
<h1>Details</h1>

<div class="padLeft">
- <div class="float" style="width:230px;">
-
- <p>
- <label>
- <%= check_box('product', 'is_discontinued', :class => 'inline') %>
- Product is discontinued
- </label>
- <span class="info">
- Discontinued products will continue to show on the site until there are no more in stock.
- </span>
- </p>
-
- <p>
- <%= make_label('Date available') %>
- <%= date_select 'product', 'date_available' %>
- </p>
-
- <div class="float">
- <p>
- <%= make_label('Width') %>
- <%= text_field 'product', 'size_width', :size => '10', :class => 'textInput' %>
- <br/>
- <span class="info">(inches)</span>
- </p>
- <p>
- <%= make_label('Depth') %>
- <%= text_field 'product', 'size_depth', :size => '10', :class => 'textInput' %>
- <br/>
- <span class="info">(inches)</span>
- </p>
- </div>
-
- <div class="float">
- <p>
- <%= make_label('Height') %>
- <%= text_field 'product', 'size_height', :size => '10', :class => 'textInput' %>
- <br/>
- <span class="info">(inches)</span>
- </p>
- <p>
- <%= make_label('Weight') %>
- <%= text_field 'product', 'weight', :size => '10', :class => 'textInput' %>
- <br/>
- <span class="info">(pounds)</span>
- </p>
- </div>
+ <div>
+ <div class="float">
+ <p>
+ <label>
+ <%= check_box('product', 'is_discontinued', :class => 'inline') %>
+ Product is discontinued
+ </label>
+ <span class="info">
+ Discontinued products will continue to show on the site until there are no more in stock.
+ </span>
+ </p>
+ </div>
+ <div class="float">
+ <p>
+ <%= make_label('Date available') %>
+ <%= date_select 'product', 'date_available' %>
+ </p>
+ </div>
+ <div class="float">
+ <p>
+ <%= make_label('Width') %>
+ <%= text_field 'product', 'size_width', :size => '10', :class => 'textInput' %>
+ <br/>
+ <span class="info">(inches)</span>
+ </p>
+ </div>
+ <div class="float">
+ <p>
+ <%= make_label('Height') %>
+ <%= text_field 'product', 'size_height', :size => '10', :class => 'textInput' %>
+ <br/>
+ <span class="info">(inches)</span>
+ </p>
+ </div>
+ <div class="float">
+ <p>
+ <%= make_label('Depth') %>
+ <%= text_field 'product', 'size_depth', :size => '10', :class => 'textInput' %>
+ <br/>
+ <span class="info">(inches)</span>
+ </p>
+ </div>
+ <div class="float">
+ <p>
+ <%= make_label('Weight') %>
+ <%= text_field 'product', 'weight', :size => '10', :class => 'textInput' %>
+ <br/>
+ <span class="info">(pounds)</span>
+ </p>
+ </div>
<div class="clear">&nbsp;</div>

</div>
@@ -125,7 +129,7 @@
HTML and <a href="http://hobix.com/textile/" target="_blank">Textile</a> markup is allowed here.
</span>
<br/>
- <%= text_area 'product', 'description', :rows => 14, :class => 'textArea' %>
+ <%= text_area 'product', 'description', :rows => 14, :class => 'textArea' %>
</p>
</div>

Index: plugins/substruct/lib/substruct.rb
===================================================================
--- plugins/substruct/lib/substruct.rb (revision 43)
+++ plugins/substruct/lib/substruct.rb (working copy)
@@ -2,6 +2,12 @@
require_dependency 'substruct/login_system.rb'

module Substruct
+ #TinyMCE Options
+ TinyMCEOptions = {:theme => "advanced",
+ :plugins => "table",
+ :theme_advanced_buttons3_add_before => "tablecontrols,separator",
+ :theme_advanced_toolbar_location => "top"}
+
# Should we use live rate calculation via FedEx?
mattr_accessor :use_live_rate_calculation
self.use_live_rate_calculation = false
Powered by Google Project Hosting