Version Description
Download this release
Release Info
Developer | satollo |
Plugin | Newsletter |
Version | 1.5.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.5.0
- convert.php +37 -0
- emails.php +11 -0
- export.php +20 -0
- forms.php +11 -0
- header.php +4 -0
- import.php +22 -37
- languages/de_DE.php +59 -0
- languages/de_DE_options.php +56 -0
- languages/en_US.php +31 -0
- languages/en_US_options.php +21 -0
- languages/it_IT.php +24 -0
- languages/newsletter-ru_RU.mo +0 -0
- languages/newsletter-ru_RU.po +784 -0
- languages/newsletter.pot +767 -0
- languages/pl_PL.php +59 -0
- languages/pl_PL_options.php +53 -0
- languages/pt_BR.php +24 -0
- languages/ru_RU.php +66 -0
- languages/ru_RU_options.php +66 -0
- manage.php +185 -83
- newsletter.php +382 -192
- options.php +275 -131
- plugin.php +773 -302
- readme.txt +9 -19
- statistics.php +11 -0
- themes/blank/theme.php +1 -0
- themes/default.html +0 -33
- themes/default/it_IT.php +5 -0
- themes/default/style.css +5 -0
- themes/default/theme.php +30 -0
- themes/messages/theme.php +9 -0
- themes/picture.html +0 -51
- {images → themes/with-picture}/empty.gif +0 -0
- themes/with-picture/it_IT.php +5 -0
- themes/with-picture/theme.php +39 -0
- tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
- tiny_mce/plugins/fullscreen/editor_plugin_src.js +148 -0
- tiny_mce/plugins/fullscreen/fullscreen.htm +110 -0
- tiny_mce/themes/advanced/color_picker.htm +1 -1
- tiny_mce/themes/advanced/editor_template.js +1 -1
- tiny_mce/themes/advanced/editor_template_src.js +1209 -0
- tiny_mce/themes/advanced/skins/default/content.css +4 -0
- tiny_mce/themes/advanced/skins/default/ui.css +2 -1
- tiny_mce/themes/advanced/skins/o2k7/content.css +35 -0
- tiny_mce/themes/advanced/skins/o2k7/dialog.css +115 -0
- 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 +216 -0
- tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
- tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
- tiny_mce/tiny_mce.js +1 -1
- tiny_mce/tiny_mce_popup.js +1 -1
- widget.php +28 -16
convert.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<div class="wrap">
|
3 |
+
<form method="post" action="">
|
4 |
+
<h2>Conversion</h2>
|
5 |
+
<p>From version 1.4.8 a new database structure has been adopted, so it's better to
|
6 |
+
convert you actual data to the new format. No data will be lost or has been lost since your
|
7 |
+
last update.
|
8 |
+
</p>
|
9 |
+
|
10 |
+
<?php
|
11 |
+
|
12 |
+
if (isset($_POST['convert'])) {
|
13 |
+
$query = "select id,profile from " . $wpdb->prefix . "newsletter";
|
14 |
+
$recipients = $wpdb->get_results($query);
|
15 |
+
foreach ($recipients as $s) {
|
16 |
+
$profile = unserialize($s->profile);
|
17 |
+
if ($profile) {
|
18 |
+
foreach ($profile as $name=>$value) {
|
19 |
+
@$wpdb->insert($wpdb->prefix . 'newsletter_profiles', array(
|
20 |
+
'newsletter_id'=>$s->id,
|
21 |
+
'name'=>$name,
|
22 |
+
'value'=>$value));
|
23 |
+
}
|
24 |
+
@$wpdb->query('update ' . $wpdb->prefix . 'newsletter set profile=null where id=' . $s->id);
|
25 |
+
}
|
26 |
+
}
|
27 |
+
echo "DONE!";
|
28 |
+
}
|
29 |
+
?>
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
<p class="submit">
|
34 |
+
<input class="button" type="submit" name="convert" value="Convert"/>
|
35 |
+
</p>
|
36 |
+
</form>
|
37 |
+
</div>
|
emails.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
|
3 |
+
<h2>Statistics</h2>
|
4 |
+
|
5 |
+
<?php if (!newsletter_has_extras('1.0.3')) { ?>
|
6 |
+
<strong>You need the <a href="http://www.satollo.net/plugins/newsletter/extras">Newsletter Extras</a> installed to view statistics</strong>
|
7 |
+
<?php } else { ?>
|
8 |
+
<?php require_once ABSPATH . 'wp-content/plugins/newsletter-extras/emails.php'; ?>
|
9 |
+
<?php } ?>
|
10 |
+
|
11 |
+
</div>
|
export.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$plugin_dir = basename(dirname(__FILE__));
|
3 |
+
load_plugin_textdomain('newsletter', 'wp-content/plugins/' . $plugin_dir . '/languages/');
|
4 |
+
?>
|
5 |
+
|
6 |
+
<div class="wrap">
|
7 |
+
<h2><?php _e('Subscribers Export', 'newsletter'); ?></h2>
|
8 |
+
|
9 |
+
<p><?php _e('The text below is a list of all your subscribers (confirmed and not) in cvs format. You can copy, save and edit it with Excel or other software. Status column has 2 values: S - subscribed but not confirmed, C - confirmed.', 'newsletter'); ?></p>
|
10 |
+
|
11 |
+
<textarea wrap="off" style="width: 100%; height: 300px; font-size: 11px; font-family: monospace"><?php _e('Email', 'newsletter'); ?>,<?php _e('Name', 'newsletter'); ?>,<?php _e('Status', 'newsletter'); ?>,<?php _e('Token', 'newsletter'); ?>
|
12 |
+
<?php
|
13 |
+
$query = "select * from " . $wpdb->prefix . "newsletter";
|
14 |
+
$recipients = $wpdb->get_results($query . " order by email");
|
15 |
+
for ($i=0; $i<count($recipients); $i++) {
|
16 |
+
echo $recipients[$i]->email . ';' . $recipients[$i]->name .
|
17 |
+
';' . $recipients[$i]->status . ';' . $recipients[$i]->token . "\n";
|
18 |
+
}
|
19 |
+
?></textarea>
|
20 |
+
</div>
|
forms.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
|
3 |
+
<h2>Forms</h2>
|
4 |
+
|
5 |
+
<?php if (!defined('NEWSLETTER_EXTRAS')) { ?>
|
6 |
+
<strong>You need the <a href="http://www.satollo.net/plugins/newsletter/extras">Newsletter Extras</a> installed to use this panel</strong>
|
7 |
+
<?php } else { ?>
|
8 |
+
<?php require_once ABSPATH . 'wp-content/plugins/newsletter-extras/forms.php'; ?>
|
9 |
+
<?php } ?>
|
10 |
+
|
11 |
+
</div>
|
header.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<iframe width="100%" height="100" src="http://www.satollo.net/services/newsletter?extras=<?php echo NEWSLETTER_EXTRAS; ?>" style="border: 1px solid #ccc"></iframe>
|
2 |
+
<?php if (newsletter_has_extras()) { ?>
|
3 |
+
<p>You have Newsletter Extras package version <?php echo NEWSLETTER_EXTRAS; ?> installed. Thank you!</strong></p>
|
4 |
+
<?php } ?>
|
import.php
CHANGED
@@ -1,13 +1,20 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
if (!check_admin_referer()) die('No hacking please');
|
|
|
5 |
$csv = newsletter_request('csv');
|
6 |
$lines = explode("\n", $csv);
|
7 |
|
8 |
$errors = array();
|
9 |
-
foreach ($lines as $line)
|
10 |
-
{
|
11 |
$line = trim($line);
|
12 |
if ($line == '') continue;
|
13 |
if ($line[0] == '#') continue;
|
@@ -29,50 +36,28 @@ if (isset($_POST['import']))
|
|
29 |
|
30 |
<div class="wrap">
|
31 |
|
32 |
-
<h2
|
|
|
|
|
33 |
|
34 |
-
<?php if ($errors) { ?>
|
35 |
-
<h3>Rows with errors</h3>
|
36 |
|
|
|
37 |
<textarea wrap="off" style="width: 100%; height: 150px; font-size: 11px; font-family: monospace"><?php echo htmlspecialchars(implode("\n", $errors))?></textarea>
|
38 |
|
39 |
-
|
40 |
|
41 |
<form method="post">
|
42 |
-
|
43 |
-
<h3
|
44 |
-
<p
|
45 |
-
with format:<br /><br />
|
46 |
-
user email;user name
|
47 |
-
<br /><br />
|
48 |
-
and then import them. If an email is already stored, it won't be imported. If an
|
49 |
-
email is wrong it won't be imported. Even when there are errors on CSV lines, the import
|
50 |
-
will continue to the end. After the import process has ended, a box will appear with all
|
51 |
-
the line not imported due to duplications or errors. Imported subscriber will be set as confirmed.
|
52 |
</p>
|
53 |
-
<p
|
54 |
-
subscriber token generated for each imported email.</p>
|
55 |
|
56 |
<textarea name="csv" wrap="off" style="width: 100%; height: 300px; font-size: 11px; font-family: monospace"></textarea>
|
57 |
<p class="submit">
|
58 |
-
<input class="button" type="submit" name="import" value="Import"/>
|
59 |
</p>
|
60 |
</form>
|
61 |
|
62 |
-
<h3>Export</h3>
|
63 |
-
<p>The text below is a list of all your subscribers (confirmed and not) in a
|
64 |
-
cvs format. You can copy, save and edit it with Excel or other software. Status
|
65 |
-
column has 2 values: S - subscribed but not confirmed, C - confirmed.</p>
|
66 |
-
|
67 |
-
<textarea wrap="off" style="width: 100%; height: 300px; font-size: 11px; font-family: monospace">Email,Name,Status,Token
|
68 |
-
<?php
|
69 |
-
$query = "select * from " . $wpdb->prefix . "newsletter where status='C'";
|
70 |
-
$recipients = $wpdb->get_results($query . " order by email");
|
71 |
-
for ($i=0; $i<count($recipients); $i++)
|
72 |
-
{
|
73 |
-
echo $recipients[$i]->email . ';' . $recipients[$i]->name .
|
74 |
-
';' . $recipients[$i]->status . ';' . $recipients[$i]->token . "\n";
|
75 |
-
}
|
76 |
-
?></textarea>
|
77 |
-
|
78 |
</div>
|
1 |
<?php
|
2 |
+
|
3 |
+
$options = get_option('newsletter');
|
4 |
+
|
5 |
+
if (!isset($options['no_translation'])) {
|
6 |
+
$plugin_dir = basename(dirname(__FILE__));
|
7 |
+
load_plugin_textdomain('newsletter', 'wp-content/plugins/' . $plugin_dir . '/languages/');
|
8 |
+
}
|
9 |
+
|
10 |
+
if (isset($_POST['import'])) {
|
11 |
if (!check_admin_referer()) die('No hacking please');
|
12 |
+
@set_time_limit(100000);
|
13 |
$csv = newsletter_request('csv');
|
14 |
$lines = explode("\n", $csv);
|
15 |
|
16 |
$errors = array();
|
17 |
+
foreach ($lines as $line) {
|
|
|
18 |
$line = trim($line);
|
19 |
if ($line == '') continue;
|
20 |
if ($line[0] == '#') continue;
|
36 |
|
37 |
<div class="wrap">
|
38 |
|
39 |
+
<h2><?php _e('Subscribers Import', 'newsletter'); ?></h2>
|
40 |
+
|
41 |
+
<?php require_once 'header.php'; ?>
|
42 |
|
43 |
+
<?php if ($errors) { ?>
|
|
|
44 |
|
45 |
+
<h3><?php _e('Rows with errors', 'newsletter'); ?></h3>
|
46 |
<textarea wrap="off" style="width: 100%; height: 150px; font-size: 11px; font-family: monospace"><?php echo htmlspecialchars(implode("\n", $errors))?></textarea>
|
47 |
|
48 |
+
<?php } ?>
|
49 |
|
50 |
<form method="post">
|
51 |
+
<?php wp_nonce_field(); ?>
|
52 |
+
<h3><?php _e('Import', 'newsletter'); ?></h3>
|
53 |
+
<p><?php _e('On the textarea below you can copy a text in CSV (comma separated values) with format:<br /><br /> <pre>user email;user name</pre><br /><br />and then import them. If an email is already stored, it won\'t be imported. If an email is wrong it won\'t be imported. Even when there are errors on CSV lines, the import will continue to the end. After the import process has ended, a box will appear with all the line not imported due to duplications or errors. Imported subscriber will be set as confirmed.', 'newsletter'); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
</p>
|
55 |
+
<p><?php _e('Empty rows and rows staring with sharp (#) are skipped. Emails will be normalized and a subscriber token generated for each imported email.', 'newsletter'); ?></p>
|
|
|
56 |
|
57 |
<textarea name="csv" wrap="off" style="width: 100%; height: 300px; font-size: 11px; font-family: monospace"></textarea>
|
58 |
<p class="submit">
|
59 |
+
<input class="button" type="submit" name="import" value="<?php _e('Import', 'newsletter'); ?>"/>
|
60 |
</p>
|
61 |
</form>
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
</div>
|
languages/de_DE.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Subscription form (traslate "your name", "your email" and the button "subscribe me")
|
4 |
+
$newsletter_labels['subscription_form'] =
|
5 |
+
'<form method="post" action="" style="text-align: center">
|
6 |
+
<input type="hidden" name="na" value="s"/>
|
7 |
+
<table cellspacing="3" cellpadding="3" border="0" width="50%">
|
8 |
+
<tr><td>Ihr Name</td><td><input type="text" name="nn" size="30"/></td></tr>
|
9 |
+
<tr><td>Ihre Email</td><td><input type="text" name="ne" size="30"/></td></tr>
|
10 |
+
<tr><td colspan="2" style="text-align: center"><input type="submit" value="Eintragen"/></td></tr>
|
11 |
+
</table>
|
12 |
+
</form>';
|
13 |
+
|
14 |
+
$newsletter_labels['subscription_form_noname'] =
|
15 |
+
'<form method="post" action="" style="text-align: center">
|
16 |
+
<input type="hidden" name="na" value="s"/>
|
17 |
+
<table cellspacing="3" cellpadding="3" border="0" width="50%">
|
18 |
+
<tr><td>Ihre Email</td><td><input type="text" name="ne" size="30"/></td></tr>
|
19 |
+
<tr><td colspan="2" style="text-align: center"><input type="submit" value="Eintragen"/></td></tr>
|
20 |
+
</table>
|
21 |
+
</form>';
|
22 |
+
|
23 |
+
$newsletter_labels['widget_form'] =
|
24 |
+
'<form action="{newsletter_url}" method="post">
|
25 |
+
{text}
|
26 |
+
<p><input type="text" name="nn" value="Ihr Name" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>
|
27 |
+
<p><input type="text" name="ne" value="Ihre Email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>
|
28 |
+
<p><input type="submit" value="Eintragen"/></p>
|
29 |
+
<input type="hidden" name="na" value="s"/>
|
30 |
+
</form>';
|
31 |
+
|
32 |
+
$newsletter_labels['widget_form_noname'] =
|
33 |
+
'<form action="{newsletter_url}" method="post">
|
34 |
+
{text}
|
35 |
+
<p><input type="text" name="ne" value="Ihre Email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>
|
36 |
+
<p><input type="submit" value="Eintragen"/></p>
|
37 |
+
<input type="hidden" name="na" value="s"/>
|
38 |
+
</form>';
|
39 |
+
|
40 |
+
$newsletter_labels['embedded_form'] =
|
41 |
+
'<form action="{newsletter_url}" method="post">
|
42 |
+
<p><input type="text" name="ne" value="Ihre Email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
43 |
+
<input type="text" name="nn" value="Ihr Name" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
44 |
+
<input type="submit" value="Eintragen"/>
|
45 |
+
<input type="hidden" name="na" value="s"/></p>
|
46 |
+
</form>';
|
47 |
+
|
48 |
+
$newsletter_labels['embedded_form_noname'] =
|
49 |
+
'<form action="{newsletter_url}" method="post">
|
50 |
+
<p><input type="text" name="ne" value="Ihre Email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
51 |
+
<input type="submit" value="Eintragen"/>
|
52 |
+
<input type="hidden" name="na" value="s"/></p>
|
53 |
+
</form>';
|
54 |
+
|
55 |
+
// Errors on subscription
|
56 |
+
$newsletter_labels['error_email'] = 'Falsche Email-Adresse. <a href="javascript:history.back()">Go back</a>.';
|
57 |
+
$newsletter_labels['error_name'] = 'Das Feld für Ihren namen darf nicht leer sein. <a href="javascript:history.back()">Go back</a>.';
|
58 |
+
|
59 |
+
?>
|
languages/de_DE_options.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// This file contains the default options values
|
3 |
+
|
4 |
+
// Subscription page introductory text (befor the subscription form)
|
5 |
+
$newsletter_default_options['subscription_text'] =
|
6 |
+
"<p>Um unseren Newsletter zu erhalten füllen Sie das folgende Formular aus.</p>
|
7 |
+
<p>Sie erhalten eine Bestätigungs-Email an Ihre Email-Adresse:
|
8 |
+
bitte folgen Sie den Anweisungen um Ihre Anmeldung zu vollenden.</p>";
|
9 |
+
|
10 |
+
// Message show after a subbscription request has made.
|
11 |
+
$newsletter_default_options['subscribed_text'] =
|
12 |
+
"<p>Sie haben sich in unseren Newsletter eingetragen.
|
13 |
+
In wenigen Minuten erhalten Sie eine Bestätigungs-Email. Folgen Sie dem Link um die Anmeldung zu bestätigen. Sollte die Email nicht innerhalb der nächsten 15 Minuten in Ihrem Posteingang erscheinen, überprüfen Sie Ihren Spam-Ordner.</p>";
|
14 |
+
|
15 |
+
// Confirmation email subject (double opt-in)
|
16 |
+
$newsletter_default_options['confirmation_subject'] =
|
17 |
+
"{name},{blog_title} Newsletter - hier Anmeldebestätigung";
|
18 |
+
|
19 |
+
// Confirmation email body (double opt-in)
|
20 |
+
$newsletter_default_options['confirmation_message'] =
|
21 |
+
"<p>Hallo {name},</p>
|
22 |
+
<p>F�r diese Email-Adresse haben wir eine Anmeldung zu unserem Newsletter erhalten. Sie können diese Anmeldung bestätigen, in dem Sie <a href=\"{subscription_confirm_url}\"><strong>hier klicken</strong></a>.
|
23 |
+
Wenn Sie nicht klicken können, nutzen Sie die folgenden URL in Ihren Browser ein:</p>
|
24 |
+
<p>{subscription_confirm_url}</p>
|
25 |
+
<p>Wenn die Anmeldung zu unserem Newsletter nicht von Ihnen stammt, ignorieren Sie diese Nachricht einfach.</p>
|
26 |
+
<p>Vielen Dank.</p>";
|
27 |
+
|
28 |
+
|
29 |
+
// Subscription confirmed text (after a user clicked the confirmation link
|
30 |
+
// on the email he received
|
31 |
+
$newsletter_default_options['confirmed_text'] =
|
32 |
+
"<p>Ihre Anmeldung zu unserem Newsletter wurde bestätigt!
|
33 |
+
Herzlichen Dank!</p>";
|
34 |
+
|
35 |
+
$newsletter_default_options['confirmed_subject'] =
|
36 |
+
",{blog_title} Newsletter - Willkommen";
|
37 |
+
|
38 |
+
$newsletter_default_options['confirmed_message'] =
|
39 |
+
"<p>
|
40 |
+
Hallo {name}
|
41 |
+
Willkommen zu unserem {blog_title} Newsletter.</p>
|
42 |
+
<p>
|
43 |
+
Wir werden Sie k�nftig regelmäßig über Neuigkeiten zu {blog_title} informieren</p>
|
44 |
+
<p>
|
45 |
+
Wenn Sie unseren newsletter nicht mehr erhalten möchten, tragen Sie sich bitte unter dem folgenden Link aus dem Verteiler aus: <a href=\"{newsletter_url}\">austragen</a></p>
|
46 |
+
<p>Besten Dank!</p>";
|
47 |
+
|
48 |
+
// Unsubscription request introductory text
|
49 |
+
$newsletter_default_options['unsubscription_text'] =
|
50 |
+
"<p>Bitte bestätigen Sie, dass Sie unseren Newsletter abbestellen, indem Sie
|
51 |
+
<a href=\"{unsubscription_confirm_url}\">hier klicken</a>.";
|
52 |
+
|
53 |
+
// When you finally loosed your subscriber
|
54 |
+
$newsletter_default_options['unsubscribed_text'] =
|
55 |
+
"<p>Herzlichen Dank, Sie wurden aus dem Verteiler entfernt...</p>";
|
56 |
+
?>
|
languages/en_US.php
CHANGED
@@ -11,6 +11,16 @@ $newsletter_labels['subscription_form'] =
|
|
11 |
</table>
|
12 |
</form>';
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
$newsletter_labels['widget_form'] =
|
15 |
'<form action="{newsletter_url}" method="post">
|
16 |
{text}
|
@@ -20,6 +30,17 @@ $newsletter_labels['widget_form'] =
|
|
20 |
<input type="hidden" name="na" value="s"/>
|
21 |
</form>';
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
$newsletter_labels['embedded_form'] =
|
24 |
'<form action="{newsletter_url}" method="post">
|
25 |
<p><input type="text" name="ne" value="Your email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
@@ -28,6 +49,16 @@ $newsletter_labels['embedded_form'] =
|
|
28 |
<input type="hidden" name="na" value="s"/></p>
|
29 |
</form>';
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
// Errors on subscription
|
32 |
$newsletter_labels['error_email'] = 'Wrong email address. <a href="javascript:history.back()">Go back</a>.';
|
33 |
$newsletter_labels['error_name'] = 'The name cannot be empty. <a href="javascript:history.back()">Go back</a>.';
|
11 |
</table>
|
12 |
</form>';
|
13 |
|
14 |
+
|
15 |
+
$newsletter_labels['subscription_form_noname'] =
|
16 |
+
'<form method="post" action="" style="text-align: center">
|
17 |
+
<input type="hidden" name="na" value="s"/>
|
18 |
+
<table cellspacing="3" cellpadding="3" border="0" width="50%">
|
19 |
+
<tr><td>Your email</td><td><input type="text" name="ne" size="30"/></td></tr>
|
20 |
+
<tr><td colspan="2" style="text-align: center"><input type="submit" value="Subscribe me"/></td></tr>
|
21 |
+
</table>
|
22 |
+
</form>';
|
23 |
+
|
24 |
$newsletter_labels['widget_form'] =
|
25 |
'<form action="{newsletter_url}" method="post">
|
26 |
{text}
|
30 |
<input type="hidden" name="na" value="s"/>
|
31 |
</form>';
|
32 |
|
33 |
+
|
34 |
+
$newsletter_labels['widget_form_noname'] =
|
35 |
+
'<form action="{newsletter_url}" method="post">
|
36 |
+
{text}
|
37 |
+
<p><input type="text" name="ne" value="Your email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>
|
38 |
+
<p><input type="submit" value="Subscribe"/></p>
|
39 |
+
<input type="hidden" name="na" value="s"/>
|
40 |
+
</form>';
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
$newsletter_labels['embedded_form'] =
|
45 |
'<form action="{newsletter_url}" method="post">
|
46 |
<p><input type="text" name="ne" value="Your email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
49 |
<input type="hidden" name="na" value="s"/></p>
|
50 |
</form>';
|
51 |
|
52 |
+
// Example of embedded form without name
|
53 |
+
|
54 |
+
$newsletter_labels['embedded_form_noname'] =
|
55 |
+
'<form action="{newsletter_url}" method="post">
|
56 |
+
<p><input type="text" name="ne" value="Your email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
57 |
+
<input type="submit" value="Subscribe"/>
|
58 |
+
<input type="hidden" name="na" value="s"/></p>
|
59 |
+
</form>';
|
60 |
+
|
61 |
+
|
62 |
// Errors on subscription
|
63 |
$newsletter_labels['error_email'] = 'Wrong email address. <a href="javascript:history.back()">Go back</a>.';
|
64 |
$newsletter_labels['error_name'] = 'The name cannot be empty. <a href="javascript:history.back()">Go back</a>.';
|
languages/en_US_options.php
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
<?php
|
2 |
// This file contains the default options values
|
|
|
|
|
|
|
|
|
3 |
|
4 |
// Subscription page introductory text (befor the subscription form)
|
5 |
$newsletter_default_options['subscription_text'] =
|
@@ -51,4 +55,21 @@ $newsletter_default_options['unsubscription_text'] =
|
|
51 |
// When you finally loosed your subscriber
|
52 |
$newsletter_default_options['unsubscribed_text'] =
|
53 |
"<p>That make me cry, but I have removed your subscription...</p>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
?>
|
1 |
<?php
|
2 |
// This file contains the default options values
|
3 |
+
$newsletter_default_options['from_email'] = get_option('admin_email');
|
4 |
+
$newsletter_default_options['from_name'] = get_option('blogname');
|
5 |
+
|
6 |
+
|
7 |
|
8 |
// Subscription page introductory text (befor the subscription form)
|
9 |
$newsletter_default_options['subscription_text'] =
|
55 |
// When you finally loosed your subscriber
|
56 |
$newsletter_default_options['unsubscribed_text'] =
|
57 |
"<p>That make me cry, but I have removed your subscription...</p>";
|
58 |
+
|
59 |
+
$newsletter_default_options['unsubscribed_subject'] =
|
60 |
+
"Goodbye, {name}";
|
61 |
+
|
62 |
+
$newsletter_default_options['unsubscribed_message'] =
|
63 |
+
"<p>The message confirm your unsubscription to {blog_title} newsletter.</p>
|
64 |
+
<p>Good bye!</p>";
|
65 |
+
|
66 |
+
$newsletter_default_options['subscription_form'] =
|
67 |
+
'<form method="post" action="" style="text-align: center">
|
68 |
+
<input type="hidden" name="na" value="s"/>
|
69 |
+
<table cellspacing="3" cellpadding="3" border="0" width="50%">
|
70 |
+
<tr><td>Your name</td><td><input type="text" name="nn" size="30"/></td></tr>
|
71 |
+
<tr><td>Your email</td><td><input type="text" name="ne" size="30"/></td></tr>
|
72 |
+
<tr><td colspan="2" style="text-align: center"><input type="submit" value="Subscribe me"/></td></tr>
|
73 |
+
</table>
|
74 |
+
</form>';
|
75 |
?>
|
languages/it_IT.php
CHANGED
@@ -10,6 +10,15 @@ $newsletter_labels['subscription_form'] =
|
|
10 |
</table>
|
11 |
</form>';
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
$newsletter_labels['widget_form'] =
|
14 |
'<form action="{newsletter_url}" method="post">
|
15 |
{text}
|
@@ -19,6 +28,14 @@ $newsletter_labels['widget_form'] =
|
|
19 |
<input type="hidden" name="na" value="s"/>
|
20 |
</form>';
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
// Errors on subscription
|
23 |
$newsletter_labels['error_email'] = 'L\'indirizzo email non è corretto. <a href="javascript:history.back()">Torna indietro</a>.';
|
24 |
$newsletter_labels['error_name'] = 'Il nome non è tato inserito. <a href="javascript:history.back()">Torna indietro</a>.';
|
@@ -31,4 +48,11 @@ $newsletter_labels['embedded_form'] =
|
|
31 |
<input type="hidden" name="na" value="s"/></p>
|
32 |
</form>';
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
?>
|
10 |
</table>
|
11 |
</form>';
|
12 |
|
13 |
+
$newsletter_labels['subscription_form_noname'] =
|
14 |
+
'<form method="post" action="" style="text-align: center">
|
15 |
+
<input type="hidden" name="na" value="s"/>
|
16 |
+
<table cellspacing="3" cellpadding="3" border="0" width="50%">
|
17 |
+
<tr><td>La tua email</td><td><input type="text" name="ne" size="30"/></td></tr>
|
18 |
+
<tr><td colspan="2" style="text-align: center"><input type="submit" value="Iscrivimi!"/></td></tr>
|
19 |
+
</table>
|
20 |
+
</form>';
|
21 |
+
|
22 |
$newsletter_labels['widget_form'] =
|
23 |
'<form action="{newsletter_url}" method="post">
|
24 |
{text}
|
28 |
<input type="hidden" name="na" value="s"/>
|
29 |
</form>';
|
30 |
|
31 |
+
$newsletter_labels['widget_form_noname'] =
|
32 |
+
'<form action="{newsletter_url}" method="post">
|
33 |
+
{text}
|
34 |
+
<p><input type="text" name="ne" value="La tua email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>
|
35 |
+
<p><input type="submit" value="Iscrivimi"/></p>
|
36 |
+
<input type="hidden" name="na" value="s"/>
|
37 |
+
</form>';
|
38 |
+
|
39 |
// Errors on subscription
|
40 |
$newsletter_labels['error_email'] = 'L\'indirizzo email non è corretto. <a href="javascript:history.back()">Torna indietro</a>.';
|
41 |
$newsletter_labels['error_name'] = 'Il nome non è tato inserito. <a href="javascript:history.back()">Torna indietro</a>.';
|
48 |
<input type="hidden" name="na" value="s"/></p>
|
49 |
</form>';
|
50 |
|
51 |
+
$newsletter_labels['embedded_form_noname'] =
|
52 |
+
'<form action="{newsletter_url}" method="post">
|
53 |
+
<p><input type="text" name="ne" value="La tua email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
54 |
+
<input type="submit" value="Iscrivimi"/>
|
55 |
+
<input type="hidden" name="na" value="s"/></p>
|
56 |
+
</form>';
|
57 |
+
|
58 |
?>
|
languages/newsletter-ru_RU.mo
ADDED
Binary file
|
languages/newsletter-ru_RU.po
ADDED
@@ -0,0 +1,784 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Russian Lang for Newsletter\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2010-01-22 20:58+0300\n"
|
6 |
+
"PO-Revision-Date: \n"
|
7 |
+
"Last-Translator: M.O.Z.G <mozg@mozg-studio.org>\n"
|
8 |
+
"Language-Team: M.O.Z.G Studio | http://mozg-studio.org <mozg@mozg-studio.org>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-Language: Russian\n"
|
13 |
+
"X-Poedit-Country: RUSSIAN FEDERATION\n"
|
14 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
+
"X-Poedit-KeywordsList: _e;__;_c;_n\n"
|
16 |
+
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
|
19 |
+
#: export.php:8
|
20 |
+
msgid "Subscribers Export"
|
21 |
+
msgstr "Экспорт подписчиков"
|
22 |
+
|
23 |
+
#: export.php:10
|
24 |
+
msgid "The text below is a list of all your subscribers (confirmed and not) in cvs format. You can copy, save and edit it with Excel or other software. Status column has 2 values: S - subscribed but not confirmed, C - confirmed."
|
25 |
+
msgstr "Приведенный ниже текст представляет собой список всех Ваших подписчиков (подтвержденных и нет) в CVS формате. Вы можете скопировать, сохранить и редактировать их в MS Excel или другом приложении.<br>Статус колонок имеет 2 значения: S - подписчик не подтвержден, C - подтвержден."
|
26 |
+
|
27 |
+
#: export.php:12
|
28 |
+
#: manage.php:148
|
29 |
+
msgid "Email"
|
30 |
+
msgstr "Email"
|
31 |
+
|
32 |
+
#: export.php:12
|
33 |
+
#: manage.php:148
|
34 |
+
msgid "Name"
|
35 |
+
msgstr "Имя"
|
36 |
+
|
37 |
+
#: export.php:12
|
38 |
+
#: manage.php:148
|
39 |
+
msgid "Status"
|
40 |
+
msgstr "Статус"
|
41 |
+
|
42 |
+
#: export.php:12
|
43 |
+
#: manage.php:148
|
44 |
+
msgid "Token"
|
45 |
+
msgstr "Ключ"
|
46 |
+
|
47 |
+
#: import.php:34
|
48 |
+
msgid "Subscribers Import"
|
49 |
+
msgstr "Импорт подписчиков"
|
50 |
+
|
51 |
+
#: import.php:40
|
52 |
+
msgid "Rows with errors"
|
53 |
+
msgstr "Строк с ошибками"
|
54 |
+
|
55 |
+
#: import.php:47
|
56 |
+
#: import.php:54
|
57 |
+
#: plugin.php:934
|
58 |
+
msgid "Import"
|
59 |
+
msgstr "Импорт"
|
60 |
+
|
61 |
+
#: import.php:48
|
62 |
+
msgid "On the textarea below you can copy a text in CSV (comma separated values) with format:<br /><br /> <pre>user email;user name</pre><br /><br />and then import them. If an email is already stored, it won't be imported. If an email is wrong it won't be imported. Even when there are errors on CSV lines, the import will continue to the end. After the import process has ended, a box will appear with all the line not imported due to duplications or errors. Imported subscriber will be set as confirmed."
|
63 |
+
msgstr "В текстовоt поле ниже Вы можете cкопировать текст CSV (Сomma Separated Values) в формате:<br /><br /><pre>email пользователя;имя пользователя</pre><br /><br />а затем импортировать его. Если адреса уже занесены в базу, они не будут импортированы. Если адреса записаны с ошибка, они не будут импортированы. Даже при наличии ошибок в строках CSV, импорт будет продолжаться до конца. После завершения процесса Вам будет показано окно со всеми строками, которые не были импортированы. Испортированые подписчики автоматический станут подтвержденными."
|
64 |
+
|
65 |
+
#: import.php:50
|
66 |
+
msgid "Empty rows and rows staring with sharp (#) are skipped. Emails will be normalized and a subscriber token generated for each imported email."
|
67 |
+
msgstr "Пустые строки и строки содержащие символ решетки (#) будут пропущены. Адреса электронной почты будут форматированы, а пользователям назначен уникальный бинарный код на каждый e-mail."
|
68 |
+
|
69 |
+
#: manage.php:95
|
70 |
+
#: manage_.php:70
|
71 |
+
msgid "Subscribers Management"
|
72 |
+
msgstr "Управление подписчиками"
|
73 |
+
|
74 |
+
#: manage.php:106
|
75 |
+
#: manage.php:109
|
76 |
+
#: manage_.php:81
|
77 |
+
#: manage_.php:84
|
78 |
+
msgid "Search"
|
79 |
+
msgstr "Поиск"
|
80 |
+
|
81 |
+
#: manage.php:109
|
82 |
+
#: manage_.php:84
|
83 |
+
msgid "press without filter to show all"
|
84 |
+
msgstr "оставьте поле пустым, если хотите посмотреть всех подписчиков"
|
85 |
+
|
86 |
+
#: manage.php:116
|
87 |
+
#: manage_.php:91
|
88 |
+
msgid "Only not yet confirmed"
|
89 |
+
msgstr "Только не подвержденные"
|
90 |
+
|
91 |
+
#: manage.php:120
|
92 |
+
msgid "Order"
|
93 |
+
msgstr "Порядок"
|
94 |
+
|
95 |
+
#: manage.php:134
|
96 |
+
#: manage_.php:109
|
97 |
+
msgid "Remove all unconfirmed"
|
98 |
+
msgstr "Удалить всех не подтвержденных"
|
99 |
+
|
100 |
+
#: manage.php:134
|
101 |
+
#: manage_.php:109
|
102 |
+
msgid "Are your sure, really sure?"
|
103 |
+
msgstr "Вы уверены?"
|
104 |
+
|
105 |
+
#: manage.php:138
|
106 |
+
#: manage_.php:113
|
107 |
+
msgid "Subscriber's statistics"
|
108 |
+
msgstr "Статистика подписчиков"
|
109 |
+
|
110 |
+
#: manage.php:139
|
111 |
+
#: manage_.php:114
|
112 |
+
msgid "Confirmed subscriber"
|
113 |
+
msgstr "Подтвержденный подписчик"
|
114 |
+
|
115 |
+
#: manage.php:141
|
116 |
+
#: manage_.php:116
|
117 |
+
msgid "Unconfirmed subscriber"
|
118 |
+
msgstr "Не подтвержденный подписчик"
|
119 |
+
|
120 |
+
#: manage.php:143
|
121 |
+
#: manage_.php:118
|
122 |
+
msgid "Results"
|
123 |
+
msgstr "Результат"
|
124 |
+
|
125 |
+
#: manage.php:148
|
126 |
+
msgid "Profile"
|
127 |
+
msgstr "Профиль"
|
128 |
+
|
129 |
+
#: manage.php:148
|
130 |
+
msgid "Actions"
|
131 |
+
msgstr "Действия"
|
132 |
+
|
133 |
+
#: manage.php:166
|
134 |
+
msgid "remove"
|
135 |
+
msgstr "удалить"
|
136 |
+
|
137 |
+
#: manage.php:167
|
138 |
+
msgid "confirm"
|
139 |
+
msgstr "подтвердить"
|
140 |
+
|
141 |
+
#: manage.php:168
|
142 |
+
msgid "unconfirm"
|
143 |
+
msgstr "убрать подтверждение"
|
144 |
+
|
145 |
+
#: manage.php:169
|
146 |
+
msgid "resend confirmation"
|
147 |
+
msgstr "переслать подтверждающее письмо"
|
148 |
+
|
149 |
+
#: manage_.php:76
|
150 |
+
msgid "search"
|
151 |
+
msgstr "поиск"
|
152 |
+
|
153 |
+
#: newsletter.php:79
|
154 |
+
msgid "Newsletter Composer"
|
155 |
+
msgstr "Компановщик рассылки"
|
156 |
+
|
157 |
+
#: newsletter.php:89
|
158 |
+
msgid "Continuing with previous batch"
|
159 |
+
msgstr "Продолжить с предыдущим пакетом"
|
160 |
+
|
161 |
+
#: newsletter.php:95
|
162 |
+
#: newsletter.php:113
|
163 |
+
#: newsletter.php:130
|
164 |
+
msgid "Batch not completed, see more below."
|
165 |
+
msgstr "Пакетная отправка не завершена, смотрите подробности ниже."
|
166 |
+
|
167 |
+
#: newsletter.php:104
|
168 |
+
msgid "Simulation"
|
169 |
+
msgstr "Имитация"
|
170 |
+
|
171 |
+
#: newsletter.php:123
|
172 |
+
msgid "Sending"
|
173 |
+
msgstr "Отправка"
|
174 |
+
|
175 |
+
#: newsletter.php:140
|
176 |
+
msgid "Sending to test subscribers"
|
177 |
+
msgstr "Отправка тестовым подписчикам"
|
178 |
+
|
179 |
+
#: newsletter.php:160
|
180 |
+
msgid "Last batch info"
|
181 |
+
msgstr "Информация о последней пакетной отправке."
|
182 |
+
|
183 |
+
#: newsletter.php:161
|
184 |
+
msgid "Here you find information about last batch. A sending batch may have completed or not and may be a simulation or not. When a batch is not complete you can use the \"restart\" button and the batch starts again from the last email address processed."
|
185 |
+
msgstr "Здесь вы найдете информацию о последней пакетной отправке. Пакетная отправка может быть завершена или нет, и может быть имитацией или нет. Когда пакетная отправка не закончена, вы можете нажать кнопку \"Перезапуск\" и отправка продолжится с последнего адреса в процессе."
|
186 |
+
|
187 |
+
#: newsletter.php:166
|
188 |
+
msgid "No batch info found, it's ok!"
|
189 |
+
msgstr "Нет информации о последней пакетной отправке, это нормально!"
|
190 |
+
|
191 |
+
#: newsletter.php:172
|
192 |
+
msgid "Total emails to send"
|
193 |
+
msgstr "Всего адресов для отправки"
|
194 |
+
|
195 |
+
#: newsletter.php:176
|
196 |
+
msgid "Emails sent till now"
|
197 |
+
msgstr "Сейчас отправлено"
|
198 |
+
|
199 |
+
#: newsletter.php:181
|
200 |
+
#: options.php:353
|
201 |
+
msgid "List"
|
202 |
+
msgstr "Список"
|
203 |
+
|
204 |
+
#: newsletter.php:186
|
205 |
+
msgid "Sending type"
|
206 |
+
msgstr "Типа отправки"
|
207 |
+
|
208 |
+
#: newsletter.php:190
|
209 |
+
msgid "Scheduled"
|
210 |
+
msgstr "Планировщик"
|
211 |
+
|
212 |
+
#: newsletter.php:193
|
213 |
+
msgid "next"
|
214 |
+
msgstr "следующая"
|
215 |
+
|
216 |
+
#: newsletter.php:194
|
217 |
+
msgid "now"
|
218 |
+
msgstr "сейчас"
|
219 |
+
|
220 |
+
#: newsletter.php:199
|
221 |
+
msgid "Last subscriber"
|
222 |
+
msgstr "Последний подписчик"
|
223 |
+
|
224 |
+
#: newsletter.php:203
|
225 |
+
msgid "Last id"
|
226 |
+
msgstr "Последний ID"
|
227 |
+
|
228 |
+
#: newsletter.php:204
|
229 |
+
msgid "debug info"
|
230 |
+
msgstr "информация для отладки"
|
231 |
+
|
232 |
+
#: newsletter.php:207
|
233 |
+
#: newsletter.php:263
|
234 |
+
msgid "Message"
|
235 |
+
msgstr "Сообщение"
|
236 |
+
|
237 |
+
#: newsletter.php:214
|
238 |
+
msgid "Restart batch"
|
239 |
+
msgstr "Перезапуск"
|
240 |
+
|
241 |
+
#: newsletter.php:214
|
242 |
+
msgid "Continue with this batch?"
|
243 |
+
msgstr "Продолжить с этой пакетной отправкой?"
|
244 |
+
|
245 |
+
#: newsletter.php:216
|
246 |
+
msgid "Reset batch"
|
247 |
+
msgstr "Перезапуск"
|
248 |
+
|
249 |
+
#: newsletter.php:216
|
250 |
+
msgid "Reset the batch status?"
|
251 |
+
msgstr "Сбросить состояние пакетной отправки?"
|
252 |
+
|
253 |
+
#: newsletter.php:226
|
254 |
+
msgid "Newsletter message"
|
255 |
+
msgstr "Контент рассылки"
|
256 |
+
|
257 |
+
#: newsletter.php:231
|
258 |
+
msgid "Newsletter name"
|
259 |
+
msgstr "Название рассылки"
|
260 |
+
|
261 |
+
#: newsletter.php:235
|
262 |
+
msgid "This symbolic name will be used to track the link clicks and associate them to a specific newsletter. Keep the name compact and significative."
|
263 |
+
msgstr "Это символическое название будет использоваться для отслеживания кликов ссылки и связывать их с конкретными рассылками. Стсрайтесь делать название компактным и симантичным."
|
264 |
+
|
265 |
+
#: newsletter.php:239
|
266 |
+
#: newsletter.php:249
|
267 |
+
msgid "Tracking"
|
268 |
+
msgstr "Отслеживание"
|
269 |
+
|
270 |
+
#: newsletter.php:242
|
271 |
+
msgid "Track link clicks"
|
272 |
+
msgstr "Отслеживать клики"
|
273 |
+
|
274 |
+
#: newsletter.php:244
|
275 |
+
msgid "When this option is enabled, each link in the email text will be rewritten and clicks on them intercepted."
|
276 |
+
msgstr "Когда эта опция включена, каждая ссылка в тексте письма будет переписана, и клики на ней будут перехватываться."
|
277 |
+
|
278 |
+
#: newsletter.php:250
|
279 |
+
msgid "Tracking options available with Newsletter Extras package"
|
280 |
+
msgstr "Отслеживание доступено после установкой Newsletter Extras"
|
281 |
+
|
282 |
+
#: newsletter.php:255
|
283 |
+
msgid "Subject"
|
284 |
+
msgstr "Тема"
|
285 |
+
|
286 |
+
#: newsletter.php:259
|
287 |
+
msgid "Tags: <strong>{name}</strong> receiver name."
|
288 |
+
msgstr "Тэги: <strong>{name}</strong> - имя получателя."
|
289 |
+
|
290 |
+
#: newsletter.php:267
|
291 |
+
msgid "Tags: <strong>{name}</strong> receiver name; <strong>{unsubscription_url}</strong> unsubscription URL; <strong>{token}</strong> the subscriber token."
|
292 |
+
msgstr "Тэги: <strong>{name}</strong> - имя получателя; <strong>{unsubscription_url}</strong> -адрес для отписки; <strong>{token}</strong> - уникальный ключ подписчика."
|
293 |
+
|
294 |
+
#: newsletter.php:272
|
295 |
+
msgid "Theme"
|
296 |
+
msgstr "Шаблон"
|
297 |
+
|
298 |
+
#: newsletter.php:275
|
299 |
+
msgid "Included themes"
|
300 |
+
msgstr "Внутренние"
|
301 |
+
|
302 |
+
#: newsletter.php:276
|
303 |
+
msgid "Default"
|
304 |
+
msgstr "По умолчанию"
|
305 |
+
|
306 |
+
#: newsletter.php:277
|
307 |
+
msgid "With picture"
|
308 |
+
msgstr "С картинками"
|
309 |
+
|
310 |
+
#: newsletter.php:279
|
311 |
+
msgid "Custom themes"
|
312 |
+
msgstr "Пользовательский"
|
313 |
+
|
314 |
+
#: newsletter.php:289
|
315 |
+
msgid "Auto compose"
|
316 |
+
msgstr "Автоматическое заполнение"
|
317 |
+
|
318 |
+
#: newsletter.php:293
|
319 |
+
msgid "Number of posts on theme"
|
320 |
+
msgstr "Кол-во постов в шаблоне"
|
321 |
+
|
322 |
+
#: newsletter.php:301
|
323 |
+
#: newsletter.php:332
|
324 |
+
#: newsletter.php:369
|
325 |
+
#: newsletter.php:399
|
326 |
+
#: options.php:99
|
327 |
+
#: options.php:133
|
328 |
+
#: options.php:169
|
329 |
+
#: options.php:222
|
330 |
+
#: options.php:273
|
331 |
+
#: options.php:388
|
332 |
+
#: options.php:406
|
333 |
+
#: options.php:443
|
334 |
+
msgid "Save"
|
335 |
+
msgstr "Сохранить"
|
336 |
+
|
337 |
+
#: newsletter.php:302
|
338 |
+
msgid "Test"
|
339 |
+
msgstr "Тест"
|
340 |
+
|
341 |
+
#: newsletter.php:303
|
342 |
+
msgid "Simulate"
|
343 |
+
msgstr "Имитировать"
|
344 |
+
|
345 |
+
#: newsletter.php:303
|
346 |
+
msgid "Simulate? The test address will receive all emails!"
|
347 |
+
msgstr "Имитировать? Тестовые адресаты получат все письма!"
|
348 |
+
|
349 |
+
#: newsletter.php:304
|
350 |
+
msgid "Send"
|
351 |
+
msgstr "Отправить"
|
352 |
+
|
353 |
+
#: newsletter.php:304
|
354 |
+
msgid "Start a real newsletter sending batch?"
|
355 |
+
msgstr "Начасть настоящую рассылку в пакетном режиме?"
|
356 |
+
|
357 |
+
#: newsletter.php:306
|
358 |
+
msgid "Scheduled simulation"
|
359 |
+
msgstr "Имитация по расписанию"
|
360 |
+
|
361 |
+
#: newsletter.php:306
|
362 |
+
msgid "Start a scheduled simulation?"
|
363 |
+
msgstr "Начать запланированную имитацию?"
|
364 |
+
|
365 |
+
#: newsletter.php:307
|
366 |
+
msgid "Scheduled send"
|
367 |
+
msgstr "Планировщик отправки"
|
368 |
+
|
369 |
+
#: newsletter.php:307
|
370 |
+
msgid "Start a scheduled real send?"
|
371 |
+
msgstr "Начать запланированную настоящую рассылку?"
|
372 |
+
|
373 |
+
#: newsletter.php:312
|
374 |
+
msgid "Scheduler"
|
375 |
+
msgstr "Планировщик"
|
376 |
+
|
377 |
+
#: newsletter.php:313
|
378 |
+
msgid "Scheduler helps to send out a long list of emails slowly to not overload the server."
|
379 |
+
msgstr "Планировщик помогает отправлять длинные списки адресатов медленнее, не перегружая сервер."
|
380 |
+
|
381 |
+
#: newsletter.php:317
|
382 |
+
msgid "Interval between sending tasks"
|
383 |
+
msgstr "Интервал между задачами отправки"
|
384 |
+
|
385 |
+
#: newsletter.php:320
|
386 |
+
msgid "minutes, minimum value is 10"
|
387 |
+
msgstr "минуты, минимальное значение - 10"
|
388 |
+
|
389 |
+
#: newsletter.php:324
|
390 |
+
msgid "Max number of emails per task"
|
391 |
+
msgstr "Максимальное число писем на каждую задачу"
|
392 |
+
|
393 |
+
#: newsletter.php:327
|
394 |
+
msgid "good value is 20 but if you use an external SMTP go with 5"
|
395 |
+
msgstr "оптимальное значение - 20, но вы можете использовать внешний SMTP"
|
396 |
+
|
397 |
+
#: newsletter.php:335
|
398 |
+
msgid "Available only with Newsletter Extras package"
|
399 |
+
msgstr "Доступен после установки Newsletter Extras"
|
400 |
+
|
401 |
+
#: newsletter.php:342
|
402 |
+
msgid "General"
|
403 |
+
msgstr "Общие"
|
404 |
+
|
405 |
+
#: newsletter.php:350
|
406 |
+
msgid "Sending options"
|
407 |
+
msgstr "Параметры отправки"
|
408 |
+
|
409 |
+
#: newsletter.php:351
|
410 |
+
msgid "Configuration for not scheduled sending process."
|
411 |
+
msgstr "Настройка для незапланированных процессов отправки."
|
412 |
+
|
413 |
+
#: newsletter.php:354
|
414 |
+
msgid "Max emails in a single batch"
|
415 |
+
msgstr "Максимум писем в одном пакете"
|
416 |
+
|
417 |
+
#: newsletter.php:360
|
418 |
+
msgid "Receiver address for simulation"
|
419 |
+
msgstr "Адреса получателей для имитации"
|
420 |
+
|
421 |
+
#: newsletter.php:363
|
422 |
+
msgid "When you simulate a sending process, emails are really sent but all to this email address. That helps to test out problems with mail server."
|
423 |
+
msgstr "Во время имитации процесса отправки, письма действительно отправляються, но только по этому адресу. Это помогает установить проблемы почтового сервера."
|
424 |
+
|
425 |
+
#: newsletter.php:374
|
426 |
+
msgid "Filter"
|
427 |
+
msgstr "Фильтр"
|
428 |
+
|
429 |
+
#: newsletter.php:381
|
430 |
+
msgid "Test subscribers"
|
431 |
+
msgstr "Тестовые подписчики"
|
432 |
+
|
433 |
+
#: newsletter.php:383
|
434 |
+
msgid "Define more test subscriber to see how your email looks on different clients: GMail, Outlook, Thunderbird, Hotmail, ..."
|
435 |
+
msgstr "назначте нескольок тестовых подписчиков, что бы посмотреть как ваше сообщение выглядит в различных клиентах: GMail, Outlook, Thunderbird, Hotmail, ..."
|
436 |
+
|
437 |
+
#: newsletter.php:389
|
438 |
+
msgid "Subscriber"
|
439 |
+
msgstr "Подписчик"
|
440 |
+
|
441 |
+
#: newsletter.php:391
|
442 |
+
msgid "name"
|
443 |
+
msgstr "имя"
|
444 |
+
|
445 |
+
#: newsletter.php:393
|
446 |
+
msgid "email"
|
447 |
+
msgstr "email"
|
448 |
+
|
449 |
+
#: options.php:58
|
450 |
+
msgid "Newsletter"
|
451 |
+
msgstr "Newsletter плагин"
|
452 |
+
|
453 |
+
#: options.php:63
|
454 |
+
msgid "Questions, help, critiques and whatever else <a target=\"_blank\" href=\"http://www.satollo.net/plugins/newsletter\">click here</a>!"
|
455 |
+
msgstr "Вопросы, помощь, критика и все остальное писать <a target=\"_blank\" href=\"http://www.satollo.net/plugins/newsletter\">здесь</a>!"
|
456 |
+
|
457 |
+
#: options.php:70
|
458 |
+
msgid "Sender and subscription page"
|
459 |
+
msgstr "Отправитель и страница подписки"
|
460 |
+
|
461 |
+
#: options.php:73
|
462 |
+
msgid "Sender email"
|
463 |
+
msgstr "Адрес отправителя"
|
464 |
+
|
465 |
+
#: options.php:77
|
466 |
+
msgid "Newsletter sender email address: the address subscribers will see the newsletters coming from."
|
467 |
+
msgstr "Адрес отправителя рассылки: этот адрес подписчики увидят во поле \"От\" входящего письма, когда получат рассулку."
|
468 |
+
|
469 |
+
#: options.php:81
|
470 |
+
msgid "Sender name"
|
471 |
+
msgstr "Имя отправителя"
|
472 |
+
|
473 |
+
#: options.php:85
|
474 |
+
msgid "The name of the newsletter sender subscribers will see on incoming email."
|
475 |
+
msgstr "Имя отправителя рассылки подписчики увидят во входящем письме."
|
476 |
+
|
477 |
+
#: options.php:89
|
478 |
+
msgid "Subscription page URL"
|
479 |
+
msgstr "Адрес страницы для подписки"
|
480 |
+
|
481 |
+
#: options.php:93
|
482 |
+
msgid "This is the page where you placed the <strong>[newsletter]</strong> short tag."
|
483 |
+
msgstr "Это страница на которой вы разместили короткий тег <strong>[newsletter]</strong>."
|
484 |
+
|
485 |
+
#: options.php:94
|
486 |
+
msgid "Read more on plugin official page"
|
487 |
+
msgstr "Узнать больше о плагине Вы на официальной странице"
|
488 |
+
|
489 |
+
#: options.php:105
|
490 |
+
msgid "Subscription form"
|
491 |
+
msgstr "Форма подписки"
|
492 |
+
|
493 |
+
#: options.php:111
|
494 |
+
msgid "Do not ask the user name, only email."
|
495 |
+
msgstr "Не спрашивать имя пользователя, только e-mail."
|
496 |
+
|
497 |
+
#: options.php:115
|
498 |
+
msgid "Subscription form page"
|
499 |
+
msgstr "Страница формы подписки"
|
500 |
+
|
501 |
+
#: options.php:119
|
502 |
+
msgid "This is the text showed to subscriber before the subscription form which is added automatically."
|
503 |
+
msgstr "Этот текст показываеться подписчику перед формой, которая добавляеться автоматический."
|
504 |
+
|
505 |
+
#: options.php:123
|
506 |
+
msgid "Successfully subscription page"
|
507 |
+
msgstr "Страница успешной подписки"
|
508 |
+
|
509 |
+
#: options.php:127
|
510 |
+
msgid "This is the text showed to a user who has pressed \"subscribe me\" on the previous step informing that an email to confirm subscription has just been sent. Remeber the user to check the spam folder and to follow the email instructions.<br />Tags: <strong>{name}</strong> the user name; <strong>{email}</strong> the user email."
|
511 |
+
msgstr "Этот текст показывается пользователю нажавшему в предыдущем шаге \"Подписаться\", информируя его о том, что сообщение с подтверждающей ссылкой было отправлено. Напоминает пользователю проверить папку \"Спам\" и следовать инструкция в письме.<br />Тэги: <strong>{name}</strong> - имя пользователя; <strong>{email}</strong> - e-mail пользователя."
|
512 |
+
|
513 |
+
#: options.php:138
|
514 |
+
msgid "Confirmation"
|
515 |
+
msgstr "Подтверждение"
|
516 |
+
|
517 |
+
#: options.php:138
|
518 |
+
msgid "double opt-in"
|
519 |
+
msgstr "опция"
|
520 |
+
|
521 |
+
#: options.php:140
|
522 |
+
msgid "Email sent to the user to confirm his subscription, the successful confirmation page, the welcome email."
|
523 |
+
msgstr "Письмо отпрвлено пользователю для подтверждения, страница успешного подтверждения, преветсвенное письмо."
|
524 |
+
|
525 |
+
#: options.php:147
|
526 |
+
msgid "Do not use double opt-in. If checked the subscription is direct, so subscribers will be immediately confirmed and will receive the welcome email."
|
527 |
+
msgstr "Не использовать эту опцию. Если проверка подписки примая, то подписчики немедленно становяться подтвержденными и получают приветвенное письмо."
|
528 |
+
|
529 |
+
#: options.php:151
|
530 |
+
msgid "Confirmation email subject"
|
531 |
+
msgstr "Тема подтверждающего письма"
|
532 |
+
|
533 |
+
#: options.php:155
|
534 |
+
msgid "Tags: <strong>{name}</strong> the user name."
|
535 |
+
msgstr "Тэги: <strong>{name}</strong> - имя пользователя."
|
536 |
+
|
537 |
+
#: options.php:159
|
538 |
+
msgid "Confirmation email message"
|
539 |
+
msgstr "Текст подтверждающего письма"
|
540 |
+
|
541 |
+
#: options.php:163
|
542 |
+
msgid "Tags: <strong>{name}</strong> the user name; <strong>{subscription_confirm_url}</strong>confirmation URL to be clicked by the user to confirm his subscription."
|
543 |
+
msgstr "Тэги: <strong>{name}</strong> - имя пользователя; <strong>{subscription_confirm_url}</strong> - адрес ссылки, кликнув по которой пользователя подтверждает подписку."
|
544 |
+
|
545 |
+
#: options.php:174
|
546 |
+
msgid "Welcome message"
|
547 |
+
msgstr "Приветвенное сообщение"
|
548 |
+
|
549 |
+
#: options.php:176
|
550 |
+
msgid "Users jump directly to this step if you disabled the double opt-in step."
|
551 |
+
msgstr "Пользователи сразу попадуют на этот шаг, если выключена опция подтверждения."
|
552 |
+
|
553 |
+
#: options.php:180
|
554 |
+
msgid "Successful confirmation page"
|
555 |
+
msgstr "Страница успешного подтверждения"
|
556 |
+
|
557 |
+
#: options.php:184
|
558 |
+
msgid "Showed when the user follow the confirmation URL sent to him with previous email settings or if signed up directly with no double opt-in process."
|
559 |
+
msgstr "Показываеться когда пользователь переходит по подтверждающей ссылке, или если он зарегестрировался напрямую (двойная опция выключена)."
|
560 |
+
|
561 |
+
#: options.php:186
|
562 |
+
msgid "Tags: <strong>{name}</strong> the user name; <strong>{email}</strong> for the user email; <strong>{token}</strong> the subscriber unique token"
|
563 |
+
msgstr "Тэги: <strong>{name}</strong> - имя пользователя; <strong>{email}</strong> - e-mail пользователяl; <strong>{token}</strong> - уникальный ключ пользователя"
|
564 |
+
|
565 |
+
#: options.php:191
|
566 |
+
msgid "Conversion tracking code"
|
567 |
+
msgstr "Код слежения за переходами"
|
568 |
+
|
569 |
+
#: options.php:196
|
570 |
+
msgid "Available with Newsletter Extras package"
|
571 |
+
msgstr "Доступен с установкой Newsletter Extras"
|
572 |
+
|
573 |
+
#: options.php:199
|
574 |
+
msgid "That code is injected AS-IS in welcome page and can be used to track conversion (you can use PHP if needed). Conversion code is usually supply by tracking services, like Google AdWords, Google Analytics and so on."
|
575 |
+
msgstr "Этот код вставляеться КАК ЕСТЬ в страницу приветсвия и может отслеживать переходы (вы можете использовать PHP если нужно). Отслеживающий код используеться поддерживающими отслеживание сервисами, такими как Google AdWords, Google Analytics и другими."
|
576 |
+
|
577 |
+
#: options.php:202
|
578 |
+
msgid "Welcome email"
|
579 |
+
msgstr "Приветсвенное письмо"
|
580 |
+
|
581 |
+
#: options.php:204
|
582 |
+
msgid "Welcome email subject"
|
583 |
+
msgstr "Тема приветсвенного письма"
|
584 |
+
|
585 |
+
#: options.php:208
|
586 |
+
#: options.php:259
|
587 |
+
#: options.php:267
|
588 |
+
msgid "Tags: <strong>{name}</strong> user name."
|
589 |
+
msgstr "Тэги: <strong>{name}</strong> - имя пользователя."
|
590 |
+
|
591 |
+
#: options.php:212
|
592 |
+
msgid "Welcome email message"
|
593 |
+
msgstr "Текст приветсвенного письма"
|
594 |
+
|
595 |
+
#: options.php:216
|
596 |
+
msgid "Tags: <strong>{name}</strong> user name; <strong>{token}</strong> the subscriber unique token"
|
597 |
+
msgstr "Тэги: <strong>{name}</strong> - имя пользователя; <strong>{token}</strong> - уникальный ключ пользователя"
|
598 |
+
|
599 |
+
#: options.php:227
|
600 |
+
msgid "Unsubscription"
|
601 |
+
msgstr "Отписка"
|
602 |
+
|
603 |
+
#: options.php:229
|
604 |
+
msgid "A user starts the unsubscription process clicking the unsubscription link in a newsletter. This lkink contains the email to unsubscribe and some unique information to avoid hacking. The user are requird to confirm the unsubscription: this is the last step where YOU can communicate with you almost missed user."
|
605 |
+
msgstr "Пользователь начавший процесс отписки кликнув на ссылку в письме. Эта ссылка содержит адрес пользователя и некоторую уникальную информацию, защищающую от подлога. Пользователю требуеться подтвердить отписку: это последний шаг когда ВЫ можете связаться с ним во избежании потери пользователя."
|
606 |
+
|
607 |
+
#: options.php:233
|
608 |
+
#: options.php:282
|
609 |
+
msgid "Unsubscription text"
|
610 |
+
msgstr "Текст отписки"
|
611 |
+
|
612 |
+
#: options.php:237
|
613 |
+
msgid "This text is show to users who click on a \"unsubscription link\" in a newsletter email. You have to insert a link in the text that user can follow to confirm the unsubscription request (see tags)."
|
614 |
+
msgstr "Этот текст показываеться пользователю котороый кликнул \"ссылку для отписки\" в письме. Вам надо вставить ссылку в текст, так пользователь сможет по ней пройти для потверждения отписки (см. теги)."
|
615 |
+
|
616 |
+
#: options.php:239
|
617 |
+
msgid "Tags: <strong>{name}</strong> user name; <strong>{email}</strong> user email; <strong>{unsubscription_confirm_url}</strong> URL to confirm unsubscription."
|
618 |
+
msgstr "Тэги: <strong>{name}</strong> - имя пользователя; <strong>{email}</strong> - e-mail пользователя; <strong>{unsubscription_confirm_url}</strong> адрес ссылки для подтверждения отписки."
|
619 |
+
|
620 |
+
#: options.php:245
|
621 |
+
msgid "Good bye text"
|
622 |
+
msgstr "Прощальный текст"
|
623 |
+
|
624 |
+
#: options.php:248
|
625 |
+
msgid "Latest message showed to the user to say \"good bye\"."
|
626 |
+
msgstr "Последнее сообщение показываемое пользователю, что бы сказать \"Прощайте\"."
|
627 |
+
|
628 |
+
#: options.php:250
|
629 |
+
msgid "Tags: none."
|
630 |
+
msgstr "Нет тэгов."
|
631 |
+
|
632 |
+
#: options.php:255
|
633 |
+
msgid "Goodbye email subject"
|
634 |
+
msgstr "Тема прощального письма"
|
635 |
+
|
636 |
+
#: options.php:263
|
637 |
+
msgid "Goodbye email message"
|
638 |
+
msgstr "Текст прощального письма"
|
639 |
+
|
640 |
+
#: options.php:277
|
641 |
+
msgid "Unsubscription for mass mail mode"
|
642 |
+
msgstr "Отписка для массового режима"
|
643 |
+
|
644 |
+
#: options.php:278
|
645 |
+
msgid "This section is not working!"
|
646 |
+
msgstr "Эта рубрика не работает!"
|
647 |
+
|
648 |
+
#: options.php:289
|
649 |
+
msgid "Unsubscription error"
|
650 |
+
msgstr "Ошибка отписки"
|
651 |
+
|
652 |
+
#: options.php:293
|
653 |
+
msgid "Shown with the unsubscription message then the email to unsubscribe is not found."
|
654 |
+
msgstr "Показываеться с сообщением отписки, когда адрес для отписки не найден."
|
655 |
+
|
656 |
+
#: options.php:297
|
657 |
+
msgid "\"Email to unsubscribe\" label"
|
658 |
+
msgstr "Метка \"Адрес для отписки\""
|
659 |
+
|
660 |
+
#: options.php:305
|
661 |
+
msgid "\"Confirm unsubscription\" label"
|
662 |
+
msgstr "Метка \"Подтверждение отписки\""
|
663 |
+
|
664 |
+
#: options.php:309
|
665 |
+
msgid "The button text to confirm unsubscription or to send an unsubscription request for the specified email address when \"mass mail\" mode is used for sending newsletters."
|
666 |
+
msgstr "Текст кнопки для потдверждения отписки или для отправки запроса отписки на спейифичные адреса, когда режим \"Массовая рассылка\" используеться."
|
667 |
+
|
668 |
+
#: options.php:313
|
669 |
+
msgid "Unsubscription end text"
|
670 |
+
msgstr "Текст о законченной отписке"
|
671 |
+
|
672 |
+
#: options.php:317
|
673 |
+
msgid "This text is shown when a user type in an email to be removed and the confirmation email has been sent."
|
674 |
+
msgstr "Этот текст показываеться, когда пользователь вводит e-mail который был удален, или подтверждающее письмобыло отправлено."
|
675 |
+
|
676 |
+
#: options.php:322
|
677 |
+
msgid "Unsubscription email subject"
|
678 |
+
msgstr "Тема пиьсма об отписке"
|
679 |
+
|
680 |
+
#: options.php:328
|
681 |
+
msgid "Unsubscription email message"
|
682 |
+
msgstr "Текст пиьсма об отписке"
|
683 |
+
|
684 |
+
#: options.php:332
|
685 |
+
msgid "Email sent to confirm unsubscription when the request is made specifying an email address to remove. Use {unsubscription_link} to place the link where the user has to click on; use {unsubscription_url} toplace the plain unsubscription URL."
|
686 |
+
msgstr "Письмо отправлено для подтверждения отписки, когда запрос был сделан с удаленного адреса. Используйте {unsubscription_link} что бы вставить ссылку где пользователь кликнет по ней; используйте {unsubscription_url} что бы вставить не кликабельную ссылку."
|
687 |
+
|
688 |
+
#: options.php:336
|
689 |
+
msgid "Unsubscription link text"
|
690 |
+
msgstr "Текст ссылки для отписки."
|
691 |
+
|
692 |
+
#: options.php:340
|
693 |
+
msgid "The text of the link for unsubscription to be placed in the unsubscription email."
|
694 |
+
msgstr "Текст ссылку для отписки будет вставлен в отписывающее письмо."
|
695 |
+
|
696 |
+
#: options.php:346
|
697 |
+
msgid "Lists"
|
698 |
+
msgstr "Списки"
|
699 |
+
|
700 |
+
#: options.php:351
|
701 |
+
msgid "List 0 is the general one"
|
702 |
+
msgstr "Список 0 - общий"
|
703 |
+
|
704 |
+
#: options.php:362
|
705 |
+
msgid "Advanced"
|
706 |
+
msgstr "Дополнительно"
|
707 |
+
|
708 |
+
#: options.php:369
|
709 |
+
msgid "write logs"
|
710 |
+
msgstr "писать логи"
|
711 |
+
|
712 |
+
#: options.php:376
|
713 |
+
msgid "do not use visual editors"
|
714 |
+
msgstr "не использовать визуальный редактор"
|
715 |
+
|
716 |
+
#: options.php:383
|
717 |
+
msgid "allow editors to user the newsletter plugin"
|
718 |
+
msgstr "разрешить редакторам использовать этот плагин"
|
719 |
+
|
720 |
+
#: options.php:392
|
721 |
+
msgid "Really advanced options"
|
722 |
+
msgstr "Действительно дополнительные опции"
|
723 |
+
|
724 |
+
#: options.php:399
|
725 |
+
msgid "Use the custom subscription form below"
|
726 |
+
msgstr "Использовать настраиваему форму ниже"
|
727 |
+
|
728 |
+
#: options.php:411
|
729 |
+
msgid "Zanzara client"
|
730 |
+
msgstr "Zanzara клиент"
|
731 |
+
|
732 |
+
#: options.php:412
|
733 |
+
msgid "Obsolete"
|
734 |
+
msgstr "Устаревший"
|
735 |
+
|
736 |
+
#: options.php:415
|
737 |
+
msgid "Export key"
|
738 |
+
msgstr "Ключ экспорта"
|
739 |
+
|
740 |
+
#: options.php:419
|
741 |
+
msgid "Do not search for Zanzara, is a my private software"
|
742 |
+
msgstr "Не искать Zanzara, это мое частное ПО"
|
743 |
+
|
744 |
+
#: options.php:423
|
745 |
+
msgid "SMTP address"
|
746 |
+
msgstr "SMTP адрес"
|
747 |
+
|
748 |
+
#: options.php:429
|
749 |
+
msgid "SMTP user"
|
750 |
+
msgstr "SMTP логин"
|
751 |
+
|
752 |
+
#: options.php:435
|
753 |
+
msgid "SMTP password"
|
754 |
+
msgstr "SMTP пароль"
|
755 |
+
|
756 |
+
#: options.php:444
|
757 |
+
msgid "Revert to defaults"
|
758 |
+
msgstr "Вернуться к настройка по умолчанию"
|
759 |
+
|
760 |
+
#: plugin.php:932
|
761 |
+
msgid "Configuration"
|
762 |
+
msgstr "Конфигурация"
|
763 |
+
|
764 |
+
#: plugin.php:933
|
765 |
+
msgid "Composer"
|
766 |
+
msgstr "Компановщик"
|
767 |
+
|
768 |
+
#: plugin.php:935
|
769 |
+
msgid "Export"
|
770 |
+
msgstr "Экспорт"
|
771 |
+
|
772 |
+
#: plugin.php:936
|
773 |
+
msgid "Manage"
|
774 |
+
msgstr "Управление"
|
775 |
+
|
776 |
+
#: plugin.php:937
|
777 |
+
#: statistics.php:8
|
778 |
+
msgid "Statistics"
|
779 |
+
msgstr "Статистика"
|
780 |
+
|
781 |
+
#: statistics.php:11
|
782 |
+
msgid "You need the Newsletter Extras installed to view statistics"
|
783 |
+
msgstr "Вам необходим установленый пакет Newsletter Extras, что бы смотреть статистику"
|
784 |
+
|
languages/newsletter.pot
ADDED
@@ -0,0 +1,767 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Russian Lang for Newsletter\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2010-01-22 20:52+0300\n"
|
6 |
+
"PO-Revision-Date: \n"
|
7 |
+
"Last-Translator: M.O.Z.G <mozg@mozg-studio.org>\n"
|
8 |
+
"Language-Team: M.O.Z.G Studio | http://mozg-studio.org <mozg@mozg-studio.org>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-Language: Russian\n"
|
13 |
+
"X-Poedit-Country: RUSSIAN FEDERATION\n"
|
14 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
+
"X-Poedit-KeywordsList: _e;__;_c;_n\n"
|
16 |
+
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
|
19 |
+
#: export.php:8
|
20 |
+
msgid "Subscribers Export"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
|
24 |
+
#: export.php:10
|
25 |
+
msgid "The text below is a list of all your subscribers (confirmed and not) in cvs format. You can copy, save and edit it with Excel or other software. Status column has 2 values: S - subscribed but not confirmed, C - confirmed."
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: export.php:12
|
29 |
+
#: manage.php:148
|
30 |
+
msgid "Email"
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: export.php:12
|
34 |
+
#: manage.php:148
|
35 |
+
msgid "Name"
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: export.php:12
|
39 |
+
#: manage.php:148
|
40 |
+
msgid "Status"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: export.php:12
|
44 |
+
#: manage.php:148
|
45 |
+
msgid "Token"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: import.php:34
|
49 |
+
msgid "Subscribers Import"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: import.php:40
|
53 |
+
msgid "Rows with errors"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: import.php:47
|
57 |
+
#: import.php:54
|
58 |
+
#: plugin.php:934
|
59 |
+
msgid "Import"
|
60 |
+
msgstr ""
|
61 |
+
|
62 |
+
#: import.php:48
|
63 |
+
msgid "On the textarea below you can copy a text in CSV (comma separated values) with format:<br /><br /> <pre>user email;user name</pre><br /><br />and then import them. If an email is already stored, it won't be imported. If an email is wrong it won't be imported. Even when there are errors on CSV lines, the import will continue to the end. After the import process has ended, a box will appear with all the line not imported due to duplications or errors. Imported subscriber will be set as confirmed."
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#: import.php:50
|
67 |
+
msgid "Empty rows and rows staring with sharp (#) are skipped. Emails will be normalized and a subscriber token generated for each imported email."
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: manage.php:95
|
71 |
+
msgid "Subscribers Management"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: manage.php:106
|
75 |
+
#: manage.php:109
|
76 |
+
msgid "Search"
|
77 |
+
msgstr "Поиск"
|
78 |
+
|
79 |
+
#: manage.php:109
|
80 |
+
msgid "press without filter to show all"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: manage.php:116
|
84 |
+
msgid "Only not yet confirmed"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: manage.php:120
|
88 |
+
msgid "Order"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: manage.php:134
|
92 |
+
msgid "Remove all unconfirmed"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: manage.php:134
|
96 |
+
msgid "Are your sure, really sure?"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: manage.php:138
|
100 |
+
msgid "Subscriber's statistics"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: manage.php:139
|
104 |
+
#: manage_.php:114
|
105 |
+
msgid "Confirmed subscriber"
|
106 |
+
msgstr ""
|
107 |
+
|
108 |
+
#: manage.php:141
|
109 |
+
msgid "Unconfirmed subscriber"
|
110 |
+
msgstr ""
|
111 |
+
|
112 |
+
#: manage.php:143
|
113 |
+
msgid "Results"
|
114 |
+
msgstr ""
|
115 |
+
|
116 |
+
#: manage.php:148
|
117 |
+
msgid "Profile"
|
118 |
+
msgstr ""
|
119 |
+
|
120 |
+
#: manage.php:148
|
121 |
+
msgid "Actions"
|
122 |
+
msgstr ""
|
123 |
+
|
124 |
+
#: manage.php:166
|
125 |
+
msgid "remove"
|
126 |
+
msgstr ""
|
127 |
+
|
128 |
+
#: manage.php:167
|
129 |
+
msgid "confirm"
|
130 |
+
msgstr ""
|
131 |
+
|
132 |
+
#: manage.php:168
|
133 |
+
msgid "unconfirm"
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: manage.php:169
|
137 |
+
msgid "resend confirmation"
|
138 |
+
msgstr ""
|
139 |
+
|
140 |
+
#: newsletter.php:79
|
141 |
+
msgid "Newsletter Composer"
|
142 |
+
msgstr ""
|
143 |
+
|
144 |
+
#: newsletter.php:89
|
145 |
+
msgid "Continuing with previous batch"
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
#: newsletter.php:95
|
149 |
+
#: newsletter.php:113
|
150 |
+
#: newsletter.php:130
|
151 |
+
msgid "Batch not completed, see more below."
|
152 |
+
msgstr ""
|
153 |
+
|
154 |
+
#: newsletter.php:104
|
155 |
+
msgid "Simulation"
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
+
#: newsletter.php:123
|
159 |
+
msgid "Sending"
|
160 |
+
msgstr ""
|
161 |
+
|
162 |
+
#: newsletter.php:140
|
163 |
+
msgid "Sending to test subscribers"
|
164 |
+
msgstr "Отправка тестовым подписчикам"
|
165 |
+
|
166 |
+
#: newsletter.php:160
|
167 |
+
msgid "Last batch info"
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
#: newsletter.php:161
|
171 |
+
msgid "Here you find information about last batch. A sending batch may have completed or not and may be a simulation or not. When a batch is not complete you can use the \"restart\" button and the batch starts again from the last email address processed."
|
172 |
+
msgstr ""
|
173 |
+
|
174 |
+
#: newsletter.php:166
|
175 |
+
msgid "No batch info found, it's ok!"
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
#: newsletter.php:172
|
179 |
+
msgid "Total emails to send"
|
180 |
+
msgstr ""
|
181 |
+
|
182 |
+
#: newsletter.php:176
|
183 |
+
msgid "Emails sent till now"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: newsletter.php:181
|
187 |
+
#: options.php:353
|
188 |
+
msgid "List"
|
189 |
+
msgstr ""
|
190 |
+
#: newsletter.php:186
|
191 |
+
msgid "Sending type"
|
192 |
+
msgstr ""
|
193 |
+
|
194 |
+
#: newsletter.php:190
|
195 |
+
msgid "Scheduled"
|
196 |
+
msgstr ""
|
197 |
+
|
198 |
+
#: newsletter.php:193
|
199 |
+
msgid "next"
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: newsletter.php:194
|
203 |
+
msgid "now"
|
204 |
+
msgstr ""
|
205 |
+
|
206 |
+
#: newsletter.php:199
|
207 |
+
msgid "Last subscriber"
|
208 |
+
msgstr ""
|
209 |
+
|
210 |
+
#: newsletter.php:203
|
211 |
+
msgid "Last id"
|
212 |
+
msgstr ""
|
213 |
+
|
214 |
+
#: newsletter.php:204
|
215 |
+
msgid "debug info"
|
216 |
+
msgstr ""
|
217 |
+
|
218 |
+
#: newsletter.php:207
|
219 |
+
#: newsletter.php:263
|
220 |
+
msgid "Message"
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
+
#: newsletter.php:214
|
224 |
+
msgid "Restart batch"
|
225 |
+
msgstr ""
|
226 |
+
|
227 |
+
#: newsletter.php:214
|
228 |
+
msgid "Continue with this batch?"
|
229 |
+
msgstr ""
|
230 |
+
|
231 |
+
#: newsletter.php:216
|
232 |
+
msgid "Reset batch"
|
233 |
+
msgstr ""
|
234 |
+
|
235 |
+
#: newsletter.php:216
|
236 |
+
msgid "Reset the batch status?"
|
237 |
+
msgstr ""
|
238 |
+
|
239 |
+
#: newsletter.php:226
|
240 |
+
msgid "Newsletter message"
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: newsletter.php:231
|
244 |
+
msgid "Newsletter name"
|
245 |
+
msgstr ""
|
246 |
+
|
247 |
+
#: newsletter.php:235
|
248 |
+
msgid "This symbolic name will be used to track the link clicks and associate them to a specific newsletter. Keep the name compact and significative."
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: newsletter.php:239
|
252 |
+
#: newsletter.php:249
|
253 |
+
msgid "Tracking"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: newsletter.php:242
|
257 |
+
msgid "Track link clicks"
|
258 |
+
msgstr "Отслеживать клики"
|
259 |
+
|
260 |
+
#: newsletter.php:244
|
261 |
+
msgid "When this option is enabled, each link in the email text will be rewritten and clicks on them intercepted."
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: newsletter.php:250
|
265 |
+
msgid "Tracking options available with Newsletter Extras package"
|
266 |
+
msgstr ""
|
267 |
+
|
268 |
+
#: newsletter.php:255
|
269 |
+
msgid "Subject"
|
270 |
+
msgstr ""
|
271 |
+
|
272 |
+
#: newsletter.php:259
|
273 |
+
msgid "Tags: <strong>{name}</strong> receiver name."
|
274 |
+
msgstr ""
|
275 |
+
|
276 |
+
#: newsletter.php:267
|
277 |
+
msgid "Tags: <strong>{name}</strong> receiver name; <strong>{unsubscription_url}</strong> unsubscription URL; <strong>{token}</strong> the subscriber token."
|
278 |
+
msgstr ""
|
279 |
+
|
280 |
+
#: newsletter.php:272
|
281 |
+
msgid "Theme"
|
282 |
+
msgstr ""
|
283 |
+
|
284 |
+
#: newsletter.php:275
|
285 |
+
msgid "Included themes"
|
286 |
+
msgstr ""
|
287 |
+
|
288 |
+
#: newsletter.php:276
|
289 |
+
msgid "Default"
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: newsletter.php:277
|
293 |
+
msgid "With picture"
|
294 |
+
msgstr ""
|
295 |
+
|
296 |
+
#: newsletter.php:279
|
297 |
+
msgid "Custom themes"
|
298 |
+
msgstr ""
|
299 |
+
|
300 |
+
#: newsletter.php:289
|
301 |
+
msgid "Auto compose"
|
302 |
+
msgstr ""
|
303 |
+
|
304 |
+
#: newsletter.php:293
|
305 |
+
msgid "Number of posts on theme"
|
306 |
+
msgstr ""
|
307 |
+
|
308 |
+
#: newsletter.php:301
|
309 |
+
#: newsletter.php:332
|
310 |
+
#: newsletter.php:369
|
311 |
+
#: newsletter.php:399
|
312 |
+
#: options.php:99
|
313 |
+
#: options.php:133
|
314 |
+
#: options.php:169
|
315 |
+
#: options.php:222
|
316 |
+
#: options.php:273
|
317 |
+
#: options.php:388
|
318 |
+
#: options.php:406
|
319 |
+
#: options.php:443
|
320 |
+
msgid "Save"
|
321 |
+
msgstr ""
|
322 |
+
|
323 |
+
#: newsletter.php:302
|
324 |
+
msgid "Test"
|
325 |
+
msgstr ""
|
326 |
+
|
327 |
+
#: newsletter.php:303
|
328 |
+
msgid "Simulate"
|
329 |
+
msgstr ""
|
330 |
+
|
331 |
+
#: newsletter.php:303
|
332 |
+
msgid "Simulate? The test address will receive all emails!"
|
333 |
+
msgstr ""
|
334 |
+
|
335 |
+
#: newsletter.php:304
|
336 |
+
msgid "Send"
|
337 |
+
msgstr ""
|
338 |
+
#: newsletter.php:304
|
339 |
+
msgid "Start a real newsletter sending batch?"
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: newsletter.php:306
|
343 |
+
msgid "Scheduled simulation"
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: newsletter.php:306
|
347 |
+
msgid "Start a scheduled simulation?"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: newsletter.php:307
|
351 |
+
msgid "Scheduled send"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: newsletter.php:307
|
355 |
+
msgid "Start a scheduled real send?"
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: newsletter.php:312
|
359 |
+
msgid "Scheduler"
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: newsletter.php:313
|
363 |
+
msgid "Scheduler helps to send out a long list of emails slowly to not overload the server."
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: newsletter.php:317
|
367 |
+
msgid "Interval between sending tasks"
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: newsletter.php:320
|
371 |
+
msgid "minutes, minimum value is 10"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: newsletter.php:324
|
375 |
+
msgid "Max number of emails per task"
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: newsletter.php:327
|
379 |
+
msgid "good value is 20 but if you use an external SMTP go with 5"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: newsletter.php:335
|
383 |
+
msgid "Available only with Newsletter Extras package"
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: newsletter.php:342
|
387 |
+
msgid "General"
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: newsletter.php:350
|
391 |
+
msgid "Sending options"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: newsletter.php:351
|
395 |
+
msgid "Configuration for not scheduled sending process."
|
396 |
+
msgstr ""
|
397 |
+
|
398 |
+
#: newsletter.php:354
|
399 |
+
msgid "Max emails in a single batch"
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: newsletter.php:360
|
403 |
+
msgid "Receiver address for simulation"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: newsletter.php:363
|
407 |
+
msgid "When you simulate a sending process, emails are really sent but all to this email address. That helps to test out problems with mail server."
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: newsletter.php:374
|
411 |
+
msgid "Filter"
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: newsletter.php:381
|
415 |
+
msgid "Test subscribers"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: newsletter.php:383
|
419 |
+
msgid "Define more test subscriber to see how your email looks on different clients: GMail, Outlook, Thunderbird, Hotmail, ..."
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: newsletter.php:389
|
423 |
+
msgid "Subscriber"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: newsletter.php:391
|
427 |
+
msgid "name"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: newsletter.php:393
|
431 |
+
msgid "email"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: options.php:58
|
435 |
+
msgid "Newsletter"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: options.php:63
|
439 |
+
msgid "Questions, help, critiques and whatever else <a target=\"_blank\" href=\"http://www.satollo.net/plugins/newsletter\">click here</a>!"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: options.php:70
|
443 |
+
msgid "Sender and subscription page"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: options.php:73
|
447 |
+
msgid "Sender email"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: options.php:77
|
451 |
+
msgid "Newsletter sender email address: the address subscribers will see the newsletters coming from."
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: options.php:81
|
455 |
+
msgid "Sender name"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: options.php:85
|
459 |
+
msgid "The name of the newsletter sender subscribers will see on incoming email."
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: options.php:89
|
463 |
+
msgid "Subscription page URL"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: options.php:93
|
467 |
+
msgid "This is the page where you placed the <strong>[newsletter]</strong> short tag."
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: options.php:94
|
471 |
+
msgid "Read more on plugin official page"
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: options.php:105
|
475 |
+
msgid "Subscription form"
|
476 |
+
msgstr ""
|
477 |
+
|
478 |
+
#: options.php:111
|
479 |
+
msgid "Do not ask the user name, only email."
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: options.php:115
|
483 |
+
msgid "Subscription form page"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: options.php:119
|
487 |
+
msgid "This is the text showed to subscriber before the subscription form which is added automatically."
|
488 |
+
msgstr ""
|
489 |
+
|
490 |
+
#: options.php:123
|
491 |
+
msgid "Successfully subscription page"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: options.php:127
|
495 |
+
msgid "This is the text showed to a user who has pressed \"subscribe me\" on the previous step informing that an email to confirm subscription has just been sent. Remeber the user to check the spam folder and to follow the email instructions.<br />Tags: <strong>{name}</strong> the user name; <strong>{email}</strong> the user email."
|
496 |
+
msgstr ""
|
497 |
+
|
498 |
+
#: options.php:138
|
499 |
+
msgid "Confirmation"
|
500 |
+
msgstr ""
|
501 |
+
#: options.php:138
|
502 |
+
msgid "double opt-in"
|
503 |
+
msgstr ""
|
504 |
+
|
505 |
+
#: options.php:140
|
506 |
+
msgid "Email sent to the user to confirm his subscription, the successful confirmation page, the welcome email."
|
507 |
+
msgstr ""
|
508 |
+
|
509 |
+
#: options.php:147
|
510 |
+
msgid "Do not use double opt-in. If checked the subscription is direct, so subscribers will be immediately confirmed and will receive the welcome email."
|
511 |
+
msgstr ""
|
512 |
+
|
513 |
+
#: options.php:151
|
514 |
+
msgid "Confirmation email subject"
|
515 |
+
msgstr ""
|
516 |
+
|
517 |
+
#: options.php:155
|
518 |
+
msgid "Tags: <strong>{name}</strong> the user name."
|
519 |
+
msgstr ""
|
520 |
+
|
521 |
+
#: options.php:159
|
522 |
+
msgid "Confirmation email message"
|
523 |
+
msgstr ""
|
524 |
+
|
525 |
+
#: options.php:163
|
526 |
+
msgid "Tags: <strong>{name}</strong> the user name; <strong>{subscription_confirm_url}</strong>confirmation URL to be clicked by the user to confirm his subscription."
|
527 |
+
msgstr ""
|
528 |
+
|
529 |
+
#: options.php:174
|
530 |
+
msgid "Welcome message"
|
531 |
+
msgstr ""
|
532 |
+
|
533 |
+
#: options.php:176
|
534 |
+
msgid "Users jump directly to this step if you disabled the double opt-in step."
|
535 |
+
msgstr ""
|
536 |
+
|
537 |
+
#: options.php:180
|
538 |
+
msgid "Successful confirmation page"
|
539 |
+
msgstr ""
|
540 |
+
|
541 |
+
#: options.php:184
|
542 |
+
msgid "Showed when the user follow the confirmation URL sent to him with previous email settings or if signed up directly with no double opt-in process."
|
543 |
+
msgstr ""
|
544 |
+
|
545 |
+
#: options.php:186
|
546 |
+
msgid "Tags: <strong>{name}</strong> the user name; <strong>{email}</strong> for the user email; <strong>{token}</strong> the subscriber unique token"
|
547 |
+
msgstr ""
|
548 |
+
|
549 |
+
#: options.php:191
|
550 |
+
msgid "Conversion tracking code"
|
551 |
+
msgstr ""
|
552 |
+
|
553 |
+
#: options.php:196
|
554 |
+
msgid "Available with Newsletter Extras package"
|
555 |
+
msgstr ""
|
556 |
+
|
557 |
+
#: options.php:199
|
558 |
+
msgid "That code is injected AS-IS in welcome page and can be used to track conversion (you can use PHP if needed). Conversion code is usually supply by tracking services, like Google AdWords, Google Analytics and so on."
|
559 |
+
msgstr ""
|
560 |
+
|
561 |
+
#: options.php:202
|
562 |
+
msgid "Welcome email"
|
563 |
+
msgstr ""
|
564 |
+
|
565 |
+
#: options.php:204
|
566 |
+
msgid "Welcome email subject"
|
567 |
+
msgstr ""
|
568 |
+
|
569 |
+
#: options.php:208
|
570 |
+
#: options.php:259
|
571 |
+
#: options.php:267
|
572 |
+
msgid "Tags: <strong>{name}</strong> user name."
|
573 |
+
msgstr ""
|
574 |
+
|
575 |
+
#: options.php:212
|
576 |
+
msgid "Welcome email message"
|
577 |
+
msgstr ""
|
578 |
+
|
579 |
+
#: options.php:216
|
580 |
+
msgid "Tags: <strong>{name}</strong> user name; <strong>{token}</strong> the subscriber unique token"
|
581 |
+
msgstr ""
|
582 |
+
|
583 |
+
#: options.php:227
|
584 |
+
msgid "Unsubscription"
|
585 |
+
msgstr ""
|
586 |
+
|
587 |
+
#: options.php:229
|
588 |
+
msgid "A user starts the unsubscription process clicking the unsubscription link in a newsletter. This lkink contains the email to unsubscribe and some unique information to avoid hacking. The user are requird to confirm the unsubscription: this is the last step where YOU can communicate with you almost missed user."
|
589 |
+
msgstr ""
|
590 |
+
|
591 |
+
#: options.php:233
|
592 |
+
#: options.php:282
|
593 |
+
msgid "Unsubscription text"
|
594 |
+
msgstr ""
|
595 |
+
|
596 |
+
#: options.php:237
|
597 |
+
msgid "This text is show to users who click on a \"unsubscription link\" in a newsletter email. You have to insert a link in the text that user can follow to confirm the unsubscription request (see tags)."
|
598 |
+
msgstr ""
|
599 |
+
|
600 |
+
#: options.php:239
|
601 |
+
msgid "Tags: <strong>{name}</strong> user name; <strong>{email}</strong> user email; <strong>{unsubscription_confirm_url}</strong> URL to confirm unsubscription."
|
602 |
+
msgstr ""
|
603 |
+
|
604 |
+
#: options.php:245
|
605 |
+
msgid "Good bye text"
|
606 |
+
msgstr ""
|
607 |
+
|
608 |
+
#: options.php:248
|
609 |
+
msgid "Latest message showed to the user to say \"good bye\"."
|
610 |
+
msgstr ""
|
611 |
+
|
612 |
+
#: options.php:250
|
613 |
+
msgid "Tags: none."
|
614 |
+
msgstr ""
|
615 |
+
|
616 |
+
#: options.php:255
|
617 |
+
msgid "Goodbye email subject"
|
618 |
+
msgstr ""
|
619 |
+
|
620 |
+
#: options.php:263
|
621 |
+
msgid "Goodbye email message"
|
622 |
+
msgstr ""
|
623 |
+
|
624 |
+
#: options.php:277
|
625 |
+
msgid "Unsubscription for mass mail mode"
|
626 |
+
msgstr ""
|
627 |
+
|
628 |
+
#: options.php:278
|
629 |
+
msgid "This section is not working!"
|
630 |
+
msgstr ""
|
631 |
+
|
632 |
+
#: options.php:289
|
633 |
+
msgid "Unsubscription error"
|
634 |
+
msgstr ""
|
635 |
+
|
636 |
+
#: options.php:293
|
637 |
+
msgid "Shown with the unsubscription message then the email to unsubscribe is not found."
|
638 |
+
msgstr ""
|
639 |
+
|
640 |
+
#: options.php:297
|
641 |
+
msgid "\"Email to unsubscribe\" label"
|
642 |
+
msgstr ""
|
643 |
+
|
644 |
+
#: options.php:305
|
645 |
+
msgid "\"Confirm unsubscription\" label"
|
646 |
+
msgstr ""
|
647 |
+
|
648 |
+
#: options.php:309
|
649 |
+
msgid "The button text to confirm unsubscription or to send an unsubscription request for the specified email address when \"mass mail\" mode is used for sending newsletters."
|
650 |
+
msgstr ""
|
651 |
+
|
652 |
+
#: options.php:313
|
653 |
+
msgid "Unsubscription end text"
|
654 |
+
msgstr ""
|
655 |
+
|
656 |
+
#: options.php:317
|
657 |
+
msgid "This text is shown when a user type in an email to be removed and the confirmation email has been sent."
|
658 |
+
msgstr ""
|
659 |
+
|
660 |
+
#: options.php:322
|
661 |
+
msgid "Unsubscription email subject"
|
662 |
+
msgstr ""
|
663 |
+
|
664 |
+
#: options.php:328
|
665 |
+
msgid "Unsubscription email message"
|
666 |
+
msgstr ""
|
667 |
+
|
668 |
+
#: options.php:332
|
669 |
+
msgid "Email sent to confirm unsubscription when the request is made specifying an email address to remove. Use {unsubscription_link} to place the link where the user has to click on; use {unsubscription_url} toplace the plain unsubscription URL."
|
670 |
+
msgstr ""
|
671 |
+
|
672 |
+
#: options.php:336
|
673 |
+
msgid "Unsubscription link text"
|
674 |
+
msgstr ""
|
675 |
+
|
676 |
+
#: options.php:340
|
677 |
+
msgid "The text of the link for unsubscription to be placed in the unsubscription email."
|
678 |
+
msgstr ""
|
679 |
+
|
680 |
+
#: options.php:346
|
681 |
+
msgid "Lists"
|
682 |
+
msgstr ""
|
683 |
+
|
684 |
+
#: options.php:351
|
685 |
+
msgid "List 0 is the general one"
|
686 |
+
msgstr ""
|
687 |
+
|
688 |
+
#: options.php:362
|
689 |
+
msgid "Advanced"
|
690 |
+
msgstr ""
|
691 |
+
|
692 |
+
#: options.php:369
|
693 |
+
msgid "write logs"
|
694 |
+
msgstr ""
|
695 |
+
|
696 |
+
#: options.php:376
|
697 |
+
msgid "do not use visual editors"
|
698 |
+
msgstr ""
|
699 |
+
|
700 |
+
#: options.php:383
|
701 |
+
msgid "allow editors to user the newsletter plugin"
|
702 |
+
msgstr ""
|
703 |
+
|
704 |
+
#: options.php:392
|
705 |
+
msgid "Really advanced options"
|
706 |
+
msgstr ""
|
707 |
+
|
708 |
+
#: options.php:399
|
709 |
+
msgid "Use the custom subscription form below"
|
710 |
+
msgstr ""
|
711 |
+
|
712 |
+
#: options.php:411
|
713 |
+
msgid "Zanzara client"
|
714 |
+
msgstr ""
|
715 |
+
#: options.php:412
|
716 |
+
msgid "Obsolete"
|
717 |
+
msgstr ""
|
718 |
+
|
719 |
+
#: options.php:415
|
720 |
+
msgid "Export key"
|
721 |
+
msgstr ""
|
722 |
+
|
723 |
+
#: options.php:419
|
724 |
+
msgid "Do not search for Zanzara, is a my private software"
|
725 |
+
msgstr ""
|
726 |
+
|
727 |
+
#: options.php:423
|
728 |
+
msgid "SMTP address"
|
729 |
+
msgstr ""
|
730 |
+
|
731 |
+
#: options.php:429
|
732 |
+
msgid "SMTP user"
|
733 |
+
msgstr ""
|
734 |
+
|
735 |
+
#: options.php:435
|
736 |
+
msgid "SMTP password"
|
737 |
+
msgstr ""
|
738 |
+
|
739 |
+
#: options.php:444
|
740 |
+
msgid "Revert to defaults"
|
741 |
+
msgstr ""
|
742 |
+
|
743 |
+
#: plugin.php:932
|
744 |
+
msgid "Configuration"
|
745 |
+
msgstr ""
|
746 |
+
|
747 |
+
#: plugin.php:933
|
748 |
+
msgid "Composer"
|
749 |
+
msgstr ""
|
750 |
+
|
751 |
+
#: plugin.php:935
|
752 |
+
msgid "Export"
|
753 |
+
msgstr ""
|
754 |
+
|
755 |
+
#: plugin.php:936
|
756 |
+
msgid "Manage"
|
757 |
+
msgstr ""
|
758 |
+
|
759 |
+
#: plugin.php:937
|
760 |
+
#: statistics.php:8
|
761 |
+
msgid "Statistics"
|
762 |
+
msgstr ""
|
763 |
+
|
764 |
+
#: statistics.php:11
|
765 |
+
msgid "You need the Newsletter Extras installed to view statistics"
|
766 |
+
msgstr ""
|
767 |
+
|
languages/pl_PL.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Subscription form (traslate "your name", "your email" and the button "subscribe me")
|
4 |
+
$newsletter_labels['subscription_form'] =
|
5 |
+
'<form method="post" action="" style="text-align: center">
|
6 |
+
<input type="hidden" name="na" value="s"/>
|
7 |
+
<table cellspacing="3" cellpadding="3" border="0" width="50%">
|
8 |
+
<tr><td>Twoje imię</td><td><input type="text" name="nn" size="30"/></td></tr>
|
9 |
+
<tr><td>Twój e-mail</td><td><input type="text" name="ne" size="30"/></td></tr>
|
10 |
+
<tr><td colspan="2" style="text-align: center"><input type="submit" value="Zapisz mnie"/></td></tr>
|
11 |
+
</table>
|
12 |
+
</form>';
|
13 |
+
|
14 |
+
$newsletter_labels['subscription_form_noname'] =
|
15 |
+
'<form method="post" action="" style="text-align: center">
|
16 |
+
<input type="hidden" name="na" value="s"/>
|
17 |
+
<table cellspacing="3" cellpadding="3" border="0" width="50%">
|
18 |
+
<tr><td>Twój e-mail</td><td><input type="text" name="ne" size="30"/></td></tr>
|
19 |
+
<tr><td colspan="2" style="text-align: center"><input type="submit" value="Zapisz mnie"/></td></tr>
|
20 |
+
</table>
|
21 |
+
</form>';
|
22 |
+
|
23 |
+
$newsletter_labels['widget_form'] =
|
24 |
+
'<form action="{newsletter_url}" method="post">
|
25 |
+
{text}
|
26 |
+
<p><input type="text" name="nn" value="Twoje imię" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>
|
27 |
+
<p><input type="text" name="ne" value="Twój e-mail" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>
|
28 |
+
<p><input type="submit" value="Zapisz mnie"/></p>
|
29 |
+
<input type="hidden" name="na" value="s"/>
|
30 |
+
</form>';
|
31 |
+
|
32 |
+
$newsletter_labels['widget_form_noname'] =
|
33 |
+
'<form action="{newsletter_url}" method="post">
|
34 |
+
{text}
|
35 |
+
<p><input type="text" name="ne" value="Twój e-mail" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>
|
36 |
+
<p><input type="submit" value="Zapisz mnie"/></p>
|
37 |
+
<input type="hidden" name="na" value="s"/>
|
38 |
+
</form>';
|
39 |
+
|
40 |
+
$newsletter_labels['embedded_form'] =
|
41 |
+
'<form action="{newsletter_url}" method="post">
|
42 |
+
<p><input type="text" name="ne" value="Twój e-mail" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
43 |
+
<input type="text" name="nn" value="Twoje imię" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
44 |
+
<input type="submit" value="Zapisz mnie"/>
|
45 |
+
<input type="hidden" name="na" value="s"/></p>
|
46 |
+
</form>';
|
47 |
+
|
48 |
+
$newsletter_labels['embedded_form_noname'] =
|
49 |
+
'<form action="{newsletter_url}" method="post">
|
50 |
+
<p><input type="text" name="ne" value="Twój e-mail" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
51 |
+
<input type="submit" value="Zapisz mnie"/>
|
52 |
+
<input type="hidden" name="na" value="s"/></p>
|
53 |
+
</form>';
|
54 |
+
|
55 |
+
// Errors on subscription
|
56 |
+
$newsletter_labels['error_email'] = 'Nieprawidłowy adres e-mail. <a href="javascript:history.back()">Powrót</a>.';
|
57 |
+
$newsletter_labels['error_name'] = 'Imię nie może być puste. <a href="javascript:history.back()">Powrót</a>.';
|
58 |
+
|
59 |
+
?>
|
languages/pl_PL_options.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// This file contains the default options values
|
3 |
+
|
4 |
+
// Subscription page introductory text (befor the subscription form)
|
5 |
+
$newsletter_default_options['subscription_text'] =
|
6 |
+
"<p>Zapisz się do newslettera wypełniając pola poniżej.
|
7 |
+
Postaramy się Cię uszczęśliwić.</p>
|
8 |
+
<p>Zostanie wysłany do Ciebie e-mail potwierdzający:
|
9 |
+
przeczytaj instrukcje w nim zawarte, aby potwierdzić subskrypcję.</p>";
|
10 |
+
|
11 |
+
// Message show after a subbscription request has made.
|
12 |
+
$newsletter_default_options['subscribed_text'] =
|
13 |
+
"<p>Zostałeś zapisany do subskrypcji.
|
14 |
+
W ciągu kilku minut otrzymasz e-mail potwierdzający.
|
15 |
+
Kliknij w odnośnik w nim zawarty aby potwierdzić subskrypcję. Jeśli e-mail nie pojawi się w Twojej skrzynce przez 15 minut - sprawdź folder spam.</p>";
|
16 |
+
|
17 |
+
// Confirmation email subject (double opt-in)
|
18 |
+
$newsletter_default_options['confirmation_subject'] =
|
19 |
+
"{name}, potwierdź swoją subskrypcję w {blog_title}";
|
20 |
+
|
21 |
+
// Confirmation email body (double opt-in)
|
22 |
+
$newsletter_default_options['confirmation_message'] =
|
23 |
+
"<p>Witaj {name},</p>
|
24 |
+
<p>Otrzymaliśmy prośbę o wpis do subskrypcji dla tego adresu e-mail. Możesz potwierdzić ją
|
25 |
+
<a href=\"{subscription_confirm_url}\"><strong>klikając tutaj</strong></a>.
|
26 |
+
Jeśli nie możesz kliknąć odnośnika, użyj poniższego linku:</p>
|
27 |
+
<p>{subscription_confirm_url}</p>
|
28 |
+
<p>Jeśli to nie Ty wpisywałeś się do subskrypcji, po prostu zignoruj tę wiadomość.</p>
|
29 |
+
<p>Dziękujemy.</p>";
|
30 |
+
|
31 |
+
|
32 |
+
// Subscription confirmed text (after a user clicked the confirmation link
|
33 |
+
// on the email he received
|
34 |
+
$newsletter_default_options['confirmed_text'] =
|
35 |
+
"<p>Twoja subskrypcja została potwierdzona!
|
36 |
+
Dziękujemy {name}!</p>";
|
37 |
+
|
38 |
+
$newsletter_default_options['confirmed_subject'] =
|
39 |
+
"Witaj, {name}";
|
40 |
+
|
41 |
+
$newsletter_default_options['confirmed_message'] =
|
42 |
+
"<p>Wiadomość potwierdzająca subskyrpcję {blog_title}.</p>
|
43 |
+
<p>Dziękujemy!</p>";
|
44 |
+
|
45 |
+
// Unsubscription request introductory text
|
46 |
+
$newsletter_default_options['unsubscription_text'] =
|
47 |
+
"<p>Proszę potwierdzić rezygnację z subskrypcji
|
48 |
+
<a href=\"{unsubscription_confirm_url}\">klikając tutaj</a>.";
|
49 |
+
|
50 |
+
// When you finally loosed your subscriber
|
51 |
+
$newsletter_default_options['unsubscribed_text'] =
|
52 |
+
"<p>To smutne, ale usunęliśmy Twój e-mail z subskrypcji...</p>";
|
53 |
+
?>
|
languages/pt_BR.php
CHANGED
@@ -11,6 +11,15 @@ $newsletter_labels['subscription_form'] =
|
|
11 |
</table>
|
12 |
</form>';
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
$newsletter_labels['widget_form'] =
|
15 |
'<form action="{newsletter_url}" method="post">
|
16 |
{text}
|
@@ -20,6 +29,14 @@ $newsletter_labels['widget_form'] =
|
|
20 |
<input type="hidden" name="na" value="s"/>
|
21 |
</form>';
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
$newsletter_labels['embedded_form'] =
|
24 |
'<form action="{newsletter_url}" method="post">
|
25 |
<p><input type="text" name="ne" value="Seu email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
@@ -28,6 +45,13 @@ $newsletter_labels['embedded_form'] =
|
|
28 |
<input type="hidden" name="na" value="s"/></p>
|
29 |
</form>';
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
// Errors on subscription
|
32 |
$newsletter_labels['error_email'] = 'Endereço de email incorreto. <a href="javascript:history.back()">Go back</a>.';
|
33 |
$newsletter_labels['error_name'] = 'O nome não pode estar vazio. <a href="javascript:history.back()">Go back</a>.';
|
11 |
</table>
|
12 |
</form>';
|
13 |
|
14 |
+
$newsletter_labels['subscription_form_noname'] =
|
15 |
+
'<form method="post" action="" style="text-align: center">
|
16 |
+
<input type="hidden" name="na" value="s"/>
|
17 |
+
<table cellspacing="3" cellpadding="3" border="0" width="50%">
|
18 |
+
<tr><td>Seu email</td><td><input type="text" name="ne" size="30"/></td></tr>
|
19 |
+
<tr><td colspan="2" style="text-align: center"><input type="submit" value="Assinar"/></td></tr>
|
20 |
+
</table>
|
21 |
+
</form>';
|
22 |
+
|
23 |
$newsletter_labels['widget_form'] =
|
24 |
'<form action="{newsletter_url}" method="post">
|
25 |
{text}
|
29 |
<input type="hidden" name="na" value="s"/>
|
30 |
</form>';
|
31 |
|
32 |
+
$newsletter_labels['widget_form_noname'] =
|
33 |
+
'<form action="{newsletter_url}" method="post">
|
34 |
+
{text}
|
35 |
+
<p><input type="text" name="ne" value="Seu email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>
|
36 |
+
<p><input type="submit" value="Assinar"/></p>
|
37 |
+
<input type="hidden" name="na" value="s"/>
|
38 |
+
</form>';
|
39 |
+
|
40 |
$newsletter_labels['embedded_form'] =
|
41 |
'<form action="{newsletter_url}" method="post">
|
42 |
<p><input type="text" name="ne" value="Seu email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
45 |
<input type="hidden" name="na" value="s"/></p>
|
46 |
</form>';
|
47 |
|
48 |
+
$newsletter_labels['embedded_form_noname'] =
|
49 |
+
'<form action="{newsletter_url}" method="post">
|
50 |
+
<p><input type="text" name="ne" value="Seu email" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
51 |
+
<input type="submit" value="Assinar"/>
|
52 |
+
<input type="hidden" name="na" value="s"/></p>
|
53 |
+
</form>';
|
54 |
+
|
55 |
// Errors on subscription
|
56 |
$newsletter_labels['error_email'] = 'Endereço de email incorreto. <a href="javascript:history.back()">Go back</a>.';
|
57 |
$newsletter_labels['error_name'] = 'O nome não pode estar vazio. <a href="javascript:history.back()">Go back</a>.';
|
languages/ru_RU.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Subscription form (traslate "your name", "your email" and the button "subscribe me")
|
4 |
+
$newsletter_labels['subscription_form'] =
|
5 |
+
'<form method="post" action="" style="text-align: center">
|
6 |
+
<input type="hidden" name="na" value="s"/>
|
7 |
+
<table cellspacing="3" cellpadding="3" border="0" width="50%">
|
8 |
+
<tr><td>Ваше имя</td><td><input type="text" name="nn" size="30"/></td></tr>
|
9 |
+
<tr><td>Ваш email</td><td><input type="text" name="ne" size="30"/></td></tr>
|
10 |
+
<tr><td colspan="2" style="text-align: center"><input type="submit" value="Подписать меня"/></td></tr>
|
11 |
+
</table>
|
12 |
+
</form>';
|
13 |
+
|
14 |
+
|
15 |
+
$newsletter_labels['subscription_form_noname'] =
|
16 |
+
'<form method="post" action="" style="text-align: center">
|
17 |
+
<input type="hidden" name="na" value="s"/>
|
18 |
+
<table cellspacing="3" cellpadding="3" border="0" width="50%">
|
19 |
+
<tr><td>Ваш email</td><td><input type="text" name="ne" size="30"/></td></tr>
|
20 |
+
<tr><td colspan="2" style="text-align: center"><input type="submit" value="Подписать меня"/></td></tr>
|
21 |
+
</table>
|
22 |
+
</form>';
|
23 |
+
|
24 |
+
$newsletter_labels['widget_form'] =
|
25 |
+
'<form action="{newsletter_url}" method="post">
|
26 |
+
{text}
|
27 |
+
<p><input type="text" name="nn" value="Ваше имя" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>
|
28 |
+
<p><input type="text" name="ne" value="Ваш e-mail" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>
|
29 |
+
<p><input type="submit" value="Подписаться"/></p>
|
30 |
+
<input type="hidden" name="na" value="s"/>
|
31 |
+
</form>';
|
32 |
+
|
33 |
+
|
34 |
+
$newsletter_labels['widget_form_noname'] =
|
35 |
+
'<form action="{newsletter_url}" method="post">
|
36 |
+
{text}
|
37 |
+
<p><input type="text" name="ne" value="Ваш e-mail" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/></p>
|
38 |
+
<p><input type="submit" value="Подписаться"/></p>
|
39 |
+
<input type="hidden" name="na" value="s"/>
|
40 |
+
</form>';
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
$newsletter_labels['embedded_form'] =
|
45 |
+
'<form action="{newsletter_url}" method="post">
|
46 |
+
<p><input type="text" name="ne" value="Ваш e-mail" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
47 |
+
<input type="text" name="nn" value="Ваше имя" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
48 |
+
<input type="submit" value="Подписаться"/>
|
49 |
+
<input type="hidden" name="na" value="s"/></p>
|
50 |
+
</form>';
|
51 |
+
|
52 |
+
// Example of embedded form without name
|
53 |
+
|
54 |
+
$newsletter_labels['embedded_form_noname'] =
|
55 |
+
'<form action="{newsletter_url}" method="post">
|
56 |
+
<p><input type="text" name="ne" value="Ваш e-mail" onclick="if (this.defaultValue==this.value) this.value=\'\'" onblur="if (this.value==\'\') this.value=this.defaultValue"/>
|
57 |
+
<input type="submit" value="Подписаться"/>
|
58 |
+
<input type="hidden" name="na" value="s"/></p>
|
59 |
+
</form>';
|
60 |
+
|
61 |
+
|
62 |
+
// Errors on subscription
|
63 |
+
$newsletter_labels['error_email'] = 'Неверный e-mail. <a href="javascript:history.back()">Назад</a>.';
|
64 |
+
$newsletter_labels['error_name'] = 'Имя должно быть указано. <a href="javascript:history.back()">Назад</a>.';
|
65 |
+
|
66 |
+
?>
|
languages/ru_RU_options.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// This file contains the default options values
|
3 |
+
$newsletter_default_options['from_email'] = get_option('admin_email');
|
4 |
+
$newsletter_default_options['from_name'] = get_option('blogname');
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
// Subscription page introductory text (befor the subscription form)
|
9 |
+
$newsletter_default_options['subscription_text'] =
|
10 |
+
"<p>Вы можете подписаться на получение новостей сайта, используя форму ниже.</p>
|
11 |
+
<p>На ваш почтовый ящик будет выслано письмо для подтверждения. Пожалуйста, ознакомьтесь с инструкциями в письме, для завершения процедуры.</p>";
|
12 |
+
|
13 |
+
// Message show after a subbscription request has made.
|
14 |
+
$newsletter_default_options['subscribed_text'] =
|
15 |
+
"<p>Вы успешно подписаны на рассылку. Вы получите письмо с подтверждением через несколько минут. Перейдите по ссылке в письме для подтверждения. Если в течении 15 минут письмо все-таки не пришло, проверьте папку со спамом на вашем ящике, на случай если почтовая служба сочла письмо спамом. Если же письма нигде нет, свяжитесь с администратором сайта</a>.</p>";
|
16 |
+
|
17 |
+
// Confirmation email subject (double opt-in)
|
18 |
+
$newsletter_default_options['confirmation_subject'] =
|
19 |
+
"{name}, Подвердите вашу подписку на новостную ленту {blog_title}";
|
20 |
+
|
21 |
+
// Confirmation email body (double opt-in)
|
22 |
+
$newsletter_default_options['confirmation_message'] =
|
23 |
+
"<p>Здравствуйте, {name},</p>
|
24 |
+
<p>От Вас поступил запрос на получение новостной рассылки. Вы можете подтвердить его, кликнув на эту <a href=\"{subscription_confirm_url}\"><strong>ссылку</strong></a>. Если ссылка по каким-то причинам не нажимается, вставьте вручную в браузер, ссылку:</p>
|
25 |
+
<p>{subscription_confirm_url}</p>
|
26 |
+
<p>Если Вы не посылали запрос, или кто-то это сделал за Вас, просто проигнорируйте это письмо.</p>
|
27 |
+
<p>Спасибо!</p>";
|
28 |
+
|
29 |
+
|
30 |
+
// Subscription confirmed text (after a user clicked the confirmation link
|
31 |
+
// on the email he received
|
32 |
+
$newsletter_default_options['confirmed_text'] =
|
33 |
+
"<p>Ваша подписка подтверждена! Спасибо, {name}!</p>";
|
34 |
+
|
35 |
+
$newsletter_default_options['confirmed_subject'] =
|
36 |
+
"Добро пожаловать, {name}";
|
37 |
+
|
38 |
+
$newsletter_default_options['confirmed_message'] =
|
39 |
+
"<p>Вы были успешно подписаны на новостную ленту {blog_title}.</p>
|
40 |
+
<p>Спасибо!</p>";
|
41 |
+
|
42 |
+
// Unsubscription request introductory text
|
43 |
+
$newsletter_default_options['unsubscription_text'] =
|
44 |
+
"<p>Пожалуйста, подведите свой отказ от подписки, кликнув <a href=\"{unsubscription_confirm_url}\">здесь</a>.</p>";
|
45 |
+
|
46 |
+
// When you finally loosed your subscriber
|
47 |
+
$newsletter_default_options['unsubscribed_text'] =
|
48 |
+
"<p>Это сделает нам немножечко больно, но мы отписали Вас от получения новостей...</p>";
|
49 |
+
|
50 |
+
$newsletter_default_options['unsubscribed_subject'] =
|
51 |
+
"До свидания, {name}";
|
52 |
+
|
53 |
+
$newsletter_default_options['unsubscribed_message'] =
|
54 |
+
"<p>The message confirm your unsubscription to {blog_title} newsletter.</p>
|
55 |
+
<p>Good bye!</p>";
|
56 |
+
|
57 |
+
$newsletter_default_options['subscription_form'] =
|
58 |
+
'<form method="post" action="" style="text-align: center">
|
59 |
+
<input type="hidden" name="na" value="s"/>
|
60 |
+
<table cellspacing="3" cellpadding="3" border="0" width="50%">
|
61 |
+
<tr><td>Ваше имя</td><td><input type="text" name="nn" size="30"/></td></tr>
|
62 |
+
<tr><td>Ващ e-mail</td><td><input type="text" name="ne" size="30"/></td></tr>
|
63 |
+
<tr><td colspan="2" style="text-align: center"><input type="submit" value="Подписать меня"/></td></tr>
|
64 |
+
</table>
|
65 |
+
</form>';
|
66 |
+
?>
|
manage.php
CHANGED
@@ -1,122 +1,224 @@
|
|
1 |
<?php
|
|
|
2 |
|
3 |
-
if ($
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
6 |
$_POST['a'] = 'search';
|
7 |
}
|
8 |
|
9 |
-
if ($_POST['a'] == 'remove')
|
10 |
-
|
11 |
-
newsletter_delete(newsletter_request('email'));
|
12 |
$_POST['a'] = 'search';
|
13 |
}
|
14 |
|
15 |
-
if ($_POST['removeall'])
|
16 |
-
{
|
17 |
newsletter_delete_all();
|
18 |
}
|
19 |
|
20 |
-
if ($_POST['removeallunconfirmed'])
|
21 |
-
{
|
22 |
newsletter_delete_all('S');
|
23 |
}
|
24 |
|
25 |
-
if ($_POST['
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
$_POST['a'] = 'search';
|
29 |
}
|
30 |
|
31 |
-
if ($_POST['a'] == 'search')
|
32 |
-
|
33 |
-
$
|
|
|
34 |
}
|
35 |
|
36 |
?>
|
37 |
<script type="text/javascript">
|
38 |
-
function
|
39 |
-
{
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
}
|
44 |
-
function
|
45 |
-
{
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
</script>
|
60 |
-
<
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
<form id="channel" method="post" action="">
|
|
|
64 |
<input type="hidden" id="action" name="a" value="search"/>
|
65 |
-
<input type="hidden" id="
|
66 |
<input type="hidden" id="status" name="status" value=""/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
<table class="form-table">
|
68 |
<tr valign="top">
|
69 |
-
<th
|
70 |
-
<td>
|
71 |
-
|
72 |
-
|
73 |
-
</
|
|
|
74 |
</tr>
|
75 |
</table>
|
|
|
|
|
|
|
|
|
76 |
</form>
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
<p class="submit">
|
79 |
<!--<input type="submit" value="Remove all" name="removeall" onclick="return confirm('Are your sure, really sure?')"/>-->
|
80 |
-
|
81 |
</p>
|
82 |
-
|
83 |
|
84 |
-
<h3>Statistics</h3>
|
85 |
-
Confirmed subscriber: <?php echo $wpdb->get_var("select count(*) from " . $wpdb->prefix . "newsletter where status='C'"); ?>
|
86 |
-
<br />
|
87 |
-
Unconfirmed subscriber: <?php echo $wpdb->get_var("select count(*) from " . $wpdb->prefix . "newsletter where status='S'"); ?>
|
88 |
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
echo ' | <a href="javascript:void(newsletter_set_status(\'' . htmlspecialchars($s->email) . '\', \'C\'))">confirm</a>';
|
113 |
-
echo ' | <a href="javascript:void(newsletter_set_status(\'' . htmlspecialchars($s->email) . '\', \'S\'))">unconfirm</a>';
|
114 |
-
echo ' | <a href="javascript:void(newsletter_resend(\'' . htmlspecialchars($s->email) . '\'))">resend confirmation</a>';
|
115 |
-
echo '</td>';
|
116 |
-
echo '</tr>';
|
117 |
-
}
|
118 |
-
echo '</table>';
|
119 |
}
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
</div>
|
1 |
<?php
|
2 |
+
$options = get_option('newsletter');
|
3 |
|
4 |
+
if (!isset($options['no_translation'])) {
|
5 |
+
$plugin_dir = basename(dirname(__FILE__));
|
6 |
+
load_plugin_textdomain('newsletter', 'wp-content/plugins/' . $plugin_dir . '/languages/');
|
7 |
+
}
|
8 |
+
|
9 |
+
if ($_POST['a'] == 'resend' && check_admin_referer()) {
|
10 |
+
newsletter_send_confirmation(newsletter_get_subscriber(newsletter_request('id')));
|
11 |
$_POST['a'] = 'search';
|
12 |
}
|
13 |
|
14 |
+
if ($_POST['a'] == 'remove' && check_admin_referer()) {
|
15 |
+
newsletter_delete(newsletter_request('id'));
|
|
|
16 |
$_POST['a'] = 'search';
|
17 |
}
|
18 |
|
19 |
+
if ($_POST['removeall'] && check_admin_referer()) {
|
|
|
20 |
newsletter_delete_all();
|
21 |
}
|
22 |
|
23 |
+
if ($_POST['removeallunconfirmed'] && check_admin_referer()) {
|
|
|
24 |
newsletter_delete_all('S');
|
25 |
}
|
26 |
|
27 |
+
if ($_POST['showallunconfirmed'] && check_admin_referer()) {
|
28 |
+
$list = newsletter_get_unconfirmed();
|
29 |
+
}
|
30 |
+
|
31 |
+
if ($_POST['a'] == 'status' && check_admin_referer()) {
|
32 |
+
newsletter_set_status(newsletter_request('id'), newsletter_request('status'));
|
33 |
+
$_POST['a'] = 'search';
|
34 |
+
}
|
35 |
+
|
36 |
+
if ($_POST['a'] == 'save' && check_admin_referer()) {
|
37 |
+
newsletter_save(stripslashes_deep($_POST['subscriber']));
|
38 |
$_POST['a'] = 'search';
|
39 |
}
|
40 |
|
41 |
+
if ($_POST['a'] == 'search' && check_admin_referer()) {
|
42 |
+
$status = isset($_POST['unconfirmed'])?'S':null;
|
43 |
+
$order = $_POST['order'];
|
44 |
+
$list = newsletter_search(newsletter_request('text'), $status, $order);
|
45 |
}
|
46 |
|
47 |
?>
|
48 |
<script type="text/javascript">
|
49 |
+
function newsletter_detail(id)
|
50 |
+
{
|
51 |
+
document.getElementById("action").value = "detail";
|
52 |
+
document.getElementById("id").value = id;
|
53 |
+
document.getElementById("channel").submit();
|
54 |
+
}
|
55 |
+
function newsletter_edit(id)
|
56 |
+
{
|
57 |
+
document.getElementById("action").value = "edit";
|
58 |
+
document.getElementById("id").value = id;
|
59 |
+
document.getElementById("channel").submit();
|
60 |
+
}
|
61 |
+
function newsletter_save()
|
62 |
+
{
|
63 |
+
document.getElementById("action").value = "save";
|
64 |
+
document.getElementById("channel").submit();
|
65 |
+
}
|
66 |
+
function newsletter_remove(id)
|
67 |
+
{
|
68 |
+
document.getElementById("action").value = "remove";
|
69 |
+
document.getElementById("id").value = id;
|
70 |
+
document.getElementById("channel").submit();
|
71 |
+
}
|
72 |
+
function newsletter_set_status(id, status)
|
73 |
+
{
|
74 |
+
document.getElementById("action").value = "status";
|
75 |
+
document.getElementById("id").value = id;
|
76 |
+
document.getElementById("status").value = status;
|
77 |
+
document.getElementById("channel").submit();
|
78 |
+
}
|
79 |
+
function newsletter_resend(id)
|
80 |
+
{
|
81 |
+
if (!confirm("Resend the subscription confirmation email?")) return;
|
82 |
+
document.getElementById("action").value = "resend";
|
83 |
+
document.getElementById("id").value = id;
|
84 |
+
document.getElementById("channel").submit();
|
85 |
+
}
|
86 |
|
87 |
</script>
|
88 |
+
<style type="text/css">
|
89 |
+
.newsletter-results {
|
90 |
+
border-collapse: collapse;
|
91 |
+
}
|
92 |
+
.newsletter-results td, .newsletter-results th {
|
93 |
+
border: 1px solid #999;
|
94 |
+
padding: 5px;
|
95 |
+
}
|
96 |
+
#newsletter .form-table {
|
97 |
+
border: 1px solid #999;
|
98 |
+
background-color: #fff;
|
99 |
+
}
|
100 |
+
</style>
|
101 |
+
|
102 |
+
<div class="wrap" id="newsletter">
|
103 |
+
<h2><?php _e('Subscribers Management', 'newsletter'); ?></h2>
|
104 |
+
|
105 |
+
<?php require_once 'header.php'; ?>
|
106 |
+
|
107 |
<form id="channel" method="post" action="">
|
108 |
+
<?php wp_nonce_field(); ?>
|
109 |
<input type="hidden" id="action" name="a" value="search"/>
|
110 |
+
<input type="hidden" id="id" name="id" value=""/>
|
111 |
<input type="hidden" id="status" name="status" value=""/>
|
112 |
+
|
113 |
+
<div style="display: <?php if ($_POST['a'] == 'edit') echo 'none'; else echo 'block'; ?>">
|
114 |
+
<table class="form-table">
|
115 |
+
<tr valign="top">
|
116 |
+
<th scope="row"><label><?php _e('Search', 'newsletter'); ?></label></th>
|
117 |
+
<td>
|
118 |
+
<input name="text" type="text" size="50" value="<?php echo htmlspecialchars(newsletter_request('text'))?>"/>
|
119 |
+
<input type="submit" value="<?php _e('Search', 'newsletter'); ?>" /> (press without filter to show all)
|
120 |
+
<br />
|
121 |
+
Max 100 results will be shown
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
<tr valign="top">
|
125 |
+
<th scope="row"> </th>
|
126 |
+
<td>
|
127 |
+
<input name="unconfirmed" type="checkbox" <?php echo isset($_POST['unconfirmed'])?'checked':''; ?>/>
|
128 |
+
<?php _e('Only not yet confirmed', 'newsletter'); ?>
|
129 |
+
</td>
|
130 |
+
</tr>
|
131 |
+
<tr valign="top">
|
132 |
+
<th scope="row"><?php _e('Order', 'newsletter'); ?></th>
|
133 |
+
<td>
|
134 |
+
<select name="order">
|
135 |
+
<option value="id">id</option>
|
136 |
+
<option value="email">email</option>
|
137 |
+
</select>
|
138 |
+
</td>
|
139 |
+
</tr>
|
140 |
+
</table>
|
141 |
+
</div>
|
142 |
+
|
143 |
+
<?php
|
144 |
+
if ($_POST['a'] == 'edit' && check_admin_referer()) {
|
145 |
+
$subscriber = newsletter_get_subscriber($_POST['id']);
|
146 |
+
?>
|
147 |
+
<input type="hidden" name="subscriber[id]" value="<?php echo $subscriber->id; ?>"/></td>
|
148 |
<table class="form-table">
|
149 |
<tr valign="top">
|
150 |
+
<th>Name</th>
|
151 |
+
<td><input type="text" name="subscriber[name]" size="40" value="<?php echo htmlspecialchars($subscriber->name); ?>"/></td>
|
152 |
+
</tr>
|
153 |
+
<tr valign="top">
|
154 |
+
<th>Email</th>
|
155 |
+
<td><input type="text" name="subscriber[email]" size="40" value="<?php echo htmlspecialchars($subscriber->email); ?>"/></td>
|
156 |
</tr>
|
157 |
</table>
|
158 |
+
<p class="submit"><input type="button" value="Save" onclick="newsletter_save()"/></a>
|
159 |
+
|
160 |
+
<?php } ?>
|
161 |
+
|
162 |
</form>
|
163 |
+
|
164 |
+
|
165 |
+
<?php if ($_POST['a'] == 'edit') { ?>
|
166 |
+
</div>
|
167 |
+
<?php return; } ?>
|
168 |
+
|
169 |
+
|
170 |
+
<form method="post" action="">
|
171 |
+
<?php wp_nonce_field(); ?>
|
172 |
<p class="submit">
|
173 |
<!--<input type="submit" value="Remove all" name="removeall" onclick="return confirm('Are your sure, really sure?')"/>-->
|
174 |
+
<input type="submit" value="<?php _e('Remove all unconfirmed', 'newsletter'); ?>" name="removeallunconfirmed" onclick="return confirm('<?php _e('Are your sure, really sure?', 'newsletter'); ?>')"/>
|
175 |
</p>
|
176 |
+
</form>
|
177 |
|
|
|
|
|
|
|
|
|
178 |
|
179 |
+
|
180 |
+
<h3><?php _e('Subscriber\'s statistics', 'newsletter'); ?></h3>
|
181 |
+
<?php _e('Confirmed subscriber', 'newsletter'); ?>: <?php echo $wpdb->get_var("select count(*) from " . $wpdb->prefix . "newsletter where status='C'"); ?>
|
182 |
+
<br />
|
183 |
+
<?php _e('Unconfirmed subscriber', 'newsletter'); ?>: <?php echo $wpdb->get_var("select count(*) from " . $wpdb->prefix . "newsletter where status='S'"); ?>
|
184 |
+
|
185 |
+
<h3><?php _e('Results', 'newsletter'); ?></h3>
|
186 |
+
|
187 |
+
<?php
|
188 |
+
if ($list) {
|
189 |
+
echo '<table class="newsletter-results" border="1" cellspacing="5">';
|
190 |
+
echo '<tr><th>Id</th><th>' . __('Email', 'newsletter') . '</th><th>' . __('Name', 'newsletter') . '</th><th>' . __('Status', 'newsletter') . '</th><th>' . __('Profile', 'newsletter') . '</th><th>' . __('Token', 'newsletter') . '</th><th>' . __('Actions', 'newsletter') . '</th></tr>';
|
191 |
+
foreach($list as $s) {
|
192 |
+
echo '<tr>';
|
193 |
+
echo '<td>' . $s->id . '</td>';
|
194 |
+
echo '<td>' . $s->email . '</td>';
|
195 |
+
echo '<td>' . $s->name . '</td>';
|
196 |
+
echo '<td>' . ($s->status=='S'?'Not confirmed':'Confirmed') . '</td>';
|
197 |
+
echo '<td><small>';
|
198 |
+
$query = $wpdb->prepare("select name,value from " . $wpdb->prefix . "newsletter_profiles where newsletter_id=%d", $s->id);
|
199 |
+
$profile = $wpdb->get_results($query);
|
200 |
+
foreach ($profile as $field) {
|
201 |
+
echo htmlspecialchars($field->name) . ': ' . htmlspecialchars($field->value) . '<br />';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
}
|
203 |
+
// $profile = unserialize($s->profile);
|
204 |
+
// if (is_array($profile)) {
|
205 |
+
// foreach ($profile as $key=>$value) {
|
206 |
+
// echo htmlspecialchars($key) . ': ' . htmlspecialchars($value) . '<br />';
|
207 |
+
// }
|
208 |
+
// }
|
209 |
+
echo '</small></td>';
|
210 |
+
echo '<td><small>' . $s->token . '</small></td>';
|
211 |
+
echo '<td>';
|
212 |
+
echo '<a href="javascript:void(newsletter_edit(' . $s->id . '))">' . __('edit', 'newsletter') . '</a>';
|
213 |
+
echo ' | <a href="javascript:void(newsletter_remove(' . $s->id . '))">' . __('remove', 'newsletter') . '</a>';
|
214 |
+
echo ' | <a href="javascript:void(newsletter_set_status(' . $s->id . ', \'C\'))">' . __('confirm', 'newsletter') . '</a>';
|
215 |
+
echo ' | <a href="javascript:void(newsletter_set_status(' . $s->id . ', \'S\'))">' . __('unconfirm', 'newsletter') . '</a>';
|
216 |
+
echo ' | <a href="javascript:void(newsletter_resend(' . $s->id . '))">' . __('resend confirmation', 'newsletter') . '</a>';
|
217 |
+
echo '</td>';
|
218 |
+
echo '</tr>';
|
219 |
+
}
|
220 |
+
echo '</table>';
|
221 |
+
}
|
222 |
+
?>
|
223 |
|
224 |
</div>
|
newsletter.php
CHANGED
@@ -1,281 +1,468 @@
|
|
1 |
<?php
|
2 |
$options = get_option('newsletter_email');
|
|
|
3 |
|
4 |
-
if (isset($_POST['save']))
|
5 |
-
|
6 |
-
if (!check_admin_referer()) die('No hacking please');
|
7 |
-
$options = newsletter_request('options');
|
8 |
update_option('newsletter_email', $options);
|
9 |
}
|
10 |
|
11 |
-
|
12 |
-
{
|
13 |
-
|
|
|
14 |
|
15 |
-
|
16 |
|
17 |
-
//
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
else
|
23 |
-
{
|
24 |
-
$message = file_get_contents(dirname(__FILE__) . '/themes/' . $_POST['theme']);
|
25 |
-
}
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
{
|
31 |
-
$content = $post->post_content;
|
32 |
-
$x = strpos($content, '<!--more-->');
|
33 |
-
if ($x !== false) $content = substr($content, 0, $x);
|
34 |
-
$content = preg_replace('/\[[^\]]*\]/', '', $content);
|
35 |
-
//$content = apply_filters('the_content', $content);
|
36 |
-
|
37 |
-
$excerpt = strip_tags($content);
|
38 |
-
if (strlen($excerpt) > 200) {
|
39 |
-
$x = strpos($excerpt, ' ', 200);
|
40 |
-
$excerpt = substr($excerpt, 0, $x) . '[...]';
|
41 |
-
}
|
42 |
-
|
43 |
-
$image = '';
|
44 |
-
$x = stripos($content, '<img');
|
45 |
-
|
46 |
-
if ($x !== false) {
|
47 |
-
$x = stripos($content, 'src="', $x);
|
48 |
-
if ($x !== false) {
|
49 |
-
$x += 5;
|
50 |
-
$y = strpos($content, '"', $x);
|
51 |
-
$image = substr($content, $x, $y-$x);
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
if ($image == '') $image = get_option('siteurl') . '/wp-content/plugins/newsletter/images/empty.gif';
|
56 |
-
|
57 |
-
|
58 |
-
$message = str_replace('{excerpt_' . $idx . '}', $excerpt, $message);
|
59 |
-
$message = str_replace('{content_' . $idx . '}', $content, $message);
|
60 |
-
$message = str_replace('{link_' . $idx . '}', get_permalink(), $message);
|
61 |
-
$message = str_replace('{title_' . $idx . '}', get_the_title(), $message);
|
62 |
-
$message = str_replace('{image_' . $idx . '}', $image, $message);
|
63 |
-
// image replacement
|
64 |
-
$idx++;
|
65 |
}
|
66 |
-
$message = str_replace('{blog_title}', get_option('blogname'), $message);
|
67 |
-
$message = str_replace('{home_url}', get_option('home'), $message);
|
68 |
-
$options['message'] = $message;
|
69 |
}
|
70 |
|
71 |
-
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
<script type="text/javascript" src="<?php echo get_option('siteurl'); ?>/wp-content/plugins/newsletter/tiny_mce/tiny_mce.js"></script>
|
75 |
<script type="text/javascript">
|
76 |
tinyMCE.init({
|
77 |
mode : "textareas",
|
78 |
theme : "advanced",
|
79 |
-
plugins: "table",
|
80 |
theme_advanced_disable : "styleselect",
|
81 |
-
|
|
|
82 |
relative_urls : false,
|
83 |
remove_script_host : false,
|
|
|
84 |
document_base_url : "<?php echo get_option('home'); ?>/"
|
85 |
-
|
86 |
-
|
|
|
|
|
|
|
|
|
87 |
</script>
|
|
|
88 |
|
89 |
-
<
|
90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
<?php wp_nonce_field(); ?>
|
92 |
|
93 |
-
|
94 |
|
95 |
-
<h3>
|
96 |
-
<
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
|
100 |
-
<div style="padding: 15px; border: 1px solid #ccc">
|
101 |
-
<?php if (!$last) { ?>
|
102 |
-
No batch info found.
|
103 |
-
<?php } else { ?>
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
|
109 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
</div>
|
111 |
|
|
|
|
|
|
|
112 |
|
|
|
113 |
|
114 |
-
<?php if (isset($_POST['test'])) { ?>
|
115 |
-
<?php if (!check_admin_referer()) die('No hacking please'); ?>
|
116 |
<h3>Sending to test subscribers</h3>
|
117 |
-
<
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
{
|
125 |
-
if (!$options['test_email_' . $i]) continue;
|
126 |
-
$s = newsletter_get_subscriber($options['test_email_' . $i]);
|
127 |
-
if ($s) $subscribers[$i-1]= $s;
|
128 |
-
else {
|
129 |
$subscribers[$i-1]->name = $options['test_name_' . $i];
|
130 |
$subscribers[$i-1]->email = $options['test_email_' . $i];
|
131 |
$subscribers[$i-1]->token = 'FAKETOKEN';
|
132 |
}
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
</p>
|
137 |
|
138 |
-
|
139 |
|
140 |
|
141 |
-
<?php if (isset($_POST['simulate']) || isset($_POST['simulate2'])) { ?>
|
142 |
-
<?php if (!check_admin_referer()) die('No hacking please'); ?>
|
143 |
|
144 |
-
<h3>Sending for simulation</h3>
|
145 |
-
<p>There is a little delay between each email sending to simulate mailing process.</p>
|
146 |
<?php
|
147 |
-
|
148 |
-
{
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
{
|
158 |
-
echo '</p><form action="" method="post">Still some emails to send.';
|
159 |
-
wp_nonce_field();
|
160 |
-
echo '<input type="submit" name="simulate2" value="Proceed"/>';
|
161 |
-
echo '</form>';
|
162 |
-
}
|
163 |
-
?>
|
164 |
|
|
|
165 |
|
166 |
-
<?php
|
|
|
167 |
|
|
|
168 |
|
169 |
-
|
170 |
-
<?php if (!check_admin_referer()) die('No hacking please'); ?>
|
171 |
|
172 |
-
<
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
|
192 |
<?php } ?>
|
193 |
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
[15.45.01] Davide Pozza: (<\s*[A]\s[^>]*[\n\s]*)(href\s*=\s*([^>|\s]*))[^>]*>
|
198 |
-
*/
|
199 |
-
-->
|
200 |
|
201 |
|
202 |
<h3>Newsletter message</h3>
|
203 |
-
|
204 |
-
for debug purpose).</p>
|
205 |
<table class="form-table">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
<tr valign="top">
|
|
|
207 |
<td>
|
208 |
-
|
209 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
<br />
|
211 |
Tags: <strong>{name}</strong> receiver name.
|
212 |
</td>
|
213 |
</tr>
|
214 |
<tr valign="top">
|
|
|
215 |
<td>
|
216 |
-
|
217 |
-
<textarea name="options[message]" wrap="off" rows="20" style="width: 100%"><?php echo htmlspecialchars($options['message'])?></textarea>
|
218 |
<br />
|
219 |
-
Tags:
|
220 |
-
<strong>{
|
|
|
|
|
|
|
221 |
</td>
|
222 |
</tr>
|
223 |
<tr valign="top">
|
|
|
224 |
<td>
|
225 |
-
|
226 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
</td>
|
228 |
</tr>
|
229 |
</table>
|
230 |
|
231 |
-
|
232 |
<p class="submit">
|
233 |
<input class="button" type="submit" name="save" value="Save"/>
|
234 |
-
<input class="button" type="submit" name="
|
235 |
-
<input class="button" type="submit" name="simulate" value="Simulate" onclick="return confirm('
|
236 |
-
|
237 |
-
|
238 |
-
|
|
|
239 |
<?php } ?>
|
240 |
-
|
241 |
|
242 |
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
|
271 |
<h3>Test subscribers</h3>
|
272 |
-
<p>
|
273 |
-
|
|
|
|
|
274 |
|
275 |
<table class="form-table">
|
276 |
<?php for ($i=1; $i<=10; $i++) { ?>
|
277 |
<tr valign="top">
|
278 |
-
<th
|
279 |
<td>
|
280 |
name: <input name="options[test_name_<?php echo $i; ?>]" type="text" size="30" value="<?php echo htmlspecialchars($options['test_name_' . $i])?>"/>
|
281 |
|
@@ -284,6 +471,9 @@ $last = get_option('newsletter_last');
|
|
284 |
</tr>
|
285 |
<?php } ?>
|
286 |
</table>
|
287 |
-
|
|
|
|
|
288 |
|
|
|
289 |
</div>
|
1 |
<?php
|
2 |
$options = get_option('newsletter_email');
|
3 |
+
$options_newsletter = get_option('newsletter');
|
4 |
|
5 |
+
if (isset($_POST['save']) && check_admin_referer()) {
|
6 |
+
$options = stripslashes_deep($_POST['options']);
|
|
|
|
|
7 |
update_option('newsletter_email', $options);
|
8 |
}
|
9 |
|
10 |
+
// Auto composition
|
11 |
+
if (isset($_POST['auto']) && check_admin_referer()) {
|
12 |
+
// Load the theme
|
13 |
+
$options = stripslashes_deep($_POST['options']);
|
14 |
|
15 |
+
$file = newsletter_get_theme_dir($options['theme']) . '/theme.php';
|
16 |
|
17 |
+
// Execute the theme file and get the content generated
|
18 |
+
ob_start();
|
19 |
+
@include($file);
|
20 |
+
$options['message'] = ob_get_contents();
|
21 |
+
ob_end_clean();
|
|
|
|
|
|
|
|
|
22 |
|
23 |
+
if ($options['novisual']) {
|
24 |
+
$options['message'] = "<html>\n<head>\n<style type=\"text/css\">\n" . newsletter_get_theme_css($options_email['theme']) .
|
25 |
+
"\n</style>\n</head>\n<body>\n" . $options['message'] . "\n</body>\n</html>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
|
|
|
|
|
|
27 |
}
|
28 |
|
29 |
+
// Reset the batch
|
30 |
+
if (isset($_POST['reset']) && check_admin_referer()) {
|
31 |
+
newsletter_delete_batch_file();
|
32 |
+
wp_clear_scheduled_hook('newsletter_cron_hook');
|
33 |
+
delete_option('newsletter_batch', array());
|
34 |
+
}
|
35 |
+
|
36 |
+
if (isset($_POST['scheduled_simulate']) && check_admin_referer()) {
|
37 |
+
$options = stripslashes_deep($_POST['options']);
|
38 |
+
update_option('newsletter_email', $options);
|
39 |
+
newsletter_send_scheduled(0, true);
|
40 |
+
}
|
41 |
+
|
42 |
+
if (isset($_POST['scheduled_send']) && check_admin_referer()) {
|
43 |
+
$options = stripslashes_deep($_POST['options']);
|
44 |
+
update_option('newsletter_email', $options);
|
45 |
+
newsletter_send_scheduled(0, false);
|
46 |
+
}
|
47 |
|
48 |
+
if (isset($_POST['restore']) && check_admin_referer()) {
|
49 |
+
$batch = newsletter_load_batch_file();
|
50 |
+
update_option('newsletter_batch', $batch);
|
51 |
+
newsletter_delete_batch_file();
|
52 |
+
}
|
53 |
+
|
54 |
+
// Theme style
|
55 |
+
|
56 |
+
$css_url = null;
|
57 |
+
$theme_dir = newsletter_get_theme_dir($options['theme']);
|
58 |
+
if (file_exists($theme_dir . '/style.css')) {
|
59 |
+
$css_url = newsletter_get_theme_url($options['theme']) . '/style.css';
|
60 |
+
}
|
61 |
+
|
62 |
+
?>
|
63 |
+
<?php if (!isset($options['novisual'])) { ?>
|
64 |
<script type="text/javascript" src="<?php echo get_option('siteurl'); ?>/wp-content/plugins/newsletter/tiny_mce/tiny_mce.js"></script>
|
65 |
<script type="text/javascript">
|
66 |
tinyMCE.init({
|
67 |
mode : "textareas",
|
68 |
theme : "advanced",
|
69 |
+
plugins: "table,fullscreen",
|
70 |
theme_advanced_disable : "styleselect",
|
71 |
+
theme_advanced_buttons1_add: "forecolor,blockquote,code",
|
72 |
+
theme_advanced_buttons3 : "tablecontrols,fullscreen",
|
73 |
relative_urls : false,
|
74 |
remove_script_host : false,
|
75 |
+
theme_advanced_toolbar_location : "top",
|
76 |
document_base_url : "<?php echo get_option('home'); ?>/"
|
77 |
+
<?php
|
78 |
+
if ($css_url != null) {
|
79 |
+
echo ', content_css: "' . $css_url . '?' . time() . '"';
|
80 |
+
}
|
81 |
+
?>
|
82 |
+
});
|
83 |
</script>
|
84 |
+
<?php } ?>
|
85 |
|
86 |
+
<style>
|
87 |
+
#newsletter h3 {
|
88 |
+
margin-bottom: 0px;
|
89 |
+
margin-top: 30px;
|
90 |
+
}
|
91 |
+
#newsletter .form-table {
|
92 |
+
border: 1px solid #ccc;
|
93 |
+
background-color: #ffffff;
|
94 |
+
}
|
95 |
+
</style>
|
96 |
+
|
97 |
+
<div class="wrap" id="newsletter">
|
98 |
+
|
99 |
+
<h2>Newsletter Composer</h2>
|
100 |
+
<?php if (!touch(dirname(__FILE__) . '/test.tmp')) { ?>
|
101 |
+
<div class="error fade" style="background-color:red;"><p><strong>It seems that Newsletter plugin folder is not writable. Make it writable to let
|
102 |
+
Newsletter write logs and save date when errors occour.</strong></p></div>
|
103 |
+
<?php } ?>
|
104 |
+
|
105 |
+
<?php require_once 'header.php'; ?>
|
106 |
+
|
107 |
+
<form method="post" action="">
|
108 |
<?php wp_nonce_field(); ?>
|
109 |
|
110 |
+
<?php if (isset($_POST['restart']) && check_admin_referer()) { ?>
|
111 |
|
112 |
+
<h3>Continuing with previous batch</h3>
|
113 |
+
<div class="form-table">
|
114 |
+
<?php
|
115 |
+
$options = stripslashes_deep($_POST['options']);
|
116 |
+
update_option('newsletter_email', $options);
|
117 |
+
$batch = get_option('newsletter_batch');
|
118 |
+
|
119 |
+
if (defined('NEWSLETTER_EXTRAS') && $batch['scheduled']) {
|
120 |
+
newsletter_cron_task();
|
121 |
+
}
|
122 |
+
else {
|
123 |
+
newsletter_send_batch();
|
124 |
+
}
|
125 |
+
?>
|
126 |
+
</div>
|
127 |
+
|
128 |
+
<?php } ?>
|
129 |
|
|
|
|
|
|
|
|
|
130 |
|
131 |
+
<?php if (isset($_POST['simulate']) && check_admin_referer()) { ?>
|
132 |
+
|
133 |
+
<h3>Simulation</h3>
|
134 |
+
<div class="form-table">
|
135 |
+
<?php
|
136 |
+
$options = stripslashes_deep($_POST['options']);
|
137 |
+
update_option('newsletter_email', $options);
|
138 |
+
$batch = array();
|
139 |
+
$batch['id'] = 0;
|
140 |
+
$batch['list'] = 0;
|
141 |
+
$batch['scheduled'] = false;
|
142 |
+
$batch['simulate'] = true;
|
143 |
+
|
144 |
+
update_option('newsletter_batch', $batch);
|
145 |
+
|
146 |
+
newsletter_send_batch();
|
147 |
+
?>
|
148 |
+
</div>
|
149 |
|
150 |
<?php } ?>
|
151 |
+
|
152 |
+
|
153 |
+
|
154 |
+
<?php if (isset($_REQUEST['send']) && check_admin_referer()) { ?>
|
155 |
+
|
156 |
+
<h3>Sending</h3>
|
157 |
+
<div class="form-table">
|
158 |
+
<?php
|
159 |
+
$options = stripslashes_deep($_POST['options']);
|
160 |
+
update_option('newsletter_email', $options);
|
161 |
+
$batch = array();
|
162 |
+
$batch['id'] = 0;
|
163 |
+
$batch['list'] = 0;
|
164 |
+
$batch['scheduled'] = false;
|
165 |
+
$batch['simulate'] = false;
|
166 |
+
|
167 |
+
update_option('newsletter_batch', $batch);
|
168 |
+
|
169 |
+
newsletter_send_batch();
|
170 |
+
?>
|
171 |
</div>
|
172 |
|
173 |
+
<?php } ?>
|
174 |
+
|
175 |
+
|
176 |
|
177 |
+
<?php if (isset($_POST['test']) && check_admin_referer()) { ?>
|
178 |
|
|
|
|
|
179 |
<h3>Sending to test subscribers</h3>
|
180 |
+
<div class="form-table">
|
181 |
+
<?php
|
182 |
+
$options = stripslashes_deep($_POST['options']);
|
183 |
+
update_option('newsletter_email', $options);
|
184 |
+
$subscribers = array();
|
185 |
+
for ($i=1; $i<=10; $i++) {
|
186 |
+
if (!$options['test_email_' . $i]) continue;
|
|
|
|
|
|
|
|
|
|
|
187 |
$subscribers[$i-1]->name = $options['test_name_' . $i];
|
188 |
$subscribers[$i-1]->email = $options['test_email_' . $i];
|
189 |
$subscribers[$i-1]->token = 'FAKETOKEN';
|
190 |
}
|
191 |
+
newsletter_send_test($subscribers);
|
192 |
+
?>
|
193 |
+
</div>
|
|
|
194 |
|
195 |
+
<?php } ?>
|
196 |
|
197 |
|
|
|
|
|
198 |
|
|
|
|
|
199 |
<?php
|
200 |
+
$batch_file = newsletter_load_batch_file();
|
201 |
+
if ($batch_file != null) {
|
202 |
+
?>
|
203 |
+
<h3>Warning!!!</h3>
|
204 |
+
<p>There is a batch saved to disk. That means an error occurred while sending.
|
205 |
+
Would you try to restore
|
206 |
+
that batch?<br />
|
207 |
+
<input class="button" type="submit" name="restore" value="Restore batch data" onclick="return confirm('Restore batch data?')"/>
|
208 |
+
</p>
|
209 |
+
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
|
211 |
+
<h3>Batch info</h3>
|
212 |
|
213 |
+
<?php $batch = get_option('newsletter_batch'); ?>
|
214 |
+
<?php if (!is_array($batch) || empty($batch)) { ?>
|
215 |
|
216 |
+
<p><strong>No batch info found, it's ok!</strong></p>
|
217 |
|
218 |
+
<?php } else { ?>
|
|
|
219 |
|
220 |
+
<table class="form-table">
|
221 |
+
<tr>
|
222 |
+
<th>Status</th>
|
223 |
+
<td>
|
224 |
+
<?php
|
225 |
+
if ($batch['scheduled']) {
|
226 |
+
|
227 |
+
if ($batch['completed']) echo 'Completed';
|
228 |
+
else {
|
229 |
+
$time = wp_next_scheduled('newsletter_cron_hook');
|
230 |
+
if ($time == 0) {
|
231 |
+
echo 'Not completed but no next run found (errors?)';
|
232 |
+
}
|
233 |
+
else {
|
234 |
+
echo 'Not completed, next run on ' . date('j/m/Y h:i', $time);
|
235 |
+
echo ' (' . ((int)(($time-time())/60)) . ' minutes left)';
|
236 |
+
}
|
237 |
+
}
|
238 |
+
}
|
239 |
+
else {
|
240 |
+
if ($batch['completed']) echo 'Completed';
|
241 |
+
else echo 'Not completed (you should restart it)';
|
242 |
+
}
|
243 |
+
?>
|
244 |
+
<br />
|
245 |
+
<?php echo $batch['message']; ?>
|
246 |
+
</td>
|
247 |
+
</tr>
|
248 |
+
<tr>
|
249 |
+
<th>Emails sent/total</th>
|
250 |
+
<td><?php echo $batch['sent']; ?>/<?php echo $batch['total']; ?> (last id: <?php echo $batch['id']; ?>)</td>
|
251 |
+
</tr>
|
252 |
+
<!--
|
253 |
+
<tr>
|
254 |
+
<td>List</td>
|
255 |
+
<td><?php echo $batch['list']; ?></td>
|
256 |
+
</tr>
|
257 |
+
-->
|
258 |
+
<tr>
|
259 |
+
<th>Sending type</th>
|
260 |
+
<td><?php echo $batch['simulate']?"Simluation":"Real"; ?>/<?php echo $batch['scheduled']?"Scheduled":"Not scheduled"; ?></td>
|
261 |
+
</tr>
|
262 |
+
</table>
|
263 |
+
|
264 |
+
<p class="submit">
|
265 |
+
<?php if (!$batch['completed']) { ?>
|
266 |
+
<input class="button" type="submit" name="restart" value="Restart batch" onclick="return confirm('Continue with this batch?')"/>
|
267 |
+
<?php } ?>
|
268 |
+
<input class="button" type="submit" name="reset" value="Reset batch" onclick="return confirm('Reset the batch status?')"/>
|
269 |
+
</p>
|
270 |
|
271 |
<?php } ?>
|
272 |
|
273 |
+
|
274 |
+
|
275 |
+
|
|
|
|
|
|
|
276 |
|
277 |
|
278 |
<h3>Newsletter message</h3>
|
279 |
+
|
|
|
280 |
<table class="form-table">
|
281 |
+
<?php if (defined('NEWSLETTER_EXTRAS')) { ?>
|
282 |
+
<tr valign="top">
|
283 |
+
<th>Newsletter name</th>
|
284 |
+
<td>
|
285 |
+
<input name="options[name]" type="text" size="20" value="<?php echo htmlspecialchars($options['name'])?>"/>
|
286 |
+
<br />
|
287 |
+
This symbolic name will be used to track the link clicks and associate them to a specific newsletter.
|
288 |
+
Keep the name compact and significative.
|
289 |
+
</td>
|
290 |
+
</tr>
|
291 |
<tr valign="top">
|
292 |
+
<th>Tracking</th>
|
293 |
<td>
|
294 |
+
<input name="options[track]" value="1" type="checkbox" <?php echo $options['track']?'checked':''; ?>/>
|
295 |
+
Track link clicks
|
296 |
+
<br />
|
297 |
+
When this option is enabled, each link in the email text will be rewritten and clicks
|
298 |
+
on them intercepted.
|
299 |
+
</td>
|
300 |
+
</tr>
|
301 |
+
<?php } else { ?>
|
302 |
+
<tr valign="top">
|
303 |
+
<th>Tracking</th>
|
304 |
+
<td>Tracking options available with Newsletter Extras package</td>
|
305 |
+
</tr>
|
306 |
+
<?php } ?>
|
307 |
+
|
308 |
+
<tr valign="top">
|
309 |
+
<th>Subject</th>
|
310 |
+
<td>
|
311 |
+
<input name="options[subject]" type="text" size="70" value="<?php echo htmlspecialchars($options['subject'])?>"/>
|
312 |
<br />
|
313 |
Tags: <strong>{name}</strong> receiver name.
|
314 |
</td>
|
315 |
</tr>
|
316 |
<tr valign="top">
|
317 |
+
<th>Message</th>
|
318 |
<td>
|
319 |
+
<textarea name="options[message]" wrap="off" rows="20" style="font-family: monospace; width: 100%"><?php echo htmlspecialchars($options['message'])?></textarea>
|
|
|
320 |
<br />
|
321 |
+
Tags:
|
322 |
+
<strong>{name}</strong> receiver name;
|
323 |
+
<strong>{unsubscription_url}</strong> unsubscription URL;
|
324 |
+
<strong>{token}</strong> the subscriber token.
|
325 |
+
<pre><?php //echo htmlspecialchars(newsletter_relink($options['message']))?></pre>
|
326 |
</td>
|
327 |
</tr>
|
328 |
<tr valign="top">
|
329 |
+
<th>Disable visual editor</th>
|
330 |
<td>
|
331 |
+
<input name="options[novisual]" value="1" type="checkbox" <?php echo $options['novisual']?'checked':''; ?>/>
|
332 |
+
(save to apply and be sure to <a href="http://www.satollo.net/plugins/newsletter#composer">read here</a>)
|
333 |
+
</td>
|
334 |
+
</tr>
|
335 |
+
<tr valign="top">
|
336 |
+
<th>Theme</th>
|
337 |
+
<td>
|
338 |
+
<select name="options[theme]">
|
339 |
+
<optgroup label="Included themes">
|
340 |
+
<option <?php echo ('blank'==$options['theme'])?'selected':''; ?> value="blank">Blank</option>
|
341 |
+
<option <?php echo ('default'==$options['theme'])?'selected':''; ?> value="default">Default</option>
|
342 |
+
<option <?php echo ('with-picture'==$options['theme'])?'selected':''; ?> value="with-picture">With picture</option>
|
343 |
+
</optgroup>
|
344 |
+
<optgroup label="Extras themes">
|
345 |
+
<?php
|
346 |
+
$themes = newsletter_get_extras_themes();
|
347 |
+
|
348 |
+
foreach ($themes as $theme) {
|
349 |
+
echo '<option ' . (('$'.$theme)==$options['theme']?'selected':'') . ' value="$' . $theme . '">' . $theme . '</option>';
|
350 |
+
}
|
351 |
+
?>
|
352 |
+
</optgroup>
|
353 |
+
<optgroup label="Custom themes">
|
354 |
+
<?php
|
355 |
+
$themes = newsletter_get_themes();
|
356 |
+
|
357 |
+
foreach ($themes as $theme) {
|
358 |
+
echo '<option ' . (('*'.$theme)==$options['theme']?'selected':'') . ' value="*' . $theme . '">' . $theme . '</option>';
|
359 |
+
}
|
360 |
+
?>
|
361 |
+
</optgroup>
|
362 |
+
</select>
|
363 |
+
<input class="button" type="submit" name="auto" value="Auto compose"/>
|
364 |
+
</td>
|
365 |
+
</tr>
|
366 |
+
<tr valign="top">
|
367 |
+
<th>Number of posts on theme</th>
|
368 |
+
<td>
|
369 |
+
<input name="options[theme_posts]" type="text" size="5" value="<?php echo htmlspecialchars($options['theme_posts'])?>"/>
|
370 |
</td>
|
371 |
</tr>
|
372 |
</table>
|
373 |
|
|
|
374 |
<p class="submit">
|
375 |
<input class="button" type="submit" name="save" value="Save"/>
|
376 |
+
<input class="button" type="submit" name="test" value="Test"/>
|
377 |
+
<input class="button" type="submit" name="simulate" value="Simulate" onclick="return confirm('Simulate? The test address will receive all emails!')"/>
|
378 |
+
<input class="button" type="submit" name="send" value="Send" onclick="return confirm('Start a real newsletter sending batch?')"/>
|
379 |
+
<?php if (defined('NEWSLETTER_EXTRAS')) { ?>
|
380 |
+
<input class="button" type="submit" name="scheduled_simulate" value="Scheduled simulation" onclick="return confirm('Start a scheduled simulation?')"/>
|
381 |
+
<input class="button" type="submit" name="scheduled_send" value="Scheduled send" onclick="return confirm('Start a scheduled real send?')"/>
|
382 |
<?php } ?>
|
383 |
+
</p>
|
384 |
|
385 |
|
386 |
+
<h3>Scheduler</h3>
|
387 |
+
<p>Scheduler helps to send out a long list of emails slowly to not overload the server.</p>
|
388 |
+
<?php if (defined('NEWSLETTER_EXTRAS')) { ?>
|
389 |
+
<table class="form-table">
|
390 |
+
<tr valign="top">
|
391 |
+
<th>Interval between sending tasks</th>
|
392 |
+
<td>
|
393 |
+
<input name="options[scheduler_interval]" type="text" size="5" value="<?php echo htmlspecialchars($options['scheduler_interval'])?>"/>
|
394 |
+
(minutes, minimum value is 1)
|
395 |
+
</td>
|
396 |
+
</tr>
|
397 |
+
<tr valign="top">
|
398 |
+
<th>Max number of emails per task</th>
|
399 |
+
<td>
|
400 |
+
<input name="options[scheduler_max]" type="text" size="5" value="<?php echo htmlspecialchars($options['scheduler_max'])?>"/>
|
401 |
+
(good value is 20 to 50)
|
402 |
+
</td>
|
403 |
+
</tr>
|
404 |
+
</table>
|
405 |
+
<p class="submit">
|
406 |
+
<input class="button" type="submit" name="save" value="Save"/>
|
407 |
+
</p>
|
408 |
+
<?php } else { ?>
|
409 |
+
<p><strong>Available only with <a href="http://www.satollo.net/plugins/newsletter#extras">Newsletter Extras</a> package</strong></p>
|
410 |
+
<?php } ?>
|
411 |
|
412 |
+
<!--
|
413 |
+
|
414 |
+
List:
|
415 |
+
<select name="options[list]">
|
416 |
+
<option value="0">General</option>
|
417 |
+
<?php for ($i=1; $i<=10; $i++) { ?>
|
418 |
+
<option value="<?php echo $i; ?>"><?php echo htmlspecialchars($options_newsletter['list_' . $i]); ?></option>
|
419 |
+
<?php } ?>
|
420 |
+
</select>
|
421 |
+
-->
|
422 |
+
|
423 |
+
|
424 |
+
<h3>Sending options</h3>
|
425 |
+
<p>Configuration for not scheduled sending process.</p>
|
426 |
+
<table class="form-table">
|
427 |
+
<tr valign="top">
|
428 |
+
<th>Max emails in a single batch</th>
|
429 |
+
<td>
|
430 |
+
<input name="options[max]" type="text" size="5" value="<?php echo htmlspecialchars($options['max'])?>"/>
|
431 |
+
</td>
|
432 |
+
</tr>
|
433 |
+
<tr valign="top">
|
434 |
+
<th>Receiver address for simulation</th>
|
435 |
+
<td>
|
436 |
+
<input name="options[simulate_email]" type="text" size="40" value="<?php echo htmlspecialchars($options['simulate_email'])?>"/>
|
437 |
+
<br />When you simulate a sending process, emails are really sent but all to this
|
438 |
+
email address. That helps to test out problems with mail server.
|
439 |
+
</td>
|
440 |
+
</tr>
|
441 |
+
|
442 |
+
</table>
|
443 |
+
<p class="submit">
|
444 |
+
<input class="button" type="submit" name="save" value="Save"/>
|
445 |
</p>
|
446 |
+
<!--
|
447 |
+
<tr valign="top">
|
448 |
+
<td>
|
449 |
+
Filter<br />
|
450 |
+
<input name="options[filter]" type="text" size="30" value="<?php echo htmlspecialchars($options['filter'])?>"/>
|
451 |
+
</td>
|
452 |
+
</tr>
|
453 |
+
-->
|
454 |
+
|
455 |
|
456 |
<h3>Test subscribers</h3>
|
457 |
+
<p>
|
458 |
+
Define more test subscriber to see how your email looks on different clients:
|
459 |
+
GMail, Outlook, Thunderbird, Hotmail, ...
|
460 |
+
</p>
|
461 |
|
462 |
<table class="form-table">
|
463 |
<?php for ($i=1; $i<=10; $i++) { ?>
|
464 |
<tr valign="top">
|
465 |
+
<th>Subscriber <?php echo $i; ?></th>
|
466 |
<td>
|
467 |
name: <input name="options[test_name_<?php echo $i; ?>]" type="text" size="30" value="<?php echo htmlspecialchars($options['test_name_' . $i])?>"/>
|
468 |
|
471 |
</tr>
|
472 |
<?php } ?>
|
473 |
</table>
|
474 |
+
<p class="submit">
|
475 |
+
<input class="button" type="submit" name="save" value="Save"/>
|
476 |
+
</p>
|
477 |
|
478 |
+
</form>
|
479 |
</div>
|
options.php
CHANGED
@@ -1,20 +1,23 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
update_option('newsletter', $newsletter_default_options);
|
8 |
}
|
9 |
|
10 |
-
if (isset($_POST['save']))
|
11 |
-
{
|
12 |
$options = newsletter_request('options');
|
13 |
update_option('newsletter', $options);
|
14 |
}
|
15 |
|
16 |
-
$options = get_option('newsletter');
|
17 |
-
|
18 |
?>
|
19 |
|
20 |
<?php if (!$options['novisual']) { ?>
|
@@ -22,209 +25,309 @@ $options = get_option('newsletter');
|
|
22 |
|
23 |
<script type="text/javascript">
|
24 |
tinyMCE.init({
|
25 |
-
mode : "textareas",
|
|
|
|
|
26 |
theme : "advanced",
|
27 |
theme_advanced_disable : "styleselect",
|
28 |
relative_urls : false,
|
29 |
remove_script_host : false,
|
|
|
|
|
30 |
document_base_url : "<?php echo get_option('home'); ?>/"
|
31 |
-
|
32 |
});
|
33 |
</script>
|
34 |
<?php } ?>
|
35 |
|
36 |
-
<
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
</p>
|
57 |
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
<table class="form-table">
|
60 |
<tr valign="top">
|
61 |
-
<th
|
62 |
<td>
|
63 |
<input name="options[from_email]" type="text" size="50" value="<?php echo htmlspecialchars($options['from_email'])?>"/>
|
64 |
<br />
|
65 |
-
Newsletter sender email address: the
|
66 |
</td>
|
67 |
</tr>
|
68 |
<tr valign="top">
|
69 |
-
<th
|
70 |
<td>
|
71 |
<input name="options[from_name]" type="text" size="50" value="<?php echo htmlspecialchars($options['from_name'])?>"/>
|
72 |
<br />
|
73 |
-
The name of the newsletter sender subscribers will see on incoming email.
|
74 |
</td>
|
75 |
</tr>
|
76 |
<tr valign="top">
|
77 |
-
<th
|
78 |
<td>
|
79 |
<input name="options[url]" type="text" size="50" value="<?php echo htmlspecialchars($options['url'])?>"/>
|
80 |
<br />
|
81 |
-
This is the page where you placed the <strong>[newsletter]</strong> short tag.
|
82 |
-
|
83 |
-
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
</td>
|
86 |
</tr>
|
87 |
</table>
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
-
<h3>Subscription form</h3>
|
90 |
-
<p>Remeber to create the subscription page and to configure the subscription page URL above.</p>
|
91 |
|
|
|
92 |
<table class="form-table">
|
93 |
<tr valign="top">
|
94 |
-
<th
|
95 |
<td>
|
96 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
<br />
|
98 |
-
This is the text showed to subscriber before the subscription form which is added automatically.
|
99 |
</td>
|
100 |
</tr>
|
101 |
<tr valign="top">
|
102 |
-
<th
|
103 |
<td>
|
104 |
-
<textarea name="options[subscribed_text]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['subscribed_text'])?></textarea>
|
105 |
<br />
|
106 |
-
This is the text showed to a user who has pressed "subscribe me" on the previous step
|
107 |
-
informing that an email to confirm subscription has just been sent. Remeber the user
|
108 |
-
to check the spam folder and to follow the email instructions.<br />
|
109 |
-
Tags: <strong>{name}</strong> the user name; <strong>{email}</strong> the user email.
|
110 |
</td>
|
111 |
</tr>
|
112 |
</table>
|
113 |
|
114 |
<p class="submit">
|
115 |
-
<input class="button" type="submit" name="save" value="Save"/>
|
116 |
</p>
|
117 |
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
|
|
122 |
<table class="form-table">
|
123 |
<tr valign="top">
|
124 |
-
<th
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
<td>
|
126 |
<input name="options[confirmation_subject]" type="text" size="50" value="<?php echo htmlspecialchars($options['confirmation_subject'])?>"/>
|
127 |
<br />
|
128 |
-
Tags: <strong>{name}</strong> the user name.
|
129 |
</td>
|
130 |
</tr>
|
131 |
<tr valign="top">
|
132 |
-
<th
|
133 |
<td>
|
134 |
-
<textarea name="options[confirmation_message]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['confirmation_message'])?></textarea>
|
135 |
<br />
|
136 |
-
Tags: <strong>{name}</strong> the user name; <strong>{subscription_confirm_url}</strong>
|
137 |
-
confirmation URL to be clicked by the user to confirm his subscription.
|
138 |
</td>
|
139 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
|
|
|
|
|
|
|
|
|
|
|
141 |
<tr valign="top">
|
142 |
-
<th
|
143 |
<td>
|
144 |
-
<textarea name="options[confirmed_text]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['confirmed_text'])?></textarea>
|
145 |
<br />
|
146 |
-
Showed when the user follow the confirmation URL sent to him with previous email settings.
|
147 |
<br />
|
148 |
-
Tags: <strong>{name}</strong> the user name; <strong>{email}</strong> for the user email
|
149 |
</td>
|
150 |
</tr>
|
151 |
|
152 |
<tr valign="top">
|
153 |
-
<th
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
<td>
|
155 |
<input name="options[confirmed_subject]" type="text" size="50" value="<?php echo htmlspecialchars($options['confirmed_subject'])?>"/>
|
156 |
<br />
|
157 |
-
Tags: <strong>{name}</strong> user name.
|
158 |
</td>
|
159 |
</tr>
|
160 |
<tr valign="top">
|
161 |
-
<th
|
162 |
<td>
|
163 |
-
<textarea name="options[confirmed_message]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['confirmed_message'])?></textarea>
|
164 |
<br />
|
165 |
-
Tags: <strong>{name}</strong> user name
|
166 |
</td>
|
167 |
</tr>
|
168 |
</table>
|
169 |
|
170 |
<p class="submit">
|
171 |
-
<input class="button" type="submit" name="save" value="Save"/>
|
172 |
</p>
|
173 |
-
|
174 |
-
<h3>Unsubscription</h3>
|
175 |
|
176 |
-
|
177 |
-
|
178 |
-
|
|
|
|
|
179 |
|
180 |
<table class="form-table">
|
181 |
<tr valign="top">
|
182 |
-
<th
|
183 |
<td>
|
184 |
-
<textarea name="options[unsubscription_text]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['unsubscription_text'])?></textarea>
|
185 |
<br />
|
186 |
-
This text is show to users who click on a "unsubscription link" in a newsletter email.
|
187 |
-
You have to insert a link in the text that user can follow to confirm the unsubscription
|
188 |
-
request (see tags).
|
189 |
<br />
|
190 |
-
Tags: <strong>{name}</strong> user name; <strong>{email}</strong> user email; <strong>{unsubscription_confirm_url}</strong> URL to confirm unsubscription.
|
191 |
</td>
|
192 |
</tr>
|
193 |
|
194 |
<!-- Text showed to the user on successful unsubscription -->
|
195 |
<tr valign="top">
|
196 |
-
<th
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
<td>
|
198 |
-
<textarea name="options[
|
199 |
-
Latest message showed to the user to say "good bye".
|
200 |
<br />
|
201 |
-
Tags:
|
202 |
</td>
|
203 |
</tr>
|
204 |
</table>
|
205 |
|
|
|
|
|
|
|
|
|
206 |
<!--
|
207 |
-
<h2
|
208 |
-
<p
|
209 |
|
210 |
<table class="form-table">
|
211 |
<tr valign="top">
|
212 |
-
<th
|
213 |
<td>
|
214 |
<textarea name="options[unsubscription_mm_text]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['unsubscription_mm_text'])?></textarea>
|
215 |
</td>
|
216 |
</tr>
|
217 |
|
218 |
<tr valign="top">
|
219 |
-
<th
|
220 |
<td>
|
221 |
<input name="options[unsubscription_mm_error]" type="text" size="50" value="<?php echo htmlspecialchars($options['unsubscription_mm_error'])?>"/>
|
222 |
<br />
|
223 |
-
Shown with the unsubscription message then the email to unsubscribe is not found.
|
224 |
</td>
|
225 |
</tr>
|
226 |
<tr valign="top">
|
227 |
-
<th
|
228 |
<td>
|
229 |
<input name="options[unsubscription_mm_email_label]" type="text" size="50" value="<?php echo htmlspecialchars($options['unsubscription_mm_email_label'])?>"/>
|
230 |
<br />
|
@@ -232,118 +335,159 @@ Used when the newsletter is sent with "mass mail" mode.
|
|
232 |
</td>
|
233 |
</tr>
|
234 |
<tr valign="top">
|
235 |
-
<th
|
236 |
<td>
|
237 |
<input name="options[unsubscription_mm_label]" type="text" size="50" value="<?php echo htmlspecialchars($options['unsubscription_mm_label'])?>"/>
|
238 |
<br />
|
239 |
-
The button text to confirm unsubscription or to send an unsubscription request for the specified
|
240 |
-
email address when "mass mail" mode is used for sending newsletters.
|
241 |
</td>
|
242 |
</tr>
|
243 |
<tr valign="top">
|
244 |
-
<th
|
245 |
<td>
|
246 |
<textarea name="options[unsubscription_mm_end_text]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['unsubscription_mm_end_text'])?></textarea>
|
247 |
<br />
|
248 |
-
This text is shown when a user type in an email to be removed and the confirmation email
|
249 |
-
has been sent.
|
250 |
</td>
|
251 |
</tr>
|
252 |
|
253 |
<tr valign="top">
|
254 |
-
<th
|
255 |
<td>
|
256 |
<input name="options[unsubscription_subject]" type="text" size="50" value="<?php echo htmlspecialchars($options['unsubscription_subject'])?>"/>
|
257 |
</td>
|
258 |
-
</tr>
|
259 |
<tr valign="top">
|
260 |
-
<th
|
261 |
<td>
|
262 |
<textarea name="options[unsubscription_message]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['unsubscription_message'])?></textarea>
|
263 |
<br />
|
264 |
-
Email sent to confirm unsubscription when the request is made specifying an email
|
265 |
-
address to remove. Use {unsubscription_link} to place the link where the user has
|
266 |
-
to click on; use {unsubscription_url} toplace the plain unsubscription URL.
|
267 |
</td>
|
268 |
-
</tr>
|
269 |
<tr valign="top">
|
270 |
-
<th
|
271 |
<td>
|
272 |
<input name="options[unsubscription_link]" type="text" size="50" value="<?php echo htmlspecialchars($options['unsubscription_link'])?>"/>
|
273 |
<br />
|
274 |
-
The text of the link for unsubscription to be placed in the unsubscription email.
|
275 |
</td>
|
276 |
-
</tr>
|
277 |
</table>
|
278 |
-->
|
279 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
|
281 |
<table class="form-table">
|
282 |
<tr valign="top">
|
283 |
-
<th
|
284 |
<td>
|
285 |
-
<input type="checkbox" name="options[
|
286 |
-
|
287 |
</td>
|
288 |
</tr>
|
289 |
<tr valign="top">
|
290 |
-
<th
|
291 |
<td>
|
292 |
-
<
|
293 |
-
|
|
|
|
|
|
|
|
|
294 |
</td>
|
295 |
</tr>
|
296 |
<tr valign="top">
|
297 |
-
<th
|
298 |
<td>
|
299 |
<input type="checkbox" name="options[novisual]" value="1" <?php echo $options['novisual']!= null?'checked':''; ?> />
|
300 |
-
<label for="options[novisual]"
|
301 |
</td>
|
302 |
</tr>
|
303 |
<tr valign="top">
|
304 |
-
<th
|
305 |
<td>
|
306 |
<input type="checkbox" name="options[editor]" value="1" <?php echo $options['editor']!= null?'checked':''; ?> />
|
307 |
-
<label for="options[editor]"
|
308 |
</td>
|
309 |
</tr>
|
310 |
</table>
|
|
|
|
|
|
|
311 |
|
312 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
|
|
|
|
|
|
|
314 |
<table class="form-table">
|
315 |
<tr valign="top">
|
316 |
-
<th
|
317 |
<td>
|
318 |
<input name="options[key]" type="text" size="50" value="<?php echo htmlspecialchars($options['key'])?>"/>
|
319 |
<br />
|
320 |
-
Do not search for Zanzara, is a my private software
|
321 |
</td>
|
322 |
</tr>
|
323 |
<tr>
|
324 |
-
<th
|
325 |
<td>
|
326 |
<input name="options[smtp_host]" type="text" size="50" value="<?php echo htmlspecialchars($options['smtp_host'])?>"/>
|
327 |
</td>
|
328 |
</tr>
|
329 |
<tr>
|
330 |
-
<th
|
331 |
<td>
|
332 |
<input name="options[smtp_user]" type="text" size="50" value="<?php echo htmlspecialchars($options['smtp_user'])?>"/>
|
333 |
</td>
|
334 |
</tr>
|
335 |
<tr>
|
336 |
-
<th
|
337 |
<td>
|
338 |
<input name="options[smtp_password]" type="text" size="50" value="<?php echo htmlspecialchars($options['smtp_password'])?>"/>
|
339 |
</td>
|
340 |
</tr>
|
341 |
-
|
342 |
|
343 |
<p class="submit">
|
344 |
-
<input class="button" type="submit" name="save" value="Save"/>
|
345 |
-
<input class="button" type="submit" name="defaults" value="Revert to defaults"/>
|
346 |
</p>
|
347 |
-
|
348 |
|
|
|
349 |
</div>
|
1 |
<?php
|
2 |
|
3 |
+
$options = get_option('newsletter');
|
4 |
+
|
5 |
+
if (!isset($options['no_translation'])) {
|
6 |
+
$plugin_dir = basename(dirname(__FILE__));
|
7 |
+
load_plugin_textdomain('newsletter', 'wp-content/plugins/' . $plugin_dir . '/languages/');
|
8 |
+
}
|
9 |
+
|
10 |
+
if (isset($_POST['defaults'])) {
|
11 |
+
@include(dirname(__FILE__) . '/languages/en_US_options.php');
|
12 |
+
if (WPLANG != '') @include(dirname(__FILE__) . '/languages/' . WPLANG . '_options.php');
|
13 |
update_option('newsletter', $newsletter_default_options);
|
14 |
}
|
15 |
|
16 |
+
if (isset($_POST['save'])) {
|
|
|
17 |
$options = newsletter_request('options');
|
18 |
update_option('newsletter', $options);
|
19 |
}
|
20 |
|
|
|
|
|
21 |
?>
|
22 |
|
23 |
<?php if (!$options['novisual']) { ?>
|
25 |
|
26 |
<script type="text/javascript">
|
27 |
tinyMCE.init({
|
28 |
+
//mode : "textareas",
|
29 |
+
mode : "specific_textareas",
|
30 |
+
editor_selector : "visual",
|
31 |
theme : "advanced",
|
32 |
theme_advanced_disable : "styleselect",
|
33 |
relative_urls : false,
|
34 |
remove_script_host : false,
|
35 |
+
theme_advanced_buttons3: "",
|
36 |
+
theme_advanced_toolbar_location : "top",
|
37 |
document_base_url : "<?php echo get_option('home'); ?>/"
|
|
|
38 |
});
|
39 |
</script>
|
40 |
<?php } ?>
|
41 |
|
42 |
+
<style>
|
43 |
+
#newsletter h3 {
|
44 |
+
margin-bottom: 0px;
|
45 |
+
margin-top: 30px;
|
46 |
+
}
|
47 |
+
#newsletter h4 {
|
48 |
+
font-size: 1.3em;
|
49 |
+
border-bottom: 1px solid #999;
|
50 |
+
}
|
51 |
+
#newsletter .form-table {
|
52 |
+
border: 1px solid #999;
|
53 |
+
background-color: #fff;
|
54 |
+
}
|
55 |
+
</style>
|
56 |
+
|
57 |
+
<div class="wrap" id="newsletter">
|
58 |
+
|
59 |
+
<h2><?php _e('Newsletter', 'newsletter'); ?></h2>
|
60 |
+
|
61 |
+
<?php require_once 'header.php'; ?>
|
|
|
62 |
|
63 |
+
<p>
|
64 |
+
<?php _e('Questions, help, critiques and whatever else <a target="_blank" href="http://www.satollo.net/plugins/newsletter">click here</a>!', 'newsletter'); ?>
|
65 |
+
</p>
|
66 |
+
|
67 |
+
<form method="post" action="">
|
68 |
+
<input type="hidden" value="<?php echo NEWSLETTER; ?>" name="version"/>
|
69 |
+
|
70 |
+
|
71 |
+
<h3><?php _e('Sender and subscription page', 'newsletter'); ?></h3>
|
72 |
<table class="form-table">
|
73 |
<tr valign="top">
|
74 |
+
<th><?php _e('Sender email', 'newsletter'); ?></label></th>
|
75 |
<td>
|
76 |
<input name="options[from_email]" type="text" size="50" value="<?php echo htmlspecialchars($options['from_email'])?>"/>
|
77 |
<br />
|
78 |
+
<?php _e('Newsletter sender email address: the address subscribers will see the newsletters coming from.', 'newsletter'); ?>
|
79 |
</td>
|
80 |
</tr>
|
81 |
<tr valign="top">
|
82 |
+
<th><?php _e('Sender name', 'newsletter'); ?></th>
|
83 |
<td>
|
84 |
<input name="options[from_name]" type="text" size="50" value="<?php echo htmlspecialchars($options['from_name'])?>"/>
|
85 |
<br />
|
86 |
+
<?php _e('The name of the newsletter sender subscribers will see on incoming email.', 'newsletter'); ?>
|
87 |
</td>
|
88 |
</tr>
|
89 |
<tr valign="top">
|
90 |
+
<th><?php _e('Subscription page URL', 'newsletter'); ?></th>
|
91 |
<td>
|
92 |
<input name="options[url]" type="text" size="50" value="<?php echo htmlspecialchars($options['url'])?>"/>
|
93 |
<br />
|
94 |
+
<?php _e('This is the page where you placed the <strong>[newsletter]</strong> short tag.','newsletter'); ?>
|
95 |
+
(<a href="http://www.satollo.net/plugins/newsletter"><?php _e('Read more on plugin official page', 'newsletter'); ?></a>)
|
96 |
+
</td>
|
97 |
+
</tr>
|
98 |
+
<tr valign="top">
|
99 |
+
<th>Theme to use for messages</th>
|
100 |
+
<td>
|
101 |
+
<select name="options[theme]">
|
102 |
+
<optgroup label="Included themes">
|
103 |
+
<option <?php echo ('blank'==$options['theme'])?'selected':''; ?> value="blank">Blank</option>
|
104 |
+
<option <?php echo ('messages'==$options['theme'])?'selected':''; ?> value="messages">For messages</option>
|
105 |
+
</optgroup>
|
106 |
+
<optgroup label="Extras themes">
|
107 |
+
<?php
|
108 |
+
$themes = newsletter_get_extras_themes();
|
109 |
+
|
110 |
+
foreach ($themes as $theme) {
|
111 |
+
echo '<option ' . (('$'.$theme)==$options['theme']?'selected':'') . ' value="$' . $theme . '">' . $theme . '</option>';
|
112 |
+
}
|
113 |
+
?>
|
114 |
+
</optgroup>
|
115 |
+
<optgroup label="Custom themes">
|
116 |
+
<?php
|
117 |
+
$themes = newsletter_get_themes();
|
118 |
+
|
119 |
+
foreach ($themes as $theme) {
|
120 |
+
echo '<option ' . (('*'.$theme)==$options['theme']?'selected':'') . ' value="*' . $theme . '">' . $theme . '</option>';
|
121 |
+
}
|
122 |
+
?>
|
123 |
+
</optgroup>
|
124 |
+
</select>
|
125 |
+
<br />
|
126 |
+
Selected theme has to be one with {message} tag inside, tag that will be replaced
|
127 |
+
with messages. Use the blank theme to send messages as you see them in the editor.
|
128 |
</td>
|
129 |
</tr>
|
130 |
</table>
|
131 |
+
<p class="submit">
|
132 |
+
<input class="button" type="submit" name="save" value="<?php _e('Save','newsletter'); ?>"/>
|
133 |
+
</p>
|
134 |
+
|
135 |
+
|
136 |
|
|
|
|
|
137 |
|
138 |
+
<h3><?php _e('Subscription form', 'newsletter'); ?></h3>
|
139 |
<table class="form-table">
|
140 |
<tr valign="top">
|
141 |
+
<th> </th>
|
142 |
<td>
|
143 |
+
<input type="checkbox" name="options[noname]" value="1" <?php echo isset($options['noname'])?'checked':''; ?> />
|
144 |
+
<?php _e('Do not ask the user name, only email.', 'newsletter'); ?>
|
145 |
+
</td>
|
146 |
+
</tr>
|
147 |
+
<tr valign="top">
|
148 |
+
<th><?php _e('Subscription form page', 'newsletter'); ?></th>
|
149 |
+
<td>
|
150 |
+
<textarea class="visual" id="subscription_text" name="options[subscription_text]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['subscription_text'])?></textarea>
|
151 |
<br />
|
152 |
+
<?php _e('This is the text showed to subscriber before the subscription form which is added automatically.', 'newsletter'); ?>
|
153 |
</td>
|
154 |
</tr>
|
155 |
<tr valign="top">
|
156 |
+
<th><?php _e('Successfully subscription page', 'newsletter'); ?></th>
|
157 |
<td>
|
158 |
+
<textarea class="visual" name="options[subscribed_text]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['subscribed_text'])?></textarea>
|
159 |
<br />
|
160 |
+
<?php _e('This is the text showed to a user who has pressed "subscribe me" on the previous step informing that an email to confirm subscription has just been sent. Remeber the user to check the spam folder and to follow the email instructions.<br />Tags: <strong>{name}</strong> the user name; <strong>{email}</strong> the user email.', 'newsletter'); ?>
|
|
|
|
|
|
|
161 |
</td>
|
162 |
</tr>
|
163 |
</table>
|
164 |
|
165 |
<p class="submit">
|
166 |
+
<input class="button" type="submit" name="save" value="<?php _e('Save','newsletter'); ?>"/>
|
167 |
</p>
|
168 |
|
169 |
+
|
170 |
+
|
171 |
+
<h3><?php _e('Confirmation', 'newsletter'); ?> (<?php _e('double opt-in', 'newsletter'); ?>)</h3>
|
172 |
+
|
173 |
+
<p><?php _e('Email sent to the user to confirm his subscription, the successful confirmation page, the welcome email.', 'newsletter'); ?></p>
|
174 |
+
|
175 |
<table class="form-table">
|
176 |
<tr valign="top">
|
177 |
+
<th> </th>
|
178 |
+
<td>
|
179 |
+
<input type="checkbox" name="options[noconfirmation]" value="1" <?php echo isset($options['noconfirmation'])?'checked':''; ?> />
|
180 |
+
<?php _e('Do not use double opt-in. If checked the subscription is direct, so subscribers will be immediately confirmed and will receive the welcome email.', 'newsletter'); ?>
|
181 |
+
</td>
|
182 |
+
</tr>
|
183 |
+
<tr valign="top">
|
184 |
+
<th><label for="options[confirmation_subject]"><?php _e('Confirmation email subject', 'newsletter'); ?></label></th>
|
185 |
<td>
|
186 |
<input name="options[confirmation_subject]" type="text" size="50" value="<?php echo htmlspecialchars($options['confirmation_subject'])?>"/>
|
187 |
<br />
|
188 |
+
<?php _e('Tags: <strong>{name}</strong> the user name.', 'newsletter'); ?>
|
189 |
</td>
|
190 |
</tr>
|
191 |
<tr valign="top">
|
192 |
+
<th><label for="options[confirmation_message]"><?php _e('Confirmation email message', 'newsletter'); ?></label></th>
|
193 |
<td>
|
194 |
+
<textarea class="visual" name="options[confirmation_message]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['confirmation_message'])?></textarea>
|
195 |
<br />
|
196 |
+
<?php _e('Tags: <strong>{name}</strong> the user name; <strong>{subscription_confirm_url}</strong>confirmation URL to be clicked by the user to confirm his subscription.', 'newsletter'); ?>
|
|
|
197 |
</td>
|
198 |
</tr>
|
199 |
+
</table>
|
200 |
+
|
201 |
+
<p class="submit">
|
202 |
+
<input class="button" type="submit" name="save" value="<?php _e('Save', 'newsletter'); ?>"/>
|
203 |
+
</p>
|
204 |
+
|
205 |
+
|
206 |
|
207 |
+
<h3><?php _e('Welcome message', 'newsletter'); ?></h3>
|
208 |
+
|
209 |
+
<p><?php _e('Users jump directly to this step if you disabled the double opt-in step.', 'newsletter'); ?></p>
|
210 |
+
|
211 |
+
<table class="form-table">
|
212 |
<tr valign="top">
|
213 |
+
<th><label for="options[confirmed_text]"><?php _e('Successful confirmation page', 'newsletter'); ?></label></th>
|
214 |
<td>
|
215 |
+
<textarea class="visual" name="options[confirmed_text]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['confirmed_text'])?></textarea>
|
216 |
<br />
|
217 |
+
<?php _e('Showed when the user follow the confirmation URL sent to him with previous email settings or if signed up directly with no double opt-in process.', 'newsletter'); ?>
|
218 |
<br />
|
219 |
+
<?php _e('Tags: <strong>{name}</strong> the user name; <strong>{email}</strong> for the user email; <strong>{token}</strong> the subscriber unique token', 'newsletter'); ?>
|
220 |
</td>
|
221 |
</tr>
|
222 |
|
223 |
<tr valign="top">
|
224 |
+
<th><?php _e('Conversion tracking code', 'newsletter'); ?></th>
|
225 |
+
<td>
|
226 |
+
<?php if (newsletter_has_extras()) { ?>
|
227 |
+
<textarea name="options[confirmed_tracking]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['confirmed_tracking'])?></textarea>
|
228 |
+
<?php } else { ?>
|
229 |
+
<p><strong><?php _e('Available with Newsletter Extras package', 'newsletter'); ?></strong></p>
|
230 |
+
<?php } ?>
|
231 |
+
<br />
|
232 |
+
<?php _e('That code is injected AS-IS in welcome page and can be used to track conversion (you can use PHP if needed). Conversion code is usually supply by tracking services, like Google AdWords, Google Analytics and so on.', 'newsletter'); ?>
|
233 |
+
</td>
|
234 |
+
</tr>
|
235 |
+
<tr valign="top"><td colspan="2"><h4><?php _e('Welcome email', 'newsletter'); ?></h4></td></tr>
|
236 |
+
<tr valign="top">
|
237 |
+
<th><?php _e('Welcome email subject', 'newsletter'); ?></th>
|
238 |
<td>
|
239 |
<input name="options[confirmed_subject]" type="text" size="50" value="<?php echo htmlspecialchars($options['confirmed_subject'])?>"/>
|
240 |
<br />
|
241 |
+
<?php _e('Tags: <strong>{name}</strong> user name.', 'newsletter'); ?>
|
242 |
</td>
|
243 |
</tr>
|
244 |
<tr valign="top">
|
245 |
+
<th><label><?php _e('Welcome email message', 'newsletter'); ?></label></th>
|
246 |
<td>
|
247 |
+
<textarea class="visual" name="options[confirmed_message]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['confirmed_message'])?></textarea>
|
248 |
<br />
|
249 |
+
<?php _e('Tags: <strong>{name}</strong> user name; <strong>{token}</strong> the subscriber unique token', 'newsletter'); ?>
|
250 |
</td>
|
251 |
</tr>
|
252 |
</table>
|
253 |
|
254 |
<p class="submit">
|
255 |
+
<input class="button" type="submit" name="save" value="<?php _e('Save', 'newsletter'); ?>"/>
|
256 |
</p>
|
|
|
|
|
257 |
|
258 |
+
|
259 |
+
|
260 |
+
<h3><?php _e('Unsubscription', 'newsletter'); ?></h3>
|
261 |
+
|
262 |
+
<p><?php _e('A user starts the unsubscription process clicking the unsubscription link in a newsletter. This lkink contains the email to unsubscribe and some unique information to avoid hacking. The user are requird to confirm the unsubscription: this is the last step where YOU can communicate with you almost missed user.', 'newsletter'); ?></p>
|
263 |
|
264 |
<table class="form-table">
|
265 |
<tr valign="top">
|
266 |
+
<th><label for="options[unsubscription_text]"><?php _e('Unsubscription text', 'newsletter'); ?></label></th>
|
267 |
<td>
|
268 |
+
<textarea class="visual" name="options[unsubscription_text]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['unsubscription_text'])?></textarea>
|
269 |
<br />
|
270 |
+
<?php _e('This text is show to users who click on a "unsubscription link" in a newsletter email. You have to insert a link in the text that user can follow to confirm the unsubscription request (see tags).', 'newsletter'); ?>
|
|
|
|
|
271 |
<br />
|
272 |
+
<?php _e('Tags: <strong>{name}</strong> user name; <strong>{email}</strong> user email; <strong>{unsubscription_confirm_url}</strong> URL to confirm unsubscription.', 'newsletter'); ?>
|
273 |
</td>
|
274 |
</tr>
|
275 |
|
276 |
<!-- Text showed to the user on successful unsubscription -->
|
277 |
<tr valign="top">
|
278 |
+
<th><label for="options[unsubscribed_text]"><?php _e('Good bye text', 'newsletter'); ?></label></th>
|
279 |
+
<td>
|
280 |
+
<textarea class="visual" name="options[unsubscribed_text]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['unsubscribed_text'])?></textarea><br />
|
281 |
+
<?php _e('Latest message showed to the user to say "good bye".', 'newsletter'); ?>
|
282 |
+
<br />
|
283 |
+
<?php _e('Tags: none.', 'newsletter'); ?>
|
284 |
+
</td>
|
285 |
+
</tr>
|
286 |
+
|
287 |
+
<tr valign="top">
|
288 |
+
<th><label><?php _e('Goodbye email subject', 'newsletter'); ?></label></th>
|
289 |
+
<td>
|
290 |
+
<input name="options[unsubscribed_subject]" type="text" size="50" value="<?php echo htmlspecialchars($options['unsubscribed_subject'])?>"/>
|
291 |
+
<br />
|
292 |
+
<?php _e('Tags: <strong>{name}</strong> user name.', 'newsletter'); ?>
|
293 |
+
</td>
|
294 |
+
</tr>
|
295 |
+
<tr valign="top">
|
296 |
+
<th><label><?php _e('Goodbye email message', 'newsletter'); ?></label></th>
|
297 |
<td>
|
298 |
+
<textarea class="visual" name="options[unsubscribed_message]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['unsubscribed_message'])?></textarea>
|
|
|
299 |
<br />
|
300 |
+
<?php _e('Tags: <strong>{name}</strong> user name.', 'newsletter'); ?>
|
301 |
</td>
|
302 |
</tr>
|
303 |
</table>
|
304 |
|
305 |
+
<p class="submit">
|
306 |
+
<input class="button" type="submit" name="save" value="<?php _e('Save', 'newsletter'); ?>"/>
|
307 |
+
</p>
|
308 |
+
|
309 |
<!--
|
310 |
+
<h2><?php _e('Unsubscription for mass mail mode', 'newsletter'); ?></h2>
|
311 |
+
<p><?php _e('This section is not working!', 'newsletter'); ?></p>
|
312 |
|
313 |
<table class="form-table">
|
314 |
<tr valign="top">
|
315 |
+
<th><label><?php _e('Unsubscription text', 'newsletter'); ?></label></th>
|
316 |
<td>
|
317 |
<textarea name="options[unsubscription_mm_text]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['unsubscription_mm_text'])?></textarea>
|
318 |
</td>
|
319 |
</tr>
|
320 |
|
321 |
<tr valign="top">
|
322 |
+
<th><label><?php _e('Unsubscription error', 'newsletter'); ?></label></th>
|
323 |
<td>
|
324 |
<input name="options[unsubscription_mm_error]" type="text" size="50" value="<?php echo htmlspecialchars($options['unsubscription_mm_error'])?>"/>
|
325 |
<br />
|
326 |
+
<?php _e('Shown with the unsubscription message then the email to unsubscribe is not found.', 'newsletter'); ?>
|
327 |
</td>
|
328 |
</tr>
|
329 |
<tr valign="top">
|
330 |
+
<th><label><?php _e('"Email to unsubscribe" label', 'newsletter'); ?></label></th>
|
331 |
<td>
|
332 |
<input name="options[unsubscription_mm_email_label]" type="text" size="50" value="<?php echo htmlspecialchars($options['unsubscription_mm_email_label'])?>"/>
|
333 |
<br />
|
335 |
</td>
|
336 |
</tr>
|
337 |
<tr valign="top">
|
338 |
+
<th><label><?php _e('"Confirm unsubscription" label', 'newsletter'); ?></label></th>
|
339 |
<td>
|
340 |
<input name="options[unsubscription_mm_label]" type="text" size="50" value="<?php echo htmlspecialchars($options['unsubscription_mm_label'])?>"/>
|
341 |
<br />
|
342 |
+
<?php _e('The button text to confirm unsubscription or to send an unsubscription request for the specified email address when "mass mail" mode is used for sending newsletters.', 'newsletter'); ?>
|
|
|
343 |
</td>
|
344 |
</tr>
|
345 |
<tr valign="top">
|
346 |
+
<th><label><?php _e('Unsubscription end text', 'newsletter'); ?></label></th>
|
347 |
<td>
|
348 |
<textarea name="options[unsubscription_mm_end_text]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['unsubscription_mm_end_text'])?></textarea>
|
349 |
<br />
|
350 |
+
<?php _e('This text is shown when a user type in an email to be removed and the confirmation email has been sent.', 'newsletter'); ?>
|
|
|
351 |
</td>
|
352 |
</tr>
|
353 |
|
354 |
<tr valign="top">
|
355 |
+
<th><label for="options[unsubscription_subject]"><?php _e('Unsubscription email subject', 'newsletter'); ?></label></th>
|
356 |
<td>
|
357 |
<input name="options[unsubscription_subject]" type="text" size="50" value="<?php echo htmlspecialchars($options['unsubscription_subject'])?>"/>
|
358 |
</td>
|
359 |
+
</tr>
|
360 |
<tr valign="top">
|
361 |
+
<th><label for="options[unsubscription_message]"><?php _e('Unsubscription email message', 'newsletter'); ?></label></th>
|
362 |
<td>
|
363 |
<textarea name="options[unsubscription_message]" wrap="off" rows="5" cols="75"><?php echo htmlspecialchars($options['unsubscription_message'])?></textarea>
|
364 |
<br />
|
365 |
+
<?php _e('Email sent to confirm unsubscription when the request is made specifying an email address to remove. Use {unsubscription_link} to place the link where the user has to click on; use {unsubscription_url} toplace the plain unsubscription URL.', 'newsletter'); ?>
|
|
|
|
|
366 |
</td>
|
367 |
+
</tr>
|
368 |
<tr valign="top">
|
369 |
+
<th><label for="options[unsubscription_link]"><?php _e('Unsubscription link text', 'newsletter'); ?></label></th>
|
370 |
<td>
|
371 |
<input name="options[unsubscription_link]" type="text" size="50" value="<?php echo htmlspecialchars($options['unsubscription_link'])?>"/>
|
372 |
<br />
|
373 |
+
<?php _e('The text of the link for unsubscription to be placed in the unsubscription email.', 'newsletter'); ?>
|
374 |
</td>
|
375 |
+
</tr>
|
376 |
</table>
|
377 |
-->
|
378 |
+
<!--
|
379 |
+
<h2><?php _e('Lists', 'newsletter'); ?></h2>
|
380 |
+
<table class="form-table">
|
381 |
+
<tr valign="top">
|
382 |
+
<th> </th>
|
383 |
+
<td>
|
384 |
+
<?php _e('List 0 is the general one', 'newsletter'); ?><br />
|
385 |
+
<?php for ($i=1; $i<=10; $i++) { ?>
|
386 |
+
<?php _e('List', 'newsletter'); ?> <?php echo $i; ?> <input name="options[list_<?php echo $i; ?>]" type="text" size="50" value="<?php echo htmlspecialchars($options['list_' . $i])?>"/>
|
387 |
+
<br />
|
388 |
+
<?php } ?>
|
389 |
+
|
390 |
+
</td>
|
391 |
+
</tr>
|
392 |
+
</table>
|
393 |
+
-->
|
394 |
+
|
395 |
+
<h3><?php _e('Advanced', 'newsletter'); ?></h3>
|
396 |
|
397 |
<table class="form-table">
|
398 |
<tr valign="top">
|
399 |
+
<th> </th>
|
400 |
<td>
|
401 |
+
<input type="checkbox" name="options[no_translation]" value="1" <?php echo $options['no_translation']!= null?'checked':''; ?> />
|
402 |
+
Show always in original english
|
403 |
</td>
|
404 |
</tr>
|
405 |
<tr valign="top">
|
406 |
+
<th>Logging</th>
|
407 |
<td>
|
408 |
+
<select name="options[logs]">
|
409 |
+
<option <?php echo (0==$options['logs'])?'selected':''; ?> value="0">None</option>
|
410 |
+
<option <?php echo (1==$options['logs'])?'selected':''; ?> value="1">Normal</option>
|
411 |
+
<option <?php echo (2==$options['logs'])?'selected':''; ?> value="2">Debug</option>
|
412 |
+
</select>
|
413 |
+
(debug level saves user data on file system, use only to debug problems)
|
414 |
</td>
|
415 |
</tr>
|
416 |
<tr valign="top">
|
417 |
+
<th> </th>
|
418 |
<td>
|
419 |
<input type="checkbox" name="options[novisual]" value="1" <?php echo $options['novisual']!= null?'checked':''; ?> />
|
420 |
+
<label for="options[novisual]"><?php _e('do not use visual editors', 'newsletter'); ?></label>
|
421 |
</td>
|
422 |
</tr>
|
423 |
<tr valign="top">
|
424 |
+
<th> </th>
|
425 |
<td>
|
426 |
<input type="checkbox" name="options[editor]" value="1" <?php echo $options['editor']!= null?'checked':''; ?> />
|
427 |
+
<label for="options[editor]"><?php _e('allow editors to user the newsletter plugin', 'newsletter'); ?></label>
|
428 |
</td>
|
429 |
</tr>
|
430 |
</table>
|
431 |
+
<p class="submit">
|
432 |
+
<input class="button" type="submit" name="save" value="<?php _e('Save', 'newsletter'); ?>"/>
|
433 |
+
</p>
|
434 |
|
435 |
+
<!--
|
436 |
+
<h2><?php _e('Really advanced options', 'newsletter'); ?></h2>
|
437 |
+
|
438 |
+
<table class="form-table">
|
439 |
+
<tr valign="top">
|
440 |
+
<th> </th>
|
441 |
+
<td>
|
442 |
+
<input type="checkbox" name="options[subscription_form_enabled]" value="1" <?php echo $options['subscription_form_enabled']!= null?'checked':''; ?> />
|
443 |
+
<label for="options[subscription_form]"><?php _e('Use the custom subscription form below', 'newsletter'); ?></label>
|
444 |
+
<br />
|
445 |
+
<textarea cols="75" rows="5" name="options[subscription_form]"><?php echo htmlspecialchars($options['subscription_form'])?></textarea>
|
446 |
+
</td>
|
447 |
+
</tr>
|
448 |
+
</table>
|
449 |
+
<p class="submit">
|
450 |
+
<input class="button" type="submit" name="save" value="<?php _e('Save', 'newsletter'); ?>"/>
|
451 |
+
</p>
|
452 |
+
-->
|
453 |
|
454 |
+
<!--
|
455 |
+
<h2><?php _e('Zanzara client', 'newsletter'); ?></h2>
|
456 |
+
<p><?php _e('Obsolete', 'newsletter'); ?></p>
|
457 |
<table class="form-table">
|
458 |
<tr valign="top">
|
459 |
+
<th><label><?php _e('Export key', 'newsletter'); ?></label></th>
|
460 |
<td>
|
461 |
<input name="options[key]" type="text" size="50" value="<?php echo htmlspecialchars($options['key'])?>"/>
|
462 |
<br />
|
463 |
+
<?php _e('Do not search for Zanzara, is a my private software', 'newsletter'); ?>
|
464 |
</td>
|
465 |
</tr>
|
466 |
<tr>
|
467 |
+
<th><label><?php _e('SMTP address', 'newsletter'); ?></label></th>
|
468 |
<td>
|
469 |
<input name="options[smtp_host]" type="text" size="50" value="<?php echo htmlspecialchars($options['smtp_host'])?>"/>
|
470 |
</td>
|
471 |
</tr>
|
472 |
<tr>
|
473 |
+
<th><label><?php _e('SMTP user', 'newsletter'); ?></label></th>
|
474 |
<td>
|
475 |
<input name="options[smtp_user]" type="text" size="50" value="<?php echo htmlspecialchars($options['smtp_user'])?>"/>
|
476 |
</td>
|
477 |
</tr>
|
478 |
<tr>
|
479 |
+
<th><label><?php _e('SMTP password', 'newsletter'); ?></label></th>
|
480 |
<td>
|
481 |
<input name="options[smtp_password]" type="text" size="50" value="<?php echo htmlspecialchars($options['smtp_password'])?>"/>
|
482 |
</td>
|
483 |
</tr>
|
484 |
+
</table>
|
485 |
|
486 |
<p class="submit">
|
487 |
+
<input class="button" type="submit" name="save" value="<?php _e('Save', 'newsletter'); ?>"/>
|
488 |
+
<input class="button" type="submit" name="defaults" value="<?php _e('Revert to defaults', 'newsletter'); ?>"/>
|
489 |
</p>
|
490 |
+
-->
|
491 |
|
492 |
+
</form>
|
493 |
</div>
|
plugin.php
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
/*
|
3 |
Plugin Name: Newsletter
|
4 |
Plugin URI: http://www.satollo.net/plugins/newsletter
|
5 |
-
Description: Newsletter is a
|
6 |
-
Version: 1.
|
7 |
Author: Satollo
|
8 |
Author URI: http://www.satollo.net
|
9 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
@@ -26,7 +26,9 @@ Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
|
26 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
27 |
*/
|
28 |
|
29 |
-
define('NEWSLETTER',
|
|
|
|
|
30 |
|
31 |
require_once(dirname(__FILE__) . '/widget.php');
|
32 |
|
@@ -34,17 +36,16 @@ global $newsletter_labels;
|
|
34 |
$newsletter_step = 'subscription';
|
35 |
global $newsletter_subscriber;
|
36 |
|
37 |
-
function newsletter_init_labels()
|
38 |
-
{
|
39 |
global $newsletter_labels;
|
40 |
|
41 |
-
@
|
42 |
-
if (WPLANG != '') @
|
43 |
-
@include_once(ABSPATH . 'wp-content/newsletter/
|
|
|
44 |
}
|
45 |
|
46 |
-
function newsletter_label($name)
|
47 |
-
{
|
48 |
global $newsletter_labels;
|
49 |
|
50 |
if ($newsletter_labels) return $newsletter_labels[$name];
|
@@ -52,39 +53,63 @@ function newsletter_label($name)
|
|
52 |
return $newsletter_labels[$name];
|
53 |
}
|
54 |
|
55 |
-
function newsletter_echo($name)
|
56 |
-
{
|
57 |
echo newsletter_label($name);
|
58 |
}
|
59 |
|
60 |
-
function newsletter_request($name, $default=null )
|
61 |
-
|
62 |
-
if ( !isset($_REQUEST[$name]) ) {
|
63 |
-
return $default;
|
64 |
-
}
|
65 |
return stripslashes_deep($_REQUEST[$name]);
|
66 |
}
|
67 |
|
68 |
-
function
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
70 |
$options = get_option('newsletter');
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
}
|
73 |
|
74 |
-
if (!is_admin())
|
75 |
-
{
|
76 |
add_shortcode('newsletter', 'newsletter_call');
|
77 |
add_shortcode('newsletter_form', 'newsletter_form_call');
|
78 |
}
|
79 |
|
80 |
-
function newsletter_form_call($attrs, $content=null)
|
81 |
-
{
|
82 |
$options = get_option('newsletter');
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
|
86 |
-
function newsletter_call($attrs, $content=null)
|
87 |
-
{
|
88 |
global $newsletter_step, $newsletter_subscriber;
|
89 |
|
90 |
$options = get_option('newsletter');
|
@@ -92,41 +117,56 @@ function newsletter_call($attrs, $content=null)
|
|
92 |
$buffer = '';
|
93 |
|
94 |
// When a user is starting the subscription process
|
95 |
-
if ($newsletter_step == 'subscription')
|
96 |
-
{
|
97 |
$buffer .= $options['subscription_text'];
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
}
|
100 |
|
101 |
// When a user asked to subscribe and the connfirmation request has been sent
|
102 |
-
if ($newsletter_step == 'subscribed')
|
103 |
-
{
|
104 |
$text = newsletter_replace($options['subscribed_text'], $newsletter_subscriber);
|
105 |
$buffer .= $text;
|
106 |
}
|
107 |
|
108 |
-
if ($newsletter_step == 'confirmed')
|
109 |
-
{
|
110 |
$text = newsletter_replace($options['confirmed_text'], $newsletter_subscriber);
|
111 |
$buffer .= $text;
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
}
|
113 |
|
114 |
// Here we are when an unsubscription is requested. There are two kind of unsubscription: the
|
115 |
// ones with email and token, so the user has only to confire and the ones without
|
116 |
// data, so the user is requested to insert his email. In the latter case an email
|
117 |
// will be sent to the user with alink to confirm the email removal.
|
118 |
-
if ($newsletter_step == 'unsubscription' || $newsletter_step == 'unsubscription_error')
|
119 |
-
|
120 |
-
$newsletter_subscriber = newsletter_get_subscriber($_REQUEST['ne']);
|
121 |
$buffer = newsletter_replace($options['unsubscription_text'], $newsletter_subscriber);
|
122 |
-
$url = newsletter_add_qs($options['url'], 'na=uc&
|
123 |
-
|
124 |
$buffer = newsletter_replace_url($buffer, 'UNSUBSCRIPTION_CONFIRM_URL', $url);
|
125 |
}
|
126 |
|
127 |
// Last message shown to user to say good bye
|
128 |
-
if ($newsletter_step == 'unsubscribed')
|
129 |
-
{
|
130 |
$text = $options['unsubscribed_text'];
|
131 |
$text = newsletter_replace($text, $newsletter_subscriber);
|
132 |
$buffer .= $text;
|
@@ -154,135 +194,269 @@ function newsletter_call($attrs, $content=null)
|
|
154 |
// $buffer .= $text;
|
155 |
// }
|
156 |
|
157 |
-
return $buffer;
|
158 |
}
|
159 |
|
160 |
/**
|
161 |
-
* Sends out newsletters.
|
162 |
-
*
|
163 |
-
*
|
|
|
164 |
*
|
165 |
-
*
|
166 |
-
*
|
167 |
-
* Se the function can be called a second time to compete the task.
|
168 |
*
|
169 |
-
* If
|
|
|
|
|
|
|
170 |
*/
|
171 |
-
function newsletter_send_batch(
|
172 |
-
{
|
173 |
global $wpdb;
|
174 |
|
|
|
|
|
175 |
$options = get_option('newsletter');
|
176 |
$options_email = get_option('newsletter_email');
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
|
178 |
-
|
179 |
-
$last = get_option('newsletter_last');
|
180 |
-
if (!is_array($last)) $last = array();
|
181 |
|
182 |
-
|
183 |
-
if
|
184 |
-
|
|
|
185 |
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
$last['email'] = '';
|
190 |
-
update_option('newsletter_last', $last);
|
191 |
-
return true;
|
192 |
}
|
193 |
-
|
194 |
-
{
|
195 |
-
|
196 |
-
|
197 |
}
|
198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
// Not all hosting provider allow this...
|
200 |
-
set_time_limit(
|
201 |
|
202 |
-
echo 'Queue: ' . count($recipients) . ' emails<br />';
|
203 |
$start_time = time();
|
204 |
$max_time = (int)(ini_get('max_execution_time') * 0.8);
|
205 |
-
|
206 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
|
208 |
-
// Count the total emails sent
|
209 |
-
if (!$last['sent']) $last['sent'] = 0;
|
210 |
$idx = 0;
|
211 |
-
|
212 |
-
{
|
213 |
-
$m = $message;
|
214 |
|
215 |
$url = newsletter_add_qs($options['url'],
|
216 |
-
'na=u&
|
217 |
|
218 |
-
$m = newsletter_replace_url($
|
219 |
$m = newsletter_replace($m, $r);
|
220 |
|
221 |
-
|
|
|
|
|
|
|
222 |
$s = newsletter_replace($s, $r);
|
223 |
|
224 |
-
|
225 |
-
|
226 |
-
|
|
|
227 |
$x = newsletter_mail($r->email, $s, $m, true);
|
228 |
}
|
229 |
-
|
230 |
-
{
|
231 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
}
|
233 |
|
234 |
-
echo $r->email . ' ';
|
235 |
-
flush();
|
236 |
$idx++;
|
237 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
|
239 |
// Timeout check, max time is zero if set_time_limit works
|
240 |
-
if (($
|
241 |
-
|
242 |
-
$
|
243 |
-
update_option('
|
244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
}
|
246 |
}
|
247 |
-
|
248 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
return true;
|
250 |
}
|
251 |
|
252 |
/**
|
253 |
-
* Send a
|
254 |
-
*
|
255 |
*/
|
256 |
-
function
|
257 |
-
|
|
|
|
|
|
|
258 |
$options = get_option('newsletter');
|
|
|
|
|
|
|
259 |
|
260 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
|
262 |
-
foreach ($recipients as $r)
|
263 |
-
{
|
264 |
-
$m = $message;
|
265 |
|
266 |
$url = newsletter_add_qs($options['url'],
|
267 |
-
'na=u&
|
268 |
|
269 |
-
$m = newsletter_replace_url($
|
270 |
$m = newsletter_replace($m, $r);
|
271 |
|
272 |
-
|
|
|
|
|
|
|
273 |
$s = newsletter_replace($s, $r);
|
274 |
|
275 |
$x = newsletter_mail($r->email, $s, $m, true);
|
276 |
|
277 |
-
echo $r->email . ' ';
|
278 |
flush();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
}
|
280 |
}
|
281 |
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
{
|
286 |
if ($amp) return $url . '&' . $qs;
|
287 |
else return $url . '&' . $qs;
|
288 |
}
|
@@ -295,28 +469,60 @@ function newsletter_add_qs($url, $qs, $amp=true)
|
|
295 |
* The email will contain an URL (or link) the user has to follow to complete the
|
296 |
* subscription (double opt-in).
|
297 |
*/
|
298 |
-
function newsletter_subscribe($email, $name)
|
299 |
-
{
|
300 |
global $wpdb, $newsletter_subscriber;
|
301 |
|
302 |
$options = get_option('newsletter');
|
303 |
|
304 |
$email = newsletter_normalize_email($email);
|
305 |
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
// Check if this email is already in our database: if so, just resend the
|
307 |
// confirmation email.
|
308 |
-
$newsletter_subscriber =
|
309 |
-
if (!$newsletter_subscriber)
|
310 |
-
{
|
311 |
$token = md5(rand());
|
312 |
-
|
313 |
-
|
314 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
}
|
316 |
|
317 |
-
|
|
|
|
|
|
|
|
|
|
|
318 |
|
319 |
-
$message = 'There is a new subscriber to ' . get_option('blogname') . ' newsletter:' . "\n\n" .
|
320 |
$name . ' <' . $email . '>' . "\n\n" .
|
321 |
'Have a nice day,' . "\n" . 'your Newsletter plugin.';
|
322 |
|
@@ -324,27 +530,39 @@ function newsletter_subscribe($email, $name)
|
|
324 |
newsletter_notify_admin($subject, $message);
|
325 |
}
|
326 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
/**
|
328 |
* Resends the confirmation message when asked by user manager panel.
|
329 |
*/
|
330 |
-
function newsletter_send_confirmation($subscriber)
|
331 |
-
{
|
332 |
$options = get_option('newsletter');
|
333 |
|
334 |
-
|
335 |
-
|
336 |
-
newsletter_log('newsletter_send_confirmation() - URL: ' . $url);
|
337 |
|
338 |
$message = $options['confirmation_message'];
|
|
|
|
|
339 |
|
|
|
|
|
340 |
// The full URL to the confirmation page
|
341 |
-
$url = newsletter_add_qs($options['url'], 'na=c&
|
342 |
-
|
343 |
$message = newsletter_replace_url($message, 'SUBSCRIPTION_CONFIRM_URL', $url);
|
344 |
|
345 |
// URL to the unsubscription page (for test purpose)
|
346 |
-
$url = newsletter_add_qs($options['url'], 'na=u&
|
347 |
-
|
348 |
$message = newsletter_replace_url($message, 'UNSUBSCRIPTION_URL', $url);
|
349 |
|
350 |
$message = newsletter_replace($message, $subscriber);
|
@@ -358,56 +576,79 @@ function newsletter_send_confirmation($subscriber)
|
|
358 |
* Return a subscriber by his email. The email will be sanitized and normalized
|
359 |
* before issuing the query to the database.
|
360 |
*/
|
361 |
-
function newsletter_get_subscriber($
|
362 |
-
{
|
363 |
global $wpdb;
|
364 |
|
365 |
-
$recipients = $wpdb->get_results("select * from " . $wpdb->prefix .
|
366 |
-
|
367 |
if (!$recipients) return null;
|
368 |
return $recipients[0];
|
369 |
}
|
370 |
|
371 |
-
function
|
372 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
373 |
global $wpdb;
|
374 |
|
375 |
$recipients = $wpdb->get_results("select * from " . $wpdb->prefix . "newsletter order by email");
|
376 |
return $recipients;
|
377 |
}
|
378 |
|
379 |
-
function newsletter_search($text)
|
380 |
-
{
|
381 |
global $wpdb;
|
382 |
-
|
383 |
-
|
384 |
-
|
|
|
|
|
|
|
385 |
}
|
386 |
-
|
387 |
-
{
|
388 |
-
$recipients = $wpdb->get_results("
|
389 |
-
|
|
|
|
|
|
|
390 |
}
|
391 |
if (!$recipients) return null;
|
392 |
return $recipients;
|
393 |
}
|
394 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
|
396 |
/**
|
397 |
* Normalize an email address,making it lowercase and trimming spaces.
|
398 |
*/
|
399 |
-
function newsletter_normalize_email($email)
|
400 |
-
{
|
401 |
return strtolower(trim($email));
|
402 |
}
|
403 |
|
|
|
|
|
|
|
|
|
|
|
|
|
404 |
add_action('init', 'newsletter_init');
|
405 |
/**
|
406 |
* Intercept the request parameters which drive the subscription and unsubscription
|
407 |
* process.
|
408 |
*/
|
409 |
-
function newsletter_init()
|
410 |
-
{
|
411 |
global $newsletter_step, $wpdb, $newsletter_subscriber;
|
412 |
global $hyper_cache_stop;
|
413 |
|
@@ -415,51 +656,80 @@ function newsletter_init()
|
|
415 |
$action = $_REQUEST['na'];
|
416 |
if (!$action) return;
|
417 |
|
|
|
|
|
|
|
|
|
418 |
$options = get_option('newsletter');
|
419 |
|
420 |
-
$hyper_cache_stop = true;
|
421 |
|
422 |
-
|
423 |
-
|
|
|
424 |
if (!newsletter_is_email($_REQUEST['ne'])) {
|
425 |
die(newsletter_label('error_email'));
|
426 |
}
|
427 |
-
|
428 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
}
|
430 |
-
|
431 |
-
|
|
|
|
|
432 |
}
|
433 |
|
434 |
// A request to confirm a subscription
|
435 |
-
if ($action == 'c')
|
436 |
-
|
437 |
-
$
|
438 |
-
|
439 |
-
header('Location: ' . newsletter_add_qs($options['url'], 'na=cs&ne=' . urlencode($email), false));
|
440 |
die();
|
441 |
-
|
442 |
}
|
443 |
|
444 |
// Show the confirmed message after a redirection (to avoid mutiple email sending).
|
445 |
// Redirect is sent by action "c".
|
446 |
-
if ($action == 'cs')
|
447 |
-
|
448 |
-
$newsletter_subscriber = newsletter_get_subscriber($_REQUEST['ne']);
|
449 |
$newsletter_step = 'confirmed';
|
450 |
}
|
451 |
|
452 |
// Unsubscription process has 2 options: if email and token are specified the user
|
453 |
// will only be asked to confirm. If there is no infos of who remove (when
|
454 |
// mass mail mode is used) the user will be asked to type the emailto be removed.
|
455 |
-
if ($action == 'u')
|
456 |
-
{
|
457 |
$newsletter_step = 'unsubscription';
|
458 |
}
|
459 |
|
|
|
460 |
// Export for Zanzara
|
461 |
-
if ($action == 'z')
|
462 |
-
{
|
463 |
if (!$_GET['nk'] || $_GET['nk'] != $options['key']) return;
|
464 |
|
465 |
$options_email = get_option('newsletter_email');
|
@@ -507,21 +777,19 @@ function newsletter_init()
|
|
507 |
|
508 |
$query = "select * from " . $wpdb->prefix . "newsletter where status='C'";
|
509 |
$recipients = $wpdb->get_results($query . " order by email");
|
510 |
-
for ($i=0; $i<count($recipients); $i++)
|
511 |
-
{
|
512 |
echo $recipients[$i]->email . ';' . $recipients[$i]->name .
|
513 |
-
';' . $recipients[$i]->token . "\n";
|
514 |
}
|
515 |
echo ']]></string>' . "\n";
|
516 |
echo '</void>' . "\n";
|
517 |
|
518 |
echo '<void property="testRecipients">' . "\n";
|
519 |
echo '<string><![CDATA[';
|
520 |
-
for ($i=1; $i<=10; $i++)
|
521 |
-
{
|
522 |
if (!$options_email['test_email_' . $i]) continue;
|
523 |
echo $options_email['test_email_' . $i] . ';' . $options_email['test_name_' . $i] .
|
524 |
-
';
|
525 |
}
|
526 |
echo ']]></string>' . "\n";
|
527 |
echo '</void>' . "\n";
|
@@ -530,219 +798,268 @@ function newsletter_init()
|
|
530 |
echo '</java>' . "\n";
|
531 |
die();
|
532 |
}
|
|
|
533 |
|
534 |
// User confirmed he want to unsubscribe clicking the link on unsubscription
|
535 |
// page
|
536 |
-
if ($action == 'uc')
|
537 |
-
|
538 |
-
newsletter_unsubscribe($_REQUEST['ne'], $_REQUEST['nt']);
|
539 |
$newsletter_step = 'unsubscribed';
|
540 |
}
|
541 |
-
|
542 |
-
// Sends the unsubscription confirmation email
|
543 |
-
// if ($action == 'ue')
|
544 |
-
// {
|
545 |
-
// $email = newsletter_normalize_email($_REQUEST['ne']);
|
546 |
-
// $recipients = $wpdb->get_results("select * from " . $wpdb->prefix . "newsletter where email='" . $wpdb->escape($email) . "'");
|
547 |
-
// if (!$recipients)
|
548 |
-
// {
|
549 |
-
// $newsletter_step = 'unsubscription_mm_error';
|
550 |
-
// return;
|
551 |
-
// }
|
552 |
-
//
|
553 |
-
// $name = $recipients[0]->name;
|
554 |
-
// $token = $recipients[0]->token;
|
555 |
-
// $url = newsletter_add_qs($options['url'], 'na=uc&ne=' . urlencode($email) . '&nt=' . $token);
|
556 |
-
// $message = $options['unsubscription_mm_message'];
|
557 |
-
// $message = str_replace('{unsubscription_url}', $url, $message);
|
558 |
-
// $message = str_replace('{unsubscription_link}',
|
559 |
-
// '<a href="' . $url .
|
560 |
-
// '">' . $options['unsubscription_mm_link'] . '</a>', $message);
|
561 |
-
//
|
562 |
-
// $message = str_replace('{name}', $name, $message);
|
563 |
-
//
|
564 |
-
// $subject = $options['unsubscription_mm_subject'];
|
565 |
-
// $subject = str_replace('{name}', $name, $subject);
|
566 |
-
// newsletter_mail($email, $subject, $message);
|
567 |
-
//
|
568 |
-
// $newsletter_step = 'unsubscription_mm_end';
|
569 |
-
// }
|
570 |
-
|
571 |
}
|
572 |
|
|
|
573 |
/**
|
574 |
* Deletes a subscription (no way back). Fills the global $newsletter_subscriber
|
575 |
-
* with subscriber data.
|
576 |
-
*
|
577 |
-
* @param <type> $email
|
578 |
-
* @param <type> $token
|
579 |
*/
|
580 |
-
function newsletter_unsubscribe($
|
581 |
-
{
|
582 |
global $newsletter_subscriber, $wpdb;
|
583 |
|
584 |
// Save the subscriber for good bye page
|
585 |
-
$newsletter_subscriber = newsletter_get_subscriber($
|
|
|
|
|
|
|
586 |
|
587 |
-
$
|
588 |
-
|
|
|
589 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
590 |
$message = 'There is an unsubscription to ' . get_option('blogname') . ' newsletter:' . "\n\n" .
|
591 |
-
$name . ' <' . $email . '>' . "\n\n" .
|
592 |
-
'Don\'t worry, for one lost two gained!' . "\n\n" .
|
593 |
'Have a nice day,' . "\n" . 'your Newsletter plugin.';
|
594 |
|
595 |
$subject = '[' . get_option('blogname') . '] Unsubscription';
|
596 |
newsletter_notify_admin($subject, $message);
|
597 |
}
|
598 |
|
599 |
-
|
600 |
-
|
|
|
|
|
601 |
global $wpdb;
|
602 |
|
603 |
-
$wpdb->query("delete from " . $wpdb->prefix . "newsletter where
|
604 |
}
|
605 |
|
606 |
-
function newsletter_delete_all($status=null)
|
607 |
-
{
|
608 |
global $wpdb;
|
609 |
|
610 |
-
if ($status == null)
|
611 |
-
{
|
612 |
$wpdb->query("delete from " . $wpdb->prefix . "newsletter");
|
613 |
}
|
614 |
-
else
|
615 |
-
{
|
616 |
$wpdb->query("delete from " . $wpdb->prefix . "newsletter where status='" . $wpdb->escape($status) . "'");
|
617 |
}
|
618 |
}
|
619 |
|
620 |
/**
|
621 |
-
* Confirms a subscription identified by
|
622 |
* database. Fill the global $newsletter_subscriber with user data.
|
|
|
|
|
|
|
|
|
623 |
*/
|
624 |
-
function newsletter_confirm($
|
625 |
-
{
|
626 |
global $wpdb, $newsletter_subscriber;
|
627 |
|
628 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
629 |
|
|
|
|
|
|
|
|
|
|
|
|
|
630 |
$options = get_option('newsletter');
|
631 |
|
632 |
-
|
633 |
-
" and token='" . $wpdb->escape($token) . "'");
|
634 |
|
635 |
-
$
|
|
|
|
|
636 |
|
637 |
-
$message = newsletter_replace($
|
638 |
|
639 |
// URL to the unsubscription page (for test purpose)
|
640 |
-
$url = newsletter_add_qs($options['url'], 'na=u&
|
641 |
-
|
642 |
$message = newsletter_replace_url($message, 'UNSUBSCRIPTION_URL', $url);
|
643 |
|
|
|
644 |
|
645 |
-
$
|
646 |
-
|
647 |
-
newsletter_mail($email, $subject, $message);
|
648 |
}
|
649 |
|
650 |
-
|
651 |
-
|
|
|
|
|
652 |
global $wpdb;
|
653 |
|
654 |
-
$wpdb->query("update " . $wpdb->prefix . "newsletter set status
|
655 |
}
|
656 |
|
657 |
-
|
658 |
-
|
|
|
|
|
659 |
$to = get_option('admin_email');
|
660 |
$headers .= "Content-type: text/plain; charset=UTF-8\n";
|
661 |
wp_mail($to, $subject, $message, $headers);
|
662 |
}
|
663 |
|
664 |
/**
|
665 |
-
* Sends out an email (html or text).
|
|
|
|
|
|
|
666 |
*/
|
667 |
-
function newsletter_mail($to, &$subject, &$message, $html=true)
|
668 |
-
{
|
669 |
global $wpdb;
|
670 |
|
|
|
|
|
|
|
|
|
|
|
671 |
$options = get_option('newsletter');
|
672 |
|
673 |
$headers = "MIME-Version: 1.0\n";
|
674 |
-
if ($html)
|
675 |
-
|
676 |
-
else
|
677 |
-
$headers .= "Content-type: text/plain; charset=UTF-8\n";
|
678 |
|
|
|
679 |
$headers .= 'From: "' . $options['from_name'] . '" <' . $options['from_email'] . ">\n";
|
680 |
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
// }
|
687 |
-
// else
|
688 |
-
// {
|
689 |
-
// return mail($to, $subject, $message, $headers);
|
690 |
-
// }
|
691 |
-
wp_mail($to, $subject, $message, $headers);
|
692 |
}
|
693 |
|
694 |
|
695 |
add_action('activate_newsletter/plugin.php', 'newsletter_activate');
|
696 |
-
function newsletter_activate()
|
697 |
-
{
|
698 |
global $wpdb;
|
699 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
700 |
// SQL to create the table
|
701 |
$sql = 'create table if not exists ' . $wpdb->prefix . 'newsletter (
|
|
|
702 |
`name` varchar (100) not null default \'\',
|
703 |
`email` varchar (100) not null default \'\',
|
704 |
`token` varchar (50) not null default \'\',
|
705 |
`status` varchar (1) not null default \'S\',
|
706 |
-
|
707 |
-
|
708 |
)';
|
709 |
|
710 |
@$wpdb->query($sql);
|
711 |
|
712 |
-
$options
|
713 |
|
714 |
-
|
715 |
-
|
716 |
-
if (WPLANG != '') @include_once(dirname(__FILE__) . '/languages/' . WPLANG . '_options.php');
|
717 |
-
//@include_once(ABSPATH . 'wp-content/newsletter/languages/custom_options.php');
|
718 |
|
719 |
-
|
720 |
-
|
721 |
|
722 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
723 |
|
|
|
|
|
|
|
|
|
|
|
724 |
update_option('newsletter', $options);
|
|
|
|
|
725 |
}
|
726 |
|
727 |
-
if (is_admin())
|
728 |
-
{
|
729 |
add_action('admin_menu', 'newsletter_admin_menu');
|
730 |
-
function newsletter_admin_menu()
|
731 |
-
{
|
732 |
$options = get_option('newsletter');
|
733 |
$level = $options['editor']?7:10;
|
734 |
|
735 |
-
if (function_exists('add_menu_page'))
|
736 |
-
{
|
737 |
add_menu_page('Newsletter', 'Newsletter', $level, 'newsletter/options.php', '', '');
|
738 |
}
|
739 |
|
740 |
-
if (function_exists('add_submenu_page'))
|
741 |
-
{
|
742 |
add_submenu_page('newsletter/options.php', 'Configuration', 'Configuration', $level, 'newsletter/options.php');
|
743 |
add_submenu_page('newsletter/options.php', 'Composer', 'Composer', $level, 'newsletter/newsletter.php');
|
744 |
add_submenu_page('newsletter/options.php', 'Import', 'Import', $level, 'newsletter/import.php');
|
|
|
745 |
add_submenu_page('newsletter/options.php', 'Manage', 'Manage', $level, 'newsletter/manage.php');
|
|
|
|
|
|
|
746 |
}
|
747 |
}
|
748 |
}
|
@@ -750,11 +1067,11 @@ if (is_admin())
|
|
750 |
/**
|
751 |
* Fills a text with sunscriber data and blog data replacing some place holders.
|
752 |
*/
|
753 |
-
function newsletter_replace($text, $subscriber)
|
754 |
-
{
|
755 |
$text = str_replace('{home_url}', get_option('home'), $text);
|
756 |
$text = str_replace('{blog_title}', get_option('blogname'), $text);
|
757 |
$text = str_replace('{email}', $subscriber->email, $text);
|
|
|
758 |
$text = str_replace('{name}', $subscriber->name, $text);
|
759 |
$text = str_replace('{token}', $subscriber->token, $text);
|
760 |
return $text;
|
@@ -765,8 +1082,7 @@ function newsletter_replace($text, $subscriber)
|
|
765 |
* lowercase and betweeb curly brakets and the ones all uppercase. The tag to be passed
|
766 |
* is the one all uppercase but the lowercase one will also be replaced.
|
767 |
*/
|
768 |
-
function newsletter_replace_url($text, $tag, $url)
|
769 |
-
{
|
770 |
$home = get_option('home') . '/';
|
771 |
$tag_lower = strtolower($tag);
|
772 |
$text = str_replace($home . '{' . $tag_lower . '}', $url, $text);
|
@@ -779,30 +1095,185 @@ function newsletter_replace_url($text, $tag, $url)
|
|
779 |
return $text;
|
780 |
}
|
781 |
|
782 |
-
function newsletter_is_email($email, $empty_ok=false)
|
783 |
-
|
784 |
-
$email = trim($email);
|
785 |
if ($empty_ok && $email == '') return true;
|
786 |
|
787 |
-
if (eregi("^([a-z0-9_\.-])+@(([a-z0-9_-])+\\.)+[a-z]{2,6}$", trim($email)))
|
788 |
-
|
|
|
|
|
|
|
789 |
else
|
790 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
791 |
}
|
792 |
|
793 |
/**
|
794 |
* Write a line of log in the log file if the logs are enabled or force is
|
795 |
* set to true.
|
796 |
*/
|
797 |
-
function newsletter_log($text
|
798 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
799 |
$options = get_option('newsletter');
|
|
|
|
|
|
|
800 |
|
801 |
-
|
|
|
|
|
|
|
|
|
802 |
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
807 |
}
|
808 |
?>
|
2 |
/*
|
3 |
Plugin Name: Newsletter
|
4 |
Plugin URI: http://www.satollo.net/plugins/newsletter
|
5 |
+
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.satollo.net/plugins/newsletter#update">this page</a> to know what's changed.</strong>
|
6 |
+
Version: 1.5.0
|
7 |
Author: Satollo
|
8 |
Author URI: http://www.satollo.net
|
9 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
26 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
27 |
*/
|
28 |
|
29 |
+
define('NEWSLETTER', '1.5.0');
|
30 |
+
|
31 |
+
@include(ABSPATH . 'wp-content/plugins/newsletter-extras/newsletter-extras.php');
|
32 |
|
33 |
require_once(dirname(__FILE__) . '/widget.php');
|
34 |
|
36 |
$newsletter_step = 'subscription';
|
37 |
global $newsletter_subscriber;
|
38 |
|
39 |
+
function newsletter_init_labels() {
|
|
|
40 |
global $newsletter_labels;
|
41 |
|
42 |
+
@include_once(dirname(__FILE__) . '/languages/en_US.php');
|
43 |
+
if (WPLANG != '') @include_once(dirname(__FILE__) . '/languages/' . WPLANG . '.php');
|
44 |
+
@include_once(ABSPATH . 'wp-content/plugins/newsletter-custom/languages/en_US.php');
|
45 |
+
if (WPLANG != '') @include_once(ABSPATH . 'wp-content/plugins/newsletter-custom/languages/' . WPLANG . '.php');
|
46 |
}
|
47 |
|
48 |
+
function newsletter_label($name) {
|
|
|
49 |
global $newsletter_labels;
|
50 |
|
51 |
if ($newsletter_labels) return $newsletter_labels[$name];
|
53 |
return $newsletter_labels[$name];
|
54 |
}
|
55 |
|
56 |
+
function newsletter_echo($name) {
|
|
|
57 |
echo newsletter_label($name);
|
58 |
}
|
59 |
|
60 |
+
function newsletter_request($name, $default=null ) {
|
61 |
+
if (!isset($_REQUEST[$name])) return $default;
|
|
|
|
|
|
|
62 |
return stripslashes_deep($_REQUEST[$name]);
|
63 |
}
|
64 |
|
65 |
+
function newsletter_subscribers_count() {
|
66 |
+
global $wpdb;
|
67 |
+
|
68 |
+
return $wpdb->get_var("select count(*) from " . $wpdb->prefix . "newsletter where status='C'");
|
69 |
+
}
|
70 |
+
|
71 |
+
function newsletter_embed_form($form=0) {
|
72 |
$options = get_option('newsletter');
|
73 |
+
if (newsletter_has_extras('1.0.2') && $form>0) {
|
74 |
+
echo str_replace('{newsletter_url}', $options['url'], newsletter_extras_get_form($form));
|
75 |
+
}
|
76 |
+
else {
|
77 |
+
echo '<div class="newsletter-embed-form">';
|
78 |
+
if (isset($options['noname'])) {
|
79 |
+
echo str_replace('{newsletter_url}', $options['url'], newsletter_label('embedded_form_noname'));
|
80 |
+
}
|
81 |
+
else {
|
82 |
+
echo str_replace('{newsletter_url}', $options['url'], newsletter_label('embedded_form'));
|
83 |
+
}
|
84 |
+
echo '</div>';
|
85 |
+
}
|
86 |
}
|
87 |
|
88 |
+
if (!is_admin()) {
|
|
|
89 |
add_shortcode('newsletter', 'newsletter_call');
|
90 |
add_shortcode('newsletter_form', 'newsletter_form_call');
|
91 |
}
|
92 |
|
93 |
+
function newsletter_form_call($attrs, $content=null) {
|
|
|
94 |
$options = get_option('newsletter');
|
95 |
+
if (newsletter_has_extras('1.0.2') && isset($attrs['form'])) {
|
96 |
+
$buffer = str_replace('{newsletter_url}', $options['url'], newsletter_extras_get_form($attrs['form']));
|
97 |
+
}
|
98 |
+
else {
|
99 |
+
$buffer = '<div class="newsletter-embed-form">';
|
100 |
+
if (!isset($options['noname'])) {
|
101 |
+
$buffer .= str_replace('{newsletter_url}', $options['url'], newsletter_label('embedded_form'));
|
102 |
+
}
|
103 |
+
else {
|
104 |
+
$buffer .= str_replace('{newsletter_url}', $options['url'], newsletter_label('embedded_form_noname'));
|
105 |
+
}
|
106 |
+
|
107 |
+
$buffer .= '</div>';
|
108 |
+
}
|
109 |
+
return $buffer;
|
110 |
}
|
111 |
|
112 |
+
function newsletter_call($attrs, $content=null) {
|
|
|
113 |
global $newsletter_step, $newsletter_subscriber;
|
114 |
|
115 |
$options = get_option('newsletter');
|
117 |
$buffer = '';
|
118 |
|
119 |
// When a user is starting the subscription process
|
120 |
+
if ($newsletter_step == 'subscription') {
|
|
|
121 |
$buffer .= $options['subscription_text'];
|
122 |
+
|
123 |
+
if (newsletter_has_extras('1.0.2') && isset($attrs['form'])) {
|
124 |
+
$buffer .= str_replace('{newsletter_url}', $options['url'], newsletter_extras_get_form($attrs['form']));
|
125 |
+
}
|
126 |
+
else {
|
127 |
+
if (isset($options['noname'])) {
|
128 |
+
$buffer .= newsletter_label('subscription_form_noname');
|
129 |
+
}
|
130 |
+
else {
|
131 |
+
$buffer .= newsletter_label('subscription_form');
|
132 |
+
}
|
133 |
+
if (!defined('NEWSLETTER_EXTRAS'))
|
134 |
+
$buffer .= '<div style="text-align:right;padding:0 10px;margin:0;"><a style="font-size:9px;color:#bbb;text-decoration:none" href="http://www.satollo.net">by satollo.net</a></div>';
|
135 |
+
}
|
136 |
+
|
137 |
}
|
138 |
|
139 |
// When a user asked to subscribe and the connfirmation request has been sent
|
140 |
+
if ($newsletter_step == 'subscribed') {
|
|
|
141 |
$text = newsletter_replace($options['subscribed_text'], $newsletter_subscriber);
|
142 |
$buffer .= $text;
|
143 |
}
|
144 |
|
145 |
+
if ($newsletter_step == 'confirmed') {
|
|
|
146 |
$text = newsletter_replace($options['confirmed_text'], $newsletter_subscriber);
|
147 |
$buffer .= $text;
|
148 |
+
|
149 |
+
if (isset($options['confirmed_tracking'])) {
|
150 |
+
ob_start();
|
151 |
+
eval('?>' . $options['confirmed_tracking']);
|
152 |
+
$buffer .= ob_get_clean();
|
153 |
+
}
|
154 |
}
|
155 |
|
156 |
// Here we are when an unsubscription is requested. There are two kind of unsubscription: the
|
157 |
// ones with email and token, so the user has only to confire and the ones without
|
158 |
// data, so the user is requested to insert his email. In the latter case an email
|
159 |
// will be sent to the user with alink to confirm the email removal.
|
160 |
+
if ($newsletter_step == 'unsubscription' || $newsletter_step == 'unsubscription_error') {
|
161 |
+
$newsletter_subscriber = newsletter_get_subscriber($_REQUEST['ni']);
|
|
|
162 |
$buffer = newsletter_replace($options['unsubscription_text'], $newsletter_subscriber);
|
163 |
+
$url = newsletter_add_qs($options['url'], 'na=uc&ni=' . $newsletter_subscriber->id .
|
164 |
+
'&nt=' . $_REQUEST['nt']);
|
165 |
$buffer = newsletter_replace_url($buffer, 'UNSUBSCRIPTION_CONFIRM_URL', $url);
|
166 |
}
|
167 |
|
168 |
// Last message shown to user to say good bye
|
169 |
+
if ($newsletter_step == 'unsubscribed') {
|
|
|
170 |
$text = $options['unsubscribed_text'];
|
171 |
$text = newsletter_replace($text, $newsletter_subscriber);
|
172 |
$buffer .= $text;
|
194 |
// $buffer .= $text;
|
195 |
// }
|
196 |
|
197 |
+
return '<div class="newsletter">' . $buffer . '</div>';
|
198 |
}
|
199 |
|
200 |
/**
|
201 |
+
* Sends out newsletters.
|
202 |
+
*
|
203 |
+
* I recipients is an array of subscribers, other parameters are ignored and a test
|
204 |
+
* batch is started. This parameter has priority over all.
|
205 |
*
|
206 |
+
* If continue is true, the system try to continue a previous batch keeping its
|
207 |
+
* configuration (eg. if it was a simulation or not).
|
|
|
208 |
*
|
209 |
+
* If continue is false, simulate indicates if the batch is a simulation and forces
|
210 |
+
* the subscriber's email to a test one, as specified in the configuration.
|
211 |
+
*
|
212 |
+
* Return true if the batch is completed.
|
213 |
*/
|
214 |
+
function newsletter_send_batch() {
|
|
|
215 |
global $wpdb;
|
216 |
|
217 |
+
newsletter_info(__FUNCTION__, 'Start');
|
218 |
+
|
219 |
$options = get_option('newsletter');
|
220 |
$options_email = get_option('newsletter_email');
|
221 |
+
$batch = get_option('newsletter_batch');
|
222 |
+
|
223 |
+
if ($batch == null || !is_array($batch)) {
|
224 |
+
newsletter_error(__FUNCTION__, 'No batch found');
|
225 |
+
return;
|
226 |
+
}
|
227 |
|
228 |
+
newsletter_debug(__FUNCTION__, "Batch:\n" . print_r($last, true));
|
|
|
|
|
229 |
|
230 |
+
// Batch have to contain 'id' which is the starting id, 'simulate' boolean
|
231 |
+
// to indicate if is a simulation or not, 'scheduled' if it's a scheduled
|
232 |
+
// sending process. 'list' is the list number, required.
|
233 |
+
// If 'id' = 0 it's a new seding process.
|
234 |
|
235 |
+
if (!isset($batch['id'])) {
|
236 |
+
newsletter_error(__FUNCTION__, 'Batch "id" parameter not present');
|
237 |
+
return false;
|
|
|
|
|
|
|
238 |
}
|
239 |
+
|
240 |
+
if (!isset($batch['list'])) {
|
241 |
+
newsletter_error(__FUNCTION__, 'Batch "list" parameter not present');
|
242 |
+
return false;
|
243 |
}
|
244 |
+
|
245 |
+
if (!isset($batch['simulate'])) {
|
246 |
+
newsletter_error(__FUNCTION__, 'Batch "simulate" parameter not present');
|
247 |
+
return false;
|
248 |
+
}
|
249 |
+
|
250 |
+
if (!isset($batch['scheduled'])) {
|
251 |
+
newsletter_error(__FUNCTION__, 'Batch "scheduled" parameter not present');
|
252 |
+
return false;
|
253 |
+
}
|
254 |
+
|
255 |
+
$id = (int)$batch['id'];
|
256 |
+
$list = (int)$batch['list'];
|
257 |
+
$simulate = (bool)$batch['simulate'];
|
258 |
+
$scheduled = (bool)$batch['scheduled']; // Used to avoid echo
|
259 |
+
|
260 |
+
$query = "select * from " . $wpdb->prefix . "newsletter where status='C' and list=" . $list .
|
261 |
+
" and id>" . $id . " order by id";
|
262 |
+
|
263 |
+
$recipients = $wpdb->get_results($query);
|
264 |
+
|
265 |
+
// For a new batch save some info
|
266 |
+
if ($id == 0) {
|
267 |
+
newsletter_delete_batch_file();
|
268 |
+
wp_clear_scheduled_hook('newsletter_cron_hook');
|
269 |
+
$batch['total'] = count($recipients);
|
270 |
+
$batch['sent'] = 0;
|
271 |
+
$batch['completed'] = false;
|
272 |
+
$batch['message'] = '';
|
273 |
+
}
|
274 |
+
|
275 |
// Not all hosting provider allow this...
|
276 |
+
@set_time_limit(100000);
|
277 |
|
|
|
278 |
$start_time = time();
|
279 |
$max_time = (int)(ini_get('max_execution_time') * 0.8);
|
280 |
+
$db_time = time();
|
281 |
+
|
282 |
+
if ($scheduled) {
|
283 |
+
$max = $options_email['scheduler_max'];
|
284 |
+
if (!is_numeric($max)) $max = 10;
|
285 |
+
}
|
286 |
+
else {
|
287 |
+
$max = $options_email['max'];
|
288 |
+
if (!is_numeric($max)) $max = 0;
|
289 |
+
}
|
290 |
+
|
291 |
+
if (!$scheduled) {
|
292 |
+
echo 'Sending to: <br />';
|
293 |
+
}
|
294 |
+
|
295 |
+
|
296 |
+
if (isset($options_email['novisual'])) {
|
297 |
+
$message = $options_email['message'];
|
298 |
+
}
|
299 |
+
else {
|
300 |
+
$message = '<html><head><style type="text/css">' . newsletter_get_theme_css($options_email['theme']) .
|
301 |
+
'</style></head><body>' . $options_email['message'] . '</body></html>';
|
302 |
+
}
|
303 |
|
|
|
|
|
304 |
$idx = 0;
|
305 |
+
|
306 |
+
foreach ($recipients as $r) {
|
|
|
307 |
|
308 |
$url = newsletter_add_qs($options['url'],
|
309 |
+
'na=u&ni=' . $r->id . '&nt=' . $r->token);
|
310 |
|
311 |
+
$m = newsletter_replace_url($message, 'UNSUBSCRIPTION_URL', $url);
|
312 |
$m = newsletter_replace($m, $r);
|
313 |
|
314 |
+
if (defined('NEWSLETTER_EXTRAS') && isset($options_email['track']))
|
315 |
+
$m = newsletter_relink($m, $r->id, $options_email['name']);
|
316 |
+
|
317 |
+
$s = $options_email['subject'];
|
318 |
$s = newsletter_replace($s, $r);
|
319 |
|
320 |
+
if ($simulate) {
|
321 |
+
$x = newsletter_mail($options_email['simulate_email'], $s, $m, true);
|
322 |
+
}
|
323 |
+
else {
|
324 |
$x = newsletter_mail($r->email, $s, $m, true);
|
325 |
}
|
326 |
+
|
327 |
+
if (!$scheduled) {
|
328 |
+
echo htmlspecialchars($r->name) . ' (' . $r->email . ') ';
|
329 |
+
|
330 |
+
if ($x) {
|
331 |
+
echo '[OK] - ';
|
332 |
+
newsletter_debug(__FUNCTION__, 'Sent to ' . $r->id . ' success');
|
333 |
+
} else {
|
334 |
+
echo '[KO] - ';
|
335 |
+
newsletter_debug(__FUNCTION__, 'Sent to ' . $r->id . ' failed');
|
336 |
+
}
|
337 |
+
flush();
|
338 |
}
|
339 |
|
|
|
|
|
340 |
$idx++;
|
341 |
+
|
342 |
+
$batch['sent']++;
|
343 |
+
$batch['id'] = $r->id;
|
344 |
+
|
345 |
+
// Try to avoid database timeout
|
346 |
+
if (time()-$db_time > 15) {
|
347 |
+
newsletter_debug(__FUNCTION__, 'Batch saving to avoid database timeout');
|
348 |
+
$db_time = time();
|
349 |
+
$batch['message'] = 'Temporary saved batch to avoid database timeout';
|
350 |
+
if (!update_option('newsletter_batch', $batch)) {
|
351 |
+
newsletter_error(__FUNCTION__, 'Unable to save to database, saving on file system');
|
352 |
+
newsletter_error(__FUNCTION__, "Batch:\n" . print_r($last, true));
|
353 |
+
|
354 |
+
newsletter_save_batch_file($batch);
|
355 |
+
return false;
|
356 |
+
}
|
357 |
+
}
|
358 |
+
|
359 |
+
// Check for the max emails per batch
|
360 |
+
if ($max != 0 && $idx >= $max) {
|
361 |
+
newsletter_info(__FUNCTION__, 'Batch saving due to max emails limit reached');
|
362 |
+
$batch['message'] = 'Batch max emails limit reached (it is ok)';
|
363 |
+
if (!update_option('newsletter_batch', $batch)) {
|
364 |
+
newsletter_error(__FUNCTION__, 'Unable to save to database, saving on file system');
|
365 |
+
newsletter_error(__FUNCTION__, "Batch:\n" . print_r($last, true));
|
366 |
+
|
367 |
+
newsletter_save_batch_file($batch);
|
368 |
+
return false;
|
369 |
+
}
|
370 |
+
return true;
|
371 |
+
}
|
372 |
|
373 |
// Timeout check, max time is zero if set_time_limit works
|
374 |
+
if (($max_time != 0 && (time()-$start_time) > $max_time)) {
|
375 |
+
newsletter_info(__FUNCTION__, 'Batch saving due to max time limit reached');
|
376 |
+
$batch['message'] = 'Batch max time limit reached (it is ok)';
|
377 |
+
if (!update_option('newsletter_batch', $batch)) {
|
378 |
+
newsletter_error(__FUNCTION__, 'Unable to save to database, saving on file system');
|
379 |
+
newsletter_error(__FUNCTION__, "Batch:\n" . print_r($last, true));
|
380 |
+
|
381 |
+
newsletter_save_batch_file($batch);
|
382 |
+
return false;
|
383 |
+
}
|
384 |
+
return true;
|
385 |
}
|
386 |
}
|
387 |
+
|
388 |
+
// All right (incredible!)
|
389 |
+
newsletter_info(__FUNCTION__, 'Sending completed!');
|
390 |
+
$batch['completed'] = true;
|
391 |
+
if (!update_option('newsletter_batch', $batch)) {
|
392 |
+
newsletter_error(__FUNCTION__, 'Unable to save to database, saving on file system');
|
393 |
+
newsletter_error(__FUNCTION__, "Batch:\n" . print_r($last, true));
|
394 |
+
|
395 |
+
newsletter_save_batch_file($batch);
|
396 |
+
return false;
|
397 |
+
}
|
398 |
+
|
399 |
return true;
|
400 |
}
|
401 |
|
402 |
/**
|
403 |
+
* Send a set of test emails to a list of recipents. The recipients are created
|
404 |
+
* in the composer page using the test addresses.
|
405 |
*/
|
406 |
+
function newsletter_send_test($recipients) {
|
407 |
+
global $wpdb;
|
408 |
+
|
409 |
+
newsletter_info(__FUNCTION__, 'Start');
|
410 |
+
|
411 |
$options = get_option('newsletter');
|
412 |
+
$options_email = get_option('newsletter_email');
|
413 |
+
|
414 |
+
@set_time_limit(100000);
|
415 |
|
416 |
+
echo 'Sending to: <br />';
|
417 |
+
|
418 |
+
if (isset($options_email['novisual'])) {
|
419 |
+
$message = $options_email['message'];
|
420 |
+
}
|
421 |
+
else {
|
422 |
+
$message = '<html><head><style type="text/css">' . newsletter_get_theme_css($options_email['theme']) .
|
423 |
+
'</style></head><body>' . $options_email['message'] . '</body></html>';
|
424 |
+
}
|
425 |
|
426 |
+
foreach ($recipients as $r) {
|
|
|
|
|
427 |
|
428 |
$url = newsletter_add_qs($options['url'],
|
429 |
+
'na=u&ni=' . $r->id . '&nt=' . $r->token);
|
430 |
|
431 |
+
$m = newsletter_replace_url($message, 'UNSUBSCRIPTION_URL', $url);
|
432 |
$m = newsletter_replace($m, $r);
|
433 |
|
434 |
+
if (defined('NEWSLETTER_EXTRAS') && isset($options_email['track']))
|
435 |
+
$m = newsletter_relink($m, $r->id, $options_email['name']);
|
436 |
+
|
437 |
+
$s = $options_email['subject'];
|
438 |
$s = newsletter_replace($s, $r);
|
439 |
|
440 |
$x = newsletter_mail($r->email, $s, $m, true);
|
441 |
|
442 |
+
echo htmlspecialchars($r->name) . ' (' . $r->email . ') ';
|
443 |
flush();
|
444 |
+
|
445 |
+
if ($x) {
|
446 |
+
echo '[OK] -- ';
|
447 |
+
newsletter_debug(__FUNCTION__, 'Sent to ' . $r->id . ' failed');
|
448 |
+
} else {
|
449 |
+
echo '[KO] -- ';
|
450 |
+
newsletter_debug(__FUNCTION__, 'Sent to ' . $r->id . ' success');
|
451 |
+
}
|
452 |
+
|
453 |
}
|
454 |
}
|
455 |
|
456 |
+
|
457 |
+
|
458 |
+
function newsletter_add_qs($url, $qs, $amp=true) {
|
459 |
+
if (strpos($url, '?') !== false) {
|
460 |
if ($amp) return $url . '&' . $qs;
|
461 |
else return $url . '&' . $qs;
|
462 |
}
|
469 |
* The email will contain an URL (or link) the user has to follow to complete the
|
470 |
* subscription (double opt-in).
|
471 |
*/
|
472 |
+
function newsletter_subscribe($email, $name='', $profile=null) {
|
|
|
473 |
global $wpdb, $newsletter_subscriber;
|
474 |
|
475 |
$options = get_option('newsletter');
|
476 |
|
477 |
$email = newsletter_normalize_email($email);
|
478 |
|
479 |
+
$name = newsletter_normalize_name($name);
|
480 |
+
|
481 |
+
$list = 0;
|
482 |
+
|
483 |
+
if ($profile == null) $profile = array();
|
484 |
+
|
485 |
// Check if this email is already in our database: if so, just resend the
|
486 |
// confirmation email.
|
487 |
+
$newsletter_subscriber = newsletter_get_subscriber_by_email($email, $list);
|
488 |
+
if (!$newsletter_subscriber) {
|
|
|
489 |
$token = md5(rand());
|
490 |
+
|
491 |
+
if (isset($options['noconfirmation'])) {
|
492 |
+
$status = 'C';
|
493 |
+
}
|
494 |
+
else {
|
495 |
+
$status = 'S';
|
496 |
+
}
|
497 |
+
@$wpdb->insert($wpdb->prefix . 'newsletter', array(
|
498 |
+
'email'=>$email,
|
499 |
+
'name'=>$name,
|
500 |
+
'token'=>$token,
|
501 |
+
'list'=>$list,
|
502 |
+
'status'=>$status
|
503 |
+
//'profile'=>serialize($profile)
|
504 |
+
));
|
505 |
+
$id = $wpdb->insert_id;
|
506 |
+
$newsletter_subscriber = newsletter_get_subscriber($id);
|
507 |
+
|
508 |
+
// Profile saving
|
509 |
+
foreach ($profile as $key=>$value) {
|
510 |
+
@$wpdb->insert($wpdb->prefix . 'newsletter_profiles', array(
|
511 |
+
'newsletter_id'=>$id,
|
512 |
+
'name'=>$key,
|
513 |
+
'value'=>$value));
|
514 |
+
}
|
515 |
+
|
516 |
}
|
517 |
|
518 |
+
if (isset($options['noconfirmation'])) {
|
519 |
+
newsletter_send_welcome($newsletter_subscriber);
|
520 |
+
}
|
521 |
+
else {
|
522 |
+
newsletter_send_confirmation($newsletter_subscriber);
|
523 |
+
}
|
524 |
|
525 |
+
$message = 'There is a new subscriber to ' . get_option('blogname') . ' newsletter:' . "\n\n" .
|
526 |
$name . ' <' . $email . '>' . "\n\n" .
|
527 |
'Have a nice day,' . "\n" . 'your Newsletter plugin.';
|
528 |
|
530 |
newsletter_notify_admin($subject, $message);
|
531 |
}
|
532 |
|
533 |
+
|
534 |
+
function newsletter_save($subscriber) {
|
535 |
+
global $wpdb;
|
536 |
+
|
537 |
+
$email = newsletter_normalize_email($email);
|
538 |
+
$name = newsletter_normalize_name($name);
|
539 |
+
$wpdb->query($wpdb->prepare("update " . $wpdb->prefix . "newsletter set email=%s, name=%s where id=%d",
|
540 |
+
$subscriber['email'], $subscriber['name'], $subscriber['id']));
|
541 |
+
}
|
542 |
+
|
543 |
+
|
544 |
/**
|
545 |
* Resends the confirmation message when asked by user manager panel.
|
546 |
*/
|
547 |
+
function newsletter_send_confirmation($subscriber) {
|
|
|
548 |
$options = get_option('newsletter');
|
549 |
|
550 |
+
newsletter_debug(__FUNCTION__, "Confirmation request to:\n" . print_r($subscriber, true));
|
|
|
|
|
551 |
|
552 |
$message = $options['confirmation_message'];
|
553 |
+
$html = newsletter_get_theme_html($options['theme']);
|
554 |
+
if ($html == null) $html = '{message}';
|
555 |
|
556 |
+
$message = str_replace('{message}', $message, $html);
|
557 |
+
|
558 |
// The full URL to the confirmation page
|
559 |
+
$url = newsletter_add_qs($options['url'], 'na=c&ni=' . $subscriber->id .
|
560 |
+
'&nt=' . $subscriber->token);
|
561 |
$message = newsletter_replace_url($message, 'SUBSCRIPTION_CONFIRM_URL', $url);
|
562 |
|
563 |
// URL to the unsubscription page (for test purpose)
|
564 |
+
$url = newsletter_add_qs($options['url'], 'na=u&ni=' . $subscriber->id .
|
565 |
+
'&nt=' . $subscriber->token);
|
566 |
$message = newsletter_replace_url($message, 'UNSUBSCRIPTION_URL', $url);
|
567 |
|
568 |
$message = newsletter_replace($message, $subscriber);
|
576 |
* Return a subscriber by his email. The email will be sanitized and normalized
|
577 |
* before issuing the query to the database.
|
578 |
*/
|
579 |
+
function newsletter_get_subscriber($id) {
|
|
|
580 |
global $wpdb;
|
581 |
|
582 |
+
$recipients = $wpdb->get_results($wpdb->prepare("select * from " . $wpdb->prefix .
|
583 |
+
"newsletter where id=%d", $id));
|
584 |
if (!$recipients) return null;
|
585 |
return $recipients[0];
|
586 |
}
|
587 |
|
588 |
+
function newsletter_get_subscriber_by_email($email, $list=0) {
|
589 |
+
global $wpdb;
|
590 |
+
|
591 |
+
$recipients = $wpdb->get_results($wpdb->prepare("select * from " . $wpdb->prefix .
|
592 |
+
"newsletter where email=%s and list=%d", $email, $list));
|
593 |
+
if (!$recipients) return null;
|
594 |
+
return $recipients[0];
|
595 |
+
}
|
596 |
+
|
597 |
+
function newsletter_get_all() {
|
598 |
global $wpdb;
|
599 |
|
600 |
$recipients = $wpdb->get_results("select * from " . $wpdb->prefix . "newsletter order by email");
|
601 |
return $recipients;
|
602 |
}
|
603 |
|
604 |
+
function newsletter_search($text, $status=null, $order='email') {
|
|
|
605 |
global $wpdb;
|
606 |
+
|
607 |
+
if ($order == 'id') $order = 'id desc';
|
608 |
+
|
609 |
+
$query = "select * from " . $wpdb->prefix . "newsletter where 1=1";
|
610 |
+
if ($status != null) {
|
611 |
+
$query .= " and status='" . $wpdb->escape($status) . "'";
|
612 |
}
|
613 |
+
|
614 |
+
if ($text == '') {
|
615 |
+
$recipients = $wpdb->get_results($query . " order by " . $order . ' limit 100');
|
616 |
+
}
|
617 |
+
else {
|
618 |
+
$recipients = $wpdb->get_results($query . " and email like '%" .
|
619 |
+
$wpdb->escape($text) . "%' or name like '%" . $wpdb->escape($text) . "%' order by " . $order . ' limit 100');
|
620 |
}
|
621 |
if (!$recipients) return null;
|
622 |
return $recipients;
|
623 |
}
|
624 |
|
625 |
+
function newsletter_get_unconfirmed() {
|
626 |
+
global $wpdb;
|
627 |
+
|
628 |
+
$recipients = $wpdb->get_results("select * from " . $wpdb->prefix . "newsletter where status='S' order by email");
|
629 |
+
return $recipients;
|
630 |
+
}
|
631 |
+
|
632 |
|
633 |
/**
|
634 |
* Normalize an email address,making it lowercase and trimming spaces.
|
635 |
*/
|
636 |
+
function newsletter_normalize_email($email) {
|
|
|
637 |
return strtolower(trim($email));
|
638 |
}
|
639 |
|
640 |
+
function newsletter_normalize_name($name) {
|
641 |
+
$name = str_replace(';', ' ', $name);
|
642 |
+
$name = strip_tags($name);
|
643 |
+
return $name;
|
644 |
+
}
|
645 |
+
|
646 |
add_action('init', 'newsletter_init');
|
647 |
/**
|
648 |
* Intercept the request parameters which drive the subscription and unsubscription
|
649 |
* process.
|
650 |
*/
|
651 |
+
function newsletter_init() {
|
|
|
652 |
global $newsletter_step, $wpdb, $newsletter_subscriber;
|
653 |
global $hyper_cache_stop;
|
654 |
|
656 |
$action = $_REQUEST['na'];
|
657 |
if (!$action) return;
|
658 |
|
659 |
+
$hyper_cache_stop = true;
|
660 |
+
|
661 |
+
if (defined('NEWSLETTER_EXTRAS')) newsletter_extra_init($action);
|
662 |
+
|
663 |
$options = get_option('newsletter');
|
664 |
|
|
|
665 |
|
666 |
+
// Subscription request from a subscription form (in page or widget), can be
|
667 |
+
// a direct subscription with no confirmation
|
668 |
+
if ($action == 's') {
|
669 |
if (!newsletter_is_email($_REQUEST['ne'])) {
|
670 |
die(newsletter_label('error_email'));
|
671 |
}
|
672 |
+
// If not set, the subscription form is not requesting the name, so we do not
|
673 |
+
// raise errors.
|
674 |
+
if (isset($_REQUEST['nn'])) {
|
675 |
+
if (trim($_REQUEST['nn']) == '') {
|
676 |
+
die(newsletter_label('error_name'));
|
677 |
+
}
|
678 |
+
}
|
679 |
+
else {
|
680 |
+
$_REQUEST['nn'] = '';
|
681 |
+
}
|
682 |
+
|
683 |
+
$profile1 = $_REQUEST['np'];
|
684 |
+
if (!isset($profile1) || !is_array($profile1)) $profile1 = array();
|
685 |
+
|
686 |
+
// keys starting with "_" are removed because used internally
|
687 |
+
$profile = array();
|
688 |
+
foreach ($profile1 as $k=>$v) {
|
689 |
+
if ($k[0] == '_') continue;
|
690 |
+
$profile[$k] = $v;
|
691 |
+
}
|
692 |
+
|
693 |
+
$profile['_ip'] = $_SERVER['REMOTE_ADDR'];
|
694 |
+
$profile['_referrer'] = $_SERVER['HTTP_REFERER'];
|
695 |
+
|
696 |
+
// Check if the group is good
|
697 |
+
newsletter_subscribe($_REQUEST['ne'], $_REQUEST['nn'], $profile);
|
698 |
+
|
699 |
+
if (isset($options['noconfirmation'])) {
|
700 |
+
$newsletter_step = 'confirmed';
|
701 |
}
|
702 |
+
else {
|
703 |
+
$newsletter_step = 'subscribed';
|
704 |
+
}
|
705 |
+
return;
|
706 |
}
|
707 |
|
708 |
// A request to confirm a subscription
|
709 |
+
if ($action == 'c') {
|
710 |
+
$id = $_REQUEST['ni'];
|
711 |
+
newsletter_confirm($id, $_REQUEST['nt']);
|
712 |
+
header('Location: ' . newsletter_add_qs($options['url'], 'na=cs&ni=' . $id, false));
|
|
|
713 |
die();
|
|
|
714 |
}
|
715 |
|
716 |
// Show the confirmed message after a redirection (to avoid mutiple email sending).
|
717 |
// Redirect is sent by action "c".
|
718 |
+
if ($action == 'cs') {
|
719 |
+
$newsletter_subscriber = newsletter_get_subscriber($_REQUEST['ni']);
|
|
|
720 |
$newsletter_step = 'confirmed';
|
721 |
}
|
722 |
|
723 |
// Unsubscription process has 2 options: if email and token are specified the user
|
724 |
// will only be asked to confirm. If there is no infos of who remove (when
|
725 |
// mass mail mode is used) the user will be asked to type the emailto be removed.
|
726 |
+
if ($action == 'u') {
|
|
|
727 |
$newsletter_step = 'unsubscription';
|
728 |
}
|
729 |
|
730 |
+
/*
|
731 |
// Export for Zanzara
|
732 |
+
if ($action == 'z') {
|
|
|
733 |
if (!$_GET['nk'] || $_GET['nk'] != $options['key']) return;
|
734 |
|
735 |
$options_email = get_option('newsletter_email');
|
777 |
|
778 |
$query = "select * from " . $wpdb->prefix . "newsletter where status='C'";
|
779 |
$recipients = $wpdb->get_results($query . " order by email");
|
780 |
+
for ($i=0; $i<count($recipients); $i++) {
|
|
|
781 |
echo $recipients[$i]->email . ';' . $recipients[$i]->name .
|
782 |
+
';' . $recipients[$i]->token . ';' . $recipients[$i]->id . ';' . $recipients[$i]->group . "\n";
|
783 |
}
|
784 |
echo ']]></string>' . "\n";
|
785 |
echo '</void>' . "\n";
|
786 |
|
787 |
echo '<void property="testRecipients">' . "\n";
|
788 |
echo '<string><![CDATA[';
|
789 |
+
for ($i=1; $i<=10; $i++) {
|
|
|
790 |
if (!$options_email['test_email_' . $i]) continue;
|
791 |
echo $options_email['test_email_' . $i] . ';' . $options_email['test_name_' . $i] .
|
792 |
+
';FAKETOKEN;0;0' . "\n";
|
793 |
}
|
794 |
echo ']]></string>' . "\n";
|
795 |
echo '</void>' . "\n";
|
798 |
echo '</java>' . "\n";
|
799 |
die();
|
800 |
}
|
801 |
+
*/
|
802 |
|
803 |
// User confirmed he want to unsubscribe clicking the link on unsubscription
|
804 |
// page
|
805 |
+
if ($action == 'uc') {
|
806 |
+
newsletter_unsubscribe($_REQUEST['ni'], $_REQUEST['nt']);
|
|
|
807 |
$newsletter_step = 'unsubscribed';
|
808 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
809 |
}
|
810 |
|
811 |
+
|
812 |
/**
|
813 |
* Deletes a subscription (no way back). Fills the global $newsletter_subscriber
|
814 |
+
* with subscriber data to be used to build up messages.
|
|
|
|
|
|
|
815 |
*/
|
816 |
+
function newsletter_unsubscribe($id, $token) {
|
|
|
817 |
global $newsletter_subscriber, $wpdb;
|
818 |
|
819 |
// Save the subscriber for good bye page
|
820 |
+
$newsletter_subscriber = newsletter_get_subscriber($id);
|
821 |
+
|
822 |
+
$wpdb->query($wpdb->prepare("delete from " . $wpdb->prefix . "newsletter where id=%d" .
|
823 |
+
" and token=%s", $id, $token));
|
824 |
|
825 |
+
$html = newsletter_get_theme_html($options['theme']);
|
826 |
+
if ($html == null) $html = '{message}';
|
827 |
+
$message = str_replace('{message}', $options['unsubscribed_message'], $html);
|
828 |
|
829 |
+
$message = newsletter_replace($message, $newsletter_subscriber);
|
830 |
+
|
831 |
+
// URL to the unsubscription page (for test purpose)
|
832 |
+
// $url = newsletter_add_qs($options['url'], 'na=u&ni=' . $newsletter_subscriber->id .
|
833 |
+
// '&nt=' . $newsletter_subscriber->token);
|
834 |
+
// $message = newsletter_replace_url($message, 'UNSUBSCRIPTION_URL', $url);
|
835 |
+
|
836 |
+
$subject = newsletter_replace($options['unsubscribed_subject'], $newsletter_subscriber);
|
837 |
+
|
838 |
+
newsletter_mail($newsletter_subscriber->email, $subject, $message);
|
839 |
+
|
840 |
+
|
841 |
+
// Admin notification
|
842 |
$message = 'There is an unsubscription to ' . get_option('blogname') . ' newsletter:' . "\n\n" .
|
843 |
+
$newsletter_subscriber->name . ' <' . $newsletter_subscriber->email . '>' . "\n\n" .
|
|
|
844 |
'Have a nice day,' . "\n" . 'your Newsletter plugin.';
|
845 |
|
846 |
$subject = '[' . get_option('blogname') . '] Unsubscription';
|
847 |
newsletter_notify_admin($subject, $message);
|
848 |
}
|
849 |
|
850 |
+
/*
|
851 |
+
* Deletes a specific subscription. Called only from the admin panel.
|
852 |
+
*/
|
853 |
+
function newsletter_delete($id) {
|
854 |
global $wpdb;
|
855 |
|
856 |
+
$wpdb->query($wpdb->prepare("delete from " . $wpdb->prefix . "newsletter where id=%d", $id));
|
857 |
}
|
858 |
|
859 |
+
function newsletter_delete_all($status=null) {
|
|
|
860 |
global $wpdb;
|
861 |
|
862 |
+
if ($status == null) {
|
|
|
863 |
$wpdb->query("delete from " . $wpdb->prefix . "newsletter");
|
864 |
}
|
865 |
+
else {
|
|
|
866 |
$wpdb->query("delete from " . $wpdb->prefix . "newsletter where status='" . $wpdb->escape($status) . "'");
|
867 |
}
|
868 |
}
|
869 |
|
870 |
/**
|
871 |
+
* Confirms a subscription identified by id and token, changing it's status on
|
872 |
* database. Fill the global $newsletter_subscriber with user data.
|
873 |
+
* If the subscription id already confirmed, the welcome email is still sent to
|
874 |
+
* the subscriber (the welcome email can contains somthing reserved to the user
|
875 |
+
* and he may has lost it).
|
876 |
+
* If id and token do not match, the function does nothing.
|
877 |
*/
|
878 |
+
function newsletter_confirm($id, $token) {
|
|
|
879 |
global $wpdb, $newsletter_subscriber;
|
880 |
|
881 |
+
$options = get_option('newsletter');
|
882 |
+
|
883 |
+
$newsletter_subscriber = newsletter_get_subscriber($id);
|
884 |
+
|
885 |
+
newsletter_info(__FUNCTION__, "Starting confirmation of subscriber " . $id);
|
886 |
+
|
887 |
+
if ($newsletter_subscriber == null) {
|
888 |
+
newsletter_error(__FUNCTION__, "Subscriber not found");
|
889 |
+
return;
|
890 |
+
}
|
891 |
+
|
892 |
+
if ($newsletter_subscriber->token != $token) {
|
893 |
+
newsletter_error(__FUNCTION__, "Token not matching");
|
894 |
+
return;
|
895 |
+
}
|
896 |
+
|
897 |
+
newsletter_debug(__FUNCTION__, "Confirming subscriber:\n" . print_r($newsletter_subscriber, true));
|
898 |
|
899 |
+
$count = $wpdb->query($wpdb->prepare("update " . $wpdb->prefix . "newsletter set status='C' where id=%d", $id));
|
900 |
+
|
901 |
+
newsletter_send_welcome($newsletter_subscriber);
|
902 |
+
}
|
903 |
+
|
904 |
+
function newsletter_send_welcome($subscriber) {
|
905 |
$options = get_option('newsletter');
|
906 |
|
907 |
+
newsletter_debug(__FUNCTION__, "Welcome message to:\n" . print_r($subscriber, true));
|
|
|
908 |
|
909 |
+
$html = newsletter_get_theme_html($options['theme']);
|
910 |
+
if ($html == null) $html = '{message}';
|
911 |
+
$message = str_replace('{message}', $options['confirmed_message'], $html);
|
912 |
|
913 |
+
$message = newsletter_replace($message, $subscriber);
|
914 |
|
915 |
// URL to the unsubscription page (for test purpose)
|
916 |
+
$url = newsletter_add_qs($options['url'], 'na=u&ni=' . $subscriber->id .
|
917 |
+
'&nt=' . $subscriber->token);
|
918 |
$message = newsletter_replace_url($message, 'UNSUBSCRIPTION_URL', $url);
|
919 |
|
920 |
+
$subject = newsletter_replace($options['confirmed_subject'], $subscriber);
|
921 |
|
922 |
+
newsletter_mail($subscriber->email, $subject, $message);
|
|
|
|
|
923 |
}
|
924 |
|
925 |
+
/*
|
926 |
+
* Changes the status of a subscription identified by its id.
|
927 |
+
*/
|
928 |
+
function newsletter_set_status($id, $status) {
|
929 |
global $wpdb;
|
930 |
|
931 |
+
$wpdb->query($wpdb->prepare("update " . $wpdb->prefix . "newsletter set status=%s where id=%d", $status, $id));
|
932 |
}
|
933 |
|
934 |
+
/*
|
935 |
+
* Sends a notification message to the blog admin.
|
936 |
+
*/
|
937 |
+
function newsletter_notify_admin(&$subject, &$message) {
|
938 |
$to = get_option('admin_email');
|
939 |
$headers .= "Content-type: text/plain; charset=UTF-8\n";
|
940 |
wp_mail($to, $subject, $message, $headers);
|
941 |
}
|
942 |
|
943 |
/**
|
944 |
+
* Sends out an email (html or text). From email and name is retreived from
|
945 |
+
* Newsletter plugin options. Return false on error. If the subject is empty
|
946 |
+
* no email is sent out without warning.
|
947 |
+
* The function uses wp_mail() to really send the message.
|
948 |
*/
|
949 |
+
function newsletter_mail($to, &$subject, &$message, $html=true) {
|
|
|
950 |
global $wpdb;
|
951 |
|
952 |
+
if ($subject == '') {
|
953 |
+
newsletter_debug(__FUNCTION__, 'Subject empty, skipped');
|
954 |
+
return true;
|
955 |
+
}
|
956 |
+
|
957 |
$options = get_option('newsletter');
|
958 |
|
959 |
$headers = "MIME-Version: 1.0\n";
|
960 |
+
if ($html) $headers .= "Content-type: text/html; charset=UTF-8\n";
|
961 |
+
else $headers .= "Content-type: text/plain; charset=UTF-8\n";
|
|
|
|
|
962 |
|
963 |
+
// Special character are manager by wp_mail()
|
964 |
$headers .= 'From: "' . $options['from_name'] . '" <' . $options['from_email'] . ">\n";
|
965 |
|
966 |
+
$r = wp_mail($to, $subject, $message, $headers);
|
967 |
+
if (!$r) {
|
968 |
+
newsletter_error(__FUNCTION__, "wp_mail() failed");
|
969 |
+
}
|
970 |
+
return $r;
|
|
|
|
|
|
|
|
|
|
|
|
|
971 |
}
|
972 |
|
973 |
|
974 |
add_action('activate_newsletter/plugin.php', 'newsletter_activate');
|
975 |
+
function newsletter_activate() {
|
|
|
976 |
global $wpdb;
|
977 |
|
978 |
+
$options = get_option('newsletter');
|
979 |
+
|
980 |
+
// Load the default options
|
981 |
+
@include_once(dirname(__FILE__) . '/languages/en_US_options.php');
|
982 |
+
if (WPLANG != '') @include_once(dirname(__FILE__) . '/languages/' . WPLANG . '_options.php');
|
983 |
+
//@include_once(ABSPATH . 'wp-content/newsletter/languages/custom_options.php');
|
984 |
+
|
985 |
+
if (is_array($options)) $options = array_merge($newsletter_default_options, $options);
|
986 |
+
else $options = $newsletter_default_options;
|
987 |
+
|
988 |
// SQL to create the table
|
989 |
$sql = 'create table if not exists ' . $wpdb->prefix . 'newsletter (
|
990 |
+
`id` int not null auto_increment primary key,
|
991 |
`name` varchar (100) not null default \'\',
|
992 |
`email` varchar (100) not null default \'\',
|
993 |
`token` varchar (50) not null default \'\',
|
994 |
`status` varchar (1) not null default \'S\',
|
995 |
+
`group` int not null default 0,
|
996 |
+
`profile` text
|
997 |
)';
|
998 |
|
999 |
@$wpdb->query($sql);
|
1000 |
|
1001 |
+
if (!isset($options['version']) || $options['version'] < '1.4.0') {
|
1002 |
|
1003 |
+
$sql = "alter table " . $wpdb->prefix . "newsletter drop primary key";
|
1004 |
+
@$wpdb->query($sql);
|
|
|
|
|
1005 |
|
1006 |
+
$sql = "alter table " . $wpdb->prefix . "newsletter add column id int not null auto_increment primary key";
|
1007 |
+
@$wpdb->query($sql);
|
1008 |
|
1009 |
+
$sql = "alter table " . $wpdb->prefix . "newsletter add column list int not null default 0";
|
1010 |
+
@$wpdb->query($sql);
|
1011 |
+
|
1012 |
+
$sql = "alter table " . $wpdb->prefix . "newsletter drop key email_token";
|
1013 |
+
@$wpdb->query($sql);
|
1014 |
+
|
1015 |
+
$sql = "alter table " . $wpdb->prefix . "newsletter add column profile text";
|
1016 |
+
@$wpdb->query($sql);
|
1017 |
+
|
1018 |
+
$sql = "ALTER TABLE " . $wpdb->prefix . "newsletter ADD UNIQUE email_list (email, list)";
|
1019 |
+
@$wpdb->query($sql);
|
1020 |
+
}
|
1021 |
+
|
1022 |
+
if (!isset($options['version']) || $options['version'] < '1.4.1') {
|
1023 |
+
$sql = "alter table " . $wpdb->prefix . "newsletter add column created timestamp not null default current_timestamp";
|
1024 |
+
@$wpdb->query($sql);
|
1025 |
+
}
|
1026 |
+
|
1027 |
+
$sql = 'create table if not exists ' . $wpdb->prefix . 'newsletter_profiles (
|
1028 |
+
`newsletter_id` int not null,
|
1029 |
+
`name` varchar (100) not null default \'\',
|
1030 |
+
`value` text,
|
1031 |
+
primary key (newsletter_id, name)
|
1032 |
+
)';
|
1033 |
|
1034 |
+
@$wpdb->query($sql);
|
1035 |
+
|
1036 |
+
newsletter_info(__FUNCTION__, 'Activated');
|
1037 |
+
|
1038 |
+
$options['version'] = NEWSLETTER;
|
1039 |
update_option('newsletter', $options);
|
1040 |
+
|
1041 |
+
if (defined('NEWSLETTER_EXTRAS')) newsletter_extra_activate();
|
1042 |
}
|
1043 |
|
1044 |
+
if (is_admin()) {
|
|
|
1045 |
add_action('admin_menu', 'newsletter_admin_menu');
|
1046 |
+
function newsletter_admin_menu() {
|
|
|
1047 |
$options = get_option('newsletter');
|
1048 |
$level = $options['editor']?7:10;
|
1049 |
|
1050 |
+
if (function_exists('add_menu_page')) {
|
|
|
1051 |
add_menu_page('Newsletter', 'Newsletter', $level, 'newsletter/options.php', '', '');
|
1052 |
}
|
1053 |
|
1054 |
+
if (function_exists('add_submenu_page')) {
|
|
|
1055 |
add_submenu_page('newsletter/options.php', 'Configuration', 'Configuration', $level, 'newsletter/options.php');
|
1056 |
add_submenu_page('newsletter/options.php', 'Composer', 'Composer', $level, 'newsletter/newsletter.php');
|
1057 |
add_submenu_page('newsletter/options.php', 'Import', 'Import', $level, 'newsletter/import.php');
|
1058 |
+
add_submenu_page('newsletter/options.php', 'Export', 'Export', $level, 'newsletter/export.php');
|
1059 |
add_submenu_page('newsletter/options.php', 'Manage', 'Manage', $level, 'newsletter/manage.php');
|
1060 |
+
add_submenu_page('newsletter/options.php', 'Statistics', 'Statistics', $level, 'newsletter/statistics.php');
|
1061 |
+
add_submenu_page('newsletter/options.php', 'Forms', 'Forms', $level, 'newsletter/forms.php');
|
1062 |
+
add_submenu_page('newsletter/options.php', 'Update', 'Update', $level, 'newsletter/convert.php');
|
1063 |
}
|
1064 |
}
|
1065 |
}
|
1067 |
/**
|
1068 |
* Fills a text with sunscriber data and blog data replacing some place holders.
|
1069 |
*/
|
1070 |
+
function newsletter_replace($text, $subscriber) {
|
|
|
1071 |
$text = str_replace('{home_url}', get_option('home'), $text);
|
1072 |
$text = str_replace('{blog_title}', get_option('blogname'), $text);
|
1073 |
$text = str_replace('{email}', $subscriber->email, $text);
|
1074 |
+
$text = str_replace('{id}', $subscriber->id, $text);
|
1075 |
$text = str_replace('{name}', $subscriber->name, $text);
|
1076 |
$text = str_replace('{token}', $subscriber->token, $text);
|
1077 |
return $text;
|
1082 |
* lowercase and betweeb curly brakets and the ones all uppercase. The tag to be passed
|
1083 |
* is the one all uppercase but the lowercase one will also be replaced.
|
1084 |
*/
|
1085 |
+
function newsletter_replace_url($text, $tag, $url) {
|
|
|
1086 |
$home = get_option('home') . '/';
|
1087 |
$tag_lower = strtolower($tag);
|
1088 |
$text = str_replace($home . '{' . $tag_lower . '}', $url, $text);
|
1095 |
return $text;
|
1096 |
}
|
1097 |
|
1098 |
+
function newsletter_is_email($email, $empty_ok=false) {
|
1099 |
+
$email = strtolower(trim($email));
|
|
|
1100 |
if ($empty_ok && $email == '') return true;
|
1101 |
|
1102 |
+
if (eregi("^([a-z0-9_\.-])+@(([a-z0-9_-])+\\.)+[a-z]{2,6}$", trim($email))) {
|
1103 |
+
if (strpos($email, 'mailinator.com') !== false) return false;
|
1104 |
+
if (strpos($email, 'guerrillamailblock.com') !== false) return false;
|
1105 |
+
return true;
|
1106 |
+
}
|
1107 |
else
|
1108 |
+
return false;
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
function newsletter_delete_batch_file() {
|
1112 |
+
@unlink(dirname(__FILE__) . '/batch.dat');
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
function newsletter_save_batch_file($batch) {
|
1116 |
+
$file = @fopen(dirname(__FILE__) . '/batch.dat', 'w');
|
1117 |
+
if (!$file) return;
|
1118 |
+
@fwrite($file, serialize($batch));
|
1119 |
+
@fclose($file);
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
function newsletter_load_batch_file() {
|
1123 |
+
$content = @file_get_contents(dirname(__FILE__) . '/batch.dat');
|
1124 |
+
return @unserialize($content);
|
1125 |
}
|
1126 |
|
1127 |
/**
|
1128 |
* Write a line of log in the log file if the logs are enabled or force is
|
1129 |
* set to true.
|
1130 |
*/
|
1131 |
+
function newsletter_log($text) {
|
1132 |
+
$file = @fopen(dirname(__FILE__) . '/newsletter.log', 'a');
|
1133 |
+
if (!$file) return;
|
1134 |
+
@fwrite($file, date('Y-m-d h:i') . ' ' . $text . "\n");
|
1135 |
+
@fclose($file);
|
1136 |
+
}
|
1137 |
+
|
1138 |
+
function newsletter_debug($fn, $text) {
|
1139 |
$options = get_option('newsletter');
|
1140 |
+
if ($options['logs'] < 2) return;
|
1141 |
+
newsletter_log('- DEBUG - ' . $fn . ' - ' . $text);
|
1142 |
+
}
|
1143 |
|
1144 |
+
function newsletter_info($fn, $text) {
|
1145 |
+
$options = get_option('newsletter');
|
1146 |
+
if ($options['logs'] < 1) return;
|
1147 |
+
newsletter_log('- INFO - ' . $fn . ' - ' . $text);
|
1148 |
+
}
|
1149 |
|
1150 |
+
function newsletter_error($fn, $text) {
|
1151 |
+
$options = get_option('newsletter');
|
1152 |
+
if ($options['logs'] < 1) return;
|
1153 |
+
newsletter_log('- ERROR - ' . $fn . ' - ' . $text);
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
/**
|
1157 |
+
* Retrieves a list of custom themes located under wp-plugins/newsletter-custom/themes.
|
1158 |
+
* Return a list of theme names (which are folder names where the theme files are stored.
|
1159 |
+
*/
|
1160 |
+
function newsletter_get_themes() {
|
1161 |
+
$handle = @opendir(ABSPATH . 'wp-content/plugins/newsletter-custom/themes');
|
1162 |
+
$list = array();
|
1163 |
+
if (!$handle) return $list;
|
1164 |
+
while ($file = readdir($handle)) {
|
1165 |
+
if ($file == '.' || $file == '..') continue;
|
1166 |
+
if (!is_dir(ABSPATH . 'wp-content/plugins/newsletter-custom/themes/' . $file)) continue;
|
1167 |
+
if (!is_file(ABSPATH . 'wp-content/plugins/newsletter-custom/themes/' . $file . '/theme.php')) continue;
|
1168 |
+
$list[] = $file;
|
1169 |
+
}
|
1170 |
+
closedir($handle);
|
1171 |
+
return $list;
|
1172 |
+
}
|
1173 |
+
|
1174 |
+
function newsletter_get_extras_themes() {
|
1175 |
+
$handle = @opendir(ABSPATH . 'wp-content/plugins/newsletter-extras/themes');
|
1176 |
+
$list = array();
|
1177 |
+
if (!$handle) return $list;
|
1178 |
+
while ($file = readdir($handle)) {
|
1179 |
+
if ($file == '.' || $file == '..') continue;
|
1180 |
+
if (!is_dir(ABSPATH . 'wp-content/plugins/newsletter-extras/themes/' . $file)) continue;
|
1181 |
+
if (!is_file(ABSPATH . 'wp-content/plugins/newsletter-extras/themes/' . $file . '/theme.php')) continue;
|
1182 |
+
$list[] = $file;
|
1183 |
+
}
|
1184 |
+
closedir($handle);
|
1185 |
+
return $list;
|
1186 |
+
}
|
1187 |
+
|
1188 |
+
/**
|
1189 |
+
* Resets the batch status.
|
1190 |
+
*/
|
1191 |
+
function newsletter_reset_batch() {
|
1192 |
+
|
1193 |
+
}
|
1194 |
+
|
1195 |
+
function newsletter_has_extras($version=null) {
|
1196 |
+
if (!defined('NEWSLETTER_EXTRAS')) return false;
|
1197 |
+
if ($version == null) return true;
|
1198 |
+
if ($version >= NEWSLETTER_EXTRAS) return true;
|
1199 |
+
return false;
|
1200 |
+
}
|
1201 |
+
|
1202 |
+
/**
|
1203 |
+
* Find an image for a post checking the media uploaded for the post and
|
1204 |
+
* choosing the first image found.
|
1205 |
+
*/
|
1206 |
+
function nt_post_image($post_id, $size='thumbnail', $alternative=null) {
|
1207 |
+
|
1208 |
+
$attachments = get_children(array('post_parent'=>$post_id, 'post_status'=>'inherit', 'post_type'=>'attachment', 'post_mime_type'=>'image', 'order'=>'ASC', 'orderby'=>'menu_order ID' ) );
|
1209 |
+
|
1210 |
+
if (empty($attachments)) {
|
1211 |
+
return $alternative;
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
foreach ($attachments as $id=>$attachment) {
|
1215 |
+
$image = wp_get_attachment_image_src($id, $size);
|
1216 |
+
//$image = $image[0];
|
1217 |
+
return $image[0];
|
1218 |
+
}
|
1219 |
+
return null;
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
function nt_option($name, $def = null) {
|
1223 |
+
$options = get_option('newsletter_email');
|
1224 |
+
$option = $options['theme_' . $name];
|
1225 |
+
if (!isset($option)) return $def;
|
1226 |
+
else return $option;
|
1227 |
+
}
|
1228 |
+
|
1229 |
+
/**
|
1230 |
+
* Retrieves the theme dir path.
|
1231 |
+
*/
|
1232 |
+
function newsletter_get_theme_dir($theme) {
|
1233 |
+
if ($theme[0] == '*') {
|
1234 |
+
return ABSPATH . '/wp-content/plugins/newsletter-custom/themes/' . substr($theme, 1);
|
1235 |
+
}
|
1236 |
+
elseif ($theme[0] == '$') {
|
1237 |
+
return ABSPATH . '/wp-content/plugins/newsletter-extras/themes/' . substr($theme, 1);
|
1238 |
+
}
|
1239 |
+
else {
|
1240 |
+
return dirname(__FILE__) . '/themes/' . $theme;
|
1241 |
+
}
|
1242 |
+
}
|
1243 |
+
|
1244 |
+
/**
|
1245 |
+
* Retrieves the theme URL (pointing to theme dir).
|
1246 |
+
*/
|
1247 |
+
function newsletter_get_theme_url($theme) {
|
1248 |
+
if ($theme[0] == '*') {
|
1249 |
+
return get_option('siteurl') . '/wp-content/plugins/newsletter-custom/themes/' . substr($theme, 1);
|
1250 |
+
}
|
1251 |
+
elseif ($theme[0] == '$') {
|
1252 |
+
return get_option('siteurl') . '/wp-content/plugins/newsletter-extras/themes/' . substr($theme, 1);
|
1253 |
+
}
|
1254 |
+
else {
|
1255 |
+
return get_option('siteurl') . '/wp-content/plugins/newsletter/themes/' . $theme;
|
1256 |
+
}
|
1257 |
+
}
|
1258 |
+
|
1259 |
+
/**
|
1260 |
+
* Loads the theme css content to be embedded in emails body.
|
1261 |
+
*/
|
1262 |
+
function newsletter_get_theme_css($theme) {
|
1263 |
+
if ($theme == 'blank') return '';
|
1264 |
+
return @file_get_contents(newsletter_get_theme_dir($theme) . '/style.css');
|
1265 |
+
}
|
1266 |
+
|
1267 |
+
function newsletter_get_theme_html($theme)
|
1268 |
+
{
|
1269 |
+
if ($theme == 'blank') return '';
|
1270 |
+
$file = newsletter_get_theme_dir($theme) . '/theme.php';
|
1271 |
+
|
1272 |
+
// Execute the theme file and get the content generated
|
1273 |
+
ob_start();
|
1274 |
+
@include($file);
|
1275 |
+
$html = ob_get_contents();
|
1276 |
+
ob_end_clean();
|
1277 |
+
return $html;
|
1278 |
}
|
1279 |
?>
|
readme.txt
CHANGED
@@ -2,41 +2,31 @@
|
|
2 |
=== Newsletter ===
|
3 |
Tags: newsletter,email,subscription,mass mail
|
4 |
Requires at least: 2.7
|
5 |
-
Tested up to: 2.
|
6 |
Stable tag: trunk
|
7 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2545483
|
8 |
Contributors: satollo
|
9 |
|
10 |
-
Newsletter is a
|
11 |
-
newsletters.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
This plug-in lets you collect subscribers on your blog with a double opt-in
|
18 |
subscription process. Double opt-in means the user has to confirm a subscription
|
19 |
following simple standard instructions sent to him via email.
|
20 |
|
21 |
-
Each step of subscribe and unsubscribe process is fully configurable
|
22 |
-
configurable).
|
23 |
|
24 |
The plug-in has a simple visual composer to create your newsletter
|
25 |
-
and send it to subscribers.
|
|
|
26 |
|
27 |
-
Emails are sent one-per-user, so subject and body can be customized
|
28 |
-
|
29 |
|
30 |
-
|
31 |
|
32 |
-
The plug-in is still under development and the features mentioned below will be rolled out a little a time:
|
33 |
|
34 |
-
* themes for emails
|
35 |
-
* auto-composer to create an email with blog contents
|
36 |
-
* subscribers importer
|
37 |
-
* subscribers exporter
|
38 |
-
* mass mail support
|
39 |
-
* PHP execution timeout bypass
|
40 |
|
41 |
**Check out my other plug-ins**:
|
42 |
|
2 |
=== Newsletter ===
|
3 |
Tags: newsletter,email,subscription,mass mail
|
4 |
Requires at least: 2.7
|
5 |
+
Tested up to: 2.9.1
|
6 |
Stable tag: trunk
|
7 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2545483
|
8 |
Contributors: satollo
|
9 |
|
10 |
+
Newsletter is a plug-in to collect subscribers and send out newsletters.
|
|
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
This plug-in lets you collect subscribers on your blog with a single or double opt-in
|
|
|
|
|
15 |
subscription process. Double opt-in means the user has to confirm a subscription
|
16 |
following simple standard instructions sent to him via email.
|
17 |
|
18 |
+
Each step of subscribe and unsubscribe process is fully configurable.
|
|
|
19 |
|
20 |
The plug-in has a simple visual composer to create your newsletter
|
21 |
+
and send it to subscribers. The newsletter message can be auto composed starting
|
22 |
+
with blog content and themes.
|
23 |
|
24 |
+
Emails are sent one-per-user, so subject and body can be customized
|
25 |
+
with subscriber name.
|
26 |
|
27 |
+
More on Newsletter plug-in official page (http://www.satollo.net/plugins/newsletter).
|
28 |
|
|
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
**Check out my other plug-ins**:
|
32 |
|
statistics.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
|
3 |
+
<h2>Statistics</h2>
|
4 |
+
|
5 |
+
<?php if (!defined('NEWSLETTER_EXTRAS')) { ?>
|
6 |
+
<strong>You need the <a href="http://www.satollo.net/plugins/newsletter/extras">Newsletter Extras</a> installed to view statistics</strong>
|
7 |
+
<?php } else { ?>
|
8 |
+
<?php require_once ABSPATH . 'wp-content/plugins/newsletter-extras/statistics.php'; ?>
|
9 |
+
<?php } ?>
|
10 |
+
|
11 |
+
</div>
|
themes/blank/theme.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
Blank theme, use your fantasy!
|
themes/default.html
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<p><span style="font-size: 30px; font-family: georgia">{blog_title}</span></p>
|
2 |
-
|
3 |
-
<h3><a href="{link_1}">{title_1}</a></h3>
|
4 |
-
<p>{excerpt_1}</p>
|
5 |
-
<h3><a href="{link_2}">{title_2}</a></h3>
|
6 |
-
<p>{excerpt_2}</p>
|
7 |
-
<h3><a href="{link_3}">{title_3}</a></h3>
|
8 |
-
<p>{excerpt_3}</p>
|
9 |
-
<h3><a href="{link_4}">{title_4}</a></h3>
|
10 |
-
<p>{excerpt_4}</p>
|
11 |
-
<h3><a href="{link_5}">{title_5}</a></h3>
|
12 |
-
<p>{excerpt_5}</p>
|
13 |
-
<h3><a href="{link_6}">{title_6}</a></h3>
|
14 |
-
<p>{excerpt_6}</p>
|
15 |
-
<h3><a href="{link_7}">{title_7}</a></h3>
|
16 |
-
<p>{excerpt_7}</p>
|
17 |
-
<h3><a href="{link_8}">{title_8}</a></h3>
|
18 |
-
<p>{excerpt_8}</p>
|
19 |
-
<h3><a href="{link_9}">{title_9}</a></h3>
|
20 |
-
<p>{excerpt_9}</p>
|
21 |
-
<h3><a href="{link_10}">{title_10}</a></h3>
|
22 |
-
<p>{excerpt_10}</p>
|
23 |
-
|
24 |
-
<p>
|
25 |
-
Yours, {blog_title}.
|
26 |
-
</p>
|
27 |
-
|
28 |
-
<p><small>To unsubscribe <a href="{unsubscription_url}">follow this link</a>.<br />
|
29 |
-
If you cannot follow the previous link, copy and past the address below in your browser:<br />
|
30 |
-
<br />
|
31 |
-
{unsubscription_url}
|
32 |
-
</small></p>
|
33 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
themes/default/it_IT.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$texts['footer'] = '<p>Per non ricevere più questa newsletter <a href="{unsubscription_url}">clicca qui</a>.</p>';
|
3 |
+
$texts['header'] = '<p>Ciao {name},</p>
|
4 |
+
<p>ecco le ultime dal sito:</p>';
|
5 |
+
?>
|
themes/default/style.css
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body, td {
|
2 |
+
font-family: verdana;
|
3 |
+
font-size: 12px;
|
4 |
+
}
|
5 |
+
|
themes/default/theme.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
global $post;
|
3 |
+
|
4 |
+
$texts['footer'] = '<p>To unsubscribe <a href="{unsubscription_url}">click here</a>.</p>';
|
5 |
+
$texts['header'] = '<p>Hi {name},</p>
|
6 |
+
<p>here the lastest news:</p>';
|
7 |
+
|
8 |
+
//$posts = get_posts('numberposts=10');
|
9 |
+
query_posts('showposts=' . nt_option('posts', 10) . '&post_status=publish');
|
10 |
+
?>
|
11 |
+
<div style="font-family: sans-serif; font-size: 24px; color: #999"><?php echo get_option('blogname'); ?></div>
|
12 |
+
|
13 |
+
<?php echo $texts['header']; ?>
|
14 |
+
|
15 |
+
<?php
|
16 |
+
while (have_posts())
|
17 |
+
{
|
18 |
+
the_post();
|
19 |
+
|
20 |
+
?>
|
21 |
+
<div><a style="font-size: 16px; text-decoration: none; color: #369" href="<?php echo get_permalink(); ?>"><?php the_title(); ?></a></div>
|
22 |
+
<div><?php echo the_excerpt(); ?></div>
|
23 |
+
<div style="height: 30px; clear: both"></div>
|
24 |
+
<?php
|
25 |
+
}
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php echo $texts['footer']; ?>
|
29 |
+
|
30 |
+
<?php wp_reset_query(); ?>
|
themes/messages/theme.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div style="background-color: #999; padding: 30px;">
|
2 |
+
<div style="background-color: #fff; border: 3px solid #666; padding: 20px;">
|
3 |
+
|
4 |
+
<div style="font-family: sans-serif; font-size: 24px; color: #999"><?php echo get_option('blogname'); ?></div>
|
5 |
+
|
6 |
+
{message}
|
7 |
+
|
8 |
+
</div>
|
9 |
+
</div>
|
themes/picture.html
DELETED
@@ -1,51 +0,0 @@
|
|
1 |
-
<div style="background-color: #444444;">
|
2 |
-
|
3 |
-
<table width="550" cellpadding="10" align="center" style="margin-top: 30px; background-color: #ffffff; border: 5px solid #3B3B3B; ">
|
4 |
-
<tr>
|
5 |
-
<td>
|
6 |
-
<span style="font-size: 30px; font-family: georgia">{blog_title}</span>
|
7 |
-
</td>
|
8 |
-
</tr>
|
9 |
-
<tr>
|
10 |
-
<td>
|
11 |
-
<img src="{image_1}" width="50" align="right" hspace="10"/><a style="color: #5482C8; font-weight: bold;" href="{link_1}">{title_1}</a><br />
|
12 |
-
{excerpt_1}
|
13 |
-
</td>
|
14 |
-
</tr>
|
15 |
-
<tr>
|
16 |
-
<td>
|
17 |
-
<img src="{image_2}" width="50" align="right" hspace="10"/><a style="color: #5482C8; font-weight: bold;" href="{link_2}">{title_2}</a><br />
|
18 |
-
{excerpt_2}
|
19 |
-
</td>
|
20 |
-
</tr>
|
21 |
-
<tr>
|
22 |
-
<td>
|
23 |
-
<img src="{image_3}" width="50" align="right" hspace="10"/><a style="color: #5482C8; font-weight: bold;" href="{link_3}">{title_3}</a><br />
|
24 |
-
{excerpt_3}
|
25 |
-
</td>
|
26 |
-
</tr>
|
27 |
-
<tr>
|
28 |
-
<td>
|
29 |
-
<img src="{image_4}" width="50" align="right" hspace="10"/><a style="color: #5482C8; font-weight: bold;" href="{link_4}">{title_4}</a><br />
|
30 |
-
{excerpt_4}
|
31 |
-
</td>
|
32 |
-
</tr>
|
33 |
-
<tr>
|
34 |
-
<td>
|
35 |
-
<img src="{image_5}" width="50" align="right" hspace="10"/><a style="color: #5482C8; font-weight: bold;" href="{link_5}">{title_5}</a><br />
|
36 |
-
{excerpt_5}
|
37 |
-
</td>
|
38 |
-
</tr>
|
39 |
-
<tr>
|
40 |
-
<td>
|
41 |
-
Yours, {blog_title}.
|
42 |
-
</td>
|
43 |
-
</tr>
|
44 |
-
<tr>
|
45 |
-
<td>
|
46 |
-
<p>To unsubscribe <a href="{unsubscription_url}">follow this link</a>. If you cannot follow the previous link, copy and past the address below in your browser:</p><p>{unsubscription_url}</p>
|
47 |
-
</td>
|
48 |
-
</tr>
|
49 |
-
</table>
|
50 |
-
|
51 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{images → themes/with-picture}/empty.gif
RENAMED
File without changes
|
themes/with-picture/it_IT.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$texts['footer'] = '<p>Per non ricevere più questa newsletter <a href="{unsubscription_url}">clicca qui</a>.</p>';
|
3 |
+
$texts['header'] = '<p>Ciao {name},</p>
|
4 |
+
<p>ecco le ultime dal sito:</p>';
|
5 |
+
?>
|
themes/with-picture/theme.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
global $post;
|
3 |
+
|
4 |
+
$texts['footer'] = '<p>To unsubscribe <a href="{unsubscription_url}">click here</a>.</p>';
|
5 |
+
$texts['header'] = '<p>Hi {name},</p>
|
6 |
+
<p>here the lastest news:</p>';
|
7 |
+
|
8 |
+
@include(dirname(__FILE__) . '/' . WPLANG . '.php');
|
9 |
+
|
10 |
+
query_posts('showposts=' . nt_option('posts', 10) . '&post_status=publish');
|
11 |
+
$empty_image = get_option('blogurl') . '/wp-content/plugins/newsletter/themes/with-picture/empty.gif';
|
12 |
+
?>
|
13 |
+
|
14 |
+
<div style="background-color: #444444;">
|
15 |
+
|
16 |
+
<table width="550" cellpadding="10" align="center" style="margin-top: 30px; background-color: #ffffff; border: 5px solid #3B3B3B; ">
|
17 |
+
<tr><td>
|
18 |
+
<?php echo $texts['header']; ?>
|
19 |
+
|
20 |
+
<table cellspacing="10">
|
21 |
+
<?php while (have_posts()) { the_post(); ?>
|
22 |
+
<tr>
|
23 |
+
<td valign="top">
|
24 |
+
<a href="<?php echo get_permalink(); ?>"><img src="<?php echo nt_post_image($post->ID, 'thumbnail', $empty_image); ?>" width="100"/></a>
|
25 |
+
</td>
|
26 |
+
<td valign="top" align="left">
|
27 |
+
<a href="<?php echo get_permalink(); ?>"><strong><?php the_title(); ?></strong></a><br />
|
28 |
+
<?php echo the_excerpt(); ?>
|
29 |
+
</td>
|
30 |
+
</tr>
|
31 |
+
<?php } ?>
|
32 |
+
</table>
|
33 |
+
|
34 |
+
<?php echo $texts['footer']; ?>
|
35 |
+
</td></tr>
|
36 |
+
</table>
|
37 |
+
</div>
|
38 |
+
|
39 |
+
<?php wp_reset_query(); ?>
|
tiny_mce/plugins/fullscreen/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(c,d){var e=this,f={},b;e.editor=c;c.addCommand("mceFullScreen",function(){var h,i=a.doc.documentElement;if(c.getParam("fullscreen_is_enabled")){if(c.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",e.resizeFunc);tinyMCE.get(c.getParam("fullscreen_editor_id")).setContent(c.getContent({format:"raw"}),{format:"raw"});tinyMCE.remove(c);a.remove("mce_fullscreen_container");i.style.overflow=c.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",c.getParam("fullscreen_overflow"));a.win.scrollTo(c.getParam("fullscreen_scrollx"),c.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(c.getParam("fullscreen_new_window")){h=a.win.open(d+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{h.resizeTo(screen.availWidth,screen.availHeight)}catch(g){}}else{tinyMCE.oldSettings=tinyMCE.settings;f.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";f.fullscreen_html_overflow=a.getStyle(i,"overflow",1);b=a.getViewPort();f.fullscreen_scrollx=b.x;f.fullscreen_scrolly=b.y;if(tinymce.isOpera&&f.fullscreen_overflow=="visible"){f.fullscreen_overflow="auto"}if(tinymce.isIE&&f.fullscreen_overflow=="scroll"){f.fullscreen_overflow="auto"}if(tinymce.isIE&&(f.fullscreen_html_overflow=="visible"||f.fullscreen_html_overflow=="scroll")){f.fullscreen_html_overflow="auto"}if(f.fullscreen_overflow=="0px"){f.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");i.style.overflow="hidden";b=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){b.h-=1}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+(tinymce.isIE6||(tinymce.isIE&&!a.boxModel)?"absolute":"fixed")+";top:0;left:0;width:"+b.w+"px;height:"+b.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(c.settings,function(j,k){f[k]=j});f.id="mce_fullscreen";f.width=n.clientWidth;f.height=n.clientHeight-15;f.fullscreen_is_enabled=true;f.fullscreen_editor_id=c.id;f.theme_advanced_resizing=false;f.save_onsavecallback=function(){c.setContent(tinyMCE.get(f.id).getContent({format:"raw"}),{format:"raw"});c.execCommand("mceSave")};tinymce.each(c.getParam("fullscreen_settings"),function(l,j){f[j]=l});if(f.theme_advanced_toolbar_location==="external"){f.theme_advanced_toolbar_location="top"}e.fullscreenEditor=new tinymce.Editor("mce_fullscreen",f);e.fullscreenEditor.onInit.add(function(){e.fullscreenEditor.setContent(c.getContent());e.fullscreenEditor.focus()});e.fullscreenEditor.render();tinyMCE.add(e.fullscreenEditor);e.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");e.fullscreenElement.update();e.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var j=tinymce.DOM.getViewPort();e.fullscreenEditor.theme.resizeTo(j.w,j.h)})}});c.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});c.onNodeChange.add(function(h,g){g.setActive("fullscreen",h.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
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
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({format : 'raw'}), {format : 'raw'});
|
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 |
+
n = DOM.add(DOM.doc.body, 'div', {id : 'mce_fullscreen_container', style : 'position:' + (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel) ? 'absolute' : 'fixed') + ';top:0;left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'});
|
82 |
+
DOM.add(n, 'div', {id : 'mce_fullscreen'});
|
83 |
+
|
84 |
+
tinymce.each(ed.settings, function(v, n) {
|
85 |
+
s[n] = v;
|
86 |
+
});
|
87 |
+
|
88 |
+
s.id = 'mce_fullscreen';
|
89 |
+
s.width = n.clientWidth;
|
90 |
+
s.height = n.clientHeight - 15;
|
91 |
+
s.fullscreen_is_enabled = true;
|
92 |
+
s.fullscreen_editor_id = ed.id;
|
93 |
+
s.theme_advanced_resizing = false;
|
94 |
+
s.save_onsavecallback = function() {
|
95 |
+
ed.setContent(tinyMCE.get(s.id).getContent({format : 'raw'}), {format : 'raw'});
|
96 |
+
ed.execCommand('mceSave');
|
97 |
+
};
|
98 |
+
|
99 |
+
tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) {
|
100 |
+
s[k] = v;
|
101 |
+
});
|
102 |
+
|
103 |
+
if (s.theme_advanced_toolbar_location === 'external')
|
104 |
+
s.theme_advanced_toolbar_location = 'top';
|
105 |
+
|
106 |
+
t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
|
107 |
+
t.fullscreenEditor.onInit.add(function() {
|
108 |
+
t.fullscreenEditor.setContent(ed.getContent());
|
109 |
+
t.fullscreenEditor.focus();
|
110 |
+
});
|
111 |
+
|
112 |
+
t.fullscreenEditor.render();
|
113 |
+
tinyMCE.add(t.fullscreenEditor);
|
114 |
+
|
115 |
+
t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container');
|
116 |
+
t.fullscreenElement.update();
|
117 |
+
//document.body.overflow = 'hidden';
|
118 |
+
|
119 |
+
t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() {
|
120 |
+
var vp = tinymce.DOM.getViewPort();
|
121 |
+
|
122 |
+
t.fullscreenEditor.theme.resizeTo(vp.w, vp.h);
|
123 |
+
});
|
124 |
+
}
|
125 |
+
});
|
126 |
+
|
127 |
+
// Register buttons
|
128 |
+
ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'});
|
129 |
+
|
130 |
+
ed.onNodeChange.add(function(ed, cm) {
|
131 |
+
cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled'));
|
132 |
+
});
|
133 |
+
},
|
134 |
+
|
135 |
+
getInfo : function() {
|
136 |
+
return {
|
137 |
+
longname : 'Fullscreen',
|
138 |
+
author : 'Moxiecode Systems AB',
|
139 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
140 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',
|
141 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
142 |
+
};
|
143 |
+
}
|
144 |
+
});
|
145 |
+
|
146 |
+
// Register plugin
|
147 |
+
tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin);
|
148 |
+
})();
|
tiny_mce/plugins/fullscreen/fullscreen.htm
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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></title>
|
5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
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/themes/advanced/color_picker.htm
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
<fieldset>
|
22 |
<legend>{#advanced_dlg.colorpicker_picker_title}</legend>
|
23 |
<div id="picker">
|
24 |
-
<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="
|
25 |
|
26 |
<div id="light">
|
27 |
<!-- Will be filled with divs -->
|
21 |
<fieldset>
|
22 |
<legend>{#advanced_dlg.colorpicker_picker_title}</legend>
|
23 |
<div id="picker">
|
24 |
+
<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="" />
|
25 |
|
26 |
<div id="light">
|
27 |
<!-- Will be filled with divs -->
|
tiny_mce/themes/advanced/editor_template.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.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(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",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",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",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",readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";if(j.settings.convert_fonts_to_spans){o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}j.onInit.add(function(){j.onNodeChange.add(l._nodeChanged,l);if(j.settings.content_css!==false){j.dom.loadCSS(j.baseURI.toAbsolute("themes/advanced/skins/"+j.settings.skin+"/content.css"))}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){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((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(j){var i=this.editor,k=i.controlManager.get("styleselect");if(k.getLength()==0){f(i.dom.getClasses(),function(l){k.add(l["class"],l["class"])})}},_createStyleSelect:function(m){var j=this,i=j.editor,k=i.controlManager,l=k.createListBox("styleselect",{title:"advanced.style_select",onselect:function(n){if(l.selectedValue===n){i.execCommand("mceSetStyleInfo",0,{command:"removeformat"});l.select();return false}else{i.execCommand("mceSetCSSClass",0,n)}}});if(l){f(i.getParam("theme_advanced_styles","","hash"),function(o,n){if(o){l.add(j.editor.translate(n),o)}});l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",j._importClasses,j);b.add(p.id+"_text","mousedown",j._importClasses,j);b.add(p.id+"_open","focus",j._importClasses,j);b.add(p.id+"_open","mousedown",j._importClasses,j)}else{b.add(p.id,"focus",j._importClasses,j)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",cmd:"FontName"});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){if(i.fontSize){k.execCommand("FontSize",false,i.fontSize)}else{f(m.settings.theme_advanced_font_sizes,function(p,o){if(p["class"]){j.push(p["class"])}});k.editorCommands._applyInlineStyle("span",{"class":i["class"]},{check_classes:j})}}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={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"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",cmd:"FormatBlock"});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;m=j=d.create("span",{id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=d.stdMode?u.getElementsByTagName("tr"):u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_tbl");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,l){var j=this.editor,k=j.settings,n=d.get(j.id+"_tbl"),o=d.get(j.id+"_ifr"),m;i=Math.max(k.theme_advanced_resizing_min_width||100,i);l=Math.max(k.theme_advanced_resizing_min_height||100,l);i=Math.min(k.theme_advanced_resizing_max_width||65535,i);l=Math.min(k.theme_advanced_resizing_max_height||65535,l);m=n.clientHeight-o.clientHeight;d.setStyle(o,"height",l-m);d.setStyles(n,{width:i,height:l})},destroy:function(){var i=this.editor.id;b.clear(i+"_resize");b.clear(i+"_path_row");b.clear(i+"_external_close")},_simpleLayout:function(y,r,k,i){var x=this,u=x.editor,v=y.theme_advanced_toolbar_location,m=y.theme_advanced_statusbar_location,l,j,q,w;if(y.readonly){l=d.add(r,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"});return j}if(v=="top"){x._addToolbars(r,k)}if(v=="external"){l=w=d.create("div",{style:"position:relative"});l=d.add(l,"div",{id:u.id+"_external","class":"mceExternalToolbar"});d.add(l,"a",{id:u.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});l=d.add(l,"table",{id:u.id+"_tblext",cellSpacing:0,cellPadding:0});q=d.add(l,"tbody");if(i.firstChild.className=="mceOldBoxModel"){i.firstChild.appendChild(w)}else{i.insertBefore(w,i.firstChild)}x._addToolbars(q,k);u.onMouseUp.add(function(){var o=d.get(u.id+"_external");d.show(o);d.hide(g);var n=b.add(u.id+"_external_close","click",function(){d.hide(u.id+"_external");b.remove(u.id+"_external_close","click",n)});d.show(o);d.setStyle(o,"top",0-d.getRect(u.id+"_tblext").h-1);d.hide(o);d.show(o);o.style.filter="";g=u.id+"_external";o=null})}if(m=="top"){x._addStatusBar(r,k)}if(!y.theme_advanced_toolbar_container){l=d.add(r,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"})}if(v=="bottom"){x._addToolbars(r,k)}if(m=="bottom"){x._addStatusBar(r,k)}return j},_rowLayout:function(w,m,k){var v=this,p=v.editor,u,x,i=p.controlManager,l,j,r,q;u=w.theme_advanced_containers_default_class||"";x=w.theme_advanced_containers_default_align||"center";f(c(w.theme_advanced_containers||""),function(s,o){var n=w["theme_advanced_container_"+s]||"";switch(n.toLowerCase()){case"mceeditor":l=d.add(m,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":v._addStatusBar(m,k);break;default:q=(w["theme_advanced_container_"+s+"_align"]||x).toLowerCase();q="mce"+v._ufirst(q);l=d.add(d.add(m,"tr"),"td",{"class":"mceToolbar "+(w["theme_advanced_container_"+s+"_class"]||u)+" "+q||x});r=i.createToolbar("toolbar"+o);v._addControls(n,r);d.setHTML(l,r.renderHTML());k.deltaHeight-=w.theme_advanced_row_height}});return j},_addControls:function(j,i){var k=this,l=k.settings,m,n=k.editor.controlManager;if(l.theme_advanced_disable&&!k._disabled){m={};f(c(l.theme_advanced_disable),function(o){m[o]=1});k._disabled=m}else{m=k._disabled}f(c(j),function(p){var o;if(m&&m[p]){return}if(p=="tablecontrols"){f(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(q){q=k.createControl(q,n);if(q){i.add(q)}});return}o=k.createControl(p,n);if(o){i.add(o)}})},_addToolbars:function(w,k){var z=this,p,m,r=z.editor,A=z.settings,y,j=r.controlManager,u,l,q=[],x;x=A.theme_advanced_toolbar_align.toLowerCase();x="mce"+z._ufirst(x);l=d.add(d.add(w,"tr"),"td",{"class":"mceToolbar "+x});if(!r.getParam("accessibility_focus")){q.push(d.createHTML("a",{href:"#",onfocus:"tinyMCE.get('"+r.id+"').focus();"},"<!-- IE -->"))}q.push(d.createHTML("a",{href:"#",accesskey:"q",title:r.getLang("advanced.toolbar_focus")},"<!-- IE -->"));for(p=1;(y=A["theme_advanced_buttons"+p]);p++){m=j.createToolbar("toolbar"+p,{"class":"mceToolbarRow"+p});if(A["theme_advanced_buttons"+p+"_add"]){y+=","+A["theme_advanced_buttons"+p+"_add"]}if(A["theme_advanced_buttons"+p+"_add_before"]){y=A["theme_advanced_buttons"+p+"_add_before"]+","+y}z._addControls(y,m);q.push(m.renderHTML());k.deltaHeight-=A.theme_advanced_row_height}q.push(d.createHTML("a",{href:"#",accesskey:"z",title:r.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+r.id+"').focus();"},"<!-- IE -->"));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row"},w.theme_advanced_path?p.translate("advanced.path")+": ":" ");d.add(k,"a",{href:"#",accesskey:"x"});if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}if(w.theme_advanced_resize_horizontal){r.style.width=Math.max(10,n.cw)+"px"}r.style.height=Math.max(10,n.ch)+"px";d.get(p.id+"_ifr").style.height=Math.max(10,parseInt(n.ch)+v.deltaHeight)+"px"})}p.onPostRender.add(function(){b.add(p.id+"_resize","mousedown",function(x){var z,t,o,s,y,r;z=d.get(p.id+"_tbl");o=z.clientWidth;s=z.clientHeight;miw=w.theme_advanced_resizing_min_width||100;mih=w.theme_advanced_resizing_min_height||100;maw=w.theme_advanced_resizing_max_width||65535;mah=w.theme_advanced_resizing_max_height||65535;t=d.add(d.get(p.id+"_parent"),"div",{"class":"mcePlaceHolder"});d.setStyles(t,{width:o,height:s});d.hide(z);d.show(t);i={x:x.screenX,y:x.screenY,w:o,h:s,dx:null,dy:null};q=b.add(d.doc,"mousemove",function(B){var n,A;i.dx=B.screenX-i.x;i.dy=B.screenY-i.y;n=Math.max(miw,i.w+i.dx);A=Math.max(mih,i.h+i.dy);n=Math.min(maw,n);A=Math.min(mah,A);if(w.theme_advanced_resize_horizontal){t.style.width=n+"px"}t.style.height=A+"px";return b.cancel(B)});u=b.add(d.doc,"mouseup",function(n){var A;b.remove(d.doc,"mousemove",q);b.remove(d.doc,"mouseup",u);z.style.display="";d.remove(t);if(i.dx===null){return}A=d.get(p.id+"_ifr");if(w.theme_advanced_resize_horizontal){z.style.width=Math.max(10,i.w+i.dx)+"px"}z.style.height=Math.max(10,i.h+i.dy)+"px";A.style.height=Math.max(10,A.clientHeight+i.dy)+"px";if(w.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+p.id+"_size",{cw:i.w+i.dx,ch:i.h+i.dy})}});return b.cancel(x)})})}j.deltaHeight-=21;k=m=null},_nodeChanged:function(l,u,k,q){var y=this,i,r=0,x,m,z=y.settings,w,j,o;if(z.readonly){return}e.each(y.stateControls,function(n){u.setActive(n,l.queryCommandState(y.controls[n][1]))});u.setActive("visualaid",l.hasVisual);u.setDisabled("undo",!l.undoManager.hasUndo()&&!l.typing);u.setDisabled("redo",!l.undoManager.hasRedo());u.setDisabled("outdent",!l.queryCommandState("Outdent"));i=d.getParent(k,"A");if(m=u.get("link")){if(!i||!i.name){m.setDisabled(!i&&q);m.setActive(!!i)}}if(m=u.get("unlink")){m.setDisabled(!i&&q);m.setActive(!!i&&!i.name)}if(m=u.get("anchor")){m.setActive(!!i&&i.name);if(e.isWebKit){i=d.getParent(k,"IMG");m.setActive(!!i&&d.getAttrib(i,"mce_name")=="a")}}i=d.getParent(k,"IMG");if(m=u.get("image")){m.setActive(!!i&&k.className.indexOf("mceItem")==-1)}if(m=u.get("styleselect")){if(k.className){y._importClasses();m.select(k.className)}else{m.select()}}if(m=u.get("formatselect")){i=d.getParent(k,d.isBlock);if(i){m.select(i.nodeName.toLowerCase())}}if(l.settings.convert_fonts_to_spans){l.dom.getParent(k,function(p){if(p.nodeName==="SPAN"){if(!w&&p.className){w=p.className}if(!j&&p.style.fontSize){j=p.style.fontSize}if(!o&&p.style.fontFamily){o=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}}return false});if(m=u.get("fontselect")){m.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==o})}if(m=u.get("fontsizeselect")){m.select(function(n){if(n.fontSize&&n.fontSize===j){return true}if(n["class"]&&n["class"]===w){return true}})}}else{if(m=u.get("fontselect")){m.select(l.queryCommandValue("FontName"))}if(m=u.get("fontsizeselect")){x=l.queryCommandValue("FontSize");m.select(function(n){return n.fontSize==x})}}if(z.theme_advanced_path&&z.theme_advanced_statusbar_location){i=d.get(l.id+"_path")||d.add(l.id+"_path_row","span",{id:l.id+"_path"});d.setHTML(i,"");l.dom.getParent(k,function(A){var p=A.nodeName.toLowerCase(),s,v,t="";if(A.nodeType!=1||A.nodeName==="BR"||(d.hasClass(A,"mceItemHidden")||d.hasClass(A,"mceItemRemoved"))){return}if(x=d.getAttrib(A,"mce_name")){p=x}if(e.isIE&&A.scopeName!=="HTML"){p=A.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(x=d.getAttrib(A,"src")){t+="src: "+x+" "}break;case"a":if(x=d.getAttrib(A,"name")){t+="name: "+x+" ";p+="#"+x}if(x=d.getAttrib(A,"href")){t+="href: "+x+" "}break;case"font":if(z.convert_fonts_to_spans){p="span"}if(x=d.getAttrib(A,"face")){t+="font: "+x+" "}if(x=d.getAttrib(A,"size")){t+="size: "+x+" "}if(x=d.getAttrib(A,"color")){t+="color: "+x+" "}break;case"span":if(x=d.getAttrib(A,"style")){t+="style: "+x+" "}break}if(x=d.getAttrib(A,"id")){t+="id: "+x+" "}if(x=A.className){x=x.replace(/(webkit-[\w\-]+|Apple-[\w\-]+|mceItem\w+|mceVisualAid)/g,"");if(x&&x.indexOf("mceItem")==-1){t+="class: "+x+" ";if(d.isBlock(A)||p=="img"||p=="span"){p+="."+x}}}p=p.replace(/(html:)/g,"");p={name:p,node:A,title:t};y.onResolveName.dispatch(y,p);t=p.title;p=p.name;v=d.create("a",{href:"javascript:;",onmousedown:"return false;",title:t,"class":"mcePath_"+(r++)},p);if(i.hasChildNodes()){i.insertBefore(d.doc.createTextNode(" \u00bb "),i.firstChild);i.insertBefore(v,i.firstChild)}else{i.appendChild(v)}},l.getBody())}},_sel:function(i){this.editor.execCommand("mceSelectNodeDepth",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/anchor.htm",width:320+parseInt(i.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(i.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/charmap.htm",width:550+parseInt(i.getLang("advanced.charmap_delta_width",0)),height:250+parseInt(i.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(k,j){var i=this.editor;j=j||{};i.windowManager.open({url:e.baseURL+"/themes/advanced/color_picker.htm",width:375+parseInt(i.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(i.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:j.color,func:j.func,theme_url:this.url})},_mceCodeEditor:function(j,k){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/source_editor.htm",width:parseInt(i.getParam("theme_advanced_source_editor_width",720)),height:parseInt(i.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(j,k){var i=this.editor;if(i.dom.getAttrib(i.selection.getNode(),"class").indexOf("mceItem")!=-1){return}i.windowManager.open({url:e.baseURL+"/themes/advanced/image.htm",width:355+parseInt(i.getLang("advanced.image_delta_width",0)),height:275+parseInt(i.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(j,k){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/link.htm",width:310+parseInt(i.getLang("advanced.link_delta_width",0)),height:200+parseInt(i.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var i=this.editor;i.windowManager.confirm("advanced.newdocument",function(j){if(j){i.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var i=this;this._mceColorPicker(0,{color:i.fgColor,func:function(j){i.fgColor=j;i.editor.execCommand("ForeColor",false,j)}})},_mceBackColor:function(){var i=this;this._mceColorPicker(0,{color:i.bgColor,func:function(j){i.bgColor=j;i.editor.execCommand("HiliteColor",false,j)}})},_ufirst:function(i){return i.substring(0,1).toUpperCase()+i.substring(1)}});e.ThemeManager.add("advanced",e.themes.AdvancedTheme)}(tinymce));
|
1 |
+
(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.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(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",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",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",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",readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l)}if(j.settings.content_css!==false){j.dom.loadCSS(j.baseURI.toAbsolute("themes/advanced/skins/"+j.settings.skin+"/content.css"))}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){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((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",classes:n["class"]});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(n){i.focus();i.formatter.toggle(n);return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){i.execCommand("FontName",false,l);return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){if(i.fontSize){k.execCommand("FontSize",false,i.fontSize)}else{f(m.settings.theme_advanced_font_sizes,function(p,o){if(p["class"]){j.push(p["class"])}});k.editorCommands._applyInlineStyle("span",{"class":i["class"]},{check_classes:j})}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={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"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",cmd:"FormatBlock"});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;m=j=d.create("span",{id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=d.stdMode?u.getElementsByTagName("tr"):u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_tbl");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,l){var j=this.editor,k=j.settings,n=d.get(j.id+"_tbl"),o=d.get(j.id+"_ifr"),m;i=Math.max(k.theme_advanced_resizing_min_width||100,i);l=Math.max(k.theme_advanced_resizing_min_height||100,l);i=Math.min(k.theme_advanced_resizing_max_width||65535,i);l=Math.min(k.theme_advanced_resizing_max_height||65535,l);m=n.clientHeight-o.clientHeight;d.setStyle(o,"height",l-m);d.setStyles(n,{width:i,height:l})},destroy:function(){var i=this.editor.id;b.clear(i+"_resize");b.clear(i+"_path_row");b.clear(i+"_external_close")},_simpleLayout:function(y,r,k,i){var x=this,u=x.editor,v=y.theme_advanced_toolbar_location,m=y.theme_advanced_statusbar_location,l,j,q,w;if(y.readonly){l=d.add(r,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"});return j}if(v=="top"){x._addToolbars(r,k)}if(v=="external"){l=w=d.create("div",{style:"position:relative"});l=d.add(l,"div",{id:u.id+"_external","class":"mceExternalToolbar"});d.add(l,"a",{id:u.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});l=d.add(l,"table",{id:u.id+"_tblext",cellSpacing:0,cellPadding:0});q=d.add(l,"tbody");if(i.firstChild.className=="mceOldBoxModel"){i.firstChild.appendChild(w)}else{i.insertBefore(w,i.firstChild)}x._addToolbars(q,k);u.onMouseUp.add(function(){var o=d.get(u.id+"_external");d.show(o);d.hide(g);var n=b.add(u.id+"_external_close","click",function(){d.hide(u.id+"_external");b.remove(u.id+"_external_close","click",n)});d.show(o);d.setStyle(o,"top",0-d.getRect(u.id+"_tblext").h-1);d.hide(o);d.show(o);o.style.filter="";g=u.id+"_external";o=null})}if(m=="top"){x._addStatusBar(r,k)}if(!y.theme_advanced_toolbar_container){l=d.add(r,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"})}if(v=="bottom"){x._addToolbars(r,k)}if(m=="bottom"){x._addStatusBar(r,k)}return j},_rowLayout:function(w,m,k){var v=this,p=v.editor,u,x,i=p.controlManager,l,j,r,q;u=w.theme_advanced_containers_default_class||"";x=w.theme_advanced_containers_default_align||"center";f(c(w.theme_advanced_containers||""),function(s,o){var n=w["theme_advanced_container_"+s]||"";switch(n.toLowerCase()){case"mceeditor":l=d.add(m,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":v._addStatusBar(m,k);break;default:q=(w["theme_advanced_container_"+s+"_align"]||x).toLowerCase();q="mce"+v._ufirst(q);l=d.add(d.add(m,"tr"),"td",{"class":"mceToolbar "+(w["theme_advanced_container_"+s+"_class"]||u)+" "+q||x});r=i.createToolbar("toolbar"+o);v._addControls(n,r);d.setHTML(l,r.renderHTML());k.deltaHeight-=w.theme_advanced_row_height}});return j},_addControls:function(j,i){var k=this,l=k.settings,m,n=k.editor.controlManager;if(l.theme_advanced_disable&&!k._disabled){m={};f(c(l.theme_advanced_disable),function(o){m[o]=1});k._disabled=m}else{m=k._disabled}f(c(j),function(p){var o;if(m&&m[p]){return}if(p=="tablecontrols"){f(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(q){q=k.createControl(q,n);if(q){i.add(q)}});return}o=k.createControl(p,n);if(o){i.add(o)}})},_addToolbars:function(w,k){var z=this,p,m,r=z.editor,A=z.settings,y,j=r.controlManager,u,l,q=[],x;x=A.theme_advanced_toolbar_align.toLowerCase();x="mce"+z._ufirst(x);l=d.add(d.add(w,"tr"),"td",{"class":"mceToolbar "+x});if(!r.getParam("accessibility_focus")){q.push(d.createHTML("a",{href:"#",onfocus:"tinyMCE.get('"+r.id+"').focus();"},"<!-- IE -->"))}q.push(d.createHTML("a",{href:"#",accesskey:"q",title:r.getLang("advanced.toolbar_focus")},"<!-- IE -->"));for(p=1;(y=A["theme_advanced_buttons"+p]);p++){m=j.createToolbar("toolbar"+p,{"class":"mceToolbarRow"+p});if(A["theme_advanced_buttons"+p+"_add"]){y+=","+A["theme_advanced_buttons"+p+"_add"]}if(A["theme_advanced_buttons"+p+"_add_before"]){y=A["theme_advanced_buttons"+p+"_add_before"]+","+y}z._addControls(y,m);q.push(m.renderHTML());k.deltaHeight-=A.theme_advanced_row_height}q.push(d.createHTML("a",{href:"#",accesskey:"z",title:r.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+r.id+"').focus();"},"<!-- IE -->"));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row"},w.theme_advanced_path?p.translate("advanced.path")+": ":" ");d.add(k,"a",{href:"#",accesskey:"x"});if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}if(w.theme_advanced_resize_horizontal){r.style.width=Math.max(10,n.cw)+"px"}r.style.height=Math.max(10,n.ch)+"px";d.get(p.id+"_ifr").style.height=Math.max(10,parseInt(n.ch)+v.deltaHeight)+"px"})}p.onPostRender.add(function(){b.add(p.id+"_resize","mousedown",function(x){var z,t,o,s,y,r;z=d.get(p.id+"_tbl");o=z.clientWidth;s=z.clientHeight;miw=w.theme_advanced_resizing_min_width||100;mih=w.theme_advanced_resizing_min_height||100;maw=w.theme_advanced_resizing_max_width||65535;mah=w.theme_advanced_resizing_max_height||65535;t=d.add(d.get(p.id+"_parent"),"div",{"class":"mcePlaceHolder"});d.setStyles(t,{width:o,height:s});d.hide(z);d.show(t);i={x:x.screenX,y:x.screenY,w:o,h:s,dx:null,dy:null};q=b.add(d.doc,"mousemove",function(B){var n,A;i.dx=B.screenX-i.x;i.dy=B.screenY-i.y;n=Math.max(miw,i.w+i.dx);A=Math.max(mih,i.h+i.dy);n=Math.min(maw,n);A=Math.min(mah,A);if(w.theme_advanced_resize_horizontal){t.style.width=n+"px"}t.style.height=A+"px";return b.cancel(B)});u=b.add(d.doc,"mouseup",function(n){var A;b.remove(d.doc,"mousemove",q);b.remove(d.doc,"mouseup",u);z.style.display="";d.remove(t);if(i.dx===null){return}A=d.get(p.id+"_ifr");if(w.theme_advanced_resize_horizontal){z.style.width=Math.max(10,i.w+i.dx)+"px"}z.style.height=Math.max(10,i.h+i.dy)+"px";A.style.height=Math.max(10,A.clientHeight+i.dy)+"px";if(w.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+p.id+"_size",{cw:i.w+i.dx,ch:i.h+i.dy})}});return b.cancel(x)})})}j.deltaHeight-=21;k=m=null},_nodeChanged:function(o,x,l,u,j){var A=this,i,w=0,z,q,B=A.settings,y,k,r;e.each(A.stateControls,function(n){x.setActive(n,o.queryCommandState(A.controls[n][1]))});function m(p){var s,n=j.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]}}}x.setActive("visualaid",o.hasVisual);x.setDisabled("undo",!o.undoManager.hasUndo()&&!o.typing);x.setDisabled("redo",!o.undoManager.hasRedo());x.setDisabled("outdent",!o.queryCommandState("Outdent"));i=m("A");if(q=x.get("link")){if(!i||!i.name){q.setDisabled(!i&&u);q.setActive(!!i)}}if(q=x.get("unlink")){q.setDisabled(!i&&u);q.setActive(!!i&&!i.name)}if(q=x.get("anchor")){q.setActive(!!i&&i.name);if(e.isWebKit){i=m("IMG");q.setActive(!!i&&d.getAttrib(i,"mce_name")=="a")}}i=m("IMG");if(q=x.get("image")){q.setActive(!!i&&l.className.indexOf("mceItem")==-1)}if(q=x.get("styleselect")){A._importClasses();q.select(function(n){return !!o.formatter.match(n)})}if(q=x.get("formatselect")){i=m(d.isBlock);if(i){q.select(i.nodeName.toLowerCase())}}m(function(p){if(p.nodeName==="SPAN"){if(!y&&p.className){y=p.className}if(!k&&p.style.fontSize){k=p.style.fontSize}if(!r&&p.style.fontFamily){r=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}}return false});if(q=x.get("fontselect")){q.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==r})}if(q=x.get("fontsizeselect")){if(B.theme_advanced_runtime_fontsize&&!k&&!y){k=o.dom.getStyle(l,"fontSize",true)}q.select(function(n){if(n.fontSize&&n.fontSize===k){return true}if(n["class"]&&n["class"]===y){return true}})}if(B.theme_advanced_path&&B.theme_advanced_statusbar_location){i=d.get(o.id+"_path")||d.add(o.id+"_path_row","span",{id:o.id+"_path"});d.setHTML(i,"");m(function(C){var p=C.nodeName.toLowerCase(),s,v,t="";if(C.nodeType!=1||C.nodeName==="BR"||(d.hasClass(C,"mceItemHidden")||d.hasClass(C,"mceItemRemoved"))){return}if(z=d.getAttrib(C,"mce_name")){p=z}if(e.isIE&&C.scopeName!=="HTML"){p=C.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(z=d.getAttrib(C,"src")){t+="src: "+z+" "}break;case"a":if(z=d.getAttrib(C,"name")){t+="name: "+z+" ";p+="#"+z}if(z=d.getAttrib(C,"href")){t+="href: "+z+" "}break;case"font":if(z=d.getAttrib(C,"face")){t+="font: "+z+" "}if(z=d.getAttrib(C,"size")){t+="size: "+z+" "}if(z=d.getAttrib(C,"color")){t+="color: "+z+" "}break;case"span":if(z=d.getAttrib(C,"style")){t+="style: "+z+" "}break}if(z=d.getAttrib(C,"id")){t+="id: "+z+" "}if(z=C.className){z=z.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(z){t+="class: "+z+" ";if(d.isBlock(C)||p=="img"||p=="span"){p+="."+z}}}p=p.replace(/(html:)/g,"");p={name:p,node:C,title:t};A.onResolveName.dispatch(A,p);t=p.title;p=p.name;v=d.create("a",{href:"javascript:;",onmousedown:"return false;",title:t,"class":"mcePath_"+(w++)},p);if(i.hasChildNodes()){i.insertBefore(d.doc.createTextNode(" \u00bb "),i.firstChild);i.insertBefore(v,i.firstChild)}else{i.appendChild(v)}},o.getBody())}},_sel:function(i){this.editor.execCommand("mceSelectNodeDepth",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/anchor.htm",width:320+parseInt(i.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(i.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/charmap.htm",width:550+parseInt(i.getLang("advanced.charmap_delta_width",0)),height:250+parseInt(i.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(k,j){var i=this.editor;j=j||{};i.windowManager.open({url:e.baseURL+"/themes/advanced/color_picker.htm",width:375+parseInt(i.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(i.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:j.color,func:j.func,theme_url:this.url})},_mceCodeEditor:function(j,k){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/source_editor.htm",width:parseInt(i.getParam("theme_advanced_source_editor_width",720)),height:parseInt(i.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(j,k){var i=this.editor;if(i.dom.getAttrib(i.selection.getNode(),"class").indexOf("mceItem")!=-1){return}i.windowManager.open({url:e.baseURL+"/themes/advanced/image.htm",width:355+parseInt(i.getLang("advanced.image_delta_width",0)),height:275+parseInt(i.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(j,k){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/link.htm",width:310+parseInt(i.getLang("advanced.link_delta_width",0)),height:200+parseInt(i.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var i=this.editor;i.windowManager.confirm("advanced.newdocument",function(j){if(j){i.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var i=this;this._mceColorPicker(0,{color:i.fgColor,func:function(j){i.fgColor=j;i.editor.execCommand("ForeColor",false,j)}})},_mceBackColor:function(){var i=this;this._mceColorPicker(0,{color:i.bgColor,func:function(j){i.bgColor=j;i.editor.execCommand("HiliteColor",false,j)}})},_ufirst:function(i){return i.substring(0,1).toUpperCase()+i.substring(1)}});e.ThemeManager.add("advanced",e.themes.AdvancedTheme)}(tinymce));
|
tiny_mce/themes/advanced/editor_template_src.js
ADDED
@@ -0,0 +1,1209 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
// Tell it to load theme specific language pack(s)
|
15 |
+
tinymce.ThemeManager.requireLangPack('advanced');
|
16 |
+
|
17 |
+
tinymce.create('tinymce.themes.AdvancedTheme', {
|
18 |
+
sizes : [8, 10, 12, 14, 18, 24, 36],
|
19 |
+
|
20 |
+
// Control name lookup, format: title, command
|
21 |
+
controls : {
|
22 |
+
bold : ['bold_desc', 'Bold'],
|
23 |
+
italic : ['italic_desc', 'Italic'],
|
24 |
+
underline : ['underline_desc', 'Underline'],
|
25 |
+
strikethrough : ['striketrough_desc', 'Strikethrough'],
|
26 |
+
justifyleft : ['justifyleft_desc', 'JustifyLeft'],
|
27 |
+
justifycenter : ['justifycenter_desc', 'JustifyCenter'],
|
28 |
+
justifyright : ['justifyright_desc', 'JustifyRight'],
|
29 |
+
justifyfull : ['justifyfull_desc', 'JustifyFull'],
|
30 |
+
bullist : ['bullist_desc', 'InsertUnorderedList'],
|
31 |
+
numlist : ['numlist_desc', 'InsertOrderedList'],
|
32 |
+
outdent : ['outdent_desc', 'Outdent'],
|
33 |
+
indent : ['indent_desc', 'Indent'],
|
34 |
+
cut : ['cut_desc', 'Cut'],
|
35 |
+
copy : ['copy_desc', 'Copy'],
|
36 |
+
paste : ['paste_desc', 'Paste'],
|
37 |
+
undo : ['undo_desc', 'Undo'],
|
38 |
+
redo : ['redo_desc', 'Redo'],
|
39 |
+
link : ['link_desc', 'mceLink'],
|
40 |
+
unlink : ['unlink_desc', 'unlink'],
|
41 |
+
image : ['image_desc', 'mceImage'],
|
42 |
+
cleanup : ['cleanup_desc', 'mceCleanup'],
|
43 |
+
help : ['help_desc', 'mceHelp'],
|
44 |
+
code : ['code_desc', 'mceCodeEditor'],
|
45 |
+
hr : ['hr_desc', 'InsertHorizontalRule'],
|
46 |
+
removeformat : ['removeformat_desc', 'RemoveFormat'],
|
47 |
+
sub : ['sub_desc', 'subscript'],
|
48 |
+
sup : ['sup_desc', 'superscript'],
|
49 |
+
forecolor : ['forecolor_desc', 'ForeColor'],
|
50 |
+
forecolorpicker : ['forecolor_desc', 'mceForeColor'],
|
51 |
+
backcolor : ['backcolor_desc', 'HiliteColor'],
|
52 |
+
backcolorpicker : ['backcolor_desc', 'mceBackColor'],
|
53 |
+
charmap : ['charmap_desc', 'mceCharMap'],
|
54 |
+
visualaid : ['visualaid_desc', 'mceToggleVisualAid'],
|
55 |
+
anchor : ['anchor_desc', 'mceInsertAnchor'],
|
56 |
+
newdocument : ['newdocument_desc', 'mceNewDocument'],
|
57 |
+
blockquote : ['blockquote_desc', 'mceBlockQuote']
|
58 |
+
},
|
59 |
+
|
60 |
+
stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'],
|
61 |
+
|
62 |
+
init : function(ed, url) {
|
63 |
+
var t = this, s, v, o;
|
64 |
+
|
65 |
+
t.editor = ed;
|
66 |
+
t.url = url;
|
67 |
+
t.onResolveName = new tinymce.util.Dispatcher(this);
|
68 |
+
|
69 |
+
// Default settings
|
70 |
+
t.settings = s = extend({
|
71 |
+
theme_advanced_path : true,
|
72 |
+
theme_advanced_toolbar_location : 'bottom',
|
73 |
+
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",
|
74 |
+
theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
|
75 |
+
theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap",
|
76 |
+
theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6",
|
77 |
+
theme_advanced_toolbar_align : "center",
|
78 |
+
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",
|
79 |
+
theme_advanced_more_colors : 1,
|
80 |
+
theme_advanced_row_height : 23,
|
81 |
+
theme_advanced_resize_horizontal : 1,
|
82 |
+
theme_advanced_resizing_use_cookie : 1,
|
83 |
+
theme_advanced_font_sizes : "1,2,3,4,5,6,7",
|
84 |
+
readonly : ed.settings.readonly
|
85 |
+
}, ed.settings);
|
86 |
+
|
87 |
+
// Setup default font_size_style_values
|
88 |
+
if (!s.font_size_style_values)
|
89 |
+
s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt";
|
90 |
+
|
91 |
+
if (tinymce.is(s.theme_advanced_font_sizes, 'string')) {
|
92 |
+
s.font_size_style_values = tinymce.explode(s.font_size_style_values);
|
93 |
+
s.font_size_classes = tinymce.explode(s.font_size_classes || '');
|
94 |
+
|
95 |
+
// Parse string value
|
96 |
+
o = {};
|
97 |
+
ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes;
|
98 |
+
each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) {
|
99 |
+
var cl;
|
100 |
+
|
101 |
+
if (k == v && v >= 1 && v <= 7) {
|
102 |
+
k = v + ' (' + t.sizes[v - 1] + 'pt)';
|
103 |
+
cl = s.font_size_classes[v - 1];
|
104 |
+
v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');
|
105 |
+
}
|
106 |
+
|
107 |
+
if (/^\s*\./.test(v))
|
108 |
+
cl = v.replace(/\./g, '');
|
109 |
+
|
110 |
+
o[k] = cl ? {'class' : cl} : {fontSize : v};
|
111 |
+
});
|
112 |
+
|
113 |
+
s.theme_advanced_font_sizes = o;
|
114 |
+
}
|
115 |
+
|
116 |
+
if ((v = s.theme_advanced_path_location) && v != 'none')
|
117 |
+
s.theme_advanced_statusbar_location = s.theme_advanced_path_location;
|
118 |
+
|
119 |
+
if (s.theme_advanced_statusbar_location == 'none')
|
120 |
+
s.theme_advanced_statusbar_location = 0;
|
121 |
+
|
122 |
+
// Init editor
|
123 |
+
ed.onInit.add(function() {
|
124 |
+
if (!ed.settings.readonly)
|
125 |
+
ed.onNodeChange.add(t._nodeChanged, t);
|
126 |
+
|
127 |
+
if (ed.settings.content_css !== false)
|
128 |
+
ed.dom.loadCSS(ed.baseURI.toAbsolute("themes/advanced/skins/" + ed.settings.skin + "/content.css"));
|
129 |
+
});
|
130 |
+
|
131 |
+
ed.onSetProgressState.add(function(ed, b, ti) {
|
132 |
+
var co, id = ed.id, tb;
|
133 |
+
|
134 |
+
if (b) {
|
135 |
+
t.progressTimer = setTimeout(function() {
|
136 |
+
co = ed.getContainer();
|
137 |
+
co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild);
|
138 |
+
tb = DOM.get(ed.id + '_tbl');
|
139 |
+
|
140 |
+
DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}});
|
141 |
+
DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}});
|
142 |
+
}, ti || 0);
|
143 |
+
} else {
|
144 |
+
DOM.remove(id + '_blocker');
|
145 |
+
DOM.remove(id + '_progress');
|
146 |
+
clearTimeout(t.progressTimer);
|
147 |
+
}
|
148 |
+
});
|
149 |
+
|
150 |
+
DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css");
|
151 |
+
|
152 |
+
if (s.skin_variant)
|
153 |
+
DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css");
|
154 |
+
},
|
155 |
+
|
156 |
+
createControl : function(n, cf) {
|
157 |
+
var cd, c;
|
158 |
+
|
159 |
+
if (c = cf.createControl(n))
|
160 |
+
return c;
|
161 |
+
|
162 |
+
switch (n) {
|
163 |
+
case "styleselect":
|
164 |
+
return this._createStyleSelect();
|
165 |
+
|
166 |
+
case "formatselect":
|
167 |
+
return this._createBlockFormats();
|
168 |
+
|
169 |
+
case "fontselect":
|
170 |
+
return this._createFontSelect();
|
171 |
+
|
172 |
+
case "fontsizeselect":
|
173 |
+
return this._createFontSizeSelect();
|
174 |
+
|
175 |
+
case "forecolor":
|
176 |
+
return this._createForeColorMenu();
|
177 |
+
|
178 |
+
case "backcolor":
|
179 |
+
return this._createBackColorMenu();
|
180 |
+
}
|
181 |
+
|
182 |
+
if ((cd = this.controls[n]))
|
183 |
+
return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]});
|
184 |
+
},
|
185 |
+
|
186 |
+
execCommand : function(cmd, ui, val) {
|
187 |
+
var f = this['_' + cmd];
|
188 |
+
|
189 |
+
if (f) {
|
190 |
+
f.call(this, ui, val);
|
191 |
+
return true;
|
192 |
+
}
|
193 |
+
|
194 |
+
return false;
|
195 |
+
},
|
196 |
+
|
197 |
+
_importClasses : function(e) {
|
198 |
+
var ed = this.editor, ctrl = ed.controlManager.get('styleselect');
|
199 |
+
|
200 |
+
if (ctrl.getLength() == 0) {
|
201 |
+
each(ed.dom.getClasses(), function(o, idx) {
|
202 |
+
var name = 'style_' + idx;
|
203 |
+
|
204 |
+
ed.formatter.register(name, {
|
205 |
+
inline : 'span',
|
206 |
+
classes : o['class']
|
207 |
+
});
|
208 |
+
|
209 |
+
ctrl.add(o['class'], name);
|
210 |
+
});
|
211 |
+
}
|
212 |
+
},
|
213 |
+
|
214 |
+
_createStyleSelect : function(n) {
|
215 |
+
var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl;
|
216 |
+
|
217 |
+
// Setup style select box
|
218 |
+
ctrl = ctrlMan.createListBox('styleselect', {
|
219 |
+
title : 'advanced.style_select',
|
220 |
+
onselect : function(name) {
|
221 |
+
ed.focus();
|
222 |
+
ed.formatter.toggle(name);
|
223 |
+
|
224 |
+
return false; // No auto select
|
225 |
+
}
|
226 |
+
});
|
227 |
+
|
228 |
+
// Handle specified format
|
229 |
+
ed.onInit.add(function() {
|
230 |
+
var counter = 0, formats = ed.getParam('style_formats');
|
231 |
+
|
232 |
+
if (formats) {
|
233 |
+
each(formats, function(fmt) {
|
234 |
+
var name, keys = 0;
|
235 |
+
|
236 |
+
each(fmt, function() {keys++;});
|
237 |
+
|
238 |
+
if (keys > 1) {
|
239 |
+
name = fmt.name = fmt.name || 'style_' + (counter++);
|
240 |
+
ed.formatter.register(name, fmt);
|
241 |
+
ctrl.add(fmt.title, name);
|
242 |
+
} else
|
243 |
+
ctrl.add(fmt.title);
|
244 |
+
});
|
245 |
+
} else {
|
246 |
+
each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) {
|
247 |
+
var name;
|
248 |
+
|
249 |
+
if (val) {
|
250 |
+
name = 'style_' + (counter++);
|
251 |
+
|
252 |
+
ed.formatter.register(name, {
|
253 |
+
inline : 'span',
|
254 |
+
classes : val
|
255 |
+
});
|
256 |
+
|
257 |
+
ctrl.add(t.editor.translate(key), name);
|
258 |
+
}
|
259 |
+
});
|
260 |
+
}
|
261 |
+
});
|
262 |
+
|
263 |
+
// Auto import classes if the ctrl box is empty
|
264 |
+
if (ctrl.getLength() == 0) {
|
265 |
+
ctrl.onPostRender.add(function(ed, n) {
|
266 |
+
if (!ctrl.NativeListBox) {
|
267 |
+
Event.add(n.id + '_text', 'focus', t._importClasses, t);
|
268 |
+
Event.add(n.id + '_text', 'mousedown', t._importClasses, t);
|
269 |
+
Event.add(n.id + '_open', 'focus', t._importClasses, t);
|
270 |
+
Event.add(n.id + '_open', 'mousedown', t._importClasses, t);
|
271 |
+
} else
|
272 |
+
Event.add(n.id, 'focus', t._importClasses, t);
|
273 |
+
});
|
274 |
+
}
|
275 |
+
|
276 |
+
return ctrl;
|
277 |
+
},
|
278 |
+
|
279 |
+
_createFontSelect : function() {
|
280 |
+
var c, t = this, ed = t.editor;
|
281 |
+
|
282 |
+
c = ed.controlManager.createListBox('fontselect', {
|
283 |
+
title : 'advanced.fontdefault',
|
284 |
+
onselect : function(v) {
|
285 |
+
ed.execCommand('FontName', false, v);
|
286 |
+
return false; // No auto select
|
287 |
+
}
|
288 |
+
});
|
289 |
+
|
290 |
+
if (c) {
|
291 |
+
each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) {
|
292 |
+
c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''});
|
293 |
+
});
|
294 |
+
}
|
295 |
+
|
296 |
+
return c;
|
297 |
+
},
|
298 |
+
|
299 |
+
_createFontSizeSelect : function() {
|
300 |
+
var t = this, ed = t.editor, c, i = 0, cl = [];
|
301 |
+
|
302 |
+
c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) {
|
303 |
+
if (v.fontSize)
|
304 |
+
ed.execCommand('FontSize', false, v.fontSize);
|
305 |
+
else {
|
306 |
+
each(t.settings.theme_advanced_font_sizes, function(v, k) {
|
307 |
+
if (v['class'])
|
308 |
+
cl.push(v['class']);
|
309 |
+
});
|
310 |
+
|
311 |
+
ed.editorCommands._applyInlineStyle('span', {'class' : v['class']}, {check_classes : cl});
|
312 |
+
}
|
313 |
+
|
314 |
+
return false; // No auto select
|
315 |
+
}});
|
316 |
+
|
317 |
+
if (c) {
|
318 |
+
each(t.settings.theme_advanced_font_sizes, function(v, k) {
|
319 |
+
var fz = v.fontSize;
|
320 |
+
|
321 |
+
if (fz >= 1 && fz <= 7)
|
322 |
+
fz = t.sizes[parseInt(fz) - 1] + 'pt';
|
323 |
+
|
324 |
+
c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))});
|
325 |
+
});
|
326 |
+
}
|
327 |
+
|
328 |
+
return c;
|
329 |
+
},
|
330 |
+
|
331 |
+
_createBlockFormats : function() {
|
332 |
+
var c, fmts = {
|
333 |
+
p : 'advanced.paragraph',
|
334 |
+
address : 'advanced.address',
|
335 |
+
pre : 'advanced.pre',
|
336 |
+
h1 : 'advanced.h1',
|
337 |
+
h2 : 'advanced.h2',
|
338 |
+
h3 : 'advanced.h3',
|
339 |
+
h4 : 'advanced.h4',
|
340 |
+
h5 : 'advanced.h5',
|
341 |
+
h6 : 'advanced.h6',
|
342 |
+
div : 'advanced.div',
|
343 |
+
blockquote : 'advanced.blockquote',
|
344 |
+
code : 'advanced.code',
|
345 |
+
dt : 'advanced.dt',
|
346 |
+
dd : 'advanced.dd',
|
347 |
+
samp : 'advanced.samp'
|
348 |
+
}, t = this;
|
349 |
+
|
350 |
+
c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', cmd : 'FormatBlock'});
|
351 |
+
if (c) {
|
352 |
+
each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) {
|
353 |
+
c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v});
|
354 |
+
});
|
355 |
+
}
|
356 |
+
|
357 |
+
return c;
|
358 |
+
},
|
359 |
+
|
360 |
+
_createForeColorMenu : function() {
|
361 |
+
var c, t = this, s = t.settings, o = {}, v;
|
362 |
+
|
363 |
+
if (s.theme_advanced_more_colors) {
|
364 |
+
o.more_colors_func = function() {
|
365 |
+
t._mceColorPicker(0, {
|
366 |
+
color : c.value,
|
367 |
+
func : function(co) {
|
368 |
+
c.setColor(co);
|
369 |
+
}
|
370 |
+
});
|
371 |
+
};
|
372 |
+
}
|
373 |
+
|
374 |
+
if (v = s.theme_advanced_text_colors)
|
375 |
+
o.colors = v;
|
376 |
+
|
377 |
+
if (s.theme_advanced_default_foreground_color)
|
378 |
+
o.default_color = s.theme_advanced_default_foreground_color;
|
379 |
+
|
380 |
+
o.title = 'advanced.forecolor_desc';
|
381 |
+
o.cmd = 'ForeColor';
|
382 |
+
o.scope = this;
|
383 |
+
|
384 |
+
c = t.editor.controlManager.createColorSplitButton('forecolor', o);
|
385 |
+
|
386 |
+
return c;
|
387 |
+
},
|
388 |
+
|
389 |
+
_createBackColorMenu : function() {
|
390 |
+
var c, t = this, s = t.settings, o = {}, v;
|
391 |
+
|
392 |
+
if (s.theme_advanced_more_colors) {
|
393 |
+
o.more_colors_func = function() {
|
394 |
+
t._mceColorPicker(0, {
|
395 |
+
color : c.value,
|
396 |
+
func : function(co) {
|
397 |
+
c.setColor(co);
|
398 |
+
}
|
399 |
+
});
|
400 |
+
};
|
401 |
+
}
|
402 |
+
|
403 |
+
if (v = s.theme_advanced_background_colors)
|
404 |
+
o.colors = v;
|
405 |
+
|
406 |
+
if (s.theme_advanced_default_background_color)
|
407 |
+
o.default_color = s.theme_advanced_default_background_color;
|
408 |
+
|
409 |
+
o.title = 'advanced.backcolor_desc';
|
410 |
+
o.cmd = 'HiliteColor';
|
411 |
+
o.scope = this;
|
412 |
+
|
413 |
+
c = t.editor.controlManager.createColorSplitButton('backcolor', o);
|
414 |
+
|
415 |
+
return c;
|
416 |
+
},
|
417 |
+
|
418 |
+
renderUI : function(o) {
|
419 |
+
var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl;
|
420 |
+
|
421 |
+
n = p = DOM.create('span', {id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')});
|
422 |
+
|
423 |
+
if (!DOM.boxModel)
|
424 |
+
n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'});
|
425 |
+
|
426 |
+
n = sc = DOM.add(n, 'table', {id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0});
|
427 |
+
n = tb = DOM.add(n, 'tbody');
|
428 |
+
|
429 |
+
switch ((s.theme_advanced_layout_manager || '').toLowerCase()) {
|
430 |
+
case "rowlayout":
|
431 |
+
ic = t._rowLayout(s, tb, o);
|
432 |
+
break;
|
433 |
+
|
434 |
+
case "customlayout":
|
435 |
+
ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p);
|
436 |
+
break;
|
437 |
+
|
438 |
+
default:
|
439 |
+
ic = t._simpleLayout(s, tb, o, p);
|
440 |
+
}
|
441 |
+
|
442 |
+
n = o.targetNode;
|
443 |
+
|
444 |
+
// Add classes to first and last TRs
|
445 |
+
nl = DOM.stdMode ? sc.getElementsByTagName('tr') : sc.rows; // Quick fix for IE 8
|
446 |
+
DOM.addClass(nl[0], 'mceFirst');
|
447 |
+
DOM.addClass(nl[nl.length - 1], 'mceLast');
|
448 |
+
|
449 |
+
// Add classes to first and last TDs
|
450 |
+
each(DOM.select('tr', tb), function(n) {
|
451 |
+
DOM.addClass(n.firstChild, 'mceFirst');
|
452 |
+
DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast');
|
453 |
+
});
|
454 |
+
|
455 |
+
if (DOM.get(s.theme_advanced_toolbar_container))
|
456 |
+
DOM.get(s.theme_advanced_toolbar_container).appendChild(p);
|
457 |
+
else
|
458 |
+
DOM.insertAfter(p, n);
|
459 |
+
|
460 |
+
Event.add(ed.id + '_path_row', 'click', function(e) {
|
461 |
+
e = e.target;
|
462 |
+
|
463 |
+
if (e.nodeName == 'A') {
|
464 |
+
t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1'));
|
465 |
+
|
466 |
+
return Event.cancel(e);
|
467 |
+
}
|
468 |
+
});
|
469 |
+
/*
|
470 |
+
if (DOM.get(ed.id + '_path_row')) {
|
471 |
+
Event.add(ed.id + '_tbl', 'mouseover', function(e) {
|
472 |
+
var re;
|
473 |
+
|
474 |
+
e = e.target;
|
475 |
+
|
476 |
+
if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) {
|
477 |
+
re = DOM.get(ed.id + '_path_row');
|
478 |
+
t.lastPath = re.innerHTML;
|
479 |
+
DOM.setHTML(re, e.parentNode.title);
|
480 |
+
}
|
481 |
+
});
|
482 |
+
|
483 |
+
Event.add(ed.id + '_tbl', 'mouseout', function(e) {
|
484 |
+
if (t.lastPath) {
|
485 |
+
DOM.setHTML(ed.id + '_path_row', t.lastPath);
|
486 |
+
t.lastPath = 0;
|
487 |
+
}
|
488 |
+
});
|
489 |
+
}
|
490 |
+
*/
|
491 |
+
|
492 |
+
if (!ed.getParam('accessibility_focus'))
|
493 |
+
Event.add(DOM.add(p, 'a', {href : '#'}, '<!-- IE -->'), 'focus', function() {tinyMCE.get(ed.id).focus();});
|
494 |
+
|
495 |
+
if (s.theme_advanced_toolbar_location == 'external')
|
496 |
+
o.deltaHeight = 0;
|
497 |
+
|
498 |
+
t.deltaHeight = o.deltaHeight;
|
499 |
+
o.targetNode = null;
|
500 |
+
|
501 |
+
return {
|
502 |
+
iframeContainer : ic,
|
503 |
+
editorContainer : ed.id + '_parent',
|
504 |
+
sizeContainer : sc,
|
505 |
+
deltaHeight : o.deltaHeight
|
506 |
+
};
|
507 |
+
},
|
508 |
+
|
509 |
+
getInfo : function() {
|
510 |
+
return {
|
511 |
+
longname : 'Advanced theme',
|
512 |
+
author : 'Moxiecode Systems AB',
|
513 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
514 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
515 |
+
}
|
516 |
+
},
|
517 |
+
|
518 |
+
resizeBy : function(dw, dh) {
|
519 |
+
var e = DOM.get(this.editor.id + '_tbl');
|
520 |
+
|
521 |
+
this.resizeTo(e.clientWidth + dw, e.clientHeight + dh);
|
522 |
+
},
|
523 |
+
|
524 |
+
resizeTo : function(w, h) {
|
525 |
+
var ed = this.editor, s = ed.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr'), dh;
|
526 |
+
|
527 |
+
// Boundery fix box
|
528 |
+
w = Math.max(s.theme_advanced_resizing_min_width || 100, w);
|
529 |
+
h = Math.max(s.theme_advanced_resizing_min_height || 100, h);
|
530 |
+
w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w);
|
531 |
+
h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h);
|
532 |
+
|
533 |
+
// Calc difference between iframe and container
|
534 |
+
dh = e.clientHeight - ifr.clientHeight;
|
535 |
+
|
536 |
+
// Resize iframe and container
|
537 |
+
DOM.setStyle(ifr, 'height', h - dh);
|
538 |
+
DOM.setStyles(e, {width : w, height : h});
|
539 |
+
},
|
540 |
+
|
541 |
+
destroy : function() {
|
542 |
+
var id = this.editor.id;
|
543 |
+
|
544 |
+
Event.clear(id + '_resize');
|
545 |
+
Event.clear(id + '_path_row');
|
546 |
+
Event.clear(id + '_external_close');
|
547 |
+
},
|
548 |
+
|
549 |
+
// Internal functions
|
550 |
+
|
551 |
+
_simpleLayout : function(s, tb, o, p) {
|
552 |
+
var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c;
|
553 |
+
|
554 |
+
if (s.readonly) {
|
555 |
+
n = DOM.add(tb, 'tr');
|
556 |
+
n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
|
557 |
+
return ic;
|
558 |
+
}
|
559 |
+
|
560 |
+
// Create toolbar container at top
|
561 |
+
if (lo == 'top')
|
562 |
+
t._addToolbars(tb, o);
|
563 |
+
|
564 |
+
// Create external toolbar
|
565 |
+
if (lo == 'external') {
|
566 |
+
n = c = DOM.create('div', {style : 'position:relative'});
|
567 |
+
n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'});
|
568 |
+
DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'});
|
569 |
+
n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0});
|
570 |
+
etb = DOM.add(n, 'tbody');
|
571 |
+
|
572 |
+
if (p.firstChild.className == 'mceOldBoxModel')
|
573 |
+
p.firstChild.appendChild(c);
|
574 |
+
else
|
575 |
+
p.insertBefore(c, p.firstChild);
|
576 |
+
|
577 |
+
t._addToolbars(etb, o);
|
578 |
+
|
579 |
+
ed.onMouseUp.add(function() {
|
580 |
+
var e = DOM.get(ed.id + '_external');
|
581 |
+
DOM.show(e);
|
582 |
+
|
583 |
+
DOM.hide(lastExtID);
|
584 |
+
|
585 |
+
var f = Event.add(ed.id + '_external_close', 'click', function() {
|
586 |
+
DOM.hide(ed.id + '_external');
|
587 |
+
Event.remove(ed.id + '_external_close', 'click', f);
|
588 |
+
});
|
589 |
+
|
590 |
+
DOM.show(e);
|
591 |
+
DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1);
|
592 |
+
|
593 |
+
// Fixes IE rendering bug
|
594 |
+
DOM.hide(e);
|
595 |
+
DOM.show(e);
|
596 |
+
e.style.filter = '';
|
597 |
+
|
598 |
+
lastExtID = ed.id + '_external';
|
599 |
+
|
600 |
+
e = null;
|
601 |
+
});
|
602 |
+
}
|
603 |
+
|
604 |
+
if (sl == 'top')
|
605 |
+
t._addStatusBar(tb, o);
|
606 |
+
|
607 |
+
// Create iframe container
|
608 |
+
if (!s.theme_advanced_toolbar_container) {
|
609 |
+
n = DOM.add(tb, 'tr');
|
610 |
+
n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
|
611 |
+
}
|
612 |
+
|
613 |
+
// Create toolbar container at bottom
|
614 |
+
if (lo == 'bottom')
|
615 |
+
t._addToolbars(tb, o);
|
616 |
+
|
617 |
+
if (sl == 'bottom')
|
618 |
+
t._addStatusBar(tb, o);
|
619 |
+
|
620 |
+
return ic;
|
621 |
+
},
|
622 |
+
|
623 |
+
_rowLayout : function(s, tb, o) {
|
624 |
+
var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a;
|
625 |
+
|
626 |
+
dc = s.theme_advanced_containers_default_class || '';
|
627 |
+
da = s.theme_advanced_containers_default_align || 'center';
|
628 |
+
|
629 |
+
each(explode(s.theme_advanced_containers || ''), function(c, i) {
|
630 |
+
var v = s['theme_advanced_container_' + c] || '';
|
631 |
+
|
632 |
+
switch (v.toLowerCase()) {
|
633 |
+
case 'mceeditor':
|
634 |
+
n = DOM.add(tb, 'tr');
|
635 |
+
n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
|
636 |
+
break;
|
637 |
+
|
638 |
+
case 'mceelementpath':
|
639 |
+
t._addStatusBar(tb, o);
|
640 |
+
break;
|
641 |
+
|
642 |
+
default:
|
643 |
+
a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase();
|
644 |
+
a = 'mce' + t._ufirst(a);
|
645 |
+
|
646 |
+
n = DOM.add(DOM.add(tb, 'tr'), 'td', {
|
647 |
+
'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da
|
648 |
+
});
|
649 |
+
|
650 |
+
to = cf.createToolbar("toolbar" + i);
|
651 |
+
t._addControls(v, to);
|
652 |
+
DOM.setHTML(n, to.renderHTML());
|
653 |
+
o.deltaHeight -= s.theme_advanced_row_height;
|
654 |
+
}
|
655 |
+
});
|
656 |
+
|
657 |
+
return ic;
|
658 |
+
},
|
659 |
+
|
660 |
+
_addControls : function(v, tb) {
|
661 |
+
var t = this, s = t.settings, di, cf = t.editor.controlManager;
|
662 |
+
|
663 |
+
if (s.theme_advanced_disable && !t._disabled) {
|
664 |
+
di = {};
|
665 |
+
|
666 |
+
each(explode(s.theme_advanced_disable), function(v) {
|
667 |
+
di[v] = 1;
|
668 |
+
});
|
669 |
+
|
670 |
+
t._disabled = di;
|
671 |
+
} else
|
672 |
+
di = t._disabled;
|
673 |
+
|
674 |
+
each(explode(v), function(n) {
|
675 |
+
var c;
|
676 |
+
|
677 |
+
if (di && di[n])
|
678 |
+
return;
|
679 |
+
|
680 |
+
// Compatiblity with 2.x
|
681 |
+
if (n == 'tablecontrols') {
|
682 |
+
each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) {
|
683 |
+
n = t.createControl(n, cf);
|
684 |
+
|
685 |
+
if (n)
|
686 |
+
tb.add(n);
|
687 |
+
});
|
688 |
+
|
689 |
+
return;
|
690 |
+
}
|
691 |
+
|
692 |
+
c = t.createControl(n, cf);
|
693 |
+
|
694 |
+
if (c)
|
695 |
+
tb.add(c);
|
696 |
+
});
|
697 |
+
},
|
698 |
+
|
699 |
+
_addToolbars : function(c, o) {
|
700 |
+
var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a;
|
701 |
+
|
702 |
+
a = s.theme_advanced_toolbar_align.toLowerCase();
|
703 |
+
a = 'mce' + t._ufirst(a);
|
704 |
+
|
705 |
+
n = DOM.add(DOM.add(c, 'tr'), 'td', {'class' : 'mceToolbar ' + a});
|
706 |
+
|
707 |
+
if (!ed.getParam('accessibility_focus'))
|
708 |
+
h.push(DOM.createHTML('a', {href : '#', onfocus : 'tinyMCE.get(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
|
709 |
+
|
710 |
+
h.push(DOM.createHTML('a', {href : '#', accesskey : 'q', title : ed.getLang("advanced.toolbar_focus")}, '<!-- IE -->'));
|
711 |
+
|
712 |
+
// Create toolbar and add the controls
|
713 |
+
for (i=1; (v = s['theme_advanced_buttons' + i]); i++) {
|
714 |
+
tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i});
|
715 |
+
|
716 |
+
if (s['theme_advanced_buttons' + i + '_add'])
|
717 |
+
v += ',' + s['theme_advanced_buttons' + i + '_add'];
|
718 |
+
|
719 |
+
if (s['theme_advanced_buttons' + i + '_add_before'])
|
720 |
+
v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v;
|
721 |
+
|
722 |
+
t._addControls(v, tb);
|
723 |
+
|
724 |
+
//n.appendChild(n = tb.render());
|
725 |
+
h.push(tb.renderHTML());
|
726 |
+
|
727 |
+
o.deltaHeight -= s.theme_advanced_row_height;
|
728 |
+
}
|
729 |
+
|
730 |
+
h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
|
731 |
+
DOM.setHTML(n, h.join(''));
|
732 |
+
},
|
733 |
+
|
734 |
+
_addStatusBar : function(tb, o) {
|
735 |
+
var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
|
736 |
+
|
737 |
+
n = DOM.add(tb, 'tr');
|
738 |
+
n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
|
739 |
+
n = DOM.add(n, 'div', {id : ed.id + '_path_row'}, s.theme_advanced_path ? ed.translate('advanced.path') + ': ' : ' ');
|
740 |
+
DOM.add(n, 'a', {href : '#', accesskey : 'x'});
|
741 |
+
|
742 |
+
if (s.theme_advanced_resizing) {
|
743 |
+
DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize'});
|
744 |
+
|
745 |
+
if (s.theme_advanced_resizing_use_cookie) {
|
746 |
+
ed.onPostRender.add(function() {
|
747 |
+
var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl');
|
748 |
+
|
749 |
+
if (!o)
|
750 |
+
return;
|
751 |
+
|
752 |
+
if (s.theme_advanced_resize_horizontal)
|
753 |
+
c.style.width = Math.max(10, o.cw) + 'px';
|
754 |
+
|
755 |
+
c.style.height = Math.max(10, o.ch) + 'px';
|
756 |
+
DOM.get(ed.id + '_ifr').style.height = Math.max(10, parseInt(o.ch) + t.deltaHeight) + 'px';
|
757 |
+
});
|
758 |
+
}
|
759 |
+
|
760 |
+
ed.onPostRender.add(function() {
|
761 |
+
Event.add(ed.id + '_resize', 'mousedown', function(e) {
|
762 |
+
var c, p, w, h, n, pa;
|
763 |
+
|
764 |
+
// Measure container
|
765 |
+
c = DOM.get(ed.id + '_tbl');
|
766 |
+
w = c.clientWidth;
|
767 |
+
h = c.clientHeight;
|
768 |
+
|
769 |
+
miw = s.theme_advanced_resizing_min_width || 100;
|
770 |
+
mih = s.theme_advanced_resizing_min_height || 100;
|
771 |
+
maw = s.theme_advanced_resizing_max_width || 0xFFFF;
|
772 |
+
mah = s.theme_advanced_resizing_max_height || 0xFFFF;
|
773 |
+
|
774 |
+
// Setup placeholder
|
775 |
+
p = DOM.add(DOM.get(ed.id + '_parent'), 'div', {'class' : 'mcePlaceHolder'});
|
776 |
+
DOM.setStyles(p, {width : w, height : h});
|
777 |
+
|
778 |
+
// Replace with placeholder
|
779 |
+
DOM.hide(c);
|
780 |
+
DOM.show(p);
|
781 |
+
|
782 |
+
// Create internal resize obj
|
783 |
+
r = {
|
784 |
+
x : e.screenX,
|
785 |
+
y : e.screenY,
|
786 |
+
w : w,
|
787 |
+
h : h,
|
788 |
+
dx : null,
|
789 |
+
dy : null
|
790 |
+
};
|
791 |
+
|
792 |
+
// Start listening
|
793 |
+
mf = Event.add(DOM.doc, 'mousemove', function(e) {
|
794 |
+
var w, h;
|
795 |
+
|
796 |
+
// Calc delta values
|
797 |
+
r.dx = e.screenX - r.x;
|
798 |
+
r.dy = e.screenY - r.y;
|
799 |
+
|
800 |
+
// Boundery fix box
|
801 |
+
w = Math.max(miw, r.w + r.dx);
|
802 |
+
h = Math.max(mih, r.h + r.dy);
|
803 |
+
w = Math.min(maw, w);
|
804 |
+
h = Math.min(mah, h);
|
805 |
+
|
806 |
+
// Resize placeholder
|
807 |
+
if (s.theme_advanced_resize_horizontal)
|
808 |
+
p.style.width = w + 'px';
|
809 |
+
|
810 |
+
p.style.height = h + 'px';
|
811 |
+
|
812 |
+
return Event.cancel(e);
|
813 |
+
});
|
814 |
+
|
815 |
+
me = Event.add(DOM.doc, 'mouseup', function(e) {
|
816 |
+
var ifr;
|
817 |
+
|
818 |
+
// Stop listening
|
819 |
+
Event.remove(DOM.doc, 'mousemove', mf);
|
820 |
+
Event.remove(DOM.doc, 'mouseup', me);
|
821 |
+
|
822 |
+
c.style.display = '';
|
823 |
+
DOM.remove(p);
|
824 |
+
|
825 |
+
if (r.dx === null)
|
826 |
+
return;
|
827 |
+
|
828 |
+
ifr = DOM.get(ed.id + '_ifr');
|
829 |
+
|
830 |
+
if (s.theme_advanced_resize_horizontal)
|
831 |
+
c.style.width = Math.max(10, r.w + r.dx) + 'px';
|
832 |
+
|
833 |
+
c.style.height = Math.max(10, r.h + r.dy) + 'px';
|
834 |
+
ifr.style.height = Math.max(10, ifr.clientHeight + r.dy) + 'px';
|
835 |
+
|
836 |
+
if (s.theme_advanced_resizing_use_cookie) {
|
837 |
+
Cookie.setHash("TinyMCE_" + ed.id + "_size", {
|
838 |
+
cw : r.w + r.dx,
|
839 |
+
ch : r.h + r.dy
|
840 |
+
});
|
841 |
+
}
|
842 |
+
});
|
843 |
+
|
844 |
+
return Event.cancel(e);
|
845 |
+
});
|
846 |
+
});
|
847 |
+
}
|
848 |
+
|
849 |
+
o.deltaHeight -= 21;
|
850 |
+
n = tb = null;
|
851 |
+
},
|
852 |
+
|
853 |
+
_nodeChanged : function(ed, cm, n, co, ob) {
|
854 |
+
var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn;
|
855 |
+
|
856 |
+
tinymce.each(t.stateControls, function(c) {
|
857 |
+
cm.setActive(c, ed.queryCommandState(t.controls[c][1]));
|
858 |
+
});
|
859 |
+
|
860 |
+
function getParent(name) {
|
861 |
+
var i, parents = ob.parents, func = name;
|
862 |
+
|
863 |
+
if (typeof(name) == 'string') {
|
864 |
+
func = function(node) {
|
865 |
+
return node.nodeName == name;
|
866 |
+
};
|
867 |
+
}
|
868 |
+
|
869 |
+
for (i = 0; i < parents.length; i++) {
|
870 |
+
if (func(parents[i]))
|
871 |
+
return parents[i];
|
872 |
+
}
|
873 |
+
};
|
874 |
+
|
875 |
+
cm.setActive('visualaid', ed.hasVisual);
|
876 |
+
cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing);
|
877 |
+
cm.setDisabled('redo', !ed.undoManager.hasRedo());
|
878 |
+
cm.setDisabled('outdent', !ed.queryCommandState('Outdent'));
|
879 |
+
|
880 |
+
p = getParent('A');
|
881 |
+
if (c = cm.get('link')) {
|
882 |
+
if (!p || !p.name) {
|
883 |
+
c.setDisabled(!p && co);
|
884 |
+
c.setActive(!!p);
|
885 |
+
}
|
886 |
+
}
|
887 |
+
|
888 |
+
if (c = cm.get('unlink')) {
|
889 |
+
c.setDisabled(!p && co);
|
890 |
+
c.setActive(!!p && !p.name);
|
891 |
+
}
|
892 |
+
|
893 |
+
if (c = cm.get('anchor')) {
|
894 |
+
c.setActive(!!p && p.name);
|
895 |
+
|
896 |
+
if (tinymce.isWebKit) {
|
897 |
+
p = getParent('IMG');
|
898 |
+
c.setActive(!!p && DOM.getAttrib(p, 'mce_name') == 'a');
|
899 |
+
}
|
900 |
+
}
|
901 |
+
|
902 |
+
p = getParent('IMG');
|
903 |
+
if (c = cm.get('image'))
|
904 |
+
c.setActive(!!p && n.className.indexOf('mceItem') == -1);
|
905 |
+
|
906 |
+
if (c = cm.get('styleselect')) {
|
907 |
+
t._importClasses();
|
908 |
+
|
909 |
+
// Check each format and update
|
910 |
+
c.select(function(fmt) {
|
911 |
+
return !!ed.formatter.match(fmt);
|
912 |
+
});
|
913 |
+
}
|
914 |
+
|
915 |
+
if (c = cm.get('formatselect')) {
|
916 |
+
p = getParent(DOM.isBlock);
|
917 |
+
|
918 |
+
if (p)
|
919 |
+
c.select(p.nodeName.toLowerCase());
|
920 |
+
}
|
921 |
+
|
922 |
+
// Find out current fontSize, fontFamily and fontClass
|
923 |
+
getParent(function(n) {
|
924 |
+
if (n.nodeName === 'SPAN') {
|
925 |
+
if (!cl && n.className)
|
926 |
+
cl = n.className;
|
927 |
+
|
928 |
+
if (!fz && n.style.fontSize)
|
929 |
+
fz = n.style.fontSize;
|
930 |
+
|
931 |
+
if (!fn && n.style.fontFamily)
|
932 |
+
fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();
|
933 |
+
}
|
934 |
+
|
935 |
+
return false;
|
936 |
+
});
|
937 |
+
|
938 |
+
if (c = cm.get('fontselect')) {
|
939 |
+
c.select(function(v) {
|
940 |
+
return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn;
|
941 |
+
});
|
942 |
+
}
|
943 |
+
|
944 |
+
// Select font size
|
945 |
+
if (c = cm.get('fontsizeselect')) {
|
946 |
+
// Use computed style
|
947 |
+
if (s.theme_advanced_runtime_fontsize && !fz && !cl)
|
948 |
+
fz = ed.dom.getStyle(n, 'fontSize', true);
|
949 |
+
|
950 |
+
c.select(function(v) {
|
951 |
+
if (v.fontSize && v.fontSize === fz)
|
952 |
+
return true;
|
953 |
+
|
954 |
+
if (v['class'] && v['class'] === cl)
|
955 |
+
return true;
|
956 |
+
});
|
957 |
+
}
|
958 |
+
|
959 |
+
if (s.theme_advanced_path && s.theme_advanced_statusbar_location) {
|
960 |
+
p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});
|
961 |
+
DOM.setHTML(p, '');
|
962 |
+
|
963 |
+
getParent(function(n) {
|
964 |
+
var na = n.nodeName.toLowerCase(), u, pi, ti = '';
|
965 |
+
|
966 |
+
/*if (n.getAttribute('_mce_bogus'))
|
967 |
+
return;
|
968 |
+
*/
|
969 |
+
// Ignore non element and hidden elements
|
970 |
+
if (n.nodeType != 1 || n.nodeName === 'BR' || (DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved')))
|
971 |
+
return;
|
972 |
+
|
973 |
+
// Fake name
|
974 |
+
if (v = DOM.getAttrib(n, 'mce_name'))
|
975 |
+
na = v;
|
976 |
+
|
977 |
+
// Handle prefix
|
978 |
+
if (tinymce.isIE && n.scopeName !== 'HTML')
|
979 |
+
na = n.scopeName + ':' + na;
|
980 |
+
|
981 |
+
// Remove internal prefix
|
982 |
+
na = na.replace(/mce\:/g, '');
|
983 |
+
|
984 |
+
// Handle node name
|
985 |
+
switch (na) {
|
986 |
+
case 'b':
|
987 |
+
na = 'strong';
|
988 |
+
break;
|
989 |
+
|
990 |
+
case 'i':
|
991 |
+
na = 'em';
|
992 |
+
break;
|
993 |
+
|
994 |
+
case 'img':
|
995 |
+
if (v = DOM.getAttrib(n, 'src'))
|
996 |
+
ti += 'src: ' + v + ' ';
|
997 |
+
|
998 |
+
break;
|
999 |
+
|
1000 |
+
case 'a':
|
1001 |
+
if (v = DOM.getAttrib(n, 'name')) {
|
1002 |
+
ti += 'name: ' + v + ' ';
|
1003 |
+
na += '#' + v;
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
if (v = DOM.getAttrib(n, 'href'))
|
1007 |
+
ti += 'href: ' + v + ' ';
|
1008 |
+
|
1009 |
+
break;
|
1010 |
+
|
1011 |
+
case 'font':
|
1012 |
+
if (v = DOM.getAttrib(n, 'face'))
|
1013 |
+
ti += 'font: ' + v + ' ';
|
1014 |
+
|
1015 |
+
if (v = DOM.getAttrib(n, 'size'))
|
1016 |
+
ti += 'size: ' + v + ' ';
|
1017 |
+
|
1018 |
+
if (v = DOM.getAttrib(n, 'color'))
|
1019 |
+
ti += 'color: ' + v + ' ';
|
1020 |
+
|
1021 |
+
break;
|
1022 |
+
|
1023 |
+
case 'span':
|
1024 |
+
if (v = DOM.getAttrib(n, 'style'))
|
1025 |
+
ti += 'style: ' + v + ' ';
|
1026 |
+
|
1027 |
+
break;
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
if (v = DOM.getAttrib(n, 'id'))
|
1031 |
+
ti += 'id: ' + v + ' ';
|
1032 |
+
|
1033 |
+
if (v = n.className) {
|
1034 |
+
v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '')
|
1035 |
+
|
1036 |
+
if (v) {
|
1037 |
+
ti += 'class: ' + v + ' ';
|
1038 |
+
|
1039 |
+
if (DOM.isBlock(n) || na == 'img' || na == 'span')
|
1040 |
+
na += '.' + v;
|
1041 |
+
}
|
1042 |
+
}
|
1043 |
+
|
1044 |
+
na = na.replace(/(html:)/g, '');
|
1045 |
+
na = {name : na, node : n, title : ti};
|
1046 |
+
t.onResolveName.dispatch(t, na);
|
1047 |
+
ti = na.title;
|
1048 |
+
na = na.name;
|
1049 |
+
|
1050 |
+
//u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');";
|
1051 |
+
pi = DOM.create('a', {'href' : "javascript:;", onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na);
|
1052 |
+
|
1053 |
+
if (p.hasChildNodes()) {
|
1054 |
+
p.insertBefore(DOM.doc.createTextNode(' \u00bb '), p.firstChild);
|
1055 |
+
p.insertBefore(pi, p.firstChild);
|
1056 |
+
} else
|
1057 |
+
p.appendChild(pi);
|
1058 |
+
}, ed.getBody());
|
1059 |
+
}
|
1060 |
+
},
|
1061 |
+
|
1062 |
+
// Commands gets called by execCommand
|
1063 |
+
|
1064 |
+
_sel : function(v) {
|
1065 |
+
this.editor.execCommand('mceSelectNodeDepth', false, v);
|
1066 |
+
},
|
1067 |
+
|
1068 |
+
_mceInsertAnchor : function(ui, v) {
|
1069 |
+
var ed = this.editor;
|
1070 |
+
|
1071 |
+
ed.windowManager.open({
|
1072 |
+
url : tinymce.baseURL + '/themes/advanced/anchor.htm',
|
1073 |
+
width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)),
|
1074 |
+
height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)),
|
1075 |
+
inline : true
|
1076 |
+
}, {
|
1077 |
+
theme_url : this.url
|
1078 |
+
});
|
1079 |
+
},
|
1080 |
+
|
1081 |
+
_mceCharMap : function() {
|
1082 |
+
var ed = this.editor;
|
1083 |
+
|
1084 |
+
ed.windowManager.open({
|
1085 |
+
url : tinymce.baseURL + '/themes/advanced/charmap.htm',
|
1086 |
+
width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)),
|
1087 |
+
height : 250 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)),
|
1088 |
+
inline : true
|
1089 |
+
}, {
|
1090 |
+
theme_url : this.url
|
1091 |
+
});
|
1092 |
+
},
|
1093 |
+
|
1094 |
+
_mceHelp : function() {
|
1095 |
+
var ed = this.editor;
|
1096 |
+
|
1097 |
+
ed.windowManager.open({
|
1098 |
+
url : tinymce.baseURL + '/themes/advanced/about.htm',
|
1099 |
+
width : 480,
|
1100 |
+
height : 380,
|
1101 |
+
inline : true
|
1102 |
+
}, {
|
1103 |
+
theme_url : this.url
|
1104 |
+
});
|
1105 |
+
},
|
1106 |
+
|
1107 |
+
_mceColorPicker : function(u, v) {
|
1108 |
+
var ed = this.editor;
|
1109 |
+
|
1110 |
+
v = v || {};
|
1111 |
+
|
1112 |
+
ed.windowManager.open({
|
1113 |
+
url : tinymce.baseURL + '/themes/advanced/color_picker.htm',
|
1114 |
+
width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)),
|
1115 |
+
height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)),
|
1116 |
+
close_previous : false,
|
1117 |
+
inline : true
|
1118 |
+
}, {
|
1119 |
+
input_color : v.color,
|
1120 |
+
func : v.func,
|
1121 |
+
theme_url : this.url
|
1122 |
+
});
|
1123 |
+
},
|
1124 |
+
|
1125 |
+
_mceCodeEditor : function(ui, val) {
|
1126 |
+
var ed = this.editor;
|
1127 |
+
|
1128 |
+
ed.windowManager.open({
|
1129 |
+
url : tinymce.baseURL + '/themes/advanced/source_editor.htm',
|
1130 |
+
width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)),
|
1131 |
+
height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)),
|
1132 |
+
inline : true,
|
1133 |
+
resizable : true,
|
1134 |
+
maximizable : true
|
1135 |
+
}, {
|
1136 |
+
theme_url : this.url
|
1137 |
+
});
|
1138 |
+
},
|
1139 |
+
|
1140 |
+
_mceImage : function(ui, val) {
|
1141 |
+
var ed = this.editor;
|
1142 |
+
|
1143 |
+
// Internal image object like a flash placeholder
|
1144 |
+
if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1)
|
1145 |
+
return;
|
1146 |
+
|
1147 |
+
ed.windowManager.open({
|
1148 |
+
url : tinymce.baseURL + '/themes/advanced/image.htm',
|
1149 |
+
width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)),
|
1150 |
+
height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)),
|
1151 |
+
inline : true
|
1152 |
+
}, {
|
1153 |
+
theme_url : this.url
|
1154 |
+
});
|
1155 |
+
},
|
1156 |
+
|
1157 |
+
_mceLink : function(ui, val) {
|
1158 |
+
var ed = this.editor;
|
1159 |
+
|
1160 |
+
ed.windowManager.open({
|
1161 |
+
url : tinymce.baseURL + '/themes/advanced/link.htm',
|
1162 |
+
width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)),
|
1163 |
+
height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)),
|
1164 |
+
inline : true
|
1165 |
+
}, {
|
1166 |
+
theme_url : this.url
|
1167 |
+
});
|
1168 |
+
},
|
1169 |
+
|
1170 |
+
_mceNewDocument : function() {
|
1171 |
+
var ed = this.editor;
|
1172 |
+
|
1173 |
+
ed.windowManager.confirm('advanced.newdocument', function(s) {
|
1174 |
+
if (s)
|
1175 |
+
ed.execCommand('mceSetContent', false, '');
|
1176 |
+
});
|
1177 |
+
},
|
1178 |
+
|
1179 |
+
_mceForeColor : function() {
|
1180 |
+
var t = this;
|
1181 |
+
|
1182 |
+
this._mceColorPicker(0, {
|
1183 |
+
color: t.fgColor,
|
1184 |
+
func : function(co) {
|
1185 |
+
t.fgColor = co;
|
1186 |
+
t.editor.execCommand('ForeColor', false, co);
|
1187 |
+
}
|
1188 |
+
});
|
1189 |
+
},
|
1190 |
+
|
1191 |
+
_mceBackColor : function() {
|
1192 |
+
var t = this;
|
1193 |
+
|
1194 |
+
this._mceColorPicker(0, {
|
1195 |
+
color: t.bgColor,
|
1196 |
+
func : function(co) {
|
1197 |
+
t.bgColor = co;
|
1198 |
+
t.editor.execCommand('HiliteColor', false, co);
|
1199 |
+
}
|
1200 |
+
});
|
1201 |
+
},
|
1202 |
+
|
1203 |
+
_ufirst : function(s) {
|
1204 |
+
return s.substring(0, 1).toUpperCase() + s.substring(1);
|
1205 |
+
}
|
1206 |
+
});
|
1207 |
+
|
1208 |
+
tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);
|
1209 |
+
}(tinymce));
|
tiny_mce/themes/advanced/skins/default/content.css
CHANGED
@@ -10,6 +10,7 @@ h6 {font-size: .75em}
|
|
10 |
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
|
11 |
a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;}
|
12 |
img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;}
|
|
|
13 |
img {border:0;}
|
14 |
table {cursor:default}
|
15 |
table td, table th {cursor:text}
|
@@ -30,3 +31,6 @@ scrollbar-highlight-color:#F0F0EE;
|
|
30 |
scrollbar-shadow-color:#F0F0EE;
|
31 |
scrollbar-track-color:#F5F5F5;
|
32 |
}
|
|
|
|
|
|
10 |
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
|
11 |
a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;}
|
12 |
img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;}
|
13 |
+
td.mceSelected, th.mceSelected {background-color:#3399ff}
|
14 |
img {border:0;}
|
15 |
table {cursor:default}
|
16 |
table td, table th {cursor:text}
|
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}
|
tiny_mce/themes/advanced/skins/default/ui.css
CHANGED
@@ -63,7 +63,7 @@
|
|
63 |
.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr}
|
64 |
.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
|
65 |
.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;}
|
66 |
-
.defaultSkin .mceSplitButton span.mceAction {width:20px; background:url(../../img/icons.gif)
|
67 |
.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;}
|
68 |
.defaultSkin .mceSplitButton span.mceOpen {display:none}
|
69 |
.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
|
@@ -211,4 +211,5 @@
|
|
211 |
.defaultSkin span.mce_del {background-position:-940px -20px}
|
212 |
.defaultSkin span.mce_ins {background-position:-960px -20px}
|
213 |
.defaultSkin span.mce_pagebreak {background-position:0 -40px}
|
|
|
214 |
.defaultSkin .mce_spellchecker span.mceAction {background-position:-540px -20px}
|
63 |
.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr}
|
64 |
.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
|
65 |
.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;}
|
66 |
+
.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);}
|
67 |
.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;}
|
68 |
.defaultSkin .mceSplitButton span.mceOpen {display:none}
|
69 |
.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
|
211 |
.defaultSkin span.mce_del {background-position:-940px -20px}
|
212 |
.defaultSkin span.mce_ins {background-position:-960px -20px}
|
213 |
.defaultSkin span.mce_pagebreak {background-position:0 -40px}
|
214 |
+
.defaultSkin span.mce_restoredraft {background-position:-20px -40px}
|
215 |
.defaultSkin .mce_spellchecker span.mceAction {background-position:-540px -20px}
|
tiny_mce/themes/advanced/skins/o2k7/content.css
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(../default/img/items.gif) no-repeat bottom left;}
|
12 |
+
img.mceItemAnchor {width:12px; height:12px; background:url(../default/img/items.gif) no-repeat;}
|
13 |
+
img {border:0;}
|
14 |
+
table {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, html\:abbr {border-bottom:1px dashed #CCC; cursor:help}
|
21 |
+
|
22 |
+
/* IE */
|
23 |
+
* html body {
|
24 |
+
scrollbar-3dlight-color:#F0F0EE;
|
25 |
+
scrollbar-arrow-color:#676662;
|
26 |
+
scrollbar-base-color:#F0F0EE;
|
27 |
+
scrollbar-darkshadow-color:#DDD;
|
28 |
+
scrollbar-face-color:#E0E0DD;
|
29 |
+
scrollbar-highlight-color:#F0F0EE;
|
30 |
+
scrollbar-shadow-color:#F0F0EE;
|
31 |
+
scrollbar-track-color:#F5F5F5;
|
32 |
+
}
|
33 |
+
|
34 |
+
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
|
35 |
+
font[face=mceinline] {font-family:inherit !important}
|
tiny_mce/themes/advanced/skins/o2k7/dialog.css
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
}
|
46 |
+
|
47 |
+
#insert {background:url(../default/img/buttons.png) 0 -52px;}
|
48 |
+
#cancel {background:url(../default/img/buttons.png) 0 0;}
|
49 |
+
|
50 |
+
/* Browse */
|
51 |
+
a.pickcolor, a.browse {text-decoration:none}
|
52 |
+
a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
|
53 |
+
.mceOldBoxModel a.browse span {width:22px; height:20px;}
|
54 |
+
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
|
55 |
+
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
56 |
+
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
|
57 |
+
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
|
58 |
+
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
|
59 |
+
a.pickcolor:hover span {background-color:#B2BBD0;}
|
60 |
+
a.pickcolor:hover span.disabled {}
|
61 |
+
|
62 |
+
/* Charmap */
|
63 |
+
table.charmap {border:1px solid #AAA; text-align:center}
|
64 |
+
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;}
|
65 |
+
#charmap a {display:block; color:#000; text-decoration:none; border:0}
|
66 |
+
#charmap a:hover {background:#CCC;color:#2B6FB6}
|
67 |
+
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
|
68 |
+
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
|
69 |
+
|
70 |
+
/* Source */
|
71 |
+
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
|
72 |
+
.mceActionPanel {margin-top:5px;}
|
73 |
+
|
74 |
+
/* Tabs classes */
|
75 |
+
.tabs {width:100%; height:18px; line-height:normal; background:url(../default/img/tabs.gif) repeat-x 0 -72px;}
|
76 |
+
.tabs ul {margin:0; padding:0; list-style:none;}
|
77 |
+
.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;}
|
78 |
+
.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
|
79 |
+
.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
|
80 |
+
.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;}
|
81 |
+
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
|
82 |
+
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
|
83 |
+
|
84 |
+
/* Panels */
|
85 |
+
.panel_wrapper div.panel {display:none;}
|
86 |
+
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
|
87 |
+
.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
|
88 |
+
|
89 |
+
/* Columns */
|
90 |
+
.column {float:left;}
|
91 |
+
.properties {width:100%;}
|
92 |
+
.properties .column1 {}
|
93 |
+
.properties .column2 {text-align:left;}
|
94 |
+
|
95 |
+
/* Titles */
|
96 |
+
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
|
97 |
+
h3 {font-size:14px;}
|
98 |
+
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
|
99 |
+
|
100 |
+
/* Dialog specific */
|
101 |
+
#link .panel_wrapper, #link div.current {height:125px;}
|
102 |
+
#image .panel_wrapper, #image div.current {height:200px;}
|
103 |
+
#plugintable thead {font-weight:bold; background:#DDD;}
|
104 |
+
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
|
105 |
+
#plugintable {width:96%; margin-top:10px;}
|
106 |
+
#pluginscontainer {height:290px; overflow:auto;}
|
107 |
+
#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
|
108 |
+
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
|
109 |
+
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
|
110 |
+
#colorpicker #light div {overflow:hidden;}
|
111 |
+
#colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
|
112 |
+
#colorpicker .panel_wrapper div.current {height:175px;}
|
113 |
+
#colorpicker #namedcolors {width:150px;}
|
114 |
+
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
|
115 |
+
#colorpicker #colornamecontainer {margin-top:5px;}
|
tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png
ADDED
Binary file
|
tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png
ADDED
Binary file
|
tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png
ADDED
Binary file
|
tiny_mce/themes/advanced/skins/o2k7/ui.css
ADDED
@@ -0,0 +1,216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:#E5EFFD}
|
8 |
+
.o2k7Skin iframe {display:block; background:#FFF}
|
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 .mceStatusbar {display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px}
|
23 |
+
.o2k7Skin .mceStatusbar div {float:left; padding:2px}
|
24 |
+
.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize}
|
25 |
+
.o2k7Skin .mceStatusbar a:hover {text-decoration:underline}
|
26 |
+
.o2k7Skin table.mceToolbar {margin-left:3px}
|
27 |
+
.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;}
|
28 |
+
.o2k7Skin .mceToolbar td.mceFirst span {margin:0}
|
29 |
+
.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px}
|
30 |
+
.o2k7Skin .mceToolbar .mceToolbarEndListBox span, .o2k7Skin .mceToolbar .mceToolbarStartListBox span {display:none}
|
31 |
+
.o2k7Skin span.mceIcon, .o2k7Skin img.mceIcon {display:block; width:20px; height:20px}
|
32 |
+
.o2k7Skin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
|
33 |
+
.o2k7Skin td.mceCenter {text-align:center;}
|
34 |
+
.o2k7Skin td.mceCenter table {margin:0 auto; text-align:left;}
|
35 |
+
.o2k7Skin td.mceRight table {margin:0 0 0 auto;}
|
36 |
+
|
37 |
+
/* Button */
|
38 |
+
.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px}
|
39 |
+
.o2k7Skin a.mceButton span, .o2k7Skin a.mceButton img {margin-left:1px}
|
40 |
+
.o2k7Skin .mceOldBoxModel a.mceButton span, .o2k7Skin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px}
|
41 |
+
.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px}
|
42 |
+
.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px}
|
43 |
+
.o2k7Skin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
44 |
+
.o2k7Skin .mceButtonLabeled {width:auto}
|
45 |
+
.o2k7Skin .mceButtonLabeled span.mceIcon {float:left}
|
46 |
+
.o2k7Skin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
|
47 |
+
.o2k7Skin .mceButtonDisabled .mceButtonLabel {color:#888}
|
48 |
+
|
49 |
+
/* Separator */
|
50 |
+
.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px}
|
51 |
+
|
52 |
+
/* ListBox */
|
53 |
+
.o2k7Skin .mceListBox {margin-left:3px}
|
54 |
+
.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block}
|
55 |
+
.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}
|
56 |
+
.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0}
|
57 |
+
.o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF}
|
58 |
+
.o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px}
|
59 |
+
.o2k7Skin .mceListBoxDisabled .mceText {color:gray}
|
60 |
+
.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
|
61 |
+
.o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px}
|
62 |
+
.o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;}
|
63 |
+
|
64 |
+
/* SplitButton */
|
65 |
+
.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px}
|
66 |
+
.o2k7Skin .mceSplitButton {background:url(img/button_bg.png)}
|
67 |
+
.o2k7Skin .mceSplitButton a.mceAction {width:22px}
|
68 |
+
.o2k7Skin .mceSplitButton span.mceAction {width:22px; background-image:url(../../img/icons.gif)}
|
69 |
+
.o2k7Skin .mceSplitButton a.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0}
|
70 |
+
.o2k7Skin .mceSplitButton span.mceOpen {display:none}
|
71 |
+
.o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px}
|
72 |
+
.o2k7Skin table.mceSplitButtonEnabled:hover a.mceOpen, .o2k7Skin .mceSplitButtonHover a.mceOpen, .o2k7Skin .mceSplitButtonSelected a.mceOpen {background-position:-44px -44px}
|
73 |
+
.o2k7Skin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
74 |
+
.o2k7Skin .mceSplitButtonActive {background-position:0 -44px}
|
75 |
+
|
76 |
+
/* ColorSplitButton */
|
77 |
+
.o2k7Skin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
|
78 |
+
.o2k7Skin .mceColorSplitMenu td {padding:2px}
|
79 |
+
.o2k7Skin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
|
80 |
+
.o2k7Skin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
|
81 |
+
.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}
|
82 |
+
.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
|
83 |
+
.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A}
|
84 |
+
.o2k7Skin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a;overflow:hidden}
|
85 |
+
.o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px;overflow:hidden}
|
86 |
+
|
87 |
+
/* Menu */
|
88 |
+
.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD}
|
89 |
+
.o2k7Skin .mceNoIcons span.mceIcon {width:0;}
|
90 |
+
.o2k7Skin .mceNoIcons a .mceText {padding-left:10px}
|
91 |
+
.o2k7Skin .mceMenu table {background:#FFF}
|
92 |
+
.o2k7Skin .mceMenu a, .o2k7Skin .mceMenu span, .o2k7Skin .mceMenu {display:block}
|
93 |
+
.o2k7Skin .mceMenu td {height:20px}
|
94 |
+
.o2k7Skin .mceMenu a {position:relative;padding:3px 0 4px 0}
|
95 |
+
.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}
|
96 |
+
.o2k7Skin .mceMenu span.mceText, .o2k7Skin .mceMenu .mcePreview {font-size:11px}
|
97 |
+
.o2k7Skin .mceMenu pre.mceText {font-family:Monospace}
|
98 |
+
.o2k7Skin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
|
99 |
+
.o2k7Skin .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
|
100 |
+
.o2k7Skin td.mceMenuItemSeparator {background:#DDD; height:1px}
|
101 |
+
.o2k7Skin .mceMenuItemTitle a {border:0; background:#E5EFFD; border-bottom:1px solid #ABC6DD}
|
102 |
+
.o2k7Skin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
|
103 |
+
.o2k7Skin .mceMenuItemDisabled .mceText {color:#888}
|
104 |
+
.o2k7Skin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)}
|
105 |
+
.o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center}
|
106 |
+
.o2k7Skin .mceMenu span.mceMenuLine {display:none}
|
107 |
+
.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;}
|
108 |
+
|
109 |
+
/* Progress,Resize */
|
110 |
+
.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}
|
111 |
+
.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}
|
112 |
+
.o2k7Skin .mcePlaceHolder {border:1px dotted gray}
|
113 |
+
|
114 |
+
/* Formats */
|
115 |
+
.o2k7Skin .mce_formatPreview a {font-size:10px}
|
116 |
+
.o2k7Skin .mce_p span.mceText {}
|
117 |
+
.o2k7Skin .mce_address span.mceText {font-style:italic}
|
118 |
+
.o2k7Skin .mce_pre span.mceText {font-family:monospace}
|
119 |
+
.o2k7Skin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
|
120 |
+
.o2k7Skin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
|
121 |
+
.o2k7Skin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
|
122 |
+
.o2k7Skin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
|
123 |
+
.o2k7Skin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
|
124 |
+
.o2k7Skin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
|
125 |
+
|
126 |
+
/* Theme */
|
127 |
+
.o2k7Skin span.mce_bold {background-position:0 0}
|
128 |
+
.o2k7Skin span.mce_italic {background-position:-60px 0}
|
129 |
+
.o2k7Skin span.mce_underline {background-position:-140px 0}
|
130 |
+
.o2k7Skin span.mce_strikethrough {background-position:-120px 0}
|
131 |
+
.o2k7Skin span.mce_undo {background-position:-160px 0}
|
132 |
+
.o2k7Skin span.mce_redo {background-position:-100px 0}
|
133 |
+
.o2k7Skin span.mce_cleanup {background-position:-40px 0}
|
134 |
+
.o2k7Skin span.mce_bullist {background-position:-20px 0}
|
135 |
+
.o2k7Skin span.mce_numlist {background-position:-80px 0}
|
136 |
+
.o2k7Skin span.mce_justifyleft {background-position:-460px 0}
|
137 |
+
.o2k7Skin span.mce_justifyright {background-position:-480px 0}
|
138 |
+
.o2k7Skin span.mce_justifycenter {background-position:-420px 0}
|
139 |
+
.o2k7Skin span.mce_justifyfull {background-position:-440px 0}
|
140 |
+
.o2k7Skin span.mce_anchor {background-position:-200px 0}
|
141 |
+
.o2k7Skin span.mce_indent {background-position:-400px 0}
|
142 |
+
.o2k7Skin span.mce_outdent {background-position:-540px 0}
|
143 |
+
.o2k7Skin span.mce_link {background-position:-500px 0}
|
144 |
+
.o2k7Skin span.mce_unlink {background-position:-640px 0}
|
145 |
+
.o2k7Skin span.mce_sub {background-position:-600px 0}
|
146 |
+
.o2k7Skin span.mce_sup {background-position:-620px 0}
|
147 |
+
.o2k7Skin span.mce_removeformat {background-position:-580px 0}
|
148 |
+
.o2k7Skin span.mce_newdocument {background-position:-520px 0}
|
149 |
+
.o2k7Skin span.mce_image {background-position:-380px 0}
|
150 |
+
.o2k7Skin span.mce_help {background-position:-340px 0}
|
151 |
+
.o2k7Skin span.mce_code {background-position:-260px 0}
|
152 |
+
.o2k7Skin span.mce_hr {background-position:-360px 0}
|
153 |
+
.o2k7Skin span.mce_visualaid {background-position:-660px 0}
|
154 |
+
.o2k7Skin span.mce_charmap {background-position:-240px 0}
|
155 |
+
.o2k7Skin span.mce_paste {background-position:-560px 0}
|
156 |
+
.o2k7Skin span.mce_copy {background-position:-700px 0}
|
157 |
+
.o2k7Skin span.mce_cut {background-position:-680px 0}
|
158 |
+
.o2k7Skin span.mce_blockquote {background-position:-220px 0}
|
159 |
+
.o2k7Skin .mce_forecolor span.mceAction {background-position:-720px 0}
|
160 |
+
.o2k7Skin .mce_backcolor span.mceAction {background-position:-760px 0}
|
161 |
+
.o2k7Skin span.mce_forecolorpicker {background-position:-720px 0}
|
162 |
+
.o2k7Skin span.mce_backcolorpicker {background-position:-760px 0}
|
163 |
+
|
164 |
+
/* Plugins */
|
165 |
+
.o2k7Skin span.mce_advhr {background-position:-0px -20px}
|
166 |
+
.o2k7Skin span.mce_ltr {background-position:-20px -20px}
|
167 |
+
.o2k7Skin span.mce_rtl {background-position:-40px -20px}
|
168 |
+
.o2k7Skin span.mce_emotions {background-position:-60px -20px}
|
169 |
+
.o2k7Skin span.mce_fullpage {background-position:-80px -20px}
|
170 |
+
.o2k7Skin span.mce_fullscreen {background-position:-100px -20px}
|
171 |
+
.o2k7Skin span.mce_iespell {background-position:-120px -20px}
|
172 |
+
.o2k7Skin span.mce_insertdate {background-position:-140px -20px}
|
173 |
+
.o2k7Skin span.mce_inserttime {background-position:-160px -20px}
|
174 |
+
.o2k7Skin span.mce_absolute {background-position:-180px -20px}
|
175 |
+
.o2k7Skin span.mce_backward {background-position:-200px -20px}
|
176 |
+
.o2k7Skin span.mce_forward {background-position:-220px -20px}
|
177 |
+
.o2k7Skin span.mce_insert_layer {background-position:-240px -20px}
|
178 |
+
.o2k7Skin span.mce_insertlayer {background-position:-260px -20px}
|
179 |
+
.o2k7Skin span.mce_movebackward {background-position:-280px -20px}
|
180 |
+
.o2k7Skin span.mce_moveforward {background-position:-300px -20px}
|
181 |
+
.o2k7Skin span.mce_media {background-position:-320px -20px}
|
182 |
+
.o2k7Skin span.mce_nonbreaking {background-position:-340px -20px}
|
183 |
+
.o2k7Skin span.mce_pastetext {background-position:-360px -20px}
|
184 |
+
.o2k7Skin span.mce_pasteword {background-position:-380px -20px}
|
185 |
+
.o2k7Skin span.mce_selectall {background-position:-400px -20px}
|
186 |
+
.o2k7Skin span.mce_preview {background-position:-420px -20px}
|
187 |
+
.o2k7Skin span.mce_print {background-position:-440px -20px}
|
188 |
+
.o2k7Skin span.mce_cancel {background-position:-460px -20px}
|
189 |
+
.o2k7Skin span.mce_save {background-position:-480px -20px}
|
190 |
+
.o2k7Skin span.mce_replace {background-position:-500px -20px}
|
191 |
+
.o2k7Skin span.mce_search {background-position:-520px -20px}
|
192 |
+
.o2k7Skin span.mce_styleprops {background-position:-560px -20px}
|
193 |
+
.o2k7Skin span.mce_table {background-position:-580px -20px}
|
194 |
+
.o2k7Skin span.mce_cell_props {background-position:-600px -20px}
|
195 |
+
.o2k7Skin span.mce_delete_table {background-position:-620px -20px}
|
196 |
+
.o2k7Skin span.mce_delete_col {background-position:-640px -20px}
|
197 |
+
.o2k7Skin span.mce_delete_row {background-position:-660px -20px}
|
198 |
+
.o2k7Skin span.mce_col_after {background-position:-680px -20px}
|
199 |
+
.o2k7Skin span.mce_col_before {background-position:-700px -20px}
|
200 |
+
.o2k7Skin span.mce_row_after {background-position:-720px -20px}
|
201 |
+
.o2k7Skin span.mce_row_before {background-position:-740px -20px}
|
202 |
+
.o2k7Skin span.mce_merge_cells {background-position:-760px -20px}
|
203 |
+
.o2k7Skin span.mce_table_props {background-position:-980px -20px}
|
204 |
+
.o2k7Skin span.mce_row_props {background-position:-780px -20px}
|
205 |
+
.o2k7Skin span.mce_split_cells {background-position:-800px -20px}
|
206 |
+
.o2k7Skin span.mce_template {background-position:-820px -20px}
|
207 |
+
.o2k7Skin span.mce_visualchars {background-position:-840px -20px}
|
208 |
+
.o2k7Skin span.mce_abbr {background-position:-860px -20px}
|
209 |
+
.o2k7Skin span.mce_acronym {background-position:-880px -20px}
|
210 |
+
.o2k7Skin span.mce_attribs {background-position:-900px -20px}
|
211 |
+
.o2k7Skin span.mce_cite {background-position:-920px -20px}
|
212 |
+
.o2k7Skin span.mce_del {background-position:-940px -20px}
|
213 |
+
.o2k7Skin span.mce_ins {background-position:-960px -20px}
|
214 |
+
.o2k7Skin span.mce_pagebreak {background-position:0 -40px}
|
215 |
+
.o2k7Skin span.mce_restoredraft {background-position:-20px -40px}
|
216 |
+
.o2k7Skin .mce_spellchecker span.mceAction {background-position:-540px -20px}
|
tiny_mce/themes/advanced/skins/o2k7/ui_black.css
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 table, .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
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
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 table, .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/tiny_mce.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var tinymce={majorVersion:"3",minorVersion:"2.3.1",releaseDate:"2009-05-05",_init:function(){var o=this,k=document,l=window,j=navigator,b=j.userAgent,h,a,g,f,e,m;o.isOpera=l.opera&&opera.buildNumber;o.isWebKit=/WebKit/.test(b);o.isIE=!o.isWebKit&&!o.isOpera&&(/MSIE/gi).test(b)&&(/Explorer/gi).test(j.appName);o.isIE6=o.isIE&&/MSIE [56]/.test(b);o.isGecko=!o.isWebKit&&/Gecko/.test(b);o.isMac=b.indexOf("Mac")!=-1;o.isAir=/adobeair/i.test(b);if(l.tinyMCEPreInit){o.suffix=tinyMCEPreInit.suffix;o.baseURL=tinyMCEPreInit.base;o.query=tinyMCEPreInit.query;return}o.suffix="";a=k.getElementsByTagName("base");for(h=0;h<a.length;h++){if(m=a[h].href){if(/^https?:\/\/[^\/]+$/.test(m)){m+="/"}f=m?m.match(/.*\//)[0]:""}}function c(d){if(d.src&&/tiny_mce(|_dev|_src|_gzip|_jquery|_prototype).js/.test(d.src)){if(/_(src|dev)\.js/g.test(d.src)){o.suffix="_src"}if((e=d.src.indexOf("?"))!=-1){o.query=d.src.substring(e+1)}o.baseURL=d.src.substring(0,d.src.lastIndexOf("/"));if(f&&o.baseURL.indexOf("://")==-1){o.baseURL=f+o.baseURL}return o.baseURL}return null}a=k.getElementsByTagName("script");for(h=0;h<a.length;h++){if(c(a[h])){return}}g=k.getElementsByTagName("head")[0];if(g){a=g.getElementsByTagName("script");for(h=0;h<a.length;h++){if(c(a[h])){return}}}return},is:function(b,a){var c=typeof(b);if(!a){return c!="undefined"}if(a=="array"&&(b.hasOwnProperty&&b instanceof Array)){return true}return c==a},each:function(d,a,c){var e,b;if(!d){return 0}c=c||d;if(typeof(d.length)!="undefined"){for(e=0,b=d.length;e<b;e++){if(a.call(c,d[e],e,d)===false){return 0}}}else{for(e in d){if(d.hasOwnProperty(e)){if(a.call(c,d[e],e,d)===false){return 0}}}}return 1},map:function(b,c){var d=[];tinymce.each(b,function(a){d.push(c(a))});return d},grep:function(b,c){var d=[];tinymce.each(b,function(a){if(!c||c(a)){d.push(a)}});return d},inArray:function(c,d){var e,b;if(c){for(e=0,b=c.length;e<b;e++){if(c[e]===d){return e}}}return -1},extend:function(f,d){var c,b=arguments;for(c=1;c<b.length;c++){d=b[c];tinymce.each(d,function(a,e){if(typeof(a)!=="undefined"){f[e]=a}})}return f},trim:function(a){return(a?""+a:"").replace(/^\s*|\s*$/g,"")},create:function(j,a){var i=this,b,e,f,g,d,h=0;j=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(j);f=j[3].match(/(^|\.)(\w+)$/i)[2];e=i.createNS(j[3].replace(/\.\w+$/,""));if(e[f]){return}if(j[2]=="static"){e[f]=a;if(this.onCreate){this.onCreate(j[2],j[3],e[f])}return}if(!a[f]){a[f]=function(){};h=1}e[f]=a[f];i.extend(e[f].prototype,a);if(j[5]){b=i.resolve(j[5]).prototype;g=j[5].match(/\.(\w+)$/i)[1];d=e[f];if(h){e[f]=function(){return b[g].apply(this,arguments)}}else{e[f]=function(){this.parent=b[g];return d.apply(this,arguments)}}e[f].prototype[f]=e[f];i.each(b,function(c,k){e[f].prototype[k]=b[k]});i.each(a,function(c,k){if(b[k]){e[f].prototype[k]=function(){this.parent=b[k];return c.apply(this,arguments)}}else{if(k!=f){e[f].prototype[k]=c}}})}i.each(a["static"],function(c,k){e[f][k]=c});if(this.onCreate){this.onCreate(j[2],j[3],e[f].prototype)}},walk:function(c,b,d,a){a=a||this;if(c){if(d){c=c[d]}tinymce.each(c,function(f,e){if(b.call(a,f,e,d)===false){return false}tinymce.walk(f,b,d,a)})}},createNS:function(d,c){var b,a;c=c||window;d=d.split(".");for(b=0;b<d.length;b++){a=d[b];if(!c[a]){c[a]={}}c=c[a]}return c},resolve:function(d,c){var b,a;c=c||window;d=d.split(".");for(b=0,a=d.length;b<a;b++){c=c[d[b]];if(!c){break}}return c},addUnload:function(e,d){var c=this,a=window;e={func:e,scope:d||this};if(!c.unloads){function b(){var f=c.unloads,h,i;if(f){for(i in f){h=f[i];if(h&&h.func){h.func.call(h.scope,1)}}if(a.detachEvent){a.detachEvent("onbeforeunload",g);a.detachEvent("onunload",b)}else{if(a.removeEventListener){a.removeEventListener("unload",b,false)}}c.unloads=h=f=a=b=0;if(window.CollectGarbage){window.CollectGarbage()}}}function g(){var h=document;if(h.readyState=="interactive"){function f(){h.detachEvent("onstop",f);if(b){b()}h=0}if(h){h.attachEvent("onstop",f)}window.setTimeout(function(){if(h){h.detachEvent("onstop",f)}},0)}}if(a.attachEvent){a.attachEvent("onunload",b);a.attachEvent("onbeforeunload",g)}else{if(a.addEventListener){a.addEventListener("unload",b,false)}}c.unloads=[e]}else{c.unloads.push(e)}return e},removeUnload:function(c){var a=this.unloads,b=null;tinymce.each(a,function(e,d){if(e&&e.func==c){a.splice(d,1);b=c;return false}});return b},explode:function(a,b){return a?tinymce.map(a.split(b||","),tinymce.trim):a},_addVer:function(b){var a;if(!this.query){return b}a=(b.indexOf("?")==-1?"?":"&")+this.query;if(b.indexOf("#")==-1){return b+a}return b.replace("#",a+"#")}};window.tinymce=tinymce;tinymce._init();tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,Dispatcher:function(a){this.scope=a||this;this.listeners=[]},add:function(a,b){this.listeners.push({cb:a,scope:b||this.scope});return a},addToTop:function(a,b){this.listeners.unshift({cb:a,scope:b||this.scope});return a},remove:function(a){var b=this.listeners,c=null;tinymce.each(b,function(e,d){if(a==e.cb){c=a;b.splice(d,1);return false}});return c},dispatch:function(){var f,d=arguments,e,b=this.listeners,g;for(e=0;e<b.length;e++){g=b[e];f=g.cb.apply(g.scope,d);if(f===false){break}}return f}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,h,d,c;g=f.settings=g||{};if(/^(mailto|tel|news|javascript|about):/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(e.indexOf(":/")===-1&&e.indexOf("//")!==0){e=(g.base_uri.protocol||"http")+"://mce_host"+f.toAbsPath(g.base_uri.path,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});if(c=g.base_uri){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 c=this,d;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:c});if((b.host!="mce_host"&&c.host!=b.host&&b.host)||c.port!=b.port||c.protocol!=b.protocol){return b.getURI()}d=c.toRelPath(c.path,b.path);if(b.query){d+="?"+b.query}if(b.anchor){d+="#"+b.anchor}return d},toAbsolute:function(b,c){var b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host?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,g=[],d;d=/\/$/.test(f)?"/":"";e=e.split("/");f=f.split("/");a(e,function(h){if(h){g.push(h)}});e=g;for(c=f.length-1,g=[];c>=0;c--){if(f[c].length==0||f[c]=="."){continue}if(f[c]==".."){b++;continue}if(b>0){b--;continue}g.push(f[c])}c=e.length-b;if(c<=0){return"/"+g.reverse().join("/")+d}return"/"+e.slice(0,c).join("/")+"/"+g.reverse().join("/")+d},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(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();tinymce.create("static tinymce.util.JSON",{serialize:function(e){var c,a,d=tinymce.util.JSON.serialize,b;if(e==null){return"null"}b=typeof e;if(b=="string"){a="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+e.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(g,f){c=a.indexOf(f);if(c+1){return"\\"+a.charAt(c+1)}g=f.charCodeAt().toString(16);return"\\u"+"0000".substring(g.length)+g})+'"'}if(b=="object"){if(e.hasOwnProperty&&e instanceof Array){for(c=0,a="[";c<e.length;c++){a+=(c>0?",":"")+d(e[c])}return a+"]"}a="{";for(c in e){a+=typeof e[c]!="function"?(a.length>1?',"':'"')+c+'":'+d(e[c]):""}return a+"}"}return""+e},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;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.send(g.data);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)}}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){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(c){var e=c.each,b=c.is;var d=c.isWebKit,a=c.isIE;c.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(i,g){var f=this;f.doc=i;f.win=window;f.files={};f.cssFlicker=false;f.counter=0;f.boxModel=!c.isIE||i.compatMode=="CSS1Compat";f.stdMode=i.documentMode===8;this.settings=g=c.extend({keep_values:false,hex_colors:1,process_html:1},g);if(c.isIE6){try{i.execCommand("BackgroundImageCache",false,true)}catch(h){f.cssFlicker=true}}c.addUnload(f.destroy,f)},getRoot:function(){var f=this,g=f.settings;return(g&&f.get(g.root_element))||f.doc.body},getViewPort:function(g){var h,f;g=!g?this.win:g;h=g.document;f=this.boxModel?h.documentElement:h.body;return{x:g.pageXOffset||f.scrollLeft,y:g.pageYOffset||f.scrollTop,w:g.innerWidth||f.clientWidth,h:g.innerHeight||f.clientHeight}},getRect:function(i){var h,f=this,g;i=f.get(i);h=f.getPos(i);g=f.getSize(i);return{x:h.x,y:h.y,w:g.w,h:g.h}},getSize:function(j){var g=this,f,i;j=g.get(j);f=g.getStyle(j,"width");i=g.getStyle(j,"height");if(f.indexOf("px")===-1){f=0}if(i.indexOf("px")===-1){i=0}return{w:parseInt(f)||j.offsetWidth||j.clientWidth,h:parseInt(i)||j.offsetHeight||j.clientHeight}},is:function(g,f){return c.dom.Sizzle.matches(f,g.nodeType?[g]:g).length>0},getParent:function(i,h,g){return this.getParents(i,h,g,false)},getParents:function(p,k,i,m){var h=this,g,j=h.settings,l=[];p=h.get(p);m=m===undefined;if(j.strict_root){i=i||h.getRoot()}if(b(k,"string")){g=k;if(k==="*"){k=function(f){return f.nodeType==1}}else{k=function(f){return h.is(f,g)}}}while(p){if(p==i||!p.nodeType||p.nodeType===9){break}if(!k||k(p)){if(m){l.push(p)}else{return p}}p=p.parentNode}return m?l:null},get:function(f){var g;if(f&&this.doc&&typeof(f)=="string"){g=f;f=this.doc.getElementById(f);if(f&&f.id!==g){return this.doc.getElementsByName(g)[1]}}return f},select:function(h,g){var f=this;return c.dom.Sizzle(h,f.get(g)||f.get(f.settings.root_element)||f.doc,[])},add:function(j,l,f,i,k){var g=this;return this.run(j,function(n){var m,h;m=b(l,"string")?g.doc.createElement(l):l;g.setAttribs(m,f);if(i){if(i.nodeType){m.appendChild(i)}else{g.setHTML(m,i)}}return !k?n.appendChild(m):m})},create:function(i,f,g){return this.add(this.doc.createElement(i),i,f,g,1)},createHTML:function(m,f,j){var l="",i=this,g;l+="<"+m;for(g in f){if(f.hasOwnProperty(g)){l+=" "+g+'="'+i.encode(f[g])+'"'}}if(c.is(j)){return l+">"+j+"</"+m+">"}return l+" />"},remove:function(h,f){var g=this;return this.run(h,function(m){var l,k,j;l=m.parentNode;if(!l){return null}if(f){for(j=m.childNodes.length-1;j>=0;j--){g.insertAfter(m.childNodes[j],m)}}if(g.fixPsuedoLeaks){l=m.cloneNode(true);f="IELeakGarbageBin";k=g.get(f)||g.add(g.doc.body,"div",{id:f,style:"display:none"});k.appendChild(m);k.innerHTML="";return l}return l.removeChild(m)})},setStyle:function(i,f,g){var h=this;return h.run(i,function(l){var k,j;k=l.style;f=f.replace(/-(\D)/g,function(n,m){return m.toUpperCase()});if(h.pixelStyles.test(f)&&(c.is(g,"number")||/^[\-0-9\.]+$/.test(g))){g+="px"}switch(f){case"opacity":if(a){k.filter=g===""?"":"alpha(opacity="+(g*100)+")";if(!i.currentStyle||!i.currentStyle.hasLayout){k.display="inline-block"}}k[f]=k["-moz-opacity"]=k["-khtml-opacity"]=g||"";break;case"float":a?k.styleFloat=g:k.cssFloat=g;break;default:k[f]=g||""}if(h.settings.update_styles){h.setAttrib(l,"mce_style")}})},getStyle:function(i,f,h){i=this.get(i);if(!i){return false}if(this.doc.defaultView&&h){f=f.replace(/[A-Z]/g,function(j){return"-"+j});try{return this.doc.defaultView.getComputedStyle(i,null).getPropertyValue(f)}catch(g){return null}}f=f.replace(/-(\D)/g,function(k,j){return j.toUpperCase()});if(f=="float"){f=a?"styleFloat":"cssFloat"}if(i.currentStyle&&h){return i.currentStyle[f]}return i.style[f]},setStyles:function(i,j){var g=this,h=g.settings,f;f=h.update_styles;h.update_styles=0;e(j,function(k,l){g.setStyle(i,l,k)});h.update_styles=f;if(h.update_styles){g.setAttrib(i,h.cssText)}},setAttrib:function(h,i,f){var g=this;if(!h||!i){return}if(g.settings.strict){i=i.toLowerCase()}return this.run(h,function(k){var j=g.settings;switch(i){case"style":if(!b(f,"string")){e(f,function(l,m){g.setStyle(k,m,l)});return}if(j.keep_values){if(f&&!g._isRes(f)){k.setAttribute("mce_style",f,2)}else{k.removeAttribute("mce_style",2)}}k.style.cssText=f;break;case"class":k.className=f||"";break;case"src":case"href":if(j.keep_values){if(j.url_converter){f=j.url_converter.call(j.url_converter_scope||g,f,i,k)}g.setAttrib(k,"mce_"+i,f,2)}break;case"shape":k.setAttribute("mce_style",f);break}if(b(f)&&f!==null&&f.length!==0){k.setAttribute(i,""+f,2)}else{k.removeAttribute(i,2)}})},setAttribs:function(g,h){var f=this;return this.run(g,function(i){e(h,function(j,k){f.setAttrib(i,k,j)})})},getAttrib:function(i,j,h){var f,g=this;i=g.get(i);if(!i||i.nodeType!==1){return false}if(!b(h)){h=""}if(/^(src|href|style|coords|shape)$/.test(j)){f=i.getAttribute("mce_"+j);if(f){return f}}if(a&&g.props[j]){f=i[g.props[j]];f=f&&f.nodeValue?f.nodeValue:f}if(!f){f=i.getAttribute(j,2)}if(j==="style"){f=f||i.style.cssText;if(f){f=g.serializeStyle(g.parseStyle(f));if(g.settings.keep_values&&!g._isRes(f)){i.setAttribute("mce_style",f)}}}if(d&&j==="class"&&f){f=f.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(a){switch(j){case"rowspan":case"colspan":if(f===1){f=""}break;case"size":if(f==="+0"||f===20||f===0){f=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(f===0){f=""}break;case"hspace":if(f===-1){f=""}break;case"maxlength":case"tabindex":if(f===32768||f===2147483647||f==="32768"){f=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(f===65535){return j}return h;case"shape":f=f.toLowerCase();break;default:if(j.indexOf("on")===0&&f){f=(""+f).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1")}}}return(f!==undefined&&f!==null&&f!=="")?""+f:h},getPos:function(m,i){var g=this,f=0,l=0,j,k=g.doc,h;m=g.get(m);i=i||k.body;if(m){if(a&&!g.stdMode){m=m.getBoundingClientRect();j=g.boxModel?k.documentElement:k.body;f=g.getStyle(g.select("html")[0],"borderWidth");f=(f=="medium"||g.boxModel&&!g.isIE6)&&2||f;m.top+=g.win.self!=g.win.top?2:0;return{x:m.left+j.scrollLeft-f,y:m.top+j.scrollTop-f}}h=m;while(h&&h!=i&&h.nodeType){f+=h.offsetLeft||0;l+=h.offsetTop||0;h=h.offsetParent}h=m.parentNode;while(h&&h!=i&&h.nodeType){f-=h.scrollLeft||0;l-=h.scrollTop||0;h=h.parentNode}}return{x:f,y:l}},parseStyle:function(h){var i=this,j=i.settings,k={};if(!h){return k}function f(w,q,v){var o,u,m,n;o=k[w+"-top"+q];if(!o){return}u=k[w+"-right"+q];if(o!=u){return}m=k[w+"-bottom"+q];if(u!=m){return}n=k[w+"-left"+q];if(m!=n){return}k[v]=n;delete k[w+"-top"+q];delete k[w+"-right"+q];delete k[w+"-bottom"+q];delete k[w+"-left"+q]}function g(n,m,l,p){var o;o=k[m];if(!o){return}o=k[l];if(!o){return}o=k[p];if(!o){return}k[n]=k[m]+" "+k[l]+" "+k[p];delete k[m];delete k[l];delete k[p]}h=h.replace(/&(#?[a-z0-9]+);/g,"&$1_MCE_SEMI_");e(h.split(";"),function(m){var l,n=[];if(m){m=m.replace(/_MCE_SEMI_/g,";");m=m.replace(/url\([^\)]+\)/g,function(o){n.push(o);return"url("+n.length+")"});m=m.split(":");l=c.trim(m[1]);l=l.replace(/url\(([^\)]+)\)/g,function(p,o){return n[parseInt(o)-1]});l=l.replace(/rgb\([^\)]+\)/g,function(o){return i.toHex(o)});if(j.url_converter){l=l.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(o,p){return"url("+j.url_converter.call(j.url_converter_scope||i,i.decode(p),"style",null)+")"})}k[c.trim(m[0]).toLowerCase()]=l}});f("border","","border");f("border","-width","border-width");f("border","-color","border-color");f("border","-style","border-style");f("padding","","padding");f("margin","","margin");g("border","border-width","border-style","border-color");if(a){if(k.border=="medium none"){k.border=""}}return k},serializeStyle:function(g){var f="";e(g,function(i,h){if(h&&i){if(c.isGecko&&h.indexOf("-moz-")===0){return}switch(h){case"color":case"background-color":i=i.toLowerCase();break}f+=(f?" ":"")+h+": "+i+";"}});return f},loadCSS:function(f){var g=this,h=g.doc;if(!f){f=""}e(f.split(","),function(i){if(g.files[i]){return}g.files[i]=true;g.add(g.select("head")[0],"link",{rel:"stylesheet",href:c._addVer(i)})})},addClass:function(f,g){return this.run(f,function(h){var i;if(!g){return 0}if(this.hasClass(h,g)){return h.className}i=this.removeClass(h,g);return h.className=(i!=""?(i+" "):"")+g})},removeClass:function(h,i){var f=this,g;return f.run(h,function(k){var j;if(f.hasClass(k,i)){if(!g){g=new RegExp("(^|\\s+)"+i+"(\\s+|$)","g")}j=k.className.replace(g," ");return k.className=c.trim(j!=" "?j:"")}return k.className})},hasClass:function(g,f){g=this.get(g);if(!g||!f){return false}return(" "+g.className+" ").indexOf(" "+f+" ")!==-1},show:function(f){return this.setStyle(f,"display","block")},hide:function(f){return this.setStyle(f,"display","none")},isHidden:function(f){f=this.get(f);return !f||f.style.display=="none"||this.getStyle(f,"display")=="none"},uniqueId:function(f){return(!f?"mce_":f)+(this.counter++)},setHTML:function(i,g){var f=this;return this.run(i,function(m){var h,k,j,q,l,h;g=f.processHTML(g);if(a){function o(){try{m.innerHTML="<br />"+g;m.removeChild(m.firstChild)}catch(n){while(m.firstChild){m.firstChild.removeNode()}h=f.create("div");h.innerHTML="<br />"+g;e(h.childNodes,function(r,p){if(p){m.appendChild(r)}})}}if(f.settings.fix_ie_paragraphs){g=g.replace(/<p><\/p>|<p([^>]+)><\/p>|<p[^\/+]\/>/gi,'<p$1 mce_keep="true"> </p>')}o();if(f.settings.fix_ie_paragraphs){j=m.getElementsByTagName("p");for(k=j.length-1,h=0;k>=0;k--){q=j[k];if(!q.hasChildNodes()){if(!q.mce_keep){h=1;break}q.removeAttribute("mce_keep")}}}if(h){g=g.replace(/<p ([^>]+)>|<p>/g,'<div $1 mce_tmp="1">');g=g.replace(/<\/p>/g,"</div>");o();if(f.settings.fix_ie_paragraphs){j=m.getElementsByTagName("DIV");for(k=j.length-1;k>=0;k--){q=j[k];if(q.mce_tmp){l=f.doc.createElement("p");q.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(p,n){var r;if(n!=="mce_tmp"){r=q.getAttribute(n);if(!r&&n==="class"){r=q.className}l.setAttribute(n,r)}});for(h=0;h<q.childNodes.length;h++){l.appendChild(q.childNodes[h].cloneNode(true))}q.swapNode(l)}}}}}else{m.innerHTML=g}return g})},processHTML:function(j){var g=this,i=g.settings;if(!i.process_html){return j}if(c.isGecko){j=j.replace(/<(\/?)strong>|<strong( [^>]+)>/gi,"<$1b$2>");j=j.replace(/<(\/?)em>|<em( [^>]+)>/gi,"<$1i$2>")}else{if(a){j=j.replace(/'/g,"'");j=j.replace(/\s+(disabled|checked|readonly|selected)\s*=\s*[\"\']?(false|0)[\"\']?/gi,"")}}j=j.replace(/<a( )([^>]+)\/>|<a\/>/gi,"<a$1$2></a>");if(i.keep_values){if(/<script|style/.test(j)){function f(h){h=h.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n");h=h.replace(/^[\r\n]*|[\r\n]*$/g,"");h=h.replace(/^\s*(\/\/\s*<!--|\/\/\s*<!\[CDATA\[|<!--|<!\[CDATA\[)[\r\n]*/g,"");h=h.replace(/\s*(\/\/\s*\]\]>|\/\/\s*-->|\]\]>|-->|\]\]-->)\s*$/g,"");return h}j=j.replace(/<script([^>]+|)>([\s\S]*?)<\/script>/g,function(l,k,h){h=f(h);if(!k){k=' type="text/javascript"'}if(h){h="<!--\n"+h+"\n// -->"}return"<mce:script"+k+">"+h+"</mce:script>"});j=j.replace(/<style([^>]+|)>([\s\S]*?)<\/style>/g,function(l,k,h){h=f(h);return"<mce:style"+k+"><!--\n"+h+"\n--></mce:style><style"+k+' mce_bogus="1">'+h+"</style>"})}j=j.replace(/<!\[CDATA\[([\s\S]+)\]\]>/g,"<!--[CDATA[$1]]-->");j=j.replace(/<([\w:]+) [^>]*(src|href|style|shape|coords)[^>]*>/gi,function(h,l){function k(o,n,q){var p=q;if(h.indexOf("mce_"+n)!=-1){return o}if(n=="style"){if(g._isRes(q)){return o}if(i.hex_colors){p=p.replace(/rgb\([^\)]+\)/g,function(m){return g.toHex(m)})}if(i.url_converter){p=p.replace(/url\([\'\"]?([^\)\'\"]+)\)/g,function(m,r){return"url("+g.encode(i.url_converter.call(i.url_converter_scope||g,g.decode(r),n,l))+")"})}}else{if(n!="coords"&&n!="shape"){if(i.url_converter){p=g.encode(i.url_converter.call(i.url_converter_scope||g,g.decode(q),n,l))}}}return" "+n+'="'+q+'" mce_'+n+'="'+p+'"'}h=h.replace(/ (src|href|style|coords|shape)=[\"]([^\"]+)[\"]/gi,k);h=h.replace(/ (src|href|style|coords|shape)=[\']([^\']+)[\']/gi,k);return h.replace(/ (src|href|style|coords|shape)=([^\s\"\'>]+)/gi,k)})}return j},getOuterHTML:function(f){var g;f=this.get(f);if(!f){return null}if(f.outerHTML!==undefined){return f.outerHTML}g=(f.ownerDocument||this.doc).createElement("body");g.appendChild(f.cloneNode(true));return g.innerHTML},setOuterHTML:function(i,g,j){var f=this;return this.run(i,function(h){var l,k;h=f.get(h);j=j||h.ownerDocument||f.doc;if(a&&h.nodeType==1){h.outerHTML=g}else{k=j.createElement("body");k.innerHTML=g;l=k.lastChild;while(l){f.insertAfter(l.cloneNode(true),h);l=l.previousSibling}f.remove(h)}})},decode:function(g){var h,i,f;if(/&[^;]+;/.test(g)){h=this.doc.createElement("div");h.innerHTML=g;i=h.firstChild;f="";if(i){do{f+=i.nodeValue}while(i.nextSibling)}return f||g}return g},encode:function(f){return f?(""+f).replace(/[<>&\"]/g,function(h,g){switch(h){case"&":return"&";case'"':return""";case"<":return"<";case">":return">"}return h}):f},insertAfter:function(h,g){var f=this;g=f.get(g);return this.run(h,function(k){var j,i;j=g.parentNode;i=g.nextSibling;if(i){j.insertBefore(k,i)}else{j.appendChild(k)}return k})},isBlock:function(f){if(f.nodeType&&f.nodeType!==1){return false}f=f.nodeName||f;return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TR|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(f)},replace:function(i,h,f){var g=this;if(b(h,"array")){i=i.cloneNode(true)}return g.run(h,function(j){if(f){e(j.childNodes,function(k){i.appendChild(k.cloneNode(true))})}if(g.fixPsuedoLeaks&&j.nodeType===1){j.parentNode.insertBefore(i,j);g.remove(j);return i}return j.parentNode.replaceChild(i,j)})},findCommonAncestor:function(h,f){var i=h,g;while(i){g=f;while(g&&i!=g){g=g.parentNode}if(i==g){break}i=i.parentNode}if(!i&&h.ownerDocument){return h.ownerDocument.documentElement}return i},toHex:function(f){var h=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(f);function g(i){i=parseInt(i).toString(16);return i.length>1?i:"0"+i}if(h){f="#"+g(h[1])+g(h[2])+g(h[3]);return f}return f},getClasses:function(){var l=this,g=[],k,m={},n=l.settings.class_filter,j;if(l.classes){return l.classes}function o(f){e(f.imports,function(i){o(i)});e(f.cssRules||f.rules,function(i){switch(i.type||1){case 1:if(i.selectorText){e(i.selectorText.split(","),function(p){p=p.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(p)||!/\.[\w\-]+$/.test(p)){return}j=p;p=p.replace(/.*\.([a-z0-9_\-]+).*/i,"$1");if(n&&!(p=n(p,j))){return}if(!m[p]){g.push({"class":p});m[p]=1}})}break;case 3:o(i.styleSheet);break}})}try{e(l.doc.styleSheets,o)}catch(h){}if(g.length>0){l.classes=g}return g},run:function(j,i,h){var g=this,k;if(g.doc&&typeof(j)==="string"){j=g.get(j)}if(!j){return false}h=h||this;if(!j.nodeType&&(j.length||j.length===0)){k=[];e(j,function(l,f){if(l){if(typeof(l)=="string"){l=g.doc.getElementById(l)}k.push(i.call(h,l,f))}});return k}return i.call(h,j)},getAttribs:function(g){var f;g=this.get(g);if(!g){return[]}if(a){f=[];if(g.nodeName=="OBJECT"){return g.attributes}g.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(i,h){f.push({specified:1,nodeName:h})});return f}return g.attributes},destroy:function(g){var f=this;f.win=f.doc=f.root=null;if(!g){c.removeUnload(f.destroy)}},createRng:function(){var f=this.doc;return f.createRange?f.createRange():new c.dom.Range(this)},split:function(k,j,n){var o=this,f=o.createRng(),l,i,m;function g(q,p){q=q[p];if(q&&q[p]&&q[p].nodeType==1&&h(q[p])){o.remove(q[p])}}function h(p){p=o.getOuterHTML(p);p=p.replace(/<(img|hr|table)/gi,"-");p=p.replace(/<[^>]+>/g,"");return p.replace(/[ \t\r\n]+| | /g,"")==""}if(k&&j){f.setStartBefore(k);f.setEndBefore(j);l=f.extractContents();f=o.createRng();f.setStartAfter(j);f.setEndAfter(k);i=f.extractContents();m=k.parentNode;g(l,"lastChild");if(!h(l)){m.insertBefore(l,k)}if(n){m.replaceChild(n,j)}else{m.insertBefore(j,k)}g(i,"firstChild");if(!h(i)){m.insertBefore(i,k)}o.remove(k);return n||j}},_isRes:function(f){return/^(top|left|bottom|right|width|height)/i.test(f)||/;\s*(top|left|bottom|right|width|height)/i.test(f)}});c.DOM=new c.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(f){var h=0,c=1,e=2,d=tinymce.extend;function g(m,k){var j,l;if(m.parentNode!=k){return -1}for(l=k.firstChild,j=0;l!=m;l=l.nextSibling){j++}return j}function b(k){var j=0;while(k.previousSibling){j++;k=k.previousSibling}return j}function i(j,k){var l;if(j.nodeType==3){return j}if(k<0){return j}l=j.firstChild;while(l!=null&&k>0){--k;l=l.nextSibling}if(l!=null){return l}return j}function a(k){var j=k.doc;d(this,{dom:k,startContainer:j,startOffset:0,endContainer:j,endOffset:0,collapsed:true,commonAncestorContainer:j,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3})}d(a.prototype,{setStart:function(k,j){this._setEndPoint(true,k,j)},setEnd:function(k,j){this._setEndPoint(false,k,j)},setStartBefore:function(j){this.setStart(j.parentNode,b(j))},setStartAfter:function(j){this.setStart(j.parentNode,b(j)+1)},setEndBefore:function(j){this.setEnd(j.parentNode,b(j))},setEndAfter:function(j){this.setEnd(j.parentNode,b(j)+1)},collapse:function(k){var j=this;if(k){j.endContainer=j.startContainer;j.endOffset=j.startOffset}else{j.startContainer=j.endContainer;j.startOffset=j.endOffset}j.collapsed=true},selectNode:function(j){this.setStartBefore(j);this.setEndAfter(j)},selectNodeContents:function(j){this.setStart(j,0);this.setEnd(j,j.nodeType===1?j.childNodes.length:j.nodeValue.length)},compareBoundaryPoints:function(m,n){var l=this,p=l.startContainer,o=l.startOffset,k=l.endContainer,j=l.endOffset;if(m===0){return l._compareBoundaryPoints(p,o,p,o)}if(m===1){return l._compareBoundaryPoints(p,o,k,j)}if(m===2){return l._compareBoundaryPoints(k,j,k,j)}if(m===3){return l._compareBoundaryPoints(k,j,p,o)}},deleteContents:function(){this._traverse(e)},extractContents:function(){return this._traverse(h)},cloneContents:function(){return this._traverse(c)},insertNode:function(m){var j=this,l,k;if(m.nodeType===3||m.nodeType===4){l=j.startContainer.splitText(j.startOffset);j.startContainer.parentNode.insertBefore(m,l)}else{if(j.startContainer.childNodes.length>0){k=j.startContainer.childNodes[j.startOffset]}j.startContainer.insertBefore(m,k)}},surroundContents:function(l){var j=this,k=j.extractContents();j.insertNode(l);l.appendChild(k);j.selectNode(l)},cloneRange:function(){var j=this;return d(new a(j.dom),{startContainer:j.startContainer,startOffset:j.startOffset,endContainer:j.endContainer,endOffset:j.endOffset,collapsed:j.collapsed,commonAncestorContainer:j.commonAncestorContainer})},_isCollapsed:function(){return(this.startContainer==this.endContainer&&this.startOffset==this.endOffset)},_compareBoundaryPoints:function(m,p,k,o){var q,l,j,r,t,s;if(m==k){if(p==o){return 0}else{if(p<o){return -1}else{return 1}}}q=k;while(q&&q.parentNode!=m){q=q.parentNode}if(q){l=0;j=m.firstChild;while(j!=q&&l<p){l++;j=j.nextSibling}if(p<=l){return -1}else{return 1}}q=m;while(q&&q.parentNode!=k){q=q.parentNode}if(q){l=0;j=k.firstChild;while(j!=q&&l<o){l++;j=j.nextSibling}if(l<o){return -1}else{return 1}}r=this.dom.findCommonAncestor(m,k);t=m;while(t&&t.parentNode!=r){t=t.parentNode}if(!t){t=r}s=k;while(s&&s.parentNode!=r){s=s.parentNode}if(!s){s=r}if(t==s){return 0}j=r.firstChild;while(j){if(j==t){return -1}if(j==s){return 1}j=j.nextSibling}},_setEndPoint:function(k,q,p){var l=this,j,m;if(k){l.startContainer=q;l.startOffset=p}else{l.endContainer=q;l.endOffset=p}j=l.endContainer;while(j.parentNode){j=j.parentNode}m=l.startContainer;while(m.parentNode){m=m.parentNode}if(m!=j){l.collapse(k)}else{if(l._compareBoundaryPoints(l.startContainer,l.startOffset,l.endContainer,l.endOffset)>0){l.collapse(k)}}l.collapsed=l._isCollapsed();l.commonAncestorContainer=l.dom.findCommonAncestor(l.startContainer,l.endContainer)},_traverse:function(r){var s=this,q,m=0,v=0,k,o,l,n,j,u;if(s.startContainer==s.endContainer){return s._traverseSameContainer(r)}for(q=s.endContainer,k=q.parentNode;k!=null;q=k,k=k.parentNode){if(k==s.startContainer){return s._traverseCommonStartContainer(q,r)}++m}for(q=s.startContainer,k=q.parentNode;k!=null;q=k,k=k.parentNode){if(k==s.endContainer){return s._traverseCommonEndContainer(q,r)}++v}o=v-m;l=s.startContainer;while(o>0){l=l.parentNode;o--}n=s.endContainer;while(o<0){n=n.parentNode;o++}for(j=l.parentNode,u=n.parentNode;j!=u;j=j.parentNode,u=u.parentNode){l=j;n=u}return s._traverseCommonAncestors(l,n,r)},_traverseSameContainer:function(o){var r=this,q,u,j,k,l,p,m;if(o!=e){q=r.dom.doc.createDocumentFragment()}if(r.startOffset==r.endOffset){return q}if(r.startContainer.nodeType==3){u=r.startContainer.nodeValue;j=u.substring(r.startOffset,r.endOffset);if(o!=c){r.startContainer.deleteData(r.startOffset,r.endOffset-r.startOffset);r.collapse(true)}if(o==e){return null}q.appendChild(r.dom.doc.createTextNode(j));return q}k=i(r.startContainer,r.startOffset);l=r.endOffset-r.startOffset;while(l>0){p=k.nextSibling;m=r._traverseFullySelected(k,o);if(q){q.appendChild(m)}--l;k=p}if(o!=c){r.collapse(true)}return q},_traverseCommonStartContainer:function(j,p){var s=this,r,k,l,m,q,o;if(p!=e){r=s.dom.doc.createDocumentFragment()}k=s._traverseRightBoundary(j,p);if(r){r.appendChild(k)}l=g(j,s.startContainer);m=l-s.startOffset;if(m<=0){if(p!=c){s.setEndBefore(j);s.collapse(false)}return r}k=j.previousSibling;while(m>0){q=k.previousSibling;o=s._traverseFullySelected(k,p);if(r){r.insertBefore(o,r.firstChild)}--m;k=q}if(p!=c){s.setEndBefore(j);s.collapse(false)}return r},_traverseCommonEndContainer:function(m,p){var s=this,r,o,j,k,q,l;if(p!=e){r=s.dom.doc.createDocumentFragment()}j=s._traverseLeftBoundary(m,p);if(r){r.appendChild(j)}o=g(m,s.endContainer);++o;k=s.endOffset-o;j=m.nextSibling;while(k>0){q=j.nextSibling;l=s._traverseFullySelected(j,p);if(r){r.appendChild(l)}--k;j=q}if(p!=c){s.setStartAfter(m);s.collapse(true)}return r},_traverseCommonAncestors:function(p,j,s){var w=this,l,v,o,q,r,k,u,m;if(s!=e){v=w.dom.doc.createDocumentFragment()}l=w._traverseLeftBoundary(p,s);if(v){v.appendChild(l)}o=p.parentNode;q=g(p,o);r=g(j,o);++q;k=r-q;u=p.nextSibling;while(k>0){m=u.nextSibling;l=w._traverseFullySelected(u,s);if(v){v.appendChild(l)}u=m;--k}l=w._traverseRightBoundary(j,s);if(v){v.appendChild(l)}if(s!=c){w.setStartAfter(p);w.collapse(true)}return v},_traverseRightBoundary:function(p,q){var s=this,l=i(s.endContainer,s.endOffset-1),r,o,n,j,k;var m=l!=s.endContainer;if(l==p){return s._traverseNode(l,m,false,q)}r=l.parentNode;o=s._traverseNode(r,false,false,q);while(r!=null){while(l!=null){n=l.previousSibling;j=s._traverseNode(l,m,false,q);if(q!=e){o.insertBefore(j,o.firstChild)}m=true;l=n}if(r==p){return o}l=r.previousSibling;r=r.parentNode;k=s._traverseNode(r,false,false,q);if(q!=e){k.appendChild(o)}o=k}return null},_traverseLeftBoundary:function(p,q){var s=this,m=i(s.startContainer,s.startOffset);var n=m!=s.startContainer,r,o,l,j,k;if(m==p){return s._traverseNode(m,n,true,q)}r=m.parentNode;o=s._traverseNode(r,false,true,q);while(r!=null){while(m!=null){l=m.nextSibling;j=s._traverseNode(m,n,true,q);if(q!=e){o.appendChild(j)}n=true;m=l}if(r==p){return o}m=r.nextSibling;r=r.parentNode;k=s._traverseNode(r,false,true,q);if(q!=e){k.appendChild(o)}o=k}return null},_traverseNode:function(j,o,r,s){var u=this,m,l,p,k,q;if(o){return u._traverseFullySelected(j,s)}if(j.nodeType==3){m=j.nodeValue;if(r){k=u.startOffset;l=m.substring(k);p=m.substring(0,k)}else{k=u.endOffset;l=m.substring(0,k);p=m.substring(k)}if(s!=c){j.nodeValue=p}if(s==e){return null}q=j.cloneNode(false);q.nodeValue=l;return q}if(s==e){return null}return j.cloneNode(false)},_traverseFullySelected:function(l,k){var j=this;if(k!=e){return k==c?l.cloneNode(true):l}l.parentNode.removeChild(l);return null}});f.Range=a})(tinymce.dom);(function(){function a(e){var d=this,h="\uFEFF",b,g;function c(j,i){if(j&&i){if(j.item&&i.item&&j.item(0)===i.item(0)){return 1}if(j.isEqual&&i.isEqual&&i.isEqual(j)){return 1}}return 0}function f(){var m=e.dom,j=e.getRng(),s=m.createRng(),p,k,n,q,o,l;function i(v){var t=v.parentNode.childNodes,u;for(u=t.length-1;u>=0;u--){if(t[u]==v){return u}}return -1}function r(v){var t=j.duplicate(),B,y,u,w,x=0,z=0,A,C;t.collapse(v);B=t.parentElement();t.pasteHTML(h);u=B.childNodes;for(y=0;y<u.length;y++){w=u[y];if(y>0&&(w.nodeType!==3||u[y-1].nodeType!==3)){z++}if(w.nodeType===3){A=w.nodeValue.indexOf(h);if(A!==-1){x+=A;break}x+=w.nodeValue.length}else{x=0}}t.moveStart("character",-1);t.text="";return{index:z,offset:x,parent:B}}n=j.item?j.item(0):j.parentElement();if(n.ownerDocument!=m.doc){return s}if(j.item||!n.hasChildNodes()){s.setStart(n.parentNode,i(n));s.setEnd(s.startContainer,s.startOffset+1);return s}l=e.isCollapsed();p=r(true);k=r(false);p.parent.normalize();k.parent.normalize();q=p.parent.childNodes[Math.min(p.index,p.parent.childNodes.length-1)];if(q.nodeType!=3){s.setStart(p.parent,p.index)}else{s.setStart(p.parent.childNodes[p.index],p.offset)}o=k.parent.childNodes[Math.min(k.index,k.parent.childNodes.length-1)];if(o.nodeType!=3){if(!l){k.index++}s.setEnd(k.parent,k.index)}else{s.setEnd(k.parent.childNodes[k.index],k.offset)}if(!l){q=s.startContainer;if(q.nodeType==1){s.setStart(q,Math.min(s.startOffset,q.childNodes.length))}o=s.endContainer;if(o.nodeType==1){s.setEnd(o,Math.min(s.endOffset,o.childNodes.length))}}d.addRange(s);return s}this.addRange=function(j){var o,m=e.dom.doc.body,p,k,q,l,n,i;q=j.startContainer;l=j.startOffset;n=j.endContainer;i=j.endOffset;o=m.createTextRange();q=q.nodeType==1?q.childNodes[Math.min(l,q.childNodes.length-1)]:q;n=n.nodeType==1?n.childNodes[Math.min(l==i?i:i-1,n.childNodes.length-1)]:n;if(q==n&&q.nodeType==1){if(/^(IMG|TABLE)$/.test(q.nodeName)&&l!=i){o=m.createControlRange();o.addElement(q)}else{o=m.createTextRange();if(!q.hasChildNodes()&&q.canHaveHTML){q.innerHTML=h}o.moveToElementText(q);if(q.innerHTML==h){o.collapse(true);q.removeChild(q.firstChild)}}if(l==i){o.collapse(i<=j.endContainer.childNodes.length-1)}o.select();return}function r(t,v){var u,s,w;if(t.nodeType!=3){return -1}u=t.nodeValue;s=m.createTextRange();t.nodeValue=u.substring(0,v)+h+u.substring(v);s.moveToElementText(t.parentNode);s.findText(h);w=Math.abs(s.moveStart("character",-1048575));t.nodeValue=u;return w}if(j.collapsed){pos=r(q,l);o=m.createTextRange();o.move("character",pos);o.select();return}else{if(q==n&&q.nodeType==3){p=r(q,l);o.move("character",p);o.moveEnd("character",i-l);o.select();return}p=r(q,l);k=r(n,i);o=m.createTextRange();if(p==-1){o.moveToElementText(q);p=0}else{o.move("character",p)}tmpRng=m.createTextRange();if(k==-1){tmpRng.moveToElementText(n)}else{tmpRng.move("character",k)}o.setEndPoint("EndToEnd",tmpRng);o.select();return}};this.getRangeAt=function(){if(!b||!c(g,e.getRng())){b=f();g=e.getRng()}return b};this.destroy=function(){g=b=null}}tinymce.dom.TridentSelection=a})();(function(){var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,i=0,d=Object.prototype.toString,n=false;var b=function(D,t,A,v){A=A||[];var e=t=t||document;if(t.nodeType!==1&&t.nodeType!==9){return[]}if(!D||typeof D!=="string"){return A}var B=[],C,y,G,F,z,s,r=true,w=o(t);p.lastIndex=0;while((C=p.exec(D))!==null){B.push(C[1]);if(C[2]){s=RegExp.rightContext;break}}if(B.length>1&&j.exec(D)){if(B.length===2&&f.relative[B[0]]){y=g(B[0]+B[1],t)}else{y=f.relative[B[0]]?[t]:b(B.shift(),t);while(B.length){D=B.shift();if(f.relative[D]){D+=B.shift()}y=g(D,y)}}}else{if(!v&&B.length>1&&t.nodeType===9&&!w&&f.match.ID.test(B[0])&&!f.match.ID.test(B[B.length-1])){var H=b.find(B.shift(),t,w);t=H.expr?b.filter(H.expr,H.set)[0]:H.set[0]}if(t){var H=v?{expr:B.pop(),set:a(v)}:b.find(B.pop(),B.length===1&&(B[0]==="~"||B[0]==="+")&&t.parentNode?t.parentNode:t,w);y=H.expr?b.filter(H.expr,H.set):H.set;if(B.length>0){G=a(y)}else{r=false}while(B.length){var u=B.pop(),x=u;if(!f.relative[u]){u=""}else{x=B.pop()}if(x==null){x=t}f.relative[u](G,x,w)}}else{G=B=[]}}if(!G){G=y}if(!G){throw"Syntax error, unrecognized expression: "+(u||D)}if(d.call(G)==="[object Array]"){if(!r){A.push.apply(A,G)}else{if(t&&t.nodeType===1){for(var E=0;G[E]!=null;E++){if(G[E]&&(G[E]===true||G[E].nodeType===1&&h(t,G[E]))){A.push(y[E])}}}else{for(var E=0;G[E]!=null;E++){if(G[E]&&G[E].nodeType===1){A.push(y[E])}}}}}else{a(G,A)}if(s){b(s,e,A,v);b.uniqueSort(A)}return A};b.uniqueSort=function(r){if(c){n=false;r.sort(c);if(n){for(var e=1;e<r.length;e++){if(r[e]===r[e-1]){r.splice(e--,1)}}}}};b.matches=function(e,r){return b(e,null,null,r)};b.find=function(x,e,y){var w,u;if(!x){return[]}for(var t=0,s=f.order.length;t<s;t++){var v=f.order[t],u;if((u=f.match[v].exec(x))){var r=RegExp.leftContext;if(r.substr(r.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");w=f.find[v](u,e,y);if(w!=null){x=x.replace(f.match[v],"");break}}}}if(!w){w=e.getElementsByTagName("*")}return{set:w,expr:x}};b.filter=function(A,z,D,t){var s=A,F=[],x=z,v,e,w=z&&z[0]&&o(z[0]);while(A&&z.length){for(var y in f.filter){if((v=f.match[y].exec(A))!=null){var r=f.filter[y],E,C;e=false;if(x==F){F=[]}if(f.preFilter[y]){v=f.preFilter[y](v,x,D,F,t,w);if(!v){e=E=true}else{if(v===true){continue}}}if(v){for(var u=0;(C=x[u])!=null;u++){if(C){E=r(C,v,u,x);var B=t^!!E;if(D&&E!=null){if(B){e=true}else{x[u]=false}}else{if(B){F.push(C);e=true}}}}}if(E!==undefined){if(!D){x=F}A=A.replace(f.match[y],"");if(!e){return[]}break}}}if(A==s){if(e==null){throw"Syntax error, unrecognized expression: "+A}else{break}}s=A}return x};var f=b.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")}},relative:{"+":function(x,e,w){var u=typeof e==="string",y=u&&!/\W/.test(e),v=u&&!y;if(y&&!w){e=e.toUpperCase()}for(var t=0,s=x.length,r;t<s;t++){if((r=x[t])){while((r=r.previousSibling)&&r.nodeType!==1){}x[t]=v||r&&r.nodeName===e?r||false:r===e}}if(v){b.filter(e,x,true)}},">":function(w,r,x){var u=typeof r==="string";if(u&&!/\W/.test(r)){r=x?r:r.toUpperCase();for(var s=0,e=w.length;s<e;s++){var v=w[s];if(v){var t=v.parentNode;w[s]=t.nodeName===r?t:false}}}else{for(var s=0,e=w.length;s<e;s++){var v=w[s];if(v){w[s]=u?v.parentNode:v.parentNode===r}}if(u){b.filter(r,w,true)}}},"":function(t,r,v){var s=i++,e=q;if(!r.match(/\W/)){var u=r=v?r:r.toUpperCase();e=m}e("parentNode",r,s,t,u,v)},"~":function(t,r,v){var s=i++,e=q;if(typeof r==="string"&&!r.match(/\W/)){var u=r=v?r:r.toUpperCase();e=m}e("previousSibling",r,s,t,u,v)}},find:{ID:function(r,s,t){if(typeof s.getElementById!=="undefined"&&!t){var e=s.getElementById(r[1]);return e?[e]:[]}},NAME:function(s,v,w){if(typeof v.getElementsByName!=="undefined"){var r=[],u=v.getElementsByName(s[1]);for(var t=0,e=u.length;t<e;t++){if(u[t].getAttribute("name")===s[1]){r.push(u[t])}}return r.length===0?null:r}},TAG:function(e,r){return r.getElementsByTagName(e[1])}},preFilter:{CLASS:function(t,r,s,e,w,x){t=" "+t[1].replace(/\\/g,"")+" ";if(x){return t}for(var u=0,v;(v=r[u])!=null;u++){if(v){if(w^(v.className&&(" "+v.className+" ").indexOf(t)>=0)){if(!s){e.push(v)}}else{if(s){r[u]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(r,e){for(var s=0;e[s]===false;s++){}return e[s]&&o(e[s])?r[1]:r[1].toUpperCase()},CHILD:function(e){if(e[1]=="nth"){var r=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]=="even"&&"2n"||e[2]=="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(r[1]+(r[2]||1))-0;e[3]=r[3]-0}e[0]=i++;return e},ATTR:function(u,r,s,e,v,w){var t=u[1].replace(/\\/g,"");if(!w&&f.attrMap[t]){u[1]=f.attrMap[t]}if(u[2]==="~="){u[4]=" "+u[4]+" "}return u},PSEUDO:function(u,r,s,e,v){if(u[1]==="not"){if(u[3].match(p).length>1||/^\w/.test(u[3])){u[3]=b(u[3],null,null,r)}else{var t=b.filter(u[3],r,s,true^v);if(!s){e.push.apply(e,t)}return false}}else{if(f.match.POS.test(u[0])||f.match.CHILD.test(u[0])){return true}}return u},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){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(s,r,e){return !!b(e[3],s).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toUpperCase()==="BUTTON"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)}},setFilters:{first:function(r,e){return e===0},last:function(s,r,e,t){return r===t.length-1},even:function(r,e){return e%2===0},odd:function(r,e){return e%2===1},lt:function(s,r,e){return r<e[3]-0},gt:function(s,r,e){return r>e[3]-0},nth:function(s,r,e){return e[3]-0==r},eq:function(s,r,e){return e[3]-0==r}},filter:{PSEUDO:function(w,s,t,x){var r=s[1],u=f.filters[r];if(u){return u(w,t,s,x)}else{if(r==="contains"){return(w.textContent||w.innerText||"").indexOf(s[3])>=0}else{if(r==="not"){var v=s[3];for(var t=0,e=v.length;t<e;t++){if(v[t]===w){return false}}return true}}}},CHILD:function(e,t){var w=t[1],r=e;switch(w){case"only":case"first":while(r=r.previousSibling){if(r.nodeType===1){return false}}if(w=="first"){return true}r=e;case"last":while(r=r.nextSibling){if(r.nodeType===1){return false}}return true;case"nth":var s=t[2],z=t[3];if(s==1&&z==0){return true}var v=t[0],y=e.parentNode;if(y&&(y.sizcache!==v||!e.nodeIndex)){var u=0;for(r=y.firstChild;r;r=r.nextSibling){if(r.nodeType===1){r.nodeIndex=++u}}y.sizcache=v}var x=e.nodeIndex-z;if(s==0){return x==0}else{return(x%s==0&&x/s>=0)}}},ID:function(r,e){return r.nodeType===1&&r.getAttribute("id")===e},TAG:function(r,e){return(e==="*"&&r.nodeType===1)||r.nodeName===e},CLASS:function(r,e){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(v,t){var s=t[1],e=f.attrHandle[s]?f.attrHandle[s](v):v[s]!=null?v[s]:v.getAttribute(s),w=e+"",u=t[2],r=t[4];return e==null?u==="!=":u==="="?w===r:u==="*="?w.indexOf(r)>=0:u==="~="?(" "+w+" ").indexOf(r)>=0:!r?w&&e!==false:u==="!="?w!=r:u==="^="?w.indexOf(r)===0:u==="$="?w.substr(w.length-r.length)===r:u==="|="?w===r||w.substr(0,r.length+1)===r+"-":false},POS:function(u,r,s,v){var e=r[2],t=f.setFilters[e];if(t){return t(u,s,r,v)}}}};var j=f.match.POS;for(var l in f.match){f.match[l]=new RegExp(f.match[l].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var a=function(r,e){r=Array.prototype.slice.call(r);if(e){e.push.apply(e,r);return e}return r};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(k){a=function(u,t){var r=t||[];if(d.call(u)==="[object Array]"){Array.prototype.push.apply(r,u)}else{if(typeof u.length==="number"){for(var s=0,e=u.length;s<e;s++){r.push(u[s])}}else{for(var s=0;u[s];s++){r.push(u[s])}}}return r}}var c;if(document.documentElement.compareDocumentPosition){c=function(r,e){var s=r.compareDocumentPosition(e)&4?-1:r===e?0:1;if(s===0){n=true}return s}}else{if("sourceIndex" in document.documentElement){c=function(r,e){var s=r.sourceIndex-e.sourceIndex;if(s===0){n=true}return s}}else{if(document.createRange){c=function(t,r){var s=t.ownerDocument.createRange(),e=r.ownerDocument.createRange();s.setStart(t,0);s.setEnd(t,0);e.setStart(r,0);e.setEnd(r,0);var u=s.compareBoundaryPoints(Range.START_TO_END,e);if(u===0){n=true}return u}}}}(function(){var r=document.createElement("div"),s="script"+(new Date).getTime();r.innerHTML="<a name='"+s+"'/>";var e=document.documentElement;e.insertBefore(r,e.firstChild);if(!!document.getElementById(s)){f.find.ID=function(u,v,w){if(typeof v.getElementById!=="undefined"&&!w){var t=v.getElementById(u[1]);return t?t.id===u[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===u[1]?[t]:undefined:[]}};f.filter.ID=function(v,t){var u=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&u&&u.nodeValue===t}}e.removeChild(r)})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){f.find.TAG=function(r,v){var u=v.getElementsByTagName(r[1]);if(r[1]==="*"){var t=[];for(var s=0;u[s];s++){if(u[s].nodeType===1){t.push(u[s])}}u=t}return u}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(r){return r.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var e=b,s=document.createElement("div");s.innerHTML="<p class='TEST'></p>";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}b=function(w,v,t,u){v=v||document;if(!u&&v.nodeType===9&&!o(v)){try{return a(v.querySelectorAll(w),t)}catch(x){}}return e(w,v,t,u)};for(var r in e){b[r]=e[r]}})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(r,s,t){if(typeof s.getElementsByClassName!=="undefined"&&!t){return s.getElementsByClassName(r[1])}}})()}function m(r,w,v,A,x,z){var y=r=="previousSibling"&&!z;for(var t=0,s=A.length;t<s;t++){var e=A[t];if(e){if(y&&e.nodeType===1){e.sizcache=v;e.sizset=t}e=e[r];var u=false;while(e){if(e.sizcache===v){u=A[e.sizset];break}if(e.nodeType===1&&!z){e.sizcache=v;e.sizset=t}if(e.nodeName===w){u=e;break}e=e[r]}A[t]=u}}}function q(r,w,v,A,x,z){var y=r=="previousSibling"&&!z;for(var t=0,s=A.length;t<s;t++){var e=A[t];if(e){if(y&&e.nodeType===1){e.sizcache=v;e.sizset=t}e=e[r];var u=false;while(e){if(e.sizcache===v){u=A[e.sizset];break}if(e.nodeType===1){if(!z){e.sizcache=v;e.sizset=t}if(typeof w!=="string"){if(e===w){u=true;break}}else{if(b.filter(w,[e]).length>0){u=e;break}}}e=e[r]}A[t]=u}}}var h=document.compareDocumentPosition?function(r,e){return r.compareDocumentPosition(e)&16}:function(r,e){return r!==e&&(r.contains?r.contains(e):true)};var o=function(e){return e.nodeType===9&&e.documentElement.nodeName!=="HTML"||!!e.ownerDocument&&e.ownerDocument.documentElement.nodeName!=="HTML"};var g=function(e,x){var t=[],u="",v,s=x.nodeType?[x]:x;while((v=f.match.PSEUDO.exec(e))){u+=v[0];e=e.replace(f.match.PSEUDO,"")}e=f.relative[e]?e+"*":e;for(var w=0,r=s.length;w<r;w++){b(e,s[w],t)}return b.filter(u,t)};window.tinymce.dom.Sizzle=b})();(function(d){var f=d.each,c=d.DOM,b=d.isIE,e=d.isWebKit,a;d.create("static tinymce.dom.Event",{inits:[],events:[],add:function(m,p,l,j){var g,h=this,i=h.events,k;if(m&&m.hasOwnProperty&&m instanceof Array){k=[];f(m,function(n){n=c.get(n);k.push(h.add(n,p,l,j))});return k}m=c.get(m);if(!m){return}g=function(n){n=n||window.event;if(n&&!n.target&&b){n.target=n.srcElement}if(!j){return l(n)}return l.call(j,n)};if(p=="unload"){d.unloads.unshift({func:g});return g}if(p=="init"){if(h.domLoaded){g()}else{h.inits.push(g)}return g}i.push({obj:m,name:p,func:l,cfunc:g,scope:j});h._add(m,p,g);return l},remove:function(l,m,k){var h=this,g=h.events,i=false,j;if(l&&l.hasOwnProperty&&l instanceof Array){j=[];f(l,function(n){n=c.get(n);j.push(h.remove(n,m,k))});return j}l=c.get(l);f(g,function(o,n){if(o.obj==l&&o.name==m&&(!k||(o.func==k||o.cfunc==k))){g.splice(n,1);h._remove(l,m,o.cfunc);i=true;return false}});return i},clear:function(l){var j=this,g=j.events,h,k;if(l){l=c.get(l);for(h=g.length-1;h>=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},_unload:function(){var g=a;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(){var g=a;if(g.domLoaded){return}g._remove(window,"DOMContentLoaded",g._pageInit);g.domLoaded=true;f(g.inits,function(h){h()});g.inits=[]},_wait:function(){if(window.tinyMCE_GZ&&tinyMCE_GZ.loaded){a.domLoaded=1;return}if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);a._pageInit()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(a.domLoaded){return}try{document.documentElement.doScroll("left")}catch(g){setTimeout(arguments.callee,0);return}a._pageInit()})()}}else{if(document.addEventListener){a._add(window,"DOMContentLoaded",a._pageInit,a)}}a._add(window,"load",a._pageInit,a)}});a=d.dom.Event;a._wait();d.addUnload(a._unload)})(tinymce);(function(a){var b=a.each;a.create("tinymce.dom.Element",{Element:function(g,e){var c=this,f,d;e=e||{};c.id=g;c.dom=f=e.dom||a.DOM;c.settings=e;if(!a.isIE){d=c.dom.get(c.id)}b(["getPos","getRect","getParent","add","setStyle","getStyle","setStyles","setAttrib","setAttribs","getAttrib","addClass","removeClass","hasClass","getOuterHTML","setOuterHTML","remove","show","hide","isHidden","setHTML","get"],function(h){c[h]=function(){var j=[g],k;for(k=0;k<arguments.length;k++){j.push(arguments[k])}j=f[h].apply(f,j);c.update(h);return j}})},on:function(e,d,c){return a.dom.Event.add(this.id,e,d,c)},getXY:function(){return{x:parseInt(this.getStyle("left")),y:parseInt(this.getStyle("top"))}},getSize:function(){var c=this.dom.get(this.id);return{w:parseInt(this.getStyle("width")||c.clientWidth),h:parseInt(this.getStyle("height")||c.clientHeight)}},moveTo:function(c,d){this.setStyles({left:c,top:d})},moveBy:function(c,e){var d=this.getXY();this.moveTo(d.x+c,d.y+e)},resizeTo:function(c,d){this.setStyles({width:c,height:d})},resizeBy:function(c,e){var d=this.getSize();this.resizeTo(d.w+c,d.h+e)},update:function(d){var e=this,c,f=e.dom;if(a.isIE6&&e.settings.blocker){d=d||"";if(d.indexOf("get")===0||d.indexOf("has")===0||d.indexOf("is")===0){return}if(d=="remove"){f.remove(e.blocker);return}if(!e.blocker){e.blocker=f.uniqueId();c=f.add(e.settings.container||f.getRoot(),"iframe",{id:e.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'});f.setStyle(c,"opacity",0)}else{c=f.get(e.blocker)}f.setStyle(c,"left",e.getStyle("left",1));f.setStyle(c,"top",e.getStyle("top",1));f.setStyle(c,"width",e.getStyle("width",1));f.setStyle(c,"height",e.getStyle("height",1));f.setStyle(c,"display",e.getStyle("display",1));f.setStyle(c,"zIndex",parseInt(e.getStyle("zIndex",1)||0)-1)}}})})(tinymce);(function(c){function e(f){return f.replace(/[\n\r]+/g,"")}var b=c.is,a=c.isIE,d=c.each;c.create("tinymce.dom.Selection",{Selection:function(i,h,g){var f=this;f.dom=i;f.win=h;f.serializer=g;d(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(j){f[j]=new c.util.Dispatcher(f)});if(!f.win.getSelection){f.tridentSel=new c.dom.TridentSelection(f)}c.addUnload(f.destroy,f)},getContent:function(g){var f=this,h=f.getRng(),l=f.dom.create("body"),j=f.getSel(),i,k,m;g=g||{};i=k="";g.get=true;g.format=g.format||"html";f.onBeforeGetContent.dispatch(f,g);if(g.format=="text"){return f.isCollapsed()?"":(h.text||(j.toString?j.toString():""))}if(h.cloneContents){m=h.cloneContents();if(m){l.appendChild(m)}}else{if(b(h.item)||b(h.htmlText)){l.innerHTML=h.item?h.item(0).outerHTML:h.htmlText}else{l.innerHTML=h.toString()}}if(/^\s/.test(l.innerHTML)){i=" "}if(/\s+$/.test(l.innerHTML)){k=" "}g.getInner=true;g.content=f.isCollapsed()?"":i+f.serializer.serialize(l,g)+k;f.onGetContent.dispatch(f,g);return g.content},setContent:function(i,g){var f=this,j=f.getRng(),l,k=f.win.document;g=g||{format:"html"};g.set=true;i=g.content=f.dom.processHTML(i);f.onBeforeSetContent.dispatch(f,g);i=g.content;if(j.insertNode){i+='<span id="__caret">_</span>';j.deleteContents();j.insertNode(f.getRng().createContextualFragment(i));l=f.dom.get("__caret");j=k.createRange();j.setStartBefore(l);j.setEndAfter(l);f.setRng(j);f.dom.remove("__caret")}else{if(j.item){k.execCommand("Delete",false,null);j=f.getRng()}j.pasteHTML(i)}f.onSetContent.dispatch(f,g)},getStart:function(){var f=this,g=f.getRng(),h;if(a){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(1);h=g.parentElement();if(h&&h.nodeName=="BODY"){return h.firstChild}return h}else{h=g.startContainer;if(h.nodeName=="BODY"){return h.firstChild}return f.dom.getParent(h,"*")}},getEnd:function(){var f=this,g=f.getRng(),h;if(a){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(0);h=g.parentElement();if(h&&h.nodeName=="BODY"){return h.lastChild}return h}else{h=g.endContainer;if(h.nodeName=="BODY"){return h.lastChild}return f.dom.getParent(h,"*")}},getBookmark:function(x){var j=this,m=j.getRng(),f,n,l,u=j.dom.getViewPort(j.win),v,p,z,o,w=-16777215,k,h=j.dom.getRoot(),g=0,i=0,y;n=u.x;l=u.y;if(x=="simple"){return{rng:m,scrollX:n,scrollY:l}}if(a){if(m.item){v=m.item(0);d(j.dom.select(v.nodeName),function(s,r){if(v==s){p=r;return false}});return{tag:v.nodeName,index:p,scrollX:n,scrollY:l}}f=j.dom.doc.body.createTextRange();f.moveToElementText(h);f.collapse(true);z=Math.abs(f.move("character",w));f=m.duplicate();f.collapse(true);p=Math.abs(f.move("character",w));f=m.duplicate();f.collapse(false);o=Math.abs(f.move("character",w))-p;return{start:p-z,length:o,scrollX:n,scrollY:l}}v=j.getNode();k=j.getSel();if(!k){return null}if(v&&v.nodeName=="IMG"){return{scrollX:n,scrollY:l}}function q(A,D,t){var s=j.dom.doc.createTreeWalker(A,NodeFilter.SHOW_TEXT,null,false),E,B=0,C={};while((E=s.nextNode())!=null){if(E==D){C.start=B}if(E==t){C.end=B;return C}B+=e(E.nodeValue||"").length}return null}if(k.anchorNode==k.focusNode&&k.anchorOffset==k.focusOffset){v=q(h,k.anchorNode,k.focusNode);if(!v){return{scrollX:n,scrollY:l}}e(k.anchorNode.nodeValue||"").replace(/^\s+/,function(r){g=r.length});return{start:Math.max(v.start+k.anchorOffset-g,0),end:Math.max(v.end+k.focusOffset-g,0),scrollX:n,scrollY:l,beg:k.anchorOffset-g==0}}else{v=q(h,m.startContainer,m.endContainer);if(!v){return{scrollX:n,scrollY:l}}return{start:Math.max(v.start+m.startOffset-g,0),end:Math.max(v.end+m.endOffset-i,0),scrollX:n,scrollY:l,beg:m.startOffset-g==0}}},moveToBookmark:function(n){var o=this,g=o.getRng(),p=o.getSel(),j=o.dom.getRoot(),m,h,k;function i(q,t,D){var B=o.dom.doc.createTreeWalker(q,NodeFilter.SHOW_TEXT,null,false),x,s=0,A={},u,C,z,y;while((x=B.nextNode())!=null){z=y=0;k=x.nodeValue||"";h=e(k).length;s+=h;if(s>=t&&!A.startNode){u=t-(s-h);if(n.beg&&u>=h){continue}A.startNode=x;A.startOffset=u+y}if(s>=D){A.endNode=x;A.endOffset=D-(s-h)+y;return A}}return null}if(!n){return false}o.win.scrollTo(n.scrollX,n.scrollY);if(a){if(g=n.rng){try{g.select()}catch(l){}return true}o.win.focus();if(n.tag){g=j.createControlRange();d(o.dom.select(n.tag),function(r,q){if(q==n.index){g.addElement(r)}})}else{try{if(n.start<0){return true}g=p.createRange();g.moveToElementText(j);g.collapse(true);g.moveStart("character",n.start);g.moveEnd("character",n.length)}catch(f){return true}}try{g.select()}catch(l){}return true}if(!p){return false}if(n.rng){p.removeAllRanges();p.addRange(n.rng)}else{if(b(n.start)&&b(n.end)){try{m=i(j,n.start,n.end);if(m){g=o.dom.doc.createRange();g.setStart(m.startNode,m.startOffset);g.setEnd(m.endNode,m.endOffset);p.removeAllRanges();p.addRange(g)}if(!c.isOpera){o.win.focus()}}catch(l){}}}},select:function(g,l){var p=this,f=p.getRng(),q=p.getSel(),o,m,k,j=p.win.document;function h(u,t){var s,r;if(u){s=j.createTreeWalker(u,NodeFilter.SHOW_TEXT,null,false);while(u=s.nextNode()){r=u;if(c.trim(u.nodeValue).length!=0){if(t){return u}else{r=u}}}}return r}if(a){try{o=j.body;if(/^(IMG|TABLE)$/.test(g.nodeName)){f=o.createControlRange();f.addElement(g)}else{f=o.createTextRange();f.moveToElementText(g)}f.select()}catch(i){}}else{if(l){m=h(g,1)||p.dom.select("br:first",g)[0];k=h(g,0)||p.dom.select("br:last",g)[0];if(m&&k){f=j.createRange();if(m.nodeName=="BR"){f.setStartBefore(m)}else{f.setStart(m,0)}if(k.nodeName=="BR"){f.setEndBefore(k)}else{f.setEnd(k,k.nodeValue.length)}}else{f.selectNode(g)}}else{f.selectNode(g)}p.setRng(f)}return g},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}return !g||h.boundingWidth==0||h.collapsed},collapse:function(f){var g=this,h=g.getRng(),i;if(h.item){i=h.item(0);h=this.win.document.body.createTextRange();h.moveToElementText(i)}h.collapse(!!f);g.setRng(h)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(j){var g=this,h,i;if(j&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():g.win.document.createRange())}}catch(f){}if(!i){i=a?g.win.document.body.createTextRange():g.win.document.createRange()}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){h.removeAllRanges();h.addRange(i)}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var f=this,h=f.getRng(),g=f.getSel(),i;if(!a){if(!h){return f.dom.getRoot()}i=h.commonAncestorContainer;if(!h.collapsed){if(c.isWebKit&&g.anchorNode&&g.anchorNode.nodeType==1){return g.anchorNode.childNodes[g.anchorOffset]}if(h.startContainer==h.endContainer){if(h.startOffset-h.endOffset<2){if(h.startContainer.hasChildNodes()){i=h.startContainer.childNodes[h.startOffset]}}}}return f.dom.getParent(i,"*")}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(g,f){var i=this,j=i.dom,m,h,l,k=[];m=j.getParent(g||i.getStart(),j.isBlock);h=j.getParent(f||i.getEnd(),j.isBlock);if(m){k.push(m)}if(m&&h&&m!=h){l=m;while((l=l.nextSibling)&&l!=h){if(j.isBlock(l)){k.push(l)}}}if(h&&m!=h){k.push(h)}return k},destroy:function(g){var f=this;f.win=null;if(f.tridentSel){f.tridentSel.destroy()}if(!g){c.removeUnload(f.destroy)}}})})(tinymce);(function(a){a.create("tinymce.dom.XMLWriter",{node:null,XMLWriter:function(c){function b(){var e=document.implementation;if(!e||!e.createDocument){try{return new ActiveXObject("MSXML2.DOMDocument")}catch(d){}try{return new ActiveXObject("Microsoft.XmlDom")}catch(d){}}else{return e.createDocument("","",null)}}this.doc=b();this.valid=a.isOpera||a.isWebKit;this.reset()},reset:function(){var b=this,c=b.doc;if(c.firstChild){c.removeChild(c.firstChild)}b.node=c.appendChild(c.createElement("html"))},writeStartElement:function(c){var b=this;b.node=b.node.appendChild(b.doc.createElement(c))},writeAttribute:function(c,b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.setAttribute(c,b)},writeEndElement:function(){this.node=this.node.parentNode},writeFullEndElement:function(){var b=this,c=b.node;c.appendChild(b.doc.createTextNode(""));b.node=c.parentNode},writeText:function(b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.appendChild(this.doc.createTextNode(b))},writeCDATA:function(b){this.node.appendChild(this.doc.createCDATA(b))},writeComment:function(b){if(a.isIE){b=b.replace(/^\-|\-$/g," ")}this.node.appendChild(this.doc.createComment(b.replace(/\-\-/g," ")))},getContent:function(){var b;b=this.doc.xml||new XMLSerializer().serializeToString(this.doc);b=b.replace(/<\?[^?]+\?>|<html>|<\/html>|<html\/>|<!DOCTYPE[^>]+>/g,"");b=b.replace(/ ?\/>/g," />");if(this.valid){b=b.replace(/\%MCGT%/g,">")}return b}})})(tinymce);(function(a){a.create("tinymce.dom.StringWriter",{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(b){this.settings=a.extend({indent_char:" ",indentation:1},b);this.reset()},reset:function(){this.indent="";this.str="";this.tags=[];this.count=0},writeStartElement:function(b){this._writeAttributesEnd();this.writeRaw("<"+b);this.tags.push(b);this.inAttr=true;this.count++;this.elementCount=this.count},writeAttribute:function(d,b){var c=this;c.writeRaw(" "+c.encode(d)+'="'+c.encode(b)+'"')},writeEndElement:function(){var b;if(this.tags.length>0){b=this.tags.pop();if(this._writeAttributesEnd(1)){this.writeRaw("</"+b+">")}if(this.settings.indentation>0){this.writeRaw("\n")}}},writeFullEndElement:function(){if(this.tags.length>0){this._writeAttributesEnd();this.writeRaw("</"+this.tags.pop()+">");if(this.settings.indentation>0){this.writeRaw("\n")}}},writeText:function(b){this._writeAttributesEnd();this.writeRaw(this.encode(b));this.count++},writeCDATA:function(b){this._writeAttributesEnd();this.writeRaw("<![CDATA["+b+"]]>");this.count++},writeComment:function(b){this._writeAttributesEnd();this.writeRaw("<!-- "+b+"-->");this.count++},writeRaw:function(b){this.str+=b},encode:function(b){return b.replace(/[<>&"]/g,function(c){switch(c){case"<":return"<";case">":return">";case"&":return"&";case'"':return"""}return c})},getContent:function(){return this.str},_writeAttributesEnd:function(b){if(!this.inAttr){return}this.inAttr=false;if(b&&this.elementCount==this.count){this.writeRaw(" />");return false}this.writeRaw(">");return true}})})(tinymce);(function(e){var g=e.extend,f=e.each,b=e.util.Dispatcher,d=e.isIE,a=e.isGecko;function c(h){return h.replace(/([?+*])/g,".$1")}e.create("tinymce.dom.Serializer",{Serializer:function(j){var i=this;i.key=0;i.onPreProcess=new b(i);i.onPostProcess=new b(i);try{i.writer=new e.dom.XMLWriter()}catch(h){i.writer=new e.dom.StringWriter()}i.settings=j=g({dom:e.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(mce_|_moz_)/,closed:/^(br|hr|input|meta|img|link|param|area)$/,entity_encoding:"named",entities:"160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro",bool_attrs:/(checked|disabled|readonly|selected|nowrap)/,valid_elements:"*[*]",extended_valid_elements:0,valid_child_elements:0,invalid_elements:0,fix_table_elements:1,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,font_size_style_values:0,apply_source_formatting:0,indent_mode:"simple",indent_char:"\t",indent_levels:1,remove_linebreaks:1,remove_redundant_brs:1,element_format:"xhtml"},j);i.dom=j.dom;if(j.remove_redundant_brs){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/(<br \/>\s*)+<\/(p|h[1-6]|div|li)>/gi,function(n,m,o){if(/^<br \/>\s*<\//.test(n)){return"</"+o+">"}return n})})}if(j.element_format=="html"){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/<([^>]+) \/>/g,"<$1>")})}if(j.fix_list_elements){i.onPreProcess.add(function(v,s){var l,y,w=["ol","ul"],u,t,q,k=/^(OL|UL)$/,z;function m(r,x){var o=x.split(","),p;while((r=r.previousSibling)!=null){for(p=0;p<o.length;p++){if(r.nodeName==o[p]){return r}}}return null}for(y=0;y<w.length;y++){l=i.dom.select(w[y],s.node);for(u=0;u<l.length;u++){t=l[u];q=t.parentNode;if(k.test(q.nodeName)){z=m(t,"LI");if(!z){z=i.dom.create("li");z.innerHTML=" ";z.appendChild(t);q.insertBefore(z,q.firstChild)}else{z.appendChild(t)}}}}})}if(j.fix_table_elements){i.onPreProcess.add(function(k,l){f(i.dom.select("p table",l.node),function(m){i.dom.split(i.dom.getParent(m,"p"),m)})})}},setEntities:function(p){var n=this,j,m,h={},o="",k;if(n.entityLookup){return}j=p.split(",");for(m=0;m<j.length;m+=2){k=j[m];if(k==34||k==38||k==60||k==62){continue}h[String.fromCharCode(j[m])]=j[m+1];k=parseInt(j[m]).toString(16);o+="\\u"+"0000".substring(k.length)+k}if(!o){n.settings.entity_encoding="raw";return}n.entitiesRE=new RegExp("["+o+"]","g");n.entityLookup=h},setValidChildRules:function(h){this.childRules=null;this.addValidChildRules(h)},addValidChildRules:function(k){var j=this,l,h,i;if(!k){return}l="A|BR|SPAN|BDO|MAP|OBJECT|IMG|TT|I|B|BIG|SMALL|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|#text|#comment";h="A|BR|SPAN|BDO|OBJECT|APPLET|IMG|MAP|IFRAME|TT|I|B|U|S|STRIKE|BIG|SMALL|FONT|BASEFONT|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|INPUT|SELECT|TEXTAREA|LABEL|BUTTON|#text|#comment";i="H[1-6]|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|FORM|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP";f(k.split(","),function(n){var o=n.split(/\[|\]/),m;n="";f(o[1].split("|"),function(p){if(n){n+="|"}switch(p){case"%itrans":p=h;break;case"%itrans_na":p=h.substring(2);break;case"%istrict":p=l;break;case"%istrict_na":p=l.substring(2);break;case"%btrans":p=i;break;case"%bstrict":p=i;break}n+=p});m=new RegExp("^("+n.toLowerCase()+")$","i");f(o[0].split("/"),function(p){j.childRules=j.childRules||{};j.childRules[p]=m})});k="";f(j.childRules,function(n,m){if(k){k+="|"}k+=m});j.parentElementsRE=new RegExp("^("+k.toLowerCase()+")$","i")},setRules:function(i){var h=this;h._setup();h.rules={};h.wildRules=[];h.validElements={};return h.addRules(i)},addRules:function(i){var h=this,j;if(!i){return}h._setup();f(i.split(","),function(m){var q=m.split(/\[|\]/),l=q[0].split("/"),r,k,o,n=[];if(j){k=e.extend([],j.attribs)}if(q.length>1){f(q[1].split("|"),function(u){var p={},t;k=k||[];u=u.replace(/::/g,"~");u=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(u);u[2]=u[2].replace(/~/g,":");if(u[1]=="!"){r=r||[];r.push(u[2])}if(u[1]=="-"){for(t=0;t<k.length;t++){if(k[t].name==u[2]){k.splice(t,1);return}}}switch(u[3]){case"=":p.defaultVal=u[4]||"";break;case":":p.forcedVal=u[4];break;case"<":p.validVals=u[4].split("?");break}if(/[*.?]/.test(u[2])){o=o||[];p.nameRE=new RegExp("^"+c(u[2])+"$");o.push(p)}else{p.name=u[2];k.push(p)}n.push(u[2])})}f(l,function(v,u){var w=v.charAt(0),t=1,p={};if(j){if(j.noEmpty){p.noEmpty=j.noEmpty}if(j.fullEnd){p.fullEnd=j.fullEnd}if(j.padd){p.padd=j.padd}}switch(w){case"-":p.noEmpty=true;break;case"+":p.fullEnd=true;break;case"#":p.padd=true;break;default:t=0}l[u]=v=v.substring(t);h.validElements[v]=1;if(/[*.?]/.test(l[0])){p.nameRE=new RegExp("^"+c(l[0])+"$");h.wildRules=h.wildRules||{};h.wildRules.push(p)}else{p.name=l[0];if(l[0]=="@"){j=p}h.rules[v]=p}p.attribs=k;if(r){p.requiredAttribs=r}if(o){v="";f(n,function(s){if(v){v+="|"}v+="("+c(s)+")"});p.validAttribsRE=new RegExp("^"+v.toLowerCase()+"$");p.wildAttribs=o}})});i="";f(h.validElements,function(m,l){if(i){i+="|"}if(l!="@"){i+=l}});h.validElementsRE=new RegExp("^("+c(i.toLowerCase())+")$")},findRule:function(m){var j=this,l=j.rules,h,k;j._setup();k=l[m];if(k){return k}l=j.wildRules;for(h=0;h<l.length;h++){if(l[h].nameRE.test(m)){return l[h]}}return null},findAttribRule:function(h,l){var j,k=h.wildAttribs;for(j=0;j<k.length;j++){if(k[j].nameRE.test(l)){return k[j]}}return null},serialize:function(l,k){var j,i=this;i._setup();k=k||{};k.format=k.format||"html";i.processObj=k;l=l.cloneNode(true);i.key=""+(parseInt(i.key)+1);if(!k.no_events){k.node=l;i.onPreProcess.dispatch(i,k)}i.writer.reset();i._serializeNode(l,k.getInner);k.content=i.writer.getContent();if(!k.no_events){i.onPostProcess.dispatch(i,k)}i._postProcess(k);k.node=null;return e.trim(k.content)},_postProcess:function(n){var i=this,k=i.settings,j=n.content,m=[],l;if(n.format=="html"){l=i._protect({content:j,patterns:[{pattern:/(<script[^>]*>)(.*?)(<\/script>)/g},{pattern:/(<style[^>]*>)(.*?)(<\/style>)/g},{pattern:/(<pre[^>]*>)(.*?)(<\/pre>)/g,encode:1},{pattern:/(<!--\[CDATA\[)(.*?)(\]\]-->)/g}]});j=l.content;if(k.entity_encoding!=="raw"){j=i._encode(j)}if(!n.set){j=j.replace(/<p>\s+<\/p>|<p([^>]+)>\s+<\/p>/g,k.entity_encoding=="numeric"?"<p$1> </p>":"<p$1> </p>");if(k.remove_linebreaks){j=j.replace(/\r?\n|\r/g," ");j=j.replace(/(<[^>]+>)\s+/g,"$1 ");j=j.replace(/\s+(<\/[^>]+>)/g," $1");j=j.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object) ([^>]+)>\s+/g,"<$1 $2>");j=j.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>\s+/g,"<$1>");j=j.replace(/\s+<\/(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>/g,"</$1>")}if(k.apply_source_formatting&&k.indent_mode=="simple"){j=j.replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,"\n<$1$2$3>\n");j=j.replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,"\n<$1$2>");j=j.replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,"</$1>\n");j=j.replace(/\n\n/g,"\n")}}j=i._unprotect(j,l);j=j.replace(/<!--\[CDATA\[([\s\S]+)\]\]-->/g,"<![CDATA[$1]]>");if(k.entity_encoding=="raw"){j=j.replace(/<p> <\/p>|<p([^>]+)> <\/p>/g,"<p$1>\u00a0</p>")}}n.content=j},_serializeNode:function(C,m){var y=this,z=y.settings,u=y.writer,p,j,r,E,D,F,A,h,x,k,q,B,o;if(!z.node_filter||z.node_filter(C)){switch(C.nodeType){case 1:if(C.hasAttribute?C.hasAttribute("mce_bogus"):C.getAttribute("mce_bogus")){return}o=false;p=C.hasChildNodes();k=C.getAttribute("mce_name")||C.nodeName.toLowerCase();if(d){if(C.scopeName!=="HTML"&&C.scopeName!=="html"){k=C.scopeName+":"+k}}if(k.indexOf("mce:")===0){k=k.substring(4)}if(!y.validElementsRE.test(k)||(y.invalidElementsRE&&y.invalidElementsRE.test(k))||m){o=true;break}if(d){if(z.fix_content_duplication){if(C.mce_serialized==y.key){return}C.mce_serialized=y.key}if(k.charAt(0)=="/"){k=k.substring(1)}}else{if(a){if(C.nodeName==="BR"&&C.getAttribute("type")=="_moz"){return}}}if(y.childRules){if(y.parentElementsRE.test(y.elementName)){if(!y.childRules[y.elementName].test(k)){o=true;break}}y.elementName=k}q=y.findRule(k);k=q.name||k;if((!p&&q.noEmpty)||(d&&!k)){o=true;break}if(q.requiredAttribs){F=q.requiredAttribs;for(E=F.length-1;E>=0;E--){if(this.dom.getAttrib(C,F[E])!==""){break}}if(E==-1){o=true;break}}u.writeStartElement(k);if(q.attribs){for(E=0,A=q.attribs,D=A.length;E<D;E++){F=A[E];x=y._getAttrib(C,F);if(x!==null){u.writeAttribute(F.name,x)}}}if(q.validAttribsRE){A=y.dom.getAttribs(C);for(E=A.length-1;E>-1;E--){h=A[E];if(h.specified){F=h.nodeName.toLowerCase();if(z.invalid_attrs.test(F)||!q.validAttribsRE.test(F)){continue}B=y.findAttribRule(q,F);x=y._getAttrib(C,B,F);if(x!==null){u.writeAttribute(F,x)}}}}if(q.padd){if(p&&(r=C.firstChild)&&r.nodeType===1&&C.childNodes.length===1){if(r.hasAttribute?r.hasAttribute("mce_bogus"):r.getAttribute("mce_bogus")){u.writeText("\u00a0")}}else{if(!p){u.writeText("\u00a0")}}}break;case 3:if(y.childRules&&y.parentElementsRE.test(y.elementName)){if(!y.childRules[y.elementName].test(C.nodeName)){return}}return u.writeText(C.nodeValue);case 4:return u.writeCDATA(C.nodeValue);case 8:return u.writeComment(C.nodeValue)}}else{if(C.nodeType==1){p=C.hasChildNodes()}}if(p){r=C.firstChild;while(r){y._serializeNode(r);y.elementName=k;r=r.nextSibling}}if(!o){if(p||!z.closed.test(k)){u.writeFullEndElement()}else{u.writeEndElement()}}},_protect:function(j){var i=this;j.items=j.items||[];function h(l){return l.replace(/[\r\n\\]/g,function(m){if(m==="\n"){return"\\n"}else{if(m==="\\"){return"\\\\"}}return"\\r"})}function k(l){return l.replace(/\\[\\rn]/g,function(m){if(m==="\\n"){return"\n"}else{if(m==="\\\\"){return"\\"}}return"\r"})}f(j.patterns,function(l){j.content=k(h(j.content).replace(l.pattern,function(n,o,m,p){m=k(m);if(l.encode){m=i._encode(m)}j.items.push(m);return o+"<!--mce:"+(j.items.length-1)+"-->"+p}))});return j},_unprotect:function(i,j){i=i.replace(/\<!--mce:([0-9]+)--\>/g,function(k,h){return j.items[parseInt(h)]});j.items=[];return i},_encode:function(m){var j=this,k=j.settings,i;if(k.entity_encoding!=="raw"){if(k.entity_encoding.indexOf("named")!=-1){j.setEntities(k.entities);i=j.entityLookup;m=m.replace(j.entitiesRE,function(h){var l;if(l=i[h]){h="&"+l+";"}return h})}if(k.entity_encoding.indexOf("numeric")!=-1){m=m.replace(/[\u007E-\uFFFF]/g,function(h){return"&#"+h.charCodeAt(0)+";"})}}return m},_setup:function(){var h=this,i=this.settings;if(h.done){return}h.done=1;h.setRules(i.valid_elements);h.addRules(i.extended_valid_elements);h.addValidChildRules(i.valid_child_elements);if(i.invalid_elements){h.invalidElementsRE=new RegExp("^("+c(i.invalid_elements.replace(/,/g,"|").toLowerCase())+")$")}if(i.attrib_value_filter){h.attribValueFilter=i.attribValueFilter}},_getAttrib:function(m,j,h){var l,k;h=h||j.name;if(j.forcedVal&&(k=j.forcedVal)){if(k==="{$uid}"){return this.dom.uniqueId()}return k}k=this.dom.getAttrib(m,h);if(this.settings.bool_attrs.test(h)&&k){k=(""+k).toLowerCase();if(k==="false"||k==="0"){return null}k=h}switch(h){case"rowspan":case"colspan":if(k=="1"){k=""}break}if(this.attribValueFilter){k=this.attribValueFilter(h,k,m)}if(j.validVals){for(l=j.validVals.length-1;l>=0;l--){if(k==j.validVals[l]){break}}if(l==-1){return null}}if(k===""&&typeof(j.defaultVal)!="undefined"){k=j.defaultVal;if(k==="{$uid}"){return this.dom.uniqueId()}return k}else{if(h=="class"&&this.processObj.get){k=k.replace(/\s?mceItem\w+\s?/g,"")}}if(k===""){return null}return k}})})(tinymce);(function(tinymce){var each=tinymce.each,Event=tinymce.dom.Event;tinymce.create("tinymce.dom.ScriptLoader",{ScriptLoader:function(s){this.settings=s||{};this.queue=[];this.lookup={}},isDone:function(u){return this.lookup[u]?this.lookup[u].state==2:0},markDone:function(u){this.lookup[u]={state:2,url:u}},add:function(u,cb,s,pr){var t=this,lo=t.lookup,o;if(o=lo[u]){if(cb&&o.state==2){cb.call(s||this)}return o}o={state:0,url:u,func:cb,scope:s||this};if(pr){t.queue.unshift(o)}else{t.queue.push(o)}lo[u]=o;return o},load:function(u,cb,s){var t=this,o;if(o=t.lookup[u]){if(cb&&o.state==2){cb.call(s||t)}return o}function loadScript(u){if(Event.domLoaded||t.settings.strict_mode){tinymce.util.XHR.send({url:tinymce._addVer(u),error:t.settings.error,async:false,success:function(co){t.eval(co)}})}else{document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"><\/script>')}}if(!tinymce.is(u,"string")){each(u,function(u){loadScript(u)});if(cb){cb.call(s||t)}}else{loadScript(u);if(cb){cb.call(s||t)}}},loadQueue:function(cb,s){var t=this;if(!t.queueLoading){t.queueLoading=1;t.queueCallbacks=[];t.loadScripts(t.queue,function(){t.queueLoading=0;if(cb){cb.call(s||t)}each(t.queueCallbacks,function(o){o.func.call(o.scope)})})}else{if(cb){t.queueCallbacks.push({func:cb,scope:s||t})}}},eval:function(co){var w=window;if(!w.execScript){try{eval.call(w,co)}catch(ex){eval(co,w)}}else{w.execScript(co)}},loadScripts:function(sc,cb,s){var t=this,lo=t.lookup;function done(o){o.state=2;if(o.func){o.func.call(o.scope||t)}}function allDone(){var l;l=sc.length;each(sc,function(o){o=lo[o.url];if(o.state===2){done(o);l--}else{load(o)}});if(l===0&&cb){cb.call(s||t);cb=0}}function load(o){if(o.state>0){return}o.state=1;tinymce.dom.ScriptLoader.loadScript(o.url,function(){done(o);allDone()})}each(sc,function(o){var u=o.url;if(!lo[u]){lo[u]=o;t.queue.push(o)}else{o=lo[u]}if(o.state>0){return}if(!Event.domLoaded&&!t.settings.strict_mode){var ix,ol="";if(cb||o.func){o.state=1;ix=tinymce.dom.ScriptLoader._addOnLoad(function(){done(o);allDone()});if(tinymce.isIE){ol=' onreadystatechange="'}else{ol=' onload="'}ol+="tinymce.dom.ScriptLoader._onLoad(this,'"+u+"',"+ix+');"'}document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"'+ol+"><\/script>");if(!o.func){done(o)}}else{load(o)}});allDone()},"static":{_addOnLoad:function(f){var t=this;t._funcs=t._funcs||[];t._funcs.push(f);return t._funcs.length-1},_onLoad:function(e,u,ix){if(!tinymce.isIE||e.readyState=="complete"){this._funcs[ix].call(this)}},loadScript:function(u,cb){var id=tinymce.DOM.uniqueId(),e;function done(){Event.clear(id);tinymce.DOM.remove(id);if(cb){cb.call(document,u);cb=0}}if(tinymce.isIE){tinymce.util.XHR.send({url:tinymce._addVer(u),async:false,success:function(co){window.execScript(co);done()}})}else{e=tinymce.DOM.create("script",{id:id,type:"text/javascript",src:tinymce._addVer(u)});Event.add(e,"load",done);(document.getElementsByTagName("head")[0]||document.body).appendChild(e)}}}});tinymce.ScriptLoader=new tinymce.dom.ScriptLoader()})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(e,d){this.id=e;this.settings=d=d||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=d.scope||this;this.disabled=0;this.active=0},setDisabled:function(d){var f;if(d!=this.disabled){f=b.get(this.id);if(f&&this.settings.unavailable_prefix){if(d){this.prevTitle=f.title;f.title=this.settings.unavailable_prefix+": "+f.title}else{f.title=this.prevTitle}}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}},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(b,a){this.parent(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"},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix})}});(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.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;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},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.clientWidth,j.max_width):g.clientWidth;k=j.max_height?Math.min(g.clientHeight,j.max_height):g.clientHeight;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 a.cancel(s)}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(w){var h,t,s;w=w.target;if(w&&(w=c.getParent(w,"tr"))){h=z.items[w.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(w&&c.hasClass(w,m+"ItemSub")){t=c.getRect(w);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}z.onShowMenu.dispatch(z);if(A.keyboard_focus){a.add(o,"keydown",z._keyHandler,z);c.select("a","menu_"+z.id)[0].focus();z._focusIdx=0}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}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);a.remove(h,"mouseover",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);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",{id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000"});k=c.add(g,"div",{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",{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},_keyHandler:function(j){var i=this,h=j.keyCode;function g(m){var k=i._focusIdx+m,l=c.select("a","menu_"+i.id)[k];if(l){i._focusIdx=k;l.focus()}}switch(h){case 38:g(-1);return;case 40:g(1);return;case 13:return;case 27:return this.hideMenu()}},_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,"td");i=p=c.add(i,"a",{href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});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){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(d,c){this.parent(d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='<a id="'+this.id+'" href="javascript:;" class="'+f+" "+f+"Enabled "+e["class"]+(c?" "+f+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" title="'+a.encode(e.title)+'">';if(e.image){d+='<img class="mceIcon" src="'+e.image+'" />'+c+"</a>"}else{d+='<span class="mceIcon '+e["class"]+'"></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")+"</a>"}return d},postRender:function(){var c=this,d=c.settings;b.dom.Event.add(c.id,"click",function(f){if(!c.isDisabled()){return d.onclick.call(d.scope,f)}})}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(h,g){var f=this;f.parent(h,g);f.items=[];f.onChange=new a(f);f.onPostRender=new a(f);f.onAdd=new a(f);f.onRenderMenu=new d.util.Dispatcher(this);f.classPrefix="mceListBox"},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&h.call){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){var g=this,h,i;if(f!=g.selectedIndex){h=c.get(g.id+"_text");i=g.items[f];if(i){g.selectedValue=i.value;g.selectedIndex=f;c.setHTML(h,c.encode(i.title));c.removeClass(h,"mceTitle")}else{c.setHTML(h,c.encode(g.settings.title));c.addClass(h,"mceTitle");g.selectedValue=g.selectedIndex=null}h=0}},add:function(i,f,h){var g=this;h=h||{};h=d.extend(h,{title:i,value:f});g.items.push(h);g.onAdd.dispatch(g,h)},getLength:function(){return this.items.length},renderHTML:function(){var i="",f=this,g=f.settings,j=f.classPrefix;i='<table id="'+f.id+'" cellpadding="0" cellspacing="0" class="'+j+" "+j+"Enabled"+(g["class"]?(" "+g["class"]):"")+'"><tbody><tr>';i+="<td>"+c.createHTML("a",{id:f.id+"_text",href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},c.encode(f.settings.title))+"</td>";i+="<td>"+c.createHTML("a",{id:f.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},"<span></span>")+"</td>";i+="</tr></tbody></table>";return i},showMenu:function(){var g=this,j,i,h=c.get(this.id),f;if(g.isDisabled()||g.items.length==0){return}if(g.menu&&g.menu.isMenuVisible){return g.hideMenu()}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}j=c.getPos(this.settings.menu_container);i=c.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.keyboard_focus=!d.isOpera;if(g.oldID){f.items[g.oldID].setSelected(0)}e(g.items,function(k){if(k.value===g.selectedValue){f.items[k.id].setSelected(1);g.oldID=k.id}});f.showMenu(0,h.clientHeight);b.add(c.doc,"mousedown",g.hideMenu,g);c.addClass(g.id,g.classPrefix+"Selected")},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&(g.target.id==f.id+"_text"||g.target.id==f.id+"_open")){return}if(!g||!c.getParent(g.target,".mceMenu")){c.removeClass(f.id,f.classPrefix+"Selected");b.remove(c.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}},renderMenu:function(){var g=this,f;f=g.settings.control_manager.createDropMenu(g.id+"_menu",{menu_line:1,"class":g.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});f.onHideMenu.add(g.hideMenu,g);f.add({title:g.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}});e(g.items,function(h){h.id=c.uniqueId();h.onclick=function(){if(g.settings.onselect(h.value)!==false){g.select(h.value)}};f.add(h)});g.onRenderMenu.dispatch(g,f);g.menu=f},postRender:function(){var f=this,g=f.classPrefix;b.add(f.id,"click",f.showMenu,f);b.add(f.id+"_text","focus",function(h){if(!f._focused){f.keyDownHandler=b.add(f.id+"_text","keydown",function(l){var i=-1,j,k=l.keyCode;e(f.items,function(m,n){if(f.selectedValue==m.value){i=n}});if(k==38){j=f.items[i-1]}else{if(k==40){j=f.items[i+1]}else{if(k==13){j=f.selectedValue;f.selectedValue=null;f.settings.onselect(j);return b.cancel(l)}}}if(j){f.hideMenu();f.select(j.value)}})}f._focused=1});b.add(f.id+"_text","blur",function(){b.remove(f.id+"_text","keydown",f.keyDownHandler);f._focused=0});if(d.isIE6||!c.boxModel){b.add(f.id,"mouseover",function(){if(!c.hasClass(f.id,g+"Disabled")){c.addClass(f.id,g+"Hover")}});b.add(f.id,"mouseout",function(){if(!c.hasClass(f.id,g+"Disabled")){c.removeClass(f.id,g+"Hover")}})}f.onPostRender.dispatch(f,c.get(f.id))},destroy:function(){this.parent();b.clear(this.id+"_text")}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(g,f){this.parent(g,f);this.classPrefix="mceNativeListBox"},setDisabled:function(f){c.get(this.id).disabled=f},isDisabled:function(){return c.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&h.call){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){c.get(this.id).selectedIndex=f+1;this.selectedValue=this.items[f]?this.items[f].value:null},add:function(j,g,f){var i,h=this;f=f||{};f.value=g;if(h.isRendered()){c.add(c.get(this.id),"option",f,j)}i={title:j,value:g,attribs:f};h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return c.get(this.id).options.length-1},renderHTML:function(){var g,f=this;g=c.createHTML("option",{value:""},"-- "+f.settings.title+" --");e(f.items,function(h){g+=c.createHTML("option",{value:h.value},h.title)});g=c.createHTML("select",{id:f.id,"class":"mceNativeListBox"},g);return g},postRender:function(){var g=this,h;g.rendered=true;function f(j){var i=g.items[j.target.selectedIndex-1];if(i&&(i=i.value)){g.onChange.dispatch(g,i);if(g.settings.onselect){g.settings.onselect(i)}}}b.add(g.id,"change",f);b.add(g.id,"keydown",function(j){var i;b.remove(g.id,"change",h);i=b.add(g.id,"blur",function(){b.add(g.id,"change",f);b.remove(g.id,"blur",i)});if(j.keyCode==13||j.keyCode==32){f(j);return b.cancel(j)}});g.onPostRender.dispatch(g,c.get(g.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(f,e){this.parent(f,e);this.onRenderMenu=new c.util.Dispatcher(this);e.menu_container=e.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.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(f.hideMenu,f);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(f,e){this.parent(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,"class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}i+="<td>"+b.createHTML("a",{id:f.id+"_action",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"]});i+="<td>"+b.createHTML("a",{id:f.id+"_open",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";i+="</tr></tbody>";return b.createHTML("table",{id:f.id,"class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",onmousedown:"return false;",title:g.title},i)},postRender:function(){var e=this,f=e.settings;if(f.onclick){a.add(e.id+"_action","click",function(){if(!e.isDisabled()){f.onclick(e.value)}})}a.add(e.id+"_open","click",e.showMenu,e);a.add(e.id+"_open","focus",function(){e._focused=1});a.add(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")}})})(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(h,g){var f=this;f.parent(h,g);f.settings=g=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"},f.settings);f.onShowMenu=new d.util.Dispatcher(f);f.onHideMenu=new d.util.Dispatcher(f);f.value=g.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.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,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.onShowMenu.dispatch(f);f.isMenuVisible=1},hideMenu:function(g){var f=this;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.onHideMenu.dispatch(f);f.isMenuVisible=0},renderMenu:function(){var k=this,f,j=0,l=k.settings,p,h,o,g;g=c.add(l.menu_container,"div",{id:k.id+"_menu","class":l.menu_class+" "+l["class"],style:"position:absolute;left:0;top:-1000px;"});f=c.add(g,"div",{"class":l["class"]+" mceSplitButtonMenu"});c.add(f,"span",{"class":"mceMenuLine"});p=c.add(f,"table",{"class":"mceColorSplitMenu"});h=c.add(p,"tbody");j=0;e(b(l.colors,"array")?l.colors:l.colors.split(","),function(i){i=i.replace(/^#/,"");if(!j--){o=c.add(h,"tr");j=l.grid_width-1}p=c.add(o,"td");p=c.add(p,"a",{href:"javascript:;",style:{backgroundColor:"#"+i},mce_color:"#"+i})});if(l.more_colors_func){p=c.add(h,"tr");p=c.add(p,"td",{colspan:l.grid_width,"class":"mceMoreColors"});p=c.add(p,"a",{id:k.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},l.more_colors_title);a.add(p,"click",function(i){l.more_colors_func.call(l.more_colors_scope||this);return a.cancel(i)})}c.addClass(f,"mceColorSplitMenu");a.add(k.id+"_menu","click",function(i){var m;i=i.target;if(i.nodeName=="A"&&(m=i.getAttribute("mce_color"))){k.setColor(m)}return a.cancel(i)});return g},setColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g;f.hideMenu();f.settings.onselect(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(){this.parent();a.clear(this.id+"_menu");a.clear(this.id+"_more");c.remove(this.id+"_menu")}})})(tinymce);tinymce.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var l=this,e="",g,j,b=tinymce.DOM,m=l.settings,d,a,f,k;k=l.controls;for(d=0;d<k.length;d++){j=k[d];a=k[d-1];f=k[d+1];if(d===0){g="mceToolbarStart";if(j.Button){g+=" mceToolbarStartButton"}else{if(j.SplitButton){g+=" mceToolbarStartSplitButton"}else{if(j.ListBox){g+=" mceToolbarStartListBox"}}}e+=b.createHTML("td",{"class":g},b.createHTML("span",null,"<!-- IE -->"))}if(a&&j.ListBox){if(a.Button||a.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarEnd"},b.createHTML("span",null,"<!-- IE -->"))}}if(b.stdMode){e+='<td style="position: relative">'+j.renderHTML()+"</td>"}else{e+="<td>"+j.renderHTML()+"</td>"}if(f&&j.ListBox){if(f.Button||f.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarStart"},b.createHTML("span",null,"<!-- IE -->"))}}}g="mceToolbarEnd";if(j.Button){g+=" mceToolbarEndButton"}else{if(j.SplitButton){g+=" mceToolbarEndSplitButton"}else{if(j.ListBox){g+=" mceToolbarEndListBox"}}}e+=b.createHTML("td",{"class":g},b.createHTML("span",null,"<!-- IE -->"));return b.createHTML("table",{id:l.id,"class":"mceToolbar"+(m["class"]?" "+m["class"]:""),cellpadding:"0",cellspacing:"0",align:l.settings.align||""},"<tbody><tr>"+e+"</tr></tbody>")}});(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{items:[],urls:{},lookup:{},onAdd:new a(this),get:function(d){return this.lookup[d]},requireLangPack:function(f){var d,e=b.EditorManager.settings;if(e&&e.language){d=this.urls[f]+"/langs/"+e.language+".js";if(!b.dom.Event.domLoaded&&!e.strict_mode){b.ScriptLoader.load(d)}else{b.ScriptLoader.add(d)}}},add:function(e,d){this.items.push(d);this.lookup[e]=d;this.onAdd.dispatch(this,e,d);return d},load:function(h,e,d,g){var f=this;if(f.urls[h]){return}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}f.urls[h]=e.substring(0,e.lastIndexOf("/"));b.ScriptLoader.add(e,d,g)}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(f){var g=f.each,h=f.extend,e=f.DOM,a=f.dom.Event,c=f.ThemeManager,b=f.PluginManager,d=f.explode;f.create("static tinymce.EditorManager",{editors:{},i18n:{},activeEditor:null,preInit:function(){var i=this,j=window.location;f.documentBaseURL=j.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(f.documentBaseURL)){f.documentBaseURL+="/"}f.baseURL=new f.util.URI(f.documentBaseURL).toAbsolute(f.baseURL);f.EditorManager.baseURI=new f.util.URI(f.baseURL);if(document.domain&&j.hostname!=document.domain){f.relaxedDomain=document.domain}i.onBeforeUnload=new f.util.Dispatcher(i);a.add(window,"beforeunload",function(k){i.onBeforeUnload.dispatch(i,k)})},init:function(q){var p=this,l,k=f.ScriptLoader,o,n,i=[],m;function j(u,v,r){var t=u[v];if(!t){return}if(f.is(t,"string")){r=t.replace(/\.\w+$/,"");r=r?f.resolve(r):0;t=f.resolve(t)}return t.apply(r||this,Array.prototype.slice.call(arguments,2))}q=h({theme:"simple",language:"en",strict_loading_mode:document.contentType=="application/xhtml+xml"},q);p.settings=q;if(!a.domLoaded&&!q.strict_loading_mode){if(q.language){k.add(f.baseURL+"/langs/"+q.language+".js")}if(q.theme&&q.theme.charAt(0)!="-"&&!c.urls[q.theme]){c.load(q.theme,"themes/"+q.theme+"/editor_template"+f.suffix+".js")}if(q.plugins){l=d(q.plugins);if(f.inArray(l,"compat2x")!=-1){b.load("compat2x","plugins/compat2x/editor_plugin"+f.suffix+".js")}g(l,function(r){if(r&&r.charAt(0)!="-"&&!b.urls[r]){if(!f.isWebKit&&r=="safari"){return}b.load(r,"plugins/"+r+"/editor_plugin"+f.suffix+".js")}})}k.loadQueue()}a.add(document,"init",function(){var r,t;j(q,"onpageload");if(q.browsers){r=false;g(d(q.browsers),function(u){switch(u){case"ie":case"msie":if(f.isIE){r=true}break;case"gecko":if(f.isGecko){r=true}break;case"safari":case"webkit":if(f.isWebKit){r=true}break;case"opera":if(f.isOpera){r=true}break}});if(!r){return}}switch(q.mode){case"exact":r=q.elements||"";if(r.length>0){g(d(r),function(u){if(e.get(u)){m=new f.Editor(u,q);i.push(m);m.render(1)}else{o=0;g(document.forms,function(v){g(v.elements,function(w){if(w.name===u){u="mce_editor_"+o;e.setAttrib(w,"id",u);m=new f.Editor(u,q);i.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function s(v,u){return u.constructor===RegExp?u.test(v.className):e.hasClass(v,u)}g(e.select("textarea"),function(u){if(q.editor_deselector&&s(u,q.editor_deselector)){return}if(!q.editor_selector||s(u,q.editor_selector)){n=e.get(u.name);if(!u.id&&!n){u.id=u.name}if(!u.id||p.get(u.id)){u.id=e.uniqueId()}m=new f.Editor(u.id,q);i.push(m);m.render(1)}});break}if(q.oninit){r=t=0;g(i,function(u){t++;if(!u.initialized){u.onInit.add(function(){r++;if(r==t){j(q,"oninit")}})}else{r++}if(r==t){j(q,"oninit")}})}})},get:function(i){return this.editors[i]},getInstanceById:function(i){return this.get(i)},add:function(i){this.editors[i.id]=i;this._setActive(i);return i},remove:function(j){var i=this;if(!i.editors[j.id]){return null}delete i.editors[j.id];if(i.activeEditor==j){g(i.editors,function(k){i._setActive(k);return false})}j.destroy();return j},execCommand:function(o,m,l){var n=this,k=n.get(l),i;switch(o){case"mceFocus":k.focus();return true;case"mceAddEditor":case"mceAddControl":if(!n.get(l)){new f.Editor(l,n.settings).render()}return true;case"mceAddFrameControl":i=l.window;i.tinyMCE=tinyMCE;i.tinymce=f;f.DOM.doc=i.document;f.DOM.win=i;k=new f.Editor(l.element_id,l);k.render();if(f.isIE){function j(){k.destroy();i.detachEvent("onunload",j);i=i.tinyMCE=i.tinymce=null}i.attachEvent("onunload",j)}l.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":if(k){k.remove()}return true;case"mceToggleEditor":if(!k){n.execCommand("mceAddControl",0,l);return true}if(k.isHidden()){k.show()}else{k.hide()}return true}if(n.activeEditor){return n.activeEditor.execCommand(o,m,l)}return false},execInstanceCommand:function(m,l,k,j){var i=this.get(m);if(i){return i.execCommand(l,k,j)}return false},triggerSave:function(){g(this.editors,function(i){i.save()})},addI18n:function(k,l){var i,j=this.i18n;if(!f.is(k,"string")){g(k,function(n,m){g(n,function(q,p){g(q,function(s,r){if(p==="common"){j[m+"."+r]=s}else{j[m+"."+p+"."+r]=s}})})})}else{g(l,function(n,m){j[k+"."+m]=n})}},_setActive:function(i){this.selectedInstance=this.activeEditor=i}});f.EditorManager.preInit()})(tinymce);var tinyMCE=window.tinyMCE=tinymce.EditorManager;(function(n){var o=n.DOM,k=n.dom.Event,f=n.extend,l=n.util.Dispatcher;var j=n.each,a=n.isGecko,b=n.isIE,e=n.isWebKit;var d=n.is,h=n.ThemeManager,c=n.PluginManager,i=n.EditorManager;var p=n.inArray,m=n.grep,g=n.explode;n.create("tinymce.Editor",{Editor:function(u,r){var q=this;q.id=q.editorId=u;q.execCommands={};q.queryStateCommands={};q.queryValueCommands={};q.plugins={};j(["onPreInit","onBeforeRenderUI","onPostRender","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"],function(s){q[s]=new l(q)});q.settings=r=f({id:u,language:"en",docs_language:"en",theme:"simple",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:n.documentBaseURL,add_form_submit_trigger:1,submit_patch:1,add_unload_trigger:1,convert_urls:1,relative_urls:1,remove_script_host:1,table_inline_editing:0,object_resizing:1,cleanup:1,accessibility_focus:1,custom_shortcuts:1,custom_undo_redo_keyboard_shortcuts:1,custom_undo_redo_restore_selection:1,custom_undo_redo:1,doctype:'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',visual_table_class:"mceItemTable",visual:1,inline_styles:true,convert_fonts_to_spans:true,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",valid_elements:"@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,#p[align],-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote[cite],-table[border=0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value|tabindex|accesskey],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px",keep_styles:1,fix_table_elements:1,removeformat_selector:"span,b,strong,em,i,font,u,strike"},r);q.documentBaseURI=new n.util.URI(r.document_base_url||n.documentBaseURL,{base_uri:tinyMCE.baseURI});q.baseURI=i.baseURI;q.execCallback("setup",q)},render:function(u){var v=this,w=v.settings,x=v.id,q=n.ScriptLoader;if(!k.domLoaded){k.add(document,"init",function(){v.render()});return}if(!u){w.strict_loading_mode=1;tinyMCE.settings=w}if(!v.getElement()){return}if(w.strict_loading_mode){q.settings.strict_mode=w.strict_loading_mode;n.DOM.settings.strict=1}if(!/TEXTAREA|INPUT/i.test(v.getElement().nodeName)&&w.hidden_input&&o.getParent(x,"form")){o.insertAfter(o.create("input",{type:"hidden",name:x}),x)}if(n.WindowManager){v.windowManager=new n.WindowManager(v)}if(w.encoding=="xml"){v.onGetContent.add(function(s,t){if(t.save){t.content=o.encode(t.content)}})}if(w.add_form_submit_trigger){v.onSubmit.addToTop(function(){if(v.initialized){v.save();v.isNotDirty=1}})}if(w.add_unload_trigger){v._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(v.initialized&&!v.destroyed&&!v.isHidden()){v.save({format:"raw",no_events:true})}})}n.addUnload(v.destroy,v);if(w.submit_patch){v.onBeforeRenderUI.add(function(){var s=v.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){v.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){i.triggerSave();v.isNotDirty=1;return v.formElement._mceOldSubmit(v.formElement)}}s=null})}function r(){if(w.language){q.add(n.baseURL+"/langs/"+w.language+".js")}if(w.theme&&w.theme.charAt(0)!="-"&&!h.urls[w.theme]){h.load(w.theme,"themes/"+w.theme+"/editor_template"+n.suffix+".js")}j(g(w.plugins),function(s){if(s&&s.charAt(0)!="-"&&!c.urls[s]){if(!e&&s=="safari"){return}c.load(s,"plugins/"+s+"/editor_plugin"+n.suffix+".js")}});q.loadQueue(function(){if(!v.removed){v.init()}})}if(w.plugins.indexOf("compat2x")!=-1){c.load("compat2x","plugins/compat2x/editor_plugin"+n.suffix+".js");q.loadQueue(r)}else{r()}},init:function(){var v,F=this,G=F.settings,C,z,B=F.getElement(),r,q,D,y,A,E;i.add(F);if(G.theme){G.theme=G.theme.replace(/-/,"");r=h.get(G.theme);F.theme=new r();if(F.theme.init&&G.init_theme){F.theme.init(F,h.urls[G.theme]||n.documentBaseURL.replace(/\/$/,""))}}j(g(G.plugins.replace(/\-/g,"")),function(w){var H=c.get(w),t=c.urls[w]||n.documentBaseURL.replace(/\/$/,""),s;if(H){s=new H(F,t);F.plugins[w]=s;if(s.init){s.init(F,t)}}});if(G.popup_css!==false){if(G.popup_css){G.popup_css=F.documentBaseURI.toAbsolute(G.popup_css)}else{G.popup_css=F.baseURI.toAbsolute("themes/"+G.theme+"/skins/"+G.skin+"/dialog.css")}}if(G.popup_css_add){G.popup_css+=","+F.documentBaseURI.toAbsolute(G.popup_css_add)}F.controlManager=new n.ControlManager(F);F.undoManager=new n.UndoManager(F);F.undoManager.onAdd.add(function(t,s){if(!s.initial){return F.onChange.dispatch(F,s,t)}});F.undoManager.onUndo.add(function(t,s){return F.onUndo.dispatch(F,s,t)});F.undoManager.onRedo.add(function(t,s){return F.onRedo.dispatch(F,s,t)});if(G.custom_undo_redo){F.onExecCommand.add(function(t,w,u,H,s){if(w!="Undo"&&w!="Redo"&&w!="mceRepaint"&&(!s||!s.skip_undo)){F.undoManager.add()}})}F.onExecCommand.add(function(s,t){if(!/^(FontName|FontSize)$/.test(t)){F.nodeChanged()}});if(a){function x(s,t){if(!t||!t.initial){F.execCommand("mceRepaint")}}F.onUndo.add(x);F.onRedo.add(x);F.onSetContent.add(x)}F.onBeforeRenderUI.dispatch(F,F.controlManager);if(G.render_ui){C=G.width||B.style.width||B.offsetWidth;z=G.height||B.style.height||B.offsetHeight;F.orgDisplay=B.style.display;E=/^[0-9\.]+(|px)$/i;if(E.test(""+C)){C=Math.max(parseInt(C)+(r.deltaWidth||0),100)}if(E.test(""+z)){z=Math.max(parseInt(z)+(r.deltaHeight||0),100)}r=F.theme.renderUI({targetNode:B,width:C,height:z,deltaWidth:G.delta_width,deltaHeight:G.delta_height});F.editorContainer=r.editorContainer}o.setStyles(r.sizeContainer||r.editorContainer,{width:C,height:z});z=(r.iframeHeight||z)+(typeof(z)=="number"?(r.deltaHeight||0):"");if(z<100){z=100}F.iframeHTML=G.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml"><base href="'+F.documentBaseURI.getURI()+'" />';F.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';if(n.relaxedDomain){F.iframeHTML+='<script type="text/javascript">document.domain = "'+n.relaxedDomain+'";<\/script>'}y=G.body_id||"tinymce";if(y.indexOf("=")!=-1){y=F.getParam("body_id","","hash");y=y[F.id]||y}A=G.body_class||"";if(A.indexOf("=")!=-1){A=F.getParam("body_class","","hash");A=A[F.id]||""}F.iframeHTML+='</head><body id="'+y+'" class="mceContentBody '+A+'"></body></html>';if(n.relaxedDomain){if(b||(n.isOpera&&parseFloat(opera.version())>=9.5)){D='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+F.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'}else{if(n.isOpera){D='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()'}}}v=o.add(r.iframeContainer,"iframe",{id:F.id+"_ifr",src:D||'javascript:""',frameBorder:"0",style:{width:"100%",height:z}});F.contentAreaContainer=r.iframeContainer;o.get(r.editorContainer).style.display=F.orgDisplay;o.get(F.id).style.display="none";if(!b||!n.relaxedDomain){F.setupIframe()}B=v=r=null},setupIframe:function(){var z=this,A=z.settings,u=o.get(z.id),v=z.getDoc(),r,x;if(!b||!n.relaxedDomain){v.open();v.write(z.iframeHTML);v.close()}if(!b){try{if(!A.readonly){v.designMode="On"}}catch(w){}}if(b){x=z.getBody();o.hide(x);if(!A.readonly){x.contentEditable=true}o.show(x)}z.dom=new n.DOM.DOMUtils(z.getDoc(),{keep_values:true,url_converter:z.convertURL,url_converter_scope:z,hex_colors:A.force_hex_style_colors,class_filter:A.class_filter,update_styles:1,fix_ie_paragraphs:1});z.serializer=new n.dom.Serializer({entity_encoding:A.entity_encoding,entities:A.entities,valid_elements:A.verify_html===false?"*[*]":A.valid_elements,extended_valid_elements:A.extended_valid_elements,valid_child_elements:A.valid_child_elements,invalid_elements:A.invalid_elements,fix_table_elements:A.fix_table_elements,fix_list_elements:A.fix_list_elements,fix_content_duplication:A.fix_content_duplication,convert_fonts_to_spans:A.convert_fonts_to_spans,font_size_classes:A.font_size_classes,font_size_style_values:A.font_size_style_values,apply_source_formatting:A.apply_source_formatting,remove_linebreaks:A.remove_linebreaks,element_format:A.element_format,dom:z.dom});z.selection=new n.dom.Selection(z.dom,z.getWin(),z.serializer);z.forceBlocks=new n.ForceBlocks(z,{forced_root_block:A.forced_root_block});z.editorCommands=new n.EditorCommands(z);z.serializer.onPreProcess.add(function(s,t){return z.onPreProcess.dispatch(z,t,s)});z.serializer.onPostProcess.add(function(s,t){return z.onPostProcess.dispatch(z,t,s)});z.onPreInit.dispatch(z);if(!A.gecko_spellcheck){z.getBody().spellcheck=0}if(!A.readonly){z._addEvents()}z.controlManager.onPostRender.dispatch(z,z.controlManager);z.onPostRender.dispatch(z);if(A.directionality){z.getBody().dir=A.directionality}if(A.nowrap){z.getBody().style.whiteSpace="nowrap"}if(A.auto_resize){z.onNodeChange.add(z.resizeToContent,z)}if(A.custom_elements){function y(s,t){j(g(A.custom_elements),function(B){var C;if(B.indexOf("~")===0){B=B.substring(1);C="span"}else{C="div"}t.content=t.content.replace(new RegExp("<("+B+")([^>]*)>","g"),"<"+C+' mce_name="$1"$2>');t.content=t.content.replace(new RegExp("</("+B+")>","g"),"</"+C+">")})}z.onBeforeSetContent.add(y);z.onPostProcess.add(function(s,t){if(t.set){y(s,t)}})}if(A.handle_node_change_callback){z.onNodeChange.add(function(t,s,B){z.execCallback("handle_node_change_callback",z.id,B,-1,-1,true,z.selection.isCollapsed())})}if(A.save_callback){z.onSaveContent.add(function(s,B){var t=z.execCallback("save_callback",z.id,B.content,z.getBody());if(t){B.content=t}})}if(A.onchange_callback){z.onChange.add(function(t,s){z.execCallback("onchange_callback",z,s)})}if(A.convert_newlines_to_brs){z.onBeforeSetContent.add(function(s,t){if(t.initial){t.content=t.content.replace(/\r?\n/g,"<br />")}})}if(A.fix_nesting&&b){z.onBeforeSetContent.add(function(s,t){t.content=z._fixNesting(t.content)})}if(A.preformatted){z.onPostProcess.add(function(s,t){t.content=t.content.replace(/^\s*<pre.*?>/,"");t.content=t.content.replace(/<\/pre>\s*$/,"");if(t.set){t.content='<pre class="mceItemHidden">'+t.content+"</pre>"}})}if(A.verify_css_classes){z.serializer.attribValueFilter=function(D,B){var C,t;if(D=="class"){if(!z.classesRE){t=z.dom.getClasses();if(t.length>0){C="";j(t,function(s){C+=(C?"|":"")+s["class"]});z.classesRE=new RegExp("("+C+")","gi")}}return !z.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(B)||z.classesRE.test(B)?B:""}return B}}if(A.convert_fonts_to_spans){z._convertFonts()}if(A.inline_styles){z._convertInlineElements()}if(A.cleanup_callback){z.onBeforeSetContent.add(function(s,t){t.content=z.execCallback("cleanup_callback","insert_to_editor",t.content,t)});z.onPreProcess.add(function(s,t){if(t.set){z.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t)}if(t.get){z.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}});z.onPostProcess.add(function(s,t){if(t.set){t.content=z.execCallback("cleanup_callback","insert_to_editor",t.content,t)}if(t.get){t.content=z.execCallback("cleanup_callback","get_from_editor",t.content,t)}})}if(A.save_callback){z.onGetContent.add(function(s,t){if(t.save){t.content=z.execCallback("save_callback",z.id,t.content,z.getBody())}})}if(A.handle_event_callback){z.onEvent.add(function(s,t,B){if(z.execCallback("handle_event_callback",t,s,B)===false){k.cancel(t)}})}z.onSetContent.add(function(){z.addVisual(z.getBody())});if(A.padd_empty_editor){z.onPostProcess.add(function(s,t){t.content=t.content.replace(/^(<p[^>]*>( | |\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")})}if(a){function q(s,t){j(s.dom.select("a"),function(C){var B=C.parentNode;if(s.dom.isBlock(B)&&B.lastChild===C){s.dom.add(B,"br",{mce_bogus:1})}})}z.onExecCommand.add(function(s,t){if(t==="CreateLink"){q(s)}});z.onSetContent.add(z.selection.onSetContent.add(q));if(!A.readonly){try{v.designMode="Off";v.designMode="On"}catch(w){}}}setTimeout(function(){if(z.removed){return}z.load({initial:true,format:(A.cleanup_on_startup?"html":"raw")});z.startContent=z.getContent({format:"raw"});z.undoManager.add({initial:true});z.initialized=true;z.onInit.dispatch(z);z.execCallback("setupcontent_callback",z.id,z.getBody(),z.getDoc());z.execCallback("init_instance_callback",z);z.focus(true);z.nodeChanged({initial:1});if(A.content_css){n.each(g(A.content_css),function(s){z.dom.loadCSS(z.documentBaseURI.toAbsolute(s))})}if(A.auto_focus){setTimeout(function(){var s=i.get(A.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getWin().focus()},100)}},1);u=null},focus:function(r){var u,q=this,s=q.settings.content_editable;if(!r){if(!s&&(!b||q.selection.getNode().ownerDocument!=q.getDoc())){q.getWin().focus()}}if(i.activeEditor!=q){if((u=i.activeEditor)!=null){u.onDeactivate.dispatch(u,q)}q.onActivate.dispatch(q,u)}i._setActive(q)},execCallback:function(v){var q=this,u=q.settings[v],r;if(!u){return}if(q.callbackLookup&&(r=q.callbackLookup[v])){u=r.func;r=r.scope}if(d(u,"string")){r=u.replace(/\.\w+$/,"");r=r?n.resolve(r):0;u=n.resolve(u);q.callbackLookup=q.callbackLookup||{};q.callbackLookup[v]={func:u,scope:r}}return u.apply(r||q,Array.prototype.slice.call(arguments,1))},translate:function(q){var t=this.settings.language||"en",r=i.i18n;if(!q){return""}return r[t+"."+q]||q.replace(/{\#([^}]+)\}/g,function(u,s){return r[t+"."+s]||"{#"+s+"}"})},getLang:function(r,q){return i.i18n[(this.settings.language||"en")+"."+r]||(d(q)?q:"{#"+r+"}")},getParam:function(w,s,q){var t=n.trim,r=d(this.settings[w])?this.settings[w]:s,u;if(q==="hash"){u={};if(d(r,"string")){j(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(x){x=x.split("=");if(x.length>1){u[t(x[0])]=t(x[1])}else{u[t(x[0])]=t(x)}})}else{u=r}return u}return r},nodeChanged:function(u){var q=this,r=q.selection,v=r.getNode()||q.getBody();if(q.initialized){q.onNodeChange.dispatch(q,u?u.controlManager||q.controlManager:q.controlManager,b&&v.ownerDocument!=q.getDoc()?q.getBody():v,r.isCollapsed(),u)}},addButton:function(u,r){var q=this;q.buttons=q.buttons||{};q.buttons[u]=r},addCommand:function(t,r,q){this.execCommands[t]={func:r,scope:q||this}},addQueryStateHandler:function(t,r,q){this.queryStateCommands[t]={func:r,scope:q||this}},addQueryValueHandler:function(t,r,q){this.queryValueCommands[t]={func:r,scope:q||this}},addShortcut:function(s,v,q,u){var r=this,w;if(!r.settings.custom_shortcuts){return false}r.shortcuts=r.shortcuts||{};if(d(q,"string")){w=q;q=function(){r.execCommand(w,false,null)}}if(d(q,"object")){w=q;q=function(){r.execCommand(w[0],w[1],w[2])}}j(g(s),function(t){var x={func:q,scope:u||this,desc:v,alt:false,ctrl:false,shift:false};j(g(t,"+"),function(y){switch(y){case"alt":case"ctrl":case"shift":x[y]=true;break;default:x.charCode=y.charCodeAt(0);x.keyCode=y.toUpperCase().charCodeAt(0)}});r.shortcuts[(x.ctrl?"ctrl":"")+","+(x.alt?"alt":"")+","+(x.shift?"shift":"")+","+x.keyCode]=x});return true},execCommand:function(x,w,z,q){var u=this,v=0,y,r;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(x)&&(!q||!q.skip_focus)){u.focus()}y={};u.onBeforeExecCommand.dispatch(u,x,w,z,y);if(y.terminate){return false}if(u.execCallback("execcommand_callback",u.id,u.selection.getNode(),x,w,z)){u.onExecCommand.dispatch(u,x,w,z,q);return true}if(y=u.execCommands[x]){r=y.func.call(y.scope,w,z);if(r!==true){u.onExecCommand.dispatch(u,x,w,z,q);return r}}j(u.plugins,function(s){if(s.execCommand&&s.execCommand(x,w,z)){u.onExecCommand.dispatch(u,x,w,z,q);v=1;return false}});if(v){return true}if(u.theme&&u.theme.execCommand&&u.theme.execCommand(x,w,z)){u.onExecCommand.dispatch(u,x,w,z,q);return true}if(n.GlobalCommands.execCommand(u,x,w,z)){u.onExecCommand.dispatch(u,x,w,z,q);return true}if(u.editorCommands.execCommand(x,w,z)){u.onExecCommand.dispatch(u,x,w,z,q);return true}u.getDoc().execCommand(x,w,z);u.onExecCommand.dispatch(u,x,w,z,q)},queryCommandState:function(w){var r=this,v,u;if(r._isHidden()){return}if(v=r.queryStateCommands[w]){u=v.func.call(v.scope);if(u!==true){return u}}v=r.editorCommands.queryCommandState(w);if(v!==-1){return v}try{return this.getDoc().queryCommandState(w)}catch(q){}},queryCommandValue:function(w){var r=this,v,u;if(r._isHidden()){return}if(v=r.queryValueCommands[w]){u=v.func.call(v.scope);if(u!==true){return u}}v=r.editorCommands.queryCommandValue(w);if(d(v)){return v}try{return this.getDoc().queryCommandValue(w)}catch(q){}},show:function(){var q=this;o.show(q.getContainer());o.hide(q.id);q.load()},hide:function(){var q=this,r=q.getDoc();if(b&&r){r.execCommand("SelectAll")}q.save();o.hide(q.getContainer());o.setStyle(q.id,"display",q.orgDisplay)},isHidden:function(){return !o.isHidden(this.id)},setProgressState:function(q,r,s){this.onSetProgressState.dispatch(this,q,r,s);return q},resizeToContent:function(){var q=this;o.setStyle(q.id+"_ifr","height",q.getBody().scrollHeight)},load:function(u){var q=this,s=q.getElement(),r;if(s){u=u||{};u.load=true;r=q.setContent(d(s.value)?s.value:s.innerHTML,u);u.element=s;if(!u.no_events){q.onLoadContent.dispatch(q,u)}u.element=s=null;return r}},save:function(v){var q=this,u=q.getElement(),r,s;if(!u||!q.initialized){return}v=v||{};v.save=true;if(!v.no_events){q.undoManager.typing=0;q.undoManager.add()}v.element=u;r=v.content=q.getContent(v);if(!v.no_events){q.onSaveContent.dispatch(q,v)}r=v.content;if(!/TEXTAREA|INPUT/i.test(u.nodeName)){u.innerHTML=r;if(s=o.getParent(q.id,"form")){j(s.elements,function(t){if(t.name==q.id){t.value=r;return false}})}}else{u.value=r}v.element=u=null;return r},setContent:function(r,s){var q=this;s=s||{};s.format=s.format||"html";s.set=true;s.content=r;if(!s.no_events){q.onBeforeSetContent.dispatch(q,s)}if(!n.isIE&&(r.length===0||/^\s+$/.test(r))){s.content=q.dom.setHTML(q.getBody(),'<br mce_bogus="1" />');s.format="raw"}s.content=q.dom.setHTML(q.getBody(),n.trim(s.content));if(s.format!="raw"&&q.settings.cleanup){s.getInner=true;s.content=q.dom.setHTML(q.getBody(),q.serializer.serialize(q.getBody(),s))}if(!s.no_events){q.onSetContent.dispatch(q,s)}return s.content},getContent:function(s){var q=this,r;s=s||{};s.format=s.format||"html";s.get=true;if(!s.no_events){q.onBeforeGetContent.dispatch(q,s)}if(s.format!="raw"&&q.settings.cleanup){s.getInner=true;r=q.serializer.serialize(q.getBody(),s)}else{r=q.getBody().innerHTML}r=r.replace(/^\s*|\s*$/g,"");s.content=r;if(!s.no_events){q.onGetContent.dispatch(q,s)}return s.content},isDirty:function(){var q=this;return n.trim(q.startContent)!=n.trim(q.getContent({format:"raw",no_events:1}))&&!q.isNotDirty},getContainer:function(){var q=this;if(!q.container){q.container=o.get(q.editorContainer||q.id+"_parent")}return q.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return o.get(this.settings.content_element||this.id)},getWin:function(){var q=this,r;if(!q.contentWindow){r=o.get(q.id+"_ifr");if(r){q.contentWindow=r.contentWindow}}return q.contentWindow},getDoc:function(){var r=this,q;if(!r.contentDocument){q=r.getWin();if(q){r.contentDocument=q.document}}return r.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(q,x,w){var r=this,v=r.settings;if(v.urlconverter_callback){return r.execCallback("urlconverter_callback",q,w,true,x)}if(!v.convert_urls||(w&&w.nodeName=="LINK")||q.indexOf("file:")===0){return q}if(v.relative_urls){return r.documentBaseURI.toRelative(q)}q=r.documentBaseURI.toAbsolute(q,v.remove_script_host);return q},addVisual:function(u){var q=this,r=q.settings;u=u||q.getBody();if(!d(q.hasVisual)){q.hasVisual=r.visual}j(q.dom.select("table,a",u),function(t){var s;switch(t.nodeName){case"TABLE":s=q.dom.getAttrib(t,"border");if(!s||s=="0"){if(q.hasVisual){q.dom.addClass(t,r.visual_table_class)}else{q.dom.removeClass(t,r.visual_table_class)}}return;case"A":s=q.dom.getAttrib(t,"name");if(s){if(q.hasVisual){q.dom.addClass(t,"mceItemAnchor")}else{q.dom.removeClass(t,"mceItemAnchor")}}return}});q.onVisualAid.dispatch(q,u,q.hasVisual)},remove:function(){var q=this,r=q.getContainer();q.removed=1;q.hide();q.execCallback("remove_instance_callback",q);q.onRemove.dispatch(q);q.onExecCommand.listeners=[];i.remove(q);o.remove(r)},destroy:function(r){var q=this;if(q.destroyed){return}if(!r){n.removeUnload(q.destroy);tinyMCE.onBeforeUnload.remove(q._beforeUnload);if(q.theme&&q.theme.destroy){q.theme.destroy()}q.controlManager.destroy();q.selection.destroy();q.dom.destroy();if(!q.settings.content_editable){k.clear(q.getWin());k.clear(q.getDoc())}k.clear(q.getBody());k.clear(q.formElement)}if(q.formElement){q.formElement.submit=q.formElement._mceOldSubmit;q.formElement._mceOldSubmit=null}q.contentAreaContainer=q.formElement=q.container=q.settings.content_element=q.bodyElement=q.contentDocument=q.contentWindow=null;if(q.selection){q.selection=q.selection.win=q.selection.dom=q.selection.dom.doc=null}q.destroyed=1},_addEvents:function(){var w=this,v,y=w.settings,x={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function u(t,A){var s=t.type;if(w.removed){return}if(w.onEvent.dispatch(w,t,A)!==false){w[x[t.fakeType||t.type]].dispatch(w,t,A)}}j(x,function(t,s){switch(s){case"contextmenu":if(n.isOpera){k.add(w.getBody(),"mousedown",function(A){if(A.ctrlKey){A.fakeType="contextmenu";u(A)}})}else{k.add(w.getBody(),s,u)}break;case"paste":k.add(w.getBody(),s,function(A){u(A)});break;case"submit":case"reset":k.add(w.getElement().form||o.getParent(w.id,"form"),s,u);break;default:k.add(y.content_editable?w.getBody():w.getDoc(),s,u)}});k.add(y.content_editable?w.getBody():(a?w.getDoc():w.getWin()),"focus",function(s){w.focus(true)});if(n.isGecko){k.add(w.getDoc(),"DOMNodeInserted",function(t){var s;t=t.target;if(t.nodeType===1&&t.nodeName==="IMG"&&(s=t.getAttribute("mce_src"))){t.src=w.documentBaseURI.toAbsolute(s)}})}if(a){function q(){var B=this,D=B.getDoc(),C=B.settings;if(a&&!C.readonly){if(B._isHidden()){try{if(!C.content_editable){D.designMode="On"}}catch(A){}}try{D.execCommand("styleWithCSS",0,false)}catch(A){if(!B._isHidden()){try{D.execCommand("useCSS",0,true)}catch(A){}}}if(!C.table_inline_editing){try{D.execCommand("enableInlineTableEditing",false,false)}catch(A){}}if(!C.object_resizing){try{D.execCommand("enableObjectResizing",false,false)}catch(A){}}}}w.onBeforeExecCommand.add(q);w.onMouseDown.add(q)}w.onMouseUp.add(w.nodeChanged);w.onClick.add(w.nodeChanged);w.onKeyUp.add(function(s,t){var A=t.keyCode;if((A>=33&&A<=36)||(A>=37&&A<=40)||A==13||A==45||A==46||A==8||(n.isMac&&(A==91||A==93))||t.ctrlKey){w.nodeChanged()}});w.onReset.add(function(){w.setContent(w.startContent,{format:"raw"})});if(y.custom_shortcuts){if(y.custom_undo_redo_keyboard_shortcuts){w.addShortcut("ctrl+z",w.getLang("undo_desc"),"Undo");w.addShortcut("ctrl+y",w.getLang("redo_desc"),"Redo")}if(a){w.addShortcut("ctrl+b",w.getLang("bold_desc"),"Bold");w.addShortcut("ctrl+i",w.getLang("italic_desc"),"Italic");w.addShortcut("ctrl+u",w.getLang("underline_desc"),"Underline")}for(v=1;v<=6;v++){w.addShortcut("ctrl+"+v,"",["FormatBlock",false,"<h"+v+">"])}w.addShortcut("ctrl+7","",["FormatBlock",false,"<p>"]);w.addShortcut("ctrl+8","",["FormatBlock",false,"<div>"]);w.addShortcut("ctrl+9","",["FormatBlock",false,"<address>"]);function z(t){var s=null;if(!t.altKey&&!t.ctrlKey&&!t.metaKey){return s}j(w.shortcuts,function(A){if(n.isMac&&A.ctrl!=t.metaKey){return}else{if(!n.isMac&&A.ctrl!=t.ctrlKey){return}}if(A.alt!=t.altKey){return}if(A.shift!=t.shiftKey){return}if(t.keyCode==A.keyCode||(t.charCode&&t.charCode==A.charCode)){s=A;return false}});return s}w.onKeyUp.add(function(s,t){var A=z(t);if(A){return k.cancel(t)}});w.onKeyPress.add(function(s,t){var A=z(t);if(A){return k.cancel(t)}});w.onKeyDown.add(function(s,t){var A=z(t);if(A){A.func.call(A.scope);return k.cancel(t)}})}if(n.isIE){k.add(w.getDoc(),"controlselect",function(A){var t=w.resizeInfo,s;A=A.target;if(A.nodeName!=="IMG"){return}if(t){k.remove(t.node,t.ev,t.cb)}if(!w.dom.hasClass(A,"mceItemNoResize")){ev="resizeend";s=k.add(A,ev,function(C){var B;C=C.target;if(B=w.dom.getStyle(C,"width")){w.dom.setAttrib(C,"width",B.replace(/[^0-9%]+/g,""));w.dom.setStyle(C,"width","")}if(B=w.dom.getStyle(C,"height")){w.dom.setAttrib(C,"height",B.replace(/[^0-9%]+/g,""));w.dom.setStyle(C,"height","")}})}else{ev="resizestart";s=k.add(A,"resizestart",k.cancel,k)}t=w.resizeInfo={node:A,ev:ev,cb:s}});w.onKeyDown.add(function(s,t){switch(t.keyCode){case 8:if(w.selection.getRng().item){w.selection.getRng().item(0).removeNode();return k.cancel(t)}}})}if(n.isOpera){w.onClick.add(function(s,t){k.prevent(t)})}if(y.custom_undo_redo){function r(){w.undoManager.typing=0;w.undoManager.add()}if(n.isIE){k.add(w.getWin(),"blur",function(s){var t;if(w.selection){t=w.selection.getNode();if(!w.removed&&t.ownerDocument&&t.ownerDocument!=w.getDoc()){r()}}})}else{k.add(w.getDoc(),"blur",function(){if(w.selection&&!w.removed){r()}})}w.onMouseDown.add(r);w.onKeyUp.add(function(s,t){if((t.keyCode>=33&&t.keyCode<=36)||(t.keyCode>=37&&t.keyCode<=40)||t.keyCode==13||t.keyCode==45||t.ctrlKey){w.undoManager.typing=0;w.undoManager.add()}});w.onKeyDown.add(function(s,t){if((t.keyCode>=33&&t.keyCode<=36)||(t.keyCode>=37&&t.keyCode<=40)||t.keyCode==13||t.keyCode==45){if(w.undoManager.typing){w.undoManager.add();w.undoManager.typing=0}return}if(!w.undoManager.typing){w.undoManager.add();w.undoManager.typing=1}})}},_convertInlineElements:function(){var z=this,B=z.settings,r=z.dom,y,w,u,A,q;function x(s,t){if(!B.inline_styles){return}if(t.get){j(z.dom.select("table,u,strike",t.node),function(v){switch(v.nodeName){case"TABLE":if(y=r.getAttrib(v,"height")){r.setStyle(v,"height",y);r.setAttrib(v,"height","")}break;case"U":case"STRIKE":v.style.textDecoration=v.nodeName=="U"?"underline":"line-through";r.setAttrib(v,"mce_style","");r.setAttrib(v,"mce_name","span");break}})}else{if(t.set){j(z.dom.select("table,span",t.node).reverse(),function(v){if(v.nodeName=="TABLE"){if(y=r.getStyle(v,"height")){r.setAttrib(v,"height",y.replace(/[^0-9%]+/g,""))}}else{if(v.style.textDecoration=="underline"){u="u"}else{if(v.style.textDecoration=="line-through"){u="strike"}else{u=""}}if(u){v.style.textDecoration="";r.setAttrib(v,"mce_style","");w=r.create(u,{style:r.getAttrib(v,"style")});r.replace(w,v,1)}}})}}}z.onPreProcess.add(x);if(!B.cleanup_on_startup){z.onSetContent.add(function(s,t){if(t.initial){x(z,{node:z.getBody(),set:1})}})}},_convertFonts:function(){var w=this,x=w.settings,z=w.dom,v,r,q,u;if(!x.inline_styles){return}v=[8,10,12,14,18,24,36];r=["xx-small","x-small","small","medium","large","x-large","xx-large"];if(q=x.font_size_style_values){q=g(q)}if(u=x.font_size_classes){u=g(u)}function y(B){var C,A,t,s;if(!x.inline_styles){return}t=w.dom.select("font",B);for(s=t.length-1;s>=0;s--){C=t[s];A=z.create("span",{style:z.getAttrib(C,"style"),"class":z.getAttrib(C,"class")});z.setStyles(A,{fontFamily:z.getAttrib(C,"face"),color:z.getAttrib(C,"color"),backgroundColor:C.style.backgroundColor});if(C.size){if(q){z.setStyle(A,"fontSize",q[parseInt(C.size)-1])}else{z.setAttrib(A,"class",u[parseInt(C.size)-1])}}z.setAttrib(A,"mce_style","");z.replace(A,C,1)}}w.onPreProcess.add(function(s,t){if(t.get){y(t.node)}});w.onSetContent.add(function(s,t){if(t.initial){y(t.node)}})},_isHidden:function(){var q;if(!a){return 0}q=this.selection.getSel();return(!q||!q.rangeCount||q.rangeCount==0)},_fixNesting:function(r){var t=[],q;r=r.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(u,s,w){var v;if(s==="/"){if(!t.length){return""}if(w!==t[t.length-1].tag){for(q=t.length-1;q>=0;q--){if(t[q].tag===w){t[q].close=1;break}}return""}else{t.pop();if(t.length&&t[t.length-1].close){u=u+"</"+t[t.length-1].tag+">";t.pop()}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(w)){return u}if(/\/>$/.test(u)){return u}t.push({tag:w})}return u});for(q=t.length-1;q>=0;q--){r+="</"+t[q].tag+">"}return r}})})(tinymce);(function(d){var f=d.each,c=d.isIE,a=d.isGecko,b=d.isOpera,e=d.isWebKit;d.create("tinymce.EditorCommands",{EditorCommands:function(g){this.editor=g},execCommand:function(k,j,l){var h=this,g=h.editor,i;switch(k){case"mceResetDesignMode":case"mceBeginUndoLevel":return true;case"unlink":h.UnLink();return true;case"JustifyLeft":case"JustifyCenter":case"JustifyRight":case"JustifyFull":h.mceJustify(k,k.substring(7).toLowerCase());return true;default:i=this[k];if(i){i.call(this,j,l);return true}}return false},Indent:function(){var g=this.editor,l=g.dom,j=g.selection,k,h,i;h=g.settings.indentation;i=/[a-z%]+$/i.exec(h);h=parseInt(h);if(g.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){f(j.getSelectedBlocks(),function(m){l.setStyle(m,"paddingLeft",(parseInt(m.style.paddingLeft||0)+h)+i)});return}g.getDoc().execCommand("Indent",false,null);if(c){l.getParent(j.getNode(),function(m){if(m.nodeName=="BLOCKQUOTE"){m.dir=m.style.cssText=""}})}},Outdent:function(){var h=this.editor,m=h.dom,k=h.selection,l,g,i,j;i=h.settings.indentation;j=/[a-z%]+$/i.exec(i);i=parseInt(i);if(h.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){f(k.getSelectedBlocks(),function(n){g=Math.max(0,parseInt(n.style.paddingLeft||0)-i);m.setStyle(n,"paddingLeft",g?g+j:"")});return}h.getDoc().execCommand("Outdent",false,null)},mceSetContent:function(h,g){this.editor.setContent(g)},mceToggleVisualAid:function(){var g=this.editor;g.hasVisual=!g.hasVisual;g.addVisual()},mceReplaceContent:function(h,g){var i=this.editor.selection;i.setContent(g.replace(/\{\$selection\}/g,i.getContent({format:"text"})))},mceInsertLink:function(i,h){var g=this.editor,j=g.selection,k=g.dom.getParent(j.getNode(),"a");if(d.is(h,"string")){h={href:h}}function l(m){f(h,function(o,n){g.dom.setAttrib(m,n,o)})}if(!k){g.execCommand("CreateLink",false,"javascript:mctmp(0);");f(g.dom.select("a[href=javascript:mctmp(0);]"),function(m){l(m)})}else{if(h.href){l(k)}else{g.dom.remove(k,1)}}},UnLink:function(){var g=this.editor,h=g.selection;if(h.isCollapsed()){h.select(h.getNode())}g.getDoc().execCommand("unlink",false,null);h.collapse(0)},FontName:function(i,h){var j=this,g=j.editor,k=g.selection,l;if(!h){if(k.isCollapsed()){k.select(k.getNode())}}else{if(g.settings.convert_fonts_to_spans){j._applyInlineStyle("span",{style:{fontFamily:h}})}else{g.getDoc().execCommand("FontName",false,h)}}},FontSize:function(j,i){var h=this.editor,l=h.settings,k,g;if(l.convert_fonts_to_spans&&i>=1&&i<=7){g=d.explode(l.font_size_style_values);k=d.explode(l.font_size_classes);if(k){i=k[i-1]||i}else{i=g[i-1]||i}}if(i>=1&&i<=7){h.getDoc().execCommand("FontSize",false,i)}else{this._applyInlineStyle("span",{style:{fontSize:i}})}},queryCommandValue:function(h){var g=this["queryValue"+h];if(g){return g.call(this,h)}return false},queryCommandState:function(h){var g;switch(h){case"JustifyLeft":case"JustifyCenter":case"JustifyRight":case"JustifyFull":return this.queryStateJustify(h,h.substring(7).toLowerCase());default:if(g=this["queryState"+h]){return g.call(this,h)}}return -1},_queryState:function(h){try{return this.editor.getDoc().queryCommandState(h)}catch(g){}},_queryVal:function(h){try{return this.editor.getDoc().queryCommandValue(h)}catch(g){}},queryValueFontSize:function(){var h=this.editor,g=0,i;if(i=h.dom.getParent(h.selection.getNode(),"span")){g=i.style.fontSize}if(!g&&(b||e)){if(i=h.dom.getParent(h.selection.getNode(),"font")){g=i.size}return g}return g||this._queryVal("FontSize")},queryValueFontName:function(){var h=this.editor,g=0,i;if(i=h.dom.getParent(h.selection.getNode(),"font")){g=i.face}if(i=h.dom.getParent(h.selection.getNode(),"span")){g=i.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}if(!g){g=this._queryVal("FontName")}return g},mceJustify:function(o,p){var k=this.editor,m=k.selection,g=m.getNode(),q=g.nodeName,h,j,i=k.dom,l;if(k.settings.inline_styles&&this.queryStateJustify(o,p)){l=1}h=i.getParent(g,k.dom.isBlock);if(q=="IMG"){if(p=="full"){return}if(l){if(p=="center"){i.setStyle(h||g.parentNode,"textAlign","")}i.setStyle(g,"float","");this.mceRepaint();return}if(p=="center"){if(h&&/^(TD|TH)$/.test(h.nodeName)){h=0}if(!h||h.childNodes.length>1){j=i.create("p");j.appendChild(g.cloneNode(false));if(h){i.insertAfter(j,h)}else{i.insertAfter(j,g)}i.remove(g);g=j.firstChild;h=j}i.setStyle(h,"textAlign",p);i.setStyle(g,"float","")}else{i.setStyle(g,"float",p);i.setStyle(h||g.parentNode,"textAlign","")}this.mceRepaint();return}if(k.settings.inline_styles&&k.settings.forced_root_block){if(l){p=""}f(m.getSelectedBlocks(i.getParent(m.getStart(),i.isBlock),i.getParent(m.getEnd(),i.isBlock)),function(n){i.setAttrib(n,"align","");i.setStyle(n,"textAlign",p=="full"?"justify":p)});return}else{if(!l){k.getDoc().execCommand(o,false,null)}}if(k.settings.inline_styles){if(l){i.getParent(k.selection.getNode(),function(r){if(r.style&&r.style.textAlign){i.setStyle(r,"textAlign","")}});return}f(i.select("*"),function(s){var r=s.align;if(r){if(r=="full"){r="justify"}i.setStyle(s,"textAlign",r);i.setAttrib(s,"align","")}})}},mceSetCSSClass:function(h,g){this.mceSetStyleInfo(0,{command:"setattrib",name:"class",value:g})},getSelectedElement:function(){var w=this,o=w.editor,n=o.dom,s=o.selection,h=s.getRng(),l,k,u,p,j,g,q,i,x,v;if(s.isCollapsed()||h.item){return s.getNode()}v=o.settings.merge_styles_invalid_parents;if(d.is(v,"string")){v=new RegExp(v,"i")}if(c){l=h.duplicate();l.collapse(true);u=l.parentElement();k=h.duplicate();k.collapse(false);p=k.parentElement();if(u!=p){l.move("character",1);u=l.parentElement()}if(u==p){l=h.duplicate();l.moveToElementText(u);if(l.compareEndPoints("StartToStart",h)==0&&l.compareEndPoints("EndToEnd",h)==0){return v&&v.test(u.nodeName)?null:u}}}else{function m(r){return n.getParent(r,"*")}u=h.startContainer;p=h.endContainer;j=h.startOffset;g=h.endOffset;if(!h.collapsed){if(u==p){if(j-g<2){if(u.hasChildNodes()){i=u.childNodes[j];return v&&v.test(i.nodeName)?null:i}}}}if(u.nodeType!=3||p.nodeType!=3){return null}if(j==0){i=m(u);if(i&&i.firstChild!=u){i=null}}if(j==u.nodeValue.length){q=u.nextSibling;if(q&&q.nodeType==1){i=u.nextSibling}}if(g==0){q=p.previousSibling;if(q&&q.nodeType==1){x=q}}if(g==p.nodeValue.length){x=m(p);if(x&&x.lastChild!=p){x=null}}if(i==x){return v&&i&&v.test(i.nodeName)?null:i}}return null},mceSetStyleInfo:function(n,m){var q=this,h=q.editor,j=h.getDoc(),g=h.dom,i,k,r=h.selection,p=m.wrapper||"span",k=r.getBookmark(),o;function l(t,s){if(t.nodeType==1){switch(m.command){case"setattrib":return g.setAttrib(t,m.name,m.value);case"setstyle":return g.setStyle(t,m.name,m.value);case"removeformat":return g.setAttrib(t,"class","")}}}o=h.settings.merge_styles_invalid_parents;if(d.is(o,"string")){o=new RegExp(o,"i")}if((i=q.getSelectedElement())&&!h.settings.force_span_wrappers){l(i,1)}else{j.execCommand("FontName",false,"__");f(g.select("span,font"),function(u){var s,t;if(g.getAttrib(u,"face")=="__"||u.style.fontFamily==="__"){s=g.create(p,{mce_new:"1"});l(s);f(u.childNodes,function(v){s.appendChild(v.cloneNode(true))});g.replace(s,u)}})}f(g.select(p).reverse(),function(t){var s=t.parentNode;if(!g.getAttrib(t,"mce_new")){s=g.getParent(t,"*[mce_new]");if(s){g.remove(t,1)}}});f(g.select(p).reverse(),function(t){var s=t.parentNode;if(!s||!g.getAttrib(t,"mce_new")){return}if(h.settings.force_span_wrappers&&s.nodeName!="SPAN"){return}if(s.nodeName==p.toUpperCase()&&s.childNodes.length==1){return g.remove(s,1)}if(t.nodeType==1&&(!o||!o.test(s.nodeName))&&s.childNodes.length==1){l(s);g.setAttrib(t,"class","")}});f(g.select(p).reverse(),function(s){if(g.getAttrib(s,"mce_new")||(g.getAttribs(s).length<=1&&s.className==="")){if(!g.getAttrib(s,"class")&&!g.getAttrib(s,"style")){return g.remove(s,1)}g.setAttrib(s,"mce_new","")}});r.moveToBookmark(k)},queryStateJustify:function(k,h){var g=this.editor,j=g.selection.getNode(),i=g.dom;if(j&&j.nodeName=="IMG"){if(i.getStyle(j,"float")==h){return 1}return j.parentNode.style.textAlign==h}j=i.getParent(g.selection.getStart(),function(l){return l.nodeType==1&&l.style.textAlign});if(h=="full"){h="justify"}if(g.settings.inline_styles){return(j&&j.style.textAlign==h)}return this._queryState(k)},ForeColor:function(i,h){var g=this.editor;if(g.settings.convert_fonts_to_spans){this._applyInlineStyle("span",{style:{color:h}});return}else{g.getDoc().execCommand("ForeColor",false,h)}},HiliteColor:function(i,k){var h=this,g=h.editor,j=g.getDoc();if(g.settings.convert_fonts_to_spans){this._applyInlineStyle("span",{style:{backgroundColor:k}});return}function l(n){if(!a){return}try{j.execCommand("styleWithCSS",0,n)}catch(m){j.execCommand("useCSS",0,!n)}}if(a||b){l(true);j.execCommand("hilitecolor",false,k);l(false)}else{j.execCommand("BackColor",false,k)}},FormatBlock:function(n,h){var o=this,l=o.editor,p=l.selection,j=l.dom,g,k,m;function i(q){return/^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test(q.nodeName)}g=j.getParent(p.getNode(),function(q){return i(q)});if(g){if((c&&i(g.parentNode))||g.nodeName=="DIV"){k=l.dom.create(h);f(j.getAttribs(g),function(q){j.setAttrib(k,q.nodeName,j.getAttrib(g,q.nodeName))});m=p.getBookmark();j.replace(k,g,1);p.moveToBookmark(m);l.nodeChanged();return}}h=l.settings.forced_root_block?(h||"<p>"):h;if(h.indexOf("<")==-1){h="<"+h+">"}if(d.isGecko){h=h.replace(/<(div|blockquote|code|dt|dd|dl|samp)>/gi,"$1")}l.getDoc().execCommand("FormatBlock",false,h)},mceCleanup:function(){var h=this.editor,i=h.selection,g=i.getBookmark();h.setContent(h.getContent());i.moveToBookmark(g)},mceRemoveNode:function(j,k){var h=this.editor,i=h.selection,g,l=k||i.getNode();if(l==h.getBody()){return}g=i.getBookmark();h.dom.remove(l,1);i.moveToBookmark(g);h.nodeChanged()},mceSelectNodeDepth:function(i,j){var g=this.editor,h=g.selection,k=0;g.dom.getParent(h.getNode(),function(l){if(l.nodeType==1&&k++==j){h.select(l);g.nodeChanged();return false}},g.getBody())},mceSelectNode:function(h,g){this.editor.selection.select(g)},mceInsertContent:function(g,h){this.editor.selection.setContent(h)},mceInsertRawHTML:function(h,i){var g=this.editor;g.selection.setContent("tiny_mce_marker");g.setContent(g.getContent().replace(/tiny_mce_marker/g,i))},mceRepaint:function(){var i,g,j=this.editor;if(d.isGecko){try{i=j.selection;g=i.getBookmark(true);if(i.getSel()){i.getSel().selectAllChildren(j.getBody())}i.collapse(true);i.moveToBookmark(g)}catch(h){}}},queryStateUnderline:function(){var g=this.editor,h=g.selection.getNode();if(h&&h.nodeName=="A"){return false}return this._queryState("Underline")},queryStateOutdent:function(){var g=this.editor,h;if(g.settings.inline_styles){if((h=g.dom.getParent(g.selection.getStart(),g.dom.isBlock))&&parseInt(h.style.paddingLeft)>0){return true}if((h=g.dom.getParent(g.selection.getEnd(),g.dom.isBlock))&&parseInt(h.style.paddingLeft)>0){return true}}return this.queryStateInsertUnorderedList()||this.queryStateInsertOrderedList()||(!g.settings.inline_styles&&!!g.dom.getParent(g.selection.getNode(),"BLOCKQUOTE"))},queryStateInsertUnorderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),"UL")},queryStateInsertOrderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),"OL")},queryStatemceBlockQuote:function(){return !!this.editor.dom.getParent(this.editor.selection.getStart(),function(g){return g.nodeName==="BLOCKQUOTE"})},_applyInlineStyle:function(o,j,m){var q=this,n=q.editor,l=n.dom,i,p={},k,r;o=o.toUpperCase();if(m&&m.check_classes&&j["class"]){m.check_classes.push(j["class"])}function h(){f(l.select(o).reverse(),function(t){var s=0;f(l.getAttribs(t),function(u){if(u.nodeName.substring(0,1)!="_"&&l.getAttrib(t,u.nodeName)!=""){s++}});if(s==0){l.remove(t,1)}})}function g(){var s;f(l.select("span,font"),function(t){if(t.style.fontFamily=="mceinline"||t.face=="mceinline"){if(!s){s=n.selection.getBookmark()}j._mce_new="1";l.replace(l.create(o,j),t,1)}});f(l.select(o+"[_mce_new]"),function(u){function t(v){if(v.nodeType==1){f(j.style,function(x,w){l.setStyle(v,w,"")});if(j["class"]&&v.className&&m){f(m.check_classes,function(w){if(l.hasClass(v,w)){l.removeClass(v,w)}})}}}f(l.select(o,u),t);if(u.parentNode&&u.parentNode.nodeType==1&&u.parentNode.childNodes.length==1){t(u.parentNode)}l.getParent(u.parentNode,function(v){if(v.nodeType==1){if(j.style){f(j.style,function(y,x){var w;if(!p[x]&&(w=l.getStyle(v,x))){if(w===y){l.setStyle(u,x,"")}p[x]=1}})}if(j["class"]&&v.className&&m){f(m.check_classes,function(w){if(l.hasClass(v,w)){l.removeClass(u,w)}})}}return false});u.removeAttribute("_mce_new")});h();n.selection.moveToBookmark(s);return !!s}n.focus();n.getDoc().execCommand("FontName",false,"mceinline");g();if(k=q._applyInlineStyle.keyhandler){n.onKeyUp.remove(k);n.onKeyPress.remove(k);n.onKeyDown.remove(k);n.onSetContent.remove(q._applyInlineStyle.chandler)}if(n.selection.isCollapsed()){if(!c){f(l.getParents(n.selection.getNode(),"span"),function(s){f(j.style,function(u,t){var w;if(w=l.getStyle(s,t)){if(w==u){l.setStyle(s,t,"");r=2;return false}r=1;return false}});if(r){return false}});if(r==2){i=n.selection.getBookmark();h();n.selection.moveToBookmark(i);window.setTimeout(function(){n.nodeChanged()},1);return}}q._pendingStyles=d.extend(q._pendingStyles||{},j.style);q._applyInlineStyle.chandler=n.onSetContent.add(function(){delete q._pendingStyles});q._applyInlineStyle.keyhandler=k=function(s){if(q._pendingStyles){j.style=q._pendingStyles;delete q._pendingStyles}if(g()){n.onKeyDown.remove(q._applyInlineStyle.keyhandler);n.onKeyPress.remove(q._applyInlineStyle.keyhandler)}if(s.type=="keyup"){n.onKeyUp.remove(q._applyInlineStyle.keyhandler)}};n.onKeyDown.add(k);n.onKeyPress.add(k);n.onKeyUp.add(k)}else{q._pendingStyles=0}}})})(tinymce);(function(a){a.create("tinymce.UndoManager",{index:0,data:null,typing:0,UndoManager:function(c){var d=this,b=a.util.Dispatcher;d.editor=c;d.data=[];d.onAdd=new b(this);d.onUndo=new b(this);d.onRedo=new b(this)},add:function(d){var g=this,f,e=g.editor,c,h=e.settings,j;d=d||{};d.content=d.content||e.getContent({format:"raw",no_events:1});d.content=d.content.replace(/^\s*|\s*$/g,"");j=g.data[g.index>0&&(g.index==0||g.index==g.data.length)?g.index-1:g.index];if(!d.initial&&j&&d.content==j.content){return null}if(h.custom_undo_redo_levels){if(g.data.length>h.custom_undo_redo_levels){for(f=0;f<g.data.length-1;f++){g.data[f]=g.data[f+1]}g.data.length--;g.index=g.data.length}}if(h.custom_undo_redo_restore_selection&&!d.initial){d.bookmark=c=d.bookmark||e.selection.getBookmark()}if(g.index<g.data.length){g.index++}if(g.data.length===0&&!d.initial){return null}g.data.length=g.index+1;g.data[g.index++]=d;if(d.initial){g.index=0}if(g.data.length==2&&g.data[0].initial){g.data[0].bookmark=c}g.onAdd.dispatch(g,d);e.isNotDirty=0;return d},undo:function(){var e=this,c=e.editor,b=b,d;if(e.typing){e.add();e.typing=0}if(e.index>0){if(e.index==e.data.length&&e.index>1){d=e.index;e.typing=0;if(!e.add()){e.index=d}--e.index}b=e.data[--e.index];c.setContent(b.content,{format:"raw"});c.selection.moveToBookmark(b.bookmark);e.onUndo.dispatch(e,b)}return b},redo:function(){var d=this,c=d.editor,b=null;if(d.index<d.data.length-1){b=d.data[++d.index];c.setContent(b.content,{format:"raw"});c.selection.moveToBookmark(b.bookmark);d.onRedo.dispatch(d,b)}return b},clear:function(){var b=this;b.data=[];b.index=0;b.typing=0;b.add({initial:true})},hasUndo:function(){return this.index!=0||this.typing},hasRedo:function(){return this.index<this.data.length-1}})})(tinymce);(function(e){var b,d,a,c,f,h;b=e.dom.Event;d=e.isIE;a=e.isGecko;c=e.isOpera;f=e.each;h=e.extend;function g(i){i=i.innerHTML;i=i.replace(/<\w+ .*?mce_\w+\"?=.*?>/gi,"-");i=i.replace(/<(img|hr|table|input|select|textarea)[ \>]/gi,"-");i=i.replace(/<[^>]+>/g,"");return i.replace(/[ \t\r\n]+/g,"")==""}e.create("tinymce.ForceBlocks",{ForceBlocks:function(j){var k=this,l=j.settings,m;k.editor=j;k.dom=j.dom;m=(l.forced_root_block||"p").toLowerCase();l.element=m.toUpperCase();j.onPreInit.add(k.setup,k);k.reOpera=new RegExp("(\\u00a0| | )</"+m+">","gi");k.rePadd=new RegExp("<p( )([^>]+)><\\/p>|<p( )([^>]+)\\/>|<p( )([^>]+)>\\s+<\\/p>|<p><\\/p>|<p\\/>|<p>\\s+<\\/p>".replace(/p/g,m),"gi");k.reNbsp2BR1=new RegExp("<p( )([^>]+)>[\\s\\u00a0]+<\\/p>|<p>[\\s\\u00a0]+<\\/p>".replace(/p/g,m),"gi");k.reNbsp2BR2=new RegExp("<%p()([^>]+)>( | )<\\/%p>|<%p>( | )<\\/%p>".replace(/%p/g,m),"gi");k.reBR2Nbsp=new RegExp("<p( )([^>]+)>\\s*<br \\/>\\s*<\\/p>|<p>\\s*<br \\/>\\s*<\\/p>".replace(/p/g,m),"gi");function i(n,p){if(c){p.content=p.content.replace(k.reOpera,"</"+m+">")}p.content=p.content.replace(k.rePadd,"<"+m+"$1$2$3$4$5$6>\u00a0</"+m+">");if(!d&&!c&&p.set){p.content=p.content.replace(k.reNbsp2BR1,"<"+m+"$1$2><br /></"+m+">");p.content=p.content.replace(k.reNbsp2BR2,"<"+m+"$1$2><br /></"+m+">")}else{p.content=p.content.replace(k.reBR2Nbsp,"<"+m+"$1$2>\u00a0</"+m+">")}}j.onBeforeSetContent.add(i);j.onPostProcess.add(i);if(l.forced_root_block){j.onInit.add(k.forceRoots,k);j.onSetContent.add(k.forceRoots,k);j.onBeforeGetContent.add(k.forceRoots,k)}},setup:function(){var j=this,i=j.editor,k=i.settings;if(k.forced_root_block){i.onKeyUp.add(j.forceRoots,j);i.onPreProcess.add(j.forceRoots,j)}if(k.force_br_newlines){if(d){i.onKeyPress.add(function(m,p){var q,o=m.selection;if(p.keyCode==13&&o.getNode().nodeName!="LI"){o.setContent('<br id="__" /> ',{format:"raw"});q=m.dom.get("__");q.removeAttribute("id");o.select(q);o.collapse();return b.cancel(p)}})}return}if(!d&&k.force_p_newlines){i.onKeyPress.add(function(m,n){if(n.keyCode==13&&!n.shiftKey){if(!j.insertPara(n)){b.cancel(n)}}});if(a){i.onKeyDown.add(function(m,n){if((n.keyCode==8||n.keyCode==46)&&!n.shiftKey){j.backspaceDelete(n,n.keyCode==8)}})}}function l(n,m){var o=i.dom.create(m);f(n.attributes,function(p){if(p.specified&&p.nodeValue){o.setAttribute(p.nodeName.toLowerCase(),p.nodeValue)}});f(n.childNodes,function(p){o.appendChild(p.cloneNode(true))});n.parentNode.replaceChild(o,n);return o}if(d){i.onPreProcess.add(function(m,n){f(m.dom.select("p,h1,h2,h3,h4,h5,h6,div",n.node),function(o){if(g(o)){o.innerHTML=""}})});if(k.element!="P"){i.onKeyPress.add(function(m,n){j.lastElm=m.selection.getNode().nodeName});i.onKeyUp.add(function(o,q){var s,p=o.selection,r=p.getNode(),m=o.getBody();if(m.childNodes.length===1&&r.nodeName=="P"){r=l(r,k.element);p.select(r);p.collapse();o.nodeChanged()}else{if(q.keyCode==13&&!q.shiftKey&&j.lastElm!="P"){s=o.dom.getParent(r,"p");if(s){l(s,k.element);o.nodeChanged()}}}})}}},find:function(o,k,l){var j=this.editor,i=j.getDoc().createTreeWalker(o,4,null,false),m=-1;while(o=i.nextNode()){m++;if(k==0&&o==l){return m}if(k==1&&m==l){return o}}return -1},forceRoots:function(p,D){var u=this,p=u.editor,H=p.getBody(),E=p.getDoc(),K=p.selection,v=K.getSel(),w=K.getRng(),I=-2,o,B,j,k,F=-16777215;var G,l,J,A,x,m=H.childNodes,z,y,q;for(z=m.length-1;z>=0;z--){G=m[z];if(G.nodeType==3||(!u.dom.isBlock(G)&&G.nodeType!=8)){if(!l){if(G.nodeType!=3||/[^\s]/g.test(G.nodeValue)){if(I==-2&&w){if(!d){if(w.startContainer.nodeType==1&&(y=w.startContainer.childNodes[w.startOffset])&&y.nodeType==1){q=y.getAttribute("id");y.setAttribute("id","__mce")}else{if(p.dom.getParent(w.startContainer,function(i){return i===H})){B=w.startOffset;j=w.endOffset;I=u.find(H,0,w.startContainer);o=u.find(H,0,w.endContainer)}}}else{k=E.body.createTextRange();k.moveToElementText(H);k.collapse(1);J=k.move("character",F)*-1;k=w.duplicate();k.collapse(1);A=k.move("character",F)*-1;k=w.duplicate();k.collapse(0);x=(k.move("character",F)*-1)-A;I=A-J;o=x}}l=p.dom.create(p.settings.forced_root_block);l.appendChild(G.cloneNode(1));G.parentNode.replaceChild(l,G)}}else{if(l.hasChildNodes()){l.insertBefore(G,l.firstChild)}else{l.appendChild(G)}}}else{l=null}}if(I!=-2){if(!d){l=H.getElementsByTagName(p.settings.element)[0];w=E.createRange();if(I!=-1){w.setStart(u.find(H,1,I),B)}else{w.setStart(l,0)}if(o!=-1){w.setEnd(u.find(H,1,o),j)}else{w.setEnd(l,0)}if(v){v.removeAllRanges();v.addRange(w)}}else{try{w=v.createRange();w.moveToElementText(H);w.collapse(1);w.moveStart("character",I);w.moveEnd("character",o);w.select()}catch(C){}}}else{if(!d&&(y=p.dom.get("__mce"))){if(q){y.setAttribute("id",q)}else{y.removeAttribute("id")}w=E.createRange();w.setStartBefore(y);w.setEndBefore(y);K.setRng(w)}}},getParentBlock:function(j){var i=this.dom;return i.getParent(j,i.isBlock)},insertPara:function(M){var A=this,o=A.editor,I=o.dom,N=o.getDoc(),R=o.settings,B=o.selection.getSel(),C=B.getRangeAt(0),Q=N.body;var F,G,D,K,J,l,j,m,q,i,x,P,k,p,E,H=I.getViewPort(o.getWin()),w,z,v;F=N.createRange();F.setStart(B.anchorNode,B.anchorOffset);F.collapse(true);G=N.createRange();G.setStart(B.focusNode,B.focusOffset);G.collapse(true);D=F.compareBoundaryPoints(F.START_TO_END,G)<0;K=D?B.anchorNode:B.focusNode;J=D?B.anchorOffset:B.focusOffset;l=D?B.focusNode:B.anchorNode;j=D?B.focusOffset:B.anchorOffset;if(K===l&&/^(TD|TH)$/.test(K.nodeName)){if(K.firstChild.nodeName=="BR"){I.remove(K.firstChild)}if(K.childNodes.length==0){o.dom.add(K,R.element,null,"<br />");P=o.dom.add(K,R.element,null,"<br />")}else{E=K.innerHTML;K.innerHTML="";o.dom.add(K,R.element,null,E);P=o.dom.add(K,R.element,null,"<br />")}C=N.createRange();C.selectNodeContents(P);C.collapse(1);o.selection.setRng(C);return false}if(K==Q&&l==Q&&Q.firstChild&&o.dom.isBlock(Q.firstChild)){K=l=K.firstChild;J=j=0;F=N.createRange();F.setStart(K,0);G=N.createRange();G.setStart(l,0)}K=K.nodeName=="HTML"?N.body:K;K=K.nodeName=="BODY"?K.firstChild:K;l=l.nodeName=="HTML"?N.body:l;l=l.nodeName=="BODY"?l.firstChild:l;m=A.getParentBlock(K);q=A.getParentBlock(l);i=m?m.nodeName:R.element;if(A.dom.getParent(m,"ol,ul,pre")){return true}if(m&&(m.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(I.getStyle(m,"position",1)))){i=R.element;m=null}if(q&&(q.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(I.getStyle(m,"position",1)))){i=R.element;q=null}if(/(TD|TABLE|TH|CAPTION)/.test(i)||(m&&i=="DIV"&&/left|right/gi.test(I.getStyle(m,"float",1)))){i=R.element;m=q=null}x=(m&&m.nodeName==i)?m.cloneNode(0):o.dom.create(i);P=(q&&q.nodeName==i)?q.cloneNode(0):o.dom.create(i);P.removeAttribute("id");if(/^(H[1-6])$/.test(i)&&K.nodeValue&&J==K.nodeValue.length){P=o.dom.create(R.element)}E=k=K;do{if(E==Q||E.nodeType==9||A.dom.isBlock(E)||/(TD|TABLE|TH|CAPTION)/.test(E.nodeName)){break}k=E}while((E=E.previousSibling?E.previousSibling:E.parentNode));E=p=l;do{if(E==Q||E.nodeType==9||A.dom.isBlock(E)||/(TD|TABLE|TH|CAPTION)/.test(E.nodeName)){break}p=E}while((E=E.nextSibling?E.nextSibling:E.parentNode));if(k.nodeName==i){F.setStart(k,0)}else{F.setStartBefore(k)}F.setEnd(K,J);x.appendChild(F.cloneContents()||N.createTextNode(""));try{G.setEndAfter(p)}catch(L){}G.setStart(l,j);P.appendChild(G.cloneContents()||N.createTextNode(""));C=N.createRange();if(!k.previousSibling&&k.parentNode.nodeName==i){C.setStartBefore(k.parentNode)}else{if(F.startContainer.nodeName==i&&F.startOffset==0){C.setStartBefore(F.startContainer)}else{C.setStart(F.startContainer,F.startOffset)}}if(!p.nextSibling&&p.parentNode.nodeName==i){C.setEndAfter(p.parentNode)}else{C.setEnd(G.endContainer,G.endOffset)}C.deleteContents();if(c){o.getWin().scrollTo(0,H.y)}if(x.firstChild&&x.firstChild.nodeName==i){x.innerHTML=x.firstChild.innerHTML}if(P.firstChild&&P.firstChild.nodeName==i){P.innerHTML=P.firstChild.innerHTML}if(g(x)){x.innerHTML="<br />"}function O(y,s){var r=[],T,S,t;y.innerHTML="";if(R.keep_styles){S=s;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(S.nodeName)){T=S.cloneNode(false);I.setAttrib(T,"id","");r.push(T)}}while(S=S.parentNode)}if(r.length>0){for(t=r.length-1,T=y;t>=0;t--){T=T.appendChild(r[t])}r[0].innerHTML=c?" ":"<br />";return r[0]}else{y.innerHTML=c?" ":"<br />"}}if(g(P)){v=O(P,l)}if(c&&parseFloat(opera.version())<9.5){C.insertNode(x);C.insertNode(P)}else{C.insertNode(P);C.insertNode(x)}P.normalize();x.normalize();function u(r){return N.createTreeWalker(r,NodeFilter.SHOW_TEXT,null,false).nextNode()||r}C=N.createRange();C.selectNodeContents(a?u(v||P):v||P);C.collapse(1);B.removeAllRanges();B.addRange(C);w=o.dom.getPos(P).y;z=P.clientHeight;if(w<H.y||w+z>H.y+H.h){o.getWin().scrollTo(0,w<H.y?w:w-H.h+25)}return false},backspaceDelete:function(l,u){var x=this,k=x.editor,p=k.getBody(),j,m=k.selection,i=m.getRng(),o=i.startContainer,j,q,s;if(o&&k.dom.isBlock(o)&&!/^(TD|TH)$/.test(o.nodeName)&&u){if(o.childNodes.length==0||(o.childNodes.length==1&&o.firstChild.nodeName=="BR")){j=o;while((j=j.previousSibling)&&!k.dom.isBlock(j)){}if(j){if(o!=p.firstChild){q=k.dom.doc.createTreeWalker(j,NodeFilter.SHOW_TEXT,null,false);while(s=q.nextNode()){j=s}i=k.getDoc().createRange();i.setStart(j,j.nodeValue?j.nodeValue.length:0);i.setEnd(j,j.nodeValue?j.nodeValue.length:0);m.setRng(i);k.dom.remove(o)}return b.cancel(l)}}}function v(n){var r;n=n.target;if(n&&n.parentNode&&n.nodeName=="BR"&&(j=x.getParentBlock(n))){r=n.previousSibling;b.remove(p,"DOMNodeInserted",v);if(r&&r.nodeType==3&&/\s+$/.test(r.nodeValue)){return}if(n.previousSibling||n.nextSibling){k.dom.remove(n)}}}b._add(p,"DOMNodeInserted",v);window.setTimeout(function(){b._remove(p,"DOMNodeInserted",v)},1)}})})(tinymce);(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(i){var h,g=this,f=g.editor;d(f.plugins,function(j){if(j.createControl){h=j.createControl(i,g);if(h){return false}}});switch(i){case"|":case"separator":return g.createSeparator()}if(!h&&f.buttons&&(h=f.buttons[i])){return g.createButton(i,h)}return g.add(h)},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)}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){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(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.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;if(g.settings.use_native_selects){k=new c.ui.NativeListBox(m,i)}else{f=l||h._cls.listbox||c.ui.ListBox;k=new f(m,i)}h.controls[m]=k;if(c.isWebKit){k.onPostRender.add(function(p,o){a.add(o,"mousedown",function(){g.bookmark=g.selection.getBookmark("simple")});a.add(o,"focus",function(){g.selection.moveToBookmark(g.bookmark);g.bookmark=null})})}if(k.hideMenu){g.onMouseDown.add(k.hideMenu,k)}return h.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.onMouseDown.add(k.hideMenu,k)}else{f=h._cls.button||c.ui.Button;k=new f(m,i)}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.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.onMouseDown.add(k.hideMenu,k);j.onRemove.add(function(){k.destroy()});if(c.isIE){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);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)}},_decode:function(f){return d.DOM.decode(f).replace(/\\n/g,"\n")}})}(tinymce));(function(a){a.CommandManager=function(){var c={},b={},d={};function e(i,h,g,f){if(typeof(h)=="string"){h=[h]}a.each(h,function(j){i[j.toLowerCase()]={func:g,scope:f}})}a.extend(this,{add:function(h,g,f){e(c,h,g,f)},addQueryStateHandler:function(h,g,f){e(b,h,g,f)},addQueryValueHandler:function(h,g,f){e(d,h,g,f)},execCommand:function(g,j,i,h,f){if(j=c[j.toLowerCase()]){if(j.func.call(g||j.scope,i,h,f)!==false){return true}}},queryCommandValue:function(){if(cmd=d[cmd.toLowerCase()]){return cmd.func.call(scope||cmd.scope,ui,value,args)}},queryCommandState:function(){if(cmd=b[cmd.toLowerCase()]){return cmd.func.call(scope||cmd.scope,ui,value,args)}}})};a.GlobalCommands=new a.CommandManager()})(tinymce);(function(b){function a(i,d,h,m){var j,g,e,l,f;function k(p,o){do{if(p.parentNode==o){return p}p=p.parentNode}while(p)}function c(o){m(o);b.walk(o,m,"childNodes")}j=i.findCommonAncestor(d,h);e=k(d,j)||d;l=k(h,j)||h;for(g=d;g&&g!=e;g=g.parentNode){for(f=g.nextSibling;f;f=f.nextSibling){c(f)}}if(e!=l){for(g=e.nextSibling;g&&g!=l;g=g.nextSibling){c(g)}}else{c(e)}for(g=h;g&&g!=l;g=g.parentNode){for(f=g.previousSibling;f;f=f.previousSibling){c(f)}}}b.GlobalCommands.add("RemoveFormat",function(){var m=this,l=m.dom,u=m.selection,d=u.getRng(1),e=[],h,f,j,q,g,o,c,i;function k(s){var r;l.getParent(s,function(v){if(l.is(v,m.getParam("removeformat_selector"))){r=v}return l.isBlock(v)},m.getBody());return r}function p(r){if(l.is(r,m.getParam("removeformat_selector"))){e.push(r)}}function t(r){p(r);b.walk(r,p,"childNodes")}h=u.getBookmark();q=d.startContainer;o=d.endContainer;g=d.startOffset;c=d.endOffset;q=q.nodeType==1?q.childNodes[Math.min(g,q.childNodes.length-1)]:q;o=o.nodeType==1?o.childNodes[Math.min(g==c?c:c-1,o.childNodes.length-1)]:o;if(q==o){f=k(q);if(q.nodeType==3){if(f&&f.nodeType==1){i=q.splitText(g);i.splitText(c-g);l.split(f,i);u.moveToBookmark(h)}return}t(l.split(f,q)||q)}else{f=k(q);j=k(o);if(f){if(q.nodeType==3){if(g==q.nodeValue.length){q.nodeValue+="\uFEFF"}q=q.splitText(g)}}if(j){if(o.nodeType==3){o.splitText(c)}}if(f&&f==j){l.replace(l.create("span",{id:"__end"},o.cloneNode(true)),o)}if(f){f=l.split(f,q)}else{f=q}if(i=l.get("__end")){o=i;j=k(o)}if(j){j=l.split(j,o)}else{j=o}a(l,f,j,p);if(q.nodeValue=="\uFEFF"){q.nodeValue=""}t(o);t(q)}b.each(e,function(r){l.remove(r,1)});l.remove("__end",1);u.moveToBookmark(h)})})(tinymce);(function(a){a.GlobalCommands.add("mceBlockQuote",function(){var j=this,o=j.selection,f=j.dom,l,k,e,d,p,c,m,h,b;function g(i){return f.getParent(i,function(q){return q.nodeName==="BLOCKQUOTE"})}l=f.getParent(o.getStart(),f.isBlock);k=f.getParent(o.getEnd(),f.isBlock);if(p=g(l)){if(l!=k||l.childNodes.length>1||(l.childNodes.length==1&&l.firstChild.nodeName!="BR")){d=o.getBookmark()}if(g(k)){m=p.cloneNode(false);while(e=k.nextSibling){m.appendChild(e.parentNode.removeChild(e))}}if(m){f.insertAfter(m,p)}b=o.getSelectedBlocks(l,k);for(h=b.length-1;h>=0;h--){f.insertAfter(b[h],p)}if(/^\s*$/.test(p.innerHTML)){f.remove(p,1)}if(m&&/^\s*$/.test(m.innerHTML)){f.remove(m,1)}if(!d){if(!a.isIE){c=j.getDoc().createRange();c.setStart(l,0);c.setEnd(l,0);o.setRng(c)}else{o.select(l);o.collapse(0);if(f.getParent(o.getStart(),f.isBlock)!=l){c=o.getRng();c.move("character",-1);c.select()}}}else{j.selection.moveToBookmark(d)}return}if(a.isIE&&!l&&!k){j.getDoc().execCommand("Indent");e=g(o.getNode());e.style.margin=e.dir="";return}if(!l||!k){return}if(l!=k||l.childNodes.length>1||(l.childNodes.length==1&&l.firstChild.nodeName!="BR")){d=o.getBookmark()}a.each(o.getSelectedBlocks(g(o.getStart()),g(o.getEnd())),function(i){if(i.nodeName=="BLOCKQUOTE"&&!p){p=i;return}if(!p){p=f.create("blockquote");i.parentNode.insertBefore(p,i)}if(i.nodeName=="BLOCKQUOTE"&&p){e=i.firstChild;while(e){p.appendChild(e.cloneNode(true));e=e.nextSibling}f.remove(i);return}p.appendChild(f.remove(i))});if(!d){if(!a.isIE){c=j.getDoc().createRange();c.setStart(l,0);c.setEnd(l,0);o.setRng(c)}else{o.select(l);o.collapse(1)}}else{o.moveToBookmark(d)}})})(tinymce);(function(a){a.each(["Cut","Copy","Paste"],function(b){a.GlobalCommands.add(b,function(){var c=this,e=c.getDoc();try{e.execCommand(b,false,null);if(!e.queryCommandSupported(b)){throw"Error"}}catch(d){c.windowManager.alert(c.getLang("clipboard_no_support"))}})})})(tinymce);(function(a){a.GlobalCommands.add("InsertHorizontalRule",function(){if(a.isOpera){return this.getDoc().execCommand("InsertHorizontalRule",false,"")}this.selection.setContent("<hr />")})})(tinymce);(function(){var a=tinymce.GlobalCommands;a.add(["mceEndUndoLevel","mceAddUndoLevel"],function(){this.undoManager.add()});a.add("Undo",function(){var b=this;if(b.settings.custom_undo_redo){b.undoManager.undo();b.nodeChanged();return true}return false});a.add("Redo",function(){var b=this;if(b.settings.custom_undo_redo){b.undoManager.redo();b.nodeChanged();return true}return false})})();
|
1 |
+
(function(b){var a=/^\s*|\s*$/g,c;b.tinymce=b.tinyMCE={majorVersion:"3",minorVersion:"3b2",releaseDate:"2010-02-04",_init:function(){var r=this,o=document,m=navigator,f=m.userAgent,l,e,k,j,h,q;r.isOpera=b.opera&&opera.buildNumber;r.isWebKit=/WebKit/.test(f);r.isIE=!r.isWebKit&&!r.isOpera&&(/MSIE/gi).test(f)&&(/Explorer/gi).test(m.appName);r.isIE6=r.isIE&&/MSIE [56]/.test(f);r.isGecko=!r.isWebKit&&/Gecko/.test(f);r.isMac=f.indexOf("Mac")!=-1;r.isAir=/adobeair/i.test(f);if(b.tinyMCEPreInit){r.suffix=tinyMCEPreInit.suffix;r.baseURL=tinyMCEPreInit.base;r.query=tinyMCEPreInit.query;return}r.suffix="";e=o.getElementsByTagName("base");for(l=0;l<e.length;l++){if(q=e[l].href){if(/^https?:\/\/[^\/]+$/.test(q)){q+="/"}j=q?q.match(/.*\//)[0]:""}}function g(d){if(d.src&&/tiny_mce(|_gzip|_jquery|_prototype)(_dev|_src)?.js/.test(d.src)){if(/_(src|dev)\.js/g.test(d.src)){r.suffix="_src"}if((h=d.src.indexOf("?"))!=-1){r.query=d.src.substring(h+1)}r.baseURL=d.src.substring(0,d.src.lastIndexOf("/"));if(j&&r.baseURL.indexOf("://")==-1&&r.baseURL.indexOf("/")!==0){r.baseURL=j+r.baseURL}return r.baseURL}return null}e=o.getElementsByTagName("script");for(l=0;l<e.length;l++){if(g(e[l])){return}}k=o.getElementsByTagName("head")[0];if(k){e=k.getElementsByTagName("script");for(l=0;l<e.length;l++){if(g(e[l])){return}}}return},is:function(e,d){if(!d){return e!==c}if(d=="array"&&(e.hasOwnProperty&&e instanceof Array)){return true}return typeof(e)==d},each:function(g,d,f){var h,e;if(!g){return 0}f=f||g;if(g.length!==c){for(h=0,e=g.length;h<e;h++){if(d.call(f,g[h],h,g)===false){return 0}}}else{for(h in g){if(g.hasOwnProperty(h)){if(d.call(f,g[h],h,g)===false){return 0}}}}return 1},map:function(d,e){var g=[];tinymce.each(d,function(f){g.push(e(f))});return g},grep:function(d,e){var g=[];tinymce.each(d,function(f){if(!e||e(f)){g.push(f)}});return g},inArray:function(e,f){var g,d;if(e){for(g=0,d=e.length;g<d;g++){if(e[g]===f){return g}}}return -1},extend:function(j,h){var g,f,d=arguments;for(g=1,f=d.length;g<f;g++){h=d[g];tinymce.each(h,function(e,i){if(e!==c){j[i]=e}})}return j},trim:function(d){return(d?""+d:"").replace(a,"")},create:function(l,d){var k=this,e,g,h,i,f,j=0;l=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(l);h=l[3].match(/(^|\.)(\w+)$/i)[2];g=k.createNS(l[3].replace(/\.\w+$/,""));if(g[h]){return}if(l[2]=="static"){g[h]=d;if(this.onCreate){this.onCreate(l[2],l[3],g[h])}return}if(!d[h]){d[h]=function(){};j=1}g[h]=d[h];k.extend(g[h].prototype,d);if(l[5]){e=k.resolve(l[5]).prototype;i=l[5].match(/\.(\w+)$/i)[1];f=g[h];if(j){g[h]=function(){return e[i].apply(this,arguments)}}else{g[h]=function(){this.parent=e[i];return f.apply(this,arguments)}}g[h].prototype[h]=g[h];k.each(e,function(m,o){g[h].prototype[o]=e[o]});k.each(d,function(m,o){if(e[o]){g[h].prototype[o]=function(){this.parent=e[o];return m.apply(this,arguments)}}else{if(o!=h){g[h].prototype[o]=m}}})}k.each(d["static"],function(m,o){g[h][o]=m});if(this.onCreate){this.onCreate(l[2],l[3],g[h].prototype)}},walk:function(g,e,h,d){d=d||this;if(g){if(h){g=g[h]}tinymce.each(g,function(j,f){if(e.call(d,j,f,h)===false){return false}tinymce.walk(j,e,h,d)})}},createNS:function(g,f){var e,d;f=f||window;g=g.split(".");for(e=0;e<g.length;e++){d=g[e];if(!f[d]){f[d]={}}f=f[d]}return f},resolve:function(g,f){var e,d;f=f||b;g=g.split(".");for(e=0,d=g.length;e<d;e++){f=f[g[e]];if(!f){break}}return f},addUnload:function(h,g){var e=this;h={func:h,scope:g||this};if(!e.unloads){function d(){var f=e.unloads,j,k;if(f){for(k in f){j=f[k];if(j&&j.func){j.func.call(j.scope,1)}}if(b.detachEvent){b.detachEvent("onbeforeunload",i);b.detachEvent("onunload",d)}else{if(b.removeEventListener){b.removeEventListener("unload",d,false)}}e.unloads=j=f=w=d=0;if(b.CollectGarbage){CollectGarbage()}}}function i(){var j=document;if(j.readyState=="interactive"){function f(){j.detachEvent("onstop",f);if(d){d()}j=0}if(j){j.attachEvent("onstop",f)}b.setTimeout(function(){if(j){j.detachEvent("onstop",f)}},0)}}if(b.attachEvent){b.attachEvent("onunload",d);b.attachEvent("onbeforeunload",i)}else{if(b.addEventListener){b.addEventListener("unload",d,false)}}e.unloads=[h]}else{e.unloads.push(h)}return h},removeUnload:function(g){var d=this.unloads,e=null;tinymce.each(d,function(h,f){if(h&&h.func==g){d.splice(f,1);e=g;return false}});return e},explode:function(e,f){return e?tinymce.map(e.split(f||","),tinymce.trim):e},_addVer:function(e){var d;if(!this.query){return e}d=(e.indexOf("?")==-1?"?":"&")+this.query;if(e.indexOf("#")==-1){return e+d}return e.replace("#",d+"#")}};tinymce._init()})(window);tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,Dispatcher:function(a){this.scope=a||this;this.listeners=[]},add:function(a,b){this.listeners.push({cb:a,scope:b||this.scope});return a},addToTop:function(a,b){this.listeners.unshift({cb:a,scope:b||this.scope});return a},remove:function(a){var b=this.listeners,c=null;tinymce.each(b,function(e,d){if(a==e.cb){c=a;b.splice(d,1);return false}});return c},dispatch:function(){var f,d=arguments,e,b=this.listeners,g;for(e=0;e<b.length;e++){g=b[e];f=g.cb.apply(g.scope,d);if(f===false){break}}return f}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,h,d,c;e=tinymce.trim(e);g=f.settings=g||{};if(/^(mailto|tel|news|javascript|about|data):/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)){e=(g.base_uri.protocol||"http")+"://mce_host"+f.toAbsPath(g.base_uri.path,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});if(c=g.base_uri){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 c=this,d;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:c});if((b.host!="mce_host"&&c.host!=b.host&&b.host)||c.port!=b.port||c.protocol!=b.protocol){return b.getURI()}d=c.toRelPath(c.path,b.path);if(b.query){d+="?"+b.query}if(b.anchor){d+="#"+b.anchor}return d},toAbsolute:function(b,c){var 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(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();tinymce.create("static tinymce.util.JSON",{serialize:function(e){var c,a,d=tinymce.util.JSON.serialize,b;if(e==null){return"null"}b=typeof e;if(b=="string"){a="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+e.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(g,f){c=a.indexOf(f);if(c+1){return"\\"+a.charAt(c+1)}g=f.charCodeAt().toString(16);return"\\u"+"0000".substring(g.length)+g})+'"'}if(b=="object"){if(e.hasOwnProperty&&e instanceof Array){for(c=0,a="[";c<e.length;c++){a+=(c>0?",":"")+d(e[c])}return a+"]"}a="{";for(c in e){a+=typeof e[c]!="function"?(a.length>1?',"':'"')+c+'":'+d(e[c]):""}return a+"}"}return""+e},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;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);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)}}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){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(m){var k=m.each,j=m.is,i=m.isWebKit,d=m.isIE,a=/^(H[1-6R]|P|DIV|ADDRESS|PRE|FORM|T(ABLE|BODY|HEAD|FOOT|H|R|D)|LI|OL|UL|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|MENU|ISINDEX|SAMP)$/,e=g("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),f=g("src,href,style,coords,shape"),c={"&":"&",'"':""","<":"<",">":">"},n=/[<>&\"]/g,b=/^([a-z0-9],?)+$/i,h=/<(\w+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)(\s*\/?)>/g,l=/(\w+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;function g(q){var p={},o;q=q.split(",");for(o=q.length;o>=0;o--){p[q[o]]=1}return p}m.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(u,q){var p=this,o;p.doc=u;p.win=window;p.files={};p.cssFlicker=false;p.counter=0;p.boxModel=!m.isIE||u.compatMode=="CSS1Compat";p.stdMode=u.documentMode===8;p.settings=q=m.extend({keep_values:false,hex_colors:1,process_html:1},q);if(m.isIE6){try{u.execCommand("BackgroundImageCache",false,true)}catch(r){p.cssFlicker=true}}if(q.valid_styles){p._styles={};k(q.valid_styles,function(t,s){p._styles[s]=m.explode(t)})}m.addUnload(p.destroy,p)},getRoot:function(){var o=this,p=o.settings;return(p&&o.get(p.root_element))||o.doc.body},getViewPort:function(p){var q,o;p=!p?this.win:p;q=p.document;o=this.boxModel?q.documentElement:q.body;return{x:p.pageXOffset||o.scrollLeft,y:p.pageYOffset||o.scrollTop,w:p.innerWidth||o.clientWidth,h:p.innerHeight||o.clientHeight}},getRect:function(s){var r,o=this,q;s=o.get(s);r=o.getPos(s);q=o.getSize(s);return{x:r.x,y:r.y,w:q.w,h:q.h}},getSize:function(r){var p=this,o,q;r=p.get(r);o=p.getStyle(r,"width");q=p.getStyle(r,"height");if(o.indexOf("px")===-1){o=0}if(q.indexOf("px")===-1){q=0}return{w:parseInt(o)||r.offsetWidth||r.clientWidth,h:parseInt(q)||r.offsetHeight||r.clientHeight}},getParent:function(q,p,o){return this.getParents(q,p,o,false)},getParents:function(z,v,s,y){var q=this,p,u=q.settings,x=[];z=q.get(z);y=y===undefined;if(u.strict_root){s=s||q.getRoot()}if(j(v,"string")){p=v;if(v==="*"){v=function(o){return o.nodeType==1}}else{v=function(o){return q.is(o,p)}}}while(z){if(z==s||!z.nodeType||z.nodeType===9){break}if(!v||v(z)){if(y){x.push(z)}else{return z}}z=z.parentNode}return y?x:null},get:function(o){var p;if(o&&this.doc&&typeof(o)=="string"){p=o;o=this.doc.getElementById(o);if(o&&o.id!==p){return this.doc.getElementsByName(p)[1]}}return o},getNext:function(p,o){return this._findSib(p,o,"nextSibling")},getPrev:function(p,o){return this._findSib(p,o,"previousSibling")},select:function(q,p){var o=this;return m.dom.Sizzle(q,o.get(p)||o.get(o.settings.root_element)||o.doc,[])},is:function(q,o){var p;if(q.length===undefined){if(o==="*"){return q.nodeType==1}if(b.test(o)){o=o.toLowerCase().split(/,/);q=q.nodeName.toLowerCase();for(p=o.length-1;p>=0;p--){if(o[p]==q){return true}}return false}}return m.dom.Sizzle.matches(o,q.nodeType?[q]:q).length>0},add:function(s,v,o,r,u){var q=this;return this.run(s,function(y){var x,t;x=j(v,"string")?q.doc.createElement(v):v;q.setAttribs(x,o);if(r){if(r.nodeType){x.appendChild(r)}else{q.setHTML(x,r)}}return !u?y.appendChild(x):x})},create:function(q,o,p){return this.add(this.doc.createElement(q),q,o,p,1)},createHTML:function(v,p,s){var u="",r=this,q;u+="<"+v;for(q in p){if(p.hasOwnProperty(q)){u+=" "+q+'="'+r.encode(p[q])+'"'}}if(m.is(s)){return u+">"+s+"</"+v+">"}return u+" />"},remove:function(q,o){var p=this;return this.run(q,function(u){var t,s,r;t=u.parentNode;if(!t){return null}if(o){for(r=u.childNodes.length-1;r>=0;r--){p.insertAfter(u.childNodes[r],u)}}if(p.fixPsuedoLeaks){t=u.cloneNode(true);o="IELeakGarbageBin";s=p.get(o)||p.add(p.doc.body,"div",{id:o,style:"display:none"});s.appendChild(u);s.innerHTML="";return t}return t.removeChild(u)})},setStyle:function(r,o,p){var q=this;return q.run(r,function(v){var u,t;u=v.style;o=o.replace(/-(\D)/g,function(x,s){return s.toUpperCase()});if(q.pixelStyles.test(o)&&(m.is(p,"number")||/^[\-0-9\.]+$/.test(p))){p+="px"}switch(o){case"opacity":if(d){u.filter=p===""?"":"alpha(opacity="+(p*100)+")";if(!r.currentStyle||!r.currentStyle.hasLayout){u.display="inline-block"}}u[o]=u["-moz-opacity"]=u["-khtml-opacity"]=p||"";break;case"float":d?u.styleFloat=p:u.cssFloat=p;break;default:u[o]=p||""}if(q.settings.update_styles){q.setAttrib(v,"_mce_style")}})},getStyle:function(r,o,q){r=this.get(r);if(!r){return false}if(this.doc.defaultView&&q){o=o.replace(/[A-Z]/g,function(s){return"-"+s});try{return this.doc.defaultView.getComputedStyle(r,null).getPropertyValue(o)}catch(p){return null}}o=o.replace(/-(\D)/g,function(t,s){return s.toUpperCase()});if(o=="float"){o=d?"styleFloat":"cssFloat"}if(r.currentStyle&&q){return r.currentStyle[o]}return r.style[o]},setStyles:function(u,v){var q=this,r=q.settings,p;p=r.update_styles;r.update_styles=0;k(v,function(o,s){q.setStyle(u,s,o)});r.update_styles=p;if(r.update_styles){q.setAttrib(u,r.cssText)}},setAttrib:function(q,r,o){var p=this;if(!q||!r){return}if(p.settings.strict){r=r.toLowerCase()}return this.run(q,function(u){var t=p.settings;switch(r){case"style":if(!j(o,"string")){k(o,function(s,x){p.setStyle(u,x,s)});return}if(t.keep_values){if(o&&!p._isRes(o)){u.setAttribute("_mce_style",o,2)}else{u.removeAttribute("_mce_style",2)}}u.style.cssText=o;break;case"class":u.className=o||"";break;case"src":case"href":if(t.keep_values){if(t.url_converter){o=t.url_converter.call(t.url_converter_scope||p,o,r,u)}p.setAttrib(u,"_mce_"+r,o,2)}break;case"shape":u.setAttribute("_mce_style",o);break}if(j(o)&&o!==null&&o.length!==0){u.setAttribute(r,""+o,2)}else{u.removeAttribute(r,2)}})},setAttribs:function(q,r){var p=this;return this.run(q,function(o){k(r,function(s,t){p.setAttrib(o,t,s)})})},getAttrib:function(r,s,q){var o,p=this;r=p.get(r);if(!r||r.nodeType!==1){return false}if(!j(q)){q=""}if(/^(src|href|style|coords|shape)$/.test(s)){o=r.getAttribute("_mce_"+s);if(o){return o}}if(d&&p.props[s]){o=r[p.props[s]];o=o&&o.nodeValue?o.nodeValue:o}if(!o){o=r.getAttribute(s,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(s)){if(r[p.props[s]]===true&&o===""){return s}return o?s:""}if(r.nodeName==="FORM"&&r.getAttributeNode(s)){return r.getAttributeNode(s).nodeValue}if(s==="style"){o=o||r.style.cssText;if(o){o=p.serializeStyle(p.parseStyle(o),r.nodeName);if(p.settings.keep_values&&!p._isRes(o)){r.setAttribute("_mce_style",o)}}}if(i&&s==="class"&&o){o=o.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(d){switch(s){case"rowspan":case"colspan":if(o===1){o=""}break;case"size":if(o==="+0"||o===20||o===0){o=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(o===0){o=""}break;case"hspace":if(o===-1){o=""}break;case"maxlength":case"tabindex":if(o===32768||o===2147483647||o==="32768"){o=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(o===65535){return s}return q;case"shape":o=o.toLowerCase();break;default:if(s.indexOf("on")===0&&o){o=(""+o).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1")}}}return(o!==undefined&&o!==null&&o!=="")?""+o:q},getPos:function(A,s){var p=this,o=0,z=0,u,v=p.doc,q;A=p.get(A);s=s||v.body;if(A){if(d&&!p.stdMode){A=A.getBoundingClientRect();u=p.boxModel?v.documentElement:v.body;o=p.getStyle(p.select("html")[0],"borderWidth");o=(o=="medium"||p.boxModel&&!p.isIE6)&&2||o;A.top+=p.win.self!=p.win.top?2:0;return{x:A.left+u.scrollLeft-o,y:A.top+u.scrollTop-o}}q=A;while(q&&q!=s&&q.nodeType){o+=q.offsetLeft||0;z+=q.offsetTop||0;q=q.offsetParent}q=A.parentNode;while(q&&q!=s&&q.nodeType){o-=q.scrollLeft||0;z-=q.scrollTop||0;q=q.parentNode}}return{x:o,y:z}},parseStyle:function(r){var u=this,v=u.settings,x={};if(!r){return x}function p(D,A,C){var z,B,o,y;z=x[D+"-top"+A];if(!z){return}B=x[D+"-right"+A];if(z!=B){return}o=x[D+"-bottom"+A];if(B!=o){return}y=x[D+"-left"+A];if(o!=y){return}x[C]=y;delete x[D+"-top"+A];delete x[D+"-right"+A];delete x[D+"-bottom"+A];delete x[D+"-left"+A]}function q(y,s,o,A){var z;z=x[s];if(!z){return}z=x[o];if(!z){return}z=x[A];if(!z){return}x[y]=x[s]+" "+x[o]+" "+x[A];delete x[s];delete x[o];delete x[A]}r=r.replace(/&(#?[a-z0-9]+);/g,"&$1_MCE_SEMI_");k(r.split(";"),function(s){var o,t=[];if(s){s=s.replace(/_MCE_SEMI_/g,";");s=s.replace(/url\([^\)]+\)/g,function(y){t.push(y);return"url("+t.length+")"});s=s.split(":");o=m.trim(s[1]);o=o.replace(/url\(([^\)]+)\)/g,function(z,y){return t[parseInt(y)-1]});o=o.replace(/rgb\([^\)]+\)/g,function(y){return u.toHex(y)});if(v.url_converter){o=o.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(y,z){return"url("+v.url_converter.call(v.url_converter_scope||u,u.decode(z),"style",null)+")"})}x[m.trim(s[0]).toLowerCase()]=o}});p("border","","border");p("border","-width","border-width");p("border","-color","border-color");p("border","-style","border-style");p("padding","","padding");p("margin","","margin");q("border","border-width","border-style","border-color");if(d){if(x.border=="medium none"){x.border=""}}return x},serializeStyle:function(v,p){var q=this,r="";function u(s,o){if(o&&s){if(o.indexOf("-")===0){return}switch(o){case"font-weight":if(s==700){s="bold"}break;case"color":case"background-color":s=s.toLowerCase();break}r+=(r?" ":"")+o+": "+s+";"}}if(p&&q._styles){k(q._styles["*"],function(o){u(v[o],o)});k(q._styles[p.toLowerCase()],function(o){u(v[o],o)})}else{k(v,u)}return r},loadCSS:function(o){var q=this,r=q.doc,p;if(!o){o=""}p=q.select("head")[0];k(o.split(","),function(s){var t;if(q.files[s]){return}q.files[s]=true;t=q.create("link",{rel:"stylesheet",href:m._addVer(s)});if(d&&r.documentMode){t.onload=function(){r.recalc();t.onload=null}}p.appendChild(t)})},addClass:function(o,p){return this.run(o,function(q){var r;if(!p){return 0}if(this.hasClass(q,p)){return q.className}r=this.removeClass(q,p);return q.className=(r!=""?(r+" "):"")+p})},removeClass:function(q,r){var o=this,p;return o.run(q,function(t){var s;if(o.hasClass(t,r)){if(!p){p=new RegExp("(^|\\s+)"+r+"(\\s+|$)","g")}s=t.className.replace(p," ");s=m.trim(s!=" "?s:"");t.className=s;if(!s){t.removeAttribute("class")}return s}return t.className})},hasClass:function(p,o){p=this.get(p);if(!p||!o){return false}return(" "+p.className+" ").indexOf(" "+o+" ")!==-1},show:function(o){return this.setStyle(o,"display","block")},hide:function(o){return this.setStyle(o,"display","none")},isHidden:function(o){o=this.get(o);return !o||o.style.display=="none"||this.getStyle(o,"display")=="none"},uniqueId:function(o){return(!o?"mce_":o)+(this.counter++)},setHTML:function(q,p){var o=this;return this.run(q,function(v){var r,t,s,z,u,r;p=o.processHTML(p);if(d){function y(){while(v.firstChild){v.firstChild.removeNode()}try{v.innerHTML="<br />"+p;v.removeChild(v.firstChild)}catch(x){r=o.create("div");r.innerHTML="<br />"+p;k(r.childNodes,function(B,A){if(A){v.appendChild(B)}})}}if(o.settings.fix_ie_paragraphs){p=p.replace(/<p><\/p>|<p([^>]+)><\/p>|<p[^\/+]\/>/gi,'<p$1 _mce_keep="true"> </p>')}y();if(o.settings.fix_ie_paragraphs){s=v.getElementsByTagName("p");for(t=s.length-1,r=0;t>=0;t--){z=s[t];if(!z.hasChildNodes()){if(!z._mce_keep){r=1;break}z.removeAttribute("_mce_keep")}}}if(r){p=p.replace(/<p ([^>]+)>|<p>/ig,'<div $1 _mce_tmp="1">');p=p.replace(/<\/p>/g,"</div>");y();if(o.settings.fix_ie_paragraphs){s=v.getElementsByTagName("DIV");for(t=s.length-1;t>=0;t--){z=s[t];if(z._mce_tmp){u=o.doc.createElement("p");z.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(A,x){var B;if(x!=="_mce_tmp"){B=z.getAttribute(x);if(!B&&x==="class"){B=z.className}u.setAttribute(x,B)}});for(r=0;r<z.childNodes.length;r++){u.appendChild(z.childNodes[r].cloneNode(true))}z.swapNode(u)}}}}}else{v.innerHTML=p}return p})},processHTML:function(r){var p=this,q=p.settings,v=[];if(!q.process_html){return r}if(d){r=r.replace(/'/g,"'");r=r.replace(/\s+(disabled|checked|readonly|selected)\s*=\s*[\"\']?(false|0)[\"\']?/gi,"")}r=r.replace(/<a( )([^>]+)\/>|<a\/>/gi,"<a$1$2></a>");if(q.keep_values){if(/<script|noscript|style/i.test(r)){function o(t){t=t.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n");t=t.replace(/^[\r\n]*|[\r\n]*$/g,"");t=t.replace(/^\s*(\/\/\s*<!--|\/\/\s*<!\[CDATA\[|<!--|<!\[CDATA\[)[\r\n]*/g,"");t=t.replace(/\s*(\/\/\s*\]\]>|\/\/\s*-->|\]\]>|-->|\]\]-->)\s*$/g,"");return t}r=r.replace(/<script([^>]+|)>([\s\S]*?)<\/script>/gi,function(s,x,t){if(!x){x=' type="text/javascript"'}x=x.replace(/src=\"([^\"]+)\"?/i,function(y,z){if(q.url_converter){z=p.encode(q.url_converter.call(q.url_converter_scope||p,p.decode(z),"src","script"))}return'_mce_src="'+z+'"'});if(m.trim(t)){v.push(o(t));t="<!--\nMCE_SCRIPT:"+(v.length-1)+"\n// -->"}return"<mce:script"+x+">"+t+"</mce:script>"});r=r.replace(/<style([^>]+|)>([\s\S]*?)<\/style>/gi,function(s,x,t){if(t){v.push(o(t));t="<!--\nMCE_SCRIPT:"+(v.length-1)+"\n-->"}return"<mce:style"+x+">"+t+"</mce:style><style "+x+' _mce_bogus="1">'+t+"</style>"});r=r.replace(/<noscript([^>]+|)>([\s\S]*?)<\/noscript>/g,function(s,x,t){return"<mce:noscript"+x+"><!--"+p.encode(t).replace(/--/g,"--")+"--></mce:noscript>"})}r=r.replace(/<!\[CDATA\[([\s\S]+)\]\]>/g,"<!--[CDATA[$1]]-->");function u(s){return s.replace(h,function(y,z,x,t){return"<"+z+x.replace(l,function(B,A,E,D,C){var F;A=A.toLowerCase();E=E||D||C||"";if(e[A]){if(E==="false"||E==="0"){return}return A+'="'+A+'"'}if(f[A]&&x.indexOf("_mce_"+A)==-1){F=p.decode(E);if(q.url_converter&&(A=="src"||A=="href")){F=q.url_converter.call(q.url_converter_scope||p,F,A,z)}if(A=="style"){F=p.serializeStyle(p.parseStyle(F),A)}return A+'="'+E+'" _mce_'+A+'="'+p.encode(F)+'"'}return B})+t+">"})}r=u(r);r=r.replace(/MCE_SCRIPT:([0-9]+)/g,function(t,s){return v[s]})}return r},getOuterHTML:function(o){var p;o=this.get(o);if(!o){return null}if(o.outerHTML!==undefined){return o.outerHTML}p=(o.ownerDocument||this.doc).createElement("body");p.appendChild(o.cloneNode(true));return p.innerHTML},setOuterHTML:function(r,p,s){var o=this;function q(u,t,x){var y,v;v=x.createElement("body");v.innerHTML=t;y=v.lastChild;while(y){o.insertAfter(y.cloneNode(true),u);y=y.previousSibling}o.remove(u)}return this.run(r,function(u){u=o.get(u);if(u.nodeType==1){s=s||u.ownerDocument||o.doc;if(d){try{if(d&&u.nodeType==1){u.outerHTML=p}else{q(u,p,s)}}catch(t){q(u,p,s)}}else{q(u,p,s)}}})},decode:function(p){var q,r,o;if(/&[\w#]+;/.test(p)){q=this.doc.createElement("div");q.innerHTML=p;r=q.firstChild;o="";if(r){do{o+=r.nodeValue}while(r=r.nextSibling)}return o||p}return p},encode:function(o){return(""+o).replace(n,function(p){return c[p]})},insertAfter:function(q,p){var o=this;p=o.get(p);return this.run(q,function(t){var s,r;s=p.parentNode;r=p.nextSibling;if(r){s.insertBefore(t,r)}else{s.appendChild(t)}return t})},isBlock:function(o){if(o.nodeType&&o.nodeType!==1){return false}o=o.nodeName||o;return a.test(o)},replace:function(s,r,p){var q=this;if(j(r,"array")){s=s.cloneNode(true)}return q.run(r,function(t){if(p){k(m.grep(t.childNodes),function(o){s.appendChild(o)})}if(q.fixPsuedoLeaks&&t.nodeType===1){t.parentNode.insertBefore(s,t);q.remove(t);return s}return t.parentNode.replaceChild(s,t)})},rename:function(r,o){var q=this,p;if(r.nodeName!=o.toUpperCase()){p=q.create(o);k(q.getAttribs(r),function(s){q.setAttrib(p,s.nodeName,q.getAttrib(r,s.nodeName))});q.replace(p,r,1)}return p||r},findCommonAncestor:function(q,o){var r=q,p;while(r){p=o;while(p&&r!=p){p=p.parentNode}if(r==p){break}r=r.parentNode}if(!r&&q.ownerDocument){return q.ownerDocument.documentElement}return r},toHex:function(o){var q=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(o);function p(r){r=parseInt(r).toString(16);return r.length>1?r:"0"+r}if(q){o="#"+p(q[1])+p(q[2])+p(q[3]);return o}return o},getClasses:function(){var s=this,o=[],r,u={},v=s.settings.class_filter,q;if(s.classes){return s.classes}function x(t){k(t.imports,function(y){x(y)});k(t.cssRules||t.rules,function(y){switch(y.type||1){case 1:if(y.selectorText){k(y.selectorText.split(","),function(z){z=z.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(z)||!/\.[\w\-]+$/.test(z)){return}q=z;z=z.replace(/.*\.([a-z0-9_\-]+).*/i,"$1");if(v&&!(z=v(z,q))){return}if(!u[z]){o.push({"class":z});u[z]=1}})}break;case 3:x(y.styleSheet);break}})}try{k(s.doc.styleSheets,x)}catch(p){}if(o.length>0){s.classes=o}return o},run:function(u,r,q){var p=this,v;if(p.doc&&typeof(u)==="string"){u=p.get(u)}if(!u){return false}q=q||this;if(!u.nodeType&&(u.length||u.length===0)){v=[];k(u,function(s,o){if(s){if(typeof(s)=="string"){s=p.doc.getElementById(s)}v.push(r.call(q,s,o))}});return v}return r.call(q,u)},getAttribs:function(q){var p;q=this.get(q);if(!q){return[]}if(d){p=[];if(q.nodeName=="OBJECT"){return q.attributes}if(q.nodeName==="OPTION"&&this.getAttrib(q,"selected")){p.push({specified:1,nodeName:"selected"})}q.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(o){p.push({specified:1,nodeName:o})});return p}return q.attributes},destroy:function(p){var o=this;if(o.events){o.events.destroy()}o.win=o.doc=o.root=o.events=null;if(!p){m.removeUnload(o.destroy)}},createRng:function(){var o=this.doc;return o.createRange?o.createRange():new m.dom.Range(this)},nodeIndex:function(r,s){var o=0,q,p;if(r){for(r=r.previousSibling,q=r;r;r=r.previousSibling){p=r.nodeType;if(s&&p==3){if(r.nodeValue.length>0&&(q.nodeType!=p||q.nodeValue.length===0)){o++}}else{o++}q=r}}return o},split:function(u,s,y){var z=this,o=z.createRng(),v,q,x;function p(A){var t,r=A.childNodes;if(A.nodeType==1&&A.getAttribute("_mce_type")=="bookmark"){return}for(t=r.length-1;t>=0;t--){p(r[t])}if(A.nodeType!=9){if(A.nodeType==3&&A.nodeValue.length>0){return}if(A.nodeType==1){r=A.childNodes;if(r.length==1&&r[0]&&r[0].nodeType==1&&r[0].getAttribute("_mce_type")=="bookmark"){A.parentNode.insertBefore(r[0],A)}if(r.length||/^(br|hr|input|img)$/i.test(A.nodeName)){return}}z.remove(A)}return A}if(u&&s){o.setStart(u.parentNode,z.nodeIndex(u));o.setEnd(s.parentNode,z.nodeIndex(s));v=o.extractContents();o=z.createRng();o.setStart(s.parentNode,z.nodeIndex(s)+1);o.setEnd(u.parentNode,z.nodeIndex(u)+1);q=o.extractContents();x=u.parentNode;x.insertBefore(p(v),u);if(y){x.replaceChild(y,s)}else{x.insertBefore(s,u)}x.insertBefore(p(q),u);z.remove(u);return y||s}},bind:function(s,o,r,q){var p=this;if(!p.events){p.events=new m.dom.EventUtils()}return p.events.add(s,o,r,q||this)},unbind:function(r,o,q){var p=this;if(!p.events){p.events=new m.dom.EventUtils()}return p.events.remove(r,o,q)},_findSib:function(r,o,p){var q=this,s=o;if(r){if(j(s,"string")){s=function(t){return q.is(t,o)}}for(r=r[p];r;r=r[p]){if(s(r)){return r}}}return null},_isRes:function(o){return/^(top|left|bottom|right|width|height)/i.test(o)||/;\s*(top|left|bottom|right|width|height)/i.test(o)}});m.DOM=new m.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var N=this,e=c.doc,S=0,E=1,j=2,D=true,R=false,U="startOffset",h="startContainer",P="endContainer",z="endOffset",k=tinymce.extend,n=c.nodeIndex;k(N,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:D,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:I,setEndBefore:J,setEndAfter:u,collapse:A,selectNode:x,selectNodeContents:F,compareBoundaryPoints:v,deleteContents:p,extractContents:H,cloneContents:d,insertNode:C,surroundContents:M,cloneRange:K});function q(V,t){B(D,V,t)}function s(V,t){B(R,V,t)}function g(t){q(t.parentNode,n(t))}function I(t){q(t.parentNode,n(t)+1)}function J(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function A(t){if(t){N[P]=N[h];N[z]=N[U]}else{N[h]=N[P];N[U]=N[z]}N.collapsed=D}function x(t){g(t);u(t)}function F(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(W,X){var Z=N[h],Y=N[U],V=N[P],t=N[z];if(W===0){return G(Z,Y,Z,Y)}if(W===1){return G(Z,Y,V,t)}if(W===2){return G(V,t,V,t)}if(W===3){return G(V,t,Z,Y)}}function p(){m(j)}function H(){return m(S)}function d(){return m(E)}function C(Y){var V=this[h],t=this[U],X,W;if((V.nodeType===3||V.nodeType===4)&&V.nodeValue){if(!t){V.parentNode.insertBefore(Y,V)}else{if(t>=V.nodeValue.length){c.insertAfter(Y,V)}else{X=V.splitText(t);V.parentNode.insertBefore(Y,X)}}}else{if(V.childNodes.length>0){W=V.childNodes[t]}if(W){V.insertBefore(Y,W)}else{V.appendChild(Y)}}}function M(V){var t=N.extractContents();N.insertNode(V);V.appendChild(t);N.selectNode(V)}function K(){return k(new b(c),{startContainer:N[h],startOffset:N[U],endContainer:N[P],endOffset:N[z],collapsed:N.collapsed,commonAncestorContainer:N.commonAncestorContainer})}function O(t,V){var W;if(t.nodeType==3){return t}if(V<0){return t}W=t.firstChild;while(W&&V>0){--V;W=W.nextSibling}if(W){return W}return t}function l(){return(N[h]==N[P]&&N[U]==N[z])}function G(X,Z,V,Y){var aa,W,t,ab,ad,ac;if(X==V){if(Z==Y){return 0}if(Z<Y){return -1}return 1}aa=V;while(aa&&aa.parentNode!=X){aa=aa.parentNode}if(aa){W=0;t=X.firstChild;while(t!=aa&&W<Z){W++;t=t.nextSibling}if(Z<=W){return -1}return 1}aa=X;while(aa&&aa.parentNode!=V){aa=aa.parentNode}if(aa){W=0;t=V.firstChild;while(t!=aa&&W<Y){W++;t=t.nextSibling}if(W<Y){return -1}return 1}ab=c.findCommonAncestor(X,V);ad=X;while(ad&&ad.parentNode!=ab){ad=ad.parentNode}if(!ad){ad=ab}ac=V;while(ac&&ac.parentNode!=ab){ac=ac.parentNode}if(!ac){ac=ab}if(ad==ac){return 0}t=ab.firstChild;while(t){if(t==ad){return -1}if(t==ac){return 1}t=t.nextSibling}}function B(V,Y,X){var t,W;if(V){N[h]=Y;N[U]=X}else{N[P]=Y;N[z]=X}t=N[P];while(t.parentNode){t=t.parentNode}W=N[h];while(W.parentNode){W=W.parentNode}if(W==t){if(G(N[h],N[U],N[P],N[z])>0){N.collapse(V)}}else{N.collapse(V)}N.collapsed=l();N.commonAncestorContainer=c.findCommonAncestor(N[h],N[P])}function m(ab){var aa,X=0,ad=0,V,Z,W,Y,t,ac;if(N[h]==N[P]){return f(ab)}for(aa=N[P],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[h]){return r(aa,ab)}++X}for(aa=N[h],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[P]){return T(aa,ab)}++ad}Z=ad-X;W=N[h];while(Z>0){W=W.parentNode;Z--}Y=N[P];while(Z<0){Y=Y.parentNode;Z++}for(t=W.parentNode,ac=Y.parentNode;t!=ac;t=t.parentNode,ac=ac.parentNode){W=t;Y=ac}return o(W,Y,ab)}function f(Z){var ab,Y,X,aa,t,W,V;if(Z!=j){ab=e.createDocumentFragment()}if(N[U]==N[z]){return ab}if(N[h].nodeType==3){Y=N[h].nodeValue;X=Y.substring(N[U],N[z]);if(Z!=E){N[h].deleteData(N[U],N[z]-N[U]);N.collapse(D)}if(Z==j){return}ab.appendChild(e.createTextNode(X));return ab}aa=O(N[h],N[U]);t=N[z]-N[U];while(t>0){W=aa.nextSibling;V=y(aa,Z);if(ab){ab.appendChild(V)}--t;aa=W}if(Z!=E){N.collapse(D)}return ab}function r(ab,Y){var aa,Z,V,t,X,W;if(Y!=j){aa=e.createDocumentFragment()}Z=i(ab,Y);if(aa){aa.appendChild(Z)}V=n(ab);t=V-N[U];if(t<=0){if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}Z=ab.previousSibling;while(t>0){X=Z.previousSibling;W=y(Z,Y);if(aa){aa.insertBefore(W,aa.firstChild)}--t;Z=X}if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}function T(Z,Y){var ab,V,aa,t,X,W;if(Y!=j){ab=e.createDocumentFragment()}aa=Q(Z,Y);if(ab){ab.appendChild(aa)}V=n(Z);++V;t=N[z]-V;aa=Z.nextSibling;while(t>0){X=aa.nextSibling;W=y(aa,Y);if(ab){ab.appendChild(W)}--t;aa=X}if(Y!=E){N.setStartAfter(Z);N.collapse(D)}return ab}function o(Z,t,ac){var W,ae,Y,aa,ab,V,ad,X;if(ac!=j){ae=e.createDocumentFragment()}W=Q(Z,ac);if(ae){ae.appendChild(W)}Y=Z.parentNode;aa=n(Z);ab=n(t);++aa;V=ab-aa;ad=Z.nextSibling;while(V>0){X=ad.nextSibling;W=y(ad,ac);if(ae){ae.appendChild(W)}ad=X;--V}W=i(t,ac);if(ae){ae.appendChild(W)}if(ac!=E){N.setStartAfter(Z);N.collapse(D)}return ae}function i(aa,ab){var W=O(N[P],N[z]-1),ac,Z,Y,t,V,X=W!=N[P];if(W==aa){return L(W,X,R,ab)}ac=W.parentNode;Z=L(ac,R,R,ab);while(ac){while(W){Y=W.previousSibling;t=L(W,X,R,ab);if(ab!=j){Z.insertBefore(t,Z.firstChild)}X=D;W=Y}if(ac==aa){return Z}W=ac.previousSibling;ac=ac.parentNode;V=L(ac,R,R,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function Q(aa,ab){var X=O(N[h],N[U]),Y=X!=N[h],ac,Z,W,t,V;if(X==aa){return L(X,Y,D,ab)}ac=X.parentNode;Z=L(ac,R,D,ab);while(ac){while(X){W=X.nextSibling;t=L(X,Y,D,ab);if(ab!=j){Z.appendChild(t)}Y=D;X=W}if(ac==aa){return Z}X=ac.nextSibling;ac=ac.parentNode;V=L(ac,R,D,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function L(t,Y,ab,ac){var X,W,Z,V,aa;if(Y){return y(t,ac)}if(t.nodeType==3){X=t.nodeValue;if(ab){V=N[U];W=X.substring(V);Z=X.substring(0,V)}else{V=N[z];W=X.substring(0,V);Z=X.substring(V)}if(ac!=E){t.nodeValue=Z}if(ac==j){return}aa=t.cloneNode(R);aa.nodeValue=W;return aa}if(ac==j){return}return t.cloneNode(R)}function y(V,t){if(t!=j){return t==E?V.cloneNode(D):V}V.parentNode.removeChild(V)}}a.Range=b})(tinymce.dom);(function(){function a(e){var d=this,i="\uFEFF",b,h,g=e.dom;function c(k,j){if(k&&j){if(k.item&&j.item&&k.item(0)===j.item(0)){return 1}if(k.isEqual&&j.isEqual&&j.isEqual(k)){return 1}}return 0}function f(){var n=e.getRng(),j=g.createRng(),k,l,p,o;l=n.item?n.item(0):n.parentElement();if(l.ownerDocument!=g.doc){return j}if(n.item||!l.hasChildNodes()){j.setStart(l.parentNode,g.nodeIndex(l));j.setEnd(j.startContainer,j.startOffset+1);return j}k=n.duplicate();p=e.isCollapsed();n.collapse();n.pasteHTML('<span id="_mce_start" style="display:none;line-height:0">\uFEFF</span>');if(!p){k.collapse(false);k.pasteHTML('<span id="_mce_end" style="display:none;line-height:0">\uFEFF</span>')}function m(u){var r,t,q,s;q=g.get("_mce_"+(u?"start":"end"));s=q.previousSibling;if(s&&s.nodeType==3){r=s;t=r.nodeValue.length;g.remove(q);s=r.nextSibling;if(s&&s.nodeType==3){o=true;r.appendData(s.nodeValue);g.remove(s)}}else{s=q.nextSibling;if(s&&s.nodeType==3){r=s;t=0}else{if(s){t=g.nodeIndex(s)-1}else{t=g.nodeIndex(q)}r=q.parentNode}g.remove(q)}if(u){j.setStart(r,t)}if(!u||p){j.setEnd(r,t)}}m(true);if(!p){m(false)}if(o){d.addRange(j)}return j}this.addRange=function(k){var s,y,x=e.dom.doc,q=x.body,t,m,v,n,r,j,o,p,u,l;this.destroy();v=k.startContainer;n=k.startOffset;r=k.endContainer;j=k.endOffset;s=q.createTextRange();if(v==x||r==x){s=q.createTextRange();s.collapse();s.select();return}if(v.nodeType==1&&v.hasChildNodes()){p=v.childNodes.length-1;if(n>p){u=1;v=v.childNodes[p]}else{v=v.childNodes[n]}if(v.nodeType==3){n=0}}if(r.nodeType==1&&r.hasChildNodes()){p=r.childNodes.length-1;if(j==0){l=1;r=r.childNodes[0]}else{r=r.childNodes[Math.min(p,j-1)];if(r.nodeType==3){j=r.nodeValue.length}}}if(v==r&&v.nodeType==1){if(/^(IMG|TABLE)$/.test(v.nodeName)&&n!=j){s=q.createControlRange();s.addElement(v)}else{s=q.createTextRange();if(!v.hasChildNodes()&&v.canHaveHTML){v.innerHTML=i}s.moveToElementText(v);if(v.innerHTML==i){s.collapse(true);v.removeChild(v.firstChild)}}if(n==j){s.collapse(j<=k.endContainer.childNodes.length-1)}s.select();s.scrollIntoView();return}s=q.createTextRange();o=x.createElement("span");o.innerHTML=" ";if(v.nodeType==3){if(u){g.insertAfter(o,v)}else{v.parentNode.insertBefore(o,v)}s.moveToElementText(o);o.parentNode.removeChild(o);s.move("character",n)}else{s.moveToElementText(v);if(u){s.collapse(false)}}if(v==r&&v.nodeType==3){s.moveEnd("character",j-n);s.select();s.scrollIntoView();return}y=q.createTextRange();if(r.nodeType==3){r.parentNode.insertBefore(o,r);y.moveToElementText(o);o.parentNode.removeChild(o);y.move("character",j);s.setEndPoint("EndToStart",y)}else{y.moveToElementText(r);y.collapse(!!l);s.setEndPoint("EndToEnd",y)}s.select();s.scrollIntoView()};this.getRangeAt=function(){if(!b||!c(h,e.getRng())){b=f();h=e.getRng()}return b};this.destroy=function(){h=b=null};if(e.dom.boxModel){(function(){var p=g.doc,k=p.body,m,n;p.documentElement.unselectable=true;function o(q,t){var r=k.createTextRange();try{r.moveToPoint(q,t)}catch(s){r=null}return r}function l(r){var q;if(r.button){q=o(r.x,r.y);if(q){if(q.compareEndPoints("StartToStart",n)>0){q.setEndPoint("StartToStart",n)}else{q.setEndPoint("EndToEnd",n)}q.select()}}else{j()}}function j(){g.unbind(p,"mouseup",j);g.unbind(p,"mousemove",l);m=0}g.bind(p,"mousedown",function(q){if(q.target.nodeName==="HTML"){if(m){j()}m=1;n=o(q.x,q.y);if(n){g.bind(p,"mouseup",j);g.bind(p,"mousemove",l);n.select()}}})})()}}tinymce.dom.TridentSelection=a})();(function(){var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,i=0,d=Object.prototype.toString,n=false;var b=function(E,t,B,v){B=B||[];var e=t=t||document;if(t.nodeType!==1&&t.nodeType!==9){return[]}if(!E||typeof E!=="string"){return B}var C=[],D,z,H,G,A,s,r=true,x=o(t);p.lastIndex=0;while((D=p.exec(E))!==null){C.push(D[1]);if(D[2]){s=RegExp.rightContext;break}}if(C.length>1&&j.exec(E)){if(C.length===2&&f.relative[C[0]]){z=g(C[0]+C[1],t)}else{z=f.relative[C[0]]?[t]:b(C.shift(),t);while(C.length){E=C.shift();if(f.relative[E]){E+=C.shift()}z=g(E,z)}}}else{if(!v&&C.length>1&&t.nodeType===9&&!x&&f.match.ID.test(C[0])&&!f.match.ID.test(C[C.length-1])){var I=b.find(C.shift(),t,x);t=I.expr?b.filter(I.expr,I.set)[0]:I.set[0]}if(t){var I=v?{expr:C.pop(),set:a(v)}:b.find(C.pop(),C.length===1&&(C[0]==="~"||C[0]==="+")&&t.parentNode?t.parentNode:t,x);z=I.expr?b.filter(I.expr,I.set):I.set;if(C.length>0){H=a(z)}else{r=false}while(C.length){var u=C.pop(),y=u;if(!f.relative[u]){u=""}else{y=C.pop()}if(y==null){y=t}f.relative[u](H,y,x)}}else{H=C=[]}}if(!H){H=z}if(!H){throw"Syntax error, unrecognized expression: "+(u||E)}if(d.call(H)==="[object Array]"){if(!r){B.push.apply(B,H)}else{if(t&&t.nodeType===1){for(var F=0;H[F]!=null;F++){if(H[F]&&(H[F]===true||H[F].nodeType===1&&h(t,H[F]))){B.push(z[F])}}}else{for(var F=0;H[F]!=null;F++){if(H[F]&&H[F].nodeType===1){B.push(z[F])}}}}}else{a(H,B)}if(s){b(s,e,B,v);b.uniqueSort(B)}return B};b.uniqueSort=function(r){if(c){n=false;r.sort(c);if(n){for(var e=1;e<r.length;e++){if(r[e]===r[e-1]){r.splice(e--,1)}}}}};b.matches=function(e,r){return b(e,null,null,r)};b.find=function(y,e,z){var x,u;if(!y){return[]}for(var t=0,s=f.order.length;t<s;t++){var v=f.order[t],u;if((u=f.match[v].exec(y))){var r=RegExp.leftContext;if(r.substr(r.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");x=f.find[v](u,e,z);if(x!=null){y=y.replace(f.match[v],"");break}}}}if(!x){x=e.getElementsByTagName("*")}return{set:x,expr:y}};b.filter=function(B,A,E,t){var s=B,G=[],y=A,v,e,x=A&&A[0]&&o(A[0]);while(B&&A.length){for(var z in f.filter){if((v=f.match[z].exec(B))!=null){var r=f.filter[z],F,D;e=false;if(y==G){G=[]}if(f.preFilter[z]){v=f.preFilter[z](v,y,E,G,t,x);if(!v){e=F=true}else{if(v===true){continue}}}if(v){for(var u=0;(D=y[u])!=null;u++){if(D){F=r(D,v,u,y);var C=t^!!F;if(E&&F!=null){if(C){e=true}else{y[u]=false}}else{if(C){G.push(D);e=true}}}}}if(F!==undefined){if(!E){y=G}B=B.replace(f.match[z],"");if(!e){return[]}break}}}if(B==s){if(e==null){throw"Syntax error, unrecognized expression: "+B}else{break}}s=B}return y};var f=b.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")}},relative:{"+":function(y,e,x){var u=typeof e==="string",z=u&&!/\W/.test(e),v=u&&!z;if(z&&!x){e=e.toUpperCase()}for(var t=0,s=y.length,r;t<s;t++){if((r=y[t])){while((r=r.previousSibling)&&r.nodeType!==1){}y[t]=v||r&&r.nodeName===e?r||false:r===e}}if(v){b.filter(e,y,true)}},">":function(x,r,y){var u=typeof r==="string";if(u&&!/\W/.test(r)){r=y?r:r.toUpperCase();for(var s=0,e=x.length;s<e;s++){var v=x[s];if(v){var t=v.parentNode;x[s]=t.nodeName===r?t:false}}}else{for(var s=0,e=x.length;s<e;s++){var v=x[s];if(v){x[s]=u?v.parentNode:v.parentNode===r}}if(u){b.filter(r,x,true)}}},"":function(t,r,v){var s=i++,e=q;if(!r.match(/\W/)){var u=r=v?r:r.toUpperCase();e=m}e("parentNode",r,s,t,u,v)},"~":function(t,r,v){var s=i++,e=q;if(typeof r==="string"&&!r.match(/\W/)){var u=r=v?r:r.toUpperCase();e=m}e("previousSibling",r,s,t,u,v)}},find:{ID:function(r,s,t){if(typeof s.getElementById!=="undefined"&&!t){var e=s.getElementById(r[1]);return e?[e]:[]}},NAME:function(s,v,x){if(typeof v.getElementsByName!=="undefined"){var r=[],u=v.getElementsByName(s[1]);for(var t=0,e=u.length;t<e;t++){if(u[t].getAttribute("name")===s[1]){r.push(u[t])}}return r.length===0?null:r}},TAG:function(e,r){return r.getElementsByTagName(e[1])}},preFilter:{CLASS:function(t,r,s,e,x,y){t=" "+t[1].replace(/\\/g,"")+" ";if(y){return t}for(var u=0,v;(v=r[u])!=null;u++){if(v){if(x^(v.className&&(" "+v.className+" ").indexOf(t)>=0)){if(!s){e.push(v)}}else{if(s){r[u]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(r,e){for(var s=0;e[s]===false;s++){}return e[s]&&o(e[s])?r[1]:r[1].toUpperCase()},CHILD:function(e){if(e[1]=="nth"){var r=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]=="even"&&"2n"||e[2]=="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(r[1]+(r[2]||1))-0;e[3]=r[3]-0}e[0]=i++;return e},ATTR:function(u,r,s,e,v,x){var t=u[1].replace(/\\/g,"");if(!x&&f.attrMap[t]){u[1]=f.attrMap[t]}if(u[2]==="~="){u[4]=" "+u[4]+" "}return u},PSEUDO:function(u,r,s,e,v){if(u[1]==="not"){if(u[3].match(p).length>1||/^\w/.test(u[3])){u[3]=b(u[3],null,null,r)}else{var t=b.filter(u[3],r,s,true^v);if(!s){e.push.apply(e,t)}return false}}else{if(f.match.POS.test(u[0])||f.match.CHILD.test(u[0])){return true}}return u},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){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(s,r,e){return !!b(e[3],s).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toUpperCase()==="BUTTON"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)}},setFilters:{first:function(r,e){return e===0},last:function(s,r,e,t){return r===t.length-1},even:function(r,e){return e%2===0},odd:function(r,e){return e%2===1},lt:function(s,r,e){return r<e[3]-0},gt:function(s,r,e){return r>e[3]-0},nth:function(s,r,e){return e[3]-0==r},eq:function(s,r,e){return e[3]-0==r}},filter:{PSEUDO:function(x,s,t,y){var r=s[1],u=f.filters[r];if(u){return u(x,t,s,y)}else{if(r==="contains"){return(x.textContent||x.innerText||"").indexOf(s[3])>=0}else{if(r==="not"){var v=s[3];for(var t=0,e=v.length;t<e;t++){if(v[t]===x){return false}}return true}}}},CHILD:function(e,t){var x=t[1],r=e;switch(x){case"only":case"first":while(r=r.previousSibling){if(r.nodeType===1){return false}}if(x=="first"){return true}r=e;case"last":while(r=r.nextSibling){if(r.nodeType===1){return false}}return true;case"nth":var s=t[2],A=t[3];if(s==1&&A==0){return true}var v=t[0],z=e.parentNode;if(z&&(z.sizcache!==v||!e.nodeIndex)){var u=0;for(r=z.firstChild;r;r=r.nextSibling){if(r.nodeType===1){r.nodeIndex=++u}}z.sizcache=v}var y=e.nodeIndex-A;if(s==0){return y==0}else{return(y%s==0&&y/s>=0)}}},ID:function(r,e){return r.nodeType===1&&r.getAttribute("id")===e},TAG:function(r,e){return(e==="*"&&r.nodeType===1)||r.nodeName===e},CLASS:function(r,e){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(v,t){var s=t[1],e=f.attrHandle[s]?f.attrHandle[s](v):v[s]!=null?v[s]:v.getAttribute(s),x=e+"",u=t[2],r=t[4];return e==null?u==="!=":u==="="?x===r:u==="*="?x.indexOf(r)>=0:u==="~="?(" "+x+" ").indexOf(r)>=0:!r?x&&e!==false:u==="!="?x!=r:u==="^="?x.indexOf(r)===0:u==="$="?x.substr(x.length-r.length)===r:u==="|="?x===r||x.substr(0,r.length+1)===r+"-":false},POS:function(u,r,s,v){var e=r[2],t=f.setFilters[e];if(t){return t(u,s,r,v)}}}};var j=f.match.POS;for(var l in f.match){f.match[l]=new RegExp(f.match[l].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var a=function(r,e){r=Array.prototype.slice.call(r);if(e){e.push.apply(e,r);return e}return r};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(k){a=function(u,t){var r=t||[];if(d.call(u)==="[object Array]"){Array.prototype.push.apply(r,u)}else{if(typeof u.length==="number"){for(var s=0,e=u.length;s<e;s++){r.push(u[s])}}else{for(var s=0;u[s];s++){r.push(u[s])}}}return r}}var c;if(document.documentElement.compareDocumentPosition){c=function(r,e){var s=r.compareDocumentPosition(e)&4?-1:r===e?0:1;if(s===0){n=true}return s}}else{if("sourceIndex" in document.documentElement){c=function(r,e){var s=r.sourceIndex-e.sourceIndex;if(s===0){n=true}return s}}else{if(document.createRange){c=function(t,r){var s=t.ownerDocument.createRange(),e=r.ownerDocument.createRange();s.setStart(t,0);s.setEnd(t,0);e.setStart(r,0);e.setEnd(r,0);var u=s.compareBoundaryPoints(Range.START_TO_END,e);if(u===0){n=true}return u}}}}(function(){var r=document.createElement("div"),s="script"+(new Date).getTime();r.innerHTML="<a name='"+s+"'/>";var e=document.documentElement;e.insertBefore(r,e.firstChild);if(!!document.getElementById(s)){f.find.ID=function(u,v,x){if(typeof v.getElementById!=="undefined"&&!x){var t=v.getElementById(u[1]);return t?t.id===u[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===u[1]?[t]:undefined:[]}};f.filter.ID=function(v,t){var u=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&u&&u.nodeValue===t}}e.removeChild(r)})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){f.find.TAG=function(r,v){var u=v.getElementsByTagName(r[1]);if(r[1]==="*"){var t=[];for(var s=0;u[s];s++){if(u[s].nodeType===1){t.push(u[s])}}u=t}return u}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(r){return r.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var e=b,s=document.createElement("div");s.innerHTML="<p class='TEST'></p>";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}b=function(x,v,t,u){v=v||document;if(!u&&v.nodeType===9&&!o(v)){try{return a(v.querySelectorAll(x),t)}catch(y){}}return e(x,v,t,u)};for(var r in e){b[r]=e[r]}})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(r,s,t){if(typeof s.getElementsByClassName!=="undefined"&&!t){return s.getElementsByClassName(r[1])}}})()}function m(r,x,v,B,y,A){var z=r=="previousSibling"&&!A;for(var t=0,s=B.length;t<s;t++){var e=B[t];if(e){if(z&&e.nodeType===1){e.sizcache=v;e.sizset=t}e=e[r];var u=false;while(e){if(e.sizcache===v){u=B[e.sizset];break}if(e.nodeType===1&&!A){e.sizcache=v;e.sizset=t}if(e.nodeName===x){u=e;break}e=e[r]}B[t]=u}}}function q(r,x,v,B,y,A){var z=r=="previousSibling"&&!A;for(var t=0,s=B.length;t<s;t++){var e=B[t];if(e){if(z&&e.nodeType===1){e.sizcache=v;e.sizset=t}e=e[r];var u=false;while(e){if(e.sizcache===v){u=B[e.sizset];break}if(e.nodeType===1){if(!A){e.sizcache=v;e.sizset=t}if(typeof x!=="string"){if(e===x){u=true;break}}else{if(b.filter(x,[e]).length>0){u=e;break}}}e=e[r]}B[t]=u}}}var h=document.compareDocumentPosition?function(r,e){return r.compareDocumentPosition(e)&16}:function(r,e){return r!==e&&(r.contains?r.contains(e):true)};var o=function(e){return e.nodeType===9&&e.documentElement.nodeName!=="HTML"||!!e.ownerDocument&&e.ownerDocument.documentElement.nodeName!=="HTML"};var g=function(e,y){var t=[],u="",v,s=y.nodeType?[y]:y;while((v=f.match.PSEUDO.exec(e))){u+=v[0];e=e.replace(f.match.PSEUDO,"")}e=f.relative[e]?e+"*":e;for(var x=0,r=s.length;x<r;x++){b(e,s[x],t)}return b.filter(u,t)};window.tinymce.dom.Sizzle=b})();(function(d){var f=d.each,c=d.DOM,b=d.isIE,e=d.isWebKit,a;d.create("tinymce.dom.EventUtils",{EventUtils:function(){this.inits=[];this.events=[]},add:function(m,p,l,j){var g,h=this,i=h.events,k;if(p instanceof Array){k=[];f(p,function(o){k.push(h.add(m,o,l,j))});return k}if(m&&m.hasOwnProperty&&m instanceof Array){k=[];f(m,function(n){n=c.get(n);k.push(h.add(n,p,l,j))});return k}m=c.get(m);if(!m){return}g=function(n){if(h.disabled){return}n=n||window.event;if(n&&b){if(!n.target){n.target=n.srcElement}d.extend(n,h._stoppers)}if(!j){return l(n)}return l.call(j,n)};if(p=="unload"){d.unloads.unshift({func:g});return g}if(p=="init"){if(h.domLoaded){g()}else{h.inits.push(g)}return g}i.push({obj:m,name:p,func:l,cfunc:g,scope:j});h._add(m,p,g);return l},remove:function(l,m,k){var h=this,g=h.events,i=false,j;if(l&&l.hasOwnProperty&&l instanceof Array){j=[];f(l,function(n){n=c.get(n);j.push(h.remove(n,m,k))});return j}l=c.get(l);f(g,function(o,n){if(o.obj==l&&o.name==m&&(!k||(o.func==k||o.cfunc==k))){g.splice(n,1);h._remove(l,m,o.cfunc);i=true;return false}});return i},clear:function(l){var j=this,g=j.events,h,k;if(l){l=c.get(l);for(h=g.length-1;h>=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},destroy:function(){var g=this;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(h){var g=this;if(g.domLoaded){return}g.domLoaded=true;f(g.inits,function(i){i()});g.inits=[]},_wait:function(i){var g=this,h=i.document;if(i.tinyMCE_GZ&&tinyMCE_GZ.loaded){g.domLoaded=1;return}if(h.attachEvent){h.attachEvent("onreadystatechange",function(){if(h.readyState==="complete"){h.detachEvent("onreadystatechange",arguments.callee);g._pageInit(i)}});if(h.documentElement.doScroll&&i==i.top){(function(){if(g.domLoaded){return}try{h.documentElement.doScroll("left")}catch(j){setTimeout(arguments.callee,0);return}g._pageInit(i)})()}}else{if(h.addEventListener){g._add(i,"DOMContentLoaded",function(){g._pageInit(i)})}}g._add(i,"load",function(){g._pageInit(i)})},_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});a=d.dom.Event=new d.dom.EventUtils();a._wait(window);d.addUnload(function(){a.destroy()})})(tinymce);(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(c){function e(f){return f.replace(/[\n\r]+/g,"")}var b=c.is,a=c.isIE,d=c.each;c.create("tinymce.dom.Selection",{Selection:function(i,h,g){var f=this;f.dom=i;f.win=h;f.serializer=g;d(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(j){f[j]=new c.util.Dispatcher(f)});if(!f.win.getSelection){f.tridentSel=new c.dom.TridentSelection(f)}c.addUnload(f.destroy,f)},getContent:function(g){var f=this,h=f.getRng(),l=f.dom.create("body"),j=f.getSel(),i,k,m;g=g||{};i=k="";g.get=true;g.format=g.format||"html";f.onBeforeGetContent.dispatch(f,g);if(g.format=="text"){return f.isCollapsed()?"":(h.text||(j.toString?j.toString():""))}if(h.cloneContents){m=h.cloneContents();if(m){l.appendChild(m)}}else{if(b(h.item)||b(h.htmlText)){l.innerHTML=h.item?h.item(0).outerHTML:h.htmlText}else{l.innerHTML=h.toString()}}if(/^\s/.test(l.innerHTML)){i=" "}if(/\s+$/.test(l.innerHTML)){k=" "}g.getInner=true;g.content=f.isCollapsed()?"":i+f.serializer.serialize(l,g)+k;f.onGetContent.dispatch(f,g);return g.content},setContent:function(i,g){var f=this,j=f.getRng(),l,k=f.win.document;g=g||{format:"html"};g.set=true;i=g.content=f.dom.processHTML(i);f.onBeforeSetContent.dispatch(f,g);i=g.content;if(j.insertNode){i+='<span id="__caret">_</span>';if(j.startContainer==k&&j.endContainer==k){k.body.innerHTML=i}else{j.deleteContents();j.insertNode(f.getRng().createContextualFragment(i))}l=f.dom.get("__caret");j=k.createRange();j.setStartBefore(l);j.setEndBefore(l);f.setRng(j);f.dom.remove("__caret")}else{if(j.item){k.execCommand("Delete",false,null);j=f.getRng()}j.pasteHTML(i)}f.onSetContent.dispatch(f,g)},getStart:function(){var f=this,g=f.getRng(),h;if(a){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(1);h=g.parentElement();if(h&&h.nodeName=="BODY"){return h.firstChild||h}return h}else{h=g.startContainer;if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[Math.min(h.childNodes.length-1,g.startOffset)]}if(h&&h.nodeType==3){return h.parentNode}return h}},getEnd:function(){var g=this,h=g.getRng(),i,f;if(a){if(h.item){return h.item(0)}h=h.duplicate();h.collapse(0);i=h.parentElement();if(i&&i.nodeName=="BODY"){return i.lastChild||i}return i}else{i=h.endContainer;f=h.endOffset;if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[f>0?f-1:f]}if(i&&i.nodeType==3){return i.parentNode}return i}},getBookmark:function(q,r){var u=this,m=u.dom,g,j,i,n,h,o,p,l="\uFEFF",s;function f(v,x){var t=0;d(m.select(v),function(z,y){if(z==x){t=y}});return t}if(q==2){function k(){var v=u.getRng(true),t=m.getRoot(),x={};function y(z,B){var F=[],D,H,A=z[B?"startContainer":"endContainer"],E=z[B?"startOffset":"endOffset"],C,G={};if(A.nodeType==1&&A.hasChildNodes()){H=A.childNodes.length-1;G.exclude=(B&&E>H)||(!B&&E==0);if(!B&&E){E--}A=A.childNodes[E>H?H:E];if(A.nodeType==3){E=B?0:A.nodeValue.length}}if(A.nodeType==3){if(r){for(D=A.previousSibling;D&&D.nodeType==3;D=D.previousSibling){E+=D.nodeValue.length}}G.offset=E}for(;A&&A!=t;A=A.parentNode){F.push(u.dom.nodeIndex(A,r))}G.indexes=F;return G}x.start=y(v,true);if(!u.isCollapsed()){x.end=y(v)}return x}return k()}if(q){return{rng:u.getRng()}}g=u.getRng();i=m.uniqueId();n=tinyMCE.activeEditor.selection.isCollapsed();s="overflow:hidden;line-height:0px";if(g.duplicate||g.item){if(!g.item){j=g.duplicate();g.collapse();g.pasteHTML('<span _mce_type="bookmark" id="'+i+'_start" style="'+s+'">'+l+"</span>");if(!n){j.collapse(false);j.pasteHTML('<span _mce_type="bookmark" id="'+i+'_end" style="'+s+'">'+l+"</span>")}}else{o=g.item(0);h=o.nodeName;return{name:h,index:f(h,o)}}}else{o=u.getNode();h=o.nodeName;if(h=="IMG"){return{name:h,index:f(h,o)}}j=g.cloneRange();if(!n){j.collapse(false);j.insertNode(m.create("span",{_mce_type:"bookmark",id:i+"_end",style:s},l))}g.collapse(true);g.insertNode(m.create("span",{_mce_type:"bookmark",id:i+"_start",style:s},l))}u.moveToBookmark({id:i,keep:1});return{id:i}},moveToBookmark:function(l){var n=this,k=n.dom,i,h,f,m;if(n.tridentSel){n.tridentSel.destroy()}if(l){if(l.start){f=k.createRng();m=k.getRoot();function g(s){var o=l[s?"start":"end"],p,q,r;if(o){for(q=m,p=o.indexes.length-1;p>=0;p--){q=q.childNodes[o.indexes[p]]||q}if(s){if(q.nodeType==3&&o.offset){f.setStart(q,o.offset)}else{if(o.exclude){f.setStartAfter(q)}else{f.setStartBefore(q)}}}else{if(q.nodeType==3&&o.offset){f.setEnd(q,o.offset)}else{if(o.exclude){f.setEndBefore(q)}else{f.setEndAfter(q)}}}}}g(true);g();n.setRng(f)}else{if(l.id){f=k.createRng();function j(u){var p=k.get(l.id+"_"+u),t,o,r,s,q=l.keep;if(p){t=p.parentNode;if(u=="start"){if(!q){o=k.nodeIndex(p);if(o>0){o++}}else{t=p;o=1}f.setStart(t,o);f.setEnd(t,o)}else{if(!q){o=k.nodeIndex(p)}else{t=p;o=1}f.setEnd(t,o)}if(!q){s=p.previousSibling;r=p.nextSibling;d(c.grep(p.childNodes),function(v){if(v.nodeType==3){v.nodeValue=v.nodeValue.replace(/\uFEFF/g,"")}});while(p=k.get(l.id+"_"+u)){k.remove(p,1)}if(s&&r&&s.nodeType==r.nodeType&&s.nodeType==3){o=s.nodeValue.length;s.appendData(r.nodeValue);k.remove(r);if(u=="start"){f.setStart(s,o);f.setEnd(s,o)}else{f.setEnd(s,o)}}}}}j("start");j("end");n.setRng(f)}else{if(l.name){n.select(k.select(l.name)[l.index])}else{if(l.rng){n.setRng(l.rng)}}}}}},select:function(k,j){var i=this,l=i.dom,g=l.createRng(),f;f=l.nodeIndex(k);g.setStart(k.parentNode,f);g.setEnd(k.parentNode,f+1);if(j){function h(m,o){var n=new c.dom.TreeWalker(m,m);do{if(m.nodeType==3&&c.trim(m.nodeValue).length!=0){if(o){g.setStart(m,0)}else{g.setEnd(m,m.nodeValue.length)}return}if(m.nodeName=="BR"){if(o){g.setStartBefore(m)}else{g.setEndBefore(m)}return}}while(m=(o?n.next():n.prev()))}h(k,1);h(k)}i.setRng(g);return k},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}if(h.compareEndPoints){return h.compareEndPoints("StartToEnd",h)===0}return !g||h.collapsed},collapse:function(f){var g=this,h=g.getRng(),i;if(h.item){i=h.item(0);h=this.win.document.body.createTextRange();h.moveToElementText(i)}h.collapse(!!f);g.setRng(h)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(j){var g=this,h,i;if(j&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():g.win.document.createRange())}}catch(f){}if(!i){i=a?g.win.document.body.createTextRange():g.win.document.createRange()}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){h.removeAllRanges();h.addRange(i)}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var g=this,f=g.getRng(),h=g.getSel(),i;if(!a){if(!f){return g.dom.getRoot()}i=f.commonAncestorContainer;if(!f.collapsed){if(f.startContainer==f.endContainer){if(f.startOffset-f.endOffset<2){if(f.startContainer.hasChildNodes()){i=f.startContainer.childNodes[f.startOffset]}}}if(c.isWebKit&&h.anchorNode&&h.anchorNode.nodeType==1){return h.anchorNode.childNodes[h.anchorOffset]}}if(i&&i.nodeType==3){return i.parentNode}return i}return f.item?f.item(0):f.parentElement()},getSelectedBlocks:function(g,f){var i=this,j=i.dom,m,h,l,k=[];m=j.getParent(g||i.getStart(),j.isBlock);h=j.getParent(f||i.getEnd(),j.isBlock);if(m){k.push(m)}if(m&&h&&m!=h){l=m;while((l=l.nextSibling)&&l!=h){if(j.isBlock(l)){k.push(l)}}}if(h&&m!=h){k.push(h)}return k},destroy:function(g){var f=this;f.win=null;if(f.tridentSel){f.tridentSel.destroy()}if(!g){c.removeUnload(f.destroy)}}})})(tinymce);(function(a){a.create("tinymce.dom.XMLWriter",{node:null,XMLWriter:function(c){function b(){var e=document.implementation;if(!e||!e.createDocument){try{return new ActiveXObject("MSXML2.DOMDocument")}catch(d){}try{return new ActiveXObject("Microsoft.XmlDom")}catch(d){}}else{return e.createDocument("","",null)}}this.doc=b();this.valid=a.isOpera||a.isWebKit;this.reset()},reset:function(){var b=this,c=b.doc;if(c.firstChild){c.removeChild(c.firstChild)}b.node=c.appendChild(c.createElement("html"))},writeStartElement:function(c){var b=this;b.node=b.node.appendChild(b.doc.createElement(c))},writeAttribute:function(c,b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.setAttribute(c,b)},writeEndElement:function(){this.node=this.node.parentNode},writeFullEndElement:function(){var b=this,c=b.node;c.appendChild(b.doc.createTextNode(""));b.node=c.parentNode},writeText:function(b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.appendChild(this.doc.createTextNode(b))},writeCDATA:function(b){this.node.appendChild(this.doc.createCDATASection(b))},writeComment:function(b){if(a.isIE){b=b.replace(/^\-|\-$/g," ")}this.node.appendChild(this.doc.createComment(b.replace(/\-\-/g," ")))},getContent:function(){var b;b=this.doc.xml||new XMLSerializer().serializeToString(this.doc);b=b.replace(/<\?[^?]+\?>|<html>|<\/html>|<html\/>|<!DOCTYPE[^>]+>/g,"");b=b.replace(/ ?\/>/g," />");if(this.valid){b=b.replace(/\%MCGT%/g,">")}return b}})})(tinymce);(function(a){a.create("tinymce.dom.StringWriter",{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(b){this.settings=a.extend({indent_char:" ",indentation:0},b);this.reset()},reset:function(){this.indent="";this.str="";this.tags=[];this.count=0},writeStartElement:function(b){this._writeAttributesEnd();this.writeRaw("<"+b);this.tags.push(b);this.inAttr=true;this.count++;this.elementCount=this.count},writeAttribute:function(d,b){var c=this;c.writeRaw(" "+c.encode(d)+'="'+c.encode(b)+'"')},writeEndElement:function(){var b;if(this.tags.length>0){b=this.tags.pop();if(this._writeAttributesEnd(1)){this.writeRaw("</"+b+">")}if(this.settings.indentation>0){this.writeRaw("\n")}}},writeFullEndElement:function(){if(this.tags.length>0){this._writeAttributesEnd();this.writeRaw("</"+this.tags.pop()+">");if(this.settings.indentation>0){this.writeRaw("\n")}}},writeText:function(b){this._writeAttributesEnd();this.writeRaw(this.encode(b));this.count++},writeCDATA:function(b){this._writeAttributesEnd();this.writeRaw("<![CDATA["+b+"]]>");this.count++},writeComment:function(b){this._writeAttributesEnd();this.writeRaw("<!-- "+b+"-->");this.count++},writeRaw:function(b){this.str+=b},encode:function(b){return b.replace(/[<>&"]/g,function(c){switch(c){case"<":return"<";case">":return">";case"&":return"&";case'"':return"""}return c})},getContent:function(){return this.str},_writeAttributesEnd:function(b){if(!this.inAttr){return}this.inAttr=false;if(b&&this.elementCount==this.count){this.writeRaw(" />");return false}this.writeRaw(">");return true}})})(tinymce);(function(e){var g=e.extend,f=e.each,b=e.util.Dispatcher,d=e.isIE,a=e.isGecko;function c(h){return h.replace(/([?+*])/g,".$1")}e.create("tinymce.dom.Serializer",{Serializer:function(j){var i=this;i.key=0;i.onPreProcess=new b(i);i.onPostProcess=new b(i);try{i.writer=new e.dom.XMLWriter()}catch(h){i.writer=new e.dom.StringWriter()}i.settings=j=g({dom:e.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(_mce_|_moz_|sizset|sizcache)/,closed:/^(br|hr|input|meta|img|link|param|area)$/,entity_encoding:"named",entities:"160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro",valid_elements:"*[*]",extended_valid_elements:0,invalid_elements:0,fix_table_elements:1,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,apply_source_formatting:0,indent_mode:"simple",indent_char:"\t",indent_levels:1,remove_linebreaks:1,remove_redundant_brs:1,element_format:"xhtml"},j);i.dom=j.dom;i.schema=j.schema;if(j.entity_encoding=="named"&&!j.entities){j.entity_encoding="raw"}if(j.remove_redundant_brs){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/(<br \/>\s*)+<\/(p|h[1-6]|div|li)>/gi,function(n,m,o){if(/^<br \/>\s*<\//.test(n)){return"</"+o+">"}return n})})}if(j.element_format=="html"){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/<([^>]+) \/>/g,"<$1>")})}if(j.fix_list_elements){i.onPreProcess.add(function(v,s){var l,z,y=["ol","ul"],u,t,q,k=/^(OL|UL)$/,A;function m(r,x){var o=x.split(","),p;while((r=r.previousSibling)!=null){for(p=0;p<o.length;p++){if(r.nodeName==o[p]){return r}}}return null}for(z=0;z<y.length;z++){l=i.dom.select(y[z],s.node);for(u=0;u<l.length;u++){t=l[u];q=t.parentNode;if(k.test(q.nodeName)){A=m(t,"LI");if(!A){A=i.dom.create("li");A.innerHTML=" ";A.appendChild(t);q.insertBefore(A,q.firstChild)}else{A.appendChild(t)}}}}})}if(j.fix_table_elements){i.onPreProcess.add(function(k,l){if(!e.isOpera||opera.buildNumber()>=1767){f(i.dom.select("p table",l.node).reverse(),function(p){var o=i.dom.getParent(p.parentNode,"table,p");if(o.nodeName!="TABLE"){try{i.dom.split(o,p)}catch(m){}}})}})}},setEntities:function(o){var n=this,j,m,h={},k;if(n.entityLookup){return}j=o.split(",");for(m=0;m<j.length;m+=2){k=j[m];if(k==34||k==38||k==60||k==62){continue}h[String.fromCharCode(j[m])]=j[m+1];k=parseInt(j[m]).toString(16)}n.entityLookup=h},setRules:function(i){var h=this;h._setup();h.rules={};h.wildRules=[];h.validElements={};return h.addRules(i)},addRules:function(i){var h=this,j;if(!i){return}h._setup();f(i.split(","),function(m){var q=m.split(/\[|\]/),l=q[0].split("/"),r,k,o,n=[];if(j){k=e.extend([],j.attribs)}if(q.length>1){f(q[1].split("|"),function(u){var p={},t;k=k||[];u=u.replace(/::/g,"~");u=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(u);u[2]=u[2].replace(/~/g,":");if(u[1]=="!"){r=r||[];r.push(u[2])}if(u[1]=="-"){for(t=0;t<k.length;t++){if(k[t].name==u[2]){k.splice(t,1);return}}}switch(u[3]){case"=":p.defaultVal=u[4]||"";break;case":":p.forcedVal=u[4];break;case"<":p.validVals=u[4].split("?");break}if(/[*.?]/.test(u[2])){o=o||[];p.nameRE=new RegExp("^"+c(u[2])+"$");o.push(p)}else{p.name=u[2];k.push(p)}n.push(u[2])})}f(l,function(v,u){var y=v.charAt(0),t=1,p={};if(j){if(j.noEmpty){p.noEmpty=j.noEmpty}if(j.fullEnd){p.fullEnd=j.fullEnd}if(j.padd){p.padd=j.padd}}switch(y){case"-":p.noEmpty=true;break;case"+":p.fullEnd=true;break;case"#":p.padd=true;break;default:t=0}l[u]=v=v.substring(t);h.validElements[v]=1;if(/[*.?]/.test(l[0])){p.nameRE=new RegExp("^"+c(l[0])+"$");h.wildRules=h.wildRules||{};h.wildRules.push(p)}else{p.name=l[0];if(l[0]=="@"){j=p}h.rules[v]=p}p.attribs=k;if(r){p.requiredAttribs=r}if(o){v="";f(n,function(s){if(v){v+="|"}v+="("+c(s)+")"});p.validAttribsRE=new RegExp("^"+v.toLowerCase()+"$");p.wildAttribs=o}})});i="";f(h.validElements,function(m,l){if(i){i+="|"}if(l!="@"){i+=l}});h.validElementsRE=new RegExp("^("+c(i.toLowerCase())+")$")},findRule:function(m){var j=this,l=j.rules,h,k;j._setup();k=l[m];if(k){return k}l=j.wildRules;for(h=0;h<l.length;h++){if(l[h].nameRE.test(m)){return l[h]}}return null},findAttribRule:function(h,l){var j,k=h.wildAttribs;for(j=0;j<k.length;j++){if(k[j].nameRE.test(l)){return k[j]}}return null},serialize:function(r,q){var m,k=this,p,i,j,l;k._setup();q=q||{};q.format=q.format||"html";k.processObj=q;if(d){l=[];f(r.getElementsByTagName("option"),function(o){var h=k.dom.getAttrib(o,"selected");l.push(h?h:null)})}r=r.cloneNode(true);if(d){f(r.getElementsByTagName("option"),function(o,h){k.dom.setAttrib(o,"selected",l[h])})}j=r.ownerDocument.implementation;if(j.createHTMLDocument&&(e.isOpera&&opera.buildNumber()>=1767)){p=j.createHTMLDocument("");f(r.nodeName=="BODY"?r.childNodes:[r],function(h){p.body.appendChild(p.importNode(h,true))});if(r.nodeName!="BODY"){r=p.body.firstChild}else{r=p.body}i=k.dom.doc;k.dom.doc=p}k.key=""+(parseInt(k.key)+1);if(!q.no_events){q.node=r;k.onPreProcess.dispatch(k,q)}k.writer.reset();k._info=q;k._serializeNode(r,q.getInner);q.content=k.writer.getContent();if(i){k.dom.doc=i}if(!q.no_events){k.onPostProcess.dispatch(k,q)}k._postProcess(q);q.node=null;return e.trim(q.content)},_postProcess:function(n){var i=this,k=i.settings,j=n.content,m=[],l;if(n.format=="html"){l=i._protect({content:j,patterns:[{pattern:/(<script[^>]*>)(.*?)(<\/script>)/g},{pattern:/(<noscript[^>]*>)(.*?)(<\/noscript>)/g},{pattern:/(<style[^>]*>)(.*?)(<\/style>)/g},{pattern:/(<pre[^>]*>)(.*?)(<\/pre>)/g,encode:1},{pattern:/(<!--\[CDATA\[)(.*?)(\]\]-->)/g}]});j=l.content;if(k.entity_encoding!=="raw"){j=i._encode(j)}if(!n.set){j=j.replace(/<p>\s+<\/p>|<p([^>]+)>\s+<\/p>/g,k.entity_encoding=="numeric"?"<p$1> </p>":"<p$1> </p>");if(k.remove_linebreaks){j=j.replace(/\r?\n|\r/g," ");j=j.replace(/(<[^>]+>)\s+/g,"$1 ");j=j.replace(/\s+(<\/[^>]+>)/g," $1");j=j.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object) ([^>]+)>\s+/g,"<$1 $2>");j=j.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>\s+/g,"<$1>");j=j.replace(/\s+<\/(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>/g,"</$1>")}if(k.apply_source_formatting&&k.indent_mode=="simple"){j=j.replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,"\n<$1$2$3>\n");j=j.replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,"\n<$1$2>");j=j.replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,"</$1>\n");j=j.replace(/\n\n/g,"\n")}}j=i._unprotect(j,l);j=j.replace(/<!--\[CDATA\[([\s\S]+)\]\]-->/g,"<![CDATA[$1]]>");if(k.entity_encoding=="raw"){j=j.replace(/<p> <\/p>|<p([^>]+)> <\/p>/g,"<p$1>\u00a0</p>")}j=j.replace(/<noscript([^>]+|)>([\s\S]*?)<\/noscript>/g,function(h,p,o){return"<noscript"+p+">"+i.dom.decode(o.replace(/<!--|-->/g,""))+"</noscript>"})}n.content=j},_serializeNode:function(D,I){var z=this,A=z.settings,x=z.writer,q,j,u,F,E,H,B,h,y,k,r,C,p,m,G,o;if(!A.node_filter||A.node_filter(D)){switch(D.nodeType){case 1:if(D.hasAttribute?D.hasAttribute("_mce_bogus"):D.getAttribute("_mce_bogus")){return}p=G=false;q=D.hasChildNodes();k=D.getAttribute("_mce_name")||D.nodeName.toLowerCase();o=D.getAttribute("_mce_type");if(o){if(!z._info.cleanup){p=true;return}else{G=1}}if(d){if(D.scopeName!=="HTML"&&D.scopeName!=="html"){k=D.scopeName+":"+k}}if(k.indexOf("mce:")===0){k=k.substring(4)}if(!G){if(!z.validElementsRE||!z.validElementsRE.test(k)||(z.invalidElementsRE&&z.invalidElementsRE.test(k))||I){p=true;break}}if(d){if(A.fix_content_duplication){if(D._mce_serialized==z.key){return}D._mce_serialized=z.key}if(k.charAt(0)=="/"){k=k.substring(1)}}else{if(a){if(D.nodeName==="BR"&&D.getAttribute("type")=="_moz"){return}}}if(A.validate_children){if(z.elementName&&!z.schema.isValid(z.elementName,k)){p=true;break}z.elementName=k}r=z.findRule(k);k=r.name||k;m=A.closed.test(k);if((!q&&r.noEmpty)||(d&&!k)){p=true;break}if(r.requiredAttribs){H=r.requiredAttribs;for(F=H.length-1;F>=0;F--){if(this.dom.getAttrib(D,H[F])!==""){break}}if(F==-1){p=true;break}}x.writeStartElement(k);if(r.attribs){for(F=0,B=r.attribs,E=B.length;F<E;F++){H=B[F];y=z._getAttrib(D,H);if(y!==null){x.writeAttribute(H.name,y)}}}if(r.validAttribsRE){B=z.dom.getAttribs(D);for(F=B.length-1;F>-1;F--){h=B[F];if(h.specified){H=h.nodeName.toLowerCase();if(A.invalid_attrs.test(H)||!r.validAttribsRE.test(H)){continue}C=z.findAttribRule(r,H);y=z._getAttrib(D,C,H);if(y!==null){x.writeAttribute(H,y)}}}}if(o&&G){x.writeAttribute("_mce_type",o)}if(k==="script"&&e.trim(D.innerHTML)){x.writeText("// ");x.writeCDATA(D.innerHTML.replace(/<!--|-->|<\[CDATA\[|\]\]>/g,""));q=false;break}if(r.padd){if(q&&(u=D.firstChild)&&u.nodeType===1&&D.childNodes.length===1){if(u.hasAttribute?u.hasAttribute("_mce_bogus"):u.getAttribute("_mce_bogus")){x.writeText("\u00a0")}}else{if(!q){x.writeText("\u00a0")}}}break;case 3:if(A.validate_children&&z.elementName&&!z.schema.isValid(z.elementName,"#text")){return}return x.writeText(D.nodeValue);case 4:return x.writeCDATA(D.nodeValue);case 8:return x.writeComment(D.nodeValue)}}else{if(D.nodeType==1){q=D.hasChildNodes()}}if(q&&!m){u=D.firstChild;while(u){z._serializeNode(u);z.elementName=k;u=u.nextSibling}}if(!p){if(!m){x.writeFullEndElement()}else{x.writeEndElement()}}},_protect:function(j){var i=this;j.items=j.items||[];function h(l){return l.replace(/[\r\n\\]/g,function(m){if(m==="\n"){return"\\n"}else{if(m==="\\"){return"\\\\"}}return"\\r"})}function k(l){return l.replace(/\\[\\rn]/g,function(m){if(m==="\\n"){return"\n"}else{if(m==="\\\\"){return"\\"}}return"\r"})}f(j.patterns,function(l){j.content=k(h(j.content).replace(l.pattern,function(n,o,m,p){m=k(m);if(l.encode){m=i._encode(m)}j.items.push(m);return o+"<!--mce:"+(j.items.length-1)+"-->"+p}))});return j},_unprotect:function(i,j){i=i.replace(/\<!--mce:([0-9]+)--\>/g,function(k,h){return j.items[parseInt(h)]});j.items=[];return i},_encode:function(m){var j=this,k=j.settings,i;if(k.entity_encoding!=="raw"){if(k.entity_encoding.indexOf("named")!=-1){j.setEntities(k.entities);i=j.entityLookup;m=m.replace(/[\u007E-\uFFFF]/g,function(h){var l;if(l=i[h]){h="&"+l+";"}return h})}if(k.entity_encoding.indexOf("numeric")!=-1){m=m.replace(/[\u007E-\uFFFF]/g,function(h){return"&#"+h.charCodeAt(0)+";"})}}return m},_setup:function(){var h=this,i=this.settings;if(h.done){return}h.done=1;h.setRules(i.valid_elements);h.addRules(i.extended_valid_elements);if(i.invalid_elements){h.invalidElementsRE=new RegExp("^("+c(i.invalid_elements.replace(/,/g,"|").toLowerCase())+")$")}if(i.attrib_value_filter){h.attribValueFilter=i.attribValueFilter}},_getAttrib:function(m,j,h){var l,k;h=h||j.name;if(j.forcedVal&&(k=j.forcedVal)){if(k==="{$uid}"){return this.dom.uniqueId()}return k}k=this.dom.getAttrib(m,h);switch(h){case"rowspan":case"colspan":if(k=="1"){k=""}break}if(this.attribValueFilter){k=this.attribValueFilter(h,k,m)}if(j.validVals){for(l=j.validVals.length-1;l>=0;l--){if(k==j.validVals[l]){break}}if(l==-1){return null}}if(k===""&&typeof(j.defaultVal)!="undefined"){k=j.defaultVal;if(k==="{$uid}"){return this.dom.uniqueId()}return k}else{if(h=="class"&&this.processObj.get){k=k.replace(/\s?mceItem\w+\s?/g,"")}}if(k===""){return null}return k}})})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],f={},d=[],g=0,e;function b(m,u){var v=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}u()}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){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(x){var t=q.create("script",{type:"text/javascript"});t.text=x;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()}});return}}s=q.create("script",{id:n,type:"text/javascript",src:a._addVer(m)});s.onload=p;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==e){j.push(m);l[m]=c}if(q){if(!f[m]){f[m]=[]}f[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){function n(r){a.each(f[r],function(s){s.func.call(s.scope)});f[r]=e}d.push({func:q,scope:p||this});(function o(){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}})()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);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","lastSibling",e))}};(function(){var a={};function b(f,e){var d;function c(g){return g.replace(/[A-Z]+/g,function(h){return c(f[h])})}for(d in f){if(f.hasOwnProperty(d)){f[d]=c(f[d])}}c(e).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]/g,function(l,g,j){var h,k={};j=j.split(/\|/);for(h=j.length-1;h>=0;h--){k[j[h]]=1}a[g]=k})}b({Z:"#|H|K|N|O|P",Y:"#|X|form|R|Q",X:"p|T|div|U|W|isindex|fieldset|table",W:"pre|hr|blockquote|address|center|noframes",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"},"script[]style[]object[#|param|X|form|a|H|K|N|O|Q]param[]p[S]a[Z]br[]span[S]bdo[S]applet[#|param|X|form|a|H|K|N|O|Q]h1[S]img[]map[X|form|Q|area]h2[S]iframe[#|X|form|a|H|K|N|O|Q]h3[S]tt[S]i[S]b[S]u[S]s[S]strike[S]big[S]small[S]font[S]basefont[]em[S]strong[S]dfn[S]code[S]q[S]samp[S]kbd[S]var[S]cite[S]abbr[S]acronym[S]sub[S]sup[S]input[]select[optgroup|option]optgroup[option]option[]textarea[]label[S]button[#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[S]ins[#|X|form|a|H|K|N|O|Q]h5[S]del[#|X|form|a|H|K|N|O|Q]h6[S]div[#|X|form|a|H|K|N|O|Q]ul[li]li[#|X|form|a|H|K|N|O|Q]ol[li]dl[dt|dd]dt[S]dd[#|X|form|a|H|K|N|O|Q]menu[li]dir[li]pre[ZA]hr[]blockquote[#|X|form|a|H|K|N|O|Q]address[S|p]center[#|X|form|a|H|K|N|O|Q]noframes[#|X|form|a|H|K|N|O|Q]isindex[]fieldset[#|legend|X|form|a|H|K|N|O|Q]legend[S]table[caption|col|colgroup|thead|tfoot|tbody|tr]caption[S]col[]colgroup[col]thead[tr]tr[th|td]th[#|X|form|a|H|K|N|O|Q]form[#|X|a|H|K|N|O|Q]noscript[#|X|form|a|H|K|N|O|Q]td[#|X|form|a|H|K|N|O|Q]tfoot[tr]tbody[tr]area[]base[]body[#|X|form|a|H|K|N|O|Q]");tinymce.dom.Schema=function(){var c=this,d=a;c.isValid=function(f,e){var g=d[f];return !!(g&&(!e||g[e]))}}})();(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,r){var h=d.startContainer,k=d.startOffset,s=d.endContainer,l=d.endOffset,i,f,n,g,q,p,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(t){r([t])});return}function o(v,u,t){var x=[];for(;v&&v!=t;v=v[u]){x.push(v)}return x}function m(u,t){do{if(u.parentNode==t){return u}u=u.parentNode}while(u)}function j(v,u,x){var t=x?"nextSibling":"previousSibling";for(g=v,q=g.parentNode;g&&g!=u;g=q){q=g.parentNode;p=o(g==v?g:g[t],t);if(p.length){if(!x){p.reverse()}r(p)}}}if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[k]}if(s.nodeType==1&&s.hasChildNodes()){s=s.childNodes[Math.min(k==l?l:l-1,s.childNodes.length-1)]}i=c.findCommonAncestor(h,s);if(h==s){return r([h])}for(g=h;g;g=g.parentNode){if(g==s){return j(h,i,true)}if(g==i){break}}for(g=s;g;g=g.parentNode){if(g==h){return j(s,i)}if(g==i){break}}f=m(h,i)||h;n=m(s,i)||s;j(h,f,true);p=o(f==h?f:f.nextSibling,"nextSibling",n==s?n.nextSibling:n);if(p.length){r(p)}j(s,n)}}})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(e,d){this.id=e;this.settings=d=d||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=d.scope||this;this.disabled=0;this.active=0},setDisabled:function(d){var f;if(d!=this.disabled){f=b.get(this.id);if(f&&this.settings.unavailable_prefix){if(d){this.prevTitle=f.title;f.title=this.settings.unavailable_prefix+": "+f.title}else{f.title=this.prevTitle}}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}},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(b,a){this.parent(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"},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix})}});(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.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;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},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.clientWidth,j.max_width):g.clientWidth;k=j.max_height?Math.min(g.clientHeight,j.max_height):g.clientHeight;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 a.cancel(s)}});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")}}})}z.onShowMenu.dispatch(z);if(A.keyboard_focus){a.add(o,"keydown",z._keyHandler,z);c.select("a","menu_"+z.id)[0].focus();z._focusIdx=0}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}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);a.remove(h,"mouseover",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);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",{id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000"});k=c.add(g,"div",{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",{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},_keyHandler:function(j){var i=this,h=j.keyCode;function g(m){var k=i._focusIdx+m,l=c.select("a","menu_"+i.id)[k];if(l){i._focusIdx=k;l.focus()}}switch(h){case 38:g(-1);return;case 40:g(1);return;case 13:return;case 27:return this.hideMenu()}},_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,"td");i=p=c.add(i,"a",{href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});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){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(d,c){this.parent(d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='<a id="'+this.id+'" href="javascript:;" class="'+f+" "+f+"Enabled "+e["class"]+(c?" "+f+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" title="'+a.encode(e.title)+'">';if(e.image){d+='<img class="mceIcon" src="'+e.image+'" />'+c+"</a>"}else{d+='<span class="mceIcon '+e["class"]+'"></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")+"</a>"}return d},postRender:function(){var c=this,d=c.settings;b.dom.Event.add(c.id,"click",function(f){if(!c.isDisabled()){return d.onclick.call(d.scope,f)}})}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(h,g){var f=this;f.parent(h,g);f.items=[];f.onChange=new a(f);f.onPostRender=new a(f);f.onAdd=new a(f);f.onRenderMenu=new d.util.Dispatcher(this);f.classPrefix="mceListBox"},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&h.call){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){var g=this,h,i;if(f!=g.selectedIndex){h=c.get(g.id+"_text");i=g.items[f];if(i){g.selectedValue=i.value;g.selectedIndex=f;c.setHTML(h,c.encode(i.title));c.removeClass(h,"mceTitle")}else{c.setHTML(h,c.encode(g.settings.title));c.addClass(h,"mceTitle");g.selectedValue=g.selectedIndex=null}h=0}},add:function(i,f,h){var g=this;h=h||{};h=d.extend(h,{title:i,value:f});g.items.push(h);g.onAdd.dispatch(g,h)},getLength:function(){return this.items.length},renderHTML:function(){var i="",f=this,g=f.settings,j=f.classPrefix;i='<table id="'+f.id+'" cellpadding="0" cellspacing="0" class="'+j+" "+j+"Enabled"+(g["class"]?(" "+g["class"]):"")+'"><tbody><tr>';i+="<td>"+c.createHTML("a",{id:f.id+"_text",href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},c.encode(f.settings.title))+"</td>";i+="<td>"+c.createHTML("a",{id:f.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},"<span></span>")+"</td>";i+="</tr></tbody></table>";return i},showMenu:function(){var g=this,j,i,h=c.get(this.id),f;if(g.isDisabled()||g.items.length==0){return}if(g.menu&&g.menu.isMenuVisible){return g.hideMenu()}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}j=c.getPos(this.settings.menu_container);i=c.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.keyboard_focus=!d.isOpera;if(g.oldID){f.items[g.oldID].setSelected(0)}e(g.items,function(k){if(k.value===g.selectedValue){f.items[k.id].setSelected(1);g.oldID=k.id}});f.showMenu(0,h.clientHeight);b.add(c.doc,"mousedown",g.hideMenu,g);c.addClass(g.id,g.classPrefix+"Selected")},hideMenu:function(g){var f=this;if(f.menu&&f.menu.isMenuVisible){if(g&&g.type=="mousedown"&&(g.target.id==f.id+"_text"||g.target.id==f.id+"_open")){return}if(!g||!c.getParent(g.target,".mceMenu")){c.removeClass(f.id,f.classPrefix+"Selected");b.remove(c.doc,"mousedown",f.hideMenu,f);f.menu.hideMenu()}}},renderMenu:function(){var g=this,f;f=g.settings.control_manager.createDropMenu(g.id+"_menu",{menu_line:1,"class":g.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});f.onHideMenu.add(g.hideMenu,g);f.add({title:g.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}});e(g.items,function(h){if(h.value===undefined){f.add({title:h.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}})}else{h.id=c.uniqueId();h.onclick=function(){if(g.settings.onselect(h.value)!==false){g.select(h.value)}};f.add(h)}});g.onRenderMenu.dispatch(g,f);g.menu=f},postRender:function(){var f=this,g=f.classPrefix;b.add(f.id,"click",f.showMenu,f);b.add(f.id+"_text","focus",function(h){if(!f._focused){f.keyDownHandler=b.add(f.id+"_text","keydown",function(l){var i=-1,j,k=l.keyCode;e(f.items,function(m,n){if(f.selectedValue==m.value){i=n}});if(k==38){j=f.items[i-1]}else{if(k==40){j=f.items[i+1]}else{if(k==13){j=f.selectedValue;f.selectedValue=null;f.settings.onselect(j);return b.cancel(l)}}}if(j){f.hideMenu();f.select(j.value)}})}f._focused=1});b.add(f.id+"_text","blur",function(){b.remove(f.id+"_text","keydown",f.keyDownHandler);f._focused=0});if(d.isIE6||!c.boxModel){b.add(f.id,"mouseover",function(){if(!c.hasClass(f.id,g+"Disabled")){c.addClass(f.id,g+"Hover")}});b.add(f.id,"mouseout",function(){if(!c.hasClass(f.id,g+"Disabled")){c.removeClass(f.id,g+"Hover")}})}f.onPostRender.dispatch(f,c.get(f.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(g,f){this.parent(g,f);this.classPrefix="mceNativeListBox"},setDisabled:function(f){c.get(this.id).disabled=f},isDisabled:function(){return c.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&h.call){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){c.get(this.id).selectedIndex=f+1;this.selectedValue=this.items[f]?this.items[f].value:null},add:function(j,g,f){var i,h=this;f=f||{};f.value=g;if(h.isRendered()){c.add(c.get(this.id),"option",f,j)}i={title:j,value:g,attribs:f};h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return c.get(this.id).options.length-1},renderHTML:function(){var g,f=this;g=c.createHTML("option",{value:""},"-- "+f.settings.title+" --");e(f.items,function(h){g+=c.createHTML("option",{value:h.value},h.title)});g=c.createHTML("select",{id:f.id,"class":"mceNativeListBox"},g);return g},postRender:function(){var g=this,h;g.rendered=true;function f(j){var i=g.items[j.target.selectedIndex-1];if(i&&(i=i.value)){g.onChange.dispatch(g,i);if(g.settings.onselect){g.settings.onselect(i)}}}b.add(g.id,"change",f);b.add(g.id,"keydown",function(j){var i;b.remove(g.id,"change",h);i=b.add(g.id,"blur",function(){b.add(g.id,"change",f);b.remove(g.id,"blur",i)});if(j.keyCode==13||j.keyCode==32){f(j);return b.cancel(j)}});g.onPostRender.dispatch(g,c.get(g.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(f,e){this.parent(f,e);this.onRenderMenu=new c.util.Dispatcher(this);e.menu_container=e.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.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(f.hideMenu,f);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(f,e){this.parent(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,"class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}i+="<td>"+b.createHTML("a",{id:f.id+"_action",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"]});i+="<td>"+b.createHTML("a",{id:f.id+"_open",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";i+="</tr></tbody>";return b.createHTML("table",{id:f.id,"class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",onmousedown:"return false;",title:g.title},i)},postRender:function(){var e=this,f=e.settings;if(f.onclick){a.add(e.id+"_action","click",function(){if(!e.isDisabled()){f.onclick(e.value)}})}a.add(e.id+"_open","click",e.showMenu,e);a.add(e.id+"_open","focus",function(){e._focused=1});a.add(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")}})})(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(h,g){var f=this;f.parent(h,g);f.settings=g=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"},f.settings);f.onShowMenu=new d.util.Dispatcher(f);f.onHideMenu=new d.util.Dispatcher(f);f.value=g.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.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.isMenuVisible=1},hideMenu:function(g){var f=this;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.onHideMenu.dispatch(f);f.isMenuVisible=0},renderMenu:function(){var k=this,f,j=0,l=k.settings,p,h,o,g;g=c.add(l.menu_container,"div",{id:k.id+"_menu","class":l.menu_class+" "+l["class"],style:"position:absolute;left:0;top:-1000px;"});f=c.add(g,"div",{"class":l["class"]+" mceSplitButtonMenu"});c.add(f,"span",{"class":"mceMenuLine"});p=c.add(f,"table",{"class":"mceColorSplitMenu"});h=c.add(p,"tbody");j=0;e(b(l.colors,"array")?l.colors:l.colors.split(","),function(i){i=i.replace(/^#/,"");if(!j--){o=c.add(h,"tr");j=l.grid_width-1}p=c.add(o,"td");p=c.add(p,"a",{href:"javascript:;",style:{backgroundColor:"#"+i},_mce_color:"#"+i})});if(l.more_colors_func){p=c.add(h,"tr");p=c.add(p,"td",{colspan:l.grid_width,"class":"mceMoreColors"});p=c.add(p,"a",{id:k.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},l.more_colors_title);a.add(p,"click",function(i){l.more_colors_func.call(l.more_colors_scope||this);return a.cancel(i)})}c.addClass(f,"mceColorSplitMenu");a.add(k.id+"_menu","click",function(i){var m;i=i.target;if(i.nodeName=="A"&&(m=i.getAttribute("_mce_color"))){k.setColor(m)}return a.cancel(i)});return g},setColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g;f.hideMenu();f.settings.onselect(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(){this.parent();a.clear(this.id+"_menu");a.clear(this.id+"_more");c.remove(this.id+"_menu")}})})(tinymce);tinymce.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var l=this,e="",g,j,b=tinymce.DOM,m=l.settings,d,a,f,k;k=l.controls;for(d=0;d<k.length;d++){j=k[d];a=k[d-1];f=k[d+1];if(d===0){g="mceToolbarStart";if(j.Button){g+=" mceToolbarStartButton"}else{if(j.SplitButton){g+=" mceToolbarStartSplitButton"}else{if(j.ListBox){g+=" mceToolbarStartListBox"}}}e+=b.createHTML("td",{"class":g},b.createHTML("span",null,"<!-- IE -->"))}if(a&&j.ListBox){if(a.Button||a.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarEnd"},b.createHTML("span",null,"<!-- IE -->"))}}if(b.stdMode){e+='<td style="position: relative">'+j.renderHTML()+"</td>"}else{e+="<td>"+j.renderHTML()+"</td>"}if(f&&j.ListBox){if(f.Button||f.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarStart"},b.createHTML("span",null,"<!-- IE -->"))}}}g="mceToolbarEnd";if(j.Button){g+=" mceToolbarEndButton"}else{if(j.SplitButton){g+=" mceToolbarEndSplitButton"}else{if(j.ListBox){g+=" mceToolbarEndListBox"}}}e+=b.createHTML("td",{"class":g},b.createHTML("span",null,"<!-- IE -->"));return b.createHTML("table",{id:l.id,"class":"mceToolbar"+(m["class"]?" "+m["class"]:""),cellpadding:"0",cellspacing:"0",align:l.settings.align||""},"<tbody><tr>"+e+"</tr></tbody>")}});(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{items:[],urls:{},lookup:{},onAdd:new a(this),get:function(d){return this.lookup[d]},requireLangPack:function(e){var d=b.settings;if(d&&d.language){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(e,d){this.items.push(d);this.lookup[e]=d;this.onAdd.dispatch(this,e,d);return d},load:function(h,e,d,g){var f=this;if(f.urls[h]){return}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}f.urls[h]=e.substring(0,e.lastIndexOf("/"));b.ScriptLoader.add(e,d,g)}});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(q){var n=this,p,l=j.ScriptLoader,u,o=[],m;function r(x,y,t){var v=x[y];if(!v){return}if(j.is(v,"string")){t=v.replace(/\.\w+$/,"");t=t?j.resolve(t):0;v=j.resolve(v)}return v.apply(t||this,Array.prototype.slice.call(arguments,2))}q=d({theme:"simple",language:"en"},q);n.settings=q;i.add(document,"init",function(){var s,v;r(q,"onpageload");switch(q.mode){case"exact":s=q.elements||"";if(s.length>0){g(e(s),function(x){if(k.get(x)){m=new j.Editor(x,q);o.push(m);m.render(1)}else{g(document.forms,function(y){g(y.elements,function(z){if(z.name===x){x="mce_editor_"+c++;k.setAttrib(z,"id",x);m=new j.Editor(x,q);o.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function t(y,x){return x.constructor===RegExp?x.test(y.className):k.hasClass(y,x)}g(k.select("textarea"),function(x){if(q.editor_deselector&&t(x,q.editor_deselector)){return}if(!q.editor_selector||t(x,q.editor_selector)){u=k.get(x.name);if(!x.id&&!u){x.id=x.name}if(!x.id||n.get(x.id)){x.id=k.uniqueId()}m=new j.Editor(x.id,q);o.push(m);m.render(1)}});break}if(q.oninit){s=v=0;g(o,function(x){v++;if(!x.initialized){x.onInit.add(function(){s++;if(s==v){r(q,"oninit")}})}else{s++}if(s==v){r(q,"oninit")}})}})},get:function(l){if(l===a){return this.editors}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;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){function m(){n.destroy();l.detachEvent("onunload",m);l=l.tinyMCE=l.tinymce=null}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(m){var n=m.DOM,j=m.dom.Event,f=m.extend,k=m.util.Dispatcher,i=m.each,a=m.isGecko,b=m.isIE,e=m.isWebKit,d=m.is,h=m.ThemeManager,c=m.PluginManager,o=m.inArray,l=m.grep,g=m.explode;m.create("tinymce.Editor",{Editor:function(r,q){var p=this;p.id=p.editorId=r;p.execCommands={};p.queryStateCommands={};p.queryValueCommands={};p.isNotDirty=false;p.plugins={};i(["onPreInit","onBeforeRenderUI","onPostRender","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"],function(s){p[s]=new k(p)});p.settings=q=f({id:r,language:"en",docs_language:"en",theme:"simple",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:m.documentBaseURL,add_form_submit_trigger:1,submit_patch:1,add_unload_trigger:1,convert_urls:1,relative_urls:1,remove_script_host:1,table_inline_editing:0,object_resizing:1,cleanup:1,accessibility_focus:1,custom_shortcuts:1,custom_undo_redo_keyboard_shortcuts:1,custom_undo_redo_restore_selection:1,custom_undo_redo:1,doctype:"<!DOCTYPE>",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",valid_elements:"@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote[cite],-table[border|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value|tabindex|accesskey],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px",keep_styles:1,fix_table_elements:1,inline_styles:1,convert_fonts_to_spans:true},q);p.documentBaseURI=new m.util.URI(q.document_base_url||m.documentBaseURL,{base_uri:tinyMCE.baseURI});p.baseURI=m.baseURI;p.execCallback("setup",p)},render:function(r){var u=this,v=u.settings,x=u.id,p=m.ScriptLoader;if(!j.domLoaded){j.add(document,"init",function(){u.render()});return}tinyMCE.settings=v;if(!u.getElement()){return}if(!/TEXTAREA|INPUT/i.test(u.getElement().nodeName)&&v.hidden_input&&n.getParent(x,"form")){n.insertAfter(n.create("input",{type:"hidden",name:x}),x)}if(m.WindowManager){u.windowManager=new m.WindowManager(u)}if(v.encoding=="xml"){u.onGetContent.add(function(s,t){if(t.save){t.content=n.encode(t.content)}})}if(v.add_form_submit_trigger){u.onSubmit.addToTop(function(){if(u.initialized){u.save();u.isNotDirty=1}})}if(v.add_unload_trigger){u._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(u.initialized&&!u.destroyed&&!u.isHidden()){u.save({format:"raw",no_events:true})}})}m.addUnload(u.destroy,u);if(v.submit_patch){u.onBeforeRenderUI.add(function(){var s=u.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){u.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){m.triggerSave();u.isNotDirty=1;return u.formElement._mceOldSubmit(u.formElement)}}s=null})}function q(){if(v.language){p.add(m.baseURL+"/langs/"+v.language+".js")}if(v.theme&&v.theme.charAt(0)!="-"&&!h.urls[v.theme]){h.load(v.theme,"themes/"+v.theme+"/editor_template"+m.suffix+".js")}i(g(v.plugins),function(s){if(s&&s.charAt(0)!="-"&&!c.urls[s]){if(s=="safari"){return}c.load(s,"plugins/"+s+"/editor_plugin"+m.suffix+".js")}});p.loadQueue(function(){if(!u.removed){u.init()}})}q()},init:function(){var r,E=this,F=E.settings,B,y,A=E.getElement(),q,p,C,x,z,D;m.add(E);if(F.theme){F.theme=F.theme.replace(/-/,"");q=h.get(F.theme);E.theme=new q();if(E.theme.init&&F.init_theme){E.theme.init(E,h.urls[F.theme]||m.documentBaseURL.replace(/\/$/,""))}}i(g(F.plugins.replace(/\-/g,"")),function(G){var H=c.get(G),t=c.urls[G]||m.documentBaseURL.replace(/\/$/,""),s;if(H){s=new H(E,t);E.plugins[G]=s;if(s.init){s.init(E,t)}}});if(F.popup_css!==false){if(F.popup_css){F.popup_css=E.documentBaseURI.toAbsolute(F.popup_css)}else{F.popup_css=E.baseURI.toAbsolute("themes/"+F.theme+"/skins/"+F.skin+"/dialog.css")}}if(F.popup_css_add){F.popup_css+=","+E.documentBaseURI.toAbsolute(F.popup_css_add)}E.controlManager=new m.ControlManager(E);if(F.custom_undo_redo){E.onBeforeExecCommand.add(function(t,G,u,H,s){if(G!="Undo"&&G!="Redo"&&G!="mceRepaint"&&(!s||!s.skip_undo)){if(!E.undoManager.hasUndo()){E.undoManager.add()}}});E.onExecCommand.add(function(t,G,u,H,s){if(G!="Undo"&&G!="Redo"&&G!="mceRepaint"&&(!s||!s.skip_undo)){E.undoManager.add()}})}E.onExecCommand.add(function(s,t){if(!/^(FontName|FontSize)$/.test(t)){E.nodeChanged()}});if(a){function v(s,t){if(!t||!t.initial){E.execCommand("mceRepaint")}}E.onUndo.add(v);E.onRedo.add(v);E.onSetContent.add(v)}E.onBeforeRenderUI.dispatch(E,E.controlManager);if(F.render_ui){B=F.width||A.style.width||A.offsetWidth;y=F.height||A.style.height||A.offsetHeight;E.orgDisplay=A.style.display;D=/^[0-9\.]+(|px)$/i;if(D.test(""+B)){B=Math.max(parseInt(B)+(q.deltaWidth||0),100)}if(D.test(""+y)){y=Math.max(parseInt(y)+(q.deltaHeight||0),100)}q=E.theme.renderUI({targetNode:A,width:B,height:y,deltaWidth:F.delta_width,deltaHeight:F.delta_height});E.editorContainer=q.editorContainer}if(document.domain&&location.hostname!=document.domain){m.relaxedDomain=document.domain}n.setStyles(q.sizeContainer||q.editorContainer,{width:B,height:y});y=(q.iframeHeight||y)+(typeof(y)=="number"?(q.deltaHeight||0):"");if(y<100){y=100}E.iframeHTML=F.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">';if(F.document_base_url!=m.documentBaseURL){E.iframeHTML+='<base href="'+E.documentBaseURI.getURI()+'" />'}E.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';if(m.relaxedDomain){E.iframeHTML+='<script type="text/javascript">document.domain = "'+m.relaxedDomain+'";<\/script>'}x=F.body_id||"tinymce";if(x.indexOf("=")!=-1){x=E.getParam("body_id","","hash");x=x[E.id]||x}z=F.body_class||"";if(z.indexOf("=")!=-1){z=E.getParam("body_class","","hash");z=z[E.id]||""}E.iframeHTML+='</head><body id="'+x+'" class="mceContentBody '+z+'"></body></html>';if(m.relaxedDomain){if(b||(m.isOpera&&parseFloat(opera.version())>=9.5)){C='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+E.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'}else{if(m.isOpera){C='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()'}}}r=n.add(q.iframeContainer,"iframe",{id:E.id+"_ifr",src:C||'javascript:""',frameBorder:"0",style:{width:"100%",height:y}});E.contentAreaContainer=q.iframeContainer;n.get(q.editorContainer).style.display=E.orgDisplay;n.get(E.id).style.display="none";if(!b||!m.relaxedDomain){E.setupIframe()}A=r=q=null},setupIframe:function(){var z=this,A=z.settings,r=n.get(z.id),u=z.getDoc(),q,x;if(!b||!m.relaxedDomain){u.open();u.write(z.iframeHTML);u.close()}if(!b){try{if(!A.readonly){u.designMode="On"}}catch(v){}}if(b){x=z.getBody();n.hide(x);if(!A.readonly){x.contentEditable=true}n.show(x)}z.dom=new m.dom.DOMUtils(z.getDoc(),{keep_values:true,url_converter:z.convertURL,url_converter_scope:z,hex_colors:A.force_hex_style_colors,class_filter:A.class_filter,update_styles:1,fix_ie_paragraphs:1,valid_styles:A.valid_styles});z.schema=new m.dom.Schema();z.serializer=new m.dom.Serializer(f(A,{valid_elements:A.verify_html===false?"*[*]":A.valid_elements,dom:z.dom,schema:z.schema}));z.selection=new m.dom.Selection(z.dom,z.getWin(),z.serializer);z.formatter=new m.Formatter(this);z.formatter.register({alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table",styles:{"float":"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img",styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table",styles:{"float":"right"}}],alignfull:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"}}],bold:[{inline:"strong"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b"}],italic:[{inline:"em"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"u"}],forecolor:{inline:"span",styles:{color:"%value"}},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"}},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},blockquote:{block:"blockquote",wrapper:1},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"],expand:false,deep:true}]});i("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(s){z.formatter.register(s,{block:s})});z.formatter.register(z.settings.formats);z.undoManager=new m.UndoManager(z);z.undoManager.onAdd.add(function(t,s){if(!s.initial){return z.onChange.dispatch(z,s,t)}});z.undoManager.onUndo.add(function(t,s){return z.onUndo.dispatch(z,s,t)});z.undoManager.onRedo.add(function(t,s){return z.onRedo.dispatch(z,s,t)});z.forceBlocks=new m.ForceBlocks(z,{forced_root_block:A.forced_root_block});z.editorCommands=new m.EditorCommands(z);z.serializer.onPreProcess.add(function(s,t){return z.onPreProcess.dispatch(z,t,s)});z.serializer.onPostProcess.add(function(s,t){return z.onPostProcess.dispatch(z,t,s)});z.onPreInit.dispatch(z);if(!A.gecko_spellcheck){z.getBody().spellcheck=0}if(!A.readonly){z._addEvents()}z.controlManager.onPostRender.dispatch(z,z.controlManager);z.onPostRender.dispatch(z);if(A.directionality){z.getBody().dir=A.directionality}if(A.nowrap){z.getBody().style.whiteSpace="nowrap"}if(A.custom_elements){function y(s,t){i(g(A.custom_elements),function(B){var C;if(B.indexOf("~")===0){B=B.substring(1);C="span"}else{C="div"}t.content=t.content.replace(new RegExp("<("+B+")([^>]*)>","g"),"<"+C+' _mce_name="$1"$2>');t.content=t.content.replace(new RegExp("</("+B+")>","g"),"</"+C+">")})}z.onBeforeSetContent.add(y);z.onPostProcess.add(function(s,t){if(t.set){y(s,t)}})}if(A.handle_node_change_callback){z.onNodeChange.add(function(t,s,B){z.execCallback("handle_node_change_callback",z.id,B,-1,-1,true,z.selection.isCollapsed())})}if(A.save_callback){z.onSaveContent.add(function(s,B){var t=z.execCallback("save_callback",z.id,B.content,z.getBody());if(t){B.content=t}})}if(A.onchange_callback){z.onChange.add(function(t,s){z.execCallback("onchange_callback",z,s)})}if(A.convert_newlines_to_brs){z.onBeforeSetContent.add(function(s,t){if(t.initial){t.content=t.content.replace(/\r?\n/g,"<br />")}})}if(A.fix_nesting&&b){z.onBeforeSetContent.add(function(s,t){t.content=z._fixNesting(t.content)})}if(A.preformatted){z.onPostProcess.add(function(s,t){t.content=t.content.replace(/^\s*<pre.*?>/,"");t.content=t.content.replace(/<\/pre>\s*$/,"");if(t.set){t.content='<pre class="mceItemHidden">'+t.content+"</pre>"}})}if(A.verify_css_classes){z.serializer.attribValueFilter=function(D,B){var C,t;if(D=="class"){if(!z.classesRE){t=z.dom.getClasses();if(t.length>0){C="";i(t,function(s){C+=(C?"|":"")+s["class"]});z.classesRE=new RegExp("("+C+")","gi")}}return !z.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(B)||z.classesRE.test(B)?B:""}return B}}if(A.cleanup_callback){z.onBeforeSetContent.add(function(s,t){t.content=z.execCallback("cleanup_callback","insert_to_editor",t.content,t)});z.onPreProcess.add(function(s,t){if(t.set){z.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t)}if(t.get){z.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}});z.onPostProcess.add(function(s,t){if(t.set){t.content=z.execCallback("cleanup_callback","insert_to_editor",t.content,t)}if(t.get){t.content=z.execCallback("cleanup_callback","get_from_editor",t.content,t)}})}if(A.save_callback){z.onGetContent.add(function(s,t){if(t.save){t.content=z.execCallback("save_callback",z.id,t.content,z.getBody())}})}if(A.handle_event_callback){z.onEvent.add(function(s,t,B){if(z.execCallback("handle_event_callback",t,s,B)===false){j.cancel(t)}})}z.onSetContent.add(function(){z.addVisual(z.getBody())});if(A.padd_empty_editor){z.onPostProcess.add(function(s,t){t.content=t.content.replace(/^(<p[^>]*>( | |\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")})}if(a){function p(s,t){i(s.dom.select("a"),function(C){var B=C.parentNode;if(s.dom.isBlock(B)&&B.lastChild===C){s.dom.add(B,"br",{_mce_bogus:1})}})}z.onExecCommand.add(function(s,t){if(t==="CreateLink"){p(s)}});z.onSetContent.add(z.selection.onSetContent.add(p));if(!A.readonly){try{u.designMode="Off";u.designMode="On"}catch(v){}}}setTimeout(function(){if(z.removed){return}z.load({initial:true,format:(A.cleanup_on_startup?"html":"raw")});z.startContent=z.getContent({format:"raw"});z.initialized=true;z.onInit.dispatch(z);z.execCallback("setupcontent_callback",z.id,z.getBody(),z.getDoc());z.execCallback("init_instance_callback",z);z.focus(true);z.nodeChanged({initial:1});if(A.content_css){m.each(g(A.content_css),function(s){z.dom.loadCSS(z.documentBaseURI.toAbsolute(s))})}if(A.auto_focus){setTimeout(function(){var s=m.get(A.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getWin().focus()},100)}},1);r=null},focus:function(q){var s,p=this,r=p.settings.content_editable;if(!q){if(!r&&(!b||p.selection.getNode().ownerDocument!=p.getDoc())){p.getWin().focus()}}if(m.activeEditor!=p){if((s=m.activeEditor)!=null){s.onDeactivate.dispatch(s,p)}p.onActivate.dispatch(p,s)}m._setActive(p)},execCallback:function(u){var p=this,r=p.settings[u],q;if(!r){return}if(p.callbackLookup&&(q=p.callbackLookup[u])){r=q.func;q=q.scope}if(d(r,"string")){q=r.replace(/\.\w+$/,"");q=q?m.resolve(q):0;r=m.resolve(r);p.callbackLookup=p.callbackLookup||{};p.callbackLookup[u]={func:r,scope:q}}return r.apply(q||p,Array.prototype.slice.call(arguments,1))},translate:function(p){var r=this.settings.language||"en",q=m.i18n;if(!p){return""}return q[r+"."+p]||p.replace(/{\#([^}]+)\}/g,function(t,s){return q[r+"."+s]||"{#"+s+"}"})},getLang:function(q,p){return m.i18n[(this.settings.language||"en")+"."+q]||(d(p)?p:"{#"+q+"}")},getParam:function(u,r,p){var s=m.trim,q=d(this.settings[u])?this.settings[u]:r,t;if(p==="hash"){t={};if(d(q,"string")){i(q.indexOf("=")>0?q.split(/[;,](?![^=;,]*(?:[;,]|$))/):q.split(","),function(x){x=x.split("=");if(x.length>1){t[s(x[0])]=s(x[1])}else{t[s(x[0])]=s(x)}})}else{t=q}return t}return q},nodeChanged:function(r){var p=this,q=p.selection,u=q.getNode()||p.getBody();if(p.initialized){r=r||{};u=b&&u.ownerDocument!=p.getDoc()?p.getBody():u;r.parents=[];p.dom.getParent(u,function(s){if(s.nodeName=="BODY"){return true}r.parents.push(s)});p.onNodeChange.dispatch(p,r?r.controlManager||p.controlManager:p.controlManager,u,q.isCollapsed(),r)}},addButton:function(r,q){var p=this;p.buttons=p.buttons||{};p.buttons[r]=q},addCommand:function(r,q,p){this.execCommands[r]={func:q,scope:p||this}},addQueryStateHandler:function(r,q,p){this.queryStateCommands[r]={func:q,scope:p||this}},addQueryValueHandler:function(r,q,p){this.queryValueCommands[r]={func:q,scope:p||this}},addShortcut:function(r,u,p,s){var q=this,v;if(!q.settings.custom_shortcuts){return false}q.shortcuts=q.shortcuts||{};if(d(p,"string")){v=p;p=function(){q.execCommand(v,false,null)}}if(d(p,"object")){v=p;p=function(){q.execCommand(v[0],v[1],v[2])}}i(g(r),function(t){var x={func:p,scope:s||this,desc:u,alt:false,ctrl:false,shift:false};i(g(t,"+"),function(y){switch(y){case"alt":case"ctrl":case"shift":x[y]=true;break;default:x.charCode=y.charCodeAt(0);x.keyCode=y.toUpperCase().charCodeAt(0)}});q.shortcuts[(x.ctrl?"ctrl":"")+","+(x.alt?"alt":"")+","+(x.shift?"shift":"")+","+x.keyCode]=x});return true},execCommand:function(x,v,z,p){var r=this,u=0,y,q;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(x)&&(!p||!p.skip_focus)){r.focus()}y={};r.onBeforeExecCommand.dispatch(r,x,v,z,y);if(y.terminate){return false}if(r.execCallback("execcommand_callback",r.id,r.selection.getNode(),x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}if(y=r.execCommands[x]){q=y.func.call(y.scope,v,z);if(q!==true){r.onExecCommand.dispatch(r,x,v,z,p);return q}}i(r.plugins,function(s){if(s.execCommand&&s.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);u=1;return false}});if(u){return true}if(r.theme&&r.theme.execCommand&&r.theme.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}if(m.GlobalCommands.execCommand(r,x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}if(r.editorCommands.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}r.getDoc().execCommand(x,v,z);r.onExecCommand.dispatch(r,x,v,z,p)},queryCommandState:function(u){var q=this,v,r;if(q._isHidden()){return}if(v=q.queryStateCommands[u]){r=v.func.call(v.scope);if(r!==true){return r}}v=q.editorCommands.queryCommandState(u);if(v!==-1){return v}try{return this.getDoc().queryCommandState(u)}catch(p){}},queryCommandValue:function(v){var q=this,u,r;if(q._isHidden()){return}if(u=q.queryValueCommands[v]){r=u.func.call(u.scope);if(r!==true){return r}}u=q.editorCommands.queryCommandValue(v);if(d(u)){return u}try{return this.getDoc().queryCommandValue(v)}catch(p){}},show:function(){var p=this;n.show(p.getContainer());n.hide(p.id);p.load()},hide:function(){var p=this,q=p.getDoc();if(b&&q){q.execCommand("SelectAll")}p.save();n.hide(p.getContainer());n.setStyle(p.id,"display",p.orgDisplay)},isHidden:function(){return !n.isHidden(this.id)},setProgressState:function(p,q,r){this.onSetProgressState.dispatch(this,p,q,r);return p},load:function(s){var p=this,r=p.getElement(),q;if(r){s=s||{};s.load=true;q=p.setContent(d(r.value)?r.value:r.innerHTML,s);s.element=r;if(!s.no_events){p.onLoadContent.dispatch(p,s)}s.element=r=null;return q}},save:function(u){var p=this,s=p.getElement(),q,r;if(!s||!p.initialized){return}u=u||{};u.save=true;if(!u.no_events){p.undoManager.typing=0;p.undoManager.add()}u.element=s;q=u.content=p.getContent(u);if(!u.no_events){p.onSaveContent.dispatch(p,u)}q=u.content;if(!/TEXTAREA|INPUT/i.test(s.nodeName)){s.innerHTML=q;if(r=n.getParent(p.id,"form")){i(r.elements,function(t){if(t.name==p.id){t.value=q;return false}})}}else{s.value=q}u.element=s=null;return q},setContent:function(q,r){var p=this;r=r||{};r.format=r.format||"html";r.set=true;r.content=q;if(!r.no_events){p.onBeforeSetContent.dispatch(p,r)}if(!m.isIE&&(q.length===0||/^\s+$/.test(q))){r.content=p.dom.setHTML(p.getBody(),'<br _mce_bogus="1" />');r.format="raw"}r.content=p.dom.setHTML(p.getBody(),m.trim(r.content));if(r.format!="raw"&&p.settings.cleanup){r.getInner=true;r.content=p.dom.setHTML(p.getBody(),p.serializer.serialize(p.getBody(),r))}if(!r.no_events){p.onSetContent.dispatch(p,r)}return r.content},getContent:function(r){var p=this,q;r=r||{};r.format=r.format||"html";r.get=true;if(!r.no_events){p.onBeforeGetContent.dispatch(p,r)}if(r.format!="raw"&&p.settings.cleanup){r.getInner=true;q=p.serializer.serialize(p.getBody(),r)}else{q=p.getBody().innerHTML}q=q.replace(/^\s*|\s*$/g,"");r.content=q;if(!r.no_events){p.onGetContent.dispatch(p,r)}return r.content},isDirty:function(){var p=this;return m.trim(p.startContent)!=m.trim(p.getContent({format:"raw",no_events:1}))&&!p.isNotDirty},getContainer:function(){var p=this;if(!p.container){p.container=n.get(p.editorContainer||p.id+"_parent")}return p.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return n.get(this.settings.content_element||this.id)},getWin:function(){var p=this,q;if(!p.contentWindow){q=n.get(p.id+"_ifr");if(q){p.contentWindow=q.contentWindow}}return p.contentWindow},getDoc:function(){var q=this,p;if(!q.contentDocument){p=q.getWin();if(p){q.contentDocument=p.document}}return q.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(p,x,v){var q=this,r=q.settings;if(r.urlconverter_callback){return q.execCallback("urlconverter_callback",p,v,true,x)}if(!r.convert_urls||(v&&v.nodeName=="LINK")||p.indexOf("file:")===0){return p}if(r.relative_urls){return q.documentBaseURI.toRelative(p)}p=q.documentBaseURI.toAbsolute(p,r.remove_script_host);return p},addVisual:function(r){var p=this,q=p.settings;r=r||p.getBody();if(!d(p.hasVisual)){p.hasVisual=q.visual}i(p.dom.select("table,a",r),function(t){var s;switch(t.nodeName){case"TABLE":s=p.dom.getAttrib(t,"border");if(!s||s=="0"){if(p.hasVisual){p.dom.addClass(t,q.visual_table_class)}else{p.dom.removeClass(t,q.visual_table_class)}}return;case"A":s=p.dom.getAttrib(t,"name");if(s){if(p.hasVisual){p.dom.addClass(t,"mceItemAnchor")}else{p.dom.removeClass(t,"mceItemAnchor")}}return}});p.onVisualAid.dispatch(p,r,p.hasVisual)},remove:function(){var p=this,q=p.getContainer();p.removed=1;p.hide();p.execCallback("remove_instance_callback",p);p.onRemove.dispatch(p);p.onExecCommand.listeners=[];m.remove(p);n.remove(q)},destroy:function(q){var p=this;if(p.destroyed){return}if(!q){m.removeUnload(p.destroy);tinyMCE.onBeforeUnload.remove(p._beforeUnload);if(p.theme&&p.theme.destroy){p.theme.destroy()}p.controlManager.destroy();p.selection.destroy();p.dom.destroy();if(!p.settings.content_editable){j.clear(p.getWin());j.clear(p.getDoc())}j.clear(p.getBody());j.clear(p.formElement)}if(p.formElement){p.formElement.submit=p.formElement._mceOldSubmit;p.formElement._mceOldSubmit=null}p.contentAreaContainer=p.formElement=p.container=p.settings.content_element=p.bodyElement=p.contentDocument=p.contentWindow=null;if(p.selection){p.selection=p.selection.win=p.selection.dom=p.selection.dom.doc=null}p.destroyed=1},_addEvents:function(){var v=this,u,y=v.settings,x={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function r(t,A){var s=t.type;if(v.removed){return}if(v.onEvent.dispatch(v,t,A)!==false){v[x[t.fakeType||t.type]].dispatch(v,t,A)}}i(x,function(t,s){switch(s){case"contextmenu":if(m.isOpera){v.dom.bind(v.getBody(),"mousedown",function(A){if(A.ctrlKey){A.fakeType="contextmenu";r(A)}})}else{v.dom.bind(v.getBody(),s,r)}break;case"paste":v.dom.bind(v.getBody(),s,function(A){r(A)});break;case"submit":case"reset":v.dom.bind(v.getElement().form||n.getParent(v.id,"form"),s,r);break;default:v.dom.bind(y.content_editable?v.getBody():v.getDoc(),s,r)}});v.dom.bind(y.content_editable?v.getBody():(a?v.getDoc():v.getWin()),"focus",function(s){v.focus(true)});if(m.isGecko){v.dom.bind(v.getDoc(),"DOMNodeInserted",function(t){var s;t=t.target;if(t.nodeType===1&&t.nodeName==="IMG"&&(s=t.getAttribute("_mce_src"))){t.src=v.documentBaseURI.toAbsolute(s)}})}if(a){function p(){var B=this,D=B.getDoc(),C=B.settings;if(a&&!C.readonly){if(B._isHidden()){try{if(!C.content_editable){D.designMode="On"}}catch(A){}}try{D.execCommand("styleWithCSS",0,false)}catch(A){if(!B._isHidden()){try{D.execCommand("useCSS",0,true)}catch(A){}}}if(!C.table_inline_editing){try{D.execCommand("enableInlineTableEditing",false,false)}catch(A){}}if(!C.object_resizing){try{D.execCommand("enableObjectResizing",false,false)}catch(A){}}}}v.onBeforeExecCommand.add(p);v.onMouseDown.add(p)}if(m.isWebKit){v.onClick.add(function(s,t){t=t.target;if(t.nodeName=="IMG"){v.selection.getSel().setBaseAndExtent(t,0,t,1)}})}v.onMouseUp.add(v.nodeChanged);v.onClick.add(v.nodeChanged);v.onKeyUp.add(function(s,t){var A=t.keyCode;if((A>=33&&A<=36)||(A>=37&&A<=40)||A==13||A==45||A==46||A==8||(m.isMac&&(A==91||A==93))||t.ctrlKey){v.nodeChanged()}});v.onReset.add(function(){v.setContent(v.startContent,{format:"raw"})});if(y.custom_shortcuts){if(y.custom_undo_redo_keyboard_shortcuts){v.addShortcut("ctrl+z",v.getLang("undo_desc"),"Undo");v.addShortcut("ctrl+y",v.getLang("redo_desc"),"Redo")}if(a){v.addShortcut("ctrl+b",v.getLang("bold_desc"),"Bold");v.addShortcut("ctrl+i",v.getLang("italic_desc"),"Italic");v.addShortcut("ctrl+u",v.getLang("underline_desc"),"Underline")}for(u=1;u<=6;u++){v.addShortcut("ctrl+"+u,"",["FormatBlock",false,"h"+u])}v.addShortcut("ctrl+7","",["FormatBlock",false,"<p>"]);v.addShortcut("ctrl+8","",["FormatBlock",false,"<div>"]);v.addShortcut("ctrl+9","",["FormatBlock",false,"<address>"]);function z(t){var s=null;if(!t.altKey&&!t.ctrlKey&&!t.metaKey){return s}i(v.shortcuts,function(A){if(m.isMac&&A.ctrl!=t.metaKey){return}else{if(!m.isMac&&A.ctrl!=t.ctrlKey){return}}if(A.alt!=t.altKey){return}if(A.shift!=t.shiftKey){return}if(t.keyCode==A.keyCode||(t.charCode&&t.charCode==A.charCode)){s=A;return false}});return s}v.onKeyUp.add(function(s,t){var A=z(t);if(A){return j.cancel(t)}});v.onKeyPress.add(function(s,t){var A=z(t);if(A){return j.cancel(t)}});v.onKeyDown.add(function(s,t){var A=z(t);if(A){A.func.call(A.scope);return j.cancel(t)}})}if(m.isIE){v.dom.bind(v.getDoc(),"controlselect",function(A){var t=v.resizeInfo,s;A=A.target;if(A.nodeName!=="IMG"){return}if(t){v.dom.unbind(t.node,t.ev,t.cb)}if(!v.dom.hasClass(A,"mceItemNoResize")){ev="resizeend";s=v.dom.bind(A,ev,function(C){var B;C=C.target;if(B=v.dom.getStyle(C,"width")){v.dom.setAttrib(C,"width",B.replace(/[^0-9%]+/g,""));v.dom.setStyle(C,"width","")}if(B=v.dom.getStyle(C,"height")){v.dom.setAttrib(C,"height",B.replace(/[^0-9%]+/g,""));v.dom.setStyle(C,"height","")}})}else{ev="resizestart";s=v.dom.bind(A,"resizestart",j.cancel,j)}t=v.resizeInfo={node:A,ev:ev,cb:s}});v.onKeyDown.add(function(s,t){switch(t.keyCode){case 8:if(v.selection.getRng().item){v.selection.getRng().item(0).removeNode();return j.cancel(t)}}})}if(m.isOpera){v.onClick.add(function(s,t){j.prevent(t)})}if(y.custom_undo_redo){function q(){v.undoManager.typing=0;v.undoManager.add()}v.dom.bind(v.getDoc(),"focusout",function(s){if(!v.removed&&v.undoManager.typing){q()}});v.onKeyUp.add(function(s,t){if((t.keyCode>=33&&t.keyCode<=36)||(t.keyCode>=37&&t.keyCode<=40)||t.keyCode==13||t.keyCode==45||t.ctrlKey){q()}});v.onKeyDown.add(function(s,t){if((t.keyCode>=33&&t.keyCode<=36)||(t.keyCode>=37&&t.keyCode<=40)||t.keyCode==13||t.keyCode==45){if(v.undoManager.typing){q()}return}if(!v.undoManager.typing){v.undoManager.add();v.undoManager.typing=1}});v.onMouseDown.add(function(){if(v.undoManager.typing){q()}})}},_isHidden:function(){var p;if(!a){return 0}p=this.selection.getSel();return(!p||!p.rangeCount||p.rangeCount==0)},_fixNesting:function(q){var r=[],p;q=q.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(t,s,v){var u;if(s==="/"){if(!r.length){return""}if(v!==r[r.length-1].tag){for(p=r.length-1;p>=0;p--){if(r[p].tag===v){r[p].close=1;break}}return""}else{r.pop();if(r.length&&r[r.length-1].close){t=t+"</"+r[r.length-1].tag+">";r.pop()}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(v)){return t}if(/\/>$/.test(t)){return t}r.push({tag:v})}return t});for(p=r.length-1;p>=0;p--){q+="</"+r[p].tag+">"}return q}})})(tinymce);(function(c){var d=c.each,e,a=true,b=false;c.EditorCommands=function(n){var l=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,o;function q(y,x,v){var u;y=y.toLowerCase();if(u=j.exec[y]){u(y,x,v);return a}return b}function m(v){var u;v=v.toLowerCase();if(u=j.state[v]){return u(v)}return -1}function h(v){var u;v=v.toLowerCase();if(u=j.value[v]){return u(v)}return b}function t(u,v){v=v||"exec";d(u,function(y,x){d(x.toLowerCase().split(","),function(z){j[v][z]=y})})}c.extend(this,{execCommand:q,queryCommandState:m,queryCommandValue:h,addCommands:t});function f(x,v,u){if(v===e){v=b}if(u===e){u=null}return n.getDoc().execCommand(x,v,u)}function s(u){return n.formatter.match(u)}function r(u,v){n.formatter.toggle(u,v?{value:v}:e)}function i(u){o=p.getBookmark(u)}function g(){p.moveToBookmark(o)}t({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(y){var x=n.getDoc(),u;try{f(y)}catch(v){u=a}if(u||!x.queryCommandEnabled(y)){if(c.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(z){if(z){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(u){if(p.isCollapsed()){p.select(p.getNode())}f(u);p.collapse(b)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(u){var v=u.substring(7);d("left,center,right,full".split(","),function(x){if(v!=x){n.formatter.remove("align"+x)}});r("align"+v)},"InsertUnorderedList,InsertOrderedList":function(x){var u,v;f(x);u=l.getParent(p.getNode(),"ol,ul");if(u){v=u.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(v.nodeName)){i();l.split(v,u);g()}}},"Bold,Italic,Underline,Strikethrough":function(u){r(u)},"ForeColor,HiliteColor,FontName":function(x,v,u){r(x,u)},FontSize:function(y,x,v){var u,z;if(v>=1&&v<=7){z=c.explode(k.font_size_style_values);u=c.explode(k.font_size_classes);if(u){v=u[v-1]||v}else{v=z[v-1]||v}}r(y,v)},RemoveFormat:function(u){n.formatter.remove(u)},mceBlockQuote:function(u){r("blockquote")},FormatBlock:function(x,v,u){return r(u)},mceCleanup:function(){i();n.setContent(n.getContent({cleanup:a}),{cleanup:a});g()},mceRemoveNode:function(y,x,v){var u=v||p.getNode();if(u!=ed.getBody()){i();n.dom.remove(u,a);g()}},mceSelectNodeDepth:function(y,x,v){var u=0;l.getParent(p.getNode(),function(z){if(z.nodeType==1&&u++==v){p.select(z);return b}},n.getBody())},mceSelectNode:function(x,v,u){p.select(u)},mceInsertContent:function(x,v,u){p.setContent(u)},mceInsertRawHTML:function(x,v,u){p.setContent("tiny_mce_marker");n.setContent(n.getContent().replace(/tiny_mce_marker/g,u))},mceSetContent:function(x,v,u){n.setContent(u)},"Indent,Outdent":function(y){var v,u,x;v=k.indentation;u=/[a-z%]+$/i.exec(v);v=parseInt(v);if(!m("InsertUnorderedList")&&!m("InsertOrderedList")){d(p.getSelectedBlocks(),function(z){if(y=="outdent"){x=Math.max(0,parseInt(z.style.paddingLeft||0)-v);l.setStyle(z,"paddingLeft",x?x+u:"")}else{l.setStyle(z,"paddingLeft",(parseInt(z.style.paddingLeft||0)+v)+u)}})}else{f(y)}},mceRepaint:function(){var v;if(c.isGecko){try{i(a);if(p.getSel()){p.getSel().selectAllChildren(n.getBody())}p.collapse(a);g()}catch(u){}}},InsertHorizontalRule:function(){p.setContent("<hr />")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(x,v,u){p.setContent(u.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(y,x,v){var u=l.getParent(p.getNode(),"a");if(c.is(v,"string")){v={href:v}}if(!u){f("CreateLink",b,"javascript:mctmp(0);");d(l.select("a[href=javascript:mctmp(0);]"),function(z){l.setAttribs(z,v)})}else{if(v.href){l.setAttribs(u,v)}else{ed.dom.remove(u,a)}}}});t({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(u){return s("align"+u.substring(7))},"Bold,Italic,Underline,Strikethrough":function(u){return s(u)},mceBlockQuote:function(){return s("blockquote")},Outdent:function(){var u;if(k.inline_styles){if((u=l.getParent(p.getStart(),l.isBlock))&&parseInt(u.style.paddingLeft)>0){return a}if((u=l.getParent(p.getEnd(),l.isBlock))&&parseInt(u.style.paddingLeft)>0){return a}}return m("InsertUnorderedList")||m("InsertOrderedList")||(!k.inline_styles&&!!l.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(u){return l.getParent(p.getNode(),u=="insertunorderedlist"?"UL":"OL")}},"state");t({"FontSize,FontName":function(x){var v=0,u;if(u=l.getParent(p.getNode(),"span")){if(x=="fontsize"){v=u.style.fontSize}else{v=u.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return v}},"value");if(k.custom_undo_redo){t({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}}})(tinymce);(function(a){a.create("tinymce.UndoManager",{index:0,data:null,typing:0,UndoManager:function(c){var d=this,b=a.util.Dispatcher;d.editor=c;d.data=[];d.onAdd=new b(this);d.onUndo=new b(this);d.onRedo=new b(this)},add:function(d){var g=this,f,e=g.editor,c,h=e.settings,j;d=d||{};d.content=d.content||e.getContent({format:"raw",no_events:1});d.content=d.content.replace(/^\s*|\s*$/g,"");j=g.data[g.index];if(j&&j.content==d.content){if(g.index>0||g.data.length==1){return null}}if(h.custom_undo_redo_levels){if(g.data.length>h.custom_undo_redo_levels){for(f=0;f<g.data.length-1;f++){g.data[f]=g.data[f+1]}g.data.length--;g.index=g.data.length}}if(h.custom_undo_redo_restore_selection){d.bookmark=c=d.bookmark||e.selection.getBookmark(2,true)}if(g.index<g.data.length-1){if(g.index==0){g.data=[]}else{g.data.length=g.index+1}}g.data.push(d);g.index=g.data.length-1;g.onAdd.dispatch(g,d);e.isNotDirty=0;return d},undo:function(){var e=this,c=e.editor,b=b,d;if(e.typing){e.add();e.typing=0}if(e.index>0){b=e.data[--e.index];c.setContent(b.content,{format:"raw"});c.selection.moveToBookmark(b.bookmark);e.onUndo.dispatch(e,b)}return b},redo:function(){var d=this,c=d.editor,b=null;if(d.index<d.data.length-1){b=d.data[++d.index];c.setContent(b.content,{format:"raw"});c.selection.moveToBookmark(b.bookmark);d.onRedo.dispatch(d,b)}return b},clear:function(){var b=this;b.data=[];b.index=0;b.typing=0},hasUndo:function(){return this.index>0||this.typing},hasRedo:function(){return this.index<this.data.length-1}})})(tinymce);(function(l){var k=l.dom.Event,c=l.isIE,a=l.isGecko,b=l.isOpera,j=l.each,i=l.extend,d=true,h=false;function g(n,o){var m=o.ownerDocument.createRange();m.setStart(n.endContainer,n.endOffset);m.setEndAfter(o);return m.cloneContents().textContent.length==0}function f(m){m=m.innerHTML;m=m.replace(/<(img|hr|table|input|select|textarea)[ \>]/gi,"-");m=m.replace(/<[^>]+>/g,"");return m.replace(/[ \u00a0\t\r\n]+/g,"")==""}function e(o,q,m){var n,p;if(f(m)){n=q.getParent(m,"ul,ol");if(!q.getParent(n.parentNode,"ul,ol")){q.split(n,m);p=q.create("p",0,'<br _mce_bogus="1" />');q.replace(p,m);o.select(p,1)}return h}return d}l.create("tinymce.ForceBlocks",{ForceBlocks:function(n){var o=this,p=n.settings,q;o.editor=n;o.dom=n.dom;q=(p.forced_root_block||"p").toLowerCase();p.element=q.toUpperCase();n.onPreInit.add(o.setup,o);o.reOpera=new RegExp("(\\u00a0| | )</"+q+">","gi");o.rePadd=new RegExp("<p( )([^>]+)><\\/p>|<p( )([^>]+)\\/>|<p( )([^>]+)>\\s+<\\/p>|<p><\\/p>|<p\\/>|<p>\\s+<\\/p>".replace(/p/g,q),"gi");o.reNbsp2BR1=new RegExp("<p( )([^>]+)>[\\s\\u00a0]+<\\/p>|<p>[\\s\\u00a0]+<\\/p>".replace(/p/g,q),"gi");o.reNbsp2BR2=new RegExp("<%p()([^>]+)>( | )<\\/%p>|<%p>( | )<\\/%p>".replace(/%p/g,q),"gi");o.reBR2Nbsp=new RegExp("<p( )([^>]+)>\\s*<br \\/>\\s*<\\/p>|<p>\\s*<br \\/>\\s*<\\/p>".replace(/p/g,q),"gi");function m(r,s){if(b){s.content=s.content.replace(o.reOpera,"</"+q+">")}s.content=s.content.replace(o.rePadd,"<"+q+"$1$2$3$4$5$6>\u00a0</"+q+">");if(!c&&!b&&s.set){s.content=s.content.replace(o.reNbsp2BR1,"<"+q+"$1$2><br /></"+q+">");s.content=s.content.replace(o.reNbsp2BR2,"<"+q+"$1$2><br /></"+q+">")}else{s.content=s.content.replace(o.reBR2Nbsp,"<"+q+"$1$2>\u00a0</"+q+">")}}n.onBeforeSetContent.add(m);n.onPostProcess.add(m);if(p.forced_root_block){n.onInit.add(o.forceRoots,o);n.onSetContent.add(o.forceRoots,o);n.onBeforeGetContent.add(o.forceRoots,o)}},setup:function(){var n=this,m=n.editor,p=m.settings,r=m.dom,o=m.selection;if(p.forced_root_block){m.onBeforeExecCommand.add(n.forceRoots,n);m.onKeyUp.add(n.forceRoots,n);m.onPreProcess.add(n.forceRoots,n)}if(p.force_br_newlines){if(c){m.onKeyPress.add(function(s,t){var u;if(t.keyCode==13&&o.getNode().nodeName!="LI"){o.setContent('<br id="__" /> ',{format:"raw"});u=r.get("__");u.removeAttribute("id");o.select(u);o.collapse();return k.cancel(t)}})}}if(!c&&p.force_p_newlines){m.onKeyPress.add(function(s,t){if(t.keyCode==13&&!t.shiftKey&&!n.insertPara(t)){k.cancel(t)}});if(a){m.onKeyDown.add(function(s,t){if((t.keyCode==8||t.keyCode==46)&&!t.shiftKey){n.backspaceDelete(t,t.keyCode==8)}})}}if(l.isWebKit){function q(t){var s=o.getRng(),u;s.insertNode(u=r.create("br"));s.setStartAfter(u);s.setEndAfter(u);o.setRng(s);if(o.getSel().focusNode==u.previousSibling){o.select(r.insertAfter(r.doc.createTextNode("\u00a0"),u));o.collapse(d)}t.getWin().scrollTo(0,r.getPos(o.getRng().startContainer).y)}m.onKeyPress.add(function(s,t){if(t.keyCode==13&&(t.shiftKey||p.force_br_newlines)){q(s);k.cancel(t)}})}m.onPreProcess.add(function(s,t){j(r.select("p,h1,h2,h3,h4,h5,h6,div",t.node),function(u){if(f(u)){j(r.select("span,em,strong,b,i",t.node),function(v){if(!v.hasChildNodes()){v.appendChild(s.getDoc().createTextNode("\u00a0"));return h}})}})});if(c){if(p.element!="P"){m.onKeyPress.add(function(s,t){n.lastElm=o.getNode().nodeName});m.onKeyUp.add(function(t,u){var x,v=o.getNode(),s=t.getBody();if(s.childNodes.length===1&&v.nodeName=="P"){v=r.rename(v,p.element);o.select(v);o.collapse();t.nodeChanged()}else{if(u.keyCode==13&&!u.shiftKey&&n.lastElm!="P"){x=r.getParent(v,"p");if(x){r.rename(x,p.element);t.nodeChanged()}}}})}}},find:function(u,p,q){var o=this.editor,m=o.getDoc().createTreeWalker(u,4,null,h),r=-1;while(u=m.nextNode()){r++;if(p==0&&u==q){return r}if(p==1&&r==q){return u}}return -1},forceRoots:function(v,H){var y=this,v=y.editor,L=v.getBody(),I=v.getDoc(),O=v.selection,z=O.getSel(),A=O.getRng(),M=-2,u,F,m,o,J=-16777215;var K,p,N,E,B,q=L.childNodes,D,C,x;for(D=q.length-1;D>=0;D--){K=q[D];if(K.nodeType===1&&K.getAttribute("_mce_type")){p=null;continue}if(K.nodeType===3||(!y.dom.isBlock(K)&&K.nodeType!==8&&!/^(script|mce:script|style|mce:style)$/i.test(K.nodeName))){if(!p){if(K.nodeType!=3||/[^\s]/g.test(K.nodeValue)){if(M==-2&&A){if(!c){if(A.startContainer.nodeType==1&&(C=A.startContainer.childNodes[A.startOffset])&&C.nodeType==1){x=C.getAttribute("id");C.setAttribute("id","__mce")}else{if(v.dom.getParent(A.startContainer,function(n){return n===L})){F=A.startOffset;m=A.endOffset;M=y.find(L,0,A.startContainer);u=y.find(L,0,A.endContainer)}}}else{o=I.body.createTextRange();o.moveToElementText(L);o.collapse(1);N=o.move("character",J)*-1;o=A.duplicate();o.collapse(1);E=o.move("character",J)*-1;o=A.duplicate();o.collapse(0);B=(o.move("character",J)*-1)-E;M=E-N;u=B}}p=v.dom.create(v.settings.forced_root_block);K.parentNode.replaceChild(p,K);p.appendChild(K)}}else{if(p.hasChildNodes()){p.insertBefore(K,p.firstChild)}else{p.appendChild(K)}}}else{p=null}}if(M!=-2){if(!c){p=L.getElementsByTagName(v.settings.element)[0];A=I.createRange();if(M!=-1){A.setStart(y.find(L,1,M),F)}else{A.setStart(p,0)}if(u!=-1){A.setEnd(y.find(L,1,u),m)}else{A.setEnd(p,0)}if(z){z.removeAllRanges();z.addRange(A)}}else{try{A=z.createRange();A.moveToElementText(L);A.collapse(1);A.moveStart("character",M);A.moveEnd("character",u);A.select()}catch(G){}}}else{if(!c&&(C=v.dom.get("__mce"))){if(x){C.setAttribute("id",x)}else{C.removeAttribute("id")}A=I.createRange();A.setStartBefore(C);A.setEndBefore(C);O.setRng(A)}}},getParentBlock:function(o){var m=this.dom;return m.getParent(o,m.isBlock)},insertPara:function(R){var F=this,v=F.editor,N=v.dom,S=v.getDoc(),W=v.settings,G=v.selection.getSel(),H=G.getRangeAt(0),V=S.body;var K,L,I,P,O,q,o,u,z,m,D,U,p,x,J,M=N.getViewPort(v.getWin()),C,E,B;K=S.createRange();K.setStart(G.anchorNode,G.anchorOffset);K.collapse(d);L=S.createRange();L.setStart(G.focusNode,G.focusOffset);L.collapse(d);I=K.compareBoundaryPoints(K.START_TO_END,L)<0;P=I?G.anchorNode:G.focusNode;O=I?G.anchorOffset:G.focusOffset;q=I?G.focusNode:G.anchorNode;o=I?G.focusOffset:G.anchorOffset;if(P===q&&/^(TD|TH)$/.test(P.nodeName)){if(P.firstChild.nodeName=="BR"){N.remove(P.firstChild)}if(P.childNodes.length==0){v.dom.add(P,W.element,null,"<br />");U=v.dom.add(P,W.element,null,"<br />")}else{J=P.innerHTML;P.innerHTML="";v.dom.add(P,W.element,null,J);U=v.dom.add(P,W.element,null,"<br />")}H=S.createRange();H.selectNodeContents(U);H.collapse(1);v.selection.setRng(H);return h}if(P==V&&q==V&&V.firstChild&&v.dom.isBlock(V.firstChild)){P=q=P.firstChild;O=o=0;K=S.createRange();K.setStart(P,0);L=S.createRange();L.setStart(q,0)}P=P.nodeName=="HTML"?S.body:P;P=P.nodeName=="BODY"?P.firstChild:P;q=q.nodeName=="HTML"?S.body:q;q=q.nodeName=="BODY"?q.firstChild:q;u=F.getParentBlock(P);z=F.getParentBlock(q);m=u?u.nodeName:W.element;if(J=F.dom.getParent(u,"li,pre")){if(J.nodeName=="LI"){return e(v.selection,F.dom,J)}return d}if(u&&(u.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(N.getStyle(u,"position",1)))){m=W.element;u=null}if(z&&(z.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(N.getStyle(u,"position",1)))){m=W.element;z=null}if(/(TD|TABLE|TH|CAPTION)/.test(m)||(u&&m=="DIV"&&/left|right/gi.test(N.getStyle(u,"float",1)))){m=W.element;u=z=null}D=(u&&u.nodeName==m)?u.cloneNode(0):v.dom.create(m);U=(z&&z.nodeName==m)?z.cloneNode(0):v.dom.create(m);U.removeAttribute("id");if(/^(H[1-6])$/.test(m)&&g(H,u)){U=v.dom.create(W.element)}J=p=P;do{if(J==V||J.nodeType==9||F.dom.isBlock(J)||/(TD|TABLE|TH|CAPTION)/.test(J.nodeName)){break}p=J}while((J=J.previousSibling?J.previousSibling:J.parentNode));J=x=q;do{if(J==V||J.nodeType==9||F.dom.isBlock(J)||/(TD|TABLE|TH|CAPTION)/.test(J.nodeName)){break}x=J}while((J=J.nextSibling?J.nextSibling:J.parentNode));if(p.nodeName==m){K.setStart(p,0)}else{K.setStartBefore(p)}K.setEnd(P,O);D.appendChild(K.cloneContents()||S.createTextNode(""));try{L.setEndAfter(x)}catch(Q){}L.setStart(q,o);U.appendChild(L.cloneContents()||S.createTextNode(""));H=S.createRange();if(!p.previousSibling&&p.parentNode.nodeName==m){H.setStartBefore(p.parentNode)}else{if(K.startContainer.nodeName==m&&K.startOffset==0){H.setStartBefore(K.startContainer)}else{H.setStart(K.startContainer,K.startOffset)}}if(!x.nextSibling&&x.parentNode.nodeName==m){H.setEndAfter(x.parentNode)}else{H.setEnd(L.endContainer,L.endOffset)}H.deleteContents();if(b){v.getWin().scrollTo(0,M.y)}if(D.firstChild&&D.firstChild.nodeName==m){D.innerHTML=D.firstChild.innerHTML}if(U.firstChild&&U.firstChild.nodeName==m){U.innerHTML=U.firstChild.innerHTML}if(f(D)){D.innerHTML="<br />"}function T(y,s){var r=[],Y,X,t;y.innerHTML="";if(W.keep_styles){X=s;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(X.nodeName)){Y=X.cloneNode(h);N.setAttrib(Y,"id","");r.push(Y)}}while(X=X.parentNode)}if(r.length>0){for(t=r.length-1,Y=y;t>=0;t--){Y=Y.appendChild(r[t])}r[0].innerHTML=b?" ":"<br />";return r[0]}else{y.innerHTML=b?" ":"<br />"}}if(f(U)){B=T(U,q)}if(b&&parseFloat(opera.version())<9.5){H.insertNode(D);H.insertNode(U)}else{H.insertNode(U);H.insertNode(D)}U.normalize();D.normalize();function A(r){return S.createTreeWalker(r,NodeFilter.SHOW_TEXT,null,h).nextNode()||r}H=S.createRange();H.selectNodeContents(a?A(B||U):B||U);H.collapse(1);G.removeAllRanges();G.addRange(H);C=v.dom.getPos(U).y;E=U.clientHeight;if(C<M.y||C+E>M.y+M.h){v.getWin().scrollTo(0,C<M.y?C:C-M.h+25)}return h},backspaceDelete:function(s,A){var C=this,q=C.editor,x=q.getBody(),p=q.dom,o,u=q.selection,m=u.getRng(),v=m.startContainer,o,y,z;if(v&&q.dom.isBlock(v)&&!/^(TD|TH)$/.test(v.nodeName)&&A){if(v.childNodes.length==0||(v.childNodes.length==1&&v.firstChild.nodeName=="BR")){o=v;while((o=o.previousSibling)&&!q.dom.isBlock(o)){}if(o){if(v!=x.firstChild){y=q.dom.doc.createTreeWalker(o,NodeFilter.SHOW_TEXT,null,h);while(z=y.nextNode()){o=z}m=q.getDoc().createRange();m.setStart(o,o.nodeValue?o.nodeValue.length:0);m.setEnd(o,o.nodeValue?o.nodeValue.length:0);u.setRng(m);q.dom.remove(v)}return k.cancel(s)}}}function B(n){var r;n=n.target;if(n&&n.parentNode&&n.nodeName=="BR"&&(o=C.getParentBlock(n))){r=n.previousSibling;k.remove(x,"DOMNodeInserted",B);if(r&&r.nodeType==3&&/\s+$/.test(r.nodeValue)){return}if(n.previousSibling||n.nextSibling){q.dom.remove(n)}}}k._add(x,"DOMNodeInserted",B);window.setTimeout(function(){k._remove(x,"DOMNodeInserted",B)},1)}})})(tinymce);(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(i){var h,g=this,f=g.editor;d(f.plugins,function(j){if(j.createControl){h=j.createControl(i,g);if(h){return false}}});switch(i){case"|":case"separator":return g.createSeparator()}if(!h&&f.buttons&&(h=f.buttons[i])){return g.createButton(i,h)}return g.add(h)},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)}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(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.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;if(g.settings.use_native_selects){k=new c.ui.NativeListBox(m,i)}else{f=l||h._cls.listbox||c.ui.ListBox;k=new f(m,i)}h.controls[m]=k;if(c.isWebKit){k.onPostRender.add(function(p,o){a.add(o,"mousedown",function(){g.bookmark=g.selection.getBookmark(1)});a.add(o,"focus",function(){g.selection.moveToBookmark(g.bookmark);g.bookmark=null})})}if(k.hideMenu){g.onMouseDown.add(k.hideMenu,k)}return h.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.onMouseDown.add(k.hideMenu,k)}else{f=h._cls.button||c.ui.Button;k=new f(m,i)}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.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.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);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)}},_decode:function(f){return d.DOM.decode(f).replace(/\\n/g,"\n")}})}(tinymce));(function(a){function b(){var d={},c={},e={};function f(j,i,h,g){if(typeof(i)=="string"){i=[i]}a.each(i,function(k){j[k.toLowerCase()]={func:h,scope:g}})}a.extend(this,{add:function(i,h,g){f(d,i,h,g)},addQueryStateHandler:function(i,h,g){f(c,i,h,g)},addQueryValueHandler:function(i,h,g){f(e,i,h,g)},execCommand:function(h,k,j,i,g){if(k=d[k.toLowerCase()]){if(k.func.call(h||k.scope,j,i,g)!==false){return true}}},queryCommandValue:function(){if(cmd=e[cmd.toLowerCase()]){return cmd.func.call(scope||cmd.scope,ui,value,args)}},queryCommandState:function(){if(cmd=c[cmd.toLowerCase()]){return cmd.func.call(scope||cmd.scope,ui,value,args)}}})}a.GlobalCommands=new b()})(tinymce);(function(a){a.Formatter=function(Q){var H={},J=a.each,b=Q.dom,n=Q.selection,q=a.dom.TreeWalker,F=new a.dom.RangeUtils(b),c=Q.schema.isValid,A=b.isBlock,i=Q.settings.forced_root_block,p=b.nodeIndex,z="\uFEFF",N=false,v=true,m,R,K;function j(T,S){return b.getParents(T,S,b.getRoot())}function C(){if(!K||K.apply.length||K.remove.length){K={apply:[],remove:[]}}}Q.onMouseUp.add(C);C();function M(S){return S?H[S]:H}function h(S,T){if(S){if(typeof(S)!=="string"){J(S,function(V,U){h(U,V)})}else{T=T.length?T:[T];J(T,function(U){if(U.deep===m){U.deep=!U.selector}if(U.split===m){U.split=!U.selector}if(U.remove===m&&U.selector){U.remove="none"}if(typeof(U.classes)==="string"){U.classes=U.classes.split(/\s+/)}});H[S]=T}}}function O(U,aa,W){var X=M(U),ab=X[0],Z,T,Y;function V(ae){var ad=ae.startContainer,ah=ae.startOffset,ag,af;if(ad.nodeType==1||ad.nodeValue===""){ag=new q(ad.childNodes[ah]);for(af=ag.current();af;af=ag.next()){if(af.nodeType==3&&!A(af.parentNode)&&!d(af)){ae.setStart(af,0);break}}}return ae}function S(ae,ad){ad=ad||ab;if(ae){J(ad.styles,function(ag,af){b.setStyle(ae,af,o(ag,aa))});J(ad.attributes,function(ag,af){b.setAttrib(ae,af,o(ag,aa))});J(ad.classes,function(af){af=o(af,aa);if(!b.hasClass(ae,af)){b.addClass(ae,af)}})}}function ac(ae){var ad=[],ag,af;ag=ab.inline||ab.block;af=b.create(ag);S(af);F.walk(ae,function(ah){var ai;function aj(ak){var am=ak.nodeName.toLowerCase(),al=ak.parentNode.nodeName.toLowerCase();if(e(am,"br")){ai=0;if(ab.block){b.remove(ak)}return}if(ab.wrapper&&s(ak,U,aa)){ai=0;return}if(ab.block&&!ab.wrapper&&B(am)){ak=b.rename(ak,ag);S(ak);ad.push(ak);ai=0;return}if(ab.selector){J(X,function(an){if(b.is(ak,an.selector)){S(ak,an)}});return}if(c(ag,am)&&c(al,ag)){if(!ai){ai=af.cloneNode(N);ak.parentNode.insertBefore(ai,ak);ad.push(ai)}ai.appendChild(ak)}else{ai=0;J(a.grep(ak.childNodes),aj);ai=0}}J(ah,aj)});J(ad,function(aj){var ah;function ak(am){var al=0;J(am.childNodes,function(an){if(!d(an)&&!D(an)){al++}});return al}function ai(al){var an,am;J(al.childNodes,function(ao){if(ao.nodeType==1&&!D(ao)){an=ao;return N}});if(an&&f(an,ab)){am=an.cloneNode(N);S(am);b.replace(am,al,v);b.remove(an,1);return v}}ah=ak(aj);if(ah===0){b.remove(aj,1);return}if(ab.inline||ab.wrapper){if(!ab.exact&&ah===1){if(ai(aj)){return}}J(X,function(al){J(b.select(al.inline,aj),function(am){P(al,aa,am,al.exact?am:null)})});b.getParent(aj.parentNode,function(al){if(s(al,U,aa)){b.remove(aj,1);aj=0;return v}});if(aj){aj=r(x(aj),aj);aj=r(aj,x(aj,v))}}})}if(ab){if(W){T=b.createRng();T.setStartBefore(W);T.setEndAfter(W);ac(T)}else{if(!n.isCollapsed()||!ab.inline){Z=n.getBookmark();ac(l(n.getRng(v),X));n.moveToBookmark(Z);n.setRng(V(n.getRng(v)));Q.nodeChanged()}else{L("apply",U,aa)}}}}function u(U,ac,W){var X=M(U),ae=X[0],ab,aa,T;function V(ah){var ag;ag=a.grep(ah.childNodes);J(X,function(ai){if(P(ai,ac,ah,ah)){return N}});if(ae.deep){J(X,function(ai){J(ag,function(aj){V(aj)})})}}function Y(ag){var ah;J(j(ag.parentNode).reverse(),function(ai){if(!ah&&ai.id!="_start"&&ai.id!="_end"){if(!A(ai)&&s(ai,U,ac)){ah=ai}}});return ah}function S(aj,ag,al,ao){var ap,an,am,ai,ak,ah;if(aj){ah=aj.parentNode;for(ap=ag.parentNode;ap&&ap!=ah;ap=ap.parentNode){an=ap.cloneNode(N);for(ak=0;ak<X.length;ak++){if(P(X[ak],ac,an,an)){an=0;break}}if(an){if(am){an.appendChild(am)}if(!ai){ai=an}am=an}}if(ao){ag=b.split(aj,ag)}if(am){al.parentNode.insertBefore(am,al);ai.appendChild(al)}}return ag}function ad(ag){return S(Y(ag),ag,ag,true)}function Z(ai){var ah=b.get(ai?"_start":"_end"),ag=ah[ai?"firstChild":"lastChild"];b.remove(ah,1);return ag}function af(ag){var ah,ai;ag=l(ag,X,v);if(ae.split){ah=E(ag,v);ai=E(ag);if(ah!=ai){ah=I(ah,"span",{id:"_start",_mce_type:"bookmark"});ai=I(ai,"span",{id:"_end",_mce_type:"bookmark"});ad(ah);ad(ai);ah=Z(v);ai=Z()}else{ah=ai=ad(ah)}ag.startContainer=ah.parentNode;ag.startOffset=p(ah);ag.endContainer=ai.parentNode;ag.endOffset=p(ai)+1}F.walk(ag,function(aj){J(aj,function(ak){V(ak)})})}if(W){T=b.createRng();T.setStartBefore(W);T.setEndAfter(W);af(T);return}if(!n.isCollapsed()||!ae.inline){ab=n.getBookmark();af(n.getRng(v));n.moveToBookmark(ab);Q.nodeChanged()}else{L("remove",U,ac)}}function y(S,U,T){if(g(S,U,T)){u(S,U,T)}else{O(S,U,T)}}function s(V,S,X){var Y=M(S),W,U,T;function Z(ad,af,ag){var ac,ae,aa=af[ag],ab;if(aa){if(aa.length===m){for(ac in aa){if(aa.hasOwnProperty(ac)){if(ag==="attributes"){ae=b.getAttrib(ad,ac)}else{ae=G(ad,ac)}if(!e(ae,o(aa[ac],X))){return}}}}else{for(ab=0;ab<aa.length;ab++){if(ag==="attributes"?b.getAttrib(ad,aa[ab]):G(ad,aa[ab])){return v}}}}return v}if(Y&&V){for(U=0;U<Y.length;U++){W=Y[U];if(f(V,W)&&Z(V,W,"attributes")&&Z(V,W,"styles")){if(T=W.classes){for(U=0;U<T.length;U++){if(!b.hasClass(V,T[U])){return}}}return v}}}}function g(U,X,W){var T,V;function S(Y){Y=b.getParent(Y,function(Z){return !!s(Z,U,X)});return s(Y,U,X)}if(W){return S(W)}if(n.isCollapsed()){for(V=K.apply.length-1;V>=0;V--){if(K.apply[V].name==U){return true}}for(V=K.remove.length-1;V>=0;V--){if(K.remove[V].name==U){return false}}return S(n.getNode())}W=n.getNode();if(S(W)){return v}T=n.getStart();if(T!=W){if(S(T)){return v}}return N}function t(W){var Y=M(W),V,U,X,T,S;if(Y){V=n.getStart();U=j(V);for(T=Y.length-1;T>=0;T--){S=Y[T].selector;if(!S){return v}for(X=U.length-1;X>=0;X--){if(b.is(U[X],S)){return v}}}}return N}a.extend(this,{get:M,register:h,apply:O,remove:u,toggle:y,match:g,matchNode:s,canApply:t});function f(S,T){if(e(S,T.inline)){return v}if(e(S,T.block)){return v}if(T.selector){return b.is(S,T.selector)}}function e(T,S){T=T||"";S=S||"";T=T.nodeName||T;S=S.nodeName||S;return T.toLowerCase()==S.toLowerCase()}function G(T,S){var U=b.getStyle(T,S);if(S=="color"||S=="backgroundColor"){U=b.toHex(U)}if(S=="fontWeight"&&U==700){U="bold"}return""+U}function o(S,T){if(typeof(S)!="string"){S=S(T)}else{if(T){S=S.replace(/%(\w+)/g,function(V,U){return T[U]||V})}}return S}function d(S){return S&&S.nodeType===3&&/^\s*$/.test(S.nodeValue)}function I(U,T,S){var V=b.create(T,S);U.parentNode.insertBefore(V,U);V.appendChild(U);return V}function l(S,aa,V){var U=S.startContainer,X=S.startOffset,ad=S.endContainer,Y=S.endOffset,ac,Z;function ab(ag,ah,ae,af){var ai,aj;af=af||b.getRoot();for(;;){ai=ag.parentNode;if(ai==af||(!aa[0].block_expand&&A(ai))){return ag}for(ac=ai[ah];ac&&ac!=ag;ac=ac[ae]){if(ac.nodeType==1&&!D(ac)){return ag}if(ac.nodeType==3&&!d(ac)){return ag}}ag=ag.parentNode}return ag}if(U.nodeType==1&&U.hasChildNodes()){Z=U.childNodes.length-1;U=U.childNodes[X>Z?Z:X];if(U.nodeType==3){X=0}}if(ad.nodeType==1&&ad.hasChildNodes()){Z=ad.childNodes.length-1;ad=ad.childNodes[Y>Z?Z:Y-1];if(ad.nodeType==3){Y=ad.nodeValue.length}}if(D(U.parentNode)){U=U.parentNode}if(D(U)){U=U.nextSibling||U}if(D(ad.parentNode)){ad=ad.parentNode}if(D(ad)){ad=ad.previousSibling||ad}if(aa[0].inline||aa[0].block_expand){U=ab(U,"firstChild","nextSibling");ad=ab(ad,"lastChild","previousSibling")}if(aa[0].selector&&aa[0].expand!==N){function W(af,ae){var ag,ah,ai;if(af.nodeType==3&&af.nodeValue.length==0&&af[ae]){af=af[ae]}ag=j(af);for(ah=0;ah<ag.length;ah++){for(ai=0;ai<aa.length;ai++){if(b.is(ag[ah],aa[ai].selector)){return ag[ah]}}}return af}U=W(U,"previousSibling");ad=W(ad,"nextSibling")}if(aa[0].block||aa[0].selector){function T(af,ae,ah){var ag;if(!aa[0].wrapper){ag=b.getParent(af,aa[0].block)}if(!ag){ag=b.getParent(af.nodeType==3?af.parentNode:af,A)}if(ag&&aa[0].wrapper){ag=j(ag,"ul,ol").reverse()[0]||ag}if(!ag){ag=af;while(ag[ae]&&!A(ag[ae])){ag=ag[ae];if(e(ag,"br")){break}}}return ag||af}U=T(U,"previousSibling");ad=T(ad,"nextSibling");if(!A(U)){U=ab(U,"firstChild","nextSibling")}if(!A(ad)){ad=ab(ad,"lastChild","previousSibling")}}if(U.nodeType==1){X=p(U);U=U.parentNode}if(ad.nodeType==1){Y=p(ad)+1;ad=ad.parentNode}return{startContainer:U,startOffset:X,endContainer:ad,endOffset:Y}}function P(Y,X,V,S){var U,T,W;if(!f(V,Y)){return N}if(Y.remove!="all"){J(Y.styles,function(aa,Z){aa=o(aa,X);if(typeof(Z)==="number"){Z=aa;S=0}if(!S||e(G(S,Z),aa)){b.setStyle(V,Z,"")}W=1});if(W&&b.getAttrib(V,"style")==""){V.removeAttribute("style");V.removeAttribute("_mce_style")}J(Y.attributes,function(ab,Z){var aa;ab=o(ab,X);if(typeof(Z)==="number"){Z=ab;S=0}if(!S||e(b.getAttrib(S,Z),ab)){if(Z=="class"){ab=b.getAttrib(V,Z);if(ab){aa="";J(ab.split(/\s+/),function(ac){if(/mce\w+/.test(ac)){aa+=(aa?" ":"")+ac}});if(aa){b.setAttrib(V,Z,aa);return}}}if(Z=="class"){V.removeAttribute("className")}V.removeAttribute(Z)}});J(Y.classes,function(Z){Z=o(Z,X);if(!S||b.hasClass(S,Z)){b.removeClass(V,Z)}});T=b.getAttribs(V);for(U=0;U<T.length;U++){if(T[U].nodeName.indexOf("_")!==0){return N}}}if(Y.remove!="none"){k(V,Y);return v}}function k(U,V){var S=U.parentNode,T;if(V.block){if(!i){function W(Y,X,Z){Y=x(Y,X,Z);return !Y||(Y.nodeName=="BR"||A(Y))}if(A(U)&&!A(S)){if(!W(U,N)&&!W(U.firstChild,v,1)){U.insertBefore(b.create("br"),U.firstChild)}if(!W(U,v)&&!W(U.lastChild,N,1)){U.appendChild(b.create("br"))}}}else{if(S==b.getRoot()){if(!V.list_block||!e(U,V.list_block)){J(a.grep(U.childNodes),function(X){if(c(i,X.nodeName.toLowerCase())){if(!T){T=I(X,i)}else{T.appendChild(X)}}else{T=0}})}}}}b.remove(U,1)}function x(T,S,U){if(T){S=S?"nextSibling":"previousSibling";for(T=U?T:T[S];T;T=T[S]){if(T.nodeType==1||!d(T)){return T}}}}function D(S){return S&&S.nodeType==1&&S.getAttribute("_mce_type")=="bookmark"}function r(W,V){var S,U,T;function Y(ab,aa){if(ab.nodeName!=aa.nodeName){return N}function Z(ad){var ae={};J(b.getAttribs(ad),function(af){var ag=af.nodeName.toLowerCase();if(ag.indexOf("_")!==0&&ag!=="class"&&ag!=="style"){ae[ag]=b.getAttrib(ad,ag)}});return ae}function ac(ag,af){var ae,ad;for(ad in ag){if(ag.hasOwnProperty(ad)){ae=af[ad];if(ae===m){return N}if(ag[ad]!=ae){return N}delete af[ad]}}for(ad in af){if(af.hasOwnProperty(ad)){return N}}return v}if(!ac(Z(ab),Z(aa))){return N}if(!ac(b.parseStyle(b.getAttrib(ab,"style")),b.parseStyle(b.getAttrib(aa,"style")))){return N}return v}if(W&&V){function X(aa,Z){for(U=aa;U;U=U[Z]){if(U.nodeType==3&&!d(U)){return aa}if(U.nodeType==1&&!D(U)){return U}}return aa}W=X(W,"previousSibling");V=X(V,"nextSibling");if(Y(W,V)){for(U=W.nextSibling;U&&U!=V;){T=U;U=U.nextSibling;W.appendChild(T)}b.remove(V);J(a.grep(V.childNodes),function(Z){W.appendChild(Z)});return W}}return V}function B(S){return/^(h[1-6]|p|div|pre|address)$/.test(S)}function E(T,W){var S,V,U;S=T[W?"startContainer":"endContainer"];V=T[W?"startOffset":"endOffset"];if(S.nodeType==1){U=S.childNodes.length-1;if(!W&&V){V--}S=S.childNodes[V>U?U:V]}return S}function L(aa,V,Z){var W,T,Y=n.getNode().parentNode,ac=Q.getDoc(),X="mceinline",af=["onKeyDown","onKeyUp","onKeyPress"],U=K[aa],ab=K[aa=="apply"?"remove":"apply"];for(W=U.length-1;W>=0;W--){if(U[W].name==V){return}}U.push({name:V,vars:Z});for(W=ab.length-1;W>=0;W--){if(ab[W].name==V){ab.splice(W,1)}}function ae(){if(R){J(af,function(ag){Q[ag].remove(R)});R=0}}function ad(ag){J(K.apply.reverse(),function(ah){O(ah.name,ah.vars,ag)});J(K.remove.reverse(),function(ah){u(ah.name,ah.vars,ag)});b.remove(ag,1);C()}function S(ag){return ag.face==X||ag.style.fontFamily==X}ae();ac.execCommand("FontName",false,X);J(b.select("font,span",Y),function(ah){var ag;if(S(ah)){ag=n.getBookmark();ad(ah);n.moveToBookmark(ag);Q.nodeChanged();Y=0}});if(Y){R=function(ag,ah){J(b.select("font,span",Y),function(aj){var ai,ak;if(aj.face==X||aj.style.fontFamily==X){ak=aj.firstChild;ad(aj);T=b.createRng();T.setStart(ak,ak.nodeValue.length);T.setEnd(ak,ak.nodeValue.length);n.setRng(T);ag.nodeChanged();ae()}});if(ah.type=="keyup"){ae();C()}};J(af,function(ag){Q[ag].addToTop(R)})}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;if(c.inline_styles){h=e.explode(c.font_size_style_values);function b(j,i){g.replace(g.create("span",{style:i}),j,1)}d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};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)})}}a.onPreProcess.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}});
|
tiny_mce/tiny_mce_popup.js
CHANGED
@@ -2,4 +2,4 @@
|
|
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);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
|
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);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 e=this,g,a=document.body,c=e.dom.getViewPort(window),d,f;d=e.getWindowArg("mce_width")-c.w;f=e.getWindowArg("mce_height")-c.h;if(e.isWindow){window.resizeBy(d,f)}else{e.editor.windowManager.resizeBy(d,f,e.id)}},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){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.domLoaded){return}b.domLoaded=1;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}}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){tinymce.dom.Event._add(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){a=a.target||a.srcElement;if(a.onchange){a.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_wait:function(){if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);tinyMCEPopup._onDOMLoaded()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(tinyMCEPopup.domLoaded){return}try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}tinyMCEPopup._onDOMLoaded()})()}document.attachEvent("onload",tinyMCEPopup._onDOMLoaded)}else{if(document.addEventListener){window.addEventListener("DOMContentLoaded",tinyMCEPopup._onDOMLoaded,false);window.addEventListener("load",tinyMCEPopup._onDOMLoaded,false)}}}};tinyMCEPopup.init();tinyMCEPopup._wait();
|
widget.php
CHANGED
@@ -1,9 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
function widget_newsletter_init()
|
4 |
-
{
|
5 |
-
function widget_newsletter($args)
|
6 |
-
{
|
7 |
$options = get_option('newsletter');
|
8 |
|
9 |
// $args is an array of strings that help widgets to conform to
|
@@ -15,45 +13,60 @@ function widget_newsletter_init()
|
|
15 |
$optionsw = get_option('newsletter_widget');
|
16 |
$title = $optionsw['title'];
|
17 |
$text = $optionsw['text'];
|
|
|
18 |
|
19 |
// These lines generate our output. Widgets can be very complex
|
20 |
// but as you can see here, they can also be very, very simple.
|
21 |
echo $before_widget . $before_title . $title . $after_title;
|
22 |
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
$buffer = str_replace('{text}', $optionsw['text'], $buffer);
|
25 |
-
|
26 |
-
|
|
|
|
|
27 |
echo $after_widget;
|
28 |
}
|
29 |
|
30 |
-
function widget_newsletter_control()
|
31 |
-
|
32 |
-
// Get our options and see if we're handling a form submission.
|
33 |
$options = get_option('newsletter_widget');
|
34 |
-
if (!is_array($options))
|
35 |
-
{
|
36 |
$options = array('title'=>'Newsletter subscription');
|
37 |
$options = array('text'=>'');
|
38 |
}
|
39 |
|
40 |
-
if ( $_POST['newsletter-submit'] )
|
41 |
-
|
42 |
-
// Remember to sanitize and format use input appropriately.
|
43 |
$options['title'] = strip_tags(stripslashes($_POST['newsletter-title']));
|
44 |
$options['text'] = stripslashes($_POST['newsletter-text']);
|
|
|
45 |
update_option('newsletter_widget', $options);
|
46 |
}
|
47 |
|
48 |
// Be sure you format your options to be valid HTML attributes.
|
49 |
$title = htmlspecialchars($options['title'], ENT_QUOTES);
|
50 |
$text = htmlspecialchars($options['text'], ENT_QUOTES);
|
|
|
51 |
|
52 |
// Here is our little form segment. Notice that we don't need a
|
53 |
// complete form. This will be embedded into the existing form.
|
54 |
echo 'Title<br /><input id="newsletter-title" name="newsletter-title" type="text" value="'.$title.'" />';
|
55 |
echo '<br /><br />';
|
56 |
echo 'Introduction<br /><textarea style="width: 350px;" id="newsletter-text" name="newsletter-text">'.$text.'</textarea>';
|
|
|
|
|
|
|
57 |
echo '<input type="hidden" id="newsletter-submit" name="newsletter-submit" value="1" />';
|
58 |
}
|
59 |
|
@@ -62,5 +75,4 @@ function widget_newsletter_init()
|
|
62 |
}
|
63 |
|
64 |
add_action('widgets_init', 'widget_newsletter_init');
|
65 |
-
//add_action('init', widget_newsletter_register);
|
66 |
?>
|
1 |
<?php
|
2 |
|
3 |
+
function widget_newsletter_init() {
|
4 |
+
function widget_newsletter($args) {
|
|
|
|
|
5 |
$options = get_option('newsletter');
|
6 |
|
7 |
// $args is an array of strings that help widgets to conform to
|
13 |
$optionsw = get_option('newsletter_widget');
|
14 |
$title = $optionsw['title'];
|
15 |
$text = $optionsw['text'];
|
16 |
+
$form = $optionsw['form'];
|
17 |
|
18 |
// These lines generate our output. Widgets can be very complex
|
19 |
// but as you can see here, they can also be very, very simple.
|
20 |
echo $before_widget . $before_title . $title . $after_title;
|
21 |
|
22 |
+
if (newsletter_has_extras('1.0.2') && $form != '') {
|
23 |
+
$buffer .= str_replace('{newsletter_url}', $options['url'], newsletter_extras_get_form($form));
|
24 |
+
}
|
25 |
+
else {
|
26 |
+
if (isset($options['noname'])) {
|
27 |
+
$buffer = str_replace('{newsletter_url}', $options['url'], newsletter_label('widget_form_noname'));
|
28 |
+
}
|
29 |
+
else {
|
30 |
+
$buffer = str_replace('{newsletter_url}', $options['url'], newsletter_label('widget_form'));
|
31 |
+
}
|
32 |
+
}
|
33 |
$buffer = str_replace('{text}', $optionsw['text'], $buffer);
|
34 |
+
$buffer = str_replace('{count}', newsletter_subscribers_count(), $buffer);
|
35 |
+
if (defined('NEWSLETTER_EXTRAS')) echo $buffer;
|
36 |
+
else echo $buffer . '<div style="text-align:right;padding:0 10px;margin:0;"><a style="font-size:9px;color:#bbb;text-decoration:none" href="http://www.satollo.net">by satollo.net</a></div>';
|
37 |
+
|
38 |
echo $after_widget;
|
39 |
}
|
40 |
|
41 |
+
function widget_newsletter_control() {
|
42 |
+
// Get our options and see if we're handling a form submission.
|
|
|
43 |
$options = get_option('newsletter_widget');
|
44 |
+
if (!is_array($options)) {
|
|
|
45 |
$options = array('title'=>'Newsletter subscription');
|
46 |
$options = array('text'=>'');
|
47 |
}
|
48 |
|
49 |
+
if ( $_POST['newsletter-submit'] ) {
|
50 |
+
// Remember to sanitize and format use input appropriately.
|
|
|
51 |
$options['title'] = strip_tags(stripslashes($_POST['newsletter-title']));
|
52 |
$options['text'] = stripslashes($_POST['newsletter-text']);
|
53 |
+
$options['form'] = stripslashes($_POST['newsletter-form']);
|
54 |
update_option('newsletter_widget', $options);
|
55 |
}
|
56 |
|
57 |
// Be sure you format your options to be valid HTML attributes.
|
58 |
$title = htmlspecialchars($options['title'], ENT_QUOTES);
|
59 |
$text = htmlspecialchars($options['text'], ENT_QUOTES);
|
60 |
+
$form = htmlspecialchars($options['form'], ENT_QUOTES);
|
61 |
|
62 |
// Here is our little form segment. Notice that we don't need a
|
63 |
// complete form. This will be embedded into the existing form.
|
64 |
echo 'Title<br /><input id="newsletter-title" name="newsletter-title" type="text" value="'.$title.'" />';
|
65 |
echo '<br /><br />';
|
66 |
echo 'Introduction<br /><textarea style="width: 350px;" id="newsletter-text" name="newsletter-text">'.$text.'</textarea>';
|
67 |
+
if (newsletter_has_extras('1.0.2')) {
|
68 |
+
echo 'Form number<br /><input id="newsletter-form" name="newsletter-form" type="text" value="'.$form.'" />';
|
69 |
+
}
|
70 |
echo '<input type="hidden" id="newsletter-submit" name="newsletter-submit" value="1" />';
|
71 |
}
|
72 |
|
75 |
}
|
76 |
|
77 |
add_action('widgets_init', 'widget_newsletter_init');
|
|
|
78 |
?>
|