Version Description
- Lists selection on widget
- CSS fix for submit button on widget
- Fixed the status panel on action call check
- Fixed the dedicated page creation
- New editor for service messages' template with desktop and mobile preview
- New raw html editor for newsletter with with desktop and mobile preview
- Improved status panel scheduler check
- Removed the old tiny mce 3
Download this release
Release Info
Developer | satollo |
Plugin | Newsletter |
Version | 4.8.1 |
Comparing to | |
See all releases |
Code changes from version 4.8.0 to 4.8.1
- admin.css +17 -8
- emails/edit.php +305 -255
- emails/images/html.png +0 -0
- emails/new.php +31 -24
- emails/theme.php +18 -6
- includes/controls.php +26 -7
- main/status.php +12 -3
- plugin.php +4 -4
- readme.txt +12 -1
- subscription/email.html +3 -3
- subscription/options.php +1 -1
- subscription/page.php +3 -1
- subscription/style.css +18 -0
- subscription/subscription.php +5 -1
- subscription/template.php +15 -10
- tiny_mce/langs/en.js +0 -1
- tiny_mce/license.txt +0 -504
- tiny_mce/plugins/fullscreen/editor_plugin.js +0 -1
- tiny_mce/plugins/fullscreen/editor_plugin_src.js +0 -159
- tiny_mce/plugins/fullscreen/fullscreen.htm +0 -110
- tiny_mce/plugins/inlinepopups/editor_plugin.js +0 -1
- tiny_mce/plugins/inlinepopups/editor_plugin_src.js +0 -699
- tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -90
- tiny_mce/plugins/inlinepopups/template.htm +0 -387
- tiny_mce/plugins/legacyoutput/editor_plugin.js +0 -1
- tiny_mce/plugins/legacyoutput/editor_plugin_src.js +0 -139
- tiny_mce/plugins/noneditable/editor_plugin.js +0 -1
- tiny_mce/plugins/noneditable/editor_plugin_src.js +0 -537
- tiny_mce/plugins/table/cell.htm +0 -180
- tiny_mce/plugins/table/css/cell.css +0 -17
- tiny_mce/plugins/table/css/row.css +0 -25
- tiny_mce/plugins/table/css/table.css +0 -13
- tiny_mce/plugins/table/editor_plugin.js +0 -1
- tiny_mce/plugins/table/editor_plugin_src.js +0 -1452
- tiny_mce/plugins/table/js/cell.js +0 -319
- tiny_mce/plugins/table/js/merge_cells.js +0 -27
- tiny_mce/plugins/table/js/row.js +0 -237
- tiny_mce/plugins/table/js/table.js +0 -501
- tiny_mce/plugins/table/langs/en_dlg.js +0 -1
- tiny_mce/plugins/table/merge_cells.htm +0 -32
- tiny_mce/plugins/table/row.htm +0 -158
- tiny_mce/plugins/table/table.htm +0 -188
- tiny_mce/themes/advanced/about.htm +0 -52
- tiny_mce/themes/advanced/anchor.htm +0 -26
- tiny_mce/themes/advanced/charmap.htm +0 -55
- tiny_mce/themes/advanced/color_picker.htm +0 -70
- tiny_mce/themes/advanced/editor_template.js +0 -1
- tiny_mce/themes/advanced/editor_template_src.js +0 -1490
- tiny_mce/themes/advanced/image.htm +0 -80
- tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- tiny_mce/themes/advanced/img/flash.gif +0 -0
- tiny_mce/themes/advanced/img/icons.gif +0 -0
- tiny_mce/themes/advanced/img/iframe.gif +0 -0
- tiny_mce/themes/advanced/img/pagebreak.gif +0 -0
- tiny_mce/themes/advanced/img/quicktime.gif +0 -0
- tiny_mce/themes/advanced/img/realmedia.gif +0 -0
- tiny_mce/themes/advanced/img/shockwave.gif +0 -0
- tiny_mce/themes/advanced/img/trans.gif +0 -0
- tiny_mce/themes/advanced/img/video.gif +0 -0
- tiny_mce/themes/advanced/img/windowsmedia.gif +0 -0
- tiny_mce/themes/advanced/js/about.js +0 -73
- tiny_mce/themes/advanced/js/anchor.js +0 -56
- tiny_mce/themes/advanced/js/charmap.js +0 -363
- tiny_mce/themes/advanced/js/color_picker.js +0 -345
- tiny_mce/themes/advanced/js/image.js +0 -253
- tiny_mce/themes/advanced/js/link.js +0 -159
- tiny_mce/themes/advanced/js/source_editor.js +0 -78
- tiny_mce/themes/advanced/langs/en.js +0 -1
- tiny_mce/themes/advanced/langs/en_dlg.js +0 -1
- tiny_mce/themes/advanced/link.htm +0 -57
- tiny_mce/themes/advanced/shortcuts.htm +0 -47
- tiny_mce/themes/advanced/skins/default/content.css +0 -50
- tiny_mce/themes/advanced/skins/default/dialog.css +0 -118
- tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
- tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
- tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
- tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
- tiny_mce/themes/advanced/skins/default/ui.css +0 -219
- tiny_mce/themes/advanced/skins/highcontrast/content.css +0 -24
- tiny_mce/themes/advanced/skins/highcontrast/dialog.css +0 -106
- tiny_mce/themes/advanced/skins/highcontrast/ui.css +0 -106
- tiny_mce/themes/advanced/skins/o2k7/content.css +0 -48
- tiny_mce/themes/advanced/skins/o2k7/dialog.css +0 -118
- tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- tiny_mce/themes/advanced/skins/o2k7/ui.css +0 -222
- tiny_mce/themes/advanced/skins/o2k7/ui_black.css +0 -8
- tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +0 -5
- tiny_mce/themes/advanced/source_editor.htm +0 -25
- tiny_mce/tiny_mce.js +0 -1
- tiny_mce/tiny_mce_popup.js +0 -5
- tiny_mce/utils/editable_selects.js +0 -70
- tiny_mce/utils/form_utils.js +0 -210
- tiny_mce/utils/mctabs.js +0 -162
- tiny_mce/utils/validate.js +0 -252
- users/import.php +1 -1
- widget/minimal.php +26 -0
- widget/standard.php +31 -5
admin.css
CHANGED
@@ -211,9 +211,9 @@
|
|
211 |
color: #fff;
|
212 |
}
|
213 |
|
214 |
-
#tnp-body
|
215 |
-
#tnp-body
|
216 |
-
#tnp-body
|
217 |
font-family: "Montserrat",sans-serif!important;
|
218 |
}
|
219 |
|
@@ -230,6 +230,8 @@
|
|
230 |
#tnp-body .button,
|
231 |
#tnp-body .button:visited,
|
232 |
#tnp-body .button:hover,
|
|
|
|
|
233 |
#tnp-body .button-primary,
|
234 |
#tnp-body .button-primary:visited,
|
235 |
#tnp-body .button-primary:hover,
|
@@ -237,6 +239,7 @@
|
|
237 |
#tnp-body .button-secondary:visited,
|
238 |
#tnp-body .button-secondary:hover {
|
239 |
color: #fff;
|
|
|
240 |
}
|
241 |
|
242 |
/* Form tables correction */
|
@@ -247,14 +250,20 @@
|
|
247 |
color: #444;
|
248 |
}
|
249 |
|
250 |
-
#tnp-body
|
251 |
-
#tnp-body
|
252 |
-
#tnp-body
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
color: #444;
|
254 |
}
|
255 |
|
256 |
-
#tnp-body
|
257 |
-
#tnp-body
|
258 |
color: #27AE60; /* Green */
|
259 |
}
|
260 |
|
211 |
color: #fff;
|
212 |
}
|
213 |
|
214 |
+
#tnp-body td h1,
|
215 |
+
#tnp-body td h2,
|
216 |
+
#tnp-body td h3 {
|
217 |
font-family: "Montserrat",sans-serif!important;
|
218 |
}
|
219 |
|
230 |
#tnp-body .button,
|
231 |
#tnp-body .button:visited,
|
232 |
#tnp-body .button:hover,
|
233 |
+
#tnp-body .button:active,
|
234 |
+
#tnp-body .button:focus,
|
235 |
#tnp-body .button-primary,
|
236 |
#tnp-body .button-primary:visited,
|
237 |
#tnp-body .button-primary:hover,
|
239 |
#tnp-body .button-secondary:visited,
|
240 |
#tnp-body .button-secondary:hover {
|
241 |
color: #fff;
|
242 |
+
background-color: #3498db;
|
243 |
}
|
244 |
|
245 |
/* Form tables correction */
|
250 |
color: #444;
|
251 |
}
|
252 |
|
253 |
+
#tnp-body th,
|
254 |
+
#tnp-body td,
|
255 |
+
#tnp-body td p,
|
256 |
+
#tnp-body td .button,
|
257 |
+
#tnp-body td .button:visited,
|
258 |
+
#tnp-body td .button:hover,
|
259 |
+
#tnp-body td .button:active,
|
260 |
+
#tnp-body td .button:focus,
|
261 |
+
#tnp-body td .button-primary {
|
262 |
color: #444;
|
263 |
}
|
264 |
|
265 |
+
#tnp-body td a,
|
266 |
+
#tnp-body td a:visited {
|
267 |
color: #27AE60; /* Green */
|
268 |
}
|
269 |
|
emails/edit.php
CHANGED
@@ -26,8 +26,8 @@ if (!$controls->is_action()) {
|
|
26 |
$email_options = unserialize($email['options']);
|
27 |
if (is_array($email_options)) {
|
28 |
$controls->data = array_merge($controls->data, $email_options);
|
29 |
-
|
30 |
-
foreach ($email_options as $name
|
31 |
$controls->data['options_' . $name] = $value;
|
32 |
}
|
33 |
}
|
@@ -63,8 +63,8 @@ if ($controls->is_action('test') || $controls->is_action('save') || $controls->i
|
|
63 |
if (isset($controls->data['sex'])) {
|
64 |
$email['options']['sex'] = $controls->data['sex'];
|
65 |
}
|
66 |
-
|
67 |
-
foreach($controls->data as $name
|
68 |
if (strpos($name, 'options_') === 0) {
|
69 |
$email['options'][substr($name, 8)] = $value;
|
70 |
}
|
@@ -109,14 +109,14 @@ if ($controls->is_action('test') || $controls->is_action('save') || $controls->i
|
|
109 |
if ($controls->data['preferences_status'] == 1) {
|
110 |
$query .= " and (";
|
111 |
foreach ($preferences as $x) {
|
112 |
-
$query .= "list_" . ((int)$x) . "=0" . $operator;
|
113 |
}
|
114 |
$query = substr($query, 0, -4);
|
115 |
$query .= ")";
|
116 |
} else {
|
117 |
$query .= " and (";
|
118 |
foreach ($preferences as $x) {
|
119 |
-
$query .= "list_" . ((int)$x) . "=1" . $operator;
|
120 |
}
|
121 |
$query = substr($query, 0, -4);
|
122 |
$query .= ")";
|
@@ -230,28 +230,69 @@ if ($email['editor'] == 0) {
|
|
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 |
function tnp_media(name) {
|
256 |
var tnp_uploader = wp.media({
|
257 |
title: "Select an image",
|
@@ -262,264 +303,273 @@ if ($email['editor'] == 0) {
|
|
262 |
multiple: false,
|
263 |
displaySetting: true,
|
264 |
displayUserSettings: true
|
265 |
-
}).on("insert", function() {
|
266 |
wp.media;
|
267 |
var media = tnp_uploader.state().get("selection").first();
|
268 |
-
if (media.attributes.url.indexOf("http") !== 0)
|
|
|
269 |
|
270 |
if (!media.attributes.mime.startsWith("image")) {
|
271 |
-
|
|
|
|
|
|
|
|
|
272 |
} else {
|
273 |
var display = tnp_uploader.state().display(media);
|
274 |
var url = media.attributes.sizes[display.attributes.size].url;
|
275 |
-
|
|
|
|
|
|
|
|
|
276 |
}
|
277 |
}).open();
|
278 |
}
|
279 |
|
280 |
-
function template_refresh() {
|
281 |
-
var d = document.getElementById('options_preview').contentWindow.document;
|
282 |
-
d.open();
|
283 |
-
//d.write(template.replace("{messaggio}", templateEditor.getValue()));
|
284 |
-
d.write(template.replace("{message}", document.getElementById("options-message").value));
|
285 |
-
d.close();
|
286 |
-
jQuery("#options_preview").toggle();
|
287 |
-
}
|
288 |
</script>
|
289 |
|
290 |
-
<div class="wrap" id="tnp-wrap">
|
291 |
-
|
292 |
-
<?php include NEWSLETTER_DIR . '/tnp-header.php'; ?>
|
293 |
-
|
294 |
-
<div id="tnp-heading">
|
295 |
-
|
296 |
-
<h2><?php _e('Edit Newsletter', 'newsletter') ?></h2>
|
297 |
-
|
298 |
-
</div>
|
299 |
-
|
300 |
-
<div id="tnp-body">
|
301 |
-
|
302 |
-
<?php
|
303 |
-
if ($controls->data['status'] == 'S') {
|
304 |
-
echo '<div class="newsletter-message">Warning! This email is configured to be sent to NOT CONFIRMED subscribers.</div>';
|
305 |
-
}
|
306 |
-
?>
|
307 |
-
|
308 |
-
<form method="post" action="" id="newsletter-form">
|
309 |
-
<?php $controls->init(array('cookie_name' => 'newsletter_emails_edit_tab')); ?>
|
310 |
-
|
311 |
-
<div class="tnp-submit">
|
312 |
-
<?php $controls->button_back('?page=newsletter_emails_index') ?>
|
313 |
-
<?php if ($email['status'] != 'sending' && $email['status'] != 'sent') $controls->button_save(); ?>
|
314 |
-
<?php if ($email['status'] != 'sending' && $email['status'] != 'sent') $controls->button_confirm('test', 'Save and test', 'Save and send test emails to test addresses?'); ?>
|
315 |
-
|
316 |
-
<?php if ($email['status'] == 'new') $controls->button_confirm('send', __('Send', 'newsletter'), __('Start real delivery?', 'newsletter')); ?>
|
317 |
-
<?php if ($email['status'] == 'sending') $controls->button_confirm('pause', __('Pause', 'newsletter'), __('Pause the delivery?', 'newsletter')); ?>
|
318 |
-
<?php if ($email['status'] == 'paused') $controls->button_confirm('continue', __('Continue', 'newsletter'), 'Continue the delivery?'); ?>
|
319 |
-
<?php if ($email['status'] == 'paused') $controls->button_confirm('abort', __('Stop', 'newsletter'), __('This totally stop the delivery, ok?', 'newsletter')); ?>
|
320 |
-
<?php if ($email['status'] != 'sending' && $email['status'] != 'sent') $controls->button_confirm('editor', 'Save and switch to ' . ($email['editor'] == 0 ? 'HTML source' : 'visual') . ' editor', 'Sure?'); ?>
|
321 |
-
</div>
|
322 |
-
|
323 |
-
<div id="tabs">
|
324 |
-
<ul>
|
325 |
-
<li><a href="#tabs-a"><?php _e('Message', 'newsletter') ?></a></li>
|
326 |
-
<li><a href="#tabs-b"><?php _e('Message (textual)', 'newsletter') ?></a></li>
|
327 |
-
<li><a href="#tabs-c"><?php _e('Targeting', 'newsletter') ?></a></li>
|
328 |
-
<li><a href="#tabs-d"><?php _e('Other', 'newsletter') ?></a></li>
|
329 |
-
<li><a href="#tabs-status"><?php _e('Status', 'newsletter') ?></a></li>
|
330 |
-
</ul>
|
331 |
-
|
332 |
-
|
333 |
-
<div id="tabs-a">
|
334 |
-
|
335 |
-
<?php $controls->text('subject', 70, 'Subject'); ?>
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
<input type="button" value="Add media" onclick="tnp_media()">
|
340 |
-
|
341 |
-
<a href="http://www.thenewsletterplugin.com/plugins/newsletter/newsletter-tags" target="_blank"><?php _e('Available tags', 'newsletter') ?></a>
|
342 |
-
|
343 |
-
<br><br>
|
344 |
|
|
|
345 |
|
|
|
346 |
|
347 |
-
|
348 |
-
if ($email['editor'] == 0) {
|
349 |
-
$controls->editor('message', 30);
|
350 |
-
} else {
|
351 |
-
$controls->textarea_preview('message', '100%', '700');
|
352 |
-
}
|
353 |
-
?>
|
354 |
|
|
|
355 |
|
356 |
-
|
357 |
|
|
|
358 |
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
This is the textual version of your newsletter. If you empty it, only an HTML version will be sent but
|
365 |
-
is an anti-spam best practice to include a text only version.
|
366 |
-
</p>
|
367 |
|
368 |
-
|
369 |
-
|
370 |
|
|
|
|
|
|
|
|
|
371 |
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
<td>
|
378 |
-
<?php $controls->checkboxes_group('sex', array('f' => 'Women', 'm' => 'Men', 'n' => 'Not specified')); ?>
|
379 |
-
<p class="description">
|
380 |
-
Leaving all gender options unselected disable this filter.
|
381 |
-
</p>
|
382 |
-
</td>
|
383 |
-
</tr>
|
384 |
-
<tr valign="top">
|
385 |
-
<th><?php _e('Lists', 'newsletter'); ?></th>
|
386 |
-
<td>
|
387 |
-
Subscribers with
|
388 |
-
<?php $controls->select('preferences_status_operator', array(0 => 'at least one list', 1 => 'all lists')); ?>
|
389 |
-
|
390 |
-
<?php $controls->select('preferences_status', array(0 => 'active', 1 => 'not active')); ?>
|
391 |
-
<?php _e('checked below', 'newsletter') ?>
|
392 |
-
|
393 |
-
<?php $controls->preferences_group('preferences', true); ?>
|
394 |
-
<p class="description">
|
395 |
-
You can address the newsletter to subscribers who selected at least one of the options or to who
|
396 |
-
has not selected at least one of the options.
|
397 |
-
<a href="http://www.thenewsletterplugin.com/plugins/newsletter/newsletter-preferences" target="_blank">Read more about the "NOT ACTIVE" usage</a>.
|
398 |
-
</p>
|
399 |
-
</td>
|
400 |
-
</tr>
|
401 |
-
|
402 |
-
<tr valign="top">
|
403 |
-
<th><?php _e('Status', 'newsletter') ?></th>
|
404 |
-
<td>
|
405 |
-
<?php $controls->select('status', array('C' => __('Confirmed', 'newsletter'), 'S' => __('Not confirmed', 'newsletter'))); ?>
|
406 |
-
|
407 |
-
<p class="description">
|
408 |
-
<?php _e('Send to not confirmed subscribers ONLY to ask for confirmation including the {subscription_confirm_url} tag.', 'newsletter') ?>
|
409 |
-
</p>
|
410 |
-
</td>
|
411 |
-
</tr>
|
412 |
-
<tr valign="top">
|
413 |
-
<th>Only to WordPress users?</th>
|
414 |
-
<td>
|
415 |
-
<?php $controls->yesno('wp_users'); ?>
|
416 |
-
|
417 |
-
<p class="description">
|
418 |
-
Limit to the subscribers which are WordPress users as well.
|
419 |
-
</p>
|
420 |
-
</td>
|
421 |
-
</tr>
|
422 |
-
<tr valign="top">
|
423 |
-
<th>
|
424 |
-
<?php _e('Subscribers count', 'newsletter') ?>
|
425 |
-
</th>
|
426 |
-
<td>
|
427 |
-
<?php
|
428 |
-
if ($email['status'] != 'sent') {
|
429 |
-
echo $wpdb->get_var(str_replace('*', 'count(*)', $email['query']));
|
430 |
-
} else {
|
431 |
-
echo $email['sent'];
|
432 |
-
}
|
433 |
-
?>
|
434 |
-
<p class="description">
|
435 |
-
<?php _e('Save to update if on targeting filters have been changed', 'newsletter') ?>
|
436 |
-
</p>
|
437 |
-
</td>
|
438 |
-
</tr>
|
439 |
-
</table>
|
440 |
-
</div>
|
441 |
-
|
442 |
-
|
443 |
-
<div id="tabs-d">
|
444 |
-
<table class="form-table">
|
445 |
-
<tr valign="top">
|
446 |
-
<th><?php _e('Keep private', 'newsletter') ?></th>
|
447 |
-
<td>
|
448 |
-
<?php $controls->yesno('private'); ?>
|
449 |
-
<p class="description">
|
450 |
-
<?php _e('Hide/show from public sent newsletter list.', 'newsletter') ?>
|
451 |
-
<?php _e('Required', 'newsletter') ?>: <a href="" target="_blank">Newsletter Archive Extension</a>
|
452 |
-
</p>
|
453 |
-
</td>
|
454 |
-
</tr>
|
455 |
-
<tr valign="top">
|
456 |
-
<th><?php _e('Track clicks and message opening', 'newsletter') ?></th>
|
457 |
-
<td>
|
458 |
-
<?php $controls->yesno('track'); ?>
|
459 |
-
</td>
|
460 |
-
</tr>
|
461 |
-
<tr valign="top">
|
462 |
-
<th><?php _e('Send on', 'newsletter') ?></th>
|
463 |
-
<td>
|
464 |
-
<?php $controls->datetime('send_on'); ?> (now: <?php echo date_i18n(get_option('date_format') . ' ' . get_option('time_format')); ?>)
|
465 |
-
<p class="description">
|
466 |
-
If the current date and time are wrong, check your timezone on the General WordPress settings.
|
467 |
-
</p>
|
468 |
-
</td>
|
469 |
-
</tr>
|
470 |
-
</table>
|
471 |
-
|
472 |
-
<?php do_action('newsletter_emails_edit_other', $module->get_email($email_id), $controls) ?>
|
473 |
</div>
|
474 |
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
<
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
<tr valign="top">
|
486 |
-
<th>Query (tech)</th>
|
487 |
-
<td><?php echo esc_html($email['query']); ?></td>
|
488 |
-
</tr>
|
489 |
-
<tr valign="top">
|
490 |
-
<th>Token (tech)</th>
|
491 |
-
<td><?php echo esc_html($email['token']); ?></td>
|
492 |
-
</tr>
|
493 |
-
</table>
|
494 |
-
</div>
|
495 |
-
|
496 |
-
<!--
|
497 |
-
<div id="tabs-5">
|
498 |
-
<p>Tags documented below can be used on newsletter body. Some of them can be used on subject as well.</p>
|
499 |
|
500 |
-
<p>
|
501 |
-
Special tags, like the preference setting tag, can be used to highly interact with your subscribers, see
|
502 |
-
the Newsletter Preferences page for examples.
|
503 |
-
</p>
|
504 |
-
--
|
505 |
|
506 |
-
<
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
513 |
|
514 |
-
</ul>
|
515 |
</div>
|
516 |
-
-->
|
517 |
-
|
518 |
-
</div>
|
519 |
|
520 |
-
|
521 |
-
</div>
|
522 |
|
523 |
<?php include NEWSLETTER_DIR . '/tnp-footer.php'; ?>
|
524 |
-
|
525 |
</div>
|
26 |
$email_options = unserialize($email['options']);
|
27 |
if (is_array($email_options)) {
|
28 |
$controls->data = array_merge($controls->data, $email_options);
|
29 |
+
|
30 |
+
foreach ($email_options as $name => $value) {
|
31 |
$controls->data['options_' . $name] = $value;
|
32 |
}
|
33 |
}
|
63 |
if (isset($controls->data['sex'])) {
|
64 |
$email['options']['sex'] = $controls->data['sex'];
|
65 |
}
|
66 |
+
|
67 |
+
foreach ($controls->data as $name => $value) {
|
68 |
if (strpos($name, 'options_') === 0) {
|
69 |
$email['options'][substr($name, 8)] = $value;
|
70 |
}
|
109 |
if ($controls->data['preferences_status'] == 1) {
|
110 |
$query .= " and (";
|
111 |
foreach ($preferences as $x) {
|
112 |
+
$query .= "list_" . ((int) $x) . "=0" . $operator;
|
113 |
}
|
114 |
$query = substr($query, 0, -4);
|
115 |
$query .= ")";
|
116 |
} else {
|
117 |
$query .= " and (";
|
118 |
foreach ($preferences as $x) {
|
119 |
+
$query .= "list_" . ((int) $x) . "=1" . $operator;
|
120 |
}
|
121 |
$query = substr($query, 0, -4);
|
122 |
$query .= ")";
|
230 |
}
|
231 |
?>
|
232 |
|
233 |
+
|
234 |
+
<?php if ($email['editor'] == 1) { ?>
|
235 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/codemirror.css" type="text/css">
|
236 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/addon/hint/show-hint.css">
|
237 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/codemirror.js"></script>
|
238 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/mode/xml/xml.js"></script>
|
239 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/mode/css/css.js"></script>
|
240 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/mode/javascript/javascript.js"></script>
|
241 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/mode/htmlmixed/htmlmixed.js"></script>
|
242 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/addon/hint/show-hint.js"></script>
|
243 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/addon/hint/xml-hint.js"></script>
|
244 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/addon/hint/html-hint.js"></script>
|
245 |
+
<script>
|
246 |
+
var templateEditor;
|
247 |
+
jQuery(function () {
|
248 |
+
templateEditor = CodeMirror.fromTextArea(document.getElementById("options-message"), {
|
249 |
+
lineNumbers: true,
|
250 |
+
mode: 'htmlmixed',
|
251 |
+
extraKeys: {"Ctrl-Space": "autocomplete"}
|
252 |
+
});
|
253 |
+
});
|
254 |
+
</script>
|
255 |
+
<?php } else { ?>
|
256 |
+
|
257 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.5.3/tinymce.min.js"></script>
|
258 |
+
<script type="text/javascript">
|
259 |
+
var template = <?php echo json_encode($template) ?>;
|
260 |
+
|
261 |
+
// https://www.tinymce.com/docs/advanced/editor-control-identifiers/#toolbarcontrols
|
262 |
+
tinymce.init({
|
263 |
+
height: 700,
|
264 |
+
mode: "specific_textareas",
|
265 |
+
editor_selector: "visual",
|
266 |
+
statusbar: true,
|
267 |
+
table_toolbar: "tableprops tablecellprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | " +
|
268 |
+
"tableinsertcolbefore tableinsertcolafter tabledeletecol",
|
269 |
+
toolbar: "bold italic underline strikethrough forecolor backcolor | alignleft alignright aligncenter alignjustify | bullist numlist | link unlink | image",
|
270 |
+
//theme: "advanced",
|
271 |
+
entity_encoding: "raw",
|
272 |
+
image_advtab: true,
|
273 |
+
image_title: true,
|
274 |
+
plugins: "table fullscreen legacyoutput textcolor colorpicker link image",
|
275 |
+
relative_urls: false,
|
276 |
+
remove_script_host: false,
|
277 |
+
document_base_url: "<?php echo esc_js(get_option('home')) ?>/",
|
278 |
+
content_css: ["<?php echo plugins_url('newsletter') ?>/emails/editor.css", "<?php echo home_url('/') . '?na=emails-css&id=' . $email_id . '&' . time(); ?>"]
|
279 |
+
});
|
280 |
+
|
281 |
+
</script>
|
282 |
+
<?php } ?>
|
283 |
|
284 |
+
<style>
|
285 |
+
#options-subject {
|
286 |
+
font-size: 20px;
|
287 |
+
display: inline-block;
|
288 |
+
margin-bottom: 10px;
|
289 |
+
width: 100%;
|
290 |
+
}
|
291 |
+
.CodeMirror {
|
292 |
+
height: 600px;
|
293 |
+
}
|
294 |
+
</style>
|
295 |
+
<script>
|
296 |
function tnp_media(name) {
|
297 |
var tnp_uploader = wp.media({
|
298 |
title: "Select an image",
|
303 |
multiple: false,
|
304 |
displaySetting: true,
|
305 |
displayUserSettings: true
|
306 |
+
}).on("insert", function () {
|
307 |
wp.media;
|
308 |
var media = tnp_uploader.state().get("selection").first();
|
309 |
+
if (media.attributes.url.indexOf("http") !== 0)
|
310 |
+
media.attributes.url = "http:" + media.attributes.url;
|
311 |
|
312 |
if (!media.attributes.mime.startsWith("image")) {
|
313 |
+
if (templateEditor) {
|
314 |
+
templateEditor.getDoc().replaceRange(url, templateEditor.getDoc().getCursor());
|
315 |
+
} else {
|
316 |
+
tinyMCE.execCommand('mceInsertLink', false, media.attributes.url);
|
317 |
+
}
|
318 |
} else {
|
319 |
var display = tnp_uploader.state().display(media);
|
320 |
var url = media.attributes.sizes[display.attributes.size].url;
|
321 |
+
if (templateEditor) {
|
322 |
+
templateEditor.getDoc().replaceRange('<img src="' + url + '">', templateEditor.getDoc().getCursor());
|
323 |
+
} else {
|
324 |
+
tinyMCE.execCommand('mceInsertContent', false, '<img src="' + url + '" />');
|
325 |
+
}
|
326 |
}
|
327 |
}).open();
|
328 |
}
|
329 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
</script>
|
331 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
|
333 |
+
<div class="wrap" id="tnp-wrap">
|
334 |
|
335 |
+
<?php include NEWSLETTER_DIR . '/tnp-header.php'; ?>
|
336 |
|
337 |
+
<div id="tnp-heading">
|
|
|
|
|
|
|
|
|
|
|
|
|
338 |
|
339 |
+
<h2><?php _e('Edit Newsletter', 'newsletter') ?></h2>
|
340 |
|
341 |
+
</div>
|
342 |
|
343 |
+
<div id="tnp-body">
|
344 |
|
345 |
+
<?php
|
346 |
+
if ($controls->data['status'] == 'S') {
|
347 |
+
echo '<div class="newsletter-message">Warning! This email is configured to be sent to NOT CONFIRMED subscribers.</div>';
|
348 |
+
}
|
349 |
+
?>
|
|
|
|
|
|
|
350 |
|
351 |
+
<form method="post" action="" id="newsletter-form">
|
352 |
+
<?php $controls->init(array('cookie_name' => 'newsletter_emails_edit_tab')); ?>
|
353 |
|
354 |
+
<div class="tnp-submit">
|
355 |
+
<?php $controls->button_back('?page=newsletter_emails_index') ?>
|
356 |
+
<?php if ($email['status'] != 'sending' && $email['status'] != 'sent') $controls->button_save(); ?>
|
357 |
+
<?php if ($email['status'] != 'sending' && $email['status'] != 'sent') $controls->button_confirm('test', 'Save and test', 'Save and send test emails to test addresses?'); ?>
|
358 |
|
359 |
+
<?php if ($email['status'] == 'new') $controls->button_confirm('send', __('Send', 'newsletter'), __('Start real delivery?', 'newsletter')); ?>
|
360 |
+
<?php if ($email['status'] == 'sending') $controls->button_confirm('pause', __('Pause', 'newsletter'), __('Pause the delivery?', 'newsletter')); ?>
|
361 |
+
<?php if ($email['status'] == 'paused') $controls->button_confirm('continue', __('Continue', 'newsletter'), 'Continue the delivery?'); ?>
|
362 |
+
<?php if ($email['status'] == 'paused') $controls->button_confirm('abort', __('Stop', 'newsletter'), __('This totally stop the delivery, ok?', 'newsletter')); ?>
|
363 |
+
<?php if ($email['status'] != 'sending' && $email['status'] != 'sent') $controls->button_confirm('editor', 'Save and switch to ' . ($email['editor'] == 0 ? 'HTML source' : 'visual') . ' editor', 'Sure?'); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
</div>
|
365 |
|
366 |
+
<?php $controls->text('subject', 70, 'Subject'); ?>
|
367 |
+
|
368 |
+
<div id="tabs">
|
369 |
+
<ul>
|
370 |
+
<li><a href="#tabs-a"><?php _e('Message', 'newsletter') ?></a></li>
|
371 |
+
<li><a href="#tabs-b"><?php _e('Message (textual)', 'newsletter') ?></a></li>
|
372 |
+
<li><a href="#tabs-c"><?php _e('Targeting', 'newsletter') ?></a></li>
|
373 |
+
<li><a href="#tabs-d"><?php _e('Other', 'newsletter') ?></a></li>
|
374 |
+
<li><a href="#tabs-status"><?php _e('Status', 'newsletter') ?></a></li>
|
375 |
+
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
|
|
|
|
|
|
|
|
|
|
|
377 |
|
378 |
+
<div id="tabs-a">
|
379 |
+
|
380 |
+
|
381 |
+
|
382 |
+
|
383 |
+
|
384 |
+
<?php if ($email['editor'] == 0) { ?>
|
385 |
+
<input type="button" class="button" value="Add media" onclick="tnp_media()">
|
386 |
+
|
387 |
+
<a href="http://www.thenewsletterplugin.com/plugins/newsletter/newsletter-tags" target="_blank"><?php _e('Available tags', 'newsletter') ?></a>
|
388 |
+
<br><br>
|
389 |
+
|
390 |
+
<?php $controls->editor('message', 30); ?>
|
391 |
+
|
392 |
+
<?php } else { ?>
|
393 |
+
|
394 |
+
<input class="button-primary" type="button" onclick="newsletter_textarea_preview('options-message'); return false;" value="Switch editor/preview">
|
395 |
+
|
396 |
+
<input type="button" class="button" value="Add media" onclick="tnp_media()">
|
397 |
+
|
398 |
+
<a href="http://www.thenewsletterplugin.com/plugins/newsletter/newsletter-tags" target="_blank"><?php _e('Available tags', 'newsletter') ?></a>
|
399 |
+
|
400 |
+
|
401 |
+
<br><br>
|
402 |
+
<?php $controls->textarea_preview('message', '100%', 700, '', '', false); ?>
|
403 |
+
<?php } ?>
|
404 |
+
|
405 |
+
|
406 |
+
</div>
|
407 |
+
|
408 |
+
|
409 |
+
<div id="tabs-b">
|
410 |
+
<?php if (Newsletter::instance()->options['phpmailer'] == 0) { ?>
|
411 |
+
<p class="tnp-tab-warning">The text part is sent only when Newsletter manages directly the sending process. <a href="admin.php?page=newsletter_main_main" target="_blank">See the main settings</a>.</p>
|
412 |
+
<?php } ?>
|
413 |
+
<p>
|
414 |
+
This is the textual version of your newsletter. If you empty it, only an HTML version will be sent but
|
415 |
+
is an anti-spam best practice to include a text only version.
|
416 |
+
</p>
|
417 |
+
|
418 |
+
<?php $controls->textarea_fixed('message_text', '100%', '500'); ?>
|
419 |
+
</div>
|
420 |
+
|
421 |
+
|
422 |
+
<div id="tabs-c">
|
423 |
+
<table class="form-table">
|
424 |
+
|
425 |
+
<tr valign="top">
|
426 |
+
<th><?php _e('Gender', 'newsletter'); ?></th>
|
427 |
+
<td>
|
428 |
+
<?php $controls->checkboxes_group('sex', array('f' => 'Women', 'm' => 'Men', 'n' => 'Not specified')); ?>
|
429 |
+
<p class="description">
|
430 |
+
Leaving all gender options unselected disable this filter.
|
431 |
+
</p>
|
432 |
+
</td>
|
433 |
+
</tr>
|
434 |
+
<tr valign="top">
|
435 |
+
<th><?php _e('Lists', 'newsletter'); ?></th>
|
436 |
+
<td>
|
437 |
+
Subscribers with
|
438 |
+
<?php $controls->select('preferences_status_operator', array(0 => 'at least one list', 1 => 'all lists')); ?>
|
439 |
+
|
440 |
+
<?php $controls->select('preferences_status', array(0 => 'active', 1 => 'not active')); ?>
|
441 |
+
<?php _e('checked below', 'newsletter') ?>
|
442 |
+
|
443 |
+
<?php $controls->preferences_group('preferences', true); ?>
|
444 |
+
<p class="description">
|
445 |
+
You can address the newsletter to subscribers who selected at least one of the options or to who
|
446 |
+
has not selected at least one of the options.
|
447 |
+
<a href="http://www.thenewsletterplugin.com/plugins/newsletter/newsletter-preferences" target="_blank">Read more about the "NOT ACTIVE" usage</a>.
|
448 |
+
</p>
|
449 |
+
</td>
|
450 |
+
</tr>
|
451 |
+
|
452 |
+
<tr valign="top">
|
453 |
+
<th><?php _e('Status', 'newsletter') ?></th>
|
454 |
+
<td>
|
455 |
+
<?php $controls->select('status', array('C' => __('Confirmed', 'newsletter'), 'S' => __('Not confirmed', 'newsletter'))); ?>
|
456 |
+
|
457 |
+
<p class="description">
|
458 |
+
<?php _e('Send to not confirmed subscribers ONLY to ask for confirmation including the {subscription_confirm_url} tag.', 'newsletter') ?>
|
459 |
+
</p>
|
460 |
+
</td>
|
461 |
+
</tr>
|
462 |
+
<tr valign="top">
|
463 |
+
<th>Only to WordPress users?</th>
|
464 |
+
<td>
|
465 |
+
<?php $controls->yesno('wp_users'); ?>
|
466 |
+
|
467 |
+
<p class="description">
|
468 |
+
Limit to the subscribers which are WordPress users as well.
|
469 |
+
</p>
|
470 |
+
</td>
|
471 |
+
</tr>
|
472 |
+
<tr valign="top">
|
473 |
+
<th>
|
474 |
+
<?php _e('Subscribers count', 'newsletter') ?>
|
475 |
+
</th>
|
476 |
+
<td>
|
477 |
+
<?php
|
478 |
+
if ($email['status'] != 'sent') {
|
479 |
+
echo $wpdb->get_var(str_replace('*', 'count(*)', $email['query']));
|
480 |
+
} else {
|
481 |
+
echo $email['sent'];
|
482 |
+
}
|
483 |
+
?>
|
484 |
+
<p class="description">
|
485 |
+
<?php _e('Save to update if on targeting filters have been changed', 'newsletter') ?>
|
486 |
+
</p>
|
487 |
+
</td>
|
488 |
+
</tr>
|
489 |
+
</table>
|
490 |
+
</div>
|
491 |
+
|
492 |
+
|
493 |
+
<div id="tabs-d">
|
494 |
+
<table class="form-table">
|
495 |
+
<tr valign="top">
|
496 |
+
<th><?php _e('Keep private', 'newsletter') ?></th>
|
497 |
+
<td>
|
498 |
+
<?php $controls->yesno('private'); ?>
|
499 |
+
<p class="description">
|
500 |
+
<?php _e('Hide/show from public sent newsletter list.', 'newsletter') ?>
|
501 |
+
<?php _e('Required', 'newsletter') ?>: <a href="" target="_blank">Newsletter Archive Extension</a>
|
502 |
+
</p>
|
503 |
+
</td>
|
504 |
+
</tr>
|
505 |
+
<tr valign="top">
|
506 |
+
<th><?php _e('Track clicks and message opening', 'newsletter') ?></th>
|
507 |
+
<td>
|
508 |
+
<?php $controls->yesno('track'); ?>
|
509 |
+
</td>
|
510 |
+
</tr>
|
511 |
+
<tr valign="top">
|
512 |
+
<th><?php _e('Send on', 'newsletter') ?></th>
|
513 |
+
<td>
|
514 |
+
<?php $controls->datetime('send_on'); ?> (now: <?php echo date_i18n(get_option('date_format') . ' ' . get_option('time_format')); ?>)
|
515 |
+
<p class="description">
|
516 |
+
If the current date and time are wrong, check your timezone on the General WordPress settings.
|
517 |
+
</p>
|
518 |
+
</td>
|
519 |
+
</tr>
|
520 |
+
</table>
|
521 |
+
|
522 |
+
<?php do_action('newsletter_emails_edit_other', $module->get_email($email_id), $controls) ?>
|
523 |
+
</div>
|
524 |
+
|
525 |
+
<div id="tabs-status">
|
526 |
+
<table class="form-table">
|
527 |
+
<tr valign="top">
|
528 |
+
<th>Email status</th>
|
529 |
+
<td><?php echo esc_html($email['status']); ?></td>
|
530 |
+
</tr>
|
531 |
+
<tr valign="top">
|
532 |
+
<th>Messages sent</th>
|
533 |
+
<td><?php echo $email['sent']; ?> of <?php echo $email['total']; ?></td>
|
534 |
+
</tr>
|
535 |
+
<tr valign="top">
|
536 |
+
<th>Query (tech)</th>
|
537 |
+
<td><?php echo esc_html($email['query']); ?></td>
|
538 |
+
</tr>
|
539 |
+
<tr valign="top">
|
540 |
+
<th>Token (tech)</th>
|
541 |
+
<td><?php echo esc_html($email['token']); ?></td>
|
542 |
+
</tr>
|
543 |
+
</table>
|
544 |
+
</div>
|
545 |
+
|
546 |
+
<!--
|
547 |
+
<div id="tabs-5">
|
548 |
+
<p>Tags documented below can be used on newsletter body. Some of them can be used on subject as well.</p>
|
549 |
+
|
550 |
+
<p>
|
551 |
+
Special tags, like the preference setting tag, can be used to highly interact with your subscribers, see
|
552 |
+
the Newsletter Preferences page for examples.
|
553 |
+
</p>
|
554 |
+
--
|
555 |
+
|
556 |
+
<dl>
|
557 |
+
<dt>{set_preference_N}</dt>
|
558 |
+
<dd>
|
559 |
+
This tag creates a URL which, once clicked, set the preference numner N on the user profile and redirecting the
|
560 |
+
subscriber to his profile panel. Preferences can be configured on Subscription/Form fields panel.
|
561 |
+
</dd>
|
562 |
+
</dl>
|
563 |
+
|
564 |
+
</ul>
|
565 |
+
</div>
|
566 |
+
-->
|
567 |
|
|
|
568 |
</div>
|
|
|
|
|
|
|
569 |
|
570 |
+
</form>
|
571 |
+
</div>
|
572 |
|
573 |
<?php include NEWSLETTER_DIR . '/tnp-footer.php'; ?>
|
574 |
+
|
575 |
</div>
|
emails/images/html.png
ADDED
Binary file
|
emails/new.php
CHANGED
@@ -4,33 +4,40 @@ $controls = new NewsletterControls();
|
|
4 |
$module = NewsletterEmails::instance();
|
5 |
|
6 |
if ($controls->is_action('theme')) {
|
7 |
-
|
8 |
-
|
|
|
|
|
9 |
|
10 |
// If this theme has no intermediate options...
|
11 |
-
if (!file_exists($module->get_current_theme_file_path('theme-options.php'))) {
|
12 |
$email = array();
|
13 |
$email['status'] = 'new';
|
14 |
$email['subject'] = __('Here the email subject', 'newsletter');
|
15 |
$email['track'] = 1;
|
16 |
$email['token'] = $module->get_token();
|
17 |
|
18 |
-
$
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
29 |
|
30 |
-
ob_start();
|
31 |
-
include $module->get_current_theme_file_path('theme-text.php');
|
32 |
-
$email['message_text'] = ob_get_clean();
|
33 |
-
|
34 |
$email['type'] = 'message';
|
35 |
$email['send_on'] = time();
|
36 |
$email = Newsletter::instance()->save_email($email);
|
@@ -125,19 +132,19 @@ function newsletter_emails_get_theme_options($theme) {
|
|
125 |
|
126 |
<div class="wrap" id="tnp-wrap">
|
127 |
|
128 |
-
|
129 |
|
130 |
-
|
131 |
|
132 |
<h2><?php _e('Create a newsletter', 'newsletter') ?>
|
133 |
<a class="tnp-btn-h1" href="<?php echo NewsletterEmails::instance()->get_admin_page_url('theme'); ?>"><?php _e('Back to newsletter themes', 'newsletter') ?></a>
|
134 |
</h2>
|
135 |
-
|
136 |
-
|
137 |
|
138 |
-
|
139 |
|
140 |
-
|
141 |
|
142 |
<form method="post" action="<?php echo $module->get_admin_page_url('new'); ?>">
|
143 |
<?php $controls->init(); ?>
|
@@ -168,5 +175,5 @@ function newsletter_emails_get_theme_options($theme) {
|
|
168 |
</div>
|
169 |
|
170 |
<?php include NEWSLETTER_DIR . '/tnp-footer.php'; ?>
|
171 |
-
|
172 |
</div>
|
4 |
$module = NewsletterEmails::instance();
|
5 |
|
6 |
if ($controls->is_action('theme')) {
|
7 |
+
if ($controls->data['theme'] != 'rawhtml') {
|
8 |
+
$controls->merge($module->themes->get_options($controls->data['theme']));
|
9 |
+
$module->save_options($controls->data);
|
10 |
+
}
|
11 |
|
12 |
// If this theme has no intermediate options...
|
13 |
+
if ($controls->data['theme'] == 'rawhtml' || !file_exists($module->get_current_theme_file_path('theme-options.php'))) {
|
14 |
$email = array();
|
15 |
$email['status'] = 'new';
|
16 |
$email['subject'] = __('Here the email subject', 'newsletter');
|
17 |
$email['track'] = 1;
|
18 |
$email['token'] = $module->get_token();
|
19 |
|
20 |
+
if ($controls->data['theme'] == 'rawhtml') {
|
21 |
+
$email['editor'] = 1;
|
22 |
+
$email['message'] = "<!DOCTYPE html>\n<html>\n<head>\n<title>A title</title>\n</head>\n<body>\n</body>\n</html>";
|
23 |
+
} else {
|
24 |
+
$theme_options = $module->get_current_theme_options();
|
25 |
+
$theme_url = $module->get_current_theme_url();
|
26 |
+
$theme_subject = '';
|
27 |
+
|
28 |
+
ob_start();
|
29 |
+
include $module->get_current_theme_file_path('theme.php');
|
30 |
+
$email['message'] = ob_get_clean();
|
31 |
+
|
32 |
+
if (!empty($theme_subject)) {
|
33 |
+
$email['subject'] = $theme_subject;
|
34 |
+
}
|
35 |
+
|
36 |
+
ob_start();
|
37 |
+
include $module->get_current_theme_file_path('theme-text.php');
|
38 |
+
$email['message_text'] = ob_get_clean();
|
39 |
}
|
40 |
|
|
|
|
|
|
|
|
|
41 |
$email['type'] = 'message';
|
42 |
$email['send_on'] = time();
|
43 |
$email = Newsletter::instance()->save_email($email);
|
132 |
|
133 |
<div class="wrap" id="tnp-wrap">
|
134 |
|
135 |
+
<?php include NEWSLETTER_DIR . '/tnp-header.php'; ?>
|
136 |
|
137 |
+
<div id="tnp-heading">
|
138 |
|
139 |
<h2><?php _e('Create a newsletter', 'newsletter') ?>
|
140 |
<a class="tnp-btn-h1" href="<?php echo NewsletterEmails::instance()->get_admin_page_url('theme'); ?>"><?php _e('Back to newsletter themes', 'newsletter') ?></a>
|
141 |
</h2>
|
142 |
+
<br>
|
143 |
+
<p>Theme options are saved for next time you'll use this theme.</p>
|
144 |
|
145 |
+
</div>
|
146 |
|
147 |
+
<div id="tnp-body" class="tnp-body-lite">
|
148 |
|
149 |
<form method="post" action="<?php echo $module->get_admin_page_url('new'); ?>">
|
150 |
<?php $controls->init(); ?>
|
175 |
</div>
|
176 |
|
177 |
<?php include NEWSLETTER_DIR . '/tnp-footer.php'; ?>
|
178 |
+
|
179 |
</div>
|
emails/theme.php
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
<?php
|
2 |
-
if (!defined('ABSPATH'))
|
|
|
3 |
|
4 |
require_once NEWSLETTER_INCLUDES_DIR . '/controls.php';
|
5 |
$controls = new NewsletterControls();
|
@@ -63,14 +64,25 @@ $themes = $module->themes->get_all_with_data();
|
|
63 |
<form method="post" id="newsletter-form" action="<?php echo $module->get_admin_page_url('new'); ?>">
|
64 |
<?php $controls->init(); ?>
|
65 |
<?php $controls->hidden('theme'); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
<div class="tnp-theme-preview">
|
68 |
-
|
69 |
-
<a href="
|
70 |
-
|
|
|
|
|
|
|
|
|
71 |
</a>
|
72 |
-
|
73 |
-
|
74 |
<?php foreach ($themes as $key => $data) { ?>
|
75 |
<div class="tnp-theme-preview">
|
76 |
<p><?php echo esc_html($data['name']) ?></p>
|
1 |
<?php
|
2 |
+
if (!defined('ABSPATH'))
|
3 |
+
exit;
|
4 |
|
5 |
require_once NEWSLETTER_INCLUDES_DIR . '/controls.php';
|
6 |
$controls = new NewsletterControls();
|
64 |
<form method="post" id="newsletter-form" action="<?php echo $module->get_admin_page_url('new'); ?>">
|
65 |
<?php $controls->init(); ?>
|
66 |
<?php $controls->hidden('theme'); ?>
|
67 |
+
|
68 |
+
<div class="tnp-theme-preview">
|
69 |
+
<p><?php echo _e('Responsive Drag & Drop Composer', 'newsletter') ?></p>
|
70 |
+
<a href="<?php echo $module->get_admin_page_url('composer'); ?>" style="margin-right: 20px; margin-bottom: 20px">
|
71 |
+
<img src="<?php echo plugins_url('newsletter') . '/emails/themes/composer.gif' ?>" width="420" height="200">
|
72 |
+
</a>
|
73 |
+
</div>
|
74 |
|
75 |
<div class="tnp-theme-preview">
|
76 |
+
<p><> Raw HTML</p>
|
77 |
+
<a href="#" onclick="var f = document.getElementById('newsletter-form');
|
78 |
+
f.act.value = 'theme';
|
79 |
+
f.elements['options[theme]'].value = 'rawhtml';
|
80 |
+
f.submit();
|
81 |
+
return false;" style="margin-right: 20px; margin-bottom: 20px">
|
82 |
+
<img src="<?php echo plugins_url('newsletter') . '/emails/images/html.png' ?>" width="200" height="200">
|
83 |
</a>
|
84 |
+
</div>
|
85 |
+
|
86 |
<?php foreach ($themes as $key => $data) { ?>
|
87 |
<div class="tnp-theme-preview">
|
88 |
<p><?php echo esc_html($data['name']) ?></p>
|
includes/controls.php
CHANGED
@@ -346,7 +346,7 @@ class NewsletterControls {
|
|
346 |
|
347 |
function text($name, $size = 20, $placeholder = '') {
|
348 |
$value = $this->get_value($name);
|
349 |
-
echo '<input placeholder="' . esc_attr($placeholder) . '" name="options[' . $name . ']" type="text" size="' . $size . '" value="';
|
350 |
echo esc_attr($value);
|
351 |
echo '">';
|
352 |
}
|
@@ -477,18 +477,24 @@ class NewsletterControls {
|
|
477 |
echo '</textarea>';
|
478 |
}
|
479 |
|
480 |
-
function textarea_preview($name, $width = '100%', $height = '200', $header = '', $footer = '') {
|
481 |
$value = $this->get_value($name);
|
482 |
//do_action('newsletter_controls_textarea_preview', $name);
|
|
|
483 |
echo '<input class="button" type="button" onclick="newsletter_textarea_preview(\'options-' . esc_attr($name) . '\', \'\', \'\')" value="Switch editor/preview">';
|
484 |
echo '<br><br>';
|
485 |
-
|
|
|
486 |
echo '<textarea id="options-' . esc_attr($name) . '" name="options[' . esc_attr($name) . ']" wrap="off" style="width:' . esc_attr($width) . ';height:' . esc_attr($height) . 'px">';
|
487 |
echo esc_html($value);
|
488 |
echo '</textarea>';
|
489 |
-
echo '<
|
|
|
|
|
|
|
490 |
echo '</div>';
|
491 |
}
|
|
|
492 |
|
493 |
function email($prefix, $editor = null, $disable_option = false) {
|
494 |
if ($disable_option) {
|
@@ -837,10 +843,23 @@ class NewsletterControls {
|
|
837 |
function newsletter_textarea_preview(id, header, footer) {
|
838 |
var d = document.getElementById(id + "-iframe").contentWindow.document;
|
839 |
d.open();
|
840 |
-
|
841 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
842 |
d.close();
|
843 |
-
jQuery("#" + id + "-iframe").toggle();
|
|
|
844 |
}
|
845 |
</script>
|
846 |
';
|
346 |
|
347 |
function text($name, $size = 20, $placeholder = '') {
|
348 |
$value = $this->get_value($name);
|
349 |
+
echo '<input id="options-', esc_attr($name) , '" placeholder="' . esc_attr($placeholder) . '" name="options[' . $name . ']" type="text" size="' . $size . '" value="';
|
350 |
echo esc_attr($value);
|
351 |
echo '">';
|
352 |
}
|
477 |
echo '</textarea>';
|
478 |
}
|
479 |
|
480 |
+
function textarea_preview($name, $width = '100%', $height = '200', $header = '', $footer = '', $switch_button = true) {
|
481 |
$value = $this->get_value($name);
|
482 |
//do_action('newsletter_controls_textarea_preview', $name);
|
483 |
+
if ($switch_button) {
|
484 |
echo '<input class="button" type="button" onclick="newsletter_textarea_preview(\'options-' . esc_attr($name) . '\', \'\', \'\')" value="Switch editor/preview">';
|
485 |
echo '<br><br>';
|
486 |
+
}
|
487 |
+
echo '<div style="box-sizing: border-box; position: relative; margin: 0; padding: 0; width:' . esc_attr($width) . '; height:' . esc_attr($height) . '">';
|
488 |
echo '<textarea id="options-' . esc_attr($name) . '" name="options[' . esc_attr($name) . ']" wrap="off" style="width:' . esc_attr($width) . ';height:' . esc_attr($height) . 'px">';
|
489 |
echo esc_html($value);
|
490 |
echo '</textarea>';
|
491 |
+
echo '<div id="options-' . esc_attr($name) . '-preview" style="box-sizing: border-box; background-color: #eee; border: 1px solid #bbb; padding: 15px; width: auto; position: absolute; top: 20px; left: 20px; box-shadow: 0 0 20px #777; z-index: 10000; display: none">';
|
492 |
+
echo '<iframe id="options-' . esc_attr($name) . '-iframe" style="box-sizing: border-box; background-color: #fff; border: 1px solid #bbb; box-shadow: 1px 1px 10px #777; padding: 15px; width: 650px; margin-right: 20px; height: 500px; float: left"></iframe>';
|
493 |
+
echo '<iframe id="options-' . esc_attr($name) . '-iframe-phone" style="box-sizing: border-box; background-color: #fff; border: 1px solid #bbb; box-shadow: 1px 1px 10px #777; border-radius: 10px; padding: 5px; width: 320px; height: 500px; float: left"></iframe>';
|
494 |
+
echo '</div>';
|
495 |
echo '</div>';
|
496 |
}
|
497 |
+
|
498 |
|
499 |
function email($prefix, $editor = null, $disable_option = false) {
|
500 |
if ($disable_option) {
|
843 |
function newsletter_textarea_preview(id, header, footer) {
|
844 |
var d = document.getElementById(id + "-iframe").contentWindow.document;
|
845 |
d.open();
|
846 |
+
if (templateEditor) {
|
847 |
+
d.write(templateEditor.getValue());
|
848 |
+
} else {
|
849 |
+
d.write(header + document.getElementById(id).value + footer);
|
850 |
+
}
|
851 |
+
d.close();
|
852 |
+
|
853 |
+
var d = document.getElementById(id + "-iframe-phone").contentWindow.document;
|
854 |
+
d.open();
|
855 |
+
if (templateEditor) {
|
856 |
+
d.write(templateEditor.getValue());
|
857 |
+
} else {
|
858 |
+
d.write(header + document.getElementById(id).value + footer);
|
859 |
+
}
|
860 |
d.close();
|
861 |
+
//jQuery("#" + id + "-iframe-phone").toggle();
|
862 |
+
jQuery("#" + id + "-preview").toggle();
|
863 |
}
|
864 |
</script>
|
865 |
';
|
main/status.php
CHANGED
@@ -37,6 +37,12 @@ if ($controls->is_action('delete_logs')) {
|
|
37 |
$controls->messages = 'Logs deleted';
|
38 |
}
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
if ($controls->is_action('test')) {
|
41 |
|
42 |
if (!NewsletterModule::is_email($controls->data['test_email'])) {
|
@@ -408,9 +414,12 @@ $options = $module->get_options('status');
|
|
408 |
<?php } ?>
|
409 |
</td>
|
410 |
<td>
|
411 |
-
<?php if ($
|
412 |
No next execution is planned.
|
413 |
-
|
|
|
|
|
|
|
414 |
Next execution is planned in <?php echo $delta ?> seconds (negative values are ok).
|
415 |
<?php } ?>
|
416 |
</td>
|
@@ -483,7 +492,7 @@ $options = $module->get_options('status');
|
|
483 |
$response = wp_remote_post(home_url('/') . '?na=test');
|
484 |
if (is_wp_error($response)) {
|
485 |
$res = false;
|
486 |
-
$message = $
|
487 |
} else {
|
488 |
if (wp_remote_retrieve_response_code($response) != 200) {
|
489 |
$res = false;
|
37 |
$controls->messages = 'Logs deleted';
|
38 |
}
|
39 |
|
40 |
+
if ($controls->is_action('reschedule')) {
|
41 |
+
wp_clear_scheduled_hook('newsletter');
|
42 |
+
wp_schedule_event(time() + 30, 'newsletter', 'newsletter');
|
43 |
+
$controls->add_message_done();
|
44 |
+
}
|
45 |
+
|
46 |
if ($controls->is_action('test')) {
|
47 |
|
48 |
if (!NewsletterModule::is_email($controls->data['test_email'])) {
|
414 |
<?php } ?>
|
415 |
</td>
|
416 |
<td>
|
417 |
+
<?php if ($time === false) { ?>
|
418 |
No next execution is planned.
|
419 |
+
<?php $controls->button('reschedule', 'Reset')?>
|
420 |
+
<?php } else if ($delta <= -600) { ?>
|
421 |
+
The scheduler is very late: <?php echo $delta ?> seconds (<a href="http://www.thenewsletterplugin.com/plugins/newsletter/newsletter-delivery-engine" target="_blank">read more</a>)
|
422 |
+
<?php } else { ?>
|
423 |
Next execution is planned in <?php echo $delta ?> seconds (negative values are ok).
|
424 |
<?php } ?>
|
425 |
</td>
|
492 |
$response = wp_remote_post(home_url('/') . '?na=test');
|
493 |
if (is_wp_error($response)) {
|
494 |
$res = false;
|
495 |
+
$message = $response->get_error_message();
|
496 |
} else {
|
497 |
if (wp_remote_retrieve_response_code($response) != 200) {
|
498 |
$res = false;
|
plugin.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Newsletter
|
5 |
Plugin URI: http://www.thenewsletterplugin.com/plugins/newsletter
|
6 |
Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="http://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
|
7 |
-
Version: 4.8.
|
8 |
Author: Stefano Lissa & The Newsletter Team
|
9 |
Author URI: http://www.thenewsletterplugin.com
|
10 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
@@ -14,7 +14,7 @@
|
|
14 |
*/
|
15 |
|
16 |
// Used as dummy parameter on css and js links
|
17 |
-
define('NEWSLETTER_VERSION', '4.8.
|
18 |
|
19 |
global $wpdb, $newsletter;
|
20 |
|
@@ -198,7 +198,7 @@ class Newsletter extends NewsletterModule {
|
|
198 |
add_action('admin_head', array($this, 'hook_admin_head'));
|
199 |
|
200 |
// Protection against strange schedule removal on some installations
|
201 |
-
if (!wp_next_scheduled('newsletter') && !defined('WP_INSTALLING')) {
|
202 |
wp_schedule_event(time() + 30, 'newsletter', 'newsletter');
|
203 |
}
|
204 |
|
@@ -477,7 +477,7 @@ class Newsletter extends NewsletterModule {
|
|
477 |
|
478 |
function hook_admin_head() {
|
479 |
if ($this->is_admin_page()) {
|
480 |
-
echo '<link type="text/css" rel="stylesheet" href="' . plugins_url('newsletter') . '/admin.css?' .
|
481 |
echo '<script src="' . plugins_url('newsletter') . '/admin.js?' . NEWSLETTER_VERSION . '"></script>';
|
482 |
}
|
483 |
}
|
4 |
Plugin Name: Newsletter
|
5 |
Plugin URI: http://www.thenewsletterplugin.com/plugins/newsletter
|
6 |
Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="http://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
|
7 |
+
Version: 4.8.1
|
8 |
Author: Stefano Lissa & The Newsletter Team
|
9 |
Author URI: http://www.thenewsletterplugin.com
|
10 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
14 |
*/
|
15 |
|
16 |
// Used as dummy parameter on css and js links
|
17 |
+
define('NEWSLETTER_VERSION', '4.8.1');
|
18 |
|
19 |
global $wpdb, $newsletter;
|
20 |
|
198 |
add_action('admin_head', array($this, 'hook_admin_head'));
|
199 |
|
200 |
// Protection against strange schedule removal on some installations
|
201 |
+
if (!wp_next_scheduled('newsletter') && (!defined('WP_INSTALLING') || !WP_INSTALLING)) {
|
202 |
wp_schedule_event(time() + 30, 'newsletter', 'newsletter');
|
203 |
}
|
204 |
|
477 |
|
478 |
function hook_admin_head() {
|
479 |
if ($this->is_admin_page()) {
|
480 |
+
echo '<link type="text/css" rel="stylesheet" href="' . plugins_url('newsletter') . '/admin.css?' . time() . '"/>';
|
481 |
echo '<script src="' . plugins_url('newsletter') . '/admin.js?' . NEWSLETTER_VERSION . '"></script>';
|
482 |
}
|
483 |
}
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated
|
3 |
Requires at least: 3.4.0
|
4 |
Tested up to: 4.7.2
|
5 |
-
Stable tag: 4.8.
|
6 |
Contributors: satollo,webagile,michael-travan
|
7 |
|
8 |
Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
|
@@ -77,6 +77,17 @@ Thank you, The Newsletter Team
|
|
77 |
|
78 |
== Changelog ==
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
= 4.8.0 =
|
81 |
|
82 |
* New media selection on newsletter editor with size picker
|
2 |
Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated
|
3 |
Requires at least: 3.4.0
|
4 |
Tested up to: 4.7.2
|
5 |
+
Stable tag: 4.8.1
|
6 |
Contributors: satollo,webagile,michael-travan
|
7 |
|
8 |
Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
+
= 4.8.1 =
|
81 |
+
|
82 |
+
* Lists selection on widget
|
83 |
+
* CSS fix for submit button on widget
|
84 |
+
* Fixed the status panel on action call check
|
85 |
+
* Fixed the dedicated page creation
|
86 |
+
* New editor for service messages' template with desktop and mobile preview
|
87 |
+
* New raw html editor for newsletter with with desktop and mobile preview
|
88 |
+
* Improved status panel scheduler check
|
89 |
+
* Removed the old tiny mce 3
|
90 |
+
|
91 |
= 4.8.0 =
|
92 |
|
93 |
* New media selection on newsletter editor with size picker
|
subscription/email.html
CHANGED
@@ -24,12 +24,12 @@
|
|
24 |
<!-- Main table 100% wide with background color #eee -->
|
25 |
<table style="background-color: #eee; width: 100%;">
|
26 |
<tr>
|
27 |
-
<td align="center" style="padding:
|
28 |
|
29 |
<!-- Content table with backgdound color #fff, width 500px -->
|
30 |
-
<table style="background-color: #fff; width:
|
31 |
<tr>
|
32 |
-
<td style="padding:
|
33 |
<!-- The {message} tag is replaced with one of confirmation, welcome or goodbye messages -->
|
34 |
<!-- Messages content can be configured on Newsletter List Building panels -->
|
35 |
|
24 |
<!-- Main table 100% wide with background color #eee -->
|
25 |
<table style="background-color: #eee; width: 100%;">
|
26 |
<tr>
|
27 |
+
<td align="center" style="padding: 15px;">
|
28 |
|
29 |
<!-- Content table with backgdound color #fff, width 500px -->
|
30 |
+
<table style="background-color: #fff; max-width: 600px; width: 100%; border: 1px solid #ddd;">
|
31 |
<tr>
|
32 |
+
<td style="padding: 15px; font-size: 16px; font-family: sans-serif">
|
33 |
<!-- The {message} tag is replaced with one of confirmation, welcome or goodbye messages -->
|
34 |
<!-- Messages content can be configured on Newsletter List Building panels -->
|
35 |
|
subscription/options.php
CHANGED
@@ -75,7 +75,7 @@ if ($controls->is_action()) {
|
|
75 |
// Insert the post into the database
|
76 |
$page_id = wp_insert_post($page);
|
77 |
|
78 |
-
$controls->data['
|
79 |
$module->merge_options($controls->data);
|
80 |
}
|
81 |
|
75 |
// Insert the post into the database
|
76 |
$page_id = wp_insert_post($page);
|
77 |
|
78 |
+
$controls->data['page'] = $page_id;
|
79 |
$module->merge_options($controls->data);
|
80 |
}
|
81 |
|
subscription/page.php
CHANGED
@@ -18,7 +18,9 @@ $module = NewsletterSubscription::instance();
|
|
18 |
$user = $module->get_user_from_request();
|
19 |
$message_key = $module->get_message_key_from_request();
|
20 |
$message = $newsletter->replace($module->options[$message_key . '_text'], $user);
|
21 |
-
|
|
|
|
|
22 |
$alert = '';
|
23 |
if (isset($_REQUEST['alert'])) $alert = stripslashes($_REQUEST['alert']);
|
24 |
|
18 |
$user = $module->get_user_from_request();
|
19 |
$message_key = $module->get_message_key_from_request();
|
20 |
$message = $newsletter->replace($module->options[$message_key . '_text'], $user);
|
21 |
+
if (isset($module->options[$message_key . '_tracking'])) {
|
22 |
+
$message .= $module->options[$message_key . '_tracking'];
|
23 |
+
}
|
24 |
$alert = '';
|
25 |
if (isset($_REQUEST['alert'])) $alert = stripslashes($_REQUEST['alert']);
|
26 |
|
subscription/style.css
CHANGED
@@ -59,6 +59,7 @@ CUSTOM CSS RULES.
|
|
59 |
background-color: #444;
|
60 |
color: #fff;
|
61 |
width: auto;
|
|
|
62 |
}
|
63 |
|
64 |
@media all and (max-width: 480px) {
|
@@ -101,6 +102,7 @@ tnp-profile form .tnp-field label {
|
|
101 |
line-height: normal;
|
102 |
box-sizing: border-box;
|
103 |
border-radius: 0;
|
|
|
104 |
}
|
105 |
|
106 |
.tnp-profile form input[type=checkbox], .tnp-profile input[type=radio] {
|
@@ -120,6 +122,7 @@ tnp-profile form .tnp-field label {
|
|
120 |
.tnp-profile form .tnp-field input[type=submit] {
|
121 |
background-color: #444;
|
122 |
color: #fff;
|
|
|
123 |
}
|
124 |
|
125 |
|
@@ -153,6 +156,7 @@ tnp-profile form .tnp-field label {
|
|
153 |
font-size: 14px;
|
154 |
line-height: normal;
|
155 |
box-sizing: border-box;
|
|
|
156 |
}
|
157 |
|
158 |
.tnp-widget input[type=checkbox], .tnp-widget input[type=radio] {
|
@@ -216,6 +220,7 @@ tnp-profile form .tnp-field label {
|
|
216 |
line-height: normal;
|
217 |
border-radius: 0px;
|
218 |
box-sizing: border-box;
|
|
|
219 |
}
|
220 |
|
221 |
|
@@ -258,4 +263,17 @@ tnp-profile form .tnp-field label {
|
|
258 |
border-radius: 0px;
|
259 |
}
|
260 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
|
|
|
|
|
|
|
|
59 |
background-color: #444;
|
60 |
color: #fff;
|
61 |
width: auto;
|
62 |
+
height: auto;
|
63 |
}
|
64 |
|
65 |
@media all and (max-width: 480px) {
|
102 |
line-height: normal;
|
103 |
box-sizing: border-box;
|
104 |
border-radius: 0;
|
105 |
+
height: auto;
|
106 |
}
|
107 |
|
108 |
.tnp-profile form input[type=checkbox], .tnp-profile input[type=radio] {
|
122 |
.tnp-profile form .tnp-field input[type=submit] {
|
123 |
background-color: #444;
|
124 |
color: #fff;
|
125 |
+
height: auto;
|
126 |
}
|
127 |
|
128 |
|
156 |
font-size: 14px;
|
157 |
line-height: normal;
|
158 |
box-sizing: border-box;
|
159 |
+
height: auto;
|
160 |
}
|
161 |
|
162 |
.tnp-widget input[type=checkbox], .tnp-widget input[type=radio] {
|
220 |
line-height: normal;
|
221 |
border-radius: 0px;
|
222 |
box-sizing: border-box;
|
223 |
+
height: auto;
|
224 |
}
|
225 |
|
226 |
|
263 |
border-radius: 0px;
|
264 |
}
|
265 |
|
266 |
+
.tnp-comments {
|
267 |
+
clear: both;
|
268 |
+
margin-top: 15px;
|
269 |
+
margin-bottom: 15px;
|
270 |
+
}
|
271 |
+
|
272 |
+
.tnp-comments label {
|
273 |
+
display: block;
|
274 |
+
}
|
275 |
|
276 |
+
.tnp-comments input[type=checkbox] {
|
277 |
+
display: inline;
|
278 |
+
width: auto!important;
|
279 |
+
}
|
subscription/subscription.php
CHANGED
@@ -1489,6 +1489,8 @@ class NewsletterSubscription extends NewsletterModule {
|
|
1489 |
*/
|
1490 |
function get_profile_form($user) {
|
1491 |
$options = get_option('newsletter_profile');
|
|
|
|
|
1492 |
|
1493 |
$buffer .= '<div class="tnp-profile">';
|
1494 |
$buffer .= '<form action="' . esc_attr(home_url('/') . '?na=ps') . '" method="post" onsubmit="return newsletter_check(this)">';
|
@@ -1575,7 +1577,9 @@ class NewsletterSubscription extends NewsletterModule {
|
|
1575 |
|
1576 |
function get_profile_form_html5($user) {
|
1577 |
$options = get_option('newsletter_profile');
|
1578 |
-
|
|
|
|
|
1579 |
$buffer .= '<div class="tnp tnp-profile">';
|
1580 |
$buffer .= '<form action="' . esc_attr(home_url('/') . '?na=ps') . '" method="post" onsubmit="return newsletter_check(this)">';
|
1581 |
$buffer .= '<input type="hidden" name="nk" value="' . esc_attr($user->id . '-' . $user->token) . '">';
|
1489 |
*/
|
1490 |
function get_profile_form($user) {
|
1491 |
$options = get_option('newsletter_profile');
|
1492 |
+
|
1493 |
+
$buffer = '';
|
1494 |
|
1495 |
$buffer .= '<div class="tnp-profile">';
|
1496 |
$buffer .= '<form action="' . esc_attr(home_url('/') . '?na=ps') . '" method="post" onsubmit="return newsletter_check(this)">';
|
1577 |
|
1578 |
function get_profile_form_html5($user) {
|
1579 |
$options = get_option('newsletter_profile');
|
1580 |
+
|
1581 |
+
$buffer = '';
|
1582 |
+
|
1583 |
$buffer .= '<div class="tnp tnp-profile">';
|
1584 |
$buffer .= '<form action="' . esc_attr(home_url('/') . '?na=ps') . '" method="post" onsubmit="return newsletter_check(this)">';
|
1585 |
$buffer .= '<input type="hidden" name="nk" value="' . esc_attr($user->id . '-' . $user->token) . '">';
|
subscription/template.php
CHANGED
@@ -51,9 +51,14 @@ if (!$controls->is_action()) {
|
|
51 |
}
|
52 |
}
|
53 |
?>
|
54 |
-
|
55 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/codemirror.css" type="text/css">
|
56 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/addon/hint/show-hint.css">
|
|
|
|
|
|
|
|
|
|
|
57 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/codemirror.js"></script>
|
58 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/mode/xml/xml.js"></script>
|
59 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/mode/css/css.js"></script>
|
@@ -64,14 +69,14 @@ if (!$controls->is_action()) {
|
|
64 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/addon/hint/html-hint.js"></script>
|
65 |
<script>
|
66 |
jQuery(function () {
|
67 |
-
|
68 |
lineNumbers: true,
|
69 |
mode: 'htmlmixed',
|
70 |
extraKeys: {"Ctrl-Space": "autocomplete"}
|
71 |
});
|
72 |
});
|
73 |
</script>
|
74 |
-
|
75 |
<div class="wrap" id="tnp-wrap">
|
76 |
|
77 |
<?php include NEWSLETTER_DIR . '/tnp-header.php'; ?>
|
@@ -104,15 +109,15 @@ if (!$controls->is_action()) {
|
|
104 |
</p>
|
105 |
</td>
|
106 |
</tr>
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
111 |
<?php $controls->button_reset(); ?>
|
112 |
<?php $controls->button('test', 'Send a test'); ?>
|
113 |
-
|
114 |
-
</tr>
|
115 |
-
</table>
|
116 |
<p>
|
117 |
<?php $controls->button_save(); ?>
|
118 |
</p>
|
51 |
}
|
52 |
}
|
53 |
?>
|
54 |
+
|
55 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/codemirror.css" type="text/css">
|
56 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/addon/hint/show-hint.css">
|
57 |
+
<style>
|
58 |
+
.CodeMirror {
|
59 |
+
height: 100%;
|
60 |
+
}
|
61 |
+
</style>
|
62 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/codemirror.js"></script>
|
63 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/mode/xml/xml.js"></script>
|
64 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/mode/css/css.js"></script>
|
69 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/addon/hint/html-hint.js"></script>
|
70 |
<script>
|
71 |
jQuery(function () {
|
72 |
+
templateEditor = CodeMirror.fromTextArea(document.getElementById("options-template"), {
|
73 |
lineNumbers: true,
|
74 |
mode: 'htmlmixed',
|
75 |
extraKeys: {"Ctrl-Space": "autocomplete"}
|
76 |
});
|
77 |
});
|
78 |
</script>
|
79 |
+
|
80 |
<div class="wrap" id="tnp-wrap">
|
81 |
|
82 |
<?php include NEWSLETTER_DIR . '/tnp-header.php'; ?>
|
109 |
</p>
|
110 |
</td>
|
111 |
</tr>
|
112 |
+
</table>
|
113 |
+
|
114 |
+
<h3><?php _e('Template', 'newsletter')?></h3>
|
115 |
+
|
116 |
+
<?php $controls->textarea_preview('template', '100%', '700px'); ?>
|
117 |
+
<br><br>
|
118 |
<?php $controls->button_reset(); ?>
|
119 |
<?php $controls->button('test', 'Send a test'); ?>
|
120 |
+
|
|
|
|
|
121 |
<p>
|
122 |
<?php $controls->button_save(); ?>
|
123 |
</p>
|
tiny_mce/langs/en.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
tinyMCE.addI18n({en:{common:{"more_colors":"More Colors...","invalid_data":"Error: Invalid values entered, these are marked in red.","popup_blocked":"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.","clipboard_no_support":"Currently not supported by your browser, use keyboard shortcuts instead.","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","not_set":"-- Not Set --","class_name":"Class",browse:"Browse",close:"Close",cancel:"Cancel",update:"Update",insert:"Insert",apply:"Apply","edit_confirm":"Do you want to use the WYSIWYG mode for this textarea?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"Full",right:"Right",center:"Center",left:"Left",align:"Alignment"},insertdatetime:{"day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","inserttime_desc":"Insert Time","insertdate_desc":"Insert Date","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Print"},preview:{"preview_desc":"Preview"},directionality:{"rtl_desc":"Direction Right to Left","ltr_desc":"Direction Left to Right"},layer:{content:"New layer...","absolute_desc":"Toggle Absolute Positioning","backward_desc":"Move Backward","forward_desc":"Move Forward","insertlayer_desc":"Insert New Layer"},save:{"save_desc":"Save","cancel_desc":"Cancel All Changes"},nonbreaking:{"nonbreaking_desc":"Insert Non-Breaking Space Character"},iespell:{download:"ieSpell not detected. Do you want to install it now?","iespell_desc":"Check Spelling"},advhr:{"delta_height":"","delta_width":"","advhr_desc":"Insert Horizontal Line"},emotions:{"delta_height":"","delta_width":"","emotions_desc":"Emotions"},searchreplace:{"replace_desc":"Find/Replace","delta_width":"","delta_height":"","search_desc":"Find"},advimage:{"delta_width":"","image_desc":"Insert/Edit Image","delta_height":""},advlink:{"delta_height":"","delta_width":"","link_desc":"Insert/Edit Link"},xhtmlxtras:{"attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":"","attribs_desc":"Insert/Edit Attributes","ins_desc":"Insertion","del_desc":"Deletion","acronym_desc":"Acronym","abbr_desc":"Abbreviation","cite_desc":"Citation"},style:{"delta_height":"","delta_width":"",desc:"Edit CSS Style"},paste:{"plaintext_mode_stick":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"Select All","paste_word_desc":"Paste from Word","paste_text_desc":"Paste as Plain Text"},"paste_dlg":{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."},table:{"merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":"",cell:"Cell",col:"Column",row:"Row",del:"Delete Table","copy_row_desc":"Copy Table Row","cut_row_desc":"Cut Table Row","paste_row_after_desc":"Paste Table Row After","paste_row_before_desc":"Paste Table Row Before","props_desc":"Table Properties","cell_desc":"Table Cell Properties","row_desc":"Table Row Properties","merge_cells_desc":"Merge Table Cells","split_cells_desc":"Split Merged Table Cells","delete_col_desc":"Delete Column","col_after_desc":"Insert Column After","col_before_desc":"Insert Column Before","delete_row_desc":"Delete Row","row_after_desc":"Insert Row After","row_before_desc":"Insert Row Before",desc:"Insert/Edit Table"},autosave:{"warning_message":"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?","restore_content":"Restore auto-saved content.","unload_msg":"The changes you made will be lost if you navigate away from this page."},fullscreen:{desc:"Toggle Full Screen Mode"},media:{"delta_height":"","delta_width":"",edit:"Edit Embedded Media",desc:"Insert/Edit Embedded Media"},fullpage:{desc:"Document Properties","delta_width":"","delta_height":""},template:{desc:"Insert Predefined Template Content"},visualchars:{desc:"Show/Hide Visual Control Characters"},spellchecker:{desc:"Toggle Spell Checker",menu:"Spell Checker Settings","ignore_word":"Ignore Word","ignore_words":"Ignore All",langs:"Languages",wait:"Please wait...",sug:"Suggestions","no_sug":"No Suggestions","no_mpell":"No misspellings found.","learn_word":"Learn word"},pagebreak:{desc:"Insert Page Break for Printing"},advlist:{types:"Types",def:"Default","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words:"},visualblocks:{desc:'Show/hide block elements'}}});
|
|
tiny_mce/license.txt
DELETED
@@ -1,504 +0,0 @@
|
|
1 |
-
GNU LESSER GENERAL PUBLIC LICENSE
|
2 |
-
Version 2.1, February 1999
|
3 |
-
|
4 |
-
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
[This is the first released version of the Lesser GPL. It also counts
|
10 |
-
as the successor of the GNU Library Public License, version 2, hence
|
11 |
-
the version number 2.1.]
|
12 |
-
|
13 |
-
Preamble
|
14 |
-
|
15 |
-
The licenses for most software are designed to take away your
|
16 |
-
freedom to share and change it. By contrast, the GNU General Public
|
17 |
-
Licenses are intended to guarantee your freedom to share and change
|
18 |
-
free software--to make sure the software is free for all its users.
|
19 |
-
|
20 |
-
This license, the Lesser General Public License, applies to some
|
21 |
-
specially designated software packages--typically libraries--of the
|
22 |
-
Free Software Foundation and other authors who decide to use it. You
|
23 |
-
can use it too, but we suggest you first think carefully about whether
|
24 |
-
this license or the ordinary General Public License is the better
|
25 |
-
strategy to use in any particular case, based on the explanations below.
|
26 |
-
|
27 |
-
When we speak of free software, we are referring to freedom of use,
|
28 |
-
not price. Our General Public Licenses are designed to make sure that
|
29 |
-
you have the freedom to distribute copies of free software (and charge
|
30 |
-
for this service if you wish); that you receive source code or can get
|
31 |
-
it if you want it; that you can change the software and use pieces of
|
32 |
-
it in new free programs; and that you are informed that you can do
|
33 |
-
these things.
|
34 |
-
|
35 |
-
To protect your rights, we need to make restrictions that forbid
|
36 |
-
distributors to deny you these rights or to ask you to surrender these
|
37 |
-
rights. These restrictions translate to certain responsibilities for
|
38 |
-
you if you distribute copies of the library or if you modify it.
|
39 |
-
|
40 |
-
For example, if you distribute copies of the library, whether gratis
|
41 |
-
or for a fee, you must give the recipients all the rights that we gave
|
42 |
-
you. You must make sure that they, too, receive or can get the source
|
43 |
-
code. If you link other code with the library, you must provide
|
44 |
-
complete object files to the recipients, so that they can relink them
|
45 |
-
with the library after making changes to the library and recompiling
|
46 |
-
it. And you must show them these terms so they know their rights.
|
47 |
-
|
48 |
-
We protect your rights with a two-step method: (1) we copyright the
|
49 |
-
library, and (2) we offer you this license, which gives you legal
|
50 |
-
permission to copy, distribute and/or modify the library.
|
51 |
-
|
52 |
-
To protect each distributor, we want to make it very clear that
|
53 |
-
there is no warranty for the free library. Also, if the library is
|
54 |
-
modified by someone else and passed on, the recipients should know
|
55 |
-
that what they have is not the original version, so that the original
|
56 |
-
author's reputation will not be affected by problems that might be
|
57 |
-
introduced by others.
|
58 |
-
|
59 |
-
Finally, software patents pose a constant threat to the existence of
|
60 |
-
any free program. We wish to make sure that a company cannot
|
61 |
-
effectively restrict the users of a free program by obtaining a
|
62 |
-
restrictive license from a patent holder. Therefore, we insist that
|
63 |
-
any patent license obtained for a version of the library must be
|
64 |
-
consistent with the full freedom of use specified in this license.
|
65 |
-
|
66 |
-
Most GNU software, including some libraries, is covered by the
|
67 |
-
ordinary GNU General Public License. This license, the GNU Lesser
|
68 |
-
General Public License, applies to certain designated libraries, and
|
69 |
-
is quite different from the ordinary General Public License. We use
|
70 |
-
this license for certain libraries in order to permit linking those
|
71 |
-
libraries into non-free programs.
|
72 |
-
|
73 |
-
When a program is linked with a library, whether statically or using
|
74 |
-
a shared library, the combination of the two is legally speaking a
|
75 |
-
combined work, a derivative of the original library. The ordinary
|
76 |
-
General Public License therefore permits such linking only if the
|
77 |
-
entire combination fits its criteria of freedom. The Lesser General
|
78 |
-
Public License permits more lax criteria for linking other code with
|
79 |
-
the library.
|
80 |
-
|
81 |
-
We call this license the "Lesser" General Public License because it
|
82 |
-
does Less to protect the user's freedom than the ordinary General
|
83 |
-
Public License. It also provides other free software developers Less
|
84 |
-
of an advantage over competing non-free programs. These disadvantages
|
85 |
-
are the reason we use the ordinary General Public License for many
|
86 |
-
libraries. However, the Lesser license provides advantages in certain
|
87 |
-
special circumstances.
|
88 |
-
|
89 |
-
For example, on rare occasions, there may be a special need to
|
90 |
-
encourage the widest possible use of a certain library, so that it becomes
|
91 |
-
a de-facto standard. To achieve this, non-free programs must be
|
92 |
-
allowed to use the library. A more frequent case is that a free
|
93 |
-
library does the same job as widely used non-free libraries. In this
|
94 |
-
case, there is little to gain by limiting the free library to free
|
95 |
-
software only, so we use the Lesser General Public License.
|
96 |
-
|
97 |
-
In other cases, permission to use a particular library in non-free
|
98 |
-
programs enables a greater number of people to use a large body of
|
99 |
-
free software. For example, permission to use the GNU C Library in
|
100 |
-
non-free programs enables many more people to use the whole GNU
|
101 |
-
operating system, as well as its variant, the GNU/Linux operating
|
102 |
-
system.
|
103 |
-
|
104 |
-
Although the Lesser General Public License is Less protective of the
|
105 |
-
users' freedom, it does ensure that the user of a program that is
|
106 |
-
linked with the Library has the freedom and the wherewithal to run
|
107 |
-
that program using a modified version of the Library.
|
108 |
-
|
109 |
-
The precise terms and conditions for copying, distribution and
|
110 |
-
modification follow. Pay close attention to the difference between a
|
111 |
-
"work based on the library" and a "work that uses the library". The
|
112 |
-
former contains code derived from the library, whereas the latter must
|
113 |
-
be combined with the library in order to run.
|
114 |
-
|
115 |
-
GNU LESSER GENERAL PUBLIC LICENSE
|
116 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
117 |
-
|
118 |
-
0. This License Agreement applies to any software library or other
|
119 |
-
program which contains a notice placed by the copyright holder or
|
120 |
-
other authorized party saying it may be distributed under the terms of
|
121 |
-
this Lesser General Public License (also called "this License").
|
122 |
-
Each licensee is addressed as "you".
|
123 |
-
|
124 |
-
A "library" means a collection of software functions and/or data
|
125 |
-
prepared so as to be conveniently linked with application programs
|
126 |
-
(which use some of those functions and data) to form executables.
|
127 |
-
|
128 |
-
The "Library", below, refers to any such software library or work
|
129 |
-
which has been distributed under these terms. A "work based on the
|
130 |
-
Library" means either the Library or any derivative work under
|
131 |
-
copyright law: that is to say, a work containing the Library or a
|
132 |
-
portion of it, either verbatim or with modifications and/or translated
|
133 |
-
straightforwardly into another language. (Hereinafter, translation is
|
134 |
-
included without limitation in the term "modification".)
|
135 |
-
|
136 |
-
"Source code" for a work means the preferred form of the work for
|
137 |
-
making modifications to it. For a library, complete source code means
|
138 |
-
all the source code for all modules it contains, plus any associated
|
139 |
-
interface definition files, plus the scripts used to control compilation
|
140 |
-
and installation of the library.
|
141 |
-
|
142 |
-
Activities other than copying, distribution and modification are not
|
143 |
-
covered by this License; they are outside its scope. The act of
|
144 |
-
running a program using the Library is not restricted, and output from
|
145 |
-
such a program is covered only if its contents constitute a work based
|
146 |
-
on the Library (independent of the use of the Library in a tool for
|
147 |
-
writing it). Whether that is true depends on what the Library does
|
148 |
-
and what the program that uses the Library does.
|
149 |
-
|
150 |
-
1. You may copy and distribute verbatim copies of the Library's
|
151 |
-
complete source code as you receive it, in any medium, provided that
|
152 |
-
you conspicuously and appropriately publish on each copy an
|
153 |
-
appropriate copyright notice and disclaimer of warranty; keep intact
|
154 |
-
all the notices that refer to this License and to the absence of any
|
155 |
-
warranty; and distribute a copy of this License along with the
|
156 |
-
Library.
|
157 |
-
|
158 |
-
You may charge a fee for the physical act of transferring a copy,
|
159 |
-
and you may at your option offer warranty protection in exchange for a
|
160 |
-
fee.
|
161 |
-
|
162 |
-
2. You may modify your copy or copies of the Library or any portion
|
163 |
-
of it, thus forming a work based on the Library, and copy and
|
164 |
-
distribute such modifications or work under the terms of Section 1
|
165 |
-
above, provided that you also meet all of these conditions:
|
166 |
-
|
167 |
-
a) The modified work must itself be a software library.
|
168 |
-
|
169 |
-
b) You must cause the files modified to carry prominent notices
|
170 |
-
stating that you changed the files and the date of any change.
|
171 |
-
|
172 |
-
c) You must cause the whole of the work to be licensed at no
|
173 |
-
charge to all third parties under the terms of this License.
|
174 |
-
|
175 |
-
d) If a facility in the modified Library refers to a function or a
|
176 |
-
table of data to be supplied by an application program that uses
|
177 |
-
the facility, other than as an argument passed when the facility
|
178 |
-
is invoked, then you must make a good faith effort to ensure that,
|
179 |
-
in the event an application does not supply such function or
|
180 |
-
table, the facility still operates, and performs whatever part of
|
181 |
-
its purpose remains meaningful.
|
182 |
-
|
183 |
-
(For example, a function in a library to compute square roots has
|
184 |
-
a purpose that is entirely well-defined independent of the
|
185 |
-
application. Therefore, Subsection 2d requires that any
|
186 |
-
application-supplied function or table used by this function must
|
187 |
-
be optional: if the application does not supply it, the square
|
188 |
-
root function must still compute square roots.)
|
189 |
-
|
190 |
-
These requirements apply to the modified work as a whole. If
|
191 |
-
identifiable sections of that work are not derived from the Library,
|
192 |
-
and can be reasonably considered independent and separate works in
|
193 |
-
themselves, then this License, and its terms, do not apply to those
|
194 |
-
sections when you distribute them as separate works. But when you
|
195 |
-
distribute the same sections as part of a whole which is a work based
|
196 |
-
on the Library, the distribution of the whole must be on the terms of
|
197 |
-
this License, whose permissions for other licensees extend to the
|
198 |
-
entire whole, and thus to each and every part regardless of who wrote
|
199 |
-
it.
|
200 |
-
|
201 |
-
Thus, it is not the intent of this section to claim rights or contest
|
202 |
-
your rights to work written entirely by you; rather, the intent is to
|
203 |
-
exercise the right to control the distribution of derivative or
|
204 |
-
collective works based on the Library.
|
205 |
-
|
206 |
-
In addition, mere aggregation of another work not based on the Library
|
207 |
-
with the Library (or with a work based on the Library) on a volume of
|
208 |
-
a storage or distribution medium does not bring the other work under
|
209 |
-
the scope of this License.
|
210 |
-
|
211 |
-
3. You may opt to apply the terms of the ordinary GNU General Public
|
212 |
-
License instead of this License to a given copy of the Library. To do
|
213 |
-
this, you must alter all the notices that refer to this License, so
|
214 |
-
that they refer to the ordinary GNU General Public License, version 2,
|
215 |
-
instead of to this License. (If a newer version than version 2 of the
|
216 |
-
ordinary GNU General Public License has appeared, then you can specify
|
217 |
-
that version instead if you wish.) Do not make any other change in
|
218 |
-
these notices.
|
219 |
-
|
220 |
-
Once this change is made in a given copy, it is irreversible for
|
221 |
-
that copy, so the ordinary GNU General Public License applies to all
|
222 |
-
subsequent copies and derivative works made from that copy.
|
223 |
-
|
224 |
-
This option is useful when you wish to copy part of the code of
|
225 |
-
the Library into a program that is not a library.
|
226 |
-
|
227 |
-
4. You may copy and distribute the Library (or a portion or
|
228 |
-
derivative of it, under Section 2) in object code or executable form
|
229 |
-
under the terms of Sections 1 and 2 above provided that you accompany
|
230 |
-
it with the complete corresponding machine-readable source code, which
|
231 |
-
must be distributed under the terms of Sections 1 and 2 above on a
|
232 |
-
medium customarily used for software interchange.
|
233 |
-
|
234 |
-
If distribution of object code is made by offering access to copy
|
235 |
-
from a designated place, then offering equivalent access to copy the
|
236 |
-
source code from the same place satisfies the requirement to
|
237 |
-
distribute the source code, even though third parties are not
|
238 |
-
compelled to copy the source along with the object code.
|
239 |
-
|
240 |
-
5. A program that contains no derivative of any portion of the
|
241 |
-
Library, but is designed to work with the Library by being compiled or
|
242 |
-
linked with it, is called a "work that uses the Library". Such a
|
243 |
-
work, in isolation, is not a derivative work of the Library, and
|
244 |
-
therefore falls outside the scope of this License.
|
245 |
-
|
246 |
-
However, linking a "work that uses the Library" with the Library
|
247 |
-
creates an executable that is a derivative of the Library (because it
|
248 |
-
contains portions of the Library), rather than a "work that uses the
|
249 |
-
library". The executable is therefore covered by this License.
|
250 |
-
Section 6 states terms for distribution of such executables.
|
251 |
-
|
252 |
-
When a "work that uses the Library" uses material from a header file
|
253 |
-
that is part of the Library, the object code for the work may be a
|
254 |
-
derivative work of the Library even though the source code is not.
|
255 |
-
Whether this is true is especially significant if the work can be
|
256 |
-
linked without the Library, or if the work is itself a library. The
|
257 |
-
threshold for this to be true is not precisely defined by law.
|
258 |
-
|
259 |
-
If such an object file uses only numerical parameters, data
|
260 |
-
structure layouts and accessors, and small macros and small inline
|
261 |
-
functions (ten lines or less in length), then the use of the object
|
262 |
-
file is unrestricted, regardless of whether it is legally a derivative
|
263 |
-
work. (Executables containing this object code plus portions of the
|
264 |
-
Library will still fall under Section 6.)
|
265 |
-
|
266 |
-
Otherwise, if the work is a derivative of the Library, you may
|
267 |
-
distribute the object code for the work under the terms of Section 6.
|
268 |
-
Any executables containing that work also fall under Section 6,
|
269 |
-
whether or not they are linked directly with the Library itself.
|
270 |
-
|
271 |
-
6. As an exception to the Sections above, you may also combine or
|
272 |
-
link a "work that uses the Library" with the Library to produce a
|
273 |
-
work containing portions of the Library, and distribute that work
|
274 |
-
under terms of your choice, provided that the terms permit
|
275 |
-
modification of the work for the customer's own use and reverse
|
276 |
-
engineering for debugging such modifications.
|
277 |
-
|
278 |
-
You must give prominent notice with each copy of the work that the
|
279 |
-
Library is used in it and that the Library and its use are covered by
|
280 |
-
this License. You must supply a copy of this License. If the work
|
281 |
-
during execution displays copyright notices, you must include the
|
282 |
-
copyright notice for the Library among them, as well as a reference
|
283 |
-
directing the user to the copy of this License. Also, you must do one
|
284 |
-
of these things:
|
285 |
-
|
286 |
-
a) Accompany the work with the complete corresponding
|
287 |
-
machine-readable source code for the Library including whatever
|
288 |
-
changes were used in the work (which must be distributed under
|
289 |
-
Sections 1 and 2 above); and, if the work is an executable linked
|
290 |
-
with the Library, with the complete machine-readable "work that
|
291 |
-
uses the Library", as object code and/or source code, so that the
|
292 |
-
user can modify the Library and then relink to produce a modified
|
293 |
-
executable containing the modified Library. (It is understood
|
294 |
-
that the user who changes the contents of definitions files in the
|
295 |
-
Library will not necessarily be able to recompile the application
|
296 |
-
to use the modified definitions.)
|
297 |
-
|
298 |
-
b) Use a suitable shared library mechanism for linking with the
|
299 |
-
Library. A suitable mechanism is one that (1) uses at run time a
|
300 |
-
copy of the library already present on the user's computer system,
|
301 |
-
rather than copying library functions into the executable, and (2)
|
302 |
-
will operate properly with a modified version of the library, if
|
303 |
-
the user installs one, as long as the modified version is
|
304 |
-
interface-compatible with the version that the work was made with.
|
305 |
-
|
306 |
-
c) Accompany the work with a written offer, valid for at
|
307 |
-
least three years, to give the same user the materials
|
308 |
-
specified in Subsection 6a, above, for a charge no more
|
309 |
-
than the cost of performing this distribution.
|
310 |
-
|
311 |
-
d) If distribution of the work is made by offering access to copy
|
312 |
-
from a designated place, offer equivalent access to copy the above
|
313 |
-
specified materials from the same place.
|
314 |
-
|
315 |
-
e) Verify that the user has already received a copy of these
|
316 |
-
materials or that you have already sent this user a copy.
|
317 |
-
|
318 |
-
For an executable, the required form of the "work that uses the
|
319 |
-
Library" must include any data and utility programs needed for
|
320 |
-
reproducing the executable from it. However, as a special exception,
|
321 |
-
the materials to be distributed need not include anything that is
|
322 |
-
normally distributed (in either source or binary form) with the major
|
323 |
-
components (compiler, kernel, and so on) of the operating system on
|
324 |
-
which the executable runs, unless that component itself accompanies
|
325 |
-
the executable.
|
326 |
-
|
327 |
-
It may happen that this requirement contradicts the license
|
328 |
-
restrictions of other proprietary libraries that do not normally
|
329 |
-
accompany the operating system. Such a contradiction means you cannot
|
330 |
-
use both them and the Library together in an executable that you
|
331 |
-
distribute.
|
332 |
-
|
333 |
-
7. You may place library facilities that are a work based on the
|
334 |
-
Library side-by-side in a single library together with other library
|
335 |
-
facilities not covered by this License, and distribute such a combined
|
336 |
-
library, provided that the separate distribution of the work based on
|
337 |
-
the Library and of the other library facilities is otherwise
|
338 |
-
permitted, and provided that you do these two things:
|
339 |
-
|
340 |
-
a) Accompany the combined library with a copy of the same work
|
341 |
-
based on the Library, uncombined with any other library
|
342 |
-
facilities. This must be distributed under the terms of the
|
343 |
-
Sections above.
|
344 |
-
|
345 |
-
b) Give prominent notice with the combined library of the fact
|
346 |
-
that part of it is a work based on the Library, and explaining
|
347 |
-
where to find the accompanying uncombined form of the same work.
|
348 |
-
|
349 |
-
8. You may not copy, modify, sublicense, link with, or distribute
|
350 |
-
the Library except as expressly provided under this License. Any
|
351 |
-
attempt otherwise to copy, modify, sublicense, link with, or
|
352 |
-
distribute the Library is void, and will automatically terminate your
|
353 |
-
rights under this License. However, parties who have received copies,
|
354 |
-
or rights, from you under this License will not have their licenses
|
355 |
-
terminated so long as such parties remain in full compliance.
|
356 |
-
|
357 |
-
9. You are not required to accept this License, since you have not
|
358 |
-
signed it. However, nothing else grants you permission to modify or
|
359 |
-
distribute the Library or its derivative works. These actions are
|
360 |
-
prohibited by law if you do not accept this License. Therefore, by
|
361 |
-
modifying or distributing the Library (or any work based on the
|
362 |
-
Library), you indicate your acceptance of this License to do so, and
|
363 |
-
all its terms and conditions for copying, distributing or modifying
|
364 |
-
the Library or works based on it.
|
365 |
-
|
366 |
-
10. Each time you redistribute the Library (or any work based on the
|
367 |
-
Library), the recipient automatically receives a license from the
|
368 |
-
original licensor to copy, distribute, link with or modify the Library
|
369 |
-
subject to these terms and conditions. You may not impose any further
|
370 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
371 |
-
You are not responsible for enforcing compliance by third parties with
|
372 |
-
this License.
|
373 |
-
|
374 |
-
11. If, as a consequence of a court judgment or allegation of patent
|
375 |
-
infringement or for any other reason (not limited to patent issues),
|
376 |
-
conditions are imposed on you (whether by court order, agreement or
|
377 |
-
otherwise) that contradict the conditions of this License, they do not
|
378 |
-
excuse you from the conditions of this License. If you cannot
|
379 |
-
distribute so as to satisfy simultaneously your obligations under this
|
380 |
-
License and any other pertinent obligations, then as a consequence you
|
381 |
-
may not distribute the Library at all. For example, if a patent
|
382 |
-
license would not permit royalty-free redistribution of the Library by
|
383 |
-
all those who receive copies directly or indirectly through you, then
|
384 |
-
the only way you could satisfy both it and this License would be to
|
385 |
-
refrain entirely from distribution of the Library.
|
386 |
-
|
387 |
-
If any portion of this section is held invalid or unenforceable under any
|
388 |
-
particular circumstance, the balance of the section is intended to apply,
|
389 |
-
and the section as a whole is intended to apply in other circumstances.
|
390 |
-
|
391 |
-
It is not the purpose of this section to induce you to infringe any
|
392 |
-
patents or other property right claims or to contest validity of any
|
393 |
-
such claims; this section has the sole purpose of protecting the
|
394 |
-
integrity of the free software distribution system which is
|
395 |
-
implemented by public license practices. Many people have made
|
396 |
-
generous contributions to the wide range of software distributed
|
397 |
-
through that system in reliance on consistent application of that
|
398 |
-
system; it is up to the author/donor to decide if he or she is willing
|
399 |
-
to distribute software through any other system and a licensee cannot
|
400 |
-
impose that choice.
|
401 |
-
|
402 |
-
This section is intended to make thoroughly clear what is believed to
|
403 |
-
be a consequence of the rest of this License.
|
404 |
-
|
405 |
-
12. If the distribution and/or use of the Library is restricted in
|
406 |
-
certain countries either by patents or by copyrighted interfaces, the
|
407 |
-
original copyright holder who places the Library under this License may add
|
408 |
-
an explicit geographical distribution limitation excluding those countries,
|
409 |
-
so that distribution is permitted only in or among countries not thus
|
410 |
-
excluded. In such case, this License incorporates the limitation as if
|
411 |
-
written in the body of this License.
|
412 |
-
|
413 |
-
13. The Free Software Foundation may publish revised and/or new
|
414 |
-
versions of the Lesser General Public License from time to time.
|
415 |
-
Such new versions will be similar in spirit to the present version,
|
416 |
-
but may differ in detail to address new problems or concerns.
|
417 |
-
|
418 |
-
Each version is given a distinguishing version number. If the Library
|
419 |
-
specifies a version number of this License which applies to it and
|
420 |
-
"any later version", you have the option of following the terms and
|
421 |
-
conditions either of that version or of any later version published by
|
422 |
-
the Free Software Foundation. If the Library does not specify a
|
423 |
-
license version number, you may choose any version ever published by
|
424 |
-
the Free Software Foundation.
|
425 |
-
|
426 |
-
14. If you wish to incorporate parts of the Library into other free
|
427 |
-
programs whose distribution conditions are incompatible with these,
|
428 |
-
write to the author to ask for permission. For software which is
|
429 |
-
copyrighted by the Free Software Foundation, write to the Free
|
430 |
-
Software Foundation; we sometimes make exceptions for this. Our
|
431 |
-
decision will be guided by the two goals of preserving the free status
|
432 |
-
of all derivatives of our free software and of promoting the sharing
|
433 |
-
and reuse of software generally.
|
434 |
-
|
435 |
-
NO WARRANTY
|
436 |
-
|
437 |
-
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
438 |
-
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
439 |
-
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
440 |
-
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
441 |
-
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
442 |
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
443 |
-
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
444 |
-
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
445 |
-
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
446 |
-
|
447 |
-
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
448 |
-
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
449 |
-
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
450 |
-
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
451 |
-
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
452 |
-
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
453 |
-
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
454 |
-
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
455 |
-
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
456 |
-
DAMAGES.
|
457 |
-
|
458 |
-
END OF TERMS AND CONDITIONS
|
459 |
-
|
460 |
-
How to Apply These Terms to Your New Libraries
|
461 |
-
|
462 |
-
If you develop a new library, and you want it to be of the greatest
|
463 |
-
possible use to the public, we recommend making it free software that
|
464 |
-
everyone can redistribute and change. You can do so by permitting
|
465 |
-
redistribution under these terms (or, alternatively, under the terms of the
|
466 |
-
ordinary General Public License).
|
467 |
-
|
468 |
-
To apply these terms, attach the following notices to the library. It is
|
469 |
-
safest to attach them to the start of each source file to most effectively
|
470 |
-
convey the exclusion of warranty; and each file should have at least the
|
471 |
-
"copyright" line and a pointer to where the full notice is found.
|
472 |
-
|
473 |
-
<one line to give the library's name and a brief idea of what it does.>
|
474 |
-
Copyright (C) <year> <name of author>
|
475 |
-
|
476 |
-
This library is free software; you can redistribute it and/or
|
477 |
-
modify it under the terms of the GNU Lesser General Public
|
478 |
-
License as published by the Free Software Foundation; either
|
479 |
-
version 2.1 of the License, or (at your option) any later version.
|
480 |
-
|
481 |
-
This library is distributed in the hope that it will be useful,
|
482 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
483 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
484 |
-
Lesser General Public License for more details.
|
485 |
-
|
486 |
-
You should have received a copy of the GNU Lesser General Public
|
487 |
-
License along with this library; if not, write to the Free Software
|
488 |
-
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
489 |
-
|
490 |
-
Also add information on how to contact you by electronic and paper mail.
|
491 |
-
|
492 |
-
You should also get your employer (if you work as a programmer) or your
|
493 |
-
school, if any, to sign a "copyright disclaimer" for the library, if
|
494 |
-
necessary. Here is a sample; alter the names:
|
495 |
-
|
496 |
-
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
497 |
-
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
498 |
-
|
499 |
-
<signature of Ty Coon>, 1 April 1990
|
500 |
-
Ty Coon, President of Vice
|
501 |
-
|
502 |
-
That's all there is to it!
|
503 |
-
|
504 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/fullscreen/editor_plugin.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(d,e){var f=this,g={},c,b;f.editor=d;d.addCommand("mceFullScreen",function(){var i,j=a.doc.documentElement;if(d.getParam("fullscreen_is_enabled")){if(d.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",f.resizeFunc);tinyMCE.get(d.getParam("fullscreen_editor_id")).setContent(d.getContent());tinyMCE.remove(d);a.remove("mce_fullscreen_container");j.style.overflow=d.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",d.getParam("fullscreen_overflow"));a.win.scrollTo(d.getParam("fullscreen_scrollx"),d.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(d.getParam("fullscreen_new_window")){i=a.win.open(e+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{i.resizeTo(screen.availWidth,screen.availHeight)}catch(h){}}else{tinyMCE.oldSettings=tinyMCE.settings;g.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";g.fullscreen_html_overflow=a.getStyle(j,"overflow",1);c=a.getViewPort();g.fullscreen_scrollx=c.x;g.fullscreen_scrolly=c.y;if(tinymce.isOpera&&g.fullscreen_overflow=="visible"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&g.fullscreen_overflow=="scroll"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&(g.fullscreen_html_overflow=="visible"||g.fullscreen_html_overflow=="scroll")){g.fullscreen_html_overflow="auto"}if(g.fullscreen_overflow=="0px"){g.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");j.style.overflow="hidden";c=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){c.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){b="absolute;top:"+c.y}else{b="fixed;top:0"}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+b+";left:0;width:"+c.w+"px;height:"+c.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(d.settings,function(k,l){g[l]=k});g.id="mce_fullscreen";g.width=n.clientWidth;g.height=n.clientHeight-15;g.fullscreen_is_enabled=true;g.fullscreen_editor_id=d.id;g.theme_advanced_resizing=false;g.save_onsavecallback=function(){d.setContent(tinyMCE.get(g.id).getContent());d.execCommand("mceSave")};tinymce.each(d.getParam("fullscreen_settings"),function(m,l){g[l]=m});if(g.theme_advanced_toolbar_location==="external"){g.theme_advanced_toolbar_location="top"}f.fullscreenEditor=new tinymce.Editor("mce_fullscreen",g);f.fullscreenEditor.onInit.add(function(){f.fullscreenEditor.setContent(d.getContent());f.fullscreenEditor.focus()});f.fullscreenEditor.render();f.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");f.fullscreenElement.update();f.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var o=tinymce.DOM.getViewPort(),l=f.fullscreenEditor,k,m;k=l.dom.getSize(l.getContainer().getElementsByTagName("table")[0]);m=l.dom.getSize(l.getContainer().getElementsByTagName("iframe")[0]);l.theme.resizeTo(o.w-k.w+m.w,o.h-k.h+m.h)})}});d.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});d.onNodeChange.add(function(i,h){h.setActive("fullscreen",i.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
|
|
tiny_mce/plugins/fullscreen/editor_plugin_src.js
DELETED
@@ -1,159 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* editor_plugin_src.js
|
3 |
-
*
|
4 |
-
* Copyright 2009, Moxiecode Systems AB
|
5 |
-
* Released under LGPL License.
|
6 |
-
*
|
7 |
-
* License: http://tinymce.moxiecode.com/license
|
8 |
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9 |
-
*/
|
10 |
-
|
11 |
-
(function() {
|
12 |
-
var DOM = tinymce.DOM;
|
13 |
-
|
14 |
-
tinymce.create('tinymce.plugins.FullScreenPlugin', {
|
15 |
-
init : function(ed, url) {
|
16 |
-
var t = this, s = {}, vp, posCss;
|
17 |
-
|
18 |
-
t.editor = ed;
|
19 |
-
|
20 |
-
// Register commands
|
21 |
-
ed.addCommand('mceFullScreen', function() {
|
22 |
-
var win, de = DOM.doc.documentElement;
|
23 |
-
|
24 |
-
if (ed.getParam('fullscreen_is_enabled')) {
|
25 |
-
if (ed.getParam('fullscreen_new_window'))
|
26 |
-
closeFullscreen(); // Call to close in new window
|
27 |
-
else {
|
28 |
-
DOM.win.setTimeout(function() {
|
29 |
-
tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc);
|
30 |
-
tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent());
|
31 |
-
tinyMCE.remove(ed);
|
32 |
-
DOM.remove('mce_fullscreen_container');
|
33 |
-
de.style.overflow = ed.getParam('fullscreen_html_overflow');
|
34 |
-
DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow'));
|
35 |
-
DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly'));
|
36 |
-
tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
|
37 |
-
}, 10);
|
38 |
-
}
|
39 |
-
|
40 |
-
return;
|
41 |
-
}
|
42 |
-
|
43 |
-
if (ed.getParam('fullscreen_new_window')) {
|
44 |
-
win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
|
45 |
-
try {
|
46 |
-
win.resizeTo(screen.availWidth, screen.availHeight);
|
47 |
-
} catch (e) {
|
48 |
-
// Ignore
|
49 |
-
}
|
50 |
-
} else {
|
51 |
-
tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
|
52 |
-
s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto';
|
53 |
-
s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1);
|
54 |
-
vp = DOM.getViewPort();
|
55 |
-
s.fullscreen_scrollx = vp.x;
|
56 |
-
s.fullscreen_scrolly = vp.y;
|
57 |
-
|
58 |
-
// Fixes an Opera bug where the scrollbars doesn't reappear
|
59 |
-
if (tinymce.isOpera && s.fullscreen_overflow == 'visible')
|
60 |
-
s.fullscreen_overflow = 'auto';
|
61 |
-
|
62 |
-
// Fixes an IE bug where horizontal scrollbars would appear
|
63 |
-
if (tinymce.isIE && s.fullscreen_overflow == 'scroll')
|
64 |
-
s.fullscreen_overflow = 'auto';
|
65 |
-
|
66 |
-
// Fixes an IE bug where the scrollbars doesn't reappear
|
67 |
-
if (tinymce.isIE && (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll'))
|
68 |
-
s.fullscreen_html_overflow = 'auto';
|
69 |
-
|
70 |
-
if (s.fullscreen_overflow == '0px')
|
71 |
-
s.fullscreen_overflow = '';
|
72 |
-
|
73 |
-
DOM.setStyle(DOM.doc.body, 'overflow', 'hidden');
|
74 |
-
de.style.overflow = 'hidden'; //Fix for IE6/7
|
75 |
-
vp = DOM.getViewPort();
|
76 |
-
DOM.win.scrollTo(0, 0);
|
77 |
-
|
78 |
-
if (tinymce.isIE)
|
79 |
-
vp.h -= 1;
|
80 |
-
|
81 |
-
// Use fixed position if it exists
|
82 |
-
if (tinymce.isIE6 || document.compatMode == 'BackCompat')
|
83 |
-
posCss = 'absolute;top:' + vp.y;
|
84 |
-
else
|
85 |
-
posCss = 'fixed;top:0';
|
86 |
-
|
87 |
-
n = DOM.add(DOM.doc.body, 'div', {
|
88 |
-
id : 'mce_fullscreen_container',
|
89 |
-
style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'});
|
90 |
-
DOM.add(n, 'div', {id : 'mce_fullscreen'});
|
91 |
-
|
92 |
-
tinymce.each(ed.settings, function(v, n) {
|
93 |
-
s[n] = v;
|
94 |
-
});
|
95 |
-
|
96 |
-
s.id = 'mce_fullscreen';
|
97 |
-
s.width = n.clientWidth;
|
98 |
-
s.height = n.clientHeight - 15;
|
99 |
-
s.fullscreen_is_enabled = true;
|
100 |
-
s.fullscreen_editor_id = ed.id;
|
101 |
-
s.theme_advanced_resizing = false;
|
102 |
-
s.save_onsavecallback = function() {
|
103 |
-
ed.setContent(tinyMCE.get(s.id).getContent());
|
104 |
-
ed.execCommand('mceSave');
|
105 |
-
};
|
106 |
-
|
107 |
-
tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) {
|
108 |
-
s[k] = v;
|
109 |
-
});
|
110 |
-
|
111 |
-
if (s.theme_advanced_toolbar_location === 'external')
|
112 |
-
s.theme_advanced_toolbar_location = 'top';
|
113 |
-
|
114 |
-
t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
|
115 |
-
t.fullscreenEditor.onInit.add(function() {
|
116 |
-
t.fullscreenEditor.setContent(ed.getContent());
|
117 |
-
t.fullscreenEditor.focus();
|
118 |
-
});
|
119 |
-
|
120 |
-
t.fullscreenEditor.render();
|
121 |
-
|
122 |
-
t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container');
|
123 |
-
t.fullscreenElement.update();
|
124 |
-
//document.body.overflow = 'hidden';
|
125 |
-
|
126 |
-
t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() {
|
127 |
-
var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize;
|
128 |
-
|
129 |
-
// Get outer/inner size to get a delta size that can be used to calc the new iframe size
|
130 |
-
outerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('table')[0]);
|
131 |
-
innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]);
|
132 |
-
|
133 |
-
fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h);
|
134 |
-
});
|
135 |
-
}
|
136 |
-
});
|
137 |
-
|
138 |
-
// Register buttons
|
139 |
-
ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'});
|
140 |
-
|
141 |
-
ed.onNodeChange.add(function(ed, cm) {
|
142 |
-
cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled'));
|
143 |
-
});
|
144 |
-
},
|
145 |
-
|
146 |
-
getInfo : function() {
|
147 |
-
return {
|
148 |
-
longname : 'Fullscreen',
|
149 |
-
author : 'Moxiecode Systems AB',
|
150 |
-
authorurl : 'http://tinymce.moxiecode.com',
|
151 |
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',
|
152 |
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
153 |
-
};
|
154 |
-
}
|
155 |
-
});
|
156 |
-
|
157 |
-
// Register plugin
|
158 |
-
tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin);
|
159 |
-
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/fullscreen/fullscreen.htm
DELETED
@@ -1,110 +0,0 @@
|
|
1 |
-
<!DOCTYPE html>
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title></title>
|
5 |
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
6 |
-
<script type="text/javascript" src="../../tiny_mce.js"></script>
|
7 |
-
<script type="text/javascript">
|
8 |
-
function patchCallback(settings, key) {
|
9 |
-
if (settings[key])
|
10 |
-
settings[key] = "window.opener." + settings[key];
|
11 |
-
}
|
12 |
-
|
13 |
-
var settings = {}, paSe = window.opener.tinyMCE.activeEditor.settings, oeID = window.opener.tinyMCE.activeEditor.id;
|
14 |
-
|
15 |
-
// Clone array
|
16 |
-
for (var n in paSe)
|
17 |
-
settings[n] = paSe[n];
|
18 |
-
|
19 |
-
// Override options for fullscreen
|
20 |
-
for (var n in paSe.fullscreen_settings)
|
21 |
-
settings[n] = paSe.fullscreen_settings[n];
|
22 |
-
|
23 |
-
// Patch callbacks, make them point to window.opener
|
24 |
-
patchCallback(settings, 'urlconverter_callback');
|
25 |
-
patchCallback(settings, 'insertlink_callback');
|
26 |
-
patchCallback(settings, 'insertimage_callback');
|
27 |
-
patchCallback(settings, 'setupcontent_callback');
|
28 |
-
patchCallback(settings, 'save_callback');
|
29 |
-
patchCallback(settings, 'onchange_callback');
|
30 |
-
patchCallback(settings, 'init_instance_callback');
|
31 |
-
patchCallback(settings, 'file_browser_callback');
|
32 |
-
patchCallback(settings, 'cleanup_callback');
|
33 |
-
patchCallback(settings, 'execcommand_callback');
|
34 |
-
patchCallback(settings, 'oninit');
|
35 |
-
|
36 |
-
// Set options
|
37 |
-
delete settings.id;
|
38 |
-
settings['mode'] = 'exact';
|
39 |
-
settings['elements'] = 'fullscreenarea';
|
40 |
-
settings['add_unload_trigger'] = false;
|
41 |
-
settings['ask'] = false;
|
42 |
-
settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI();
|
43 |
-
settings['fullscreen_is_enabled'] = true;
|
44 |
-
settings['fullscreen_editor_id'] = oeID;
|
45 |
-
settings['theme_advanced_resizing'] = false;
|
46 |
-
settings['strict_loading_mode'] = true;
|
47 |
-
|
48 |
-
settings.save_onsavecallback = function() {
|
49 |
-
window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
|
50 |
-
window.opener.tinyMCE.get(oeID).execCommand('mceSave');
|
51 |
-
window.close();
|
52 |
-
};
|
53 |
-
|
54 |
-
function unloadHandler(e) {
|
55 |
-
moveContent();
|
56 |
-
}
|
57 |
-
|
58 |
-
function moveContent() {
|
59 |
-
window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent());
|
60 |
-
}
|
61 |
-
|
62 |
-
function closeFullscreen() {
|
63 |
-
moveContent();
|
64 |
-
window.close();
|
65 |
-
}
|
66 |
-
|
67 |
-
function doParentSubmit() {
|
68 |
-
moveContent();
|
69 |
-
|
70 |
-
if (window.opener.tinyMCE.selectedInstance.formElement.form)
|
71 |
-
window.opener.tinyMCE.selectedInstance.formElement.form.submit();
|
72 |
-
|
73 |
-
window.close();
|
74 |
-
|
75 |
-
return false;
|
76 |
-
}
|
77 |
-
|
78 |
-
function render() {
|
79 |
-
var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
|
80 |
-
|
81 |
-
e.value = window.opener.tinyMCE.get(oeID).getContent();
|
82 |
-
|
83 |
-
vp = dom.getViewPort();
|
84 |
-
settings.width = vp.w;
|
85 |
-
settings.height = vp.h - 15;
|
86 |
-
|
87 |
-
tinymce.dom.Event.add(window, 'resize', function() {
|
88 |
-
var vp = dom.getViewPort();
|
89 |
-
|
90 |
-
tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
|
91 |
-
});
|
92 |
-
|
93 |
-
tinyMCE.init(settings);
|
94 |
-
}
|
95 |
-
|
96 |
-
// Add onunload
|
97 |
-
tinymce.dom.Event.add(window, "beforeunload", unloadHandler);
|
98 |
-
</script>
|
99 |
-
</head>
|
100 |
-
<body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no">
|
101 |
-
<form onsubmit="doParentSubmit();">
|
102 |
-
<textarea id="fullscreenarea" style="width:100%; height:100%"></textarea>
|
103 |
-
</form>
|
104 |
-
|
105 |
-
<script type="text/javascript">
|
106 |
-
render();
|
107 |
-
</script>
|
108 |
-
|
109 |
-
</body>
|
110 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/inlinepopups/editor_plugin.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","<br />"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(i,k){var g=this,f,j=d.doc,h,k;k=g._findId(k||i);if(!g.windows[k]){g.parent(i);return}g.count--;if(g.count==0){d.remove("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","false");g.editor.focus()}if(f=g.windows[k]){g.onClose.dispatch(g);a.remove(j,"mousedown",f.mousedownFunc);a.remove(j,"click",f.clickFunc);a.clear(k);a.clear(k+"_ifr");d.setAttrib(k+"_ifr","src",'javascript:""');f.element.remove();delete g.windows[k];h=g._frontWindow();if(h){g.focus(h.id)}}},_frontWindow:function(){var g,f=0;e(this.windows,function(h){if(h.zIndex>f){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
|
|
tiny_mce/plugins/inlinepopups/editor_plugin_src.js
DELETED
@@ -1,699 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* editor_plugin_src.js
|
3 |
-
*
|
4 |
-
* Copyright 2009, Moxiecode Systems AB
|
5 |
-
* Released under LGPL License.
|
6 |
-
*
|
7 |
-
* License: http://tinymce.moxiecode.com/license
|
8 |
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9 |
-
*/
|
10 |
-
|
11 |
-
(function() {
|
12 |
-
var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is;
|
13 |
-
|
14 |
-
tinymce.create('tinymce.plugins.InlinePopups', {
|
15 |
-
init : function(ed, url) {
|
16 |
-
// Replace window manager
|
17 |
-
ed.onBeforeRenderUI.add(function() {
|
18 |
-
ed.windowManager = new tinymce.InlineWindowManager(ed);
|
19 |
-
DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css");
|
20 |
-
});
|
21 |
-
},
|
22 |
-
|
23 |
-
getInfo : function() {
|
24 |
-
return {
|
25 |
-
longname : 'InlinePopups',
|
26 |
-
author : 'Moxiecode Systems AB',
|
27 |
-
authorurl : 'http://tinymce.moxiecode.com',
|
28 |
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',
|
29 |
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
30 |
-
};
|
31 |
-
}
|
32 |
-
});
|
33 |
-
|
34 |
-
tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', {
|
35 |
-
InlineWindowManager : function(ed) {
|
36 |
-
var t = this;
|
37 |
-
|
38 |
-
t.parent(ed);
|
39 |
-
t.zIndex = 300000;
|
40 |
-
t.count = 0;
|
41 |
-
t.windows = {};
|
42 |
-
},
|
43 |
-
|
44 |
-
open : function(f, p) {
|
45 |
-
var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow;
|
46 |
-
|
47 |
-
f = f || {};
|
48 |
-
p = p || {};
|
49 |
-
|
50 |
-
// Run native windows
|
51 |
-
if (!f.inline)
|
52 |
-
return t.parent(f, p);
|
53 |
-
|
54 |
-
parentWindow = t._frontWindow();
|
55 |
-
if (parentWindow && DOM.get(parentWindow.id + '_ifr')) {
|
56 |
-
parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement;
|
57 |
-
}
|
58 |
-
|
59 |
-
// Only store selection if the type is a normal window
|
60 |
-
if (!f.type)
|
61 |
-
t.bookmark = ed.selection.getBookmark(1);
|
62 |
-
|
63 |
-
id = DOM.uniqueId();
|
64 |
-
vp = DOM.getViewPort();
|
65 |
-
f.width = parseInt(f.width || 320);
|
66 |
-
f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0);
|
67 |
-
f.min_width = parseInt(f.min_width || 150);
|
68 |
-
f.min_height = parseInt(f.min_height || 100);
|
69 |
-
f.max_width = parseInt(f.max_width || 2000);
|
70 |
-
f.max_height = parseInt(f.max_height || 2000);
|
71 |
-
f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0)));
|
72 |
-
f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0)));
|
73 |
-
f.movable = f.resizable = true;
|
74 |
-
p.mce_width = f.width;
|
75 |
-
p.mce_height = f.height;
|
76 |
-
p.mce_inline = true;
|
77 |
-
p.mce_window_id = id;
|
78 |
-
p.mce_auto_focus = f.auto_focus;
|
79 |
-
|
80 |
-
// Transpose
|
81 |
-
// po = DOM.getPos(ed.getContainer());
|
82 |
-
// f.left -= po.x;
|
83 |
-
// f.top -= po.y;
|
84 |
-
|
85 |
-
t.features = f;
|
86 |
-
t.params = p;
|
87 |
-
t.onOpen.dispatch(t, f, p);
|
88 |
-
|
89 |
-
if (f.type) {
|
90 |
-
opt += ' mceModal';
|
91 |
-
|
92 |
-
if (f.type)
|
93 |
-
opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1);
|
94 |
-
|
95 |
-
f.resizable = false;
|
96 |
-
}
|
97 |
-
|
98 |
-
if (f.statusbar)
|
99 |
-
opt += ' mceStatusbar';
|
100 |
-
|
101 |
-
if (f.resizable)
|
102 |
-
opt += ' mceResizable';
|
103 |
-
|
104 |
-
if (f.minimizable)
|
105 |
-
opt += ' mceMinimizable';
|
106 |
-
|
107 |
-
if (f.maximizable)
|
108 |
-
opt += ' mceMaximizable';
|
109 |
-
|
110 |
-
if (f.movable)
|
111 |
-
opt += ' mceMovable';
|
112 |
-
|
113 |
-
// Create DOM objects
|
114 |
-
t._addAll(DOM.doc.body,
|
115 |
-
['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'},
|
116 |
-
['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt},
|
117 |
-
['div', {id : id + '_top', 'class' : 'mceTop'},
|
118 |
-
['div', {'class' : 'mceLeft'}],
|
119 |
-
['div', {'class' : 'mceCenter'}],
|
120 |
-
['div', {'class' : 'mceRight'}],
|
121 |
-
['span', {id : id + '_title'}, f.title || '']
|
122 |
-
],
|
123 |
-
|
124 |
-
['div', {id : id + '_middle', 'class' : 'mceMiddle'},
|
125 |
-
['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}],
|
126 |
-
['span', {id : id + '_content'}],
|
127 |
-
['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}]
|
128 |
-
],
|
129 |
-
|
130 |
-
['div', {id : id + '_bottom', 'class' : 'mceBottom'},
|
131 |
-
['div', {'class' : 'mceLeft'}],
|
132 |
-
['div', {'class' : 'mceCenter'}],
|
133 |
-
['div', {'class' : 'mceRight'}],
|
134 |
-
['span', {id : id + '_status'}, 'Content']
|
135 |
-
],
|
136 |
-
|
137 |
-
['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}],
|
138 |
-
['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
139 |
-
['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
140 |
-
['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
141 |
-
['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
142 |
-
['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}],
|
143 |
-
['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}],
|
144 |
-
['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}],
|
145 |
-
['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}],
|
146 |
-
['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}],
|
147 |
-
['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}],
|
148 |
-
['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}],
|
149 |
-
['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}]
|
150 |
-
]
|
151 |
-
]
|
152 |
-
);
|
153 |
-
|
154 |
-
DOM.setStyles(id, {top : -10000, left : -10000});
|
155 |
-
|
156 |
-
// Fix gecko rendering bug, where the editors iframe messed with window contents
|
157 |
-
if (tinymce.isGecko)
|
158 |
-
DOM.setStyle(id, 'overflow', 'auto');
|
159 |
-
|
160 |
-
// Measure borders
|
161 |
-
if (!f.type) {
|
162 |
-
dw += DOM.get(id + '_left').clientWidth;
|
163 |
-
dw += DOM.get(id + '_right').clientWidth;
|
164 |
-
dh += DOM.get(id + '_top').clientHeight;
|
165 |
-
dh += DOM.get(id + '_bottom').clientHeight;
|
166 |
-
}
|
167 |
-
|
168 |
-
// Resize window
|
169 |
-
DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh});
|
170 |
-
|
171 |
-
u = f.url || f.file;
|
172 |
-
if (u) {
|
173 |
-
if (tinymce.relaxedDomain)
|
174 |
-
u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain;
|
175 |
-
|
176 |
-
u = tinymce._addVer(u);
|
177 |
-
}
|
178 |
-
|
179 |
-
if (!f.type) {
|
180 |
-
DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'});
|
181 |
-
DOM.setStyles(id + '_ifr', {width : f.width, height : f.height});
|
182 |
-
DOM.setAttrib(id + '_ifr', 'src', u);
|
183 |
-
} else {
|
184 |
-
DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok');
|
185 |
-
|
186 |
-
if (f.type == 'confirm')
|
187 |
-
DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel');
|
188 |
-
|
189 |
-
DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'});
|
190 |
-
DOM.setHTML(id + '_content', f.content.replace('\n', '<br />'));
|
191 |
-
|
192 |
-
Event.add(id, 'keyup', function(evt) {
|
193 |
-
var VK_ESCAPE = 27;
|
194 |
-
if (evt.keyCode === VK_ESCAPE) {
|
195 |
-
f.button_func(false);
|
196 |
-
return Event.cancel(evt);
|
197 |
-
}
|
198 |
-
});
|
199 |
-
|
200 |
-
Event.add(id, 'keydown', function(evt) {
|
201 |
-
var cancelButton, VK_TAB = 9;
|
202 |
-
if (evt.keyCode === VK_TAB) {
|
203 |
-
cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0];
|
204 |
-
if (cancelButton && cancelButton !== evt.target) {
|
205 |
-
cancelButton.focus();
|
206 |
-
} else {
|
207 |
-
DOM.get(id + '_ok').focus();
|
208 |
-
}
|
209 |
-
return Event.cancel(evt);
|
210 |
-
}
|
211 |
-
});
|
212 |
-
}
|
213 |
-
|
214 |
-
// Register events
|
215 |
-
mdf = Event.add(id, 'mousedown', function(e) {
|
216 |
-
var n = e.target, w, vp;
|
217 |
-
|
218 |
-
w = t.windows[id];
|
219 |
-
t.focus(id);
|
220 |
-
|
221 |
-
if (n.nodeName == 'A' || n.nodeName == 'a') {
|
222 |
-
if (n.className == 'mceClose') {
|
223 |
-
t.close(null, id);
|
224 |
-
return Event.cancel(e);
|
225 |
-
} else if (n.className == 'mceMax') {
|
226 |
-
w.oldPos = w.element.getXY();
|
227 |
-
w.oldSize = w.element.getSize();
|
228 |
-
|
229 |
-
vp = DOM.getViewPort();
|
230 |
-
|
231 |
-
// Reduce viewport size to avoid scrollbars
|
232 |
-
vp.w -= 2;
|
233 |
-
vp.h -= 2;
|
234 |
-
|
235 |
-
w.element.moveTo(vp.x, vp.y);
|
236 |
-
w.element.resizeTo(vp.w, vp.h);
|
237 |
-
DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight});
|
238 |
-
DOM.addClass(id + '_wrapper', 'mceMaximized');
|
239 |
-
} else if (n.className == 'mceMed') {
|
240 |
-
// Reset to old size
|
241 |
-
w.element.moveTo(w.oldPos.x, w.oldPos.y);
|
242 |
-
w.element.resizeTo(w.oldSize.w, w.oldSize.h);
|
243 |
-
w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight);
|
244 |
-
|
245 |
-
DOM.removeClass(id + '_wrapper', 'mceMaximized');
|
246 |
-
} else if (n.className == 'mceMove')
|
247 |
-
return t._startDrag(id, e, n.className);
|
248 |
-
else if (DOM.hasClass(n, 'mceResize'))
|
249 |
-
return t._startDrag(id, e, n.className.substring(13));
|
250 |
-
}
|
251 |
-
});
|
252 |
-
|
253 |
-
clf = Event.add(id, 'click', function(e) {
|
254 |
-
var n = e.target;
|
255 |
-
|
256 |
-
t.focus(id);
|
257 |
-
|
258 |
-
if (n.nodeName == 'A' || n.nodeName == 'a') {
|
259 |
-
switch (n.className) {
|
260 |
-
case 'mceClose':
|
261 |
-
t.close(null, id);
|
262 |
-
return Event.cancel(e);
|
263 |
-
|
264 |
-
case 'mceButton mceOk':
|
265 |
-
case 'mceButton mceCancel':
|
266 |
-
f.button_func(n.className == 'mceButton mceOk');
|
267 |
-
return Event.cancel(e);
|
268 |
-
}
|
269 |
-
}
|
270 |
-
});
|
271 |
-
|
272 |
-
// Make sure the tab order loops within the dialog.
|
273 |
-
Event.add([id + '_left', id + '_right'], 'focus', function(evt) {
|
274 |
-
var iframe = DOM.get(id + '_ifr');
|
275 |
-
if (iframe) {
|
276 |
-
var body = iframe.contentWindow.document.body;
|
277 |
-
var focusable = DOM.select(':input:enabled,*[tabindex=0]', body);
|
278 |
-
if (evt.target.id === (id + '_left')) {
|
279 |
-
focusable[focusable.length - 1].focus();
|
280 |
-
} else {
|
281 |
-
focusable[0].focus();
|
282 |
-
}
|
283 |
-
} else {
|
284 |
-
DOM.get(id + '_ok').focus();
|
285 |
-
}
|
286 |
-
});
|
287 |
-
|
288 |
-
// Add window
|
289 |
-
w = t.windows[id] = {
|
290 |
-
id : id,
|
291 |
-
mousedown_func : mdf,
|
292 |
-
click_func : clf,
|
293 |
-
element : new Element(id, {blocker : 1, container : ed.getContainer()}),
|
294 |
-
iframeElement : new Element(id + '_ifr'),
|
295 |
-
features : f,
|
296 |
-
deltaWidth : dw,
|
297 |
-
deltaHeight : dh
|
298 |
-
};
|
299 |
-
|
300 |
-
w.iframeElement.on('focus', function() {
|
301 |
-
t.focus(id);
|
302 |
-
});
|
303 |
-
|
304 |
-
// Setup blocker
|
305 |
-
if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') {
|
306 |
-
DOM.add(DOM.doc.body, 'div', {
|
307 |
-
id : 'mceModalBlocker',
|
308 |
-
'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker',
|
309 |
-
style : {zIndex : t.zIndex - 1}
|
310 |
-
});
|
311 |
-
|
312 |
-
DOM.show('mceModalBlocker'); // Reduces flicker in IE
|
313 |
-
DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true');
|
314 |
-
} else
|
315 |
-
DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1);
|
316 |
-
|
317 |
-
if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel))
|
318 |
-
DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
|
319 |
-
|
320 |
-
DOM.setAttrib(id, 'aria-hidden', 'false');
|
321 |
-
t.focus(id);
|
322 |
-
t._fixIELayout(id, 1);
|
323 |
-
|
324 |
-
// Focus ok button
|
325 |
-
if (DOM.get(id + '_ok'))
|
326 |
-
DOM.get(id + '_ok').focus();
|
327 |
-
t.count++;
|
328 |
-
|
329 |
-
return w;
|
330 |
-
},
|
331 |
-
|
332 |
-
focus : function(id) {
|
333 |
-
var t = this, w;
|
334 |
-
|
335 |
-
if (w = t.windows[id]) {
|
336 |
-
w.zIndex = this.zIndex++;
|
337 |
-
w.element.setStyle('zIndex', w.zIndex);
|
338 |
-
w.element.update();
|
339 |
-
|
340 |
-
id = id + '_wrapper';
|
341 |
-
DOM.removeClass(t.lastId, 'mceFocus');
|
342 |
-
DOM.addClass(id, 'mceFocus');
|
343 |
-
t.lastId = id;
|
344 |
-
|
345 |
-
if (w.focussedElement) {
|
346 |
-
w.focussedElement.focus();
|
347 |
-
} else if (DOM.get(id + '_ok')) {
|
348 |
-
DOM.get(w.id + '_ok').focus();
|
349 |
-
} else if (DOM.get(w.id + '_ifr')) {
|
350 |
-
DOM.get(w.id + '_ifr').focus();
|
351 |
-
}
|
352 |
-
}
|
353 |
-
},
|
354 |
-
|
355 |
-
_addAll : function(te, ne) {
|
356 |
-
var i, n, t = this, dom = tinymce.DOM;
|
357 |
-
|
358 |
-
if (is(ne, 'string'))
|
359 |
-
te.appendChild(dom.doc.createTextNode(ne));
|
360 |
-
else if (ne.length) {
|
361 |
-
te = te.appendChild(dom.create(ne[0], ne[1]));
|
362 |
-
|
363 |
-
for (i=2; i<ne.length; i++)
|
364 |
-
t._addAll(te, ne[i]);
|
365 |
-
}
|
366 |
-
},
|
367 |
-
|
368 |
-
_startDrag : function(id, se, ac) {
|
369 |
-
var t = this, mu, mm, d = DOM.doc, eb, w = t.windows[id], we = w.element, sp = we.getXY(), p, sz, ph, cp, vp, sx, sy, sex, sey, dx, dy, dw, dh;
|
370 |
-
|
371 |
-
// Get positons and sizes
|
372 |
-
// cp = DOM.getPos(t.editor.getContainer());
|
373 |
-
cp = {x : 0, y : 0};
|
374 |
-
vp = DOM.getViewPort();
|
375 |
-
|
376 |
-
// Reduce viewport size to avoid scrollbars while dragging
|
377 |
-
vp.w -= 2;
|
378 |
-
vp.h -= 2;
|
379 |
-
|
380 |
-
sex = se.screenX;
|
381 |
-
sey = se.screenY;
|
382 |
-
dx = dy = dw = dh = 0;
|
383 |
-
|
384 |
-
// Handle mouse up
|
385 |
-
mu = Event.add(d, 'mouseup', function(e) {
|
386 |
-
Event.remove(d, 'mouseup', mu);
|
387 |
-
Event.remove(d, 'mousemove', mm);
|
388 |
-
|
389 |
-
if (eb)
|
390 |
-
eb.remove();
|
391 |
-
|
392 |
-
we.moveBy(dx, dy);
|
393 |
-
we.resizeBy(dw, dh);
|
394 |
-
sz = we.getSize();
|
395 |
-
DOM.setStyles(id + '_ifr', {width : sz.w - w.deltaWidth, height : sz.h - w.deltaHeight});
|
396 |
-
t._fixIELayout(id, 1);
|
397 |
-
|
398 |
-
return Event.cancel(e);
|
399 |
-
});
|
400 |
-
|
401 |
-
if (ac != 'Move')
|
402 |
-
startMove();
|
403 |
-
|
404 |
-
function startMove() {
|
405 |
-
if (eb)
|
406 |
-
return;
|
407 |
-
|
408 |
-
t._fixIELayout(id, 0);
|
409 |
-
|
410 |
-
// Setup event blocker
|
411 |
-
DOM.add(d.body, 'div', {
|
412 |
-
id : 'mceEventBlocker',
|
413 |
-
'class' : 'mceEventBlocker ' + (t.editor.settings.inlinepopups_skin || 'clearlooks2'),
|
414 |
-
style : {zIndex : t.zIndex + 1}
|
415 |
-
});
|
416 |
-
|
417 |
-
if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel))
|
418 |
-
DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
|
419 |
-
|
420 |
-
eb = new Element('mceEventBlocker');
|
421 |
-
eb.update();
|
422 |
-
|
423 |
-
// Setup placeholder
|
424 |
-
p = we.getXY();
|
425 |
-
sz = we.getSize();
|
426 |
-
sx = cp.x + p.x - vp.x;
|
427 |
-
sy = cp.y + p.y - vp.y;
|
428 |
-
DOM.add(eb.get(), 'div', {id : 'mcePlaceHolder', 'class' : 'mcePlaceHolder', style : {left : sx, top : sy, width : sz.w, height : sz.h}});
|
429 |
-
ph = new Element('mcePlaceHolder');
|
430 |
-
};
|
431 |
-
|
432 |
-
// Handle mouse move/drag
|
433 |
-
mm = Event.add(d, 'mousemove', function(e) {
|
434 |
-
var x, y, v;
|
435 |
-
|
436 |
-
startMove();
|
437 |
-
|
438 |
-
x = e.screenX - sex;
|
439 |
-
y = e.screenY - sey;
|
440 |
-
|
441 |
-
switch (ac) {
|
442 |
-
case 'ResizeW':
|
443 |
-
dx = x;
|
444 |
-
dw = 0 - x;
|
445 |
-
break;
|
446 |
-
|
447 |
-
case 'ResizeE':
|
448 |
-
dw = x;
|
449 |
-
break;
|
450 |
-
|
451 |
-
case 'ResizeN':
|
452 |
-
case 'ResizeNW':
|
453 |
-
case 'ResizeNE':
|
454 |
-
if (ac == "ResizeNW") {
|
455 |
-
dx = x;
|
456 |
-
dw = 0 - x;
|
457 |
-
} else if (ac == "ResizeNE")
|
458 |
-
dw = x;
|
459 |
-
|
460 |
-
dy = y;
|
461 |
-
dh = 0 - y;
|
462 |
-
break;
|
463 |
-
|
464 |
-
case 'ResizeS':
|
465 |
-
case 'ResizeSW':
|
466 |
-
case 'ResizeSE':
|
467 |
-
if (ac == "ResizeSW") {
|
468 |
-
dx = x;
|
469 |
-
dw = 0 - x;
|
470 |
-
} else if (ac == "ResizeSE")
|
471 |
-
dw = x;
|
472 |
-
|
473 |
-
dh = y;
|
474 |
-
break;
|
475 |
-
|
476 |
-
case 'mceMove':
|
477 |
-
dx = x;
|
478 |
-
dy = y;
|
479 |
-
break;
|
480 |
-
}
|
481 |
-
|
482 |
-
// Boundary check
|
483 |
-
if (dw < (v = w.features.min_width - sz.w)) {
|
484 |
-
if (dx !== 0)
|
485 |
-
dx += dw - v;
|
486 |
-
|
487 |
-
dw = v;
|
488 |
-
}
|
489 |
-
|
490 |
-
if (dh < (v = w.features.min_height - sz.h)) {
|
491 |
-
if (dy !== 0)
|
492 |
-
dy += dh - v;
|
493 |
-
|
494 |
-
dh = v;
|
495 |
-
}
|
496 |
-
|
497 |
-
dw = Math.min(dw, w.features.max_width - sz.w);
|
498 |
-
dh = Math.min(dh, w.features.max_height - sz.h);
|
499 |
-
dx = Math.max(dx, vp.x - (sx + vp.x));
|
500 |
-
dy = Math.max(dy, vp.y - (sy + vp.y));
|
501 |
-
dx = Math.min(dx, (vp.w + vp.x) - (sx + sz.w + vp.x));
|
502 |
-
dy = Math.min(dy, (vp.h + vp.y) - (sy + sz.h + vp.y));
|
503 |
-
|
504 |
-
// Move if needed
|
505 |
-
if (dx + dy !== 0) {
|
506 |
-
if (sx + dx < 0)
|
507 |
-
dx = 0;
|
508 |
-
|
509 |
-
if (sy + dy < 0)
|
510 |
-
dy = 0;
|
511 |
-
|
512 |
-
ph.moveTo(sx + dx, sy + dy);
|
513 |
-
}
|
514 |
-
|
515 |
-
// Resize if needed
|
516 |
-
if (dw + dh !== 0)
|
517 |
-
ph.resizeTo(sz.w + dw, sz.h + dh);
|
518 |
-
|
519 |
-
return Event.cancel(e);
|
520 |
-
});
|
521 |
-
|
522 |
-
return Event.cancel(se);
|
523 |
-
},
|
524 |
-
|
525 |
-
resizeBy : function(dw, dh, id) {
|
526 |
-
var w = this.windows[id];
|
527 |
-
|
528 |
-
if (w) {
|
529 |
-
w.element.resizeBy(dw, dh);
|
530 |
-
w.iframeElement.resizeBy(dw, dh);
|
531 |
-
}
|
532 |
-
},
|
533 |
-
|
534 |
-
close : function(win, id) {
|
535 |
-
var t = this, w, d = DOM.doc, fw, id;
|
536 |
-
|
537 |
-
id = t._findId(id || win);
|
538 |
-
|
539 |
-
// Probably not inline
|
540 |
-
if (!t.windows[id]) {
|
541 |
-
t.parent(win);
|
542 |
-
return;
|
543 |
-
}
|
544 |
-
|
545 |
-
t.count--;
|
546 |
-
|
547 |
-
if (t.count == 0) {
|
548 |
-
DOM.remove('mceModalBlocker');
|
549 |
-
DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'false');
|
550 |
-
t.editor.focus();
|
551 |
-
}
|
552 |
-
|
553 |
-
if (w = t.windows[id]) {
|
554 |
-
t.onClose.dispatch(t);
|
555 |
-
Event.remove(d, 'mousedown', w.mousedownFunc);
|
556 |
-
Event.remove(d, 'click', w.clickFunc);
|
557 |
-
Event.clear(id);
|
558 |
-
Event.clear(id + '_ifr');
|
559 |
-
|
560 |
-
DOM.setAttrib(id + '_ifr', 'src', 'javascript:""'); // Prevent leak
|
561 |
-
w.element.remove();
|
562 |
-
delete t.windows[id];
|
563 |
-
|
564 |
-
fw = t._frontWindow();
|
565 |
-
|
566 |
-
if (fw)
|
567 |
-
t.focus(fw.id);
|
568 |
-
}
|
569 |
-
},
|
570 |
-
|
571 |
-
// Find front most window
|
572 |
-
_frontWindow : function() {
|
573 |
-
var fw, ix = 0;
|
574 |
-
// Find front most window and focus that
|
575 |
-
each (this.windows, function(w) {
|
576 |
-
if (w.zIndex > ix) {
|
577 |
-
fw = w;
|
578 |
-
ix = w.zIndex;
|
579 |
-
}
|
580 |
-
});
|
581 |
-
return fw;
|
582 |
-
},
|
583 |
-
|
584 |
-
setTitle : function(w, ti) {
|
585 |
-
var e;
|
586 |
-
|
587 |
-
w = this._findId(w);
|
588 |
-
|
589 |
-
if (e = DOM.get(w + '_title'))
|
590 |
-
e.innerHTML = DOM.encode(ti);
|
591 |
-
},
|
592 |
-
|
593 |
-
alert : function(txt, cb, s) {
|
594 |
-
var t = this, w;
|
595 |
-
|
596 |
-
w = t.open({
|
597 |
-
title : t,
|
598 |
-
type : 'alert',
|
599 |
-
button_func : function(s) {
|
600 |
-
if (cb)
|
601 |
-
cb.call(s || t, s);
|
602 |
-
|
603 |
-
t.close(null, w.id);
|
604 |
-
},
|
605 |
-
content : DOM.encode(t.editor.getLang(txt, txt)),
|
606 |
-
inline : 1,
|
607 |
-
width : 400,
|
608 |
-
height : 130
|
609 |
-
});
|
610 |
-
},
|
611 |
-
|
612 |
-
confirm : function(txt, cb, s) {
|
613 |
-
var t = this, w;
|
614 |
-
|
615 |
-
w = t.open({
|
616 |
-
title : t,
|
617 |
-
type : 'confirm',
|
618 |
-
button_func : function(s) {
|
619 |
-
if (cb)
|
620 |
-
cb.call(s || t, s);
|
621 |
-
|
622 |
-
t.close(null, w.id);
|
623 |
-
},
|
624 |
-
content : DOM.encode(t.editor.getLang(txt, txt)),
|
625 |
-
inline : 1,
|
626 |
-
width : 400,
|
627 |
-
height : 130
|
628 |
-
});
|
629 |
-
},
|
630 |
-
|
631 |
-
// Internal functions
|
632 |
-
|
633 |
-
_findId : function(w) {
|
634 |
-
var t = this;
|
635 |
-
|
636 |
-
if (typeof(w) == 'string')
|
637 |
-
return w;
|
638 |
-
|
639 |
-
each(t.windows, function(wo) {
|
640 |
-
var ifr = DOM.get(wo.id + '_ifr');
|
641 |
-
|
642 |
-
if (ifr && w == ifr.contentWindow) {
|
643 |
-
w = wo.id;
|
644 |
-
return false;
|
645 |
-
}
|
646 |
-
});
|
647 |
-
|
648 |
-
return w;
|
649 |
-
},
|
650 |
-
|
651 |
-
_fixIELayout : function(id, s) {
|
652 |
-
var w, img;
|
653 |
-
|
654 |
-
if (!tinymce.isIE6)
|
655 |
-
return;
|
656 |
-
|
657 |
-
// Fixes the bug where hover flickers and does odd things in IE6
|
658 |
-
each(['n','s','w','e','nw','ne','sw','se'], function(v) {
|
659 |
-
var e = DOM.get(id + '_resize_' + v);
|
660 |
-
|
661 |
-
DOM.setStyles(e, {
|
662 |
-
width : s ? e.clientWidth : '',
|
663 |
-
height : s ? e.clientHeight : '',
|
664 |
-
cursor : DOM.getStyle(e, 'cursor', 1)
|
665 |
-
});
|
666 |
-
|
667 |
-
DOM.setStyle(id + "_bottom", 'bottom', '-1px');
|
668 |
-
|
669 |
-
e = 0;
|
670 |
-
});
|
671 |
-
|
672 |
-
// Fixes graphics glitch
|
673 |
-
if (w = this.windows[id]) {
|
674 |
-
// Fixes rendering bug after resize
|
675 |
-
w.element.hide();
|
676 |
-
w.element.show();
|
677 |
-
|
678 |
-
// Forced a repaint of the window
|
679 |
-
//DOM.get(id).style.filter = '';
|
680 |
-
|
681 |
-
// IE has a bug where images used in CSS won't get loaded
|
682 |
-
// sometimes when the cache in the browser is disabled
|
683 |
-
// This fix tries to solve it by loading the images using the image object
|
684 |
-
each(DOM.select('div,a', id), function(e, i) {
|
685 |
-
if (e.currentStyle.backgroundImage != 'none') {
|
686 |
-
img = new Image();
|
687 |
-
img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1');
|
688 |
-
}
|
689 |
-
});
|
690 |
-
|
691 |
-
DOM.get(id).style.filter = '';
|
692 |
-
}
|
693 |
-
}
|
694 |
-
});
|
695 |
-
|
696 |
-
// Register plugin
|
697 |
-
tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups);
|
698 |
-
})();
|
699 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif
DELETED
Binary file
|
tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif
DELETED
Binary file
|
tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif
DELETED
Binary file
|
tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif
DELETED
Binary file
|
tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif
DELETED
Binary file
|
tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif
DELETED
Binary file
|
tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
DELETED
Binary file
|
tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css
DELETED
@@ -1,90 +0,0 @@
|
|
1 |
-
/* Clearlooks 2 */
|
2 |
-
|
3 |
-
/* Reset */
|
4 |
-
.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block}
|
5 |
-
|
6 |
-
/* General */
|
7 |
-
.clearlooks2 {position:absolute; direction:ltr}
|
8 |
-
.clearlooks2 .mceWrapper {position:static}
|
9 |
-
.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%}
|
10 |
-
.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)}
|
11 |
-
.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none}
|
12 |
-
|
13 |
-
/* Top */
|
14 |
-
.clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px}
|
15 |
-
.clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)}
|
16 |
-
.clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)}
|
17 |
-
.clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0}
|
18 |
-
.clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold}
|
19 |
-
.clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0}
|
20 |
-
.clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px}
|
21 |
-
.clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0}
|
22 |
-
.clearlooks2 .mceFocus .mceTop span {color:#FFF}
|
23 |
-
|
24 |
-
/* Middle */
|
25 |
-
.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0}
|
26 |
-
.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)}
|
27 |
-
.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0}
|
28 |
-
.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF}
|
29 |
-
.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)}
|
30 |
-
|
31 |
-
/* Bottom */
|
32 |
-
.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px}
|
33 |
-
.clearlooks2 .mceBottom {left:0; bottom:0; width:100%}
|
34 |
-
.clearlooks2 .mceBottom div {top:0}
|
35 |
-
.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px}
|
36 |
-
.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px}
|
37 |
-
.clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0}
|
38 |
-
.clearlooks2 .mceBottom span {display:none}
|
39 |
-
.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px}
|
40 |
-
.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0}
|
41 |
-
.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px}
|
42 |
-
.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0}
|
43 |
-
.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px}
|
44 |
-
|
45 |
-
/* Actions */
|
46 |
-
.clearlooks2 a {width:29px; height:16px; top:3px;}
|
47 |
-
.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0}
|
48 |
-
.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0}
|
49 |
-
.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0}
|
50 |
-
.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0}
|
51 |
-
.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px}
|
52 |
-
.clearlooks2 .mceMovable .mceMove {display:block}
|
53 |
-
.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px}
|
54 |
-
.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px}
|
55 |
-
.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px}
|
56 |
-
.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px}
|
57 |
-
.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
|
58 |
-
.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
|
59 |
-
.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px}
|
60 |
-
.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px}
|
61 |
-
.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px}
|
62 |
-
|
63 |
-
/* Resize */
|
64 |
-
.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px}
|
65 |
-
.clearlooks2 .mceResizable .mceResize {display:block}
|
66 |
-
.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none}
|
67 |
-
.clearlooks2 .mceMinimizable .mceMin {display:block}
|
68 |
-
.clearlooks2 .mceMaximizable .mceMax {display:block}
|
69 |
-
.clearlooks2 .mceMaximized .mceMed {display:block}
|
70 |
-
.clearlooks2 .mceMaximized .mceMax {display:none}
|
71 |
-
.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize}
|
72 |
-
.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize}
|
73 |
-
.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize}
|
74 |
-
.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;}
|
75 |
-
.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize}
|
76 |
-
.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize}
|
77 |
-
.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize}
|
78 |
-
.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize}
|
79 |
-
|
80 |
-
/* Alert/Confirm */
|
81 |
-
.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0}
|
82 |
-
.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px}
|
83 |
-
.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal}
|
84 |
-
.clearlooks2 a:hover {font-weight:bold;}
|
85 |
-
.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5}
|
86 |
-
.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px}
|
87 |
-
.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)}
|
88 |
-
.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px}
|
89 |
-
.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto}
|
90 |
-
.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/inlinepopups/template.htm
DELETED
@@ -1,387 +0,0 @@
|
|
1 |
-
<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -->
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>Template for dialogs</title>
|
5 |
-
<link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css" />
|
6 |
-
</head>
|
7 |
-
<body>
|
8 |
-
|
9 |
-
<div class="mceEditor">
|
10 |
-
<div class="clearlooks2" style="width:400px; height:100px; left:10px;">
|
11 |
-
<div class="mceWrapper">
|
12 |
-
<div class="mceTop">
|
13 |
-
<div class="mceLeft"></div>
|
14 |
-
<div class="mceCenter"></div>
|
15 |
-
<div class="mceRight"></div>
|
16 |
-
<span>Blured</span>
|
17 |
-
</div>
|
18 |
-
|
19 |
-
<div class="mceMiddle">
|
20 |
-
<div class="mceLeft"></div>
|
21 |
-
<span>Content</span>
|
22 |
-
<div class="mceRight"></div>
|
23 |
-
</div>
|
24 |
-
|
25 |
-
<div class="mceBottom">
|
26 |
-
<div class="mceLeft"></div>
|
27 |
-
<div class="mceCenter"></div>
|
28 |
-
<div class="mceRight"></div>
|
29 |
-
<span>Statusbar text.</span>
|
30 |
-
</div>
|
31 |
-
|
32 |
-
<a class="mceMove" href="#"></a>
|
33 |
-
<a class="mceMin" href="#"></a>
|
34 |
-
<a class="mceMax" href="#"></a>
|
35 |
-
<a class="mceMed" href="#"></a>
|
36 |
-
<a class="mceClose" href="#"></a>
|
37 |
-
<a class="mceResize mceResizeN" href="#"></a>
|
38 |
-
<a class="mceResize mceResizeS" href="#"></a>
|
39 |
-
<a class="mceResize mceResizeW" href="#"></a>
|
40 |
-
<a class="mceResize mceResizeE" href="#"></a>
|
41 |
-
<a class="mceResize mceResizeNW" href="#"></a>
|
42 |
-
<a class="mceResize mceResizeNE" href="#"></a>
|
43 |
-
<a class="mceResize mceResizeSW" href="#"></a>
|
44 |
-
<a class="mceResize mceResizeSE" href="#"></a>
|
45 |
-
</div>
|
46 |
-
</div>
|
47 |
-
|
48 |
-
<div class="clearlooks2" style="width:400px; height:100px; left:420px;">
|
49 |
-
<div class="mceWrapper mceMovable mceFocus">
|
50 |
-
<div class="mceTop">
|
51 |
-
<div class="mceLeft"></div>
|
52 |
-
<div class="mceCenter"></div>
|
53 |
-
<div class="mceRight"></div>
|
54 |
-
<span>Focused</span>
|
55 |
-
</div>
|
56 |
-
|
57 |
-
<div class="mceMiddle">
|
58 |
-
<div class="mceLeft"></div>
|
59 |
-
<span>Content</span>
|
60 |
-
<div class="mceRight"></div>
|
61 |
-
</div>
|
62 |
-
|
63 |
-
<div class="mceBottom">
|
64 |
-
<div class="mceLeft"></div>
|
65 |
-
<div class="mceCenter"></div>
|
66 |
-
<div class="mceRight"></div>
|
67 |
-
<span>Statusbar text.</span>
|
68 |
-
</div>
|
69 |
-
|
70 |
-
<a class="mceMove" href="#"></a>
|
71 |
-
<a class="mceMin" href="#"></a>
|
72 |
-
<a class="mceMax" href="#"></a>
|
73 |
-
<a class="mceMed" href="#"></a>
|
74 |
-
<a class="mceClose" href="#"></a>
|
75 |
-
<a class="mceResize mceResizeN" href="#"></a>
|
76 |
-
<a class="mceResize mceResizeS" href="#"></a>
|
77 |
-
<a class="mceResize mceResizeW" href="#"></a>
|
78 |
-
<a class="mceResize mceResizeE" href="#"></a>
|
79 |
-
<a class="mceResize mceResizeNW" href="#"></a>
|
80 |
-
<a class="mceResize mceResizeNE" href="#"></a>
|
81 |
-
<a class="mceResize mceResizeSW" href="#"></a>
|
82 |
-
<a class="mceResize mceResizeSE" href="#"></a>
|
83 |
-
</div>
|
84 |
-
</div>
|
85 |
-
|
86 |
-
<div class="clearlooks2" style="width:400px; height:100px; left:10px; top:120px;">
|
87 |
-
<div class="mceWrapper mceMovable mceFocus mceStatusbar">
|
88 |
-
<div class="mceTop">
|
89 |
-
<div class="mceLeft"></div>
|
90 |
-
<div class="mceCenter"></div>
|
91 |
-
<div class="mceRight"></div>
|
92 |
-
<span>Statusbar</span>
|
93 |
-
</div>
|
94 |
-
|
95 |
-
<div class="mceMiddle">
|
96 |
-
<div class="mceLeft"></div>
|
97 |
-
<span>Content</span>
|
98 |
-
<div class="mceRight"></div>
|
99 |
-
</div>
|
100 |
-
|
101 |
-
<div class="mceBottom">
|
102 |
-
<div class="mceLeft"></div>
|
103 |
-
<div class="mceCenter"></div>
|
104 |
-
<div class="mceRight"></div>
|
105 |
-
<span>Statusbar text.</span>
|
106 |
-
</div>
|
107 |
-
|
108 |
-
<a class="mceMove" href="#"></a>
|
109 |
-
<a class="mceMin" href="#"></a>
|
110 |
-
<a class="mceMax" href="#"></a>
|
111 |
-
<a class="mceMed" href="#"></a>
|
112 |
-
<a class="mceClose" href="#"></a>
|
113 |
-
<a class="mceResize mceResizeN" href="#"></a>
|
114 |
-
<a class="mceResize mceResizeS" href="#"></a>
|
115 |
-
<a class="mceResize mceResizeW" href="#"></a>
|
116 |
-
<a class="mceResize mceResizeE" href="#"></a>
|
117 |
-
<a class="mceResize mceResizeNW" href="#"></a>
|
118 |
-
<a class="mceResize mceResizeNE" href="#"></a>
|
119 |
-
<a class="mceResize mceResizeSW" href="#"></a>
|
120 |
-
<a class="mceResize mceResizeSE" href="#"></a>
|
121 |
-
</div>
|
122 |
-
</div>
|
123 |
-
|
124 |
-
<div class="clearlooks2" style="width:400px; height:100px; left:420px; top:120px;">
|
125 |
-
<div class="mceWrapper mceMovable mceFocus mceStatusbar mceResizable">
|
126 |
-
<div class="mceTop">
|
127 |
-
<div class="mceLeft"></div>
|
128 |
-
<div class="mceCenter"></div>
|
129 |
-
<div class="mceRight"></div>
|
130 |
-
<span>Statusbar, Resizable</span>
|
131 |
-
</div>
|
132 |
-
|
133 |
-
<div class="mceMiddle">
|
134 |
-
<div class="mceLeft"></div>
|
135 |
-
<span>Content</span>
|
136 |
-
<div class="mceRight"></div>
|
137 |
-
</div>
|
138 |
-
|
139 |
-
<div class="mceBottom">
|
140 |
-
<div class="mceLeft"></div>
|
141 |
-
<div class="mceCenter"></div>
|
142 |
-
<div class="mceRight"></div>
|
143 |
-
<span>Statusbar text.</span>
|
144 |
-
</div>
|
145 |
-
|
146 |
-
<a class="mceMove" href="#"></a>
|
147 |
-
<a class="mceMin" href="#"></a>
|
148 |
-
<a class="mceMax" href="#"></a>
|
149 |
-
<a class="mceMed" href="#"></a>
|
150 |
-
<a class="mceClose" href="#"></a>
|
151 |
-
<a class="mceResize mceResizeN" href="#"></a>
|
152 |
-
<a class="mceResize mceResizeS" href="#"></a>
|
153 |
-
<a class="mceResize mceResizeW" href="#"></a>
|
154 |
-
<a class="mceResize mceResizeE" href="#"></a>
|
155 |
-
<a class="mceResize mceResizeNW" href="#"></a>
|
156 |
-
<a class="mceResize mceResizeNE" href="#"></a>
|
157 |
-
<a class="mceResize mceResizeSW" href="#"></a>
|
158 |
-
<a class="mceResize mceResizeSE" href="#"></a>
|
159 |
-
</div>
|
160 |
-
</div>
|
161 |
-
|
162 |
-
<div class="clearlooks2" style="width:400px; height:100px; left:10px; top:230px;">
|
163 |
-
<div class="mceWrapper mceMovable mceFocus mceResizable mceMaximizable">
|
164 |
-
<div class="mceTop">
|
165 |
-
<div class="mceLeft"></div>
|
166 |
-
<div class="mceCenter"></div>
|
167 |
-
<div class="mceRight"></div>
|
168 |
-
<span>Resizable, Maximizable</span>
|
169 |
-
</div>
|
170 |
-
|
171 |
-
<div class="mceMiddle">
|
172 |
-
<div class="mceLeft"></div>
|
173 |
-
<span>Content</span>
|
174 |
-
<div class="mceRight"></div>
|
175 |
-
</div>
|
176 |
-
|
177 |
-
<div class="mceBottom">
|
178 |
-
<div class="mceLeft"></div>
|
179 |
-
<div class="mceCenter"></div>
|
180 |
-
<div class="mceRight"></div>
|
181 |
-
<span>Statusbar text.</span>
|
182 |
-
</div>
|
183 |
-
|
184 |
-
<a class="mceMove" href="#"></a>
|
185 |
-
<a class="mceMin" href="#"></a>
|
186 |
-
<a class="mceMax" href="#"></a>
|
187 |
-
<a class="mceMed" href="#"></a>
|
188 |
-
<a class="mceClose" href="#"></a>
|
189 |
-
<a class="mceResize mceResizeN" href="#"></a>
|
190 |
-
<a class="mceResize mceResizeS" href="#"></a>
|
191 |
-
<a class="mceResize mceResizeW" href="#"></a>
|
192 |
-
<a class="mceResize mceResizeE" href="#"></a>
|
193 |
-
<a class="mceResize mceResizeNW" href="#"></a>
|
194 |
-
<a class="mceResize mceResizeNE" href="#"></a>
|
195 |
-
<a class="mceResize mceResizeSW" href="#"></a>
|
196 |
-
<a class="mceResize mceResizeSE" href="#"></a>
|
197 |
-
</div>
|
198 |
-
</div>
|
199 |
-
|
200 |
-
<div class="clearlooks2" style="width:400px; height:100px; left:420px; top:230px;">
|
201 |
-
<div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximizable">
|
202 |
-
<div class="mceTop">
|
203 |
-
<div class="mceLeft"></div>
|
204 |
-
<div class="mceCenter"></div>
|
205 |
-
<div class="mceRight"></div>
|
206 |
-
<span>Blurred, Maximizable, Statusbar, Resizable</span>
|
207 |
-
</div>
|
208 |
-
|
209 |
-
<div class="mceMiddle">
|
210 |
-
<div class="mceLeft"></div>
|
211 |
-
<span>Content</span>
|
212 |
-
<div class="mceRight"></div>
|
213 |
-
</div>
|
214 |
-
|
215 |
-
<div class="mceBottom">
|
216 |
-
<div class="mceLeft"></div>
|
217 |
-
<div class="mceCenter"></div>
|
218 |
-
<div class="mceRight"></div>
|
219 |
-
<span>Statusbar text.</span>
|
220 |
-
</div>
|
221 |
-
|
222 |
-
<a class="mceMove" href="#"></a>
|
223 |
-
<a class="mceMin" href="#"></a>
|
224 |
-
<a class="mceMax" href="#"></a>
|
225 |
-
<a class="mceMed" href="#"></a>
|
226 |
-
<a class="mceClose" href="#"></a>
|
227 |
-
<a class="mceResize mceResizeN" href="#"></a>
|
228 |
-
<a class="mceResize mceResizeS" href="#"></a>
|
229 |
-
<a class="mceResize mceResizeW" href="#"></a>
|
230 |
-
<a class="mceResize mceResizeE" href="#"></a>
|
231 |
-
<a class="mceResize mceResizeNW" href="#"></a>
|
232 |
-
<a class="mceResize mceResizeNE" href="#"></a>
|
233 |
-
<a class="mceResize mceResizeSW" href="#"></a>
|
234 |
-
<a class="mceResize mceResizeSE" href="#"></a>
|
235 |
-
</div>
|
236 |
-
</div>
|
237 |
-
|
238 |
-
<div class="clearlooks2" style="width:400px; height:100px; left:10px; top:340px;">
|
239 |
-
<div class="mceWrapper mceMovable mceFocus mceResizable mceMaximized mceMinimizable mceMaximizable">
|
240 |
-
<div class="mceTop">
|
241 |
-
<div class="mceLeft"></div>
|
242 |
-
<div class="mceCenter"></div>
|
243 |
-
<div class="mceRight"></div>
|
244 |
-
<span>Maximized, Maximizable, Minimizable</span>
|
245 |
-
</div>
|
246 |
-
|
247 |
-
<div class="mceMiddle">
|
248 |
-
<div class="mceLeft"></div>
|
249 |
-
<span>Content</span>
|
250 |
-
<div class="mceRight"></div>
|
251 |
-
</div>
|
252 |
-
|
253 |
-
<div class="mceBottom">
|
254 |
-
<div class="mceLeft"></div>
|
255 |
-
<div class="mceCenter"></div>
|
256 |
-
<div class="mceRight"></div>
|
257 |
-
<span>Statusbar text.</span>
|
258 |
-
</div>
|
259 |
-
|
260 |
-
<a class="mceMove" href="#"></a>
|
261 |
-
<a class="mceMin" href="#"></a>
|
262 |
-
<a class="mceMax" href="#"></a>
|
263 |
-
<a class="mceMed" href="#"></a>
|
264 |
-
<a class="mceClose" href="#"></a>
|
265 |
-
<a class="mceResize mceResizeN" href="#"></a>
|
266 |
-
<a class="mceResize mceResizeS" href="#"></a>
|
267 |
-
<a class="mceResize mceResizeW" href="#"></a>
|
268 |
-
<a class="mceResize mceResizeE" href="#"></a>
|
269 |
-
<a class="mceResize mceResizeNW" href="#"></a>
|
270 |
-
<a class="mceResize mceResizeNE" href="#"></a>
|
271 |
-
<a class="mceResize mceResizeSW" href="#"></a>
|
272 |
-
<a class="mceResize mceResizeSE" href="#"></a>
|
273 |
-
</div>
|
274 |
-
</div>
|
275 |
-
|
276 |
-
<div class="clearlooks2" style="width:400px; height:100px; left:420px; top:340px;">
|
277 |
-
<div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximized mceMinimizable mceMaximizable">
|
278 |
-
<div class="mceTop">
|
279 |
-
<div class="mceLeft"></div>
|
280 |
-
<div class="mceCenter"></div>
|
281 |
-
<div class="mceRight"></div>
|
282 |
-
<span>Blured</span>
|
283 |
-
</div>
|
284 |
-
|
285 |
-
<div class="mceMiddle">
|
286 |
-
<div class="mceLeft"></div>
|
287 |
-
<span>Content</span>
|
288 |
-
<div class="mceRight"></div>
|
289 |
-
</div>
|
290 |
-
|
291 |
-
<div class="mceBottom">
|
292 |
-
<div class="mceLeft"></div>
|
293 |
-
<div class="mceCenter"></div>
|
294 |
-
<div class="mceRight"></div>
|
295 |
-
<span>Statusbar text.</span>
|
296 |
-
</div>
|
297 |
-
|
298 |
-
<a class="mceMove" href="#"></a>
|
299 |
-
<a class="mceMin" href="#"></a>
|
300 |
-
<a class="mceMax" href="#"></a>
|
301 |
-
<a class="mceMed" href="#"></a>
|
302 |
-
<a class="mceClose" href="#"></a>
|
303 |
-
<a class="mceResize mceResizeN" href="#"></a>
|
304 |
-
<a class="mceResize mceResizeS" href="#"></a>
|
305 |
-
<a class="mceResize mceResizeW" href="#"></a>
|
306 |
-
<a class="mceResize mceResizeE" href="#"></a>
|
307 |
-
<a class="mceResize mceResizeNW" href="#"></a>
|
308 |
-
<a class="mceResize mceResizeNE" href="#"></a>
|
309 |
-
<a class="mceResize mceResizeSW" href="#"></a>
|
310 |
-
<a class="mceResize mceResizeSE" href="#"></a>
|
311 |
-
</div>
|
312 |
-
</div>
|
313 |
-
|
314 |
-
<div class="clearlooks2" style="width:400px; height:130px; left:10px; top:450px;">
|
315 |
-
<div class="mceWrapper mceMovable mceFocus mceModal mceAlert">
|
316 |
-
<div class="mceTop">
|
317 |
-
<div class="mceLeft"></div>
|
318 |
-
<div class="mceCenter"></div>
|
319 |
-
<div class="mceRight"></div>
|
320 |
-
<span>Alert</span>
|
321 |
-
</div>
|
322 |
-
|
323 |
-
<div class="mceMiddle">
|
324 |
-
<div class="mceLeft"></div>
|
325 |
-
<span>
|
326 |
-
This is a very long error message. This is a very long error message.
|
327 |
-
This is a very long error message. This is a very long error message.
|
328 |
-
This is a very long error message. This is a very long error message.
|
329 |
-
This is a very long error message. This is a very long error message.
|
330 |
-
This is a very long error message. This is a very long error message.
|
331 |
-
This is a very long error message. This is a very long error message.
|
332 |
-
</span>
|
333 |
-
<div class="mceRight"></div>
|
334 |
-
<div class="mceIcon"></div>
|
335 |
-
</div>
|
336 |
-
|
337 |
-
<div class="mceBottom">
|
338 |
-
<div class="mceLeft"></div>
|
339 |
-
<div class="mceCenter"></div>
|
340 |
-
<div class="mceRight"></div>
|
341 |
-
</div>
|
342 |
-
|
343 |
-
<a class="mceMove" href="#"></a>
|
344 |
-
<a class="mceButton mceOk" href="#">Ok</a>
|
345 |
-
<a class="mceClose" href="#"></a>
|
346 |
-
</div>
|
347 |
-
</div>
|
348 |
-
|
349 |
-
<div class="clearlooks2" style="width:400px; height:130px; left:420px; top:450px;">
|
350 |
-
<div class="mceWrapper mceMovable mceFocus mceModal mceConfirm">
|
351 |
-
<div class="mceTop">
|
352 |
-
<div class="mceLeft"></div>
|
353 |
-
<div class="mceCenter"></div>
|
354 |
-
<div class="mceRight"></div>
|
355 |
-
<span>Confirm</span>
|
356 |
-
</div>
|
357 |
-
|
358 |
-
<div class="mceMiddle">
|
359 |
-
<div class="mceLeft"></div>
|
360 |
-
<span>
|
361 |
-
This is a very long error message. This is a very long error message.
|
362 |
-
This is a very long error message. This is a very long error message.
|
363 |
-
This is a very long error message. This is a very long error message.
|
364 |
-
This is a very long error message. This is a very long error message.
|
365 |
-
This is a very long error message. This is a very long error message.
|
366 |
-
This is a very long error message. This is a very long error message.
|
367 |
-
</span>
|
368 |
-
<div class="mceRight"></div>
|
369 |
-
<div class="mceIcon"></div>
|
370 |
-
</div>
|
371 |
-
|
372 |
-
<div class="mceBottom">
|
373 |
-
<div class="mceLeft"></div>
|
374 |
-
<div class="mceCenter"></div>
|
375 |
-
<div class="mceRight"></div>
|
376 |
-
</div>
|
377 |
-
|
378 |
-
<a class="mceMove" href="#"></a>
|
379 |
-
<a class="mceButton mceOk" href="#">Ok</a>
|
380 |
-
<a class="mceButton mceCancel" href="#">Cancel</a>
|
381 |
-
<a class="mceClose" href="#"></a>
|
382 |
-
</div>
|
383 |
-
</div>
|
384 |
-
</div>
|
385 |
-
|
386 |
-
</body>
|
387 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/legacyoutput/editor_plugin.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(a){a.onAddEditor.addToTop(function(c,b){b.settings.inline_styles=false});a.create("tinymce.plugins.LegacyOutput",{init:function(b){b.onInit.add(function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",e=a.explode(b.settings.font_size_style_values),d=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignfull:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:true}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:true}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(f){return a.inArray(e,f.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}});a.each("b,i,u,strike".split(","),function(f){d.addValidElements(f+"[*]")});if(!d.getElementRule("font")){d.addValidElements("font[face|size|color|style]")}a.each(c.split(","),function(f){var h=d.getElementRule(f),g;if(h){if(!h.attributes.align){h.attributes.align={};h.attributesOrder.push("align")}}});b.onNodeChange.add(function(g,k){var j,f,h,i;f=g.dom.getParent(g.selection.getNode(),"font");if(f){h=f.face;i=f.size}if(j=k.get("fontselect")){j.select(function(l){return l==h})}if(j=k.get("fontsizeselect")){j.select(function(m){var l=a.inArray(e,m.fontSize);return l+1==i})}})})},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("legacyoutput",a.plugins.LegacyOutput)})(tinymce);
|
|
tiny_mce/plugins/legacyoutput/editor_plugin_src.js
DELETED
@@ -1,139 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* editor_plugin_src.js
|
3 |
-
*
|
4 |
-
* Copyright 2009, Moxiecode Systems AB
|
5 |
-
* Released under LGPL License.
|
6 |
-
*
|
7 |
-
* License: http://tinymce.moxiecode.com/license
|
8 |
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9 |
-
*
|
10 |
-
* This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align
|
11 |
-
* attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash
|
12 |
-
*
|
13 |
-
* However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are
|
14 |
-
* not apart of the newer specifications for HTML and XHTML.
|
15 |
-
*/
|
16 |
-
|
17 |
-
(function(tinymce) {
|
18 |
-
// Override inline_styles setting to force TinyMCE to produce deprecated contents
|
19 |
-
tinymce.onAddEditor.addToTop(function(tinymce, editor) {
|
20 |
-
editor.settings.inline_styles = false;
|
21 |
-
});
|
22 |
-
|
23 |
-
// Create the legacy ouput plugin
|
24 |
-
tinymce.create('tinymce.plugins.LegacyOutput', {
|
25 |
-
init : function(editor) {
|
26 |
-
editor.onInit.add(function() {
|
27 |
-
var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img',
|
28 |
-
fontSizes = tinymce.explode(editor.settings.font_size_style_values),
|
29 |
-
schema = editor.schema;
|
30 |
-
|
31 |
-
// Override some internal formats to produce legacy elements and attributes
|
32 |
-
editor.formatter.register({
|
33 |
-
// Change alignment formats to use the deprecated align attribute
|
34 |
-
alignleft : {selector : alignElements, attributes : {align : 'left'}},
|
35 |
-
aligncenter : {selector : alignElements, attributes : {align : 'center'}},
|
36 |
-
alignright : {selector : alignElements, attributes : {align : 'right'}},
|
37 |
-
alignfull : {selector : alignElements, attributes : {align : 'justify'}},
|
38 |
-
|
39 |
-
// Change the basic formatting elements to use deprecated element types
|
40 |
-
bold : [
|
41 |
-
{inline : 'b', remove : 'all'},
|
42 |
-
{inline : 'strong', remove : 'all'},
|
43 |
-
{inline : 'span', styles : {fontWeight : 'bold'}}
|
44 |
-
],
|
45 |
-
italic : [
|
46 |
-
{inline : 'i', remove : 'all'},
|
47 |
-
{inline : 'em', remove : 'all'},
|
48 |
-
{inline : 'span', styles : {fontStyle : 'italic'}}
|
49 |
-
],
|
50 |
-
underline : [
|
51 |
-
{inline : 'u', remove : 'all'},
|
52 |
-
{inline : 'span', styles : {textDecoration : 'underline'}, exact : true}
|
53 |
-
],
|
54 |
-
strikethrough : [
|
55 |
-
{inline : 'strike', remove : 'all'},
|
56 |
-
{inline : 'span', styles : {textDecoration: 'line-through'}, exact : true}
|
57 |
-
],
|
58 |
-
|
59 |
-
// Change font size and font family to use the deprecated font element
|
60 |
-
fontname : {inline : 'font', attributes : {face : '%value'}},
|
61 |
-
fontsize : {
|
62 |
-
inline : 'font',
|
63 |
-
attributes : {
|
64 |
-
size : function(vars) {
|
65 |
-
return tinymce.inArray(fontSizes, vars.value) + 1;
|
66 |
-
}
|
67 |
-
}
|
68 |
-
},
|
69 |
-
|
70 |
-
// Setup font elements for colors as well
|
71 |
-
forecolor : {inline : 'font', attributes : {color : '%value'}},
|
72 |
-
hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}}
|
73 |
-
});
|
74 |
-
|
75 |
-
// Check that deprecated elements are allowed if not add them
|
76 |
-
tinymce.each('b,i,u,strike'.split(','), function(name) {
|
77 |
-
schema.addValidElements(name + '[*]');
|
78 |
-
});
|
79 |
-
|
80 |
-
// Add font element if it's missing
|
81 |
-
if (!schema.getElementRule("font"))
|
82 |
-
schema.addValidElements("font[face|size|color|style]");
|
83 |
-
|
84 |
-
// Add the missing and depreacted align attribute for the serialization engine
|
85 |
-
tinymce.each(alignElements.split(','), function(name) {
|
86 |
-
var rule = schema.getElementRule(name), found;
|
87 |
-
|
88 |
-
if (rule) {
|
89 |
-
if (!rule.attributes.align) {
|
90 |
-
rule.attributes.align = {};
|
91 |
-
rule.attributesOrder.push('align');
|
92 |
-
}
|
93 |
-
}
|
94 |
-
});
|
95 |
-
|
96 |
-
// Listen for the onNodeChange event so that we can do special logic for the font size and font name drop boxes
|
97 |
-
editor.onNodeChange.add(function(editor, control_manager) {
|
98 |
-
var control, fontElm, fontName, fontSize;
|
99 |
-
|
100 |
-
// Find font element get it's name and size
|
101 |
-
fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
|
102 |
-
if (fontElm) {
|
103 |
-
fontName = fontElm.face;
|
104 |
-
fontSize = fontElm.size;
|
105 |
-
}
|
106 |
-
|
107 |
-
// Select/unselect the font name in droplist
|
108 |
-
if (control = control_manager.get('fontselect')) {
|
109 |
-
control.select(function(value) {
|
110 |
-
return value == fontName;
|
111 |
-
});
|
112 |
-
}
|
113 |
-
|
114 |
-
// Select/unselect the font size in droplist
|
115 |
-
if (control = control_manager.get('fontsizeselect')) {
|
116 |
-
control.select(function(value) {
|
117 |
-
var index = tinymce.inArray(fontSizes, value.fontSize);
|
118 |
-
|
119 |
-
return index + 1 == fontSize;
|
120 |
-
});
|
121 |
-
}
|
122 |
-
});
|
123 |
-
});
|
124 |
-
},
|
125 |
-
|
126 |
-
getInfo : function() {
|
127 |
-
return {
|
128 |
-
longname : 'LegacyOutput',
|
129 |
-
author : 'Moxiecode Systems AB',
|
130 |
-
authorurl : 'http://tinymce.moxiecode.com',
|
131 |
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput',
|
132 |
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
133 |
-
};
|
134 |
-
}
|
135 |
-
});
|
136 |
-
|
137 |
-
// Register plugin
|
138 |
-
tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput);
|
139 |
-
})(tinymce);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/noneditable/editor_plugin.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(){var c=tinymce.dom.TreeWalker;var a="contenteditable",d="data-mce-"+a;var e=tinymce.VK;function b(n){var j=n.dom,p=n.selection,r,o="mce_noneditablecaret",r="\uFEFF";function m(t){var s;if(t.nodeType===1){s=t.getAttribute(d);if(s&&s!=="inherit"){return s}s=t.contentEditable;if(s!=="inherit"){return s}}return null}function g(s){var t;while(s){t=m(s);if(t){return t==="false"?s:null}s=s.parentNode}}function l(s){while(s){if(s.id===o){return s}s=s.parentNode}}function k(s){var t;if(s){t=new c(s,s);for(s=t.current();s;s=t.next()){if(s.nodeType===3){return s}}}}function f(v,u){var s,t;if(m(v)==="false"){if(j.isBlock(v)){p.select(v);return}}t=j.createRng();if(m(v)==="true"){if(!v.firstChild){v.appendChild(n.getDoc().createTextNode("\u00a0"))}v=v.firstChild;u=true}s=j.create("span",{id:o,"data-mce-bogus":true},r);if(u){v.parentNode.insertBefore(s,v)}else{j.insertAfter(s,v)}t.setStart(s.firstChild,1);t.collapse(true);p.setRng(t);return s}function i(s){var v,t,u;if(s){rng=p.getRng(true);rng.setStartBefore(s);rng.setEndBefore(s);v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true);p.setRng(rng)}else{t=l(p.getStart());while((s=j.get(o))&&s!==u){if(t!==s){v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true)}u=s}}}function q(){var s,w,u,t,v;function x(B,D){var A,F,E,C,z;A=t.startContainer;F=t.startOffset;if(A.nodeType==3){z=A.nodeValue.length;if((F>0&&F<z)||(D?F==z:F==0)){return}}else{if(F<A.childNodes.length){var G=!D&&F>0?F-1:F;A=A.childNodes[G];if(A.hasChildNodes()){A=A.firstChild}}else{return !D?B:null}}E=new c(A,B);while(C=E[D?"prev":"next"]()){if(C.nodeType===3&&C.nodeValue.length>0){return}else{if(m(C)==="true"){return C}}}return B}i();u=p.isCollapsed();s=g(p.getStart());w=g(p.getEnd());if(s||w){t=p.getRng(true);if(u){s=s||w;var y=p.getStart();if(v=x(s,true)){f(v,true)}else{if(v=x(s,false)){f(v,false)}else{p.select(s)}}}else{t=p.getRng(true);if(s){t.setStartBefore(s)}if(w){t.setEndAfter(w)}p.setRng(t)}}}function h(z,B){var F=B.keyCode,x,C,D,v;function u(H,G){while(H=H[G?"previousSibling":"nextSibling"]){if(H.nodeType!==3||H.nodeValue.length>0){return H}}}function y(G,H){p.select(G);p.collapse(H)}function t(K){var J,I,M,H;function G(O){var N=I;while(N){if(N===O){return}N=N.parentNode}j.remove(O);q()}function L(){var O,P,N=z.schema.getNonEmptyElements();P=new tinymce.dom.TreeWalker(I,z.getBody());while(O=(K?P.prev():P.next())){if(N[O.nodeName.toLowerCase()]){break}if(O.nodeType===3&&tinymce.trim(O.nodeValue).length>0){break}if(m(O)==="false"){G(O);return true}}if(g(O)){return true}return false}if(p.isCollapsed()){J=p.getRng(true);I=J.startContainer;M=J.startOffset;I=l(I)||I;if(H=g(I)){G(H);return false}if(I.nodeType==3&&(K?M>0:M<I.nodeValue.length)){return true}if(I.nodeType==1){I=I.childNodes[M]||I}if(L()){return false}}return true}D=p.getStart();v=p.getEnd();x=g(D)||g(v);if(x&&(F<112||F>124)&&F!=e.DELETE&&F!=e.BACKSPACE){if((tinymce.isMac?B.metaKey:B.ctrlKey)&&(F==67||F==88||F==86)){return}B.preventDefault();if(F==e.LEFT||F==e.RIGHT){var w=F==e.LEFT;if(z.dom.isBlock(x)){var A=w?x.previousSibling:x.nextSibling;var s=new c(A,A);var E=w?s.prev():s.next();y(E,!w)}else{y(x,w)}}}else{if(F==e.LEFT||F==e.RIGHT||F==e.BACKSPACE||F==e.DELETE){C=l(D);if(C){if(F==e.LEFT||F==e.BACKSPACE){x=u(C,true);if(x&&m(x)==="false"){B.preventDefault();if(F==e.LEFT){y(x,true)}else{j.remove(x);return}}else{i(C)}}if(F==e.RIGHT||F==e.DELETE){x=u(C);if(x&&m(x)==="false"){B.preventDefault();if(F==e.RIGHT){y(x,false)}else{j.remove(x);return}}else{i(C)}}}if((F==e.BACKSPACE||F==e.DELETE)&&!t(F==e.BACKSPACE)){B.preventDefault();return false}}}}n.onMouseDown.addToTop(function(s,u){var t=s.selection.getNode();if(m(t)==="false"&&t==u.target){q()}});n.onMouseUp.addToTop(q);n.onKeyDown.addToTop(h);n.onKeyUp.addToTop(q)}tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(i,k){var h,g,j;function f(m,n){var o=j.length,p=n.content,l=tinymce.trim(g);if(n.format=="raw"){return}while(o--){p=p.replace(j[o],function(s){var r=arguments,q=r[r.length-2];if(q>0&&p.charAt(q-1)=='"'){return s}return'<span class="'+l+'" data-mce-content="'+m.dom.encode(r[0])+'">'+m.dom.encode(typeof(r[1])==="string"?r[1]:r[0])+"</span>"})}n.content=p}h=" "+tinymce.trim(i.getParam("noneditable_editable_class","mceEditable"))+" ";g=" "+tinymce.trim(i.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";j=i.getParam("noneditable_regexp");if(j&&!j.length){j=[j]}i.onPreInit.add(function(){b(i);if(j){i.selection.onBeforeSetContent.add(f);i.onBeforeSetContent.add(f)}i.parser.addAttributeFilter("class",function(l){var m=l.length,n,o;while(m--){o=l[m];n=" "+o.attr("class")+" ";if(n.indexOf(h)!==-1){o.attr(d,"true")}else{if(n.indexOf(g)!==-1){o.attr(d,"false")}}}});i.serializer.addAttributeFilter(d,function(l,m){var n=l.length,o;while(n--){o=l[n];if(j&&o.attr("data-mce-content")){o.name="#text";o.type=3;o.raw=true;o.value=o.attr("data-mce-content")}else{o.attr(a,null);o.attr(d,null)}}});i.parser.addAttributeFilter(a,function(l,m){var n=l.length,o;while(n--){o=l[n];o.attr(d,o.attr(a));o.attr(a,null)}})})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})();
|
|
tiny_mce/plugins/noneditable/editor_plugin_src.js
DELETED
@@ -1,537 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* editor_plugin_src.js
|
3 |
-
*
|
4 |
-
* Copyright 2009, Moxiecode Systems AB
|
5 |
-
* Released under LGPL License.
|
6 |
-
*
|
7 |
-
* License: http://tinymce.moxiecode.com/license
|
8 |
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9 |
-
*/
|
10 |
-
|
11 |
-
(function() {
|
12 |
-
var TreeWalker = tinymce.dom.TreeWalker;
|
13 |
-
var externalName = 'contenteditable', internalName = 'data-mce-' + externalName;
|
14 |
-
var VK = tinymce.VK;
|
15 |
-
|
16 |
-
function handleContentEditableSelection(ed) {
|
17 |
-
var dom = ed.dom, selection = ed.selection, invisibleChar, caretContainerId = 'mce_noneditablecaret', invisibleChar = '\uFEFF';
|
18 |
-
|
19 |
-
// Returns the content editable state of a node "true/false" or null
|
20 |
-
function getContentEditable(node) {
|
21 |
-
var contentEditable;
|
22 |
-
|
23 |
-
// Ignore non elements
|
24 |
-
if (node.nodeType === 1) {
|
25 |
-
// Check for fake content editable
|
26 |
-
contentEditable = node.getAttribute(internalName);
|
27 |
-
if (contentEditable && contentEditable !== "inherit") {
|
28 |
-
return contentEditable;
|
29 |
-
}
|
30 |
-
|
31 |
-
// Check for real content editable
|
32 |
-
contentEditable = node.contentEditable;
|
33 |
-
if (contentEditable !== "inherit") {
|
34 |
-
return contentEditable;
|
35 |
-
}
|
36 |
-
}
|
37 |
-
|
38 |
-
return null;
|
39 |
-
};
|
40 |
-
|
41 |
-
// Returns the noneditable parent or null if there is a editable before it or if it wasn't found
|
42 |
-
function getNonEditableParent(node) {
|
43 |
-
var state;
|
44 |
-
|
45 |
-
while (node) {
|
46 |
-
state = getContentEditable(node);
|
47 |
-
if (state) {
|
48 |
-
return state === "false" ? node : null;
|
49 |
-
}
|
50 |
-
|
51 |
-
node = node.parentNode;
|
52 |
-
}
|
53 |
-
};
|
54 |
-
|
55 |
-
// Get caret container parent for the specified node
|
56 |
-
function getParentCaretContainer(node) {
|
57 |
-
while (node) {
|
58 |
-
if (node.id === caretContainerId) {
|
59 |
-
return node;
|
60 |
-
}
|
61 |
-
|
62 |
-
node = node.parentNode;
|
63 |
-
}
|
64 |
-
};
|
65 |
-
|
66 |
-
// Finds the first text node in the specified node
|
67 |
-
function findFirstTextNode(node) {
|
68 |
-
var walker;
|
69 |
-
|
70 |
-
if (node) {
|
71 |
-
walker = new TreeWalker(node, node);
|
72 |
-
|
73 |
-
for (node = walker.current(); node; node = walker.next()) {
|
74 |
-
if (node.nodeType === 3) {
|
75 |
-
return node;
|
76 |
-
}
|
77 |
-
}
|
78 |
-
}
|
79 |
-
};
|
80 |
-
|
81 |
-
// Insert caret container before/after target or expand selection to include block
|
82 |
-
function insertCaretContainerOrExpandToBlock(target, before) {
|
83 |
-
var caretContainer, rng;
|
84 |
-
|
85 |
-
// Select block
|
86 |
-
if (getContentEditable(target) === "false") {
|
87 |
-
if (dom.isBlock(target)) {
|
88 |
-
selection.select(target);
|
89 |
-
return;
|
90 |
-
}
|
91 |
-
}
|
92 |
-
|
93 |
-
rng = dom.createRng();
|
94 |
-
|
95 |
-
if (getContentEditable(target) === "true") {
|
96 |
-
if (!target.firstChild) {
|
97 |
-
target.appendChild(ed.getDoc().createTextNode('\u00a0'));
|
98 |
-
}
|
99 |
-
|
100 |
-
target = target.firstChild;
|
101 |
-
before = true;
|
102 |
-
}
|
103 |
-
|
104 |
-
//caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true, style:'border: 1px solid red'}, invisibleChar);
|
105 |
-
caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true}, invisibleChar);
|
106 |
-
|
107 |
-
if (before) {
|
108 |
-
target.parentNode.insertBefore(caretContainer, target);
|
109 |
-
} else {
|
110 |
-
dom.insertAfter(caretContainer, target);
|
111 |
-
}
|
112 |
-
|
113 |
-
rng.setStart(caretContainer.firstChild, 1);
|
114 |
-
rng.collapse(true);
|
115 |
-
selection.setRng(rng);
|
116 |
-
|
117 |
-
return caretContainer;
|
118 |
-
};
|
119 |
-
|
120 |
-
// Removes any caret container except the one we might be in
|
121 |
-
function removeCaretContainer(caretContainer) {
|
122 |
-
var child, currentCaretContainer, lastContainer;
|
123 |
-
|
124 |
-
if (caretContainer) {
|
125 |
-
rng = selection.getRng(true);
|
126 |
-
rng.setStartBefore(caretContainer);
|
127 |
-
rng.setEndBefore(caretContainer);
|
128 |
-
|
129 |
-
child = findFirstTextNode(caretContainer);
|
130 |
-
if (child && child.nodeValue.charAt(0) == invisibleChar) {
|
131 |
-
child = child.deleteData(0, 1);
|
132 |
-
}
|
133 |
-
|
134 |
-
dom.remove(caretContainer, true);
|
135 |
-
|
136 |
-
selection.setRng(rng);
|
137 |
-
} else {
|
138 |
-
currentCaretContainer = getParentCaretContainer(selection.getStart());
|
139 |
-
while ((caretContainer = dom.get(caretContainerId)) && caretContainer !== lastContainer) {
|
140 |
-
if (currentCaretContainer !== caretContainer) {
|
141 |
-
child = findFirstTextNode(caretContainer);
|
142 |
-
if (child && child.nodeValue.charAt(0) == invisibleChar) {
|
143 |
-
child = child.deleteData(0, 1);
|
144 |
-
}
|
145 |
-
|
146 |
-
dom.remove(caretContainer, true);
|
147 |
-
}
|
148 |
-
|
149 |
-
lastContainer = caretContainer;
|
150 |
-
}
|
151 |
-
}
|
152 |
-
};
|
153 |
-
|
154 |
-
// Modifies the selection to include contentEditable false elements or insert caret containers
|
155 |
-
function moveSelection() {
|
156 |
-
var nonEditableStart, nonEditableEnd, isCollapsed, rng, element;
|
157 |
-
|
158 |
-
// Checks if there is any contents to the left/right side of caret returns the noneditable element or any editable element if it finds one inside
|
159 |
-
function hasSideContent(element, left) {
|
160 |
-
var container, offset, walker, node, len;
|
161 |
-
|
162 |
-
container = rng.startContainer;
|
163 |
-
offset = rng.startOffset;
|
164 |
-
|
165 |
-
// If endpoint is in middle of text node then expand to beginning/end of element
|
166 |
-
if (container.nodeType == 3) {
|
167 |
-
len = container.nodeValue.length;
|
168 |
-
if ((offset > 0 && offset < len) || (left ? offset == len : offset == 0)) {
|
169 |
-
return;
|
170 |
-
}
|
171 |
-
} else {
|
172 |
-
// Can we resolve the node by index
|
173 |
-
if (offset < container.childNodes.length) {
|
174 |
-
// Browser represents caret position as the offset at the start of an element. When moving right
|
175 |
-
// this is the element we are moving into so we consider our container to be child node at offset-1
|
176 |
-
var pos = !left && offset > 0 ? offset-1 : offset;
|
177 |
-
container = container.childNodes[pos];
|
178 |
-
if (container.hasChildNodes()) {
|
179 |
-
container = container.firstChild;
|
180 |
-
}
|
181 |
-
} else {
|
182 |
-
// If not then the caret is at the last position in it's container and the caret container should be inserted after the noneditable element
|
183 |
-
return !left ? element : null;
|
184 |
-
}
|
185 |
-
}
|
186 |
-
|
187 |
-
// Walk left/right to look for contents
|
188 |
-
walker = new TreeWalker(container, element);
|
189 |
-
while (node = walker[left ? 'prev' : 'next']()) {
|
190 |
-
if (node.nodeType === 3 && node.nodeValue.length > 0) {
|
191 |
-
return;
|
192 |
-
} else if (getContentEditable(node) === "true") {
|
193 |
-
// Found contentEditable=true element return this one to we can move the caret inside it
|
194 |
-
return node;
|
195 |
-
}
|
196 |
-
}
|
197 |
-
|
198 |
-
return element;
|
199 |
-
};
|
200 |
-
|
201 |
-
// Remove any existing caret containers
|
202 |
-
removeCaretContainer();
|
203 |
-
|
204 |
-
// Get noneditable start/end elements
|
205 |
-
isCollapsed = selection.isCollapsed();
|
206 |
-
nonEditableStart = getNonEditableParent(selection.getStart());
|
207 |
-
nonEditableEnd = getNonEditableParent(selection.getEnd());
|
208 |
-
|
209 |
-
// Is any fo the range endpoints noneditable
|
210 |
-
if (nonEditableStart || nonEditableEnd) {
|
211 |
-
rng = selection.getRng(true);
|
212 |
-
|
213 |
-
// If it's a caret selection then look left/right to see if we need to move the caret out side or expand
|
214 |
-
if (isCollapsed) {
|
215 |
-
nonEditableStart = nonEditableStart || nonEditableEnd;
|
216 |
-
var start = selection.getStart();
|
217 |
-
if (element = hasSideContent(nonEditableStart, true)) {
|
218 |
-
// We have no contents to the left of the caret then insert a caret container before the noneditable element
|
219 |
-
insertCaretContainerOrExpandToBlock(element, true);
|
220 |
-
} else if (element = hasSideContent(nonEditableStart, false)) {
|
221 |
-
// We have no contents to the right of the caret then insert a caret container after the noneditable element
|
222 |
-
insertCaretContainerOrExpandToBlock(element, false);
|
223 |
-
} else {
|
224 |
-
// We are in the middle of a noneditable so expand to select it
|
225 |
-
selection.select(nonEditableStart);
|
226 |
-
}
|
227 |
-
} else {
|
228 |
-
rng = selection.getRng(true);
|
229 |
-
|
230 |
-
// Expand selection to include start non editable element
|
231 |
-
if (nonEditableStart) {
|
232 |
-
rng.setStartBefore(nonEditableStart);
|
233 |
-
}
|
234 |
-
|
235 |
-
// Expand selection to include end non editable element
|
236 |
-
if (nonEditableEnd) {
|
237 |
-
rng.setEndAfter(nonEditableEnd);
|
238 |
-
}
|
239 |
-
|
240 |
-
selection.setRng(rng);
|
241 |
-
}
|
242 |
-
}
|
243 |
-
};
|
244 |
-
|
245 |
-
function handleKey(ed, e) {
|
246 |
-
var keyCode = e.keyCode, nonEditableParent, caretContainer, startElement, endElement;
|
247 |
-
|
248 |
-
function getNonEmptyTextNodeSibling(node, prev) {
|
249 |
-
while (node = node[prev ? 'previousSibling' : 'nextSibling']) {
|
250 |
-
if (node.nodeType !== 3 || node.nodeValue.length > 0) {
|
251 |
-
return node;
|
252 |
-
}
|
253 |
-
}
|
254 |
-
};
|
255 |
-
|
256 |
-
function positionCaretOnElement(element, start) {
|
257 |
-
selection.select(element);
|
258 |
-
selection.collapse(start);
|
259 |
-
}
|
260 |
-
|
261 |
-
function canDelete(backspace) {
|
262 |
-
var rng, container, offset, nonEditableParent;
|
263 |
-
|
264 |
-
function removeNodeIfNotParent(node) {
|
265 |
-
var parent = container;
|
266 |
-
|
267 |
-
while (parent) {
|
268 |
-
if (parent === node) {
|
269 |
-
return;
|
270 |
-
}
|
271 |
-
|
272 |
-
parent = parent.parentNode;
|
273 |
-
}
|
274 |
-
|
275 |
-
dom.remove(node);
|
276 |
-
moveSelection();
|
277 |
-
}
|
278 |
-
|
279 |
-
function isNextPrevTreeNodeNonEditable() {
|
280 |
-
var node, walker, nonEmptyElements = ed.schema.getNonEmptyElements();
|
281 |
-
|
282 |
-
walker = new tinymce.dom.TreeWalker(container, ed.getBody());
|
283 |
-
while (node = (backspace ? walker.prev() : walker.next())) {
|
284 |
-
// Found IMG/INPUT etc
|
285 |
-
if (nonEmptyElements[node.nodeName.toLowerCase()]) {
|
286 |
-
break;
|
287 |
-
}
|
288 |
-
|
289 |
-
// Found text node with contents
|
290 |
-
if (node.nodeType === 3 && tinymce.trim(node.nodeValue).length > 0) {
|
291 |
-
break;
|
292 |
-
}
|
293 |
-
|
294 |
-
// Found non editable node
|
295 |
-
if (getContentEditable(node) === "false") {
|
296 |
-
removeNodeIfNotParent(node);
|
297 |
-
return true;
|
298 |
-
}
|
299 |
-
}
|
300 |
-
|
301 |
-
// Check if the content node is within a non editable parent
|
302 |
-
if (getNonEditableParent(node)) {
|
303 |
-
return true;
|
304 |
-
}
|
305 |
-
|
306 |
-
return false;
|
307 |
-
}
|
308 |
-
|
309 |
-
if (selection.isCollapsed()) {
|
310 |
-
rng = selection.getRng(true);
|
311 |
-
container = rng.startContainer;
|
312 |
-
offset = rng.startOffset;
|
313 |
-
container = getParentCaretContainer(container) || container;
|
314 |
-
|
315 |
-
// Is in noneditable parent
|
316 |
-
if (nonEditableParent = getNonEditableParent(container)) {
|
317 |
-
removeNodeIfNotParent(nonEditableParent);
|
318 |
-
return false;
|
319 |
-
}
|
320 |
-
|
321 |
-
// Check if the caret is in the middle of a text node
|
322 |
-
if (container.nodeType == 3 && (backspace ? offset > 0 : offset < container.nodeValue.length)) {
|
323 |
-
return true;
|
324 |
-
}
|
325 |
-
|
326 |
-
// Resolve container index
|
327 |
-
if (container.nodeType == 1) {
|
328 |
-
container = container.childNodes[offset] || container;
|
329 |
-
}
|
330 |
-
|
331 |
-
// Check if previous or next tree node is non editable then block the event
|
332 |
-
if (isNextPrevTreeNodeNonEditable()) {
|
333 |
-
return false;
|
334 |
-
}
|
335 |
-
}
|
336 |
-
|
337 |
-
return true;
|
338 |
-
}
|
339 |
-
|
340 |
-
startElement = selection.getStart()
|
341 |
-
endElement = selection.getEnd();
|
342 |
-
|
343 |
-
// Disable all key presses in contentEditable=false except delete or backspace
|
344 |
-
nonEditableParent = getNonEditableParent(startElement) || getNonEditableParent(endElement);
|
345 |
-
if (nonEditableParent && (keyCode < 112 || keyCode > 124) && keyCode != VK.DELETE && keyCode != VK.BACKSPACE) {
|
346 |
-
// Is Ctrl+c, Ctrl+v or Ctrl+x then use default browser behavior
|
347 |
-
if ((tinymce.isMac ? e.metaKey : e.ctrlKey) && (keyCode == 67 || keyCode == 88 || keyCode == 86)) {
|
348 |
-
return;
|
349 |
-
}
|
350 |
-
|
351 |
-
e.preventDefault();
|
352 |
-
|
353 |
-
// Arrow left/right select the element and collapse left/right
|
354 |
-
if (keyCode == VK.LEFT || keyCode == VK.RIGHT) {
|
355 |
-
var left = keyCode == VK.LEFT;
|
356 |
-
// If a block element find previous or next element to position the caret
|
357 |
-
if (ed.dom.isBlock(nonEditableParent)) {
|
358 |
-
var targetElement = left ? nonEditableParent.previousSibling : nonEditableParent.nextSibling;
|
359 |
-
var walker = new TreeWalker(targetElement, targetElement);
|
360 |
-
var caretElement = left ? walker.prev() : walker.next();
|
361 |
-
positionCaretOnElement(caretElement, !left);
|
362 |
-
} else {
|
363 |
-
positionCaretOnElement(nonEditableParent, left);
|
364 |
-
}
|
365 |
-
}
|
366 |
-
} else {
|
367 |
-
// Is arrow left/right, backspace or delete
|
368 |
-
if (keyCode == VK.LEFT || keyCode == VK.RIGHT || keyCode == VK.BACKSPACE || keyCode == VK.DELETE) {
|
369 |
-
caretContainer = getParentCaretContainer(startElement);
|
370 |
-
if (caretContainer) {
|
371 |
-
// Arrow left or backspace
|
372 |
-
if (keyCode == VK.LEFT || keyCode == VK.BACKSPACE) {
|
373 |
-
nonEditableParent = getNonEmptyTextNodeSibling(caretContainer, true);
|
374 |
-
|
375 |
-
if (nonEditableParent && getContentEditable(nonEditableParent) === "false") {
|
376 |
-
e.preventDefault();
|
377 |
-
|
378 |
-
if (keyCode == VK.LEFT) {
|
379 |
-
positionCaretOnElement(nonEditableParent, true);
|
380 |
-
} else {
|
381 |
-
dom.remove(nonEditableParent);
|
382 |
-
return;
|
383 |
-
}
|
384 |
-
} else {
|
385 |
-
removeCaretContainer(caretContainer);
|
386 |
-
}
|
387 |
-
}
|
388 |
-
|
389 |
-
// Arrow right or delete
|
390 |
-
if (keyCode == VK.RIGHT || keyCode == VK.DELETE) {
|
391 |
-
nonEditableParent = getNonEmptyTextNodeSibling(caretContainer);
|
392 |
-
|
393 |
-
if (nonEditableParent && getContentEditable(nonEditableParent) === "false") {
|
394 |
-
e.preventDefault();
|
395 |
-
|
396 |
-
if (keyCode == VK.RIGHT) {
|
397 |
-
positionCaretOnElement(nonEditableParent, false);
|
398 |
-
} else {
|
399 |
-
dom.remove(nonEditableParent);
|
400 |
-
return;
|
401 |
-
}
|
402 |
-
} else {
|
403 |
-
removeCaretContainer(caretContainer);
|
404 |
-
}
|
405 |
-
}
|
406 |
-
}
|
407 |
-
|
408 |
-
if ((keyCode == VK.BACKSPACE || keyCode == VK.DELETE) && !canDelete(keyCode == VK.BACKSPACE)) {
|
409 |
-
e.preventDefault();
|
410 |
-
return false;
|
411 |
-
}
|
412 |
-
}
|
413 |
-
}
|
414 |
-
};
|
415 |
-
|
416 |
-
ed.onMouseDown.addToTop(function(ed, e) {
|
417 |
-
var node = ed.selection.getNode();
|
418 |
-
|
419 |
-
if (getContentEditable(node) === "false" && node == e.target) {
|
420 |
-
// Expand selection on mouse down we can't block the default event since it's used for drag/drop
|
421 |
-
moveSelection();
|
422 |
-
}
|
423 |
-
});
|
424 |
-
|
425 |
-
ed.onMouseUp.addToTop(moveSelection);
|
426 |
-
ed.onKeyDown.addToTop(handleKey);
|
427 |
-
ed.onKeyUp.addToTop(moveSelection);
|
428 |
-
};
|
429 |
-
|
430 |
-
tinymce.create('tinymce.plugins.NonEditablePlugin', {
|
431 |
-
init : function(ed, url) {
|
432 |
-
var editClass, nonEditClass, nonEditableRegExps;
|
433 |
-
|
434 |
-
// Converts configured regexps to noneditable span items
|
435 |
-
function convertRegExpsToNonEditable(ed, args) {
|
436 |
-
var i = nonEditableRegExps.length, content = args.content, cls = tinymce.trim(nonEditClass);
|
437 |
-
|
438 |
-
// Don't replace the variables when raw is used for example on undo/redo
|
439 |
-
if (args.format == "raw") {
|
440 |
-
return;
|
441 |
-
}
|
442 |
-
|
443 |
-
while (i--) {
|
444 |
-
content = content.replace(nonEditableRegExps[i], function(match) {
|
445 |
-
var args = arguments, index = args[args.length - 2];
|
446 |
-
|
447 |
-
// Is value inside an attribute then don't replace
|
448 |
-
if (index > 0 && content.charAt(index - 1) == '"') {
|
449 |
-
return match;
|
450 |
-
}
|
451 |
-
|
452 |
-
return '<span class="' + cls + '" data-mce-content="' + ed.dom.encode(args[0]) + '">' + ed.dom.encode(typeof(args[1]) === "string" ? args[1] : args[0]) + '</span>';
|
453 |
-
});
|
454 |
-
}
|
455 |
-
|
456 |
-
args.content = content;
|
457 |
-
};
|
458 |
-
|
459 |
-
editClass = " " + tinymce.trim(ed.getParam("noneditable_editable_class", "mceEditable")) + " ";
|
460 |
-
nonEditClass = " " + tinymce.trim(ed.getParam("noneditable_noneditable_class", "mceNonEditable")) + " ";
|
461 |
-
|
462 |
-
// Setup noneditable regexps array
|
463 |
-
nonEditableRegExps = ed.getParam("noneditable_regexp");
|
464 |
-
if (nonEditableRegExps && !nonEditableRegExps.length) {
|
465 |
-
nonEditableRegExps = [nonEditableRegExps];
|
466 |
-
}
|
467 |
-
|
468 |
-
ed.onPreInit.add(function() {
|
469 |
-
handleContentEditableSelection(ed);
|
470 |
-
|
471 |
-
if (nonEditableRegExps) {
|
472 |
-
ed.selection.onBeforeSetContent.add(convertRegExpsToNonEditable);
|
473 |
-
ed.onBeforeSetContent.add(convertRegExpsToNonEditable);
|
474 |
-
}
|
475 |
-
|
476 |
-
// Apply contentEditable true/false on elements with the noneditable/editable classes
|
477 |
-
ed.parser.addAttributeFilter('class', function(nodes) {
|
478 |
-
var i = nodes.length, className, node;
|
479 |
-
|
480 |
-
while (i--) {
|
481 |
-
node = nodes[i];
|
482 |
-
className = " " + node.attr("class") + " ";
|
483 |
-
|
484 |
-
if (className.indexOf(editClass) !== -1) {
|
485 |
-
node.attr(internalName, "true");
|
486 |
-
} else if (className.indexOf(nonEditClass) !== -1) {
|
487 |
-
node.attr(internalName, "false");
|
488 |
-
}
|
489 |
-
}
|
490 |
-
});
|
491 |
-
|
492 |
-
// Remove internal name
|
493 |
-
ed.serializer.addAttributeFilter(internalName, function(nodes, name) {
|
494 |
-
var i = nodes.length, node;
|
495 |
-
|
496 |
-
while (i--) {
|
497 |
-
node = nodes[i];
|
498 |
-
|
499 |
-
if (nonEditableRegExps && node.attr('data-mce-content')) {
|
500 |
-
node.name = "#text";
|
501 |
-
node.type = 3;
|
502 |
-
node.raw = true;
|
503 |
-
node.value = node.attr('data-mce-content');
|
504 |
-
} else {
|
505 |
-
node.attr(externalName, null);
|
506 |
-
node.attr(internalName, null);
|
507 |
-
}
|
508 |
-
}
|
509 |
-
});
|
510 |
-
|
511 |
-
// Convert external name into internal name
|
512 |
-
ed.parser.addAttributeFilter(externalName, function(nodes, name) {
|
513 |
-
var i = nodes.length, node;
|
514 |
-
|
515 |
-
while (i--) {
|
516 |
-
node = nodes[i];
|
517 |
-
node.attr(internalName, node.attr(externalName));
|
518 |
-
node.attr(externalName, null);
|
519 |
-
}
|
520 |
-
});
|
521 |
-
});
|
522 |
-
},
|
523 |
-
|
524 |
-
getInfo : function() {
|
525 |
-
return {
|
526 |
-
longname : 'Non editable elements',
|
527 |
-
author : 'Moxiecode Systems AB',
|
528 |
-
authorurl : 'http://tinymce.moxiecode.com',
|
529 |
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable',
|
530 |
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
531 |
-
};
|
532 |
-
}
|
533 |
-
});
|
534 |
-
|
535 |
-
// Register plugin
|
536 |
-
tinymce.PluginManager.add('noneditable', tinymce.plugins.NonEditablePlugin);
|
537 |
-
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/table/cell.htm
DELETED
@@ -1,180 +0,0 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#table_dlg.cell_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
8 |
-
<script type="text/javascript" src="../../utils/validate.js"></script>
|
9 |
-
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
10 |
-
<script type="text/javascript" src="js/cell.js"></script>
|
11 |
-
<link href="css/cell.css" rel="stylesheet" type="text/css" />
|
12 |
-
</head>
|
13 |
-
<body id="tablecell" style="display: none" role="application">
|
14 |
-
<form onsubmit="updateAction();return false;" action="#">
|
15 |
-
<div class="tabs">
|
16 |
-
<ul>
|
17 |
-
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
18 |
-
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
19 |
-
</ul>
|
20 |
-
</div>
|
21 |
-
|
22 |
-
<div class="panel_wrapper">
|
23 |
-
<div id="general_panel" class="panel current">
|
24 |
-
<fieldset>
|
25 |
-
<legend>{#table_dlg.general_props}</legend>
|
26 |
-
|
27 |
-
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
28 |
-
<tr>
|
29 |
-
<td><label for="align">{#table_dlg.align}</label></td>
|
30 |
-
<td>
|
31 |
-
<select id="align" name="align" class="mceFocus">
|
32 |
-
<option value="">{#not_set}</option>
|
33 |
-
<option value="center">{#table_dlg.align_middle}</option>
|
34 |
-
<option value="left">{#table_dlg.align_left}</option>
|
35 |
-
<option value="right">{#table_dlg.align_right}</option>
|
36 |
-
</select>
|
37 |
-
</td>
|
38 |
-
|
39 |
-
<td><label for="celltype">{#table_dlg.cell_type}</label></td>
|
40 |
-
<td>
|
41 |
-
<select id="celltype" name="celltype">
|
42 |
-
<option value="td">{#table_dlg.td}</option>
|
43 |
-
<option value="th">{#table_dlg.th}</option>
|
44 |
-
</select>
|
45 |
-
</td>
|
46 |
-
</tr>
|
47 |
-
|
48 |
-
<tr>
|
49 |
-
<td><label for="valign">{#table_dlg.valign}</label></td>
|
50 |
-
<td>
|
51 |
-
<select id="valign" name="valign">
|
52 |
-
<option value="">{#not_set}</option>
|
53 |
-
<option value="top">{#table_dlg.align_top}</option>
|
54 |
-
<option value="middle">{#table_dlg.align_middle}</option>
|
55 |
-
<option value="bottom">{#table_dlg.align_bottom}</option>
|
56 |
-
</select>
|
57 |
-
</td>
|
58 |
-
|
59 |
-
<td><label for="scope">{#table_dlg.scope}</label></td>
|
60 |
-
<td>
|
61 |
-
<select id="scope" name="scope">
|
62 |
-
<option value="">{#not_set}</option>
|
63 |
-
<option value="col">{#table.col}</option>
|
64 |
-
<option value="row">{#table.row}</option>
|
65 |
-
<option value="rowgroup">{#table_dlg.rowgroup}</option>
|
66 |
-
<option value="colgroup">{#table_dlg.colgroup}</option>
|
67 |
-
</select>
|
68 |
-
</td>
|
69 |
-
|
70 |
-
</tr>
|
71 |
-
|
72 |
-
<tr>
|
73 |
-
<td><label for="width">{#table_dlg.width}</label></td>
|
74 |
-
<td><input id="width" name="width" type="text" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
|
75 |
-
|
76 |
-
<td><label for="height">{#table_dlg.height}</label></td>
|
77 |
-
<td><input id="height" name="height" type="text" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
|
78 |
-
</tr>
|
79 |
-
|
80 |
-
<tr id="styleSelectRow">
|
81 |
-
<td><label for="class">{#class_name}</label></td>
|
82 |
-
<td colspan="3">
|
83 |
-
<select id="class" name="class" class="mceEditableSelect">
|
84 |
-
<option value="" selected="selected">{#not_set}</option>
|
85 |
-
</select>
|
86 |
-
</td>
|
87 |
-
</tr>
|
88 |
-
</table>
|
89 |
-
</fieldset>
|
90 |
-
</div>
|
91 |
-
|
92 |
-
<div id="advanced_panel" class="panel">
|
93 |
-
<fieldset>
|
94 |
-
<legend>{#table_dlg.advanced_props}</legend>
|
95 |
-
|
96 |
-
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
|
97 |
-
<tr>
|
98 |
-
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
99 |
-
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
|
100 |
-
</tr>
|
101 |
-
|
102 |
-
<tr>
|
103 |
-
<td><label for="style">{#table_dlg.style}</label></td>
|
104 |
-
<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
|
105 |
-
</tr>
|
106 |
-
|
107 |
-
<tr>
|
108 |
-
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
109 |
-
<td>
|
110 |
-
<select id="dir" name="dir" style="width: 200px">
|
111 |
-
<option value="">{#not_set}</option>
|
112 |
-
<option value="ltr">{#table_dlg.ltr}</option>
|
113 |
-
<option value="rtl">{#table_dlg.rtl}</option>
|
114 |
-
</select>
|
115 |
-
</td>
|
116 |
-
</tr>
|
117 |
-
|
118 |
-
<tr>
|
119 |
-
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
|
120 |
-
<td>
|
121 |
-
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
|
122 |
-
</td>
|
123 |
-
</tr>
|
124 |
-
|
125 |
-
<tr>
|
126 |
-
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
127 |
-
<td>
|
128 |
-
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
129 |
-
<tr>
|
130 |
-
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
|
131 |
-
<td id="backgroundimagebrowsercontainer"> </td>
|
132 |
-
</tr>
|
133 |
-
</table>
|
134 |
-
</td>
|
135 |
-
</tr>
|
136 |
-
|
137 |
-
<tr role="group" aria-labelledby="bordercolor_label">
|
138 |
-
<td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>
|
139 |
-
<td>
|
140 |
-
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
141 |
-
<tr>
|
142 |
-
<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
|
143 |
-
<td id="bordercolor_pickcontainer"> </td>
|
144 |
-
</tr>
|
145 |
-
</table>
|
146 |
-
</td>
|
147 |
-
</tr>
|
148 |
-
|
149 |
-
<tr role="group" aria-labelledby="bgcolor_label">
|
150 |
-
<td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>
|
151 |
-
<td>
|
152 |
-
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
153 |
-
<tr>
|
154 |
-
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
155 |
-
<td id="bgcolor_pickcontainer"> </td>
|
156 |
-
</tr>
|
157 |
-
</table>
|
158 |
-
</td>
|
159 |
-
</tr>
|
160 |
-
</table>
|
161 |
-
</fieldset>
|
162 |
-
</div>
|
163 |
-
</div>
|
164 |
-
|
165 |
-
<div class="mceActionPanel">
|
166 |
-
<div>
|
167 |
-
<select id="action" name="action">
|
168 |
-
<option value="cell">{#table_dlg.cell_cell}</option>
|
169 |
-
<option value="row">{#table_dlg.cell_row}</option>
|
170 |
-
<option value="col">{#table_dlg.cell_col}</option>
|
171 |
-
<option value="all">{#table_dlg.cell_all}</option>
|
172 |
-
</select>
|
173 |
-
</div>
|
174 |
-
|
175 |
-
<input type="submit" id="insert" name="insert" value="{#update}" />
|
176 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
177 |
-
</div>
|
178 |
-
</form>
|
179 |
-
</body>
|
180 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/table/css/cell.css
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
/* CSS file for cell dialog in the table plugin */
|
2 |
-
|
3 |
-
.panel_wrapper div.current {
|
4 |
-
height: 200px;
|
5 |
-
}
|
6 |
-
|
7 |
-
.advfield {
|
8 |
-
width: 200px;
|
9 |
-
}
|
10 |
-
|
11 |
-
#action {
|
12 |
-
margin-bottom: 3px;
|
13 |
-
}
|
14 |
-
|
15 |
-
#class {
|
16 |
-
width: 150px;
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/table/css/row.css
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
/* CSS file for row dialog in the table plugin */
|
2 |
-
|
3 |
-
.panel_wrapper div.current {
|
4 |
-
height: 200px;
|
5 |
-
}
|
6 |
-
|
7 |
-
.advfield {
|
8 |
-
width: 200px;
|
9 |
-
}
|
10 |
-
|
11 |
-
#action {
|
12 |
-
margin-bottom: 3px;
|
13 |
-
}
|
14 |
-
|
15 |
-
#rowtype,#align,#valign,#class,#height {
|
16 |
-
width: 150px;
|
17 |
-
}
|
18 |
-
|
19 |
-
#height {
|
20 |
-
width: 50px;
|
21 |
-
}
|
22 |
-
|
23 |
-
.col2 {
|
24 |
-
padding-left: 20px;
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/table/css/table.css
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
/* CSS file for table dialog in the table plugin */
|
2 |
-
|
3 |
-
.panel_wrapper div.current {
|
4 |
-
height: 245px;
|
5 |
-
}
|
6 |
-
|
7 |
-
.advfield {
|
8 |
-
width: 200px;
|
9 |
-
}
|
10 |
-
|
11 |
-
#class {
|
12 |
-
width: 150px;
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/table/editor_plugin.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T<Q+U;T++){if(!g[T]){g[T]=[]}for(S=R;S<R+V;S++){g[T][S]={part:N,real:T==Q&&S==R,elm:W,rowspan:U,colspan:V}}}})});M+=O.length})}function z(M,O){var N;N=g[O];if(N){return N[M]}}function s(O,M,N){if(O){N=parseInt(N);if(N===1){O.removeAttribute(M,1)}else{O.setAttribute(M,N,1)}}}function j(M){return M&&(G.hasClass(M.elm,"mceSelected")||M==o)}function k(){var M=[];e(H.rows,function(N){e(N.cells,function(O){if(G.hasClass(O,"mceSelected")||O==o.elm){M.push(N);return false}})});return M}function r(){var M=G.createRng();M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H)}function f(M){var N;d.walk(M,function(P){var O;if(P.nodeType==3){e(G.getParents(P.parentNode,null,M).reverse(),function(Q){Q=A(Q,false);if(!N){N=O=Q}else{if(O){O.appendChild(Q)}}O=Q});if(O){O.innerHTML=d.isIE?" ":'<br data-mce-bogus="1" />'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE){M.innerHTML='<br data-mce-bogus="1" />'}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q<S-1;Q++){G.insertAfter(f(P),P)}u(O,N,R-1,S)}}})})}function p(V,S,Y){var P,O,X,W,U,R,T,M,V,N,Q;if(V){pos=F(V);P=pos.x;O=pos.y;X=P+(S-1);W=O+(Y-1)}else{L=D=null;e(g,function(Z,aa){e(Z,function(ac,ab){if(j(ac)){if(!L){L={x:ab,y:aa}}D={x:ab,y:aa}}})});P=L.x;O=L.y;X=D.x;W=D.y}T=z(P,O);M=z(X,W);if(T&&M&&T.part==M.part){C();t();T=z(P,O).elm;s(T,"colSpan",(X-P)+1);s(T,"rowSpan",(W-O)+1);for(R=O;R<=W;R++){for(U=P;U<=X;U++){if(!g[R]||!g[R][U]){continue}V=g[R][U].elm;if(V!=T){N=d.grep(V.childNodes);e(N,function(Z){T.appendChild(Z)});if(N.length){N=d.grep(T.childNodes);Q=0;e(N,function(Z){if(Z.nodeName=="BR"&&G.getAttrib(Z,"data-mce-bogus")&&Q++<N.length-1){T.removeChild(Z)}})}G.remove(V)}}}q()}}function l(Q){var M,S,P,R,T,U,N,V,O;e(g,function(W,X){e(W,function(Z,Y){if(j(Z)){Z=Z.elm;T=Z.parentNode;U=A(T,false);M=X;if(Q){return false}}});if(Q){return !M}});for(R=0;R<g[0].length;R++){if(!g[M][R]){continue}S=g[M][R].elm;if(S!=P){if(!Q){O=a(S,"rowspan");if(O>1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;i<S;i++){R=T.cells[i];s(R,"colSpan",1);s(R,"rowSpan",1)}for(i=S;i<Q;i++){T.appendChild(f(T.cells[S-1]))}for(i=Q;i<S;i++){G.remove(T.cells[i])}if(N){M.parentNode.insertBefore(T,M)}else{G.insertAfter(T,M)}});G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected")}function F(M){var N;e(g,function(O,P){e(O,function(R,Q){if(R.elm==M){N={x:Q,y:P};return false}});return !N});return N}function w(M){L=F(M)}function I(){var O,N,M;N=M=0;e(g,function(P,Q){e(P,function(S,R){var U,T;if(j(S)){S=g[Q][R];if(R>N){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)<P){P-=S.colspan-1}}}for(x=P;x<=N;x++){S=g[O][x];if(!S.real){if(O-(S.rowspan-1)<O){O-=S.rowspan-1}}}for(y=O;y<=T;y++){for(x=P;x<=U;x++){S=g[y][x];if(S.real){Q=S.colspan-1;R=S.rowspan-1;if(Q){if(x+Q>N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){var T=S&&S[R?"lastChild":"firstChild"];return T&&T.nodeName==="BR"?C.dom.getParent(T,"td,th"):T}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){if(r.settings.forced_root_block){r.dom.add(r.getBody(),r.settings.forced_root_block,null,d.isIE?" ":'<br data-mce-bogus="1" />')}else{r.dom.add(r.getBody(),"br",{"data-mce-bogus":"1"})}}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&(z.nodeName=="BR"||(z.childNodes.length==1&&(z.firstChild.nodeName=="BR"||z.firstChild.nodeValue=="\u00a0")))&&z.previousSibling&&z.previousSibling.nodeName=="TABLE"){w.dom.remove(z)}});s();r.startContent=r.getContent({format:"raw"})});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce);
|
|
tiny_mce/plugins/table/editor_plugin_src.js
DELETED
@@ -1,1452 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* editor_plugin_src.js
|
3 |
-
*
|
4 |
-
* Copyright 2009, Moxiecode Systems AB
|
5 |
-
* Released under LGPL License.
|
6 |
-
*
|
7 |
-
* License: http://tinymce.moxiecode.com/license
|
8 |
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9 |
-
*/
|
10 |
-
|
11 |
-
(function(tinymce) {
|
12 |
-
var each = tinymce.each;
|
13 |
-
|
14 |
-
// Checks if the selection/caret is at the start of the specified block element
|
15 |
-
function isAtStart(rng, par) {
|
16 |
-
var doc = par.ownerDocument, rng2 = doc.createRange(), elm;
|
17 |
-
|
18 |
-
rng2.setStartBefore(par);
|
19 |
-
rng2.setEnd(rng.endContainer, rng.endOffset);
|
20 |
-
|
21 |
-
elm = doc.createElement('body');
|
22 |
-
elm.appendChild(rng2.cloneContents());
|
23 |
-
|
24 |
-
// Check for text characters of other elements that should be treated as content
|
25 |
-
return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0;
|
26 |
-
};
|
27 |
-
|
28 |
-
function getSpanVal(td, name) {
|
29 |
-
return parseInt(td.getAttribute(name) || 1);
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Table Grid class.
|
34 |
-
*/
|
35 |
-
function TableGrid(table, dom, selection) {
|
36 |
-
var grid, startPos, endPos, selectedCell;
|
37 |
-
|
38 |
-
buildGrid();
|
39 |
-
selectedCell = dom.getParent(selection.getStart(), 'th,td');
|
40 |
-
if (selectedCell) {
|
41 |
-
startPos = getPos(selectedCell);
|
42 |
-
endPos = findEndPos();
|
43 |
-
selectedCell = getCell(startPos.x, startPos.y);
|
44 |
-
}
|
45 |
-
|
46 |
-
function cloneNode(node, children) {
|
47 |
-
node = node.cloneNode(children);
|
48 |
-
node.removeAttribute('id');
|
49 |
-
|
50 |
-
return node;
|
51 |
-
}
|
52 |
-
|
53 |
-
function buildGrid() {
|
54 |
-
var startY = 0;
|
55 |
-
|
56 |
-
grid = [];
|
57 |
-
|
58 |
-
each(['thead', 'tbody', 'tfoot'], function(part) {
|
59 |
-
var rows = dom.select('> ' + part + ' tr', table);
|
60 |
-
|
61 |
-
each(rows, function(tr, y) {
|
62 |
-
y += startY;
|
63 |
-
|
64 |
-
each(dom.select('> td, > th', tr), function(td, x) {
|
65 |
-
var x2, y2, rowspan, colspan;
|
66 |
-
|
67 |
-
// Skip over existing cells produced by rowspan
|
68 |
-
if (grid[y]) {
|
69 |
-
while (grid[y][x])
|
70 |
-
x++;
|
71 |
-
}
|
72 |
-
|
73 |
-
// Get col/rowspan from cell
|
74 |
-
rowspan = getSpanVal(td, 'rowspan');
|
75 |
-
colspan = getSpanVal(td, 'colspan');
|
76 |
-
|
77 |
-
// Fill out rowspan/colspan right and down
|
78 |
-
for (y2 = y; y2 < y + rowspan; y2++) {
|
79 |
-
if (!grid[y2])
|
80 |
-
grid[y2] = [];
|
81 |
-
|
82 |
-
for (x2 = x; x2 < x + colspan; x2++) {
|
83 |
-
grid[y2][x2] = {
|
84 |
-
part : part,
|
85 |
-
real : y2 == y && x2 == x,
|
86 |
-
elm : td,
|
87 |
-
rowspan : rowspan,
|
88 |
-
colspan : colspan
|
89 |
-
};
|
90 |
-
}
|
91 |
-
}
|
92 |
-
});
|
93 |
-
});
|
94 |
-
|
95 |
-
startY += rows.length;
|
96 |
-
});
|
97 |
-
};
|
98 |
-
|
99 |
-
function getCell(x, y) {
|
100 |
-
var row;
|
101 |
-
|
102 |
-
row = grid[y];
|
103 |
-
if (row)
|
104 |
-
return row[x];
|
105 |
-
};
|
106 |
-
|
107 |
-
function setSpanVal(td, name, val) {
|
108 |
-
if (td) {
|
109 |
-
val = parseInt(val);
|
110 |
-
|
111 |
-
if (val === 1)
|
112 |
-
td.removeAttribute(name, 1);
|
113 |
-
else
|
114 |
-
td.setAttribute(name, val, 1);
|
115 |
-
}
|
116 |
-
}
|
117 |
-
|
118 |
-
function isCellSelected(cell) {
|
119 |
-
return cell && (dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell);
|
120 |
-
};
|
121 |
-
|
122 |
-
function getSelectedRows() {
|
123 |
-
var rows = [];
|
124 |
-
|
125 |
-
each(table.rows, function(row) {
|
126 |
-
each(row.cells, function(cell) {
|
127 |
-
if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) {
|
128 |
-
rows.push(row);
|
129 |
-
return false;
|
130 |
-
}
|
131 |
-
});
|
132 |
-
});
|
133 |
-
|
134 |
-
return rows;
|
135 |
-
};
|
136 |
-
|
137 |
-
function deleteTable() {
|
138 |
-
var rng = dom.createRng();
|
139 |
-
|
140 |
-
rng.setStartAfter(table);
|
141 |
-
rng.setEndAfter(table);
|
142 |
-
|
143 |
-
selection.setRng(rng);
|
144 |
-
|
145 |
-
dom.remove(table);
|
146 |
-
};
|
147 |
-
|
148 |
-
function cloneCell(cell) {
|
149 |
-
var formatNode;
|
150 |
-
|
151 |
-
// Clone formats
|
152 |
-
tinymce.walk(cell, function(node) {
|
153 |
-
var curNode;
|
154 |
-
|
155 |
-
if (node.nodeType == 3) {
|
156 |
-
each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) {
|
157 |
-
node = cloneNode(node, false);
|
158 |
-
|
159 |
-
if (!formatNode)
|
160 |
-
formatNode = curNode = node;
|
161 |
-
else if (curNode)
|
162 |
-
curNode.appendChild(node);
|
163 |
-
|
164 |
-
curNode = node;
|
165 |
-
});
|
166 |
-
|
167 |
-
// Add something to the inner node
|
168 |
-
if (curNode)
|
169 |
-
curNode.innerHTML = tinymce.isIE ? ' ' : '<br data-mce-bogus="1" />';
|
170 |
-
|
171 |
-
return false;
|
172 |
-
}
|
173 |
-
}, 'childNodes');
|
174 |
-
|
175 |
-
cell = cloneNode(cell, false);
|
176 |
-
setSpanVal(cell, 'rowSpan', 1);
|
177 |
-
setSpanVal(cell, 'colSpan', 1);
|
178 |
-
|
179 |
-
if (formatNode) {
|
180 |
-
cell.appendChild(formatNode);
|
181 |
-
} else {
|
182 |
-
if (!tinymce.isIE)
|
183 |
-
cell.innerHTML = '<br data-mce-bogus="1" />';
|
184 |
-
}
|
185 |
-
|
186 |
-
return cell;
|
187 |
-
};
|
188 |
-
|
189 |
-
function cleanup() {
|
190 |
-
var rng = dom.createRng();
|
191 |
-
|
192 |
-
// Empty rows
|
193 |
-
each(dom.select('tr', table), function(tr) {
|
194 |
-
if (tr.cells.length == 0)
|
195 |
-
dom.remove(tr);
|
196 |
-
});
|
197 |
-
|
198 |
-
// Empty table
|
199 |
-
if (dom.select('tr', table).length == 0) {
|
200 |
-
rng.setStartAfter(table);
|
201 |
-
rng.setEndAfter(table);
|
202 |
-
selection.setRng(rng);
|
203 |
-
dom.remove(table);
|
204 |
-
return;
|
205 |
-
}
|
206 |
-
|
207 |
-
// Empty header/body/footer
|
208 |
-
each(dom.select('thead,tbody,tfoot', table), function(part) {
|
209 |
-
if (part.rows.length == 0)
|
210 |
-
dom.remove(part);
|
211 |
-
});
|
212 |
-
|
213 |
-
// Restore selection to start position if it still exists
|
214 |
-
buildGrid();
|
215 |
-
|
216 |
-
// Restore the selection to the closest table position
|
217 |
-
row = grid[Math.min(grid.length - 1, startPos.y)];
|
218 |
-
if (row) {
|
219 |
-
selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true);
|
220 |
-
selection.collapse(true);
|
221 |
-
}
|
222 |
-
};
|
223 |
-
|
224 |
-
function fillLeftDown(x, y, rows, cols) {
|
225 |
-
var tr, x2, r, c, cell;
|
226 |
-
|
227 |
-
tr = grid[y][x].elm.parentNode;
|
228 |
-
for (r = 1; r <= rows; r++) {
|
229 |
-
tr = dom.getNext(tr, 'tr');
|
230 |
-
|
231 |
-
if (tr) {
|
232 |
-
// Loop left to find real cell
|
233 |
-
for (x2 = x; x2 >= 0; x2--) {
|
234 |
-
cell = grid[y + r][x2].elm;
|
235 |
-
|
236 |
-
if (cell.parentNode == tr) {
|
237 |
-
// Append clones after
|
238 |
-
for (c = 1; c <= cols; c++)
|
239 |
-
dom.insertAfter(cloneCell(cell), cell);
|
240 |
-
|
241 |
-
break;
|
242 |
-
}
|
243 |
-
}
|
244 |
-
|
245 |
-
if (x2 == -1) {
|
246 |
-
// Insert nodes before first cell
|
247 |
-
for (c = 1; c <= cols; c++)
|
248 |
-
tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]);
|
249 |
-
}
|
250 |
-
}
|
251 |
-
}
|
252 |
-
};
|
253 |
-
|
254 |
-
function split() {
|
255 |
-
each(grid, function(row, y) {
|
256 |
-
each(row, function(cell, x) {
|
257 |
-
var colSpan, rowSpan, newCell, i;
|
258 |
-
|
259 |
-
if (isCellSelected(cell)) {
|
260 |
-
cell = cell.elm;
|
261 |
-
colSpan = getSpanVal(cell, 'colspan');
|
262 |
-
rowSpan = getSpanVal(cell, 'rowspan');
|
263 |
-
|
264 |
-
if (colSpan > 1 || rowSpan > 1) {
|
265 |
-
setSpanVal(cell, 'rowSpan', 1);
|
266 |
-
setSpanVal(cell, 'colSpan', 1);
|
267 |
-
|
268 |
-
// Insert cells right
|
269 |
-
for (i = 0; i < colSpan - 1; i++)
|
270 |
-
dom.insertAfter(cloneCell(cell), cell);
|
271 |
-
|
272 |
-
fillLeftDown(x, y, rowSpan - 1, colSpan);
|
273 |
-
}
|
274 |
-
}
|
275 |
-
});
|
276 |
-
});
|
277 |
-
};
|
278 |
-
|
279 |
-
function merge(cell, cols, rows) {
|
280 |
-
var startX, startY, endX, endY, x, y, startCell, endCell, cell, children, count;
|
281 |
-
|
282 |
-
// Use specified cell and cols/rows
|
283 |
-
if (cell) {
|
284 |
-
pos = getPos(cell);
|
285 |
-
startX = pos.x;
|
286 |
-
startY = pos.y;
|
287 |
-
endX = startX + (cols - 1);
|
288 |
-
endY = startY + (rows - 1);
|
289 |
-
} else {
|
290 |
-
startPos = endPos = null;
|
291 |
-
|
292 |
-
// Calculate start/end pos by checking for selected cells in grid works better with context menu
|
293 |
-
each(grid, function(row, y) {
|
294 |
-
each(row, function(cell, x) {
|
295 |
-
if (isCellSelected(cell)) {
|
296 |
-
if (!startPos) {
|
297 |
-
startPos = {x: x, y: y};
|
298 |
-
}
|
299 |
-
|
300 |
-
endPos = {x: x, y: y};
|
301 |
-
}
|
302 |
-
});
|
303 |
-
});
|
304 |
-
|
305 |
-
// Use selection
|
306 |
-
startX = startPos.x;
|
307 |
-
startY = startPos.y;
|
308 |
-
endX = endPos.x;
|
309 |
-
endY = endPos.y;
|
310 |
-
}
|
311 |
-
|
312 |
-
// Find start/end cells
|
313 |
-
startCell = getCell(startX, startY);
|
314 |
-
endCell = getCell(endX, endY);
|
315 |
-
|
316 |
-
// Check if the cells exists and if they are of the same part for example tbody = tbody
|
317 |
-
if (startCell && endCell && startCell.part == endCell.part) {
|
318 |
-
// Split and rebuild grid
|
319 |
-
split();
|
320 |
-
buildGrid();
|
321 |
-
|
322 |
-
// Set row/col span to start cell
|
323 |
-
startCell = getCell(startX, startY).elm;
|
324 |
-
setSpanVal(startCell, 'colSpan', (endX - startX) + 1);
|
325 |
-
setSpanVal(startCell, 'rowSpan', (endY - startY) + 1);
|
326 |
-
|
327 |
-
// Remove other cells and add it's contents to the start cell
|
328 |
-
for (y = startY; y <= endY; y++) {
|
329 |
-
for (x = startX; x <= endX; x++) {
|
330 |
-
if (!grid[y] || !grid[y][x])
|
331 |
-
continue;
|
332 |
-
|
333 |
-
cell = grid[y][x].elm;
|
334 |
-
|
335 |
-
if (cell != startCell) {
|
336 |
-
// Move children to startCell
|
337 |
-
children = tinymce.grep(cell.childNodes);
|
338 |
-
each(children, function(node) {
|
339 |
-
startCell.appendChild(node);
|
340 |
-
});
|
341 |
-
|
342 |
-
// Remove bogus nodes if there is children in the target cell
|
343 |
-
if (children.length) {
|
344 |
-
children = tinymce.grep(startCell.childNodes);
|
345 |
-
count = 0;
|
346 |
-
each(children, function(node) {
|
347 |
-
if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1)
|
348 |
-
startCell.removeChild(node);
|
349 |
-
});
|
350 |
-
}
|
351 |
-
|
352 |
-
// Remove cell
|
353 |
-
dom.remove(cell);
|
354 |
-
}
|
355 |
-
}
|
356 |
-
}
|
357 |
-
|
358 |
-
// Remove empty rows etc and restore caret location
|
359 |
-
cleanup();
|
360 |
-
}
|
361 |
-
};
|
362 |
-
|
363 |
-
function insertRow(before) {
|
364 |
-
var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan;
|
365 |
-
|
366 |
-
// Find first/last row
|
367 |
-
each(grid, function(row, y) {
|
368 |
-
each(row, function(cell, x) {
|
369 |
-
if (isCellSelected(cell)) {
|
370 |
-
cell = cell.elm;
|
371 |
-
rowElm = cell.parentNode;
|
372 |
-
newRow = cloneNode(rowElm, false);
|
373 |
-
posY = y;
|
374 |
-
|
375 |
-
if (before)
|
376 |
-
return false;
|
377 |
-
}
|
378 |
-
});
|
379 |
-
|
380 |
-
if (before)
|
381 |
-
return !posY;
|
382 |
-
});
|
383 |
-
|
384 |
-
for (x = 0; x < grid[0].length; x++) {
|
385 |
-
// Cell not found could be because of an invalid table structure
|
386 |
-
if (!grid[posY][x])
|
387 |
-
continue;
|
388 |
-
|
389 |
-
cell = grid[posY][x].elm;
|
390 |
-
|
391 |
-
if (cell != lastCell) {
|
392 |
-
if (!before) {
|
393 |
-
rowSpan = getSpanVal(cell, 'rowspan');
|
394 |
-
if (rowSpan > 1) {
|
395 |
-
setSpanVal(cell, 'rowSpan', rowSpan + 1);
|
396 |
-
continue;
|
397 |
-
}
|
398 |
-
} else {
|
399 |
-
// Check if cell above can be expanded
|
400 |
-
if (posY > 0 && grid[posY - 1][x]) {
|
401 |
-
otherCell = grid[posY - 1][x].elm;
|
402 |
-
rowSpan = getSpanVal(otherCell, 'rowSpan');
|
403 |
-
if (rowSpan > 1) {
|
404 |
-
setSpanVal(otherCell, 'rowSpan', rowSpan + 1);
|
405 |
-
continue;
|
406 |
-
}
|
407 |
-
}
|
408 |
-
}
|
409 |
-
|
410 |
-
// Insert new cell into new row
|
411 |
-
newCell = cloneCell(cell);
|
412 |
-
setSpanVal(newCell, 'colSpan', cell.colSpan);
|
413 |
-
|
414 |
-
newRow.appendChild(newCell);
|
415 |
-
|
416 |
-
lastCell = cell;
|
417 |
-
}
|
418 |
-
}
|
419 |
-
|
420 |
-
if (newRow.hasChildNodes()) {
|
421 |
-
if (!before)
|
422 |
-
dom.insertAfter(newRow, rowElm);
|
423 |
-
else
|
424 |
-
rowElm.parentNode.insertBefore(newRow, rowElm);
|
425 |
-
}
|
426 |
-
};
|
427 |
-
|
428 |
-
function insertCol(before) {
|
429 |
-
var posX, lastCell;
|
430 |
-
|
431 |
-
// Find first/last column
|
432 |
-
each(grid, function(row, y) {
|
433 |
-
each(row, function(cell, x) {
|
434 |
-
if (isCellSelected(cell)) {
|
435 |
-
posX = x;
|
436 |
-
|
437 |
-
if (before)
|
438 |
-
return false;
|
439 |
-
}
|
440 |
-
});
|
441 |
-
|
442 |
-
if (before)
|
443 |
-
return !posX;
|
444 |
-
});
|
445 |
-
|
446 |
-
each(grid, function(row, y) {
|
447 |
-
var cell, rowSpan, colSpan;
|
448 |
-
|
449 |
-
if (!row[posX])
|
450 |
-
return;
|
451 |
-
|
452 |
-
cell = row[posX].elm;
|
453 |
-
if (cell != lastCell) {
|
454 |
-
colSpan = getSpanVal(cell, 'colspan');
|
455 |
-
rowSpan = getSpanVal(cell, 'rowspan');
|
456 |
-
|
457 |
-
if (colSpan == 1) {
|
458 |
-
if (!before) {
|
459 |
-
dom.insertAfter(cloneCell(cell), cell);
|
460 |
-
fillLeftDown(posX, y, rowSpan - 1, colSpan);
|
461 |
-
} else {
|
462 |
-
cell.parentNode.insertBefore(cloneCell(cell), cell);
|
463 |
-
fillLeftDown(posX, y, rowSpan - 1, colSpan);
|
464 |
-
}
|
465 |
-
} else
|
466 |
-
setSpanVal(cell, 'colSpan', cell.colSpan + 1);
|
467 |
-
|
468 |
-
lastCell = cell;
|
469 |
-
}
|
470 |
-
});
|
471 |
-
};
|
472 |
-
|
473 |
-
function deleteCols() {
|
474 |
-
var cols = [];
|
475 |
-
|
476 |
-
// Get selected column indexes
|
477 |
-
each(grid, function(row, y) {
|
478 |
-
each(row, function(cell, x) {
|
479 |
-
if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) {
|
480 |
-
each(grid, function(row) {
|
481 |
-
var cell = row[x].elm, colSpan;
|
482 |
-
|
483 |
-
colSpan = getSpanVal(cell, 'colSpan');
|
484 |
-
|
485 |
-
if (colSpan > 1)
|
486 |
-
setSpanVal(cell, 'colSpan', colSpan - 1);
|
487 |
-
else
|
488 |
-
dom.remove(cell);
|
489 |
-
});
|
490 |
-
|
491 |
-
cols.push(x);
|
492 |
-
}
|
493 |
-
});
|
494 |
-
});
|
495 |
-
|
496 |
-
cleanup();
|
497 |
-
};
|
498 |
-
|
499 |
-
function deleteRows() {
|
500 |
-
var rows;
|
501 |
-
|
502 |
-
function deleteRow(tr) {
|
503 |
-
var nextTr, pos, lastCell;
|
504 |
-
|
505 |
-
nextTr = dom.getNext(tr, 'tr');
|
506 |
-
|
507 |
-
// Move down row spanned cells
|
508 |
-
each(tr.cells, function(cell) {
|
509 |
-
var rowSpan = getSpanVal(cell, 'rowSpan');
|
510 |
-
|
511 |
-
if (rowSpan > 1) {
|
512 |
-
setSpanVal(cell, 'rowSpan', rowSpan - 1);
|
513 |
-
pos = getPos(cell);
|
514 |
-
fillLeftDown(pos.x, pos.y, 1, 1);
|
515 |
-
}
|
516 |
-
});
|
517 |
-
|
518 |
-
// Delete cells
|
519 |
-
pos = getPos(tr.cells[0]);
|
520 |
-
each(grid[pos.y], function(cell) {
|
521 |
-
var rowSpan;
|
522 |
-
|
523 |
-
cell = cell.elm;
|
524 |
-
|
525 |
-
if (cell != lastCell) {
|
526 |
-
rowSpan = getSpanVal(cell, 'rowSpan');
|
527 |
-
|
528 |
-
if (rowSpan <= 1)
|
529 |
-
dom.remove(cell);
|
530 |
-
else
|
531 |
-
setSpanVal(cell, 'rowSpan', rowSpan - 1);
|
532 |
-
|
533 |
-
lastCell = cell;
|
534 |
-
}
|
535 |
-
});
|
536 |
-
};
|
537 |
-
|
538 |
-
// Get selected rows and move selection out of scope
|
539 |
-
rows = getSelectedRows();
|
540 |
-
|
541 |
-
// Delete all selected rows
|
542 |
-
each(rows.reverse(), function(tr) {
|
543 |
-
deleteRow(tr);
|
544 |
-
});
|
545 |
-
|
546 |
-
cleanup();
|
547 |
-
};
|
548 |
-
|
549 |
-
function cutRows() {
|
550 |
-
var rows = getSelectedRows();
|
551 |
-
|
552 |
-
dom.remove(rows);
|
553 |
-
cleanup();
|
554 |
-
|
555 |
-
return rows;
|
556 |
-
};
|
557 |
-
|
558 |
-
function copyRows() {
|
559 |
-
var rows = getSelectedRows();
|
560 |
-
|
561 |
-
each(rows, function(row, i) {
|
562 |
-
rows[i] = cloneNode(row, true);
|
563 |
-
});
|
564 |
-
|
565 |
-
return rows;
|
566 |
-
};
|
567 |
-
|
568 |
-
function pasteRows(rows, before) {
|
569 |
-
var selectedRows = getSelectedRows(),
|
570 |
-
targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
|
571 |
-
targetCellCount = targetRow.cells.length;
|
572 |
-
|
573 |
-
// Calc target cell count
|
574 |
-
each(grid, function(row) {
|
575 |
-
var match;
|
576 |
-
|
577 |
-
targetCellCount = 0;
|
578 |
-
each(row, function(cell, x) {
|
579 |
-
if (cell.real)
|
580 |
-
targetCellCount += cell.colspan;
|
581 |
-
|
582 |
-
if (cell.elm.parentNode == targetRow)
|
583 |
-
match = 1;
|
584 |
-
});
|
585 |
-
|
586 |
-
if (match)
|
587 |
-
return false;
|
588 |
-
});
|
589 |
-
|
590 |
-
if (!before)
|
591 |
-
rows.reverse();
|
592 |
-
|
593 |
-
each(rows, function(row) {
|
594 |
-
var cellCount = row.cells.length, cell;
|
595 |
-
|
596 |
-
// Remove col/rowspans
|
597 |
-
for (i = 0; i < cellCount; i++) {
|
598 |
-
cell = row.cells[i];
|
599 |
-
setSpanVal(cell, 'colSpan', 1);
|
600 |
-
setSpanVal(cell, 'rowSpan', 1);
|
601 |
-
}
|
602 |
-
|
603 |
-
// Needs more cells
|
604 |
-
for (i = cellCount; i < targetCellCount; i++)
|
605 |
-
row.appendChild(cloneCell(row.cells[cellCount - 1]));
|
606 |
-
|
607 |
-
// Needs less cells
|
608 |
-
for (i = targetCellCount; i < cellCount; i++)
|
609 |
-
dom.remove(row.cells[i]);
|
610 |
-
|
611 |
-
// Add before/after
|
612 |
-
if (before)
|
613 |
-
targetRow.parentNode.insertBefore(row, targetRow);
|
614 |
-
else
|
615 |
-
dom.insertAfter(row, targetRow);
|
616 |
-
});
|
617 |
-
|
618 |
-
// Remove current selection
|
619 |
-
dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
|
620 |
-
};
|
621 |
-
|
622 |
-
function getPos(target) {
|
623 |
-
var pos;
|
624 |
-
|
625 |
-
each(grid, function(row, y) {
|
626 |
-
each(row, function(cell, x) {
|
627 |
-
if (cell.elm == target) {
|
628 |
-
pos = {x : x, y : y};
|
629 |
-
return false;
|
630 |
-
}
|
631 |
-
});
|
632 |
-
|
633 |
-
return !pos;
|
634 |
-
});
|
635 |
-
|
636 |
-
return pos;
|
637 |
-
};
|
638 |
-
|
639 |
-
function setStartCell(cell) {
|
640 |
-
startPos = getPos(cell);
|
641 |
-
};
|
642 |
-
|
643 |
-
function findEndPos() {
|
644 |
-
var pos, maxX, maxY;
|
645 |
-
|
646 |
-
maxX = maxY = 0;
|
647 |
-
|
648 |
-
each(grid, function(row, y) {
|
649 |
-
each(row, function(cell, x) {
|
650 |
-
var colSpan, rowSpan;
|
651 |
-
|
652 |
-
if (isCellSelected(cell)) {
|
653 |
-
cell = grid[y][x];
|
654 |
-
|
655 |
-
if (x > maxX)
|
656 |
-
maxX = x;
|
657 |
-
|
658 |
-
if (y > maxY)
|
659 |
-
maxY = y;
|
660 |
-
|
661 |
-
if (cell.real) {
|
662 |
-
colSpan = cell.colspan - 1;
|
663 |
-
rowSpan = cell.rowspan - 1;
|
664 |
-
|
665 |
-
if (colSpan) {
|
666 |
-
if (x + colSpan > maxX)
|
667 |
-
maxX = x + colSpan;
|
668 |
-
}
|
669 |
-
|
670 |
-
if (rowSpan) {
|
671 |
-
if (y + rowSpan > maxY)
|
672 |
-
maxY = y + rowSpan;
|
673 |
-
}
|
674 |
-
}
|
675 |
-
}
|
676 |
-
});
|
677 |
-
});
|
678 |
-
|
679 |
-
return {x : maxX, y : maxY};
|
680 |
-
};
|
681 |
-
|
682 |
-
function setEndCell(cell) {
|
683 |
-
var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan;
|
684 |
-
|
685 |
-
endPos = getPos(cell);
|
686 |
-
|
687 |
-
if (startPos && endPos) {
|
688 |
-
// Get start/end positions
|
689 |
-
startX = Math.min(startPos.x, endPos.x);
|
690 |
-
startY = Math.min(startPos.y, endPos.y);
|
691 |
-
endX = Math.max(startPos.x, endPos.x);
|
692 |
-
endY = Math.max(startPos.y, endPos.y);
|
693 |
-
|
694 |
-
// Expand end positon to include spans
|
695 |
-
maxX = endX;
|
696 |
-
maxY = endY;
|
697 |
-
|
698 |
-
// Expand startX
|
699 |
-
for (y = startY; y <= maxY; y++) {
|
700 |
-
cell = grid[y][startX];
|
701 |
-
|
702 |
-
if (!cell.real) {
|
703 |
-
if (startX - (cell.colspan - 1) < startX)
|
704 |
-
startX -= cell.colspan - 1;
|
705 |
-
}
|
706 |
-
}
|
707 |
-
|
708 |
-
// Expand startY
|
709 |
-
for (x = startX; x <= maxX; x++) {
|
710 |
-
cell = grid[startY][x];
|
711 |
-
|
712 |
-
if (!cell.real) {
|
713 |
-
if (startY - (cell.rowspan - 1) < startY)
|
714 |
-
startY -= cell.rowspan - 1;
|
715 |
-
}
|
716 |
-
}
|
717 |
-
|
718 |
-
// Find max X, Y
|
719 |
-
for (y = startY; y <= endY; y++) {
|
720 |
-
for (x = startX; x <= endX; x++) {
|
721 |
-
cell = grid[y][x];
|
722 |
-
|
723 |
-
if (cell.real) {
|
724 |
-
colSpan = cell.colspan - 1;
|
725 |
-
rowSpan = cell.rowspan - 1;
|
726 |
-
|
727 |
-
if (colSpan) {
|
728 |
-
if (x + colSpan > maxX)
|
729 |
-
maxX = x + colSpan;
|
730 |
-
}
|
731 |
-
|
732 |
-
if (rowSpan) {
|
733 |
-
if (y + rowSpan > maxY)
|
734 |
-
maxY = y + rowSpan;
|
735 |
-
}
|
736 |
-
}
|
737 |
-
}
|
738 |
-
}
|
739 |
-
|
740 |
-
// Remove current selection
|
741 |
-
dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
|
742 |
-
|
743 |
-
// Add new selection
|
744 |
-
for (y = startY; y <= maxY; y++) {
|
745 |
-
for (x = startX; x <= maxX; x++) {
|
746 |
-
if (grid[y][x])
|
747 |
-
dom.addClass(grid[y][x].elm, 'mceSelected');
|
748 |
-
}
|
749 |
-
}
|
750 |
-
}
|
751 |
-
};
|
752 |
-
|
753 |
-
// Expose to public
|
754 |
-
tinymce.extend(this, {
|
755 |
-
deleteTable : deleteTable,
|
756 |
-
split : split,
|
757 |
-
merge : merge,
|
758 |
-
insertRow : insertRow,
|
759 |
-
insertCol : insertCol,
|
760 |
-
deleteCols : deleteCols,
|
761 |
-
deleteRows : deleteRows,
|
762 |
-
cutRows : cutRows,
|
763 |
-
copyRows : copyRows,
|
764 |
-
pasteRows : pasteRows,
|
765 |
-
getPos : getPos,
|
766 |
-
setStartCell : setStartCell,
|
767 |
-
setEndCell : setEndCell
|
768 |
-
});
|
769 |
-
};
|
770 |
-
|
771 |
-
tinymce.create('tinymce.plugins.TablePlugin', {
|
772 |
-
init : function(ed, url) {
|
773 |
-
var winMan, clipboardRows, hasCellSelection = true; // Might be selected cells on reload
|
774 |
-
|
775 |
-
function createTableGrid(node) {
|
776 |
-
var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table');
|
777 |
-
|
778 |
-
if (tblElm)
|
779 |
-
return new TableGrid(tblElm, ed.dom, selection);
|
780 |
-
};
|
781 |
-
|
782 |
-
function cleanup() {
|
783 |
-
// Restore selection possibilities
|
784 |
-
ed.getBody().style.webkitUserSelect = '';
|
785 |
-
|
786 |
-
if (hasCellSelection) {
|
787 |
-
ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
|
788 |
-
hasCellSelection = false;
|
789 |
-
}
|
790 |
-
};
|
791 |
-
|
792 |
-
// Register buttons
|
793 |
-
each([
|
794 |
-
['table', 'table.desc', 'mceInsertTable', true],
|
795 |
-
['delete_table', 'table.del', 'mceTableDelete'],
|
796 |
-
['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'],
|
797 |
-
['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'],
|
798 |
-
['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'],
|
799 |
-
['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'],
|
800 |
-
['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'],
|
801 |
-
['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'],
|
802 |
-
['row_props', 'table.row_desc', 'mceTableRowProps', true],
|
803 |
-
['cell_props', 'table.cell_desc', 'mceTableCellProps', true],
|
804 |
-
['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true],
|
805 |
-
['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true]
|
806 |
-
], function(c) {
|
807 |
-
ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]});
|
808 |
-
});
|
809 |
-
|
810 |
-
// Select whole table is a table border is clicked
|
811 |
-
if (!tinymce.isIE) {
|
812 |
-
ed.onClick.add(function(ed, e) {
|
813 |
-
e = e.target;
|
814 |
-
|
815 |
-
if (e.nodeName === 'TABLE') {
|
816 |
-
ed.selection.select(e);
|
817 |
-
ed.nodeChanged();
|
818 |
-
}
|
819 |
-
});
|
820 |
-
}
|
821 |
-
|
822 |
-
ed.onPreProcess.add(function(ed, args) {
|
823 |
-
var nodes, i, node, dom = ed.dom, value;
|
824 |
-
|
825 |
-
nodes = dom.select('table', args.node);
|
826 |
-
i = nodes.length;
|
827 |
-
while (i--) {
|
828 |
-
node = nodes[i];
|
829 |
-
dom.setAttrib(node, 'data-mce-style', '');
|
830 |
-
|
831 |
-
if ((value = dom.getAttrib(node, 'width'))) {
|
832 |
-
dom.setStyle(node, 'width', value);
|
833 |
-
dom.setAttrib(node, 'width', '');
|
834 |
-
}
|
835 |
-
|
836 |
-
if ((value = dom.getAttrib(node, 'height'))) {
|
837 |
-
dom.setStyle(node, 'height', value);
|
838 |
-
dom.setAttrib(node, 'height', '');
|
839 |
-
}
|
840 |
-
}
|
841 |
-
});
|
842 |
-
|
843 |
-
// Handle node change updates
|
844 |
-
ed.onNodeChange.add(function(ed, cm, n) {
|
845 |
-
var p;
|
846 |
-
|
847 |
-
n = ed.selection.getStart();
|
848 |
-
p = ed.dom.getParent(n, 'td,th,caption');
|
849 |
-
cm.setActive('table', n.nodeName === 'TABLE' || !!p);
|
850 |
-
|
851 |
-
// Disable table tools if we are in caption
|
852 |
-
if (p && p.nodeName === 'CAPTION')
|
853 |
-
p = 0;
|
854 |
-
|
855 |
-
cm.setDisabled('delete_table', !p);
|
856 |
-
cm.setDisabled('delete_col', !p);
|
857 |
-
cm.setDisabled('delete_table', !p);
|
858 |
-
cm.setDisabled('delete_row', !p);
|
859 |
-
cm.setDisabled('col_after', !p);
|
860 |
-
cm.setDisabled('col_before', !p);
|
861 |
-
cm.setDisabled('row_after', !p);
|
862 |
-
cm.setDisabled('row_before', !p);
|
863 |
-
cm.setDisabled('row_props', !p);
|
864 |
-
cm.setDisabled('cell_props', !p);
|
865 |
-
cm.setDisabled('split_cells', !p);
|
866 |
-
cm.setDisabled('merge_cells', !p);
|
867 |
-
});
|
868 |
-
|
869 |
-
ed.onInit.add(function(ed) {
|
870 |
-
var startTable, startCell, dom = ed.dom, tableGrid;
|
871 |
-
|
872 |
-
winMan = ed.windowManager;
|
873 |
-
|
874 |
-
// Add cell selection logic
|
875 |
-
ed.onMouseDown.add(function(ed, e) {
|
876 |
-
if (e.button != 2) {
|
877 |
-
cleanup();
|
878 |
-
|
879 |
-
startCell = dom.getParent(e.target, 'td,th');
|
880 |
-
startTable = dom.getParent(startCell, 'table');
|
881 |
-
}
|
882 |
-
});
|
883 |
-
|
884 |
-
dom.bind(ed.getDoc(), 'mouseover', function(e) {
|
885 |
-
var sel, table, target = e.target;
|
886 |
-
|
887 |
-
if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) {
|
888 |
-
table = dom.getParent(target, 'table');
|
889 |
-
if (table == startTable) {
|
890 |
-
if (!tableGrid) {
|
891 |
-
tableGrid = createTableGrid(table);
|
892 |
-
tableGrid.setStartCell(startCell);
|
893 |
-
|
894 |
-
ed.getBody().style.webkitUserSelect = 'none';
|
895 |
-
}
|
896 |
-
|
897 |
-
tableGrid.setEndCell(target);
|
898 |
-
hasCellSelection = true;
|
899 |
-
}
|
900 |
-
|
901 |
-
// Remove current selection
|
902 |
-
sel = ed.selection.getSel();
|
903 |
-
|
904 |
-
try {
|
905 |
-
if (sel.removeAllRanges)
|
906 |
-
sel.removeAllRanges();
|
907 |
-
else
|
908 |
-
sel.empty();
|
909 |
-
} catch (ex) {
|
910 |
-
// IE9 might throw errors here
|
911 |
-
}
|
912 |
-
|
913 |
-
e.preventDefault();
|
914 |
-
}
|
915 |
-
});
|
916 |
-
|
917 |
-
ed.onMouseUp.add(function(ed, e) {
|
918 |
-
var rng, sel = ed.selection, selectedCells, nativeSel = sel.getSel(), walker, node, lastNode, endNode;
|
919 |
-
|
920 |
-
// Move selection to startCell
|
921 |
-
if (startCell) {
|
922 |
-
if (tableGrid)
|
923 |
-
ed.getBody().style.webkitUserSelect = '';
|
924 |
-
|
925 |
-
function setPoint(node, start) {
|
926 |
-
var walker = new tinymce.dom.TreeWalker(node, node);
|
927 |
-
|
928 |
-
do {
|
929 |
-
// Text node
|
930 |
-
if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) {
|
931 |
-
if (start)
|
932 |
-
rng.setStart(node, 0);
|
933 |
-
else
|
934 |
-
rng.setEnd(node, node.nodeValue.length);
|
935 |
-
|
936 |
-
return;
|
937 |
-
}
|
938 |
-
|
939 |
-
// BR element
|
940 |
-
if (node.nodeName == 'BR') {
|
941 |
-
if (start)
|
942 |
-
rng.setStartBefore(node);
|
943 |
-
else
|
944 |
-
rng.setEndBefore(node);
|
945 |
-
|
946 |
-
return;
|
947 |
-
}
|
948 |
-
} while (node = (start ? walker.next() : walker.prev()));
|
949 |
-
}
|
950 |
-
|
951 |
-
// Try to expand text selection as much as we can only Gecko supports cell selection
|
952 |
-
selectedCells = dom.select('td.mceSelected,th.mceSelected');
|
953 |
-
if (selectedCells.length > 0) {
|
954 |
-
rng = dom.createRng();
|
955 |
-
node = selectedCells[0];
|
956 |
-
endNode = selectedCells[selectedCells.length - 1];
|
957 |
-
rng.setStartBefore(node);
|
958 |
-
rng.setEndAfter(node);
|
959 |
-
|
960 |
-
setPoint(node, 1);
|
961 |
-
walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table'));
|
962 |
-
|
963 |
-
do {
|
964 |
-
if (node.nodeName == 'TD' || node.nodeName == 'TH') {
|
965 |
-
if (!dom.hasClass(node, 'mceSelected'))
|
966 |
-
break;
|
967 |
-
|
968 |
-
lastNode = node;
|
969 |
-
}
|
970 |
-
} while (node = walker.next());
|
971 |
-
|
972 |
-
setPoint(lastNode);
|
973 |
-
|
974 |
-
sel.setRng(rng);
|
975 |
-
}
|
976 |
-
|
977 |
-
ed.nodeChanged();
|
978 |
-
startCell = tableGrid = startTable = null;
|
979 |
-
}
|
980 |
-
});
|
981 |
-
|
982 |
-
ed.onKeyUp.add(function(ed, e) {
|
983 |
-
cleanup();
|
984 |
-
});
|
985 |
-
|
986 |
-
ed.onKeyDown.add(function (ed, e) {
|
987 |
-
fixTableCellSelection(ed);
|
988 |
-
});
|
989 |
-
|
990 |
-
ed.onMouseDown.add(function (ed, e) {
|
991 |
-
if (e.button != 2) {
|
992 |
-
fixTableCellSelection(ed);
|
993 |
-
}
|
994 |
-
});
|
995 |
-
function tableCellSelected(ed, rng, n, currentCell) {
|
996 |
-
// The decision of when a table cell is selected is somewhat involved. The fact that this code is
|
997 |
-
// required is actually a pointer to the root cause of this bug. A cell is selected when the start
|
998 |
-
// and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases)
|
999 |
-
// or the parent of the table (in the case of the selection containing the last cell of a table).
|
1000 |
-
var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE'),
|
1001 |
-
tableParent, allOfCellSelected, tableCellSelection;
|
1002 |
-
if (table)
|
1003 |
-
tableParent = table.parentNode;
|
1004 |
-
allOfCellSelected =rng.startContainer.nodeType == TEXT_NODE &&
|
1005 |
-
rng.startOffset == 0 &&
|
1006 |
-
rng.endOffset == 0 &&
|
1007 |
-
currentCell &&
|
1008 |
-
(n.nodeName=="TR" || n==tableParent);
|
1009 |
-
tableCellSelection = (n.nodeName=="TD"||n.nodeName=="TH")&& !currentCell;
|
1010 |
-
return allOfCellSelected || tableCellSelection;
|
1011 |
-
// return false;
|
1012 |
-
}
|
1013 |
-
|
1014 |
-
// this nasty hack is here to work around some WebKit selection bugs.
|
1015 |
-
function fixTableCellSelection(ed) {
|
1016 |
-
if (!tinymce.isWebKit)
|
1017 |
-
return;
|
1018 |
-
|
1019 |
-
var rng = ed.selection.getRng();
|
1020 |
-
var n = ed.selection.getNode();
|
1021 |
-
var currentCell = ed.dom.getParent(rng.startContainer, 'TD,TH');
|
1022 |
-
|
1023 |
-
if (!tableCellSelected(ed, rng, n, currentCell))
|
1024 |
-
return;
|
1025 |
-
if (!currentCell) {
|
1026 |
-
currentCell=n;
|
1027 |
-
}
|
1028 |
-
|
1029 |
-
// Get the very last node inside the table cell
|
1030 |
-
var end = currentCell.lastChild;
|
1031 |
-
while (end.lastChild)
|
1032 |
-
end = end.lastChild;
|
1033 |
-
|
1034 |
-
// Select the entire table cell. Nothing outside of the table cell should be selected.
|
1035 |
-
rng.setEnd(end, end.nodeValue.length);
|
1036 |
-
ed.selection.setRng(rng);
|
1037 |
-
}
|
1038 |
-
ed.plugins.table.fixTableCellSelection=fixTableCellSelection;
|
1039 |
-
|
1040 |
-
// Add context menu
|
1041 |
-
if (ed && ed.plugins.contextmenu) {
|
1042 |
-
ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
|
1043 |
-
var sm, se = ed.selection, el = se.getNode() || ed.getBody();
|
1044 |
-
|
1045 |
-
if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) {
|
1046 |
-
m.removeAll();
|
1047 |
-
|
1048 |
-
if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) {
|
1049 |
-
m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true});
|
1050 |
-
m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'});
|
1051 |
-
m.addSeparator();
|
1052 |
-
}
|
1053 |
-
|
1054 |
-
if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) {
|
1055 |
-
m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true});
|
1056 |
-
m.addSeparator();
|
1057 |
-
}
|
1058 |
-
|
1059 |
-
m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', value : {action : 'insert'}});
|
1060 |
-
m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable'});
|
1061 |
-
m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete'});
|
1062 |
-
m.addSeparator();
|
1063 |
-
|
1064 |
-
// Cell menu
|
1065 |
-
sm = m.addMenu({title : 'table.cell'});
|
1066 |
-
sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps'});
|
1067 |
-
sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells'});
|
1068 |
-
sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells'});
|
1069 |
-
|
1070 |
-
// Row menu
|
1071 |
-
sm = m.addMenu({title : 'table.row'});
|
1072 |
-
sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps'});
|
1073 |
-
sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'});
|
1074 |
-
sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'});
|
1075 |
-
sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'});
|
1076 |
-
sm.addSeparator();
|
1077 |
-
sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'});
|
1078 |
-
sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'});
|
1079 |
-
sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}).setDisabled(!clipboardRows);
|
1080 |
-
sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}).setDisabled(!clipboardRows);
|
1081 |
-
|
1082 |
-
// Column menu
|
1083 |
-
sm = m.addMenu({title : 'table.col'});
|
1084 |
-
sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'});
|
1085 |
-
sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'});
|
1086 |
-
sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'});
|
1087 |
-
} else
|
1088 |
-
m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable'});
|
1089 |
-
});
|
1090 |
-
}
|
1091 |
-
|
1092 |
-
// Fix to allow navigating up and down in a table in WebKit browsers.
|
1093 |
-
if (tinymce.isWebKit) {
|
1094 |
-
function moveSelection(ed, e) {
|
1095 |
-
var VK = tinymce.VK;
|
1096 |
-
var key = e.keyCode;
|
1097 |
-
|
1098 |
-
function handle(upBool, sourceNode, event) {
|
1099 |
-
var siblingDirection = upBool ? 'previousSibling' : 'nextSibling';
|
1100 |
-
var currentRow = ed.dom.getParent(sourceNode, 'tr');
|
1101 |
-
var siblingRow = currentRow[siblingDirection];
|
1102 |
-
|
1103 |
-
if (siblingRow) {
|
1104 |
-
moveCursorToRow(ed, sourceNode, siblingRow, upBool);
|
1105 |
-
tinymce.dom.Event.cancel(event);
|
1106 |
-
return true;
|
1107 |
-
} else {
|
1108 |
-
var tableNode = ed.dom.getParent(currentRow, 'table');
|
1109 |
-
var middleNode = currentRow.parentNode;
|
1110 |
-
var parentNodeName = middleNode.nodeName.toLowerCase();
|
1111 |
-
if (parentNodeName === 'tbody' || parentNodeName === (upBool ? 'tfoot' : 'thead')) {
|
1112 |
-
var targetParent = getTargetParent(upBool, tableNode, middleNode, 'tbody');
|
1113 |
-
if (targetParent !== null) {
|
1114 |
-
return moveToRowInTarget(upBool, targetParent, sourceNode, event);
|
1115 |
-
}
|
1116 |
-
}
|
1117 |
-
return escapeTable(upBool, currentRow, siblingDirection, tableNode, event);
|
1118 |
-
}
|
1119 |
-
}
|
1120 |
-
|
1121 |
-
function getTargetParent(upBool, topNode, secondNode, nodeName) {
|
1122 |
-
var tbodies = ed.dom.select('>' + nodeName, topNode);
|
1123 |
-
var position = tbodies.indexOf(secondNode);
|
1124 |
-
if (upBool && position === 0 || !upBool && position === tbodies.length - 1) {
|
1125 |
-
return getFirstHeadOrFoot(upBool, topNode);
|
1126 |
-
} else if (position === -1) {
|
1127 |
-
var topOrBottom = secondNode.tagName.toLowerCase() === 'thead' ? 0 : tbodies.length - 1;
|
1128 |
-
return tbodies[topOrBottom];
|
1129 |
-
} else {
|
1130 |
-
return tbodies[position + (upBool ? -1 : 1)];
|
1131 |
-
}
|
1132 |
-
}
|
1133 |
-
|
1134 |
-
function getFirstHeadOrFoot(upBool, parent) {
|
1135 |
-
var tagName = upBool ? 'thead' : 'tfoot';
|
1136 |
-
var headOrFoot = ed.dom.select('>' + tagName, parent);
|
1137 |
-
return headOrFoot.length !== 0 ? headOrFoot[0] : null;
|
1138 |
-
}
|
1139 |
-
|
1140 |
-
function moveToRowInTarget(upBool, targetParent, sourceNode, event) {
|
1141 |
-
var targetRow = getChildForDirection(targetParent, upBool);
|
1142 |
-
targetRow && moveCursorToRow(ed, sourceNode, targetRow, upBool);
|
1143 |
-
tinymce.dom.Event.cancel(event);
|
1144 |
-
return true;
|
1145 |
-
}
|
1146 |
-
|
1147 |
-
function escapeTable(upBool, currentRow, siblingDirection, table, event) {
|
1148 |
-
var tableSibling = table[siblingDirection];
|
1149 |
-
if (tableSibling) {
|
1150 |
-
moveCursorToStartOfElement(tableSibling);
|
1151 |
-
return true;
|
1152 |
-
} else {
|
1153 |
-
var parentCell = ed.dom.getParent(table, 'td,th');
|
1154 |
-
if (parentCell) {
|
1155 |
-
return handle(upBool, parentCell, event);
|
1156 |
-
} else {
|
1157 |
-
var backUpSibling = getChildForDirection(currentRow, !upBool);
|
1158 |
-
moveCursorToStartOfElement(backUpSibling);
|
1159 |
-
return tinymce.dom.Event.cancel(event);
|
1160 |
-
}
|
1161 |
-
}
|
1162 |
-
}
|
1163 |
-
|
1164 |
-
function getChildForDirection(parent, up) {
|
1165 |
-
var child = parent && parent[up ? 'lastChild' : 'firstChild'];
|
1166 |
-
// BR is not a valid table child to return in this case we return the table cell
|
1167 |
-
return child && child.nodeName === 'BR' ? ed.dom.getParent(child, 'td,th') : child;
|
1168 |
-
}
|
1169 |
-
|
1170 |
-
function moveCursorToStartOfElement(n) {
|
1171 |
-
ed.selection.setCursorLocation(n, 0);
|
1172 |
-
}
|
1173 |
-
|
1174 |
-
function isVerticalMovement() {
|
1175 |
-
return key == VK.UP || key == VK.DOWN;
|
1176 |
-
}
|
1177 |
-
|
1178 |
-
function isInTable(ed) {
|
1179 |
-
var node = ed.selection.getNode();
|
1180 |
-
var currentRow = ed.dom.getParent(node, 'tr');
|
1181 |
-
return currentRow !== null;
|
1182 |
-
}
|
1183 |
-
|
1184 |
-
function columnIndex(column) {
|
1185 |
-
var colIndex = 0;
|
1186 |
-
var c = column;
|
1187 |
-
while (c.previousSibling) {
|
1188 |
-
c = c.previousSibling;
|
1189 |
-
colIndex = colIndex + getSpanVal(c, "colspan");
|
1190 |
-
}
|
1191 |
-
return colIndex;
|
1192 |
-
}
|
1193 |
-
|
1194 |
-
function findColumn(rowElement, columnIndex) {
|
1195 |
-
var c = 0;
|
1196 |
-
var r = 0;
|
1197 |
-
each(rowElement.children, function(cell, i) {
|
1198 |
-
c = c + getSpanVal(cell, "colspan");
|
1199 |
-
r = i;
|
1200 |
-
if (c > columnIndex)
|
1201 |
-
return false;
|
1202 |
-
});
|
1203 |
-
return r;
|
1204 |
-
}
|
1205 |
-
|
1206 |
-
function moveCursorToRow(ed, node, row, upBool) {
|
1207 |
-
var srcColumnIndex = columnIndex(ed.dom.getParent(node, 'td,th'));
|
1208 |
-
var tgtColumnIndex = findColumn(row, srcColumnIndex);
|
1209 |
-
var tgtNode = row.childNodes[tgtColumnIndex];
|
1210 |
-
var rowCellTarget = getChildForDirection(tgtNode, upBool);
|
1211 |
-
moveCursorToStartOfElement(rowCellTarget || tgtNode);
|
1212 |
-
}
|
1213 |
-
|
1214 |
-
function shouldFixCaret(preBrowserNode) {
|
1215 |
-
var newNode = ed.selection.getNode();
|
1216 |
-
var newParent = ed.dom.getParent(newNode, 'td,th');
|
1217 |
-
var oldParent = ed.dom.getParent(preBrowserNode, 'td,th');
|
1218 |
-
return newParent && newParent !== oldParent && checkSameParentTable(newParent, oldParent)
|
1219 |
-
}
|
1220 |
-
|
1221 |
-
function checkSameParentTable(nodeOne, NodeTwo) {
|
1222 |
-
return ed.dom.getParent(nodeOne, 'TABLE') === ed.dom.getParent(NodeTwo, 'TABLE');
|
1223 |
-
}
|
1224 |
-
|
1225 |
-
if (isVerticalMovement() && isInTable(ed)) {
|
1226 |
-
var preBrowserNode = ed.selection.getNode();
|
1227 |
-
setTimeout(function() {
|
1228 |
-
if (shouldFixCaret(preBrowserNode)) {
|
1229 |
-
handle(!e.shiftKey && key === VK.UP, preBrowserNode, e);
|
1230 |
-
}
|
1231 |
-
}, 0);
|
1232 |
-
}
|
1233 |
-
}
|
1234 |
-
|
1235 |
-
ed.onKeyDown.add(moveSelection);
|
1236 |
-
}
|
1237 |
-
|
1238 |
-
// Fixes an issue on Gecko where it's impossible to place the caret behind a table
|
1239 |
-
// This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled
|
1240 |
-
function fixTableCaretPos() {
|
1241 |
-
var last;
|
1242 |
-
|
1243 |
-
// Skip empty text nodes form the end
|
1244 |
-
for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ;
|
1245 |
-
|
1246 |
-
if (last && last.nodeName == 'TABLE') {
|
1247 |
-
if (ed.settings.forced_root_block)
|
1248 |
-
ed.dom.add(ed.getBody(), ed.settings.forced_root_block, null, tinymce.isIE ? ' ' : '<br data-mce-bogus="1" />');
|
1249 |
-
else
|
1250 |
-
ed.dom.add(ed.getBody(), 'br', {'data-mce-bogus': '1'});
|
1251 |
-
}
|
1252 |
-
};
|
1253 |
-
|
1254 |
-
// Fixes an bug where it's impossible to place the caret before a table in Gecko
|
1255 |
-
// this fix solves it by detecting when the caret is at the beginning of such a table
|
1256 |
-
// and then manually moves the caret infront of the table
|
1257 |
-
if (tinymce.isGecko) {
|
1258 |
-
ed.onKeyDown.add(function(ed, e) {
|
1259 |
-
var rng, table, dom = ed.dom;
|
1260 |
-
|
1261 |
-
// On gecko it's not possible to place the caret before a table
|
1262 |
-
if (e.keyCode == 37 || e.keyCode == 38) {
|
1263 |
-
rng = ed.selection.getRng();
|
1264 |
-
table = dom.getParent(rng.startContainer, 'table');
|
1265 |
-
|
1266 |
-
if (table && ed.getBody().firstChild == table) {
|
1267 |
-
if (isAtStart(rng, table)) {
|
1268 |
-
rng = dom.createRng();
|
1269 |
-
|
1270 |
-
rng.setStartBefore(table);
|
1271 |
-
rng.setEndBefore(table);
|
1272 |
-
|
1273 |
-
ed.selection.setRng(rng);
|
1274 |
-
|
1275 |
-
e.preventDefault();
|
1276 |
-
}
|
1277 |
-
}
|
1278 |
-
}
|
1279 |
-
});
|
1280 |
-
}
|
1281 |
-
|
1282 |
-
ed.onKeyUp.add(fixTableCaretPos);
|
1283 |
-
ed.onSetContent.add(fixTableCaretPos);
|
1284 |
-
ed.onVisualAid.add(fixTableCaretPos);
|
1285 |
-
|
1286 |
-
ed.onPreProcess.add(function(ed, o) {
|
1287 |
-
var last = o.node.lastChild;
|
1288 |
-
|
1289 |
-
if (last && (last.nodeName == "BR" || (last.childNodes.length == 1 && (last.firstChild.nodeName == 'BR' || last.firstChild.nodeValue == '\u00a0'))) && last.previousSibling && last.previousSibling.nodeName == "TABLE") {
|
1290 |
-
ed.dom.remove(last);
|
1291 |
-
}
|
1292 |
-
});
|
1293 |
-
|
1294 |
-
|
1295 |
-
/**
|
1296 |
-
* Fixes bug in Gecko where shift-enter in table cell does not place caret on new line
|
1297 |
-
*
|
1298 |
-
* Removed: Since the new enter logic seems to fix this one.
|
1299 |
-
*/
|
1300 |
-
/*
|
1301 |
-
if (tinymce.isGecko) {
|
1302 |
-
ed.onKeyDown.add(function(ed, e) {
|
1303 |
-
if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) {
|
1304 |
-
var node = ed.selection.getRng().startContainer;
|
1305 |
-
var tableCell = dom.getParent(node, 'td,th');
|
1306 |
-
if (tableCell) {
|
1307 |
-
var zeroSizedNbsp = ed.getDoc().createTextNode("\uFEFF");
|
1308 |
-
dom.insertAfter(zeroSizedNbsp, node);
|
1309 |
-
}
|
1310 |
-
}
|
1311 |
-
});
|
1312 |
-
}
|
1313 |
-
*/
|
1314 |
-
|
1315 |
-
fixTableCaretPos();
|
1316 |
-
ed.startContent = ed.getContent({format : 'raw'});
|
1317 |
-
});
|
1318 |
-
|
1319 |
-
// Register action commands
|
1320 |
-
each({
|
1321 |
-
mceTableSplitCells : function(grid) {
|
1322 |
-
grid.split();
|
1323 |
-
},
|
1324 |
-
|
1325 |
-
mceTableMergeCells : function(grid) {
|
1326 |
-
var rowSpan, colSpan, cell;
|
1327 |
-
|
1328 |
-
cell = ed.dom.getParent(ed.selection.getNode(), 'th,td');
|
1329 |
-
if (cell) {
|
1330 |
-
rowSpan = cell.rowSpan;
|
1331 |
-
colSpan = cell.colSpan;
|
1332 |
-
}
|
1333 |
-
|
1334 |
-
if (!ed.dom.select('td.mceSelected,th.mceSelected').length) {
|
1335 |
-
winMan.open({
|
1336 |
-
url : url + '/merge_cells.htm',
|
1337 |
-
width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)),
|
1338 |
-
height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)),
|
1339 |
-
inline : 1
|
1340 |
-
}, {
|
1341 |
-
rows : rowSpan,
|
1342 |
-
cols : colSpan,
|
1343 |
-
onaction : function(data) {
|
1344 |
-
grid.merge(cell, data.cols, data.rows);
|
1345 |
-
},
|
1346 |
-
plugin_url : url
|
1347 |
-
});
|
1348 |
-
} else
|
1349 |
-
grid.merge();
|
1350 |
-
},
|
1351 |
-
|
1352 |
-
mceTableInsertRowBefore : function(grid) {
|
1353 |
-
grid.insertRow(true);
|
1354 |
-
},
|
1355 |
-
|
1356 |
-
mceTableInsertRowAfter : function(grid) {
|
1357 |
-
grid.insertRow();
|
1358 |
-
},
|
1359 |
-
|
1360 |
-
mceTableInsertColBefore : function(grid) {
|
1361 |
-
grid.insertCol(true);
|
1362 |
-
},
|
1363 |
-
|
1364 |
-
mceTableInsertColAfter : function(grid) {
|
1365 |
-
grid.insertCol();
|
1366 |
-
},
|
1367 |
-
|
1368 |
-
mceTableDeleteCol : function(grid) {
|
1369 |
-
grid.deleteCols();
|
1370 |
-
},
|
1371 |
-
|
1372 |
-
mceTableDeleteRow : function(grid) {
|
1373 |
-
grid.deleteRows();
|
1374 |
-
},
|
1375 |
-
|
1376 |
-
mceTableCutRow : function(grid) {
|
1377 |
-
clipboardRows = grid.cutRows();
|
1378 |
-
},
|
1379 |
-
|
1380 |
-
mceTableCopyRow : function(grid) {
|
1381 |
-
clipboardRows = grid.copyRows();
|
1382 |
-
},
|
1383 |
-
|
1384 |
-
mceTablePasteRowBefore : function(grid) {
|
1385 |
-
grid.pasteRows(clipboardRows, true);
|
1386 |
-
},
|
1387 |
-
|
1388 |
-
mceTablePasteRowAfter : function(grid) {
|
1389 |
-
grid.pasteRows(clipboardRows);
|
1390 |
-
},
|
1391 |
-
|
1392 |
-
mceTableDelete : function(grid) {
|
1393 |
-
grid.deleteTable();
|
1394 |
-
}
|
1395 |
-
}, function(func, name) {
|
1396 |
-
ed.addCommand(name, function() {
|
1397 |
-
var grid = createTableGrid();
|
1398 |
-
|
1399 |
-
if (grid) {
|
1400 |
-
func(grid);
|
1401 |
-
ed.execCommand('mceRepaint');
|
1402 |
-
cleanup();
|
1403 |
-
}
|
1404 |
-
});
|
1405 |
-
});
|
1406 |
-
|
1407 |
-
// Register dialog commands
|
1408 |
-
each({
|
1409 |
-
mceInsertTable : function(val) {
|
1410 |
-
winMan.open({
|
1411 |
-
url : url + '/table.htm',
|
1412 |
-
width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)),
|
1413 |
-
height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)),
|
1414 |
-
inline : 1
|
1415 |
-
}, {
|
1416 |
-
plugin_url : url,
|
1417 |
-
action : val ? val.action : 0
|
1418 |
-
});
|
1419 |
-
},
|
1420 |
-
|
1421 |
-
mceTableRowProps : function() {
|
1422 |
-
winMan.open({
|
1423 |
-
url : url + '/row.htm',
|
1424 |
-
width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)),
|
1425 |
-
height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)),
|
1426 |
-
inline : 1
|
1427 |
-
}, {
|
1428 |
-
plugin_url : url
|
1429 |
-
});
|
1430 |
-
},
|
1431 |
-
|
1432 |
-
mceTableCellProps : function() {
|
1433 |
-
winMan.open({
|
1434 |
-
url : url + '/cell.htm',
|
1435 |
-
width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)),
|
1436 |
-
height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)),
|
1437 |
-
inline : 1
|
1438 |
-
}, {
|
1439 |
-
plugin_url : url
|
1440 |
-
});
|
1441 |
-
}
|
1442 |
-
}, function(func, name) {
|
1443 |
-
ed.addCommand(name, function(ui, val) {
|
1444 |
-
func(val);
|
1445 |
-
});
|
1446 |
-
});
|
1447 |
-
}
|
1448 |
-
});
|
1449 |
-
|
1450 |
-
// Register plugin
|
1451 |
-
tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin);
|
1452 |
-
})(tinymce);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/table/js/cell.js
DELETED
@@ -1,319 +0,0 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
|
3 |
-
var ed;
|
4 |
-
|
5 |
-
function init() {
|
6 |
-
ed = tinyMCEPopup.editor;
|
7 |
-
tinyMCEPopup.resizeToInnerSize();
|
8 |
-
|
9 |
-
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
10 |
-
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
11 |
-
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
|
12 |
-
|
13 |
-
var inst = ed;
|
14 |
-
var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th");
|
15 |
-
var formObj = document.forms[0];
|
16 |
-
var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style"));
|
17 |
-
|
18 |
-
// Get table cell data
|
19 |
-
var celltype = tdElm.nodeName.toLowerCase();
|
20 |
-
var align = ed.dom.getAttrib(tdElm, 'align');
|
21 |
-
var valign = ed.dom.getAttrib(tdElm, 'valign');
|
22 |
-
var width = trimSize(getStyle(tdElm, 'width', 'width'));
|
23 |
-
var height = trimSize(getStyle(tdElm, 'height', 'height'));
|
24 |
-
var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
|
25 |
-
var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
|
26 |
-
var className = ed.dom.getAttrib(tdElm, 'class');
|
27 |
-
var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
28 |
-
var id = ed.dom.getAttrib(tdElm, 'id');
|
29 |
-
var lang = ed.dom.getAttrib(tdElm, 'lang');
|
30 |
-
var dir = ed.dom.getAttrib(tdElm, 'dir');
|
31 |
-
var scope = ed.dom.getAttrib(tdElm, 'scope');
|
32 |
-
|
33 |
-
// Setup form
|
34 |
-
addClassesToList('class', 'table_cell_styles');
|
35 |
-
TinyMCE_EditableSelects.init();
|
36 |
-
|
37 |
-
if (!ed.dom.hasClass(tdElm, 'mceSelected')) {
|
38 |
-
formObj.bordercolor.value = bordercolor;
|
39 |
-
formObj.bgcolor.value = bgcolor;
|
40 |
-
formObj.backgroundimage.value = backgroundimage;
|
41 |
-
formObj.width.value = width;
|
42 |
-
formObj.height.value = height;
|
43 |
-
formObj.id.value = id;
|
44 |
-
formObj.lang.value = lang;
|
45 |
-
formObj.style.value = ed.dom.serializeStyle(st);
|
46 |
-
selectByValue(formObj, 'align', align);
|
47 |
-
selectByValue(formObj, 'valign', valign);
|
48 |
-
selectByValue(formObj, 'class', className, true, true);
|
49 |
-
selectByValue(formObj, 'celltype', celltype);
|
50 |
-
selectByValue(formObj, 'dir', dir);
|
51 |
-
selectByValue(formObj, 'scope', scope);
|
52 |
-
|
53 |
-
// Resize some elements
|
54 |
-
if (isVisible('backgroundimagebrowser'))
|
55 |
-
document.getElementById('backgroundimage').style.width = '180px';
|
56 |
-
|
57 |
-
updateColor('bordercolor_pick', 'bordercolor');
|
58 |
-
updateColor('bgcolor_pick', 'bgcolor');
|
59 |
-
} else
|
60 |
-
tinyMCEPopup.dom.hide('action');
|
61 |
-
}
|
62 |
-
|
63 |
-
function updateAction() {
|
64 |
-
var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
|
65 |
-
|
66 |
-
if (!AutoValidator.validate(formObj)) {
|
67 |
-
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
68 |
-
return false;
|
69 |
-
}
|
70 |
-
|
71 |
-
tinyMCEPopup.restoreSelection();
|
72 |
-
el = ed.selection.getStart();
|
73 |
-
tdElm = ed.dom.getParent(el, "td,th");
|
74 |
-
trElm = ed.dom.getParent(el, "tr");
|
75 |
-
tableElm = ed.dom.getParent(el, "table");
|
76 |
-
|
77 |
-
// Cell is selected
|
78 |
-
if (ed.dom.hasClass(tdElm, 'mceSelected')) {
|
79 |
-
// Update all selected sells
|
80 |
-
tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) {
|
81 |
-
updateCell(td);
|
82 |
-
});
|
83 |
-
|
84 |
-
ed.addVisual();
|
85 |
-
ed.nodeChanged();
|
86 |
-
inst.execCommand('mceEndUndoLevel');
|
87 |
-
tinyMCEPopup.close();
|
88 |
-
return;
|
89 |
-
}
|
90 |
-
|
91 |
-
switch (getSelectValue(formObj, 'action')) {
|
92 |
-
case "cell":
|
93 |
-
var celltype = getSelectValue(formObj, 'celltype');
|
94 |
-
var scope = getSelectValue(formObj, 'scope');
|
95 |
-
|
96 |
-
function doUpdate(s) {
|
97 |
-
if (s) {
|
98 |
-
updateCell(tdElm);
|
99 |
-
|
100 |
-
ed.addVisual();
|
101 |
-
ed.nodeChanged();
|
102 |
-
inst.execCommand('mceEndUndoLevel');
|
103 |
-
tinyMCEPopup.close();
|
104 |
-
}
|
105 |
-
};
|
106 |
-
|
107 |
-
if (ed.getParam("accessibility_warnings", 1)) {
|
108 |
-
if (celltype == "th" && scope == "")
|
109 |
-
tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate);
|
110 |
-
else
|
111 |
-
doUpdate(1);
|
112 |
-
|
113 |
-
return;
|
114 |
-
}
|
115 |
-
|
116 |
-
updateCell(tdElm);
|
117 |
-
break;
|
118 |
-
|
119 |
-
case "row":
|
120 |
-
var cell = trElm.firstChild;
|
121 |
-
|
122 |
-
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
123 |
-
cell = nextCell(cell);
|
124 |
-
|
125 |
-
do {
|
126 |
-
cell = updateCell(cell, true);
|
127 |
-
} while ((cell = nextCell(cell)) != null);
|
128 |
-
|
129 |
-
break;
|
130 |
-
|
131 |
-
case "col":
|
132 |
-
var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr");
|
133 |
-
|
134 |
-
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
135 |
-
cell = nextCell(cell);
|
136 |
-
|
137 |
-
do {
|
138 |
-
if (cell == tdElm)
|
139 |
-
break;
|
140 |
-
col += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
|
141 |
-
} while ((cell = nextCell(cell)) != null);
|
142 |
-
|
143 |
-
for (var i=0; i<rows.length; i++) {
|
144 |
-
cell = rows[i].firstChild;
|
145 |
-
|
146 |
-
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
147 |
-
cell = nextCell(cell);
|
148 |
-
|
149 |
-
curr = 0;
|
150 |
-
do {
|
151 |
-
if (curr == col) {
|
152 |
-
cell = updateCell(cell, true);
|
153 |
-
break;
|
154 |
-
}
|
155 |
-
curr += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
|
156 |
-
} while ((cell = nextCell(cell)) != null);
|
157 |
-
}
|
158 |
-
|
159 |
-
break;
|
160 |
-
|
161 |
-
case "all":
|
162 |
-
var rows = tableElm.getElementsByTagName("tr");
|
163 |
-
|
164 |
-
for (var i=0; i<rows.length; i++) {
|
165 |
-
var cell = rows[i].firstChild;
|
166 |
-
|
167 |
-
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
168 |
-
cell = nextCell(cell);
|
169 |
-
|
170 |
-
do {
|
171 |
-
cell = updateCell(cell, true);
|
172 |
-
} while ((cell = nextCell(cell)) != null);
|
173 |
-
}
|
174 |
-
|
175 |
-
break;
|
176 |
-
}
|
177 |
-
|
178 |
-
ed.addVisual();
|
179 |
-
ed.nodeChanged();
|
180 |
-
inst.execCommand('mceEndUndoLevel');
|
181 |
-
tinyMCEPopup.close();
|
182 |
-
}
|
183 |
-
|
184 |
-
function nextCell(elm) {
|
185 |
-
while ((elm = elm.nextSibling) != null) {
|
186 |
-
if (elm.nodeName == "TD" || elm.nodeName == "TH")
|
187 |
-
return elm;
|
188 |
-
}
|
189 |
-
|
190 |
-
return null;
|
191 |
-
}
|
192 |
-
|
193 |
-
function updateCell(td, skip_id) {
|
194 |
-
var inst = ed;
|
195 |
-
var formObj = document.forms[0];
|
196 |
-
var curCellType = td.nodeName.toLowerCase();
|
197 |
-
var celltype = getSelectValue(formObj, 'celltype');
|
198 |
-
var doc = inst.getDoc();
|
199 |
-
var dom = ed.dom;
|
200 |
-
|
201 |
-
if (!skip_id)
|
202 |
-
dom.setAttrib(td, 'id', formObj.id.value);
|
203 |
-
|
204 |
-
dom.setAttrib(td, 'align', formObj.align.value);
|
205 |
-
dom.setAttrib(td, 'vAlign', formObj.valign.value);
|
206 |
-
dom.setAttrib(td, 'lang', formObj.lang.value);
|
207 |
-
dom.setAttrib(td, 'dir', getSelectValue(formObj, 'dir'));
|
208 |
-
dom.setAttrib(td, 'style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value)));
|
209 |
-
dom.setAttrib(td, 'scope', formObj.scope.value);
|
210 |
-
dom.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
|
211 |
-
|
212 |
-
// Clear deprecated attributes
|
213 |
-
ed.dom.setAttrib(td, 'width', '');
|
214 |
-
ed.dom.setAttrib(td, 'height', '');
|
215 |
-
ed.dom.setAttrib(td, 'bgColor', '');
|
216 |
-
ed.dom.setAttrib(td, 'borderColor', '');
|
217 |
-
ed.dom.setAttrib(td, 'background', '');
|
218 |
-
|
219 |
-
// Set styles
|
220 |
-
td.style.width = getCSSSize(formObj.width.value);
|
221 |
-
td.style.height = getCSSSize(formObj.height.value);
|
222 |
-
if (formObj.bordercolor.value != "") {
|
223 |
-
td.style.borderColor = formObj.bordercolor.value;
|
224 |
-
td.style.borderStyle = td.style.borderStyle == "" ? "solid" : td.style.borderStyle;
|
225 |
-
td.style.borderWidth = td.style.borderWidth == "" ? "1px" : td.style.borderWidth;
|
226 |
-
} else
|
227 |
-
td.style.borderColor = '';
|
228 |
-
|
229 |
-
td.style.backgroundColor = formObj.bgcolor.value;
|
230 |
-
|
231 |
-
if (formObj.backgroundimage.value != "")
|
232 |
-
td.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
233 |
-
else
|
234 |
-
td.style.backgroundImage = '';
|
235 |
-
|
236 |
-
if (curCellType != celltype) {
|
237 |
-
// changing to a different node type
|
238 |
-
var newCell = doc.createElement(celltype);
|
239 |
-
|
240 |
-
for (var c=0; c<td.childNodes.length; c++)
|
241 |
-
newCell.appendChild(td.childNodes[c].cloneNode(1));
|
242 |
-
|
243 |
-
for (var a=0; a<td.attributes.length; a++)
|
244 |
-
ed.dom.setAttrib(newCell, td.attributes[a].name, ed.dom.getAttrib(td, td.attributes[a].name));
|
245 |
-
|
246 |
-
td.parentNode.replaceChild(newCell, td);
|
247 |
-
td = newCell;
|
248 |
-
}
|
249 |
-
|
250 |
-
dom.setAttrib(td, 'style', dom.serializeStyle(dom.parseStyle(td.style.cssText)));
|
251 |
-
|
252 |
-
return td;
|
253 |
-
}
|
254 |
-
|
255 |
-
function changedBackgroundImage() {
|
256 |
-
var formObj = document.forms[0];
|
257 |
-
var st = ed.dom.parseStyle(formObj.style.value);
|
258 |
-
|
259 |
-
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
260 |
-
|
261 |
-
formObj.style.value = ed.dom.serializeStyle(st);
|
262 |
-
}
|
263 |
-
|
264 |
-
function changedSize() {
|
265 |
-
var formObj = document.forms[0];
|
266 |
-
var st = ed.dom.parseStyle(formObj.style.value);
|
267 |
-
|
268 |
-
var width = formObj.width.value;
|
269 |
-
if (width != "")
|
270 |
-
st['width'] = getCSSSize(width);
|
271 |
-
else
|
272 |
-
st['width'] = "";
|
273 |
-
|
274 |
-
var height = formObj.height.value;
|
275 |
-
if (height != "")
|
276 |
-
st['height'] = getCSSSize(height);
|
277 |
-
else
|
278 |
-
st['height'] = "";
|
279 |
-
|
280 |
-
formObj.style.value = ed.dom.serializeStyle(st);
|
281 |
-
}
|
282 |
-
|
283 |
-
function changedColor() {
|
284 |
-
var formObj = document.forms[0];
|
285 |
-
var st = ed.dom.parseStyle(formObj.style.value);
|
286 |
-
|
287 |
-
st['background-color'] = formObj.bgcolor.value;
|
288 |
-
st['border-color'] = formObj.bordercolor.value;
|
289 |
-
|
290 |
-
formObj.style.value = ed.dom.serializeStyle(st);
|
291 |
-
}
|
292 |
-
|
293 |
-
function changedStyle() {
|
294 |
-
var formObj = document.forms[0];
|
295 |
-
var st = ed.dom.parseStyle(formObj.style.value);
|
296 |
-
|
297 |
-
if (st['background-image'])
|
298 |
-
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
299 |
-
else
|
300 |
-
formObj.backgroundimage.value = '';
|
301 |
-
|
302 |
-
if (st['width'])
|
303 |
-
formObj.width.value = trimSize(st['width']);
|
304 |
-
|
305 |
-
if (st['height'])
|
306 |
-
formObj.height.value = trimSize(st['height']);
|
307 |
-
|
308 |
-
if (st['background-color']) {
|
309 |
-
formObj.bgcolor.value = st['background-color'];
|
310 |
-
updateColor('bgcolor_pick','bgcolor');
|
311 |
-
}
|
312 |
-
|
313 |
-
if (st['border-color']) {
|
314 |
-
formObj.bordercolor.value = st['border-color'];
|
315 |
-
updateColor('bordercolor_pick','bordercolor');
|
316 |
-
}
|
317 |
-
}
|
318 |
-
|
319 |
-
tinyMCEPopup.onInit.add(init);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/table/js/merge_cells.js
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
|
3 |
-
var MergeCellsDialog = {
|
4 |
-
init : function() {
|
5 |
-
var f = document.forms[0];
|
6 |
-
|
7 |
-
f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1);
|
8 |
-
f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1);
|
9 |
-
},
|
10 |
-
|
11 |
-
merge : function() {
|
12 |
-
var func, f = document.forms[0];
|
13 |
-
|
14 |
-
tinyMCEPopup.restoreSelection();
|
15 |
-
|
16 |
-
func = tinyMCEPopup.getWindowArg('onaction');
|
17 |
-
|
18 |
-
func({
|
19 |
-
cols : f.numcols.value,
|
20 |
-
rows : f.numrows.value
|
21 |
-
});
|
22 |
-
|
23 |
-
tinyMCEPopup.close();
|
24 |
-
}
|
25 |
-
};
|
26 |
-
|
27 |
-
tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/table/js/row.js
DELETED
@@ -1,237 +0,0 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
|
3 |
-
function init() {
|
4 |
-
tinyMCEPopup.resizeToInnerSize();
|
5 |
-
|
6 |
-
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
7 |
-
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
8 |
-
|
9 |
-
var inst = tinyMCEPopup.editor;
|
10 |
-
var dom = inst.dom;
|
11 |
-
var trElm = dom.getParent(inst.selection.getStart(), "tr");
|
12 |
-
var formObj = document.forms[0];
|
13 |
-
var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
|
14 |
-
|
15 |
-
// Get table row data
|
16 |
-
var rowtype = trElm.parentNode.nodeName.toLowerCase();
|
17 |
-
var align = dom.getAttrib(trElm, 'align');
|
18 |
-
var valign = dom.getAttrib(trElm, 'valign');
|
19 |
-
var height = trimSize(getStyle(trElm, 'height', 'height'));
|
20 |
-
var className = dom.getAttrib(trElm, 'class');
|
21 |
-
var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
|
22 |
-
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
23 |
-
var id = dom.getAttrib(trElm, 'id');
|
24 |
-
var lang = dom.getAttrib(trElm, 'lang');
|
25 |
-
var dir = dom.getAttrib(trElm, 'dir');
|
26 |
-
|
27 |
-
selectByValue(formObj, 'rowtype', rowtype);
|
28 |
-
|
29 |
-
// Any cells selected
|
30 |
-
if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
|
31 |
-
// Setup form
|
32 |
-
addClassesToList('class', 'table_row_styles');
|
33 |
-
TinyMCE_EditableSelects.init();
|
34 |
-
|
35 |
-
formObj.bgcolor.value = bgcolor;
|
36 |
-
formObj.backgroundimage.value = backgroundimage;
|
37 |
-
formObj.height.value = height;
|
38 |
-
formObj.id.value = id;
|
39 |
-
formObj.lang.value = lang;
|
40 |
-
formObj.style.value = dom.serializeStyle(st);
|
41 |
-
selectByValue(formObj, 'align', align);
|
42 |
-
selectByValue(formObj, 'valign', valign);
|
43 |
-
selectByValue(formObj, 'class', className, true, true);
|
44 |
-
selectByValue(formObj, 'dir', dir);
|
45 |
-
|
46 |
-
// Resize some elements
|
47 |
-
if (isVisible('backgroundimagebrowser'))
|
48 |
-
document.getElementById('backgroundimage').style.width = '180px';
|
49 |
-
|
50 |
-
updateColor('bgcolor_pick', 'bgcolor');
|
51 |
-
} else
|
52 |
-
tinyMCEPopup.dom.hide('action');
|
53 |
-
}
|
54 |
-
|
55 |
-
function updateAction() {
|
56 |
-
var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
|
57 |
-
var action = getSelectValue(formObj, 'action');
|
58 |
-
|
59 |
-
if (!AutoValidator.validate(formObj)) {
|
60 |
-
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
61 |
-
return false;
|
62 |
-
}
|
63 |
-
|
64 |
-
tinyMCEPopup.restoreSelection();
|
65 |
-
trElm = dom.getParent(inst.selection.getStart(), "tr");
|
66 |
-
tableElm = dom.getParent(inst.selection.getStart(), "table");
|
67 |
-
|
68 |
-
// Update all selected rows
|
69 |
-
if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) {
|
70 |
-
tinymce.each(tableElm.rows, function(tr) {
|
71 |
-
var i;
|
72 |
-
|
73 |
-
for (i = 0; i < tr.cells.length; i++) {
|
74 |
-
if (dom.hasClass(tr.cells[i], 'mceSelected')) {
|
75 |
-
updateRow(tr, true);
|
76 |
-
return;
|
77 |
-
}
|
78 |
-
}
|
79 |
-
});
|
80 |
-
|
81 |
-
inst.addVisual();
|
82 |
-
inst.nodeChanged();
|
83 |
-
inst.execCommand('mceEndUndoLevel');
|
84 |
-
tinyMCEPopup.close();
|
85 |
-
return;
|
86 |
-
}
|
87 |
-
|
88 |
-
switch (action) {
|
89 |
-
case "row":
|
90 |
-
updateRow(trElm);
|
91 |
-
break;
|
92 |
-
|
93 |
-
case "all":
|
94 |
-
var rows = tableElm.getElementsByTagName("tr");
|
95 |
-
|
96 |
-
for (var i=0; i<rows.length; i++)
|
97 |
-
updateRow(rows[i], true);
|
98 |
-
|
99 |
-
break;
|
100 |
-
|
101 |
-
case "odd":
|
102 |
-
case "even":
|
103 |
-
var rows = tableElm.getElementsByTagName("tr");
|
104 |
-
|
105 |
-
for (var i=0; i<rows.length; i++) {
|
106 |
-
if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
|
107 |
-
updateRow(rows[i], true, true);
|
108 |
-
}
|
109 |
-
|
110 |
-
break;
|
111 |
-
}
|
112 |
-
|
113 |
-
inst.addVisual();
|
114 |
-
inst.nodeChanged();
|
115 |
-
inst.execCommand('mceEndUndoLevel');
|
116 |
-
tinyMCEPopup.close();
|
117 |
-
}
|
118 |
-
|
119 |
-
function updateRow(tr_elm, skip_id, skip_parent) {
|
120 |
-
var inst = tinyMCEPopup.editor;
|
121 |
-
var formObj = document.forms[0];
|
122 |
-
var dom = inst.dom;
|
123 |
-
var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
|
124 |
-
var rowtype = getSelectValue(formObj, 'rowtype');
|
125 |
-
var doc = inst.getDoc();
|
126 |
-
|
127 |
-
// Update row element
|
128 |
-
if (!skip_id)
|
129 |
-
dom.setAttrib(tr_elm, 'id', formObj.id.value);
|
130 |
-
|
131 |
-
dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align'));
|
132 |
-
dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign'));
|
133 |
-
dom.setAttrib(tr_elm, 'lang', formObj.lang.value);
|
134 |
-
dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir'));
|
135 |
-
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
|
136 |
-
dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
|
137 |
-
|
138 |
-
// Clear deprecated attributes
|
139 |
-
dom.setAttrib(tr_elm, 'background', '');
|
140 |
-
dom.setAttrib(tr_elm, 'bgColor', '');
|
141 |
-
dom.setAttrib(tr_elm, 'height', '');
|
142 |
-
|
143 |
-
// Set styles
|
144 |
-
tr_elm.style.height = getCSSSize(formObj.height.value);
|
145 |
-
tr_elm.style.backgroundColor = formObj.bgcolor.value;
|
146 |
-
|
147 |
-
if (formObj.backgroundimage.value != "")
|
148 |
-
tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
149 |
-
else
|
150 |
-
tr_elm.style.backgroundImage = '';
|
151 |
-
|
152 |
-
// Setup new rowtype
|
153 |
-
if (curRowType != rowtype && !skip_parent) {
|
154 |
-
// first, clone the node we are working on
|
155 |
-
var newRow = tr_elm.cloneNode(1);
|
156 |
-
|
157 |
-
// next, find the parent of its new destination (creating it if necessary)
|
158 |
-
var theTable = dom.getParent(tr_elm, "table");
|
159 |
-
var dest = rowtype;
|
160 |
-
var newParent = null;
|
161 |
-
for (var i = 0; i < theTable.childNodes.length; i++) {
|
162 |
-
if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
|
163 |
-
newParent = theTable.childNodes[i];
|
164 |
-
}
|
165 |
-
|
166 |
-
if (newParent == null) {
|
167 |
-
newParent = doc.createElement(dest);
|
168 |
-
|
169 |
-
if (theTable.firstChild.nodeName == 'CAPTION')
|
170 |
-
inst.dom.insertAfter(newParent, theTable.firstChild);
|
171 |
-
else
|
172 |
-
theTable.insertBefore(newParent, theTable.firstChild);
|
173 |
-
}
|
174 |
-
|
175 |
-
// append the row to the new parent
|
176 |
-
newParent.appendChild(newRow);
|
177 |
-
|
178 |
-
// remove the original
|
179 |
-
tr_elm.parentNode.removeChild(tr_elm);
|
180 |
-
|
181 |
-
// set tr_elm to the new node
|
182 |
-
tr_elm = newRow;
|
183 |
-
}
|
184 |
-
|
185 |
-
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
|
186 |
-
}
|
187 |
-
|
188 |
-
function changedBackgroundImage() {
|
189 |
-
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
190 |
-
var st = dom.parseStyle(formObj.style.value);
|
191 |
-
|
192 |
-
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
193 |
-
|
194 |
-
formObj.style.value = dom.serializeStyle(st);
|
195 |
-
}
|
196 |
-
|
197 |
-
function changedStyle() {
|
198 |
-
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
199 |
-
var st = dom.parseStyle(formObj.style.value);
|
200 |
-
|
201 |
-
if (st['background-image'])
|
202 |
-
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
203 |
-
else
|
204 |
-
formObj.backgroundimage.value = '';
|
205 |
-
|
206 |
-
if (st['height'])
|
207 |
-
formObj.height.value = trimSize(st['height']);
|
208 |
-
|
209 |
-
if (st['background-color']) {
|
210 |
-
formObj.bgcolor.value = st['background-color'];
|
211 |
-
updateColor('bgcolor_pick','bgcolor');
|
212 |
-
}
|
213 |
-
}
|
214 |
-
|
215 |
-
function changedSize() {
|
216 |
-
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
217 |
-
var st = dom.parseStyle(formObj.style.value);
|
218 |
-
|
219 |
-
var height = formObj.height.value;
|
220 |
-
if (height != "")
|
221 |
-
st['height'] = getCSSSize(height);
|
222 |
-
else
|
223 |
-
st['height'] = "";
|
224 |
-
|
225 |
-
formObj.style.value = dom.serializeStyle(st);
|
226 |
-
}
|
227 |
-
|
228 |
-
function changedColor() {
|
229 |
-
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
230 |
-
var st = dom.parseStyle(formObj.style.value);
|
231 |
-
|
232 |
-
st['background-color'] = formObj.bgcolor.value;
|
233 |
-
|
234 |
-
formObj.style.value = dom.serializeStyle(st);
|
235 |
-
}
|
236 |
-
|
237 |
-
tinyMCEPopup.onInit.add(init);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/table/js/table.js
DELETED
@@ -1,501 +0,0 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
|
3 |
-
var action, orgTableWidth, orgTableHeight, dom = tinyMCEPopup.editor.dom;
|
4 |
-
|
5 |
-
function insertTable() {
|
6 |
-
var formObj = document.forms[0];
|
7 |
-
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
8 |
-
var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption, frame, rules;
|
9 |
-
var html = '', capEl, elm;
|
10 |
-
var cellLimit, rowLimit, colLimit;
|
11 |
-
|
12 |
-
tinyMCEPopup.restoreSelection();
|
13 |
-
|
14 |
-
if (!AutoValidator.validate(formObj)) {
|
15 |
-
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
16 |
-
return false;
|
17 |
-
}
|
18 |
-
|
19 |
-
elm = dom.getParent(inst.selection.getNode(), 'table');
|
20 |
-
|
21 |
-
// Get form data
|
22 |
-
cols = formObj.elements['cols'].value;
|
23 |
-
rows = formObj.elements['rows'].value;
|
24 |
-
border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
|
25 |
-
cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
|
26 |
-
cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
|
27 |
-
align = getSelectValue(formObj, "align");
|
28 |
-
frame = getSelectValue(formObj, "tframe");
|
29 |
-
rules = getSelectValue(formObj, "rules");
|
30 |
-
width = formObj.elements['width'].value;
|
31 |
-
height = formObj.elements['height'].value;
|
32 |
-
bordercolor = formObj.elements['bordercolor'].value;
|
33 |
-
bgcolor = formObj.elements['bgcolor'].value;
|
34 |
-
className = getSelectValue(formObj, "class");
|
35 |
-
id = formObj.elements['id'].value;
|
36 |
-
summary = formObj.elements['summary'].value;
|
37 |
-
style = formObj.elements['style'].value;
|
38 |
-
dir = formObj.elements['dir'].value;
|
39 |
-
lang = formObj.elements['lang'].value;
|
40 |
-
background = formObj.elements['backgroundimage'].value;
|
41 |
-
caption = formObj.elements['caption'].checked;
|
42 |
-
|
43 |
-
cellLimit = tinyMCEPopup.getParam('table_cell_limit', false);
|
44 |
-
rowLimit = tinyMCEPopup.getParam('table_row_limit', false);
|
45 |
-
colLimit = tinyMCEPopup.getParam('table_col_limit', false);
|
46 |
-
|
47 |
-
// Validate table size
|
48 |
-
if (colLimit && cols > colLimit) {
|
49 |
-
tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit));
|
50 |
-
return false;
|
51 |
-
} else if (rowLimit && rows > rowLimit) {
|
52 |
-
tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit));
|
53 |
-
return false;
|
54 |
-
} else if (cellLimit && cols * rows > cellLimit) {
|
55 |
-
tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit));
|
56 |
-
return false;
|
57 |
-
}
|
58 |
-
|
59 |
-
// Update table
|
60 |
-
if (action == "update") {
|
61 |
-
dom.setAttrib(elm, 'cellPadding', cellpadding, true);
|
62 |
-
dom.setAttrib(elm, 'cellSpacing', cellspacing, true);
|
63 |
-
|
64 |
-
if (!isCssSize(border)) {
|
65 |
-
dom.setAttrib(elm, 'border', border);
|
66 |
-
} else {
|
67 |
-
dom.setAttrib(elm, 'border', '');
|
68 |
-
}
|
69 |
-
|
70 |
-
if (border == '') {
|
71 |
-
dom.setStyle(elm, 'border-width', '');
|
72 |
-
dom.setStyle(elm, 'border', '');
|
73 |
-
dom.setAttrib(elm, 'border', '');
|
74 |
-
}
|
75 |
-
|
76 |
-
dom.setAttrib(elm, 'align', align);
|
77 |
-
dom.setAttrib(elm, 'frame', frame);
|
78 |
-
dom.setAttrib(elm, 'rules', rules);
|
79 |
-
dom.setAttrib(elm, 'class', className);
|
80 |
-
dom.setAttrib(elm, 'style', style);
|
81 |
-
dom.setAttrib(elm, 'id', id);
|
82 |
-
dom.setAttrib(elm, 'summary', summary);
|
83 |
-
dom.setAttrib(elm, 'dir', dir);
|
84 |
-
dom.setAttrib(elm, 'lang', lang);
|
85 |
-
|
86 |
-
capEl = inst.dom.select('caption', elm)[0];
|
87 |
-
|
88 |
-
if (capEl && !caption)
|
89 |
-
capEl.parentNode.removeChild(capEl);
|
90 |
-
|
91 |
-
if (!capEl && caption) {
|
92 |
-
capEl = elm.ownerDocument.createElement('caption');
|
93 |
-
|
94 |
-
if (!tinymce.isIE)
|
95 |
-
capEl.innerHTML = '<br data-mce-bogus="1"/>';
|
96 |
-
|
97 |
-
elm.insertBefore(capEl, elm.firstChild);
|
98 |
-
}
|
99 |
-
|
100 |
-
if (width && inst.settings.inline_styles) {
|
101 |
-
dom.setStyle(elm, 'width', width);
|
102 |
-
dom.setAttrib(elm, 'width', '');
|
103 |
-
} else {
|
104 |
-
dom.setAttrib(elm, 'width', width, true);
|
105 |
-
dom.setStyle(elm, 'width', '');
|
106 |
-
}
|
107 |
-
|
108 |
-
// Remove these since they are not valid XHTML
|
109 |
-
dom.setAttrib(elm, 'borderColor', '');
|
110 |
-
dom.setAttrib(elm, 'bgColor', '');
|
111 |
-
dom.setAttrib(elm, 'background', '');
|
112 |
-
|
113 |
-
if (height && inst.settings.inline_styles) {
|
114 |
-
dom.setStyle(elm, 'height', height);
|
115 |
-
dom.setAttrib(elm, 'height', '');
|
116 |
-
} else {
|
117 |
-
dom.setAttrib(elm, 'height', height, true);
|
118 |
-
dom.setStyle(elm, 'height', '');
|
119 |
-
}
|
120 |
-
|
121 |
-
if (background != '')
|
122 |
-
elm.style.backgroundImage = "url('" + background + "')";
|
123 |
-
else
|
124 |
-
elm.style.backgroundImage = '';
|
125 |
-
|
126 |
-
/* if (tinyMCEPopup.getParam("inline_styles")) {
|
127 |
-
if (width != '')
|
128 |
-
elm.style.width = getCSSSize(width);
|
129 |
-
}*/
|
130 |
-
|
131 |
-
if (bordercolor != "") {
|
132 |
-
elm.style.borderColor = bordercolor;
|
133 |
-
elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle;
|
134 |
-
elm.style.borderWidth = cssSize(border);
|
135 |
-
} else
|
136 |
-
elm.style.borderColor = '';
|
137 |
-
|
138 |
-
elm.style.backgroundColor = bgcolor;
|
139 |
-
elm.style.height = getCSSSize(height);
|
140 |
-
|
141 |
-
inst.addVisual();
|
142 |
-
|
143 |
-
// Fix for stange MSIE align bug
|
144 |
-
//elm.outerHTML = elm.outerHTML;
|
145 |
-
|
146 |
-
inst.nodeChanged();
|
147 |
-
inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
|
148 |
-
|
149 |
-
// Repaint if dimensions changed
|
150 |
-
if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight)
|
151 |
-
inst.execCommand('mceRepaint');
|
152 |
-
|
153 |
-
tinyMCEPopup.close();
|
154 |
-
return true;
|
155 |
-
}
|
156 |
-
|
157 |
-
// Create new table
|
158 |
-
html += '<table';
|
159 |
-
|
160 |
-
html += makeAttrib('id', id);
|
161 |
-
if (!isCssSize(border)) {
|
162 |
-
html += makeAttrib('border', border);
|
163 |
-
}
|
164 |
-
|
165 |
-
html += makeAttrib('cellpadding', cellpadding);
|
166 |
-
html += makeAttrib('cellspacing', cellspacing);
|
167 |
-
html += makeAttrib('data-mce-new', '1');
|
168 |
-
|
169 |
-
if (width && inst.settings.inline_styles) {
|
170 |
-
if (style)
|
171 |
-
style += '; ';
|
172 |
-
|
173 |
-
// Force px
|
174 |
-
if (/^[0-9\.]+$/.test(width))
|
175 |
-
width += 'px';
|
176 |
-
|
177 |
-
style += 'width: ' + width;
|
178 |
-
} else
|
179 |
-
html += makeAttrib('width', width);
|
180 |
-
|
181 |
-
/* if (height) {
|
182 |
-
if (style)
|
183 |
-
style += '; ';
|
184 |
-
|
185 |
-
style += 'height: ' + height;
|
186 |
-
}*/
|
187 |
-
|
188 |
-
//html += makeAttrib('height', height);
|
189 |
-
//html += makeAttrib('bordercolor', bordercolor);
|
190 |
-
//html += makeAttrib('bgcolor', bgcolor);
|
191 |
-
html += makeAttrib('align', align);
|
192 |
-
html += makeAttrib('frame', frame);
|
193 |
-
html += makeAttrib('rules', rules);
|
194 |
-
html += makeAttrib('class', className);
|
195 |
-
html += makeAttrib('style', style);
|
196 |
-
html += makeAttrib('summary', summary);
|
197 |
-
html += makeAttrib('dir', dir);
|
198 |
-
html += makeAttrib('lang', lang);
|
199 |
-
html += '>';
|
200 |
-
|
201 |
-
if (caption) {
|
202 |
-
if (!tinymce.isIE)
|
203 |
-
html += '<caption><br data-mce-bogus="1"/></caption>';
|
204 |
-
else
|
205 |
-
html += '<caption></caption>';
|
206 |
-
}
|
207 |
-
|
208 |
-
for (var y=0; y<rows; y++) {
|
209 |
-
html += "<tr>";
|
210 |
-
|
211 |
-
for (var x=0; x<cols; x++) {
|
212 |
-
if (!tinymce.isIE)
|
213 |
-
html += '<td><br data-mce-bogus="1"/></td>';
|
214 |
-
else
|
215 |
-
html += '<td></td>';
|
216 |
-
}
|
217 |
-
|
218 |
-
html += "</tr>";
|
219 |
-
}
|
220 |
-
|
221 |
-
html += "</table>";
|
222 |
-
|
223 |
-
// Move table
|
224 |
-
if (inst.settings.fix_table_elements) {
|
225 |
-
var patt = '';
|
226 |
-
|
227 |
-
inst.focus();
|
228 |
-
inst.selection.setContent('<br class="_mce_marker" />');
|
229 |
-
|
230 |
-
tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) {
|
231 |
-
if (patt)
|
232 |
-
patt += ',';
|
233 |
-
|
234 |
-
patt += n + ' ._mce_marker';
|
235 |
-
});
|
236 |
-
|
237 |
-
tinymce.each(inst.dom.select(patt), function(n) {
|
238 |
-
inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n);
|
239 |
-
});
|
240 |
-
|
241 |
-
dom.setOuterHTML(dom.select('br._mce_marker')[0], html);
|
242 |
-
} else
|
243 |
-
inst.execCommand('mceInsertContent', false, html);
|
244 |
-
|
245 |
-
tinymce.each(dom.select('table[data-mce-new]'), function(node) {
|
246 |
-
var tdorth = dom.select('td,th', node);
|
247 |
-
|
248 |
-
// Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
|
249 |
-
if (tinymce.isIE && node.nextSibling == null) {
|
250 |
-
if (inst.settings.forced_root_block)
|
251 |
-
dom.insertAfter(dom.create(inst.settings.forced_root_block), node);
|
252 |
-
else
|
253 |
-
dom.insertAfter(dom.create('br', {'data-mce-bogus': '1'}), node);
|
254 |
-
}
|
255 |
-
|
256 |
-
try {
|
257 |
-
// IE9 might fail to do this selection
|
258 |
-
inst.selection.setCursorLocation(tdorth[0], 0);
|
259 |
-
} catch (ex) {
|
260 |
-
// Ignore
|
261 |
-
}
|
262 |
-
|
263 |
-
dom.setAttrib(node, 'data-mce-new', '');
|
264 |
-
});
|
265 |
-
|
266 |
-
inst.addVisual();
|
267 |
-
inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
|
268 |
-
|
269 |
-
tinyMCEPopup.close();
|
270 |
-
}
|
271 |
-
|
272 |
-
function makeAttrib(attrib, value) {
|
273 |
-
var formObj = document.forms[0];
|
274 |
-
var valueElm = formObj.elements[attrib];
|
275 |
-
|
276 |
-
if (typeof(value) == "undefined" || value == null) {
|
277 |
-
value = "";
|
278 |
-
|
279 |
-
if (valueElm)
|
280 |
-
value = valueElm.value;
|
281 |
-
}
|
282 |
-
|
283 |
-
if (value == "")
|
284 |
-
return "";
|
285 |
-
|
286 |
-
// XML encode it
|
287 |
-
value = value.replace(/&/g, '&');
|
288 |
-
value = value.replace(/\"/g, '"');
|
289 |
-
value = value.replace(/</g, '<');
|
290 |
-
value = value.replace(/>/g, '>');
|
291 |
-
|
292 |
-
return ' ' + attrib + '="' + value + '"';
|
293 |
-
}
|
294 |
-
|
295 |
-
function init() {
|
296 |
-
tinyMCEPopup.resizeToInnerSize();
|
297 |
-
|
298 |
-
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
299 |
-
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
300 |
-
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
301 |
-
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
302 |
-
|
303 |
-
var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', '');
|
304 |
-
var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = "";
|
305 |
-
var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = "";
|
306 |
-
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
307 |
-
var formObj = document.forms[0];
|
308 |
-
var elm = dom.getParent(inst.selection.getNode(), "table");
|
309 |
-
|
310 |
-
// Hide advanced fields that isn't available in the schema
|
311 |
-
tinymce.each("summary id rules dir style frame".split(" "), function(name) {
|
312 |
-
var tr = tinyMCEPopup.dom.getParent(name, "tr") || tinyMCEPopup.dom.getParent("t" + name, "tr");
|
313 |
-
|
314 |
-
if (tr && !tinyMCEPopup.editor.schema.isValid("table", name)) {
|
315 |
-
tr.style.display = 'none';
|
316 |
-
}
|
317 |
-
});
|
318 |
-
|
319 |
-
action = tinyMCEPopup.getWindowArg('action');
|
320 |
-
|
321 |
-
if (!action)
|
322 |
-
action = elm ? "update" : "insert";
|
323 |
-
|
324 |
-
if (elm && action != "insert") {
|
325 |
-
var rowsAr = elm.rows;
|
326 |
-
var cols = 0;
|
327 |
-
for (var i=0; i<rowsAr.length; i++)
|
328 |
-
if (rowsAr[i].cells.length > cols)
|
329 |
-
cols = rowsAr[i].cells.length;
|
330 |
-
|
331 |
-
cols = cols;
|
332 |
-
rows = rowsAr.length;
|
333 |
-
|
334 |
-
st = dom.parseStyle(dom.getAttrib(elm, "style"));
|
335 |
-
border = trimSize(getStyle(elm, 'border', 'borderWidth'));
|
336 |
-
cellpadding = dom.getAttrib(elm, 'cellpadding', "");
|
337 |
-
cellspacing = dom.getAttrib(elm, 'cellspacing', "");
|
338 |
-
width = trimSize(getStyle(elm, 'width', 'width'));
|
339 |
-
height = trimSize(getStyle(elm, 'height', 'height'));
|
340 |
-
bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor'));
|
341 |
-
bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor'));
|
342 |
-
align = dom.getAttrib(elm, 'align', align);
|
343 |
-
frame = dom.getAttrib(elm, 'frame');
|
344 |
-
rules = dom.getAttrib(elm, 'rules');
|
345 |
-
className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, ''));
|
346 |
-
id = dom.getAttrib(elm, 'id');
|
347 |
-
summary = dom.getAttrib(elm, 'summary');
|
348 |
-
style = dom.serializeStyle(st);
|
349 |
-
dir = dom.getAttrib(elm, 'dir');
|
350 |
-
lang = dom.getAttrib(elm, 'lang');
|
351 |
-
background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
352 |
-
formObj.caption.checked = elm.getElementsByTagName('caption').length > 0;
|
353 |
-
|
354 |
-
orgTableWidth = width;
|
355 |
-
orgTableHeight = height;
|
356 |
-
|
357 |
-
action = "update";
|
358 |
-
formObj.insert.value = inst.getLang('update');
|
359 |
-
}
|
360 |
-
|
361 |
-
addClassesToList('class', "table_styles");
|
362 |
-
TinyMCE_EditableSelects.init();
|
363 |
-
|
364 |
-
// Update form
|
365 |
-
selectByValue(formObj, 'align', align);
|
366 |
-
selectByValue(formObj, 'tframe', frame);
|
367 |
-
selectByValue(formObj, 'rules', rules);
|
368 |
-
selectByValue(formObj, 'class', className, true, true);
|
369 |
-
formObj.cols.value = cols;
|
370 |
-
formObj.rows.value = rows;
|
371 |
-
formObj.border.value = border;
|
372 |
-
formObj.cellpadding.value = cellpadding;
|
373 |
-
formObj.cellspacing.value = cellspacing;
|
374 |
-
formObj.width.value = width;
|
375 |
-
formObj.height.value = height;
|
376 |
-
formObj.bordercolor.value = bordercolor;
|
377 |
-
formObj.bgcolor.value = bgcolor;
|
378 |
-
formObj.id.value = id;
|
379 |
-
formObj.summary.value = summary;
|
380 |
-
formObj.style.value = style;
|
381 |
-
formObj.dir.value = dir;
|
382 |
-
formObj.lang.value = lang;
|
383 |
-
formObj.backgroundimage.value = background;
|
384 |
-
|
385 |
-
updateColor('bordercolor_pick', 'bordercolor');
|
386 |
-
updateColor('bgcolor_pick', 'bgcolor');
|
387 |
-
|
388 |
-
// Resize some elements
|
389 |
-
if (isVisible('backgroundimagebrowser'))
|
390 |
-
document.getElementById('backgroundimage').style.width = '180px';
|
391 |
-
|
392 |
-
// Disable some fields in update mode
|
393 |
-
if (action == "update") {
|
394 |
-
formObj.cols.disabled = true;
|
395 |
-
formObj.rows.disabled = true;
|
396 |
-
}
|
397 |
-
}
|
398 |
-
|
399 |
-
function changedSize() {
|
400 |
-
var formObj = document.forms[0];
|
401 |
-
var st = dom.parseStyle(formObj.style.value);
|
402 |
-
|
403 |
-
/* var width = formObj.width.value;
|
404 |
-
if (width != "")
|
405 |
-
st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : "";
|
406 |
-
else
|
407 |
-
st['width'] = "";*/
|
408 |
-
|
409 |
-
var height = formObj.height.value;
|
410 |
-
if (height != "")
|
411 |
-
st['height'] = getCSSSize(height);
|
412 |
-
else
|
413 |
-
st['height'] = "";
|
414 |
-
|
415 |
-
formObj.style.value = dom.serializeStyle(st);
|
416 |
-
}
|
417 |
-
|
418 |
-
function isCssSize(value) {
|
419 |
-
return /^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)$/.test(value);
|
420 |
-
}
|
421 |
-
|
422 |
-
function cssSize(value, def) {
|
423 |
-
value = tinymce.trim(value || def);
|
424 |
-
|
425 |
-
if (!isCssSize(value)) {
|
426 |
-
return parseInt(value, 10) + 'px';
|
427 |
-
}
|
428 |
-
|
429 |
-
return value;
|
430 |
-
}
|
431 |
-
|
432 |
-
function changedBackgroundImage() {
|
433 |
-
var formObj = document.forms[0];
|
434 |
-
var st = dom.parseStyle(formObj.style.value);
|
435 |
-
|
436 |
-
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
437 |
-
|
438 |
-
formObj.style.value = dom.serializeStyle(st);
|
439 |
-
}
|
440 |
-
|
441 |
-
function changedBorder() {
|
442 |
-
var formObj = document.forms[0];
|
443 |
-
var st = dom.parseStyle(formObj.style.value);
|
444 |
-
|
445 |
-
// Update border width if the element has a color
|
446 |
-
if (formObj.border.value != "" && (isCssSize(formObj.border.value) || formObj.bordercolor.value != ""))
|
447 |
-
st['border-width'] = cssSize(formObj.border.value);
|
448 |
-
else {
|
449 |
-
if (!formObj.border.value) {
|
450 |
-
st['border'] = '';
|
451 |
-
st['border-width'] = '';
|
452 |
-
}
|
453 |
-
}
|
454 |
-
|
455 |
-
formObj.style.value = dom.serializeStyle(st);
|
456 |
-
}
|
457 |
-
|
458 |
-
function changedColor() {
|
459 |
-
var formObj = document.forms[0];
|
460 |
-
var st = dom.parseStyle(formObj.style.value);
|
461 |
-
|
462 |
-
st['background-color'] = formObj.bgcolor.value;
|
463 |
-
|
464 |
-
if (formObj.bordercolor.value != "") {
|
465 |
-
st['border-color'] = formObj.bordercolor.value;
|
466 |
-
|
467 |
-
// Add border-width if it's missing
|
468 |
-
if (!st['border-width'])
|
469 |
-
st['border-width'] = cssSize(formObj.border.value, 1);
|
470 |
-
}
|
471 |
-
|
472 |
-
formObj.style.value = dom.serializeStyle(st);
|
473 |
-
}
|
474 |
-
|
475 |
-
function changedStyle() {
|
476 |
-
var formObj = document.forms[0];
|
477 |
-
var st = dom.parseStyle(formObj.style.value);
|
478 |
-
|
479 |
-
if (st['background-image'])
|
480 |
-
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
481 |
-
else
|
482 |
-
formObj.backgroundimage.value = '';
|
483 |
-
|
484 |
-
if (st['width'])
|
485 |
-
formObj.width.value = trimSize(st['width']);
|
486 |
-
|
487 |
-
if (st['height'])
|
488 |
-
formObj.height.value = trimSize(st['height']);
|
489 |
-
|
490 |
-
if (st['background-color']) {
|
491 |
-
formObj.bgcolor.value = st['background-color'];
|
492 |
-
updateColor('bgcolor_pick','bgcolor');
|
493 |
-
}
|
494 |
-
|
495 |
-
if (st['border-color']) {
|
496 |
-
formObj.bordercolor.value = st['border-color'];
|
497 |
-
updateColor('bordercolor_pick','bordercolor');
|
498 |
-
}
|
499 |
-
}
|
500 |
-
|
501 |
-
tinyMCEPopup.onInit.add(init);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/table/langs/en_dlg.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
tinyMCE.addI18n('en.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table Caption","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"You\'ve exceeded the maximum number of cells of {$cells}.","row_limit":"You\'ve exceeded the maximum number of rows of {$rows}.","col_limit":"You\'ve exceeded the maximum number of columns of {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Footer",tbody:"Body",thead:"Header","row_all":"Update All Rows in Table","row_even":"Update Even Rows in Table","row_odd":"Update Odd Rows in Table","row_row":"Update Current Row","cell_all":"Update All Cells in Table","cell_row":"Update All Cells in Row","cell_cell":"Update Current Cell",th:"Header",td:"Data",summary:"Summary",bgimage:"Background Image",rtl:"Right to Left",ltr:"Left to Right",mime:"Target MIME Type",langcode:"Language Code",langdir:"Language Direction",style:"Style",id:"ID","merge_cells_title":"Merge Table Cells",bgcolor:"Background Color",bordercolor:"Border Color","align_bottom":"Bottom","align_top":"Top",valign:"Vertical Alignment","cell_type":"Cell Type","cell_title":"Table Cell Properties","row_title":"Table Row Properties","align_middle":"Center","align_right":"Right","align_left":"Left","align_default":"Default",align:"Alignment",border:"Border",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",rows:"Rows",cols:"Columns",height:"Height",width:"Width",title:"Insert/Edit Table",rowtype:"Row Type","advanced_props":"Advanced Properties","general_props":"General Properties","advanced_tab":"Advanced","general_tab":"General","cell_col":"Update all cells in column"});
|
|
tiny_mce/plugins/table/merge_cells.htm
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#table_dlg.merge_cells_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
-
<script type="text/javascript" src="../../utils/validate.js"></script>
|
8 |
-
<script type="text/javascript" src="js/merge_cells.js"></script>
|
9 |
-
</head>
|
10 |
-
<body style="margin: 8px" role="application">
|
11 |
-
<form onsubmit="MergeCellsDialog.merge();return false;" action="#">
|
12 |
-
<fieldset>
|
13 |
-
<legend>{#table_dlg.merge_cells_title}</legend>
|
14 |
-
<table role="presentation" border="0" cellpadding="0" cellspacing="3" width="100%">
|
15 |
-
<tr>
|
16 |
-
<td><label for="numcols">{#table_dlg.cols}</label>:</td>
|
17 |
-
<td align="right"><input type="text" id="numcols" name="numcols" value="" class="number min1 mceFocus" style="width: 30px" aria-required="true" /></td>
|
18 |
-
</tr>
|
19 |
-
<tr>
|
20 |
-
<td><label for="numrows">{#table_dlg.rows}</label>:</td>
|
21 |
-
<td align="right"><input type="text" id="numrows" name="numrows" value="" class="number min1" style="width: 30px" aria-required="true" /></td>
|
22 |
-
</tr>
|
23 |
-
</table>
|
24 |
-
</fieldset>
|
25 |
-
|
26 |
-
<div class="mceActionPanel">
|
27 |
-
<input type="submit" id="insert" name="insert" value="{#update}" />
|
28 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
29 |
-
</div>
|
30 |
-
</form>
|
31 |
-
</body>
|
32 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/table/row.htm
DELETED
@@ -1,158 +0,0 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#table_dlg.row_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
8 |
-
<script type="text/javascript" src="../../utils/validate.js"></script>
|
9 |
-
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
10 |
-
<script type="text/javascript" src="js/row.js"></script>
|
11 |
-
<link href="css/row.css" rel="stylesheet" type="text/css" />
|
12 |
-
</head>
|
13 |
-
<body id="tablerow" style="display: none" role="application">
|
14 |
-
<form onsubmit="updateAction();return false;" action="#">
|
15 |
-
<div class="tabs">
|
16 |
-
<ul>
|
17 |
-
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
18 |
-
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
19 |
-
</ul>
|
20 |
-
</div>
|
21 |
-
|
22 |
-
<div class="panel_wrapper">
|
23 |
-
<div id="general_panel" class="panel current">
|
24 |
-
<fieldset>
|
25 |
-
<legend>{#table_dlg.general_props}</legend>
|
26 |
-
|
27 |
-
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
28 |
-
<tr>
|
29 |
-
<td><label for="rowtype">{#table_dlg.rowtype}</label></td>
|
30 |
-
<td class="col2">
|
31 |
-
<select id="rowtype" name="rowtype" class="mceFocus">
|
32 |
-
<option value="thead">{#table_dlg.thead}</option>
|
33 |
-
<option value="tbody">{#table_dlg.tbody}</option>
|
34 |
-
<option value="tfoot">{#table_dlg.tfoot}</option>
|
35 |
-
</select>
|
36 |
-
</td>
|
37 |
-
</tr>
|
38 |
-
|
39 |
-
<tr>
|
40 |
-
<td><label for="align">{#table_dlg.align}</label></td>
|
41 |
-
<td class="col2">
|
42 |
-
<select id="align" name="align">
|
43 |
-
<option value="">{#not_set}</option>
|
44 |
-
<option value="center">{#table_dlg.align_middle}</option>
|
45 |
-
<option value="left">{#table_dlg.align_left}</option>
|
46 |
-
<option value="right">{#table_dlg.align_right}</option>
|
47 |
-
</select>
|
48 |
-
</td>
|
49 |
-
</tr>
|
50 |
-
|
51 |
-
<tr>
|
52 |
-
<td><label for="valign">{#table_dlg.valign}</label></td>
|
53 |
-
<td class="col2">
|
54 |
-
<select id="valign" name="valign">
|
55 |
-
<option value="">{#not_set}</option>
|
56 |
-
<option value="top">{#table_dlg.align_top}</option>
|
57 |
-
<option value="middle">{#table_dlg.align_middle}</option>
|
58 |
-
<option value="bottom">{#table_dlg.align_bottom}</option>
|
59 |
-
</select>
|
60 |
-
</td>
|
61 |
-
</tr>
|
62 |
-
|
63 |
-
<tr id="styleSelectRow">
|
64 |
-
<td><label for="class">{#class_name}</label></td>
|
65 |
-
<td class="col2">
|
66 |
-
<select id="class" name="class" class="mceEditableSelect">
|
67 |
-
<option value="" selected="selected">{#not_set}</option>
|
68 |
-
</select>
|
69 |
-
</td>
|
70 |
-
</tr>
|
71 |
-
|
72 |
-
<tr>
|
73 |
-
<td><label for="height">{#table_dlg.height}</label></td>
|
74 |
-
<td class="col2"><input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
|
75 |
-
</tr>
|
76 |
-
</table>
|
77 |
-
</fieldset>
|
78 |
-
</div>
|
79 |
-
|
80 |
-
<div id="advanced_panel" class="panel">
|
81 |
-
<fieldset>
|
82 |
-
<legend>{#table_dlg.advanced_props}</legend>
|
83 |
-
|
84 |
-
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
|
85 |
-
<tr>
|
86 |
-
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
87 |
-
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
|
88 |
-
</tr>
|
89 |
-
|
90 |
-
<tr>
|
91 |
-
<td><label for="style">{#table_dlg.style}</label></td>
|
92 |
-
<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
|
93 |
-
</tr>
|
94 |
-
|
95 |
-
<tr>
|
96 |
-
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
97 |
-
<td>
|
98 |
-
<select id="dir" name="dir" style="width: 200px">
|
99 |
-
<option value="">{#not_set}</option>
|
100 |
-
<option value="ltr">{#table_dlg.ltr}</option>
|
101 |
-
<option value="rtl">{#table_dlg.rtl}</option>
|
102 |
-
</select>
|
103 |
-
</td>
|
104 |
-
</tr>
|
105 |
-
|
106 |
-
<tr>
|
107 |
-
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
|
108 |
-
<td>
|
109 |
-
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
|
110 |
-
</td>
|
111 |
-
</tr>
|
112 |
-
|
113 |
-
<tr>
|
114 |
-
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
115 |
-
<td>
|
116 |
-
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
117 |
-
<tr>
|
118 |
-
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
|
119 |
-
<td id="backgroundimagebrowsercontainer"> </td>
|
120 |
-
</tr>
|
121 |
-
</table>
|
122 |
-
</td>
|
123 |
-
</tr>
|
124 |
-
|
125 |
-
<tr>
|
126 |
-
<td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
|
127 |
-
<td>
|
128 |
-
<span role="group" aria-labelledby="bgcolor_label">
|
129 |
-
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
130 |
-
<tr>
|
131 |
-
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
132 |
-
<td id="bgcolor_pickcontainer"> </td>
|
133 |
-
</tr>
|
134 |
-
</table>
|
135 |
-
</span>
|
136 |
-
</td>
|
137 |
-
</tr>
|
138 |
-
</table>
|
139 |
-
</fieldset>
|
140 |
-
</div>
|
141 |
-
</div>
|
142 |
-
|
143 |
-
<div class="mceActionPanel">
|
144 |
-
<div>
|
145 |
-
<select id="action" name="action">
|
146 |
-
<option value="row">{#table_dlg.row_row}</option>
|
147 |
-
<option value="odd">{#table_dlg.row_odd}</option>
|
148 |
-
<option value="even">{#table_dlg.row_even}</option>
|
149 |
-
<option value="all">{#table_dlg.row_all}</option>
|
150 |
-
</select>
|
151 |
-
</div>
|
152 |
-
|
153 |
-
<input type="submit" id="insert" name="insert" value="{#update}" />
|
154 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
155 |
-
</div>
|
156 |
-
</form>
|
157 |
-
</body>
|
158 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/plugins/table/table.htm
DELETED
@@ -1,188 +0,0 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#table_dlg.title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
8 |
-
<script type="text/javascript" src="../../utils/validate.js"></script>
|
9 |
-
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
10 |
-
<script type="text/javascript" src="js/table.js"></script>
|
11 |
-
<link href="css/table.css" rel="stylesheet" type="text/css" />
|
12 |
-
</head>
|
13 |
-
<body id="table" style="display: none" role="application" aria-labelledby="app_title">
|
14 |
-
<span style="display:none;" id="app_title">{#table_dlg.title}</span>
|
15 |
-
<form onsubmit="insertTable();return false;" action="#">
|
16 |
-
<div class="tabs">
|
17 |
-
<ul>
|
18 |
-
<li id="general_tab" aria-controls="general_panel" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
19 |
-
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
20 |
-
</ul>
|
21 |
-
</div>
|
22 |
-
|
23 |
-
<div class="panel_wrapper">
|
24 |
-
<div id="general_panel" class="panel current">
|
25 |
-
<fieldset>
|
26 |
-
<legend>{#table_dlg.general_props}</legend>
|
27 |
-
<table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
|
28 |
-
<tr>
|
29 |
-
<td><label id="colslabel" for="cols">{#table_dlg.cols}</label></td>
|
30 |
-
<td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1 mceFocus" aria-required="true" /></td>
|
31 |
-
<td><label id="rowslabel" for="rows">{#table_dlg.rows}</label></td>
|
32 |
-
<td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" aria-required="true" /></td>
|
33 |
-
</tr>
|
34 |
-
<tr>
|
35 |
-
<td><label id="cellpaddinglabel" for="cellpadding">{#table_dlg.cellpadding}</label></td>
|
36 |
-
<td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" /></td>
|
37 |
-
<td><label id="cellspacinglabel" for="cellspacing">{#table_dlg.cellspacing}</label></td>
|
38 |
-
<td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" /></td>
|
39 |
-
</tr>
|
40 |
-
<tr>
|
41 |
-
<td><label id="alignlabel" for="align">{#table_dlg.align}</label></td>
|
42 |
-
<td><select id="align" name="align">
|
43 |
-
<option value="">{#not_set}</option>
|
44 |
-
<option value="center">{#table_dlg.align_middle}</option>
|
45 |
-
<option value="left">{#table_dlg.align_left}</option>
|
46 |
-
<option value="right">{#table_dlg.align_right}</option>
|
47 |
-
</select></td>
|
48 |
-
<td><label id="borderlabel" for="border">{#table_dlg.border}</label></td>
|
49 |
-
<td><input id="border" name="border" type="text" value="" size="3" maxlength="5" onchange="changedBorder();" class="size" /></td>
|
50 |
-
</tr>
|
51 |
-
<tr id="width_row">
|
52 |
-
<td><label id="widthlabel" for="width">{#table_dlg.width}</label></td>
|
53 |
-
<td><input name="width" type="text" id="width" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
|
54 |
-
<td><label id="heightlabel" for="height">{#table_dlg.height}</label></td>
|
55 |
-
<td><input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
|
56 |
-
</tr>
|
57 |
-
<tr id="styleSelectRow" >
|
58 |
-
<td><label id="classlabel" for="class">{#class_name}</label></td>
|
59 |
-
<td colspan="3" >
|
60 |
-
<select id="class" name="class" class="mceEditableSelect">
|
61 |
-
<option value="" selected="selected">{#not_set}</option>
|
62 |
-
</select></td>
|
63 |
-
</tr>
|
64 |
-
<tr>
|
65 |
-
<td class="column1" ><label for="caption">{#table_dlg.caption}</label></td>
|
66 |
-
<td><input id="caption" name="caption" type="checkbox" class="checkbox" value="true" /></td>
|
67 |
-
</tr>
|
68 |
-
</table>
|
69 |
-
</fieldset>
|
70 |
-
</div>
|
71 |
-
|
72 |
-
<div id="advanced_panel" class="panel">
|
73 |
-
<fieldset>
|
74 |
-
<legend>{#table_dlg.advanced_props}</legend>
|
75 |
-
|
76 |
-
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
|
77 |
-
<tr>
|
78 |
-
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
79 |
-
<td><input id="id" name="id" type="text" value="" class="advfield" /></td>
|
80 |
-
</tr>
|
81 |
-
|
82 |
-
<tr>
|
83 |
-
<td class="column1"><label for="summary">{#table_dlg.summary}</label></td>
|
84 |
-
<td><input id="summary" name="summary" type="text" value="" class="advfield" /></td>
|
85 |
-
</tr>
|
86 |
-
|
87 |
-
<tr>
|
88 |
-
<td><label for="style">{#table_dlg.style}</label></td>
|
89 |
-
<td><input type="text" id="style" name="style" value="" class="advfield" onchange="changedStyle();" /></td>
|
90 |
-
</tr>
|
91 |
-
|
92 |
-
<tr>
|
93 |
-
<td class="column1"><label id="langlabel" for="lang">{#table_dlg.langcode}</label></td>
|
94 |
-
<td>
|
95 |
-
<input id="lang" name="lang" type="text" value="" class="advfield" />
|
96 |
-
</td>
|
97 |
-
</tr>
|
98 |
-
|
99 |
-
<tr>
|
100 |
-
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
101 |
-
<td>
|
102 |
-
<table role="presentation" aria-labelledby="backgroundimage_label" border="0" cellpadding="0" cellspacing="0">
|
103 |
-
<tr>
|
104 |
-
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" class="advfield" onchange="changedBackgroundImage();" /></td>
|
105 |
-
<td id="backgroundimagebrowsercontainer"> </td>
|
106 |
-
</tr>
|
107 |
-
</table>
|
108 |
-
</td>
|
109 |
-
</tr>
|
110 |
-
|
111 |
-
<tr>
|
112 |
-
<td class="column1"><label for="tframe">{#table_dlg.frame}</label></td>
|
113 |
-
<td>
|
114 |
-
<select id="tframe" name="tframe" class="advfield">
|
115 |
-
<option value="">{#not_set}</option>
|
116 |
-
<option value="void">{#table_dlg.rules_void}</option>
|
117 |
-
<option value="above">{#table_dlg.rules_above}</option>
|
118 |
-
<option value="below">{#table_dlg.rules_below}</option>
|
119 |
-
<option value="hsides">{#table_dlg.rules_hsides}</option>
|
120 |
-
<option value="lhs">{#table_dlg.rules_lhs}</option>
|
121 |
-
<option value="rhs">{#table_dlg.rules_rhs}</option>
|
122 |
-
<option value="vsides">{#table_dlg.rules_vsides}</option>
|
123 |
-
<option value="box">{#table_dlg.rules_box}</option>
|
124 |
-
<option value="border">{#table_dlg.rules_border}</option>
|
125 |
-
</select>
|
126 |
-
</td>
|
127 |
-
</tr>
|
128 |
-
|
129 |
-
<tr>
|
130 |
-
<td class="column1"><label for="rules">{#table_dlg.rules}</label></td>
|
131 |
-
<td>
|
132 |
-
<select id="rules" name="rules" class="advfield">
|
133 |
-
<option value="">{#not_set}</option>
|
134 |
-
<option value="none">{#table_dlg.frame_none}</option>
|
135 |
-
<option value="groups">{#table_dlg.frame_groups}</option>
|
136 |
-
<option value="rows">{#table_dlg.frame_rows}</option>
|
137 |
-
<option value="cols">{#table_dlg.frame_cols}</option>
|
138 |
-
<option value="all">{#table_dlg.frame_all}</option>
|
139 |
-
</select>
|
140 |
-
</td>
|
141 |
-
</tr>
|
142 |
-
|
143 |
-
<tr>
|
144 |
-
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
145 |
-
<td>
|
146 |
-
<select id="dir" name="dir" class="advfield">
|
147 |
-
<option value="">{#not_set}</option>
|
148 |
-
<option value="ltr">{#table_dlg.ltr}</option>
|
149 |
-
<option value="rtl">{#table_dlg.rtl}</option>
|
150 |
-
</select>
|
151 |
-
</td>
|
152 |
-
</tr>
|
153 |
-
|
154 |
-
<tr role="group" aria-labelledby="bordercolor_label">
|
155 |
-
<td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>
|
156 |
-
<td>
|
157 |
-
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
158 |
-
<tr>
|
159 |
-
<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
|
160 |
-
<td id="bordercolor_pickcontainer"> </td>
|
161 |
-
</tr>
|
162 |
-
</table>
|
163 |
-
</td>
|
164 |
-
</tr>
|
165 |
-
|
166 |
-
<tr role="group" aria-labelledby="bgcolor_label">
|
167 |
-
<td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>
|
168 |
-
<td>
|
169 |
-
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
170 |
-
<tr>
|
171 |
-
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
172 |
-
<td id="bgcolor_pickcontainer"> </td>
|
173 |
-
</tr>
|
174 |
-
</table>
|
175 |
-
</td>
|
176 |
-
</tr>
|
177 |
-
</table>
|
178 |
-
</fieldset>
|
179 |
-
</div>
|
180 |
-
</div>
|
181 |
-
|
182 |
-
<div class="mceActionPanel">
|
183 |
-
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
184 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
185 |
-
</div>
|
186 |
-
</form>
|
187 |
-
</body>
|
188 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/about.htm
DELETED
@@ -1,52 +0,0 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#advanced_dlg.about_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
-
<script type="text/javascript" src="js/about.js"></script>
|
8 |
-
</head>
|
9 |
-
<body id="about" style="display: none">
|
10 |
-
<div class="tabs">
|
11 |
-
<ul>
|
12 |
-
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span></li>
|
13 |
-
<li id="help_tab" style="display:none" aria-hidden="true" aria-controls="help_panel"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span></li>
|
14 |
-
<li id="plugins_tab" aria-controls="plugins_panel"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span></li>
|
15 |
-
</ul>
|
16 |
-
</div>
|
17 |
-
|
18 |
-
<div class="panel_wrapper">
|
19 |
-
<div id="general_panel" class="panel current">
|
20 |
-
<h3>{#advanced_dlg.about_title}</h3>
|
21 |
-
<p>Version: <span id="version"></span> (<span id="date"></span>)</p>
|
22 |
-
<p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
|
23 |
-
by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
|
24 |
-
<p>Copyright © 2003-2008, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
|
25 |
-
<p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
|
26 |
-
|
27 |
-
<div id="buttoncontainer">
|
28 |
-
<a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a>
|
29 |
-
</div>
|
30 |
-
</div>
|
31 |
-
|
32 |
-
<div id="plugins_panel" class="panel">
|
33 |
-
<div id="pluginscontainer">
|
34 |
-
<h3>{#advanced_dlg.about_loaded}</h3>
|
35 |
-
|
36 |
-
<div id="plugintablecontainer">
|
37 |
-
</div>
|
38 |
-
|
39 |
-
<p> </p>
|
40 |
-
</div>
|
41 |
-
</div>
|
42 |
-
|
43 |
-
<div id="help_panel" class="panel noscroll" style="overflow: visible;">
|
44 |
-
<div id="iframecontainer"></div>
|
45 |
-
</div>
|
46 |
-
</div>
|
47 |
-
|
48 |
-
<div class="mceActionPanel">
|
49 |
-
<input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
|
50 |
-
</div>
|
51 |
-
</body>
|
52 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/anchor.htm
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#advanced_dlg.anchor_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
-
<script type="text/javascript" src="js/anchor.js"></script>
|
7 |
-
</head>
|
8 |
-
<body style="display: none" role="application" aria-labelledby="app_title">
|
9 |
-
<form onsubmit="AnchorDialog.update();return false;" action="#">
|
10 |
-
<table border="0" cellpadding="4" cellspacing="0" role="presentation">
|
11 |
-
<tr>
|
12 |
-
<td colspan="2" class="title" id="app_title">{#advanced_dlg.anchor_title}</td>
|
13 |
-
</tr>
|
14 |
-
<tr>
|
15 |
-
<td class="nowrap"><label for="anchorName">{#advanced_dlg.anchor_name}:</label></td>
|
16 |
-
<td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" aria-required="true" /></td>
|
17 |
-
</tr>
|
18 |
-
</table>
|
19 |
-
|
20 |
-
<div class="mceActionPanel">
|
21 |
-
<input type="submit" id="insert" name="insert" value="{#update}" />
|
22 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
23 |
-
</div>
|
24 |
-
</form>
|
25 |
-
</body>
|
26 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/charmap.htm
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#advanced_dlg.charmap_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
-
<script type="text/javascript" src="js/charmap.js"></script>
|
7 |
-
</head>
|
8 |
-
<body id="charmap" style="display:none" role="application">
|
9 |
-
<table align="center" border="0" cellspacing="0" cellpadding="2" role="presentation">
|
10 |
-
<tr>
|
11 |
-
<td colspan="2" class="title" ><label for="charmapView" id="charmap_label">{#advanced_dlg.charmap_title}</label></td>
|
12 |
-
</tr>
|
13 |
-
<tr>
|
14 |
-
<td id="charmapView" rowspan="2" align="left" valign="top">
|
15 |
-
<!-- Chars will be rendered here -->
|
16 |
-
</td>
|
17 |
-
<td width="100" align="center" valign="top">
|
18 |
-
<table border="0" cellpadding="0" cellspacing="0" width="100" style="height:100px" role="presentation">
|
19 |
-
<tr>
|
20 |
-
<td id="codeV"> </td>
|
21 |
-
</tr>
|
22 |
-
<tr>
|
23 |
-
<td id="codeN"> </td>
|
24 |
-
</tr>
|
25 |
-
</table>
|
26 |
-
</td>
|
27 |
-
</tr>
|
28 |
-
<tr>
|
29 |
-
<td valign="bottom" style="padding-bottom: 3px;">
|
30 |
-
<table width="100" align="center" border="0" cellpadding="2" cellspacing="0" role="presentation">
|
31 |
-
<tr>
|
32 |
-
<td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeA">HTML-Code</label></td>
|
33 |
-
</tr>
|
34 |
-
<tr>
|
35 |
-
<td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeA" align="center"> </td>
|
36 |
-
</tr>
|
37 |
-
<tr>
|
38 |
-
<td style="font-size: 1px;"> </td>
|
39 |
-
</tr>
|
40 |
-
<tr>
|
41 |
-
<td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeB">NUM-Code</label></td>
|
42 |
-
</tr>
|
43 |
-
<tr>
|
44 |
-
<td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeB" align="center"> </td>
|
45 |
-
</tr>
|
46 |
-
</table>
|
47 |
-
</td>
|
48 |
-
</tr>
|
49 |
-
<tr>
|
50 |
-
<td colspan="2" id="charmap_usage">{#advanced_dlg.charmap_usage}</td>
|
51 |
-
</tr>
|
52 |
-
|
53 |
-
</table>
|
54 |
-
</body>
|
55 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/color_picker.htm
DELETED
@@ -1,70 +0,0 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#advanced_dlg.colorpicker_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
-
<script type="text/javascript" src="js/color_picker.js"></script>
|
8 |
-
</head>
|
9 |
-
<body id="colorpicker" style="display: none" role="application" aria-labelledby="app_label">
|
10 |
-
<span class="mceVoiceLabel" id="app_label" style="display:none;">{#advanced_dlg.colorpicker_title}</span>
|
11 |
-
<form onsubmit="insertAction();return false" action="#">
|
12 |
-
<div class="tabs">
|
13 |
-
<ul>
|
14 |
-
<li id="picker_tab" aria-controls="picker_panel" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span></li>
|
15 |
-
<li id="rgb_tab" aria-controls="rgb_panel"><span><a href="javascript:;" onclick="mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span></li>
|
16 |
-
<li id="named_tab" aria-controls="named_panel"><span><a href="javascript:;" onclick="javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span></li>
|
17 |
-
</ul>
|
18 |
-
</div>
|
19 |
-
|
20 |
-
<div class="panel_wrapper">
|
21 |
-
<div id="picker_panel" class="panel current">
|
22 |
-
<fieldset>
|
23 |
-
<legend>{#advanced_dlg.colorpicker_picker_title}</legend>
|
24 |
-
<div id="picker">
|
25 |
-
<img id="colors" src="img/colorpicker.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" alt="" />
|
26 |
-
|
27 |
-
<div id="light">
|
28 |
-
<!-- Will be filled with divs -->
|
29 |
-
</div>
|
30 |
-
|
31 |
-
<br style="clear: both" />
|
32 |
-
</div>
|
33 |
-
</fieldset>
|
34 |
-
</div>
|
35 |
-
|
36 |
-
<div id="rgb_panel" class="panel">
|
37 |
-
<fieldset>
|
38 |
-
<legend id="webcolors_title">{#advanced_dlg.colorpicker_palette_title}</legend>
|
39 |
-
<div id="webcolors">
|
40 |
-
<!-- Gets filled with web safe colors-->
|
41 |
-
</div>
|
42 |
-
|
43 |
-
<br style="clear: both" />
|
44 |
-
</fieldset>
|
45 |
-
</div>
|
46 |
-
|
47 |
-
<div id="named_panel" class="panel">
|
48 |
-
<fieldset id="named_picker_label">
|
49 |
-
<legend id="named_title">{#advanced_dlg.colorpicker_named_title}</legend>
|
50 |
-
<div id="namedcolors" role="listbox" tabindex="0" aria-labelledby="named_picker_label">
|
51 |
-
<!-- Gets filled with named colors-->
|
52 |
-
</div>
|
53 |
-
|
54 |
-
<br style="clear: both" />
|
55 |
-
|
56 |
-
<div id="colornamecontainer">
|
57 |
-
{#advanced_dlg.colorpicker_name} <span id="colorname"></span>
|
58 |
-
</div>
|
59 |
-
</fieldset>
|
60 |
-
</div>
|
61 |
-
</div>
|
62 |
-
|
63 |
-
<div class="mceActionPanel">
|
64 |
-
<input type="submit" id="insert" name="insert" value="{#apply}" />
|
65 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();"/>
|
66 |
-
<div id="preview_wrapper"><div id="previewblock"><label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8" class="text mceFocus" aria-required="true" /></div><span id="preview"></span></div>
|
67 |
-
</div>
|
68 |
-
</form>
|
69 |
-
</body>
|
70 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/editor_template.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(h){var i=h.DOM,g=h.dom.Event,c=h.extend,f=h.each,a=h.util.Cookie,e,d=h.explode;function b(p,m){var k,l,o=p.dom,j="",n,r;previewStyles=p.settings.preview_styles;if(previewStyles===false){return""}if(!previewStyles){previewStyles="font-family font-size font-weight text-decoration text-transform color background-color"}function q(s){return s.replace(/%(\w+)/g,"")}k=m.block||m.inline||"span";l=o.create(k);f(m.styles,function(t,s){t=q(t);if(t){o.setStyle(l,s,t)}});f(m.attributes,function(t,s){t=q(t);if(t){o.setAttrib(l,s,t)}});f(m.classes,function(s){s=q(s);if(!o.hasClass(l,s)){o.addClass(l,s)}});o.setStyles(l,{position:"absolute",left:-65535});p.getBody().appendChild(l);n=o.getStyle(p.getBody(),"fontSize",true);n=/px$/.test(n)?parseInt(n,10):0;f(previewStyles.split(" "),function(s){var t=o.getStyle(l,s,true);if(s=="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)){t=o.getStyle(p.getBody(),s,true);if(o.toHex(t).toLowerCase()=="#ffffff"){return}}if(s=="font-size"){if(/em|%$/.test(t)){if(n===0){return}t=parseFloat(t,10)/(/%$/.test(t)?100:1);t=(t*n)+"px"}}j+=s+":"+t+";"});o.remove(l);return j}h.ThemeManager.requireLangPack("advanced");h.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(k,l){var m=this,n,j,p;m.editor=k;m.url=l;m.onResolveName=new h.util.Dispatcher(this);n=k.settings;k.forcedHighContrastMode=k.settings.detect_highcontrast&&m._isHighContrast();k.settings.skin=k.forcedHighContrastMode?"highcontrast":k.settings.skin;if(!n.theme_advanced_buttons1){n=c({theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap"},n)}m.settings=n=c({theme_advanced_path:true,theme_advanced_toolbar_location:"top",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:k.settings.readonly},n);if(!n.font_size_style_values){n.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(h.is(n.theme_advanced_font_sizes,"string")){n.font_size_style_values=h.explode(n.font_size_style_values);n.font_size_classes=h.explode(n.font_size_classes||"");p={};k.settings.theme_advanced_font_sizes=n.theme_advanced_font_sizes;f(k.getParam("theme_advanced_font_sizes","","hash"),function(r,q){var o;if(q==r&&r>=1&&r<=7){q=r+" ("+m.sizes[r-1]+"pt)";o=n.font_size_classes[r-1];r=n.font_size_style_values[r-1]||(m.sizes[r-1]+"pt")}if(/^\s*\./.test(r)){o=r.replace(/\./g,"")}p[q]=o?{"class":o}:{fontSize:r}});n.theme_advanced_font_sizes=p}if((j=n.theme_advanced_path_location)&&j!="none"){n.theme_advanced_statusbar_location=n.theme_advanced_path_location}if(n.theme_advanced_statusbar_location=="none"){n.theme_advanced_statusbar_location=0}if(k.settings.content_css!==false){k.contentCSS.push(k.baseURI.toAbsolute(l+"/skins/"+k.settings.skin+"/content.css"))}k.onInit.add(function(){if(!k.settings.readonly){k.onNodeChange.add(m._nodeChanged,m);k.onKeyUp.add(m._updateUndoStatus,m);k.onMouseUp.add(m._updateUndoStatus,m);k.dom.bind(k.dom.getRoot(),"dragend",function(){m._updateUndoStatus(k)})}});k.onSetProgressState.add(function(r,o,s){var t,u=r.id,q;if(o){m.progressTimer=setTimeout(function(){t=r.getContainer();t=t.insertBefore(i.create("DIV",{style:"position:relative"}),t.firstChild);q=i.get(r.id+"_tbl");i.add(t,"div",{id:u+"_blocker","class":"mceBlocker",style:{width:q.clientWidth+2,height:q.clientHeight+2}});i.add(t,"div",{id:u+"_progress","class":"mceProgress",style:{left:q.clientWidth/2,top:q.clientHeight/2}})},s||0)}else{i.remove(u+"_blocker");i.remove(u+"_progress");clearTimeout(m.progressTimer)}});i.loadCSS(n.editor_css?k.documentBaseURI.toAbsolute(n.editor_css):l+"/skins/"+k.settings.skin+"/ui.css");if(n.skin_variant){i.loadCSS(l+"/skins/"+k.settings.skin+"/ui_"+n.skin_variant+".css")}},_isHighContrast:function(){var j,k=i.add(i.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});j=(i.getStyle(k,"background-color",true)+"").toLowerCase().replace(/ /g,"");i.remove(k);return j!="rgb(171,239,86)"&&j!="#abef56"},createControl:function(m,j){var k,l;if(l=j.createControl(m)){return l}switch(m){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((k=this.controls[m])){return j.createButton(m,{title:"advanced."+k[0],cmd:k[1],ui:k[2],value:k[3]})}},execCommand:function(l,k,m){var j=this["_"+l];if(j){j.call(this,k,m);return true}return false},_importClasses:function(l){var j=this.editor,k=j.controlManager.get("styleselect");if(k.getLength()==0){f(j.dom.getClasses(),function(q,m){var p="style_"+m,n;n={inline:"span",attributes:{"class":q["class"]},selector:"*"};j.formatter.register(p,n);k.add(q["class"],p,{style:function(){return b(j,n)}})})}},_createStyleSelect:function(o){var l=this,j=l.editor,k=j.controlManager,m;m=k.createListBox("styleselect",{title:"advanced.style_select",onselect:function(q){var r,n=[],p;f(m.items,function(s){n.push(s.value)});j.focus();j.undoManager.add();r=j.formatter.matchAll(n);h.each(r,function(s){if(!q||s==q){if(s){j.formatter.remove(s)}p=true}});if(!p){j.formatter.apply(q)}j.undoManager.add();j.nodeChanged();return false}});j.onPreInit.add(function(){var p=0,n=j.getParam("style_formats");if(n){f(n,function(q){var r,s=0;f(q,function(){s++});if(s>1){r=q.name=q.name||"style_"+(p++);j.formatter.register(r,q);m.add(q.title,r,{style:function(){return b(j,q)}})}else{m.add(q.title)}})}else{f(j.getParam("theme_advanced_styles","","hash"),function(t,s){var r,q;if(t){r="style_"+(p++);q={inline:"span",classes:t,selector:"*"};j.formatter.register(r,q);m.add(l.editor.translate(s),r,{style:function(){return b(j,q)}})}})}});if(m.getLength()==0){m.onPostRender.add(function(p,q){if(!m.NativeListBox){g.add(q.id+"_text","focus",l._importClasses,l);g.add(q.id+"_text","mousedown",l._importClasses,l);g.add(q.id+"_open","focus",l._importClasses,l);g.add(q.id+"_open","mousedown",l._importClasses,l)}else{g.add(q.id,"focus",l._importClasses,l)}})}return m},_createFontSelect:function(){var l,k=this,j=k.editor;l=j.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(m){var n=l.items[l.selectedIndex];if(!m&&n){j.execCommand("FontName",false,n.value);return}j.execCommand("FontName",false,m);l.select(function(o){return m==o});if(n&&n.value==m){l.select(null)}return false}});if(l){f(j.getParam("theme_advanced_fonts",k.settings.theme_advanced_fonts,"hash"),function(n,m){l.add(j.translate(m),n,{style:n.indexOf("dings")==-1?"font-family:"+n:""})})}return l},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(o){var p=n.items[n.selectedIndex];if(!o&&p){p=p.value;if(p["class"]){k.formatter.toggle("fontsize_class",{value:p["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,p.fontSize)}return}if(o["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}n.select(function(q){return o==q});if(p&&(p.value.fontSize==o.fontSize||p.value["class"]&&p.value["class"]==o["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(p,o){var q=p.fontSize;if(q>=1&&q<=7){q=m.sizes[parseInt(q)-1]+"pt"}n.add(o,p,{style:"font-size:"+q,"class":"mceFontSize"+(l++)+(" "+(p["class"]||""))})})}return n},_createBlockFormats:function(){var l,j={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},k=this;l=k.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(m){k.editor.execCommand("FormatBlock",false,m);return false}});if(l){f(k.editor.getParam("theme_advanced_blockformats",k.settings.theme_advanced_blockformats,"hash"),function(n,m){l.add(k.editor.translate(m!=n?m:j[n]),n,{"class":"mce_formatPreview mce_"+n,style:function(){return b(k.editor,{block:n})}})})}return l},_createForeColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_text_colors){m.colors=j}if(l.theme_advanced_default_foreground_color){m.default_color=l.theme_advanced_default_foreground_color}m.title="advanced.forecolor_desc";m.cmd="ForeColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("forecolor",m);return n},_createBackColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_background_colors){m.colors=j}if(l.theme_advanced_default_background_color){m.default_color=l.theme_advanced_default_background_color}m.title="advanced.backcolor_desc";m.cmd="HiliteColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("backcolor",m);return n},renderUI:function(l){var q,m,r,w=this,u=w.editor,x=w.settings,v,k,j;if(u.settings){u.settings.aria_label=x.aria_label+u.getLang("advanced.help_shortcut")}q=k=i.create("span",{role:"application","aria-labelledby":u.id+"_voice",id:u.id+"_parent","class":"mceEditor "+u.settings.skin+"Skin"+(x.skin_variant?" "+u.settings.skin+"Skin"+w._ufirst(x.skin_variant):"")+(u.settings.directionality=="rtl"?" mceRtl":"")});i.add(q,"span",{"class":"mceVoiceLabel",style:"display:none;",id:u.id+"_voice"},x.aria_label);if(!i.boxModel){q=i.add(q,"div",{"class":"mceOldBoxModel"})}q=v=i.add(q,"table",{role:"presentation",id:u.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});q=r=i.add(q,"tbody");switch((x.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":m=w._rowLayout(x,r,l);break;case"customlayout":m=u.execCallback("theme_advanced_custom_layout",x,r,l,k);break;default:m=w._simpleLayout(x,r,l,k)}q=l.targetNode;j=v.rows;i.addClass(j[0],"mceFirst");i.addClass(j[j.length-1],"mceLast");f(i.select("tr",r),function(o){i.addClass(o.firstChild,"mceFirst");i.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(i.get(x.theme_advanced_toolbar_container)){i.get(x.theme_advanced_toolbar_container).appendChild(k)}else{i.insertAfter(k,q)}g.add(u.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){w._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return false}});if(!u.getParam("accessibility_focus")){g.add(i.add(k,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(u.id).focus()})}if(x.theme_advanced_toolbar_location=="external"){l.deltaHeight=0}w.deltaHeight=l.deltaHeight;l.targetNode=null;u.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(h.isWebKit){window.focus()}w.toolbarGroup.focus();return g.cancel(n)}else{if(n.keyCode===o){i.get(p.id+"_path_row").focus();return g.cancel(n)}}}});u.addShortcut("alt+0","","mceShortcuts",w);return{iframeContainer:m,editorContainer:u.id+"_parent",sizeContainer:v,deltaHeight:l.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:h.majorVersion+"."+h.minorVersion}},resizeBy:function(j,k){var l=i.get(this.editor.id+"_ifr");this.resizeTo(l.clientWidth+j,l.clientHeight+k)},resizeTo:function(j,n,l){var k=this.editor,m=this.settings,o=i.get(k.id+"_tbl"),p=i.get(k.id+"_ifr");j=Math.max(m.theme_advanced_resizing_min_width||100,j);n=Math.max(m.theme_advanced_resizing_min_height||100,n);j=Math.min(m.theme_advanced_resizing_max_width||65535,j);n=Math.min(m.theme_advanced_resizing_max_height||65535,n);i.setStyle(o,"height","");i.setStyle(p,"height",n);if(m.theme_advanced_resize_horizontal){i.setStyle(o,"width","");i.setStyle(p,"width",j);if(j<o.clientWidth){j=o.clientWidth;i.setStyle(p,"width",o.clientWidth)}}if(l&&m.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+k.id+"_size",{cw:j,ch:n})}},destroy:function(){var j=this.editor.id;g.clear(j+"_resize");g.clear(j+"_path_row");g.clear(j+"_external_close")},_simpleLayout:function(z,u,l,j){var y=this,v=y.editor,w=z.theme_advanced_toolbar_location,q=z.theme_advanced_statusbar_location,m,k,r,x;if(z.readonly){m=i.add(u,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"});return k}if(w=="top"){y._addToolbars(u,l)}if(w=="external"){m=x=i.create("div",{style:"position:relative"});m=i.add(m,"div",{id:v.id+"_external","class":"mceExternalToolbar"});i.add(m,"a",{id:v.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});m=i.add(m,"table",{id:v.id+"_tblext",cellSpacing:0,cellPadding:0});r=i.add(m,"tbody");if(j.firstChild.className=="mceOldBoxModel"){j.firstChild.appendChild(x)}else{j.insertBefore(x,j.firstChild)}y._addToolbars(r,l);v.onMouseUp.add(function(){var o=i.get(v.id+"_external");i.show(o);i.hide(e);var n=g.add(v.id+"_external_close","click",function(){i.hide(v.id+"_external");g.remove(v.id+"_external_close","click",n);return false});i.show(o);i.setStyle(o,"top",0-i.getRect(v.id+"_tblext").h-1);i.hide(o);i.show(o);o.style.filter="";e=v.id+"_external";o=null})}if(q=="top"){y._addStatusBar(u,l)}if(!z.theme_advanced_toolbar_container){m=i.add(u,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"})}if(w=="bottom"){y._addToolbars(u,l)}if(q=="bottom"){y._addStatusBar(u,l)}return k},_rowLayout:function(x,p,l){var w=this,q=w.editor,v,y,j=q.controlManager,m,k,u,r;v=x.theme_advanced_containers_default_class||"";y=x.theme_advanced_containers_default_align||"center";f(d(x.theme_advanced_containers||""),function(s,o){var n=x["theme_advanced_container_"+s]||"";switch(s.toLowerCase()){case"mceeditor":m=i.add(p,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":w._addStatusBar(p,l);break;default:r=(x["theme_advanced_container_"+s+"_align"]||y).toLowerCase();r="mce"+w._ufirst(r);m=i.add(i.add(p,"tr"),"td",{"class":"mceToolbar "+(x["theme_advanced_container_"+s+"_class"]||v)+" "+r||y});u=j.createToolbar("toolbar"+o);w._addControls(n,u);i.setHTML(m,u.renderHTML());l.deltaHeight-=x.theme_advanced_row_height}});return k},_addControls:function(k,j){var l=this,m=l.settings,n,o=l.editor.controlManager;if(m.theme_advanced_disable&&!l._disabled){n={};f(d(m.theme_advanced_disable),function(p){n[p]=1});l._disabled=n}else{n=l._disabled}f(d(k),function(q){var p;if(n&&n[q]){return}if(q=="tablecontrols"){f(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(r){r=l.createControl(r,o);if(r){j.add(r)}});return}p=l.createControl(q,o);if(p){j.add(p)}})},_addToolbars:function(y,k){var B=this,q,p,u=B.editor,C=B.settings,A,j=u.controlManager,w,l,r=[],z,x,m=false;x=j.createToolbarGroup("toolbargroup",{name:u.getLang("advanced.toolbar"),tab_focus_toolbar:u.getParam("theme_advanced_tab_focus_toolbar")});B.toolbarGroup=x;z=C.theme_advanced_toolbar_align.toLowerCase();z="mce"+B._ufirst(z);l=i.add(i.add(y,"tr",{role:"toolbar"}),"td",{"class":"mceToolbar "+z,role:"toolbar"});for(q=1;(A=C["theme_advanced_buttons"+q]);q++){m=true;p=j.createToolbar("toolbar"+q,{"class":"mceToolbarRow"+q});if(C["theme_advanced_buttons"+q+"_add"]){A+=","+C["theme_advanced_buttons"+q+"_add"]}if(C["theme_advanced_buttons"+q+"_add_before"]){A=C["theme_advanced_buttons"+q+"_add_before"]+","+A}B._addControls(A,p);x.add(p);k.deltaHeight-=C.theme_advanced_row_height}if(!m){k.deltaHeight-=C.theme_advanced_row_height}r.push(x.renderHTML());r.push(i.createHTML("a",{href:"#",accesskey:"z",title:u.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+u.id+"').focus();"},"<!-- IE -->"));i.setHTML(l,r.join(""))},_addStatusBar:function(p,k){var l,w=this,q=w.editor,x=w.settings,j,u,v,m;l=i.add(p,"tr");l=m=i.add(l,"td",{"class":"mceStatusbar"});l=i.add(l,"div",{id:q.id+"_path_row",role:"group","aria-labelledby":q.id+"_path_voice"});if(x.theme_advanced_path){i.add(l,"span",{id:q.id+"_path_voice"},q.translate("advanced.path"));i.add(l,"span",{},": ")}else{i.add(l,"span",{}," ")}if(x.theme_advanced_resizing){i.add(m,"a",{id:q.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(x.theme_advanced_resizing_use_cookie){q.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+q.id+"_size"),r=i.get(q.id+"_tbl");if(!n){return}w.resizeTo(n.cw,n.ch)})}q.onPostRender.add(function(){g.add(q.id+"_resize","click",function(n){n.preventDefault()});g.add(q.id+"_resize","mousedown",function(E){var t,r,s,o,D,A,B,G,n,F,y;function z(H){H.preventDefault();n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F)}function C(H){g.remove(i.doc,"mousemove",t);g.remove(q.getDoc(),"mousemove",r);g.remove(i.doc,"mouseup",s);g.remove(q.getDoc(),"mouseup",o);n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F,true);q.nodeChanged()}E.preventDefault();D=E.screenX;A=E.screenY;y=i.get(w.editor.id+"_ifr");B=n=y.clientWidth;G=F=y.clientHeight;t=g.add(i.doc,"mousemove",z);r=g.add(q.getDoc(),"mousemove",z);s=g.add(i.doc,"mouseup",C);o=g.add(q.getDoc(),"mouseup",C)})})}k.deltaHeight-=21;l=p=null},_updateUndoStatus:function(k){var j=k.controlManager,l=k.undoManager;j.setDisabled("undo",!l.hasUndo()&&!l.typing);j.setDisabled("redo",!l.hasRedo())},_nodeChanged:function(o,u,E,r,F){var z=this,D,G=0,y,H,A=z.settings,x,l,w,C,m,k,j;h.each(z.stateControls,function(n){u.setActive(n,o.queryCommandState(z.controls[n][1]))});function q(p){var s,n=F.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s<n.length;s++){if(t(n[s])){return n[s]}}}u.setActive("visualaid",o.hasVisual);z._updateUndoStatus(o);u.setDisabled("outdent",!o.queryCommandState("Outdent"));D=q("A");if(H=u.get("link")){H.setDisabled((!D&&r)||(D&&!D.href));H.setActive(!!D&&(!D.name&&!D.id))}if(H=u.get("unlink")){H.setDisabled(!D&&r);H.setActive(!!D&&!D.name&&!D.id)}if(H=u.get("anchor")){H.setActive(!r&&!!D&&(D.name||(D.id&&!D.href)))}D=q("IMG");if(H=u.get("image")){H.setActive(!r&&!!D&&E.className.indexOf("mceItem")==-1)}if(H=u.get("styleselect")){z._importClasses();k=[];f(H.items,function(n){k.push(n.value)});j=o.formatter.matchAll(k);H.select(j[0]);h.each(j,function(p,n){if(n>0){H.mark(p)}})}if(H=u.get("formatselect")){D=q(o.dom.isBlock);if(D){H.select(D.nodeName.toLowerCase())}}q(function(p){if(p.nodeName==="SPAN"){if(!x&&p.className){x=p.className}}if(o.dom.is(p,A.theme_advanced_font_selector)){if(!l&&p.style.fontSize){l=p.style.fontSize}if(!w&&p.style.fontFamily){w=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}if(!C&&p.style.color){C=p.style.color}if(!m&&p.style.backgroundColor){m=p.style.backgroundColor}}return false});if(H=u.get("fontselect")){H.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==w})}if(H=u.get("fontsizeselect")){if(A.theme_advanced_runtime_fontsize&&!l&&!x){l=o.dom.getStyle(E,"fontSize",true)}H.select(function(n){if(n.fontSize&&n.fontSize===l){return true}if(n["class"]&&n["class"]===x){return true}})}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_path&&A.theme_advanced_statusbar_location){D=i.get(o.id+"_path")||i.add(o.id+"_path_row","span",{id:o.id+"_path"});if(z.statusKeyboardNavigation){z.statusKeyboardNavigation.destroy();z.statusKeyboardNavigation=null}i.setHTML(D,"");q(function(I){var p=I.nodeName.toLowerCase(),s,v,t="";if(I.nodeType!=1||p==="br"||I.getAttribute("data-mce-bogus")||i.hasClass(I,"mceItemHidden")||i.hasClass(I,"mceItemRemoved")){return}if(h.isIE&&I.scopeName!=="HTML"&&I.scopeName){p=I.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(y=i.getAttrib(I,"src")){t+="src: "+y+" "}break;case"a":if(y=i.getAttrib(I,"name")){t+="name: "+y+" ";p+="#"+y}if(y=i.getAttrib(I,"href")){t+="href: "+y+" "}break;case"font":if(y=i.getAttrib(I,"face")){t+="font: "+y+" "}if(y=i.getAttrib(I,"size")){t+="size: "+y+" "}if(y=i.getAttrib(I,"color")){t+="color: "+y+" "}break;case"span":if(y=i.getAttrib(I,"style")){t+="style: "+y+" "}break}if(y=i.getAttrib(I,"id")){t+="id: "+y+" "}if(y=I.className){y=y.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(y){t+="class: "+y+" ";if(o.dom.isBlock(I)||p=="img"||p=="span"){p+="."+y}}}p=p.replace(/(html:)/g,"");p={name:p,node:I,title:t};z.onResolveName.dispatch(z,p);t=p.title;p=p.name;v=i.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:t,"class":"mcePath_"+(G++)},p);if(D.hasChildNodes()){D.insertBefore(i.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),D.firstChild);D.insertBefore(v,D.firstChild)}else{D.appendChild(v)}},o.getBody());if(i.select("a",D).length>0){z.statusKeyboardNavigation=new h.ui.KeyboardNavigation({root:o.id+"_path_row",items:i.select("a",D),excludeFromTabOrder:true,onCancel:function(){o.focus()}},i)}}},_sel:function(j){this.editor.execCommand("mceSelectNodeDepth",false,j)},_mceInsertAnchor:function(l,k){var j=this.editor;j.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(j.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(j.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var j=this.editor;j.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(j.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(j.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var j=this.editor;j.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var j=this.editor;j.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(l,k){var j=this.editor;k=k||{};j.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(j.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(j.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:k.color,func:k.func,theme_url:this.url})},_mceCodeEditor:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(j.getParam("theme_advanced_source_editor_width",720)),height:parseInt(j.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(k,l){var j=this.editor;if(j.dom.getAttrib(j.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}j.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(j.getLang("advanced.image_delta_width",0)),height:275+parseInt(j.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(j.getLang("advanced.link_delta_width",0)),height:200+parseInt(j.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var j=this.editor;j.windowManager.confirm("advanced.newdocument",function(k){if(k){j.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var j=this;this._mceColorPicker(0,{color:j.fgColor,func:function(k){j.fgColor=k;j.editor.execCommand("ForeColor",false,k)}})},_mceBackColor:function(){var j=this;this._mceColorPicker(0,{color:j.bgColor,func:function(k){j.bgColor=k;j.editor.execCommand("HiliteColor",false,k)}})},_ufirst:function(j){return j.substring(0,1).toUpperCase()+j.substring(1)}});h.ThemeManager.add("advanced",h.themes.AdvancedTheme)}(tinymce));
|
|
tiny_mce/themes/advanced/editor_template_src.js
DELETED
@@ -1,1490 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* editor_template_src.js
|
3 |
-
*
|
4 |
-
* Copyright 2009, Moxiecode Systems AB
|
5 |
-
* Released under LGPL License.
|
6 |
-
*
|
7 |
-
* License: http://tinymce.moxiecode.com/license
|
8 |
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9 |
-
*/
|
10 |
-
|
11 |
-
(function(tinymce) {
|
12 |
-
var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;
|
13 |
-
|
14 |
-
// Generates a preview for a format
|
15 |
-
function getPreviewCss(ed, fmt) {
|
16 |
-
var name, previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStylesName;
|
17 |
-
|
18 |
-
previewStyles = ed.settings.preview_styles;
|
19 |
-
|
20 |
-
// No preview forced
|
21 |
-
if (previewStyles === false)
|
22 |
-
return '';
|
23 |
-
|
24 |
-
// Default preview
|
25 |
-
if (!previewStyles)
|
26 |
-
previewStyles = 'font-family font-size font-weight text-decoration text-transform color background-color';
|
27 |
-
|
28 |
-
// Removes any variables since these can't be previewed
|
29 |
-
function removeVars(val) {
|
30 |
-
return val.replace(/%(\w+)/g, '');
|
31 |
-
};
|
32 |
-
|
33 |
-
// Create block/inline element to use for preview
|
34 |
-
name = fmt.block || fmt.inline || 'span';
|
35 |
-
previewElm = dom.create(name);
|
36 |
-
|
37 |
-
// Add format styles to preview element
|
38 |
-
each(fmt.styles, function(value, name) {
|
39 |
-
value = removeVars(value);
|
40 |
-
|
41 |
-
if (value)
|
42 |
-
dom.setStyle(previewElm, name, value);
|
43 |
-
});
|
44 |
-
|
45 |
-
// Add attributes to preview element
|
46 |
-
each(fmt.attributes, function(value, name) {
|
47 |
-
value = removeVars(value);
|
48 |
-
|
49 |
-
if (value)
|
50 |
-
dom.setAttrib(previewElm, name, value);
|
51 |
-
});
|
52 |
-
|
53 |
-
// Add classes to preview element
|
54 |
-
each(fmt.classes, function(value) {
|
55 |
-
value = removeVars(value);
|
56 |
-
|
57 |
-
if (!dom.hasClass(previewElm, value))
|
58 |
-
dom.addClass(previewElm, value);
|
59 |
-
});
|
60 |
-
|
61 |
-
// Add the previewElm outside the visual area
|
62 |
-
dom.setStyles(previewElm, {position: 'absolute', left: -0xFFFF});
|
63 |
-
ed.getBody().appendChild(previewElm);
|
64 |
-
|
65 |
-
// Get parent container font size so we can compute px values out of em/% for older IE:s
|
66 |
-
parentFontSize = dom.getStyle(ed.getBody(), 'fontSize', true);
|
67 |
-
parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0;
|
68 |
-
|
69 |
-
each(previewStyles.split(' '), function(name) {
|
70 |
-
var value = dom.getStyle(previewElm, name, true);
|
71 |
-
|
72 |
-
// If background is transparent then check if the body has a background color we can use
|
73 |
-
if (name == 'background-color' && /transparent|rgba\s*\([^)]+,\s*0\)/.test(value)) {
|
74 |
-
value = dom.getStyle(ed.getBody(), name, true);
|
75 |
-
|
76 |
-
// Ignore white since it's the default color, not the nicest fix
|
77 |
-
if (dom.toHex(value).toLowerCase() == '#ffffff') {
|
78 |
-
return;
|
79 |
-
}
|
80 |
-
}
|
81 |
-
|
82 |
-
// Old IE won't calculate the font size so we need to do that manually
|
83 |
-
if (name == 'font-size') {
|
84 |
-
if (/em|%$/.test(value)) {
|
85 |
-
if (parentFontSize === 0) {
|
86 |
-
return;
|
87 |
-
}
|
88 |
-
|
89 |
-
// Convert font size from em/% to px
|
90 |
-
value = parseFloat(value, 10) / (/%$/.test(value) ? 100 : 1);
|
91 |
-
value = (value * parentFontSize) + 'px';
|
92 |
-
}
|
93 |
-
}
|
94 |
-
|
95 |
-
previewCss += name + ':' + value + ';';
|
96 |
-
});
|
97 |
-
|
98 |
-
dom.remove(previewElm);
|
99 |
-
|
100 |
-
return previewCss;
|
101 |
-
};
|
102 |
-
|
103 |
-
// Tell it to load theme specific language pack(s)
|
104 |
-
tinymce.ThemeManager.requireLangPack('advanced');
|
105 |
-
|
106 |
-
tinymce.create('tinymce.themes.AdvancedTheme', {
|
107 |
-
sizes : [8, 10, 12, 14, 18, 24, 36],
|
108 |
-
|
109 |
-
// Control name lookup, format: title, command
|
110 |
-
controls : {
|
111 |
-
bold : ['bold_desc', 'Bold'],
|
112 |
-
italic : ['italic_desc', 'Italic'],
|
113 |
-
underline : ['underline_desc', 'Underline'],
|
114 |
-
strikethrough : ['striketrough_desc', 'Strikethrough'],
|
115 |
-
justifyleft : ['justifyleft_desc', 'JustifyLeft'],
|
116 |
-
justifycenter : ['justifycenter_desc', 'JustifyCenter'],
|
117 |
-
justifyright : ['justifyright_desc', 'JustifyRight'],
|
118 |
-
justifyfull : ['justifyfull_desc', 'JustifyFull'],
|
119 |
-
bullist : ['bullist_desc', 'InsertUnorderedList'],
|
120 |
-
numlist : ['numlist_desc', 'InsertOrderedList'],
|
121 |
-
outdent : ['outdent_desc', 'Outdent'],
|
122 |
-
indent : ['indent_desc', 'Indent'],
|
123 |
-
cut : ['cut_desc', 'Cut'],
|
124 |
-
copy : ['copy_desc', 'Copy'],
|
125 |
-
paste : ['paste_desc', 'Paste'],
|
126 |
-
undo : ['undo_desc', 'Undo'],
|
127 |
-
redo : ['redo_desc', 'Redo'],
|
128 |
-
link : ['link_desc', 'mceLink'],
|
129 |
-
unlink : ['unlink_desc', 'unlink'],
|
130 |
-
image : ['image_desc', 'mceImage'],
|
131 |
-
cleanup : ['cleanup_desc', 'mceCleanup'],
|
132 |
-
help : ['help_desc', 'mceHelp'],
|
133 |
-
code : ['code_desc', 'mceCodeEditor'],
|
134 |
-
hr : ['hr_desc', 'InsertHorizontalRule'],
|
135 |
-
removeformat : ['removeformat_desc', 'RemoveFormat'],
|
136 |
-
sub : ['sub_desc', 'subscript'],
|
137 |
-
sup : ['sup_desc', 'superscript'],
|
138 |
-
forecolor : ['forecolor_desc', 'ForeColor'],
|
139 |
-
forecolorpicker : ['forecolor_desc', 'mceForeColor'],
|
140 |
-
backcolor : ['backcolor_desc', 'HiliteColor'],
|
141 |
-
backcolorpicker : ['backcolor_desc', 'mceBackColor'],
|
142 |
-
charmap : ['charmap_desc', 'mceCharMap'],
|
143 |
-
visualaid : ['visualaid_desc', 'mceToggleVisualAid'],
|
144 |
-
anchor : ['anchor_desc', 'mceInsertAnchor'],
|
145 |
-
newdocument : ['newdocument_desc', 'mceNewDocument'],
|
146 |
-
blockquote : ['blockquote_desc', 'mceBlockQuote']
|
147 |
-
},
|
148 |
-
|
149 |
-
stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'],
|
150 |
-
|
151 |
-
init : function(ed, url) {
|
152 |
-
var t = this, s, v, o;
|
153 |
-
|
154 |
-
t.editor = ed;
|
155 |
-
t.url = url;
|
156 |
-
t.onResolveName = new tinymce.util.Dispatcher(this);
|
157 |
-
s = ed.settings;
|
158 |
-
|
159 |
-
ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast();
|
160 |
-
ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin;
|
161 |
-
|
162 |
-
// Setup default buttons
|
163 |
-
if (!s.theme_advanced_buttons1) {
|
164 |
-
s = extend({
|
165 |
-
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",
|
166 |
-
theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
|
167 |
-
theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap"
|
168 |
-
}, s);
|
169 |
-
}
|
170 |
-
|
171 |
-
// Default settings
|
172 |
-
t.settings = s = extend({
|
173 |
-
theme_advanced_path : true,
|
174 |
-
theme_advanced_toolbar_location : 'top',
|
175 |
-
theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6",
|
176 |
-
theme_advanced_toolbar_align : "left",
|
177 |
-
theme_advanced_statusbar_location : "bottom",
|
178 |
-
theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
|
179 |
-
theme_advanced_more_colors : 1,
|
180 |
-
theme_advanced_row_height : 23,
|
181 |
-
theme_advanced_resize_horizontal : 1,
|
182 |
-
theme_advanced_resizing_use_cookie : 1,
|
183 |
-
theme_advanced_font_sizes : "1,2,3,4,5,6,7",
|
184 |
-
theme_advanced_font_selector : "span",
|
185 |
-
theme_advanced_show_current_color: 0,
|
186 |
-
readonly : ed.settings.readonly
|
187 |
-
}, s);
|
188 |
-
|
189 |
-
// Setup default font_size_style_values
|
190 |
-
if (!s.font_size_style_values)
|
191 |
-
s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt";
|
192 |
-
|
193 |
-
if (tinymce.is(s.theme_advanced_font_sizes, 'string')) {
|
194 |
-
s.font_size_style_values = tinymce.explode(s.font_size_style_values);
|
195 |
-
s.font_size_classes = tinymce.explode(s.font_size_classes || '');
|
196 |
-
|
197 |
-
// Parse string value
|
198 |
-
o = {};
|
199 |
-
ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes;
|
200 |
-
each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) {
|
201 |
-
var cl;
|
202 |
-
|
203 |
-
if (k == v && v >= 1 && v <= 7) {
|
204 |
-
k = v + ' (' + t.sizes[v - 1] + 'pt)';
|
205 |
-
cl = s.font_size_classes[v - 1];
|
206 |
-
v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');
|
207 |
-
}
|
208 |
-
|
209 |
-
if (/^\s*\./.test(v))
|
210 |
-
cl = v.replace(/\./g, '');
|
211 |
-
|
212 |
-
o[k] = cl ? {'class' : cl} : {fontSize : v};
|
213 |
-
});
|
214 |
-
|
215 |
-
s.theme_advanced_font_sizes = o;
|
216 |
-
}
|
217 |
-
|
218 |
-
if ((v = s.theme_advanced_path_location) && v != 'none')
|
219 |
-
s.theme_advanced_statusbar_location = s.theme_advanced_path_location;
|
220 |
-
|
221 |
-
if (s.theme_advanced_statusbar_location == 'none')
|
222 |
-
s.theme_advanced_statusbar_location = 0;
|
223 |
-
|
224 |
-
if (ed.settings.content_css !== false)
|
225 |
-
ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css"));
|
226 |
-
|
227 |
-
// Init editor
|
228 |
-
ed.onInit.add(function() {
|
229 |
-
if (!ed.settings.readonly) {
|
230 |
-
ed.onNodeChange.add(t._nodeChanged, t);
|
231 |
-
ed.onKeyUp.add(t._updateUndoStatus, t);
|
232 |
-
ed.onMouseUp.add(t._updateUndoStatus, t);
|
233 |
-
ed.dom.bind(ed.dom.getRoot(), 'dragend', function() {
|
234 |
-
t._updateUndoStatus(ed);
|
235 |
-
});
|
236 |
-
}
|
237 |
-
});
|
238 |
-
|
239 |
-
ed.onSetProgressState.add(function(ed, b, ti) {
|
240 |
-
var co, id = ed.id, tb;
|
241 |
-
|
242 |
-
if (b) {
|
243 |
-
t.progressTimer = setTimeout(function() {
|
244 |
-
co = ed.getContainer();
|
245 |
-
co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild);
|
246 |
-
tb = DOM.get(ed.id + '_tbl');
|
247 |
-
|
248 |
-
DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}});
|
249 |
-
DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}});
|
250 |
-
}, ti || 0);
|
251 |
-
} else {
|
252 |
-
DOM.remove(id + '_blocker');
|
253 |
-
DOM.remove(id + '_progress');
|
254 |
-
clearTimeout(t.progressTimer);
|
255 |
-
}
|
256 |
-
});
|
257 |
-
|
258 |
-
DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css");
|
259 |
-
|
260 |
-
if (s.skin_variant)
|
261 |
-
DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css");
|
262 |
-
},
|
263 |
-
|
264 |
-
_isHighContrast : function() {
|
265 |
-
var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'});
|
266 |
-
|
267 |
-
actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, '');
|
268 |
-
DOM.remove(div);
|
269 |
-
|
270 |
-
return actualColor != 'rgb(171,239,86)' && actualColor != '#abef56';
|
271 |
-
},
|
272 |
-
|
273 |
-
createControl : function(n, cf) {
|
274 |
-
var cd, c;
|
275 |
-
|
276 |
-
if (c = cf.createControl(n))
|
277 |
-
return c;
|
278 |
-
|
279 |
-
switch (n) {
|
280 |
-
case "styleselect":
|
281 |
-
return this._createStyleSelect();
|
282 |
-
|
283 |
-
case "formatselect":
|
284 |
-
return this._createBlockFormats();
|
285 |
-
|
286 |
-
case "fontselect":
|
287 |
-
return this._createFontSelect();
|
288 |
-
|
289 |
-
case "fontsizeselect":
|
290 |
-
return this._createFontSizeSelect();
|
291 |
-
|
292 |
-
case "forecolor":
|
293 |
-
return this._createForeColorMenu();
|
294 |
-
|
295 |
-
case "backcolor":
|
296 |
-
return this._createBackColorMenu();
|
297 |
-
}
|
298 |
-
|
299 |
-
if ((cd = this.controls[n]))
|
300 |
-
return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]});
|
301 |
-
},
|
302 |
-
|
303 |
-
execCommand : function(cmd, ui, val) {
|
304 |
-
var f = this['_' + cmd];
|
305 |
-
|
306 |
-
if (f) {
|
307 |
-
f.call(this, ui, val);
|
308 |
-
return true;
|
309 |
-
}
|
310 |
-
|
311 |
-
return false;
|
312 |
-
},
|
313 |
-
|
314 |
-
_importClasses : function(e) {
|
315 |
-
var ed = this.editor, ctrl = ed.controlManager.get('styleselect');
|
316 |
-
|
317 |
-
if (ctrl.getLength() == 0) {
|
318 |
-
each(ed.dom.getClasses(), function(o, idx) {
|
319 |
-
var name = 'style_' + idx, fmt;
|
320 |
-
|
321 |
-
fmt = {
|
322 |
-
inline : 'span',
|
323 |
-
attributes : {'class' : o['class']},
|
324 |
-
selector : '*'
|
325 |
-
};
|
326 |
-
|
327 |
-
ed.formatter.register(name, fmt);
|
328 |
-
|
329 |
-
ctrl.add(o['class'], name, {
|
330 |
-
style: function() {
|
331 |
-
return getPreviewCss(ed, fmt);
|
332 |
-
}
|
333 |
-
});
|
334 |
-
});
|
335 |
-
}
|
336 |
-
},
|
337 |
-
|
338 |
-
_createStyleSelect : function(n) {
|
339 |
-
var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl;
|
340 |
-
|
341 |
-
// Setup style select box
|
342 |
-
ctrl = ctrlMan.createListBox('styleselect', {
|
343 |
-
title : 'advanced.style_select',
|
344 |
-
onselect : function(name) {
|
345 |
-
var matches, formatNames = [], removedFormat;
|
346 |
-
|
347 |
-
each(ctrl.items, function(item) {
|
348 |
-
formatNames.push(item.value);
|
349 |
-
});
|
350 |
-
|
351 |
-
ed.focus();
|
352 |
-
ed.undoManager.add();
|
353 |
-
|
354 |
-
// Toggle off the current format(s)
|
355 |
-
matches = ed.formatter.matchAll(formatNames);
|
356 |
-
tinymce.each(matches, function(match) {
|
357 |
-
if (!name || match == name) {
|
358 |
-
if (match)
|
359 |
-
ed.formatter.remove(match);
|
360 |
-
|
361 |
-
removedFormat = true;
|
362 |
-
}
|
363 |
-
});
|
364 |
-
|
365 |
-
if (!removedFormat)
|
366 |
-
ed.formatter.apply(name);
|
367 |
-
|
368 |
-
ed.undoManager.add();
|
369 |
-
ed.nodeChanged();
|
370 |
-
|
371 |
-
return false; // No auto select
|
372 |
-
}
|
373 |
-
});
|
374 |
-
|
375 |
-
// Handle specified format
|
376 |
-
ed.onPreInit.add(function() {
|
377 |
-
var counter = 0, formats = ed.getParam('style_formats');
|
378 |
-
|
379 |
-
if (formats) {
|
380 |
-
each(formats, function(fmt) {
|
381 |
-
var name, keys = 0;
|
382 |
-
|
383 |
-
each(fmt, function() {keys++;});
|
384 |
-
|
385 |
-
if (keys > 1) {
|
386 |
-
name = fmt.name = fmt.name || 'style_' + (counter++);
|
387 |
-
ed.formatter.register(name, fmt);
|
388 |
-
ctrl.add(fmt.title, name, {
|
389 |
-
style: function() {
|
390 |
-
return getPreviewCss(ed, fmt);
|
391 |
-
}
|
392 |
-
});
|
393 |
-
} else
|
394 |
-
ctrl.add(fmt.title);
|
395 |
-
});
|
396 |
-
} else {
|
397 |
-
each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) {
|
398 |
-
var name, fmt;
|
399 |
-
|
400 |
-
if (val) {
|
401 |
-
name = 'style_' + (counter++);
|
402 |
-
fmt = {
|
403 |
-
inline : 'span',
|
404 |
-
classes : val,
|
405 |
-
selector : '*'
|
406 |
-
};
|
407 |
-
|
408 |
-
ed.formatter.register(name, fmt);
|
409 |
-
ctrl.add(t.editor.translate(key), name, {
|
410 |
-
style: function() {
|
411 |
-
return getPreviewCss(ed, fmt);
|
412 |
-
}
|
413 |
-
});
|
414 |
-
}
|
415 |
-
});
|
416 |
-
}
|
417 |
-
});
|
418 |
-
|
419 |
-
// Auto import classes if the ctrl box is empty
|
420 |
-
if (ctrl.getLength() == 0) {
|
421 |
-
ctrl.onPostRender.add(function(ed, n) {
|
422 |
-
if (!ctrl.NativeListBox) {
|
423 |
-
Event.add(n.id + '_text', 'focus', t._importClasses, t);
|
424 |
-
Event.add(n.id + '_text', 'mousedown', t._importClasses, t);
|
425 |
-
Event.add(n.id + '_open', 'focus', t._importClasses, t);
|
426 |
-
Event.add(n.id + '_open', 'mousedown', t._importClasses, t);
|
427 |
-
} else
|
428 |
-
Event.add(n.id, 'focus', t._importClasses, t);
|
429 |
-
});
|
430 |
-
}
|
431 |
-
|
432 |
-
return ctrl;
|
433 |
-
},
|
434 |
-
|
435 |
-
_createFontSelect : function() {
|
436 |
-
var c, t = this, ed = t.editor;
|
437 |
-
|
438 |
-
c = ed.controlManager.createListBox('fontselect', {
|
439 |
-
title : 'advanced.fontdefault',
|
440 |
-
onselect : function(v) {
|
441 |
-
var cur = c.items[c.selectedIndex];
|
442 |
-
|
443 |
-
if (!v && cur) {
|
444 |
-
ed.execCommand('FontName', false, cur.value);
|
445 |
-
return;
|
446 |
-
}
|
447 |
-
|
448 |
-
ed.execCommand('FontName', false, v);
|
449 |
-
|
450 |
-
// Fake selection, execCommand will fire a nodeChange and update the selection
|
451 |
-
c.select(function(sv) {
|
452 |
-
return v == sv;
|
453 |
-
});
|
454 |
-
|
455 |
-
if (cur && cur.value == v) {
|
456 |
-
c.select(null);
|
457 |
-
}
|
458 |
-
|
459 |
-
return false; // No auto select
|
460 |
-
}
|
461 |
-
});
|
462 |
-
|
463 |
-
if (c) {
|
464 |
-
each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) {
|
465 |
-
c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''});
|
466 |
-
});
|
467 |
-
}
|
468 |
-
|
469 |
-
return c;
|
470 |
-
},
|
471 |
-
|
472 |
-
_createFontSizeSelect : function() {
|
473 |
-
var t = this, ed = t.editor, c, i = 0, cl = [];
|
474 |
-
|
475 |
-
c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) {
|
476 |
-
var cur = c.items[c.selectedIndex];
|
477 |
-
|
478 |
-
if (!v && cur) {
|
479 |
-
cur = cur.value;
|
480 |
-
|
481 |
-
if (cur['class']) {
|
482 |
-
ed.formatter.toggle('fontsize_class', {value : cur['class']});
|
483 |
-
ed.undoManager.add();
|
484 |
-
ed.nodeChanged();
|
485 |
-
} else {
|
486 |
-
ed.execCommand('FontSize', false, cur.fontSize);
|
487 |
-
}
|
488 |
-
|
489 |
-
return;
|
490 |
-
}
|
491 |
-
|
492 |
-
if (v['class']) {
|
493 |
-
ed.focus();
|
494 |
-
ed.undoManager.add();
|
495 |
-
ed.formatter.toggle('fontsize_class', {value : v['class']});
|
496 |
-
ed.undoManager.add();
|
497 |
-
ed.nodeChanged();
|
498 |
-
} else
|
499 |
-
ed.execCommand('FontSize', false, v.fontSize);
|
500 |
-
|
501 |
-
// Fake selection, execCommand will fire a nodeChange and update the selection
|
502 |
-
c.select(function(sv) {
|
503 |
-
return v == sv;
|
504 |
-
});
|
505 |
-
|
506 |
-
if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] && cur.value['class'] == v['class'])) {
|
507 |
-
c.select(null);
|
508 |
-
}
|
509 |
-
|
510 |
-
return false; // No auto select
|
511 |
-
}});
|
512 |
-
|
513 |
-
if (c) {
|
514 |
-
each(t.settings.theme_advanced_font_sizes, function(v, k) {
|
515 |
-
var fz = v.fontSize;
|
516 |
-
|
517 |
-
if (fz >= 1 && fz <= 7)
|
518 |
-
fz = t.sizes[parseInt(fz) - 1] + 'pt';
|
519 |
-
|
520 |
-
c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))});
|
521 |
-
});
|
522 |
-
}
|
523 |
-
|
524 |
-
return c;
|
525 |
-
},
|
526 |
-
|
527 |
-
_createBlockFormats : function() {
|
528 |
-
var c, fmts = {
|
529 |
-
p : 'advanced.paragraph',
|
530 |
-
address : 'advanced.address',
|
531 |
-
pre : 'advanced.pre',
|
532 |
-
h1 : 'advanced.h1',
|
533 |
-
h2 : 'advanced.h2',
|
534 |
-
h3 : 'advanced.h3',
|
535 |
-
h4 : 'advanced.h4',
|
536 |
-
h5 : 'advanced.h5',
|
537 |
-
h6 : 'advanced.h6',
|
538 |
-
div : 'advanced.div',
|
539 |
-
blockquote : 'advanced.blockquote',
|
540 |
-
code : 'advanced.code',
|
541 |
-
dt : 'advanced.dt',
|
542 |
-
dd : 'advanced.dd',
|
543 |
-
samp : 'advanced.samp'
|
544 |
-
}, t = this;
|
545 |
-
|
546 |
-
c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', onselect : function(v) {
|
547 |
-
t.editor.execCommand('FormatBlock', false, v);
|
548 |
-
return false;
|
549 |
-
}});
|
550 |
-
|
551 |
-
if (c) {
|
552 |
-
each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) {
|
553 |
-
c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v, style: function() {
|
554 |
-
return getPreviewCss(t.editor, {block: v});
|
555 |
-
}});
|
556 |
-
});
|
557 |
-
}
|
558 |
-
|
559 |
-
return c;
|
560 |
-
},
|
561 |
-
|
562 |
-
_createForeColorMenu : function() {
|
563 |
-
var c, t = this, s = t.settings, o = {}, v;
|
564 |
-
|
565 |
-
if (s.theme_advanced_more_colors) {
|
566 |
-
o.more_colors_func = function() {
|
567 |
-
t._mceColorPicker(0, {
|
568 |
-
color : c.value,
|
569 |
-
func : function(co) {
|
570 |
-
c.setColor(co);
|
571 |
-
}
|
572 |
-
});
|
573 |
-
};
|
574 |
-
}
|
575 |
-
|
576 |
-
if (v = s.theme_advanced_text_colors)
|
577 |
-
o.colors = v;
|
578 |
-
|
579 |
-
if (s.theme_advanced_default_foreground_color)
|
580 |
-
o.default_color = s.theme_advanced_default_foreground_color;
|
581 |
-
|
582 |
-
o.title = 'advanced.forecolor_desc';
|
583 |
-
o.cmd = 'ForeColor';
|
584 |
-
o.scope = this;
|
585 |
-
|
586 |
-
c = t.editor.controlManager.createColorSplitButton('forecolor', o);
|
587 |
-
|
588 |
-
return c;
|
589 |
-
},
|
590 |
-
|
591 |
-
_createBackColorMenu : function() {
|
592 |
-
var c, t = this, s = t.settings, o = {}, v;
|
593 |
-
|
594 |
-
if (s.theme_advanced_more_colors) {
|
595 |
-
o.more_colors_func = function() {
|
596 |
-
t._mceColorPicker(0, {
|
597 |
-
color : c.value,
|
598 |
-
func : function(co) {
|
599 |
-
c.setColor(co);
|
600 |
-
}
|
601 |
-
});
|
602 |
-
};
|
603 |
-
}
|
604 |
-
|
605 |
-
if (v = s.theme_advanced_background_colors)
|
606 |
-
o.colors = v;
|
607 |
-
|
608 |
-
if (s.theme_advanced_default_background_color)
|
609 |
-
o.default_color = s.theme_advanced_default_background_color;
|
610 |
-
|
611 |
-
o.title = 'advanced.backcolor_desc';
|
612 |
-
o.cmd = 'HiliteColor';
|
613 |
-
o.scope = this;
|
614 |
-
|
615 |
-
c = t.editor.controlManager.createColorSplitButton('backcolor', o);
|
616 |
-
|
617 |
-
return c;
|
618 |
-
},
|
619 |
-
|
620 |
-
renderUI : function(o) {
|
621 |
-
var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl;
|
622 |
-
|
623 |
-
if (ed.settings) {
|
624 |
-
ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut');
|
625 |
-
}
|
626 |
-
|
627 |
-
// TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for.
|
628 |
-
// Maybe actually inherit it from the original textara?
|
629 |
-
n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '') + (ed.settings.directionality == "rtl" ? ' mceRtl' : '')});
|
630 |
-
DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label);
|
631 |
-
|
632 |
-
if (!DOM.boxModel)
|
633 |
-
n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'});
|
634 |
-
|
635 |
-
n = sc = DOM.add(n, 'table', {role : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0});
|
636 |
-
n = tb = DOM.add(n, 'tbody');
|
637 |
-
|
638 |
-
switch ((s.theme_advanced_layout_manager || '').toLowerCase()) {
|
639 |
-
case "rowlayout":
|
640 |
-
ic = t._rowLayout(s, tb, o);
|
641 |
-
break;
|
642 |
-
|
643 |
-
case "customlayout":
|
644 |
-
ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p);
|
645 |
-
break;
|
646 |
-
|
647 |
-
default:
|
648 |
-
ic = t._simpleLayout(s, tb, o, p);
|
649 |
-
}
|
650 |
-
|
651 |
-
n = o.targetNode;
|
652 |
-
|
653 |
-
// Add classes to first and last TRs
|
654 |
-
nl = sc.rows;
|
655 |
-
DOM.addClass(nl[0], 'mceFirst');
|
656 |
-
DOM.addClass(nl[nl.length - 1], 'mceLast');
|
657 |
-
|
658 |
-
// Add classes to first and last TDs
|
659 |
-
each(DOM.select('tr', tb), function(n) {
|
660 |
-
DOM.addClass(n.firstChild, 'mceFirst');
|
661 |
-
DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast');
|
662 |
-
});
|
663 |
-
|
664 |
-
if (DOM.get(s.theme_advanced_toolbar_container))
|
665 |
-
DOM.get(s.theme_advanced_toolbar_container).appendChild(p);
|
666 |
-
else
|
667 |
-
DOM.insertAfter(p, n);
|
668 |
-
|
669 |
-
Event.add(ed.id + '_path_row', 'click', function(e) {
|
670 |
-
e = e.target;
|
671 |
-
|
672 |
-
if (e.nodeName == 'A') {
|
673 |
-
t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1'));
|
674 |
-
return false;
|
675 |
-
}
|
676 |
-
});
|
677 |
-
/*
|
678 |
-
if (DOM.get(ed.id + '_path_row')) {
|
679 |
-
Event.add(ed.id + '_tbl', 'mouseover', function(e) {
|
680 |
-
var re;
|
681 |
-
|
682 |
-
e = e.target;
|
683 |
-
|
684 |
-
if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) {
|
685 |
-
re = DOM.get(ed.id + '_path_row');
|
686 |
-
t.lastPath = re.innerHTML;
|
687 |
-
DOM.setHTML(re, e.parentNode.title);
|
688 |
-
}
|
689 |
-
});
|
690 |
-
|
691 |
-
Event.add(ed.id + '_tbl', 'mouseout', function(e) {
|
692 |
-
if (t.lastPath) {
|
693 |
-
DOM.setHTML(ed.id + '_path_row', t.lastPath);
|
694 |
-
t.lastPath = 0;
|
695 |
-
}
|
696 |
-
});
|
697 |
-
}
|
698 |
-
*/
|
699 |
-
|
700 |
-
if (!ed.getParam('accessibility_focus'))
|
701 |
-
Event.add(DOM.add(p, 'a', {href : '#'}, '<!-- IE -->'), 'focus', function() {tinyMCE.get(ed.id).focus();});
|
702 |
-
|
703 |
-
if (s.theme_advanced_toolbar_location == 'external')
|
704 |
-
o.deltaHeight = 0;
|
705 |
-
|
706 |
-
t.deltaHeight = o.deltaHeight;
|
707 |
-
o.targetNode = null;
|
708 |
-
|
709 |
-
ed.onKeyDown.add(function(ed, evt) {
|
710 |
-
var DOM_VK_F10 = 121, DOM_VK_F11 = 122;
|
711 |
-
|
712 |
-
if (evt.altKey) {
|
713 |
-
if (evt.keyCode === DOM_VK_F10) {
|
714 |
-
// Make sure focus is given to toolbar in Safari.
|
715 |
-
// We can't do this in IE as it prevents giving focus to toolbar when editor is in a frame
|
716 |
-
if (tinymce.isWebKit) {
|
717 |
-
window.focus();
|
718 |
-
}
|
719 |
-
t.toolbarGroup.focus();
|
720 |
-
return Event.cancel(evt);
|
721 |
-
} else if (evt.keyCode === DOM_VK_F11) {
|
722 |
-
DOM.get(ed.id + '_path_row').focus();
|
723 |
-
return Event.cancel(evt);
|
724 |
-
}
|
725 |
-
}
|
726 |
-
});
|
727 |
-
|
728 |
-
// alt+0 is the UK recommended shortcut for accessing the list of access controls.
|
729 |
-
ed.addShortcut('alt+0', '', 'mceShortcuts', t);
|
730 |
-
|
731 |
-
return {
|
732 |
-
iframeContainer : ic,
|
733 |
-
editorContainer : ed.id + '_parent',
|
734 |
-
sizeContainer : sc,
|
735 |
-
deltaHeight : o.deltaHeight
|
736 |
-
};
|
737 |
-
},
|
738 |
-
|
739 |
-
getInfo : function() {
|
740 |
-
return {
|
741 |
-
longname : 'Advanced theme',
|
742 |
-
author : 'Moxiecode Systems AB',
|
743 |
-
authorurl : 'http://tinymce.moxiecode.com',
|
744 |
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
745 |
-
}
|
746 |
-
},
|
747 |
-
|
748 |
-
resizeBy : function(dw, dh) {
|
749 |
-
var e = DOM.get(this.editor.id + '_ifr');
|
750 |
-
|
751 |
-
this.resizeTo(e.clientWidth + dw, e.clientHeight + dh);
|
752 |
-
},
|
753 |
-
|
754 |
-
resizeTo : function(w, h, store) {
|
755 |
-
var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr');
|
756 |
-
|
757 |
-
// Boundery fix box
|
758 |
-
w = Math.max(s.theme_advanced_resizing_min_width || 100, w);
|
759 |
-
h = Math.max(s.theme_advanced_resizing_min_height || 100, h);
|
760 |
-
w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w);
|
761 |
-
h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h);
|
762 |
-
|
763 |
-
// Resize iframe and container
|
764 |
-
DOM.setStyle(e, 'height', '');
|
765 |
-
DOM.setStyle(ifr, 'height', h);
|
766 |
-
|
767 |
-
if (s.theme_advanced_resize_horizontal) {
|
768 |
-
DOM.setStyle(e, 'width', '');
|
769 |
-
DOM.setStyle(ifr, 'width', w);
|
770 |
-
|
771 |
-
// Make sure that the size is never smaller than the over all ui
|
772 |
-
if (w < e.clientWidth) {
|
773 |
-
w = e.clientWidth;
|
774 |
-
DOM.setStyle(ifr, 'width', e.clientWidth);
|
775 |
-
}
|
776 |
-
}
|
777 |
-
|
778 |
-
// Store away the size
|
779 |
-
if (store && s.theme_advanced_resizing_use_cookie) {
|
780 |
-
Cookie.setHash("TinyMCE_" + ed.id + "_size", {
|
781 |
-
cw : w,
|
782 |
-
ch : h
|
783 |
-
});
|
784 |
-
}
|
785 |
-
},
|
786 |
-
|
787 |
-
destroy : function() {
|
788 |
-
var id = this.editor.id;
|
789 |
-
|
790 |
-
Event.clear(id + '_resize');
|
791 |
-
Event.clear(id + '_path_row');
|
792 |
-
Event.clear(id + '_external_close');
|
793 |
-
},
|
794 |
-
|
795 |
-
// Internal functions
|
796 |
-
|
797 |
-
_simpleLayout : function(s, tb, o, p) {
|
798 |
-
var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c;
|
799 |
-
|
800 |
-
if (s.readonly) {
|
801 |
-
n = DOM.add(tb, 'tr');
|
802 |
-
n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
|
803 |
-
return ic;
|
804 |
-
}
|
805 |
-
|
806 |
-
// Create toolbar container at top
|
807 |
-
if (lo == 'top')
|
808 |
-
t._addToolbars(tb, o);
|
809 |
-
|
810 |
-
// Create external toolbar
|
811 |
-
if (lo == 'external') {
|
812 |
-
n = c = DOM.create('div', {style : 'position:relative'});
|
813 |
-
n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'});
|
814 |
-
DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'});
|
815 |
-
n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0});
|
816 |
-
etb = DOM.add(n, 'tbody');
|
817 |
-
|
818 |
-
if (p.firstChild.className == 'mceOldBoxModel')
|
819 |
-
p.firstChild.appendChild(c);
|
820 |
-
else
|
821 |
-
p.insertBefore(c, p.firstChild);
|
822 |
-
|
823 |
-
t._addToolbars(etb, o);
|
824 |
-
|
825 |
-
ed.onMouseUp.add(function() {
|
826 |
-
var e = DOM.get(ed.id + '_external');
|
827 |
-
DOM.show(e);
|
828 |
-
|
829 |
-
DOM.hide(lastExtID);
|
830 |
-
|
831 |
-
var f = Event.add(ed.id + '_external_close', 'click', function() {
|
832 |
-
DOM.hide(ed.id + '_external');
|
833 |
-
Event.remove(ed.id + '_external_close', 'click', f);
|
834 |
-
return false;
|
835 |
-
});
|
836 |
-
|
837 |
-
DOM.show(e);
|
838 |
-
DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1);
|
839 |
-
|
840 |
-
// Fixes IE rendering bug
|
841 |
-
DOM.hide(e);
|
842 |
-
DOM.show(e);
|
843 |
-
e.style.filter = '';
|
844 |
-
|
845 |
-
lastExtID = ed.id + '_external';
|
846 |
-
|
847 |
-
e = null;
|
848 |
-
});
|
849 |
-
}
|
850 |
-
|
851 |
-
if (sl == 'top')
|
852 |
-
t._addStatusBar(tb, o);
|
853 |
-
|
854 |
-
// Create iframe container
|
855 |
-
if (!s.theme_advanced_toolbar_container) {
|
856 |
-
n = DOM.add(tb, 'tr');
|
857 |
-
n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
|
858 |
-
}
|
859 |
-
|
860 |
-
// Create toolbar container at bottom
|
861 |
-
if (lo == 'bottom')
|
862 |
-
t._addToolbars(tb, o);
|
863 |
-
|
864 |
-
if (sl == 'bottom')
|
865 |
-
t._addStatusBar(tb, o);
|
866 |
-
|
867 |
-
return ic;
|
868 |
-
},
|
869 |
-
|
870 |
-
_rowLayout : function(s, tb, o) {
|
871 |
-
var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a;
|
872 |
-
|
873 |
-
dc = s.theme_advanced_containers_default_class || '';
|
874 |
-
da = s.theme_advanced_containers_default_align || 'center';
|
875 |
-
|
876 |
-
each(explode(s.theme_advanced_containers || ''), function(c, i) {
|
877 |
-
var v = s['theme_advanced_container_' + c] || '';
|
878 |
-
|
879 |
-
switch (c.toLowerCase()) {
|
880 |
-
case 'mceeditor':
|
881 |
-
n = DOM.add(tb, 'tr');
|
882 |
-
n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
|
883 |
-
break;
|
884 |
-
|
885 |
-
case 'mceelementpath':
|
886 |
-
t._addStatusBar(tb, o);
|
887 |
-
break;
|
888 |
-
|
889 |
-
default:
|
890 |
-
a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase();
|
891 |
-
a = 'mce' + t._ufirst(a);
|
892 |
-
|
893 |
-
n = DOM.add(DOM.add(tb, 'tr'), 'td', {
|
894 |
-
'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da
|
895 |
-
});
|
896 |
-
|
897 |
-
to = cf.createToolbar("toolbar" + i);
|
898 |
-
t._addControls(v, to);
|
899 |
-
DOM.setHTML(n, to.renderHTML());
|
900 |
-
o.deltaHeight -= s.theme_advanced_row_height;
|
901 |
-
}
|
902 |
-
});
|
903 |
-
|
904 |
-
return ic;
|
905 |
-
},
|
906 |
-
|
907 |
-
_addControls : function(v, tb) {
|
908 |
-
var t = this, s = t.settings, di, cf = t.editor.controlManager;
|
909 |
-
|
910 |
-
if (s.theme_advanced_disable && !t._disabled) {
|
911 |
-
di = {};
|
912 |
-
|
913 |
-
each(explode(s.theme_advanced_disable), function(v) {
|
914 |
-
di[v] = 1;
|
915 |
-
});
|
916 |
-
|
917 |
-
t._disabled = di;
|
918 |
-
} else
|
919 |
-
di = t._disabled;
|
920 |
-
|
921 |
-
each(explode(v), function(n) {
|
922 |
-
var c;
|
923 |
-
|
924 |
-
if (di && di[n])
|
925 |
-
return;
|
926 |
-
|
927 |
-
// Compatiblity with 2.x
|
928 |
-
if (n == 'tablecontrols') {
|
929 |
-
each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) {
|
930 |
-
n = t.createControl(n, cf);
|
931 |
-
|
932 |
-
if (n)
|
933 |
-
tb.add(n);
|
934 |
-
});
|
935 |
-
|
936 |
-
return;
|
937 |
-
}
|
938 |
-
|
939 |
-
c = t.createControl(n, cf);
|
940 |
-
|
941 |
-
if (c)
|
942 |
-
tb.add(c);
|
943 |
-
});
|
944 |
-
},
|
945 |
-
|
946 |
-
_addToolbars : function(c, o) {
|
947 |
-
var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup, toolbarsExist = false;
|
948 |
-
|
949 |
-
toolbarGroup = cf.createToolbarGroup('toolbargroup', {
|
950 |
-
'name': ed.getLang('advanced.toolbar'),
|
951 |
-
'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar')
|
952 |
-
});
|
953 |
-
|
954 |
-
t.toolbarGroup = toolbarGroup;
|
955 |
-
|
956 |
-
a = s.theme_advanced_toolbar_align.toLowerCase();
|
957 |
-
a = 'mce' + t._ufirst(a);
|
958 |
-
|
959 |
-
n = DOM.add(DOM.add(c, 'tr', {role: 'toolbar'}), 'td', {'class' : 'mceToolbar ' + a, "role":"toolbar"});
|
960 |
-
|
961 |
-
// Create toolbar and add the controls
|
962 |
-
for (i=1; (v = s['theme_advanced_buttons' + i]); i++) {
|
963 |
-
toolbarsExist = true;
|
964 |
-
tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i});
|
965 |
-
|
966 |
-
if (s['theme_advanced_buttons' + i + '_add'])
|
967 |
-
v += ',' + s['theme_advanced_buttons' + i + '_add'];
|
968 |
-
|
969 |
-
if (s['theme_advanced_buttons' + i + '_add_before'])
|
970 |
-
v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v;
|
971 |
-
|
972 |
-
t._addControls(v, tb);
|
973 |
-
toolbarGroup.add(tb);
|
974 |
-
|
975 |
-
o.deltaHeight -= s.theme_advanced_row_height;
|
976 |
-
}
|
977 |
-
// Handle case when there are no toolbar buttons and ensure editor height is adjusted accordingly
|
978 |
-
if (!toolbarsExist)
|
979 |
-
o.deltaHeight -= s.theme_advanced_row_height;
|
980 |
-
h.push(toolbarGroup.renderHTML());
|
981 |
-
h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
|
982 |
-
DOM.setHTML(n, h.join(''));
|
983 |
-
},
|
984 |
-
|
985 |
-
_addStatusBar : function(tb, o) {
|
986 |
-
var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
|
987 |
-
|
988 |
-
n = DOM.add(tb, 'tr');
|
989 |
-
n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
|
990 |
-
n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'});
|
991 |
-
if (s.theme_advanced_path) {
|
992 |
-
DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path'));
|
993 |
-
DOM.add(n, 'span', {}, ': ');
|
994 |
-
} else {
|
995 |
-
DOM.add(n, 'span', {}, ' ');
|
996 |
-
}
|
997 |
-
|
998 |
-
|
999 |
-
if (s.theme_advanced_resizing) {
|
1000 |
-
DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"});
|
1001 |
-
|
1002 |
-
if (s.theme_advanced_resizing_use_cookie) {
|
1003 |
-
ed.onPostRender.add(function() {
|
1004 |
-
var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl');
|
1005 |
-
|
1006 |
-
if (!o)
|
1007 |
-
return;
|
1008 |
-
|
1009 |
-
t.resizeTo(o.cw, o.ch);
|
1010 |
-
});
|
1011 |
-
}
|
1012 |
-
|
1013 |
-
ed.onPostRender.add(function() {
|
1014 |
-
Event.add(ed.id + '_resize', 'click', function(e) {
|
1015 |
-
e.preventDefault();
|
1016 |
-
});
|
1017 |
-
|
1018 |
-
Event.add(ed.id + '_resize', 'mousedown', function(e) {
|
1019 |
-
var mouseMoveHandler1, mouseMoveHandler2,
|
1020 |
-
mouseUpHandler1, mouseUpHandler2,
|
1021 |
-
startX, startY, startWidth, startHeight, width, height, ifrElm;
|
1022 |
-
|
1023 |
-
function resizeOnMove(e) {
|
1024 |
-
e.preventDefault();
|
1025 |
-
|
1026 |
-
width = startWidth + (e.screenX - startX);
|
1027 |
-
height = startHeight + (e.screenY - startY);
|
1028 |
-
|
1029 |
-
t.resizeTo(width, height);
|
1030 |
-
};
|
1031 |
-
|
1032 |
-
function endResize(e) {
|
1033 |
-
// Stop listening
|
1034 |
-
Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1);
|
1035 |
-
Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2);
|
1036 |
-
Event.remove(DOM.doc, 'mouseup', mouseUpHandler1);
|
1037 |
-
Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2);
|
1038 |
-
|
1039 |
-
width = startWidth + (e.screenX - startX);
|
1040 |
-
height = startHeight + (e.screenY - startY);
|
1041 |
-
t.resizeTo(width, height, true);
|
1042 |
-
|
1043 |
-
ed.nodeChanged();
|
1044 |
-
};
|
1045 |
-
|
1046 |
-
e.preventDefault();
|
1047 |
-
|
1048 |
-
// Get the current rect size
|
1049 |
-
startX = e.screenX;
|
1050 |
-
startY = e.screenY;
|
1051 |
-
ifrElm = DOM.get(t.editor.id + '_ifr');
|
1052 |
-
startWidth = width = ifrElm.clientWidth;
|
1053 |
-
startHeight = height = ifrElm.clientHeight;
|
1054 |
-
|
1055 |
-
// Register envent handlers
|
1056 |
-
mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove);
|
1057 |
-
mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove);
|
1058 |
-
mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize);
|
1059 |
-
mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize);
|
1060 |
-
});
|
1061 |
-
});
|
1062 |
-
}
|
1063 |
-
|
1064 |
-
o.deltaHeight -= 21;
|
1065 |
-
n = tb = null;
|
1066 |
-
},
|
1067 |
-
|
1068 |
-
_updateUndoStatus : function(ed) {
|
1069 |
-
var cm = ed.controlManager, um = ed.undoManager;
|
1070 |
-
|
1071 |
-
cm.setDisabled('undo', !um.hasUndo() && !um.typing);
|
1072 |
-
cm.setDisabled('redo', !um.hasRedo());
|
1073 |
-
},
|
1074 |
-
|
1075 |
-
_nodeChanged : function(ed, cm, n, co, ob) {
|
1076 |
-
var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches;
|
1077 |
-
|
1078 |
-
tinymce.each(t.stateControls, function(c) {
|
1079 |
-
cm.setActive(c, ed.queryCommandState(t.controls[c][1]));
|
1080 |
-
});
|
1081 |
-
|
1082 |
-
function getParent(name) {
|
1083 |
-
var i, parents = ob.parents, func = name;
|
1084 |
-
|
1085 |
-
if (typeof(name) == 'string') {
|
1086 |
-
func = function(node) {
|
1087 |
-
return node.nodeName == name;
|
1088 |
-
};
|
1089 |
-
}
|
1090 |
-
|
1091 |
-
for (i = 0; i < parents.length; i++) {
|
1092 |
-
if (func(parents[i]))
|
1093 |
-
return parents[i];
|
1094 |
-
}
|
1095 |
-
};
|
1096 |
-
|
1097 |
-
cm.setActive('visualaid', ed.hasVisual);
|
1098 |
-
t._updateUndoStatus(ed);
|
1099 |
-
cm.setDisabled('outdent', !ed.queryCommandState('Outdent'));
|
1100 |
-
|
1101 |
-
p = getParent('A');
|
1102 |
-
if (c = cm.get('link')) {
|
1103 |
-
c.setDisabled((!p && co) || (p && !p.href));
|
1104 |
-
c.setActive(!!p && (!p.name && !p.id));
|
1105 |
-
}
|
1106 |
-
|
1107 |
-
if (c = cm.get('unlink')) {
|
1108 |
-
c.setDisabled(!p && co);
|
1109 |
-
c.setActive(!!p && !p.name && !p.id);
|
1110 |
-
}
|
1111 |
-
|
1112 |
-
if (c = cm.get('anchor')) {
|
1113 |
-
c.setActive(!co && !!p && (p.name || (p.id && !p.href)));
|
1114 |
-
}
|
1115 |
-
|
1116 |
-
p = getParent('IMG');
|
1117 |
-
if (c = cm.get('image'))
|
1118 |
-
c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1);
|
1119 |
-
|
1120 |
-
if (c = cm.get('styleselect')) {
|
1121 |
-
t._importClasses();
|
1122 |
-
|
1123 |
-
formatNames = [];
|
1124 |
-
each(c.items, function(item) {
|
1125 |
-
formatNames.push(item.value);
|
1126 |
-
});
|
1127 |
-
|
1128 |
-
matches = ed.formatter.matchAll(formatNames);
|
1129 |
-
c.select(matches[0]);
|
1130 |
-
tinymce.each(matches, function(match, index) {
|
1131 |
-
if (index > 0) {
|
1132 |
-
c.mark(match);
|
1133 |
-
}
|
1134 |
-
});
|
1135 |
-
}
|
1136 |
-
|
1137 |
-
if (c = cm.get('formatselect')) {
|
1138 |
-
p = getParent(ed.dom.isBlock);
|
1139 |
-
|
1140 |
-
if (p)
|
1141 |
-
c.select(p.nodeName.toLowerCase());
|
1142 |
-
}
|
1143 |
-
|
1144 |
-
// Find out current fontSize, fontFamily and fontClass
|
1145 |
-
getParent(function(n) {
|
1146 |
-
if (n.nodeName === 'SPAN') {
|
1147 |
-
if (!cl && n.className)
|
1148 |
-
cl = n.className;
|
1149 |
-
}
|
1150 |
-
|
1151 |
-
if (ed.dom.is(n, s.theme_advanced_font_selector)) {
|
1152 |
-
if (!fz && n.style.fontSize)
|
1153 |
-
fz = n.style.fontSize;
|
1154 |
-
|
1155 |
-
if (!fn && n.style.fontFamily)
|
1156 |
-
fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();
|
1157 |
-
|
1158 |
-
if (!fc && n.style.color)
|
1159 |
-
fc = n.style.color;
|
1160 |
-
|
1161 |
-
if (!bc && n.style.backgroundColor)
|
1162 |
-
bc = n.style.backgroundColor;
|
1163 |
-
}
|
1164 |
-
|
1165 |
-
return false;
|
1166 |
-
});
|
1167 |
-
|
1168 |
-
if (c = cm.get('fontselect')) {
|
1169 |
-
c.select(function(v) {
|
1170 |
-
return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn;
|
1171 |
-
});
|
1172 |
-
}
|
1173 |
-
|
1174 |
-
// Select font size
|
1175 |
-
if (c = cm.get('fontsizeselect')) {
|
1176 |
-
// Use computed style
|
1177 |
-
if (s.theme_advanced_runtime_fontsize && !fz && !cl)
|
1178 |
-
fz = ed.dom.getStyle(n, 'fontSize', true);
|
1179 |
-
|
1180 |
-
c.select(function(v) {
|
1181 |
-
if (v.fontSize && v.fontSize === fz)
|
1182 |
-
return true;
|
1183 |
-
|
1184 |
-
if (v['class'] && v['class'] === cl)
|
1185 |
-
return true;
|
1186 |
-
});
|
1187 |
-
}
|
1188 |
-
|
1189 |
-
if (s.theme_advanced_show_current_color) {
|
1190 |
-
function updateColor(controlId, color) {
|
1191 |
-
if (c = cm.get(controlId)) {
|
1192 |
-
if (!color)
|
1193 |
-
color = c.settings.default_color;
|
1194 |
-
if (color !== c.value) {
|
1195 |
-
c.displayColor(color);
|
1196 |
-
}
|
1197 |
-
}
|
1198 |
-
}
|
1199 |
-
updateColor('forecolor', fc);
|
1200 |
-
updateColor('backcolor', bc);
|
1201 |
-
}
|
1202 |
-
|
1203 |
-
if (s.theme_advanced_show_current_color) {
|
1204 |
-
function updateColor(controlId, color) {
|
1205 |
-
if (c = cm.get(controlId)) {
|
1206 |
-
if (!color)
|
1207 |
-
color = c.settings.default_color;
|
1208 |
-
if (color !== c.value) {
|
1209 |
-
c.displayColor(color);
|
1210 |
-
}
|
1211 |
-
}
|
1212 |
-
};
|
1213 |
-
|
1214 |
-
updateColor('forecolor', fc);
|
1215 |
-
updateColor('backcolor', bc);
|
1216 |
-
}
|
1217 |
-
|
1218 |
-
if (s.theme_advanced_path && s.theme_advanced_statusbar_location) {
|
1219 |
-
p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});
|
1220 |
-
|
1221 |
-
if (t.statusKeyboardNavigation) {
|
1222 |
-
t.statusKeyboardNavigation.destroy();
|
1223 |
-
t.statusKeyboardNavigation = null;
|
1224 |
-
}
|
1225 |
-
|
1226 |
-
DOM.setHTML(p, '');
|
1227 |
-
|
1228 |
-
getParent(function(n) {
|
1229 |
-
var na = n.nodeName.toLowerCase(), u, pi, ti = '';
|
1230 |
-
|
1231 |
-
// Ignore non element and bogus/hidden elements
|
1232 |
-
if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved'))
|
1233 |
-
return;
|
1234 |
-
|
1235 |
-
// Handle prefix
|
1236 |
-
if (tinymce.isIE && n.scopeName !== 'HTML' && n.scopeName)
|
1237 |
-
na = n.scopeName + ':' + na;
|
1238 |
-
|
1239 |
-
// Remove internal prefix
|
1240 |
-
na = na.replace(/mce\:/g, '');
|
1241 |
-
|
1242 |
-
// Handle node name
|
1243 |
-
switch (na) {
|
1244 |
-
case 'b':
|
1245 |
-
na = 'strong';
|
1246 |
-
break;
|
1247 |
-
|
1248 |
-
case 'i':
|
1249 |
-
na = 'em';
|
1250 |
-
break;
|
1251 |
-
|
1252 |
-
case 'img':
|
1253 |
-
if (v = DOM.getAttrib(n, 'src'))
|
1254 |
-
ti += 'src: ' + v + ' ';
|
1255 |
-
|
1256 |
-
break;
|
1257 |
-
|
1258 |
-
case 'a':
|
1259 |
-
if (v = DOM.getAttrib(n, 'name')) {
|
1260 |
-
ti += 'name: ' + v + ' ';
|
1261 |
-
na += '#' + v;
|
1262 |
-
}
|
1263 |
-
|
1264 |
-
if (v = DOM.getAttrib(n, 'href'))
|
1265 |
-
ti += 'href: ' + v + ' ';
|
1266 |
-
|
1267 |
-
break;
|
1268 |
-
|
1269 |
-
case 'font':
|
1270 |
-
if (v = DOM.getAttrib(n, 'face'))
|
1271 |
-
ti += 'font: ' + v + ' ';
|
1272 |
-
|
1273 |
-
if (v = DOM.getAttrib(n, 'size'))
|
1274 |
-
ti += 'size: ' + v + ' ';
|
1275 |
-
|
1276 |
-
if (v = DOM.getAttrib(n, 'color'))
|
1277 |
-
ti += 'color: ' + v + ' ';
|
1278 |
-
|
1279 |
-
break;
|
1280 |
-
|
1281 |
-
case 'span':
|
1282 |
-
if (v = DOM.getAttrib(n, 'style'))
|
1283 |
-
ti += 'style: ' + v + ' ';
|
1284 |
-
|
1285 |
-
break;
|
1286 |
-
}
|
1287 |
-
|
1288 |
-
if (v = DOM.getAttrib(n, 'id'))
|
1289 |
-
ti += 'id: ' + v + ' ';
|
1290 |
-
|
1291 |
-
if (v = n.className) {
|
1292 |
-
v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '');
|
1293 |
-
|
1294 |
-
if (v) {
|
1295 |
-
ti += 'class: ' + v + ' ';
|
1296 |
-
|
1297 |
-
if (ed.dom.isBlock(n) || na == 'img' || na == 'span')
|
1298 |
-
na += '.' + v;
|
1299 |
-
}
|
1300 |
-
}
|
1301 |
-
|
1302 |
-
na = na.replace(/(html:)/g, '');
|
1303 |
-
na = {name : na, node : n, title : ti};
|
1304 |
-
t.onResolveName.dispatch(t, na);
|
1305 |
-
ti = na.title;
|
1306 |
-
na = na.name;
|
1307 |
-
|
1308 |
-
//u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');";
|
1309 |
-
pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na);
|
1310 |
-
|
1311 |
-
if (p.hasChildNodes()) {
|
1312 |
-
p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild);
|
1313 |
-
p.insertBefore(pi, p.firstChild);
|
1314 |
-
} else
|
1315 |
-
p.appendChild(pi);
|
1316 |
-
}, ed.getBody());
|
1317 |
-
|
1318 |
-
if (DOM.select('a', p).length > 0) {
|
1319 |
-
t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({
|
1320 |
-
root: ed.id + "_path_row",
|
1321 |
-
items: DOM.select('a', p),
|
1322 |
-
excludeFromTabOrder: true,
|
1323 |
-
onCancel: function() {
|
1324 |
-
ed.focus();
|
1325 |
-
}
|
1326 |
-
}, DOM);
|
1327 |
-
}
|
1328 |
-
}
|
1329 |
-
},
|
1330 |
-
|
1331 |
-
// Commands gets called by execCommand
|
1332 |
-
|
1333 |
-
_sel : function(v) {
|
1334 |
-
this.editor.execCommand('mceSelectNodeDepth', false, v);
|
1335 |
-
},
|
1336 |
-
|
1337 |
-
_mceInsertAnchor : function(ui, v) {
|
1338 |
-
var ed = this.editor;
|
1339 |
-
|
1340 |
-
ed.windowManager.open({
|
1341 |
-
url : this.url + '/anchor.htm',
|
1342 |
-
width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)),
|
1343 |
-
height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)),
|
1344 |
-
inline : true
|
1345 |
-
}, {
|
1346 |
-
theme_url : this.url
|
1347 |
-
});
|
1348 |
-
},
|
1349 |
-
|
1350 |
-
_mceCharMap : function() {
|
1351 |
-
var ed = this.editor;
|
1352 |
-
|
1353 |
-
ed.windowManager.open({
|
1354 |
-
url : this.url + '/charmap.htm',
|
1355 |
-
width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)),
|
1356 |
-
height : 265 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)),
|
1357 |
-
inline : true
|
1358 |
-
}, {
|
1359 |
-
theme_url : this.url
|
1360 |
-
});
|
1361 |
-
},
|
1362 |
-
|
1363 |
-
_mceHelp : function() {
|
1364 |
-
var ed = this.editor;
|
1365 |
-
|
1366 |
-
ed.windowManager.open({
|
1367 |
-
url : this.url + '/about.htm',
|
1368 |
-
width : 480,
|
1369 |
-
height : 380,
|
1370 |
-
inline : true
|
1371 |
-
}, {
|
1372 |
-
theme_url : this.url
|
1373 |
-
});
|
1374 |
-
},
|
1375 |
-
|
1376 |
-
_mceShortcuts : function() {
|
1377 |
-
var ed = this.editor;
|
1378 |
-
ed.windowManager.open({
|
1379 |
-
url: this.url + '/shortcuts.htm',
|
1380 |
-
width: 480,
|
1381 |
-
height: 380,
|
1382 |
-
inline: true
|
1383 |
-
}, {
|
1384 |
-
theme_url: this.url
|
1385 |
-
});
|
1386 |
-
},
|
1387 |
-
|
1388 |
-
_mceColorPicker : function(u, v) {
|
1389 |
-
var ed = this.editor;
|
1390 |
-
|
1391 |
-
v = v || {};
|
1392 |
-
|
1393 |
-
ed.windowManager.open({
|
1394 |
-
url : this.url + '/color_picker.htm',
|
1395 |
-
width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)),
|
1396 |
-
height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)),
|
1397 |
-
close_previous : false,
|
1398 |
-
inline : true
|
1399 |
-
}, {
|
1400 |
-
input_color : v.color,
|
1401 |
-
func : v.func,
|
1402 |
-
theme_url : this.url
|
1403 |
-
});
|
1404 |
-
},
|
1405 |
-
|
1406 |
-
_mceCodeEditor : function(ui, val) {
|
1407 |
-
var ed = this.editor;
|
1408 |
-
|
1409 |
-
ed.windowManager.open({
|
1410 |
-
url : this.url + '/source_editor.htm',
|
1411 |
-
width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)),
|
1412 |
-
height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)),
|
1413 |
-
inline : true,
|
1414 |
-
resizable : true,
|
1415 |
-
maximizable : true
|
1416 |
-
}, {
|
1417 |
-
theme_url : this.url
|
1418 |
-
});
|
1419 |
-
},
|
1420 |
-
|
1421 |
-
_mceImage : function(ui, val) {
|
1422 |
-
var ed = this.editor;
|
1423 |
-
|
1424 |
-
// Internal image object like a flash placeholder
|
1425 |
-
if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1)
|
1426 |
-
return;
|
1427 |
-
|
1428 |
-
ed.windowManager.open({
|
1429 |
-
url : this.url + '/image.htm',
|
1430 |
-
width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)),
|
1431 |
-
height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)),
|
1432 |
-
inline : true
|
1433 |
-
}, {
|
1434 |
-
theme_url : this.url
|
1435 |
-
});
|
1436 |
-
},
|
1437 |
-
|
1438 |
-
_mceLink : function(ui, val) {
|
1439 |
-
var ed = this.editor;
|
1440 |
-
|
1441 |
-
ed.windowManager.open({
|
1442 |
-
url : this.url + '/link.htm',
|
1443 |
-
width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)),
|
1444 |
-
height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)),
|
1445 |
-
inline : true
|
1446 |
-
}, {
|
1447 |
-
theme_url : this.url
|
1448 |
-
});
|
1449 |
-
},
|
1450 |
-
|
1451 |
-
_mceNewDocument : function() {
|
1452 |
-
var ed = this.editor;
|
1453 |
-
|
1454 |
-
ed.windowManager.confirm('advanced.newdocument', function(s) {
|
1455 |
-
if (s)
|
1456 |
-
ed.execCommand('mceSetContent', false, '');
|
1457 |
-
});
|
1458 |
-
},
|
1459 |
-
|
1460 |
-
_mceForeColor : function() {
|
1461 |
-
var t = this;
|
1462 |
-
|
1463 |
-
this._mceColorPicker(0, {
|
1464 |
-
color: t.fgColor,
|
1465 |
-
func : function(co) {
|
1466 |
-
t.fgColor = co;
|
1467 |
-
t.editor.execCommand('ForeColor', false, co);
|
1468 |
-
}
|
1469 |
-
});
|
1470 |
-
},
|
1471 |
-
|
1472 |
-
_mceBackColor : function() {
|
1473 |
-
var t = this;
|
1474 |
-
|
1475 |
-
this._mceColorPicker(0, {
|
1476 |
-
color: t.bgColor,
|
1477 |
-
func : function(co) {
|
1478 |
-
t.bgColor = co;
|
1479 |
-
t.editor.execCommand('HiliteColor', false, co);
|
1480 |
-
}
|
1481 |
-
});
|
1482 |
-
},
|
1483 |
-
|
1484 |
-
_ufirst : function(s) {
|
1485 |
-
return s.substring(0, 1).toUpperCase() + s.substring(1);
|
1486 |
-
}
|
1487 |
-
});
|
1488 |
-
|
1489 |
-
tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);
|
1490 |
-
}(tinymce));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/image.htm
DELETED
@@ -1,80 +0,0 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#advanced_dlg.image_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
8 |
-
<script type="text/javascript" src="js/image.js"></script>
|
9 |
-
</head>
|
10 |
-
<body id="image" style="display: none">
|
11 |
-
<form onsubmit="ImageDialog.update();return false;" action="#">
|
12 |
-
<div class="tabs">
|
13 |
-
<ul>
|
14 |
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.image_title}</a></span></li>
|
15 |
-
</ul>
|
16 |
-
</div>
|
17 |
-
|
18 |
-
<div class="panel_wrapper">
|
19 |
-
<div id="general_panel" class="panel current">
|
20 |
-
<table border="0" cellpadding="4" cellspacing="0">
|
21 |
-
<tr>
|
22 |
-
<td class="nowrap"><label for="src">{#advanced_dlg.image_src}</label></td>
|
23 |
-
<td><table border="0" cellspacing="0" cellpadding="0">
|
24 |
-
<tr>
|
25 |
-
<td><input id="src" name="src" type="text" class="mceFocus" value="" style="width: 200px" onchange="ImageDialog.getImageData();" /></td>
|
26 |
-
<td id="srcbrowsercontainer"> </td>
|
27 |
-
</tr>
|
28 |
-
</table></td>
|
29 |
-
</tr>
|
30 |
-
<tr>
|
31 |
-
<td><label for="image_list">{#advanced_dlg.image_list}</label></td>
|
32 |
-
<td><select id="image_list" name="image_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;"></select></td>
|
33 |
-
</tr>
|
34 |
-
<tr>
|
35 |
-
<td class="nowrap"><label for="alt">{#advanced_dlg.image_alt}</label></td>
|
36 |
-
<td><input id="alt" name="alt" type="text" value="" style="width: 200px" /></td>
|
37 |
-
</tr>
|
38 |
-
<tr>
|
39 |
-
<td class="nowrap"><label for="align">{#advanced_dlg.image_align}</label></td>
|
40 |
-
<td><select id="align" name="align" onchange="ImageDialog.updateStyle();">
|
41 |
-
<option value="">{#not_set}</option>
|
42 |
-
<option value="baseline">{#advanced_dlg.image_align_baseline}</option>
|
43 |
-
<option value="top">{#advanced_dlg.image_align_top}</option>
|
44 |
-
<option value="middle">{#advanced_dlg.image_align_middle}</option>
|
45 |
-
<option value="bottom">{#advanced_dlg.image_align_bottom}</option>
|
46 |
-
<option value="text-top">{#advanced_dlg.image_align_texttop}</option>
|
47 |
-
<option value="text-bottom">{#advanced_dlg.image_align_textbottom}</option>
|
48 |
-
<option value="left">{#advanced_dlg.image_align_left}</option>
|
49 |
-
<option value="right">{#advanced_dlg.image_align_right}</option>
|
50 |
-
</select></td>
|
51 |
-
</tr>
|
52 |
-
<tr>
|
53 |
-
<td class="nowrap"><label for="width">{#advanced_dlg.image_dimensions}</label></td>
|
54 |
-
<td><input id="width" name="width" type="text" value="" size="3" maxlength="5" />
|
55 |
-
x
|
56 |
-
<input id="height" name="height" type="text" value="" size="3" maxlength="5" /></td>
|
57 |
-
</tr>
|
58 |
-
<tr>
|
59 |
-
<td class="nowrap"><label for="border">{#advanced_dlg.image_border}</label></td>
|
60 |
-
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
|
61 |
-
</tr>
|
62 |
-
<tr>
|
63 |
-
<td class="nowrap"><label for="vspace">{#advanced_dlg.image_vspace}</label></td>
|
64 |
-
<td><input id="vspace" name="vspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
|
65 |
-
</tr>
|
66 |
-
<tr>
|
67 |
-
<td class="nowrap"><label for="hspace">{#advanced_dlg.image_hspace}</label></td>
|
68 |
-
<td><input id="hspace" name="hspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
|
69 |
-
</tr>
|
70 |
-
</table>
|
71 |
-
</div>
|
72 |
-
</div>
|
73 |
-
|
74 |
-
<div class="mceActionPanel">
|
75 |
-
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
76 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
77 |
-
</div>
|
78 |
-
</form>
|
79 |
-
</body>
|
80 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/img/colorpicker.jpg
DELETED
Binary file
|
tiny_mce/themes/advanced/img/flash.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/img/icons.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/img/iframe.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/img/pagebreak.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/img/quicktime.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/img/realmedia.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/img/shockwave.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/img/trans.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/img/video.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/img/windowsmedia.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/js/about.js
DELETED
@@ -1,73 +0,0 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
|
3 |
-
function init() {
|
4 |
-
var ed, tcont;
|
5 |
-
|
6 |
-
tinyMCEPopup.resizeToInnerSize();
|
7 |
-
ed = tinyMCEPopup.editor;
|
8 |
-
|
9 |
-
// Give FF some time
|
10 |
-
window.setTimeout(insertHelpIFrame, 10);
|
11 |
-
|
12 |
-
tcont = document.getElementById('plugintablecontainer');
|
13 |
-
document.getElementById('plugins_tab').style.display = 'none';
|
14 |
-
|
15 |
-
var html = "";
|
16 |
-
html += '<table id="plugintable">';
|
17 |
-
html += '<thead>';
|
18 |
-
html += '<tr>';
|
19 |
-
html += '<td>' + ed.getLang('advanced_dlg.about_plugin') + '</td>';
|
20 |
-
html += '<td>' + ed.getLang('advanced_dlg.about_author') + '</td>';
|
21 |
-
html += '<td>' + ed.getLang('advanced_dlg.about_version') + '</td>';
|
22 |
-
html += '</tr>';
|
23 |
-
html += '</thead>';
|
24 |
-
html += '<tbody>';
|
25 |
-
|
26 |
-
tinymce.each(ed.plugins, function(p, n) {
|
27 |
-
var info;
|
28 |
-
|
29 |
-
if (!p.getInfo)
|
30 |
-
return;
|
31 |
-
|
32 |
-
html += '<tr>';
|
33 |
-
|
34 |
-
info = p.getInfo();
|
35 |
-
|
36 |
-
if (info.infourl != null && info.infourl != '')
|
37 |
-
html += '<td width="50%" title="' + n + '"><a href="' + info.infourl + '" target="_blank">' + info.longname + '</a></td>';
|
38 |
-
else
|
39 |
-
html += '<td width="50%" title="' + n + '">' + info.longname + '</td>';
|
40 |
-
|
41 |
-
if (info.authorurl != null && info.authorurl != '')
|
42 |
-
html += '<td width="35%"><a href="' + info.authorurl + '" target="_blank">' + info.author + '</a></td>';
|
43 |
-
else
|
44 |
-
html += '<td width="35%">' + info.author + '</td>';
|
45 |
-
|
46 |
-
html += '<td width="15%">' + info.version + '</td>';
|
47 |
-
html += '</tr>';
|
48 |
-
|
49 |
-
document.getElementById('plugins_tab').style.display = '';
|
50 |
-
|
51 |
-
});
|
52 |
-
|
53 |
-
html += '</tbody>';
|
54 |
-
html += '</table>';
|
55 |
-
|
56 |
-
tcont.innerHTML = html;
|
57 |
-
|
58 |
-
tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion;
|
59 |
-
tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate;
|
60 |
-
}
|
61 |
-
|
62 |
-
function insertHelpIFrame() {
|
63 |
-
var html;
|
64 |
-
|
65 |
-
if (tinyMCEPopup.getParam('docs_url')) {
|
66 |
-
html = '<iframe width="100%" height="300" src="' + tinyMCEPopup.editor.baseURI.toAbsolute(tinyMCEPopup.getParam('docs_url')) + '"></iframe>';
|
67 |
-
document.getElementById('iframecontainer').innerHTML = html;
|
68 |
-
document.getElementById('help_tab').style.display = 'block';
|
69 |
-
document.getElementById('help_tab').setAttribute("aria-hidden", "false");
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
tinyMCEPopup.onInit.add(init);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/js/anchor.js
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
|
3 |
-
var AnchorDialog = {
|
4 |
-
init : function(ed) {
|
5 |
-
var action, elm, f = document.forms[0];
|
6 |
-
|
7 |
-
this.editor = ed;
|
8 |
-
elm = ed.dom.getParent(ed.selection.getNode(), 'A');
|
9 |
-
v = ed.dom.getAttrib(elm, 'name') || ed.dom.getAttrib(elm, 'id');
|
10 |
-
|
11 |
-
if (v) {
|
12 |
-
this.action = 'update';
|
13 |
-
f.anchorName.value = v;
|
14 |
-
}
|
15 |
-
|
16 |
-
f.insert.value = ed.getLang(elm ? 'update' : 'insert');
|
17 |
-
},
|
18 |
-
|
19 |
-
update : function() {
|
20 |
-
var ed = this.editor, elm, name = document.forms[0].anchorName.value, attribName;
|
21 |
-
|
22 |
-
if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) {
|
23 |
-
tinyMCEPopup.alert('advanced_dlg.anchor_invalid');
|
24 |
-
return;
|
25 |
-
}
|
26 |
-
|
27 |
-
tinyMCEPopup.restoreSelection();
|
28 |
-
|
29 |
-
if (this.action != 'update')
|
30 |
-
ed.selection.collapse(1);
|
31 |
-
|
32 |
-
var aRule = ed.schema.getElementRule('a');
|
33 |
-
if (!aRule || aRule.attributes.name) {
|
34 |
-
attribName = 'name';
|
35 |
-
} else {
|
36 |
-
attribName = 'id';
|
37 |
-
}
|
38 |
-
|
39 |
-
elm = ed.dom.getParent(ed.selection.getNode(), 'A');
|
40 |
-
if (elm) {
|
41 |
-
elm.setAttribute(attribName, name);
|
42 |
-
elm[attribName] = name;
|
43 |
-
ed.undoManager.add();
|
44 |
-
} else {
|
45 |
-
// create with zero-sized nbsp so that in Webkit where anchor is on last line by itself caret cannot be placed after it
|
46 |
-
var attrs = {'class' : 'mceItemAnchor'};
|
47 |
-
attrs[attribName] = name;
|
48 |
-
ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', attrs, '\uFEFF'));
|
49 |
-
ed.nodeChanged();
|
50 |
-
}
|
51 |
-
|
52 |
-
tinyMCEPopup.close();
|
53 |
-
}
|
54 |
-
};
|
55 |
-
|
56 |
-
tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/js/charmap.js
DELETED
@@ -1,363 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* charmap.js
|
3 |
-
*
|
4 |
-
* Copyright 2009, Moxiecode Systems AB
|
5 |
-
* Released under LGPL License.
|
6 |
-
*
|
7 |
-
* License: http://tinymce.moxiecode.com/license
|
8 |
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9 |
-
*/
|
10 |
-
|
11 |
-
tinyMCEPopup.requireLangPack();
|
12 |
-
|
13 |
-
var charmap = [
|
14 |
-
[' ', ' ', true, 'no-break space'],
|
15 |
-
['&', '&', true, 'ampersand'],
|
16 |
-
['"', '"', true, 'quotation mark'],
|
17 |
-
// finance
|
18 |
-
['¢', '¢', true, 'cent sign'],
|
19 |
-
['€', '€', true, 'euro sign'],
|
20 |
-
['£', '£', true, 'pound sign'],
|
21 |
-
['¥', '¥', true, 'yen sign'],
|
22 |
-
// signs
|
23 |
-
['©', '©', true, 'copyright sign'],
|
24 |
-
['®', '®', true, 'registered sign'],
|
25 |
-
['™', '™', true, 'trade mark sign'],
|
26 |
-
['‰', '‰', true, 'per mille sign'],
|
27 |
-
['µ', 'µ', true, 'micro sign'],
|
28 |
-
['·', '·', true, 'middle dot'],
|
29 |
-
['•', '•', true, 'bullet'],
|
30 |
-
['…', '…', true, 'three dot leader'],
|
31 |
-
['′', '′', true, 'minutes / feet'],
|
32 |
-
['″', '″', true, 'seconds / inches'],
|
33 |
-
['§', '§', true, 'section sign'],
|
34 |
-
['¶', '¶', true, 'paragraph sign'],
|
35 |
-
['ß', 'ß', true, 'sharp s / ess-zed'],
|
36 |
-
// quotations
|
37 |
-
['‹', '‹', true, 'single left-pointing angle quotation mark'],
|
38 |
-
['›', '›', true, 'single right-pointing angle quotation mark'],
|
39 |
-
['«', '«', true, 'left pointing guillemet'],
|
40 |
-
['»', '»', true, 'right pointing guillemet'],
|
41 |
-
['‘', '‘', true, 'left single quotation mark'],
|
42 |
-
['’', '’', true, 'right single quotation mark'],
|
43 |
-
['“', '“', true, 'left double quotation mark'],
|
44 |
-
['”', '”', true, 'right double quotation mark'],
|
45 |
-
['‚', '‚', true, 'single low-9 quotation mark'],
|
46 |
-
['„', '„', true, 'double low-9 quotation mark'],
|
47 |
-
['<', '<', true, 'less-than sign'],
|
48 |
-
['>', '>', true, 'greater-than sign'],
|
49 |
-
['≤', '≤', true, 'less-than or equal to'],
|
50 |
-
['≥', '≥', true, 'greater-than or equal to'],
|
51 |
-
['–', '–', true, 'en dash'],
|
52 |
-
['—', '—', true, 'em dash'],
|
53 |
-
['¯', '¯', true, 'macron'],
|
54 |
-
['‾', '‾', true, 'overline'],
|
55 |
-
['¤', '¤', true, 'currency sign'],
|
56 |
-
['¦', '¦', true, 'broken bar'],
|
57 |
-
['¨', '¨', true, 'diaeresis'],
|
58 |
-
['¡', '¡', true, 'inverted exclamation mark'],
|
59 |
-
['¿', '¿', true, 'turned question mark'],
|
60 |
-
['ˆ', 'ˆ', true, 'circumflex accent'],
|
61 |
-
['˜', '˜', true, 'small tilde'],
|
62 |
-
['°', '°', true, 'degree sign'],
|
63 |
-
['−', '−', true, 'minus sign'],
|
64 |
-
['±', '±', true, 'plus-minus sign'],
|
65 |
-
['÷', '÷', true, 'division sign'],
|
66 |
-
['⁄', '⁄', true, 'fraction slash'],
|
67 |
-
['×', '×', true, 'multiplication sign'],
|
68 |
-
['¹', '¹', true, 'superscript one'],
|
69 |
-
['²', '²', true, 'superscript two'],
|
70 |
-
['³', '³', true, 'superscript three'],
|
71 |
-
['¼', '¼', true, 'fraction one quarter'],
|
72 |
-
['½', '½', true, 'fraction one half'],
|
73 |
-
['¾', '¾', true, 'fraction three quarters'],
|
74 |
-
// math / logical
|
75 |
-
['ƒ', 'ƒ', true, 'function / florin'],
|
76 |
-
['∫', '∫', true, 'integral'],
|
77 |
-
['∑', '∑', true, 'n-ary sumation'],
|
78 |
-
['∞', '∞', true, 'infinity'],
|
79 |
-
['√', '√', true, 'square root'],
|
80 |
-
['∼', '∼', false,'similar to'],
|
81 |
-
['≅', '≅', false,'approximately equal to'],
|
82 |
-
['≈', '≈', true, 'almost equal to'],
|
83 |
-
['≠', '≠', true, 'not equal to'],
|
84 |
-
['≡', '≡', true, 'identical to'],
|
85 |
-
['∈', '∈', false,'element of'],
|
86 |
-
['∉', '∉', false,'not an element of'],
|
87 |
-
['∋', '∋', false,'contains as member'],
|
88 |
-
['∏', '∏', true, 'n-ary product'],
|
89 |
-
['∧', '∧', false,'logical and'],
|
90 |
-
['∨', '∨', false,'logical or'],
|
91 |
-
['¬', '¬', true, 'not sign'],
|
92 |
-
['∩', '∩', true, 'intersection'],
|
93 |
-
['∪', '∪', false,'union'],
|
94 |
-
['∂', '∂', true, 'partial differential'],
|
95 |
-
['∀', '∀', false,'for all'],
|
96 |
-
['∃', '∃', false,'there exists'],
|
97 |
-
['∅', '∅', false,'diameter'],
|
98 |
-
['∇', '∇', false,'backward difference'],
|
99 |
-
['∗', '∗', false,'asterisk operator'],
|
100 |
-
['∝', '∝', false,'proportional to'],
|
101 |
-
['∠', '∠', false,'angle'],
|
102 |
-
// undefined
|
103 |
-
['´', '´', true, 'acute accent'],
|
104 |
-
['¸', '¸', true, 'cedilla'],
|
105 |
-
['ª', 'ª', true, 'feminine ordinal indicator'],
|
106 |
-
['º', 'º', true, 'masculine ordinal indicator'],
|
107 |
-
['†', '†', true, 'dagger'],
|
108 |
-
['‡', '‡', true, 'double dagger'],
|
109 |
-
// alphabetical special chars
|
110 |
-
['À', 'À', true, 'A - grave'],
|
111 |
-
['Á', 'Á', true, 'A - acute'],
|
112 |
-
['Â', 'Â', true, 'A - circumflex'],
|
113 |
-
['Ã', 'Ã', true, 'A - tilde'],
|
114 |
-
['Ä', 'Ä', true, 'A - diaeresis'],
|
115 |
-
['Å', 'Å', true, 'A - ring above'],
|
116 |
-
['Æ', 'Æ', true, 'ligature AE'],
|
117 |
-
['Ç', 'Ç', true, 'C - cedilla'],
|
118 |
-
['È', 'È', true, 'E - grave'],
|
119 |
-
['É', 'É', true, 'E - acute'],
|
120 |
-
['Ê', 'Ê', true, 'E - circumflex'],
|
121 |
-
['Ë', 'Ë', true, 'E - diaeresis'],
|
122 |
-
['Ì', 'Ì', true, 'I - grave'],
|
123 |
-
['Í', 'Í', true, 'I - acute'],
|
124 |
-
['Î', 'Î', true, 'I - circumflex'],
|
125 |
-
['Ï', 'Ï', true, 'I - diaeresis'],
|
126 |
-
['Ð', 'Ð', true, 'ETH'],
|
127 |
-
['Ñ', 'Ñ', true, 'N - tilde'],
|
128 |
-
['Ò', 'Ò', true, 'O - grave'],
|
129 |
-
['Ó', 'Ó', true, 'O - acute'],
|
130 |
-
['Ô', 'Ô', true, 'O - circumflex'],
|
131 |
-
['Õ', 'Õ', true, 'O - tilde'],
|
132 |
-
['Ö', 'Ö', true, 'O - diaeresis'],
|
133 |
-
['Ø', 'Ø', true, 'O - slash'],
|
134 |
-
['Œ', 'Œ', true, 'ligature OE'],
|
135 |
-
['Š', 'Š', true, 'S - caron'],
|
136 |
-
['Ù', 'Ù', true, 'U - grave'],
|
137 |
-
['Ú', 'Ú', true, 'U - acute'],
|
138 |
-
['Û', 'Û', true, 'U - circumflex'],
|
139 |
-
['Ü', 'Ü', true, 'U - diaeresis'],
|
140 |
-
['Ý', 'Ý', true, 'Y - acute'],
|
141 |
-
['Ÿ', 'Ÿ', true, 'Y - diaeresis'],
|
142 |
-
['Þ', 'Þ', true, 'THORN'],
|
143 |
-
['à', 'à', true, 'a - grave'],
|
144 |
-
['á', 'á', true, 'a - acute'],
|
145 |
-
['â', 'â', true, 'a - circumflex'],
|
146 |
-
['ã', 'ã', true, 'a - tilde'],
|
147 |
-
['ä', 'ä', true, 'a - diaeresis'],
|
148 |
-
['å', 'å', true, 'a - ring above'],
|
149 |
-
['æ', 'æ', true, 'ligature ae'],
|
150 |
-
['ç', 'ç', true, 'c - cedilla'],
|
151 |
-
['è', 'è', true, 'e - grave'],
|
152 |
-
['é', 'é', true, 'e - acute'],
|
153 |
-
['ê', 'ê', true, 'e - circumflex'],
|
154 |
-
['ë', 'ë', true, 'e - diaeresis'],
|
155 |
-
['ì', 'ì', true, 'i - grave'],
|
156 |
-
['í', 'í', true, 'i - acute'],
|
157 |
-
['î', 'î', true, 'i - circumflex'],
|
158 |
-
['ï', 'ï', true, 'i - diaeresis'],
|
159 |
-
['ð', 'ð', true, 'eth'],
|
160 |
-
['ñ', 'ñ', true, 'n - tilde'],
|
161 |
-
['ò', 'ò', true, 'o - grave'],
|
162 |
-
['ó', 'ó', true, 'o - acute'],
|
163 |
-
['ô', 'ô', true, 'o - circumflex'],
|
164 |
-
['õ', 'õ', true, 'o - tilde'],
|
165 |
-
['ö', 'ö', true, 'o - diaeresis'],
|
166 |
-
['ø', 'ø', true, 'o slash'],
|
167 |
-
['œ', 'œ', true, 'ligature oe'],
|
168 |
-
['š', 'š', true, 's - caron'],
|
169 |
-
['ù', 'ù', true, 'u - grave'],
|
170 |
-
['ú', 'ú', true, 'u - acute'],
|
171 |
-
['û', 'û', true, 'u - circumflex'],
|
172 |
-
['ü', 'ü', true, 'u - diaeresis'],
|
173 |
-
['ý', 'ý', true, 'y - acute'],
|
174 |
-
['þ', 'þ', true, 'thorn'],
|
175 |
-
['ÿ', 'ÿ', true, 'y - diaeresis'],
|
176 |
-
['Α', 'Α', true, 'Alpha'],
|
177 |
-
['Β', 'Β', true, 'Beta'],
|
178 |
-
['Γ', 'Γ', true, 'Gamma'],
|
179 |
-
['Δ', 'Δ', true, 'Delta'],
|
180 |
-
['Ε', 'Ε', true, 'Epsilon'],
|
181 |
-
['Ζ', 'Ζ', true, 'Zeta'],
|
182 |
-
['Η', 'Η', true, 'Eta'],
|
183 |
-
['Θ', 'Θ', true, 'Theta'],
|
184 |
-
['Ι', 'Ι', true, 'Iota'],
|
185 |
-
['Κ', 'Κ', true, 'Kappa'],
|
186 |
-
['Λ', 'Λ', true, 'Lambda'],
|
187 |
-
['Μ', 'Μ', true, 'Mu'],
|
188 |
-
['Ν', 'Ν', true, 'Nu'],
|
189 |
-
['Ξ', 'Ξ', true, 'Xi'],
|
190 |
-
['Ο', 'Ο', true, 'Omicron'],
|
191 |
-
['Π', 'Π', true, 'Pi'],
|
192 |
-
['Ρ', 'Ρ', true, 'Rho'],
|
193 |
-
['Σ', 'Σ', true, 'Sigma'],
|
194 |
-
['Τ', 'Τ', true, 'Tau'],
|
195 |
-
['Υ', 'Υ', true, 'Upsilon'],
|
196 |
-
['Φ', 'Φ', true, 'Phi'],
|
197 |
-
['Χ', 'Χ', true, 'Chi'],
|
198 |
-
['Ψ', 'Ψ', true, 'Psi'],
|
199 |
-
['Ω', 'Ω', true, 'Omega'],
|
200 |
-
['α', 'α', true, 'alpha'],
|
201 |
-
['β', 'β', true, 'beta'],
|
202 |
-
['γ', 'γ', true, 'gamma'],
|
203 |
-
['δ', 'δ', true, 'delta'],
|
204 |
-
['ε', 'ε', true, 'epsilon'],
|
205 |
-
['ζ', 'ζ', true, 'zeta'],
|
206 |
-
['η', 'η', true, 'eta'],
|
207 |
-
['θ', 'θ', true, 'theta'],
|
208 |
-
['ι', 'ι', true, 'iota'],
|
209 |
-
['κ', 'κ', true, 'kappa'],
|
210 |
-
['λ', 'λ', true, 'lambda'],
|
211 |
-
['μ', 'μ', true, 'mu'],
|
212 |
-
['ν', 'ν', true, 'nu'],
|
213 |
-
['ξ', 'ξ', true, 'xi'],
|
214 |
-
['ο', 'ο', true, 'omicron'],
|
215 |
-
['π', 'π', true, 'pi'],
|
216 |
-
['ρ', 'ρ', true, 'rho'],
|
217 |
-
['ς', 'ς', true, 'final sigma'],
|
218 |
-
['σ', 'σ', true, 'sigma'],
|
219 |
-
['τ', 'τ', true, 'tau'],
|
220 |
-
['υ', 'υ', true, 'upsilon'],
|
221 |
-
['φ', 'φ', true, 'phi'],
|
222 |
-
['χ', 'χ', true, 'chi'],
|
223 |
-
['ψ', 'ψ', true, 'psi'],
|
224 |
-
['ω', 'ω', true, 'omega'],
|
225 |
-
// symbols
|
226 |
-
['ℵ', 'ℵ', false,'alef symbol'],
|
227 |
-
['ϖ', 'ϖ', false,'pi symbol'],
|
228 |
-
['ℜ', 'ℜ', false,'real part symbol'],
|
229 |
-
['ϑ','ϑ', false,'theta symbol'],
|
230 |
-
['ϒ', 'ϒ', false,'upsilon - hook symbol'],
|
231 |
-
['℘', '℘', false,'Weierstrass p'],
|
232 |
-
['ℑ', 'ℑ', false,'imaginary part'],
|
233 |
-
// arrows
|
234 |
-
['←', '←', true, 'leftwards arrow'],
|
235 |
-
['↑', '↑', true, 'upwards arrow'],
|
236 |
-
['→', '→', true, 'rightwards arrow'],
|
237 |
-
['↓', '↓', true, 'downwards arrow'],
|
238 |
-
['↔', '↔', true, 'left right arrow'],
|
239 |
-
['↵', '↵', false,'carriage return'],
|
240 |
-
['⇐', '⇐', false,'leftwards double arrow'],
|
241 |
-
['⇑', '⇑', false,'upwards double arrow'],
|
242 |
-
['⇒', '⇒', false,'rightwards double arrow'],
|
243 |
-
['⇓', '⇓', false,'downwards double arrow'],
|
244 |
-
['⇔', '⇔', false,'left right double arrow'],
|
245 |
-
['∴', '∴', false,'therefore'],
|
246 |
-
['⊂', '⊂', false,'subset of'],
|
247 |
-
['⊃', '⊃', false,'superset of'],
|
248 |
-
['⊄', '⊄', false,'not a subset of'],
|
249 |
-
['⊆', '⊆', false,'subset of or equal to'],
|
250 |
-
['⊇', '⊇', false,'superset of or equal to'],
|
251 |
-
['⊕', '⊕', false,'circled plus'],
|
252 |
-
['⊗', '⊗', false,'circled times'],
|
253 |
-
['⊥', '⊥', false,'perpendicular'],
|
254 |
-
['⋅', '⋅', false,'dot operator'],
|
255 |
-
['⌈', '⌈', false,'left ceiling'],
|
256 |
-
['⌉', '⌉', false,'right ceiling'],
|
257 |
-
['⌊', '⌊', false,'left floor'],
|
258 |
-
['⌋', '⌋', false,'right floor'],
|
259 |
-
['⟨', '〈', false,'left-pointing angle bracket'],
|
260 |
-
['⟩', '〉', false,'right-pointing angle bracket'],
|
261 |
-
['◊', '◊', true, 'lozenge'],
|
262 |
-
['♠', '♠', true, 'black spade suit'],
|
263 |
-
['♣', '♣', true, 'black club suit'],
|
264 |
-
['♥', '♥', true, 'black heart suit'],
|
265 |
-
['♦', '♦', true, 'black diamond suit'],
|
266 |
-
[' ', ' ', false,'en space'],
|
267 |
-
[' ', ' ', false,'em space'],
|
268 |
-
[' ', ' ', false,'thin space'],
|
269 |
-
['‌', '‌', false,'zero width non-joiner'],
|
270 |
-
['‍', '‍', false,'zero width joiner'],
|
271 |
-
['‎', '‎', false,'left-to-right mark'],
|
272 |
-
['‏', '‏', false,'right-to-left mark'],
|
273 |
-
['­', '­', false,'soft hyphen']
|
274 |
-
];
|
275 |
-
|
276 |
-
tinyMCEPopup.onInit.add(function() {
|
277 |
-
tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML());
|
278 |
-
addKeyboardNavigation();
|
279 |
-
});
|
280 |
-
|
281 |
-
function addKeyboardNavigation(){
|
282 |
-
var tableElm, cells, settings;
|
283 |
-
|
284 |
-
cells = tinyMCEPopup.dom.select("a.charmaplink", "charmapgroup");
|
285 |
-
|
286 |
-
settings ={
|
287 |
-
root: "charmapgroup",
|
288 |
-
items: cells
|
289 |
-
};
|
290 |
-
cells[0].tabindex=0;
|
291 |
-
tinyMCEPopup.dom.addClass(cells[0], "mceFocus");
|
292 |
-
if (tinymce.isGecko) {
|
293 |
-
cells[0].focus();
|
294 |
-
} else {
|
295 |
-
setTimeout(function(){
|
296 |
-
cells[0].focus();
|
297 |
-
}, 100);
|
298 |
-
}
|
299 |
-
tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom);
|
300 |
-
}
|
301 |
-
|
302 |
-
function renderCharMapHTML() {
|
303 |
-
var charsPerRow = 20, tdWidth=20, tdHeight=20, i;
|
304 |
-
var html = '<div id="charmapgroup" aria-labelledby="charmap_label" tabindex="0" role="listbox">'+
|
305 |
-
'<table role="presentation" border="0" cellspacing="1" cellpadding="0" width="' + (tdWidth*charsPerRow) +
|
306 |
-
'"><tr height="' + tdHeight + '">';
|
307 |
-
var cols=-1;
|
308 |
-
|
309 |
-
for (i=0; i<charmap.length; i++) {
|
310 |
-
var previewCharFn;
|
311 |
-
|
312 |
-
if (charmap[i][2]==true) {
|
313 |
-
cols++;
|
314 |
-
previewCharFn = 'previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');';
|
315 |
-
html += ''
|
316 |
-
+ '<td class="charmap">'
|
317 |
-
+ '<a class="charmaplink" role="button" onmouseover="'+previewCharFn+'" onfocus="'+previewCharFn+'" href="javascript:void(0)" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + ' '+ tinyMCEPopup.editor.translate("advanced_dlg.charmap_usage")+'">'
|
318 |
-
+ charmap[i][1]
|
319 |
-
+ '</a></td>';
|
320 |
-
if ((cols+1) % charsPerRow == 0)
|
321 |
-
html += '</tr><tr height="' + tdHeight + '">';
|
322 |
-
}
|
323 |
-
}
|
324 |
-
|
325 |
-
if (cols % charsPerRow > 0) {
|
326 |
-
var padd = charsPerRow - (cols % charsPerRow);
|
327 |
-
for (var i=0; i<padd-1; i++)
|
328 |
-
html += '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap"> </td>';
|
329 |
-
}
|
330 |
-
|
331 |
-
html += '</tr></table></div>';
|
332 |
-
html = html.replace(/<tr height="20"><\/tr>/g, '');
|
333 |
-
|
334 |
-
return html;
|
335 |
-
}
|
336 |
-
|
337 |
-
function insertChar(chr) {
|
338 |
-
tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';');
|
339 |
-
|
340 |
-
// Refocus in window
|
341 |
-
if (tinyMCEPopup.isWindow)
|
342 |
-
window.focus();
|
343 |
-
|
344 |
-
tinyMCEPopup.editor.focus();
|
345 |
-
tinyMCEPopup.close();
|
346 |
-
}
|
347 |
-
|
348 |
-
function previewChar(codeA, codeB, codeN) {
|
349 |
-
var elmA = document.getElementById('codeA');
|
350 |
-
var elmB = document.getElementById('codeB');
|
351 |
-
var elmV = document.getElementById('codeV');
|
352 |
-
var elmN = document.getElementById('codeN');
|
353 |
-
|
354 |
-
if (codeA=='#160;') {
|
355 |
-
elmV.innerHTML = '__';
|
356 |
-
} else {
|
357 |
-
elmV.innerHTML = '&' + codeA;
|
358 |
-
}
|
359 |
-
|
360 |
-
elmB.innerHTML = '&' + codeA;
|
361 |
-
elmA.innerHTML = '&' + codeB;
|
362 |
-
elmN.innerHTML = codeN;
|
363 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/js/color_picker.js
DELETED
@@ -1,345 +0,0 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
|
3 |
-
var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
|
4 |
-
|
5 |
-
var colors = [
|
6 |
-
"#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
|
7 |
-
"#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
|
8 |
-
"#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
|
9 |
-
"#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
|
10 |
-
"#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
|
11 |
-
"#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
|
12 |
-
"#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
|
13 |
-
"#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
|
14 |
-
"#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
|
15 |
-
"#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
|
16 |
-
"#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
|
17 |
-
"#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
|
18 |
-
"#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
|
19 |
-
"#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
|
20 |
-
"#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
|
21 |
-
"#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
|
22 |
-
"#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
|
23 |
-
"#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
|
24 |
-
"#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
|
25 |
-
"#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
|
26 |
-
"#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
|
27 |
-
"#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
|
28 |
-
"#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
|
29 |
-
"#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
|
30 |
-
"#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
|
31 |
-
"#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
|
32 |
-
"#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
|
33 |
-
];
|
34 |
-
|
35 |
-
var named = {
|
36 |
-
'#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
|
37 |
-
'#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
|
38 |
-
'#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
|
39 |
-
'#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
|
40 |
-
'#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
|
41 |
-
'#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
|
42 |
-
'#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
|
43 |
-
'#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
|
44 |
-
'#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
|
45 |
-
'#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
|
46 |
-
'#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
|
47 |
-
'#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
|
48 |
-
'#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
|
49 |
-
'#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
|
50 |
-
'#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
|
51 |
-
'#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
|
52 |
-
'#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
|
53 |
-
'#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
|
54 |
-
'#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
|
55 |
-
'#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
|
56 |
-
'#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
|
57 |
-
'#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
|
58 |
-
'#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
|
59 |
-
};
|
60 |
-
|
61 |
-
var namedLookup = {};
|
62 |
-
|
63 |
-
function init() {
|
64 |
-
var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
|
65 |
-
|
66 |
-
tinyMCEPopup.resizeToInnerSize();
|
67 |
-
|
68 |
-
generatePicker();
|
69 |
-
generateWebColors();
|
70 |
-
generateNamedColors();
|
71 |
-
|
72 |
-
if (inputColor) {
|
73 |
-
changeFinalColor(inputColor);
|
74 |
-
|
75 |
-
col = convertHexToRGB(inputColor);
|
76 |
-
|
77 |
-
if (col)
|
78 |
-
updateLight(col.r, col.g, col.b);
|
79 |
-
}
|
80 |
-
|
81 |
-
for (key in named) {
|
82 |
-
value = named[key];
|
83 |
-
namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
|
84 |
-
}
|
85 |
-
}
|
86 |
-
|
87 |
-
function toHexColor(color) {
|
88 |
-
var matches, red, green, blue, toInt = parseInt;
|
89 |
-
|
90 |
-
function hex(value) {
|
91 |
-
value = parseInt(value).toString(16);
|
92 |
-
|
93 |
-
return value.length > 1 ? value : '0' + value; // Padd with leading zero
|
94 |
-
};
|
95 |
-
|
96 |
-
color = tinymce.trim(color);
|
97 |
-
color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#'
|
98 |
-
color = namedLookup[color] || color;
|
99 |
-
|
100 |
-
matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color);
|
101 |
-
|
102 |
-
if (matches) {
|
103 |
-
red = toInt(matches[1]);
|
104 |
-
green = toInt(matches[2]);
|
105 |
-
blue = toInt(matches[3]);
|
106 |
-
} else {
|
107 |
-
matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color);
|
108 |
-
|
109 |
-
if (matches) {
|
110 |
-
red = toInt(matches[1], 16);
|
111 |
-
green = toInt(matches[2], 16);
|
112 |
-
blue = toInt(matches[3], 16);
|
113 |
-
} else {
|
114 |
-
matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color);
|
115 |
-
|
116 |
-
if (matches) {
|
117 |
-
red = toInt(matches[1] + matches[1], 16);
|
118 |
-
green = toInt(matches[2] + matches[2], 16);
|
119 |
-
blue = toInt(matches[3] + matches[3], 16);
|
120 |
-
} else {
|
121 |
-
return '';
|
122 |
-
}
|
123 |
-
}
|
124 |
-
}
|
125 |
-
|
126 |
-
return '#' + hex(red) + hex(green) + hex(blue);
|
127 |
-
}
|
128 |
-
|
129 |
-
function insertAction() {
|
130 |
-
var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
|
131 |
-
|
132 |
-
var hexColor = toHexColor(color);
|
133 |
-
|
134 |
-
if (hexColor === '') {
|
135 |
-
var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value');
|
136 |
-
tinyMCEPopup.alert(text + ': ' + color);
|
137 |
-
}
|
138 |
-
else {
|
139 |
-
tinyMCEPopup.restoreSelection();
|
140 |
-
|
141 |
-
if (f)
|
142 |
-
f(hexColor);
|
143 |
-
|
144 |
-
tinyMCEPopup.close();
|
145 |
-
}
|
146 |
-
}
|
147 |
-
|
148 |
-
function showColor(color, name) {
|
149 |
-
if (name)
|
150 |
-
document.getElementById("colorname").innerHTML = name;
|
151 |
-
|
152 |
-
document.getElementById("preview").style.backgroundColor = color;
|
153 |
-
document.getElementById("color").value = color.toUpperCase();
|
154 |
-
}
|
155 |
-
|
156 |
-
function convertRGBToHex(col) {
|
157 |
-
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
|
158 |
-
|
159 |
-
if (!col)
|
160 |
-
return col;
|
161 |
-
|
162 |
-
var rgb = col.replace(re, "$1,$2,$3").split(',');
|
163 |
-
if (rgb.length == 3) {
|
164 |
-
r = parseInt(rgb[0]).toString(16);
|
165 |
-
g = parseInt(rgb[1]).toString(16);
|
166 |
-
b = parseInt(rgb[2]).toString(16);
|
167 |
-
|
168 |
-
r = r.length == 1 ? '0' + r : r;
|
169 |
-
g = g.length == 1 ? '0' + g : g;
|
170 |
-
b = b.length == 1 ? '0' + b : b;
|
171 |
-
|
172 |
-
return "#" + r + g + b;
|
173 |
-
}
|
174 |
-
|
175 |
-
return col;
|
176 |
-
}
|
177 |
-
|
178 |
-
function convertHexToRGB(col) {
|
179 |
-
if (col.indexOf('#') != -1) {
|
180 |
-
col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
|
181 |
-
|
182 |
-
r = parseInt(col.substring(0, 2), 16);
|
183 |
-
g = parseInt(col.substring(2, 4), 16);
|
184 |
-
b = parseInt(col.substring(4, 6), 16);
|
185 |
-
|
186 |
-
return {r : r, g : g, b : b};
|
187 |
-
}
|
188 |
-
|
189 |
-
return null;
|
190 |
-
}
|
191 |
-
|
192 |
-
function generatePicker() {
|
193 |
-
var el = document.getElementById('light'), h = '', i;
|
194 |
-
|
195 |
-
for (i = 0; i < detail; i++){
|
196 |
-
h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
|
197 |
-
+ ' onclick="changeFinalColor(this.style.backgroundColor)"'
|
198 |
-
+ ' onmousedown="isMouseDown = true; return false;"'
|
199 |
-
+ ' onmouseup="isMouseDown = false;"'
|
200 |
-
+ ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
|
201 |
-
+ ' onmouseover="isMouseOver = true;"'
|
202 |
-
+ ' onmouseout="isMouseOver = false;"'
|
203 |
-
+ '></div>';
|
204 |
-
}
|
205 |
-
|
206 |
-
el.innerHTML = h;
|
207 |
-
}
|
208 |
-
|
209 |
-
function generateWebColors() {
|
210 |
-
var el = document.getElementById('webcolors'), h = '', i;
|
211 |
-
|
212 |
-
if (el.className == 'generated')
|
213 |
-
return;
|
214 |
-
|
215 |
-
// TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
|
216 |
-
h += '<div role="listbox" aria-labelledby="webcolors_title" tabindex="0"><table role="presentation" border="0" cellspacing="1" cellpadding="0">'
|
217 |
-
+ '<tr>';
|
218 |
-
|
219 |
-
for (i=0; i<colors.length; i++) {
|
220 |
-
h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
|
221 |
-
+ '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="web_colors_' + i + '" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">';
|
222 |
-
if (tinyMCEPopup.editor.forcedHighContrastMode) {
|
223 |
-
h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
|
224 |
-
}
|
225 |
-
h += '<span class="mceVoiceLabel" style="display:none;" id="web_colors_' + i + '">' + colors[i].toUpperCase() + '</span>';
|
226 |
-
h += '</a></td>';
|
227 |
-
if ((i+1) % 18 == 0)
|
228 |
-
h += '</tr><tr>';
|
229 |
-
}
|
230 |
-
|
231 |
-
h += '</table></div>';
|
232 |
-
|
233 |
-
el.innerHTML = h;
|
234 |
-
el.className = 'generated';
|
235 |
-
|
236 |
-
paintCanvas(el);
|
237 |
-
enableKeyboardNavigation(el.firstChild);
|
238 |
-
}
|
239 |
-
|
240 |
-
function paintCanvas(el) {
|
241 |
-
tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
|
242 |
-
var context;
|
243 |
-
if (canvas.getContext && (context = canvas.getContext("2d"))) {
|
244 |
-
context.fillStyle = canvas.getAttribute('data-color');
|
245 |
-
context.fillRect(0, 0, 10, 10);
|
246 |
-
}
|
247 |
-
});
|
248 |
-
}
|
249 |
-
function generateNamedColors() {
|
250 |
-
var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
|
251 |
-
|
252 |
-
if (el.className == 'generated')
|
253 |
-
return;
|
254 |
-
|
255 |
-
for (n in named) {
|
256 |
-
v = named[n];
|
257 |
-
h += '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="named_colors_' + i + '" onfocus="showColor(\'' + n + '\',\'' + v + '\');" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '">';
|
258 |
-
if (tinyMCEPopup.editor.forcedHighContrastMode) {
|
259 |
-
h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
|
260 |
-
}
|
261 |
-
h += '<span class="mceVoiceLabel" style="display:none;" id="named_colors_' + i + '">' + v + '</span>';
|
262 |
-
h += '</a>';
|
263 |
-
i++;
|
264 |
-
}
|
265 |
-
|
266 |
-
el.innerHTML = h;
|
267 |
-
el.className = 'generated';
|
268 |
-
|
269 |
-
paintCanvas(el);
|
270 |
-
enableKeyboardNavigation(el);
|
271 |
-
}
|
272 |
-
|
273 |
-
function enableKeyboardNavigation(el) {
|
274 |
-
tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
|
275 |
-
root: el,
|
276 |
-
items: tinyMCEPopup.dom.select('a', el)
|
277 |
-
}, tinyMCEPopup.dom);
|
278 |
-
}
|
279 |
-
|
280 |
-
function dechex(n) {
|
281 |
-
return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
|
282 |
-
}
|
283 |
-
|
284 |
-
function computeColor(e) {
|
285 |
-
var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target);
|
286 |
-
|
287 |
-
x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0);
|
288 |
-
y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0);
|
289 |
-
|
290 |
-
partWidth = document.getElementById('colors').width / 6;
|
291 |
-
partDetail = detail / 2;
|
292 |
-
imHeight = document.getElementById('colors').height;
|
293 |
-
|
294 |
-
r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
|
295 |
-
g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
|
296 |
-
b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
|
297 |
-
|
298 |
-
coef = (imHeight - y) / imHeight;
|
299 |
-
r = 128 + (r - 128) * coef;
|
300 |
-
g = 128 + (g - 128) * coef;
|
301 |
-
b = 128 + (b - 128) * coef;
|
302 |
-
|
303 |
-
changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
|
304 |
-
updateLight(r, g, b);
|
305 |
-
}
|
306 |
-
|
307 |
-
function updateLight(r, g, b) {
|
308 |
-
var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
|
309 |
-
|
310 |
-
for (i=0; i<detail; i++) {
|
311 |
-
if ((i>=0) && (i<partDetail)) {
|
312 |
-
finalCoef = i / partDetail;
|
313 |
-
finalR = dechex(255 - (255 - r) * finalCoef);
|
314 |
-
finalG = dechex(255 - (255 - g) * finalCoef);
|
315 |
-
finalB = dechex(255 - (255 - b) * finalCoef);
|
316 |
-
} else {
|
317 |
-
finalCoef = 2 - i / partDetail;
|
318 |
-
finalR = dechex(r * finalCoef);
|
319 |
-
finalG = dechex(g * finalCoef);
|
320 |
-
finalB = dechex(b * finalCoef);
|
321 |
-
}
|
322 |
-
|
323 |
-
color = finalR + finalG + finalB;
|
324 |
-
|
325 |
-
setCol('gs' + i, '#'+color);
|
326 |
-
}
|
327 |
-
}
|
328 |
-
|
329 |
-
function changeFinalColor(color) {
|
330 |
-
if (color.indexOf('#') == -1)
|
331 |
-
color = convertRGBToHex(color);
|
332 |
-
|
333 |
-
setCol('preview', color);
|
334 |
-
document.getElementById('color').value = color;
|
335 |
-
}
|
336 |
-
|
337 |
-
function setCol(e, c) {
|
338 |
-
try {
|
339 |
-
document.getElementById(e).style.backgroundColor = c;
|
340 |
-
} catch (ex) {
|
341 |
-
// Ignore IE warning
|
342 |
-
}
|
343 |
-
}
|
344 |
-
|
345 |
-
tinyMCEPopup.onInit.add(init);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/js/image.js
DELETED
@@ -1,253 +0,0 @@
|
|
1 |
-
var ImageDialog = {
|
2 |
-
preInit : function() {
|
3 |
-
var url;
|
4 |
-
|
5 |
-
tinyMCEPopup.requireLangPack();
|
6 |
-
|
7 |
-
if (url = tinyMCEPopup.getParam("external_image_list_url"))
|
8 |
-
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
9 |
-
},
|
10 |
-
|
11 |
-
init : function() {
|
12 |
-
var f = document.forms[0], ed = tinyMCEPopup.editor;
|
13 |
-
|
14 |
-
// Setup browse button
|
15 |
-
document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
|
16 |
-
if (isVisible('srcbrowser'))
|
17 |
-
document.getElementById('src').style.width = '180px';
|
18 |
-
|
19 |
-
e = ed.selection.getNode();
|
20 |
-
|
21 |
-
this.fillFileList('image_list', tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'));
|
22 |
-
|
23 |
-
if (e.nodeName == 'IMG') {
|
24 |
-
f.src.value = ed.dom.getAttrib(e, 'src');
|
25 |
-
f.alt.value = ed.dom.getAttrib(e, 'alt');
|
26 |
-
f.border.value = this.getAttrib(e, 'border');
|
27 |
-
f.vspace.value = this.getAttrib(e, 'vspace');
|
28 |
-
f.hspace.value = this.getAttrib(e, 'hspace');
|
29 |
-
f.width.value = ed.dom.getAttrib(e, 'width');
|
30 |
-
f.height.value = ed.dom.getAttrib(e, 'height');
|
31 |
-
f.insert.value = ed.getLang('update');
|
32 |
-
this.styleVal = ed.dom.getAttrib(e, 'style');
|
33 |
-
selectByValue(f, 'image_list', f.src.value);
|
34 |
-
selectByValue(f, 'align', this.getAttrib(e, 'align'));
|
35 |
-
this.updateStyle();
|
36 |
-
}
|
37 |
-
},
|
38 |
-
|
39 |
-
fillFileList : function(id, l) {
|
40 |
-
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
41 |
-
|
42 |
-
l = typeof(l) === 'function' ? l() : window[l];
|
43 |
-
|
44 |
-
if (l && l.length > 0) {
|
45 |
-
lst.options[lst.options.length] = new Option('', '');
|
46 |
-
|
47 |
-
tinymce.each(l, function(o) {
|
48 |
-
lst.options[lst.options.length] = new Option(o[0], o[1]);
|
49 |
-
});
|
50 |
-
} else
|
51 |
-
dom.remove(dom.getParent(id, 'tr'));
|
52 |
-
},
|
53 |
-
|
54 |
-
update : function() {
|
55 |
-
var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el;
|
56 |
-
|
57 |
-
tinyMCEPopup.restoreSelection();
|
58 |
-
|
59 |
-
if (f.src.value === '') {
|
60 |
-
if (ed.selection.getNode().nodeName == 'IMG') {
|
61 |
-
ed.dom.remove(ed.selection.getNode());
|
62 |
-
ed.execCommand('mceRepaint');
|
63 |
-
}
|
64 |
-
|
65 |
-
tinyMCEPopup.close();
|
66 |
-
return;
|
67 |
-
}
|
68 |
-
|
69 |
-
if (!ed.settings.inline_styles) {
|
70 |
-
args = tinymce.extend(args, {
|
71 |
-
vspace : nl.vspace.value,
|
72 |
-
hspace : nl.hspace.value,
|
73 |
-
border : nl.border.value,
|
74 |
-
align : getSelectValue(f, 'align')
|
75 |
-
});
|
76 |
-
} else
|
77 |
-
args.style = this.styleVal;
|
78 |
-
|
79 |
-
tinymce.extend(args, {
|
80 |
-
src : f.src.value.replace(/ /g, '%20'),
|
81 |
-
alt : f.alt.value,
|
82 |
-
width : f.width.value,
|
83 |
-
height : f.height.value
|
84 |
-
});
|
85 |
-
|
86 |
-
el = ed.selection.getNode();
|
87 |
-
|
88 |
-
if (el && el.nodeName == 'IMG') {
|
89 |
-
ed.dom.setAttribs(el, args);
|
90 |
-
tinyMCEPopup.editor.execCommand('mceRepaint');
|
91 |
-
tinyMCEPopup.editor.focus();
|
92 |
-
} else {
|
93 |
-
tinymce.each(args, function(value, name) {
|
94 |
-
if (value === "") {
|
95 |
-
delete args[name];
|
96 |
-
}
|
97 |
-
});
|
98 |
-
|
99 |
-
ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1});
|
100 |
-
ed.undoManager.add();
|
101 |
-
}
|
102 |
-
|
103 |
-
tinyMCEPopup.close();
|
104 |
-
},
|
105 |
-
|
106 |
-
updateStyle : function() {
|
107 |
-
var dom = tinyMCEPopup.dom, st = {}, v, f = document.forms[0];
|
108 |
-
|
109 |
-
if (tinyMCEPopup.editor.settings.inline_styles) {
|
110 |
-
tinymce.each(tinyMCEPopup.dom.parseStyle(this.styleVal), function(value, key) {
|
111 |
-
st[key] = value;
|
112 |
-
});
|
113 |
-
|
114 |
-
// Handle align
|
115 |
-
v = getSelectValue(f, 'align');
|
116 |
-
if (v) {
|
117 |
-
if (v == 'left' || v == 'right') {
|
118 |
-
st['float'] = v;
|
119 |
-
delete st['vertical-align'];
|
120 |
-
} else {
|
121 |
-
st['vertical-align'] = v;
|
122 |
-
delete st['float'];
|
123 |
-
}
|
124 |
-
} else {
|
125 |
-
delete st['float'];
|
126 |
-
delete st['vertical-align'];
|
127 |
-
}
|
128 |
-
|
129 |
-
// Handle border
|
130 |
-
v = f.border.value;
|
131 |
-
if (v || v == '0') {
|
132 |
-
if (v == '0')
|
133 |
-
st['border'] = '0';
|
134 |
-
else
|
135 |
-
st['border'] = v + 'px solid black';
|
136 |
-
} else
|
137 |
-
delete st['border'];
|
138 |
-
|
139 |
-
// Handle hspace
|
140 |
-
v = f.hspace.value;
|
141 |
-
if (v) {
|
142 |
-
delete st['margin'];
|
143 |
-
st['margin-left'] = v + 'px';
|
144 |
-
st['margin-right'] = v + 'px';
|
145 |
-
} else {
|
146 |
-
delete st['margin-left'];
|
147 |
-
delete st['margin-right'];
|
148 |
-
}
|
149 |
-
|
150 |
-
// Handle vspace
|
151 |
-
v = f.vspace.value;
|
152 |
-
if (v) {
|
153 |
-
delete st['margin'];
|
154 |
-
st['margin-top'] = v + 'px';
|
155 |
-
st['margin-bottom'] = v + 'px';
|
156 |
-
} else {
|
157 |
-
delete st['margin-top'];
|
158 |
-
delete st['margin-bottom'];
|
159 |
-
}
|
160 |
-
|
161 |
-
// Merge
|
162 |
-
st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img');
|
163 |
-
this.styleVal = dom.serializeStyle(st, 'img');
|
164 |
-
}
|
165 |
-
},
|
166 |
-
|
167 |
-
getAttrib : function(e, at) {
|
168 |
-
var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
|
169 |
-
|
170 |
-
if (ed.settings.inline_styles) {
|
171 |
-
switch (at) {
|
172 |
-
case 'align':
|
173 |
-
if (v = dom.getStyle(e, 'float'))
|
174 |
-
return v;
|
175 |
-
|
176 |
-
if (v = dom.getStyle(e, 'vertical-align'))
|
177 |
-
return v;
|
178 |
-
|
179 |
-
break;
|
180 |
-
|
181 |
-
case 'hspace':
|
182 |
-
v = dom.getStyle(e, 'margin-left')
|
183 |
-
v2 = dom.getStyle(e, 'margin-right');
|
184 |
-
if (v && v == v2)
|
185 |
-
return parseInt(v.replace(/[^0-9]/g, ''));
|
186 |
-
|
187 |
-
break;
|
188 |
-
|
189 |
-
case 'vspace':
|
190 |
-
v = dom.getStyle(e, 'margin-top')
|
191 |
-
v2 = dom.getStyle(e, 'margin-bottom');
|
192 |
-
if (v && v == v2)
|
193 |
-
return parseInt(v.replace(/[^0-9]/g, ''));
|
194 |
-
|
195 |
-
break;
|
196 |
-
|
197 |
-
case 'border':
|
198 |
-
v = 0;
|
199 |
-
|
200 |
-
tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
|
201 |
-
sv = dom.getStyle(e, 'border-' + sv + '-width');
|
202 |
-
|
203 |
-
// False or not the same as prev
|
204 |
-
if (!sv || (sv != v && v !== 0)) {
|
205 |
-
v = 0;
|
206 |
-
return false;
|
207 |
-
}
|
208 |
-
|
209 |
-
if (sv)
|
210 |
-
v = sv;
|
211 |
-
});
|
212 |
-
|
213 |
-
if (v)
|
214 |
-
return parseInt(v.replace(/[^0-9]/g, ''));
|
215 |
-
|
216 |
-
break;
|
217 |
-
}
|
218 |
-
}
|
219 |
-
|
220 |
-
if (v = dom.getAttrib(e, at))
|
221 |
-
return v;
|
222 |
-
|
223 |
-
return '';
|
224 |
-
},
|
225 |
-
|
226 |
-
resetImageData : function() {
|
227 |
-
var f = document.forms[0];
|
228 |
-
|
229 |
-
f.width.value = f.height.value = "";
|
230 |
-
},
|
231 |
-
|
232 |
-
updateImageData : function() {
|
233 |
-
var f = document.forms[0], t = ImageDialog;
|
234 |
-
|
235 |
-
if (f.width.value == "")
|
236 |
-
f.width.value = t.preloadImg.width;
|
237 |
-
|
238 |
-
if (f.height.value == "")
|
239 |
-
f.height.value = t.preloadImg.height;
|
240 |
-
},
|
241 |
-
|
242 |
-
getImageData : function() {
|
243 |
-
var f = document.forms[0];
|
244 |
-
|
245 |
-
this.preloadImg = new Image();
|
246 |
-
this.preloadImg.onload = this.updateImageData;
|
247 |
-
this.preloadImg.onerror = this.resetImageData;
|
248 |
-
this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value);
|
249 |
-
}
|
250 |
-
};
|
251 |
-
|
252 |
-
ImageDialog.preInit();
|
253 |
-
tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/js/link.js
DELETED
@@ -1,159 +0,0 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
|
3 |
-
var LinkDialog = {
|
4 |
-
preInit : function() {
|
5 |
-
var url;
|
6 |
-
|
7 |
-
if (url = tinyMCEPopup.getParam("external_link_list_url"))
|
8 |
-
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
9 |
-
},
|
10 |
-
|
11 |
-
init : function() {
|
12 |
-
var f = document.forms[0], ed = tinyMCEPopup.editor;
|
13 |
-
|
14 |
-
// Setup browse button
|
15 |
-
document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link');
|
16 |
-
if (isVisible('hrefbrowser'))
|
17 |
-
document.getElementById('href').style.width = '180px';
|
18 |
-
|
19 |
-
this.fillClassList('class_list');
|
20 |
-
this.fillFileList('link_list', 'tinyMCELinkList');
|
21 |
-
this.fillTargetList('target_list');
|
22 |
-
|
23 |
-
if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) {
|
24 |
-
f.href.value = ed.dom.getAttrib(e, 'href');
|
25 |
-
f.linktitle.value = ed.dom.getAttrib(e, 'title');
|
26 |
-
f.insert.value = ed.getLang('update');
|
27 |
-
selectByValue(f, 'link_list', f.href.value);
|
28 |
-
selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target'));
|
29 |
-
selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class'));
|
30 |
-
}
|
31 |
-
},
|
32 |
-
|
33 |
-
update : function() {
|
34 |
-
var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20');
|
35 |
-
|
36 |
-
tinyMCEPopup.restoreSelection();
|
37 |
-
e = ed.dom.getParent(ed.selection.getNode(), 'A');
|
38 |
-
|
39 |
-
// Remove element if there is no href
|
40 |
-
if (!f.href.value) {
|
41 |
-
if (e) {
|
42 |
-
b = ed.selection.getBookmark();
|
43 |
-
ed.dom.remove(e, 1);
|
44 |
-
ed.selection.moveToBookmark(b);
|
45 |
-
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
46 |
-
tinyMCEPopup.close();
|
47 |
-
return;
|
48 |
-
}
|
49 |
-
}
|
50 |
-
|
51 |
-
// Create new anchor elements
|
52 |
-
if (e == null) {
|
53 |
-
ed.getDoc().execCommand("unlink", false, null);
|
54 |
-
tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
|
55 |
-
|
56 |
-
tinymce.each(ed.dom.select("a"), function(n) {
|
57 |
-
if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') {
|
58 |
-
e = n;
|
59 |
-
|
60 |
-
ed.dom.setAttribs(e, {
|
61 |
-
href : href,
|
62 |
-
title : f.linktitle.value,
|
63 |
-
target : f.target_list ? getSelectValue(f, "target_list") : null,
|
64 |
-
'class' : f.class_list ? getSelectValue(f, "class_list") : null
|
65 |
-
});
|
66 |
-
}
|
67 |
-
});
|
68 |
-
} else {
|
69 |
-
ed.dom.setAttribs(e, {
|
70 |
-
href : href,
|
71 |
-
title : f.linktitle.value
|
72 |
-
});
|
73 |
-
|
74 |
-
if (f.target_list) {
|
75 |
-
ed.dom.setAttrib(e, 'target', getSelectValue(f, "target_list"));
|
76 |
-
}
|
77 |
-
|
78 |
-
if (f.class_list) {
|
79 |
-
ed.dom.setAttrib(e, 'class', getSelectValue(f, "class_list"));
|
80 |
-
}
|
81 |
-
}
|
82 |
-
|
83 |
-
// Don't move caret if selection was image
|
84 |
-
if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') {
|
85 |
-
ed.focus();
|
86 |
-
ed.selection.select(e);
|
87 |
-
ed.selection.collapse(0);
|
88 |
-
tinyMCEPopup.storeSelection();
|
89 |
-
}
|
90 |
-
|
91 |
-
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
92 |
-
tinyMCEPopup.close();
|
93 |
-
},
|
94 |
-
|
95 |
-
checkPrefix : function(n) {
|
96 |
-
if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email')))
|
97 |
-
n.value = 'mailto:' + n.value;
|
98 |
-
|
99 |
-
if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external')))
|
100 |
-
n.value = 'http://' + n.value;
|
101 |
-
},
|
102 |
-
|
103 |
-
fillFileList : function(id, l) {
|
104 |
-
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
105 |
-
|
106 |
-
l = window[l];
|
107 |
-
|
108 |
-
if (l && l.length > 0) {
|
109 |
-
lst.options[lst.options.length] = new Option('', '');
|
110 |
-
|
111 |
-
tinymce.each(l, function(o) {
|
112 |
-
lst.options[lst.options.length] = new Option(o[0], o[1]);
|
113 |
-
});
|
114 |
-
} else
|
115 |
-
dom.remove(dom.getParent(id, 'tr'));
|
116 |
-
},
|
117 |
-
|
118 |
-
fillClassList : function(id) {
|
119 |
-
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
120 |
-
|
121 |
-
if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
|
122 |
-
cl = [];
|
123 |
-
|
124 |
-
tinymce.each(v.split(';'), function(v) {
|
125 |
-
var p = v.split('=');
|
126 |
-
|
127 |
-
cl.push({'title' : p[0], 'class' : p[1]});
|
128 |
-
});
|
129 |
-
} else
|
130 |
-
cl = tinyMCEPopup.editor.dom.getClasses();
|
131 |
-
|
132 |
-
if (cl.length > 0) {
|
133 |
-
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
|
134 |
-
|
135 |
-
tinymce.each(cl, function(o) {
|
136 |
-
lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
|
137 |
-
});
|
138 |
-
} else
|
139 |
-
dom.remove(dom.getParent(id, 'tr'));
|
140 |
-
},
|
141 |
-
|
142 |
-
fillTargetList : function(id) {
|
143 |
-
var dom = tinyMCEPopup.dom, lst = dom.get(id), v;
|
144 |
-
|
145 |
-
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
|
146 |
-
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self');
|
147 |
-
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank');
|
148 |
-
|
149 |
-
if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) {
|
150 |
-
tinymce.each(v.split(','), function(v) {
|
151 |
-
v = v.split('=');
|
152 |
-
lst.options[lst.options.length] = new Option(v[0], v[1]);
|
153 |
-
});
|
154 |
-
}
|
155 |
-
}
|
156 |
-
};
|
157 |
-
|
158 |
-
LinkDialog.preInit();
|
159 |
-
tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/js/source_editor.js
DELETED
@@ -1,78 +0,0 @@
|
|
1 |
-
tinyMCEPopup.requireLangPack();
|
2 |
-
tinyMCEPopup.onInit.add(onLoadInit);
|
3 |
-
|
4 |
-
function saveContent() {
|
5 |
-
tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true});
|
6 |
-
tinyMCEPopup.close();
|
7 |
-
}
|
8 |
-
|
9 |
-
function onLoadInit() {
|
10 |
-
tinyMCEPopup.resizeToInnerSize();
|
11 |
-
|
12 |
-
// Remove Gecko spellchecking
|
13 |
-
if (tinymce.isGecko)
|
14 |
-
document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck");
|
15 |
-
|
16 |
-
document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true});
|
17 |
-
|
18 |
-
if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) {
|
19 |
-
turnWrapOn();
|
20 |
-
document.getElementById('wraped').checked = true;
|
21 |
-
}
|
22 |
-
|
23 |
-
resizeInputs();
|
24 |
-
}
|
25 |
-
|
26 |
-
function setWrap(val) {
|
27 |
-
var v, n, s = document.getElementById('htmlSource');
|
28 |
-
|
29 |
-
s.wrap = val;
|
30 |
-
|
31 |
-
if (!tinymce.isIE) {
|
32 |
-
v = s.value;
|
33 |
-
n = s.cloneNode(false);
|
34 |
-
n.setAttribute("wrap", val);
|
35 |
-
s.parentNode.replaceChild(n, s);
|
36 |
-
n.value = v;
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
function setWhiteSpaceCss(value) {
|
41 |
-
var el = document.getElementById('htmlSource');
|
42 |
-
tinymce.DOM.setStyle(el, 'white-space', value);
|
43 |
-
}
|
44 |
-
|
45 |
-
function turnWrapOff() {
|
46 |
-
if (tinymce.isWebKit) {
|
47 |
-
setWhiteSpaceCss('pre');
|
48 |
-
} else {
|
49 |
-
setWrap('off');
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
function turnWrapOn() {
|
54 |
-
if (tinymce.isWebKit) {
|
55 |
-
setWhiteSpaceCss('pre-wrap');
|
56 |
-
} else {
|
57 |
-
setWrap('soft');
|
58 |
-
}
|
59 |
-
}
|
60 |
-
|
61 |
-
function toggleWordWrap(elm) {
|
62 |
-
if (elm.checked) {
|
63 |
-
turnWrapOn();
|
64 |
-
} else {
|
65 |
-
turnWrapOff();
|
66 |
-
}
|
67 |
-
}
|
68 |
-
|
69 |
-
function resizeInputs() {
|
70 |
-
var vp = tinyMCEPopup.dom.getViewPort(window), el;
|
71 |
-
|
72 |
-
el = document.getElementById('htmlSource');
|
73 |
-
|
74 |
-
if (el) {
|
75 |
-
el.style.width = (vp.w - 20) + 'px';
|
76 |
-
el.style.height = (vp.h - 65) + 'px';
|
77 |
-
}
|
78 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/langs/en.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
tinyMCE.addI18n('en.advanced',{"underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)",dd:"Definition Description",dt:"Definition Term ",samp:"Code Sample",code:"Code",blockquote:"Block Quote",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"Preformatted",address:"Address",div:"DIV",paragraph:"Paragraph",block:"Format",fontdefault:"Font Family","font_size":"Font Size","style_select":"Styles","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","more_colors":"More Colors...","toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",newdocument:"Are you sure you want clear all contents?",path:"Path","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","blockquote_desc":"Block Quote","help_desc":"Help","newdocument_desc":"New Document","image_props_desc":"Image Properties","paste_desc":"Paste (Ctrl+V)","copy_desc":"Copy (Ctrl+C)","cut_desc":"Cut (Ctrl+X)","anchor_desc":"Insert/Edit Anchor","visualaid_desc":"show/Hide Guidelines/Invisible Elements","charmap_desc":"Insert Special Character","backcolor_desc":"Select Background Color","forecolor_desc":"Select Text Color","custom1_desc":"Your Custom Description Here","removeformat_desc":"Remove Formatting","hr_desc":"Insert Horizontal Line","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Edit HTML Source","cleanup_desc":"Cleanup Messy Code","image_desc":"Insert/Edit Image","unlink_desc":"Unlink","link_desc":"Insert/Edit Link","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Increase Indent","outdent_desc":"Decrease Indent","numlist_desc":"Insert/Remove Numbered List","bullist_desc":"Insert/Remove Bulleted List","justifyfull_desc":"Align Full","justifyright_desc":"Align Right","justifycenter_desc":"Align Center","justifyleft_desc":"Align Left","striketrough_desc":"Strikethrough","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"});
|
|
tiny_mce/themes/advanced/langs/en_dlg.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
tinyMCE.addI18n('en.advanced_dlg', {"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character", "charmap_usage":"Use left and right arrows to navigate.","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value","":""});
|
|
tiny_mce/themes/advanced/link.htm
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#advanced_dlg.link_title}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
-
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
-
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
8 |
-
<script type="text/javascript" src="../../utils/validate.js"></script>
|
9 |
-
<script type="text/javascript" src="js/link.js"></script>
|
10 |
-
</head>
|
11 |
-
<body id="link" style="display: none">
|
12 |
-
<form onsubmit="LinkDialog.update();return false;" action="#">
|
13 |
-
<div class="tabs">
|
14 |
-
<ul>
|
15 |
-
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.link_title}</a></span></li>
|
16 |
-
</ul>
|
17 |
-
</div>
|
18 |
-
|
19 |
-
<div class="panel_wrapper">
|
20 |
-
<div id="general_panel" class="panel current">
|
21 |
-
<table border="0" cellpadding="4" cellspacing="0">
|
22 |
-
<tr>
|
23 |
-
<td class="nowrap"><label for="href">{#advanced_dlg.link_url}</label></td>
|
24 |
-
<td><table border="0" cellspacing="0" cellpadding="0">
|
25 |
-
<tr>
|
26 |
-
<td><input id="href" name="href" type="text" class="mceFocus" value="" style="width: 200px" onchange="LinkDialog.checkPrefix(this);" /></td>
|
27 |
-
<td id="hrefbrowsercontainer"> </td>
|
28 |
-
</tr>
|
29 |
-
</table></td>
|
30 |
-
</tr>
|
31 |
-
<tr>
|
32 |
-
<td><label for="link_list">{#advanced_dlg.link_list}</label></td>
|
33 |
-
<td><select id="link_list" name="link_list" onchange="document.getElementById('href').value=this.options[this.selectedIndex].value;"></select></td>
|
34 |
-
</tr>
|
35 |
-
<tr>
|
36 |
-
<td><label id="targetlistlabel" for="targetlist">{#advanced_dlg.link_target}</label></td>
|
37 |
-
<td><select id="target_list" name="target_list"></select></td>
|
38 |
-
</tr>
|
39 |
-
<tr>
|
40 |
-
<td class="nowrap"><label for="linktitle">{#advanced_dlg.link_titlefield}</label></td>
|
41 |
-
<td><input id="linktitle" name="linktitle" type="text" value="" style="width: 200px" /></td>
|
42 |
-
</tr>
|
43 |
-
<tr>
|
44 |
-
<td><label for="class_list">{#class_name}</label></td>
|
45 |
-
<td><select id="class_list" name="class_list"></select></td>
|
46 |
-
</tr>
|
47 |
-
</table>
|
48 |
-
</div>
|
49 |
-
</div>
|
50 |
-
|
51 |
-
<div class="mceActionPanel">
|
52 |
-
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
53 |
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
54 |
-
</div>
|
55 |
-
</form>
|
56 |
-
</body>
|
57 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/shortcuts.htm
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<title>{#advanced_dlg.accessibility_help}</title>
|
5 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
-
<script type="text/javascript">tinyMCEPopup.requireLangPack();</script>
|
7 |
-
</head>
|
8 |
-
<body id="content">
|
9 |
-
<h1>{#advanced_dlg.accessibility_usage_title}</h1>
|
10 |
-
<h2>Toolbars</h2>
|
11 |
-
<p>Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys.
|
12 |
-
Press enter to activate a button and return focus to the editor.
|
13 |
-
Press escape to return focus to the editor without performing any actions.</p>
|
14 |
-
|
15 |
-
<h2>Status Bar</h2>
|
16 |
-
<p>To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path.
|
17 |
-
Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.</p>
|
18 |
-
|
19 |
-
<h2>Context Menu</h2>
|
20 |
-
<p>Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key.
|
21 |
-
To close submenus press the left arrow key. Press escape to close the context menu.</p>
|
22 |
-
|
23 |
-
<h1>Keyboard Shortcuts</h1>
|
24 |
-
<table>
|
25 |
-
<thead>
|
26 |
-
<tr>
|
27 |
-
<th>Keystroke</th>
|
28 |
-
<th>Function</th>
|
29 |
-
</tr>
|
30 |
-
</thead>
|
31 |
-
<tbody>
|
32 |
-
<tr>
|
33 |
-
<td>Control-B</td><td>Bold</td>
|
34 |
-
</tr>
|
35 |
-
<tr>
|
36 |
-
<td>Control-I</td><td>Italic</td>
|
37 |
-
</tr>
|
38 |
-
<tr>
|
39 |
-
<td>Control-Z</td><td>Undo</td>
|
40 |
-
</tr>
|
41 |
-
<tr>
|
42 |
-
<td>Control-Y</td><td>Redo</td>
|
43 |
-
</tr>
|
44 |
-
</tbody>
|
45 |
-
</table>
|
46 |
-
</body>
|
47 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/skins/default/content.css
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
|
2 |
-
body {background:#FFF;}
|
3 |
-
body.mceForceColors {background:#FFF; color:#000;}
|
4 |
-
body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;}
|
5 |
-
h1 {font-size: 2em}
|
6 |
-
h2 {font-size: 1.5em}
|
7 |
-
h3 {font-size: 1.17em}
|
8 |
-
h4 {font-size: 1em}
|
9 |
-
h5 {font-size: .83em}
|
10 |
-
h6 {font-size: .75em}
|
11 |
-
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
|
12 |
-
a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat center center}
|
13 |
-
span.mceItemNbsp {background: #DDD}
|
14 |
-
td.mceSelected, th.mceSelected {background-color:#3399ff !important}
|
15 |
-
img {border:0;}
|
16 |
-
table, img, hr, .mceItemAnchor {cursor:default}
|
17 |
-
table td, table th {cursor:text}
|
18 |
-
ins {border-bottom:1px solid green; text-decoration: none; color:green}
|
19 |
-
del {color:red; text-decoration:line-through}
|
20 |
-
cite {border-bottom:1px dashed blue}
|
21 |
-
acronym {border-bottom:1px dotted #CCC; cursor:help}
|
22 |
-
abbr {border-bottom:1px dashed #CCC; cursor:help}
|
23 |
-
|
24 |
-
/* IE */
|
25 |
-
* html body {
|
26 |
-
scrollbar-3dlight-color:#F0F0EE;
|
27 |
-
scrollbar-arrow-color:#676662;
|
28 |
-
scrollbar-base-color:#F0F0EE;
|
29 |
-
scrollbar-darkshadow-color:#DDD;
|
30 |
-
scrollbar-face-color:#E0E0DD;
|
31 |
-
scrollbar-highlight-color:#F0F0EE;
|
32 |
-
scrollbar-shadow-color:#F0F0EE;
|
33 |
-
scrollbar-track-color:#F5F5F5;
|
34 |
-
}
|
35 |
-
|
36 |
-
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
|
37 |
-
font[face=mceinline] {font-family:inherit !important}
|
38 |
-
*[contentEditable]:focus {outline:0}
|
39 |
-
|
40 |
-
.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
|
41 |
-
.mceItemShockWave {background-image:url(../../img/shockwave.gif)}
|
42 |
-
.mceItemFlash {background-image:url(../../img/flash.gif)}
|
43 |
-
.mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
|
44 |
-
.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
|
45 |
-
.mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
|
46 |
-
.mceItemVideo {background-image:url(../../img/video.gif)}
|
47 |
-
.mceItemAudio {background-image:url(../../img/video.gif)}
|
48 |
-
.mceItemEmbeddedAudio {background-image:url(../../img/video.gif)}
|
49 |
-
.mceItemIframe {background-image:url(../../img/iframe.gif)}
|
50 |
-
.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/skins/default/dialog.css
DELETED
@@ -1,118 +0,0 @@
|
|
1 |
-
/* Generic */
|
2 |
-
body {
|
3 |
-
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
|
4 |
-
scrollbar-3dlight-color:#F0F0EE;
|
5 |
-
scrollbar-arrow-color:#676662;
|
6 |
-
scrollbar-base-color:#F0F0EE;
|
7 |
-
scrollbar-darkshadow-color:#DDDDDD;
|
8 |
-
scrollbar-face-color:#E0E0DD;
|
9 |
-
scrollbar-highlight-color:#F0F0EE;
|
10 |
-
scrollbar-shadow-color:#F0F0EE;
|
11 |
-
scrollbar-track-color:#F5F5F5;
|
12 |
-
background:#F0F0EE;
|
13 |
-
padding:0;
|
14 |
-
margin:8px 8px 0 8px;
|
15 |
-
}
|
16 |
-
|
17 |
-
html {background:#F0F0EE;}
|
18 |
-
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
19 |
-
textarea {resize:none;outline:none;}
|
20 |
-
a:link, a:visited {color:black;}
|
21 |
-
a:hover {color:#2B6FB6;}
|
22 |
-
.nowrap {white-space: nowrap}
|
23 |
-
|
24 |
-
/* Forms */
|
25 |
-
fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
|
26 |
-
legend {color:#2B6FB6; font-weight:bold;}
|
27 |
-
label.msg {display:none;}
|
28 |
-
label.invalid {color:#EE0000; display:inline;}
|
29 |
-
input.invalid {border:1px solid #EE0000;}
|
30 |
-
input {background:#FFF; border:1px solid #CCC;}
|
31 |
-
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
32 |
-
input, select, textarea {border:1px solid #808080;}
|
33 |
-
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
|
34 |
-
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
|
35 |
-
.input_noborder {border:0;}
|
36 |
-
|
37 |
-
/* Buttons */
|
38 |
-
#insert, #cancel, input.button, .updateButton {
|
39 |
-
border:0; margin:0; padding:0;
|
40 |
-
font-weight:bold;
|
41 |
-
width:94px; height:26px;
|
42 |
-
background:url(img/buttons.png) 0 -26px;
|
43 |
-
cursor:pointer;
|
44 |
-
padding-bottom:2px;
|
45 |
-
float:left;
|
46 |
-
}
|
47 |
-
|
48 |
-
#insert {background:url(img/buttons.png) 0 -52px}
|
49 |
-
#cancel {background:url(img/buttons.png) 0 0; float:right}
|
50 |
-
|
51 |
-
/* Browse */
|
52 |
-
a.pickcolor, a.browse {text-decoration:none}
|
53 |
-
a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
|
54 |
-
.mceOldBoxModel a.browse span {width:22px; height:20px;}
|
55 |
-
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
|
56 |
-
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
57 |
-
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
|
58 |
-
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
|
59 |
-
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
|
60 |
-
a.pickcolor:hover span {background-color:#B2BBD0;}
|
61 |
-
a.pickcolor:hover span.disabled {}
|
62 |
-
|
63 |
-
/* Charmap */
|
64 |
-
table.charmap {border:1px solid #AAA; text-align:center}
|
65 |
-
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
|
66 |
-
#charmap a {display:block; color:#000; text-decoration:none; border:0}
|
67 |
-
#charmap a:hover {background:#CCC;color:#2B6FB6}
|
68 |
-
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
|
69 |
-
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
|
70 |
-
|
71 |
-
/* Source */
|
72 |
-
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
|
73 |
-
.mceActionPanel {margin-top:5px;}
|
74 |
-
|
75 |
-
/* Tabs classes */
|
76 |
-
.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
|
77 |
-
.tabs ul {margin:0; padding:0; list-style:none;}
|
78 |
-
.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
|
79 |
-
.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
|
80 |
-
.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
|
81 |
-
.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
|
82 |
-
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
|
83 |
-
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
|
84 |
-
|
85 |
-
/* Panels */
|
86 |
-
.panel_wrapper div.panel {display:none;}
|
87 |
-
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
|
88 |
-
.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
|
89 |
-
|
90 |
-
/* Columns */
|
91 |
-
.column {float:left;}
|
92 |
-
.properties {width:100%;}
|
93 |
-
.properties .column1 {}
|
94 |
-
.properties .column2 {text-align:left;}
|
95 |
-
|
96 |
-
/* Titles */
|
97 |
-
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
|
98 |
-
h3 {font-size:14px;}
|
99 |
-
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
|
100 |
-
|
101 |
-
/* Dialog specific */
|
102 |
-
#link .panel_wrapper, #link div.current {height:125px;}
|
103 |
-
#image .panel_wrapper, #image div.current {height:200px;}
|
104 |
-
#plugintable thead {font-weight:bold; background:#DDD;}
|
105 |
-
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
|
106 |
-
#plugintable {width:96%; margin-top:10px;}
|
107 |
-
#pluginscontainer {height:290px; overflow:auto;}
|
108 |
-
#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
|
109 |
-
#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
|
110 |
-
#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
|
111 |
-
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
|
112 |
-
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
|
113 |
-
#colorpicker #light div {overflow:hidden;}
|
114 |
-
#colorpicker .panel_wrapper div.current {height:175px;}
|
115 |
-
#colorpicker #namedcolors {width:150px;}
|
116 |
-
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
|
117 |
-
#colorpicker #colornamecontainer {margin-top:5px;}
|
118 |
-
#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/skins/default/img/buttons.png
DELETED
Binary file
|
tiny_mce/themes/advanced/skins/default/img/items.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/skins/default/img/menu_check.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/skins/default/img/progress.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/skins/default/img/tabs.gif
DELETED
Binary file
|
tiny_mce/themes/advanced/skins/default/ui.css
DELETED
@@ -1,219 +0,0 @@
|
|
1 |
-
/* Reset */
|
2 |
-
.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
|
3 |
-
.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
|
4 |
-
.defaultSkin table td {vertical-align:middle}
|
5 |
-
|
6 |
-
/* Containers */
|
7 |
-
.defaultSkin table {direction:ltr;background:transparent}
|
8 |
-
.defaultSkin iframe {display:block;}
|
9 |
-
.defaultSkin .mceToolbar {height:26px}
|
10 |
-
.defaultSkin .mceLeft {text-align:left}
|
11 |
-
.defaultSkin .mceRight {text-align:right}
|
12 |
-
|
13 |
-
/* External */
|
14 |
-
.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;}
|
15 |
-
.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
|
16 |
-
.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
|
17 |
-
|
18 |
-
/* Layout */
|
19 |
-
.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC}
|
20 |
-
.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC}
|
21 |
-
.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC}
|
22 |
-
.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;}
|
23 |
-
.defaultSkin td.mceToolbar {background:#F0F0EE; padding-top:1px; vertical-align:top}
|
24 |
-
.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC}
|
25 |
-
.defaultSkin .mceStatusbar {background:#F0F0EE; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px}
|
26 |
-
.defaultSkin .mceStatusbar div {float:left; margin:2px}
|
27 |
-
.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
|
28 |
-
.defaultSkin .mceStatusbar a:hover {text-decoration:underline}
|
29 |
-
.defaultSkin table.mceToolbar {margin-left:3px}
|
30 |
-
.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px}
|
31 |
-
.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
|
32 |
-
.defaultSkin td.mceCenter {text-align:center;}
|
33 |
-
.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;}
|
34 |
-
.defaultSkin td.mceRight table {margin:0 0 0 auto;}
|
35 |
-
|
36 |
-
/* Button */
|
37 |
-
.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px}
|
38 |
-
.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
|
39 |
-
.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0}
|
40 |
-
.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
41 |
-
.defaultSkin .mceButtonLabeled {width:auto}
|
42 |
-
.defaultSkin .mceButtonLabeled span.mceIcon {float:left}
|
43 |
-
.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
|
44 |
-
.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888}
|
45 |
-
|
46 |
-
/* Separator */
|
47 |
-
.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px}
|
48 |
-
|
49 |
-
/* ListBox */
|
50 |
-
.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block}
|
51 |
-
.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
|
52 |
-
.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;}
|
53 |
-
.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF}
|
54 |
-
.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0}
|
55 |
-
.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;}
|
56 |
-
.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
|
57 |
-
.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px}
|
58 |
-
.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;}
|
59 |
-
.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;}
|
60 |
-
|
61 |
-
/* SplitButton */
|
62 |
-
.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr}
|
63 |
-
.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
|
64 |
-
.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;}
|
65 |
-
.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);}
|
66 |
-
.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;}
|
67 |
-
.defaultSkin .mceSplitButton span.mceOpen {display:none}
|
68 |
-
.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
|
69 |
-
.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;}
|
70 |
-
.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
71 |
-
.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0}
|
72 |
-
.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;}
|
73 |
-
|
74 |
-
/* ColorSplitButton */
|
75 |
-
.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
|
76 |
-
.defaultSkin .mceColorSplitMenu td {padding:2px}
|
77 |
-
.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
|
78 |
-
.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
|
79 |
-
.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
|
80 |
-
.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
|
81 |
-
.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A}
|
82 |
-
.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a}
|
83 |
-
.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px}
|
84 |
-
|
85 |
-
/* Menu */
|
86 |
-
.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8; direction:ltr}
|
87 |
-
.defaultSkin .mceNoIcons span.mceIcon {width:0;}
|
88 |
-
.defaultSkin .mceNoIcons a .mceText {padding-left:10px}
|
89 |
-
.defaultSkin .mceMenu table {background:#FFF}
|
90 |
-
.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block}
|
91 |
-
.defaultSkin .mceMenu td {height:20px}
|
92 |
-
.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0}
|
93 |
-
.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
|
94 |
-
.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px}
|
95 |
-
.defaultSkin .mceMenu pre.mceText {font-family:Monospace}
|
96 |
-
.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
|
97 |
-
.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
|
98 |
-
.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px}
|
99 |
-
.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD}
|
100 |
-
.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
|
101 |
-
.defaultSkin .mceMenuItemDisabled .mceText {color:#888}
|
102 |
-
.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)}
|
103 |
-
.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center}
|
104 |
-
.defaultSkin .mceMenu span.mceMenuLine {display:none}
|
105 |
-
.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;}
|
106 |
-
.defaultSkin .mceMenuItem td, .defaultSkin .mceMenuItem th {line-height: normal}
|
107 |
-
|
108 |
-
/* Progress,Resize */
|
109 |
-
.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF}
|
110 |
-
.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
|
111 |
-
|
112 |
-
/* Rtl */
|
113 |
-
.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0}
|
114 |
-
.mceRtl .mceMenuItem .mceText {text-align: right}
|
115 |
-
|
116 |
-
/* Formats */
|
117 |
-
.defaultSkin .mce_formatPreview a {font-size:10px}
|
118 |
-
.defaultSkin .mce_p span.mceText {}
|
119 |
-
.defaultSkin .mce_address span.mceText {font-style:italic}
|
120 |
-
.defaultSkin .mce_pre span.mceText {font-family:monospace}
|
121 |
-
.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
|
122 |
-
.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
|
123 |
-
.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
|
124 |
-
.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
|
125 |
-
.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
|
126 |
-
.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
|
127 |
-
|
128 |
-
/* Theme */
|
129 |
-
.defaultSkin span.mce_bold {background-position:0 0}
|
130 |
-
.defaultSkin span.mce_italic {background-position:-60px 0}
|
131 |
-
.defaultSkin span.mce_underline {background-position:-140px 0}
|
132 |
-
.defaultSkin span.mce_strikethrough {background-position:-120px 0}
|
133 |
-
.defaultSkin span.mce_undo {background-position:-160px 0}
|
134 |
-
.defaultSkin span.mce_redo {background-position:-100px 0}
|
135 |
-
.defaultSkin span.mce_cleanup {background-position:-40px 0}
|
136 |
-
.defaultSkin span.mce_bullist {background-position:-20px 0}
|
137 |
-
.defaultSkin span.mce_numlist {background-position:-80px 0}
|
138 |
-
.defaultSkin span.mce_justifyleft {background-position:-460px 0}
|
139 |
-
.defaultSkin span.mce_justifyright {background-position:-480px 0}
|
140 |
-
.defaultSkin span.mce_justifycenter {background-position:-420px 0}
|
141 |
-
.defaultSkin span.mce_justifyfull {background-position:-440px 0}
|
142 |
-
.defaultSkin span.mce_anchor {background-position:-200px 0}
|
143 |
-
.defaultSkin span.mce_indent {background-position:-400px 0}
|
144 |
-
.defaultSkin span.mce_outdent {background-position:-540px 0}
|
145 |
-
.defaultSkin span.mce_link {background-position:-500px 0}
|
146 |
-
.defaultSkin span.mce_unlink {background-position:-640px 0}
|
147 |
-
.defaultSkin span.mce_sub {background-position:-600px 0}
|
148 |
-
.defaultSkin span.mce_sup {background-position:-620px 0}
|
149 |
-
.defaultSkin span.mce_removeformat {background-position:-580px 0}
|
150 |
-
.defaultSkin span.mce_newdocument {background-position:-520px 0}
|
151 |
-
.defaultSkin span.mce_image {background-position:-380px 0}
|
152 |
-
.defaultSkin span.mce_help {background-position:-340px 0}
|
153 |
-
.defaultSkin span.mce_code {background-position:-260px 0}
|
154 |
-
.defaultSkin span.mce_hr {background-position:-360px 0}
|
155 |
-
.defaultSkin span.mce_visualaid {background-position:-660px 0}
|
156 |
-
.defaultSkin span.mce_charmap {background-position:-240px 0}
|
157 |
-
.defaultSkin span.mce_paste {background-position:-560px 0}
|
158 |
-
.defaultSkin span.mce_copy {background-position:-700px 0}
|
159 |
-
.defaultSkin span.mce_cut {background-position:-680px 0}
|
160 |
-
.defaultSkin span.mce_blockquote {background-position:-220px 0}
|
161 |
-
.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0}
|
162 |
-
.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0}
|
163 |
-
.defaultSkin span.mce_forecolorpicker {background-position:-720px 0}
|
164 |
-
.defaultSkin span.mce_backcolorpicker {background-position:-760px 0}
|
165 |
-
|
166 |
-
/* Plugins */
|
167 |
-
.defaultSkin span.mce_advhr {background-position:-0px -20px}
|
168 |
-
.defaultSkin span.mce_ltr {background-position:-20px -20px}
|
169 |
-
.defaultSkin span.mce_rtl {background-position:-40px -20px}
|
170 |
-
.defaultSkin span.mce_emotions {background-position:-60px -20px}
|
171 |
-
.defaultSkin span.mce_fullpage {background-position:-80px -20px}
|
172 |
-
.defaultSkin span.mce_fullscreen {background-position:-100px -20px}
|
173 |
-
.defaultSkin span.mce_iespell {background-position:-120px -20px}
|
174 |
-
.defaultSkin span.mce_insertdate {background-position:-140px -20px}
|
175 |
-
.defaultSkin span.mce_inserttime {background-position:-160px -20px}
|
176 |
-
.defaultSkin span.mce_absolute {background-position:-180px -20px}
|
177 |
-
.defaultSkin span.mce_backward {background-position:-200px -20px}
|
178 |
-
.defaultSkin span.mce_forward {background-position:-220px -20px}
|
179 |
-
.defaultSkin span.mce_insert_layer {background-position:-240px -20px}
|
180 |
-
.defaultSkin span.mce_insertlayer {background-position:-260px -20px}
|
181 |
-
.defaultSkin span.mce_movebackward {background-position:-280px -20px}
|
182 |
-
.defaultSkin span.mce_moveforward {background-position:-300px -20px}
|
183 |
-
.defaultSkin span.mce_media {background-position:-320px -20px}
|
184 |
-
.defaultSkin span.mce_nonbreaking {background-position:-340px -20px}
|
185 |
-
.defaultSkin span.mce_pastetext {background-position:-360px -20px}
|
186 |
-
.defaultSkin span.mce_pasteword {background-position:-380px -20px}
|
187 |
-
.defaultSkin span.mce_selectall {background-position:-400px -20px}
|
188 |
-
.defaultSkin span.mce_preview {background-position:-420px -20px}
|
189 |
-
.defaultSkin span.mce_print {background-position:-440px -20px}
|
190 |
-
.defaultSkin span.mce_cancel {background-position:-460px -20px}
|
191 |
-
.defaultSkin span.mce_save {background-position:-480px -20px}
|
192 |
-
.defaultSkin span.mce_replace {background-position:-500px -20px}
|
193 |
-
.defaultSkin span.mce_search {background-position:-520px -20px}
|
194 |
-
.defaultSkin span.mce_styleprops {background-position:-560px -20px}
|
195 |
-
.defaultSkin span.mce_table {background-position:-580px -20px}
|
196 |
-
.defaultSkin span.mce_cell_props {background-position:-600px -20px}
|
197 |
-
.defaultSkin span.mce_delete_table {background-position:-620px -20px}
|
198 |
-
.defaultSkin span.mce_delete_col {background-position:-640px -20px}
|
199 |
-
.defaultSkin span.mce_delete_row {background-position:-660px -20px}
|
200 |
-
.defaultSkin span.mce_col_after {background-position:-680px -20px}
|
201 |
-
.defaultSkin span.mce_col_before {background-position:-700px -20px}
|
202 |
-
.defaultSkin span.mce_row_after {background-position:-720px -20px}
|
203 |
-
.defaultSkin span.mce_row_before {background-position:-740px -20px}
|
204 |
-
.defaultSkin span.mce_merge_cells {background-position:-760px -20px}
|
205 |
-
.defaultSkin span.mce_table_props {background-position:-980px -20px}
|
206 |
-
.defaultSkin span.mce_row_props {background-position:-780px -20px}
|
207 |
-
.defaultSkin span.mce_split_cells {background-position:-800px -20px}
|
208 |
-
.defaultSkin span.mce_template {background-position:-820px -20px}
|
209 |
-
.defaultSkin span.mce_visualchars {background-position:-840px -20px}
|
210 |
-
.defaultSkin span.mce_abbr {background-position:-860px -20px}
|
211 |
-
.defaultSkin span.mce_acronym {background-position:-880px -20px}
|
212 |
-
.defaultSkin span.mce_attribs {background-position:-900px -20px}
|
213 |
-
.defaultSkin span.mce_cite {background-position:-920px -20px}
|
214 |
-
.defaultSkin span.mce_del {background-position:-940px -20px}
|
215 |
-
.defaultSkin span.mce_ins {background-position:-960px -20px}
|
216 |
-
.defaultSkin span.mce_pagebreak {background-position:0 -40px}
|
217 |
-
.defaultSkin span.mce_restoredraft {background-position:-20px -40px}
|
218 |
-
.defaultSkin span.mce_spellchecker {background-position:-540px -20px}
|
219 |
-
.defaultSkin span.mce_visualblocks {background-position: -40px -40px}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/skins/highcontrast/content.css
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
body, td, pre { margin:8px;}
|
2 |
-
body.mceForceColors {background:#FFF; color:#000;}
|
3 |
-
h1 {font-size: 2em}
|
4 |
-
h2 {font-size: 1.5em}
|
5 |
-
h3 {font-size: 1.17em}
|
6 |
-
h4 {font-size: 1em}
|
7 |
-
h5 {font-size: .83em}
|
8 |
-
h6 {font-size: .75em}
|
9 |
-
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
|
10 |
-
a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;}
|
11 |
-
span.mceItemNbsp {background: #DDD}
|
12 |
-
td.mceSelected, th.mceSelected {background-color:#3399ff !important}
|
13 |
-
img {border:0;}
|
14 |
-
table, img, hr, .mceItemAnchor {cursor:default}
|
15 |
-
table td, table th {cursor:text}
|
16 |
-
ins {border-bottom:1px solid green; text-decoration: none; color:green}
|
17 |
-
del {color:red; text-decoration:line-through}
|
18 |
-
cite {border-bottom:1px dashed blue}
|
19 |
-
acronym {border-bottom:1px dotted #CCC; cursor:help}
|
20 |
-
abbr {border-bottom:1px dashed #CCC; cursor:help}
|
21 |
-
|
22 |
-
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
|
23 |
-
font[face=mceinline] {font-family:inherit !important}
|
24 |
-
*[contentEditable]:focus {outline:0}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/skins/highcontrast/dialog.css
DELETED
@@ -1,106 +0,0 @@
|
|
1 |
-
/* Generic */
|
2 |
-
body {
|
3 |
-
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
|
4 |
-
background:#F0F0EE;
|
5 |
-
color: black;
|
6 |
-
padding:0;
|
7 |
-
margin:8px 8px 0 8px;
|
8 |
-
}
|
9 |
-
|
10 |
-
html {background:#F0F0EE; color:#000;}
|
11 |
-
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
12 |
-
textarea {resize:none;outline:none;}
|
13 |
-
a:link, a:visited {color:black;background-color:transparent;}
|
14 |
-
a:hover {color:#2B6FB6;background-color:transparent;}
|
15 |
-
.nowrap {white-space: nowrap}
|
16 |
-
|
17 |
-
/* Forms */
|
18 |
-
fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
|
19 |
-
legend {color:#2B6FB6; font-weight:bold;}
|
20 |
-
label.msg {display:none;}
|
21 |
-
label.invalid {color:#EE0000; display:inline;background-color:transparent;}
|
22 |
-
input.invalid {border:1px solid #EE0000;background-color:transparent;}
|
23 |
-
input {background:#FFF; border:1px solid #CCC;color:black;}
|
24 |
-
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
25 |
-
input, select, textarea {border:1px solid #808080;}
|
26 |
-
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
|
27 |
-
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
|
28 |
-
.input_noborder {border:0;}
|
29 |
-
|
30 |
-
/* Buttons */
|
31 |
-
#insert, #cancel, input.button, .updateButton {
|
32 |
-
font-weight:bold;
|
33 |
-
width:94px; height:23px;
|
34 |
-
cursor:pointer;
|
35 |
-
padding-bottom:2px;
|
36 |
-
float:left;
|
37 |
-
}
|
38 |
-
|
39 |
-
#cancel {float:right}
|
40 |
-
|
41 |
-
/* Browse */
|
42 |
-
a.pickcolor, a.browse {text-decoration:none}
|
43 |
-
a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
|
44 |
-
.mceOldBoxModel a.browse span {width:22px; height:20px;}
|
45 |
-
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
|
46 |
-
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
47 |
-
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
|
48 |
-
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
|
49 |
-
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
|
50 |
-
a.pickcolor:hover span {background-color:#B2BBD0;}
|
51 |
-
a.pickcolor:hover span.disabled {}
|
52 |
-
|
53 |
-
/* Charmap */
|
54 |
-
table.charmap {border:1px solid #AAA; text-align:center}
|
55 |
-
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
|
56 |
-
#charmap a {display:block; color:#000; text-decoration:none; border:0}
|
57 |
-
#charmap a:hover {background:#CCC;color:#2B6FB6}
|
58 |
-
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
|
59 |
-
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
|
60 |
-
|
61 |
-
/* Source */
|
62 |
-
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
|
63 |
-
.mceActionPanel {margin-top:5px;}
|
64 |
-
|
65 |
-
/* Tabs classes */
|
66 |
-
.tabs {width:100%; height:18px; line-height:normal;}
|
67 |
-
.tabs ul {margin:0; padding:0; list-style:none;}
|
68 |
-
.tabs li {float:left; border: 1px solid black; border-bottom:0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block; cursor:pointer;}
|
69 |
-
.tabs li.current {font-weight: bold; margin-right:2px;}
|
70 |
-
.tabs span {float:left; display:block; padding:0px 10px 0 0;}
|
71 |
-
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
|
72 |
-
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
|
73 |
-
|
74 |
-
/* Panels */
|
75 |
-
.panel_wrapper div.panel {display:none;}
|
76 |
-
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
|
77 |
-
.panel_wrapper {border:1px solid #919B9C; padding:10px; padding-top:5px; clear:both; background:white;}
|
78 |
-
|
79 |
-
/* Columns */
|
80 |
-
.column {float:left;}
|
81 |
-
.properties {width:100%;}
|
82 |
-
.properties .column1 {}
|
83 |
-
.properties .column2 {text-align:left;}
|
84 |
-
|
85 |
-
/* Titles */
|
86 |
-
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
|
87 |
-
h3 {font-size:14px;}
|
88 |
-
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
|
89 |
-
|
90 |
-
/* Dialog specific */
|
91 |
-
#link .panel_wrapper, #link div.current {height:125px;}
|
92 |
-
#image .panel_wrapper, #image div.current {height:200px;}
|
93 |
-
#plugintable thead {font-weight:bold; background:#DDD;}
|
94 |
-
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
|
95 |
-
#plugintable {width:96%; margin-top:10px;}
|
96 |
-
#pluginscontainer {height:290px; overflow:auto;}
|
97 |
-
#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
|
98 |
-
#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
|
99 |
-
#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
|
100 |
-
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
|
101 |
-
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
|
102 |
-
#colorpicker #light div {overflow:hidden;}
|
103 |
-
#colorpicker .panel_wrapper div.current {height:175px;}
|
104 |
-
#colorpicker #namedcolors {width:150px;}
|
105 |
-
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
|
106 |
-
#colorpicker #colornamecontainer {margin-top:5px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/skins/highcontrast/ui.css
DELETED
@@ -1,106 +0,0 @@
|
|
1 |
-
/* Reset */
|
2 |
-
.highcontrastSkin table, .highcontrastSkin tbody, .highcontrastSkin a, .highcontrastSkin img, .highcontrastSkin tr, .highcontrastSkin div, .highcontrastSkin td, .highcontrastSkin iframe, .highcontrastSkin span, .highcontrastSkin *, .highcontrastSkin .mceText {border:0; margin:0; padding:0; vertical-align:baseline; border-collapse:separate;}
|
3 |
-
.highcontrastSkin a:hover, .highcontrastSkin a:link, .highcontrastSkin a:visited, .highcontrastSkin a:active {text-decoration:none; font-weight:normal; cursor:default;}
|
4 |
-
.highcontrastSkin table td {vertical-align:middle}
|
5 |
-
|
6 |
-
.highcontrastSkin .mceIconOnly {display: block !important;}
|
7 |
-
|
8 |
-
/* External */
|
9 |
-
.highcontrastSkin .mceExternalToolbar {position:absolute; border:1px solid; border-bottom:0; display:none; background-color: white;}
|
10 |
-
.highcontrastSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
|
11 |
-
.highcontrastSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px;}
|
12 |
-
|
13 |
-
/* Layout */
|
14 |
-
.highcontrastSkin table.mceLayout {border: 1px solid;}
|
15 |
-
.highcontrastSkin .mceIframeContainer {border-top:1px solid; border-bottom:1px solid}
|
16 |
-
.highcontrastSkin .mceStatusbar a:hover {text-decoration:underline}
|
17 |
-
.highcontrastSkin .mceStatusbar {display:block; line-height:1.5em; overflow:visible;}
|
18 |
-
.highcontrastSkin .mceStatusbar div {float:left}
|
19 |
-
.highcontrastSkin .mceStatusbar a.mceResize {display:block; float:right; width:20px; height:20px; cursor:se-resize; outline:0}
|
20 |
-
|
21 |
-
.highcontrastSkin .mceToolbar td { display: inline-block; float: left;}
|
22 |
-
.highcontrastSkin .mceToolbar tr { display: block;}
|
23 |
-
.highcontrastSkin .mceToolbar table { display: block; }
|
24 |
-
|
25 |
-
/* Button */
|
26 |
-
|
27 |
-
.highcontrastSkin .mceButton { display:block; margin: 2px; padding: 5px 10px;border: 1px solid; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -ms-border-radius: 3px; height: 2em;}
|
28 |
-
.highcontrastSkin .mceButton .mceVoiceLabel { height: 100%; vertical-align: center; line-height: 2em}
|
29 |
-
.highcontrastSkin .mceButtonDisabled .mceVoiceLabel { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);}
|
30 |
-
.highcontrastSkin .mceButtonActive, .highcontrastSkin .mceButton:focus, .highcontrastSkin .mceButton:active { border: 5px solid; padding: 1px 6px;-webkit-focus-ring-color:none;outline:none;}
|
31 |
-
|
32 |
-
/* Separator */
|
33 |
-
.highcontrastSkin .mceSeparator {display:block; width:16px; height:26px;}
|
34 |
-
|
35 |
-
/* ListBox */
|
36 |
-
.highcontrastSkin .mceListBox { display: block; margin:2px;-webkit-focus-ring-color:none;outline:none;}
|
37 |
-
.highcontrastSkin .mceListBox .mceText {padding: 5px 6px; line-height: 2em; width: 15ex; overflow: hidden;}
|
38 |
-
.highcontrastSkin .mceListBoxDisabled .mceText { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);}
|
39 |
-
.highcontrastSkin .mceListBox a.mceText { padding: 5px 10px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;}
|
40 |
-
.highcontrastSkin .mceListBox a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-left: 0; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;}
|
41 |
-
.highcontrastSkin .mceListBox:focus a.mceText, .highcontrastSkin .mceListBox:active a.mceText { border-width: 5px; padding: 1px 10px 1px 6px;}
|
42 |
-
.highcontrastSkin .mceListBox:focus a.mceOpen, .highcontrastSkin .mceListBox:active a.mceOpen { border-width: 5px; padding: 1px 0px 1px 4px;}
|
43 |
-
|
44 |
-
.highcontrastSkin .mceListBoxMenu {overflow-y:auto}
|
45 |
-
|
46 |
-
/* SplitButton */
|
47 |
-
.highcontrastSkin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
48 |
-
|
49 |
-
.highcontrastSkin .mceSplitButton { border-collapse: collapse; margin: 2px; height: 2em; line-height: 2em;-webkit-focus-ring-color:none;outline:none;}
|
50 |
-
.highcontrastSkin .mceSplitButton td { display: table-cell; float: none; margin: 0; padding: 0; height: 2em;}
|
51 |
-
.highcontrastSkin .mceSplitButton tr { display: table-row; }
|
52 |
-
.highcontrastSkin table.mceSplitButton { display: table; }
|
53 |
-
.highcontrastSkin .mceSplitButton a.mceAction { padding: 5px 10px; display: block; height: 2em; line-height: 2em; overflow: hidden; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;}
|
54 |
-
.highcontrastSkin .mceSplitButton a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;}
|
55 |
-
.highcontrastSkin .mceSplitButton .mceVoiceLabel { height: 2em; vertical-align: center; line-height: 2em; }
|
56 |
-
.highcontrastSkin .mceSplitButton:focus a.mceAction, .highcontrastSkin .mceSplitButton:active a.mceAction { border-width: 5px; border-right-width: 1px; padding: 1px 10px 1px 6px;-webkit-focus-ring-color:none;outline:none;}
|
57 |
-
.highcontrastSkin .mceSplitButton:focus a.mceOpen, .highcontrastSkin .mceSplitButton:active a.mceOpen { border-width: 5px; border-left-width: 1px; padding: 1px 0px 1px 4px;-webkit-focus-ring-color:none;outline:none;}
|
58 |
-
|
59 |
-
/* Menu */
|
60 |
-
.highcontrastSkin .mceNoIcons span.mceIcon {width:0;}
|
61 |
-
.highcontrastSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid; direction:ltr}
|
62 |
-
.highcontrastSkin .mceMenu table {background:white; color: black}
|
63 |
-
.highcontrastSkin .mceNoIcons a .mceText {padding-left:10px}
|
64 |
-
.highcontrastSkin .mceMenu a, .highcontrastSkin .mceMenu span, .highcontrastSkin .mceMenu {display:block;background:white; color: black}
|
65 |
-
.highcontrastSkin .mceMenu td {height:2em}
|
66 |
-
.highcontrastSkin .mceMenu a {position:relative;padding:3px 0 4px 0; display: block;}
|
67 |
-
.highcontrastSkin .mceMenu .mceText {position:relative; display:block; cursor:default; margin:0; padding:0 25px 0 25px;}
|
68 |
-
.highcontrastSkin .mceMenu pre.mceText {font-family:Monospace}
|
69 |
-
.highcontrastSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:26px;}
|
70 |
-
.highcontrastSkin td.mceMenuItemSeparator {border-top:1px solid; height:1px}
|
71 |
-
.highcontrastSkin .mceMenuItemTitle a {border:0; border-bottom:1px solid}
|
72 |
-
.highcontrastSkin .mceMenuItemTitle span.mceText {font-weight:bold; padding-left:4px}
|
73 |
-
.highcontrastSkin .mceNoIcons .mceMenuItemSelected span.mceText:before {content: "\2713\A0";}
|
74 |
-
.highcontrastSkin .mceMenu span.mceMenuLine {display:none}
|
75 |
-
.highcontrastSkin .mceMenuItemSub a .mceText:after {content: "\A0\25B8"}
|
76 |
-
.highcontrastSkin .mceMenuItem td, .highcontrastSkin .mceMenuItem th {line-height: normal}
|
77 |
-
|
78 |
-
/* ColorSplitButton */
|
79 |
-
.highcontrastSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid; color: #000}
|
80 |
-
.highcontrastSkin .mceColorSplitMenu td {padding:2px}
|
81 |
-
.highcontrastSkin .mceColorSplitMenu a {display:block; width:16px; height:16px; overflow:hidden; color:#000; margin: 0; padding: 0;}
|
82 |
-
.highcontrastSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
|
83 |
-
.highcontrastSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
|
84 |
-
.highcontrastSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid; background-color:#B6BDD2}
|
85 |
-
.highcontrastSkin a.mceMoreColors:hover {border:1px solid #0A246A; color: #000;}
|
86 |
-
.highcontrastSkin .mceColorPreview {display:none;}
|
87 |
-
.highcontrastSkin .mce_forecolor span.mceAction, .highcontrastSkin .mce_backcolor span.mceAction {height:17px;overflow:hidden}
|
88 |
-
|
89 |
-
/* Progress,Resize */
|
90 |
-
.highcontrastSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}
|
91 |
-
.highcontrastSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
|
92 |
-
|
93 |
-
/* Rtl */
|
94 |
-
.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0}
|
95 |
-
.mceRtl .mceMenuItem .mceText {text-align: right}
|
96 |
-
|
97 |
-
/* Formats */
|
98 |
-
.highcontrastSkin .mce_p span.mceText {}
|
99 |
-
.highcontrastSkin .mce_address span.mceText {font-style:italic}
|
100 |
-
.highcontrastSkin .mce_pre span.mceText {font-family:monospace}
|
101 |
-
.highcontrastSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
|
102 |
-
.highcontrastSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
|
103 |
-
.highcontrastSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
|
104 |
-
.highcontrastSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
|
105 |
-
.highcontrastSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
|
106 |
-
.highcontrastSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/skins/o2k7/content.css
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
|
2 |
-
body {background:#FFF;}
|
3 |
-
body.mceForceColors {background:#FFF; color:#000;}
|
4 |
-
h1 {font-size: 2em}
|
5 |
-
h2 {font-size: 1.5em}
|
6 |
-
h3 {font-size: 1.17em}
|
7 |
-
h4 {font-size: 1em}
|
8 |
-
h5 {font-size: .83em}
|
9 |
-
h6 {font-size: .75em}
|
10 |
-
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
|
11 |
-
a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;}
|
12 |
-
span.mceItemNbsp {background: #DDD}
|
13 |
-
td.mceSelected, th.mceSelected {background-color:#3399ff !important}
|
14 |
-
img {border:0;}
|
15 |
-
table, img, hr, .mceItemAnchor {cursor:default}
|
16 |
-
table td, table th {cursor:text}
|
17 |
-
ins {border-bottom:1px solid green; text-decoration: none; color:green}
|
18 |
-
del {color:red; text-decoration:line-through}
|
19 |
-
cite {border-bottom:1px dashed blue}
|
20 |
-
acronym {border-bottom:1px dotted #CCC; cursor:help}
|
21 |
-
abbr {border-bottom:1px dashed #CCC; cursor:help}
|
22 |
-
|
23 |
-
/* IE */
|
24 |
-
* html body {
|
25 |
-
scrollbar-3dlight-color:#F0F0EE;
|
26 |
-
scrollbar-arrow-color:#676662;
|
27 |
-
scrollbar-base-color:#F0F0EE;
|
28 |
-
scrollbar-darkshadow-color:#DDD;
|
29 |
-
scrollbar-face-color:#E0E0DD;
|
30 |
-
scrollbar-highlight-color:#F0F0EE;
|
31 |
-
scrollbar-shadow-color:#F0F0EE;
|
32 |
-
scrollbar-track-color:#F5F5F5;
|
33 |
-
}
|
34 |
-
|
35 |
-
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
|
36 |
-
font[face=mceinline] {font-family:inherit !important}
|
37 |
-
*[contentEditable]:focus {outline:0}
|
38 |
-
|
39 |
-
.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
|
40 |
-
.mceItemShockWave {background-image:url(../../img/shockwave.gif)}
|
41 |
-
.mceItemFlash {background-image:url(../../img/flash.gif)}
|
42 |
-
.mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
|
43 |
-
.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
|
44 |
-
.mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
|
45 |
-
.mceItemVideo {background-image:url(../../img/video.gif)}
|
46 |
-
.mceItemAudio {background-image:url(../../img/video.gif)}
|
47 |
-
.mceItemIframe {background-image:url(../../img/iframe.gif)}
|
48 |
-
.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/skins/o2k7/dialog.css
DELETED
@@ -1,118 +0,0 @@
|
|
1 |
-
/* Generic */
|
2 |
-
body {
|
3 |
-
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
|
4 |
-
scrollbar-3dlight-color:#F0F0EE;
|
5 |
-
scrollbar-arrow-color:#676662;
|
6 |
-
scrollbar-base-color:#F0F0EE;
|
7 |
-
scrollbar-darkshadow-color:#DDDDDD;
|
8 |
-
scrollbar-face-color:#E0E0DD;
|
9 |
-
scrollbar-highlight-color:#F0F0EE;
|
10 |
-
scrollbar-shadow-color:#F0F0EE;
|
11 |
-
scrollbar-track-color:#F5F5F5;
|
12 |
-
background:#F0F0EE;
|
13 |
-
padding:0;
|
14 |
-
margin:8px 8px 0 8px;
|
15 |
-
}
|
16 |
-
|
17 |
-
html {background:#F0F0EE;}
|
18 |
-
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
19 |
-
textarea {resize:none;outline:none;}
|
20 |
-
a:link, a:visited {color:black;}
|
21 |
-
a:hover {color:#2B6FB6;}
|
22 |
-
.nowrap {white-space: nowrap}
|
23 |
-
|
24 |
-
/* Forms */
|
25 |
-
fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
|
26 |
-
legend {color:#2B6FB6; font-weight:bold;}
|
27 |
-
label.msg {display:none;}
|
28 |
-
label.invalid {color:#EE0000; display:inline;}
|
29 |
-
input.invalid {border:1px solid #EE0000;}
|
30 |
-
input {background:#FFF; border:1px solid #CCC;}
|
31 |
-
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
|
32 |
-
input, select, textarea {border:1px solid #808080;}
|
33 |
-
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
|
34 |
-
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
|
35 |
-
.input_noborder {border:0;}
|
36 |
-
|
37 |
-
/* Buttons */
|
38 |
-
#insert, #cancel, input.button, .updateButton {
|
39 |
-
border:0; margin:0; padding:0;
|
40 |
-
font-weight:bold;
|
41 |
-
width:94px; height:26px;
|
42 |
-
background:url(../default/img/buttons.png) 0 -26px;
|
43 |
-
cursor:pointer;
|
44 |
-
padding-bottom:2px;
|
45 |
-
float:left;
|
46 |
-
}
|
47 |
-
|
48 |
-
#insert {background:url(../default/img/buttons.png) 0 -52px}
|
49 |
-
#cancel {background:url(../default/img/buttons.png) 0 0; float:right}
|
50 |
-
|
51 |
-
/* Browse */
|
52 |
-
a.pickcolor, a.browse {text-decoration:none}
|
53 |
-
a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
|
54 |
-
.mceOldBoxModel a.browse span {width:22px; height:20px;}
|
55 |
-
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
|
56 |
-
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
57 |
-
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
|
58 |
-
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
|
59 |
-
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
|
60 |
-
a.pickcolor:hover span {background-color:#B2BBD0;}
|
61 |
-
a.pickcolor:hover span.disabled {}
|
62 |
-
|
63 |
-
/* Charmap */
|
64 |
-
table.charmap {border:1px solid #AAA; text-align:center}
|
65 |
-
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
|
66 |
-
#charmap a {display:block; color:#000; text-decoration:none; border:0}
|
67 |
-
#charmap a:hover {background:#CCC;color:#2B6FB6}
|
68 |
-
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
|
69 |
-
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
|
70 |
-
|
71 |
-
/* Source */
|
72 |
-
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
|
73 |
-
.mceActionPanel {margin-top:5px;}
|
74 |
-
|
75 |
-
/* Tabs classes */
|
76 |
-
.tabs {width:100%; height:18px; line-height:normal; background:url(../default/img/tabs.gif) repeat-x 0 -72px;}
|
77 |
-
.tabs ul {margin:0; padding:0; list-style:none;}
|
78 |
-
.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
|
79 |
-
.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
|
80 |
-
.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
|
81 |
-
.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;}
|
82 |
-
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
|
83 |
-
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
|
84 |
-
|
85 |
-
/* Panels */
|
86 |
-
.panel_wrapper div.panel {display:none;}
|
87 |
-
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
|
88 |
-
.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
|
89 |
-
|
90 |
-
/* Columns */
|
91 |
-
.column {float:left;}
|
92 |
-
.properties {width:100%;}
|
93 |
-
.properties .column1 {}
|
94 |
-
.properties .column2 {text-align:left;}
|
95 |
-
|
96 |
-
/* Titles */
|
97 |
-
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
|
98 |
-
h3 {font-size:14px;}
|
99 |
-
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
|
100 |
-
|
101 |
-
/* Dialog specific */
|
102 |
-
#link .panel_wrapper, #link div.current {height:125px;}
|
103 |
-
#image .panel_wrapper, #image div.current {height:200px;}
|
104 |
-
#plugintable thead {font-weight:bold; background:#DDD;}
|
105 |
-
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
|
106 |
-
#plugintable {width:96%; margin-top:10px;}
|
107 |
-
#pluginscontainer {height:290px; overflow:auto;}
|
108 |
-
#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
|
109 |
-
#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
|
110 |
-
#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
|
111 |
-
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
|
112 |
-
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
|
113 |
-
#colorpicker #light div {overflow:hidden;}
|
114 |
-
#colorpicker .panel_wrapper div.current {height:175px;}
|
115 |
-
#colorpicker #namedcolors {width:150px;}
|
116 |
-
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
|
117 |
-
#colorpicker #colornamecontainer {margin-top:5px;}
|
118 |
-
#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png
DELETED
Binary file
|
tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png
DELETED
Binary file
|
tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png
DELETED
Binary file
|
tiny_mce/themes/advanced/skins/o2k7/ui.css
DELETED
@@ -1,222 +0,0 @@
|
|
1 |
-
/* Reset */
|
2 |
-
.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin *, .o2k7Skin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
|
3 |
-
.o2k7Skin a:hover, .o2k7Skin a:link, .o2k7Skin a:visited, .o2k7Skin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
|
4 |
-
.o2k7Skin table td {vertical-align:middle}
|
5 |
-
|
6 |
-
/* Containers */
|
7 |
-
.o2k7Skin table {background:transparent}
|
8 |
-
.o2k7Skin iframe {display:block;}
|
9 |
-
.o2k7Skin .mceToolbar {height:26px}
|
10 |
-
|
11 |
-
/* External */
|
12 |
-
.o2k7Skin .mceExternalToolbar {position:absolute; border:1px solid #ABC6DD; border-bottom:0; display:none}
|
13 |
-
.o2k7Skin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
|
14 |
-
.o2k7Skin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
|
15 |
-
|
16 |
-
/* Layout */
|
17 |
-
.o2k7Skin table.mceLayout {border:0; border-left:1px solid #ABC6DD; border-right:1px solid #ABC6DD}
|
18 |
-
.o2k7Skin table.mceLayout tr.mceFirst td {border-top:1px solid #ABC6DD}
|
19 |
-
.o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD}
|
20 |
-
.o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0}
|
21 |
-
.o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD}
|
22 |
-
.o2k7Skin td.mceToolbar{background:#E5EFFD}
|
23 |
-
.o2k7Skin .mceStatusbar {background:#E5EFFD; display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px}
|
24 |
-
.o2k7Skin .mceStatusbar div {float:left; padding:2px}
|
25 |
-
.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
|
26 |
-
.o2k7Skin .mceStatusbar a:hover {text-decoration:underline}
|
27 |
-
.o2k7Skin table.mceToolbar {margin-left:3px}
|
28 |
-
.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;}
|
29 |
-
.o2k7Skin .mceToolbar td.mceFirst span {margin:0}
|
30 |
-
.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px}
|
31 |
-
.o2k7Skin .mceToolbar .mceToolbarEndListBox span, .o2k7Skin .mceToolbar .mceToolbarStartListBox span {display:none}
|
32 |
-
.o2k7Skin span.mceIcon, .o2k7Skin img.mceIcon {display:block; width:20px; height:20px}
|
33 |
-
.o2k7Skin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
|
34 |
-
.o2k7Skin td.mceCenter {text-align:center;}
|
35 |
-
.o2k7Skin td.mceCenter table {margin:0 auto; text-align:left;}
|
36 |
-
.o2k7Skin td.mceRight table {margin:0 0 0 auto;}
|
37 |
-
|
38 |
-
/* Button */
|
39 |
-
.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px}
|
40 |
-
.o2k7Skin a.mceButton span, .o2k7Skin a.mceButton img {margin-left:1px}
|
41 |
-
.o2k7Skin .mceOldBoxModel a.mceButton span, .o2k7Skin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px}
|
42 |
-
.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px}
|
43 |
-
.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px}
|
44 |
-
.o2k7Skin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
45 |
-
.o2k7Skin .mceButtonLabeled {width:auto}
|
46 |
-
.o2k7Skin .mceButtonLabeled span.mceIcon {float:left}
|
47 |
-
.o2k7Skin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
|
48 |
-
.o2k7Skin .mceButtonDisabled .mceButtonLabel {color:#888}
|
49 |
-
|
50 |
-
/* Separator */
|
51 |
-
.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px}
|
52 |
-
|
53 |
-
/* ListBox */
|
54 |
-
.o2k7Skin .mceListBox {padding-left: 3px}
|
55 |
-
.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block}
|
56 |
-
.o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
|
57 |
-
.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0}
|
58 |
-
.o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF}
|
59 |
-
.o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px}
|
60 |
-
.o2k7Skin .mceListBoxDisabled .mceText {color:gray}
|
61 |
-
.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden; margin-left:3px}
|
62 |
-
.o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px}
|
63 |
-
.o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;}
|
64 |
-
|
65 |
-
/* SplitButton */
|
66 |
-
.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px; direction:ltr}
|
67 |
-
.o2k7Skin .mceSplitButton {background:url(img/button_bg.png)}
|
68 |
-
.o2k7Skin .mceSplitButton a.mceAction {width:22px}
|
69 |
-
.o2k7Skin .mceSplitButton span.mceAction {width:22px; background-image:url(../../img/icons.gif)}
|
70 |
-
.o2k7Skin .mceSplitButton a.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0}
|
71 |
-
.o2k7Skin .mceSplitButton span.mceOpen {display:none}
|
72 |
-
.o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px}
|
73 |
-
.o2k7Skin table.mceSplitButtonEnabled:hover a.mceOpen, .o2k7Skin .mceSplitButtonHover a.mceOpen, .o2k7Skin .mceSplitButtonSelected a.mceOpen {background-position:-44px -44px}
|
74 |
-
.o2k7Skin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
75 |
-
.o2k7Skin .mceSplitButtonActive {background-position:0 -44px}
|
76 |
-
|
77 |
-
/* ColorSplitButton */
|
78 |
-
.o2k7Skin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
|
79 |
-
.o2k7Skin .mceColorSplitMenu td {padding:2px}
|
80 |
-
.o2k7Skin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
|
81 |
-
.o2k7Skin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
|
82 |
-
.o2k7Skin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
|
83 |
-
.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
|
84 |
-
.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A}
|
85 |
-
.o2k7Skin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a;overflow:hidden}
|
86 |
-
.o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px;overflow:hidden}
|
87 |
-
|
88 |
-
/* Menu */
|
89 |
-
.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD; direction:ltr}
|
90 |
-
.o2k7Skin .mceNoIcons span.mceIcon {width:0;}
|
91 |
-
.o2k7Skin .mceNoIcons a .mceText {padding-left:10px}
|
92 |
-
.o2k7Skin .mceMenu table {background:#FFF}
|
93 |
-
.o2k7Skin .mceMenu a, .o2k7Skin .mceMenu span, .o2k7Skin .mceMenu {display:block}
|
94 |
-
.o2k7Skin .mceMenu td {height:20px}
|
95 |
-
.o2k7Skin .mceMenu a {position:relative;padding:3px 0 4px 0}
|
96 |
-
.o2k7Skin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
|
97 |
-
.o2k7Skin .mceMenu span.mceText, .o2k7Skin .mceMenu .mcePreview {font-size:11px}
|
98 |
-
.o2k7Skin .mceMenu pre.mceText {font-family:Monospace}
|
99 |
-
.o2k7Skin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
|
100 |
-
.o2k7Skin .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
|
101 |
-
.o2k7Skin td.mceMenuItemSeparator {background:#DDD; height:1px}
|
102 |
-
.o2k7Skin .mceMenuItemTitle a {border:0; background:#E5EFFD; border-bottom:1px solid #ABC6DD}
|
103 |
-
.o2k7Skin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
|
104 |
-
.o2k7Skin .mceMenuItemDisabled .mceText {color:#888}
|
105 |
-
.o2k7Skin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)}
|
106 |
-
.o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center}
|
107 |
-
.o2k7Skin .mceMenu span.mceMenuLine {display:none}
|
108 |
-
.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;}
|
109 |
-
.o2k7Skin .mceMenuItem td, .o2k7Skin .mceMenuItem th {line-height: normal}
|
110 |
-
|
111 |
-
/* Progress,Resize */
|
112 |
-
.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}
|
113 |
-
.o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
|
114 |
-
|
115 |
-
/* Rtl */
|
116 |
-
.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0}
|
117 |
-
.mceRtl .mceMenuItem .mceText {text-align: right}
|
118 |
-
|
119 |
-
/* Formats */
|
120 |
-
.o2k7Skin .mce_formatPreview a {font-size:10px}
|
121 |
-
.o2k7Skin .mce_p span.mceText {}
|
122 |
-
.o2k7Skin .mce_address span.mceText {font-style:italic}
|
123 |
-
.o2k7Skin .mce_pre span.mceText {font-family:monospace}
|
124 |
-
.o2k7Skin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
|
125 |
-
.o2k7Skin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
|
126 |
-
.o2k7Skin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
|
127 |
-
.o2k7Skin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
|
128 |
-
.o2k7Skin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
|
129 |
-
.o2k7Skin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
|
130 |
-
|
131 |
-
/* Theme */
|
132 |
-
.o2k7Skin span.mce_bold {background-position:0 0}
|
133 |
-
.o2k7Skin span.mce_italic {background-position:-60px 0}
|
134 |
-
.o2k7Skin span.mce_underline {background-position:-140px 0}
|
135 |
-
.o2k7Skin span.mce_strikethrough {background-position:-120px 0}
|
136 |
-
.o2k7Skin span.mce_undo {background-position:-160px 0}
|
137 |
-
.o2k7Skin span.mce_redo {background-position:-100px 0}
|
138 |
-
.o2k7Skin span.mce_cleanup {background-position:-40px 0}
|
139 |
-
.o2k7Skin span.mce_bullist {background-position:-20px 0}
|
140 |
-
.o2k7Skin span.mce_numlist {background-position:-80px 0}
|
141 |
-
.o2k7Skin span.mce_justifyleft {background-position:-460px 0}
|
142 |
-
.o2k7Skin span.mce_justifyright {background-position:-480px 0}
|
143 |
-
.o2k7Skin span.mce_justifycenter {background-position:-420px 0}
|
144 |
-
.o2k7Skin span.mce_justifyfull {background-position:-440px 0}
|
145 |
-
.o2k7Skin span.mce_anchor {background-position:-200px 0}
|
146 |
-
.o2k7Skin span.mce_indent {background-position:-400px 0}
|
147 |
-
.o2k7Skin span.mce_outdent {background-position:-540px 0}
|
148 |
-
.o2k7Skin span.mce_link {background-position:-500px 0}
|
149 |
-
.o2k7Skin span.mce_unlink {background-position:-640px 0}
|
150 |
-
.o2k7Skin span.mce_sub {background-position:-600px 0}
|
151 |
-
.o2k7Skin span.mce_sup {background-position:-620px 0}
|
152 |
-
.o2k7Skin span.mce_removeformat {background-position:-580px 0}
|
153 |
-
.o2k7Skin span.mce_newdocument {background-position:-520px 0}
|
154 |
-
.o2k7Skin span.mce_image {background-position:-380px 0}
|
155 |
-
.o2k7Skin span.mce_help {background-position:-340px 0}
|
156 |
-
.o2k7Skin span.mce_code {background-position:-260px 0}
|
157 |
-
.o2k7Skin span.mce_hr {background-position:-360px 0}
|
158 |
-
.o2k7Skin span.mce_visualaid {background-position:-660px 0}
|
159 |
-
.o2k7Skin span.mce_charmap {background-position:-240px 0}
|
160 |
-
.o2k7Skin span.mce_paste {background-position:-560px 0}
|
161 |
-
.o2k7Skin span.mce_copy {background-position:-700px 0}
|
162 |
-
.o2k7Skin span.mce_cut {background-position:-680px 0}
|
163 |
-
.o2k7Skin span.mce_blockquote {background-position:-220px 0}
|
164 |
-
.o2k7Skin .mce_forecolor span.mceAction {background-position:-720px 0}
|
165 |
-
.o2k7Skin .mce_backcolor span.mceAction {background-position:-760px 0}
|
166 |
-
.o2k7Skin span.mce_forecolorpicker {background-position:-720px 0}
|
167 |
-
.o2k7Skin span.mce_backcolorpicker {background-position:-760px 0}
|
168 |
-
|
169 |
-
/* Plugins */
|
170 |
-
.o2k7Skin span.mce_advhr {background-position:-0px -20px}
|
171 |
-
.o2k7Skin span.mce_ltr {background-position:-20px -20px}
|
172 |
-
.o2k7Skin span.mce_rtl {background-position:-40px -20px}
|
173 |
-
.o2k7Skin span.mce_emotions {background-position:-60px -20px}
|
174 |
-
.o2k7Skin span.mce_fullpage {background-position:-80px -20px}
|
175 |
-
.o2k7Skin span.mce_fullscreen {background-position:-100px -20px}
|
176 |
-
.o2k7Skin span.mce_iespell {background-position:-120px -20px}
|
177 |
-
.o2k7Skin span.mce_insertdate {background-position:-140px -20px}
|
178 |
-
.o2k7Skin span.mce_inserttime {background-position:-160px -20px}
|
179 |
-
.o2k7Skin span.mce_absolute {background-position:-180px -20px}
|
180 |
-
.o2k7Skin span.mce_backward {background-position:-200px -20px}
|
181 |
-
.o2k7Skin span.mce_forward {background-position:-220px -20px}
|
182 |
-
.o2k7Skin span.mce_insert_layer {background-position:-240px -20px}
|
183 |
-
.o2k7Skin span.mce_insertlayer {background-position:-260px -20px}
|
184 |
-
.o2k7Skin span.mce_movebackward {background-position:-280px -20px}
|
185 |
-
.o2k7Skin span.mce_moveforward {background-position:-300px -20px}
|
186 |
-
.o2k7Skin span.mce_media {background-position:-320px -20px}
|
187 |
-
.o2k7Skin span.mce_nonbreaking {background-position:-340px -20px}
|
188 |
-
.o2k7Skin span.mce_pastetext {background-position:-360px -20px}
|
189 |
-
.o2k7Skin span.mce_pasteword {background-position:-380px -20px}
|
190 |
-
.o2k7Skin span.mce_selectall {background-position:-400px -20px}
|
191 |
-
.o2k7Skin span.mce_preview {background-position:-420px -20px}
|
192 |
-
.o2k7Skin span.mce_print {background-position:-440px -20px}
|
193 |
-
.o2k7Skin span.mce_cancel {background-position:-460px -20px}
|
194 |
-
.o2k7Skin span.mce_save {background-position:-480px -20px}
|
195 |
-
.o2k7Skin span.mce_replace {background-position:-500px -20px}
|
196 |
-
.o2k7Skin span.mce_search {background-position:-520px -20px}
|
197 |
-
.o2k7Skin span.mce_styleprops {background-position:-560px -20px}
|
198 |
-
.o2k7Skin span.mce_table {background-position:-580px -20px}
|
199 |
-
.o2k7Skin span.mce_cell_props {background-position:-600px -20px}
|
200 |
-
.o2k7Skin span.mce_delete_table {background-position:-620px -20px}
|
201 |
-
.o2k7Skin span.mce_delete_col {background-position:-640px -20px}
|
202 |
-
.o2k7Skin span.mce_delete_row {background-position:-660px -20px}
|
203 |
-
.o2k7Skin span.mce_col_after {background-position:-680px -20px}
|
204 |
-
.o2k7Skin span.mce_col_before {background-position:-700px -20px}
|
205 |
-
.o2k7Skin span.mce_row_after {background-position:-720px -20px}
|
206 |
-
.o2k7Skin span.mce_row_before {background-position:-740px -20px}
|
207 |
-
.o2k7Skin span.mce_merge_cells {background-position:-760px -20px}
|
208 |
-
.o2k7Skin span.mce_table_props {background-position:-980px -20px}
|
209 |
-
.o2k7Skin span.mce_row_props {background-position:-780px -20px}
|
210 |
-
.o2k7Skin span.mce_split_cells {background-position:-800px -20px}
|
211 |
-
.o2k7Skin span.mce_template {background-position:-820px -20px}
|
212 |
-
.o2k7Skin span.mce_visualchars {background-position:-840px -20px}
|
213 |
-
.o2k7Skin span.mce_abbr {background-position:-860px -20px}
|
214 |
-
.o2k7Skin span.mce_acronym {background-position:-880px -20px}
|
215 |
-
.o2k7Skin span.mce_attribs {background-position:-900px -20px}
|
216 |
-
.o2k7Skin span.mce_cite {background-position:-920px -20px}
|
217 |
-
.o2k7Skin span.mce_del {background-position:-940px -20px}
|
218 |
-
.o2k7Skin span.mce_ins {background-position:-960px -20px}
|
219 |
-
.o2k7Skin span.mce_pagebreak {background-position:0 -40px}
|
220 |
-
.o2k7Skin span.mce_restoredraft {background-position:-20px -40px}
|
221 |
-
.o2k7Skin span.mce_spellchecker {background-position:-540px -20px}
|
222 |
-
.o2k7Skin span.mce_visualblocks {background-position: -40px -40px}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/skins/o2k7/ui_black.css
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
/* Black */
|
2 |
-
.o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton a.mceOpen, .o2k7SkinBlack .mceListBox a.mceOpen {background-image:url(img/button_bg_black.png)}
|
3 |
-
.o2k7SkinBlack td.mceToolbar, .o2k7SkinBlack td.mceStatusbar, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF}
|
4 |
-
.o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0}
|
5 |
-
.o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7SkinBlack .mceListBoxHover .mceText, .o2k7SkinBlack .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0}
|
6 |
-
.o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;}
|
7 |
-
.o2k7SkinBlack table.mceSplitButtonEnabled:hover a.mceAction, .o2k7SkinBlack .mceSplitButtonHover a.mceAction, .o2k7SkinBlack .mceSplitButtonSelected {background-image:url(img/button_bg_black.png)}
|
8 |
-
.o2k7SkinBlack .mceMenu .mceMenuItemEnabled a:hover, .o2k7SkinBlack .mceMenu .mceMenuItemActive {background-color:#FFE7A1}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/skins/o2k7/ui_silver.css
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
/* Silver */
|
2 |
-
.o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton a.mceOpen, .o2k7SkinSilver .mceListBox a.mceOpen {background-image:url(img/button_bg_silver.png)}
|
3 |
-
.o2k7SkinSilver td.mceToolbar, .o2k7SkinSilver td.mceStatusbar, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee}
|
4 |
-
.o2k7SkinSilver .mceListBox .mceText {background:#FFF}
|
5 |
-
.o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb}
|
|
|
|
|
|
|
|
|
|
tiny_mce/themes/advanced/source_editor.htm
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
2 |
-
<head>
|
3 |
-
<title>{#advanced_dlg.code_title}</title>
|
4 |
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
5 |
-
<script type="text/javascript" src="js/source_editor.js"></script>
|
6 |
-
</head>
|
7 |
-
<body onresize="resizeInputs();" style="display:none; overflow:hidden;" spellcheck="false">
|
8 |
-
<form name="source" onsubmit="saveContent();return false;" action="#">
|
9 |
-
<div style="float: left" class="title"><label for="htmlSource">{#advanced_dlg.code_title}</label></div>
|
10 |
-
|
11 |
-
<div id="wrapline" style="float: right">
|
12 |
-
<input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{#advanced_dlg.code_wordwrap}</label>
|
13 |
-
</div>
|
14 |
-
|
15 |
-
<br style="clear: both" />
|
16 |
-
|
17 |
-
<textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,monospace; font-size: 12px;" dir="ltr" wrap="off" class="mceFocus"></textarea>
|
18 |
-
|
19 |
-
<div class="mceActionPanel">
|
20 |
-
<input type="submit" role="button" name="insert" value="{#update}" id="insert" />
|
21 |
-
<input type="button" role="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
|
22 |
-
</div>
|
23 |
-
</form>
|
24 |
-
</body>
|
25 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/tiny_mce.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(e){var a=/^\s*|\s*$/g,b,d="B".replace(/A(.)|B/,"$1")==="$1";var c={majorVersion:"3",minorVersion:"5.7",releaseDate:"2012-09-20",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=e.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(e.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m<f.length;m++){r=f[m].href;if(r){if(/^https?:\/\/[^\/]+$/.test(r)){r+="/"}k=r?r.match(/.*\//)[0]:""}}function h(i){if(i.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(i.src)){if(/_(src|dev)\.js/g.test(i.src)){s.suffix="_src"}if((j=i.src.indexOf("?"))!=-1){s.query=i.src.substring(j+1)}s.baseURL=i.src.substring(0,i.src.lastIndexOf("/"));if(k&&s.baseURL.indexOf("://")==-1&&s.baseURL.indexOf("/")!==0){s.baseURL=k+s.baseURL}return s.baseURL}return null}f=q.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}l=q.getElementsByTagName("head")[0];if(l){f=l.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}}return},is:function(g,f){if(!f){return g!==b}if(f=="array"&&c.isArray(g)){return true}return typeof(g)==f},isArray:Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},makeMap:function(f,j,h){var g;f=f||[];j=j||",";if(typeof(f)=="string"){f=f.split(j)}h=h||{};g=f.length;while(g--){h[f[g]]={}}return h},each:function(i,f,h){var j,g;if(!i){return 0}h=h||i;if(i.length!==b){for(j=0,g=i.length;j<g;j++){if(f.call(h,i[j],j,i)===false){return 0}}}else{for(j in i){if(i.hasOwnProperty(j)){if(f.call(h,i[j],j,i)===false){return 0}}}}return 1},map:function(g,h){var i=[];c.each(g,function(f){i.push(h(f))});return i},grep:function(g,h){var i=[];c.each(g,function(f){if(!h||h(f)){i.push(f)}});return i},inArray:function(g,h){var j,f;if(g){for(j=0,f=g.length;j<f;j++){if(g[j]===h){return j}}}return -1},extend:function(n,k){var j,f,h,g=arguments,m;for(j=1,f=g.length;j<f;j++){k=g[j];for(h in k){if(k.hasOwnProperty(h)){m=k[h];if(m!==b){n[h]=m}}}}return n},trim:function(f){return(f?""+f:"").replace(a,"")},create:function(o,f,j){var n=this,g,i,k,l,h,m=0;o=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(o);k=o[3].match(/(^|\.)(\w+)$/i)[2];i=n.createNS(o[3].replace(/\.\w+$/,""),j);if(i[k]){return}if(o[2]=="static"){i[k]=f;if(this.onCreate){this.onCreate(o[2],o[3],i[k])}return}if(!f[k]){f[k]=function(){};m=1}i[k]=f[k];n.extend(i[k].prototype,f);if(o[5]){g=n.resolve(o[5]).prototype;l=o[5].match(/\.(\w+)$/i)[1];h=i[k];if(m){i[k]=function(){return g[l].apply(this,arguments)}}else{i[k]=function(){this.parent=g[l];return h.apply(this,arguments)}}i[k].prototype[k]=i[k];n.each(g,function(p,q){i[k].prototype[q]=g[q]});n.each(f,function(p,q){if(g[q]){i[k].prototype[q]=function(){this.parent=g[q];return p.apply(this,arguments)}}else{if(q!=k){i[k].prototype[q]=p}}})}n.each(f["static"],function(p,q){i[k][q]=p});if(this.onCreate){this.onCreate(o[2],o[3],i[k].prototype)}},walk:function(i,h,j,g){g=g||this;if(i){if(j){i=i[j]}c.each(i,function(k,f){if(h.call(g,k,f,j)===false){return false}c.walk(k,h,j,g)})}},createNS:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0;g<j.length;g++){f=j[g];if(!h[f]){h[f]={}}h=h[f]}return h},resolve:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0,f=j.length;g<f;g++){h=h[j[g]];if(!h){break}}return h},addUnload:function(j,i){var h=this,g;g=function(){var f=h.unloads,l,m;if(f){for(m in f){l=f[m];if(l&&l.func){l.func.call(l.scope,1)}}if(e.detachEvent){e.detachEvent("onbeforeunload",k);e.detachEvent("onunload",g)}else{if(e.removeEventListener){e.removeEventListener("unload",g,false)}}h.unloads=l=f=w=g=0;if(e.CollectGarbage){CollectGarbage()}}};function k(){var l=document;function f(){l.detachEvent("onstop",f);if(g){g()}l=0}if(l.readyState=="interactive"){if(l){l.attachEvent("onstop",f)}e.setTimeout(function(){if(l){l.detachEvent("onstop",f)}},0)}}j={func:j,scope:i||this};if(!h.unloads){if(e.attachEvent){e.attachEvent("onunload",g);e.attachEvent("onbeforeunload",k)}else{if(e.addEventListener){e.addEventListener("unload",g,false)}}h.unloads=[j]}else{h.unloads.push(j)}return j},removeUnload:function(i){var g=this.unloads,h=null;c.each(g,function(j,f){if(j&&j.func==i){g.splice(f,1);h=i;return false}});return h},explode:function(f,g){if(!f||c.is(f,"array")){return f}return c.map(f.split(g||","),c.trim)},_addVer:function(g){var f;if(!this.query){return g}f=(g.indexOf("?")==-1?"?":"&")+this.query;if(g.indexOf("#")==-1){return g+f}return g.replace("#",f+"#")},_replace:function(h,f,g){if(d){return g.replace(h,function(){var l=f,j=arguments,k;for(k=0;k<j.length-2;k++){if(j[k]===b){l=l.replace(new RegExp("\\$"+k,"g"),"")}else{l=l.replace(new RegExp("\\$"+k,"g"),j[k])}}return l})}return g.replace(h,f)}};c._init();e.tinymce=e.tinyMCE=c})(window);tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,inDispatch:false,Dispatcher:function(a){this.scope=a||this;this.listeners=[]},add:function(b,a){this.listeners.push({cb:b,scope:a||this.scope});return b},addToTop:function(d,b){var a=this,c={cb:d,scope:b||a.scope};if(a.inDispatch){a.listeners=[c].concat(a.listeners)}else{a.listeners.unshift(c)}return d},remove:function(c){var b=this.listeners,a=null;tinymce.each(b,function(e,d){if(c==e.cb){a=e;b.splice(d,1);return false}});return a},dispatch:function(){var a=this,e,b=arguments,c,d=a.listeners,f;a.inDispatch=true;for(c=0;c<d.length;c++){f=d[c];e=f.cb.apply(f.scope,b.length>0?b:[f.scope]);if(e===false){break}}a.inDispatch=false;return e}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,i,d,c,h;e=tinymce.trim(e);g=f.settings=g||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){f.source=e;return}if(e.indexOf("/")===0&&e.indexOf("//")!==0){e=(g.base_uri?g.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w\-]*:?\/\//.test(e)){h=g.base_uri?g.base_uri.path:new tinymce.util.URI(location.href).directory;e=((g.base_uri&&g.base_uri.protocol)||"http")+"://mce_host"+f.toAbsPath(h,e)}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,j){var k=e[j];if(k){k=k.replace(/\(mce_at\)/g,"@@")}f[b]=k});c=g.base_uri;if(c){if(!f.protocol){f.protocol=c.protocol}if(!f.userInfo){f.userInfo=c.userInfo}if(!f.port&&f.host==="mce_host"){f.port=c.port}if(!f.host||f.host==="mce_host"){f.host=c.host}f.source=""}},setPath:function(c){var b=this;c=/^(.*?)\/?(\w+)?$/.exec(c);b.path=c[0];b.directory=c[1];b.file=c[2];b.source="";b.getURI()},toRelative:function(b){var d=this,f;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:d});if((b.host!="mce_host"&&d.host!=b.host&&b.host)||d.port!=b.port||d.protocol!=b.protocol){return b.getURI()}var c=d.getURI(),e=b.getURI();if(c==e||(c.charAt(c.length-1)=="/"&&c.substr(0,c.length-1)==e)){return c}f=d.toRelPath(d.path,b.path);if(b.query){f+="?"+b.query}if(b.anchor){f+="#"+b.anchor}return f},toAbsolute:function(b,c){b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host&&this.protocol==b.protocol?c:0)},toRelPath:function(g,h){var c,f=0,d="",e,b;g=g.substring(0,g.lastIndexOf("/"));g=g.split("/");c=h.split("/");if(g.length>=c.length){for(e=0,b=g.length;e<b;e++){if(e>=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length<c.length){for(e=0,b=c.length;e<b;e++){if(e>=g.length||g[e]!=c[e]){f=e+1;break}}}if(f===1){return h}for(e=0,b=g.length-(f-1);e<b;e++){d+="../"}for(e=f-1,b=c.length;e<b;e++){if(e!=f-1){d+="/"+c[e]}else{d+=c[e]}}return d},toAbsPath:function(e,f){var c,b=0,h=[],d,g;d=/\/$/.test(f)?"/":"";e=e.split("/");f=f.split("/");a(e,function(i){if(i){h.push(i)}});e=h;for(c=f.length-1,h=[];c>=0;c--){if(f[c].length===0||f[c]==="."){continue}if(f[c]===".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!==0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(c,e,d){var b=new Date();b.setTime(b.getTime()-1000);this.set(c,"",b,e,d)}})})();(function(){function serialize(o,quote){var i,v,t,name;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&Object.prototype.toString.call(o)==="[object Array]"){for(i=0,v="[";i<o.length;i++){v+=(i>0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(name in o){if(o.hasOwnProperty(name)){v+=typeof o[name]!="function"?(v.length>1?","+quote:quote)+name+quote+":"+serialize(o[name],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(b){return b.shiftKey||b.ctrlKey||b.altKey},metaKeyPressed:function(b){return a.isMac?b.metaKey:b.ctrlKey&&!b.altKey}}})(tinymce);tinymce.util.Quirks=function(e){var n=tinymce.VK,x=n.BACKSPACE,y=n.DELETE,q=e.dom,I=e.selection,v=e.settings,c=e.parser,u=e.serializer;function d(M,L){try{e.getDoc().execCommand(M,false,L)}catch(K){}}function C(){var K=e.getDoc().documentMode;return K?K:6}function H(K){return K.isDefaultPrevented()}function k(){function K(N){var L,P,M,O;L=I.getRng();P=q.getParent(L.startContainer,q.isBlock);if(N){P=q.getNext(P,q.isBlock)}if(P){M=P.firstChild;while(M&&M.nodeType==3&&M.nodeValue.length===0){M=M.nextSibling}if(M&&M.nodeName==="SPAN"){O=M.cloneNode(false)}}e.getDoc().execCommand(N?"ForwardDelete":"Delete",false,null);P=q.getParent(L.startContainer,q.isBlock);tinymce.each(q.select("span.Apple-style-span,font.Apple-style-span",P),function(Q){var R=I.getBookmark();if(O){q.replace(O.cloneNode(false),Q,true)}else{q.remove(Q,true)}I.moveToBookmark(R)})}e.onKeyDown.add(function(L,N){var M;M=N.keyCode==y;if(!H(N)&&(M||N.keyCode==x)&&!n.modifierPressed(N)){N.preventDefault();K(M)}});e.addCommand("Delete",function(){K()})}function J(){function K(N){var M=q.create("body");var O=N.cloneContents();M.appendChild(O);return I.serializer.serialize(M,{format:"html"})}function L(M){var O=K(M);var P=q.createRng();P.selectNode(e.getBody());var N=K(P);return O===N}e.onKeyDown.add(function(N,P){var O=P.keyCode,M;if(!H(P)&&(O==y||O==x)){M=N.selection.isCollapsed();if(M&&!q.isEmpty(N.getBody())){return}if(tinymce.isIE&&!M){return}if(!M&&!L(N.selection.getRng())){return}N.setContent("");N.selection.setCursorLocation(N.getBody(),0);N.nodeChanged()}})}function A(){e.onKeyDown.add(function(K,L){if(!H(L)&&L.keyCode==65&&n.metaKeyPressed(L)){L.preventDefault();K.execCommand("SelectAll")}})}function B(){if(!e.settings.content_editable){q.bind(e.getDoc(),"focusin",function(K){I.setRng(I.getRng())});q.bind(e.getDoc(),"mousedown",function(K){if(K.target==e.getDoc().documentElement){e.getWin().focus();I.setRng(I.getRng())}})}}function o(){e.onKeyDown.add(function(K,N){if(!H(N)&&N.keyCode===x){if(I.isCollapsed()&&I.getRng(true).startOffset===0){var M=I.getNode();var L=M.previousSibling;if(L&&L.nodeName&&L.nodeName.toLowerCase()==="hr"){q.remove(L);tinymce.dom.Event.cancel(N)}}}})}function b(){if(!Range.prototype.getClientRects){e.onMouseDown.add(function(L,M){if(!H(M)&&M.target.nodeName==="HTML"){var K=L.getBody();K.blur();setTimeout(function(){K.focus()},0)}})}}function F(){e.onClick.add(function(K,L){L=L.target;if(/^(IMG|HR)$/.test(L.nodeName)){I.getSel().setBaseAndExtent(L,0,L,1)}if(L.nodeName=="A"&&q.hasClass(L,"mceItemAnchor")){I.select(L)}K.nodeChanged()})}function E(){function L(){var N=q.getAttribs(I.getStart().cloneNode(false));return function(){var O=I.getStart();if(O!==e.getBody()){q.setAttrib(O,"style",null);tinymce.each(N,function(P){O.setAttributeNode(P.cloneNode(true))})}}}function K(){return !I.isCollapsed()&&q.getParent(I.getStart(),q.isBlock)!=q.getParent(I.getEnd(),q.isBlock)}function M(N,O){O.preventDefault();return false}e.onKeyPress.add(function(N,P){var O;if(!H(P)&&(P.keyCode==8||P.keyCode==46)&&K()){O=L();N.getDoc().execCommand("delete",false,null);O();P.preventDefault();return false}});q.bind(e.getDoc(),"cut",function(O){var N;if(!H(O)&&K()){N=L();e.onKeyUp.addToTop(M);setTimeout(function(){N();e.onKeyUp.remove(M)},0)}})}function l(){var L,K;q.bind(e.getDoc(),"selectionchange",function(){if(K){clearTimeout(K);K=0}K=window.setTimeout(function(){var M=I.getRng();if(!L||!tinymce.dom.RangeUtils.compareRanges(M,L)){e.nodeChanged();L=M}},50)})}function G(){document.body.setAttribute("role","application")}function D(){e.onKeyDown.add(function(K,M){if(!H(M)&&M.keyCode===x){if(I.isCollapsed()&&I.getRng(true).startOffset===0){var L=I.getNode().previousSibling;if(L&&L.nodeName&&L.nodeName.toLowerCase()==="table"){return tinymce.dom.Event.cancel(M)}}}})}function i(){if(C()>7){return}d("RespectVisibilityInDesign",true);e.contentStyles.push(".mceHideBrInPre pre br {display: none}");q.addClass(e.getBody(),"mceHideBrInPre");c.addNodeFilter("pre",function(K,M){var N=K.length,P,L,Q,O;while(N--){P=K[N].getAll("br");L=P.length;while(L--){Q=P[L];O=Q.prev;if(O&&O.type===3&&O.value.charAt(O.value-1)!="\n"){O.value+="\n"}else{Q.parent.insert(new tinymce.html.Node("#text",3),Q,true).value="\n"}}}});u.addNodeFilter("pre",function(K,M){var N=K.length,P,L,Q,O;while(N--){P=K[N].getAll("br");L=P.length;while(L--){Q=P[L];O=Q.prev;if(O&&O.type==3){O.value=O.value.replace(/\r?\n$/,"")}}}})}function g(){q.bind(e.getBody(),"mouseup",function(M){var L,K=I.getNode();if(K.nodeName=="IMG"){if(L=q.getStyle(K,"width")){q.setAttrib(K,"width",L.replace(/[^0-9%]+/g,""));q.setStyle(K,"width","")}if(L=q.getStyle(K,"height")){q.setAttrib(K,"height",L.replace(/[^0-9%]+/g,""));q.setStyle(K,"height","")}}})}function s(){e.onKeyDown.add(function(Q,R){var P,K,L,N,O,S,M;P=R.keyCode==y;if(!H(R)&&(P||R.keyCode==x)&&!n.modifierPressed(R)){K=I.getRng();L=K.startContainer;N=K.startOffset;M=K.collapsed;if(L.nodeType==3&&L.nodeValue.length>0&&((N===0&&!M)||(M&&N===(P?0:1)))){nonEmptyElements=Q.schema.getNonEmptyElements();R.preventDefault();O=q.create("br",{id:"__tmp"});L.parentNode.insertBefore(O,L);Q.getDoc().execCommand(P?"ForwardDelete":"Delete",false,null);L=I.getRng().startContainer;S=L.previousSibling;if(S&&S.nodeType==1&&!q.isBlock(S)&&q.isEmpty(S)&&!nonEmptyElements[S.nodeName.toLowerCase()]){q.remove(S)}q.remove("__tmp")}}})}function f(){e.onKeyDown.add(function(O,P){var M,L,Q,K,N;if(H(P)||P.keyCode!=n.BACKSPACE){return}M=I.getRng();L=M.startContainer;Q=M.startOffset;K=q.getRoot();N=L;if(!M.collapsed||Q!==0){return}while(N&&N.parentNode&&N.parentNode.firstChild==N&&N.parentNode!=K){N=N.parentNode}if(N.tagName==="BLOCKQUOTE"){O.formatter.toggle("blockquote",null,N);M=q.createRng();M.setStart(L,0);M.setEnd(L,0);I.setRng(M)}})}function m(){function K(){e._refreshContentEditable();d("StyleWithCSS",false);d("enableInlineTableEditing",false);if(!v.object_resizing){d("enableObjectResizing",false)}}if(!v.readonly){e.onBeforeExecCommand.add(K);e.onMouseDown.add(K)}}function p(){function K(L,M){tinymce.each(q.select("a"),function(P){var N=P.parentNode,O=q.getRoot();if(N.lastChild===P){while(N&&!q.isBlock(N)){if(N.parentNode.lastChild!==N||N===O){return}N=N.parentNode}q.add(N,"br",{"data-mce-bogus":1})}})}e.onExecCommand.add(function(L,M){if(M==="CreateLink"){K(L)}});e.onSetContent.add(I.onSetContent.add(K))}function z(){if(v.forced_root_block){e.onInit.add(function(){d("DefaultParagraphSeparator",v.forced_root_block)})}}function a(){function K(M,L){if(!M||!L.initial){e.execCommand("mceRepaint")}}e.onUndo.add(K);e.onRedo.add(K);e.onSetContent.add(K)}function r(){e.onKeyDown.add(function(L,M){var K;if(!H(M)&&M.keyCode==x){K=L.getDoc().selection.createRange();if(K&&K.item){M.preventDefault();L.undoManager.beforeChange();q.remove(K.item(0));L.undoManager.add()}}})}function j(){var K;if(C()>=10){K="";tinymce.each("p div h1 h2 h3 h4 h5 h6".split(" "),function(L,M){K+=(M>0?",":"")+L+":empty"});e.contentStyles.push(K+"{padding-right: 1px !important}")}}function h(){var M,L,ac,K,X,aa,Y,ab,N,O,Z,V,U,W=document,S=e.getDoc();if(!v.object_resizing||v.webkit_fake_resize===false){return}d("enableObjectResizing",false);Z={n:[0.5,0,0,-1],e:[1,0.5,1,0],s:[0.5,1,0,1],w:[0,0.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};function Q(ag){var af,ae;af=ag.screenX-aa;ae=ag.screenY-Y;V=af*X[2]+ab;U=ae*X[3]+N;V=V<5?5:V;U=U<5?5:U;if(n.modifierPressed(ag)||(ac.nodeName=="IMG"&&X[2]*X[3]!==0)){V=Math.round(U/O);U=Math.round(V*O)}q.setStyles(K,{width:V,height:U});if(X[2]<0&&K.clientWidth<=V){q.setStyle(K,"left",M+(ab-V))}if(X[3]<0&&K.clientHeight<=U){q.setStyle(K,"top",L+(N-U))}}function ad(){function ae(af,ag){if(ag){if(ac.style[af]||!e.schema.isValid(ac.nodeName.toLowerCase(),af)){q.setStyle(ac,af,ag)}else{q.setAttrib(ac,af,ag)}}}ae("width",V);ae("height",U);q.unbind(S,"mousemove",Q);q.unbind(S,"mouseup",ad);if(W!=S){q.unbind(W,"mousemove",Q);q.unbind(W,"mouseup",ad)}q.remove(K);P(ac)}function P(ah){var af,ag,ae;R();af=q.getPos(ah);M=af.x;L=af.y;ag=ah.offsetWidth;ae=ah.offsetHeight;if(ac!=ah){ac=ah;V=U=0}tinymce.each(Z,function(ak,ai){var aj;aj=q.get("mceResizeHandle"+ai);if(!aj){aj=q.add(S.documentElement,"div",{id:"mceResizeHandle"+ai,"class":"mceResizeHandle",style:"cursor:"+ai+"-resize; margin:0; padding:0"});q.bind(aj,"mousedown",function(al){al.preventDefault();ad();aa=al.screenX;Y=al.screenY;ab=ac.clientWidth;N=ac.clientHeight;O=N/ab;X=ak;K=ac.cloneNode(true);q.addClass(K,"mceClonedResizable");q.setStyles(K,{left:M,top:L,margin:0});S.documentElement.appendChild(K);q.bind(S,"mousemove",Q);q.bind(S,"mouseup",ad);if(W!=S){q.bind(W,"mousemove",Q);q.bind(W,"mouseup",ad)}})}else{q.show(aj)}q.setStyles(aj,{left:(ag*ak[0]+M)-(aj.offsetWidth/2),top:(ae*ak[1]+L)-(aj.offsetHeight/2)})});if(!tinymce.isOpera&&ac.nodeName=="IMG"){ac.setAttribute("data-mce-selected","1")}}function R(){if(ac){ac.removeAttribute("data-mce-selected")}for(var ae in Z){q.hide("mceResizeHandle"+ae)}}e.contentStyles.push(".mceResizeHandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}.mceResizeHandle:hover {background: #000}img[data-mce-selected] {outline: 1px solid black}img.mceClonedResizable, table.mceClonedResizable {position: absolute;outline: 1px dashed black;opacity: .5;z-index: 10000}");function T(){var ae=q.getParent(I.getNode(),"table,img");tinymce.each(q.select("img[data-mce-selected]"),function(af){af.removeAttribute("data-mce-selected")});if(ae){P(ae)}else{R()}}e.onNodeChange.add(T);q.bind(S,"selectionchange",T);e.serializer.addAttributeFilter("data-mce-selected",function(ae,af){var ag=ae.length;while(ag--){ae[ag].attr(af,null)}})}function t(){if(C()<9){c.addNodeFilter("noscript",function(K){var L=K.length,M,N;while(L--){M=K[L];N=M.firstChild;if(N){M.attr("data-mce-innertext",N.value)}}});u.addNodeFilter("noscript",function(K){var L=K.length,M,O,N;while(L--){M=K[L];O=K[L].firstChild;if(O){O.value=tinymce.html.Entities.decode(O.value)}else{N=M.attributes.map["data-mce-innertext"];if(N){M.attr("data-mce-innertext",null);O=new tinymce.html.Node("#text",3);O.value=N;O.raw=true;M.append(O)}}}})}}D();f();J();if(tinymce.isWebKit){s();k();B();F();z();if(tinymce.isIDevice){l()}else{h();A()}}if(tinymce.isIE){o();G();i();g();r();j();t()}if(tinymce.isGecko){o();b();E();m();p();a()}if(tinymce.isOpera){h()}};(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':""","'":"'","<":"<",">":">","&":"&"};d={"<":"<",">":">","&":"&",""":'"',"'":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n<m.length;n+=2){o=String.fromCharCode(parseInt(m[n],p));if(!g[o]){l="&"+m[n+1]+";";q[o]=l;q[l]=o}}return q}}a=e("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);j.html=j.html||{};j.html.Entities={encodeRaw:function(m,l){return m.replace(l?k:b,function(n){return g[n]||n})},encodeAllRaw:function(l){return(""+l).replace(f,function(m){return g[m]||m})},encodeNumeric:function(m,l){return m.replace(l?k:b,function(n){if(n.length>1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g<j.length;g++){a[j[g]]="\uFEFF"+g;a["\uFEFF"+g]=j[g]}function c(n,q,p,i){function o(r){r=parseInt(r).toString(16);return r.length>1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(s){var z={},q,n,x,r,v=d.url_converter,y=d.url_converter_scope||this;function p(D,G){var F,C,B,E;F=z[D+"-top"+G];if(!F){return}C=z[D+"-right"+G];if(F!=C){return}B=z[D+"-bottom"+G];if(C!=B){return}E=z[D+"-left"+G];if(B!=E){return}z[D+G]=E;delete z[D+"-top"+G];delete z[D+"-right"+G];delete z[D+"-bottom"+G];delete z[D+"-left"+G]}function u(C){var D=z[C],B;if(!D||D.indexOf(" ")<0){return}D=D.split(" ");B=D.length;while(B--){if(D[B]!==D[0]){return false}}z[C]=D[0];return true}function A(D,C,B,E){if(!u(C)){return}if(!u(B)){return}if(!u(E)){return}z[D]=z[C]+" "+z[B]+" "+z[E];delete z[C];delete z[B];delete z[E]}function t(B){r=true;return a[B]}function i(C,B){if(r){C=C.replace(/\uFEFF[0-9]/g,function(D){return a[D]})}if(!B){C=C.replace(/\\([\'\";:])/g,"$1")}return C}function o(C,B,F,E,G,D){G=G||D;if(G){G=i(G);return"'"+G.replace(/\'/g,"\\'")+"'"}B=i(B||F||E);if(v){B=v.call(y,B,"style")}return"url('"+B.replace(/\'/g,"\\'")+"')"}if(s){s=s.replace(/\\[\"\';:\uFEFF]/g,t).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(B){return B.replace(/[;:]/g,t)});while(q=b.exec(s)){n=q[1].replace(l,"").toLowerCase();x=q[2].replace(l,"");if(n&&x.length>0){if(n==="font-weight"&&x==="700"){x="bold"}else{if(n==="color"||n==="background-color"){x=x.toLowerCase()}}x=x.replace(k,c);x=x.replace(h,o);z[n]=r?i(x,true):x}b.lastIndex=q.index+q[0].length}p("border","");p("border","-width");p("border","-color");p("border","-style");p("padding","");p("margin","");A("border","border-width","border-style","border-color");if(z.border==="medium none"){delete z.border}}return z},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u<s;u++){t=x[u];v=p[t];if(v!==e&&v.length>0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(f){var a={},e=f.makeMap,g=f.each;function d(j,i){return j.split(i||",")}function h(m,l){var j,k={};function i(n){return n.replace(/[A-Z]+/g,function(o){return i(m[o])})}for(j in m){if(m.hasOwnProperty(j)){m[j]=i(m[j])}}i(l).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(q,o,n,p){n=d(n,"|");k[o]={attributes:e(n),attributesOrder:n,children:e(p,"|",{"#comment":{}})}});return k}function b(){var i=a.html5;if(!i){i=a.html5=h({A:"id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr",C:"#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video"},"html[A|manifest][body|head]head[A][base|command|link|meta|noscript|script|style|title]title[A][#]base[A|href|target][]link[A|href|rel|media|type|sizes][]meta[A|http-equiv|name|content|charset][]style[A|type|media|scoped][#]script[A|charset|type|src|defer|async][#]noscript[A][C]body[A][C]section[A][C]nav[A][C]article[A][C]aside[A][C]h1[A][B]h2[A][B]h3[A][B]h4[A][B]h5[A][B]h6[A][B]hgroup[A][h1|h2|h3|h4|h5|h6]header[A][C]footer[A][C]address[A][C]p[A][B]br[A][]pre[A][B]dialog[A][dd|dt]blockquote[A|cite][C]ol[A|start|reversed][li]ul[A][li]li[A|value][C]dl[A][dd|dt]dt[A][B]dd[A][C]a[A|href|target|ping|rel|media|type][B]em[A][B]strong[A][B]small[A][B]cite[A][B]q[A|cite][B]dfn[A][B]abbr[A][B]code[A][B]var[A][B]samp[A][B]kbd[A][B]sub[A][B]sup[A][B]i[A][B]b[A][B]mark[A][B]progress[A|value|max][B]meter[A|value|min|max|low|high|optimum][B]time[A|datetime][B]ruby[A][B|rt|rp]rt[A][B]rp[A][B]bdo[A][B]span[A][B]ins[A|cite|datetime][B]del[A|cite|datetime][B]figure[A][C|legend|figcaption]figcaption[A][C]img[A|alt|src|height|width|usemap|ismap][]iframe[A|name|src|height|width|sandbox|seamless][]embed[A|src|height|width|type][]object[A|data|type|height|width|usemap|name|form|classid][param]param[A|name|value][]details[A|open][C|legend]command[A|type|label|icon|disabled|checked|radiogroup][]menu[A|type|label][C|li]legend[A][C|B]div[A][C]source[A|src|type|media][]audio[A|src|autobuffer|autoplay|loop|controls][source]video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]hr[A][]form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]fieldset[A|disabled|form|name][C|legend]label[A|form|for][B]input[A|type|accept|alt|autocomplete|autofocus|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]datalist[A][B|option]optgroup[A|disabled|label][option]option[A|disabled|selected|label|value][]textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]keygen[A|autofocus|challenge|disabled|form|keytype|name][]output[A|for|form|name][B]canvas[A|width|height][]map[A|name][B|C]area[A|shape|coords|href|alt|target|media|rel|ping|type][]mathml[A][]svg[A][]table[A|border][caption|colgroup|thead|tfoot|tbody|tr]caption[A][C]colgroup[A|span][col]col[A|span][]thead[A][tr]tfoot[A][tr]tbody[A][tr]tr[A][th|td]th[A|headers|rowspan|colspan|scope][B]td[A|headers|rowspan|colspan][C]wbr[A][]")}return i}function c(){var i=a.html4;if(!i){i=a.html4=h({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]")}return i}f.html.Schema=function(A){var u=this,s={},k={},j=[],D,y;var o,q,z,r,v,n,p={};function m(F,E,H){var G=A[F];if(!G){G=a[F];if(!G){G=e(E," ",e(E.toUpperCase()," "));G=f.extend(G,H);a[F]=G}}else{G=e(G,",",e(G.toUpperCase()," "))}return G}A=A||{};y=A.schema=="html5"?b():c();if(A.verify_html===false){A.valid_elements="*[*]"}if(A.valid_styles){D={};g(A.valid_styles,function(F,E){D[E]=f.explode(F)})}o=m("whitespace_elements","pre script noscript style textarea");q=m("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr");z=m("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr");r=m("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls");n=m("non_empty_elements","td th iframe video audio object",z);textBlockElementsMap=m("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure");v=m("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex samp option datalist select optgroup",textBlockElementsMap);function i(E){return new RegExp("^"+E.replace(/([?+*])/g,".$1")+"$")}function C(L){var K,G,Z,V,aa,F,I,U,X,Q,Y,ac,O,J,W,E,S,H,ab,ad,P,T,N=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,R=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,M=/[*?+]/;if(L){L=d(L);if(s["@"]){S=s["@"].attributes;H=s["@"].attributesOrder}for(K=0,G=L.length;K<G;K++){F=N.exec(L[K]);if(F){W=F[1];Q=F[2];E=F[3];X=F[4];O={};J=[];I={attributes:O,attributesOrder:J};if(W==="#"){I.paddEmpty=true}if(W==="-"){I.removeEmpty=true}if(S){for(ad in S){O[ad]=S[ad]}J.push.apply(J,H)}if(X){X=d(X,"|");for(Z=0,V=X.length;Z<V;Z++){F=R.exec(X[Z]);if(F){U={};ac=F[1];Y=F[2].replace(/::/g,":");W=F[3];T=F[4];if(ac==="!"){I.attributesRequired=I.attributesRequired||[];I.attributesRequired.push(Y);U.required=true}if(ac==="-"){delete O[Y];J.splice(f.inArray(J,Y),1);continue}if(W){if(W==="="){I.attributesDefault=I.attributesDefault||[];I.attributesDefault.push({name:Y,value:T});U.defaultValue=T}if(W===":"){I.attributesForced=I.attributesForced||[];I.attributesForced.push({name:Y,value:T});U.forcedValue=T}if(W==="<"){U.validValues=e(T,"?")}}if(M.test(Y)){I.attributePatterns=I.attributePatterns||[];U.pattern=i(Y);I.attributePatterns.push(U)}else{if(!O[Y]){J.push(Y)}O[Y]=U}}}}if(!S&&Q=="@"){S=O;H=J}if(E){I.outputName=Q;s[E]=I}if(M.test(Q)){I.pattern=i(Q);j.push(I)}else{s[Q]=I}}}}}function t(E){s={};j=[];C(E);g(y,function(G,F){k[F]=G.children})}function l(F){var E=/^(~)?(.+)$/;if(F){g(d(F),function(J){var H=E.exec(J),I=H[1]==="~",K=I?"span":"div",G=H[2];k[G]=k[K];p[G]=K;if(!I){v[G.toUpperCase()]={};v[G]={}}if(!s[G]){s[G]=s[K]}g(k,function(L,M){if(L[K]){L[G]=L[K]}})})}}function x(F){var E=/^([+\-]?)(\w+)\[([^\]]+)\]$/;if(F){g(d(F),function(J){var I=E.exec(J),G,H;if(I){H=I[1];if(H){G=k[I[2]]}else{G=k[I[2]]={"#comment":{}}}G=k[I[2]];g(d(I[3],"|"),function(K){if(H==="-"){delete G[K]}else{G[K]={}}})}})}}function B(E){var G=s[E],F;if(G){return G}F=j.length;while(F--){G=j[F];if(G.pattern.test(E)){return G}}}if(!A.valid_elements){g(y,function(F,E){s[E]={attributes:F.attributes,attributesOrder:F.attributesOrder};k[E]=F.children});if(A.schema!="html5"){g(d("strong/b,em/i"),function(E){E=d(E,"/");s[E[1]].outputName=E[0]})}s.img.attributesDefault=[{name:"alt",value:""}];g(d("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr,strong,em,b,i"),function(E){if(s[E]){s[E].removeEmpty=true}});g(d("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(E){s[E].paddEmpty=true})}else{t(A.valid_elements)}l(A.custom_elements);x(A.valid_children);C(A.extended_valid_elements);x("+ol[ul|ol],+ul[ul|ol]");if(A.invalid_elements){f.each(f.explode(A.invalid_elements),function(E){if(s[E]){delete s[E]}})}if(!B("span")){C("span[!data-mce-type|*]")}u.children=k;u.styles=D;u.getBoolAttrs=function(){return r};u.getBlockElements=function(){return v};u.getTextBlockElements=function(){return textBlockElementsMap};u.getShortEndedElements=function(){return z};u.getSelfClosingElements=function(){return q};u.getNonEmptyElements=function(){return n};u.getWhiteSpaceElements=function(){return o};u.isValidChild=function(E,G){var F=k[E];return !!(F&&F[G])};u.isValid=function(F,E){var H,G,I=B(F);if(I){if(E){if(I.attributes[E]){return true}H=I.attributePatterns;if(H){G=H.length;while(G--){if(H[G].pattern.test(F)){return true}}}}else{return true}}return false};u.getElementRule=B;u.getCustomElements=function(){return p};u.addValidElements=C;u.setValidElements=t;u.addCustomElements=l;u.addValidChildren=x;u.elements=s}})(tinymce);(function(a){a.html.SaxParser=function(c,e){var b=this,d=function(){};c=c||{};b.schema=e=e||new a.html.Schema();if(c.fix_self_closing!==false){c.fix_self_closing=true}a.each("comment cdata text start end pi doctype".split(" "),function(f){if(f){b[f]=c[f]||d}});b.parse=function(E){var n=this,g,G=0,I,B,A=[],N,Q,C,r,z,s,M,H,O,v,m,k,t,R,o,P,F,S,L,f,J,l,D,K,h,x=0,j=a.html.Entities.decode,y,q;function u(T){var V,U;V=A.length;while(V--){if(A[V].name===T){break}}if(V>=0){for(U=A.length-1;U>=V;U--){T=A[U];if(T.valid){n.end(T.name)}}A.length=V}}function p(U,T,Y,X,W){var Z,V;T=T.toLowerCase();Y=T in H?T:j(Y||X||W||"");if(v&&!z&&T.indexOf("data-mce-")!==0){Z=P[T];if(!Z&&F){V=F.length;while(V--){Z=F[V];if(Z.pattern.test(T)){break}}if(V===-1){Z=null}}if(!Z){return}if(Z.validValues&&!(Y in Z.validValues)){return}}N.map[T]=Y;N.push({name:T,value:Y})}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g");D=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g;K={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};M=e.getShortEndedElements();J=c.self_closing_elements||e.getSelfClosingElements();H=e.getBoolAttrs();v=c.validate;s=c.remove_internals;y=c.fix_self_closing;q=a.isIE;o=/^:/;while(g=l.exec(E)){if(G<g.index){n.text(j(E.substr(G,g.index-G)))}if(I=g[6]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}u(I)}else{if(I=g[7]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}O=I in M;if(y&&J[I]&&A.length>0&&A[A.length-1].name===I){u(I)}if(!v||(m=e.getElementRule(I))){k=true;if(v){P=m.attributes;F=m.attributePatterns}if(R=g[8]){z=R.indexOf("data-mce-type")!==-1;if(z&&s){k=false}N=[];N.map={};R.replace(D,p)}else{N=[];N.map={}}if(v&&!z){S=m.attributesRequired;L=m.attributesDefault;f=m.attributesForced;if(f){Q=f.length;while(Q--){t=f[Q];r=t.name;h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}if(L){Q=L.length;while(Q--){t=L[Q];r=t.name;if(!(r in N.map)){h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}}if(S){Q=S.length;while(Q--){if(S[Q] in N.map){break}}if(Q===-1){k=false}}if(N.map["data-mce-bogus"]){k=false}}if(k){n.start(I,N,O)}}else{k=false}if(B=K[I]){B.lastIndex=G=g.index+g[0].length;if(g=B.exec(E)){if(k){C=E.substr(G,g.index-G)}G=g.index+g[0].length}else{C=E.substr(G);G=E.length}if(k&&C.length>0){n.text(C,true)}if(k){n.end(I)}l.lastIndex=G;continue}if(!O){if(!R||R.indexOf("/")!=R.length-1){A.push({name:I,valid:k})}else{if(k){n.end(I)}}}}else{if(I=g[1]){n.comment(I)}else{if(I=g[2]){n.cdata(I)}else{if(I=g[3]){n.doctype(I)}else{if(I=g[4]){n.pi(I,g[5])}}}}}}G=g.index+g[0].length}if(G<E.length){n.text(j(E.substr(G)))}for(Q=A.length-1;Q>=0;Q--){I=A[Q];if(I.valid){n.end(I.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h<f;h++){j=m[h];if(j.name!=="id"){k[k.length]={name:j.name,value:j.value};k.map[j.name]=j.value}}n.attributes=k}n.value=g.value;n.shortEnded=g.shortEnded;return n},wrap:function(g){var f=this;f.parent.insert(g,f);g.append(f);return f},unwrap:function(){var f=this,h,g;for(h=f.firstChild;h;){g=h.next;f.insert(h,f,true);h=g}f.remove()},remove:function(){var f=this,h=f.parent,g=f.next,i=f.prev;if(h){if(h.firstChild===f){h.firstChild=g;if(g){g.prev=null}}else{i.next=g}if(h.lastChild===f){h.lastChild=i;if(i){i.next=null}}else{g.prev=i}f.parent=f.next=f.prev=null}return f},append:function(h){var f=this,g;if(h.parent){h.remove()}g=f.lastChild;if(g){g.next=h;h.prev=g;f.lastChild=h}else{f.lastChild=f.firstChild=h}h.parent=f;return h},insert:function(h,f,i){var g;if(h.parent){h.remove()}g=f.parent||this;if(i){if(f===g.firstChild){g.firstChild=h}else{f.prev.next=h}h.prev=f.prev;h.next=f;f.prev=h}else{if(f===g.lastChild){g.lastChild=h}else{f.next.prev=h}h.next=f.next;h.prev=f;f.next=h}h.parent=g;return h},getAll:function(g){var f=this,h,i=[];for(h=f.firstChild;h;h=a(h,f)){if(h.name===g){i.push(h)}}return i},empty:function(){var g=this,f,h,j;if(g.firstChild){f=[];for(j=g.firstChild;j;j=a(j,g)){f.push(j)}h=f.length;while(h--){j=f[h];j.parent=j.firstChild=j.lastChild=j.next=j.prev=null}}g.firstChild=g.lastChild=null;return g},isEmpty:function(k){var f=this,j=f.firstChild,h,g;if(j){do{if(j.type===1){if(j.attributes.map["data-mce-bogus"]){continue}if(k[j.name]){return false}h=j.attributes.length;while(h--){g=j.attributes[h].name;if(g==="name"||g.indexOf("data-mce-")===0){return false}}}if(j.type===8){return false}if((j.type===3&&!c.test(j.value))){return false}}while(j=a(j,f))}return true},walk:function(f){return a(this,null,f)}});d.extend(b,{create:function(g,f){var i,h;i=new b(g,e[g]||1);if(f){for(h in f){i.attr(h,f[h])}}return i}});d.html.Node=b})(tinymce);(function(b){var a=b.html.Node;b.html.DomParser=function(g,h){var f=this,e={},d=[],i={},c={};g=g||{};g.validate="validate" in g?g.validate:true;g.root_name=g.root_name||"body";f.schema=h=h||new b.html.Schema();function j(n){var p,q,y,x,A,o,r,l,u,v,k,t,m,z,s;t=b.makeMap("tr,td,th,tbody,thead,tfoot,table");k=h.getNonEmptyElements();m=h.getTextBlockElements();for(p=0;p<n.length;p++){q=n[p];if(!q.parent||q.fixed){continue}if(m[q.name]&&q.parent.name=="li"){z=q.next;while(z){if(m[z.name]){z.name="li";z.fixed=true;q.parent.insert(z,q.parent)}else{break}z=z.next}q.unwrap(q);continue}x=[q];for(y=q.parent;y&&!h.isValidChild(y.name,q.name)&&!t[y.name];y=y.parent){x.push(y)}if(y&&x.length>1){x.reverse();A=o=f.filterNode(x[0].clone());for(u=0;u<x.length-1;u++){if(h.isValidChild(o.name,x[u].name)){r=f.filterNode(x[u].clone());o.append(r)}else{r=o}for(l=x[u].firstChild;l&&l!=x[u+1];){s=l.next;r.append(l);l=s}o=r}if(!A.isEmpty(k)){y.insert(A,x[0],true);y.insert(q,A)}else{y.insert(q,x[0],true)}y=x[0];if(y.isEmpty(k)||y.firstChild===y.lastChild&&y.firstChild.name==="br"){y.empty().remove()}}else{if(q.parent){if(q.name==="li"){z=q.prev;if(z&&(z.name==="ul"||z.name==="ul")){z.append(q);continue}z=q.next;if(z&&(z.name==="ul"||z.name==="ul")){z.insert(q,z.firstChild,true);continue}q.wrap(f.filterNode(new a("ul",1)));continue}if(h.isValidChild(q.parent.name,"div")&&h.isValidChild("div",q.name)){q.wrap(f.filterNode(new a("div",1)))}else{if(q.name==="style"||q.name==="script"){q.empty().remove()}else{q.unwrap()}}}}}}f.filterNode=function(m){var l,k,n;if(k in e){n=i[k];if(n){n.push(m)}else{i[k]=[m]}}l=d.length;while(l--){k=d[l].name;if(k in m.attributes.map){n=c[k];if(n){n.push(m)}else{c[k]=[m]}}}return m};f.addNodeFilter=function(k,l){b.each(b.explode(k),function(m){var n=e[m];if(!n){e[m]=n=[]}n.push(l)})};f.addAttributeFilter=function(k,l){b.each(b.explode(k),function(m){var n;for(n=0;n<d.length;n++){if(d[n].name===m){d[n].callbacks.push(l);return}}d.push({name:m,callbacks:[l]})})};f.parse=function(v,m){var n,J,B,A,D,C,x,r,F,N,z,o,E,M=[],L,t,k,y,s,p,u,q;m=m||{};i={};c={};o=b.extend(b.makeMap("script,style,head,html,body,title,meta,param"),h.getBlockElements());u=h.getNonEmptyElements();p=h.children;z=g.validate;q="forced_root_block" in m?m.forced_root_block:g.forced_root_block;s=h.getWhiteSpaceElements();E=/^[ \t\r\n]+/;t=/[ \t\r\n]+$/;k=/[ \t\r\n]+/g;y=/^[ \t\r\n]+$/;function G(){var O=J.firstChild,l,P;while(O){l=O.next;if(O.type==3||(O.type==1&&O.name!=="p"&&!o[O.name]&&!O.attr("data-mce-type"))){if(!P){P=K(q,1);J.insert(P,O);P.append(O)}else{P.append(O)}}else{P=null}O=l}}function K(l,O){var P=new a(l,O),Q;if(l in e){Q=i[l];if(Q){Q.push(P)}else{i[l]=[P]}}return P}function I(P){var Q,l,O;for(Q=P.prev;Q&&Q.type===3;){l=Q.value.replace(t,"");if(l.length>0){Q.value=l;Q=Q.prev}else{O=Q.prev;Q.remove();Q=O}}}function H(O){var P,l={};for(P in O){if(P!=="li"&&P!="p"){l[P]=O[P]}}return l}n=new b.html.SaxParser({validate:z,self_closing_elements:H(h.getSelfClosingElements()),cdata:function(l){B.append(K("#cdata",4)).value=l},text:function(P,l){var O;if(!L){P=P.replace(k," ");if(B.lastChild&&o[B.lastChild.name]){P=P.replace(E,"")}}if(P.length!==0){O=K("#text",3);O.raw=!!l;B.append(O).value=P}},comment:function(l){B.append(K("#comment",8)).value=l},pi:function(l,O){B.append(K(l,7)).value=O;I(B)},doctype:function(O){var l;l=B.append(K("#doctype",10));l.value=O;I(B)},start:function(l,W,P){var U,R,Q,O,S,X,V,T;Q=z?h.getElementRule(l):{};if(Q){U=K(Q.outputName||l,1);U.attributes=W;U.shortEnded=P;B.append(U);T=p[B.name];if(T&&p[U.name]&&!T[U.name]){M.push(U)}R=d.length;while(R--){S=d[R].name;if(S in W.map){F=c[S];if(F){F.push(U)}else{c[S]=[U]}}}if(o[l]){I(U)}if(!P){B=U}if(!L&&s[l]){L=true}}},end:function(l){var S,P,R,O,Q;P=z?h.getElementRule(l):{};if(P){if(o[l]){if(!L){S=B.firstChild;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R;S=S.next}else{O=S.next;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.next;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}S=B.lastChild;if(S&&S.type===3){R=S.value.replace(t,"");if(R.length>0){S.value=R;S=S.prev}else{O=S.prev;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.prev;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}}}if(L&&s[l]){L=false}if(P.removeEmpty||P.paddEmpty){if(B.isEmpty(u)){if(P.paddEmpty){B.empty().append(new a("#text","3")).value="\u00a0"}else{if(!B.attributes.map.name&&!B.attributes.map.id){Q=B.parent;B.empty().remove();B=Q;return}}}}B=B.parent}}},h);J=B=new a(m.context||g.root_name,11);n.parse(v);if(z&&M.length){if(!m.context){j(M)}else{m.invalid=true}}if(q&&J.name=="body"){G()}if(!m.invalid){for(N in i){F=e[N];A=i[N];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(D=0,C=F.length;D<C;D++){F[D](A,N,m)}}for(D=0,C=d.length;D<C;D++){F=d[D];if(F.name in c){A=c[F.name];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(x=0,r=F.callbacks.length;x<r;x++){F.callbacks[x](A,F.name,m)}}}}return J};if(g.remove_trailing_brs){f.addNodeFilter("br",function(n,m){var r,q=n.length,o,v=b.extend({},h.getBlockElements()),k=h.getNonEmptyElements(),t,s,p,u;v.body=1;for(r=0;r<q;r++){o=n[r];t=o.parent;if(v[o.parent.name]&&o===t.lastChild){p=o.prev;while(p){u=p.name;if(u!=="span"||p.attr("data-mce-type")!=="bookmark"){if(u!=="br"){break}if(u==="br"){o=null;break}}p=p.prev}if(o){o.remove();if(t.isEmpty(k)){elementRule=h.getElementRule(t.name);if(elementRule){if(elementRule.removeEmpty){t.remove()}else{if(elementRule.paddEmpty){t.empty().append(new b.html.Node("#text",3)).value="\u00a0"}}}}}}else{s=o;while(t.firstChild===s&&t.lastChild===s){s=t;if(v[t.name]){break}t=t.parent}if(s===t){textNode=new b.html.Node("#text",3);textNode.value="\u00a0";o.replace(textNode)}}}})}if(!g.allow_html_in_named_anchor){f.addAttributeFilter("id,name",function(k,l){var n=k.length,p,m,o,q;while(n--){q=k[n];if(q.name==="a"&&q.firstChild&&!q.attr("href")){o=q.parent;p=q.lastChild;do{m=p.prev;o.insert(p,q);p=m}while(p)}}})}}})(tinymce);tinymce.html.Writer=function(e){var c=[],a,b,d,f,g;e=e||{};a=e.indent;b=tinymce.makeMap(e.indent_before||"");d=tinymce.makeMap(e.indent_after||"");f=tinymce.html.Entities.getEncodeFunc(e.entity_encoding||"raw",e.entities);g=e.element_format=="html";return{start:function(m,k,p){var n,j,h,o;if(a&&b[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n<j;n++){h=k[n];c.push(" ",h.name,'="',f(h.value,true),'"')}}if(!p||g){c[c.length]=">"}else{c[c.length]=" />"}if(p&&a&&d[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("</",h,">");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("<![CDATA[",h,"]]>")},comment:function(h){c.push("<!--",h,"-->")},pi:function(h,i){if(i){c.push("<?",h," ",i,"?>")}else{c.push("<?",h,"?>")}if(a){c.push("\n")}},doctype:function(h){c.push("<!DOCTYPE",h,">",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n<m;n++){r=q.attributesOrder[n];if(r in s.map){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}for(n=0,m=s.length;n<m;n++){r=s[n].name;if(!(r in u.map)){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}s=u}e.start(k.name,s,o);if(!o){if((k=k.firstChild)){do{f(k)}while(k=k.next)}e.end(j)}}else{t(k)}}if(h.type==1&&!c.inner){f(h)}else{g[11](h)}return e.getContent()}}})(tinymce);tinymce.dom={};(function(b,h){var g=!!document.addEventListener;function c(k,j,l,i){if(k.addEventListener){k.addEventListener(j,l,i||false)}else{if(k.attachEvent){k.attachEvent("on"+j,l)}}}function e(k,j,l,i){if(k.removeEventListener){k.removeEventListener(j,l,i||false)}else{if(k.detachEvent){k.detachEvent("on"+j,l)}}}function a(n,l){var i,k=l||{};function j(){return false}function m(){return true}for(i in n){if(i!=="layerX"&&i!=="layerY"){k[i]=n[i]}}if(!k.target){k.target=k.srcElement||document}k.preventDefault=function(){k.isDefaultPrevented=m;if(n){if(n.preventDefault){n.preventDefault()}else{n.returnValue=false}}};k.stopPropagation=function(){k.isPropagationStopped=m;if(n){if(n.stopPropagation){n.stopPropagation()}else{n.cancelBubble=true}}};k.stopImmediatePropagation=function(){k.isImmediatePropagationStopped=m;k.stopPropagation()};if(!k.isDefaultPrevented){k.isDefaultPrevented=j;k.isPropagationStopped=j;k.isImmediatePropagationStopped=j}return k}function d(m,n,l){var k=m.document,j={type:"ready"};function i(){if(!l.domLoaded){l.domLoaded=true;n(j)}}if(k.readyState=="complete"){i();return}if(g){c(m,"DOMContentLoaded",i)}else{c(k,"readystatechange",function(){if(k.readyState==="complete"){e(k,"readystatechange",arguments.callee);i()}});if(k.documentElement.doScroll&&m===m.top){(function(){try{k.documentElement.doScroll("left")}catch(o){setTimeout(arguments.callee,0);return}i()})()}}c(m,"load",i)}function f(k){var q=this,p={},i,o,n,m,l;m="onmouseenter" in document.documentElement;n="onfocusin" in document.documentElement;l={mouseenter:"mouseover",mouseleave:"mouseout"};i=1;q.domLoaded=false;q.events=p;function j(t,x){var s,u,r,v;s=p[x][t.type];if(s){for(u=0,r=s.length;u<r;u++){v=s[u];if(v&&v.func.call(v.scope,t)===false){t.preventDefault()}if(t.isImmediatePropagationStopped()){return}}}}q.bind=function(x,A,D,E){var s,t,u,r,B,z,C,v=window;function y(F){j(a(F||v.event),s)}if(!x||x.nodeType===3||x.nodeType===8){return}if(!x[h]){s=i++;x[h]=s;p[s]={}}else{s=x[h];if(!p[s]){p[s]={}}}E=E||x;A=A.split(" ");u=A.length;while(u--){r=A[u];z=y;B=C=false;if(r==="DOMContentLoaded"){r="ready"}if((q.domLoaded||x.readyState=="complete")&&r==="ready"){q.domLoaded=true;D.call(E,a({type:r}));continue}if(!m){B=l[r];if(B){z=function(F){var H,G;H=F.currentTarget;G=F.relatedTarget;if(G&&H.contains){G=H.contains(G)}else{while(G&&G!==H){G=G.parentNode}}if(!G){F=a(F||v.event);F.type=F.type==="mouseout"?"mouseleave":"mouseenter";F.target=H;j(F,s)}}}}if(!n&&(r==="focusin"||r==="focusout")){C=true;B=r==="focusin"?"focus":"blur";z=function(F){F=a(F||v.event);F.type=F.type==="focus"?"focusin":"focusout";j(F,s)}}t=p[s][r];if(!t){p[s][r]=t=[{func:D,scope:E}];t.fakeName=B;t.capture=C;t.nativeHandler=z;if(!g){t.proxyHandler=k(s)}if(r==="ready"){d(x,z,q)}else{c(x,B||r,g?z:t.proxyHandler,C)}}else{t.push({func:D,scope:E})}}x=t=0;return D};q.unbind=function(x,z,A){var s,u,v,B,r,t;if(!x||x.nodeType===3||x.nodeType===8){return q}s=x[h];if(s){t=p[s];if(z){z=z.split(" ");v=z.length;while(v--){r=z[v];u=t[r];if(u){if(A){B=u.length;while(B--){if(u[B].func===A){u.splice(B,1)}}}if(!A||u.length===0){delete t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}}}}else{for(r in t){u=t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}t={}}for(r in t){return q}delete p[s];try{delete x[h]}catch(y){x[h]=null}}return q};q.fire=function(u,s,r){var v,t;if(!u||u.nodeType===3||u.nodeType===8){return q}t=a(null,r);t.type=s;do{v=u[h];if(v){j(t,v)}u=u.parentNode||u.ownerDocument||u.defaultView||u.parentWindow}while(u&&!t.isPropagationStopped());return q};q.clean=function(u){var s,r,t=q.unbind;if(!u||u.nodeType===3||u.nodeType===8){return q}if(u[h]){t(u)}if(!u.getElementsByTagName){u=u.document}if(u&&u.getElementsByTagName){t(u);r=u.getElementsByTagName("*");s=r.length;while(s--){u=r[s];if(u[h]){t(u)}}}return q};q.callNativeHandler=function(s,r){if(p){p[s][r.type].nativeHandler(r)}};q.destory=function(){p={}};q.add=function(v,s,u,t){if(typeof(v)==="string"){v=document.getElementById(v)}if(v&&v instanceof Array){var r=v.length;while(r--){q.add(v[r],s,u,t)}return}if(s==="init"){s="ready"}return q.bind(v,s instanceof Array?s.join(" "):s,u,t)};q.remove=function(v,s,u,t){if(!v){return q}if(typeof(v)==="string"){v=document.getElementById(v)}if(v instanceof Array){var r=v.length;while(r--){q.remove(v[r],s,u,t)}return q}return q.unbind(v,s instanceof Array?s.join(" "):s,u)};q.clear=function(r){if(typeof(r)==="string"){r=document.getElementById(r)}return q.clean(r)};q.cancel=function(r){if(r){q.prevent(r);q.stop(r)}return false};q.prevent=function(r){if(!r.preventDefault){r=a(r)}r.preventDefault();return false};q.stop=function(r){if(!r.stopPropagation){r=a(r)}r.stopPropagation();return false}}b.EventUtils=f;b.Event=new f(function(i){return function(j){tinymce.dom.Event.callNativeHandler(i,j)}});b.Event.bind(window,"ready",function(){});b=0})(tinymce.dom,"data-mce-expando");tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(e){var g=e.each,d=e.is,f=e.isWebKit,b=e.isIE,h=e.html.Entities,c=/^([a-z0-9],?)+$/i,a=/^[ \t\r\n]*$/;e.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(o,l){var k=this,i,j,n;k.doc=o;k.win=window;k.files={};k.cssFlicker=false;k.counter=0;k.stdMode=!e.isIE||o.documentMode>=8;k.boxModel=!e.isIE||o.compatMode=="CSS1Compat"||k.stdMode;k.hasOuterHTML="outerHTML" in o.createElement("a");k.settings=l=e.extend({keep_values:false,hex_colors:1},l);k.schema=l.schema;k.styles=new e.html.Styles({url_converter:l.url_converter,url_converter_scope:l.url_converter_scope},l.schema);if(e.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(m){k.cssFlicker=true}}k.fixDoc(o);k.events=l.ownEvents?new e.dom.EventUtils(l.proxy):e.dom.Event;e.addUnload(k.destroy,k);n=l.schema?l.schema.getBlockElements():{};k.isBlock=function(q){var p=q.nodeType;if(p){return !!(p===1&&n[q.nodeName])}return !!n[q]}},fixDoc:function(k){var j=this.settings,i;if(b&&j.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(l){k.createElement(l)});for(i in j.schema.getCustomElements()){k.createElement(i)}}},clone:function(k,i){var j=this,m,l;if(!b||k.nodeType!==1||i){return k.cloneNode(i)}l=j.doc;if(!i){m=l.createElement(k.nodeName);g(j.getAttribs(k),function(n){j.setAttrib(m,n.nodeName,j.getAttrib(k,n.nodeName))});return m}return m.firstChild},getRoot:function(){var i=this,j=i.settings;return(j&&i.get(j.root_element))||i.doc.body},getViewPort:function(j){var k,i;j=!j?this.win:j;k=j.document;i=this.boxModel?k.documentElement:k.body;return{x:j.pageXOffset||i.scrollLeft,y:j.pageYOffset||i.scrollTop,w:j.innerWidth||i.clientWidth,h:j.innerHeight||i.clientHeight}},getRect:function(l){var k,i=this,j;l=i.get(l);k=i.getPos(l);j=i.getSize(l);return{x:k.x,y:k.y,w:j.w,h:j.h}},getSize:function(l){var j=this,i,k;l=j.get(l);i=j.getStyle(l,"width");k=j.getStyle(l,"height");if(i.indexOf("px")===-1){i=0}if(k.indexOf("px")===-1){k=0}return{w:parseInt(i,10)||l.offsetWidth||l.clientWidth,h:parseInt(k,10)||l.offsetHeight||l.clientHeight}},getParent:function(k,j,i){return this.getParents(k,j,i,false)},getParents:function(s,m,k,q){var j=this,i,l=j.settings,p=[];s=j.get(s);q=q===undefined;if(l.strict_root){k=k||j.getRoot()}if(d(m,"string")){i=m;if(m==="*"){m=function(o){return o.nodeType==1}}else{m=function(o){return j.is(o,i)}}}while(s){if(s==k||!s.nodeType||s.nodeType===9){break}if(!m||m(s)){if(q){p.push(s)}else{return s}}s=s.parentNode}return q?p:null},get:function(i){var j;if(i&&this.doc&&typeof(i)=="string"){j=i;i=this.doc.getElementById(i);if(i&&i.id!==j){return this.doc.getElementsByName(j)[1]}}return i},getNext:function(j,i){return this._findSib(j,i,"nextSibling")},getPrev:function(j,i){return this._findSib(j,i,"previousSibling")},select:function(k,j){var i=this;return e.dom.Sizzle(k,i.get(j)||i.get(i.settings.root_element)||i.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(c.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return e.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(l,o,i,k,m){var j=this;return this.run(l,function(r){var q,n;q=d(o,"string")?j.doc.createElement(o):o;j.setAttribs(q,i);if(k){if(k.nodeType){q.appendChild(k)}else{j.setHTML(q,k)}}return !m?r.appendChild(q):q})},create:function(k,i,j){return this.add(this.doc.createElement(k),k,i,j,1)},createHTML:function(q,i,m){var p="",l=this,j;p+="<"+q;for(j in i){if(i.hasOwnProperty(j)){p+=" "+j+'="'+l.encode(i[j])+'"'}}if(typeof(m)!="undefined"){return p+">"+m+"</"+q+">"}return p+" />"},remove:function(i,j){return this.run(i,function(l){var m,k=l.parentNode;if(!k){return null}if(j){while(m=l.firstChild){if(!e.isIE||m.nodeType!==3||m.nodeValue){k.insertBefore(m,l)}else{l.removeChild(m)}}}return k.removeChild(l)})},setStyle:function(l,i,j){var k=this;return k.run(l,function(o){var n,m;n=o.style;i=i.replace(/-(\D)/g,function(q,p){return p.toUpperCase()});if(k.pixelStyles.test(i)&&(e.is(j,"number")||/^[\-0-9\.]+$/.test(j))){j+="px"}switch(i){case"opacity":if(b){n.filter=j===""?"":"alpha(opacity="+(j*100)+")";if(!l.currentStyle||!l.currentStyle.hasLayout){n.display="inline-block"}}n[i]=n["-moz-opacity"]=n["-khtml-opacity"]=j||"";break;case"float":b?n.styleFloat=j:n.cssFloat=j;break;default:n[i]=j||""}if(k.settings.update_styles){k.setAttrib(o,"data-mce-style")}})},getStyle:function(l,i,k){l=this.get(l);if(!l){return}if(this.doc.defaultView&&k){i=i.replace(/[A-Z]/g,function(m){return"-"+m});try{return this.doc.defaultView.getComputedStyle(l,null).getPropertyValue(i)}catch(j){return null}}i=i.replace(/-(\D)/g,function(n,m){return m.toUpperCase()});if(i=="float"){i=b?"styleFloat":"cssFloat"}if(l.currentStyle&&k){return l.currentStyle[i]}return l.style?l.style[i]:undefined},setStyles:function(l,m){var j=this,k=j.settings,i;i=k.update_styles;k.update_styles=0;g(m,function(o,p){j.setStyle(l,p,o)});k.update_styles=i;if(k.update_styles){j.setAttrib(l,k.cssText)}},removeAllAttribs:function(i){return this.run(i,function(l){var k,j=l.attributes;for(k=j.length-1;k>=0;k--){l.removeAttributeNode(j.item(k))}})},setAttrib:function(k,l,i){var j=this;if(!k||!l){return}if(j.settings.strict){l=l.toLowerCase()}return this.run(k,function(p){var o=j.settings;var m=p.getAttribute(l);if(i!==null){switch(l){case"style":if(!d(i,"string")){g(i,function(q,r){j.setStyle(p,r,q)});return}if(o.keep_values){if(i&&!j._isRes(i)){p.setAttribute("data-mce-style",i,2)}else{p.removeAttribute("data-mce-style",2)}}p.style.cssText=i;break;case"class":p.className=i||"";break;case"src":case"href":if(o.keep_values){if(o.url_converter){i=o.url_converter.call(o.url_converter_scope||j,i,l,p)}j.setAttrib(p,"data-mce-"+l,i,2)}break;case"shape":p.setAttribute("data-mce-style",i);break}}if(d(i)&&i!==null&&i.length!==0){p.setAttribute(l,""+i,2)}else{p.removeAttribute(l,2)}if(tinyMCE.activeEditor&&m!=i){var n=tinyMCE.activeEditor;n.onSetAttrib.dispatch(n,p,l,i)}})},setAttribs:function(j,k){var i=this;return this.run(j,function(l){g(k,function(m,o){i.setAttrib(l,o,m)})})},getAttrib:function(m,o,k){var i,j=this,l;m=j.get(m);if(!m||m.nodeType!==1){return k===l?false:k}if(!d(k)){k=""}if(/^(src|href|style|coords|shape)$/.test(o)){i=m.getAttribute("data-mce-"+o);if(i){return i}}if(b&&j.props[o]){i=m[j.props[o]];i=i&&i.nodeValue?i.nodeValue:i}if(!i){i=m.getAttribute(o,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(o)){if(m[j.props[o]]===true&&i===""){return o}return i?o:""}if(m.nodeName==="FORM"&&m.getAttributeNode(o)){return m.getAttributeNode(o).nodeValue}if(o==="style"){i=i||m.style.cssText;if(i){i=j.serializeStyle(j.parseStyle(i),m.nodeName);if(j.settings.keep_values&&!j._isRes(i)){m.setAttribute("data-mce-style",i)}}}if(f&&o==="class"&&i){i=i.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(o){case"rowspan":case"colspan":if(i===1){i=""}break;case"size":if(i==="+0"||i===20||i===0){i=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(i===0){i=""}break;case"hspace":if(i===-1){i=""}break;case"maxlength":case"tabindex":if(i===32768||i===2147483647||i==="32768"){i=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(i===65535){return o}return k;case"shape":i=i.toLowerCase();break;default:if(o.indexOf("on")===0&&i){i=e._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+i)}}}return(i!==l&&i!==null&&i!=="")?""+i:k},getPos:function(q,l){var j=this,i=0,p=0,m,o=j.doc,k;q=j.get(q);l=l||o.body;if(q){if(q.getBoundingClientRect){q=q.getBoundingClientRect();m=j.boxModel?o.documentElement:o.body;i=q.left+(o.documentElement.scrollLeft||o.body.scrollLeft)-m.clientTop;p=q.top+(o.documentElement.scrollTop||o.body.scrollTop)-m.clientLeft;return{x:i,y:p}}k=q;while(k&&k!=l&&k.nodeType){i+=k.offsetLeft||0;p+=k.offsetTop||0;k=k.offsetParent}k=q.parentNode;while(k&&k!=l&&k.nodeType){i-=k.scrollLeft||0;p-=k.scrollTop||0;k=k.parentNode}}return{x:i,y:p}},parseStyle:function(i){return this.styles.parse(i)},serializeStyle:function(j,i){return this.styles.serialize(j,i)},addStyle:function(j){var k=this.doc,i;styleElm=k.getElementById("mceDefaultStyles");if(!styleElm){styleElm=k.createElement("style"),styleElm.id="mceDefaultStyles";styleElm.type="text/css";i=k.getElementsByTagName("head")[0];if(i.firstChild){i.insertBefore(styleElm,i.firstChild)}else{i.appendChild(styleElm)}}if(styleElm.styleSheet){styleElm.styleSheet.cssText+=j}else{styleElm.appendChild(k.createTextNode(j))}},loadCSS:function(i){var k=this,l=k.doc,j;if(!i){i=""}j=l.getElementsByTagName("head")[0];g(i.split(","),function(m){var n;if(k.files[m]){return}k.files[m]=true;n=k.create("link",{rel:"stylesheet",href:e._addVer(m)});if(b&&l.documentMode&&l.recalc){n.onload=function(){if(l.recalc){l.recalc()}n.onload=null}}j.appendChild(n)})},addClass:function(i,j){return this.run(i,function(k){var l;if(!j){return 0}if(this.hasClass(k,j)){return k.className}l=this.removeClass(k,j);return k.className=(l!=""?(l+" "):"")+j})},removeClass:function(k,l){var i=this,j;return i.run(k,function(n){var m;if(i.hasClass(n,l)){if(!j){j=new RegExp("(^|\\s+)"+l+"(\\s+|$)","g")}m=n.className.replace(j," ");m=e.trim(m!=" "?m:"");n.className=m;if(!m){n.removeAttribute("class");n.removeAttribute("className")}return m}return n.className})},hasClass:function(j,i){j=this.get(j);if(!j||!i){return false}return(" "+j.className+" ").indexOf(" "+i+" ")!==-1},show:function(i){return this.setStyle(i,"display","block")},hide:function(i){return this.setStyle(i,"display","none")},isHidden:function(i){i=this.get(i);return !i||i.style.display=="none"||this.getStyle(i,"display")=="none"},uniqueId:function(i){return(!i?"mce_":i)+(this.counter++)},setHTML:function(k,j){var i=this;return i.run(k,function(m){if(b){while(m.firstChild){m.removeChild(m.firstChild)}try{m.innerHTML="<br />"+j;m.removeChild(m.firstChild)}catch(l){var n=i.create("div");n.innerHTML="<br />"+j;g(e.grep(n.childNodes),function(p,o){if(o&&m.canHaveHTML){m.appendChild(p)}})}}else{m.innerHTML=j}return j})},getOuterHTML:function(k){var j,i=this;k=i.get(k);if(!k){return null}if(k.nodeType===1&&i.hasOuterHTML){return k.outerHTML}j=(k.ownerDocument||i.doc).createElement("body");j.appendChild(k.cloneNode(true));return j.innerHTML},setOuterHTML:function(l,j,m){var i=this;function k(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){i.insertAfter(s.cloneNode(true),p);s=s.previousSibling}i.remove(p)}return this.run(l,function(o){o=i.get(o);if(o.nodeType==1){m=m||o.ownerDocument||i.doc;if(b){try{if(b&&o.nodeType==1){o.outerHTML=j}else{k(o,j,m)}}catch(n){k(o,j,m)}}else{k(o,j,m)}}})},decode:h.decode,encode:h.encodeAllRaw,insertAfter:function(i,j){j=this.get(j);return this.run(i,function(l){var k,m;k=j.parentNode;m=j.nextSibling;if(m){k.insertBefore(l,m)}else{k.appendChild(l)}return l})},replace:function(m,l,i){var j=this;if(d(l,"array")){m=m.cloneNode(true)}return j.run(l,function(k){if(i){g(e.grep(k.childNodes),function(n){m.appendChild(n)})}return k.parentNode.replaceChild(m,k)})},rename:function(l,i){var k=this,j;if(l.nodeName!=i.toUpperCase()){j=k.create(i);g(k.getAttribs(l),function(m){k.setAttrib(j,m.nodeName,k.getAttrib(l,m.nodeName))});k.replace(j,l,1)}return j||l},findCommonAncestor:function(k,i){var l=k,j;while(l){j=i;while(j&&l!=j){j=j.parentNode}if(l==j){break}l=l.parentNode}if(!l&&k.ownerDocument){return k.ownerDocument.documentElement}return l},toHex:function(i){var k=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(i);function j(l){l=parseInt(l,10).toString(16);return l.length>1?l:"0"+l}if(k){i="#"+j(k[1])+j(k[2])+j(k[3]);return i}return i},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(i){g(i.imports,function(s){q(s)});g(i.cssRules||i.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){g(s.selectorText.split(","),function(r){r=r.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(r)||!/\.[\w\-]+$/.test(r)){return}l=r;r=e._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",r);if(p&&!(r=p(r,l))){return}if(!o[r]){j.push({"class":r});o[r]=1}})}break;case 3:q(s.styleSheet);break}})}try{g(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(l,k,j){var i=this,m;if(i.doc&&typeof(l)==="string"){l=i.get(l)}if(!l){return false}j=j||this;if(!l.nodeType&&(l.length||l.length===0)){m=[];g(l,function(o,n){if(o){if(typeof(o)=="string"){o=i.doc.getElementById(o)}m.push(k.call(j,o,n))}});return m}return k.call(j,l)},getAttribs:function(j){var i;j=this.get(j);if(!j){return[]}if(b){i=[];if(j.nodeName=="OBJECT"){return j.attributes}if(j.nodeName==="OPTION"&&this.getAttrib(j,"selected")){i.push({specified:1,nodeName:"selected"})}j.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(k){i.push({specified:1,nodeName:k})});return i}return j.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p=0;m=m.firstChild;if(m){j=new e.dom.TreeWalker(m,m.parentNode);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){if(l==="br"){p++;continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if(q==8){return false}if((q===3&&!a.test(m.nodeValue))){return false}}while(m=j.next())}return p<=1},destroy:function(j){var i=this;i.win=i.doc=i.root=i.events=i.frag=null;if(!j){e.removeUnload(i.destroy)}},createRng:function(){var i=this.doc;return i.createRange?i.createRange():new e.dom.Range(this)},nodeIndex:function(m,n){var i=0,k,l,j;if(m){for(k=m.nodeType,m=m.previousSibling,l=m;m;m=m.previousSibling){j=m.nodeType;if(n&&j==3){if(j==k||!m.nodeValue.length){continue}}i++;k=j}}return i},split:function(m,l,p){var q=this,i=q.createRng(),n,k,o;function j(v){var t,s=v.childNodes,u=v.nodeType;function x(A){var z=A.previousSibling&&A.previousSibling.nodeName=="SPAN";var y=A.nextSibling&&A.nextSibling.nodeName=="SPAN";return z&&y}if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=s.length-1;t>=0;t--){j(s[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){var r=e.trim(v.nodeValue).length;if(!q.isBlock(v.parentNode)||r>0||r===0&&x(v)){return}}else{if(u==1){s=v.childNodes;if(s.length==1&&s[0]&&s[0].nodeType==1&&s[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(s[0],v)}if(s.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}q.remove(v)}return v}if(m&&l){i.setStart(m.parentNode,q.nodeIndex(m));i.setEnd(l.parentNode,q.nodeIndex(l));n=i.extractContents();i=q.createRng();i.setStart(l.parentNode,q.nodeIndex(l)+1);i.setEnd(m.parentNode,q.nodeIndex(m)+1);k=i.extractContents();o=m.parentNode;o.insertBefore(j(n),m);if(p){o.replaceChild(p,l)}else{o.insertBefore(l,m)}o.insertBefore(j(k),m);q.remove(m);return p||l}},bind:function(l,i,k,j){return this.events.add(l,i,k,j||this)},unbind:function(k,i,j){return this.events.remove(k,i,j)},fire:function(k,j,i){return this.events.fire(k,j,i)},getContentEditable:function(j){var i;if(j.nodeType!=1){return null}i=j.getAttribute("data-mce-contenteditable");if(i&&i!=="inherit"){return i}return j.contentEditable!=="inherit"?j.contentEditable:null},_findSib:function(l,i,j){var k=this,m=i;if(l){if(d(m,"string")){m=function(n){return k.is(n,i)}}for(l=l[j];l;l=l[j]){if(m(l)){return l}}}return null},_isRes:function(i){return/^(top|left|bottom|right|width|height)/i.test(i)||/;\s*(top|left|bottom|right|width|height)/i.test(i)}});e.DOM=new e.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var O=this,e=c.doc,U=0,F=1,j=2,E=true,S=false,W="startOffset",h="startContainer",Q="endContainer",A="endOffset",k=tinymce.extend,n=c.nodeIndex;k(O,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:E,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:J,setEndBefore:K,setEndAfter:u,collapse:B,selectNode:y,selectNodeContents:G,compareBoundaryPoints:v,deleteContents:p,extractContents:I,cloneContents:d,insertNode:D,surroundContents:N,cloneRange:L,toStringIE:T});function x(){return e.createDocumentFragment()}function q(X,t){C(E,X,t)}function s(X,t){C(S,X,t)}function g(t){q(t.parentNode,n(t))}function J(t){q(t.parentNode,n(t)+1)}function K(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function B(t){if(t){O[Q]=O[h];O[A]=O[W]}else{O[h]=O[Q];O[W]=O[A]}O.collapsed=E}function y(t){g(t);u(t)}function G(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(aa,t){var ad=O[h],Y=O[W],ac=O[Q],X=O[A],ab=t.startContainer,af=t.startOffset,Z=t.endContainer,ae=t.endOffset;if(aa===0){return H(ad,Y,ab,af)}if(aa===1){return H(ac,X,ab,af)}if(aa===2){return H(ac,X,Z,ae)}if(aa===3){return H(ad,Y,Z,ae)}}function p(){l(j)}function I(){return l(U)}function d(){return l(F)}function D(aa){var X=this[h],t=this[W],Z,Y;if((X.nodeType===3||X.nodeType===4)&&X.nodeValue){if(!t){X.parentNode.insertBefore(aa,X)}else{if(t>=X.nodeValue.length){c.insertAfter(aa,X)}else{Z=X.splitText(t);X.parentNode.insertBefore(aa,Z)}}}else{if(X.childNodes.length>0){Y=X.childNodes[t]}if(Y){X.insertBefore(aa,Y)}else{X.appendChild(aa)}}}function N(X){var t=O.extractContents();O.insertNode(X);X.appendChild(t);O.selectNode(X)}function L(){return k(new b(c),{startContainer:O[h],startOffset:O[W],endContainer:O[Q],endOffset:O[A],collapsed:O.collapsed,commonAncestorContainer:O.commonAncestorContainer})}function P(t,X){var Y;if(t.nodeType==3){return t}if(X<0){return t}Y=t.firstChild;while(Y&&X>0){--X;Y=Y.nextSibling}if(Y){return Y}return t}function m(){return(O[h]==O[Q]&&O[W]==O[A])}function H(Z,ab,X,aa){var ac,Y,t,ad,af,ae;if(Z==X){if(ab==aa){return 0}if(ab<aa){return -1}return 1}ac=X;while(ac&&ac.parentNode!=Z){ac=ac.parentNode}if(ac){Y=0;t=Z.firstChild;while(t!=ac&&Y<ab){Y++;t=t.nextSibling}if(ab<=Y){return -1}return 1}ac=Z;while(ac&&ac.parentNode!=X){ac=ac.parentNode}if(ac){Y=0;t=X.firstChild;while(t!=ac&&Y<aa){Y++;t=t.nextSibling}if(Y<aa){return -1}return 1}ad=c.findCommonAncestor(Z,X);af=Z;while(af&&af.parentNode!=ad){af=af.parentNode}if(!af){af=ad}ae=X;while(ae&&ae.parentNode!=ad){ae=ae.parentNode}if(!ae){ae=ad}if(af==ae){return 0}t=ad.firstChild;while(t){if(t==af){return -1}if(t==ae){return 1}t=t.nextSibling}}function C(X,aa,Z){var t,Y;if(X){O[h]=aa;O[W]=Z}else{O[Q]=aa;O[A]=Z}t=O[Q];while(t.parentNode){t=t.parentNode}Y=O[h];while(Y.parentNode){Y=Y.parentNode}if(Y==t){if(H(O[h],O[W],O[Q],O[A])>0){O.collapse(X)}}else{O.collapse(X)}O.collapsed=m();O.commonAncestorContainer=c.findCommonAncestor(O[h],O[Q])}function l(ad){var ac,Z=0,af=0,X,ab,Y,aa,t,ae;if(O[h]==O[Q]){return f(ad)}for(ac=O[Q],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[h]){return r(ac,ad)}++Z}for(ac=O[h],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[Q]){return V(ac,ad)}++af}ab=af-Z;Y=O[h];while(ab>0){Y=Y.parentNode;ab--}aa=O[Q];while(ab<0){aa=aa.parentNode;ab++}for(t=Y.parentNode,ae=aa.parentNode;t!=ae;t=t.parentNode,ae=ae.parentNode){Y=t;aa=ae}return o(Y,aa,ad)}function f(ac){var ae,af,t,Y,Z,ad,aa,X,ab;if(ac!=j){ae=x()}if(O[W]==O[A]){return ae}if(O[h].nodeType==3){af=O[h].nodeValue;t=af.substring(O[W],O[A]);if(ac!=F){Y=O[h];X=O[W];ab=O[A]-O[W];if(X===0&&ab>=Y.nodeValue.length-1){Y.parentNode.removeChild(Y)}else{Y.deleteData(X,ab)}O.collapse(E)}if(ac==j){return}if(t.length>0){ae.appendChild(e.createTextNode(t))}return ae}Y=P(O[h],O[W]);Z=O[A]-O[W];while(Y&&Z>0){ad=Y.nextSibling;aa=z(Y,ac);if(ae){ae.appendChild(aa)}--Z;Y=ad}if(ac!=F){O.collapse(E)}return ae}function r(ad,aa){var ac,ab,X,t,Z,Y;if(aa!=j){ac=x()}ab=i(ad,aa);if(ac){ac.appendChild(ab)}X=n(ad);t=X-O[W];if(t<=0){if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}ab=ad.previousSibling;while(t>0){Z=ab.previousSibling;Y=z(ab,aa);if(ac){ac.insertBefore(Y,ac.firstChild)}--t;ab=Z}if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}function V(ab,aa){var ad,X,ac,t,Z,Y;if(aa!=j){ad=x()}ac=R(ab,aa);if(ad){ad.appendChild(ac)}X=n(ab);++X;t=O[A]-X;ac=ab.nextSibling;while(ac&&t>0){Z=ac.nextSibling;Y=z(ac,aa);if(ad){ad.appendChild(Y)}--t;ac=Z}if(aa!=F){O.setStartAfter(ab);O.collapse(E)}return ad}function o(ab,t,ae){var Y,ag,aa,ac,ad,X,af,Z;if(ae!=j){ag=x()}Y=R(ab,ae);if(ag){ag.appendChild(Y)}aa=ab.parentNode;ac=n(ab);ad=n(t);++ac;X=ad-ac;af=ab.nextSibling;while(X>0){Z=af.nextSibling;Y=z(af,ae);if(ag){ag.appendChild(Y)}af=Z;--X}Y=i(t,ae);if(ag){ag.appendChild(Y)}if(ae!=F){O.setStartAfter(ab);O.collapse(E)}return ag}function i(ac,ad){var Y=P(O[Q],O[A]-1),ae,ab,aa,t,X,Z=Y!=O[Q];if(Y==ac){return M(Y,Z,S,ad)}ae=Y.parentNode;ab=M(ae,S,S,ad);while(ae){while(Y){aa=Y.previousSibling;t=M(Y,Z,S,ad);if(ad!=j){ab.insertBefore(t,ab.firstChild)}Z=E;Y=aa}if(ae==ac){return ab}Y=ae.previousSibling;ae=ae.parentNode;X=M(ae,S,S,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function R(ac,ad){var Z=P(O[h],O[W]),aa=Z!=O[h],ae,ab,Y,t,X;if(Z==ac){return M(Z,aa,E,ad)}ae=Z.parentNode;ab=M(ae,S,E,ad);while(ae){while(Z){Y=Z.nextSibling;t=M(Z,aa,E,ad);if(ad!=j){ab.appendChild(t)}aa=E;Z=Y}if(ae==ac){return ab}Z=ae.nextSibling;ae=ae.parentNode;X=M(ae,S,E,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function M(t,aa,ad,ae){var Z,Y,ab,X,ac;if(aa){return z(t,ae)}if(t.nodeType==3){Z=t.nodeValue;if(ad){X=O[W];Y=Z.substring(X);ab=Z.substring(0,X)}else{X=O[A];Y=Z.substring(0,X);ab=Z.substring(X)}if(ae!=F){t.nodeValue=ab}if(ae==j){return}ac=c.clone(t,S);ac.nodeValue=Y;return ac}if(ae==j){return}return c.clone(t,S)}function z(X,t){if(t!=j){return t==F?c.clone(X,E):X}X.parentNode.removeChild(X)}function T(){return c.create("body",null,d()).outerText}return O}a.Range=b;b.prototype.toString=function(){return this.toStringIE()}})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",1)===0||s!=k.parentElement()){break}o++}}else{k.collapse(true);o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",-1)===0||s!=k.parentElement()){break}o++}}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,v,q,t,s=d.dom.doc,m=s.body,r,u;function j(C){var y,B,x,A,z;x=h.create("a");y=C?k:v;B=C?p:q;A=n.duplicate();if(y==s||y==s.documentElement){y=m;B=0}if(y.nodeType==3){y.parentNode.insertBefore(x,y);A.moveToElementText(x);A.moveStart("character",B);h.remove(x);n.setEndPoint(C?"StartToStart":"EndToEnd",A)}else{z=y.childNodes;if(z.length){if(B>=z.length){h.insertAfter(x,z[z.length-1])}else{y.insertBefore(x,z[B])}A.moveToElementText(x)}else{if(y.canHaveHTML){y.innerHTML="<span>\uFEFF</span>";x=y.firstChild;A.moveToElementText(x);A.collapse(f)}}n.setEndPoint(C?"StartToStart":"EndToEnd",A);h.remove(x)}}k=i.startContainer;p=i.startOffset;v=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==v&&k.nodeType==1){if(p==q&&!k.hasChildNodes()){if(k.canHaveHTML){t=k.previousSibling;if(t&&!t.hasChildNodes()&&h.isBlock(t)){t.innerHTML="\uFEFF"}else{t=null}k.innerHTML="<span>\uFEFF</span><span>\uFEFF</span>";n.moveToElementText(k.lastChild);n.select();h.doc.selection.clear();k.innerHTML="";if(t){t.innerHTML=""}return}else{p=h.nodeIndex(k);k=k.parentNode}}if(p==q-1){try{u=k.childNodes[p];l=m.createControlRange();l.addElement(u);l.select();r=d.getRng();if(r.item&&u===r.item(0)){return}}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(){var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache",o=0,r=Object.prototype.toString,h=false,g=true,q=/\\/g,u=/\r\n/g,x=/\W/;[0,0].sort(function(){g=false;return 0});var d=function(C,e,F,G){F=F||[];e=e||document;var I=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!C||typeof C!=="string"){return F}var z,K,N,y,J,M,L,E,B=true,A=d.isXML(e),D=[],H=C;do{n.exec("");z=n.exec(H);if(z){H=z[3];D.push(z[1]);if(z[2]){y=z[3];break}}}while(z);if(D.length>1&&j.exec(C)){if(D.length===2&&k.relative[D[0]]){K=s(D[0]+D[1],e,G)}else{K=k.relative[D[0]]?[e]:d(D.shift(),e);while(D.length){C=D.shift();if(k.relative[C]){C+=D.shift()}K=s(C,K,G)}}}else{if(!G&&D.length>1&&e.nodeType===9&&!A&&k.match.ID.test(D[0])&&!k.match.ID.test(D[D.length-1])){J=d.find(D.shift(),e,A);e=J.expr?d.filter(J.expr,J.set)[0]:J.set[0]}if(e){J=G?{expr:D.pop(),set:l(G)}:d.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&e.parentNode?e.parentNode:e,A);K=J.expr?d.filter(J.expr,J.set):J.set;if(D.length>0){N=l(K)}else{B=false}while(D.length){M=D.pop();L=M;if(!k.relative[M]){M=""}else{L=D.pop()}if(L==null){L=e}k.relative[M](N,L,A)}}else{N=D=[]}}if(!N){N=K}if(!N){d.error(M||C)}if(r.call(N)==="[object Array]"){if(!B){F.push.apply(F,N)}else{if(e&&e.nodeType===1){for(E=0;N[E]!=null;E++){if(N[E]&&(N[E]===true||N[E].nodeType===1&&d.contains(e,N[E]))){F.push(K[E])}}}else{for(E=0;N[E]!=null;E++){if(N[E]&&N[E].nodeType===1){F.push(K[E])}}}}}else{l(N,F)}if(y){d(y,I,F,G);d.uniqueSort(F)}return F};d.uniqueSort=function(y){if(p){h=g;y.sort(p);if(h){for(var e=1;e<y.length;e++){if(y[e]===y[e-1]){y.splice(e--,1)}}}}return y};d.matches=function(e,y){return d(e,null,null,y)};d.matchesSelector=function(e,y){return d(y,null,null,[e]).length>0};d.find=function(E,e,F){var D,z,B,A,C,y;if(!E){return[]}for(z=0,B=k.order.length;z<B;z++){C=k.order[z];if((A=k.leftMatch[C].exec(E))){y=A[1];A.splice(1,1);if(y.substr(y.length-1)!=="\\"){A[1]=(A[1]||"").replace(q,"");D=k.find[C](A,e,F);if(D!=null){E=E.replace(k.match[C],"");break}}}}if(!D){D=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:D,expr:E}};d.filter=function(I,H,L,B){var D,e,G,N,K,y,A,C,J,z=I,M=[],F=H,E=H&&H[0]&&d.isXML(H[0]);while(I&&H.length){for(G in k.filter){if((D=k.leftMatch[G].exec(I))!=null&&D[2]){y=k.filter[G];A=D[1];e=false;D.splice(1,1);if(A.substr(A.length-1)==="\\"){continue}if(F===M){M=[]}if(k.preFilter[G]){D=k.preFilter[G](D,F,L,M,B,E);if(!D){e=N=true}else{if(D===true){continue}}}if(D){for(C=0;(K=F[C])!=null;C++){if(K){N=y(K,D,C,F);J=B^N;if(L&&N!=null){if(J){e=true}else{F[C]=false}}else{if(J){M.push(K);e=true}}}}}if(N!==undefined){if(!L){F=M}I=I.replace(k.match[G],"");if(!e){return[]}break}}}if(I===z){if(e==null){d.error(I)}else{break}}z=I}return F};d.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var b=d.getText=function(B){var z,A,e=B.nodeType,y="";if(e){if(e===1||e===9||e===11){if(typeof B.textContent==="string"){return B.textContent}else{if(typeof B.innerText==="string"){return B.innerText.replace(u,"")}else{for(B=B.firstChild;B;B=B.nextSibling){y+=b(B)}}}}else{if(e===3||e===4){return B.nodeValue}}}else{for(z=0;(A=B[z]);z++){if(A.nodeType!==8){y+=b(A)}}}return y};var k=d.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(D,y){var A=typeof y==="string",C=A&&!x.test(y),E=A&&!C;if(C){y=y.toLowerCase()}for(var z=0,e=D.length,B;z<e;z++){if((B=D[z])){while((B=B.previousSibling)&&B.nodeType!==1){}D[z]=E||B&&B.nodeName.toLowerCase()===y?B||false:B===y}}if(E){d.filter(y,D,true)}},">":function(D,y){var C,B=typeof y==="string",z=0,e=D.length;if(B&&!x.test(y)){y=y.toLowerCase();for(;z<e;z++){C=D[z];if(C){var A=C.parentNode;D[z]=A.nodeName.toLowerCase()===y?A:false}}}else{for(;z<e;z++){C=D[z];if(C){D[z]=B?C.parentNode:C.parentNode===y}}if(B){d.filter(y,D,true)}}},"":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("parentNode",y,z,A,B,C)},"~":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("previousSibling",y,z,A,B,C)}},find:{ID:function(y,z,A){if(typeof z.getElementById!=="undefined"&&!A){var e=z.getElementById(y[1]);return e&&e.parentNode?[e]:[]}},NAME:function(z,C){if(typeof C.getElementsByName!=="undefined"){var y=[],B=C.getElementsByName(z[1]);for(var A=0,e=B.length;A<e;A++){if(B[A].getAttribute("name")===z[1]){y.push(B[A])}}return y.length===0?null:y}},TAG:function(e,y){if(typeof y.getElementsByTagName!=="undefined"){return y.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(A,y,z,e,D,E){A=" "+A[1].replace(q,"")+" ";if(E){return A}for(var B=0,C;(C=y[B])!=null;B++){if(C){if(D^(C.className&&(" "+C.className+" ").replace(/[\t\n\r]/g," ").indexOf(A)>=0)){if(!z){e.push(C)}}else{if(z){y[B]=false}}}}return false},ID:function(e){return e[1].replace(q,"")},TAG:function(y,e){return y[1].replace(q,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){d.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var y=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(y[1]+(y[2]||1))-0;e[3]=y[3]-0}else{if(e[2]){d.error(e[0])}}e[0]=o++;return e},ATTR:function(B,y,z,e,C,D){var A=B[1]=B[1].replace(q,"");if(!D&&k.attrMap[A]){B[1]=k.attrMap[A]}B[4]=(B[4]||B[5]||"").replace(q,"");if(B[2]==="~="){B[4]=" "+B[4]+" "}return B},PSEUDO:function(B,y,z,e,C){if(B[1]==="not"){if((n.exec(B[3])||"").length>1||/^\w/.test(B[3])){B[3]=d(B[3],null,null,y)}else{var A=d.filter(B[3],y,z,true^C);if(!z){e.push.apply(e,A)}return false}}else{if(k.match.POS.test(B[0])||k.match.CHILD.test(B[0])){return true}}return B},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(z,y,e){return !!d(e[3],z).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(z){var e=z.getAttribute("type"),y=z.type;return z.nodeName.toLowerCase()==="input"&&"text"===y&&(e===y||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===y.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===y.type},button:function(y){var e=y.nodeName.toLowerCase();return e==="input"&&"button"===y.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(y,e){return e===0},last:function(z,y,e,A){return y===A.length-1},even:function(y,e){return e%2===0},odd:function(y,e){return e%2===1},lt:function(z,y,e){return y<e[3]-0},gt:function(z,y,e){return y>e[3]-0},nth:function(z,y,e){return e[3]-0===y},eq:function(z,y,e){return e[3]-0===y}},filter:{PSEUDO:function(z,E,D,F){var e=E[1],y=k.filters[e];if(y){return y(z,D,E,F)}else{if(e==="contains"){return(z.textContent||z.innerText||b([z])||"").indexOf(E[3])>=0}else{if(e==="not"){var A=E[3];for(var C=0,B=A.length;C<B;C++){if(A[C]===z){return false}}return true}else{d.error(e)}}}},CHILD:function(z,B){var A,H,D,G,e,C,F,E=B[1],y=z;switch(E){case"only":case"first":while((y=y.previousSibling)){if(y.nodeType===1){return false}}if(E==="first"){return true}y=z;case"last":while((y=y.nextSibling)){if(y.nodeType===1){return false}}return true;case"nth":A=B[2];H=B[3];if(A===1&&H===0){return true}D=B[0];G=z.parentNode;if(G&&(G[i]!==D||!z.nodeIndex)){C=0;for(y=G.firstChild;y;y=y.nextSibling){if(y.nodeType===1){y.nodeIndex=++C}}G[i]=D}F=z.nodeIndex-H;if(A===0){return F===0}else{return(F%A===0&&F/A>=0)}}},ID:function(y,e){return y.nodeType===1&&y.getAttribute("id")===e},TAG:function(y,e){return(e==="*"&&y.nodeType===1)||!!y.nodeName&&y.nodeName.toLowerCase()===e},CLASS:function(y,e){return(" "+(y.className||y.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(C,A){var z=A[1],e=d.attr?d.attr(C,z):k.attrHandle[z]?k.attrHandle[z](C):C[z]!=null?C[z]:C.getAttribute(z),D=e+"",B=A[2],y=A[4];return e==null?B==="!=":!B&&d.attr?e!=null:B==="="?D===y:B==="*="?D.indexOf(y)>=0:B==="~="?(" "+D+" ").indexOf(y)>=0:!y?D&&e!==false:B==="!="?D!==y:B==="^="?D.indexOf(y)===0:B==="$="?D.substr(D.length-y.length)===y:B==="|="?D===y||D.substr(0,y.length+1)===y+"-":false},POS:function(B,y,z,C){var e=y[2],A=k.setFilters[e];if(A){return A(B,z,y,C)}}}};var j=k.match.POS,c=function(y,e){return"\\"+(e-0+1)};for(var f in k.match){k.match[f]=new RegExp(k.match[f].source+(/(?![^\[]*\])(?![^\(]*\))/.source));k.leftMatch[f]=new RegExp(/(^(?:.|\r|\n)*?)/.source+k.match[f].source.replace(/\\(\d+)/g,c))}k.match.globalPOS=j;var l=function(y,e){y=Array.prototype.slice.call(y,0);if(e){e.push.apply(e,y);return e}return y};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(v){l=function(B,A){var z=0,y=A||[];if(r.call(B)==="[object Array]"){Array.prototype.push.apply(y,B)}else{if(typeof B.length==="number"){for(var e=B.length;z<e;z++){y.push(B[z])}}else{for(;B[z];z++){y.push(B[z])}}}return y}}var p,m;if(document.documentElement.compareDocumentPosition){p=function(y,e){if(y===e){h=true;return 0}if(!y.compareDocumentPosition||!e.compareDocumentPosition){return y.compareDocumentPosition?-1:1}return y.compareDocumentPosition(e)&4?-1:1}}else{p=function(F,E){if(F===E){h=true;return 0}else{if(F.sourceIndex&&E.sourceIndex){return F.sourceIndex-E.sourceIndex}}var C,y,z=[],e=[],B=F.parentNode,D=E.parentNode,G=B;if(B===D){return m(F,E)}else{if(!B){return -1}else{if(!D){return 1}}}while(G){z.unshift(G);G=G.parentNode}G=D;while(G){e.unshift(G);G=G.parentNode}C=z.length;y=e.length;for(var A=0;A<C&&A<y;A++){if(z[A]!==e[A]){return m(z[A],e[A])}}return A===C?m(F,e[A],-1):m(z[A],E,1)};m=function(y,e,z){if(y===e){return z}var A=y.nextSibling;while(A){if(A===e){return -1}A=A.nextSibling}return 1}}(function(){var y=document.createElement("div"),z="script"+(new Date()).getTime(),e=document.documentElement;y.innerHTML="<a name='"+z+"'/>";e.insertBefore(y,e.firstChild);if(document.getElementById(z)){k.find.ID=function(B,C,D){if(typeof C.getElementById!=="undefined"&&!D){var A=C.getElementById(B[1]);return A?A.id===B[1]||typeof A.getAttributeNode!=="undefined"&&A.getAttributeNode("id").nodeValue===B[1]?[A]:undefined:[]}};k.filter.ID=function(C,A){var B=typeof C.getAttributeNode!=="undefined"&&C.getAttributeNode("id");return C.nodeType===1&&B&&B.nodeValue===A}}e.removeChild(y);e=y=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){k.find.TAG=function(y,C){var B=C.getElementsByTagName(y[1]);if(y[1]==="*"){var A=[];for(var z=0;B[z];z++){if(B[z].nodeType===1){A.push(B[z])}}B=A}return B}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){k.attrHandle.href=function(y){return y.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=d,A=document.createElement("div"),z="__sizzle__";A.innerHTML="<p class='TEST'></p>";if(A.querySelectorAll&&A.querySelectorAll(".TEST").length===0){return}d=function(L,C,G,K){C=C||document;if(!K&&!d.isXML(C)){var J=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(L);if(J&&(C.nodeType===1||C.nodeType===9)){if(J[1]){return l(C.getElementsByTagName(L),G)}else{if(J[2]&&k.find.CLASS&&C.getElementsByClassName){return l(C.getElementsByClassName(J[2]),G)}}}if(C.nodeType===9){if(L==="body"&&C.body){return l([C.body],G)}else{if(J&&J[3]){var F=C.getElementById(J[3]);if(F&&F.parentNode){if(F.id===J[3]){return l([F],G)}}else{return l([],G)}}}try{return l(C.querySelectorAll(L),G)}catch(H){}}else{if(C.nodeType===1&&C.nodeName.toLowerCase()!=="object"){var D=C,E=C.getAttribute("id"),B=E||z,N=C.parentNode,M=/^\s*[+~]/.test(L);if(!E){C.setAttribute("id",B)}else{B=B.replace(/'/g,"\\$&")}if(M&&N){C=C.parentNode}try{if(!M||N){return l(C.querySelectorAll("[id='"+B+"'] "+L),G)}}catch(I){}finally{if(!E){D.removeAttribute("id")}}}}}return e(L,C,G,K)};for(var y in e){d[y]=e[y]}A=null})()}(function(){var e=document.documentElement,z=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(z){var B=!z.call(document.createElement("div"),"div"),y=false;try{z.call(document.documentElement,"[test!='']:sizzle")}catch(A){y=true}d.matchesSelector=function(D,F){F=F.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!d.isXML(D)){try{if(y||!k.match.PSEUDO.test(F)&&!/!=/.test(F)){var C=z.call(D,F);if(C||!B||D.document&&D.document.nodeType!==11){return C}}}catch(E){}}return d(F,null,null,[D]).length>0}}})();(function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}k.order.splice(1,0,"CLASS");k.find.CLASS=function(y,z,A){if(typeof z.getElementsByClassName!=="undefined"&&!A){return z.getElementsByClassName(y[1])}};e=null})();function a(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1&&!F){e[i]=C;e.sizset=A}if(e.nodeName.toLowerCase()===D){B=e;break}e=e[y]}G[A]=B}}}function t(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1){if(!F){e[i]=C;e.sizset=A}if(typeof D!=="string"){if(e===D){B=true;break}}else{if(d.filter(D,[e]).length>0){B=e;break}}}e=e[y]}G[A]=B}}}if(document.documentElement.contains){d.contains=function(y,e){return y!==e&&(y.contains?y.contains(e):true)}}else{if(document.documentElement.compareDocumentPosition){d.contains=function(y,e){return !!(y.compareDocumentPosition(e)&16)}}else{d.contains=function(){return false}}}d.isXML=function(e){var y=(e?e.ownerDocument||e:0).documentElement;return y?y.nodeName!=="HTML":false};var s=function(z,e,D){var C,E=[],B="",F=e.nodeType?[e]:e;while((C=k.match.PSEUDO.exec(z))){B+=C[0];z=z.replace(k.match.PSEUDO,"")}z=k.relative[z]?z+"*":z;for(var A=0,y=F.length;A<y;A++){d(z,F[A],E,D)}return d.filter(B,E)};window.tinymce.dom.Sizzle=d})();(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j<arguments.length;j++){h.push(arguments[j])}h=e[g].apply(e,h);b.update(g);return h}});a.extend(b,{on:function(i,h,g){return a.dom.Event.add(b.id,i,h,g)},getXY:function(){return{x:parseInt(b.getStyle("left")),y:parseInt(b.getStyle("top"))}},getSize:function(){var g=e.get(b.id);return{w:parseInt(b.getStyle("width")||g.clientWidth),h:parseInt(b.getStyle("height")||g.clientHeight)}},moveTo:function(g,h){b.setStyles({left:g,top:h})},moveBy:function(g,i){var h=b.getXY();b.moveTo(h.x+g,h.y+i)},resizeTo:function(g,i){b.setStyles({width:g,height:i})},resizeBy:function(g,j){var i=b.getSize();b.resizeTo(i.w+g,i.h+j)},update:function(h){var g;if(a.isIE6&&d.blocker){h=h||"";if(h.indexOf("get")===0||h.indexOf("has")===0||h.indexOf("is")===0){return}if(h=="remove"){e.remove(b.blocker);return}if(!b.blocker){b.blocker=e.uniqueId();g=e.add(d.container||e.getRoot(),"iframe",{id:b.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'});e.setStyle(g,"opacity",0)}else{g=e.get(b.blocker)}e.setStyles(g,{left:b.getStyle("left",1),top:b.getStyle("top",1),width:b.getStyle("width",1),height:b.getStyle("height",1),display:b.getStyle("display",1),zIndex:parseInt(b.getStyle("zIndex",1)||0)-1})}}})}})(tinymce);(function(d){function f(g){return g.replace(/[\n\r]+/g,"")}var c=d.is,b=d.isIE,e=d.each,a=d.dom.TreeWalker;d.create("tinymce.dom.Selection",{Selection:function(k,j,i,h){var g=this;g.dom=k;g.win=j;g.serializer=i;g.editor=h;e(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(l){g[l]=new d.util.Dispatcher(g)});if(!g.win.getSelection){g.tridentSel=new d.dom.TridentSelection(g)}if(d.isIE&&k.boxModel){this._fixIESelection()}d.addUnload(g.destroy,g)},setCursorLocation:function(i,j){var g=this;var h=g.dom.createRng();h.setStart(i,j);h.setEnd(i,j);g.setRng(h);g.collapse(false)},getContent:function(h){var g=this,i=g.getRng(),m=g.dom.create("body"),k=g.getSel(),j,l,o;h=h||{};j=l="";h.get=true;h.format=h.format||"html";h.forced_root_block="";g.onBeforeGetContent.dispatch(g,h);if(h.format=="text"){return g.isCollapsed()?"":(i.text||(k.toString?k.toString():""))}if(i.cloneContents){o=i.cloneContents();if(o){m.appendChild(o)}}else{if(c(i.item)||c(i.htmlText)){m.innerHTML="<br>"+(i.item?i.item(0).outerHTML:i.htmlText);m.removeChild(m.firstChild)}else{m.innerHTML=i.toString()}}if(/^\s/.test(m.innerHTML)){j=" "}if(/\s+$/.test(m.innerHTML)){l=" "}h.getInner=true;h.content=g.isCollapsed()?"":j+g.serializer.serialize(m,h)+l;g.onGetContent.dispatch(g,h);return h.content},setContent:function(h,j){var o=this,g=o.getRng(),k,l=o.win.document,n,m;j=j||{format:"html"};j.set=true;h=j.content=h;if(!j.no_events){o.onBeforeSetContent.dispatch(o,j)}h=j.content;if(g.insertNode){h+='<span id="__caret">_</span>';if(g.startContainer==l&&g.endContainer==l){l.body.innerHTML=h}else{g.deleteContents();if(l.body.childNodes.length===0){l.body.innerHTML=h}else{if(g.createContextualFragment){g.insertNode(g.createContextualFragment(h))}else{n=l.createDocumentFragment();m=l.createElement("div");n.appendChild(m);m.outerHTML=h;g.insertNode(n)}}}k=o.dom.get("__caret");g=l.createRange();g.setStartBefore(k);g.setEndBefore(k);o.setRng(g);o.dom.remove("__caret");try{o.setRng(g)}catch(i){}}else{if(g.item){l.execCommand("Delete",false,null);g=o.getRng()}if(/^\s+/.test(h)){g.pasteHTML('<span id="__mce_tmp">_</span>'+h);o.dom.remove("__mce_tmp")}else{g.pasteHTML(h)}}if(!j.no_events){o.onSetContent.dispatch(o,j)}},getStart:function(){var i=this,h=i.getRng(),j,g,l,k;if(h.duplicate||h.item){if(h.item){return h.item(0)}l=h.duplicate();l.collapse(1);j=l.parentElement();if(j.ownerDocument!==i.dom.doc){j=i.dom.getRoot()}g=k=h.parentElement();while(k=k.parentNode){if(k==j){j=g;break}}return j}else{j=h.startContainer;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[Math.min(j.childNodes.length-1,h.startOffset)]}if(j&&j.nodeType==3){return j.parentNode}return j}},getEnd:function(){var h=this,g=h.getRng(),j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(0);j=g.parentElement();if(j.ownerDocument!==h.dom.doc){j=h.dom.getRoot()}if(j&&j.nodeName=="BODY"){return j.lastChild||j}return j}else{j=g.endContainer;i=g.endOffset;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[i>0?i-1:i]}if(j&&j.nodeType==3){return j.parentNode}return j}},getBookmark:function(s,v){var y=this,n=y.dom,h,k,j,o,i,p,q,m="\uFEFF",x;function g(z,A){var t=0;e(n.select(z),function(C,B){if(C==A){t=B}});return t}function u(t){function z(E){var A,D,C,B=E?"start":"end";A=t[B+"Container"];D=t[B+"Offset"];if(A.nodeType==1&&A.nodeName=="TR"){C=A.childNodes;A=C[Math.min(E?D:D-1,C.length-1)];if(A){D=E?0:A.childNodes.length;t["set"+(E?"Start":"End")](A,D)}}}z(true);z();return t}function l(){var z=y.getRng(true),t=n.getRoot(),A={};function B(E,J){var D=E[J?"startContainer":"endContainer"],I=E[J?"startOffset":"endOffset"],C=[],F,H,G=0;if(D.nodeType==3){if(v){for(F=D.previousSibling;F&&F.nodeType==3;F=F.previousSibling){I+=F.nodeValue.length}}C.push(I)}else{H=D.childNodes;if(I>=H.length&&H.length){G=1;I=Math.max(0,H.length-1)}C.push(y.dom.nodeIndex(H[I],v)+G)}for(;D&&D!=t;D=D.parentNode){C.push(y.dom.nodeIndex(D,v))}return C}A.start=B(z,true);if(!y.isCollapsed()){A.end=B(z)}return A}if(s==2){if(y.tridentSel){return y.tridentSel.getBookmark(s)}return l()}if(s){return{rng:y.getRng()}}h=y.getRng();j=n.uniqueId();o=tinyMCE.activeEditor.selection.isCollapsed();x="overflow:hidden;line-height:0px";if(h.duplicate||h.item){if(!h.item){k=h.duplicate();try{h.collapse();h.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_start" style="'+x+'">'+m+"</span>");if(!o){k.collapse(false);h.moveToElementText(k.parentElement());if(h.compareEndPoints("StartToEnd",k)===0){k.move("character",-1)}k.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_end" style="'+x+'">'+m+"</span>")}}catch(r){return null}}else{p=h.item(0);i=p.nodeName;return{name:i,index:g(i,p)}}}else{p=y.getNode();i=p.nodeName;if(i=="IMG"){return{name:i,index:g(i,p)}}k=u(h.cloneRange());if(!o){k.collapse(false);k.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_end",style:x},m))}h=u(h);h.collapse(true);h.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_start",style:x},m))}y.moveToBookmark({id:j,keep:1});return{id:j}},moveToBookmark:function(o){var s=this,m=s.dom,j,i,g,r,k,u,p,q;function h(A){var t=o[A?"start":"end"],x,y,z,v;if(t){z=t[0];for(y=r,x=t.length-1;x>=1;x--){v=y.childNodes;if(t[x]>v.length-1){return}y=v[t[x]]}if(y.nodeType===3){z=Math.min(t[0],y.nodeValue.length)}if(y.nodeType===1){z=Math.min(t[0],y.childNodes.length)}if(A){g.setStart(y,z)}else{g.setEnd(y,z)}}return true}function l(B){var v=m.get(o.id+"_"+B),A,t,y,z,x=o.keep;if(v){A=v.parentNode;if(B=="start"){if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}k=u=A;p=q=t}else{if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}u=A;q=t}if(!x){z=v.previousSibling;y=v.nextSibling;e(d.grep(v.childNodes),function(C){if(C.nodeType==3){C.nodeValue=C.nodeValue.replace(/\uFEFF/g,"")}});while(v=m.get(o.id+"_"+B)){m.remove(v,1)}if(z&&y&&z.nodeType==y.nodeType&&z.nodeType==3&&!d.isOpera){t=z.nodeValue.length;z.appendData(y.nodeValue);m.remove(y);if(B=="start"){k=u=z;p=q=t}else{u=z;q=t}}}}}function n(t){if(m.isBlock(t)&&!t.innerHTML&&!b){t.innerHTML='<br data-mce-bogus="1" />'}return t}if(o){if(o.start){g=m.createRng();r=m.getRoot();if(s.tridentSel){return s.tridentSel.moveToBookmark(o)}if(h(true)&&h()){s.setRng(g)}}else{if(o.id){l("start");l("end");if(k){g=m.createRng();g.setStart(n(k),p);g.setEnd(n(u),q);s.setRng(g)}}else{if(o.name){s.select(m.select(o.name)[o.index])}else{if(o.rng){s.setRng(o.rng)}}}}}},select:function(l,k){var j=this,m=j.dom,h=m.createRng(),g;function i(n,p){var o=new a(n,n);do{if(n.nodeType==3&&d.trim(n.nodeValue).length!==0){if(p){h.setStart(n,0)}else{h.setEnd(n,n.nodeValue.length)}return}if(n.nodeName=="BR"){if(p){h.setStartBefore(n)}else{h.setEndBefore(n)}return}}while(n=(p?o.next():o.prev()))}if(l){g=m.nodeIndex(l);h.setStart(l.parentNode,g);h.setEnd(l.parentNode,g+1);if(k){i(l,1);i(l)}j.setRng(h)}return l},isCollapsed:function(){var g=this,i=g.getRng(),h=g.getSel();if(!i||i.item){return false}if(i.compareEndPoints){return i.compareEndPoints("StartToEnd",i)===0}return !h||i.collapsed},collapse:function(g){var i=this,h=i.getRng(),j;if(h.item){j=h.item(0);h=i.win.document.body.createTextRange();h.moveToElementText(j)}h.collapse(!!g);i.setRng(h)},getSel:function(){var h=this,g=this.win;return g.getSelection?g.getSelection():g.document.selection},getRng:function(m){var h=this,j,g,l,k=h.win.document;if(m&&h.tridentSel){return h.tridentSel.getRangeAt(0)}try{if(j=h.getSel()){g=j.rangeCount>0?j.getRangeAt(0):(j.createRange?j.createRange():k.createRange())}}catch(i){}if(d.isIE&&g&&g.setStart&&k.selection.createRange().item){l=k.selection.createRange().item(0);g=k.createRange();g.setStartBefore(l);g.setEndAfter(l)}if(!g){g=k.createRange?k.createRange():k.body.createTextRange()}if(g.setStart&&g.startContainer.nodeType===9&&g.collapsed){l=h.dom.getRoot();g.setStart(l,0);g.setEnd(l,0)}if(h.selectedRange&&h.explicitRange){if(g.compareBoundaryPoints(g.START_TO_START,h.selectedRange)===0&&g.compareBoundaryPoints(g.END_TO_END,h.selectedRange)===0){g=h.explicitRange}else{h.selectedRange=null;h.explicitRange=null}}return g},setRng:function(k,g){var j,i=this;if(!i.tridentSel){j=i.getSel();if(j){i.explicitRange=k;try{j.removeAllRanges()}catch(h){}j.addRange(k);if(g===false&&j.extend){j.collapse(k.endContainer,k.endOffset);j.extend(k.startContainer,k.startOffset)}i.selectedRange=j.rangeCount>0?j.getRangeAt(0):null}}else{if(k.cloneRange){try{i.tridentSel.addRange(k);return}catch(h){}}try{k.select()}catch(h){}}},setNode:function(h){var g=this;g.setContent(g.dom.getOuterHTML(h));return h},getNode:function(){var i=this,h=i.getRng(),j=i.getSel(),m,l=h.startContainer,g=h.endContainer;function k(q,o){var p=q;while(q&&q.nodeType===3&&q.length===0){q=o?q.nextSibling:q.previousSibling}return q||p}if(!h){return i.dom.getRoot()}if(h.setStart){m=h.commonAncestorContainer;if(!h.collapsed){if(h.startContainer==h.endContainer){if(h.endOffset-h.startOffset<2){if(h.startContainer.hasChildNodes()){m=h.startContainer.childNodes[h.startOffset]}}}if(l.nodeType===3&&g.nodeType===3){if(l.length===h.startOffset){l=k(l.nextSibling,true)}else{l=l.parentNode}if(h.endOffset===0){g=k(g.previousSibling,false)}else{g=g.parentNode}if(l&&l===g){return l}}}if(m&&m.nodeType==3){return m.parentNode}return m}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(p,h){var o=this,k=o.dom,m,l,i,j=[];m=k.getParent(p||o.getStart(),k.isBlock);l=k.getParent(h||o.getEnd(),k.isBlock);if(m){j.push(m)}if(m&&l&&m!=l){i=m;var g=new a(m,k.getRoot());while((i=g.next())&&i!=l){if(k.isBlock(i)){j.push(i)}}}if(l&&m!=l){j.push(l)}return j},isForward:function(){var i=this.dom,g=this.getSel(),j,h;if(!g||g.anchorNode==null||g.focusNode==null){return true}j=i.createRng();j.setStart(g.anchorNode,g.anchorOffset);j.collapse(true);h=i.createRng();h.setStart(g.focusNode,g.focusOffset);h.collapse(true);return j.compareBoundaryPoints(j.START_TO_START,h)<=0},normalize:function(){var h=this,g,m,l,j,i;function k(p){var o,r,n,s=h.dom,u=s.getRoot(),q,t,v;function y(z,A){var B=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(z=B[A?"prev":"next"]()){if(z.nodeName==="BR"){return true}}}function x(B,z){var C,A;z=z||o;C=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(q=C[B?"prev":"next"]()){if(q.nodeType===3&&q.nodeValue.length>0){o=q;r=B?q.nodeValue.length:0;m=true;return}if(s.isBlock(q)||t[q.nodeName.toLowerCase()]){return}A=q}if(l&&A){o=A;m=true;r=0}}o=g[(p?"start":"end")+"Container"];r=g[(p?"start":"end")+"Offset"];t=s.schema.getNonEmptyElements();if(o.nodeType===9){o=s.getRoot();r=0}if(o===u){if(p){q=o.childNodes[r>0?r-1:0];if(q){v=q.nodeName.toLowerCase();if(t[q.nodeName]||q.nodeName=="TABLE"){return}}}if(o.hasChildNodes()){o=o.childNodes[Math.min(!p&&r>0?r-1:r,o.childNodes.length-1)];r=0;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){q=o;n=new a(o,u);do{if(q.nodeType===3&&q.nodeValue.length>0){r=p?0:q.nodeValue.length;o=q;m=true;break}if(t[q.nodeName.toLowerCase()]){r=s.nodeIndex(q);o=q.parentNode;if(q.nodeName=="IMG"&&!p){r++}m=true;break}}while(q=(p?n.next():n.prev()))}}}if(l){if(o.nodeType===3&&r===0){x(true)}if(o.nodeType===1){q=o.childNodes[r];if(q&&q.nodeName==="BR"&&!y(q)&&!y(q,true)){x(true,o.childNodes[r])}}}if(p&&!l&&o.nodeType===3&&r===o.nodeValue.length){x(false)}if(m){g["set"+(p?"Start":"End")](o,r)}}if(d.isIE){return}g=h.getRng();l=g.collapsed;k(true);if(!l){k()}if(m){if(l){g.collapse(true)}h.setRng(g,h.isForward())}},selectorChanged:function(g,j){var h=this,i;if(!h.selectorChangedData){h.selectorChangedData={};i={};h.editor.onNodeChange.addToTop(function(l,k,o){var p=h.dom,m=p.getParents(o,null,p.getRoot()),n={};e(h.selectorChangedData,function(r,q){e(m,function(s){if(p.is(s,q)){if(!i[q]){e(r,function(t){t(true,{node:s,selector:q,parents:m})});i[q]=r}n[q]=r;return false}})});e(i,function(r,q){if(!n[q]){delete i[q];e(r,function(s){s(false,{node:o,selector:q,parents:m})})}})})}if(!h.selectorChangedData[g]){h.selectorChangedData[g]=[]}h.selectorChangedData[g].push(j);return h},destroy:function(h){var g=this;g.win=null;if(!h){d.removeUnload(g.destroy)}},_fixIESelection:function(){var h=this.dom,n=h.doc,i=n.body,k,o,g;function j(p,s){var q=i.createTextRange();try{q.moveToPoint(p,s)}catch(r){q=null}return q}function m(q){var p;if(q.button){p=j(q.x,q.y);if(p){if(p.compareEndPoints("StartToStart",o)>0){p.setEndPoint("StartToStart",o)}else{p.setEndPoint("EndToEnd",o)}p.select()}}else{l()}}function l(){var p=n.selection.createRange();if(o&&!p.item&&p.compareEndPoints("StartToEnd",p)===0){o.select()}h.unbind(n,"mouseup",l);h.unbind(n,"mousemove",m);o=k=0}n.documentElement.unselectable=true;h.bind(n,["mousedown","contextmenu"],function(p){if(p.target.nodeName==="HTML"){if(k){l()}g=n.documentElement;if(g.scrollHeight>g.clientHeight){return}k=1;o=j(p.x,p.y);if(o){h.bind(n,"mouseup",l);h.bind(n,"mousemove",m);h.win.focus();o.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addAttributeFilter("data-mce-expando",function(j,l,k){var m=j.length;while(m--){j[m].attr(l,null)}});c.addNodeFilter("noscript",function(j){var k=j.length,l;while(k--){l=j[k].firstChild;if(l){l.value=a.html.Entities.decode(l.value)}}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// <![CDATA[\n"+j(o)+"\n// ]]>"}}else{if(o.length>0){n.firstChild.value="<!--\n"+j(o)+"\n-->"}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(a.trim(m.getInner?o.innerHTML:i.getOuterHTML(o)),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],e={},d=[],g=0,f;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=document.createElement("script");s.id=n;s.type="text/javascript";s.src=a._addVer(m);if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==f){j.push(m);l[m]=c}if(q){if(!e[m]){e[m]=[]}e[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(e[r],function(s){s.func.call(s.scope)});e[r]=f}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&d<h.nodeValue.length){i=f(h,d);h=i.previousSibling;if(g>d){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d<h.nodeValue.length){h=f(h,d);d=0}if(i.nodeType==3&&g>0&&g<i.nodeValue.length){i=f(i,g).previousSibling;g=i.nodeValue.length}}return{startContainer:h,startOffset:d,endContainer:i,endOffset:g}}};a.dom.RangeUtils.compareRanges=function(c,b){if(c&&b){if(c.item||c.duplicate){if(c.item&&b.item&&c.item(0)===b.item(0)){return true}if(c.isEqual&&b.isEqual&&b.isEqual(c)){return true}}else{return c.startContainer==b.startContainer&&c.startOffset==b.startOffset}}return false}})(tinymce);(function(b){var a=b.dom.Event,c=b.each;b.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(e,f){var q=this,n=e.root,m=e.items,o=e.enableUpDown,i=e.enableLeftRight||!e.enableUpDown,l=e.excludeFromTabOrder,k,h,p,d,g;f=f||b.DOM;k=function(r){g=r.target.id};h=function(r){f.setAttrib(r.target.id,"tabindex","-1")};d=function(r){var s=f.get(g);f.setAttrib(s,"tabindex","0");s.focus()};q.focus=function(){f.get(g).focus()};q.destroy=function(){c(m,function(s){var t=f.get(s.id);f.unbind(t,"focus",k);f.unbind(t,"blur",h)});var r=f.get(n);f.unbind(r,"focus",d);f.unbind(r,"keydown",p);m=f=n=q.focus=k=h=p=d=null;q.destroy=function(){}};q.moveFocus=function(v,s){var r=-1,u=q.controls,t;if(!g){return}c(m,function(y,x){if(y.id===g){r=x;return false}});r+=v;if(r<0){r=m.length-1}else{if(r>=m.length){r=0}}t=m[r];f.setAttrib(g,"tabindex","-1");f.setAttrib(t.id,"tabindex","0");f.get(t.id).focus();if(e.actOnFocus){e.onAction(t.id)}if(s){a.cancel(s)}};p=function(z){var v=37,u=39,y=38,A=40,r=27,t=14,s=13,x=32;switch(z.keyCode){case v:if(i){q.moveFocus(-1)}break;case u:if(i){q.moveFocus(1)}break;case y:if(o){q.moveFocus(-1)}break;case A:if(o){q.moveFocus(1)}break;case r:if(e.onCancel){e.onCancel();a.cancel(z)}break;case t:case s:case x:if(e.onAction){e.onAction(g);a.cancel(z)}break}};c(m,function(t,r){var s,u;if(!t.id){t.id=f.uniqueId("_mce_item_")}u=f.get(t.id);if(l){f.bind(u,"blur",h);s="-1"}else{s=(r===0?"0":"-1")}u.setAttribute("tabindex",s);f.bind(u,"focus",k)});if(m[0]){g=m[0].id}f.setAttrib(n,"tabindex","-1");var j=f.get(n);f.bind(j,"focus",d);f.bind(j,"keydown",p)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.offsetWidth,j.max_width):g.offsetWidth;k=j.max_height?Math.min(g.offsetHeight,j.max_height):g.offsetHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeight<j.max_height){c.setStyle(l,"overflow","hidden")}}},showMenu:function(p,n,r){var z=this,A=z.settings,o,g=c.getViewPort(),u,l,v,q,i=2,k,j,m=z.classPrefix;z.collapse(1);if(z.isMenuVisible){return}if(!z.rendered){o=c.add(z.settings.container,z.renderNode());f(z.items,function(h){h.postRender()});z.element=new b("menu_"+z.id,{blocker:1,container:A.container})}else{o=c.get("menu_"+z.id)}if(!e.isOpera){c.setStyles(o,{left:-65535,top:-65535})}c.show(o);z.update();p+=A.offset_x||0;n+=A.offset_y||0;g.w-=4;g.h-=4;if(A.constrain){u=o.clientWidth-i;l=o.clientHeight-i;v=g.x+g.w;q=g.y+g.h;if((p+A.vp_offset_x+u)>v){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return false}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){if(typeof h.settings.style=="function"){h.settings.style=h.settings.style()}c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='<a role="button" id="'+this.id+'" href="javascript:;" class="'+f+" "+f+"Enabled "+e["class"]+(c?" "+f+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+a.encode(e.title)+'">';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+='<span class="mceIcon '+e["class"]+'"><img class="mceIcon" src="'+e.image+'" alt="'+a.encode(e.title)+'" /></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}else{d+='<span class="mceIcon '+e["class"]+'"></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}d+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+e.title+"</span>";d+="</a>";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keyup",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(j,i,g){var h=this;h.parent(j,i,g);h.items=[];h.onChange=new a(h);h.onPostRender=new a(h);h.onAdd=new a(h);h.onRenderMenu=new e.util.Dispatcher(this);h.classPrefix="mceListBox";h.marked={}},select:function(h){var g=this,j,i;g.marked={};if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){var i=this,j,k,h;i.marked={};if(g!=i.selectedIndex){j=d.get(i.id+"_text");h=d.get(i.id+"_voiceDesc");k=i.items[g];if(k){i.selectedValue=k.value;i.selectedIndex=g;d.setHTML(j,d.encode(k.title));d.setHTML(h,i.settings.title+" - "+k.title);d.removeClass(j,"mceTitle");d.setAttrib(i.id,"aria-valuenow",k.title)}else{d.setHTML(j,d.encode(i.settings.title));d.setHTML(h,d.encode(i.settings.title));d.addClass(j,"mceTitle");i.selectedValue=i.selectedIndex=null;d.setAttrib(i.id,"aria-valuenow",i.settings.title)}j=0}},mark:function(g){this.marked[g]=true},add:function(j,g,i){var h=this;i=i||{};i=e.extend(i,{title:j,value:g});h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var j="",g=this,i=g.settings,k=g.classPrefix;j='<span role="listbox" aria-haspopup="true" aria-labelledby="'+g.id+'_voiceDesc" aria-describedby="'+g.id+'_voiceDesc"><table role="presentation" tabindex="0" id="'+g.id+'" cellpadding="0" cellspacing="0" class="'+k+" "+k+"Enabled"+(i["class"]?(" "+i["class"]):"")+'"><tbody><tr>';j+="<td>"+d.createHTML("span",{id:g.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},g.settings.title);j+=d.createHTML("a",{id:g.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},d.encode(g.settings.title))+"</td>";j+="<td>"+d.createHTML("a",{id:g.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span></span>')+"</td>";j+="</tr></tbody></table></span>";return j},showMenu:function(){var h=this,j,i=d.get(this.id),g;if(h.isDisabled()||h.items.length===0){return}if(h.menu&&h.menu.isMenuVisible){return h.hideMenu()}if(!h.isMenuRendered){h.renderMenu();h.isMenuRendered=true}j=d.getPos(i);g=h.menu;g.settings.offset_x=j.x;g.settings.offset_y=j.y;g.settings.keyboard_focus=!e.isOpera;f(h.items,function(k){if(g.items[k.id]){g.items[k.id].setSelected(0)}});f(h.items,function(k){if(g.items[k.id]&&h.marked[k.value]){g.items[k.id].setSelected(1)}if(k.value===h.selectedValue){g.items[k.id].setSelected(1)}});g.showMenu(0,i.clientHeight);b.add(d.doc,"mousedown",h.hideMenu,h);d.addClass(h.id,h.classPrefix+"Selected")},hideMenu:function(h){var g=this;if(g.menu&&g.menu.isMenuVisible){d.removeClass(g.id,g.classPrefix+"Selected");if(h&&h.type=="mousedown"&&(h.target.id==g.id+"_text"||h.target.id==g.id+"_open")){return}if(!h||!d.getParent(h.target,".mceMenu")){d.removeClass(g.id,g.classPrefix+"Selected");b.remove(d.doc,"mousedown",g.hideMenu,g);g.menu.hideMenu()}}},renderMenu:function(){var h=this,g;g=h.settings.control_manager.createDropMenu(h.id+"_menu",{menu_line:1,"class":h.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150});g.onHideMenu.add(function(){h.hideMenu();h.focus()});g.add({title:h.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}});f(h.items,function(i){if(i.value===c){g.add({title:i.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}})}else{i.id=d.uniqueId();i.role="option";i.onclick=function(){if(h.settings.onselect(i.value)!==false){h.select(i.value)}};g.add(i)}});h.onRenderMenu.dispatch(h,g);h.menu=g},postRender:function(){var g=this,h=g.classPrefix;b.add(g.id,"click",g.showMenu,g);b.add(g.id,"keydown",function(i){if(i.keyCode==32){g.showMenu(i);b.cancel(i)}});b.add(g.id,"focus",function(){if(!g._focused){g.keyDownHandler=b.add(g.id,"keydown",function(i){if(i.keyCode==40){g.showMenu();b.cancel(i)}});g.keyPressHandler=b.add(g.id,"keypress",function(j){var i;if(j.keyCode==13){i=g.selectedValue;g.selectedValue=null;b.cancel(j);g.settings.onselect(i)}})}g._focused=1});b.add(g.id,"blur",function(){b.remove(g.id,"keydown",g.keyDownHandler);b.remove(g.id,"keypress",g.keyPressHandler);g._focused=0});if(e.isIE6||!d.boxModel){b.add(g.id,"mouseover",function(){if(!d.hasClass(g.id,h+"Disabled")){d.addClass(g.id,h+"Hover")}});b.add(g.id,"mouseout",function(){if(!d.hasClass(g.id,h+"Disabled")){d.removeClass(g.id,h+"Hover")}})}g.onPostRender.dispatch(g,d.get(g.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(h,g){this.parent(h,g);this.classPrefix="mceNativeListBox"},setDisabled:function(g){d.get(this.id).disabled=g;this.setAriaProperty("disabled",g)},isDisabled:function(){return d.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){d.get(this.id).selectedIndex=g+1;this.selectedValue=this.items[g]?this.items[g].value:null},add:function(k,h,g){var j,i=this;g=g||{};g.value=h;if(i.isRendered()){d.add(d.get(this.id),"option",g,k)}j={title:k,value:h,attribs:g};i.items.push(j);i.onAdd.dispatch(i,j)},getLength:function(){return this.items.length},renderHTML:function(){var i,g=this;i=d.createHTML("option",{value:""},"-- "+g.settings.title+" --");f(g.items,function(h){i+=d.createHTML("option",{value:h.value},h.title)});i=d.createHTML("select",{id:g.id,"class":"mceNativeListBox","aria-labelledby":g.id+"_aria"},i);i+=d.createHTML("span",{id:g.id+"_aria",style:"display: none"},g.settings.title);return i},postRender:function(){var h=this,i,j=true;h.rendered=true;function g(l){var k=h.items[l.target.selectedIndex-1];if(k&&(k=k.value)){h.onChange.dispatch(h,k);if(h.settings.onselect){h.settings.onselect(k)}}}b.add(h.id,"change",g);b.add(h.id,"keydown",function(l){var k;b.remove(h.id,"change",i);j=false;k=b.add(h.id,"blur",function(){if(j){return}j=true;b.add(h.id,"change",g);b.remove(h.id,"blur",k)});if(e.isWebKit&&(l.keyCode==37||l.keyCode==39)){return b.prevent(l)}if(l.keyCode==13||l.keyCode==32){g(l);return b.cancel(l)}});h.onPostRender.dispatch(h,d.get(h.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.firstChild.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="<tbody><tr>";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span>');i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";i+="</tr></tbody>";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.firstChild.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.keyboardNav=new d.ui.KeyboardNavigation({root:f.id+"_menu",items:c.select("a",f.id+"_menu"),onCancel:function(){f.hideMenu();f.focus()}});f.keyboardNav.focus();f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch();f.keyboardNav.destroy()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return false});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){var f=this;f.parent();a.clear(f.id+"_menu");a.clear(f.id+"_more");c.remove(f.id+"_menu");if(f.keyboardNav){f.keyboardNav.destroy()}}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('<div id="'+f.id+'" role="group" aria-labelledby="'+f.id+'_voice">');i.push("<span role='application'>");i.push('<span id="'+f.id+'_voice" class="mceVoiceLabel" style="display:none;">'+d.encode(g.name)+"</span>");j(e,function(h){i.push(h.renderHTML())});i.push("</span>");i.push("</div>");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e<l.length;e++){k=l[e];d=l[e-1];g=l[e+1];if(e===0){j="mceToolbarStart";if(k.Button){j+=" mceToolbarStartButton"}else{if(k.SplitButton){j+=" mceToolbarStartSplitButton"}else{if(k.ListBox){j+=" mceToolbarStartListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,"<!-- IE -->"))}}if(c.stdMode){f+='<td style="position: relative">'+k.renderHTML()+"</td>"}else{f+="<td>"+k.renderHTML()+"</td>"}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,"<!-- IE -->"))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+f+"</tr></tbody>")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!==0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(x){var v=this,o,n=j.ScriptLoader,u,l=[],r;function q(t){var s=t.id;if(!s){s=t.name;if(s&&!k.get(s)){s=t.name}else{s=k.uniqueId()}t.setAttribute("id",s)}return s}function m(z,A,t){var y=z[A];if(!y){return}if(j.is(y,"string")){t=y.replace(/\.\w+$/,"");t=t?j.resolve(t):0;y=j.resolve(y)}return y.apply(t||this,Array.prototype.slice.call(arguments,2))}function p(t,s){return s.constructor===RegExp?s.test(t.className):k.hasClass(t,s)}v.settings=x;i.bind(window,"ready",function(){var s,t;m(x,"onpageload");switch(x.mode){case"exact":s=x.elements||"";if(s.length>0){g(e(s),function(y){if(k.get(y)){r=new j.Editor(y,x);l.push(r);r.render(1)}else{g(document.forms,function(z){g(z.elements,function(A){if(A.name===y){y="mce_editor_"+c++;k.setAttrib(A,"id",y);r=new j.Editor(y,x);l.push(r);r.render(1)}})})}})}break;case"textareas":case"specific_textareas":g(k.select("textarea"),function(y){if(x.editor_deselector&&p(y,x.editor_deselector)){return}if(!x.editor_selector||p(y,x.editor_selector)){r=new j.Editor(q(y),x);l.push(r);r.render(1)}});break;default:if(x.types){g(x.types,function(y){g(k.select(y.selector),function(A){var z=new j.Editor(q(A),j.extend({},x,y));l.push(z);z.render(1)})})}else{if(x.selector){g(k.select(x.selector),function(z){var y=new j.Editor(q(z),x);l.push(y);y.render(1)})}}}if(x.oninit){s=t=0;g(l,function(y){t++;if(!y.initialized){y.onInit.add(function(){s++;if(s==t){m(x,"oninit")}})}else{s++}if(s==t){m(x,"oninit")}})}})},get:function(l){if(l===a){return this.editors}if(!this.editors.hasOwnProperty(l)){return a}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l<o.length;l++){if(o[l]==n){o.splice(l,1);break}}if(m.activeEditor==n){m._setActive(o[0])}n.destroy();m.onRemoveEditor.dispatch(m,n);return n},execCommand:function(r,p,o){var q=this,n=q.get(o),l;function m(){n.destroy();l.detachEvent("onunload",m);l=l.tinyMCE=l.tinymce=null}switch(r){case"mceFocus":n.focus();return true;case"mceAddEditor":case"mceAddControl":if(!q.get(o)){new j.Editor(o,q.settings).render()}return true;case"mceAddFrameControl":l=o.window;l.tinyMCE=tinyMCE;l.tinymce=j;j.DOM.doc=l.document;j.DOM.win=l;n=new j.Editor(o.element_id,o);n.render();if(j.isIE){l.attachEvent("onunload",m)}o.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":if(n){n.remove()}return true;case"mceToggleEditor":if(!n){q.execCommand("mceAddControl",0,o);return true}if(n.isHidden()){n.show()}else{n.hide()}return true}if(q.activeEditor){return q.activeEditor.execCommand(r,p,o)}return false},execInstanceCommand:function(p,o,n,m){var l=this.get(p);if(l){return l.execCommand(o,n,m)}return false},triggerSave:function(){g(this.editors,function(l){l.save()})},addI18n:function(n,q){var l,m=this.i18n;if(!j.is(n,"string")){g(n,function(r,p){g(r,function(t,s){g(t,function(v,u){if(s==="common"){m[p+"."+u]=v}else{m[p+"."+s+"."+u]=v}})})})}else{g(q,function(r,p){m[n+"."+p]=r})}},_setActive:function(l){this.selectedInstance=this.activeEditor=l}})})(tinymce);(function(k){var l=k.DOM,j=k.dom.Event,f=k.extend,i=k.each,a=k.isGecko,b=k.isIE,e=k.isWebKit,d=k.is,h=k.ThemeManager,c=k.PluginManager,g=k.explode;k.create("tinymce.Editor",{Editor:function(p,o){var m=this,n=true;m.settings=o=f({id:p,language:"en",theme:"advanced",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:k.documentBaseURL,add_form_submit_trigger:n,submit_patch:n,add_unload_trigger:n,convert_urls:n,relative_urls:n,remove_script_host:n,table_inline_editing:false,object_resizing:n,accessibility_focus:n,doctype:k.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual:n,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:n,directionality:"ltr",forced_root_block:"p",hidden_input:n,padd_empty_editor:n,render_ui:n,indentation:"30px",fix_table_elements:n,inline_styles:n,convert_fonts_to_spans:n,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:n,entity_encoding:"named",url_converter:m.convertURL,url_converter_scope:m,ie7_compat:n},o);m.id=m.editorId=p;m.isNotDirty=false;m.plugins={};m.documentBaseURI=new k.util.URI(o.document_base_url||k.documentBaseURL,{base_uri:tinyMCE.baseURI});m.baseURI=k.baseURI;m.contentCSS=[];m.contentStyles=[];m.setupEvents();m.execCommands={};m.queryStateCommands={};m.queryValueCommands={};m.execCallback("setup",m)},render:function(o){var p=this,q=p.settings,r=p.id,m=k.ScriptLoader;if(!j.domLoaded){j.add(window,"ready",function(){p.render()});return}tinyMCE.settings=q;if(!p.getElement()){return}if(k.isIDevice&&!k.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(p.getElement().nodeName)&&q.hidden_input&&l.getParent(r,"form")){l.insertAfter(l.create("input",{type:"hidden",name:r}),r)}if(!q.content_editable){p.orgVisibility=p.getElement().style.visibility;p.getElement().style.visibility="hidden"}if(k.WindowManager){p.windowManager=new k.WindowManager(p)}if(q.encoding=="xml"){p.onGetContent.add(function(s,t){if(t.save){t.content=l.encode(t.content)}})}if(q.add_form_submit_trigger){p.onSubmit.addToTop(function(){if(p.initialized){p.save();p.isNotDirty=1}})}if(q.add_unload_trigger){p._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(p.initialized&&!p.destroyed&&!p.isHidden()){p.save({format:"raw",no_events:true})}})}k.addUnload(p.destroy,p);if(q.submit_patch){p.onBeforeRenderUI.add(function(){var s=p.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){p.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){k.triggerSave();p.isNotDirty=1;return p.formElement._mceOldSubmit(p.formElement)}}s=null})}function n(){if(q.language&&q.language_load!==false){m.add(k.baseURL+"/langs/"+q.language+".js")}if(q.theme&&typeof q.theme!="function"&&q.theme.charAt(0)!="-"&&!h.urls[q.theme]){h.load(q.theme,"themes/"+q.theme+"/editor_template"+k.suffix+".js")}i(g(q.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(v){var u={prefix:"plugins/",resource:v,suffix:"/editor_plugin"+k.suffix+".js"};v=c.createUrl(u,v);c.load(v.resource,v)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+k.suffix+".js"})}}});m.loadQueue(function(){if(!p.removed){p.init()}})}n()},init:function(){var q,G=this,H=G.settings,D,y,z,C=G.getElement(),p,m,E,v,B,F,x,r=[];k.add(G);H.aria_label=H.aria_label||l.getAttrib(C,"aria-label",G.getLang("aria.rich_text_area"));if(H.theme){if(typeof H.theme!="function"){H.theme=H.theme.replace(/-/,"");p=h.get(H.theme);G.theme=new p();if(G.theme.init){G.theme.init(G,h.urls[H.theme]||k.documentBaseURL.replace(/\/$/,""))}}else{G.theme=H.theme}}function A(s){var t=c.get(s),o=c.urls[s]||k.documentBaseURL.replace(/\/$/,""),n;if(t&&k.inArray(r,s)===-1){i(c.dependencies(s),function(u){A(u)});n=new t(G,o);G.plugins[s]=n;if(n.init){n.init(G,o);r.push(s)}}}i(g(H.plugins.replace(/\-/g,"")),A);if(H.popup_css!==false){if(H.popup_css){H.popup_css=G.documentBaseURI.toAbsolute(H.popup_css)}else{H.popup_css=G.baseURI.toAbsolute("themes/"+H.theme+"/skins/"+H.skin+"/dialog.css")}}if(H.popup_css_add){H.popup_css+=","+G.documentBaseURI.toAbsolute(H.popup_css_add)}G.controlManager=new k.ControlManager(G);G.onBeforeRenderUI.dispatch(G,G.controlManager);if(H.render_ui&&G.theme){G.orgDisplay=C.style.display;if(typeof H.theme!="function"){D=H.width||C.style.width||C.offsetWidth;y=H.height||C.style.height||C.offsetHeight;z=H.min_height||100;F=/^[0-9\.]+(|px)$/i;if(F.test(""+D)){D=Math.max(parseInt(D,10)+(p.deltaWidth||0),100)}if(F.test(""+y)){y=Math.max(parseInt(y,10)+(p.deltaHeight||0),z)}p=G.theme.renderUI({targetNode:C,width:D,height:y,deltaWidth:H.delta_width,deltaHeight:H.delta_height});l.setStyles(p.sizeContainer||p.editorContainer,{width:D,height:y});y=(p.iframeHeight||y)+(typeof(y)=="number"?(p.deltaHeight||0):"");if(y<z){y=z}}else{p=H.theme(G,C);if(p.editorContainer.nodeType){p.editorContainer=p.editorContainer.id=p.editorContainer.id||G.id+"_parent"}if(p.iframeContainer.nodeType){p.iframeContainer=p.iframeContainer.id=p.iframeContainer.id||G.id+"_iframecontainer"}y=p.iframeHeight||C.offsetHeight;if(b){G.onInit.add(function(n){n.dom.bind(n.getBody(),"beforedeactivate keydown",function(){n.lastIERng=n.selection.getRng()})})}}G.editorContainer=p.editorContainer}if(H.content_css){i(g(H.content_css),function(n){G.contentCSS.push(G.documentBaseURI.toAbsolute(n))})}if(H.content_style){G.contentStyles.push(H.content_style)}if(H.content_editable){C=q=p=null;return G.initContentBody()}if(document.domain&&location.hostname!=document.domain){k.relaxedDomain=document.domain}G.iframeHTML=H.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">';if(H.document_base_url!=k.documentBaseURL){G.iframeHTML+='<base href="'+G.documentBaseURI.getURI()+'" />'}if(H.ie7_compat){G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'}else{G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=edge" />'}G.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';for(x=0;x<G.contentCSS.length;x++){G.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+G.contentCSS[x]+'" />'}G.contentCSS=[];v=H.body_id||"tinymce";if(v.indexOf("=")!=-1){v=G.getParam("body_id","","hash");v=v[G.id]||v}B=H.body_class||"";if(B.indexOf("=")!=-1){B=G.getParam("body_class","","hash");B=B[G.id]||""}G.iframeHTML+='</head><body id="'+v+'" class="mceContentBody '+B+'" onload="window.parent.tinyMCE.get(\''+G.id+"').onLoad.dispatch();\"><br></body></html>";if(k.relaxedDomain&&(b||(k.isOpera&&parseFloat(opera.version())<11))){E='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+G.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'}q=l.add(p.iframeContainer,"iframe",{id:G.id+"_ifr",src:E||'javascript:""',frameBorder:"0",allowTransparency:"true",title:H.aria_label,style:{width:"100%",height:y,display:"block"}});G.contentAreaContainer=p.iframeContainer;if(p.editorContainer){l.get(p.editorContainer).style.display=G.orgDisplay}C.style.visibility=G.orgVisibility;l.get(G.id).style.display="none";l.setAttrib(G.id,"aria-hidden",true);if(!k.relaxedDomain||!E){G.initContentBody()}C=q=p=null},initContentBody:function(){var n=this,p=n.settings,q=l.get(n.id),r=n.getDoc(),o,m,s;if((!b||!k.relaxedDomain)&&!p.content_editable){r.open();r.write(n.iframeHTML);r.close();if(k.relaxedDomain){r.domain=k.relaxedDomain}}if(p.content_editable){l.addClass(q,"mceContentBody");n.contentDocument=r=p.content_document||document;n.contentWindow=p.content_window||window;n.bodyElement=q;p.content_document=p.content_window=null}m=n.getBody();m.disabled=true;if(!p.readonly){m.contentEditable=n.getParam("content_editable_state",true)}m.disabled=false;n.schema=new k.html.Schema(p);n.dom=new k.dom.DOMUtils(r,{keep_values:true,url_converter:n.convertURL,url_converter_scope:n,hex_colors:p.force_hex_style_colors,class_filter:p.class_filter,update_styles:true,root_element:p.content_editable?n.id:null,schema:n.schema});n.parser=new k.html.DomParser(p,n.schema);n.parser.addAttributeFilter("src,href,style",function(t,u){var v=t.length,y,A=n.dom,z,x;while(v--){y=t[v];z=y.attr(u);x="data-mce-"+u;if(!y.attributes.map[x]){if(u==="style"){y.attr(x,A.serializeStyle(A.parseStyle(z),y.name))}else{y.attr(x,n.convertURL(z,u,y.name))}}}});n.parser.addNodeFilter("script",function(t,u){var v=t.length,x;while(v--){x=t[v];x.attr("type","mce-"+(x.attr("type")||"text/javascript"))}});n.parser.addNodeFilter("#cdata",function(t,u){var v=t.length,x;while(v--){x=t[v];x.type=8;x.name="#comment";x.value="[CDATA["+x.value+"]]"}});n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(u,v){var x=u.length,y,t=n.schema.getNonEmptyElements();while(x--){y=u[x];if(y.isEmpty(t)){y.empty().append(new k.html.Node("br",1)).shortEnded=true}}});n.serializer=new k.dom.Serializer(p,n.dom,n.schema);n.selection=new k.dom.Selection(n.dom,n.getWin(),n.serializer,n);n.formatter=new k.Formatter(n);n.undoManager=new k.UndoManager(n);n.forceBlocks=new k.ForceBlocks(n);n.enterKey=new k.EnterKey(n);n.editorCommands=new k.EditorCommands(n);n.onExecCommand.add(function(t,u){if(!/^(FontName|FontSize)$/.test(u)){n.nodeChanged()}});n.serializer.onPreProcess.add(function(t,u){return n.onPreProcess.dispatch(n,u,t)});n.serializer.onPostProcess.add(function(t,u){return n.onPostProcess.dispatch(n,u,t)});n.onPreInit.dispatch(n);if(!p.browser_spellcheck&&!p.gecko_spellcheck){r.body.spellcheck=false}if(!p.readonly){n.bindNativeEvents()}n.controlManager.onPostRender.dispatch(n,n.controlManager);n.onPostRender.dispatch(n);n.quirks=k.util.Quirks(n);if(p.directionality){m.dir=p.directionality}if(p.nowrap){m.style.whiteSpace="nowrap"}if(p.protect){n.onBeforeSetContent.add(function(t,u){i(p.protect,function(v){u.content=u.content.replace(v,function(x){return"<!--mce:protected "+escape(x)+"-->"})})})}n.onSetContent.add(function(){n.addVisual(n.getBody())});if(p.padd_empty_editor){n.onPostProcess.add(function(t,u){u.content=u.content.replace(/^(<p[^>]*>( | |\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")})}n.load({initial:true,format:"html"});n.startContent=n.getContent({format:"raw"});n.initialized=true;n.onInit.dispatch(n);n.execCallback("setupcontent_callback",n.id,m,r);n.execCallback("init_instance_callback",n);n.focus(true);n.nodeChanged({initial:true});if(n.contentStyles.length>0){s="";i(n.contentStyles,function(t){s+=t+"\r\n"});n.dom.addStyle(s)}i(n.contentCSS,function(t){n.dom.loadCSS(t)});if(p.auto_focus){setTimeout(function(){var t=k.get(p.auto_focus);t.selection.select(t.getBody(),1);t.selection.collapse(1);t.getBody().focus();t.getWin().focus()},100)}q=r=m=null},focus:function(p){var o,u=this,t=u.selection,q=u.settings.content_editable,n,r,s=u.getDoc(),m;if(!p){if(u.lastIERng){t.setRng(u.lastIERng)}n=t.getRng();if(n.item){r=n.item(0)}u._refreshContentEditable();if(!q){u.getWin().focus()}if(k.isGecko||q){m=u.getBody();if(m.setActive){m.setActive()}else{m.focus()}if(q){t.normalize()}}if(r&&r.ownerDocument==s){n=s.body.createControlRange();n.addElement(r);n.select()}}if(k.activeEditor!=u){if((o=k.activeEditor)!=null){o.onDeactivate.dispatch(o,u)}u.onActivate.dispatch(u,o)}k._setActive(u)},execCallback:function(q){var m=this,p=m.settings[q],o;if(!p){return}if(m.callbackLookup&&(o=m.callbackLookup[q])){p=o.func;o=o.scope}if(d(p,"string")){o=p.replace(/\.\w+$/,"");o=o?k.resolve(o):0;p=k.resolve(p);m.callbackLookup=m.callbackLookup||{};m.callbackLookup[q]={func:p,scope:o}}return p.apply(o||m,Array.prototype.slice.call(arguments,1))},translate:function(m){var o=this.settings.language||"en",n=k.i18n;if(!m){return""}return n[o+"."+m]||m.replace(/\{\#([^\}]+)\}/g,function(q,p){return n[o+"."+p]||"{#"+p+"}"})},getLang:function(o,m){return k.i18n[(this.settings.language||"en")+"."+o]||(d(m)?m:"{#"+o+"}")},getParam:function(t,q,m){var r=k.trim,p=d(this.settings[t])?this.settings[t]:q,s;if(m==="hash"){s={};if(d(p,"string")){i(p.indexOf("=")>0?p.split(/[;,](?![^=;,]*(?:[;,]|$))/):p.split(","),function(n){n=n.split("=");if(n.length>1){s[r(n[0])]=r(n[1])}else{s[r(n[0])]=r(n)}})}else{s=p}return s}return p},nodeChanged:function(q){var m=this,n=m.selection,p;if(m.initialized){q=q||{};p=n.getStart()||m.getBody();p=b&&p.ownerDocument!=m.getDoc()?m.getBody():p;q.parents=[];m.dom.getParent(p,function(o){if(o.nodeName=="BODY"){return true}q.parents.push(o)});m.onNodeChange.dispatch(m,q?q.controlManager||m.controlManager:m.controlManager,p,n.isCollapsed(),q)}},addButton:function(n,o){var m=this;m.buttons=m.buttons||{};m.buttons[n]=o},addCommand:function(m,o,n){this.execCommands[m]={func:o,scope:n||this}},addQueryStateHandler:function(m,o,n){this.queryStateCommands[m]={func:o,scope:n||this}},addQueryValueHandler:function(m,o,n){this.queryValueCommands[m]={func:o,scope:n||this}},addShortcut:function(o,q,m,p){var n=this,r;if(n.settings.custom_shortcuts===false){return false}n.shortcuts=n.shortcuts||{};if(d(m,"string")){r=m;m=function(){n.execCommand(r,false,null)}}if(d(m,"object")){r=m;m=function(){n.execCommand(r[0],r[1],r[2])}}i(g(o),function(s){var t={func:m,scope:p||this,desc:n.translate(q),alt:false,ctrl:false,shift:false};i(g(s,"+"),function(u){switch(u){case"alt":case"ctrl":case"shift":t[u]=true;break;default:t.charCode=u.charCodeAt(0);t.keyCode=u.toUpperCase().charCodeAt(0)}});n.shortcuts[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t});return true},execCommand:function(u,r,x,m){var p=this,q=0,v,n;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(u)&&(!m||!m.skip_focus)){p.focus()}m=f({},m);p.onBeforeExecCommand.dispatch(p,u,r,x,m);if(m.terminate){return false}if(p.execCallback("execcommand_callback",p.id,p.selection.getNode(),u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(v=p.execCommands[u]){n=v.func.call(v.scope,r,x);if(n!==true){p.onExecCommand.dispatch(p,u,r,x,m);return n}}i(p.plugins,function(o){if(o.execCommand&&o.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);q=1;return false}});if(q){return true}if(p.theme&&p.theme.execCommand&&p.theme.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(p.editorCommands.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}p.getDoc().execCommand(u,r,x);p.onExecCommand.dispatch(p,u,r,x,m)},queryCommandState:function(q){var n=this,r,p;if(n._isHidden()){return}if(r=n.queryStateCommands[q]){p=r.func.call(r.scope);if(p!==true){return p}}r=n.editorCommands.queryCommandState(q);if(r!==-1){return r}try{return this.getDoc().queryCommandState(q)}catch(m){}},queryCommandValue:function(r){var n=this,q,p;if(n._isHidden()){return}if(q=n.queryValueCommands[r]){p=q.func.call(q.scope);if(p!==true){return p}}q=n.editorCommands.queryCommandValue(r);if(d(q)){return q}try{return this.getDoc().queryCommandValue(r)}catch(m){}},show:function(){var m=this;l.show(m.getContainer());l.hide(m.id);m.load()},hide:function(){var m=this,n=m.getDoc();if(b&&n){n.execCommand("SelectAll")}m.save();setTimeout(function(){l.hide(m.getContainer())},1);l.setStyle(m.id,"display",m.orgDisplay)},isHidden:function(){return !l.isHidden(this.id)},setProgressState:function(m,n,p){this.onSetProgressState.dispatch(this,m,n,p);return m},load:function(q){var m=this,p=m.getElement(),n;if(p){q=q||{};q.load=true;n=m.setContent(d(p.value)?p.value:p.innerHTML,q);q.element=p;if(!q.no_events){m.onLoadContent.dispatch(m,q)}q.element=p=null;return n}},save:function(r){var m=this,q=m.getElement(),n,p;if(!q||!m.initialized){return}r=r||{};r.save=true;r.element=q;n=r.content=m.getContent(r);if(!r.no_events){m.onSaveContent.dispatch(m,r)}n=r.content;if(!/TEXTAREA|INPUT/i.test(q.nodeName)){q.innerHTML=n;if(p=l.getParent(m.id,"form")){i(p.elements,function(o){if(o.name==m.id){o.value=n;return false}})}}else{q.value=n}r.element=q=null;return n},setContent:function(r,p){var o=this,n,m=o.getBody(),q;p=p||{};p.format=p.format||"html";p.set=true;p.content=r;if(!p.no_events){o.onBeforeSetContent.dispatch(o,p)}r=p.content;if(!k.isIE&&(r.length===0||/^\s+$/.test(r))){q=o.settings.forced_root_block;if(q){r="<"+q+'><br data-mce-bogus="1"></'+q+">"}else{r='<br data-mce-bogus="1">'}m.innerHTML=r;o.selection.select(m,true);o.selection.collapse(true);return}if(p.format!=="raw"){r=new k.html.Serializer({},o.schema).serialize(o.parser.parse(r))}p.content=k.trim(r);o.dom.setHTML(m,p.content);if(!p.no_events){o.onSetContent.dispatch(o,p)}if(!o.settings.content_editable||document.activeElement===o.getBody()){o.selection.normalize()}return p.content},getContent:function(o){var n=this,p,m=n.getBody();o=o||{};o.format=o.format||"html";o.get=true;o.getInner=true;if(!o.no_events){n.onBeforeGetContent.dispatch(n,o)}if(o.format=="raw"){p=m.innerHTML}else{if(o.format=="text"){p=m.innerText||m.textContent}else{p=n.serializer.serialize(m,o)}}if(o.format!="text"){o.content=k.trim(p)}else{o.content=p}if(!o.no_events){n.onGetContent.dispatch(n,o)}return o.content},isDirty:function(){var m=this;return k.trim(m.startContent)!=k.trim(m.getContent({format:"raw",no_events:1}))&&!m.isNotDirty},getContainer:function(){var m=this;if(!m.container){m.container=l.get(m.editorContainer||m.id+"_parent")}return m.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return l.get(this.settings.content_element||this.id)},getWin:function(){var m=this,n;if(!m.contentWindow){n=l.get(m.id+"_ifr");if(n){m.contentWindow=n.contentWindow}}return m.contentWindow},getDoc:function(){var m=this,n;if(!m.contentDocument){n=m.getWin();if(n){m.contentDocument=n.document}}return m.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(o,n,q){var m=this,p=m.settings;if(p.urlconverter_callback){return m.execCallback("urlconverter_callback",o,q,true,n)}if(!p.convert_urls||(q&&q.nodeName=="LINK")||o.indexOf("file:")===0){return o}if(p.relative_urls){return m.documentBaseURI.toRelative(o)}o=m.documentBaseURI.toAbsolute(o,p.remove_script_host);return o},addVisual:function(q){var n=this,o=n.settings,p=n.dom,m;q=q||n.getBody();if(!d(n.hasVisual)){n.hasVisual=o.visual}i(p.select("table,a",q),function(s){var r;switch(s.nodeName){case"TABLE":m=o.visual_table_class||"mceItemTable";r=p.getAttrib(s,"border");if(!r||r=="0"){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}return;case"A":if(!p.getAttrib(s,"href",false)){r=p.getAttrib(s,"name")||s.id;m="mceItemAnchor";if(r){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}}return}});n.onVisualAid.dispatch(n,q,n.hasVisual)},remove:function(){var m=this,n=m.getContainer();if(!m.removed){m.removed=1;m.hide();if(!m.settings.content_editable){j.unbind(m.getWin());j.unbind(m.getDoc())}j.unbind(m.getBody());j.clear(n);m.execCallback("remove_instance_callback",m);m.onRemove.dispatch(m);m.onExecCommand.listeners=[];k.remove(m);l.remove(n)}},destroy:function(n){var m=this;if(m.destroyed){return}if(a){j.unbind(m.getDoc());j.unbind(m.getWin());j.unbind(m.getBody())}if(!n){k.removeUnload(m.destroy);tinyMCE.onBeforeUnload.remove(m._beforeUnload);if(m.theme&&m.theme.destroy){m.theme.destroy()}m.controlManager.destroy();m.selection.destroy();m.dom.destroy()}if(m.formElement){m.formElement.submit=m.formElement._mceOldSubmit;m.formElement._mceOldSubmit=null}m.contentAreaContainer=m.formElement=m.container=m.settings.content_element=m.bodyElement=m.contentDocument=m.contentWindow=null;if(m.selection){m.selection=m.selection.win=m.selection.dom=m.selection.dom.doc=null}m.destroyed=1},_refreshContentEditable:function(){var n=this,m,o;if(n._isHidden()){m=n.getBody();o=m.parentNode;o.removeChild(m);o.appendChild(m);m.focus()}},_isHidden:function(){var m;if(!a){return 0}m=this.selection.getSel();return(!m||!m.rangeCount||m.rangeCount===0)}})})(tinymce);(function(a){var b=a.each;a.Editor.prototype.setupEvents=function(){var c=this,d=c.settings;b(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(e){c[e]=new a.util.Dispatcher(c)});if(d.cleanup_callback){c.onBeforeSetContent.add(function(e,f){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)});c.onPreProcess.add(function(e,f){if(f.set){e.execCallback("cleanup_callback","insert_to_editor_dom",f.node,f)}if(f.get){e.execCallback("cleanup_callback","get_from_editor_dom",f.node,f)}});c.onPostProcess.add(function(e,f){if(f.set){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)}if(f.get){f.content=e.execCallback("cleanup_callback","get_from_editor",f.content,f)}})}if(d.save_callback){c.onGetContent.add(function(e,f){if(f.save){f.content=e.execCallback("save_callback",e.id,f.content,e.getBody())}})}if(d.handle_event_callback){c.onEvent.add(function(f,g,h){if(c.execCallback("handle_event_callback",g,f,h)===false){g.preventDefault();g.stopPropagation()}})}if(d.handle_node_change_callback){c.onNodeChange.add(function(f,e,g){f.execCallback("handle_node_change_callback",f.id,g,-1,-1,true,f.selection.isCollapsed())})}if(d.save_callback){c.onSaveContent.add(function(e,g){var f=e.execCallback("save_callback",e.id,g.content,e.getBody());if(f){g.content=f}})}if(d.onchange_callback){c.onChange.add(function(f,e){f.execCallback("onchange_callback",f,e)})}};a.Editor.prototype.bindNativeEvents=function(){var l=this,f,d=l.settings,e=l.dom,h;h={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function c(i,m){var n=i.type;if(l.removed){return}if(l.onEvent.dispatch(l,i,m)!==false){l[h[i.fakeType||i.type]].dispatch(l,i,m)}}function j(i){l.focus(true)}function k(i,m){if(m.keyCode!=65||!a.VK.metaKeyPressed(m)){l.selection.normalize()}l.nodeChanged()}b(h,function(m,n){var i=d.content_editable?l.getBody():l.getDoc();switch(n){case"contextmenu":e.bind(i,n,c);break;case"paste":e.bind(l.getBody(),n,c);break;case"submit":case"reset":e.bind(l.getElement().form||a.DOM.getParent(l.id,"form"),n,c);break;default:e.bind(i,n,c)}});e.bind(d.content_editable?l.getBody():(a.isGecko?l.getDoc():l.getWin()),"focus",function(i){l.focus(true)});if(d.content_editable&&a.isOpera){e.bind(l.getBody(),"click",j);e.bind(l.getBody(),"keydown",j)}l.onMouseUp.add(k);l.onKeyUp.add(function(i,n){var m=n.keyCode;if((m>=33&&m<=36)||(m>=37&&m<=40)||m==13||m==45||m==46||m==8||(a.isMac&&(m==91||m==93))||n.ctrlKey){k(i,n)}});l.onReset.add(function(){l.setContent(l.startContent,{format:"raw"})});function g(m,i){if(m.altKey||m.ctrlKey||m.metaKey){b(l.shortcuts,function(n){var o=a.isMac?m.metaKey:m.ctrlKey;if(n.ctrl!=o||n.alt!=m.altKey||n.shift!=m.shiftKey){return}if(m.keyCode==n.keyCode||(m.charCode&&m.charCode==n.charCode)){m.preventDefault();if(i){n.func.call(n.scope)}return true}})}}l.onKeyUp.add(function(i,m){g(m)});l.onKeyPress.add(function(i,m){g(m)});l.onKeyDown.add(function(i,m){g(m,true)});if(a.isOpera){l.onClick.add(function(i,m){m.preventDefault()})}}})(tinymce);(function(d){var e=d.each,b,a=true,c=false;d.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return c}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return c}function u(v,x){x=x||"exec";e(v,function(z,y){e(y.toLowerCase().split(","),function(A){j[x][A]=z})})}d.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===b){x=c}if(v===b){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:b)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(d.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(c)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);e("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=d.explode(k.font_size_style_values);v=d.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return c}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new d.html.Serializer({},n.schema);v='<span id="mce_marker" data-mce-type="bookmark">\uFEFF</span>';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=p.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.y<L.y)||(C.x>L.x+L.w||C.x<L.x)){H=d.isIE?n.getDoc().documentElement:n.getBody();H.scrollLeft=C.x;H.scrollTop=C.y-L.h+25}x=m.createRng();A=D.previousSibling;if(A&&A.nodeType==3){x.setStart(A,A.nodeValue.length)}else{x.setStartBefore(D);x.setEndBefore(D)}m.remove(D);p.setRng(x);p.onSetContent.dispatch(p,G);n.addVisual()},mceInsertRawHTML:function(y,x,v){p.setContent("tiny_mce_marker");n.setContent(n.getContent().replace(/tiny_mce_marker/g,function(){return v}))},mceToggleFormat:function(y,x,v){s(v)},mceSetContent:function(y,x,v){n.setContent(v)},"Indent,Outdent":function(z){var x,v,y;x=k.indentation;v=/[a-z%]+$/i.exec(x);x=parseInt(x);if(!l("InsertUnorderedList")&&!l("InsertOrderedList")){if(!k.forced_root_block&&!m.getParent(p.getNode(),m.isBlock)){q.apply("div")}e(p.getSelectedBlocks(),function(A){if(z=="outdent"){y=Math.max(0,parseInt(A.style.paddingLeft||0)-x);m.setStyle(A,"paddingLeft",y?y+v:"")}else{m.setStyle(A,"paddingLeft",(parseInt(A.style.paddingLeft||0)+x)+v)}})}else{f(z)}},mceRepaint:function(){var x;if(d.isGecko){try{i(a);if(p.getSel()){p.getSel().selectAllChildren(n.getBody())}p.collapse(a);g()}catch(v){}}},mceToggleFormat:function(y,x,v){q.toggle(v)},InsertHorizontalRule:function(){n.execCommand("mceInsertContent",false,"<hr />")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();if(p.getRng().setStart){v.setStart(x,0);v.setEnd(x,x.childNodes.length);p.setRng(v)}else{f("SelectAll")}}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(z){var x="align"+z.substring(7);var v=p.isCollapsed()?[m.getParent(p.getNode(),m.isBlock)]:p.getSelectedBlocks();var y=d.map(v,function(A){return !!q.matchNode(A,x)});return d.inArray(y,a)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(x){var v=m.getParent(p.getNode(),"ul,ol");return v&&(x==="insertunorderedlist"&&v.tagName==="UL"||x==="insertorderedlist"&&v.tagName==="OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(h){var l,i=0,e=[],g,k,j,f;function c(){return b.trim(h.getContent({format:"raw",no_events:1}).replace(/<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function d(){l.typing=false;l.add()}onBeforeAdd=new a(l);k=new a(l);j=new a(l);f=new a(l);k.add(function(m,n){if(m.hasUndo()){return h.onChange.dispatch(h,n,m)}});j.add(function(m,n){return h.onUndo.dispatch(h,n,m)});f.add(function(m,n){return h.onRedo.dispatch(h,n,m)});h.onInit.add(function(){l.add()});h.onBeforeExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.beforeChange()}});h.onExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.add()}});h.onSaveContent.add(d);h.dom.bind(h.dom.getRoot(),"dragend",d);h.dom.bind(h.getDoc(),b.isGecko?"blur":"focusout",function(m){if(!h.removed&&l.typing){d()}});h.onKeyUp.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45||n==13||o.ctrlKey){d()}});h.onKeyDown.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45){if(l.typing){d()}return}if((n<16||n>20)&&n!=224&&n!=91&&!l.typing){l.beforeChange();l.typing=true;l.add()}});h.onMouseDown.add(function(m,n){if(l.typing){d()}});h.addShortcut("ctrl+z","undo_desc","Undo");h.addShortcut("ctrl+y","redo_desc","Redo");l={data:e,typing:false,onBeforeAdd:onBeforeAdd,onAdd:k,onUndo:j,onRedo:f,beforeChange:function(){g=h.selection.getBookmark(2,true)},add:function(p){var m,n=h.settings,o;p=p||{};p.content=c();l.onBeforeAdd.dispatch(l,p);o=e[i];if(o&&o.content==p.content){return null}if(e[i]){e[i].beforeBookmark=g}if(n.custom_undo_redo_levels){if(e.length>n.custom_undo_redo_levels){for(m=0;m<e.length-1;m++){e[m]=e[m+1]}e.length--;i=e.length}}p.bookmark=h.selection.getBookmark(2,true);if(i<e.length-1){e.length=i+1}e.push(p);i=e.length-1;l.onAdd.dispatch(l,p);h.isNotDirty=0;return p},undo:function(){var n,m;if(l.typing){l.add();l.typing=false}if(i>0){n=e[--i];h.setContent(n.content,{format:"raw"});h.selection.moveToBookmark(n.beforeBookmark);l.onUndo.dispatch(l,n)}return n},redo:function(){var m;if(i<e.length-1){m=e[++i];h.setContent(m.content,{format:"raw"});h.selection.moveToBookmark(m.bookmark);l.onRedo.dispatch(l,m)}return m},clear:function(){e=[];i=0;l.typing=false},hasUndo:function(){return i>0||this.typing},hasRedo:function(){return i<e.length-1&&!this.typing}};return l}})(tinymce);tinymce.ForceBlocks=function(c){var b=c.settings,e=c.dom,a=c.selection,d=c.schema.getBlockElements();function f(){var j=a.getStart(),h=c.getBody(),g,k,o,s,q,i,l,m=-16777215,p,r;if(!j||j.nodeType!==1||!b.forced_root_block){return}while(j&&j!=h){if(d[j.nodeName]){return}j=j.parentNode}g=a.getRng();if(g.setStart){k=g.startContainer;o=g.startOffset;s=g.endContainer;q=g.endOffset}else{if(g.item){j=g.item(0);g=c.getDoc().body.createTextRange();g.moveToElementText(j)}r=g.parentElement().ownerDocument===c.getDoc();tmpRng=g.duplicate();tmpRng.collapse(true);o=tmpRng.move("character",m)*-1;if(!tmpRng.collapsed){tmpRng=g.duplicate();tmpRng.collapse(false);q=(tmpRng.move("character",m)*-1)-o}}j=h.firstChild;while(j){if(j.nodeType===3||(j.nodeType==1&&!d[j.nodeName])){if(j.nodeType===3&&j.nodeValue.length==0){l=j;j=j.nextSibling;e.remove(l);continue}if(!i){i=e.create(b.forced_root_block);j.parentNode.insertBefore(i,j);p=true}l=j;j=j.nextSibling;i.appendChild(l)}else{i=null;j=j.nextSibling}}if(p){if(g.setStart){g.setStart(k,o);g.setEnd(s,q);a.setRng(g)}else{if(r){try{g=c.getDoc().body.createTextRange();g.moveToElementText(h);g.collapse(true);g.moveStart("character",o);if(q>0){g.moveEnd("character",q)}g.select()}catch(n){}}}c.nodeChanged()}}if(b.forced_root_block){c.onKeyUp.add(f);c.onNodeChange.add(f)}};(function(c){var b=c.DOM,a=c.dom.Event,d=c.each,e=c.extend;c.create("tinymce.ControlManager",{ControlManager:function(f,j){var h=this,g;j=j||{};h.editor=f;h.controls={};h.onAdd=new c.util.Dispatcher(h);h.onPostRender=new c.util.Dispatcher(h);h.prefix=j.prefix||f.id+"_";h._cls={};h.onPostRender.add(function(){d(h.controls,function(i){i.postRender()})})},get:function(f){return this.controls[this.prefix+f]||this.controls[f]},setActive:function(h,f){var g=null;if(g=this.get(h)){g.setActive(f)}return g},setDisabled:function(h,f){var g=null;if(g=this.get(h)){g.setDisabled(f)}return g},add:function(g){var f=this;if(g){f.controls[g.id]=g;f.onAdd.dispatch(g,f)}return g},createControl:function(j){var o,k,g,h=this,m=h.editor,n,f;if(!h.controlFactories){h.controlFactories=[];d(m.plugins,function(i){if(i.createControl){h.controlFactories.push(i)}})}n=h.controlFactories;for(k=0,g=n.length;k<g;k++){o=n[k].createControl(j,h);if(o){return h.add(o)}}if(j==="|"||j==="separator"){return h.createSeparator()}if(m.buttons&&(o=m.buttons[j])){return h.createButton(j,o)}return h.add(o)},createDropMenu:function(f,n,h){var m=this,i=m.editor,j,g,k,l;n=e({"class":"mceDropDown",constrain:i.settings.constrain_menus},n);n["class"]=n["class"]+" "+i.getParam("skin")+"Skin";if(k=i.getParam("skin_variant")){n["class"]+=" "+i.getParam("skin")+"Skin"+k.substring(0,1).toUpperCase()+k.substring(1)}n["class"]+=i.settings.directionality=="rtl"?" mceRtl":"";f=m.prefix+f;l=h||m._cls.dropmenu||c.ui.DropMenu;j=m.controls[f]=new l(f,n);j.onAddItem.add(function(r,q){var p=q.settings;p.title=i.getLang(p.title,p.title);if(!p.onclick){p.onclick=function(o){if(p.cmd){i.execCommand(p.cmd,p.ui||false,p.value)}}}});i.onRemove.add(function(){j.destroy()});if(c.isIE){j.onShowMenu.add(function(){i.focus();g=i.selection.getBookmark(1)});j.onHideMenu.add(function(){if(g){i.selection.moveToBookmark(g);g=0}})}return m.add(j)},createListBox:function(f,n,h){var l=this,j=l.editor,i,k,m;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,scope:n.scope,control_manager:l},n);f=l.prefix+f;function g(o){return o.settings.use_accessible_selects&&!c.isGecko}if(j.settings.use_native_selects||g(j)){k=new c.ui.NativeListBox(f,n)}else{m=h||l._cls.listbox||c.ui.ListBox;k=new m(f,n,j)}l.controls[f]=k;if(c.isWebKit){k.onPostRender.add(function(p,o){a.add(o,"mousedown",function(){j.bookmark=j.selection.getBookmark(1)});a.add(o,"focus",function(){j.selection.moveToBookmark(j.bookmark);j.bookmark=null})})}if(k.hideMenu){j.onMouseDown.add(k.hideMenu,k)}return l.add(k)},createButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.label=g.translate(i.label);i.scope=i.scope||g;if(!i.onclick&&!i.menu_button){i.onclick=function(){g.execCommand(i.cmd,i.ui||false,i.value)}}i=e({title:i.title,"class":"mce_"+m,unavailable_prefix:g.getLang("unavailable",""),scope:i.scope,control_manager:h},i);m=h.prefix+m;if(i.menu_button){f=l||h._cls.menubutton||c.ui.MenuButton;k=new f(m,i,g);g.onMouseDown.add(k.hideMenu,k)}else{f=h._cls.button||c.ui.Button;k=new f(m,i,g)}return h.add(k)},createMenuButton:function(h,f,g){f=f||{};f.menu_button=1;return this.createButton(h,f,g)},createSplitButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.scope=i.scope||g;if(!i.onclick){i.onclick=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}if(!i.onselect){i.onselect=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}i=e({title:i.title,"class":"mce_"+m,scope:i.scope,control_manager:h},i);m=h.prefix+m;f=l||h._cls.splitbutton||c.ui.SplitButton;k=h.add(new f(m,i,g));g.onMouseDown.add(k.hideMenu,k);return k},createColorSplitButton:function(f,n,h){var l=this,j=l.editor,i,k,m,g;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onclick){n.onclick=function(o){if(c.isIE){g=j.selection.getBookmark(1)}j.execCommand(n.cmd,n.ui||false,o||n.value)}}if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,menu_class:j.getParam("skin")+"Skin",scope:n.scope,more_colors_title:j.getLang("more_colors")},n);f=l.prefix+f;m=h||l._cls.colorsplitbutton||c.ui.ColorSplitButton;k=new m(f,n,j);j.onMouseDown.add(k.hideMenu,k);j.onRemove.add(function(){k.destroy()});if(c.isIE){k.onShowMenu.add(function(){j.focus();g=j.selection.getBookmark(1)});k.onHideMenu.add(function(){if(g){j.selection.moveToBookmark(g);g=0}})}return l.add(k)},createToolbar:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||g._cls.toolbar||c.ui.Toolbar;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createToolbarGroup:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||this._cls.toolbarGroup||c.ui.ToolbarGroup;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createSeparator:function(g){var f=g||this._cls.separator||c.ui.Separator;return new f()},setControlType:function(g,f){return this._cls[g.toLowerCase()]=f},destroy:function(){d(this.controls,function(f){f.destroy()});this.controls=null}})})(tinymce);(function(d){var a=d.util.Dispatcher,e=d.each,c=d.isIE,b=d.isOpera;d.create("tinymce.WindowManager",{WindowManager:function(f){var g=this;g.editor=f;g.onOpen=new a(g);g.onClose=new a(g);g.params={};g.features={}},open:function(z,h){var v=this,k="",n,m,i=v.editor.settings.dialog_type=="modal",q,o,j,g=d.DOM.getViewPort(),r;z=z||{};h=h||{};o=b?g.w:screen.width;j=b?g.h:screen.height;z.name=z.name||"mc_"+new Date().getTime();z.width=parseInt(z.width||320);z.height=parseInt(z.height||240);z.resizable=true;z.left=z.left||parseInt(o/2)-(z.width/2);z.top=z.top||parseInt(j/2)-(z.height/2);h.inline=false;h.mce_width=z.width;h.mce_height=z.height;h.mce_auto_focus=z.auto_focus;if(i){if(c){z.center=true;z.help=false;z.dialogWidth=z.width+"px";z.dialogHeight=z.height+"px";z.scroll=z.scrollbars||false}}e(z,function(p,f){if(d.is(p,"boolean")){p=p?"yes":"no"}if(!/^(name|url)$/.test(f)){if(c&&i){k+=(k?";":"")+f+":"+p}else{k+=(k?",":"")+f+"="+p}}});v.features=z;v.params=h;v.onOpen.dispatch(v,z,h);r=z.url||z.file;r=d._addVer(r);try{if(c&&i){q=1;window.showModalDialog(r,window,k)}else{q=window.open(r,z.name,k)}}catch(l){}if(!q){alert(v.editor.getLang("popup_blocked"))}},close:function(f){f.close();this.onClose.dispatch(this)},createInstance:function(i,h,g,m,l,k){var j=d.resolve(i);return new j(h,g,m,l,k)},confirm:function(h,f,i,g){g=g||window;f.call(i||this,g.confirm(this._decode(this.editor.getLang(h,h))))},alert:function(h,f,j,g){var i=this;g=g||window;g.alert(i._decode(i.editor.getLang(h,h)));if(f){f.call(j||i)}},resizeBy:function(f,g,h){h.resizeBy(f,g)},_decode:function(f){return d.DOM.decode(f).replace(/\\n/g,"\n")}})}(tinymce));(function(a){a.Formatter=function(aa){var Q={},T=a.each,c=aa.dom,r=aa.selection,t=a.dom.TreeWalker,N=new a.dom.RangeUtils(c),d=aa.schema.isValidChild,A=a.isArray,H=c.isBlock,m=aa.settings.forced_root_block,s=c.nodeIndex,G="\uFEFF",e=/^(src|href|style)$/,X=false,C=true,P,D,x=c.getContentEditable;function I(ab){return !!aa.schema.getTextBlocks()[ab.toLowerCase()]}function n(ac,ab){return c.getParents(ac,ab,c.getRoot())}function b(ab){return ab.nodeType===1&&ab.id==="_mce_caret"}function j(){l({alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:true,deep:true,onmatch:function(ab){return true},onformat:function(ad,ab,ac){T(ac,function(af,ae){c.setAttrib(ad,ae,af)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});T("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(ab){l(ab,{block:ab,remove:"all"})});l(aa.settings.formats)}function W(){aa.addShortcut("ctrl+b","bold_desc","Bold");aa.addShortcut("ctrl+i","italic_desc","Italic");aa.addShortcut("ctrl+u","underline_desc","Underline");for(var ab=1;ab<=6;ab++){aa.addShortcut("ctrl+"+ab,"",["FormatBlock",false,"h"+ab])}aa.addShortcut("ctrl+7","",["FormatBlock",false,"p"]);aa.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);aa.addShortcut("ctrl+9","",["FormatBlock",false,"address"])}function V(ab){return ab?Q[ab]:Q}function l(ab,ac){if(ab){if(typeof(ab)!=="string"){T(ab,function(ae,ad){l(ad,ae)})}else{ac=ac.length?ac:[ac];T(ac,function(ad){if(ad.deep===D){ad.deep=!ad.selector}if(ad.split===D){ad.split=!ad.selector||ad.inline}if(ad.remove===D&&ad.selector&&!ad.inline){ad.remove="none"}if(ad.selector&&ad.inline){ad.mixed=true;ad.block_expand=true}if(typeof(ad.classes)==="string"){ad.classes=ad.classes.split(/\s+/)}});Q[ab]=ac}}}var i=function(ac){var ab;aa.dom.getParent(ac,function(ad){ab=aa.dom.getStyle(ad,"text-decoration");return ab&&ab!=="none"});return ab};var L=function(ab){var ac;if(ab.nodeType===1&&ab.parentNode&&ab.parentNode.nodeType===1){ac=i(ab.parentNode);if(aa.dom.getStyle(ab,"color")&&ac){aa.dom.setStyle(ab,"text-decoration",ac)}else{if(aa.dom.getStyle(ab,"textdecoration")===ac){aa.dom.setStyle(ab,"text-decoration",null)}}}};function Y(ae,al,ag){var ah=V(ae),am=ah[0],ak,ac,aj,ai=r.isCollapsed();function ab(aq,ap){ap=ap||am;if(aq){if(ap.onformat){ap.onformat(aq,ap,al,ag)}T(ap.styles,function(at,ar){c.setStyle(aq,ar,q(at,al))});T(ap.attributes,function(at,ar){c.setAttrib(aq,ar,q(at,al))});T(ap.classes,function(ar){ar=q(ar,al);if(!c.hasClass(aq,ar)){c.addClass(aq,ar)}})}}function af(){function ar(ay,aw){var ax=new t(aw);for(ag=ax.current();ag;ag=ax.prev()){if(ag.childNodes.length>1||ag==ay||ag.tagName=="BR"){return ag}}}var aq=aa.selection.getRng();var av=aq.startContainer;var ap=aq.endContainer;if(av!=ap&&aq.endOffset===0){var au=ar(av,ap);var at=au.nodeType==3?au.length:au.childNodes.length;aq.setEnd(au,at)}return aq}function ad(at,ay,aw,av,aq){var ap=[],ar=-1,ax,aA=-1,au=-1,az;T(at.childNodes,function(aC,aB){if(aC.nodeName==="UL"||aC.nodeName==="OL"){ar=aB;ax=aC;return false}});T(at.childNodes,function(aC,aB){if(aC.nodeName==="SPAN"&&c.getAttrib(aC,"data-mce-type")=="bookmark"){if(aC.id==ay.id+"_start"){aA=aB}else{if(aC.id==ay.id+"_end"){au=aB}}}});if(ar<=0||(aA<ar&&au>ar)){T(a.grep(at.childNodes),aq);return 0}else{az=c.clone(aw,X);T(a.grep(at.childNodes),function(aC,aB){if((aA<ar&&aB<ar)||(aA>ar&&aB>ar)){ap.push(aC);aC.parentNode.removeChild(aC)}});if(aA<ar){at.insertBefore(az,ax)}else{if(aA>ar){at.insertBefore(az,ax.nextSibling)}}av.push(az);T(ap,function(aB){az.appendChild(aB)});return az}}function an(aq,at,aw){var ap=[],av,ar,au=true;av=am.inline||am.block;ar=c.create(av);ab(ar);N.walk(aq,function(ax){var ay;function az(aA){var aF,aD,aB,aC,aE;aE=au;aF=aA.nodeName.toLowerCase();aD=aA.parentNode.nodeName.toLowerCase();if(aA.nodeType===1&&x(aA)){aE=au;au=x(aA)==="true";aC=true}if(g(aF,"br")){ay=0;if(am.block){c.remove(aA)}return}if(am.wrapper&&y(aA,ae,al)){ay=0;return}if(au&&!aC&&am.block&&!am.wrapper&&I(aF)){aA=c.rename(aA,av);ab(aA);ap.push(aA);ay=0;return}if(am.selector){T(ah,function(aG){if("collapsed" in aG&&aG.collapsed!==ai){return}if(c.is(aA,aG.selector)&&!b(aA)){ab(aA,aG);aB=true}});if(!am.inline||aB){ay=0;return}}if(au&&!aC&&d(av,aF)&&d(aD,av)&&!(!aw&&aA.nodeType===3&&aA.nodeValue.length===1&&aA.nodeValue.charCodeAt(0)===65279)&&!b(aA)){if(!ay){ay=c.clone(ar,X);aA.parentNode.insertBefore(ay,aA);ap.push(ay)}ay.appendChild(aA)}else{if(aF=="li"&&at){ay=ad(aA,at,ar,ap,az)}else{ay=0;T(a.grep(aA.childNodes),az);if(aC){au=aE}ay=0}}}T(ax,az)});if(am.wrap_links===false){T(ap,function(ax){function ay(aC){var aB,aA,az;if(aC.nodeName==="A"){aA=c.clone(ar,X);ap.push(aA);az=a.grep(aC.childNodes);for(aB=0;aB<az.length;aB++){aA.appendChild(az[aB])}aC.appendChild(aA)}T(a.grep(aC.childNodes),ay)}ay(ax)})}T(ap,function(az){var ax;function aA(aC){var aB=0;T(aC.childNodes,function(aD){if(!f(aD)&&!K(aD)){aB++}});return aB}function ay(aB){var aD,aC;T(aB.childNodes,function(aE){if(aE.nodeType==1&&!K(aE)&&!b(aE)){aD=aE;return X}});if(aD&&h(aD,am)){aC=c.clone(aD,X);ab(aC);c.replace(aC,aB,C);c.remove(aD,1)}return aC||aB}ax=aA(az);if((ap.length>1||!H(az))&&ax===0){c.remove(az,1);return}if(am.inline||am.wrapper){if(!am.exact&&ax===1){az=ay(az)}T(ah,function(aB){T(c.select(aB.inline,az),function(aD){var aC;if(aB.wrap_links===false){aC=aD.parentNode;do{if(aC.nodeName==="A"){return}}while(aC=aC.parentNode)}Z(aB,al,aD,aB.exact?aD:null)})});if(y(az.parentNode,ae,al)){c.remove(az,1);az=0;return C}if(am.merge_with_parents){c.getParent(az.parentNode,function(aB){if(y(aB,ae,al)){c.remove(az,1);az=0;return C}})}if(az&&am.merge_siblings!==false){az=u(E(az),az);az=u(az,E(az,C))}}})}if(am){if(ag){if(ag.nodeType){ac=c.createRng();ac.setStartBefore(ag);ac.setEndAfter(ag);an(p(ac,ah),null,true)}else{an(ag,null,true)}}else{if(!ai||!am.inline||c.select("td.mceSelected,th.mceSelected").length){var ao=aa.selection.getNode();if(!m&&ah[0].defaultBlock&&!c.getParent(ao,c.isBlock)){Y(ah[0].defaultBlock)}aa.selection.setRng(af());ak=r.getBookmark();an(p(r.getRng(C),ah),ak);if(am.styles&&(am.styles.color||am.styles.textDecoration)){a.walk(ao,L,"childNodes");L(ao)}r.moveToBookmark(ak);R(r.getRng(C));aa.nodeChanged()}else{U("apply",ae,al)}}}}function B(ad,am,af){var ag=V(ad),ao=ag[0],ak,aj,ac,al=true;function ae(av){var au,at,ar,aq,ax,aw;if(av.nodeType===1&&x(av)){ax=al;al=x(av)==="true";aw=true}au=a.grep(av.childNodes);if(al&&!aw){for(at=0,ar=ag.length;at<ar;at++){if(Z(ag[at],am,av,av)){break}}}if(ao.deep){if(au.length){for(at=0,ar=au.length;at<ar;at++){ae(au[at])}if(aw){al=ax}}}}function ah(aq){var ar;T(n(aq.parentNode).reverse(),function(at){var au;if(!ar&&at.id!="_start"&&at.id!="_end"){au=y(at,ad,am);if(au&&au.split!==false){ar=at}}});return ar}function ab(au,aq,aw,az){var aA,ay,ax,at,av,ar;if(au){ar=au.parentNode;for(aA=aq.parentNode;aA&&aA!=ar;aA=aA.parentNode){ay=c.clone(aA,X);for(av=0;av<ag.length;av++){if(Z(ag[av],am,ay,ay)){ay=0;break}}if(ay){if(ax){ay.appendChild(ax)}if(!at){at=ay}ax=ay}}if(az&&(!ao.mixed||!H(au))){aq=c.split(au,aq)}if(ax){aw.parentNode.insertBefore(ax,aw);at.appendChild(aw)}}return aq}function an(aq){return ab(ah(aq),aq,aq,true)}function ai(at){var ar=c.get(at?"_start":"_end"),aq=ar[at?"firstChild":"lastChild"];if(K(aq)){aq=aq[at?"firstChild":"lastChild"]}c.remove(ar,true);return aq}function ap(aq){var at,au,ar;aq=p(aq,ag,C);if(ao.split){at=M(aq,C);au=M(aq);if(at!=au){if(/^(TR|TD)$/.test(at.nodeName)&&at.firstChild){at=(at.nodeName=="TD"?at.firstChild:at.firstChild.firstChild)||at}at=S(at,"span",{id:"_start","data-mce-type":"bookmark"});au=S(au,"span",{id:"_end","data-mce-type":"bookmark"});an(at);an(au);at=ai(C);au=ai()}else{at=au=an(at)}aq.startContainer=at.parentNode;aq.startOffset=s(at);aq.endContainer=au.parentNode;aq.endOffset=s(au)+1}N.walk(aq,function(av){T(av,function(aw){ae(aw);if(aw.nodeType===1&&aa.dom.getStyle(aw,"text-decoration")==="underline"&&aw.parentNode&&i(aw.parentNode)==="underline"){Z({deep:false,exact:true,inline:"span",styles:{textDecoration:"underline"}},null,aw)}})})}if(af){if(af.nodeType){ac=c.createRng();ac.setStartBefore(af);ac.setEndAfter(af);ap(ac)}else{ap(af)}return}if(!r.isCollapsed()||!ao.inline||c.select("td.mceSelected,th.mceSelected").length){ak=r.getBookmark();ap(r.getRng(C));r.moveToBookmark(ak);if(ao.inline&&k(ad,am,r.getStart())){R(r.getRng(true))}aa.nodeChanged()}else{U("remove",ad,am)}}function F(ac,ae,ad){var ab=V(ac);if(k(ac,ae,ad)&&(!("toggle" in ab[0])||ab[0].toggle)){B(ac,ae,ad)}else{Y(ac,ae,ad)}}function y(ac,ab,ah,af){var ad=V(ab),ai,ag,ae;function aj(an,ap,aq){var am,ao,ak=ap[aq],al;if(ap.onmatch){return ap.onmatch(an,ap,aq)}if(ak){if(ak.length===D){for(am in ak){if(ak.hasOwnProperty(am)){if(aq==="attributes"){ao=c.getAttrib(an,am)}else{ao=O(an,am)}if(af&&!ao&&!ap.exact){return}if((!af||ap.exact)&&!g(ao,q(ak[am],ah))){return}}}}else{for(al=0;al<ak.length;al++){if(aq==="attributes"?c.getAttrib(an,ak[al]):O(an,ak[al])){return ap}}}}return ap}if(ad&&ac){for(ag=0;ag<ad.length;ag++){ai=ad[ag];if(h(ac,ai)&&aj(ac,ai,"attributes")&&aj(ac,ai,"styles")){if(ae=ai.classes){for(ag=0;ag<ae.length;ag++){if(!c.hasClass(ac,ae[ag])){return}}}return ai}}}}function k(ad,af,ae){var ac;function ab(ag){ag=c.getParent(ag,function(ah){return !!y(ah,ad,af,true)});return y(ag,ad,af)}if(ae){return ab(ae)}ae=r.getNode();if(ab(ae)){return C}ac=r.getStart();if(ac!=ae){if(ab(ac)){return C}}return X}function v(ai,ah){var af,ag=[],ae={},ad,ac,ab;af=r.getStart();c.getParent(af,function(al){var ak,aj;for(ak=0;ak<ai.length;ak++){aj=ai[ak];if(!ae[aj]&&y(al,aj,ah)){ae[aj]=true;ag.push(aj)}}},c.getRoot());return ag}function z(af){var ah=V(af),ae,ad,ag,ac,ab;if(ah){ae=r.getStart();ad=n(ae);for(ac=ah.length-1;ac>=0;ac--){ab=ah[ac].selector;if(!ab){return C}for(ag=ad.length-1;ag>=0;ag--){if(c.is(ad[ag],ab)){return C}}}}return X}function J(ab,ae,ac){var ad;if(!P){P={};ad={};aa.onNodeChange.addToTop(function(ag,af,ai){var ah=n(ai),aj={};T(P,function(ak,al){T(ah,function(am){if(y(am,al,{},ak.similar)){if(!ad[al]){T(ak,function(an){an(true,{node:am,format:al,parents:ah})});ad[al]=ak}aj[al]=ak;return false}})});T(ad,function(ak,al){if(!aj[al]){delete ad[al];T(ak,function(am){am(false,{node:ai,format:al,parents:ah})})}})})}T(ab.split(","),function(af){if(!P[af]){P[af]=[];P[af].similar=ac}P[af].push(ae)});return this}a.extend(this,{get:V,register:l,apply:Y,remove:B,toggle:F,match:k,matchAll:v,matchNode:y,canApply:z,formatChanged:J});j();W();function h(ab,ac){if(g(ab,ac.inline)){return C}if(g(ab,ac.block)){return C}if(ac.selector){return c.is(ab,ac.selector)}}function g(ac,ab){ac=ac||"";ab=ab||"";ac=""+(ac.nodeName||ac);ab=""+(ab.nodeName||ab);return ac.toLowerCase()==ab.toLowerCase()}function O(ac,ab){var ad=c.getStyle(ac,ab);if(ab=="color"||ab=="backgroundColor"){ad=c.toHex(ad)}if(ab=="fontWeight"&&ad==700){ad="bold"}return""+ad}function q(ab,ac){if(typeof(ab)!="string"){ab=ab(ac)}else{if(ac){ab=ab.replace(/%(\w+)/g,function(ae,ad){return ac[ad]||ae})}}return ab}function f(ab){return ab&&ab.nodeType===3&&/^([\t \r\n]+|)$/.test(ab.nodeValue)}function S(ad,ac,ab){var ae=c.create(ac,ab);ad.parentNode.insertBefore(ae,ad);ae.appendChild(ad);return ae}function p(ab,am,ae){var ap,an,ah,al,ad=ab.startContainer,ai=ab.startOffset,ar=ab.endContainer,ak=ab.endOffset;function ao(aA){var au,ax,az,aw,av,at;au=ax=aA?ad:ar;av=aA?"previousSibling":"nextSibling";at=c.getRoot();function ay(aB){return aB.nodeName=="BR"&&aB.getAttribute("data-mce-bogus")&&!aB.nextSibling}if(au.nodeType==3&&!f(au)){if(aA?ai>0:ak<au.nodeValue.length){return au}}for(;;){if(!am[0].block_expand&&H(ax)){return ax}for(aw=ax[av];aw;aw=aw[av]){if(!K(aw)&&!f(aw)&&!ay(aw)){return ax}}if(ax.parentNode==at){au=ax;break}ax=ax.parentNode}return au}function ag(at,au){if(au===D){au=at.nodeType===3?at.length:at.childNodes.length}while(at&&at.hasChildNodes()){at=at.childNodes[au];if(at){au=at.nodeType===3?at.length:at.childNodes.length}}return{node:at,offset:au}}if(ad.nodeType==1&&ad.hasChildNodes()){an=ad.childNodes.length-1;ad=ad.childNodes[ai>an?an:ai];if(ad.nodeType==3){ai=0}}if(ar.nodeType==1&&ar.hasChildNodes()){an=ar.childNodes.length-1;ar=ar.childNodes[ak>an?an:ak-1];if(ar.nodeType==3){ak=ar.nodeValue.length}}function aq(au){var at=au;while(at){if(at.nodeType===1&&x(at)){return x(at)==="false"?at:au}at=at.parentNode}return au}function aj(au,ay,aA){var ax,av,az,at;function aw(aC,aE){var aF,aB,aD=aC.nodeValue;if(typeof(aE)=="undefined"){aE=aA?aD.length:0}if(aA){aF=aD.lastIndexOf(" ",aE);aB=aD.lastIndexOf("\u00a0",aE);aF=aF>aB?aF:aB;if(aF!==-1&&!ae){aF++}}else{aF=aD.indexOf(" ",aE);aB=aD.indexOf("\u00a0",aE);aF=aF!==-1&&(aB===-1||aF<aB)?aF:aB}return aF}if(au.nodeType===3){az=aw(au,ay);if(az!==-1){return{container:au,offset:az}}at=au}ax=new t(au,c.getParent(au,H)||aa.getBody());while(av=ax[aA?"prev":"next"]()){if(av.nodeType===3){at=av;az=aw(av);if(az!==-1){return{container:av,offset:az}}}else{if(H(av)){break}}}if(at){if(aA){ay=0}else{ay=at.length}return{container:at,offset:ay}}}function af(au,at){var av,aw,ay,ax;if(au.nodeType==3&&au.nodeValue.length===0&&au[at]){au=au[at]}av=n(au);for(aw=0;aw<av.length;aw++){for(ay=0;ay<am.length;ay++){ax=am[ay];if("collapsed" in ax&&ax.collapsed!==ab.collapsed){continue}if(c.is(av[aw],ax.selector)){return av[aw]}}}return au}function ac(au,at,aw){var av;if(!am[0].wrapper){av=c.getParent(au,am[0].block)}if(!av){av=c.getParent(au.nodeType==3?au.parentNode:au,I)}if(av&&am[0].wrapper){av=n(av,"ul,ol").reverse()[0]||av}if(!av){av=au;while(av[at]&&!H(av[at])){av=av[at];if(g(av,"br")){break}}}return av||au}ad=aq(ad);ar=aq(ar);if(K(ad.parentNode)||K(ad)){ad=K(ad)?ad:ad.parentNode;ad=ad.nextSibling||ad;if(ad.nodeType==3){ai=0}}if(K(ar.parentNode)||K(ar)){ar=K(ar)?ar:ar.parentNode;ar=ar.previousSibling||ar;if(ar.nodeType==3){ak=ar.length}}if(am[0].inline){if(ab.collapsed){al=aj(ad,ai,true);if(al){ad=al.container;ai=al.offset}al=aj(ar,ak);if(al){ar=al.container;ak=al.offset}}ah=ag(ar,ak);if(ah.node){while(ah.node&&ah.offset===0&&ah.node.previousSibling){ah=ag(ah.node.previousSibling)}if(ah.node&&ah.offset>0&&ah.node.nodeType===3&&ah.node.nodeValue.charAt(ah.offset-1)===" "){if(ah.offset>1){ar=ah.node;ar.splitText(ah.offset-1)}}}}if(am[0].inline||am[0].block_expand){if(!am[0].inline||(ad.nodeType!=3||ai===0)){ad=ao(true)}if(!am[0].inline||(ar.nodeType!=3||ak===ar.nodeValue.length)){ar=ao()}}if(am[0].selector&&am[0].expand!==X&&!am[0].inline){ad=af(ad,"previousSibling");ar=af(ar,"nextSibling")}if(am[0].block||am[0].selector){ad=ac(ad,"previousSibling");ar=ac(ar,"nextSibling");if(am[0].block){if(!H(ad)){ad=ao(true)}if(!H(ar)){ar=ao()}}}if(ad.nodeType==1){ai=s(ad);ad=ad.parentNode}if(ar.nodeType==1){ak=s(ar)+1;ar=ar.parentNode}return{startContainer:ad,startOffset:ai,endContainer:ar,endOffset:ak}}function Z(ah,ag,ae,ab){var ad,ac,af;if(!h(ae,ah)){return X}if(ah.remove!="all"){T(ah.styles,function(aj,ai){aj=q(aj,ag);if(typeof(ai)==="number"){ai=aj;ab=0}if(!ab||g(O(ab,ai),aj)){c.setStyle(ae,ai,"")}af=1});if(af&&c.getAttrib(ae,"style")==""){ae.removeAttribute("style");ae.removeAttribute("data-mce-style")}T(ah.attributes,function(ak,ai){var aj;ak=q(ak,ag);if(typeof(ai)==="number"){ai=ak;ab=0}if(!ab||g(c.getAttrib(ab,ai),ak)){if(ai=="class"){ak=c.getAttrib(ae,ai);if(ak){aj="";T(ak.split(/\s+/),function(al){if(/mce\w+/.test(al)){aj+=(aj?" ":"")+al}});if(aj){c.setAttrib(ae,ai,aj);return}}}if(ai=="class"){ae.removeAttribute("className")}if(e.test(ai)){ae.removeAttribute("data-mce-"+ai)}ae.removeAttribute(ai)}});T(ah.classes,function(ai){ai=q(ai,ag);if(!ab||c.hasClass(ab,ai)){c.removeClass(ae,ai)}});ac=c.getAttribs(ae);for(ad=0;ad<ac.length;ad++){if(ac[ad].nodeName.indexOf("_")!==0){return X}}}if(ah.remove!="none"){o(ae,ah);return C}}function o(ad,ae){var ab=ad.parentNode,ac;function af(ah,ag,ai){ah=E(ah,ag,ai);return !ah||(ah.nodeName=="BR"||H(ah))}if(ae.block){if(!m){if(H(ad)&&!H(ab)){if(!af(ad,X)&&!af(ad.firstChild,C,1)){ad.insertBefore(c.create("br"),ad.firstChild)}if(!af(ad,C)&&!af(ad.lastChild,X,1)){ad.appendChild(c.create("br"))}}}else{if(ab==c.getRoot()){if(!ae.list_block||!g(ad,ae.list_block)){T(a.grep(ad.childNodes),function(ag){if(d(m,ag.nodeName.toLowerCase())){if(!ac){ac=S(ag,m)}else{ac.appendChild(ag)}}else{ac=0}})}}}}if(ae.selector&&ae.inline&&!g(ae.inline,ad)){return}c.remove(ad,1)}function E(ac,ab,ad){if(ac){ab=ab?"nextSibling":"previousSibling";for(ac=ad?ac:ac[ab];ac;ac=ac[ab]){if(ac.nodeType==1||!f(ac)){return ac}}}}function K(ab){return ab&&ab.nodeType==1&&ab.getAttribute("data-mce-type")=="bookmark"}function u(af,ae){var ab,ad,ac;function ah(ak,aj){if(ak.nodeName!=aj.nodeName){return X}function ai(am){var an={};T(c.getAttribs(am),function(ao){var ap=ao.nodeName.toLowerCase();if(ap.indexOf("_")!==0&&ap!=="style"){an[ap]=c.getAttrib(am,ap)}});return an}function al(ap,ao){var an,am;for(am in ap){if(ap.hasOwnProperty(am)){an=ao[am];if(an===D){return X}if(ap[am]!=an){return X}delete ao[am]}}for(am in ao){if(ao.hasOwnProperty(am)){return X}}return C}if(!al(ai(ak),ai(aj))){return X}if(!al(c.parseStyle(c.getAttrib(ak,"style")),c.parseStyle(c.getAttrib(aj,"style")))){return X}return C}function ag(aj,ai){for(ad=aj;ad;ad=ad[ai]){if(ad.nodeType==3&&ad.nodeValue.length!==0){return aj}if(ad.nodeType==1&&!K(ad)){return ad}}return aj}if(af&&ae){af=ag(af,"previousSibling");ae=ag(ae,"nextSibling");if(ah(af,ae)){for(ad=af.nextSibling;ad&&ad!=ae;){ac=ad;ad=ad.nextSibling;af.appendChild(ac)}c.remove(ae);T(a.grep(ae.childNodes),function(ai){af.appendChild(ai)});return af}}return ae}function I(ab){return/^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(ab)}function M(ac,ag){var ab,af,ad,ae;ab=ac[ag?"startContainer":"endContainer"];af=ac[ag?"startOffset":"endOffset"];if(ab.nodeType==1){ad=ab.childNodes.length-1;if(!ag&&af){af--}ab=ab.childNodes[af>ad?ad:af]}if(ab.nodeType===3&&ag&&af>=ab.nodeValue.length){ab=new t(ab,aa.getBody()).next()||ab}if(ab.nodeType===3&&!ag&&af===0){ab=new t(ab,aa.getBody()).prev()||ab}return ab}function U(ak,ab,ai){var al="_mce_caret",ac=aa.settings.caret_debug;function ad(ap){var ao=c.create("span",{id:al,"data-mce-bogus":true,style:ac?"color:red":""});if(ap){ao.appendChild(aa.getDoc().createTextNode(G))}return ao}function aj(ap,ao){while(ap){if((ap.nodeType===3&&ap.nodeValue!==G)||ap.childNodes.length>1){return false}if(ao&&ap.nodeType===1){ao.push(ap)}ap=ap.firstChild}return true}function ag(ao){while(ao){if(ao.id===al){return ao}ao=ao.parentNode}}function af(ao){var ap;if(ao){ap=new t(ao,ao);for(ao=ap.current();ao;ao=ap.next()){if(ao.nodeType===3){return ao}}}}function ae(aq,ap){var ar,ao;if(!aq){aq=ag(r.getStart());if(!aq){while(aq=c.get(al)){ae(aq,false)}}}else{ao=r.getRng(true);if(aj(aq)){if(ap!==false){ao.setStartBefore(aq);ao.setEndBefore(aq)}c.remove(aq)}else{ar=af(aq);if(ar.nodeValue.charAt(0)===G){ar=ar.deleteData(0,1)}c.remove(aq,1)}r.setRng(ao)}}function ah(){var aq,ao,av,au,ar,ap,at;aq=r.getRng(true);au=aq.startOffset;ap=aq.startContainer;at=ap.nodeValue;ao=ag(r.getStart());if(ao){av=af(ao)}if(at&&au>0&&au<at.length&&/\w/.test(at.charAt(au))&&/\w/.test(at.charAt(au-1))){ar=r.getBookmark();aq.collapse(true);aq=p(aq,V(ab));aq=N.split(aq);Y(ab,ai,aq);r.moveToBookmark(ar)}else{if(!ao||av.nodeValue!==G){ao=ad(true);av=ao.firstChild;aq.insertNode(ao);au=1;Y(ab,ai,ao)}else{Y(ab,ai,ao)}r.setCursorLocation(av,au)}}function am(){var ao=r.getRng(true),ap,ar,av,au,aq,ay,ax=[],at,aw;ap=ao.startContainer;ar=ao.startOffset;aq=ap;if(ap.nodeType==3){if(ar!=ap.nodeValue.length||ap.nodeValue===G){au=true}aq=aq.parentNode}while(aq){if(y(aq,ab,ai)){ay=aq;break}if(aq.nextSibling){au=true}ax.push(aq);aq=aq.parentNode}if(!ay){return}if(au){av=r.getBookmark();ao.collapse(true);ao=p(ao,V(ab),true);ao=N.split(ao);B(ab,ai,ao);r.moveToBookmark(av)}else{aw=ad();aq=aw;for(at=ax.length-1;at>=0;at--){aq.appendChild(c.clone(ax[at],false));aq=aq.firstChild}aq.appendChild(c.doc.createTextNode(G));aq=aq.firstChild;c.insertAfter(aw,ay);r.setCursorLocation(aq,1)}}function an(){var ap,ao,aq;ao=ag(r.getStart());if(ao&&!c.isEmpty(ao)){a.walk(ao,function(ar){if(ar.nodeType==1&&ar.id!==al&&!c.isEmpty(ar)){c.setAttrib(ar,"data-mce-bogus",null)}},"childNodes")}}if(!self._hasCaretEvents){aa.onBeforeGetContent.addToTop(function(){var ao=[],ap;if(aj(ag(r.getStart()),ao)){ap=ao.length;while(ap--){c.setAttrib(ao[ap],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(ao){aa[ao].addToTop(function(){ae();an()})});aa.onKeyDown.addToTop(function(ao,aq){var ap=aq.keyCode;if(ap==8||ap==37||ap==39){ae(ag(r.getStart()))}an()});r.onSetContent.add(an);self._hasCaretEvents=true}if(ak=="apply"){ah()}else{am()}}function R(ac){var ab=ac.startContainer,ai=ac.startOffset,ae,ah,ag,ad,af;if(ab.nodeType==3&&ai>=ab.nodeValue.length){ai=s(ab);ab=ab.parentNode;ae=true}if(ab.nodeType==1){ad=ab.childNodes;ab=ad[Math.min(ai,ad.length-1)];ah=new t(ab,c.getParent(ab,c.isBlock));if(ai>ad.length-1||ae){ah.next()}for(ag=ah.current();ag;ag=ah.next()){if(ag.nodeType==3&&!f(ag)){af=c.create("a",null,G);ag.parentNode.insertBefore(af,ag);ac.setStart(ag,0);r.setRng(ac);c.remove(af);return}}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}if(c.inline_styles){h=e.explode(c.font_size_legacy_values);d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size,10)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}});(function(b){var a=b.dom.TreeWalker;b.EnterKey=function(f){var i=f.dom,e=f.selection,d=f.settings,h=f.undoManager,c=f.schema.getNonEmptyElements();function g(A){var v=e.getRng(true),G,j,z,u,p,M,B,o,k,n,t,J,x,C;function E(N){return N&&i.isBlock(N)&&!/^(TD|TH|CAPTION|FORM)$/.test(N.nodeName)&&!/^(fixed|absolute)/i.test(N.style.position)&&i.getContentEditable(N)!=="true"}function F(O){var N;if(b.isIE&&i.isBlock(O)){N=e.getRng();O.appendChild(i.create("span",null,"\u00a0"));e.select(O);O.lastChild.outerHTML="";e.setRng(N)}}function y(P){var O=P,Q=[],N;while(O=O.firstChild){if(i.isBlock(O)){return}if(O.nodeType==1&&!c[O.nodeName.toLowerCase()]){Q.push(O)}}N=Q.length;while(N--){O=Q[N];if(!O.hasChildNodes()||(O.firstChild==O.lastChild&&O.firstChild.nodeValue==="")){i.remove(O)}else{if(O.nodeName=="A"&&(O.innerText||O.textContent)===" "){i.remove(O)}}}}function m(O){var T,R,N,U,S,Q=O,P;N=i.createRng();if(O.hasChildNodes()){T=new a(O,O);while(R=T.current()){if(R.nodeType==3){N.setStart(R,0);N.setEnd(R,0);break}if(c[R.nodeName.toLowerCase()]){N.setStartBefore(R);N.setEndBefore(R);break}Q=R;R=T.next()}if(!R){N.setStart(Q,0);N.setEnd(Q,0)}}else{if(O.nodeName=="BR"){if(O.nextSibling&&i.isBlock(O.nextSibling)){if(!M||M<9){P=i.create("br");O.parentNode.insertBefore(P,O)}N.setStartBefore(O);N.setEndBefore(O)}else{N.setStartAfter(O);N.setEndAfter(O)}}else{N.setStart(O,0);N.setEnd(O,0)}}e.setRng(N);i.remove(P);S=i.getViewPort(f.getWin());U=i.getPos(O).y;if(U<S.y||U+25>S.y+S.h){f.getWin().scrollTo(0,U<S.y?U:U-S.h+25)}}function r(O){var P=z,R,Q,N;R=O||t=="TABLE"?i.create(O||x):p.cloneNode(false);N=R;if(d.keep_styles!==false){do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(P.nodeName)){if(P.id=="_mce_caret"){continue}Q=P.cloneNode(false);i.setAttrib(Q,"id","");if(R.hasChildNodes()){Q.appendChild(R.firstChild);R.appendChild(Q)}else{N=Q;R.appendChild(Q)}}}while(P=P.parentNode)}if(!b.isIE){N.innerHTML='<br data-mce-bogus="1">'}return R}function q(Q){var P,O,N;if(z.nodeType==3&&(Q?u>0:u<z.nodeValue.length)){return false}if(z.parentNode==p&&C&&!Q){return true}if(Q&&z.nodeType==1&&z==p.firstChild){return true}if(z.nodeName==="TABLE"||(z.previousSibling&&z.previousSibling.nodeName=="TABLE")){return(C&&!Q)||(!C&&Q)}P=new a(z,p);if(z.nodeType==3){if(Q&&u==0){P.prev()}else{if(!Q&&u==z.nodeValue.length){P.next()}}}while(O=P.current()){if(O.nodeType===1){if(!O.getAttribute("data-mce-bogus")){N=O.nodeName.toLowerCase();if(c[N]&&N!=="br"){return false}}}else{if(O.nodeType===3&&!/^[ \t\r\n]*$/.test(O.nodeValue)){return false}}if(Q){P.prev()}else{P.next()}}return true}function l(N,T){var U,S,P,R,Q,O=x||"P";S=i.getParent(N,i.isBlock);if(!S||!E(S)){S=S||j;if(!S.hasChildNodes()){U=i.create(O);S.appendChild(U);v.setStart(U,0);v.setEnd(U,0);return U}R=N;while(R.parentNode!=S){R=R.parentNode}while(R&&!i.isBlock(R)){P=R;R=R.previousSibling}if(P){U=i.create(O);P.parentNode.insertBefore(U,P);R=P;while(R&&!i.isBlock(R)){Q=R.nextSibling;U.appendChild(R);R=Q}v.setStart(N,T);v.setEnd(N,T)}}return N}function H(){function N(P){var O=n[P?"firstChild":"lastChild"];while(O){if(O.nodeType==1){break}O=O[P?"nextSibling":"previousSibling"]}return O===p}o=x?r(x):i.create("BR");if(N(true)&&N()){i.replace(o,n)}else{if(N(true)){n.parentNode.insertBefore(o,n)}else{if(N()){i.insertAfter(o,n);F(o)}else{G=v.cloneRange();G.setStartAfter(p);G.setEndAfter(n);k=G.extractContents();i.insertAfter(k,n);i.insertAfter(o,n)}}}i.remove(p);m(o);h.add()}function D(){var O=new a(z,p),N;while(N=O.current()){if(N.nodeName=="BR"){return true}N=O.next()}}function L(){var O,N;if(z&&z.nodeType==3&&u>=z.nodeValue.length){if(!b.isIE&&!D()){O=i.create("br");v.insertNode(O);v.setStartAfter(O);v.setEndAfter(O);N=true}}O=i.create("br");v.insertNode(O);if(b.isIE&&t=="PRE"&&(!M||M<8)){O.parentNode.insertBefore(i.doc.createTextNode("\r"),O)}if(!N){v.setStartAfter(O);v.setEndAfter(O)}else{v.setStartBefore(O);v.setEndBefore(O)}e.setRng(v);h.add()}function s(N){do{if(N.nodeType===3){N.nodeValue=N.nodeValue.replace(/^[\r\n]+/,"")}N=N.firstChild}while(N)}function K(P){var N=i.getRoot(),O,Q;O=P;while(O!==N&&i.getContentEditable(O)!=="false"){if(i.getContentEditable(O)==="true"){Q=O}O=O.parentNode}return O!==N?Q:N}function I(O){var N;if(!b.isIE){O.normalize();N=O.lastChild;if(!N||(/^(left|right)$/gi.test(i.getStyle(N,"float",true)))){i.add(O,"br")}}}if(!v.collapsed){f.execCommand("Delete");return}if(A.isDefaultPrevented()){return}z=v.startContainer;u=v.startOffset;x=(d.force_p_newlines?"p":"")||d.forced_root_block;x=x?x.toUpperCase():"";M=i.doc.documentMode;B=A.shiftKey;if(z.nodeType==1&&z.hasChildNodes()){C=u>z.childNodes.length-1;z=z.childNodes[Math.min(u,z.childNodes.length-1)]||z;if(C&&z.nodeType==3){u=z.nodeValue.length}else{u=0}}j=K(z);if(!j){return}h.beforeChange();if(!i.isBlock(j)&&j!=i.getRoot()){if(!x||B){L()}return}if((x&&!B)||(!x&&B)){z=l(z,u)}p=i.getParent(z,i.isBlock);n=p?i.getParent(p.parentNode,i.isBlock):null;t=p?p.nodeName.toUpperCase():"";J=n?n.nodeName.toUpperCase():"";if(J=="LI"&&!A.ctrlKey){p=n;t=J}if(t=="LI"){if(!x&&B){L();return}if(i.isEmpty(p)){if(/^(UL|OL|LI)$/.test(n.parentNode.nodeName)){return false}H();return}}if(t=="PRE"&&d.br_in_pre!==false){if(!B){L();return}}else{if((!x&&!B&&t!="LI")||(x&&B)){L();return}}x=x||"P";if(q()){if(/^(H[1-6]|PRE)$/.test(t)&&J!="HGROUP"){o=r(x)}else{o=r()}if(d.end_container_on_empty_block&&E(n)&&i.isEmpty(p)){o=i.split(n,p)}else{i.insertAfter(o,p)}m(o)}else{if(q(true)){o=p.parentNode.insertBefore(r(),p);F(o)}else{G=v.cloneRange();G.setEndAfter(p);k=G.extractContents();s(k);o=k.firstChild;i.insertAfter(k,p);y(o);I(p);m(o)}}i.setAttrib(o,"id","");h.add()}f.onKeyDown.add(function(k,j){if(j.keyCode==13){if(g(j)!==false){j.preventDefault()}}})}})(tinymce);
|
|
tiny_mce/tiny_mce_popup.js
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
|
2 |
-
// Uncomment and change this document.domain value if you are loading the script cross subdomains
|
3 |
-
// document.domain = 'moxiecode.com';
|
4 |
-
|
5 |
-
var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document,{ownEvents:true,proxy:tinyMCEPopup._eventProxy});b.dom.bind(window,"ready",b._onDOMLoaded,b);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(){var a=window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}if(!b.editor.getParam("browser_preferred_colors",false)||!b.isWindow){b.dom.addClass(document.body,"forceColors")}document.body.style.display="";if(tinymce.isIE){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}b.restoreSelection();b.resizeToInnerSize();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){b.dom.bind(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){var b=a.target||a.srcElement;if(b.onchange){b.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_eventProxy:function(a){return function(b){tinyMCEPopup.dom.events.callNativeHandler(a,b)}}};tinyMCEPopup.init();
|
|
|
|
|
|
|
|
|
|
tiny_mce/utils/editable_selects.js
DELETED
@@ -1,70 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* editable_selects.js
|
3 |
-
*
|
4 |
-
* Copyright 2009, Moxiecode Systems AB
|
5 |
-
* Released under LGPL License.
|
6 |
-
*
|
7 |
-
* License: http://tinymce.moxiecode.com/license
|
8 |
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9 |
-
*/
|
10 |
-
|
11 |
-
var TinyMCE_EditableSelects = {
|
12 |
-
editSelectElm : null,
|
13 |
-
|
14 |
-
init : function() {
|
15 |
-
var nl = document.getElementsByTagName("select"), i, d = document, o;
|
16 |
-
|
17 |
-
for (i=0; i<nl.length; i++) {
|
18 |
-
if (nl[i].className.indexOf('mceEditableSelect') != -1) {
|
19 |
-
o = new Option(tinyMCEPopup.editor.translate('value'), '__mce_add_custom__');
|
20 |
-
|
21 |
-
o.className = 'mceAddSelectValue';
|
22 |
-
|
23 |
-
nl[i].options[nl[i].options.length] = o;
|
24 |
-
nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
|
25 |
-
}
|
26 |
-
}
|
27 |
-
},
|
28 |
-
|
29 |
-
onChangeEditableSelect : function(e) {
|
30 |
-
var d = document, ne, se = window.event ? window.event.srcElement : e.target;
|
31 |
-
|
32 |
-
if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
|
33 |
-
ne = d.createElement("input");
|
34 |
-
ne.id = se.id + "_custom";
|
35 |
-
ne.name = se.name + "_custom";
|
36 |
-
ne.type = "text";
|
37 |
-
|
38 |
-
ne.style.width = se.offsetWidth + 'px';
|
39 |
-
se.parentNode.insertBefore(ne, se);
|
40 |
-
se.style.display = 'none';
|
41 |
-
ne.focus();
|
42 |
-
ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
|
43 |
-
ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
|
44 |
-
TinyMCE_EditableSelects.editSelectElm = se;
|
45 |
-
}
|
46 |
-
},
|
47 |
-
|
48 |
-
onBlurEditableSelectInput : function() {
|
49 |
-
var se = TinyMCE_EditableSelects.editSelectElm;
|
50 |
-
|
51 |
-
if (se) {
|
52 |
-
if (se.previousSibling.value != '') {
|
53 |
-
addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
|
54 |
-
selectByValue(document.forms[0], se.id, se.previousSibling.value);
|
55 |
-
} else
|
56 |
-
selectByValue(document.forms[0], se.id, '');
|
57 |
-
|
58 |
-
se.style.display = 'inline';
|
59 |
-
se.parentNode.removeChild(se.previousSibling);
|
60 |
-
TinyMCE_EditableSelects.editSelectElm = null;
|
61 |
-
}
|
62 |
-
},
|
63 |
-
|
64 |
-
onKeyDown : function(e) {
|
65 |
-
e = e || window.event;
|
66 |
-
|
67 |
-
if (e.keyCode == 13)
|
68 |
-
TinyMCE_EditableSelects.onBlurEditableSelectInput();
|
69 |
-
}
|
70 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/utils/form_utils.js
DELETED
@@ -1,210 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* form_utils.js
|
3 |
-
*
|
4 |
-
* Copyright 2009, Moxiecode Systems AB
|
5 |
-
* Released under LGPL License.
|
6 |
-
*
|
7 |
-
* License: http://tinymce.moxiecode.com/license
|
8 |
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9 |
-
*/
|
10 |
-
|
11 |
-
var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
|
12 |
-
|
13 |
-
function getColorPickerHTML(id, target_form_element) {
|
14 |
-
var h = "", dom = tinyMCEPopup.dom;
|
15 |
-
|
16 |
-
if (label = dom.select('label[for=' + target_form_element + ']')[0]) {
|
17 |
-
label.id = label.id || dom.uniqueId();
|
18 |
-
}
|
19 |
-
|
20 |
-
h += '<a role="button" aria-labelledby="' + id + '_label" id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
|
21 |
-
h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"> <span id="' + id + '_label" class="mceVoiceLabel mceIconOnly" style="display:none;">' + tinyMCEPopup.getLang('browse') + '</span></span></a>';
|
22 |
-
|
23 |
-
return h;
|
24 |
-
}
|
25 |
-
|
26 |
-
function updateColor(img_id, form_element_id) {
|
27 |
-
document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
|
28 |
-
}
|
29 |
-
|
30 |
-
function setBrowserDisabled(id, state) {
|
31 |
-
var img = document.getElementById(id);
|
32 |
-
var lnk = document.getElementById(id + "_link");
|
33 |
-
|
34 |
-
if (lnk) {
|
35 |
-
if (state) {
|
36 |
-
lnk.setAttribute("realhref", lnk.getAttribute("href"));
|
37 |
-
lnk.removeAttribute("href");
|
38 |
-
tinyMCEPopup.dom.addClass(img, 'disabled');
|
39 |
-
} else {
|
40 |
-
if (lnk.getAttribute("realhref"))
|
41 |
-
lnk.setAttribute("href", lnk.getAttribute("realhref"));
|
42 |
-
|
43 |
-
tinyMCEPopup.dom.removeClass(img, 'disabled');
|
44 |
-
}
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
function getBrowserHTML(id, target_form_element, type, prefix) {
|
49 |
-
var option = prefix + "_" + type + "_browser_callback", cb, html;
|
50 |
-
|
51 |
-
cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
|
52 |
-
|
53 |
-
if (!cb)
|
54 |
-
return "";
|
55 |
-
|
56 |
-
html = "";
|
57 |
-
html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
|
58 |
-
html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '"> </span></a>';
|
59 |
-
|
60 |
-
return html;
|
61 |
-
}
|
62 |
-
|
63 |
-
function openBrowser(img_id, target_form_element, type, option) {
|
64 |
-
var img = document.getElementById(img_id);
|
65 |
-
|
66 |
-
if (img.className != "mceButtonDisabled")
|
67 |
-
tinyMCEPopup.openBrowser(target_form_element, type, option);
|
68 |
-
}
|
69 |
-
|
70 |
-
function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
|
71 |
-
if (!form_obj || !form_obj.elements[field_name])
|
72 |
-
return;
|
73 |
-
|
74 |
-
if (!value)
|
75 |
-
value = "";
|
76 |
-
|
77 |
-
var sel = form_obj.elements[field_name];
|
78 |
-
|
79 |
-
var found = false;
|
80 |
-
for (var i=0; i<sel.options.length; i++) {
|
81 |
-
var option = sel.options[i];
|
82 |
-
|
83 |
-
if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
|
84 |
-
option.selected = true;
|
85 |
-
found = true;
|
86 |
-
} else
|
87 |
-
option.selected = false;
|
88 |
-
}
|
89 |
-
|
90 |
-
if (!found && add_custom && value != '') {
|
91 |
-
var option = new Option(value, value);
|
92 |
-
option.selected = true;
|
93 |
-
sel.options[sel.options.length] = option;
|
94 |
-
sel.selectedIndex = sel.options.length - 1;
|
95 |
-
}
|
96 |
-
|
97 |
-
return found;
|
98 |
-
}
|
99 |
-
|
100 |
-
function getSelectValue(form_obj, field_name) {
|
101 |
-
var elm = form_obj.elements[field_name];
|
102 |
-
|
103 |
-
if (elm == null || elm.options == null || elm.selectedIndex === -1)
|
104 |
-
return "";
|
105 |
-
|
106 |
-
return elm.options[elm.selectedIndex].value;
|
107 |
-
}
|
108 |
-
|
109 |
-
function addSelectValue(form_obj, field_name, name, value) {
|
110 |
-
var s = form_obj.elements[field_name];
|
111 |
-
var o = new Option(name, value);
|
112 |
-
s.options[s.options.length] = o;
|
113 |
-
}
|
114 |
-
|
115 |
-
function addClassesToList(list_id, specific_option) {
|
116 |
-
// Setup class droplist
|
117 |
-
var styleSelectElm = document.getElementById(list_id);
|
118 |
-
var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
|
119 |
-
styles = tinyMCEPopup.getParam(specific_option, styles);
|
120 |
-
|
121 |
-
if (styles) {
|
122 |
-
var stylesAr = styles.split(';');
|
123 |
-
|
124 |
-
for (var i=0; i<stylesAr.length; i++) {
|
125 |
-
if (stylesAr != "") {
|
126 |
-
var key, value;
|
127 |
-
|
128 |
-
key = stylesAr[i].split('=')[0];
|
129 |
-
value = stylesAr[i].split('=')[1];
|
130 |
-
|
131 |
-
styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
|
132 |
-
}
|
133 |
-
}
|
134 |
-
} else {
|
135 |
-
tinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {
|
136 |
-
styleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);
|
137 |
-
});
|
138 |
-
}
|
139 |
-
}
|
140 |
-
|
141 |
-
function isVisible(element_id) {
|
142 |
-
var elm = document.getElementById(element_id);
|
143 |
-
|
144 |
-
return elm && elm.style.display != "none";
|
145 |
-
}
|
146 |
-
|
147 |
-
function convertRGBToHex(col) {
|
148 |
-
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
|
149 |
-
|
150 |
-
var rgb = col.replace(re, "$1,$2,$3").split(',');
|
151 |
-
if (rgb.length == 3) {
|
152 |
-
r = parseInt(rgb[0]).toString(16);
|
153 |
-
g = parseInt(rgb[1]).toString(16);
|
154 |
-
b = parseInt(rgb[2]).toString(16);
|
155 |
-
|
156 |
-
r = r.length == 1 ? '0' + r : r;
|
157 |
-
g = g.length == 1 ? '0' + g : g;
|
158 |
-
b = b.length == 1 ? '0' + b : b;
|
159 |
-
|
160 |
-
return "#" + r + g + b;
|
161 |
-
}
|
162 |
-
|
163 |
-
return col;
|
164 |
-
}
|
165 |
-
|
166 |
-
function convertHexToRGB(col) {
|
167 |
-
if (col.indexOf('#') != -1) {
|
168 |
-
col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
|
169 |
-
|
170 |
-
r = parseInt(col.substring(0, 2), 16);
|
171 |
-
g = parseInt(col.substring(2, 4), 16);
|
172 |
-
b = parseInt(col.substring(4, 6), 16);
|
173 |
-
|
174 |
-
return "rgb(" + r + "," + g + "," + b + ")";
|
175 |
-
}
|
176 |
-
|
177 |
-
return col;
|
178 |
-
}
|
179 |
-
|
180 |
-
function trimSize(size) {
|
181 |
-
return size.replace(/([0-9\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i, '$1$2');
|
182 |
-
}
|
183 |
-
|
184 |
-
function getCSSSize(size) {
|
185 |
-
size = trimSize(size);
|
186 |
-
|
187 |
-
if (size == "")
|
188 |
-
return "";
|
189 |
-
|
190 |
-
// Add px
|
191 |
-
if (/^[0-9]+$/.test(size))
|
192 |
-
size += 'px';
|
193 |
-
// Sanity check, IE doesn't like broken values
|
194 |
-
else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size)))
|
195 |
-
return "";
|
196 |
-
|
197 |
-
return size;
|
198 |
-
}
|
199 |
-
|
200 |
-
function getStyle(elm, attrib, style) {
|
201 |
-
var val = tinyMCEPopup.dom.getAttrib(elm, attrib);
|
202 |
-
|
203 |
-
if (val != '')
|
204 |
-
return '' + val;
|
205 |
-
|
206 |
-
if (typeof(style) == 'undefined')
|
207 |
-
style = attrib;
|
208 |
-
|
209 |
-
return tinyMCEPopup.dom.getStyle(elm, style);
|
210 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/utils/mctabs.js
DELETED
@@ -1,162 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* mctabs.js
|
3 |
-
*
|
4 |
-
* Copyright 2009, Moxiecode Systems AB
|
5 |
-
* Released under LGPL License.
|
6 |
-
*
|
7 |
-
* License: http://tinymce.moxiecode.com/license
|
8 |
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9 |
-
*/
|
10 |
-
|
11 |
-
function MCTabs() {
|
12 |
-
this.settings = [];
|
13 |
-
this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher');
|
14 |
-
};
|
15 |
-
|
16 |
-
MCTabs.prototype.init = function(settings) {
|
17 |
-
this.settings = settings;
|
18 |
-
};
|
19 |
-
|
20 |
-
MCTabs.prototype.getParam = function(name, default_value) {
|
21 |
-
var value = null;
|
22 |
-
|
23 |
-
value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
|
24 |
-
|
25 |
-
// Fix bool values
|
26 |
-
if (value == "true" || value == "false")
|
27 |
-
return (value == "true");
|
28 |
-
|
29 |
-
return value;
|
30 |
-
};
|
31 |
-
|
32 |
-
MCTabs.prototype.showTab =function(tab){
|
33 |
-
tab.className = 'current';
|
34 |
-
tab.setAttribute("aria-selected", true);
|
35 |
-
tab.setAttribute("aria-expanded", true);
|
36 |
-
tab.tabIndex = 0;
|
37 |
-
};
|
38 |
-
|
39 |
-
MCTabs.prototype.hideTab =function(tab){
|
40 |
-
var t=this;
|
41 |
-
|
42 |
-
tab.className = '';
|
43 |
-
tab.setAttribute("aria-selected", false);
|
44 |
-
tab.setAttribute("aria-expanded", false);
|
45 |
-
tab.tabIndex = -1;
|
46 |
-
};
|
47 |
-
|
48 |
-
MCTabs.prototype.showPanel = function(panel) {
|
49 |
-
panel.className = 'current';
|
50 |
-
panel.setAttribute("aria-hidden", false);
|
51 |
-
};
|
52 |
-
|
53 |
-
MCTabs.prototype.hidePanel = function(panel) {
|
54 |
-
panel.className = 'panel';
|
55 |
-
panel.setAttribute("aria-hidden", true);
|
56 |
-
};
|
57 |
-
|
58 |
-
MCTabs.prototype.getPanelForTab = function(tabElm) {
|
59 |
-
return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls");
|
60 |
-
};
|
61 |
-
|
62 |
-
MCTabs.prototype.displayTab = function(tab_id, panel_id, avoid_focus) {
|
63 |
-
var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this;
|
64 |
-
|
65 |
-
tabElm = document.getElementById(tab_id);
|
66 |
-
|
67 |
-
if (panel_id === undefined) {
|
68 |
-
panel_id = t.getPanelForTab(tabElm);
|
69 |
-
}
|
70 |
-
|
71 |
-
panelElm= document.getElementById(panel_id);
|
72 |
-
panelContainerElm = panelElm ? panelElm.parentNode : null;
|
73 |
-
tabContainerElm = tabElm ? tabElm.parentNode : null;
|
74 |
-
selectionClass = t.getParam('selection_class', 'current');
|
75 |
-
|
76 |
-
if (tabElm && tabContainerElm) {
|
77 |
-
nodes = tabContainerElm.childNodes;
|
78 |
-
|
79 |
-
// Hide all other tabs
|
80 |
-
for (i = 0; i < nodes.length; i++) {
|
81 |
-
if (nodes[i].nodeName == "LI") {
|
82 |
-
t.hideTab(nodes[i]);
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
-
// Show selected tab
|
87 |
-
t.showTab(tabElm);
|
88 |
-
}
|
89 |
-
|
90 |
-
if (panelElm && panelContainerElm) {
|
91 |
-
nodes = panelContainerElm.childNodes;
|
92 |
-
|
93 |
-
// Hide all other panels
|
94 |
-
for (i = 0; i < nodes.length; i++) {
|
95 |
-
if (nodes[i].nodeName == "DIV")
|
96 |
-
t.hidePanel(nodes[i]);
|
97 |
-
}
|
98 |
-
|
99 |
-
if (!avoid_focus) {
|
100 |
-
tabElm.focus();
|
101 |
-
}
|
102 |
-
|
103 |
-
// Show selected panel
|
104 |
-
t.showPanel(panelElm);
|
105 |
-
}
|
106 |
-
};
|
107 |
-
|
108 |
-
MCTabs.prototype.getAnchor = function() {
|
109 |
-
var pos, url = document.location.href;
|
110 |
-
|
111 |
-
if ((pos = url.lastIndexOf('#')) != -1)
|
112 |
-
return url.substring(pos + 1);
|
113 |
-
|
114 |
-
return "";
|
115 |
-
};
|
116 |
-
|
117 |
-
|
118 |
-
//Global instance
|
119 |
-
var mcTabs = new MCTabs();
|
120 |
-
|
121 |
-
tinyMCEPopup.onInit.add(function() {
|
122 |
-
var tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each;
|
123 |
-
|
124 |
-
each(dom.select('div.tabs'), function(tabContainerElm) {
|
125 |
-
var keyNav;
|
126 |
-
|
127 |
-
dom.setAttrib(tabContainerElm, "role", "tablist");
|
128 |
-
|
129 |
-
var items = tinyMCEPopup.dom.select('li', tabContainerElm);
|
130 |
-
var action = function(id) {
|
131 |
-
mcTabs.displayTab(id, mcTabs.getPanelForTab(id));
|
132 |
-
mcTabs.onChange.dispatch(id);
|
133 |
-
};
|
134 |
-
|
135 |
-
each(items, function(item) {
|
136 |
-
dom.setAttrib(item, 'role', 'tab');
|
137 |
-
dom.bind(item, 'click', function(evt) {
|
138 |
-
action(item.id);
|
139 |
-
});
|
140 |
-
});
|
141 |
-
|
142 |
-
dom.bind(dom.getRoot(), 'keydown', function(evt) {
|
143 |
-
if (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab
|
144 |
-
keyNav.moveFocus(evt.shiftKey ? -1 : 1);
|
145 |
-
tinymce.dom.Event.cancel(evt);
|
146 |
-
}
|
147 |
-
});
|
148 |
-
|
149 |
-
each(dom.select('a', tabContainerElm), function(a) {
|
150 |
-
dom.setAttrib(a, 'tabindex', '-1');
|
151 |
-
});
|
152 |
-
|
153 |
-
keyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
|
154 |
-
root: tabContainerElm,
|
155 |
-
items: items,
|
156 |
-
onAction: action,
|
157 |
-
actOnFocus: true,
|
158 |
-
enableLeftRight: true,
|
159 |
-
enableUpDown: true
|
160 |
-
}, tinyMCEPopup.dom);
|
161 |
-
});
|
162 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tiny_mce/utils/validate.js
DELETED
@@ -1,252 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* validate.js
|
3 |
-
*
|
4 |
-
* Copyright 2009, Moxiecode Systems AB
|
5 |
-
* Released under LGPL License.
|
6 |
-
*
|
7 |
-
* License: http://tinymce.moxiecode.com/license
|
8 |
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9 |
-
*/
|
10 |
-
|
11 |
-
/**
|
12 |
-
// String validation:
|
13 |
-
|
14 |
-
if (!Validator.isEmail('myemail'))
|
15 |
-
alert('Invalid email.');
|
16 |
-
|
17 |
-
// Form validation:
|
18 |
-
|
19 |
-
var f = document.forms['myform'];
|
20 |
-
|
21 |
-
if (!Validator.isEmail(f.myemail))
|
22 |
-
alert('Invalid email.');
|
23 |
-
*/
|
24 |
-
|
25 |
-
var Validator = {
|
26 |
-
isEmail : function(s) {
|
27 |
-
return this.test(s, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
|
28 |
-
},
|
29 |
-
|
30 |
-
isAbsUrl : function(s) {
|
31 |
-
return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');
|
32 |
-
},
|
33 |
-
|
34 |
-
isSize : function(s) {
|
35 |
-
return this.test(s, '^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
|
36 |
-
},
|
37 |
-
|
38 |
-
isId : function(s) {
|
39 |
-
return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');
|
40 |
-
},
|
41 |
-
|
42 |
-
isEmpty : function(s) {
|
43 |
-
var nl, i;
|
44 |
-
|
45 |
-
if (s.nodeName == 'SELECT' && s.selectedIndex < 1)
|
46 |
-
return true;
|
47 |
-
|
48 |
-
if (s.type == 'checkbox' && !s.checked)
|
49 |
-
return true;
|
50 |
-
|
51 |
-
if (s.type == 'radio') {
|
52 |
-
for (i=0, nl = s.form.elements; i<nl.length; i++) {
|
53 |
-
if (nl[i].type == "radio" && nl[i].name == s.name && nl[i].checked)
|
54 |
-
return false;
|
55 |
-
}
|
56 |
-
|
57 |
-
return true;
|
58 |
-
}
|
59 |
-
|
60 |
-
return new RegExp('^\\s*$').test(s.nodeType == 1 ? s.value : s);
|
61 |
-
},
|
62 |
-
|
63 |
-
isNumber : function(s, d) {
|
64 |
-
return !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
|
65 |
-
},
|
66 |
-
|
67 |
-
test : function(s, p) {
|
68 |
-
s = s.nodeType == 1 ? s.value : s;
|
69 |
-
|
70 |
-
return s == '' || new RegExp(p).test(s);
|
71 |
-
}
|
72 |
-
};
|
73 |
-
|
74 |
-
var AutoValidator = {
|
75 |
-
settings : {
|
76 |
-
id_cls : 'id',
|
77 |
-
int_cls : 'int',
|
78 |
-
url_cls : 'url',
|
79 |
-
number_cls : 'number',
|
80 |
-
email_cls : 'email',
|
81 |
-
size_cls : 'size',
|
82 |
-
required_cls : 'required',
|
83 |
-
invalid_cls : 'invalid',
|
84 |
-
min_cls : 'min',
|
85 |
-
max_cls : 'max'
|
86 |
-
},
|
87 |
-
|
88 |
-
init : function(s) {
|
89 |
-
var n;
|
90 |
-
|
91 |
-
for (n in s)
|
92 |
-
this.settings[n] = s[n];
|
93 |
-
},
|
94 |
-
|
95 |
-
validate : function(f) {
|
96 |
-
var i, nl, s = this.settings, c = 0;
|
97 |
-
|
98 |
-
nl = this.tags(f, 'label');
|
99 |
-
for (i=0; i<nl.length; i++) {
|
100 |
-
this.removeClass(nl[i], s.invalid_cls);
|
101 |
-
nl[i].setAttribute('aria-invalid', false);
|
102 |
-
}
|
103 |
-
|
104 |
-
c += this.validateElms(f, 'input');
|
105 |
-
c += this.validateElms(f, 'select');
|
106 |
-
c += this.validateElms(f, 'textarea');
|
107 |
-
|
108 |
-
return c == 3;
|
109 |
-
},
|
110 |
-
|
111 |
-
invalidate : function(n) {
|
112 |
-
this.mark(n.form, n);
|
113 |
-
},
|
114 |
-
|
115 |
-
getErrorMessages : function(f) {
|
116 |
-
var nl, i, s = this.settings, field, msg, values, messages = [], ed = tinyMCEPopup.editor;
|
117 |
-
nl = this.tags(f, "label");
|
118 |
-
for (i=0; i<nl.length; i++) {
|
119 |
-
if (this.hasClass(nl[i], s.invalid_cls)) {
|
120 |
-
field = document.getElementById(nl[i].getAttribute("for"));
|
121 |
-
values = { field: nl[i].textContent };
|
122 |
-
if (this.hasClass(field, s.min_cls, true)) {
|
123 |
-
message = ed.getLang('invalid_data_min');
|
124 |
-
values.min = this.getNum(field, s.min_cls);
|
125 |
-
} else if (this.hasClass(field, s.number_cls)) {
|
126 |
-
message = ed.getLang('invalid_data_number');
|
127 |
-
} else if (this.hasClass(field, s.size_cls)) {
|
128 |
-
message = ed.getLang('invalid_data_size');
|
129 |
-
} else {
|
130 |
-
message = ed.getLang('invalid_data');
|
131 |
-
}
|
132 |
-
|
133 |
-
message = message.replace(/{\#([^}]+)\}/g, function(a, b) {
|
134 |
-
return values[b] || '{#' + b + '}';
|
135 |
-
});
|
136 |
-
messages.push(message);
|
137 |
-
}
|
138 |
-
}
|
139 |
-
return messages;
|
140 |
-
},
|
141 |
-
|
142 |
-
reset : function(e) {
|
143 |
-
var t = ['label', 'input', 'select', 'textarea'];
|
144 |
-
var i, j, nl, s = this.settings;
|
145 |
-
|
146 |
-
if (e == null)
|
147 |
-
return;
|
148 |
-
|
149 |
-
for (i=0; i<t.length; i++) {
|
150 |
-
nl = this.tags(e.form ? e.form : e, t[i]);
|
151 |
-
for (j=0; j<nl.length; j++) {
|
152 |
-
this.removeClass(nl[j], s.invalid_cls);
|
153 |
-
nl[j].setAttribute('aria-invalid', false);
|
154 |
-
}
|
155 |
-
}
|
156 |
-
},
|
157 |
-
|
158 |
-
validateElms : function(f, e) {
|
159 |
-
var nl, i, n, s = this.settings, st = true, va = Validator, v;
|
160 |
-
|
161 |
-
nl = this.tags(f, e);
|
162 |
-
for (i=0; i<nl.length; i++) {
|
163 |
-
n = nl[i];
|
164 |
-
|
165 |
-
this.removeClass(n, s.invalid_cls);
|
166 |
-
|
167 |
-
if (this.hasClass(n, s.required_cls) && va.isEmpty(n))
|
168 |
-
st = this.mark(f, n);
|
169 |
-
|
170 |
-
if (this.hasClass(n, s.number_cls) && !va.isNumber(n))
|
171 |
-
st = this.mark(f, n);
|
172 |
-
|
173 |
-
if (this.hasClass(n, s.int_cls) && !va.isNumber(n, true))
|
174 |
-
st = this.mark(f, n);
|
175 |
-
|
176 |
-
if (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n))
|
177 |
-
st = this.mark(f, n);
|
178 |
-
|
179 |
-
if (this.hasClass(n, s.email_cls) && !va.isEmail(n))
|
180 |
-
st = this.mark(f, n);
|
181 |
-
|
182 |
-
if (this.hasClass(n, s.size_cls) && !va.isSize(n))
|
183 |
-
st = this.mark(f, n);
|
184 |
-
|
185 |
-
if (this.hasClass(n, s.id_cls) && !va.isId(n))
|
186 |
-
st = this.mark(f, n);
|
187 |
-
|
188 |
-
if (this.hasClass(n, s.min_cls, true)) {
|
189 |
-
v = this.getNum(n, s.min_cls);
|
190 |
-
|
191 |
-
if (isNaN(v) || parseInt(n.value) < parseInt(v))
|
192 |
-
st = this.mark(f, n);
|
193 |
-
}
|
194 |
-
|
195 |
-
if (this.hasClass(n, s.max_cls, true)) {
|
196 |
-
v = this.getNum(n, s.max_cls);
|
197 |
-
|
198 |
-
if (isNaN(v) || parseInt(n.value) > parseInt(v))
|
199 |
-
st = this.mark(f, n);
|
200 |
-
}
|
201 |
-
}
|
202 |
-
|
203 |
-
return st;
|
204 |
-
},
|
205 |
-
|
206 |
-
hasClass : function(n, c, d) {
|
207 |
-
return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className);
|
208 |
-
},
|
209 |
-
|
210 |
-
getNum : function(n, c) {
|
211 |
-
c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0];
|
212 |
-
c = c.replace(/[^0-9]/g, '');
|
213 |
-
|
214 |
-
return c;
|
215 |
-
},
|
216 |
-
|
217 |
-
addClass : function(n, c, b) {
|
218 |
-
var o = this.removeClass(n, c);
|
219 |
-
n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c;
|
220 |
-
},
|
221 |
-
|
222 |
-
removeClass : function(n, c) {
|
223 |
-
c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' ');
|
224 |
-
return n.className = c != ' ' ? c : '';
|
225 |
-
},
|
226 |
-
|
227 |
-
tags : function(f, s) {
|
228 |
-
return f.getElementsByTagName(s);
|
229 |
-
},
|
230 |
-
|
231 |
-
mark : function(f, n) {
|
232 |
-
var s = this.settings;
|
233 |
-
|
234 |
-
this.addClass(n, s.invalid_cls);
|
235 |
-
n.setAttribute('aria-invalid', 'true');
|
236 |
-
this.markLabels(f, n, s.invalid_cls);
|
237 |
-
|
238 |
-
return false;
|
239 |
-
},
|
240 |
-
|
241 |
-
markLabels : function(f, n, ic) {
|
242 |
-
var nl, i;
|
243 |
-
|
244 |
-
nl = this.tags(f, "label");
|
245 |
-
for (i=0; i<nl.length; i++) {
|
246 |
-
if (nl[i].getAttribute("for") == n.id || nl[i].htmlFor == n.id)
|
247 |
-
this.addClass(nl[i], ic);
|
248 |
-
}
|
249 |
-
|
250 |
-
return null;
|
251 |
-
}
|
252 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
users/import.php
CHANGED
@@ -12,7 +12,7 @@ if ($controls->is_action('import')) {
|
|
12 |
$mode = $controls->data['mode'];
|
13 |
|
14 |
// TODO: to be removed, it's not safe
|
15 |
-
@set_time_limit(
|
16 |
|
17 |
$results = '';
|
18 |
|
12 |
$mode = $controls->data['mode'];
|
13 |
|
14 |
// TODO: to be removed, it's not safe
|
15 |
+
@set_time_limit(0);
|
16 |
|
17 |
$results = '';
|
18 |
|
widget/minimal.php
CHANGED
@@ -26,9 +26,15 @@ class NewsletterWidgetMinimal extends WP_Widget {
|
|
26 |
}
|
27 |
|
28 |
$options_profile = get_option('newsletter_profile');
|
|
|
29 |
|
30 |
$form = '<div class="tnp tnp-widget-minimal">';
|
31 |
$form .= '<form action="' . esc_attr(home_url('/')) . '?na=s" method="post">';
|
|
|
|
|
|
|
|
|
|
|
32 |
// Referrer
|
33 |
$form .= '<input type="hidden" name="nr" value="widget-minimal"/>';
|
34 |
|
@@ -51,6 +57,10 @@ class NewsletterWidgetMinimal extends WP_Widget {
|
|
51 |
$instance = array();
|
52 |
}
|
53 |
$instance = array_merge(array('title' => '', 'text' => ''), $instance);
|
|
|
|
|
|
|
|
|
54 |
?>
|
55 |
<p>
|
56 |
<label for="<?php echo $this->get_field_id('title'); ?>">
|
@@ -65,6 +75,22 @@ class NewsletterWidgetMinimal extends WP_Widget {
|
|
65 |
</label>
|
66 |
</p>
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
<?php
|
69 |
}
|
70 |
|
26 |
}
|
27 |
|
28 |
$options_profile = get_option('newsletter_profile');
|
29 |
+
|
30 |
|
31 |
$form = '<div class="tnp tnp-widget-minimal">';
|
32 |
$form .= '<form action="' . esc_attr(home_url('/')) . '?na=s" method="post">';
|
33 |
+
if (is_array($instance['nl'])) {
|
34 |
+
foreach ($instance['nl'] as $a) {
|
35 |
+
$form .= "<input type='hidden' name='nl[]' value='" . ((int) trim($a)) . "'>\n";
|
36 |
+
}
|
37 |
+
}
|
38 |
// Referrer
|
39 |
$form .= '<input type="hidden" name="nr" value="widget-minimal"/>';
|
40 |
|
57 |
$instance = array();
|
58 |
}
|
59 |
$instance = array_merge(array('title' => '', 'text' => ''), $instance);
|
60 |
+
$options_profile = get_option('newsletter_profile');
|
61 |
+
if (!is_array($instance['nl'])) {
|
62 |
+
$instance['nl'] = array();
|
63 |
+
}
|
64 |
?>
|
65 |
<p>
|
66 |
<label for="<?php echo $this->get_field_id('title'); ?>">
|
75 |
</label>
|
76 |
</p>
|
77 |
|
78 |
+
<p>
|
79 |
+
<?php _e('Automatically subscribe to', 'newsletter') ?>
|
80 |
+
<br>
|
81 |
+
<?php
|
82 |
+
for ($i = 1; $i <= NEWSLETTER_LIST_MAX; $i++) {
|
83 |
+
if (empty($options_profile['list_' . $i]) || empty($options_profile['list_' . $i . '_status'])) {
|
84 |
+
continue;
|
85 |
+
}
|
86 |
+
?>
|
87 |
+
<label for="nl<?php echo $i ?>">
|
88 |
+
<input type="checkbox" value="<?php echo $i ?>" name="<?php echo $this->get_field_name('nl[]') ?>" <?php echo array_search($i, $instance['nl']) !== false ? 'checked' : '' ?>> <?php echo esc_html($options_profile['list_' . $i]) ?>
|
89 |
+
</label>
|
90 |
+
<br>
|
91 |
+
<?php } ?>
|
92 |
+
</p>
|
93 |
+
|
94 |
<?php
|
95 |
}
|
96 |
|
widget/standard.php
CHANGED
@@ -13,19 +13,20 @@ class NewsletterWidget extends WP_Widget {
|
|
13 |
static function get_widget_form($instance) {
|
14 |
|
15 |
$field_wrapper_tag = 'div';
|
|
|
16 |
|
17 |
$options_profile = get_option('newsletter_profile');
|
18 |
//$form = NewsletterSubscription::instance()->get_form_javascript();
|
19 |
$form = '';
|
20 |
|
21 |
$form .= '<div class="tnp tnp-widget">';
|
22 |
-
$form .= NewsletterSubscription::instance()->get_subscription_form_html5('widget');
|
23 |
$form .= "</div>\n";
|
24 |
|
25 |
return $form;
|
26 |
}
|
27 |
|
28 |
-
static function get_old_widget_form() {
|
29 |
$options_profile = get_option('newsletter_profile');
|
30 |
$form = NewsletterSubscription::instance()->get_form_javascript();
|
31 |
|
@@ -33,6 +34,12 @@ class NewsletterWidget extends WP_Widget {
|
|
33 |
$form .= '<form action="' . home_url('/') . '?na=s" onsubmit="return newsletter_check(this)" method="post">';
|
34 |
// Referrer
|
35 |
$form .= '<input type="hidden" name="nr" value="widget"/>';
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
if ($options_profile['name_status'] == 2) {
|
38 |
$form .= '<p><input class="tnp-firstname" type="text" name="nn" value="' . esc_attr($options_profile['name']) . '" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>';
|
@@ -131,7 +138,7 @@ class NewsletterWidget extends WP_Widget {
|
|
131 |
if (stripos($instance['text'], '<form') === false) {
|
132 |
|
133 |
if (isset($instance['old_form'])) {
|
134 |
-
$form = NewsletterWidget::get_old_widget_form();
|
135 |
} else {
|
136 |
$form = NewsletterWidget::get_widget_form($instance);
|
137 |
}
|
@@ -171,9 +178,12 @@ class NewsletterWidget extends WP_Widget {
|
|
171 |
}
|
172 |
|
173 |
function form($instance) {
|
174 |
-
if (!is_array($instance))
|
175 |
$instance = array();
|
|
|
176 |
$instance = array_merge(array('title' => '', 'text' => ''), $instance);
|
|
|
|
|
177 |
?>
|
178 |
<p>
|
179 |
<label for="<?php echo $this->get_field_id('title'); ?>">
|
@@ -181,12 +191,28 @@ class NewsletterWidget extends WP_Widget {
|
|
181 |
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($instance['title']); ?>" />
|
182 |
</label>
|
183 |
|
184 |
-
|
185 |
<label for="<?php echo $this->get_field_id('text'); ?>">
|
186 |
Introduction:
|
187 |
<textarea class="widefat" rows="10" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo esc_html($instance['text']); ?></textarea>
|
188 |
</label>
|
189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
<label for="<?php echo $this->get_field_id('old_form'); ?>">
|
191 |
<input type="checkbox" id="<?php echo $this->get_field_id('old_form'); ?>" name="<?php echo $this->get_field_name('old_form'); ?>" <?php echo isset($instance['old_form']) ? 'checked' : '' ?>>
|
192 |
Use the old form (will be removed in future versions)
|
13 |
static function get_widget_form($instance) {
|
14 |
|
15 |
$field_wrapper_tag = 'div';
|
16 |
+
if (!is_array($instance['nl'])) $instance['nl'] = array();
|
17 |
|
18 |
$options_profile = get_option('newsletter_profile');
|
19 |
//$form = NewsletterSubscription::instance()->get_form_javascript();
|
20 |
$form = '';
|
21 |
|
22 |
$form .= '<div class="tnp tnp-widget">';
|
23 |
+
$form .= NewsletterSubscription::instance()->get_subscription_form_html5('widget', null, array('list'=> implode(',', $instance['nl'])));
|
24 |
$form .= "</div>\n";
|
25 |
|
26 |
return $form;
|
27 |
}
|
28 |
|
29 |
+
static function get_old_widget_form($instance) {
|
30 |
$options_profile = get_option('newsletter_profile');
|
31 |
$form = NewsletterSubscription::instance()->get_form_javascript();
|
32 |
|
34 |
$form .= '<form action="' . home_url('/') . '?na=s" onsubmit="return newsletter_check(this)" method="post">';
|
35 |
// Referrer
|
36 |
$form .= '<input type="hidden" name="nr" value="widget"/>';
|
37 |
+
|
38 |
+
if (is_array($instance['nl'])) {
|
39 |
+
foreach ($instance['nl'] as $a) {
|
40 |
+
$form .= "<input type='hidden' name='nl[]' value='" . ((int) trim($a)) . "'>\n";
|
41 |
+
}
|
42 |
+
}
|
43 |
|
44 |
if ($options_profile['name_status'] == 2) {
|
45 |
$form .= '<p><input class="tnp-firstname" type="text" name="nn" value="' . esc_attr($options_profile['name']) . '" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>';
|
138 |
if (stripos($instance['text'], '<form') === false) {
|
139 |
|
140 |
if (isset($instance['old_form'])) {
|
141 |
+
$form = NewsletterWidget::get_old_widget_form($instance);
|
142 |
} else {
|
143 |
$form = NewsletterWidget::get_widget_form($instance);
|
144 |
}
|
178 |
}
|
179 |
|
180 |
function form($instance) {
|
181 |
+
if (!is_array($instance)) {
|
182 |
$instance = array();
|
183 |
+
}
|
184 |
$instance = array_merge(array('title' => '', 'text' => ''), $instance);
|
185 |
+
$options_profile = get_option('newsletter_profile');
|
186 |
+
if (!is_array($instance['nl'])) $instance['nl'] = array();
|
187 |
?>
|
188 |
<p>
|
189 |
<label for="<?php echo $this->get_field_id('title'); ?>">
|
191 |
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($instance['title']); ?>" />
|
192 |
</label>
|
193 |
|
|
|
194 |
<label for="<?php echo $this->get_field_id('text'); ?>">
|
195 |
Introduction:
|
196 |
<textarea class="widefat" rows="10" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo esc_html($instance['text']); ?></textarea>
|
197 |
</label>
|
198 |
|
199 |
+
<br><br>
|
200 |
+
<?php _e('Automatically subscribe to', 'newsletter')?>
|
201 |
+
<br>
|
202 |
+
<?php
|
203 |
+
for ($i = 1; $i <= NEWSLETTER_LIST_MAX; $i++) {
|
204 |
+
if (empty($options_profile['list_' . $i])) continue;
|
205 |
+
if (empty($options_profile['list_' . $i . '_status'])) continue;
|
206 |
+
?>
|
207 |
+
<label for="nl<?php echo $i?>">
|
208 |
+
<input type="checkbox" value="<?php echo $i?>" name="<?php echo $this->get_field_name('nl[]') ?>" <?php echo array_search($i, $instance['nl']) !== false?'checked':''?>> <?php echo esc_html($options_profile['list_' . $i]) ?>
|
209 |
+
</label>
|
210 |
+
<br>
|
211 |
+
<?php } ?>
|
212 |
+
|
213 |
+
|
214 |
+
<br>
|
215 |
+
|
216 |
<label for="<?php echo $this->get_field_id('old_form'); ?>">
|
217 |
<input type="checkbox" id="<?php echo $this->get_field_id('old_form'); ?>" name="<?php echo $this->get_field_name('old_form'); ?>" <?php echo isset($instance['old_form']) ? 'checked' : '' ?>>
|
218 |
Use the old form (will be removed in future versions)
|