muck-contents 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/controllers/muck/tiny_mce_controller.rb +16 -1
- data/app/helpers/tinymce_helper.rb +22 -3
- data/app/views/contents/_form.html.erb +3 -2
- data/app/views/tiny_mce/images.html.erb +1 -1
- data/app/views/tiny_mce/links.html.erb +320 -328
- data/config/muck_contents_routes.rb +1 -0
- data/locales/en.yml +2 -0
- data/muck-contents.gemspec +4 -6
- data/public/javascripts/tiny_mce/plugins/advlinktoo/editor_plugin.js +7 -7
- data/public/javascripts/tiny_mce/plugins/advlinktoo/editor_plugin_src.js +7 -7
- data/public/javascripts/tiny_mce/plugins/advlinktoo/js/{advlink.js → functions.js} +0 -23
- data/public/stylesheets/tinymce.css +1 -1
- data/test/rails_root/public/javascripts/tiny_mce/plugins/advlinktoo/editor_plugin.js +7 -7
- data/test/rails_root/public/javascripts/tiny_mce/plugins/advlinktoo/editor_plugin_src.js +7 -7
- data/test/rails_root/public/javascripts/tiny_mce/plugins/advlinktoo/js/{advlink.js → functions.js} +0 -23
- metadata +4 -6
- data/test/rails_root/public/javascripts/tiny_mce/plugins/advlinktoo/css/advlink.css +0 -8
- data/test/rails_root/public/javascripts/tiny_mce/plugins/advlinktoo/link.htm +0 -344
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.7
|
@@ -44,6 +44,13 @@ class Muck::TinyMceController < ApplicationController
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
def links_for_content
|
48
|
+
@contents = Content.by_alpha
|
49
|
+
respond_to do |format|
|
50
|
+
format.json { render :json => autocomplete_urls_json(@contents) }
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
47
54
|
protected
|
48
55
|
def make_json(uploads)
|
49
56
|
return [] if uploads.blank?
|
@@ -53,5 +60,13 @@ class Muck::TinyMceController < ApplicationController
|
|
53
60
|
def json_options
|
54
61
|
{ :only => [:id], :methods => [:icon, :thumb, :file_name] }
|
55
62
|
end
|
56
|
-
|
63
|
+
|
64
|
+
def autocomplete_urls_json(items)
|
65
|
+
return '' if items.blank?
|
66
|
+
ActiveRecord::Base.include_root_in_json = false
|
67
|
+
json = items.collect{|item| item.as_json(:only => [:title], :methods => [:uri]) }
|
68
|
+
ActiveRecord::Base.include_root_in_json = true
|
69
|
+
json
|
70
|
+
end
|
71
|
+
|
57
72
|
end
|
@@ -18,11 +18,30 @@ module TinymceHelper
|
|
18
18
|
<input id="tiny_mce_images_path" type="hidden" value="#{tiny_mce_images_path}">
|
19
19
|
<input id="tiny_mce_images_width" type="hidden" value="#{options[:tiny_mce_images_width] || 675}">
|
20
20
|
<input id="tiny_mce_images_height" type="hidden" value="#{options[:tiny_mce_images_height] || 560}">
|
21
|
-
<input id="tiny_mce_links_path" type="hidden" value="#{tiny_mce_links_path}">
|
21
|
+
<input id="tiny_mce_links_path" type="hidden" value="#{tiny_mce_links_path}">
|
22
|
+
<input id="tiny_mce_links_width" type="hidden" value="#{options[:tiny_mce_images_width] || 480}">
|
23
|
+
<input id="tiny_mce_links_height" type="hidden" value="#{options[:tiny_mce_images_height] || 480}">}
|
22
24
|
end
|
23
25
|
|
24
|
-
|
25
|
-
|
26
|
+
# Output a form capable of uploading files to the server.
|
27
|
+
# This method is a wrapper for the upload_form found in the uploader gem.
|
28
|
+
# parent: The object to which the uploads will be attached
|
29
|
+
# display_upload_indicators: Indicates whether or not to show the upload progress
|
30
|
+
# container_prefix: Prefixes each id in the html with the specified text. Useful if there is to be more than one form on a page.
|
31
|
+
# options: Options to pass to the swf javascript for setting up the swfupload object:
|
32
|
+
# upload_url: Url to upload to. Default is '<%= new_upload_path_with_session_information(parent) %>'
|
33
|
+
# file_size_limit: Largest allowable file size. Default is '100 MB'
|
34
|
+
# file_types: Allowed file types. Default is "*.*"
|
35
|
+
# file_types_description: Description for file types. Default is "All Files"
|
36
|
+
# file_upload_limit: Maximum number of files per upload. Default is 100
|
37
|
+
# button_image_url: Url of button image to use for swf upload. Default is "/images/SWFUploadButton.png"
|
38
|
+
# button_width: Width of the image button being used. Default is 61
|
39
|
+
# button_height: Height of the button being used. Default is 22
|
40
|
+
# transparent: Turns the swfupload transparent so you can use the html behind it for the upload button.
|
41
|
+
# This will override any settings provided for button_image_url
|
42
|
+
# transparent_html: If transparent is true this html will be rendered under the transparent swfupload button.
|
43
|
+
def tiny_mce_upload_form(parent, display_upload_indicators = true, container_prefix = '', options = {})
|
44
|
+
upload_form(parent, display_upload_indicators, container_prefix, {:upload_url =>new_upload_path_with_session_information(parent, 'json')}.merge(options))
|
26
45
|
end
|
27
46
|
|
28
47
|
# Renders script required for a single tinymce editor on a page. This script will enable
|
@@ -15,9 +15,10 @@ message_id = "#{content.dom_id}_message"
|
|
15
15
|
<div id="<%= "#{content.dom_id}" %>" class="content_editor">
|
16
16
|
<% custom_form_for(content, :url => get_content_form_url(@parent, @content), :html => html.merge(:id => form_id, :class => 'content_form') ) do |f| -%>
|
17
17
|
<%= f.text_field :title, {:class => 'title', :tip => t('muck.contents.title_help'), :label => t('muck.contents.title_label') } %>
|
18
|
-
<%= f.
|
19
|
-
<%= capture(f, &block) %>
|
18
|
+
<%= f.text_field :tag_list, {:class => 'tags', :tip => t('muck.contents.tags_help'), :label => t('muck.contents.tags_label') } %>
|
20
19
|
<%= f.muck_select(:layout, :value, :name, t('muck.contents.choose_layout'), @content_layouts, {:tip => t('muck.contents.choose_layout_help')}) %>
|
20
|
+
<%= capture(f, &block) %>
|
21
|
+
<%= f.text_area :body_raw, {:label => t('muck.contents.content_label'), :class => 'mceEditor', :id => mce_id, :tip_key => mce_id, :tip => t('muck.contents.content_help') } %>
|
21
22
|
<div class="button form-row">
|
22
23
|
<%= f.submit t('muck.contents.submit_content_button'), :class => "button share-submit", :id => "content_submit_#{content.dom_id}" %>
|
23
24
|
<%= f.hidden_field :uri_path unless content.uri_path.blank? %>
|
@@ -1,328 +1,320 @@
|
|
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
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
<div style="float: right">
|
323
|
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
324
|
-
</div>
|
325
|
-
</div>
|
326
|
-
</form>
|
327
|
-
</body>
|
328
|
-
</html>
|
1
|
+
<form onsubmit="insertAction();return false;" action="#">
|
2
|
+
<div class="tabs">
|
3
|
+
<ul>
|
4
|
+
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li>
|
5
|
+
<li id="popup_tab"><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li>
|
6
|
+
<li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li>
|
7
|
+
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li>
|
8
|
+
</ul>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="panel_wrapper">
|
12
|
+
<div id="general_panel" class="panel current">
|
13
|
+
<fieldset>
|
14
|
+
<legend>{#advlink_dlg.general_props}</legend>
|
15
|
+
<table border="0" cellpadding="4" cellspacing="0">
|
16
|
+
<tr>
|
17
|
+
<td nowrap="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td>
|
18
|
+
<td><table border="0" cellspacing="0" cellpadding="0">
|
19
|
+
<tr>
|
20
|
+
<td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td>
|
21
|
+
<td id="hrefbrowsercontainer"> </td>
|
22
|
+
</tr>
|
23
|
+
</table></td>
|
24
|
+
</tr>
|
25
|
+
<tr id="linklisthrefrow">
|
26
|
+
<td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td>
|
27
|
+
<td colspan="2" id="linklisthrefcontainer"> </td>
|
28
|
+
</tr>
|
29
|
+
<tr>
|
30
|
+
<td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td>
|
31
|
+
<td colspan="2" id="anchorlistcontainer"> </td>
|
32
|
+
</tr>
|
33
|
+
<tr>
|
34
|
+
<td><label id="targetlistlabel" for="targetlist">{#advlink_dlg.target}</label></td>
|
35
|
+
<td id="targetlistcontainer"> </td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td nowrap="nowrap"><label id="titlelabel" for="title">{#advlink_dlg.titlefield}</label></td>
|
39
|
+
<td><input id="title" name="title" type="text" value="" /></td>
|
40
|
+
</tr>
|
41
|
+
<tr>
|
42
|
+
<td><label id="classlabel" for="classlist">{#class_name}</label></td>
|
43
|
+
<td>
|
44
|
+
<select id="classlist" name="classlist" onchange="changeClass();">
|
45
|
+
<option value="" selected>{#not_set}</option>
|
46
|
+
</select>
|
47
|
+
</td>
|
48
|
+
</tr>
|
49
|
+
</table>
|
50
|
+
</fieldset>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div id="popup_panel" class="panel">
|
54
|
+
<fieldset>
|
55
|
+
<legend>{#advlink_dlg.popup_props}</legend>
|
56
|
+
<input type="checkbox" id="ispopup" name="ispopup" class="radio" onclick="setPopupControlsDisabled(!this.checked);buildOnClick();" />
|
57
|
+
<label id="ispopuplabel" for="ispopup">{#advlink_dlg.popup}</label>
|
58
|
+
<table border="0" cellpadding="0" cellspacing="4">
|
59
|
+
<tr>
|
60
|
+
<td nowrap="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label> </td>
|
61
|
+
<td>
|
62
|
+
<table border="0" cellspacing="0" cellpadding="0">
|
63
|
+
<tr>
|
64
|
+
<td><input type="text" name="popupurl" id="popupurl" value="" onchange="buildOnClick();" /></td>
|
65
|
+
<td id="popupurlbrowsercontainer"> </td>
|
66
|
+
</tr>
|
67
|
+
</table>
|
68
|
+
</td>
|
69
|
+
</tr>
|
70
|
+
<tr>
|
71
|
+
<td nowrap="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label> </td>
|
72
|
+
<td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td>
|
73
|
+
</tr>
|
74
|
+
<tr>
|
75
|
+
<td nowrap="nowrap"><label>{#advlink_dlg.popup_size}</label> </td>
|
76
|
+
<td nowrap="nowrap">
|
77
|
+
<input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x
|
78
|
+
<input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px
|
79
|
+
</td>
|
80
|
+
</tr>
|
81
|
+
<tr>
|
82
|
+
<td nowrap="nowrap" id="labelleft"><label>{#advlink_dlg.popup_position}</label> </td>
|
83
|
+
<td nowrap="nowrap">
|
84
|
+
<input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> /
|
85
|
+
<input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center)
|
86
|
+
</td>
|
87
|
+
</tr>
|
88
|
+
</table>
|
89
|
+
<fieldset>
|
90
|
+
<legend>{#advlink_dlg.popup_opts}</legend>
|
91
|
+
<table border="0" cellpadding="0" cellspacing="4">
|
92
|
+
<tr>
|
93
|
+
<td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td>
|
94
|
+
<td nowrap="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td>
|
95
|
+
<td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td>
|
96
|
+
<td nowrap="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{#advlink_dlg.popup_scrollbars}</label></td>
|
97
|
+
</tr>
|
98
|
+
<tr>
|
99
|
+
<td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td>
|
100
|
+
<td nowrap="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{#advlink_dlg.popup_menubar}</label></td>
|
101
|
+
<td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td>
|
102
|
+
<td nowrap="nowrap"><label id="popupresizablelabel" for="popupresizable">{#advlink_dlg.popup_resizable}</label></td>
|
103
|
+
</tr>
|
104
|
+
<tr>
|
105
|
+
<td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td>
|
106
|
+
<td nowrap="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{#advlink_dlg.popup_toolbar}</label></td>
|
107
|
+
<td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td>
|
108
|
+
<td nowrap="nowrap"><label id="popupdependentlabel" for="popupdependent">{#advlink_dlg.popup_dependent}</label></td>
|
109
|
+
</tr>
|
110
|
+
<tr>
|
111
|
+
<td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td>
|
112
|
+
<td nowrap="nowrap"><label id="popupstatuslabel" for="popupstatus">{#advlink_dlg.popup_statusbar}</label></td>
|
113
|
+
<td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td>
|
114
|
+
<td nowrap="nowrap"><label id="popupreturnlabel" for="popupreturn">{#advlink_dlg.popup_return}</label></td>
|
115
|
+
</tr>
|
116
|
+
</table>
|
117
|
+
</fieldset>
|
118
|
+
</fieldset>
|
119
|
+
</div>
|
120
|
+
|
121
|
+
<div id="advanced_panel" class="panel">
|
122
|
+
<fieldset>
|
123
|
+
<legend>{#advlink_dlg.advanced_props}</legend>
|
124
|
+
<table border="0" cellpadding="0" cellspacing="4">
|
125
|
+
<tr>
|
126
|
+
<td class="column1"><label id="idlabel" for="id">{#advlink_dlg.id}</label></td>
|
127
|
+
<td><input id="id" name="id" type="text" value="" /></td>
|
128
|
+
</tr>
|
129
|
+
<tr>
|
130
|
+
<td><label id="stylelabel" for="style">{#advlink_dlg.style}</label></td>
|
131
|
+
<td><input type="text" id="style" name="style" value="" /></td>
|
132
|
+
</tr>
|
133
|
+
<tr>
|
134
|
+
<td><label id="classeslabel" for="classes">{#advlink_dlg.classes}</label></td>
|
135
|
+
<td><input type="text" id="classes" name="classes" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
|
136
|
+
</tr>
|
137
|
+
<tr>
|
138
|
+
<td><label id="targetlabel" for="target">{#advlink_dlg.target_name}</label></td>
|
139
|
+
<td><input type="text" id="target" name="target" value="" onchange="selectByValue(this.form,'targetlist',this.value,true);" /></td>
|
140
|
+
</tr>
|
141
|
+
<tr>
|
142
|
+
<td class="column1"><label id="dirlabel" for="dir">{#advlink_dlg.langdir}</label></td>
|
143
|
+
<td>
|
144
|
+
<select id="dir" name="dir">
|
145
|
+
<option value="">{#not_set}</option>
|
146
|
+
<option value="ltr">{#advlink_dlg.ltr}</option>
|
147
|
+
<option value="rtl">{#advlink_dlg.rtl}</option>
|
148
|
+
</select>
|
149
|
+
</td>
|
150
|
+
</tr>
|
151
|
+
<tr>
|
152
|
+
<td><label id="hreflanglabel" for="hreflang">{#advlink_dlg.target_langcode}</label></td>
|
153
|
+
<td><input type="text" id="hreflang" name="hreflang" value="" /></td>
|
154
|
+
</tr>
|
155
|
+
<tr>
|
156
|
+
<td class="column1"><label id="langlabel" for="lang">{#advlink_dlg.langcode}</label></td>
|
157
|
+
<td>
|
158
|
+
<input id="lang" name="lang" type="text" value="" />
|
159
|
+
</td>
|
160
|
+
</tr>
|
161
|
+
<tr>
|
162
|
+
<td><label id="charsetlabel" for="charset">{#advlink_dlg.encoding}</label></td>
|
163
|
+
<td><input type="text" id="charset" name="charset" value="" /></td>
|
164
|
+
</tr>
|
165
|
+
<tr>
|
166
|
+
<td><label id="typelabel" for="type">{#advlink_dlg.mime}</label></td>
|
167
|
+
<td><input type="text" id="type" name="type" value="" /></td>
|
168
|
+
</tr>
|
169
|
+
<tr>
|
170
|
+
<td><label id="rellabel" for="rel">{#advlink_dlg.rel}</label></td>
|
171
|
+
<td><select id="rel" name="rel">
|
172
|
+
<option value="">{#not_set}</option>
|
173
|
+
<option value="lightbox">Lightbox</option>
|
174
|
+
<option value="alternate">Alternate</option>
|
175
|
+
<option value="designates">Designates</option>
|
176
|
+
<option value="stylesheet">Stylesheet</option>
|
177
|
+
<option value="start">Start</option>
|
178
|
+
<option value="next">Next</option>
|
179
|
+
<option value="prev">Prev</option>
|
180
|
+
<option value="contents">Contents</option>
|
181
|
+
<option value="index">Index</option>
|
182
|
+
<option value="glossary">Glossary</option>
|
183
|
+
<option value="copyright">Copyright</option>
|
184
|
+
<option value="chapter">Chapter</option>
|
185
|
+
<option value="subsection">Subsection</option>
|
186
|
+
<option value="appendix">Appendix</option>
|
187
|
+
<option value="help">Help</option>
|
188
|
+
<option value="bookmark">Bookmark</option>
|
189
|
+
<option value="nofollow">No Follow</option>
|
190
|
+
<option value="tag">Tag</option>
|
191
|
+
</select>
|
192
|
+
</td>
|
193
|
+
</tr>
|
194
|
+
<tr>
|
195
|
+
<td><label id="revlabel" for="rev">{#advlink_dlg.rev}</label></td>
|
196
|
+
<td><select id="rev" name="rev">
|
197
|
+
<option value="">{#not_set}</option>
|
198
|
+
<option value="alternate">Alternate</option>
|
199
|
+
<option value="designates">Designates</option>
|
200
|
+
<option value="stylesheet">Stylesheet</option>
|
201
|
+
<option value="start">Start</option>
|
202
|
+
<option value="next">Next</option>
|
203
|
+
<option value="prev">Prev</option>
|
204
|
+
<option value="contents">Contents</option>
|
205
|
+
<option value="index">Index</option>
|
206
|
+
<option value="glossary">Glossary</option>
|
207
|
+
<option value="copyright">Copyright</option>
|
208
|
+
<option value="chapter">Chapter</option>
|
209
|
+
<option value="subsection">Subsection</option>
|
210
|
+
<option value="appendix">Appendix</option>
|
211
|
+
<option value="help">Help</option>
|
212
|
+
<option value="bookmark">Bookmark</option>
|
213
|
+
</select>
|
214
|
+
</td>
|
215
|
+
</tr>
|
216
|
+
<tr>
|
217
|
+
<td><label id="tabindexlabel" for="tabindex">{#advlink_dlg.tabindex}</label></td>
|
218
|
+
<td><input type="text" id="tabindex" name="tabindex" value="" /></td>
|
219
|
+
</tr>
|
220
|
+
<tr>
|
221
|
+
<td><label id="accesskeylabel" for="accesskey">{#advlink_dlg.accesskey}</label></td>
|
222
|
+
<td><input type="text" id="accesskey" name="accesskey" value="" /></td>
|
223
|
+
</tr>
|
224
|
+
</table>
|
225
|
+
</fieldset>
|
226
|
+
</div>
|
227
|
+
|
228
|
+
<div id="events_panel" class="panel">
|
229
|
+
<fieldset>
|
230
|
+
<legend>{#advlink_dlg.event_props}</legend>
|
231
|
+
<table border="0" cellpadding="0" cellspacing="4">
|
232
|
+
<tr>
|
233
|
+
<td class="column1"><label for="onfocus">onfocus</label></td>
|
234
|
+
<td><input id="onfocus" name="onfocus" type="text" value="" /></td>
|
235
|
+
</tr>
|
236
|
+
<tr>
|
237
|
+
<td class="column1"><label for="onblur">onblur</label></td>
|
238
|
+
<td><input id="onblur" name="onblur" type="text" value="" /></td>
|
239
|
+
</tr>
|
240
|
+
<tr>
|
241
|
+
<td class="column1"><label for="onclick">onclick</label></td>
|
242
|
+
<td><input id="onclick" name="onclick" type="text" value="" /></td>
|
243
|
+
</tr>
|
244
|
+
<tr>
|
245
|
+
<td class="column1"><label for="ondblclick">ondblclick</label></td>
|
246
|
+
<td><input id="ondblclick" name="ondblclick" type="text" value="" /></td>
|
247
|
+
</tr>
|
248
|
+
<tr>
|
249
|
+
<td class="column1"><label for="onmousedown">onmousedown</label></td>
|
250
|
+
<td><input id="onmousedown" name="onmousedown" type="text" value="" /></td>
|
251
|
+
</tr>
|
252
|
+
<tr>
|
253
|
+
<td class="column1"><label for="onmouseup">onmouseup</label></td>
|
254
|
+
<td><input id="onmouseup" name="onmouseup" type="text" value="" /></td>
|
255
|
+
</tr>
|
256
|
+
<tr>
|
257
|
+
<td class="column1"><label for="onmouseover">onmouseover</label></td>
|
258
|
+
<td><input id="onmouseover" name="onmouseover" type="text" value="" /></td>
|
259
|
+
</tr>
|
260
|
+
<tr>
|
261
|
+
<td class="column1"><label for="onmousemove">onmousemove</label></td>
|
262
|
+
<td><input id="onmousemove" name="onmousemove" type="text" value="" /></td>
|
263
|
+
</tr>
|
264
|
+
<tr>
|
265
|
+
<td class="column1"><label for="onmouseout">onmouseout</label></td>
|
266
|
+
<td><input id="onmouseout" name="onmouseout" type="text" value="" /></td>
|
267
|
+
</tr>
|
268
|
+
<tr>
|
269
|
+
<td class="column1"><label for="onkeypress">onkeypress</label></td>
|
270
|
+
<td><input id="onkeypress" name="onkeypress" type="text" value="" /></td>
|
271
|
+
</tr>
|
272
|
+
<tr>
|
273
|
+
<td class="column1"><label for="onkeydown">onkeydown</label></td>
|
274
|
+
<td><input id="onkeydown" name="onkeydown" type="text" value="" /></td>
|
275
|
+
</tr>
|
276
|
+
<tr>
|
277
|
+
<td class="column1"><label for="onkeyup">onkeyup</label></td>
|
278
|
+
<td><input id="onkeyup" name="onkeyup" type="text" value="" /></td>
|
279
|
+
</tr>
|
280
|
+
</table>
|
281
|
+
</fieldset>
|
282
|
+
</div>
|
283
|
+
</div>
|
284
|
+
|
285
|
+
<div class="mceActionPanel">
|
286
|
+
<div style="float: left">
|
287
|
+
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
288
|
+
</div>
|
289
|
+
<div style="float: right">
|
290
|
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
291
|
+
</div>
|
292
|
+
</div>
|
293
|
+
</form>
|
294
|
+
|
295
|
+
<% content_for :head do -%>
|
296
|
+
<%= javascript_include_tag 'tiny_mce/plugins/advlinktoo/js/functions.js' -%>
|
297
|
+
<% end -%>
|
298
|
+
<script language="javascript" type="text/javascript">
|
299
|
+
jQuery(document).ready(function() {
|
300
|
+
var path = '<%=links_for_content_path%>';
|
301
|
+
jQuery.getJSON(path, function(json){
|
302
|
+
if (json.length > 0){
|
303
|
+
var url_array = json;
|
304
|
+
jQuery("#href").autocomplete(url_array, {
|
305
|
+
minChars: 0,
|
306
|
+
matchContains: true,
|
307
|
+
autoFill: true,
|
308
|
+
mustMatch: false,
|
309
|
+
matchCase: false,
|
310
|
+
formatItem: function(item){
|
311
|
+
return item.title;
|
312
|
+
},
|
313
|
+
formatResult: function(item){
|
314
|
+
return item.uri;
|
315
|
+
}
|
316
|
+
});
|
317
|
+
}
|
318
|
+
});
|
319
|
+
});
|
320
|
+
</script>
|