diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-09-26 10:26:40 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-09-26 10:26:40 +0000 |
commit | b0a20370018c2348a487968de0a7288b59b58357 (patch) | |
tree | 7d7180a8ca5dc9e69c5e1a97e64492d495d8e39e | |
parent | 5908f4867e66879efd10d8b06b7928874d4c6461 (diff) | |
download | wordpress-mu-b0a20370018c2348a487968de0a7288b59b58357.tar.gz wordpress-mu-b0a20370018c2348a487968de0a7288b59b58357.tar.xz wordpress-mu-b0a20370018c2348a487968de0a7288b59b58357.zip |
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@367 7be80a69-a1ef-0310-a953-fb0f7c49ff36
219 files changed, 5374 insertions, 2910 deletions
diff --git a/wp-inst/wp-admin/admin-header.php b/wp-inst/wp-admin/admin-header.php index f998c15..ef89125 100644 --- a/wp-inst/wp-admin/admin-header.php +++ b/wp-inst/wp-admin/admin-header.php @@ -80,25 +80,27 @@ addLoadEvent(blurry); <script type="text/javascript" src="list-manipulation.js"></script> <?php if ( isset( $editing ) ) : ?> <?php if ( 'true' == get_user_option('rich_editing') ) :?> -<script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce_src.js"></script> +<script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce_gzip.php"></script> <script type="text/javascript"> tinyMCE.init({ mode : "specific_textareas", textarea_trigger : "title", width : "100%", theme : "advanced", - theme_advanced_buttons1 : "bold,italic,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,image,emotions,separator,undo,redo,wordpress,code", + theme_advanced_buttons1 : "bold,italic,strikethrough,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,image,emotions,separator,undo,redo,wordpress,code", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_path_location : "bottom", theme_advanced_resizing : true, + browsers : "msie,gecko", + dialog_type : "modal", theme_advanced_resize_horizontal : false, entity_encoding : "raw", relative_urls : false, - extended_valid_elements : "a[id|href|title|onclick],img[class|src|alt|title|width|height|align]", - plugins : "emotions,wordpress" + valid_elements : "a[href|title],strong/b,em/i,strike,u,p[class|align],ol,ul,li,br,img[class|src|alt|title|width|height|align],sub,sup,blockquote,table[border=0|cellspacing|cellpadding|width|height|class|align],tr[class|rowspan|width|height|align|valign],td[dir|class|colspan|rowspan|width|height|align|valign],div[dir|class|align],span[class|align],pre[class],address,h1[class|align],h2[class|align],h3[class|align],h4[class|align],h5[class|align],h6[class|align],hr", + plugins : "autosave, contextmenu" <?php do_action('mce_options'); ?> }); </script> diff --git a/wp-inst/wp-admin/import/mt.php b/wp-inst/wp-admin/import/mt.php index 166afc1..ec0a3f4 100644 --- a/wp-inst/wp-admin/import/mt.php +++ b/wp-inst/wp-admin/import/mt.php @@ -59,26 +59,25 @@ class MT_Import { function checkauthor($author) { global $wpdb; //mtnames is an array with the names in the mt import file - $md5pass = md5(changeme); + $pass = 'changeme'; if (!(in_array($author, $this->mtnames))) { //a new mt author name is found ++ $this->j; $this->mtnames[$this->j] = $author; //add that new mt author name to an array - $user_id = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_login = '$this->newauthornames[$j]'"); //check if the new author name defined by the user is a pre-existing wp user + $user_id = username_exists($this->newauthornames[$j]); //check if the new author name defined by the user is a pre-existing wp user if (!$user_id) { //banging my head against the desk now. if ($newauthornames[$this->j] == 'left_blank') { //check if the user does not want to change the authorname - $wpdb->query("INSERT INTO $wpdb->users (user_level, user_login, user_pass, user_nickname) VALUES ('1', '$author', '$md5pass', '$author')"); // if user does not want to change, insert the authorname $author - $user_id = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_login = '$author'"); + $user_id = wp_create_user($author, $pass); $this->newauthornames[$this->j] = $author; //now we have a name, in the place of left_blank. } else { $wpdb->query("INSERT INTO $wpdb->users (user_level, user_login, user_pass, user_nickname) VALUES ('1', '{$this->newauthornames[$this->j]}', '$md5pass', '{$this->newauthornames[$this->j]}')"); //if not left_blank, insert the user specified name - $user_id = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_login = '{$this->newauthornames[$this->j]}'"); + $user_id = wp_create_user($this->newauthornames[$this->j], $pass); } } else { return $user_id; // return pre-existing wp username if it exists } } else { $key = array_search($author, $this->mtnames); //find the array key for $author in the $mtnames array - $user_id = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_login = '{$this->newauthornames[$key]}'"); //use that key to get the value of the author's name from $newauthornames + $user_id = username_exists($this->newauthornames[$key]); //use that key to get the value of the author's name from $newauthornames } return $user_id; @@ -277,14 +276,13 @@ class MT_Import { } // End foreach // Let's check to see if it's in already - if (posts_exists($post_title, '', $post_date)) { + if ($post_id = posts_exists($post_title, '', $post_date)) { echo "Post already imported."; } else { $post_author = checkauthor($post_author); //just so that if a post already exists, new users are not created by checkauthor $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_excerpt', 'post_status', 'comment_status', 'ping_status', 'post_modified', 'post_modified_gmt'); $post_id = wp_insert_post($postdata); - // Add categories. if (0 != count($post_categories)) { wp_create_categories($post_categories); @@ -292,6 +290,8 @@ class MT_Import { echo " Post imported successfully..."; } + $comment_post_ID = $post_id; + // Now for comments $comments = explode("-----\nCOMMENT:", $comments[0]); foreach ($comments as $comment) { @@ -300,16 +300,16 @@ class MT_Import { preg_match("|AUTHOR:(.*)|", $comment, $comment_author); $comment_author = $wpdb->escape(trim($comment_author[1])); $comment = preg_replace('|(\n?AUTHOR:.*)|', '', $comment); - preg_match("|EMAIL:(.*)|", $comment, $comment_email); - $comment_email = $wpdb->escape(trim($comment_email[1])); + preg_match("|EMAIL:(.*)|", $comment, $comment_author_email); + $comment_author_email = $wpdb->escape(trim($comment_author_email[1])); $comment = preg_replace('|(\n?EMAIL:.*)|', '', $comment); - preg_match("|IP:(.*)|", $comment, $comment_ip); - $comment_ip = trim($comment_ip[1]); + preg_match("|IP:(.*)|", $comment, $comment_author_IP); + $comment_author_IP = trim($comment_author_IP[1]); $comment = preg_replace('|(\n?IP:.*)|', '', $comment); - preg_match("|URL:(.*)|", $comment, $comment_url); - $comment_url = $wpdb->escape(trim($comment_url[1])); + preg_match("|URL:(.*)|", $comment, $comment_author_url); + $comment_author_url = $wpdb->escape(trim($comment_author_url[1])); $comment = preg_replace('|(\n?URL:.*)|', '', $comment); preg_match("|DATE:(.*)|", $comment, $comment_date); @@ -320,10 +320,10 @@ class MT_Import { $comment_content = $wpdb->escape(trim($comment)); $comment_content = str_replace('-----', '', $comment_content); // Check if it's already there - if (!$wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_date = '$comment_date' AND comment_content = '$comment_content'")) { - $wpdb->query("INSERT INTO $wpdb->comments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_content, comment_approved) - VALUES - ($post_id, '$comment_author', '$comment_email', '$comment_url', '$comment_ip', '$comment_date', '$comment_content', '1')"); + if (!comment_exists($comment_author, $comment_date)) { + $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_author_email', 'comment_author_IP', 'comment_date', 'comment_content'); + $commentdata = wp_filter_comment($commentdata); + wp_insert_comment($commentdata); echo "Comment added."; } } @@ -340,14 +340,12 @@ class MT_Import { $comment_author = $wpdb->escape(trim($comment_author[1])); $ping = preg_replace('|(\n?BLOG NAME:.*)|', '', $ping); - $comment_email = ''; - - preg_match("|IP:(.*)|", $ping, $comment_ip); - $comment_ip = trim($comment_ip[1]); + preg_match("|IP:(.*)|", $ping, $comment_author_IP); + $comment_author_IP = trim($comment_author_IP[1]); $ping = preg_replace('|(\n?IP:.*)|', '', $ping); - preg_match("|URL:(.*)|", $ping, $comment_url); - $comment_url = $wpdb->escape(trim($comment_url[1])); + preg_match("|URL:(.*)|", $ping, $comment_author_url); + $comment_author_url = $wpdb->escape(trim($comment_author_url[1])); $ping = preg_replace('|(\n?URL:.*)|', '', $ping); preg_match("|DATE:(.*)|", $ping, $comment_date); @@ -364,14 +362,15 @@ class MT_Import { $comment_content = "<strong>$ping_title</strong>\n\n$comment_content"; + $comment_type = 'trackback'; + // Check if it's already there - if (!$wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_date = '$comment_date' AND comment_content = '$comment_content'")) { - $wpdb->query("INSERT INTO $wpdb->comments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_content, comment_approved, comment_type) - VALUES - ($post_id, '$comment_author', '$comment_email', '$comment_url', '$comment_ip', '$comment_date', '$comment_content', '1', 'trackback')"); - echo " Comment added."; + if (!comment_exists($comment_author, $comment_date)) { + $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_author_email', 'comment_author_IP', 'comment_date', 'comment_content', 'comment_type'); + $commentdata = wp_filter_comment($commentdata); + wp_insert_comment($commentdata); + echo "Comment added."; } - } } echo "</li>"; @@ -379,7 +378,6 @@ class MT_Import { flush(); } - upgrade_all(); echo '</ol>'; echo '<h3>'.sprintf(__('All done. <a href="%s">Have fun!</a>'), get_option('home')).'</h3>'; } diff --git a/wp-inst/wp-admin/plugin-editor.php b/wp-inst/wp-admin/plugin-editor.php new file mode 100644 index 0000000..4331fe6 --- /dev/null +++ b/wp-inst/wp-admin/plugin-editor.php @@ -0,0 +1,123 @@ +<?php +return; +require_once('admin.php'); + +$title = __("Edit Plugins"); +$parent_file = 'plugins.php'; + +$wpvarstoreset = array('action','redirect','profile','error','warning','a','file'); +for ($i=0; $i<count($wpvarstoreset); $i += 1) { + $wpvar = $wpvarstoreset[$i]; + if (!isset($$wpvar)) { + if (empty($_POST["$wpvar"])) { + if (empty($_GET["$wpvar"])) { + $$wpvar = ''; + } else { + $$wpvar = $_GET["$wpvar"]; + } + } else { + $$wpvar = $_POST["$wpvar"]; + } + } +} + +$plugins = get_plugins(); +$plugin_files = array_keys($plugins); + +if (empty($file)) { + $file = $plugin_files[0]; +} + +$file = validate_file_to_edit($file, $plugin_files); +$real_file = get_real_file_to_edit("wp-content/plugins/$file"); + +switch($action) { + +case 'update': + + if ( !current_user_can('edit_plugins') ) + die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>')); + + $newcontent = stripslashes($_POST['newcontent']); + if (is_writeable($real_file)) { + $f = fopen($real_file, 'w+'); + fwrite($f, $newcontent); + fclose($f); + header("Location: plugin-editor.php?file=$file&a=te"); + } else { + header("Location: plugin-editor.php?file=$file"); + } + + exit(); + +break; + +default: + + require_once('admin-header.php'); + if ( !current_user_can('edit_plugins') ) + die(__('<p>You have do not have sufficient permissions to edit plugins for this blog.</p>')); + + update_recently_edited("wp-content/plugins/$file"); + + if (!is_file($real_file)) + $error = 1; + + if (!$error) { + $f = fopen($real_file, 'r'); + $content = fread($f, filesize($real_file)); + $content = htmlspecialchars($content); + } + + ?> +<?php if (isset($_GET['a'])) : ?> + <div id="message" class="updated fade"><p><?php _e('File edited successfully.') ?></p></div> +<?php endif; ?> + <div class="wrap"> + <?php + if (is_writeable($real_file)) { + echo '<h2>' . sprintf(__('Editing <strong>%s</strong>'), $file) . '</h2>'; + } else { + echo '<h2>' . sprintf(__('Browsing <strong>%s</strong>'), $file) . '</h2>'; + } + ?> + <div id="templateside"> +<h3><?php _e('Plugin files') ?></h3> + +<?php +if ($plugin_files) : +?> + <ul> +<?php foreach($plugin_files as $plugin_file) : ?> + <li><a href="plugin-editor.php?file=<?php echo "$plugin_file"; ?>"><?php echo $plugins[$plugin_file]['Name']; ?></a></li> +<?php endforeach; ?> + </ul> +<?php endif; ?> +</div> + <?php if (!$error) { ?> + <form name="template" id="template" action="plugin-editor.php" method="post"> + <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea> + <input type="hidden" name="action" value="update" /> + <input type="hidden" name="file" value="<?php echo $file ?>" /> + </div> +<?php if ( is_writeable($real_file) ) : ?> + <p class="submit"> +<?php + echo "<input type='submit' name='submit' value=' " . __('Update File') . " »' tabindex='2' />"; +?> +</p> +<?php else : ?> +<p><em><?php _e('If this file was writable you could edit it.'); ?></em></p> +<?php endif; ?> + </form> + <?php + } else { + echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>'; + } + ?> +</div> +<?php +break; +} + +include("admin-footer.php") ?> diff --git a/wp-inst/wp-admin/themes.php b/wp-inst/wp-admin/themes.php index 97cd28a..aad15b4 100644 --- a/wp-inst/wp-admin/themes.php +++ b/wp-inst/wp-admin/themes.php @@ -61,11 +61,6 @@ reset( $themes ); <?php endif; ?> <h3><?php printf(__('%1$s %2$s by %3$s'), $ct->title, $ct->version, $ct->author) ; ?></h3> <p><?php echo $ct->description; ?></p> -<?php if ($ct->parent_theme) { ?> - <!--<p><?php printf(__('The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from <strong>%5$s</strong>. Changes made to the templates will affect both themes.'), $ct->title, $ct->template_dir, $ct->stylesheet_dir, $ct->title, $ct->parent_theme); ?></p>--> -<?php } else { ?> - <!--<p><?php printf(__('All of this theme’s files are located in <code>%2$s</code>.'), $ct->title, $ct->template_dir, $ct->stylesheet_dir); ?></p>--> -<?php } ?> </div> <h2><?php _e('Available Themes'); ?></h2> diff --git a/wp-inst/wp-admin/upgrade-schema.php b/wp-inst/wp-admin/upgrade-schema.php index 6a171a5..5c55396 100644 --- a/wp-inst/wp-admin/upgrade-schema.php +++ b/wp-inst/wp-admin/upgrade-schema.php @@ -317,7 +317,7 @@ function populate_roles() { $role->add_cap('level_8'); $role->add_cap('level_7'); $role->add_cap('level_6'); - $role->add_cap('level_6'); + $role->add_cap('level_5'); $role->add_cap('level_4'); $role->add_cap('level_3'); $role->add_cap('level_2'); @@ -339,7 +339,7 @@ function populate_roles() { $role->add_cap('read'); $role->add_cap('level_7'); $role->add_cap('level_6'); - $role->add_cap('level_6'); + $role->add_cap('level_5'); $role->add_cap('level_4'); $role->add_cap('level_3'); $role->add_cap('level_2'); diff --git a/wp-inst/wp-admin/users.php b/wp-inst/wp-admin/users.php index 456232a..4f6f22b 100644 --- a/wp-inst/wp-admin/users.php +++ b/wp-inst/wp-admin/users.php @@ -358,11 +358,11 @@ $role_select .= '</select>'; </tr> <tr> <th scope="row"><?php _e('First Name') ?> </th> - <td><input name="firstname" type="text" id="firstname" value="<?php echo $new_user_firstname; ?>" /></td> + <td><input name="first_name" type="text" id="first_name" value="<?php echo $new_user_firstname; ?>" /></td> </tr> <tr> <th scope="row"><?php _e('Last Name') ?> </th> - <td><input name="lastname" type="text" id="lastname" value="<?php echo $new_user_lastname; ?>" /></td> + <td><input name="last_name" type="text" id="last_name" value="<?php echo $new_user_lastname; ?>" /></td> </tr> <tr> <th scope="row"><?php _e('E-mail') ?></th> @@ -370,7 +370,7 @@ $role_select .= '</select>'; </tr> <tr> <th scope="row"><?php _e('Website') ?></th> - <td><input name="uri" type="text" id="uri" value="<?php echo $new_user_uri; ?>" /></td> + <td><input name="url" type="text" id="url" value="<?php echo $new_user_uri; ?>" /></td> </tr> <?php $show_password_fields = apply_filters('show_password_fields', true); diff --git a/wp-inst/wp-content/themes/default/functions.php b/wp-inst/wp-content/themes/default/functions.php new file mode 100644 index 0000000..c624bef --- /dev/null +++ b/wp-inst/wp-content/themes/default/functions.php @@ -0,0 +1,387 @@ +<?php
+
+function kubrick_head() {
+ $head = "<style type=\"text/css\">\n";
+ $output = '';
+ if ( kubrick_header_image() ) {
+ $url = kubrick_header_image_url();
+ $output .= "#header { background: url('$url') no-repeat bottom center; }\n";
+ }
+ if ( false !== ( $color = kubrick_header_color() ) ) {
+ $output .= "#headerimg h1 a, #headerimg h1 a:visited, #headerimg .description { color: $color; }\n";
+ }
+ if ( false !== ( $display = kubrick_header_display() ) ) {
+ $output .= "#headerimg { display: $display }\n";
+ }
+ $foot = "</style>\n";
+ if ( '' != $output )
+ echo $head . $output . $foot;
+}
+
+add_action('wp_head', 'kubrick_head');
+
+function kubrick_header_image() {
+ return apply_filters('kubrick_header_image', get_settings('kubrick_header_image'));
+}
+
+function kubrick_upper_color() {
+ if ( strstr( kubrick_header_image_url(), 'header-img.php?' ) )
+ return substr( kubrick_header_image(), 24, 6 );
+ else
+ return '69aee7';
+}
+
+function kubrick_lower_color() {
+ if ( strstr( kubrick_header_image_url(), 'header-img.php?' ) )
+ return substr( kubrick_header_image(), 37, 6 );
+ else
+ return '4180b6';
+}
+
+function kubrick_header_image_url() {
+ if ( $image = kubrick_header_image() )
+ $url = get_template_directory_uri() . '/images/' . $image;
+ else
+ $url = get_template_directory_uri() . '/images/kubrickheader.jpg';
+
+ return $url;
+}
+
+function kubrick_header_color() {
+ return apply_filters('kubrick_header_color', get_settings('kubrick_header_color'));
+}
+
+function kubrick_header_color_string() {
+ $color = kubrick_header_color();
+ if ( false === $color )
+ return 'white';
+
+ return $color;
+}
+
+function kubrick_header_display() {
+ return apply_filters('kubrick_header_display', get_settings('kubrick_header_display'));
+}
+
+function kubrick_header_display_string() {
+ $display = kubrick_header_display();
+ return $display ? $display : 'inline';
+}
+
+add_action('admin_menu', 'kubrick_add_theme_page');
+
+function kubrick_add_theme_page() {
+ if ( $_GET['page'] == basename(__FILE__) ) {
+ if ( 'save' == $_REQUEST['action'] ) {
+ if ( isset($_REQUEST['njform']) ) {
+ if ( isset($_REQUEST['defaults']) ) {
+ delete_option('kubrick_header_image');
+ delete_option('kubrick_header_color');
+ delete_option('kubrick_header_display');
+ } else {
+ if ( '' == $_REQUEST['njfontcolor'] )
+ delete_option('kubrick_header_color');
+ else
+ update_option('kubrick_header_color', $_REQUEST['njfontcolor']);
+
+ if ( preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njuppercolor'], $uc) && preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njlowercolor'], $lc) ) {
+ $uc = ( strlen($uc[0]) == 3 ) ? $uc[0]{0}.$uc[0]{0}.$uc[0]{1}.$uc[0]{1}.$uc[0]{2}.$uc[0]{2} : $uc[0];
+ $lc = ( strlen($lc[0]) == 3 ) ? $lc[0]{0}.$lc[0]{0}.$lc[0]{1}.$lc[0]{1}.$lc[0]{2}.$lc[0]{2} : $lc[0];
+ update_option('kubrick_header_image', "header-img.php?upper=$uc&lower=$lc");
+ }
+
+ if ( isset($_REQUEST['toggledisplay']) ) {
+ if ( false === get_settings('kubrick_header_display') )
+ update_option('kubrick_header_display', 'none');
+ else
+ delete_option('kubrick_header_display');
+ }
+ }
+ } else {
+
+ if ( isset($_REQUEST['headerimage']) ) {
+ if ( '' == $_REQUEST['headerimage'] )
+ delete_option('kubrick_header_image');
+ else
+ update_option('kubrick_header_image', $_REQUEST['headerimage']);
+ }
+
+ if ( isset($_REQUEST['fontcolor']) ) {
+ if ( '' == $_REQUEST['fontcolor'] )
+ delete_option('kubrick_header_color');
+ else
+ update_option('kubrick_header_color', $_REQUEST['fontcolor']);
+ }
+
+ if ( isset($_REQUEST['fontdisplay']) ) {
+ if ( '' == $_REQUEST['fontdisplay'] || 'inline' == $_REQUEST['fontdisplay'] )
+ delete_option('kubrick_header_display');
+ else
+ update_option('kubrick_header_display', 'none');
+ }
+ }
+ //print_r($_REQUEST);
+ header("Location: themes.php?page=functions.php&saved=true");
+ die;
+ }
+ add_action('admin_head', 'kubrick_theme_page_head');
+ }
+ add_theme_page("Kubrick Theme Options", "Current Theme Options", 'edit_themes', basename(__FILE__), 'kubrick_theme_page');
+}
+
+function kubrick_theme_page_head() {
+?>
+<script type="text/javascript" src="../wp-includes/js/colorpicker.js"></script>
+<script type='text/javascript'>
+ function pickColor(color) {
+ ColorPicker_targetInput.value = color;
+ kUpdate(ColorPicker_targetInput.id);
+ }
+ function PopupWindow_populate(contents) {
+ contents += '<br /><p style="text-align:center;margin-top:0px;"><input type="button" value="Close Color Picker" onclick="cp.hidePopup(\'prettyplease\')"></input></p>';
+ this.contents = contents;
+ this.populated = false;
+ }
+ function PopupWindow_hidePopup(magicword) {
+ if ( magicword != 'prettyplease' )
+ return false;
+ if (this.divName != null) {
+ if (this.use_gebi) {
+ document.getElementById(this.divName).style.visibility = "hidden";
+ }
+ else if (this.use_css) {
+ document.all[this.divName].style.visibility = "hidden";
+ }
+ else if (this.use_layers) {
+ document.layers[this.divName].visibility = "hidden";
+ }
+ }
+ else {
+ if (this.popupWindow && !this.popupWindow.closed) {
+ this.popupWindow.close();
+ this.popupWindow = null;
+ }
+ }
+ return false;
+ }
+ function colorSelect(t,p) {
+ if ( cp.p == p && document.getElementById(cp.divName).style.visibility != "hidden" )
+ cp.hidePopup('prettyplease');
+ else {
+ cp.p = p;
+ cp.select(t,p);
+ }
+ }
+ function PopupWindow_setSize(width,height) {
+ this.width = 162;
+ this.height = 210;
+ }
+
+ var cp = new ColorPicker();
+ function advUpdate(val, obj) {
+ document.getElementById(obj).value = val;
+ kUpdate(obj);
+ }
+ function kUpdate(oid) {
+ if ( 'uppercolor' == oid || 'lowercolor' == oid ) {
+ uc = document.getElementById('uppercolor').value.replace('#', '');
+ lc = document.getElementById('lowercolor').value.replace('#', '');
+ hi = document.getElementById('headerimage');
+ hi.value = 'header-img.php?upper='+uc+'&lower='+lc;
+ document.getElementById('header').style.background = 'url("<?php echo get_template_directory_uri(); ?>/images/'+hi.value+'") center no-repeat';
+ document.getElementById('advuppercolor').value = '#'+uc;
+ document.getElementById('advlowercolor').value = '#'+lc;
+ }
+ if ( 'fontcolor' == oid ) {
+ document.getElementById('header').style.color = document.getElementById('fontcolor').value;
+ document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value;
+ }
+ if ( 'fontdisplay' == oid ) {
+ document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
+ }
+ }
+ function toggleDisplay() {
+ td = document.getElementById('fontdisplay');
+ td.value = ( td.value == 'none' ) ? 'inline' : 'none';
+ kUpdate('fontdisplay');
+ }
+ function toggleAdvanced() {
+ a = document.getElementById('jsAdvanced');
+ if ( a.style.display == 'none' )
+ a.style.display = 'block';
+ else
+ a.style.display = 'none';
+ }
+ function kDefaults() {
+ document.getElementById('headerimage').value = '';
+ document.getElementById('advuppercolor').value = document.getElementById('uppercolor').value = '#69aee7';
+ document.getElementById('advlowercolor').value = document.getElementById('lowercolor').value = '#4180b6';
+ document.getElementById('header').style.background = 'url("<?php echo get_template_directory_uri(); ?>/images/kubrickheader.jpg") center no-repeat';
+ document.getElementById('header').style.color = '#FFFFFF';
+ document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value = '';
+ document.getElementById('fontdisplay').value = 'inline';
+ document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
+ }
+ function kRevert() {
+ document.getElementById('headerimage').value = '<?php echo kubrick_header_image(); ?>';
+ document.getElementById('advuppercolor').value = document.getElementById('uppercolor').value = '#<?php echo kubrick_upper_color(); ?>';
+ document.getElementById('advlowercolor').value = document.getElementById('lowercolor').value = '#<?php echo kubrick_lower_color(); ?>';
+ document.getElementById('header').style.background = 'url("<?php echo kubrick_header_image_url(); ?>") center no-repeat';
+ document.getElementById('header').style.color = '';
+ document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value = '<?php echo kubrick_header_color_string(); ?>';
+ document.getElementById('fontdisplay').value = '<?php echo kubrick_header_display_string(); ?>';
+ document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
+ }
+ function kInit() {
+ document.getElementById('jsForm').style.display = 'block';
+ document.getElementById('nonJsForm').style.display = 'none';
+ }
+ addLoadEvent(kInit);
+</script>
+<style type='text/css'>
+ #headwrap {
+ text-align: center;
+ }
+ #kubrick-header .hibrowser {
+ width: 780px;
+ height: 260px;
+ overflow: scroll;
+ }
+ #kubrick-header #hitarget {
+ display: none;
+ }
+ #kubrick-header #header h1 {
+ font-size: 4em;
+ text-align: center;
+ padding-top: 70px;
+ margin: 0;
+ }
+
+ #kubrick-header #header .description {
+ font-size: 1.2em;
+ text-align: center;
+ }
+ #kubrick-header #header {
+ text-decoration: none;
+ color: <?php echo kubrick_header_color_string(); ?>;
+ padding: 0;
+ margin: 0;
+ height: 200px;
+ text-align: center;
+ background: url('<?php echo kubrick_header_image_url(); ?>') center no-repeat;
+ }
+ #kubrick-header #headerimg {
+ margin: 0;
+ height: 200px;
+ width: 100%;
+ display: <?php echo kubrick_header_display_string(); ?>;
+ }
+ #jsForm {
+ display: none;
+ text-align: center;
+ }
+ #jsForm input.submit, #jsForm input.button, #jsAdvanced input.button {
+ padding: 0px;
+ margin: 0px;
+ }
+ #advanced {
+ text-align: center;
+ width: 620px;
+ }
+ html>body #advanced {
+ text-align: center;
+ position: relative;
+ left: 50%;
+ margin-left: -380px;
+ }
+ #jsAdvanced {
+ text-align: right;
+ }
+ #nonJsForm {
+ position: relative;
+ text-align: left;
+ margin-left: -370px;
+ left: 50%;
+ }
+ #nonJsForm label {
+ padding-top: 6px;
+ padding-right: 5px;
+ float: left;
+ width: 100px;
+ text-align: right;
+ }
+ .defbutton {
+ font-weight: bold;
+ }
+ .zerosize {
+ width: 0px;
+ height: 0px;
+ overflow: hidden;
+ }
+ #colorPickerDiv a, #colorPickerDiv a:hover {
+ padding: 1px;
+ text-decoration: none;
+ border-bottom: 0px;
+ }
+</style>
+<?php
+}
+
+function kubrick_theme_page() {
+ if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>Options saved.</strong></p></div>';
+?>
+<div class='wrap'>
+ <div id="kubrick-header">
+ <h2>Header Image and Color</h2>
+ <div id="headwrap">
+ <div id="header">
+ <div id="headerimg">
+ <h1><?php bloginfo('name'); ?></h1>
+ <div class="description"><?php bloginfo('description'); ?></div>
+ </div>
+ </div>
+ </div>
+ <br />
+ <div id="nonJsForm">
+ <form method="POST">
+ <div class="zerosize"><input type="submit" name="defaultsubmit" value="Save" /></div>
+ <label for="njfontcolor">Font Color:</label><input type="text" name="njfontcolor" id="njfontcolor" value="<?php echo kubrick_header_color(); ?>" /> Any CSS color (<code>red</code> or <code>#FF0000</code> or <code>rgb(255, 0, 0)</code>)<br />
+ <label for="njuppercolor">Upper Color:</label><input type="text" name="njuppercolor" id="njuppercolor" value="#<?php echo kubrick_upper_color(); ?>" /> HEX only (<code>#FF0000</code> or <code>#F00</code>)<br />
+ <label for="njlowercolor">Lower Color:</label><input type="text" name="njlowercolor" id="njlowercolor" value="#<?php echo kubrick_lower_color(); ?>" /> HEX only (<code>#FF0000</code> or <code>#F00</code>)<br />
+ <input type="hidden" name="hi" id="hi" value="<?php echo kubrick_header_image(); ?>" />
+ <label> </label><input type="submit" name="toggledisplay" id="toggledisplay" value="Toggle Text" />
+ <input type="submit" name="defaults" value="Use Defaults" />
+ <input type="submit" class="defbutton" name="submitform" value=" Save " />
+ <input type="hidden" name="action" value="save" />
+ <input type="hidden" name="njform" value="true" />
+ </form>
+ </div>
+ <div id="jsForm">
+ <form style="display:inline;" method="post" name="hicolor" id="hicolor" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
+ <input type="button" onclick="tgt=document.getElementById('fontcolor');colorSelect(tgt,'pick1');return false;" name="pick1" id="pick1" value="Font Color"></input>
+ <input type="button" onclick="tgt=document.getElementById('uppercolor');colorSelect(tgt,'pick2');return false;" name="pick2" id="pick2" value="Upper Color"></input>
+ <input type="button" onclick="tgt=document.getElementById('lowercolor');colorSelect(tgt,'pick3');return false;" name="pick3" id="pick3" value="Lower Color"></input>
+ <input type="button" name="revert" value="Revert" onclick="kRevert()" />
+ <input type="button" value="Advanced" onclick="toggleAdvanced()" />
+ <input type="submit" name="submitform" class="defbutton" value="Save" onclick="cp.hidePopup('prettyplease')" />
+ <input type="hidden" name="action" value="save" />
+ <input type="hidden" name="fontdisplay" id="fontdisplay" value="<?php echo kubrick_header_display(); ?>" />
+ <input type="hidden" name="fontcolor" id="fontcolor" value="<?php echo kubrick_header_color(); ?>" />
+ <input type="hidden" name="uppercolor" id="uppercolor" value="<?php echo kubrick_upper_color(); ?>" />
+ <input type="hidden" name="lowercolor" id="lowercolor" value="<?php echo kubrick_lower_color(); ?>" />
+ <input type="hidden" name="headerimage" id="headerimage" value="<?php echo kubrick_header_image(); ?>" />
+ </form>
+ <div id="colorPickerDiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;visibility:hidden;"> </div>
+ <div id="advanced">
+ <form id="jsAdvanced" style="display:none;">
+ <label for="advfontcolor">Font Color (CSS): </label><input type="text" id="advfontcolor" onchange="advUpdate(this.value, 'fontcolor')" value="<?php echo kubrick_header_color(); ?>" /><br />
+ <label for="advuppercolor">Upper Color (HEX): </label><input type="text" id="advuppercolor" onchange="advUpdate(this.value, 'uppercolor')" value="#<?php echo kubrick_upper_color(); ?>" /><br />
+ <label for="advlowercolor">Lower Color (HEX): </label><input type="text" id="advlowercolor" onchange="advUpdate(this.value, 'lowercolor')" value="#<?php echo kubrick_lower_color(); ?>" /><br />
+ <input type="button" name="default" value="Select Default Colors" onclick="kDefaults()" /><br />
+ <input type="button" onclick="toggleDisplay();return false;" name="pick" id="pick" value="Toggle Text Display"></input><br />
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
+<?php } ?>
diff --git a/wp-inst/wp-content/themes/default/images/header-img.php b/wp-inst/wp-content/themes/default/images/header-img.php new file mode 100644 index 0000000..a347e27 --- /dev/null +++ b/wp-inst/wp-content/themes/default/images/header-img.php @@ -0,0 +1,74 @@ +<?php
+
+$img = 'kubrickheader.jpg';
+
+// If we don't have image processing support, redirect.
+if ( ! function_exists('imagecreatefromjpeg') )
+ die(header("Location: kubrickheader.jpg"));
+
+// Assign and validate the color values
+$default = false;
+$vars = array('upper'=>array(0=>'r1', 2=>'g1', 4=>'b1'), 'lower'=>array(0=>'r2', 2=>'g2', 4=>'b2'));
+foreach ( $vars as $var => $subvars ) {
+ if ( isset($_GET[$var]) ) {
+ foreach ( $subvars as $index => $subvar ) {
+ $$subvar = hexdec( substr( html_entity_decode($_GET[$var]), $index, 2) );
+ if ( $$subvar < 0 || $$subvar > 255 )
+ $default = true;
+ }
+ } else {
+ $default = true;
+ }
+}
+
+if ( $default )
+ list ( $r1, $g1, $b1, $r2, $g2, $b2 ) = array ( 105, 174, 231, 65, 128, 182 );
+
+// Create the image
+$im = imagecreatefromjpeg($img);
+
+// Get the background color, define the rectangle height
+$white = imagecolorat( $im, 15, 15 );
+$h = 182;
+
+// Define the boundaries of the rounded edges ( y => array ( x1, x2 ) )
+$corners = array(
+ 0 => array ( 25, 734 ),
+ 1 => array ( 23, 736 ),
+ 2 => array ( 22, 737 ),
+ 3 => array ( 21, 738 ),
+ 4 => array ( 21, 738 ),
+ 177 => array ( 21, 738 ),
+ 178 => array ( 21, 738 ),
+ 179 => array ( 22, 737 ),
+ 180 => array ( 23, 736 ),
+ 181 => array ( 25, 734 ),
+ );
+
+// Blank out the blue thing
+for ( $i = 0; $i < $h; $i++ ) {
+ $x1 = 19;
+ $x2 = 740;
+ imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white );
+}
+
+// Draw a new color thing
+for ( $i = 0; $i < $h; $i++ ) {
+ $x1 = 20;
+ $x2 = 739;
+ $r = ( $r2 - $r1 != 0 ) ? $r1 + ( $r2 - $r1 ) * ( $i / $h ) : $r1;
+ $g = ( $g2 - $g1 != 0 ) ? $g1 + ( $g2 - $g1 ) * ( $i / $h ) : $g1;
+ $b = ( $b2 - $b1 != 0 ) ? $b1 + ( $b2 - $b1 ) * ( $i / $h ) : $b1;
+ $color = imagecolorallocate( $im, $r, $g, $b );
+ if ( array_key_exists($i, $corners) ) {
+ imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white );
+ list ( $x1, $x2 ) = $corners[$i];
+ }
+ imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $color );
+}
+
+//die;
+header("Content-Type: image/jpeg");
+imagejpeg($im, '', 92);
+imagedestroy($im);
+?>
\ No newline at end of file diff --git a/wp-inst/wp-includes/classes.php b/wp-inst/wp-includes/classes.php index 8e73317..d3955c6 100644 --- a/wp-inst/wp-includes/classes.php +++ b/wp-inst/wp-includes/classes.php @@ -29,6 +29,7 @@ class WP_Query { var $is_404 = false; var $is_comments_popup = false; var $is_admin = false; + var $is_object = false; function init_query_flags() { $this->is_single = false; @@ -48,6 +49,7 @@ class WP_Query { $this->is_404 = false; $this->is_paged = false; $this->is_admin = false; + $this->is_object = false; } function init () { @@ -525,6 +527,9 @@ class WP_Query { $where .= ')'; } + if (! $this->is_object ) + $where .= ' AND post_status != "object"'; + // Apply filters on where and join prior to paging so that any // manipulations to them are reflected in the paging by day queries. $where = apply_filters('posts_where', $where); diff --git a/wp-inst/wp-includes/functions.php b/wp-inst/wp-includes/functions.php index b2362e0..67def63 100644 --- a/wp-inst/wp-includes/functions.php +++ b/wp-inst/wp-includes/functions.php @@ -406,7 +406,7 @@ function delete_option($name) { } function add_post_meta($post_id, $key, $value, $unique = false) { - global $wpdb; + global $wpdb, $post_meta_cache; if ($unique) { if( $wpdb->get_var("SELECT meta_key FROM $wpdb->postmeta WHERE meta_key @@ -415,16 +415,22 @@ function add_post_meta($post_id, $key, $value, $unique = false) { } } + $original = $value; + if ( is_array($value) || is_object($value) ) + $value = $wpdb->escape(serialize($value)); + $wpdb->query("INSERT INTO $wpdb->postmeta (post_id,meta_key,meta_value) VALUES ('$post_id','$key','$value') "); - + + $post_meta_cache['$post_id'][$key][] = $original; + return true; } function delete_post_meta($post_id, $key, $value = '') { - global $wpdb; + global $wpdb, $post_meta_cache; if (empty($value)) { $meta_id = $wpdb->get_var("SELECT meta_id FROM $wpdb->postmeta WHERE @@ -439,10 +445,17 @@ post_id = '$post_id' AND meta_key = '$key' AND meta_value = '$value'"); if (empty($value)) { $wpdb->query("DELETE FROM $wpdb->postmeta WHERE post_id = '$post_id' AND meta_key = '$key'"); + unset($post_meta_cache['$post_id'][$key]); } else { $wpdb->query("DELETE FROM $wpdb->postmeta WHERE post_id = '$post_id' AND meta_key = '$key' AND meta_value = '$value'"); + $cache_key = $post_meta_cache['$post_id'][$key]; + foreach ( $cache_key as $index => $data ) + if ( $data == $value ) + unset($post_meta_cache['$post_id'][$key][$index]); } + + unset($post_meta_cache['$post_id'][$key]); return true; } @@ -469,29 +482,49 @@ function get_post_meta($post_id, $key, $single = false) { if ($single) { if (count($values)) { - return $values[0]; + $return = $values[0]; } else { return ''; } } else { - return $values; + $return = $values; } + + @ $kellogs = unserialize($return); + if ($kellogs !== FALSE) + return $kellogs; + else return $return; } function update_post_meta($post_id, $key, $value, $prev_value = '') { global $wpdb, $post_meta_cache; - if(! $wpdb->get_var("SELECT meta_key FROM $wpdb->postmeta WHERE meta_key + $original_value = $value; + if ( is_array($value) || is_object($value) ) + $value = $wpdb->escape(serialize($value)); + + $original_prev = $prev_value; + if ( is_array($prev_value) || is_object($prev_value) ) + $prev_value = serialize($value); + + if(! $wpdb->get_var("SELECT meta_key FROM $wpdb->postmeta WHERE meta_key = '$key' AND post_id = '$post_id'") ) { - return false; - } + return false; + } if (empty($prev_value)) { $wpdb->query("UPDATE $wpdb->postmeta SET meta_value = '$value' WHERE meta_key = '$key' AND post_id = '$post_id'"); + $cache_key = $post_meta_cache['$post_id'][$key]; + foreach ($cache_key as $index => $data) + $post_meta_cache['$post_id'][$key][$index] = $original_value; } else { $wpdb->query("UPDATE $wpdb->postmeta SET meta_value = '$value' WHERE meta_key = '$key' AND post_id = '$post_id' AND meta_value = '$prev_value'"); + $cache_key = $post_meta_cache['$post_id'][$key]; + foreach ($cache_key as $index => $data) + if ( $data == $original_prev ) + $post_meta_cache['$post_id'][$key][$index] = $original_value; } return true; @@ -846,7 +879,7 @@ function check_for_pings() { $doping = true; } if($doping) - echo '<iframe src="' . get_settings('siteurl') .'/wp-admin/execute-pings.php?time=' . time() . '" style="border:none;width:1px;height:1px;"></iframe>'; + echo '<iframe id="pingcheck" src="' . get_settings('siteurl') .'/wp-admin/execute-pings.php?time=' . time() . '" style="border:none;width:1px;height:1px;"></iframe>'; } function do_enclose( $content, $post_ID ) { @@ -2052,7 +2085,7 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) { $meta_value = serialize($meta_value); $cur = $wpdb->get_row("SELECT * FROM $wpdb->usermeta WHERE user_id = '$user_id' AND meta_key = '$meta_key'"); - if ( !$cur && !empty( $meta_value ) ) { + if ( !$cur ) { $wpdb->query("INSERT INTO $wpdb->usermeta ( user_id, meta_key, meta_value ) VALUES ( '$user_id', '$meta_key', '$meta_value' )"); @@ -2060,8 +2093,6 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) { } if ( $cur->meta_value != $meta_value ) $wpdb->query("UPDATE $wpdb->usermeta SET meta_value = '$meta_value' WHERE user_id = '$user_id' AND meta_key = '$meta_key'"); - if ( empty( $meta_value ) ) - $wpdb->query("DELETE FROM $wpdb->usermeta WHERE user_id = '$user_id' AND meta_key = '$meta_key'"); } function register_activation_hook($file, $function) { diff --git a/wp-inst/wp-includes/js/colorpicker.js b/wp-inst/wp-includes/js/colorpicker.js new file mode 100644 index 0000000..2f0438e --- /dev/null +++ b/wp-inst/wp-includes/js/colorpicker.js @@ -0,0 +1,707 @@ +// =================================================================== +// Author: Matt Kruse <matt@mattkruse.com> +// WWW: http://www.mattkruse.com/ +// +// NOTICE: You may use this code for any purpose, commercial or +// private, without any further permission from the author. You may +// remove this notice from your final code if you wish, however it is +// appreciated by the author if at least my web site address is kept. +// +// You may *NOT* re-distribute this code in any way except through its +// use. That means, you can include it in your product, or your web +// site, or any other form where the code is actually being used. You +// may not put the plain javascript up on your site for download or +// include it in your javascript libraries for download. +// If you wish to share this code with others, please just point them +// to the URL instead. +// Please DO NOT link directly to my .js files from your site. Copy +// the files to your server and use them there. Thank you. +// =================================================================== + + +/* SOURCE FILE: AnchorPosition.js */ + +/* +AnchorPosition.js +Author: Matt Kruse +Last modified: 10/11/02 + +DESCRIPTION: These functions find the position of an <A> tag in a document, +so other elements can be positioned relative to it. + +COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small +positioning errors - usually with Window positioning - occur on the +Macintosh platform. + +FUNCTIONS: +getAnchorPosition(anchorname) + Returns an Object() having .x and .y properties of the pixel coordinates + of the upper-left corner of the anchor. Position is relative to the PAGE. + +getAnchorWindowPosition(anchorname) + Returns an Object() having .x and .y properties of the pixel coordinates + of the upper-left corner of the anchor, relative to the WHOLE SCREEN. + +NOTES: + +1) For popping up separate browser windows, use getAnchorWindowPosition. + Otherwise, use getAnchorPosition + +2) Your anchor tag MUST contain both NAME and ID attributes which are the + same. For example: + <A NAME="test" ID="test"> </A> + +3) There must be at least a space between <A> </A> for IE5.5 to see the + anchor tag correctly. Do not do <A></A> with no space. +*/ + +// getAnchorPosition(anchorname) +// This function returns an object having .x and .y properties which are the coordinates +// of the named anchor, relative to the page. +function getAnchorPosition(anchorname) { + // This function will return an Object with x and y properties + var useWindow=false; + var coordinates=new Object(); + var x=0,y=0; + // Browser capability sniffing + var use_gebi=false, use_css=false, use_layers=false; + if (document.getElementById) { use_gebi=true; } + else if (document.all) { use_css=true; } + else if (document.layers) { use_layers=true; } + // Logic to find position + if (use_gebi && document.all) { + x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]); + y=AnchorPosition_getPageOffsetTop(document.all[anchorname]); + } + else if (use_gebi) { + var o=document.getElementById(anchorname); + x=AnchorPosition_getPageOffsetLeft(o); + y=AnchorPosition_getPageOffsetTop(o); + } + else if (use_css) { + x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]); + y=AnchorPosition_getPageOffsetTop(document.all[anchorname]); + } + else if (use_layers) { + var found=0; + for (var i=0; i<document.anchors.length; i++) { + if (document.anchors[i].name==anchorname) { found=1; break; } + } + if (found==0) { + coordinates.x=0; coordinates.y=0; return coordinates; + } + x=document.anchors[i].x; + y=document.anchors[i].y; + } + else { + coordinates.x=0; coordinates.y=0; return coordinates; + } + coordinates.x=x; + coordinates.y=y; + return coordinates; + } + +// getAnchorWindowPosition(anchorname) +// This function returns an object having .x and .y properties which are the coordinates +// of the named anchor, relative to the window +function getAnchorWindowPosition(anchorname) { + var coordinates=getAnchorPosition(anchorname); + var x=0; + var y=0; + if (document.getElementById) { + if (isNaN(window.screenX)) { + x=coordinates.x-document.body.scrollLeft+window.screenLeft; + y=coordinates.y-document.body.scrollTop+window.screenTop; + } + else { + x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset; + y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset; + } + } + else if (document.all) { + x=coordinates.x-document.body.scrollLeft+window.screenLeft; + y=coordinates.y-document.body.scrollTop+window.screenTop; + } + else if (document.layers) { + x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset; + y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset; + } + coordinates.x=x; + coordinates.y=y; + return coordinates; + } + +// Functions for IE to get position of an object +function AnchorPosition_getPageOffsetLeft (el) { + var ol=el.offsetLeft; + while ((el=el.offsetParent) != null) { ol += el.offsetLeft; } + return ol; + } +function AnchorPosition_getWindowOffsetLeft (el) { + return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft; + } +function AnchorPosition_getPageOffsetTop (el) { + var ot=el.offsetTop; + while((el=el.offsetParent) != null) { ot += el.offsetTop; } + return ot; + } +function AnchorPosition_getWindowOffsetTop (el) { + return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop; + } + +/* SOURCE FILE: PopupWindow.js */ + +/* +PopupWindow.js +Author: Matt Kruse +Last modified: 02/16/04 + +DESCRIPTION: This object allows you to easily and quickly popup a window +in a certain place. The window can either be a DIV or a separate browser +window. + +COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small +positioning errors - usually with Window positioning - occur on the +Macintosh platform. Due to bugs in Netscape 4.x, populating the popup +window with <STYLE> tags may cause errors. + +USAGE: +// Create an object for a WINDOW popup +var win = new PopupWindow(); + +// Create an object for a DIV window using the DIV named 'mydiv' +var win = new PopupWindow('mydiv'); + +// Set the window to automatically hide itself when the user clicks +// anywhere else on the page except the popup +win.autoHide(); + +// Show the window relative to the anchor name passed in +win.showPopup(anchorname); + +// Hide the popup +win.hidePopup(); + +// Set the size of the popup window (only applies to WINDOW popups +win.setSize(width,height); + +// Populate the contents of the popup window that will be shown. If you +// change the contents while it is displayed, you will need to refresh() +win.populate(string); + +// set the URL of the window, rather than populating its contents +// manually +win.setUrl("http://www.site.com/"); + +// Refresh the contents of the popup +win.refresh(); + +// Specify how many pixels to the right of the anchor the popup will appear +win.offsetX = 50; + +// Specify how many pixels below the anchor the popup will appear +win.offsetY = 100; + +NOTES: +1) Requires the functions in AnchorPosition.js + +2) Your anchor tag MUST contain both NAME and ID attributes which are the + same. For example: + <A NAME="test" ID="test"> </A> + +3) There must be at least a space between <A> </A> for IE5.5 to see the + anchor tag correctly. Do not do <A></A> with no space. + +4) When a PopupWindow object is created, a handler for 'onmouseup' is + attached to any event handler you may have already defined. Do NOT define + an event handler for 'onmouseup' after you define a PopupWindow object or + the autoHide() will not work correctly. +*/ + +// Set the position of the popup window based on the anchor +function PopupWindow_getXYPosition(anchorname) { + var coordinates; + if (this.type == "WINDOW") { + coordinates = getAnchorWindowPosition(anchorname); + } + else { + coordinates = getAnchorPosition(anchorname); + } + this.x = coordinates.x; + this.y = coordinates.y; + } +// Set width/height of DIV/popup window +function PopupWindow_setSize(width,height) { + this.width = width; + this.height = height; + } +// Fill the window with contents +function PopupWindow_populate(contents) { + this.contents = contents; + this.populated = false; + } +// Set the URL to go to +function PopupWindow_setUrl(url) { + this.url = url; + } +// Set the window popup properties +function PopupWindow_setWindowProperties(props) { + this.windowProperties = props; + } +// Refresh the displayed contents of the popup +function PopupWindow_refresh() { + if (this.divName != null) { + // refresh the DIV object + if (this.use_gebi) { + document.getElementById(this.divName).innerHTML = this.contents; + } + else if (this.use_css) { + document.all[this.divName].innerHTML = this.contents; + } + else if (this.use_layers) { + var d = document.layers[this.divName]; + d.document.open(); + d.document.writeln(this.contents); + d.document.close(); + } + } + else { + if (this.popupWindow != null && !this.popupWindow.closed) { + if (this.url!="") { + this.popupWindow.location.href=this.url; + } + else { + this.popupWindow.document.open(); + this.popupWindow.document.writeln(this.contents); + this.popupWindow.document.close(); + } + this.popupWindow.focus(); + } + } + } +// Position and show the popup, relative to an anchor object +function PopupWindow_showPopup(anchorname) { + this.getXYPosition(anchorname); + this.x += this.offsetX; + this.y += this.offsetY; + if (!this.populated && (this.contents != "")) { + this.populated = true; + this.refresh(); + } + if (this.divName != null) { + // Show the DIV object + if (this.use_gebi) { + document.getElementById(this.divName).style.left = this.x + "px"; + document.getElementById(this.divName).style.top = this.y; + document.getElementById(this.divName).style.visibility = "visible"; + } + else if (this.use_css) { + document.all[this.divName].style.left = this.x; + document.all[this.divName].style.top = this.y; + document.all[this.divName].style.visibility = "visible"; + } + else if (this.use_layers) { + document.layers[this.divName].left = this.x; + document.layers[this.divName].top = this.y; + document.layers[this.divName].visibility = "visible"; + } + } + else { + if (this.popupWindow == null || this.popupWindow.closed) { + // If the popup window will go off-screen, move it so it doesn't + if (this.x<0) { this.x=0; } + if (this.y<0) { this.y=0; } + if (screen && screen.availHeight) { + if ((this.y + this.height) > screen.availHeight) { + this.y = screen.availHeight - this.height; + } + } + if (screen && screen.availWidth) { + if ((this.x + this.width) > screen.availWidth) { + this.x = screen.availWidth - this.width; + } + } + var avoidAboutBlank = window.opera || ( document.layers && !navigator.mimeTypes['*'] ) || navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled ); + this.popupWindow = window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+""); + } + this.refresh(); + } + } +// Hide the popup +function PopupWindow_hidePopup() { + if (this.divName != null) { + if (this.use_gebi) { + document.getElementById(this.divName).style.visibility = "hidden"; + } + else if (this.use_css) { + document.all[this.divName].style.visibility = "hidden"; + } + else if (this.use_layers) { + document.layers[this.divName].visibility = "hidden"; + } + } + else { + if (this.popupWindow && !this.popupWindow.closed) { + this.popupWindow.close(); + this.popupWindow = null; + } + } + } +// Pass an event and return whether or not it was the popup DIV that was clicked +function PopupWindow_isClicked(e) { + if (this.divName != null) { + if (this.use_layers) { + var clickX = e.pageX; + var clickY = e.pageY; + var t = document.layers[this.divName]; + if ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) { + return true; + } + else { return false; } + } + else if (document.all) { // Need to hard-code this to trap IE for error-handling + var t = window.event.srcElement; + while (t.parentElement != null) { + if (t.id==this.divName) { + return true; + } + t = t.parentElement; + } + return false; + } + else if (this.use_gebi && e) { + var t = e.originalTarget; + while (t.parentNode != null) { + if (t.id==this.divName) { + return true; + } + t = t.parentNode; + } + return false; + } + return false; + } + return false; + } + +// Check an onMouseDown event to see if we should hide +function PopupWindow_hideIfNotClicked(e) { + if (this.autoHideEnabled && !this.isClicked(e)) { + this.hidePopup(); + } + } +// Call this to make the DIV disable automatically when mouse is clicked outside it +function PopupWindow_autoHide() { + this.autoHideEnabled = true; + } +// This global function checks all PopupWindow objects onmouseup to see if they should be hidden +function PopupWindow_hidePopupWindows(e) { + for (var i=0; i<popupWindowObjects.length; i++) { + if (popupWindowObjects[i] != null) { + var p = popupWindowObjects[i]; + p.hideIfNotClicked(e); + } + } + } +// Run this immediately to attach the event listener +function PopupWindow_attachListener() { + if (document.layers) { + document.captureEvents(Event.MOUSEUP); + } + window.popupWindowOldEventListener = document.onmouseup; + if (window.popupWindowOldEventListener != null) { + document.onmouseup = new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();"); + } + else { + document.onmouseup = PopupWindow_hidePopupWindows; + } + } +// CONSTRUCTOR for the PopupWindow object +// Pass it a DIV name to use a DHTML popup, otherwise will default to window popup +function PopupWindow() { + if (!window.popupWindowIndex) { window.popupWindowIndex = 0; } + if (!window.popupWindowObjects) { window.popupWindowObjects = new Array(); } + if (!window.listenerAttached) { + window.listenerAttached = true; + PopupWindow_attachListener(); + } + this.index = popupWindowIndex++; + popupWindowObjects[this.index] = this; + this.divName = null; + this.popupWindow = null; + this.width=0; + this.height=0; + this.populated = false; + this.visible = false; + this.autoHideEnabled = false; + + this.contents = ""; + this.url=""; + this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no"; + if (arguments.length>0) { + this.type="DIV"; + this.divName = arguments[0]; + } + else { + this.type="WINDOW"; + } + this.use_gebi = false; + this.use_css = false; + this.use_layers = false; + if (document.getElementById) { this.use_gebi = true; } + else if (document.all) { this.use_css = true; } + else if (document.layers) { this.use_layers = true; } + else { this.type = "WINDOW"; } + this.offsetX = 0; + this.offsetY = 0; + // Method mappings + this.getXYPosition = PopupWindow_getXYPosition; + this.populate = PopupWindow_populate; + this.setUrl = PopupWindow_setUrl; + this.setWindowProperties = PopupWindow_setWindowProperties; + this.refresh = PopupWindow_refresh; + this.showPopup = PopupWindow_showPopup; + this.hidePopup = PopupWindow_hidePopup; + this.setSize = PopupWindow_setSize; + this.isClicked = PopupWindow_isClicked; + this.autoHide = PopupWindow_autoHide; + this.hideIfNotClicked = PopupWindow_hideIfNotClicked; + } + +/* SOURCE FILE: ColorPicker2.js */ + +/* +Last modified: 02/24/2003 + +DESCRIPTION: This widget is used to select a color, in hexadecimal #RRGGBB +form. It uses a color "swatch" to display the standard 216-color web-safe +palette. The user can then click on a color to select it. + +COMPATABILITY: See notes in AnchorPosition.js and PopupWindow.js. +Only the latest DHTML-capable browsers will show the color and hex values +at the bottom as your mouse goes over them. + +USAGE: +// Create a new ColorPicker object using DHTML popup +var cp = new ColorPicker(); + +// Create a new ColorPicker object using Window Popup +var cp = new ColorPicker('window'); + +// Add a link in your page to trigger the popup. For example: +<A HREF="#" onClick="cp.show('pick');return false;" NAME="pick" ID="pick">Pick</A> + +// Or use the built-in "select" function to do the dirty work for you: +<A HREF="#" onClick="cp.select(document.forms[0].color,'pick');return false;" NAME="pick" ID="pick">Pick</A> + +// If using DHTML popup, write out the required DIV tag near the bottom +// of your page. +<SCRIPT LANGUAGE="JavaScript">cp.writeDiv()</SCRIPT> + +// Write the 'pickColor' function that will be called when the user clicks +// a color and do something with the value. This is only required if you +// want to do something other than simply populate a form field, which is +// what the 'select' function will give you. +function pickColor(color) { + field.value = color; + } + +NOTES: +1) Requires the functions in AnchorPosition.js and PopupWindow.js + +2) Your anchor tag MUST contain both NAME and ID attributes which are the + same. For example: + <A NAME="test" ID="test"> </A> + +3) There must be at least a space between <A> </A> for IE5.5 to see the + anchor tag correctly. Do not do <A></A> with no space. + +4) When a ColorPicker object is created, a handler for 'onmouseup' is + attached to any event handler you may have already defined. Do NOT define + an event handler for 'onmouseup' after you define a ColorPicker object or + the color picker will not hide itself correctly. +*/ +ColorPicker_targetInput = null; +function ColorPicker_writeDiv() { + document.writeln("<DIV ID=\"colorPickerDiv\" STYLE=\"position:absolute;visibility:hidden;\"> </DIV>"); + } + +function ColorPicker_show(anchorname) { + this.showPopup(anchorname); + } + +function ColorPicker_pickColor(color,obj) { + obj.hidePopup(); + pickColor(color); + } + +// A Default "pickColor" function to accept the color passed back from popup. +// User can over-ride this with their own function. +function pickColor(color) { + if (ColorPicker_targetInput==null) { + alert("Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!"); + return; + } + ColorPicker_targetInput.value = color; + } + +// This function is the easiest way to popup the window, select a color, and +// have the value populate a form field, which is what most people want to do. +function ColorPicker_select(inputobj,linkname) { + if (inputobj.type!="text" && inputobj.type!="hidden" && inputobj.type!="textarea") { + alert("colorpicker.select: Input object passed is not a valid form input object"); + window.ColorPicker_targetInput=null; + return; + } + window.ColorPicker_targetInput = inputobj; + this.show(linkname); + } + +// This function runs when you move your mouse over a color block, if you have a newer browser +function ColorPicker_highlightColor(c) { + var thedoc = (arguments.length>1)?arguments[1]:window.document; + var d = thedoc.getElementById("colorPickerSelectedColor"); + d.style.backgroundColor = c; + d = thedoc.getElementById("colorPickerSelectedColorValue"); + d.innerHTML = c; + } + +function ColorPicker() { + var windowMode = false; + // Create a new PopupWindow object + if (arguments.length==0) { + var divname = "colorPickerDiv"; + } + else if (arguments[0] == "window") { + var divname = ''; + windowMode = true; + } + else { + var divname = arguments[0]; + } + + if (divname != "") { + var cp = new PopupWindow(divname); + } + else { + var cp = new PopupWindow(); + cp.setSize(225,250); + } + + // Object variables + cp.currentValue = "#FFFFFF"; + + // Method Mappings + cp.writeDiv = ColorPicker_writeDiv; + cp.highlightColor = ColorPicker_highlightColor; + cp.show = ColorPicker_show; + cp.select = ColorPicker_select; + + // Code to populate color picker window + var colors = new Array( "#4180B6","#69AEE7","#000000","#000033","#000066","#000099","#0000CC","#0000FF","#330000","#330033","#330066","#330099", + "#3300CC","#3300FF","#660000","#660033","#660066","#660099","#6600CC","#6600FF","#990000","#990033","#990066","#990099", + "#9900CC","#9900FF","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#FF0000","#FF0033","#FF0066","#FF0099", + "#FF00CC","#FF00FF","#7FFFFF","#7FFFFF","#7FF7F7","#7FEFEF","#7FE7E7","#7FDFDF","#7FD7D7","#7FCFCF","#7FC7C7","#7FBFBF", + "#7FB7B7","#7FAFAF","#7FA7A7","#7F9F9F","#7F9797","#7F8F8F","#7F8787","#7F7F7F","#7F7777","#7F6F6F","#7F6767","#7F5F5F", + "#7F5757","#7F4F4F","#7F4747","#7F3F3F","#7F3737","#7F2F2F","#7F2727","#7F1F1F","#7F1717","#7F0F0F","#7F0707","#7F0000", + + "#4180B6","#69AEE7","#003300","#003333","#003366","#003399","#0033CC","#0033FF","#333300","#333333","#333366","#333399", + "#3333CC","#3333FF","#663300","#663333","#663366","#663399","#6633CC","#6633FF","#993300","#993333","#993366","#993399", + "#9933CC","#9933FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#FF3300","#FF3333","#FF3366","#FF3399", + "#FF33CC","#FF33FF","#FF7FFF","#FF7FFF","#F77FF7","#EF7FEF","#E77FE7","#DF7FDF","#D77FD7","#CF7FCF","#C77FC7","#BF7FBF", + "#B77FB7","#AF7FAF","#A77FA7","#9F7F9F","#977F97","#8F7F8F","#877F87","#7F7F7F","#777F77","#6F7F6F","#677F67","#5F7F5F", + "#577F57","#4F7F4F","#477F47","#3F7F3F","#377F37","#2F7F2F","#277F27","#1F7F1F","#177F17","#0F7F0F","#077F07","#007F00", + + "#4180B6","#69AEE7","#006600","#006633","#006666","#006699","#0066CC","#0066FF","#336600","#336633","#336666","#336699", + "#3366CC","#3366FF","#666600","#666633","#666666","#666699","#6666CC","#6666FF","#996600","#996633","#996666","#996699", + "#9966CC","#9966FF","#CC6600","#CC6633","#CC6666","#CC6699","#CC66CC","#CC66FF","#FF6600","#FF6633","#FF6666","#FF6699", + "#FF66CC","#FF66FF","#FFFF7F","#FFFF7F","#F7F77F","#EFEF7F","#E7E77F","#DFDF7F","#D7D77F","#CFCF7F","#C7C77F","#BFBF7F", + "#B7B77F","#AFAF7F","#A7A77F","#9F9F7F","#97977F","#8F8F7F","#87877F","#7F7F7F","#77777F","#6F6F7F","#67677F","#5F5F7F", + "#57577F","#4F4F7F","#47477F","#3F3F7F","#37377F","#2F2F7F","#27277F","#1F1F7F","#17177F","#0F0F7F","#07077F","#00007F", + + "#4180B6","#69AEE7","#009900","#009933","#009966","#009999","#0099CC","#0099FF","#339900","#339933","#339966","#339999", + "#3399CC","#3399FF","#669900","#669933","#669966","#669999","#6699CC","#6699FF","#999900","#999933","#999966","#999999", + "#9999CC","#9999FF","#CC9900","#CC9933","#CC9966","#CC9999","#CC99CC","#CC99FF","#FF9900","#FF9933","#FF9966","#FF9999", + "#FF99CC","#FF99FF","#3FFFFF","#3FFFFF","#3FF7F7","#3FEFEF","#3FE7E7","#3FDFDF","#3FD7D7","#3FCFCF","#3FC7C7","#3FBFBF", + "#3FB7B7","#3FAFAF","#3FA7A7","#3F9F9F","#3F9797","#3F8F8F","#3F8787","#3F7F7F","#3F7777","#3F6F6F","#3F6767","#3F5F5F", + "#3F5757","#3F4F4F","#3F4747","#3F3F3F","#3F3737","#3F2F2F","#3F2727","#3F1F1F","#3F1717","#3F0F0F","#3F0707","#3F0000", + + "#4180B6","#69AEE7","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#33CC00","#33CC33","#33CC66","#33CC99", + "#33CCCC","#33CCFF","#66CC00","#66CC33","#66CC66","#66CC99","#66CCCC","#66CCFF","#99CC00","#99CC33","#99CC66","#99CC99", + "#99CCCC","#99CCFF","#CCCC00","#CCCC33","#CCCC66","#CCCC99","#CCCCCC","#CCCCFF","#FFCC00","#FFCC33","#FFCC66","#FFCC99", + "#FFCCCC","#FFCCFF","#FF3FFF","#FF3FFF","#F73FF7","#EF3FEF","#E73FE7","#DF3FDF","#D73FD7","#CF3FCF","#C73FC7","#BF3FBF", + "#B73FB7","#AF3FAF","#A73FA7","#9F3F9F","#973F97","#8F3F8F","#873F87","#7F3F7F","#773F77","#6F3F6F","#673F67","#5F3F5F", + "#573F57","#4F3F4F","#473F47","#3F3F3F","#373F37","#2F3F2F","#273F27","#1F3F1F","#173F17","#0F3F0F","#073F07","#003F00", + + "#4180B6","#69AEE7","#00FF00","#00FF33","#00FF66","#00FF99","#00FFCC","#00FFFF","#33FF00","#33FF33","#33FF66","#33FF99", + "#33FFCC","#33FFFF","#66FF00","#66FF33","#66FF66","#66FF99","#66FFCC","#66FFFF","#99FF00","#99FF33","#99FF66","#99FF99", + "#99FFCC","#99FFFF","#CCFF00","#CCFF33","#CCFF66","#CCFF99","#CCFFCC","#CCFFFF","#FFFF00","#FFFF33","#FFFF66","#FFFF99", + "#FFFFCC","#FFFFFF","#FFFF3F","#FFFF3F","#F7F73F","#EFEF3F","#E7E73F","#DFDF3F","#D7D73F","#CFCF3F","#C7C73F","#BFBF3F", + "#B7B73F","#AFAF3F","#A7A73F","#9F9F3F","#97973F","#8F8F3F","#87873F","#7F7F3F","#77773F","#6F6F3F","#67673F","#5F5F3F", + "#57573F","#4F4F3F","#47473F","#3F3F3F","#37373F","#2F2F3F","#27273F","#1F1F3F","#17173F","#0F0F3F","#07073F","#00003F", + + "#4180B6","#69AEE7","#FFFFFF","#FFEEEE","#FFDDDD","#FFCCCC","#FFBBBB","#FFAAAA","#FF9999","#FF8888","#FF7777","#FF6666", + "#FF5555","#FF4444","#FF3333","#FF2222","#FF1111","#FF0000","#FF0000","#FF0000","#FF0000","#EE0000","#DD0000","#CC0000", + "#BB0000","#AA0000","#990000","#880000","#770000","#660000","#550000","#440000","#330000","#220000","#110000","#000000", + "#000000","#000000","#000000","#001111","#002222","#003333","#004444","#005555","#006666","#007777","#008888","#009999", + "#00AAAA","#00BBBB","#00CCCC","#00DDDD","#00EEEE","#00FFFF","#00FFFF","#00FFFF","#00FFFF","#11FFFF","#22FFFF","#33FFFF", + "#44FFFF","#55FFFF","#66FFFF","#77FFFF","#88FFFF","#99FFFF","#AAFFFF","#BBFFFF","#CCFFFF","#DDFFFF","#EEFFFF","#FFFFFF", + + "#4180B6","#69AEE7","#FFFFFF","#EEFFEE","#DDFFDD","#CCFFCC","#BBFFBB","#AAFFAA","#99FF99","#88FF88","#77FF77","#66FF66", + "#55FF55","#44FF44","#33FF33","#22FF22","#11FF11","#00FF00","#00FF00","#00FF00","#00FF00","#00EE00","#00DD00","#00CC00", + "#00BB00","#00AA00","#009900","#008800","#007700","#006600","#005500","#004400","#003300","#002200","#001100","#000000", + "#000000","#000000","#000000","#110011","#220022","#330033","#440044","#550055","#660066","#770077","#880088","#990099", + "#AA00AA","#BB00BB","#CC00CC","#DD00DD","#EE00EE","#FF00FF","#FF00FF","#FF00FF","#FF00FF","#FF11FF","#FF22FF","#FF33FF", + "#FF44FF","#FF55FF","#FF66FF","#FF77FF","#FF88FF","#FF99FF","#FFAAFF","#FFBBFF","#FFCCFF","#FFDDFF","#FFEEFF","#FFFFFF", + + "#4180B6","#69AEE7","#FFFFFF","#EEEEFF","#DDDDFF","#CCCCFF","#BBBBFF","#AAAAFF","#9999FF","#8888FF","#7777FF","#6666FF", + "#5555FF","#4444FF","#3333FF","#2222FF","#1111FF","#0000FF","#0000FF","#0000FF","#0000FF","#0000EE","#0000DD","#0000CC", + "#0000BB","#0000AA","#000099","#000088","#000077","#000066","#000055","#000044","#000033","#000022","#000011","#000000", + "#000000","#000000","#000000","#111100","#222200","#333300","#444400","#555500","#666600","#777700","#888800","#999900", + "#AAAA00","#BBBB00","#CCCC00","#DDDD00","#EEEE00","#FFFF00","#FFFF00","#FFFF00","#FFFF00","#FFFF11","#FFFF22","#FFFF33", + "#FFFF44","#FFFF55","#FFFF66","#FFFF77","#FFFF88","#FFFF99","#FFFFAA","#FFFFBB","#FFFFCC","#FFFFDD","#FFFFEE","#FFFFFF", + + "#4180B6","#69AEE7","#FFFFFF","#FFFFFF","#FBFBFB","#F7F7F7","#F3F3F3","#EFEFEF","#EBEBEB","#E7E7E7","#E3E3E3","#DFDFDF", + "#DBDBDB","#D7D7D7","#D3D3D3","#CFCFCF","#CBCBCB","#C7C7C7","#C3C3C3","#BFBFBF","#BBBBBB","#B7B7B7","#B3B3B3","#AFAFAF", + "#ABABAB","#A7A7A7","#A3A3A3","#9F9F9F","#9B9B9B","#979797","#939393","#8F8F8F","#8B8B8B","#878787","#838383","#7F7F7F", + "#7B7B7B","#777777","#737373","#6F6F6F","#6B6B6B","#676767","#636363","#5F5F5F","#5B5B5B","#575757","#535353","#4F4F4F", + "#4B4B4B","#474747","#434343","#3F3F3F","#3B3B3B","#373737","#333333","#2F2F2F","#2B2B2B","#272727","#232323","#1F1F1F", + "#1B1B1B","#171717","#131313","#0F0F0F","#0B0B0B","#070707","#030303","#000000","#000000","#000000","#000000","#000000"); + var total = colors.length; + var width = 72; + var cp_contents = ""; + var windowRef = (windowMode)?"window.opener.":""; + if (windowMode) { + cp_contents += "<html><head><title>Select Color</title></head>"; + cp_contents += "<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0><center>"; + } + cp_contents += "<table border=0 cellspacing=0 cellpadding=0>"; + var use_highlight = (document.getElementById || document.all)?true:false; + for (var i=0; i<total; i++) { + if ((i % width) == 0) { cp_contents += "<tr>"; } + if (use_highlight) { var mo = 'onMouseOver="'+windowRef+'ColorPicker_highlightColor(\''+colors[i]+'\',window.document)"'; } + else { mo = ""; } + cp_contents += '<td bgcolor="'+colors[i]+'"><a href="javascript:void()" onclick="'+windowRef+'ColorPicker_pickColor(\''+colors[i]+'\','+windowRef+'window.popupWindowObjects['+cp.index+']);return false;" '+mo+'> </a></td>'; + if ( ((i+1)>=total) || (((i+1) % width) == 0)) { + cp_contents += "</tr>"; + } + } + // If the browser supports dynamically changing TD cells, add the fancy stuff + if (document.getElementById) { + var width1 = Math.floor(width/2); + var width2 = width = width1; + cp_contents += "<tr><td colspan='"+width1+"' bgcolor='#ffffff' ID='colorPickerSelectedColor'> </td><td colspan='"+width2+"' align='center' id='colorPickerSelectedColorValue'>#FFFFFF</td></tr>"; + } + cp_contents += "</table>"; + if (windowMode) { + cp_contents += "</center></body></html>"; + } + // end populate code + + // Write the contents to the popup object + cp.populate(cp_contents+"\n"); + // Move the table down a bit so you can see it + cp.offsetY = 25; + cp.autoHide(); + return cp; + } diff --git a/wp-inst/wp-includes/js/tinymce/blank.htm b/wp-inst/wp-includes/js/tinymce/blank.htm index 43bff25..c1ff835 100644 --- a/wp-inst/wp-includes/js/tinymce/blank.htm +++ b/wp-inst/wp-includes/js/tinymce/blank.htm @@ -1,8 +1,7 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> -<title>blank_page</title> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <title>blank_page</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body class="mceContentBody"> diff --git a/wp-inst/wp-includes/js/tinymce/plugins/autosave/editor_plugin.js b/wp-inst/wp-includes/js/tinymce/plugins/autosave/editor_plugin.js new file mode 100644 index 0000000..9d0511e --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/autosave/editor_plugin.js @@ -0,0 +1,2 @@ +/* Import plugin specific language pack */
+ tinyMCE.importPluginLanguagePack('autosave','en,sv,cs');function TinyMCE_autosave_getInfo(){return{longname:'Auto save',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_autosave_beforeUnloadHandler(){var msg=tinyMCE.getLang("lang_autosave_unload_msg");var anyDirty=false;for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(inst.isDirty())return msg;}return;}window.onbeforeunload=TinyMCE_autosave_beforeUnloadHandler;
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/autosave/editor_plugin_src.js b/wp-inst/wp-includes/js/tinymce/plugins/autosave/editor_plugin_src.js new file mode 100644 index 0000000..ed9afd1 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/autosave/editor_plugin_src.js @@ -0,0 +1,28 @@ +/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('autosave', 'en,sv,cs');
+
+function TinyMCE_autosave_getInfo() {
+ return {
+ longname : 'Auto save',
+ author : 'Moxiecode Systems',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+ };
+};
+
+function TinyMCE_autosave_beforeUnloadHandler() {
+ var msg = tinyMCE.getLang("lang_autosave_unload_msg");
+
+ var anyDirty = false;
+ for (var n in tinyMCE.instances) {
+ var inst = tinyMCE.instances[n];
+
+ if (inst.isDirty())
+ return msg;
+ }
+
+ return;
+}
+
+window.onbeforeunload = TinyMCE_autosave_beforeUnloadHandler;
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/autosave/langs/cs.js b/wp-inst/wp-includes/js/tinymce/plugins/autosave/langs/cs.js new file mode 100644 index 0000000..b41863d --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/autosave/langs/cs.js @@ -0,0 +1,11 @@ +/**
+ * Czech lang variables
+ * encoding: utf-8
+ *
+ * $Id$
+ */
+
+tinyMCE.addToLang('',{
+autosave_unload_msg : 'ZmÄ›ny, které jste udÄ›lal(a) budou ztraceny, jestliže opustÃte tuto stránku.'
+});
+
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/autosave/langs/en.js b/wp-inst/wp-includes/js/tinymce/plugins/autosave/langs/en.js new file mode 100644 index 0000000..0195133 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/autosave/langs/en.js @@ -0,0 +1,5 @@ +// EN lang variables
+
+tinyMCE.addToLang('',{
+autosave_unload_msg : 'The changes you made will be lost if you navigate away from this page.'
+});
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/autosave/langs/sv.js b/wp-inst/wp-includes/js/tinymce/plugins/autosave/langs/sv.js new file mode 100644 index 0000000..7c1b66e --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/autosave/langs/sv.js @@ -0,0 +1,6 @@ +// SE lang variables
+
+tinyMCE.addToLang('',{
+autosave_unload_msg : 'Förändringarna du gjorde kommer att gå förlorade om du väljer att lämna denna sida.'
+});
+
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/contextmenu/readme.txt b/wp-inst/wp-includes/js/tinymce/plugins/autosave/readme.txt index 4fdb78a..4fdb78a 100644 --- a/wp-inst/wp-includes/js/tinymce/plugins/contextmenu/readme.txt +++ b/wp-inst/wp-includes/js/tinymce/plugins/autosave/readme.txt diff --git a/wp-inst/wp-includes/js/tinymce/plugins/contextmenu/contextmenu.css b/wp-inst/wp-includes/js/tinymce/plugins/contextmenu/contextmenu.css deleted file mode 100644 index 58bb337..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/contextmenu/contextmenu.css +++ /dev/null @@ -1,60 +0,0 @@ -.contextMenuIEPopup {
- padding: 0px;
- margin: 0px;
- border: 0px;
- overflow: hidden;
-}
-
-.contextMenu {
- position: absolute;
- cursor: default;
- z-index: 1000;
- border: 1px solid #D4D0C8;
- background-color: #FFFFFF;
-}
-
-.contextMenuItem, .contextMenuItemOver {
-}
-
-.contextMenuItemOver {
- background-color: #B6BDD2;
-}
-
-.contextMenuSeparator {
- width: 100%;
- background-color: #D4D0C8;
- border: 0px;
-}
-
-.contextMenuImage, .contextMenuItemDisabled {
- border: 0px;
-}
-
-.contextMenuIcon {
- background-color: #F0F0EE;
-}
-
-.contextMenuItemOver .contextMenuIcon {
- background-color: #B6BDD2;
-}
-
-.contextMenuIcon {
- background-color: #F0F0EE;
-}
-
-.contextMenuItemDisabled img {
- filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
- -moz-opacity:0.3;
- opacity: 0.3;
-}
-
-.contextMenuText {
- font-family: Tahoma, Verdana, Arial, Helvetica;
- font-size: 11px;
- margin-left: 5px;
- margin-right: 10px;
-}
-
-.contextMenuItemDisabled {
- color: #AAAAAA;
-}
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/contextmenu/editor_plugin.js b/wp-inst/wp-includes/js/tinymce/plugins/contextmenu/editor_plugin.js deleted file mode 100644 index 9e28627..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/contextmenu/editor_plugin.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Import plugin specific language pack */
- if(!tinyMCE.settings['contextmenu_skip_plugin_css'])tinyMCE.loadCSS(tinyMCE.baseURL+"/plugins/contextmenu/contextmenu.css");var TinyMCE_contextmenu_contextMenu=null;function TinyMCE_contextmenu_initInstance(inst){if(tinyMCE.isMSIE5_0)return;tinyMCE.addEvent(inst.getDoc(),"click",TinyMCE_contextmenu_hideContextMenu);tinyMCE.addEvent(inst.getDoc(),"keypress",TinyMCE_contextmenu_hideContextMenu);tinyMCE.addEvent(inst.getDoc(),"keydown",TinyMCE_contextmenu_hideContextMenu);tinyMCE.addEvent(document,"click",TinyMCE_contextmenu_hideContextMenu);tinyMCE.addEvent(document,"keypress",TinyMCE_contextmenu_hideContextMenu);tinyMCE.addEvent(document,"keydown",TinyMCE_contextmenu_hideContextMenu);var contextMenu=new ContextMenu({commandhandler:"TinyMCE_contextmenu_commandHandler",spacer_image:tinyMCE.baseURL+"/plugins/contextmenu/images/spacer.gif"});TinyMCE_contextmenu_contextMenu=contextMenu;if(tinyMCE.isGecko){tinyMCE.addEvent(inst.getDoc(),"contextmenu",function(e){TinyMCE_contextmenu_showContextMenu(tinyMCE.isMSIE?inst.contentWindow.event:e,inst);});}else tinyMCE.addEvent(inst.getDoc(),"contextmenu",TinyMCE_contextmenu_onContextMenu);}function TinyMCE_contextmenu_onContextMenu(e){var elm=tinyMCE.isMSIE?e.srcElement:e.target;var targetInst,body;if((body=tinyMCE.getParentElement(elm,"body"))!=null){for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(body==inst.getBody()){targetInst=inst;break;}}return TinyMCE_contextmenu_showContextMenu(tinyMCE.isMSIE?targetInst.contentWindow.event:e,targetInst);}}function TinyMCE_contextmenu_showContextMenu(e,inst){function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";}var x,y,elm,contextMenu;var pos=tinyMCE.getAbsPosition(inst.iframeElement);x=tinyMCE.isMSIE?e.screenX:pos.absLeft+(e.pageX-inst.getBody().scrollLeft);y=tinyMCE.isMSIE?e.screenY:pos.absTop+(e.pageY-inst.getBody().scrollTop);elm=tinyMCE.isMSIE?e.srcElement:e.target;contextMenu=TinyMCE_contextmenu_contextMenu;contextMenu.inst=inst;window.setTimeout(function(){var theme=tinyMCE.getParam("theme");contextMenu.clearAll();var sel=inst.getSelectedText().length!=0||elm.nodeName=="IMG";contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/cut.gif","$lang_cut_desc","Cut","",!sel);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/copy.gif","$lang_copy_desc","Copy","",!sel);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_paste_desc","Paste","",false);elm=tinyMCE.getParentElement(elm,"img,table,td");if(elm){switch(elm.nodeName){case "IMG":contextMenu.addSeparator();if(tinyMCE.getAttrib(elm,'name','').indexOf('mce_plugin_flash')==0)contextMenu.addItem(tinyMCE.baseURL+"/plugins/flash/images/flash.gif","$lang_flash_props","mceFlash");else contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/image.gif","$lang_image_props_desc","mceImage");break;case "TABLE":case "TD":if(typeof(TinyMCE_table_getControlHTML)!="undefined"){var colspan=(elm.nodeName=="TABLE")?"":getAttrib(elm,"colspan");var rowspan=(elm.nodeName=="TABLE")?"":getAttrib(elm,"rowspan");colspan=colspan==""?"1":colspan;rowspan=rowspan==""?"1":rowspan;contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/cut.gif","$lang_table_cut_row_desc","mceTableCutRow");contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/copy.gif","$lang_table_copy_row_desc","mceTableCopyRow");contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_table_paste_row_before_desc","mceTablePasteRowBefore","",inst.tableRowClipboard==null);contextMenu.addItem(tinyMCE.baseURL+"/themes/"+theme+"/images/paste.gif","$lang_table_paste_row_after_desc","mceTablePasteRowAfter","",inst.tableRowClipboard==null);contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table.gif","$lang_table_insert_desc","mceInsertTable","insert");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table.gif","$lang_table_props_desc","mceInsertTable");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_cell_props.gif","$lang_table_cell_desc","mceTableCellProps");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_row_props.gif","$lang_table_row_desc","mceTableRowProps");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_row_before.gif","$lang_table_insert_row_before_desc","mceTableInsertRowBefore");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_row_after.gif","$lang_table_insert_row_after_desc","mceTableInsertRowAfter");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_delete_row.gif","$lang_table_delete_row_desc","mceTableDeleteRow");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_col_before.gif","$lang_table_insert_col_before_desc","mceTableInsertColBefore");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_insert_col_after.gif","$lang_table_insert_col_after_desc","mceTableInsertColAfter");contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_delete_col.gif","$lang_table_delete_col_desc","mceTableDeleteCol");contextMenu.addSeparator();contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_split_cells.gif","$lang_table_split_cells_desc","mceTableSplitCells","",(colspan=="1"&&rowspan=="1"));contextMenu.addItem(tinyMCE.baseURL+"/plugins/table/images/table_merge_cells.gif","$lang_table_merge_cells_desc","mceTableMergeCells","",false);}break;}}contextMenu.show(x,y);},10);tinyMCE.cancelEvent(e);return false;}function TinyMCE_contextmenu_hideContextMenu(){TinyMCE_contextmenu_contextMenu.hide();return true;}function TinyMCE_contextmenu_commandHandler(command,value){TinyMCE_contextmenu_contextMenu.hide();var ui=false;if(command=="mceInsertTable"||command=="mceTableCellProps"||command=="mceTableRowProps"||command=="mceTableMergeCells")ui=true;if(command=="Paste")value=null;TinyMCE_contextmenu_contextMenu.inst.execCommand(command,ui,value);}function ContextMenu(settings){function defParam(key,def_val){settings[key]=typeof(settings[key])!="undefined"?settings[key]:def_val;}var self=this;this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.contextMenuDiv=document.createElement("div");this.contextMenuDiv.className="contextMenu";this.contextMenuDiv.setAttribute("class","contextMenu");this.contextMenuDiv.style.display="none";this.contextMenuDiv.style.position='absolute';this.contextMenuDiv.style.zindex=1000;this.contextMenuDiv.style.left='0px';this.contextMenuDiv.style.top='0px';this.contextMenuDiv.unselectable="on";document.body.appendChild(this.contextMenuDiv);defParam("commandhandler","");defParam("spacer_image","images/spacer.gif");this.items=new Array();this.settings=settings;this.html="";if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0){this.pop=window.createPopup();doc=this.pop.document;doc.open();doc.write('<html><head><link href="'+tinyMCE.baseURL+'/plugins/contextmenu/contextmenu.css" rel="stylesheet" type="text/css" /></head><body unselectable="yes" class="contextMenuIEPopup"></body></html>');doc.close();}};ContextMenu.prototype.clearAll=function(){this.html="";this.contextMenuDiv.innerHTML="";};ContextMenu.prototype.addSeparator=function(){this.html+='<tr class="contextMenuItem"><td class="contextMenuIcon"><img src="'+this.settings['spacer_image']+'" width="20" height="1" class="contextMenuImage" /></td><td><img class="contextMenuSeparator" width="1" height="1" src="'+this.settings['spacer_image']+'" /></td></tr>';};ContextMenu.prototype.addItem=function(icon,title,command,value,disabled){if(title.charAt(0)=='$')title=tinyMCE.getLang(title.substring(1));var onMouseDown='';var html='';if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0)onMouseDown='contextMenu.execCommand(\''+command+'\', \''+value+'\');return false;';else onMouseDown=this.settings['commandhandler']+'(\''+command+'\', \''+value+'\');return false;';if(icon=="")icon=this.settings['spacer_image'];if(!disabled)html+='<tr class="contextMenuItem" onmousedown="'+onMouseDown+'" onmouseover="tinyMCE.switchClass(this,\'contextMenuItemOver\');" onmouseout="tinyMCE.switchClass(this,\'contextMenuItem\');">';else html+='<tr class="contextMenuItemDisabled">';html+='<td class="contextMenuIcon"><img src="'+icon+'" width="20" height="20" class="contextMenuImage" /></td>';html+='<td><div class="contextMenuText">';html+=title;html+='</div></td>';html+='</tr>';this.html+=html;};ContextMenu.prototype.show=function(x,y){if(this.html=="")return;var html='';html+='<table border="0" cellpadding="0" cellspacing="0">';html+=this.html;html+='</table>';this.contextMenuDiv.innerHTML=html;if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0){var width,height;this.contextMenuDiv.style.display="block";width=this.contextMenuDiv.offsetWidth;height=this.contextMenuDiv.offsetHeight;this.contextMenuDiv.style.display="none";this.pop.document.body.innerHTML='<div class="contextMenu">'+html+"</div>";this.pop.document.tinyMCE=tinyMCE;this.pop.document.contextMenu=this;this.pop.show(x,y,width,height);}else{this.contextMenuDiv.style.left=x+'px';this.contextMenuDiv.style.top=y+'px';this.contextMenuDiv.style.display="block";}};ContextMenu.prototype.hide=function(){if(tinyMCE.isMSIE&&!tinyMCE.isMSIE5_0)this.pop.hide();else this.contextMenuDiv.style.display="none";};ContextMenu.prototype.execCommand=function(command,value){eval(this.settings['commandhandler']+"(command, value);");};
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/contextmenu/editor_plugin_src.js b/wp-inst/wp-includes/js/tinymce/plugins/contextmenu/editor_plugin_src.js deleted file mode 100644 index 23675de..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/contextmenu/editor_plugin_src.js +++ /dev/null @@ -1,292 +0,0 @@ -/* Import plugin specific language pack */
-//tinyMCE.importPluginLanguagePack('contextmenu', 'en,zh_cn,cs,fa,fr_ca,fr,de');
-if (!tinyMCE.settings['contextmenu_skip_plugin_css'])
- tinyMCE.loadCSS(tinyMCE.baseURL + "/plugins/contextmenu/contextmenu.css");
-
-// Global contextmenu class instance
-var TinyMCE_contextmenu_contextMenu = null;
-
-function TinyMCE_contextmenu_initInstance(inst) {
- // Is not working on MSIE 5.0
- if (tinyMCE.isMSIE5_0)
- return;
-
- // Add hide event handles
- tinyMCE.addEvent(inst.getDoc(), "click", TinyMCE_contextmenu_hideContextMenu);
- tinyMCE.addEvent(inst.getDoc(), "keypress", TinyMCE_contextmenu_hideContextMenu);
- tinyMCE.addEvent(inst.getDoc(), "keydown", TinyMCE_contextmenu_hideContextMenu);
- tinyMCE.addEvent(document, "click", TinyMCE_contextmenu_hideContextMenu);
- tinyMCE.addEvent(document, "keypress", TinyMCE_contextmenu_hideContextMenu);
- tinyMCE.addEvent(document, "keydown", TinyMCE_contextmenu_hideContextMenu);
-
- var contextMenu = new ContextMenu({
- commandhandler : "TinyMCE_contextmenu_commandHandler",
- spacer_image : tinyMCE.baseURL + "/plugins/contextmenu/images/spacer.gif"
- });
-
- // Register global reference
- TinyMCE_contextmenu_contextMenu = contextMenu;
-
- // Attach contextmenu event
- if (tinyMCE.isGecko) {
- tinyMCE.addEvent(inst.getDoc(), "contextmenu", function(e) {TinyMCE_contextmenu_showContextMenu(tinyMCE.isMSIE ? inst.contentWindow.event : e, inst);});
- } else
- tinyMCE.addEvent(inst.getDoc(), "contextmenu", TinyMCE_contextmenu_onContextMenu);
-}
-
-function TinyMCE_contextmenu_onContextMenu(e) {
- var elm = tinyMCE.isMSIE ? e.srcElement : e.target;
- var targetInst, body;
-
- // Find instance
- if ((body = tinyMCE.getParentElement(elm, "body")) != null) {
- for (var n in tinyMCE.instances) {
- var inst = tinyMCE.instances[n];
-
- if (body == inst.getBody()) {
- targetInst = inst;
- break;
- }
- }
-
- return TinyMCE_contextmenu_showContextMenu(tinyMCE.isMSIE ? targetInst.contentWindow.event : e, targetInst);
- }
-}
-
-function TinyMCE_contextmenu_showContextMenu(e, inst) {
- function getAttrib(elm, name) {
- return elm.getAttribute(name) ? elm.getAttribute(name) : "";
- }
-
- var x, y, elm, contextMenu;
- var pos = tinyMCE.getAbsPosition(inst.iframeElement);
-
- x = tinyMCE.isMSIE ? e.screenX : pos.absLeft + (e.pageX - inst.getBody().scrollLeft);
- y = tinyMCE.isMSIE ? e.screenY : pos.absTop + (e.pageY - inst.getBody().scrollTop);
- elm = tinyMCE.isMSIE ? e.srcElement : e.target;
- contextMenu = TinyMCE_contextmenu_contextMenu;
- contextMenu.inst = inst;
-
- // Mozilla needs some time
- window.setTimeout(function () {
- var theme = tinyMCE.getParam("theme");
-
- contextMenu.clearAll();
- var sel = inst.getSelectedText().length != 0 || elm.nodeName == "IMG";
-
- // Default items
- contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_cut_desc", "Cut", "", !sel);
- contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_copy_desc", "Copy", "", !sel);
- contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_paste_desc", "Paste", "", false);
-
- // Get element
- elm = tinyMCE.getParentElement(elm, "img,table,td");
- if (elm) {
- switch (elm.nodeName) {
- case "IMG":
- contextMenu.addSeparator();
-
- // If flash
- if (tinyMCE.getAttrib(elm, 'name', '').indexOf('mce_plugin_flash') == 0)
- contextMenu.addItem(tinyMCE.baseURL + "/plugins/flash/images/flash.gif", "$lang_flash_props", "mceFlash");
- else
- contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/image.gif", "$lang_image_props_desc", "mceImage");
- break;
-
- case "TABLE":
- case "TD":
- // Is table plugin loaded
- if (typeof(TinyMCE_table_getControlHTML) != "undefined") {
- var colspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "colspan");
- var rowspan = (elm.nodeName == "TABLE") ? "" : getAttrib(elm, "rowspan");
-
- colspan = colspan == "" ? "1" : colspan;
- rowspan = rowspan == "" ? "1" : rowspan;
-
- contextMenu.addSeparator();
- contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/cut.gif", "$lang_table_cut_row_desc", "mceTableCutRow");
- contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/copy.gif", "$lang_table_copy_row_desc", "mceTableCopyRow");
- contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_before_desc", "mceTablePasteRowBefore", "", inst.tableRowClipboard == null);
- contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/paste.gif", "$lang_table_paste_row_after_desc", "mceTablePasteRowAfter", "", inst.tableRowClipboard == null);
-
-/* contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/left.gif", "$lang_justifyleft_desc", "JustifyLeft", "", false);
- contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/center.gif", "$lang_justifycenter_desc", "JustifyCenter", "", false);
- contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/right.gif", "$lang_justifyright_desc", "JustifyRight", "", false);
- contextMenu.addItem(tinyMCE.baseURL + "/themes/" + theme + "/images/full.gif", "$lang_justifyfull_desc", "JustifyFull", "", false);*/
- contextMenu.addSeparator();
- contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_insert_desc", "mceInsertTable", "insert");
- contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table.gif", "$lang_table_props_desc", "mceInsertTable");
- contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_cell_props.gif", "$lang_table_cell_desc", "mceTableCellProps");
- contextMenu.addSeparator();
- contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_row_props.gif", "$lang_table_row_desc", "mceTableRowProps");
- contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_before.gif", "$lang_table_insert_row_before_desc", "mceTableInsertRowBefore");
- contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_row_after.gif", "$lang_table_insert_row_after_desc", "mceTableInsertRowAfter");
- contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_row.gif", "$lang_table_delete_row_desc", "mceTableDeleteRow");
- contextMenu.addSeparator();
- contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_before.gif", "$lang_table_insert_col_before_desc", "mceTableInsertColBefore");
- contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_insert_col_after.gif", "$lang_table_insert_col_after_desc", "mceTableInsertColAfter");
- contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_delete_col.gif", "$lang_table_delete_col_desc", "mceTableDeleteCol");
- contextMenu.addSeparator();
- contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_split_cells.gif", "$lang_table_split_cells_desc", "mceTableSplitCells", "", (colspan == "1" && rowspan == "1"));
- contextMenu.addItem(tinyMCE.baseURL + "/plugins/table/images/table_merge_cells.gif", "$lang_table_merge_cells_desc", "mceTableMergeCells", "", false);
- }
- break;
- }
- }
-
- contextMenu.show(x, y);
- }, 10);
-
- // Cancel default handeling
- tinyMCE.cancelEvent(e);
- return false;
-}
-
-function TinyMCE_contextmenu_hideContextMenu() {
- TinyMCE_contextmenu_contextMenu.hide();
-
- return true;
-}
-
-function TinyMCE_contextmenu_commandHandler(command, value) {
- TinyMCE_contextmenu_contextMenu.hide();
-
- // UI must be true on these
- var ui = false;
- if (command == "mceInsertTable" || command == "mceTableCellProps" || command == "mceTableRowProps" || command == "mceTableMergeCells")
- ui = true;
-
- if (command == "Paste")
- value = null;
-
- TinyMCE_contextmenu_contextMenu.inst.execCommand(command, ui, value);
-}
-
-// Context menu class
-
-function ContextMenu(settings) {
- // Default value function
- function defParam(key, def_val) {
- settings[key] = typeof(settings[key]) != "undefined" ? settings[key] : def_val;
- }
-
- var self = this;
-
- this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
-
- // Setup contextmenu div
- this.contextMenuDiv = document.createElement("div");
- this.contextMenuDiv.className = "contextMenu";
- this.contextMenuDiv.setAttribute("class", "contextMenu");
- this.contextMenuDiv.style.display = "none";
- this.contextMenuDiv.style.position = 'absolute';
- this.contextMenuDiv.style.zindex = 1000;
- this.contextMenuDiv.style.left = '0px';
- this.contextMenuDiv.style.top = '0px';
- this.contextMenuDiv.unselectable = "on";
-
- document.body.appendChild(this.contextMenuDiv);
-
- // Setup default values
- defParam("commandhandler", "");
- defParam("spacer_image", "images/spacer.gif");
-
- this.items = new Array();
- this.settings = settings;
- this.html = "";
-
- // IE Popup
- if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0) {
- this.pop = window.createPopup();
- doc = this.pop.document;
- doc.open();
- doc.write('<html><head><link href="' + tinyMCE.baseURL + '/plugins/contextmenu/contextmenu.css" rel="stylesheet" type="text/css" /></head><body unselectable="yes" class="contextMenuIEPopup"></body></html>');
- doc.close();
- }
-};
-
-ContextMenu.prototype.clearAll = function() {
- this.html = "";
- this.contextMenuDiv.innerHTML = "";
-};
-
-ContextMenu.prototype.addSeparator = function() {
- this.html += '<tr class="contextMenuItem"><td class="contextMenuIcon"><img src="' + this.settings['spacer_image'] + '" width="20" height="1" class="contextMenuImage" /></td><td><img class="contextMenuSeparator" width="1" height="1" src="' + this.settings['spacer_image'] + '" /></td></tr>';
-};
-
-ContextMenu.prototype.addItem = function(icon, title, command, value, disabled) {
- if (title.charAt(0) == '$')
- title = tinyMCE.getLang(title.substring(1));
-
- var onMouseDown = '';
- var html = '';
-
- if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0)
- onMouseDown = 'contextMenu.execCommand(\'' + command + '\', \'' + value + '\');return false;';
- else
- onMouseDown = this.settings['commandhandler'] + '(\'' + command + '\', \'' + value + '\');return false;';
-
- if (icon == "")
- icon = this.settings['spacer_image'];
-
- if (!disabled)
- html += '<tr class="contextMenuItem" onmousedown="' + onMouseDown + '" onmouseover="tinyMCE.switchClass(this,\'contextMenuItemOver\');" onmouseout="tinyMCE.switchClass(this,\'contextMenuItem\');">';
- else
- html += '<tr class="contextMenuItemDisabled">';
-
- html += '<td class="contextMenuIcon"><img src="' + icon + '" width="20" height="20" class="contextMenuImage" /></td>';
- html += '<td><div class="contextMenuText">';
-
- // Add text
- html += title;
-
- html += '</div></td>';
- html += '</tr>';
-
- // Add to main
- this.html += html;
-};
-
-ContextMenu.prototype.show = function(x, y) {
- if (this.html == "")
- return;
-
- var html = '';
-
- html += '<table border="0" cellpadding="0" cellspacing="0">';
- html += this.html;
- html += '</table>';
-
- this.contextMenuDiv.innerHTML = html;
-
- if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0) {
- var width, height;
-
- // Get dimensions
- this.contextMenuDiv.style.display = "block";
- width = this.contextMenuDiv.offsetWidth;
- height = this.contextMenuDiv.offsetHeight;
- this.contextMenuDiv.style.display = "none";
-
- // Setup popup and show
- this.pop.document.body.innerHTML = '<div class="contextMenu">' + html + "</div>";
- this.pop.document.tinyMCE = tinyMCE;
- this.pop.document.contextMenu = this;
- this.pop.show(x, y, width, height);
- } else {
- this.contextMenuDiv.style.left = x + 'px';
- this.contextMenuDiv.style.top = y + 'px';
- this.contextMenuDiv.style.display = "block";
- }
-};
-
-ContextMenu.prototype.hide = function() {
- if (tinyMCE.isMSIE && !tinyMCE.isMSIE5_0)
- this.pop.hide();
- else
- this.contextMenuDiv.style.display = "none";
-};
-
-ContextMenu.prototype.execCommand = function(command, value) {
- eval(this.settings['commandhandler'] + "(command, value);");
-};
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/editor_plugin.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/editor_plugin.js deleted file mode 100644 index f41fe7b..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/editor_plugin.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Import plugin specific language pack */
- tinyMCE.importPluginLanguagePack('emotions','en,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl');function TinyMCE_emotions_getControlHTML(control_name){switch(control_name){case "emotions":return '<img id="{$editor_id}_emotions" src="{$pluginurl}/images/emotions.gif" title="{$lang_emotions_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceEmotion\');">';}return "";}function TinyMCE_emotions_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceEmotion":var template=new Array();template['file']='../../plugins/emotions/emotions.htm';template['width']=150;template['height']=180;tinyMCE.openWindow(template,{editor_id:editor_id});return true;}return false;}
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/editor_plugin_src.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/editor_plugin_src.js deleted file mode 100644 index 2db5469..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/editor_plugin_src.js +++ /dev/null @@ -1,36 +0,0 @@ -/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('emotions', 'en,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl');
-
-/**
- * Returns the HTML contents of the emotions control.
- */
-function TinyMCE_emotions_getControlHTML(control_name) {
- switch (control_name) {
- case "emotions":
- return '<img id="{$editor_id}_emotions" src="{$pluginurl}/images/emotions.gif" title="{$lang_emotions_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceEmotion\');">';
- }
-
- return "";
-}
-
-/**
- * Executes the mceEmotion command.
- */
-function TinyMCE_emotions_execCommand(editor_id, element, command, user_interface, value) {
- // Handle commands
- switch (command) {
- case "mceEmotion":
- var template = new Array();
-
- template['file'] = '../../plugins/emotions/emotions.htm'; // Relative to theme
- template['width'] = 150;
- template['height'] = 180;
-
- tinyMCE.openWindow(template, {editor_id : editor_id});
-
- return true;
- }
-
- // Pass to next handler in chain
- return false;
-}
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/emotions.htm b/wp-inst/wp-includes/js/tinymce/plugins/emotions/emotions.htm deleted file mode 100644 index 5466dba..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/emotions.htm +++ /dev/null @@ -1,45 +0,0 @@ -<html>
-<head>
-<title>{$lang_insert_emotions_title}</title>
-<script language="javascript" src="../../tiny_mce_popup.js"></script>
-<script language="javascript">
- function insertEmotion(file_name) {
- if (window.opener) {
- tinyMCE.insertImage(tinyMCE.baseURL + "/plugins/emotions/images/" + file_name);
- window.close();
- }
- }
-</script>
-</head>
-<body onload="">
-<div align="center">
-<div class="title">{$lang_insert_emotions_title}:<br /><br /></div>
-<table border="0" cellspacing="0" cellpadding="4">
- <tr>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-cool.gif');"><img src="images/smiley-cool.gif" width="18" height="18" border="0" /></a></td>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-cry.gif');"><img src="images/smiley-cry.gif" width="18" height="18" border="0" /></a></td>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-embarassed.gif');"><img src="images/smiley-embarassed.gif" width="18" height="18" border="0" /></a></td>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-foot-in-mouth.gif');"><img src="images/smiley-foot-in-mouth.gif" width="18" height="18" border="0" /></a></td>
- </tr>
- <tr>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-frown.gif');"><img src="images/smiley-frown.gif" width="18" height="18" border="0" /></a></td>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-innocent.gif');"><img src="images/smiley-innocent.gif" width="18" height="18" border="0" /></a></td>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-kiss.gif');"><img src="images/smiley-kiss.gif" width="18" height="18" border="0" /></a></td>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-laughing.gif');"><img src="images/smiley-laughing.gif" width="18" height="18" border="0" /></a></td>
- </tr>
- <tr>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-money-mouth.gif');"><img src="images/smiley-money-mouth.gif" width="18" height="18" border="0" /></a></td>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-sealed.gif');"><img src="images/smiley-sealed.gif" width="18" height="18" border="0" /></a></td>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-smile.gif');"><img src="images/smiley-smile.gif" width="18" height="18" border="0" /></a></td>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-surprised.gif');"><img src="images/smiley-surprised.gif" width="18" height="18" border="0" /></a></td>
- </tr>
- <tr>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-tongue-out.gif');"><img src="images/smiley-tongue-out.gif" width="18" height="18" border="0" /></a></td>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-undecided.gif');"><img src="images/smiley-undecided.gif" width="18" height="18" border="0" /></a></td>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-wink.gif');"><img src="images/smiley-wink.gif" width="18" height="18" border="0" /></a></td>
- <td><a href="javascript:void(0);" onmousedown="insertEmotion('smiley-yell.gif');"><img src="images/smiley-yell.gif" width="18" height="18" border="0" /></a></td>
- </tr>
-</table>
-</div>
-</body>
-</html>
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/emotions.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/emotions.gif Binary files differdeleted file mode 100644 index d34f0e0..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/emotions.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/readme.txt b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/readme.txt deleted file mode 100644 index a3cea1b..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/readme.txt +++ /dev/null @@ -1,2 +0,0 @@ -These emotions where taken from Mozilla Thunderbird.
-I hope they don't get angry if I use them here after all this is a open source project aswell.
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-cool.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-cool.gif Binary files differdeleted file mode 100644 index 1e2c1d6..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-cool.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-cry.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-cry.gif Binary files differdeleted file mode 100644 index e0dcf8a..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-cry.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-embarassed.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-embarassed.gif Binary files differdeleted file mode 100644 index 8e3f07a..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-embarassed.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-foot-in-mouth.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-foot-in-mouth.gif Binary files differdeleted file mode 100644 index b3e47cc..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-foot-in-mouth.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-frown.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-frown.gif Binary files differdeleted file mode 100644 index 9335e99..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-frown.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-innocent.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-innocent.gif Binary files differdeleted file mode 100644 index cdb7256..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-innocent.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-kiss.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-kiss.gif Binary files differdeleted file mode 100644 index 242c38c..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-kiss.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-laughing.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-laughing.gif Binary files differdeleted file mode 100644 index 09a9ec7..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-laughing.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-money-mouth.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-money-mouth.gif Binary files differdeleted file mode 100644 index 12b1138..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-money-mouth.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-sealed.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-sealed.gif Binary files differdeleted file mode 100644 index 76002b2..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-sealed.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-smile.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-smile.gif Binary files differdeleted file mode 100644 index 8cf2b5d..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-smile.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-surprised.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-surprised.gif Binary files differdeleted file mode 100644 index ece78a3..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-surprised.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-tongue-out.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-tongue-out.gif Binary files differdeleted file mode 100644 index 16b13a5..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-tongue-out.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-undecided.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-undecided.gif Binary files differdeleted file mode 100644 index 2aec732..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-undecided.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-wink.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-wink.gif Binary files differdeleted file mode 100644 index 5d975f6..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-wink.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-yell.gif b/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-yell.gif Binary files differdeleted file mode 100644 index 7719bc4..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/images/smiley-yell.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/cs.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/cs.js deleted file mode 100644 index 90d1c8b..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/cs.js +++ /dev/null @@ -1,4 +0,0 @@ -// UK lang variables
-
-tinyMCELang['lang_insert_emotions_title'] = 'Vložit emotikon';
-tinyMCELang['lang_emotions_desc'] = 'Emotikony';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/de.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/de.js deleted file mode 100644 index e828c76..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/de.js +++ /dev/null @@ -1,6 +0,0 @@ -// DE lang variables
-
-
-tinyMCELang['lang_insert_emotions_title'] = 'Emotion einfügen';
-tinyMCELang['lang_emotions_desc'] = 'Emotion';
-
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/el.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/el.js deleted file mode 100644 index 607433f..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/el.js +++ /dev/null @@ -1,5 +0,0 @@ -// Greek lang variables by Jacaranda Bill
-
-tinyMCELang['lang_insert_emotions_title'] = 'ÅéóáãùãÞ åíüò åéêïíéäßïõ emoticon';
-tinyMCELang['lang_emotions_desc'] = 'Åéêïíßäéá emoticons';
-
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/en.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/en.js deleted file mode 100644 index 37f549f..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/en.js +++ /dev/null @@ -1,5 +0,0 @@ -// UK lang variables
-
-tinyMCELang['lang_insert_emotions_title'] = 'Insert emotion';
-tinyMCELang['lang_emotions_desc'] = 'Emotions';
-
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/fa.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/fa.js deleted file mode 100644 index fe7db9e..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/fa.js +++ /dev/null @@ -1,10 +0,0 @@ -// IR lang variables
-// Persian (Farsi) language pack (for IRAN)
-// By: Morteza Zafari
-// Lost@LostLord.com
-// http://www.LostLord.com
-
-tinyMCELang['lang_dir'] = 'rtl';
-tinyMCELang['lang_insert_emotions_title'] = 'اÙزودن Ø´Ú©Ù„Ú©';
-tinyMCELang['lang_emotions_desc'] = 'شکلکها';
-
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/fr.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/fr.js deleted file mode 100644 index b2dbedb..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/fr.js +++ /dev/null @@ -1,5 +0,0 @@ -// French lang variables by Laurent Dran
-
-tinyMCELang['lang_insert_emotions_title'] = 'Insèrer un émoticon';
-tinyMCELang['lang_emotions_desc'] = 'Émoticons';
-
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/fr_ca.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/fr_ca.js deleted file mode 100644 index e0fdbb8..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/fr_ca.js +++ /dev/null @@ -1,5 +0,0 @@ -// Canadian French lang variables by Virtuelcom last modification: 2005-06-15
-
-tinyMCELang['lang_insert_emotions_title'] = 'Insérer un émoticon';
-tinyMCELang['lang_emotions_desc'] = 'Émoticons';
-
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/it.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/it.js deleted file mode 100644 index fa93e6b..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/it.js +++ /dev/null @@ -1,5 +0,0 @@ -//IT lang variables
-
-tinyMCELang['lang_insert_emotions_title'] = 'Inserisci una emoticon';
-tinyMCELang['lang_emotions_desc'] = 'Emoticon';
-
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/ko.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/ko.js deleted file mode 100644 index 654193f..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/ko.js +++ /dev/null @@ -1,5 +0,0 @@ -// KO lang variables
-
-tinyMCELang['lang_insert_emotions_title'] = 'À̸ðƼÄÜ ³Ö±â';
-tinyMCELang['lang_emotions_desc'] = 'À̸ðƼÄÜ';
-
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/nl.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/nl.js deleted file mode 100644 index 8713ded..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/nl.js +++ /dev/null @@ -1,4 +0,0 @@ -// NL lang variables
-
-tinyMCELang['lang_insert_emotions_title'] = 'Emotion invoegen';
-tinyMCELang['lang_emotions_desc'] = 'Smilie';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/pl.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/pl.js deleted file mode 100644 index 63996c9..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/pl.js +++ /dev/null @@ -1,4 +0,0 @@ -// PL lang variables
-
-tinyMCELang['lang_insert_emotions_title'] = 'Wstaw emtoiconÄ™';
-tinyMCELang['lang_emotions_desc'] = 'Emtoicony';
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/pt_br.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/pt_br.js deleted file mode 100644 index a9fc32e..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/pt_br.js +++ /dev/null @@ -1,5 +0,0 @@ -// pt_BR lang variables
-
-tinyMCELang['lang_insert_emotions_title'] = 'Inserir Emoticon';
-tinyMCELang['lang_emotions_desc'] = 'Emoticons';
-
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/sv.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/sv.js deleted file mode 100644 index 82e1ba3..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/sv.js +++ /dev/null @@ -1,4 +0,0 @@ -// SE lang variables
-
-tinyMCELang['lang_insert_emotions_title'] = 'Klistra in känsla';
-tinyMCELang['lang_emotions_desc'] = 'Känslor';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/zh_cn.js b/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/zh_cn.js deleted file mode 100644 index cdd4896..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/langs/zh_cn.js +++ /dev/null @@ -1,6 +0,0 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@gmail.com)
-//Çë·ÃÎÊ http://www.cube316.net/ ÒÔ»ñÈ¡TinyMCEµÄÖÐÎÄÖ§³Ö
-
-tinyMCELang['lang_insert_emotions_title'] = '²åÈë±íÇé';
-tinyMCELang['lang_emotions_desc'] = '񡀂';
-
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/emotions/readme.txt b/wp-inst/wp-includes/js/tinymce/plugins/emotions/readme.txt deleted file mode 100644 index 4fdb78a..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/emotions/readme.txt +++ /dev/null @@ -1 +0,0 @@ -Check the TinyMCE documentation for details on this plugin.
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/editor_plugin.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/editor_plugin.js deleted file mode 100644 index 51c8748..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/editor_plugin.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Import plugin specific language pack */
- tinyMCE.importPluginLanguagePack('iespell','cs,el,en,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl');function TinyMCE_iespell_getControlHTML(control_name){if(control_name=="iespell"&&tinyMCE.isMSIE)return '<img id="{$editor_id}_iespell" src="{$pluginurl}/images/iespell.gif" title="{$lang_iespell_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceIESpell\');">';return "";}function TinyMCE_iespell_execCommand(editor_id,element,command,user_interface,value){if(command=="mceIESpell"){try{var ieSpell=new ActiveXObject("ieSpell.ieSpellExtension");ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);}catch(e){if(e.number==-2146827859){if(confirm(tinyMCE.getLang("lang_iespell_download","",true)))window.open('http://www.iespell.com/download.php','ieSpellDownload','');}else alert("Error Loading ieSpell: Exception "+e.number);}return true;}return false;}
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/editor_plugin_src.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/editor_plugin_src.js deleted file mode 100644 index e4633b7..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/editor_plugin_src.js +++ /dev/null @@ -1,37 +0,0 @@ -/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('iespell', 'cs,el,en,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl');
-
-/**
- * Returns the HTML contents of the iespell control.
- */
-function TinyMCE_iespell_getControlHTML(control_name) {
- // Is it the iespell control and is the brower MSIE.
- if (control_name == "iespell" && tinyMCE.isMSIE)
- return '<img id="{$editor_id}_iespell" src="{$pluginurl}/images/iespell.gif" title="{$lang_iespell_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceIESpell\');">';
-
- return "";
-}
-
-/**
- * Executes the mceIESpell command.
- */
-function TinyMCE_iespell_execCommand(editor_id, element, command, user_interface, value) {
- // Handle ieSpellCommand
- if (command == "mceIESpell") {
- try {
- var ieSpell = new ActiveXObject("ieSpell.ieSpellExtension");
- ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);
- } catch (e) {
- if (e.number == -2146827859) {
- if (confirm(tinyMCE.getLang("lang_iespell_download", "", true)))
- window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
- } else
- alert("Error Loading ieSpell: Exception " + e.number);
- }
-
- return true;
- }
-
- // Pass to next handler in chain
- return false;
-}
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/images/iespell.gif b/wp-inst/wp-includes/js/tinymce/plugins/iespell/images/iespell.gif Binary files differdeleted file mode 100644 index 46c0c4a..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/images/iespell.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/cs.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/cs.js deleted file mode 100644 index c38a480..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/cs.js +++ /dev/null @@ -1,4 +0,0 @@ -// UK lang variables
-
-tinyMCELang['lang_iespell_desc'] = 'Spustit kontrolu pravopisu';
-tinyMCELang['lang_iespell_download'] = "ieSpell nedetekován. Kliknìte na OK a otevøete stahovací stránku."
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/de.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/de.js deleted file mode 100644 index 80a3b02..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/de.js +++ /dev/null @@ -1,4 +0,0 @@ -// DE lang variables by Tobias Heer
-
-tinyMCELang['lang_iespell_desc'] = 'Rechtschreibprüfung';
-tinyMCELang['lang_iespell_download'] = "ieSpell nicht gefunden. Klicken Sie OK um auf die Download Seite zu gelangen."
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/el.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/el.js deleted file mode 100644 index 7925947..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/el.js +++ /dev/null @@ -1,4 +0,0 @@ -// Greek lang variables by Jacaranda Bill
-
-tinyMCELang['lang_iespell_desc'] = 'Ïñèïãñáöéêüò Ýëåã÷ïò';
-tinyMCELang['lang_iespell_download'] = "Ôï ðñüãñáììá ieSpell äåí âñÝèçêå. ÐáôÞóôå OK ãéá íá ìåôáâåßôå óôçí éóôïóåëßäá ëÞøçò ôïõ ðñïãñÜììáôïò."
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/en.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/en.js deleted file mode 100644 index b7cc3a4..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/en.js +++ /dev/null @@ -1,4 +0,0 @@ -// UK lang variables
-
-tinyMCELang['lang_iespell_desc'] = 'Run spell checking';
-tinyMCELang['lang_iespell_download'] = "ieSpell not detected. Click OK to go to download page."
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/fr.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/fr.js deleted file mode 100644 index de66fb0..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/fr.js +++ /dev/null @@ -1,4 +0,0 @@ -// French lang variables by Laurent Dran
-
-tinyMCELang['lang_iespell_desc'] = 'Executer le vérificateur d\'orthographe';
-tinyMCELang['lang_iespell_download'] = "ieSpell n\'a pas été trouvé. Cliquez sur OK pour aller au site de téléchargement."
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/fr_ca.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/fr_ca.js deleted file mode 100644 index 8328019..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/fr_ca.js +++ /dev/null @@ -1,4 +0,0 @@ -// Canadian French lang variables by Virtuelcom last modification: 2005-06-15
-
-tinyMCELang['lang_iespell_desc'] = 'Executer le vérificateur d\'orthographe';
-tinyMCELang['lang_iespell_download'] = "ieSpell n\'a pas été trouvé. Cliquez sur OK pour aller au site de téléchargement.";
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/it.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/it.js deleted file mode 100644 index 5f6e2f0..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/it.js +++ /dev/null @@ -1,4 +0,0 @@ -// IT lang variables
-
-tinyMCELang['lang_iespell_desc'] = 'Avvia il controllo ortografico';
-tinyMCELang['lang_iespell_download'] = "ieSpell non trovato. Clicca OK per andare alla pagina di download."
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/ko.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/ko.js deleted file mode 100644 index a5bbfe4..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/ko.js +++ /dev/null @@ -1,4 +0,0 @@ -// KO lang variables
-
-tinyMCELang['lang_iespell_desc'] = '¸ÂÃã¹ý °Ë»ç ½ÇÇà';
-tinyMCELang['lang_iespell_download'] = "ieSpellÀ» ãÀ» ¼ö ¾ø½À´Ï´Ù. OK¸¦ ´©¸£¸é ´Ù¿î·Îµå ÆäÀÌÁö·Î À̵¿ÇÕ´Ï´Ù."
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/nl.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/nl.js deleted file mode 100644 index 10b75eb..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/nl.js +++ /dev/null @@ -1,4 +0,0 @@ -// NL lang variables
-
-tinyMCELang['lang_iespell_desc'] = 'Spelling checker';
-tinyMCELang['lang_iespell_download'] = "ieSpell niet gedetecteerd. Klik OK om naar de download pagina te gaan."
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/pl.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/pl.js deleted file mode 100644 index 9fcb4e3..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/pl.js +++ /dev/null @@ -1,4 +0,0 @@ -// PL lang variables
-
-tinyMCELang['lang_iespell_desc'] = 'Uruchom sprawdzanie pisowni';
-tinyMCELang['lang_iespell_download'] = "Nie wykryto pluginu, kliknij aby przejść do strony z pluginami."
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/pt_br.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/pt_br.js deleted file mode 100644 index dba6e82..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/pt_br.js +++ /dev/null @@ -1,4 +0,0 @@ -// pt_BR lang variables
-
-tinyMCELang['lang_iespell_desc'] = 'Executar verificação ortográfica';
-tinyMCELang['lang_iespell_download'] = "Verificador ieSpell não detectado. Click OK para ir à página de download."
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/sv.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/sv.js deleted file mode 100644 index 2230c1c..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/sv.js +++ /dev/null @@ -1,4 +0,0 @@ -// SE lang variables
-
-tinyMCELang['lang_iespell_desc'] = 'Kör rättstavningskontroll';
-tinyMCELang['lang_iespell_download'] = "ieSpell verkar inte vara installerad. Klicka OK för att ladda hem."
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/zh_cn.js b/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/zh_cn.js deleted file mode 100644 index 35aeba1..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/langs/zh_cn.js +++ /dev/null @@ -1,5 +0,0 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@gmail.com)
-//Çë·ÃÎÊ http://www.cube316.net/ ÒÔ»ñÈ¡TinyMCEµÄÖÐÎÄÖ§³Ö
-
-tinyMCELang['lang_iespell_desc'] = 'ÔËÐÐƴд¼ì²é';
-tinyMCELang['lang_iespell_download'] = "δ¼ì²âµ½ieSpellƴд¼ì²é£¬µã»÷ OK Ç°ÍùÏÂÔØÒ³Ãæ¡£"
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/iespell/readme.txt b/wp-inst/wp-includes/js/tinymce/plugins/iespell/readme.txt deleted file mode 100644 index 4fdb78a..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/iespell/readme.txt +++ /dev/null @@ -1 +0,0 @@ -Check the TinyMCE documentation for details on this plugin.
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/css/inlinepopup.css b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/css/inlinepopup.css new file mode 100644 index 0000000..2b62077 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/css/inlinepopup.css @@ -0,0 +1,69 @@ +/* Window classes */
+
+.mceWindow {
+ position: absolute;
+ left: 0px;
+ top: 0px;
+ border: 1px solid black;
+ background-color: #D4D0C8;
+}
+
+.mceWindowHead {
+ background-color: #334F8D;
+ width: 100%;
+ height: 18px;
+ cursor: move;
+ overflow: hidden;
+}
+
+.mceWindowBody {
+ clear: both;
+ background-color: white;
+}
+
+.mceWindowStatusbar {
+ background-color: #D4D0C8;
+ height: 12px;
+ border-top: 1px solid black;
+}
+
+.mceWindowTitle {
+ float: left;
+ font-family: "MS Sans Serif";
+ font-size: 9pt;
+ font-weight: bold;
+ line-height: 18px;
+ color: white;
+ margin-left: 2px;
+ overflow: hidden;
+}
+
+.mceWindowHeadTools {
+ margin-right: 2px;
+}
+
+.mceWindowClose, .mceWindowMinimize, .mceWindowMaximize {
+ display: block;
+ float: right;
+ overflow: hidden;
+ margin-top: 2px;
+}
+
+.mceWindowClose {
+ margin-left: 2px;
+}
+
+.mceWindowMinimize {
+}
+
+.mceWindowMaximize {
+}
+
+.mceWindowResize {
+ display: block;
+ float: right;
+ overflow: hidden;
+ cursor: se-resize;
+ width: 12px;
+ height: 12px;
+}
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js new file mode 100644 index 0000000..3b478f6 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js @@ -0,0 +1,11 @@ +/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.2 $
+ * $Date: 2005/08/23 20:28:34 $
+ *
+ * Moxiecode DHTML Windows script.
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved.
+ */
+ function TinyMCE_inlinepopups_getInfo(){return{longname:'Inline Popups',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_inlinepopups.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};TinyMCE.prototype.orgOpenWindow=TinyMCE.prototype.openWindow;TinyMCE.prototype.openWindow=function(template,args){if(args['inline']!="yes"){mcWindows.selectedWindow=null;args['mce_inside_iframe']=false;this.orgOpenWindow(template,args);return;}var url,resizable,scrollbars;args['mce_inside_iframe']=true;tinyMCE.windowArgs=args;if(template['file'].charAt(0)!='/'&&template['file'].indexOf('://')==-1)url=tinyMCE.baseURL+"/themes/"+tinyMCE.getParam("theme")+"/"+template['file'];else url=template['file'];if(!(width=parseInt(template['width'])))width=320;if(!(height=parseInt(template['height'])))height=200;resizable=(args&&args['resizable'])?args['resizable']:"no";scrollbars=(args&&args['scrollbars'])?args['scrollbars']:"no";height+=18;for(var name in args)url=tinyMCE.replaceVar(url,name,escape(args[name]));var elm=document.getElementById(this.selectedInstance.editorId+'_parent');var pos=tinyMCE.getAbsPosition(elm);pos.absLeft+=Math.round((elm.firstChild.clientWidth/2)-(width/2));pos.absTop+=Math.round((elm.firstChild.clientHeight/2)-(height/2));mcWindows.open(url,mcWindows.idCounter++,"modal=yes,width="+width+",height="+height+",resizable="+resizable+",scrollbars="+scrollbars+",statusbar="+resizable+",left="+pos.absLeft+",top="+pos.absTop);};TinyMCE.prototype.orgCloseWindow=TinyMCE.prototype.closeWindow;TinyMCE.prototype.closeWindow=function(win){if(mcWindows.selectedWindow!=null)mcWindows.selectedWindow.close();else this.orgCloseWindow(win);};TinyMCE.prototype.setWindowTitle=function(win_ref,title){for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(win_ref.name==win.id+"_iframe")window.frames[win.id+"_iframe"].document.getElementById(win.id+'_title').innerHTML=title;}};function MCWindows(){this.settings=new Array();this.windows=new Array();this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isGecko=navigator.userAgent.indexOf('Gecko')!=-1;this.isSafari=navigator.userAgent.indexOf('Safari')!=-1;this.isMac=navigator.userAgent.indexOf('Mac')!=-1;this.isMSIE5_0=this.isMSIE&&(navigator.userAgent.indexOf('MSIE 5.0')!=-1);this.action="none";this.selectedWindow=null;this.lastSelectedWindow=null;this.zindex=100;this.mouseDownScreenX=0;this.mouseDownScreenY=0;this.mouseDownLayerX=0;this.mouseDownLayerY=0;this.mouseDownWidth=0;this.mouseDownHeight=0;this.idCounter=0;};MCWindows.prototype.init=function(settings){this.settings=settings;if(this.isMSIE)this.addEvent(document,"mousemove",mcWindows.eventDispatcher);else this.addEvent(window,"mousemove",mcWindows.eventDispatcher);this.addEvent(document,"mouseup",mcWindows.eventDispatcher);this.doc=document;};MCWindows.prototype.getParam=function(name,default_value){var value=null;value=(typeof(this.settings[name])=="undefined")?default_value:this.settings[name];if(value=="true"||value=="false")return(value=="true");return value;};MCWindows.prototype.eventDispatcher=function(e){e=typeof(e)=="undefined"?window.event:e;if(mcWindows.selectedWindow==null)return;if(mcWindows.isGecko&&e.type=="mousedown"){var elm=e.currentTarget;for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(win.headElement==elm||win.resizeElement==elm){win.focus();break;}}}switch(e.type){case "mousemove":mcWindows.selectedWindow.onMouseMove(e);break;case "mouseup":mcWindows.selectedWindow.onMouseUp(e);break;case "mousedown":mcWindows.selectedWindow.onMouseDown(e);break;case "focus":mcWindows.selectedWindow.onFocus(e);break;}};MCWindows.prototype.addEvent=function(obj,name,handler){if(this.isMSIE)obj.attachEvent("on"+name,handler);else obj.addEventListener(name,handler,true);};MCWindows.prototype.cancelEvent=function(e){if(this.isMSIE){e.returnValue=false;e.cancelBubble=true;}else e.preventDefault();};MCWindows.prototype.parseFeatures=function(opts){opts=opts.toLowerCase();opts=opts.replace(/;/g,",");opts=opts.replace(/[^0-9a-z=,]/g,"");var optionChunks=opts.split(',');var options=new Array();options['left']="10";options['top']="10";options['width']="300";options['height']="300";options['resizable']="yes";options['minimizable']="yes";options['maximizable']="yes";options['close']="yes";options['movable']="yes";options['statusbar']="yes";options['scrollbars']="auto";options['modal']="no";if(opts=="")return options;for(var i=0;i<optionChunks.length;i++){var parts=optionChunks[i].split('=');if(parts.length==2)options[parts[0]]=parts[1];}options['left']=parseInt(options['left']);options['top']=parseInt(options['top']);options['width']=parseInt(options['width']);options['height']=parseInt(options['height']);return options;};MCWindows.prototype.open=function(url,name,features){this.lastSelectedWindow=this.selectedWindow;var win=new MCWindow();var winDiv,html="",id;var imgPath=this.getParam("images_path");features=this.parseFeatures(features);id="mcWindow_"+name;win.deltaHeight=18;if(features['statusbar']=="yes"){win.deltaHeight+=13;if(this.isMSIE)win.deltaHeight+=1;}width=parseInt(features['width']);height=parseInt(features['height'])-win.deltaHeight;if(this.isMSIE)width-=2;win.id=id;win.url=url;win.name=name;win.features=features;this.windows[name]=win;iframeWidth=width;iframeHeight=height;html+='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';html+='<html>';html+='<head>';html+='<title>Wrapper iframe</title>';html+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';html+='<link href="'+this.getParam("css_file")+'" rel="stylesheet" type="text/css" />';html+='</head>';html+='<body onload="parent.mcWindows.onLoad(\''+name+'\');">';html+='<div id="'+id+'_container" class="mceWindow">';html+='<div id="'+id+'_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();">';html+=' <div id="'+id+'_title" class="mceWindowTitle"';html+=' onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;"></div>';html+=' <div class="mceWindowHeadTools">';html+=' <a href="javascript:parent.mcWindows.windows[\''+name+'\'].close();" onmousedown="return false;" class="mceWindowClose"><img border="0" src="'+imgPath+'/window_close.gif" /></a>';html+=' </div>';html+='</div><div id="'+id+'_body" class="mceWindowBody" style="width: '+width+'px; height: '+height+'px;">';html+='<iframe id="'+id+'_iframe" name="'+id+'_iframe" frameborder="0" width="'+iframeWidth+'" height="'+iframeHeight+'" src="'+url+'" class="mceWindowBodyIframe" scrolling="'+features['scrollbars']+'"></iframe></div>';if(features['statusbar']=="yes"){html+='<div id="'+id+'_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();">';if(features['resizable']=="yes"){if(this.isGecko)html+='<div id="'+id+'_resize" class="mceWindowResize"><div style="background-image: url(\''+imgPath+'/window_resize.gif\'); width: 12px; height: 12px;"></div></div>';else html+='<div id="'+id+'_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\''+name+'\'].focus();" border="0" src="'+imgPath+'/window_resize.gif" /></div>';}html+='</div>';}html+='</div>';html+='</body>';html+='</html>';this.createFloatingIFrame(id,features['left'],features['top'],features['width'],features['height'],html);};MCWindows.prototype.setDocumentLock=function(state){if(state){var elm=document.getElementById('mcWindowEventBlocker');if(elm==null){elm=document.createElement("div");elm.id="mcWindowEventBlocker";elm.style.position="absolute";elm.style.left="0px";elm.style.top="0px";document.body.appendChild(elm);}elm.style.display="none";var imgPath=this.getParam("images_path");var width=document.body.clientWidth;var height=document.body.clientHeight;elm.style.width=width;elm.style.height=height;elm.innerHTML='<img src="'+imgPath+'/spacer.gif" width="'+width+'" height="'+height+'" />';elm.style.zIndex=mcWindows.zindex-1;elm.style.display="block";}else{var elm=document.getElementById('mcWindowEventBlocker');if(mcWindows.windows.length==0)elm.parentNode.removeChild(elm);else elm.style.zIndex=mcWindows.zindex-1;}};MCWindows.prototype.onLoad=function(name){var win=mcWindows.windows[name];var id="mcWindow_"+name;var wrapperIframe=window.frames[id+"_iframe"].frames[0];var wrapperDoc=window.frames[id+"_iframe"].document;var doc=window.frames[id+"_iframe"].document;var winDiv=document.getElementById("mcWindow_"+name+"_div");var realIframe=window.frames[id+"_iframe"].frames[0];win.id="mcWindow_"+name;win.winElement=winDiv;win.bodyElement=doc.getElementById(id+'_body');win.iframeElement=doc.getElementById(id+'_iframe');win.headElement=doc.getElementById(id+'_head');win.titleElement=doc.getElementById(id+'_title');win.resizeElement=doc.getElementById(id+'_resize');win.containerElement=doc.getElementById(id+'_container');win.left=win.features['left'];win.top=win.features['top'];win.frame=window.frames[id+'_iframe'].frames[0];win.wrapperFrame=window.frames[id+'_iframe'];win.wrapperIFrameElement=document.getElementById(id+"_iframe");mcWindows.addEvent(win.headElement,"mousedown",mcWindows.eventDispatcher);if(win.resizeElement!=null)mcWindows.addEvent(win.resizeElement,"mousedown",mcWindows.eventDispatcher);if(mcWindows.isMSIE){mcWindows.addEvent(realIframe.document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe.document,"mouseup",mcWindows.eventDispatcher);}else{mcWindows.addEvent(realIframe,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe,"mouseup",mcWindows.eventDispatcher);mcWindows.addEvent(realIframe,"focus",mcWindows.eventDispatcher);}for(var i=0;i<window.frames.length;i++){if(!window.frames[i]._hasMouseHandlers){if(mcWindows.isMSIE){mcWindows.addEvent(window.frames[i].document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(window.frames[i].document,"mouseup",mcWindows.eventDispatcher);}else{mcWindows.addEvent(window.frames[i],"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(window.frames[i],"mouseup",mcWindows.eventDispatcher);}window.frames[i]._hasMouseHandlers=true;}}if(mcWindows.isMSIE){mcWindows.addEvent(win.frame.document,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame.document,"mouseup",mcWindows.eventDispatcher);}else{mcWindows.addEvent(win.frame,"mousemove",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame,"mouseup",mcWindows.eventDispatcher);mcWindows.addEvent(win.frame,"focus",mcWindows.eventDispatcher);}var func=this.getParam("on_open_window","");if(func!="")eval(func+"(win);");win.focus();if(win.features['modal']=="yes")mcWindows.setDocumentLock(true);};MCWindows.prototype.createFloatingIFrame=function(id_prefix,left,top,width,height,html){var iframe=document.createElement("iframe");var div=document.createElement("div");width=parseInt(width);height=parseInt(height)+1;div.setAttribute("id",id_prefix+"_div");div.setAttribute("width",width);div.setAttribute("height",(height));div.style.position="absolute";div.style.left=left+"px";div.style.top=top+"px";div.style.width=width+"px";div.style.height=(height)+"px";div.style.backgroundColor="white";div.style.display="none";if(this.isGecko){iframeWidth=width+2;iframeHeight=height+2;}else{iframeWidth=width;iframeHeight=height+1;}iframe.setAttribute("id",id_prefix+"_iframe");iframe.setAttribute("name",id_prefix+"_iframe");iframe.setAttribute("border","0");iframe.setAttribute("frameBorder","0");iframe.setAttribute("marginWidth","0");iframe.setAttribute("marginHeight","0");iframe.setAttribute("leftMargin","0");iframe.setAttribute("topMargin","0");iframe.setAttribute("width",iframeWidth);iframe.setAttribute("height",iframeHeight);iframe.setAttribute("scrolling","no");iframe.style.width=iframeWidth+"px";iframe.style.height=iframeHeight+"px";iframe.style.backgroundColor="white";div.appendChild(iframe);document.body.appendChild(div);div.innerHTML=div.innerHTML;if(this.isSafari){window.setTimeout(function(){doc=window.frames[id_prefix+'_iframe'].document;doc.open();doc.write(html);doc.close();},10);}else{doc=window.frames[id_prefix+'_iframe'].window.document;doc.open();doc.write(html);doc.close();}div.style.display="block";return div;};function MCWindow(){};MCWindow.prototype.focus=function(){if(this!=mcWindows.selectedWindow){this.winElement.style.zIndex=++mcWindows.zindex;mcWindows.lastSelectedWindow=mcWindows.selectedWindow;mcWindows.selectedWindow=this;}};MCWindow.prototype.minimize=function(){};MCWindow.prototype.maximize=function(){};MCWindow.prototype.startResize=function(){mcWindows.action="resize";};MCWindow.prototype.startMove=function(e){mcWindows.action="move";};MCWindow.prototype.close=function(){if(mcWindows.lastSelectedWindow!=null)mcWindows.lastSelectedWindow.focus();var mcWindowsNew=new Array();for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(win.name!=this.name)mcWindowsNew[n]=win;}mcWindows.windows=mcWindowsNew;var e=mcWindows.doc.getElementById(this.id+"_iframe");e.parentNode.removeChild(e);var e=mcWindows.doc.getElementById(this.id+"_div");e.parentNode.removeChild(e);mcWindows.setDocumentLock(false);};MCWindow.prototype.onMouseMove=function(e){var scrollX=0;var scrollY=0;var dx=e.screenX-mcWindows.mouseDownScreenX;var dy=e.screenY-mcWindows.mouseDownScreenY;switch(mcWindows.action){case "resize":width=mcWindows.mouseDownWidth+(e.screenX-mcWindows.mouseDownScreenX);height=mcWindows.mouseDownHeight+(e.screenY-mcWindows.mouseDownScreenY);width=width<100?100:width;height=height<100?100:height;this.wrapperIFrameElement.style.width=width+2;this.wrapperIFrameElement.style.height=height+2;this.wrapperIFrameElement.width=width+2;this.wrapperIFrameElement.height=height+2;this.winElement.style.width=width;this.winElement.style.height=height;height=height-this.deltaHeight;this.containerElement.style.width=width;this.iframeElement.style.width=width;this.iframeElement.style.height=height;this.bodyElement.style.width=width;this.bodyElement.style.height=height;this.headElement.style.width=width;mcWindows.cancelEvent(e);break;case "move":this.left=mcWindows.mouseDownLayerX+(e.screenX-mcWindows.mouseDownScreenX);this.top=mcWindows.mouseDownLayerY+(e.screenY-mcWindows.mouseDownScreenY);this.winElement.style.left=this.left+"px";this.winElement.style.top=this.top+"px";mcWindows.cancelEvent(e);break;}};function debug(msg){document.getElementById('debug').value+=msg+"\n";}MCWindow.prototype.onMouseUp=function(e){mcWindows.action="none";};MCWindow.prototype.onFocus=function(e){var winRef=e.currentTarget;for(var n in mcWindows.windows){var win=mcWindows.windows[n];if(winRef.name==win.id+"_iframe"){win.focus();return;}}};MCWindow.prototype.onMouseDown=function(e){var elm=mcWindows.isMSIE?this.wrapperFrame.event.srcElement:e.target;var scrollX=0;var scrollY=0;mcWindows.mouseDownScreenX=e.screenX;mcWindows.mouseDownScreenY=e.screenY;mcWindows.mouseDownLayerX=this.left;mcWindows.mouseDownLayerY=this.top;mcWindows.mouseDownWidth=parseInt(this.winElement.style.width);mcWindows.mouseDownHeight=parseInt(this.winElement.style.height);if(this.resizeElement!=null&&elm==this.resizeElement.firstChild)this.startResize(e);else this.startMove(e);mcWindows.cancelEvent(e);};var mcWindows=new MCWindows();mcWindows.init({images_path:tinyMCE.baseURL+"/plugins/inlinepopups/images",css_file:tinyMCE.baseURL+"/plugins/inlinepopups/css/inlinepopup.css"});
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js new file mode 100644 index 0000000..41f597a --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js @@ -0,0 +1,643 @@ +/**
+ * $RCSfile: editor_plugin_src.js,v $
+ * $Revision: 1.2 $
+ * $Date: 2005/08/23 20:28:34 $
+ *
+ * Moxiecode DHTML Windows script.
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved.
+ */
+
+// Patch openWindow, closeWindow TinyMCE functions
+
+function TinyMCE_inlinepopups_getInfo() {
+ return {
+ longname : 'Inline Popups',
+ author : 'Moxiecode Systems',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_inlinepopups.html',
+ version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
+ };
+};
+
+TinyMCE.prototype.orgOpenWindow = TinyMCE.prototype.openWindow;
+
+TinyMCE.prototype.openWindow = function(template, args) {
+ // Does the caller support inline
+ if (args['inline'] != "yes") {
+ mcWindows.selectedWindow = null;
+ args['mce_inside_iframe'] = false;
+ this.orgOpenWindow(template, args);
+ return;
+ }
+
+ var url, resizable, scrollbars;
+
+ args['mce_inside_iframe'] = true;
+ tinyMCE.windowArgs = args;
+
+ if (template['file'].charAt(0) != '/' && template['file'].indexOf('://') == -1)
+ url = tinyMCE.baseURL + "/themes/" + tinyMCE.getParam("theme") + "/" + template['file'];
+ else
+ url = template['file'];
+
+ if (!(width = parseInt(template['width'])))
+ width = 320;
+
+ if (!(height = parseInt(template['height'])))
+ height = 200;
+
+ resizable = (args && args['resizable']) ? args['resizable'] : "no";
+ scrollbars = (args && args['scrollbars']) ? args['scrollbars'] : "no";
+
+ height += 18;
+
+ // Replace all args as variables in URL
+ for (var name in args)
+ url = tinyMCE.replaceVar(url, name, escape(args[name]));
+
+ var elm = document.getElementById(this.selectedInstance.editorId + '_parent');
+ var pos = tinyMCE.getAbsPosition(elm);
+
+ // Center div in editor area
+ pos.absLeft += Math.round((elm.firstChild.clientWidth / 2) - (width / 2));
+ pos.absTop += Math.round((elm.firstChild.clientHeight / 2) - (height / 2));
+
+ mcWindows.open(url, mcWindows.idCounter++, "modal=yes,width=" + width+ ",height=" + height + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",statusbar=" + resizable + ",left=" + pos.absLeft + ",top=" + pos.absTop);
+};
+
+TinyMCE.prototype.orgCloseWindow = TinyMCE.prototype.closeWindow;
+
+TinyMCE.prototype.closeWindow = function(win) {
+ if (mcWindows.selectedWindow != null)
+ mcWindows.selectedWindow.close();
+ else
+ this.orgCloseWindow(win);
+};
+
+TinyMCE.prototype.setWindowTitle = function(win_ref, title) {
+ for (var n in mcWindows.windows) {
+ var win = mcWindows.windows[n];
+
+ if (win_ref.name == win.id + "_iframe")
+ window.frames[win.id + "_iframe"].document.getElementById(win.id + '_title').innerHTML = title;
+ }
+};
+
+// * * * * * MCWindows classes below
+
+// Windows handler
+function MCWindows() {
+ this.settings = new Array();
+ this.windows = new Array();
+ this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
+ this.isGecko = navigator.userAgent.indexOf('Gecko') != -1;
+ this.isSafari = navigator.userAgent.indexOf('Safari') != -1;
+ this.isMac = navigator.userAgent.indexOf('Mac') != -1;
+ this.isMSIE5_0 = this.isMSIE && (navigator.userAgent.indexOf('MSIE 5.0') != -1);
+ this.action = "none";
+ this.selectedWindow = null;
+ this.lastSelectedWindow = null;
+ this.zindex = 100;
+ this.mouseDownScreenX = 0;
+ this.mouseDownScreenY = 0;
+ this.mouseDownLayerX = 0;
+ this.mouseDownLayerY = 0;
+ this.mouseDownWidth = 0;
+ this.mouseDownHeight = 0;
+ this.idCounter = 0;
+};
+
+MCWindows.prototype.init = function(settings) {
+ this.settings = settings;
+
+ if (this.isMSIE)
+ this.addEvent(document, "mousemove", mcWindows.eventDispatcher);
+ else
+ this.addEvent(window, "mousemove", mcWindows.eventDispatcher);
+
+ this.addEvent(document, "mouseup", mcWindows.eventDispatcher);
+
+ this.doc = document;
+};
+
+MCWindows.prototype.getParam = function(name, default_value) {
+ var value = null;
+
+ value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
+
+ // Fix bool values
+ if (value == "true" || value == "false")
+ return (value == "true");
+
+ return value;
+};
+
+MCWindows.prototype.eventDispatcher = function(e) {
+ e = typeof(e) == "undefined" ? window.event : e;
+
+ if (mcWindows.selectedWindow == null)
+ return;
+
+ // Switch focus
+ if (mcWindows.isGecko && e.type == "mousedown") {
+ var elm = e.currentTarget;
+
+ for (var n in mcWindows.windows) {
+ var win = mcWindows.windows[n];
+
+ if (win.headElement == elm || win.resizeElement == elm) {
+ win.focus();
+ break;
+ }
+ }
+ }
+
+ switch (e.type) {
+ case "mousemove":
+ mcWindows.selectedWindow.onMouseMove(e);
+ break;
+
+ case "mouseup":
+ mcWindows.selectedWindow.onMouseUp(e);
+ break;
+
+ case "mousedown":
+ mcWindows.selectedWindow.onMouseDown(e);
+ break;
+
+ case "focus":
+ mcWindows.selectedWindow.onFocus(e);
+ break;
+ }
+};
+
+MCWindows.prototype.addEvent = function(obj, name, handler) {
+ if (this.isMSIE)
+ obj.attachEvent("on" + name, handler);
+ else
+ obj.addEventListener(name, handler, true);
+};
+
+MCWindows.prototype.cancelEvent = function(e) {
+ if (this.isMSIE) {
+ e.returnValue = false;
+ e.cancelBubble = true;
+ } else
+ e.preventDefault();
+};
+
+MCWindows.prototype.parseFeatures = function(opts) {
+ // Cleanup the options
+ opts = opts.toLowerCase();
+ opts = opts.replace(/;/g, ",");
+ opts = opts.replace(/[^0-9a-z=,]/g, "");
+
+ var optionChunks = opts.split(',');
+ var options = new Array();
+
+ options['left'] = "10";
+ options['top'] = "10";
+ options['width'] = "300";
+ options['height'] = "300";
+ options['resizable'] = "yes";
+ options['minimizable'] = "yes";
+ options['maximizable'] = "yes";
+ options['close'] = "yes";
+ options['movable'] = "yes";
+ options['statusbar'] = "yes";
+ options['scrollbars'] = "auto";
+ options['modal'] = "no";
+
+ if (opts == "")
+ return options;
+
+ for (var i=0; i<optionChunks.length; i++) {
+ var parts = optionChunks[i].split('=');
+
+ if (parts.length == 2)
+ options[parts[0]] = parts[1];
+ }
+
+ options['left'] = parseInt(options['left']);
+ options['top'] = parseInt(options['top']);
+ options['width'] = parseInt(options['width']);
+ options['height'] = parseInt(options['height']);
+
+ return options;
+};
+
+MCWindows.prototype.open = function(url, name, features) {
+ this.lastSelectedWindow = this.selectedWindow;
+
+ var win = new MCWindow();
+ var winDiv, html = "", id;
+ var imgPath = this.getParam("images_path");
+
+ features = this.parseFeatures(features);
+
+ // Create div
+ id = "mcWindow_" + name;
+ win.deltaHeight = 18;
+
+ if (features['statusbar'] == "yes") {
+ win.deltaHeight += 13;
+
+ if (this.isMSIE)
+ win.deltaHeight += 1;
+ }
+
+ width = parseInt(features['width']);
+ height = parseInt(features['height'])-win.deltaHeight;
+
+ if (this.isMSIE)
+ width -= 2;
+
+ // Setup first part of window
+ win.id = id;
+ win.url = url;
+ win.name = name;
+ win.features = features;
+ this.windows[name] = win;
+
+ iframeWidth = width;
+ iframeHeight = height;
+
+ // Create inner content
+ html += '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
+ html += '<html>';
+ html += '<head>';
+ html += '<title>Wrapper iframe</title>';
+ html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
+ html += '<link href="' + this.getParam("css_file") + '" rel="stylesheet" type="text/css" />';
+ html += '</head>';
+ html += '<body onload="parent.mcWindows.onLoad(\'' + name + '\');">';
+
+ html += '<div id="' + id + '_container" class="mceWindow">';
+ html += '<div id="' + id + '_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
+ html += ' <div id="' + id + '_title" class="mceWindowTitle"';
+ html += ' onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;"></div>';
+ html += ' <div class="mceWindowHeadTools">';
+ html += ' <a href="javascript:parent.mcWindows.windows[\'' + name + '\'].close();" onmousedown="return false;" class="mceWindowClose"><img border="0" src="' + imgPath + '/window_close.gif" /></a>';
+// html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].maximize();" onmousedown="return false;" class="mceWindowMaximize"></a>';
+// html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].minimize();" onmousedown="return false;" class="mceWindowMinimize"></a>';
+ html += ' </div>';
+ html += '</div><div id="' + id + '_body" class="mceWindowBody" style="width: ' + width + 'px; height: ' + height + 'px;">';
+ html += '<iframe id="' + id + '_iframe" name="' + id + '_iframe" frameborder="0" width="' + iframeWidth + '" height="' + iframeHeight + '" src="' + url + '" class="mceWindowBodyIframe" scrolling="' + features['scrollbars'] + '"></iframe></div>';
+
+ if (features['statusbar'] == "yes") {
+ html += '<div id="' + id + '_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
+
+ if (features['resizable'] == "yes") {
+ if (this.isGecko)
+ html += '<div id="' + id + '_resize" class="mceWindowResize"><div style="background-image: url(\'' + imgPath + '/window_resize.gif\'); width: 12px; height: 12px;"></div></div>';
+ else
+ html += '<div id="' + id + '_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();" border="0" src="' + imgPath + '/window_resize.gif" /></div>';
+ }
+
+ html += '</div>';
+ }
+
+ html += '</div>';
+
+ html += '</body>';
+ html += '</html>';
+
+ // Create iframe
+ this.createFloatingIFrame(id, features['left'], features['top'], features['width'], features['height'], html);
+};
+
+// Blocks the document events by placing a image over the whole document
+MCWindows.prototype.setDocumentLock = function(state) {
+ if (state) {
+ var elm = document.getElementById('mcWindowEventBlocker');
+ if (elm == null) {
+ elm = document.createElement("div");
+
+ elm.id = "mcWindowEventBlocker";
+ elm.style.position = "absolute";
+ elm.style.left = "0px";
+ elm.style.top = "0px";
+
+ document.body.appendChild(elm);
+ }
+
+ elm.style.display = "none";
+
+ var imgPath = this.getParam("images_path");
+ var width = document.body.clientWidth;
+ var height = document.body.clientHeight;
+
+ elm.style.width = width;
+ elm.style.height = height;
+ elm.innerHTML = '<img src="' + imgPath + '/spacer.gif" width="' + width + '" height="' + height + '" />';
+
+ elm.style.zIndex = mcWindows.zindex-1;
+ elm.style.display = "block";
+ } else {
+ var elm = document.getElementById('mcWindowEventBlocker');
+
+ if (mcWindows.windows.length == 0)
+ elm.parentNode.removeChild(elm);
+ else
+ elm.style.zIndex = mcWindows.zindex-1;
+ }
+};
+
+// Gets called when wrapper iframe is initialized
+MCWindows.prototype.onLoad = function(name) {
+ var win = mcWindows.windows[name];
+ var id = "mcWindow_" + name;
+ var wrapperIframe = window.frames[id + "_iframe"].frames[0];
+ var wrapperDoc = window.frames[id + "_iframe"].document;
+ var doc = window.frames[id + "_iframe"].document;
+ var winDiv = document.getElementById("mcWindow_" + name + "_div");
+ var realIframe = window.frames[id + "_iframe"].frames[0];
+
+ // Set window data
+ win.id = "mcWindow_" + name;
+ win.winElement = winDiv;
+ win.bodyElement = doc.getElementById(id + '_body');
+ win.iframeElement = doc.getElementById(id + '_iframe');
+ win.headElement = doc.getElementById(id + '_head');
+ win.titleElement = doc.getElementById(id + '_title');
+ win.resizeElement = doc.getElementById(id + '_resize');
+ win.containerElement = doc.getElementById(id + '_container');
+ win.left = win.features['left'];
+ win.top = win.features['top'];
+ win.frame = window.frames[id + '_iframe'].frames[0];
+ win.wrapperFrame = window.frames[id + '_iframe'];
+ win.wrapperIFrameElement = document.getElementById(id + "_iframe");
+
+ // Add event handlers
+ mcWindows.addEvent(win.headElement, "mousedown", mcWindows.eventDispatcher);
+
+ if (win.resizeElement != null)
+ mcWindows.addEvent(win.resizeElement, "mousedown", mcWindows.eventDispatcher);
+
+ if (mcWindows.isMSIE) {
+ mcWindows.addEvent(realIframe.document, "mousemove", mcWindows.eventDispatcher);
+ mcWindows.addEvent(realIframe.document, "mouseup", mcWindows.eventDispatcher);
+ } else {
+ mcWindows.addEvent(realIframe, "mousemove", mcWindows.eventDispatcher);
+ mcWindows.addEvent(realIframe, "mouseup", mcWindows.eventDispatcher);
+ mcWindows.addEvent(realIframe, "focus", mcWindows.eventDispatcher);
+ }
+
+ for (var i=0; i<window.frames.length; i++) {
+ if (!window.frames[i]._hasMouseHandlers) {
+ if (mcWindows.isMSIE) {
+ mcWindows.addEvent(window.frames[i].document, "mousemove", mcWindows.eventDispatcher);
+ mcWindows.addEvent(window.frames[i].document, "mouseup", mcWindows.eventDispatcher);
+ } else {
+ mcWindows.addEvent(window.frames[i], "mousemove", mcWindows.eventDispatcher);
+ mcWindows.addEvent(window.frames[i], "mouseup", mcWindows.eventDispatcher);
+ }
+
+ window.frames[i]._hasMouseHandlers = true;
+ }
+ }
+
+ if (mcWindows.isMSIE) {
+ mcWindows.addEvent(win.frame.document, "mousemove", mcWindows.eventDispatcher);
+ mcWindows.addEvent(win.frame.document, "mouseup", mcWindows.eventDispatcher);
+ } else {
+ mcWindows.addEvent(win.frame, "mousemove", mcWindows.eventDispatcher);
+ mcWindows.addEvent(win.frame, "mouseup", mcWindows.eventDispatcher);
+ mcWindows.addEvent(win.frame, "focus", mcWindows.eventDispatcher);
+ }
+
+ // Dispatch open window event
+ var func = this.getParam("on_open_window", "");
+ if (func != "")
+ eval(func + "(win);");
+
+ win.focus();
+
+ if (win.features['modal'] == "yes")
+ mcWindows.setDocumentLock(true);
+};
+
+MCWindows.prototype.createFloatingIFrame = function(id_prefix, left, top, width, height, html) {
+ var iframe = document.createElement("iframe");
+ var div = document.createElement("div");
+
+ width = parseInt(width);
+ height = parseInt(height)+1;
+
+ // Create wrapper div
+ div.setAttribute("id", id_prefix + "_div");
+ div.setAttribute("width", width);
+ div.setAttribute("height", (height));
+ div.style.position = "absolute";
+ div.style.left = left + "px";
+ div.style.top = top + "px";
+ div.style.width = width + "px";
+ div.style.height = (height) + "px";
+ div.style.backgroundColor = "white";
+ div.style.display = "none";
+
+ if (this.isGecko) {
+ iframeWidth = width + 2;
+ iframeHeight = height + 2;
+ } else {
+ iframeWidth = width;
+ iframeHeight = height + 1;
+ }
+
+ // Create iframe
+ iframe.setAttribute("id", id_prefix + "_iframe");
+ iframe.setAttribute("name", id_prefix + "_iframe");
+ iframe.setAttribute("border", "0");
+ iframe.setAttribute("frameBorder", "0");
+ iframe.setAttribute("marginWidth", "0");
+ iframe.setAttribute("marginHeight", "0");
+ iframe.setAttribute("leftMargin", "0");
+ iframe.setAttribute("topMargin", "0");
+ iframe.setAttribute("width", iframeWidth);
+ iframe.setAttribute("height", iframeHeight);
+// iframe.setAttribute("src", "../jscripts/tiny_mce/blank.htm");
+ // iframe.setAttribute("allowtransparency", "false");
+ iframe.setAttribute("scrolling", "no");
+ iframe.style.width = iframeWidth + "px";
+ iframe.style.height = iframeHeight + "px";
+ iframe.style.backgroundColor = "white";
+ div.appendChild(iframe);
+
+ document.body.appendChild(div);
+
+ // Fixed MSIE 5.0 issue
+ div.innerHTML = div.innerHTML;
+
+ if (this.isSafari) {
+ // Give Safari some time to setup
+ window.setTimeout(function() {
+ doc = window.frames[id_prefix + '_iframe'].document;
+ doc.open();
+ doc.write(html);
+ doc.close();
+ }, 10);
+ } else {
+ doc = window.frames[id_prefix + '_iframe'].window.document;
+ doc.open();
+ doc.write(html);
+ doc.close();
+ }
+
+ div.style.display = "block";
+
+ return div;
+};
+
+// Window instance
+function MCWindow() {
+};
+
+MCWindow.prototype.focus = function() {
+ if (this != mcWindows.selectedWindow) {
+ this.winElement.style.zIndex = ++mcWindows.zindex;
+ mcWindows.lastSelectedWindow = mcWindows.selectedWindow;
+ mcWindows.selectedWindow = this;
+ }
+};
+
+MCWindow.prototype.minimize = function() {
+};
+
+MCWindow.prototype.maximize = function() {
+
+};
+
+MCWindow.prototype.startResize = function() {
+ mcWindows.action = "resize";
+};
+
+MCWindow.prototype.startMove = function(e) {
+ mcWindows.action = "move";
+};
+
+MCWindow.prototype.close = function() {
+ if (mcWindows.lastSelectedWindow != null)
+ mcWindows.lastSelectedWindow.focus();
+
+ var mcWindowsNew = new Array();
+ for (var n in mcWindows.windows) {
+ var win = mcWindows.windows[n];
+
+ if (win.name != this.name)
+ mcWindowsNew[n] = win;
+ }
+
+ mcWindows.windows = mcWindowsNew;
+
+// alert(mcWindows.doc.getElementById(this.id + "_iframe"));
+
+ var e = mcWindows.doc.getElementById(this.id + "_iframe");
+ e.parentNode.removeChild(e);
+
+ var e = mcWindows.doc.getElementById(this.id + "_div");
+ e.parentNode.removeChild(e);
+
+ mcWindows.setDocumentLock(false);
+};
+
+MCWindow.prototype.onMouseMove = function(e) {
+ var scrollX = 0;//this.doc.body.scrollLeft;
+ var scrollY = 0;//this.doc.body.scrollTop;
+
+ // Calculate real X, Y
+ var dx = e.screenX - mcWindows.mouseDownScreenX;
+ var dy = e.screenY - mcWindows.mouseDownScreenY;
+
+ switch (mcWindows.action) {
+ case "resize":
+ width = mcWindows.mouseDownWidth + (e.screenX - mcWindows.mouseDownScreenX);
+ height = mcWindows.mouseDownHeight + (e.screenY - mcWindows.mouseDownScreenY);
+
+ width = width < 100 ? 100 : width;
+ height = height < 100 ? 100 : height;
+
+ this.wrapperIFrameElement.style.width = width+2;
+ this.wrapperIFrameElement.style.height = height+2;
+ this.wrapperIFrameElement.width = width+2;
+ this.wrapperIFrameElement.height = height+2;
+ this.winElement.style.width = width;
+ this.winElement.style.height = height;
+
+ height = height - this.deltaHeight;
+
+ this.containerElement.style.width = width;
+
+ this.iframeElement.style.width = width;
+ this.iframeElement.style.height = height;
+ this.bodyElement.style.width = width;
+ this.bodyElement.style.height = height;
+ this.headElement.style.width = width;
+ //this.statusElement.style.width = width;
+
+ mcWindows.cancelEvent(e);
+ break;
+
+ case "move":
+ this.left = mcWindows.mouseDownLayerX + (e.screenX - mcWindows.mouseDownScreenX);
+ this.top = mcWindows.mouseDownLayerY + (e.screenY - mcWindows.mouseDownScreenY);
+ this.winElement.style.left = this.left + "px";
+ this.winElement.style.top = this.top + "px";
+
+ mcWindows.cancelEvent(e);
+ break;
+ }
+};
+
+function debug(msg) {
+ document.getElementById('debug').value += msg + "\n";
+}
+
+MCWindow.prototype.onMouseUp = function(e) {
+ mcWindows.action = "none";
+};
+
+MCWindow.prototype.onFocus = function(e) {
+ // Gecko only handler
+ var winRef = e.currentTarget;
+
+ for (var n in mcWindows.windows) {
+ var win = mcWindows.windows[n];
+
+ if (winRef.name == win.id + "_iframe") {
+ win.focus();
+ return;
+ }
+ }
+};
+
+MCWindow.prototype.onMouseDown = function(e) {
+ var elm = mcWindows.isMSIE ? this.wrapperFrame.event.srcElement : e.target;
+
+ var scrollX = 0;//this.doc.body.scrollLeft;
+ var scrollY = 0;//this.doc.body.scrollTop;
+
+ mcWindows.mouseDownScreenX = e.screenX;
+ mcWindows.mouseDownScreenY = e.screenY;
+ mcWindows.mouseDownLayerX = this.left;
+ mcWindows.mouseDownLayerY = this.top;
+ mcWindows.mouseDownWidth = parseInt(this.winElement.style.width);
+ mcWindows.mouseDownHeight = parseInt(this.winElement.style.height);
+
+ if (this.resizeElement != null && elm == this.resizeElement.firstChild)
+ this.startResize(e);
+ else
+ this.startMove(e);
+
+ mcWindows.cancelEvent(e);
+};
+
+// Global instance
+var mcWindows = new MCWindows();
+
+// Initialize windows
+mcWindows.init({
+ images_path : tinyMCE.baseURL + "/plugins/inlinepopups/images",
+ css_file : tinyMCE.baseURL + "/plugins/inlinepopups/css/inlinepopup.css"
+});
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/contextmenu/images/spacer.gif b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/images/spacer.gif Binary files differindex fc25609..fc25609 100644 --- a/wp-inst/wp-includes/js/tinymce/plugins/contextmenu/images/spacer.gif +++ b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/images/spacer.gif diff --git a/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/images/window_close.gif b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/images/window_close.gif Binary files differnew file mode 100644 index 0000000..3469e5a --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/images/window_close.gif diff --git a/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/images/window_maximize.gif b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/images/window_maximize.gif Binary files differnew file mode 100644 index 0000000..fcae73e --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/images/window_maximize.gif diff --git a/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/images/window_minimize.gif b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/images/window_minimize.gif Binary files differnew file mode 100644 index 0000000..94f167a --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/images/window_minimize.gif diff --git a/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/images/window_resize.gif b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/images/window_resize.gif Binary files differnew file mode 100644 index 0000000..6c402d0 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/images/window_resize.gif diff --git a/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/jscripts/mcwindows.js b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/jscripts/mcwindows.js new file mode 100644 index 0000000..8982342 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/jscripts/mcwindows.js @@ -0,0 +1,455 @@ +/**
+ * $RCSfile: mcwindows.js,v $
+ * $Revision: 1.1 $
+ * $Date: 2005/08/10 21:21:00 $
+ *
+ * Moxiecode DHTML Windows script.
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved.
+ */
+
+// Windows handler
+function MCWindows() {
+ this.settings = new Array();
+ this.windows = new Array();
+ this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
+ this.isGecko = navigator.userAgent.indexOf('Gecko') != -1;
+ this.isSafari = navigator.userAgent.indexOf('Safari') != -1;
+ this.isMac = navigator.userAgent.indexOf('Mac') != -1;
+ this.isMSIE5_0 = this.isMSIE && (navigator.userAgent.indexOf('MSIE 5.0') != -1);
+ this.action = "none";
+ this.selectedWindow = null;
+ this.zindex = 100;
+ this.mouseDownScreenX = 0;
+ this.mouseDownScreenY = 0;
+ this.mouseDownLayerX = 0;
+ this.mouseDownLayerY = 0;
+ this.mouseDownWidth = 0;
+ this.mouseDownHeight = 0;
+};
+
+MCWindows.prototype.init = function(settings) {
+ this.settings = settings;
+
+ if (this.isMSIE)
+ this.addEvent(document, "mousemove", mcWindows.eventDispatcher);
+ else
+ this.addEvent(window, "mousemove", mcWindows.eventDispatcher);
+
+ this.addEvent(document, "mouseup", mcWindows.eventDispatcher);
+};
+
+MCWindows.prototype.getParam = function(name, default_value) {
+ var value = null;
+
+ value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
+
+ // Fix bool values
+ if (value == "true" || value == "false")
+ return (value == "true");
+
+ return value;
+};
+
+MCWindows.prototype.eventDispatcher = function(e) {
+ e = typeof(e) == "undefined" ? window.event : e;
+
+ if (mcWindows.selectedWindow == null)
+ return;
+
+ // Switch focus
+ if (mcWindows.isGecko && e.type == "mousedown") {
+ var elm = e.currentTarget;
+
+ for (var n in mcWindows.windows) {
+ var win = mcWindows.windows[n];
+
+ if (win.headElement == elm || win.resizeElement == elm) {
+ win.focus();
+ break;
+ }
+ }
+ }
+
+ switch (e.type) {
+ case "mousemove":
+ mcWindows.selectedWindow.onMouseMove(e);
+ break;
+
+ case "mouseup":
+ mcWindows.selectedWindow.onMouseUp(e);
+ break;
+
+ case "mousedown":
+ mcWindows.selectedWindow.onMouseDown(e);
+ break;
+
+ case "focus":
+ mcWindows.selectedWindow.onFocus(e);
+ break;
+ }
+}
+
+MCWindows.prototype.addEvent = function(obj, name, handler) {
+ if (this.isMSIE)
+ obj.attachEvent("on" + name, handler);
+ else
+ obj.addEventListener(name, handler, true);
+};
+
+MCWindows.prototype.cancelEvent = function(e) {
+ if (this.isMSIE) {
+ e.returnValue = false;
+ e.cancelBubble = true;
+ } else
+ e.preventDefault();
+};
+
+MCWindows.prototype.parseFeatures = function(opts) {
+ // Cleanup the options
+ opts = opts.toLowerCase();
+ opts = opts.replace(/;/g, ",");
+ opts = opts.replace(/[^0-9a-z=,]/g, "");
+
+ var optionChunks = opts.split(',');
+ var options = new Array();
+
+ options['left'] = 10;
+ options['top'] = 10;
+ options['width'] = 300;
+ options['height'] = 300;
+ options['resizable'] = true;
+ options['minimizable'] = true;
+ options['maximizable'] = true;
+ options['close'] = true;
+ options['movable'] = true;
+
+ if (opts == "")
+ return options;
+
+ for (var i=0; i<optionChunks.length; i++) {
+ var parts = optionChunks[i].split('=');
+
+ if (parts.length == 2)
+ options[parts[0]] = parts[1];
+ }
+
+ return options;
+};
+
+MCWindows.prototype.open = function(url, name, features) {
+ var win = new MCWindow();
+ var winDiv, html = "", id;
+
+ features = this.parseFeatures(features);
+
+ // Create div
+ id = "mcWindow_" + name;
+
+ width = parseInt(features['width']);
+ height = parseInt(features['height'])-12-19;
+
+ if (this.isMSIE)
+ width -= 2;
+
+ // Setup first part of window
+ win.id = id;
+ win.url = url;
+ win.name = name;
+ win.features = features;
+ this.windows[name] = win;
+
+ iframeWidth = width;
+ iframeHeight = height;
+
+ // Create inner content
+ html += '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
+ html += '<html>';
+ html += '<head>';
+ html += '<title>Wrapper iframe</title>';
+ html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
+ html += '<link href="../jscripts/tiny_mce/themes/advanced/css/editor_ui.css" rel="stylesheet" type="text/css" />';
+ html += '</head>';
+ html += '<body onload="parent.mcWindows.onLoad(\'' + name + '\');">';
+
+ html += '<div id="' + id + '_container" class="mceWindow">';
+ html += '<div id="' + id + '_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
+ html += ' <div id="' + id + '_title" class="mceWindowTitle"';
+ html += ' onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;">No name window</div>';
+ html += ' <div class="mceWindowHeadTools">';
+ html += ' <a href="javascript:parent.mcWindows.windows[\'' + name + '\'].close();" onmousedown="return false;" class="mceWindowClose"><img border="0" src="../jscripts/tiny_mce/themes/advanced/images/window_close.gif" /></a>';
+// html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].maximize();" onmousedown="return false;" class="mceWindowMaximize"></a>';
+// html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].minimize();" onmousedown="return false;" class="mceWindowMinimize"></a>';
+ html += ' </div>';
+ html += '</div><div id="' + id + '_body" class="mceWindowBody" style="width: ' + width + 'px; height: ' + height + 'px;">';
+ html += '<iframe id="' + id + '_iframe" name="' + id + '_iframe" onfocus="parent.mcWindows.windows[\'' + name + '\'].focus();" frameborder="0" width="' + iframeWidth + '" height="' + iframeHeight + '" src="' + url + '" class="mceWindowBodyIframe"></iframe></div>';
+ html += '<div id="' + id + '_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">';
+ html += '<div id="' + id + '_resize" class="mceWindowResize"><img onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();" border="0" src="../jscripts/tiny_mce/themes/advanced/images/window_resize.gif" /></div>';
+ html += '</div>';
+ html += '</div>';
+
+ html += '</body>';
+ html += '</html>';
+
+ // Create iframe
+ this.createFloatingIFrame(id, features['left'], features['top'], features['width'], features['height'], html);
+};
+
+// Gets called when wrapper iframe is initialized
+MCWindows.prototype.onLoad = function(name) {
+ var win = mcWindows.windows[name];
+ var id = "mcWindow_" + name;
+ var wrapperIframe = window.frames[id + "_iframe"].frames[0];
+ var wrapperDoc = window.frames[id + "_iframe"].document;
+ var doc = window.frames[id + "_iframe"].document;
+ var winDiv = document.getElementById("mcWindow_" + name + "_div");
+ var realIframe = window.frames[id + "_iframe"].frames[0];
+
+ // Set window data
+ win.id = "mcWindow_" + name + "_iframe";
+ win.winElement = winDiv;
+ win.bodyElement = doc.getElementById(id + '_body');
+ win.iframeElement = doc.getElementById(id + '_iframe');
+ win.headElement = doc.getElementById(id + '_head');
+ win.titleElement = doc.getElementById(id + '_title');
+ win.resizeElement = doc.getElementById(id + '_resize');
+ win.containerElement = doc.getElementById(id + '_container');
+ win.left = win.features['left'];
+ win.top = win.features['top'];
+ win.frame = window.frames[id + '_iframe'].frames[0];
+ win.wrapperFrame = window.frames[id + '_iframe'];
+ win.wrapperIFrameElement = document.getElementById(id + "_iframe");
+
+ // Add event handlers
+ mcWindows.addEvent(win.headElement, "mousedown", mcWindows.eventDispatcher);
+ mcWindows.addEvent(win.resizeElement, "mousedown", mcWindows.eventDispatcher);
+
+ if (mcWindows.isMSIE) {
+ mcWindows.addEvent(realIframe.document, "mousemove", mcWindows.eventDispatcher);
+ mcWindows.addEvent(realIframe.document, "mouseup", mcWindows.eventDispatcher);
+ } else {
+ mcWindows.addEvent(realIframe, "mousemove", mcWindows.eventDispatcher);
+ mcWindows.addEvent(realIframe, "mouseup", mcWindows.eventDispatcher);
+ mcWindows.addEvent(realIframe, "focus", mcWindows.eventDispatcher);
+ }
+
+ for (var i=0; i<window.frames.length; i++) {
+ if (!window.frames[i]._hasMouseHandlers) {
+ if (mcWindows.isMSIE) {
+ mcWindows.addEvent(window.frames[i].document, "mousemove", mcWindows.eventDispatcher);
+ mcWindows.addEvent(window.frames[i].document, "mouseup", mcWindows.eventDispatcher);
+ } else {
+ mcWindows.addEvent(window.frames[i], "mousemove", mcWindows.eventDispatcher);
+ mcWindows.addEvent(window.frames[i], "mouseup", mcWindows.eventDispatcher);
+ }
+
+ window.frames[i]._hasMouseHandlers = true;
+ }
+ }
+
+ if (mcWindows.isMSIE) {
+ mcWindows.addEvent(win.frame.document, "mousemove", mcWindows.eventDispatcher);
+ mcWindows.addEvent(win.frame.document, "mouseup", mcWindows.eventDispatcher);
+ } else {
+ mcWindows.addEvent(win.frame, "mousemove", mcWindows.eventDispatcher);
+ mcWindows.addEvent(win.frame, "mouseup", mcWindows.eventDispatcher);
+ mcWindows.addEvent(win.frame, "focus", mcWindows.eventDispatcher);
+ }
+
+ this.selectedWindow = win;
+};
+
+MCWindows.prototype.createFloatingIFrame = function(id_prefix, left, top, width, height, html) {
+ var iframe = document.createElement("iframe");
+ var div = document.createElement("div");
+
+ width = parseInt(width);
+ height = parseInt(height)+1;
+
+ // Create wrapper div
+ div.setAttribute("id", id_prefix + "_div");
+ div.setAttribute("width", width);
+ div.setAttribute("height", (height));
+ div.style.position = "absolute";
+ div.style.left = left + "px";
+ div.style.top = top + "px";
+ div.style.width = width + "px";
+ div.style.height = (height) + "px";
+ div.style.backgroundColor = "white";
+ div.style.display = "none";
+
+ if (this.isGecko) {
+ iframeWidth = width + 2;
+ iframeHeight = height + 2;
+ } else {
+ iframeWidth = width;
+ iframeHeight = height + 1;
+ }
+
+ // Create iframe
+ iframe.setAttribute("id", id_prefix + "_iframe");
+ iframe.setAttribute("name", id_prefix + "_iframe");
+ iframe.setAttribute("border", "0");
+ iframe.setAttribute("frameBorder", "0");
+ iframe.setAttribute("marginWidth", "0");
+ iframe.setAttribute("marginHeight", "0");
+ iframe.setAttribute("leftMargin", "0");
+ iframe.setAttribute("topMargin", "0");
+ iframe.setAttribute("width", iframeWidth);
+ iframe.setAttribute("height", iframeHeight);
+// iframe.setAttribute("src", "../jscripts/tiny_mce/blank.htm");
+ // iframe.setAttribute("allowtransparency", "false");
+ iframe.setAttribute("scrolling", "no");
+ iframe.style.width = iframeWidth + "px";
+ iframe.style.height = iframeHeight + "px";
+ iframe.style.backgroundColor = "white";
+ div.appendChild(iframe);
+
+ document.body.appendChild(div);
+
+ // Fixed MSIE 5.0 issue
+ div.innerHTML = div.innerHTML;
+
+ if (this.isSafari) {
+ // Give Safari some time to setup
+ window.setTimeout(function() {
+ doc = window.frames[id_prefix + '_iframe'].document;
+ doc.open();
+ doc.write(html);
+ doc.close();
+ }, 10);
+ } else {
+ doc = window.frames[id_prefix + '_iframe'].window.document
+ doc.open();
+ doc.write(html);
+ doc.close();
+ }
+
+ div.style.display = "block";
+
+ return div;
+};
+
+// Window instance
+function MCWindow() {
+};
+
+MCWindow.prototype.focus = function() {
+ this.winElement.style.zIndex = mcWindows.zindex++;
+ mcWindows.selectedWindow = this;
+};
+
+MCWindow.prototype.minimize = function() {
+};
+
+MCWindow.prototype.maximize = function() {
+
+};
+
+MCWindow.prototype.startResize = function() {
+ mcWindows.action = "resize";
+};
+
+MCWindow.prototype.startMove = function(e) {
+ mcWindows.action = "move";
+};
+
+MCWindow.prototype.close = function() {
+ document.body.removeChild(this.winElement);
+ mcWindows.windows[this.name] = null;
+};
+
+MCWindow.prototype.onMouseMove = function(e) {
+ var scrollX = 0;//this.doc.body.scrollLeft;
+ var scrollY = 0;//this.doc.body.scrollTop;
+
+ // Calculate real X, Y
+ var dx = e.screenX - mcWindows.mouseDownScreenX;
+ var dy = e.screenY - mcWindows.mouseDownScreenY;
+
+ switch (mcWindows.action) {
+ case "resize":
+ width = mcWindows.mouseDownWidth + (e.screenX - mcWindows.mouseDownScreenX);
+ height = mcWindows.mouseDownHeight + (e.screenY - mcWindows.mouseDownScreenY);
+
+ width = width < 100 ? 100 : width;
+ height = height < 100 ? 100 : height;
+
+ this.wrapperIFrameElement.style.width = width+2;
+ this.wrapperIFrameElement.style.height = height+2;
+ this.wrapperIFrameElement.width = width+2;
+ this.wrapperIFrameElement.height = height+2;
+ this.winElement.style.width = width;
+ this.winElement.style.height = height;
+
+ height = height-12-19;
+
+ this.containerElement.style.width = width;
+
+ this.iframeElement.style.width = width;
+ this.iframeElement.style.height = height;
+ this.bodyElement.style.width = width;
+ this.bodyElement.style.height = height;
+ this.headElement.style.width = width;
+ //this.statusElement.style.width = width;
+
+ mcWindows.cancelEvent(e);
+ break;
+
+ case "move":
+ this.left = mcWindows.mouseDownLayerX + (e.screenX - mcWindows.mouseDownScreenX);
+ this.top = mcWindows.mouseDownLayerY + (e.screenY - mcWindows.mouseDownScreenY);
+ this.winElement.style.left = this.left + "px";
+ this.winElement.style.top = this.top + "px";
+
+ mcWindows.cancelEvent(e);
+ break;
+ }
+};
+
+function debug(msg) {
+ document.getElementById('debug').value += msg + "\n";
+}
+
+MCWindow.prototype.onMouseUp = function(e) {
+ mcWindows.action = "none";
+};
+
+MCWindow.prototype.onFocus = function(e) {
+ // Gecko only handler
+ var winRef = e.currentTarget;
+
+ for (var n in mcWindows.windows) {
+ var win = mcWindows.windows[n];
+
+ if (winRef.name == win.id) {
+ win.focus();
+ return;
+ }
+ }
+};
+
+MCWindow.prototype.onMouseDown = function(e) {
+ var elm = mcWindows.isMSIE ? this.wrapperFrame.event.srcElement : e.target;
+
+ var scrollX = 0;//this.doc.body.scrollLeft;
+ var scrollY = 0;//this.doc.body.scrollTop;
+
+ mcWindows.mouseDownScreenX = e.screenX;
+ mcWindows.mouseDownScreenY = e.screenY;
+ mcWindows.mouseDownLayerX = this.left;
+ mcWindows.mouseDownLayerY = this.top;
+ mcWindows.mouseDownWidth = parseInt(this.winElement.style.width);
+ mcWindows.mouseDownHeight = parseInt(this.winElement.style.height);
+
+ if (elm == this.resizeElement.firstChild)
+ this.startResize(e);
+ else
+ this.startMove(e);
+
+ mcWindows.cancelEvent(e);
+};
+
+// Global instance
+var mcWindows = new MCWindows();
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/readme.txt b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/readme.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/plugins/inlinepopups/readme.txt diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/editor_plugin.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/editor_plugin.js deleted file mode 100644 index e77d4af..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/editor_plugin.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Import plugin specific language pack */
- tinyMCE.importPluginLanguagePack('preview','cs,de,el,en,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br,nl');function TinyMCE_preview_getControlHTML(control_name){switch(control_name){case "preview":return '<img id="{$editor_id}_preview" src="{$pluginurl}/images/preview.gif" title="{$lang_preview_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePreview\');" />';}return "";}function TinyMCE_preview_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mcePreview":var previewPage=tinyMCE.getParam("plugin_preview_pageurl",null);var previewWidth=tinyMCE.getParam("plugin_preview_width","550");var previewHeight=tinyMCE.getParam("plugin_preview_height","600");if(previewPage){var template=new Array();template['file']=previewPage;template['width']=previewWidth;template['height']=previewHeight;tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"yes",content:tinyMCE.getContent(),content_css:tinyMCE.getParam("content_css")});}else{var win=window.open("","mcePreview","menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width="+previewWidth+",height="+previewHeight);var html="";html+='<!doctype html public "-//w3c//dtd html 4.0 transitional//en">';html+='<html>';html+='<head>';html+='<title>'+tinyMCE.getLang('lang_preview_desc')+'</title>';html+='<base href="'+tinyMCE.getParam("document_base_url")+'">';html+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';html+='<link href="'+tinyMCE.getParam("content_css")+'" rel="stylesheet" type="text/css">';html+='</head>';html+='<body>';html+=tinyMCE.getContent();html+='</body>';html+='</html>';win.document.write(html);win.document.close();}return true;}return false;}
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/editor_plugin_src.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/editor_plugin_src.js deleted file mode 100644 index c5748f9..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/editor_plugin_src.js +++ /dev/null @@ -1,62 +0,0 @@ -/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('preview', 'cs,de,el,en,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br,nl');
-
-/**
- * Returns the HTML contents of the preview control.
- */
-function TinyMCE_preview_getControlHTML(control_name) {
- switch (control_name) {
- case "preview":
- return '<img id="{$editor_id}_preview" src="{$pluginurl}/images/preview.gif" title="{$lang_preview_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcePreview\');" />';
- }
-
- return "";
-}
-
-/**
- * Executes the mcePreview command.
- */
-function TinyMCE_preview_execCommand(editor_id, element, command, user_interface, value) {
- // Handle commands
- switch (command) {
- case "mcePreview":
- var previewPage = tinyMCE.getParam("plugin_preview_pageurl", null);
- var previewWidth = tinyMCE.getParam("plugin_preview_width", "550");
- var previewHeight = tinyMCE.getParam("plugin_preview_height", "600");
-
- // Use a custom preview page
- if (previewPage) {
- var template = new Array();
-
- template['file'] = previewPage;
- template['width'] = previewWidth;
- template['height'] = previewHeight;
-
- tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "yes", content : tinyMCE.getContent(), content_css : tinyMCE.getParam("content_css")});
- } else {
- var win = window.open("", "mcePreview", "menubar=no,toolbar=no,scrollbars=yes,resizable=yes,left=20,top=20,width=" + previewWidth + ",height=" + previewHeight);
- var html = "";
-
- html += '<!doctype html public "-//w3c//dtd html 4.0 transitional//en">';
- html += '<html>';
- html += '<head>';
- html += '<title>' + tinyMCE.getLang('lang_preview_desc') + '</title>';
- html += '<base href="' + tinyMCE.getParam("document_base_url") + '">';
- html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
- html += '<link href="' + tinyMCE.getParam("content_css") + '" rel="stylesheet" type="text/css">';
- html += '</head>';
- html += '<body>';
- html += tinyMCE.getContent();
- html += '</body>';
- html += '</html>';
-
- win.document.write(html);
- win.document.close();
- }
-
- return true;
- }
-
- // Pass to next handler in chain
- return false;
-}
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/example.html b/wp-inst/wp-includes/js/tinymce/plugins/preview/example.html deleted file mode 100644 index c6f1dfb..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/example.html +++ /dev/null @@ -1,14 +0,0 @@ -<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-<script language="javascript" src="../../tiny_mce_popup.js"></script>
-<title>Example of a custom preview page</title>
-<link href="{$content_css}" rel="stylesheet" type="text/css">
-</head>
-<body>
-
-Editor contents: <br />
-{$content}
-
-</body>
-</html>
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/images/preview.gif b/wp-inst/wp-includes/js/tinymce/plugins/preview/images/preview.gif Binary files differdeleted file mode 100644 index 4e7900c..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/images/preview.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/cs.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/cs.js deleted file mode 100644 index 27502b4..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/cs.js +++ /dev/null @@ -1,3 +0,0 @@ -// UK lang variables
-
-tinyMCELang['lang_preview_desc'] = 'Náhled';
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/de.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/de.js deleted file mode 100644 index e24e9c4..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/de.js +++ /dev/null @@ -1,3 +0,0 @@ -// DE lang variables by Tobias Heer
-
-tinyMCELang['lang_preview_desc'] = 'Vorschau';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/el.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/el.js deleted file mode 100644 index d63358e..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/el.js +++ /dev/null @@ -1,3 +0,0 @@ -// Greek lang variables by Jacaranda Bill
-
-tinyMCELang['lang_preview_desc'] = 'Ðñïåðéóêüðçóç éóôïóåëßäáò';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/en.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/en.js deleted file mode 100644 index d94866d..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/en.js +++ /dev/null @@ -1,3 +0,0 @@ -// UK lang variables
-
-tinyMCELang['lang_preview_desc'] = 'Preview';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/fa.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/fa.js deleted file mode 100644 index 46877f4..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/fa.js +++ /dev/null @@ -1,8 +0,0 @@ -// IR lang variables
-// Persian (Farsi) language pack (for IRAN)
-// By: Morteza Zafari
-// Lost@LostLord.com
-// http://www.LostLord.com
-
-tinyMCELang['lang_dir'] = 'rtl';
-tinyMCELang['lang_preview_desc'] = 'پیش نمایش';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/fr.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/fr.js deleted file mode 100644 index 18610dc..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/fr.js +++ /dev/null @@ -1,3 +0,0 @@ -// French lang variables by Laurent Dran
-
-tinyMCELang['lang_preview_desc'] = 'Prévisualisation';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/fr_ca.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/fr_ca.js deleted file mode 100644 index 7ebd62e..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/fr_ca.js +++ /dev/null @@ -1,3 +0,0 @@ -// Canadian French lang variables by Virtuelcom last modification: 2005-06-15
-
-tinyMCELang['lang_preview_desc'] = 'Prévisualisation';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/it.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/it.js deleted file mode 100644 index 7a13b51..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/it.js +++ /dev/null @@ -1,3 +0,0 @@ -// IT lang variables
-
-tinyMCELang['lang_preview_desc'] = 'Anteprima';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/ko.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/ko.js deleted file mode 100644 index b3bb1f8..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/ko.js +++ /dev/null @@ -1,3 +0,0 @@ -// KO lang variables
-
-tinyMCELang['lang_preview_desc'] = '¹Ì¸®º¸±â';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/nl.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/nl.js deleted file mode 100644 index 782389f..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/nl.js +++ /dev/null @@ -1,3 +0,0 @@ -// UK lang variables
-
-tinyMCELang['lang_preview_desc'] = 'Voorbeeld';
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/pl.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/pl.js deleted file mode 100644 index 6998539..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/pl.js +++ /dev/null @@ -1,4 +0,0 @@ -// PL lang variables
-
-
-tinyMCELang['lang_preview_desc'] = 'PodglÄ…d';
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/pt.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/pt.js deleted file mode 100644 index bc7e09d..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/pt.js +++ /dev/null @@ -1,3 +0,0 @@ -// UK lang variables
-
-tinyMCELang['lang_preview_desc'] = 'Pré-visualização';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/pt_br.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/pt_br.js deleted file mode 100644 index 1a501c6..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/pt_br.js +++ /dev/null @@ -1,3 +0,0 @@ -// pt_BR lang variables
-
-tinyMCELang['lang_preview_desc'] = 'Visualizar';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/sv.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/sv.js deleted file mode 100644 index 32d5850..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/sv.js +++ /dev/null @@ -1,3 +0,0 @@ -// SE lang variables
-
-tinyMCELang['lang_preview_desc'] = 'Förhandsgranska';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/zh_cn.js b/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/zh_cn.js deleted file mode 100644 index 2c8a1a3..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/langs/zh_cn.js +++ /dev/null @@ -1,3 +0,0 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com)
-
-tinyMCELang['lang_preview_desc'] = 'Ô¤ÀÀ';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/preview/readme.txt b/wp-inst/wp-includes/js/tinymce/plugins/preview/readme.txt deleted file mode 100644 index 4fdb78a..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/preview/readme.txt +++ /dev/null @@ -1 +0,0 @@ -Check the TinyMCE documentation for details on this plugin.
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/save/editor_plugin.js b/wp-inst/wp-includes/js/tinymce/plugins/save/editor_plugin.js deleted file mode 100644 index 0dfa850..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/save/editor_plugin.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Import plugin specific language pack */
- tinyMCE.importPluginLanguagePack('save','en,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl');function TinyMCE_save_getControlHTML(control_name){switch(control_name){case "save":return '<img id="{$editor_id}_save" src="{$pluginurl}/images/save.gif" title="{$lang_save_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.switchClass(this,\'mceButtonNormal\');" onmousedown="tinyMCE.switchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSave\');" />';}return "";}function TinyMCE_save_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceSave":var formObj=tinyMCE.selectedInstance.formElement.form;if(formObj){tinyMCE.triggerSave();for(var i=0;i<formObj.elements.length;i++){var elementId=formObj.elements[i].name?formObj.elements[i].name:formObj.elements[i].id;if(elementId.indexOf('mce_editor_')==0)formObj.elements[i].disabled=true;}tinyMCE.selectedInstance.formElement.form.submit();}else alert("Error: No form element found.");return true;}return false;}
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/save/editor_plugin_src.js b/wp-inst/wp-includes/js/tinymce/plugins/save/editor_plugin_src.js deleted file mode 100644 index ee81d15..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/save/editor_plugin_src.js +++ /dev/null @@ -1,43 +0,0 @@ -/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('save', 'en,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl');
-
-/**
- * Returns the HTML contents of the save control.
- */
-function TinyMCE_save_getControlHTML(control_name) {
- switch (control_name) {
- case "save":
- return '<img id="{$editor_id}_save" src="{$pluginurl}/images/save.gif" title="{$lang_save_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.switchClass(this,\'mceButtonNormal\');" onmousedown="tinyMCE.switchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSave\');" />';
- }
- return "";
-}
-
-/**
- * Executes the save command.
- */
-function TinyMCE_save_execCommand(editor_id, element, command, user_interface, value) {
- // Handle commands
- switch (command) {
- case "mceSave":
- var formObj = tinyMCE.selectedInstance.formElement.form;
-
- if (formObj) {
- tinyMCE.triggerSave();
-
- // Disable all UI form elements that TinyMCE created
- for (var i=0; i<formObj.elements.length; i++) {
- var elementId = formObj.elements[i].name ? formObj.elements[i].name : formObj.elements[i].id;
-
- if (elementId.indexOf('mce_editor_') == 0)
- formObj.elements[i].disabled = true;
- }
-
- tinyMCE.selectedInstance.formElement.form.submit();
- } else
- alert("Error: No form element found.");
-
- return true;
- }
- // Pass to next handler in chain
- return false;
-}
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/save/images/save.gif b/wp-inst/wp-includes/js/tinymce/plugins/save/images/save.gif Binary files differdeleted file mode 100644 index 79cd096..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/save/images/save.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/cs.js b/wp-inst/wp-includes/js/tinymce/plugins/save/langs/cs.js deleted file mode 100644 index 21823ad..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/cs.js +++ /dev/null @@ -1,3 +0,0 @@ -// UK lang variables
-
-tinyMCELang['lang_save_desc'] = 'Uložit';
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/de.js b/wp-inst/wp-includes/js/tinymce/plugins/save/langs/de.js deleted file mode 100644 index 0f55a22..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/de.js +++ /dev/null @@ -1,3 +0,0 @@ -// DE lang variables
-
-tinyMCELang['lang_save_desc'] = 'Speichern';
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/en.js b/wp-inst/wp-includes/js/tinymce/plugins/save/langs/en.js deleted file mode 100644 index 07c7198..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/en.js +++ /dev/null @@ -1,3 +0,0 @@ -// UK lang variables
-
-tinyMCELang['lang_save_desc'] = 'Save';
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/fa.js b/wp-inst/wp-includes/js/tinymce/plugins/save/langs/fa.js deleted file mode 100644 index 868e179..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/fa.js +++ /dev/null @@ -1,8 +0,0 @@ -// IR lang variables
-// Persian (Farsi) language pack (for IRAN)
-// By: Morteza Zafari
-// Lost@LostLord.com
-// http://www.LostLord.com
-
-tinyMCELang['lang_dir'] = 'rtl';
-tinyMCELang['lang_save_desc'] = 'ضبط';
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/fr.js b/wp-inst/wp-includes/js/tinymce/plugins/save/langs/fr.js deleted file mode 100644 index 3ea29c8..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/fr.js +++ /dev/null @@ -1,3 +0,0 @@ -// French lang variables by Laurent Dran
-
-tinyMCELang['lang_save_desc'] = 'Sauver';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/fr_ca.js b/wp-inst/wp-includes/js/tinymce/plugins/save/langs/fr_ca.js deleted file mode 100644 index ba7802f..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/fr_ca.js +++ /dev/null @@ -1,3 +0,0 @@ -// Canadian French lang variables by Virtuelcom last modification: 2005-06-15
-
-tinyMCELang['lang_save_desc'] = 'Enregistrer';
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/nl.js b/wp-inst/wp-includes/js/tinymce/plugins/save/langs/nl.js deleted file mode 100644 index c7f2385..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/nl.js +++ /dev/null @@ -1,3 +0,0 @@ -// UK lang variables
-
-tinyMCELang['lang_save_desc'] = 'Opslaan';
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/pl.js b/wp-inst/wp-includes/js/tinymce/plugins/save/langs/pl.js deleted file mode 100644 index 1fdf446..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/pl.js +++ /dev/null @@ -1,4 +0,0 @@ -// PL lang variables
-
-
-tinyMCELang['lang_save_desc'] = 'Zachowaj';
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/pt_br.js b/wp-inst/wp-includes/js/tinymce/plugins/save/langs/pt_br.js deleted file mode 100644 index b7d6ddc..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/pt_br.js +++ /dev/null @@ -1,3 +0,0 @@ -// pt_BR lang variables
-
-tinyMCELang['lang_save_desc'] = 'Salvar';
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/zh_cn.js b/wp-inst/wp-includes/js/tinymce/plugins/save/langs/zh_cn.js deleted file mode 100644 index 47d716d..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/save/langs/zh_cn.js +++ /dev/null @@ -1,4 +0,0 @@ -// Simplified Chinese lang variables contributed by cube316 (cube316@gmail.com)
-//Çë·ÃÎÊ http://www.cube316.net/ ÒÔ»ñÈ¡TinyMCEµÄÖÐÎÄÖ§³Ö
-
-tinyMCELang['lang_save_desc'] = '±£´æ';
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/plugins/save/readme.txt b/wp-inst/wp-includes/js/tinymce/plugins/save/readme.txt deleted file mode 100644 index 4fdb78a..0000000 --- a/wp-inst/wp-includes/js/tinymce/plugins/save/readme.txt +++ /dev/null @@ -1 +0,0 @@ -Check the TinyMCE documentation for details on this plugin.
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/about.htm b/wp-inst/wp-includes/js/tinymce/themes/advanced/about.htm new file mode 100644 index 0000000..ec5c8cf --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/about.htm @@ -0,0 +1,52 @@ +<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{$lang_about_title}</title>
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script language="javascript" type="text/javascript" src="jscripts/about.js"></script>
+ <link href="css/dialog_about.css" rel="stylesheet" type="text/css" />
+</head>
+<body id="about" onload="init();" style="display: none">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_about}</a></span></li>
+ <li id="help_tab"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{$lang_help}</a></span></li>
+ <li id="plugins_tab"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{$lang_plugins}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <h3>{$lang_about_title}</h3>
+ <p>Version: {$tinymce_version} ({$tinymce_releasedate})</p>
+ <p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
+ by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
+ <p>Copyright © 2005, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
+ <p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
+
+ <div id="buttoncontainer"></div>
+ </div>
+
+ <div id="plugins_panel" class="panel">
+ <div id="pluginscontainer">
+ <h3>{$lang_loaded_plugins}</h3>
+
+ <div id="plugintablecontainer">
+ </div>
+
+ <p> </p>
+ </div>
+ </div>
+
+ <div id="help_panel" class="panel noscroll" style="overflow: visible;">
+ <div id="iframecontainer"></div>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <div style="float: right">
+ <input type="button" id="cancel" name="cancel" value="{$lang_close}" onclick="tinyMCEPopup.close();" />
+ </div>
+ </div>
+</body>
+</html>
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/anchor.htm b/wp-inst/wp-includes/js/tinymce/themes/advanced/anchor.htm new file mode 100644 index 0000000..1b90fe9 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/anchor.htm @@ -0,0 +1,32 @@ +<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{$lang_insert_anchor_title}</title>
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script language="javascript" type="text/javascript" src="jscripts/anchor.js"></script>
+</head>
+<body onload="init();" style="display: none">
+<form onsubmit="insertAnchor();return false;" action="#">
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td colspan="2" class="title">{$lang_insert_anchor_title}</td>
+ </tr>
+ <tr>
+ <td nowrap="nowrap">{$lang_insert_anchor_name}:</td>
+ <td><input name="anchorName" type="text" id="anchorName" value="" style="width: 200px" /></td>
+ </tr>
+ </table>
+
+ <div class="mceActionPanel">
+ <div style="float: left">
+ <input type="button" id="insert" name="insert" value="{$lang_update}" onclick="insertAnchor();" />
+ </div>
+
+ <div style="float: right">
+ <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+ </div>
+
+</form>
+</body>
+</html>
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/charmap.htm b/wp-inst/wp-includes/js/tinymce/themes/advanced/charmap.htm new file mode 100644 index 0000000..da947ee --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/charmap.htm @@ -0,0 +1,52 @@ +<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{$lang_theme_charmap_title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script language="javascript" type="text/javascript" src="jscripts/charmap.js"></script>
+</head>
+<body onload="init();" style="display: none">
+<table align="center" border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td colspan="2" class="title">{$lang_theme_charmap_title}</td>
+ </tr>
+ <tr>
+ <td rowspan="2" align="left" valign="top">
+ <script language="javascript" type="text/javascript">renderCharMapHTML();</script>
+ </td>
+ <td width="100" align="center" valign="top">
+ <table border="0" cellpadding="0" cellspacing="0" width="100" style="height: 100px">
+ <tr>
+ <td class="charmapOver" style="font-size: 40px; height:80px;" id="codeV"> </td>
+ </tr>
+ <tr>
+ <td style="font-size: 10px; font-family: Arial, Helvetica, sans-serif; text-align:center;" id="codeN"> </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td valign="bottom" style="padding-bottom: 3px;">
+ <table width="100" align="center" border="0" cellpadding="2" cellspacing="0">
+ <tr>
+ <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;">HTML-Code</td>
+ </tr>
+ <tr>
+ <td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeA" align="center"> </td>
+ </tr>
+ <tr>
+ <td style="font-size: 1px;"> </td>
+ </tr>
+ <tr>
+ <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;">NUM-Code</td>
+ </tr>
+ <tr>
+ <td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeB" align="center"> </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/color_picker.htm b/wp-inst/wp-includes/js/tinymce/themes/advanced/color_picker.htm new file mode 100644 index 0000000..24e73df --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/color_picker.htm @@ -0,0 +1,12 @@ +<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{$lang_theme_colorpicker_title}</title>
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script language="javascript" type="text/javascript" src="jscripts/color_picker.js"></script>
+</head>
+<body onload="init();" marginheight="3" topmargin="3" leftmargin="3" marginwidth="3" style="display: none">
+ <div align="center">
+ <script language="javascript" type="text/javascript">renderColorMap();</script>
+ </div>
+</body>
+</html>
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/css/editor_content.css b/wp-inst/wp-includes/js/tinymce/themes/advanced/css/editor_content.css new file mode 100644 index 0000000..b1e8c5e --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/css/editor_content.css @@ -0,0 +1,49 @@ +/* This file contains the CSS data for the editable area(iframe) of TinyMCE */
+/* You can extend this CSS by adding your own CSS file with the the content_css option */
+
+body {
+ background-color: #fff;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 130%;
+ padding: 1em;
+}
+
+td {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+}
+
+pre {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+}
+
+.mceVisualAid {
+ border: 1px dashed #BBBBBB !important;
+}
+
+.mceItemAnchor {
+ width: 12px;
+ line-height: 6px;
+ overflow: hidden;
+ padding-left: 12px;
+ background-image: url('../images/anchor_symbol.gif');
+ background-position: bottom;
+ background-repeat: no-repeat;
+}
+
+/* Important is needed in Gecko browsers inorder to style links */
+/*
+a {
+ color: green !important;
+}
+*/
+
+/* Style selection range colors in Gecko browsers */
+/*
+::-moz-selection {
+ background-color: red;
+ color: green;
+}
+*/
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/css/editor_popup.css b/wp-inst/wp-includes/js/tinymce/themes/advanced/css/editor_popup.css new file mode 100644 index 0000000..14f8322 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/css/editor_popup.css @@ -0,0 +1,319 @@ +/* This file contains the CSS data for all popups in TinyMCE */
+
+body {
+ background-color: #F0F0EE;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ scrollbar-3dlight-color: #F0F0EE;
+ scrollbar-arrow-color: #676662;
+ scrollbar-base-color: #F0F0EE;
+ scrollbar-darkshadow-color: #DDDDDD;
+ scrollbar-face-color: #E0E0DD;
+ scrollbar-highlight-color: #F0F0EE;
+ scrollbar-shadow-color: #F0F0EE;
+ scrollbar-track-color: #F5F5F5;
+ margin: 8px;
+}
+
+td {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 11px;
+}
+
+input {
+ background: #FFFFFF;
+ border: 1px solid #cccccc;
+}
+
+td, input, select, textarea {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+}
+
+input, select, textarea {
+ border: 1px solid #808080;
+}
+
+.input_noborder {
+ border: 0px solid #808080;
+}
+
+#insert {
+ font-weight: bold;
+ width: 90px;
+ height: 21px;
+ border: 0px;
+ background-image: url('../images/insert_button_bg.gif');
+ cursor: pointer;
+}
+
+#cancel {
+ font-weight: bold;
+ width: 90px;
+ height: 21px;
+ border: 0px;
+ background-image: url('../images/cancel_button_bg.gif');
+ cursor: pointer;
+}
+
+/* Mozilla only style */
+html>body #insert, html>body #cancel {
+ padding-bottom: 2px;
+}
+
+.title {
+ font-size: 12px;
+ font-weight: bold;
+ color: #2B6FB6;
+}
+
+table.charmap {
+ border-style: solid;
+ border-width: 1px;
+ border-color: #AAAAAA;
+}
+
+td.charmap, td.charmapOver {
+ color: #000000;
+ border-color: #AAAAAA;
+ border-style: solid;
+ border-width: 1px;
+ text-align: center;
+ font-size: 12px;
+}
+
+td.charmapOver {
+ background-color: #CCCCCC;
+ cursor: arrow;
+}
+
+a.charmap {
+ color: #000000;
+ text-decoration: none
+}
+
+.wordWrapCode {
+ vertical-align: middle;
+ border: 1px none #000000;
+ background-color: transparent;
+}
+
+input.radio {
+ border: 1px none #000000;
+ background-color: transparent;
+ vertical-align: middle;
+}
+
+input.checkbox {
+ border: 1px none #000000;
+ background-color: transparent;
+ vertical-align: middle;
+}
+
+.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected {
+ margin-left: 1px;
+}
+
+.mceButtonNormal {
+ border-top: 1px solid;
+ border-left: 1px solid;
+ border-bottom: 1px solid;
+ border-right: 1px solid;
+ border-color: #F0F0EE;
+ cursor: arrow;
+}
+
+.mceButtonOver {
+ border: 1px solid #0A246A;
+ cursor: arrow;
+ background-color: #B6BDD2;
+}
+
+.mceButtonDown {
+ cursor: arrow;
+ border: 1px solid #0A246A;
+ background-color: #8592B5;
+}
+
+.mceButtonDisabled {
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
+ -moz-opacity:0.3;
+ opacity: 0.3;
+ border-top: 1px solid;
+ border-left: 1px solid;
+ border-bottom: 1px solid;
+ border-right: 1px solid;
+ border-color: #F0F0EE;
+ cursor: arrow;
+}
+
+.mceActionPanel {
+ margin-top: 5px;
+}
+
+/* Tabs classes */
+
+.tabs {
+ float: left;
+ width: 100%;
+ line-height: normal;
+ background-image: url("../images/xp/tabs_bg.gif");
+}
+
+.tabs ul {
+ margin: 0;
+ padding: 0px 0px 0;
+ list-style: none;
+}
+
+.tabs li {
+ float: left;
+ background: url("../images/xp/tab_bg.gif") no-repeat left top;
+ margin: 0;
+ margin-left: 0px;
+ margin-right: 2px;
+ padding: 0 0 0 10px;
+ line-height: 18px;
+}
+
+.tabs li.current {
+ background: url("../images/xp/tab_sel_bg.gif") no-repeat left top;
+ margin-right: 2px;
+}
+
+.tabs span {
+ float: left;
+ display: block;
+ background: url("../images/xp/tab_end.gif") no-repeat right top;
+ padding: 0px 10px 0px 0px;
+}
+
+.tabs .current span {
+ background: url("../images/xp/tab_sel_end.gif") no-repeat right top;
+}
+
+.tabs a {
+ text-decoration: none;
+ font-family: Verdana, Arial;
+ font-size: 10px;
+}
+
+.tabs a:link, .tabs a:visited, .tabs a:hover {
+ color: black;
+}
+
+.tabs a:hover {
+}
+
+.tabs .current {
+}
+
+.tabs .current a, .tabs .current a:link, .tabs .current a:visited {
+}
+
+.panel_wrapper div.panel {
+ display: none;
+}
+
+.panel_wrapper div.current {
+ display: block;
+ width: 100%;
+ height: 300px;
+ overflow: visible; /* Should be auto but that breaks Safari */
+}
+
+.panel_wrapper {
+ border: 1px solid #919B9C;
+ border-top: 0px;
+ padding: 10px;
+ padding-top: 5px;
+ clear: both;
+ background-color: white;
+}
+
+fieldset {
+ border: 1px solid #919B9C;
+ font-family: Verdana, Arial;
+ font-size: 10px;
+ padding: 0px;
+ margin: 0px;
+ padding: 4px;
+}
+
+legend {
+ color: #2B6FB6;
+ font-weight: bold;
+}
+
+.properties {
+ width: 100%;
+}
+
+.properties .column1 {
+}
+
+.properties .column2 {
+ text-align: left;
+}
+
+a:link, a:visited {
+ color: black;
+}
+
+a:hover {
+ color: #2B6FB6;
+}
+
+#plugintable thead {
+ font-weight: bold;
+ background-color: #DDDDDD;
+}
+
+#plugintable, #about #plugintable td {
+ border: 1px solid #919B9C;
+}
+
+#plugintable {
+ width: 99%;
+ margin-top: 10px;
+}
+
+#pluginscontainer {
+ height: 290px;
+ overflow: auto;
+}
+
+/* MSIE Specific styles */
+
+* html .panel_wrapper {
+ width: 100%;
+}
+
+.column {
+ float: left;
+}
+
+h1, h2, h3, h4 {
+ color: #2B6FB6;
+ margin: 0px;
+ padding: 0px;
+ padding-top: 5px;
+}
+
+h3 {
+ font-size: 14px;
+}
+
+/* Disables the advanced tab in the table plugin. */
+/*
+#table #advanced_tab {
+ display: none;
+}
+*/
+
+/* Disables the border input field and label in the table plugin. */
+/*
+#table #border, #table #borderlabel {
+ display: none;
+}
+*/
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_ui.css b/wp-inst/wp-includes/js/tinymce/themes/advanced/css/editor_ui.css index 1bae700..a943499 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_ui.css +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/css/editor_ui.css @@ -1,174 +1,174 @@ -/* This file contains the CSS data for the editor UI of TinyMCE instances */ - -.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected { - margin-top: 1px; - margin-left: 1px; -} - -.mceButtonNormal { - border-top: 1px solid; - border-left: 1px solid; - border-bottom: 1px solid; - border-right: 1px solid; - border-color: #F0F0EE; - cursor: arrow; -} - -.mceButtonOver { - border: 1px solid #0A246A; - cursor: arrow; - background-color: #B6BDD2; -} - -.mceButtonDown { - cursor: arrow; - border: 1px solid #0A246A; - background-color: #8592B5; -} - -.mceButtonSelected { - border: 1px solid; - border-color: #C0C0BB; - cursor: arrow; -} - -.mceButtonDisabled { - filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); - -moz-opacity:0.3; - opacity: 0.3; - border-top: 1px solid; - border-left: 1px solid; - border-bottom: 1px solid; - border-right: 1px solid; - border-color: #F0F0EE; - cursor: arrow; -} - -.mceSeparator { - border-top: 1px solid buttonhighlight; - border-left: 1px solid buttonhighlight; - border-bottom: 1px solid buttonshadow; - border-right: 1px solid buttonshadow; - margin-right: 2px; - margin-left: 2px; -} - -.mceSeparatorLine { - margin:2px; - margin-left: 4px; - background-color: #F0F0EE; - border-top: 1px solid buttonshadow; - border-left: 1px solid buttonshadow; - border-bottom: 1px solid buttonhighlight; - border-right: 1px solid buttonhighlight; - width: 0px; - height: 15px; -} - -.mceSelectList { - font-family: "MS Sans Serif"; - font-size: 7pt; - font-weight: normal; - margin-top: 3px; - padding: 0px; - display: inline; - vertical-align: top; - background-color: #F0F0EE -} - -.mceLabel, .mceLabelDisabled { - font-family: "MS Sans Serif"; - font-size: 9pt; -} - -.mceLabel { - color: #000000; -} - -.mceLabelDisabled { - cursor: text; - color: #999999; -} - -.mceEditor { - background: #F0F0EE; - border: 1px solid #cccccc; - padding: 0px; - margin: 0px; -} - -.mceEditorArea { - font-family: "MS Sans Serif"; - background: #FFFFFF; - padding: 0px; - margin: 0px; -} - -.mceToolbarTop, .mceToolbarBottom { - background: #F0F0EE; -} - -.mceToolbarTop { - border-bottom: 1px solid #cccccc; -} - -.mceToolbarBottom { - border-top: 1px solid #cccccc; -} - -.mceStatusbarTop, .mceStatusbarBottom, .mceStatusbar { - height: 20px; -} - -.mceStatusbarTop .mceStatusbarPathText, .mceStatusbarBottom .mceStatusbarPathText, .mceStatusbar .mceStatusbarPathText { - font-family: "MS Sans Serif"; - font-size: 9pt; - padding: 2px; - line-height: 16px; - overflow: visible; -} - -.mceStatusbarTop { - border-bottom: 1px solid #cccccc; -} - -.mceStatusbarBottom { - border-top: 1px solid #cccccc; -} - -.mceStatusbar { - border-bottom: 1px solid #cccccc; -} - -.mcePathItem, .mcePathItem:link, .mcePathItem:visited, .mcePathItem:hover { - text-decoration: none; - font-family: "MS Sans Serif"; - font-size: 9pt; - color: #000000; -} - -.mcePathItem:hover { - text-decoration: underline; -} - -.mceStatusbarPathText { - float: left; -} - -.mceStatusbarResize { - float: right; - background-image: url('images/statusbar_resize.gif'); - background-repeat: no-repeat; - width: 11px; - height: 20px; - cursor: se-resize; -} - -.mceResizeBox { - width: 10px; - height: 10px; - display: none; - border: 1px dotted gray; - margin: 0px; - padding: 0px; -} +/* This file contains the CSS data for the editor UI of TinyMCE instances */
+
+.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected {
+ margin-top: 1px;
+ margin-left: 1px;
+}
+
+.mceButtonNormal {
+ border-top: 1px solid;
+ border-left: 1px solid;
+ border-bottom: 1px solid;
+ border-right: 1px solid;
+ border-color: #F0F0EE;
+ cursor: arrow;
+}
+
+.mceButtonOver {
+ border: 1px solid #0A246A;
+ cursor: arrow;
+ background-color: #B6BDD2;
+}
+
+.mceButtonDown {
+ cursor: arrow;
+ border: 1px solid #0A246A;
+ background-color: #8592B5;
+}
+
+.mceButtonSelected {
+ border: 1px solid;
+ border-color: #C0C0BB;
+ cursor: arrow;
+}
+
+.mceButtonDisabled {
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
+ -moz-opacity:0.3;
+ opacity: 0.3;
+ border-top: 1px solid;
+ border-left: 1px solid;
+ border-bottom: 1px solid;
+ border-right: 1px solid;
+ border-color: #F0F0EE;
+ cursor: arrow;
+}
+
+.mceSeparator {
+ border-top: 1px solid buttonhighlight;
+ border-left: 1px solid buttonhighlight;
+ border-bottom: 1px solid buttonshadow;
+ border-right: 1px solid buttonshadow;
+ margin-right: 2px;
+ margin-left: 2px;
+}
+
+.mceSeparatorLine {
+ margin:2px;
+ margin-left: 4px;
+ background-color: #F0F0EE;
+ border-top: 1px solid buttonshadow;
+ border-left: 1px solid buttonshadow;
+ border-bottom: 1px solid buttonhighlight;
+ border-right: 1px solid buttonhighlight;
+ width: 0px;
+ height: 15px;
+}
+
+.mceSelectList {
+ font-family: "MS Sans Serif";
+ font-size: 7pt;
+ font-weight: normal;
+ margin-top: 3px;
+ padding: 0px;
+ display: inline;
+ vertical-align: top;
+ background-color: #F0F0EE
+}
+
+.mceLabel, .mceLabelDisabled {
+ font-family: "MS Sans Serif";
+ font-size: 9pt;
+}
+
+.mceLabel {
+ color: #000000;
+}
+
+.mceLabelDisabled {
+ cursor: text;
+ color: #999999;
+}
+
+.mceEditor {
+ background: #F0F0EE;
+ border: 1px solid #cccccc;
+ padding: 0px;
+ margin: 0px;
+}
+
+.mceEditorArea {
+ font-family: "MS Sans Serif";
+ background: #FFFFFF;
+ padding: 0px;
+ margin: 0px;
+}
+
+.mceToolbarTop, .mceToolbarBottom {
+ background: #F0F0EE;
+}
+
+.mceToolbarTop {
+ border-bottom: 1px solid #cccccc;
+}
+
+.mceToolbarBottom {
+ border-top: 1px solid #cccccc;
+}
+
+.mceStatusbarTop, .mceStatusbarBottom, .mceStatusbar {
+ height: 20px;
+}
+
+.mceStatusbarTop .mceStatusbarPathText, .mceStatusbarBottom .mceStatusbarPathText, .mceStatusbar .mceStatusbarPathText {
+ font-family: "MS Sans Serif";
+ font-size: 9pt;
+ padding: 2px;
+ line-height: 16px;
+ overflow: visible;
+}
+
+.mceStatusbarTop {
+ border-bottom: 1px solid #cccccc;
+}
+
+.mceStatusbarBottom {
+ border-top: 1px solid #cccccc;
+}
+
+.mceStatusbar {
+ border-bottom: 1px solid #cccccc;
+}
+
+.mcePathItem, .mcePathItem:link, .mcePathItem:visited, .mcePathItem:hover {
+ text-decoration: none;
+ font-family: "MS Sans Serif";
+ font-size: 9pt;
+ color: #000000;
+}
+
+.mcePathItem:hover {
+ text-decoration: underline;
+}
+
+.mceStatusbarPathText {
+ float: left;
+}
+
+.mceStatusbarResize {
+ float: right;
+ background-image: url('../images/statusbar_resize.gif');
+ background-repeat: no-repeat;
+ width: 11px;
+ height: 20px;
+ cursor: se-resize;
+}
+
+.mceResizeBox {
+ width: 10px;
+ height: 10px;
+ display: none;
+ border: 1px dotted gray;
+ margin: 0px;
+ padding: 0px;
+}
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/about.htm b/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/about.htm deleted file mode 100644 index 984a990..0000000 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/about.htm +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-<TITLE>About TinyMCE</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-
-<BODY>
-
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">About TinyMCE</span></td>
- <td align="right"><a href="index.htm">TOC</a></td>
- </tr>
-</table>
-<hr noshade>
-<br>
-TinyMCE is a small WYSIWYG editor control for web browsers such as MSIE or Mozilla
-that enables you to edit HTML contents in a more user friendly way. It has common
-features that are found in most word processors and should not be difficult to
-use.<br>
-<br>
-<hr noshade>
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
- <tr>
- <td>Go to: <a href="index.htm">Table of contents</a></td>
- <td align="right"><a href="#">Top</a></td>
- </tr>
-</table>
-<br>
-</BODY>
-</HTML>
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/common_buttons.htm b/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/common_buttons.htm deleted file mode 100644 index c63d7dc..0000000 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/common_buttons.htm +++ /dev/null @@ -1,163 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-<TITLE>Common buttons</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-
-<BODY>
-
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">Common buttons</span></td>
- <td align="right"><a href="index.htm">TOC</a></td>
- </tr>
-</table>
-<hr noshade>
-<br>
-Below is a short description about each button.<img src="../../images/spacer.gif" width="1" height="1">
-<br>
-<br>
-<table border="1" cellpadding="3" cellspacing="0">
- <tr>
- <td><img src="../../images/bold.gif" width="20" height="20"></td>
- <td>Bold text style.</td>
- </tr>
- <tr>
- <td><img src="../../images/italic.gif" width="20" height="20"></td>
- <td>Italic text style.</td>
- </tr>
- <tr>
- <td><img src="../../images/underline.gif" width="20" height="20"></td>
- <td>Underline text style.</td>
- </tr>
- <tr>
- <td><img src="../../images/strikethrough.gif" width="20" height="20"></td>
- <td>Strikethrough text style.</td>
- </tr>
- <tr>
- <td><img src="../../images/left.gif" width="20" height="20"></td>
- <td>Align left.</td>
- </tr>
- <tr>
- <td><img src="../../images/center.gif" width="20" height="20"></td>
- <td>Align center.</td>
- </tr>
- <tr>
- <td><img src="../../images/right.gif" width="20" height="20"></td>
- <td>Align right.</td>
- </tr>
- <tr>
- <td><img src="../../images/full.gif" width="20" height="20"></td>
- <td>Align full.</td>
- </tr>
- <tr>
- <td><img src="../../images/bullist.gif" width="20" height="20"></td>
- <td>Unordered list/bullet list.</td>
- </tr>
- <tr>
- <td><img src="../../images/numlist.gif" width="20" height="20"></td>
- <td>Ordered list/numbered list</td>
- </tr>
- <tr>
- <td><img src="../../images/outdent.gif" width="20" height="20"></td>
- <td>Outdent/decrease indentation.</td>
- </tr>
- <tr>
- <td><img src="../../images/indent.gif" width="20" height="20"></td>
- <td>Indent/incread indentation.</td>
- </tr>
- <tr>
- <td><img src="../../images/undo.gif" width="20" height="20"></td>
- <td>Undo the last operation.</td>
- </tr>
- <tr>
- <td><img src="../../images/redo.gif" width="20" height="20"></td>
- <td>Redo the last operation.</td>
- </tr>
- <tr>
- <td><img src="../../images/link.gif" width="20" height="20"></td>
- <td>Insert a new link, read more about this function in the <a href="insert_link_button.htm">Insert
- link section</a>.</td>
- </tr>
- <tr>
- <td><img src="../../images/unlink.gif" width="20" height="20"></td>
- <td>Unlinks the current selection/removes all selected links.</td>
- </tr>
- <tr>
- <td><img src="../../images/anchor.gif" width="20" height="20"></td>
- <td>Insert a new anchor, read more about this function in the <a href="insert_anchor_button.htm">Insert anchor section.</a></td>
- </tr>
- <tr>
- <td><img src="../../images/image.gif" width="20" height="20"></td>
- <td>Insert a new image, read more about this function in the <a href="insert_image_button.htm">Insert
- image section</a>.</td>
- </tr>
- <tr>
- <td><img src="../../images/cleanup.gif" width="20" height="20"></td>
- <td>Cleanup code/Removes unwanted formating. This function is useful when
- you copy contents from for example a office product.</td>
- </tr>
- <tr>
- <td><img src="../../images/help.gif" width="20" height="20"></td>
- <td>Shows this help window.</td>
- </tr>
- <tr>
- <td><img src="../../images/code.gif" width="20" height="20"></td>
- <td>Opens HTML source code editor. </td>
- </tr>
- <tr>
- <td><img src="../images/table.gif" width="20" height="20"></td>
- <td>Inserts a new 2x2 table at the current location. </td>
- </tr>
- <tr>
- <td><img src="../images/table_insert_row_before.gif" width="20" height="20"></td>
- <td>Adds a row above the current one. </td>
- </tr>
- <tr>
- <td><img src="../images/table_insert_row_after.gif" width="20" height="20"></td>
- <td>Adds a row under the current one. </td>
- </tr>
- <tr>
- <td><img src="../images/table_delete_row.gif" width="20" height="20"></td>
- <td>Removes the row. </td>
- </tr>
- <tr>
- <td><img src="../images/table_insert_col_before.gif" width="20" height="20"></td>
- <td>Adds a column before the current one.</td>
- </tr>
- <tr>
- <td><img src="../images/table_insert_col_after.gif" width="20" height="20"></td>
- <td>Adds a column after the current one.</td>
- </tr>
- <tr>
- <td><img src="../images/table_delete_col.gif" width="20" height="20"></td>
- <td>Removes the current column.</td>
- </tr>
- <tr>
- <td><img src="../../images/hr.gif" width="20" height="20"></td>
- <td>Inserts a new horizontal ruler </td>
- </tr>
- <tr>
- <td><img src="../../images/removeformat.gif" width="20" height="20"></td>
- <td>Removes formatting from the selection. </td>
- </tr>
- <tr>
- <td><img src="../../images/sub.gif" width="20" height="20"></td>
- <td>Makes the selection to be subscript. </td>
- </tr>
- <tr>
- <td><img src="../../images/sup.gif" width="20" height="20"></td>
- <td>Makes the selection to be superscripted. </td>
- </tr>
-</table>
-<br>
-<hr noshade>
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
- <tr>
- <td>Go to: <a href="index.htm">Table of contents</a></td>
- <td align="right"><a href="#">Top</a></td>
- </tr>
-</table>
-</BODY>
-</HTML>
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/images/insert_anchor_window.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/images/insert_anchor_window.gif Binary files differdeleted file mode 100644 index 5b5f528..0000000 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/images/insert_anchor_window.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/images/insert_image_window.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/images/insert_image_window.gif Binary files differdeleted file mode 100644 index cdc617e..0000000 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/images/insert_image_window.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/images/insert_link_window.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/images/insert_link_window.gif Binary files differdeleted file mode 100644 index 7bad758..0000000 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/images/insert_link_window.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/images/insert_table_window.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/images/insert_table_window.gif Binary files differdeleted file mode 100644 index 6a032c5..0000000 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/images/insert_table_window.gif +++ /dev/null diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/index.htm b/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/index.htm deleted file mode 100644 index 0b0526a..0000000 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/index.htm +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-<TITLE>Help Index</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-<BODY onload="window.focus();">
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">Table of contents</span></td>
- <td align="right"> </td>
- </tr>
-</table>
-<hr noshade>
-<br>
-Click the links below to go to the different help sections.
-<ul class="toc_ul">
- <li class="toc_li"><a href="about.htm">About TinyMCE</a></li>
- <li class="toc_li"><a href="common_buttons.htm">Common buttons</a></li>
- <li class="toc_li"><a href="insert_image_button.htm">Insert image button</a></li>
- <li class="toc_li"><a href="insert_link_button.htm">Insert link button</a></li>
- <li class="toc_li"><a href="insert_anchor_button.htm">Insert anchor button</a></li>
- <li class="toc_li"><a href="insert_table_button.htm">Insert table button</a></li>
-</ul>
-<hr noshade>
-</BODY>
-</HTML>
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/insert_anchor_button.htm b/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/insert_anchor_button.htm deleted file mode 100644 index e1118a2..0000000 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/insert_anchor_button.htm +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-<TITLE>Insert anchor button</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-
-<BODY>
-
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">Insert anchor button</span></td>
- <td align="right"><a href="index.htm">TOC</a></td>
- </tr>
-</table>
-<hr noshade>
-<br>
-This button opens a new window with the insert/edit anchor function.<br>
-<br>
-<img src="images/insert_anchor_window.gif" width="330" height="139"><br>
-<br>
-There are one field in this window, this is where you enter the name of you anchor point. Remember the anchor name needs to be unique. <br>
-<br>
-<hr noshade>
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
- <tr>
- <td>Go to: <a href="index.htm">Table of contents</a></td>
- <td align="right"><a href="#">Top</a></td>
- </tr>
-</table>
-<br>
-</BODY>
-</HTML>
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/insert_image_button.htm b/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/insert_image_button.htm deleted file mode 100644 index e101fff..0000000 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/insert_image_button.htm +++ /dev/null @@ -1,66 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-<TITLE>Insert image button</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-
-<BODY>
-
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">Insert image button</span></td>
- <td align="right"><a href="index.htm">TOC</a></td>
- </tr>
-</table>
-<hr noshade>
-<br>
-The insert image button opens the window shown below.<br>
-<br>
-<img src="images/insert_image_window.gif"><br>
-<br>
-You simply enter a URL to the image you want to link to and enter a image description,
-this is then displayed as an alternative text descripton of the image on the page.<br>
-<br>
-<strong>Field descriptions:</strong><br>
-<table border="1" cellspacing="0">
- <tr>
- <td width="150"><strong>Image URL </strong></td>
- <td>URL/path to the image.</td>
- </tr>
- <tr>
- <td width="150"><strong>Image description </strong></td>
- <td>Alternative description of image contents.</td>
- </tr>
- <tr>
- <td><strong>Dimentions</strong></td>
- <td>Image width/height. </td>
- </tr>
- <tr>
- <td><strong>Alignment</strong></td>
- <td>Image alignment, useful when wrapping text around images.</td>
- </tr>
- <tr>
- <td><strong>Border</strong></td>
- <td>Border thickness. </td>
- </tr>
- <tr>
- <td><strong>VSpace</strong></td>
- <td>Vertical space, useful when wrapping text around images.</td>
- </tr>
- <tr>
- <td><strong>HSpace</strong></td>
- <td>Horizontal space, useful when wrapping text around images.</td>
- </tr>
-</table>
-<br>
-<hr noshade>
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
- <tr>
- <td>Go to: <a href="index.htm">Table of contents</a></td>
- <td align="right"><a href="#">Top</a></td>
- </tr>
-</table>
-<br>
-</BODY>
-</HTML>
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/insert_link_button.htm b/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/insert_link_button.htm deleted file mode 100644 index ddfeb3a..0000000 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/insert_link_button.htm +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-<TITLE>Insert link button</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-
-<BODY>
-
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">Insert link button</span></td>
- <td align="right"><a href="index.htm">TOC</a></td>
- </tr>
-</table>
-<hr noshade>
-<br>
-This button opens a new window with the insert/edit link function.<br>
-<br>
-<img src="images/insert_link_window.gif" width="330" height="159"><br>
-<br>
-There are two fields in this window the first one "Link URL" is the
-URL of the link. The target enables you to select how the link is to be opened.<br>
-<br>
-<hr noshade>
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
- <tr>
- <td>Go to: <a href="index.htm">Table of contents</a></td>
- <td align="right"><a href="#">Top</a></td>
- </tr>
-</table>
-<br>
-</BODY>
-</HTML>
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/insert_table_button.htm b/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/insert_table_button.htm deleted file mode 100644 index d3bd196..0000000 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/insert_table_button.htm +++ /dev/null @@ -1,72 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-<TITLE>Insert table button</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-
-<BODY>
-
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">Insert table button</span></td>
- <td align="right"><a href="index.htm">TOC</a></td>
- </tr>
-</table>
-<hr noshade>
-<br>
-The insert table button opens the window shown below. This action enables you to create tables. <br>
-<br>
-<img src="images/insert_table_window.gif" width="340" height="229"><br>
-<br>
-<strong>Field descriptions:</strong><br>
-<table border="1" cellspacing="0">
- <tr>
- <td width="150"><strong>Columns</strong></td>
- <td>Number of columns in the table. </td>
- </tr>
- <tr>
- <td width="150"><strong>Rows</strong></td>
- <td>Number of rows in the new table.</td>
- </tr>
- <tr>
- <td><strong>Cellpadding</strong></td>
- <td>Cellpadding of the table . </td>
- </tr>
- <tr>
- <td><strong>Cellspacing</strong></td>
- <td>Cellspacing of the table .</td>
- </tr>
- <tr>
- <td><strong>Alignment</strong></td>
- <td>Table alignment . </td>
- </tr>
- <tr>
- <td><strong>Border</strong></td>
- <td>Border thinkness of table.</td>
- </tr>
- <tr>
- <td><strong>Width</strong></td>
- <td>Width in pixels of table .</td>
- </tr>
- <tr>
- <td><strong>Height</strong></td>
- <td>Height in pixels of table.</td>
- </tr>
- <tr>
- <td><strong>Class</strong></td>
- <td>Style or CSS class of table.</td>
- </tr>
-</table>
-<br>
-<br>
-<hr noshade>
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
- <tr>
- <td>Go to: <a href="index.htm">Table of contents</a></td>
- <td align="right"><a href="#">Top</a></td>
- </tr>
-</table>
-<br>
-</BODY>
-</HTML>
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/style.css b/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/style.css deleted file mode 100644 index 722f537..0000000 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/docs/en/style.css +++ /dev/null @@ -1,28 +0,0 @@ -body { background-color: #FFFFFF; }
-body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 12px; }
-.title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; }
-.subtitle { font-size: 12px; font-weight: bold; }
-
-.toc_ul, .toc_li { margin-left: 8 px; line-height: 16px; }
-.step_ol, .step_li { margin-left: 11 px; line-height: 16px; }
-img { border: #000000 solid 1px; }
-
-a:visited { color: #666666; text-decoration: underline; }
-a:active { color: #666666; text-decoration: underline; }
-a:hover { color: #666666; text-decoration: underline; }
-a { color: #666666; text-decoration: underline; }
-
-.pageheader { border: #E0E0E0 solid 1px; }
-.pagefooter { border: #E0E0E0 solid 1px; }
-.sample { background-color: #FFFFFF; border: #000000 solid 1px; }
-.samplecontent { font-size: 10px; }
-
-.code { background-color: #FFFFFF; border: #000000 solid 1px; }
-.codecontent { font-size: 10px; }
-.codecontent a:visited { color: #666666; text-decoration: none; font-weight: bold }
-.codecontent a:active { color: #666666; text-decoration: none; font-weight: bold }
-.codecontent a:hover { color: #666666; text-decoration: none; font-weight: bold }
-.codecontent a { color: #666666; text-decoration: none; font-weight: bold }
-
-hr { height: 1px; }
-
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_content.css b/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_content.css deleted file mode 100644 index 004e989..0000000 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_content.css +++ /dev/null @@ -1,19 +0,0 @@ -body { - padding: .5em; - background: #fff; - color: #000; - font: 13px Verdana, Arial, Helvetica, sans-serif; - line-height: 130%; - scrollbar-3dlight-color: #F0F0EE; - scrollbar-arrow-color: #676662; - scrollbar-base-color: #F0F0EE; - scrollbar-darkshadow-color: #DDDDDD; - scrollbar-face-color: #E0E0DD; - scrollbar-highlight-color: #F0F0EE; - scrollbar-shadow-color: #F0F0EE; - scrollbar-track-color: #F5F5F5; -} - -.mceVisualAid { - border: 1px dashed #bbb; -} diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_popup.css b/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_popup.css deleted file mode 100644 index 1e8e660..0000000 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_popup.css +++ /dev/null @@ -1,108 +0,0 @@ -body, td { - background-color: #F0F0EE; - font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana; - margin: 1em; -} - - -input { - background: #FFFFFF; - border: 1px solid #cccccc; -} - -input, select, textarea { - border: 1px solid #808080; -} - -.input_noborder { - border: 0px solid #808080; -} - -#insert { - font-weight: bold; -} - -#cancel { - font-weight: bold; -} - -#cancel:hover { - background-color: #c00; -} - -.title { - font-size: 12px; - font-weight: bold; -} - -table.charmap { - border-style: solid; - border-width: 1px; - border-color: #AAAAAA; -} - -td.charmap, td.charmapOver { - color: #000000; - border-color: #AAAAAA; - border-style: solid; - border-width: 1px; - text-align: center; - font-size: 12px; -} - -td.charmapOver { - background-color: #CCCCCC; - cursor: arrow; -} - -a.charmap { - color: #000000; - text-decoration: none -} - -.wordWrapCode { - vertical-align: middle; - border: 1px none #000000; - background-color: transparent; -} - -input.radio { - border: 1px none #000000; - background-color: transparent; - vertical-align: middle; -} - -input.checkbox { - border: 1px none #000000; - background-color: transparent; - vertical-align: middle; -} - -.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected { - margin-left: 1px; -} - -.mceButtonNormal { - border-top: 1px solid; - border-left: 1px solid; - border-bottom: 1px solid; - border-right: 1px solid; - border-color: #F0F0EE; - cursor: arrow; -} - -.mceButtonOver { - border: 1px solid #0A246A; - cursor: arrow; - background-color: #B6BDD2; -} - -.mceButtonDown { - cursor: arrow; - border: 1px solid #0A246A; - background-color: #8592B5; -} - -legend { - font-weight: bold; -} diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_template.js b/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_template.js index 40a4cc2..7861793 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_template.js +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_template.js @@ -1,25 +1,6 @@ /* Import theme specific language pack */ - tinyMCE.importThemeLanguagePack('advanced');var TinyMCE_advanced_autoImportCSSClasses=true;var TinyMCE_advanced_foreColor="#000000";var TinyMCE_advanced_resizer=new Object();var TinyMCE_advanced_buttons=[['bold','{$lang_bold_img}','{$lang_bold_desc}','Bold'],['italic','{$lang_italic_img}','{$lang_italic_desc}','Italic'],['underline','{$lang_underline_img}','{$lang_underline_desc}','Underline'],['strikethrough','strikethrough.gif','{$lang_striketrough_desc}','Strikethrough'],['justifyleft','left.gif','{$lang_justifyleft_desc}','JustifyLeft'],['justifycenter','center.gif','{$lang_justifycenter_desc}','JustifyCenter'],['justifyright','right.gif','{$lang_justifyright_desc}','JustifyRight'],['justifyfull','full.gif','{$lang_justifyfull_desc}','JustifyFull'],['bullist','bullist.gif','{$lang_bullist_desc}','InsertUnorderedList'],['numlist','numlist.gif','{$lang_numlist_desc}','InsertOrderedList'],['outdent','outdent.gif','{$lang_outdent_desc}','Outdent'],['indent','indent.gif','{$lang_indent_desc}','Indent'],['cut','cut.gif','{$lang_cut_desc}','Cut'],['copy','copy.gif','{$lang_copy_desc}','Copy'],['paste','paste.gif','{$lang_paste_desc}','Paste'],['undo','undo.gif','{$lang_undo_desc}','Undo'],['redo','redo.gif','{$lang_redo_desc}','Redo'],['link','link.gif','{$lang_link_desc}','mceLink',true],['unlink','unlink.gif','{$lang_unlink_desc}','unlink'],['image','image.gif','{$lang_image_desc}','mceImage',true],['cleanup','cleanup.gif','{$lang_cleanup_desc}','mceCleanup'],['help','help.gif','{$lang_help_desc}','mceHelp'],['code','code.gif','{$lang_theme_code_desc}','mceCodeEditor'],['hr','hr.gif','{$lang_theme_hr_desc}','inserthorizontalrule'],['removeformat','removeformat.gif','{$lang_theme_removeformat_desc}','removeformat'],['sub','sub.gif','{$lang_theme_sub_desc}','subscript'],['sup','sup.gif','{$lang_theme_sup_desc}','superscript'],['forecolor','forecolor.gif','{$lang_theme_forecolor_desc}','mceForeColor',true],['backcolor','backcolor.gif','{$lang_theme_backcolor_desc}','mceBackColor',true],['charmap','charmap.gif','{$lang_theme_charmap_desc}','mceCharMap'],['visualaid','visualaid.gif','{$lang_theme_visualaid_desc}','mceToggleVisualAid'],['anchor','anchor.gif','{$lang_theme_anchor_desc}','mceInsertAnchor'],['newdocument','newdocument.gif','{$lang_newdocument_desc}','mceNewDocument']];function TinyMCE_advanced_getControlHTML(button_name){var buttonTileMap=new Array('anchor.gif','backcolor.gif','bullist.gif','center.gif','charmap.gif','cleanup.gif','code.gif','copy.gif','custom_1.gif','cut.gif','forecolor.gif','full.gif','help.gif','hr.gif','image.gif','indent.gif','left.gif','link.gif','numlist.gif','outdent.gif','paste.gif','redo.gif','removeformat.gif','right.gif','strikethrough.gif','sub.gif','sup.gif','undo.gif','unlink.gif','visualaid.gif');for(var i=0;i<TinyMCE_advanced_buttons.length;i++){var but=TinyMCE_advanced_buttons[i];if(but[0]==button_name){if(tinyMCE.settings['button_tile_map']){for(var x=0;!tinyMCE.isMSIE&&x<buttonTileMap.length;x++){if(buttonTileMap[x]==but[1]){return '<img id="{$editor_id}_'+but[0]+'" src="{$themeurl}/images/spacer.gif" style="background-image:url({$themeurl}/images/buttons.gif); background-position: '+(0-(x*20))+'px 0px" title="'+but[2]+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\''+but[3]+'\', '+(but.length>4?but[4]:false)+(but.length>5?', \''+but[5]+'\'':'')+')">';}}}return '<img id="{$editor_id}_'+but[0]+'" src="{$themeurl}/images/'+but[1]+'" title="'+but[2]+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\''+but[3]+'\', '+(but.length>4?but[4]:false)+(but.length>5?', \''+but[5]+'\'':'')+')">';}}switch(button_name){case "formatselect":var html='<select id="{$editor_id}_formatSelect" name="{$editor_id}_formatSelect" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FormatBlock\',false,this.options[this.selectedIndex].value);" class="mceSelectList">';var formats=tinyMCE.getParam("theme_advanced_blockformats","p,address,pre,h1,h2,h3,h4,h5,h6",true).split(',');var lookup=[['p','{$lang_theme_paragraph}'],['address','{$lang_theme_address}'],['pre','{$lang_theme_pre}'],['h1','{$lang_theme_h1}'],['h2','{$lang_theme_h2}'],['h3','{$lang_theme_h3}'],['h4','{$lang_theme_h4}'],['h5','{$lang_theme_h5}'],['h6','{$lang_theme_h6}']];html+='<option value="">{$lang_theme_block}</option>';for(var i=0;i<formats.length;i++){for(var x=0;x<lookup.length;x++){if(formats[i]==lookup[x][0]){html+='<option value="<'+lookup[x][0]+'>">'+lookup[x][1]+'</option>';}}}html+='</select>';return html;case "styleselect":return '<select id="{$editor_id}_styleSelect" onmousedown="TinyMCE_advanced_setupCSSClasses(\'{$editor_id}\');" name="{$editor_id}_styleSelect" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSetCSSClass\',false,this.options[this.selectedIndex].value);" class="mceSelectList">{$style_select_options}</select>';case "fontselect":return '<select id="{$editor_id}_fontNameSelect" name="{$editor_id}_fontNameSelect" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontName\',false,this.options[this.selectedIndex].value);" class="mceSelectList">\ - <option value="">{$lang_theme_fontdefault}</option>\ - <option value="andale mono,times">Andale Mono</option>\ - <option value="arial,helvetica,sans-serif">Arial</option>\ - <option value="arial black,avant garde">Arial Black</option>\ - <option value="book antiqua,palatino">Book Antiqua</option>\ - <option value="comic sans ms,sand">Comic Sans MS</option>\ - <option value="courier new,courier">Courier New</option>\ - <option value="georgia,palatino">Georgia</option>\ - <option value="helvetica">Helvetica</option>\ - <option value="impact,chicago">Impact</option>\ - <option value="symbol">Symbol</option>\ - <option value="tahoma,arial,helvetica,sans-serif">Tahoma</option>\ - <option value="terminal,monaco">Terminal</option>\ - <option value="times new roman,times">Times New Roman</option>\ - <option value="trebuchet ms,geneva">Trebuchet MS</option>\ - <option value="verdana,geneva">Verdana</option>\ - <option value="webdings">Webdings</option>\ - <option value="wingdings,zapf dingbats">Wingdings</option>\ - </select>';case "fontsizeselect":return '<select id="{$editor_id}_fontSizeSelect" name="{$editor_id}_fontSizeSelect" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontSize\',false,this.options[this.selectedIndex].value);" class="mceSelectList">\ - <option value="0">-- {$lang_theme_font_size} --</option>\ + tinyMCE.importThemeLanguagePack('advanced');var TinyMCE_advanced_autoImportCSSClasses=true;var TinyMCE_advanced_resizer=new Object();var TinyMCE_advanced_buttons=[['bold','{$lang_bold_img}','{$lang_bold_desc}','Bold'],['italic','{$lang_italic_img}','{$lang_italic_desc}','Italic'],['underline','{$lang_underline_img}','{$lang_underline_desc}','Underline'],['strikethrough','strikethrough.gif','{$lang_striketrough_desc}','Strikethrough'],['justifyleft','left.gif','{$lang_justifyleft_desc}','JustifyLeft'],['justifycenter','center.gif','{$lang_justifycenter_desc}','JustifyCenter'],['justifyright','right.gif','{$lang_justifyright_desc}','JustifyRight'],['justifyfull','full.gif','{$lang_justifyfull_desc}','JustifyFull'],['bullist','bullist.gif','{$lang_bullist_desc}','InsertUnorderedList'],['numlist','numlist.gif','{$lang_numlist_desc}','InsertOrderedList'],['outdent','outdent.gif','{$lang_outdent_desc}','Outdent'],['indent','indent.gif','{$lang_indent_desc}','Indent'],['cut','cut.gif','{$lang_cut_desc}','Cut'],['copy','copy.gif','{$lang_copy_desc}','Copy'],['paste','paste.gif','{$lang_paste_desc}','Paste'],['undo','undo.gif','{$lang_undo_desc}','Undo'],['redo','redo.gif','{$lang_redo_desc}','Redo'],['link','link.gif','{$lang_link_desc}','mceLink',true],['unlink','unlink.gif','{$lang_unlink_desc}','unlink'],['image','image.gif','{$lang_image_desc}','mceImage',true],['cleanup','cleanup.gif','{$lang_cleanup_desc}','mceCleanup'],['help','help.gif','{$lang_help_desc}','mceHelp'],['code','code.gif','{$lang_theme_code_desc}','mceCodeEditor'],['hr','hr.gif','{$lang_theme_hr_desc}','inserthorizontalrule'],['removeformat','removeformat.gif','{$lang_theme_removeformat_desc}','removeformat'],['sub','sub.gif','{$lang_theme_sub_desc}','subscript'],['sup','sup.gif','{$lang_theme_sup_desc}','superscript'],['forecolor','forecolor.gif','{$lang_theme_forecolor_desc}','mceForeColor',true],['backcolor','backcolor.gif','{$lang_theme_backcolor_desc}','mceBackColor',true],['charmap','charmap.gif','{$lang_theme_charmap_desc}','mceCharMap'],['visualaid','visualaid.gif','{$lang_theme_visualaid_desc}','mceToggleVisualAid'],['anchor','anchor.gif','{$lang_theme_anchor_desc}','mceInsertAnchor'],['newdocument','newdocument.gif','{$lang_newdocument_desc}','mceNewDocument']];function TinyMCE_advanced_getControlHTML(button_name){var buttonTileMap=new Array('anchor.gif','backcolor.gif','bullist.gif','center.gif','charmap.gif','cleanup.gif','code.gif','copy.gif','custom_1.gif','cut.gif','forecolor.gif','full.gif','help.gif','hr.gif','image.gif','indent.gif','left.gif','link.gif','numlist.gif','outdent.gif','paste.gif','redo.gif','removeformat.gif','right.gif','strikethrough.gif','sub.gif','sup.gif','undo.gif','unlink.gif','visualaid.gif');for(var i=0;i<TinyMCE_advanced_buttons.length;i++){var but=TinyMCE_advanced_buttons[i];if(but[0]==button_name){if(tinyMCE.settings['button_tile_map']){for(var x=0;!tinyMCE.isMSIE&&x<buttonTileMap.length;x++){if(buttonTileMap[x]==but[1]){return '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\''+but[3]+'\', '+(but.length>4?but[4]:false)+(but.length>5?', \''+but[5]+'\'':'')+')" onmousedown="return false;"><img id="{$editor_id}_'+but[0]+'" src="{$themeurl}/images/spacer.gif" style="background-image:url({$themeurl}/images/buttons.gif); background-position: '+(0-(x*20))+'px 0px" title="'+but[2]+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';}}}return '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\''+but[3]+'\', '+(but.length>4?but[4]:false)+(but.length>5?', \''+but[5]+'\'':'')+')" onmousedown="return false;"><img id="{$editor_id}_'+but[0]+'" src="{$themeurl}/images/'+but[1]+'" title="'+but[2]+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';}}switch(button_name){case "formatselect":var html='<select id="{$editor_id}_formatSelect" name="{$editor_id}_formatSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FormatBlock\',false,this.options[this.selectedIndex].value);" class="mceSelectList">';var formats=tinyMCE.getParam("theme_advanced_blockformats","p,address,pre,h1,h2,h3,h4,h5,h6",true).split(',');var lookup=[['p','{$lang_theme_paragraph}'],['address','{$lang_theme_address}'],['pre','{$lang_theme_pre}'],['h1','{$lang_theme_h1}'],['h2','{$lang_theme_h2}'],['h3','{$lang_theme_h3}'],['h4','{$lang_theme_h4}'],['h5','{$lang_theme_h5}'],['h6','{$lang_theme_h6}']];html+='<option value="">{$lang_theme_block}</option>';for(var i=0;i<formats.length;i++){for(var x=0;x<lookup.length;x++){if(formats[i]==lookup[x][0]){html+='<option value="<'+lookup[x][0]+'>">'+lookup[x][1]+'</option>';}}}html+='</select>';return html;case "styleselect":return '<select id="{$editor_id}_styleSelect" onmousedown="TinyMCE_advanced_setupCSSClasses(\'{$editor_id}\');" name="{$editor_id}_styleSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSetCSSClass\',false,this.options[this.selectedIndex].value);" class="mceSelectList">{$style_select_options}</select>';case "fontselect":var fontHTML='<select id="{$editor_id}_fontNameSelect" name="{$editor_id}_fontNameSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontName\',false,this.options[this.selectedIndex].value);" class="mceSelectList"><option value="">{$lang_theme_fontdefault}</option>';var iFonts='Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';var nFonts='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,sand;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';var fonts=tinyMCE.getParam("theme_advanced_fonts",nFonts).split(';');for(var i=0;i<fonts.length;i++){if(fonts[i]!=''){var parts=fonts[i].split('=');fontHTML+='<option value="'+parts[1]+'">'+parts[0]+'</option>';}}fontHTML+='</select>';return fontHTML;case "fontsizeselect":return '<select id="{$editor_id}_fontSizeSelect" name="{$editor_id}_fontSizeSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontSize\',false,this.options[this.selectedIndex].value);" class="mceSelectList">\ + <option value="0">{$lang_theme_font_size}</option>\ <option value="1">1 (8 pt)</option>\ <option value="2">2 (10 pt)</option>\ <option value="3">3 (12 pt)</option>\ @@ -27,6 +8,6 @@ <option value="5">5 (18 pt)</option>\ <option value="6">6 (24 pt)</option>\ <option value="7">7 (36 pt)</option>\ - </select>';case "|":case "separator":return '<img src="{$themeurl}/images/spacer.gif" width="1" height="15" class="mceSeparatorLine">';case "spacer":return '<img src="{$themeurl}/images/spacer.gif" width="1" height="15" border="0" class="mceSeparatorLine" style="vertical-align: middle" />';case "rowseparator":return '<br />';}return "";}function TinyMCE_advanced_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceForeColor":var template=new Array();var inputColor=TinyMCE_advanced_foreColor;if(!inputColor)inputColor="#000000";template['file']='color_picker.htm';template['width']=220;template['height']=240;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",command:"forecolor",input_color:inputColor});return true;case "mceBackColor":var template=new Array();var inputColor=TinyMCE_advanced_foreColor;if(!inputColor){inputColor="#000000";}template['file']='color_picker.htm';template['width']=210;template['height']=200;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",command:"HiliteColor",input_color:inputColor});return true;case "mceColorPicker":if(user_interface){var template=new Array();var inputColor=value['document'].getElementById(value['element_id']).value;template['file']='color_picker.htm';template['width']=220;template['height']=210;if(typeof(value['store_selection'])=="undefined")value['store_selection']=true;tinyMCE.lastColorPickerValue=value;tinyMCE.openWindow(template,{editor_id:editor_id,mce_store_selection:value['store_selection'],inline:"yes",command:"mceColorPicker",input_color:inputColor});}else{var savedVal=tinyMCE.lastColorPickerValue;var elm=savedVal['document'].getElementById(savedVal['element_id']);elm.value=value;eval('elm.onchange();');}return true;case "mceCodeEditor":var template=new Array();template['file']='source_editor.htm';template['width']=tinyMCE.getParam("theme_advanced_source_editor_width",500);template['height']=tinyMCE.getParam("theme_advanced_source_editor_height",400);tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"no",inline:"yes"});return true;case "mceCharMap":var template=new Array();template['file']='charmap.htm';template['width']=550;template['height']=280;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case "mceInsertAnchor":var template=new Array();template['file']='anchor.htm';template['width']=320;template['height']=110;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case "mceNewDocument":if(confirm(tinyMCE.getLang('lang_newdocument')))tinyMCE.execInstanceCommand(editor_id,'mceSetContent',false,'');return true;}return false;}function TinyMCE_advanced_getEditorTemplate(settings,editorId){function removeFromArray(in_array,remove_array){var outArray=new Array();for(var i=0;i<in_array.length;i++){skip=false;for(var j=0;j<remove_array.length;j++){if(in_array[i]==remove_array[j]){skip=true;}}if(!skip){outArray[outArray.length]=in_array[i];}}return outArray;}function addToArray(in_array,add_array){for(var i=0;i<add_array.length;i++){in_array[in_array.length]=add_array[i];}return in_array;}var template=new Array();var deltaHeight=0;var resizing=tinyMCE.getParam("theme_advanced_resizing",false);var path=tinyMCE.getParam("theme_advanced_path",true);var statusbarHTML='<div id="{$editor_id}_path" class="mceStatusbarPathText" style="display: '+(path?"block":"none")+'"> </div><div id="{$editor_id}_resize" class="mceStatusbarResize" style="display: '+(resizing?"block":"none")+'" onmousedown="TinyMCE_advanced_setResizing(event,\'{$editor_id}\',true);"></div><br style="clear: both" />';var layoutManager=tinyMCE.getParam("theme_advanced_layout_manager","SimpleLayout");var styleSelectHTML='<option value="">{$lang_theme_style_select}</option>';if(settings['theme_advanced_styles']){var stylesAr=settings['theme_advanced_styles'].split(';');for(var i=0;i<stylesAr.length;i++){var key,value;key=stylesAr[i].split('=')[0];value=stylesAr[i].split('=')[1];styleSelectHTML+='<option value="'+value+'">'+key+'</option>';}TinyMCE_advanced_autoImportCSSClasses=false;}switch(layoutManager){case "SimpleLayout":var toolbarHTML="";var toolbarLocation=tinyMCE.getParam("theme_advanced_toolbar_location","bottom");var toolbarAlign=tinyMCE.getParam("theme_advanced_toolbar_align","center");var pathLocation=tinyMCE.getParam("theme_advanced_path_location","none");var statusbarLocation=tinyMCE.getParam("theme_advanced_statusbar_location",pathLocation);var defVals={theme_advanced_buttons1:"bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,separator,sub,sup,separator,charmap"};for(var i=1;i<100;i++){var def=defVals["theme_advanced_buttons"+i];buttons=tinyMCE.getParam("theme_advanced_buttons"+i,def==null?'':def,true,',');if(buttons.length==0)break;buttons=removeFromArray(buttons,tinyMCE.getParam("theme_advanced_disable","",true,','));buttons=addToArray(buttons,tinyMCE.getParam("theme_advanced_buttons"+i+"_add","",true,','));buttons=addToArray(tinyMCE.getParam("theme_advanced_buttons"+i+"_add_before","",true,','),buttons);for(var b=0;b<buttons.length;b++)toolbarHTML+=tinyMCE.getControlHTML(buttons[b]);if(buttons.length>0){toolbarHTML+="<br />";deltaHeight-=23;}}template['html']='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';if(toolbarLocation=="top"){template['html']+='<tr><td class="mceToolbarTop" align="'+toolbarAlign+'" height="1" nowrap="nowrap">'+toolbarHTML+'</td></tr>';}if(statusbarLocation=="top"){template['html']+='<tr><td class="mceStatusbarTop" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=23;}template['html']+='<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';if(toolbarLocation=="bottom"){template['html']+='<tr><td class="mceToolbarBottom" align="'+toolbarAlign+'" height="1">'+toolbarHTML+'</td></tr>';}if(toolbarLocation=="external"){var bod=document.body;var elm=document.createElement("div");toolbarHTML=tinyMCE.replaceVars(toolbarHTML,tinyMCE.settings);toolbarHTML=tinyMCE.replaceVars(toolbarHTML,tinyMCELang);toolbarHTML=tinyMCE.replaceVar(toolbarHTML,'style_select_options',styleSelectHTML);toolbarHTML=tinyMCE.replaceVar(toolbarHTML,"editor_id",editorId);toolbarHTML=tinyMCE.replaceVar(toolbarHTML,"default_document",tinyMCE.baseURL+"/blank.htm");toolbarHTML=tinyMCE.applyTemplate(toolbarHTML);elm.className="mceToolbarExternal";elm.id=editorId+"_toolbar";elm.innerHTML='<table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table>';bod.appendChild(elm);deltaHeight=0;tinyMCE.getInstanceById(editorId).toolbarElement=elm;}else{tinyMCE.getInstanceById(editorId).toolbarElement=null;}if(statusbarLocation=="bottom"){template['html']+='<tr><td class="mceStatusbarBottom" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=23;}template['html']+='</table>';break;case "RowLayout":template['html']='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';var containers=tinyMCE.getParam("theme_advanced_containers","",true,",");var defaultContainerCSS=tinyMCE.getParam("theme_advanced_containers_default_class","container");var defaultContainerAlign=tinyMCE.getParam("theme_advanced_containers_default_align","center");for(var i=0;i<containers.length;i++){if(containers[i]=="mceEditor"){template['html']+='<tr><td align="center" class="mceEditor_border">\ + </select>';case "|":case "separator":return '<img src="{$themeurl}/images/spacer.gif" width="1" height="15" class="mceSeparatorLine">';case "spacer":return '<img src="{$themeurl}/images/spacer.gif" width="1" height="15" border="0" class="mceSeparatorLine" style="vertical-align: middle" />';case "rowseparator":return '<br />';}return "";}function TinyMCE_advanced_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceForeColor":var template=new Array();var elm=tinyMCE.selectedInstance.getFocusElement();var inputColor=tinyMCE.getAttrib(elm,"color");if(inputColor=='')inputColor=elm.style.color;if(!inputColor)inputColor="#000000";template['file']='color_picker.htm';template['width']=220;template['height']=190;tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",command:"forecolor",input_color:inputColor});return true;case "mceBackColor":var template=new Array();var elm=tinyMCE.selectedInstance.getFocusElement();var inputColor=elm.style.backgroundColor;if(!inputColor)inputColor="#000000";template['file']='color_picker.htm';template['width']=220;template['height']=190;template['width']+=tinyMCE.getLang('lang_theme_advanced_backcolor_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_backcolor_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes",command:"HiliteColor",input_color:inputColor});return true;case "mceColorPicker":if(user_interface){var template=new Array();var inputColor=value['document'].getElementById(value['element_id']).value;template['file']='color_picker.htm';template['width']=220;template['height']=190;template['width']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height',0);if(typeof(value['store_selection'])=="undefined")value['store_selection']=true;tinyMCE.lastColorPickerValue=value;tinyMCE.openWindow(template,{editor_id:editor_id,mce_store_selection:value['store_selection'],inline:"yes",command:"mceColorPicker",input_color:inputColor});}else{var savedVal=tinyMCE.lastColorPickerValue;var elm=savedVal['document'].getElementById(savedVal['element_id']);elm.value=value;eval('elm.onchange();');}return true;case "mceCodeEditor":var template=new Array();template['file']='source_editor.htm';template['width']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_width",500));template['height']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_height",400));tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"no",inline:"yes"});return true;case "mceCharMap":var template=new Array();template['file']='charmap.htm';template['width']=550;template['height']=250;template['width']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case "mceInsertAnchor":var template=new Array();template['file']='anchor.htm';template['width']=320;template['height']=90;template['width']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case "mceNewDocument":if(confirm(tinyMCE.getLang('lang_newdocument')))tinyMCE.execInstanceCommand(editor_id,'mceSetContent',false,'');return true;}return false;}function TinyMCE_advanced_getEditorTemplate(settings,editorId){function removeFromArray(in_array,remove_array){var outArray=new Array();for(var i=0;i<in_array.length;i++){skip=false;for(var j=0;j<remove_array.length;j++){if(in_array[i]==remove_array[j]){skip=true;}}if(!skip){outArray[outArray.length]=in_array[i];}}return outArray;}function addToArray(in_array,add_array){for(var i=0;i<add_array.length;i++){in_array[in_array.length]=add_array[i];}return in_array;}var template=new Array();var deltaHeight=0;var resizing=tinyMCE.getParam("theme_advanced_resizing",false);var path=tinyMCE.getParam("theme_advanced_path",true);var statusbarHTML='<div id="{$editor_id}_path" class="mceStatusbarPathText" style="display: '+(path?"block":"none")+'"> </div><div id="{$editor_id}_resize" class="mceStatusbarResize" style="display: '+(resizing?"block":"none")+'" onmousedown="TinyMCE_advanced_setResizing(event,\'{$editor_id}\',true);"></div><br style="clear: both" />';var layoutManager=tinyMCE.getParam("theme_advanced_layout_manager","SimpleLayout");var styleSelectHTML='<option value="">{$lang_theme_style_select}</option>';if(settings['theme_advanced_styles']){var stylesAr=settings['theme_advanced_styles'].split(';');for(var i=0;i<stylesAr.length;i++){var key,value;key=stylesAr[i].split('=')[0];value=stylesAr[i].split('=')[1];styleSelectHTML+='<option value="'+value+'">'+key+'</option>';}TinyMCE_advanced_autoImportCSSClasses=false;}switch(layoutManager){case "SimpleLayout":var toolbarHTML="";var toolbarLocation=tinyMCE.getParam("theme_advanced_toolbar_location","bottom");var toolbarAlign=tinyMCE.getParam("theme_advanced_toolbar_align","center");var pathLocation=tinyMCE.getParam("theme_advanced_path_location","none");var statusbarLocation=tinyMCE.getParam("theme_advanced_statusbar_location",pathLocation);var defVals={theme_advanced_buttons1:"bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,separator,sub,sup,separator,charmap"};for(var i=1;i<100;i++){var def=defVals["theme_advanced_buttons"+i];buttons=tinyMCE.getParam("theme_advanced_buttons"+i,def==null?'':def,true,',');if(buttons.length==0)break;buttons=removeFromArray(buttons,tinyMCE.getParam("theme_advanced_disable","",true,','));buttons=addToArray(buttons,tinyMCE.getParam("theme_advanced_buttons"+i+"_add","",true,','));buttons=addToArray(tinyMCE.getParam("theme_advanced_buttons"+i+"_add_before","",true,','),buttons);for(var b=0;b<buttons.length;b++)toolbarHTML+=tinyMCE.getControlHTML(buttons[b]);if(buttons.length>0){toolbarHTML+="<br />";deltaHeight-=23;}}template['html']='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';if(toolbarLocation=="top"){template['html']+='<tr><td class="mceToolbarTop" align="'+toolbarAlign+'" height="1" nowrap="nowrap">'+toolbarHTML+'</td></tr>';}if(statusbarLocation=="top"){template['html']+='<tr><td class="mceStatusbarTop" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=23;}template['html']+='<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';if(toolbarLocation=="bottom"){template['html']+='<tr><td class="mceToolbarBottom" align="'+toolbarAlign+'" height="1">'+toolbarHTML+'</td></tr>';}if(toolbarLocation=="external"){var bod=document.body;var elm=document.createElement("div");toolbarHTML=tinyMCE.replaceVars(toolbarHTML,tinyMCE.settings);toolbarHTML=tinyMCE.replaceVars(toolbarHTML,tinyMCELang);toolbarHTML=tinyMCE.replaceVar(toolbarHTML,'style_select_options',styleSelectHTML);toolbarHTML=tinyMCE.replaceVar(toolbarHTML,"editor_id",editorId);toolbarHTML=tinyMCE.applyTemplate(toolbarHTML);elm.className="mceToolbarExternal";elm.id=editorId+"_toolbar";elm.innerHTML='<table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table>';bod.appendChild(elm);deltaHeight=0;tinyMCE.getInstanceById(editorId).toolbarElement=elm;}else{tinyMCE.getInstanceById(editorId).toolbarElement=null;}if(statusbarLocation=="bottom"){template['html']+='<tr><td class="mceStatusbarBottom" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=23;}template['html']+='</table>';break;case "RowLayout":template['html']='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';var containers=tinyMCE.getParam("theme_advanced_containers","",true,",");var defaultContainerCSS=tinyMCE.getParam("theme_advanced_containers_default_class","container");var defaultContainerAlign=tinyMCE.getParam("theme_advanced_containers_default_align","center");for(var i=0;i<containers.length;i++){if(containers[i]=="mceEditor"){template['html']+='<tr><td align="center" class="mceEditor_border">\ <span id="{$editor_id}"></span>\ - </td></tr>';}else if(containers[i]=="mceElementpath"||containers[i]=="mceStatusbar"){var pathClass="mceStatusbar";if(i==containers.length-1){pathClass="mceStatusbarBottom";}else if(i==0){pathClass="mceStatusbar";}else{deltaHeight-=2;}template['html']+='<tr><td class="'+pathClass+'" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=22;}else{var curContainer=tinyMCE.getParam("theme_advanced_container_"+containers[i],"",true,',');var curContainerHTML="";var curAlign=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align",defaultContainerAlign);var curCSS=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class",defaultContainerCSS);for(var j=0;j<curContainer.length;j++){curContainerHTML+=tinyMCE.getControlHTML(curContainer[j]);}if(curContainer.length>0){curContainerHTML+="<br />";deltaHeight-=23;}template['html']+='<tr><td class="'+curCSS+'" align="'+curAlign+'" height="1">'+curContainerHTML+'</td></tr>';}}template['html']+='</tbody></table>';break;case "BorderLayout":break;case "CustomLayout":var customLayout=tinyMCE.getParam("theme_advanced_custom_layout","");if(customLayout!=""&&eval("typeof("+customLayout+")")!="undefined"){template=eval(customLayout+"(template);");}break;default:alert('UNDEFINED LAYOUT MANAGER! PLEASE CHECK YOUR TINYMCE CONFIG!');break;}template['html']+='<div id="{$editor_id}_resize_box" class="mceResizeBox"></div>';template['html']=tinyMCE.replaceVar(template['html'],'style_select_options',styleSelectHTML);template['delta_width']=0;template['delta_height']=deltaHeight;return template;}function TinyMCE_advanced_setResizing(e,editor_id,state){e=typeof(e)=="undefined"?window.event:e;var resizer=TinyMCE_advanced_resizer;var editorContainer=document.getElementById(editor_id+'_parent');var editorArea=document.getElementById(editor_id+'_parent').firstChild;var resizeBox=document.getElementById(editor_id+'_resize_box');var inst=tinyMCE.getInstanceById(editor_id);if(state){var width=editorArea.clientWidth;var height=editorArea.clientHeight;resizeBox.style.width=width+"px";resizeBox.style.height=height+"px";resizer.iframeWidth=inst.iframeElement.clientWidth;resizer.iframeHeight=inst.iframeElement.clientHeight;editorArea.style.display="none";resizeBox.style.display="block";if(!resizer.eventHandlers){if(tinyMCE.isMSIE)tinyMCE.addEvent(document,"mousemove",TinyMCE_advanced_resizeEventHandler);else tinyMCE.addEvent(window,"mousemove",TinyMCE_advanced_resizeEventHandler);tinyMCE.addEvent(document,"mouseup",TinyMCE_advanced_resizeEventHandler);resizer.eventHandlers=true;}resizer.resizing=true;resizer.downX=e.screenX;resizer.downY=e.screenY;resizer.width=parseInt(resizeBox.style.width);resizer.height=parseInt(resizeBox.style.height);resizer.editorId=editor_id;resizer.resizeBox=resizeBox;resizer.horizontal=tinyMCE.getParam("theme_advanced_resize_horizontal",true);}else{resizer.resizing=false;resizeBox.style.display="none";editorArea.style.display=tinyMCE.isMSIE?"block":"table";tinyMCE.execCommand('mceResetDesignMode');}}function TinyMCE_advanced_initInstance(inst){var w=TinyMCE_advanced_getCookie("TinyMCE_"+inst.editorId+"_width");var h=TinyMCE_advanced_getCookie("TinyMCE_"+inst.editorId+"_height");TinyMCE_advanced_resizeTo(inst,w,h,tinyMCE.getParam("theme_advanced_resize_horizontal",true));}function TinyMCE_advanced_setCookie(name,value,expires,path,domain,secure){var curCookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+escape(path):"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");document.cookie=curCookie;}function TinyMCE_advanced_getCookie(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null;}else begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end));}function TinyMCE_advanced_resizeTo(inst,w,h,set_w){var editorContainer=document.getElementById(inst.editorId+'_parent');var tableElm=editorContainer.firstChild;var iframe=inst.iframeElement;if(w==null||w=="null"){set_w=false;w=0;}if(h==null||h=="null")return;w=parseInt(w);h=parseInt(h);if(tinyMCE.isGecko){w+=2;h+=2;}var dx=w-tableElm.clientWidth;var dy=h-tableElm.clientHeight;if(set_w)tableElm.style.width=w+"px";tableElm.style.height=h+"px";iw=iframe.clientWidth+dx;ih=iframe.clientHeight+dy;if(tinyMCE.isGecko){iw-=2;ih-=2;}if(set_w)iframe.style.width=iw+"px";iframe.style.height=ih+"px";if(set_w){var tableBodyElm=tableElm.firstChild;var minIframeWidth=tableBodyElm.scrollWidth;if(inst.iframeElement.clientWidth<minIframeWidth){dx=minIframeWidth-inst.iframeElement.clientWidth;inst.iframeElement.style.width=(iw+dx)+"px";}}}function TinyMCE_advanced_resizeEventHandler(e){var resizer=TinyMCE_advanced_resizer;if(!resizer.resizing)return;e=typeof(e)=="undefined"?window.event:e;var dx=e.screenX-resizer.downX;var dy=e.screenY-resizer.downY;var resizeBox=resizer.resizeBox;var editorId=resizer.editorId;switch(e.type){case "mousemove":if(resizer.horizontal)resizeBox.style.width=(resizer.width+dx)+"px";resizeBox.style.height=(resizer.height+dy)+"px";break;case "mouseup":TinyMCE_advanced_setResizing(e,editorId,false);TinyMCE_advanced_resizeTo(tinyMCE.getInstanceById(editorId),resizer.width+dx,resizer.height+dy,resizer.horizontal);var expires=new Date();expires.setTime(expires.getTime()+3600000*24*30);TinyMCE_advanced_setCookie("TinyMCE_"+editorId+"_width",""+(resizer.horizontal?resizer.width+dx:""),expires);TinyMCE_advanced_setCookie("TinyMCE_"+editorId+"_height",""+(resizer.height+dy),expires);break;}}function TinyMCE_advanced_getInsertLinkTemplate(){var template=new Array();template['file']='link.htm';template['width']=300;template['height']=150;template['width']+=tinyMCE.getLang('lang_insert_link_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_link_delta_height',0);return template;};function TinyMCE_advanced_getInsertImageTemplate(){var template=new Array();template['file']='image.htm?src={$src}';template['width']=340;template['height']=280;template['width']+=tinyMCE.getLang('lang_insert_image_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_image_delta_height',0);return template;};function TinyMCE_advanced_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){function selectByValue(select_elm,value){if(select_elm){for(var i=0;i<select_elm.options.length;i++){if(select_elm.options[i].value==value){select_elm.selectedIndex=i;return true;}}}return false;};function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";};if(node==null){return;}var pathElm=document.getElementById(editor_id+"_path");if(pathElm){var parentNode=node;var path=new Array();while(parentNode){if(parentNode.nodeName.toLowerCase()=="body"){break;}if(parentNode.nodeType==1){path[path.length]=parentNode;}parentNode=parentNode.parentNode;}var html="";for(var i=path.length-1;i>=0;i--){var nodeName=path[i].nodeName.toLowerCase();var nodeData="";if(nodeName=="b"){nodeName="strong";}if(nodeName=="i"){nodeName="em";}if(getAttrib(path[i],'id')!=""){nodeData+="id: "+path[i].getAttribute('id')+" ";}var className=tinyMCE.getVisualAidClass(getAttrib(path[i],"className"),false);if(className!=""&&className.indexOf('mceItem')==-1){nodeData+="class: "+className+" ";}if(getAttrib(path[i],'src')!=""){nodeData+="src: "+path[i].getAttribute('src')+" ";}if(getAttrib(path[i],'href')!=""){nodeData+="href: "+path[i].getAttribute('href')+" ";}if(nodeName=="img"&&tinyMCE.getAttrib(path[i],"class").indexOf('mceItemFlash')!=-1){nodeName="flash";nodeData="";}if(nodeName=="a"&&(anchor=tinyMCE.getAttrib(path[i],"name"))!=""){nodeName="a";nodeName+="#"+anchor;nodeData="";}if(getAttrib(path[i],'name').indexOf("mce_")!=0){var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"className"),false);if(className!=""&&className.indexOf('mceItem')==-1){nodeName+="."+className;}}if(tinyMCE.isMSIE){html+='<a title="'+nodeData+'" href="javascript:void(0);" onmousedown="tinyMCE.execInstanceCommand(\''+editor_id+'\',\'mceSelectNodeDepth\',false,\''+i+'\');return false;" class="mcePathItem">'+nodeName+'</a>';}else{html+='<a title="'+nodeData+'" href="javascript:tinyMCE.execInstanceCommand(\''+editor_id+'\',\'mceSelectNodeDepth\',false,\''+i+'\');" class="mcePathItem">'+nodeName+'</a>';}if(i>0){html+=" » ";}}pathElm.innerHTML=tinyMCE.getLang('lang_theme_path')+": "+html+' ';}var colorElm=tinyMCE.getParentElement(node,"font","color");if(colorElm){TinyMCE_advanced_foreColor=""+colorElm.color.toUpperCase();}tinyMCE.switchClassSticky(editor_id+'_justifyleft','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifyright','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifyfull','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_numlist','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_sub','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_sup','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_anchor','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_link','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_unlink','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_outdent','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_image','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_hr','mceButtonNormal');if(node.nodeName=="IMG"&&tinyMCE.getAttrib(node,"class").indexOf('mceItemAnchor')!=-1)tinyMCE.switchClassSticky(editor_id+'_anchor','mceButtonSelected');var anchorLink=tinyMCE.getParentElement(node,"a","href");if(anchorLink||any_selection){tinyMCE.switchClassSticky(editor_id+'_link',anchorLink?'mceButtonSelected':'mceButtonNormal',false);tinyMCE.switchClassSticky(editor_id+'_unlink',anchorLink?'mceButtonSelected':'mceButtonNormal',false);}tinyMCE.switchClassSticky(editor_id+'_visualaid',visual_aid?'mceButtonSelected':'mceButtonNormal',false);if(undo_levels!=-1){tinyMCE.switchClassSticky(editor_id+'_undo','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_redo','mceButtonDisabled',true);}if(tinyMCE.getParentElement(node,"li,blockquote")){tinyMCE.switchClassSticky(editor_id+'_outdent','mceButtonNormal',false);}if(undo_index!=-1&&(undo_index<undo_levels-1&&undo_levels>0)){tinyMCE.switchClassSticky(editor_id+'_redo','mceButtonNormal',false);}if(undo_index!=-1&&(undo_index>0&&undo_levels>0)){tinyMCE.switchClassSticky(editor_id+'_undo','mceButtonNormal',false);}var selectElm=document.getElementById(editor_id+"_styleSelect");if(selectElm){TinyMCE_advanced_setupCSSClasses(editor_id);classNode=node;breakOut=false;var index=0;do{if(classNode&&classNode.className){for(var i=0;i<selectElm.options.length;i++){if(selectElm.options[i].value==classNode.className){index=i;breakOut=true;break;}}}}while(!breakOut&&classNode!=null&&(classNode=classNode.parentNode));selectElm.selectedIndex=index;}var selectElm=document.getElementById(editor_id+"_formatSelect");if(selectElm){var elm=tinyMCE.getParentElement(node,"p,div,h1,h2,h3,h4,h5,h6,pre,address");if(elm){selectByValue(selectElm,"<"+elm.nodeName.toLowerCase()+">");}else{selectByValue(selectElm,"");}}var selectElm=document.getElementById(editor_id+"_fontNameSelect");if(selectElm){var elm=tinyMCE.getParentElement(node,"font","face");if(elm){selectByValue(selectElm,elm.getAttribute("face"));}else{selectByValue(selectElm,"");}}var selectElm=document.getElementById(editor_id+"_fontSizeSelect");if(selectElm){var elm=tinyMCE.getParentElement(node,"font","size");if(elm&&getAttrib(elm,"size")!=""){selectByValue(selectElm,elm.getAttribute("size"));}else{selectByValue(selectElm,"0");}}alignNode=node;breakOut=false;do{if(!alignNode.getAttribute||!alignNode.getAttribute('align')){continue;}switch(alignNode.getAttribute('align').toLowerCase()){case "left":tinyMCE.switchClassSticky(editor_id+'_justifyleft','mceButtonSelected');breakOut=true;break;case "right":tinyMCE.switchClassSticky(editor_id+'_justifyright','mceButtonSelected');breakOut=true;break;case "middle":case "center":tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonSelected');breakOut=true;break;case "justify":tinyMCE.switchClassSticky(editor_id+'_justifyfull','mceButtonSelected');breakOut=true;break;}}while(!breakOut&&(alignNode=alignNode.parentNode));var div=tinyMCE.getParentElement(node,"div");if(div&&div.style.textAlign=="center")tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonSelected');if(tinyMCE.isGecko&&node.nodeType==3){var inst=tinyMCE.getInstanceById(editor_id);var doc=inst.getDoc();if(doc.queryCommandState("Bold")){tinyMCE.switchClassSticky(editor_id+'_bold','mceButtonSelected');}if(doc.queryCommandState("Italic")){tinyMCE.switchClassSticky(editor_id+'_italic','mceButtonSelected');}if(doc.queryCommandState("Underline")&&(node.parentNode==null||node.parentNode.nodeName!="A")){tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonSelected');}if(doc.queryCommandState("Strikethrough")){tinyMCE.switchClassSticky(editor_id+'_strikethrough','mceButtonSelected');}}do{switch(node.nodeName.toLowerCase()){case "b":case "strong":tinyMCE.switchClassSticky(editor_id+'_bold','mceButtonSelected');break;case "i":case "em":tinyMCE.switchClassSticky(editor_id+'_italic','mceButtonSelected');break;case "u":tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonSelected');break;case "strike":tinyMCE.switchClassSticky(editor_id+'_strikethrough','mceButtonSelected');break;case "ul":tinyMCE.switchClassSticky(editor_id+'_bullist','mceButtonSelected');break;case "ol":tinyMCE.switchClassSticky(editor_id+'_numlist','mceButtonSelected');break;case "sub":tinyMCE.switchClassSticky(editor_id+'_sub','mceButtonSelected');break;case "sup":tinyMCE.switchClassSticky(editor_id+'_sup','mceButtonSelected');break;case "hr":tinyMCE.switchClassSticky(editor_id+'_hr','mceButtonSelected');break;case "img":if(getAttrib(node,'name').indexOf('mce_')!=0){tinyMCE.switchClassSticky(editor_id+'_image','mceButtonSelected');}break;}}while((node=node.parentNode));};function TinyMCE_advanced_setupCSSClasses(editor_id){if(!TinyMCE_advanced_autoImportCSSClasses){return;}var selectElm=document.getElementById(editor_id+'_styleSelect');if(selectElm&&selectElm.getAttribute('cssImported')!='true'){var csses=tinyMCE.getCSSClasses(editor_id);if(csses&&selectElm){for(var i=0;i<csses.length;i++){selectElm.options[selectElm.length]=new Option(csses[i],csses[i]);}}if(csses!=null&&csses.length>0){selectElm.setAttribute('cssImported','true');}}};
\ No newline at end of file + </td></tr>';}else if(containers[i]=="mceElementpath"||containers[i]=="mceStatusbar"){var pathClass="mceStatusbar";if(i==containers.length-1){pathClass="mceStatusbarBottom";}else if(i==0){pathClass="mceStatusbar";}else{deltaHeight-=2;}template['html']+='<tr><td class="'+pathClass+'" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=22;}else{var curContainer=tinyMCE.getParam("theme_advanced_container_"+containers[i],"",true,',');var curContainerHTML="";var curAlign=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align",defaultContainerAlign);var curCSS=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class",defaultContainerCSS);for(var j=0;j<curContainer.length;j++){curContainerHTML+=tinyMCE.getControlHTML(curContainer[j]);}if(curContainer.length>0){curContainerHTML+="<br />";deltaHeight-=23;}template['html']+='<tr><td class="'+curCSS+'" align="'+curAlign+'" height="1">'+curContainerHTML+'</td></tr>';}}template['html']+='</tbody></table>';break;case "BorderLayout":break;case "CustomLayout":var customLayout=tinyMCE.getParam("theme_advanced_custom_layout","");if(customLayout!=""&&eval("typeof("+customLayout+")")!="undefined"){template=eval(customLayout+"(template);");}break;default:alert('UNDEFINED LAYOUT MANAGER! PLEASE CHECK YOUR TINYMCE CONFIG!');break;}template['html']+='<div id="{$editor_id}_resize_box" class="mceResizeBox"></div>';template['html']=tinyMCE.replaceVar(template['html'],'style_select_options',styleSelectHTML);template['delta_width']=0;template['delta_height']=deltaHeight;return template;}function TinyMCE_advanced_setResizing(e,editor_id,state){e=typeof(e)=="undefined"?window.event:e;var resizer=TinyMCE_advanced_resizer;var editorContainer=document.getElementById(editor_id+'_parent');var editorArea=document.getElementById(editor_id+'_parent').firstChild;var resizeBox=document.getElementById(editor_id+'_resize_box');var inst=tinyMCE.getInstanceById(editor_id);if(state){var width=editorArea.clientWidth;var height=editorArea.clientHeight;resizeBox.style.width=width+"px";resizeBox.style.height=height+"px";resizer.iframeWidth=inst.iframeElement.clientWidth;resizer.iframeHeight=inst.iframeElement.clientHeight;editorArea.style.display="none";resizeBox.style.display="block";if(!resizer.eventHandlers){if(tinyMCE.isMSIE)tinyMCE.addEvent(document,"mousemove",TinyMCE_advanced_resizeEventHandler);else tinyMCE.addEvent(window,"mousemove",TinyMCE_advanced_resizeEventHandler);tinyMCE.addEvent(document,"mouseup",TinyMCE_advanced_resizeEventHandler);resizer.eventHandlers=true;}resizer.resizing=true;resizer.downX=e.screenX;resizer.downY=e.screenY;resizer.width=parseInt(resizeBox.style.width);resizer.height=parseInt(resizeBox.style.height);resizer.editorId=editor_id;resizer.resizeBox=resizeBox;resizer.horizontal=tinyMCE.getParam("theme_advanced_resize_horizontal",true);}else{resizer.resizing=false;resizeBox.style.display="none";editorArea.style.display=tinyMCE.isMSIE?"block":"table";tinyMCE.execCommand('mceResetDesignMode');}}function TinyMCE_advanced_initInstance(inst){if(tinyMCE.getParam("theme_advanced_resizing",false)){var w=TinyMCE_advanced_getCookie("TinyMCE_"+inst.editorId+"_width");var h=TinyMCE_advanced_getCookie("TinyMCE_"+inst.editorId+"_height");TinyMCE_advanced_resizeTo(inst,w,h,tinyMCE.getParam("theme_advanced_resize_horizontal",true));}}function TinyMCE_advanced_setCookie(name,value,expires,path,domain,secure){var curCookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+escape(path):"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");document.cookie=curCookie;}function TinyMCE_advanced_getCookie(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null;}else begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end));}function TinyMCE_advanced_resizeTo(inst,w,h,set_w){var editorContainer=document.getElementById(inst.editorId+'_parent');var tableElm=editorContainer.firstChild;var iframe=inst.iframeElement;if(w==null||w=="null"){set_w=false;w=0;}if(h==null||h=="null")return;w=parseInt(w);h=parseInt(h);if(tinyMCE.isGecko){w+=2;h+=2;}var dx=w-tableElm.clientWidth;var dy=h-tableElm.clientHeight;if(set_w)tableElm.style.width=w+"px";tableElm.style.height=h+"px";iw=iframe.clientWidth+dx;ih=iframe.clientHeight+dy;if(tinyMCE.isGecko){iw-=2;ih-=2;}if(set_w)iframe.style.width=iw+"px";iframe.style.height=ih+"px";if(set_w){var tableBodyElm=tableElm.firstChild;var minIframeWidth=tableBodyElm.scrollWidth;if(inst.iframeElement.clientWidth<minIframeWidth){dx=minIframeWidth-inst.iframeElement.clientWidth;inst.iframeElement.style.width=(iw+dx)+"px";}}}function TinyMCE_advanced_resizeEventHandler(e){var resizer=TinyMCE_advanced_resizer;if(!resizer.resizing)return;e=typeof(e)=="undefined"?window.event:e;var dx=e.screenX-resizer.downX;var dy=e.screenY-resizer.downY;var resizeBox=resizer.resizeBox;var editorId=resizer.editorId;switch(e.type){case "mousemove":if(resizer.horizontal)resizeBox.style.width=(resizer.width+dx)+"px";resizeBox.style.height=(resizer.height+dy)+"px";break;case "mouseup":TinyMCE_advanced_setResizing(e,editorId,false);TinyMCE_advanced_resizeTo(tinyMCE.getInstanceById(editorId),resizer.width+dx,resizer.height+dy,resizer.horizontal);var expires=new Date();expires.setTime(expires.getTime()+3600000*24*30);TinyMCE_advanced_setCookie("TinyMCE_"+editorId+"_width",""+(resizer.horizontal?resizer.width+dx:""),expires);TinyMCE_advanced_setCookie("TinyMCE_"+editorId+"_height",""+(resizer.height+dy),expires);break;}}function TinyMCE_advanced_getInsertLinkTemplate(){var template=new Array();template['file']='link.htm';template['width']=330;template['height']=170;template['width']+=tinyMCE.getLang('lang_insert_link_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_link_delta_height',0);return template;};function TinyMCE_advanced_getInsertImageTemplate(){var template=new Array();template['file']='image.htm?src={$src}';template['width']=340;template['height']=245;template['width']+=tinyMCE.getLang('lang_insert_image_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_image_delta_height',0);return template;};function TinyMCE_advanced_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){function selectByValue(select_elm,value){if(select_elm){for(var i=0;i<select_elm.options.length;i++){if(select_elm.options[i].value==value){select_elm.selectedIndex=i;return true;}}}return false;};function getAttrib(elm,name){return elm.getAttribute(name)?elm.getAttribute(name):"";};if(node==null){return;}var pathElm=document.getElementById(editor_id+"_path");if(pathElm){var parentNode=node;var path=new Array();while(parentNode){if(parentNode.nodeName.toLowerCase()=="body"){break;}if(parentNode.nodeType==1){path[path.length]=parentNode;}parentNode=parentNode.parentNode;}var html="";for(var i=path.length-1;i>=0;i--){var nodeName=path[i].nodeName.toLowerCase();var nodeData="";if(nodeName=="b"){nodeName="strong";}if(nodeName=="i"){nodeName="em";}if(getAttrib(path[i],'id')!=""){nodeData+="id: "+path[i].getAttribute('id')+" ";}var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1)nodeData+="class: "+className+" ";if(getAttrib(path[i],'src')!=""){nodeData+="src: "+path[i].getAttribute('src')+" ";}if(getAttrib(path[i],'href')!=""){nodeData+="href: "+path[i].getAttribute('href')+" ";}if(nodeName=="img"&&tinyMCE.getAttrib(path[i],"class").indexOf('mceItemFlash')!=-1){nodeName="flash";nodeData="";}if(nodeName=="a"&&(anchor=tinyMCE.getAttrib(path[i],"name"))!=""){nodeName="a";nodeName+="#"+anchor;nodeData="";}if(getAttrib(path[i],'name').indexOf("mce_")!=0){var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1)nodeName+="."+className;}if(tinyMCE.isMSIE){html+='<a title="'+nodeData+'" href="javascript:void(0);" onmousedown="tinyMCE.execInstanceCommand(\''+editor_id+'\',\'mceSelectNodeDepth\',false,\''+i+'\');return false;" class="mcePathItem">'+nodeName+'</a>';}else{html+='<a title="'+nodeData+'" href="javascript:tinyMCE.execInstanceCommand(\''+editor_id+'\',\'mceSelectNodeDepth\',false,\''+i+'\');" class="mcePathItem">'+nodeName+'</a>';}if(i>0){html+=" » ";}}pathElm.innerHTML=tinyMCE.getLang('lang_theme_path')+": "+html+' ';}tinyMCE.switchClassSticky(editor_id+'_justifyleft','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifyright','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_justifyfull','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_numlist','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_sub','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_sup','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_anchor','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_link','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_unlink','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_outdent','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_image','mceButtonNormal');tinyMCE.switchClassSticky(editor_id+'_hr','mceButtonNormal');if(node.nodeName=="A"&&tinyMCE.getAttrib(node,"class").indexOf('mceItemAnchor')!=-1)tinyMCE.switchClassSticky(editor_id+'_anchor','mceButtonSelected');var anchorLink=tinyMCE.getParentElement(node,"a","href");if(anchorLink||any_selection){tinyMCE.switchClassSticky(editor_id+'_link',anchorLink?'mceButtonSelected':'mceButtonNormal',false);tinyMCE.switchClassSticky(editor_id+'_unlink',anchorLink?'mceButtonSelected':'mceButtonNormal',false);}tinyMCE.switchClassSticky(editor_id+'_visualaid',visual_aid?'mceButtonSelected':'mceButtonNormal',false);if(undo_levels!=-1){tinyMCE.switchClassSticky(editor_id+'_undo','mceButtonDisabled',true);tinyMCE.switchClassSticky(editor_id+'_redo','mceButtonDisabled',true);}if(tinyMCE.getParentElement(node,"li,blockquote")){tinyMCE.switchClassSticky(editor_id+'_outdent','mceButtonNormal',false);}if(undo_index!=-1&&(undo_index<undo_levels-1&&undo_levels>0)){tinyMCE.switchClassSticky(editor_id+'_redo','mceButtonNormal',false);}if(undo_index!=-1&&(undo_index>0&&undo_levels>0)){tinyMCE.switchClassSticky(editor_id+'_undo','mceButtonNormal',false);}var selectElm=document.getElementById(editor_id+"_styleSelect");if(selectElm){TinyMCE_advanced_setupCSSClasses(editor_id);classNode=node;breakOut=false;var index=0;do{if(classNode&&classNode.className){for(var i=0;i<selectElm.options.length;i++){if(selectElm.options[i].value==classNode.className){index=i;breakOut=true;break;}}}}while(!breakOut&&classNode!=null&&(classNode=classNode.parentNode));selectElm.selectedIndex=index;}var selectElm=document.getElementById(editor_id+"_formatSelect");if(selectElm){var elm=tinyMCE.getParentElement(node,"p,div,h1,h2,h3,h4,h5,h6,pre,address");if(elm){selectByValue(selectElm,"<"+elm.nodeName.toLowerCase()+">");}else{selectByValue(selectElm,"");}}var selectElm=document.getElementById(editor_id+"_fontNameSelect");if(selectElm){var elm=tinyMCE.getParentElement(node);if(elm){var family=tinyMCE.getAttrib(elm,"face");if(family=='')family=''+elm.style.fontFamily;if(!selectByValue(selectElm,family))selectByValue(selectElm,"");}else selectByValue(selectElm,"");}var selectElm=document.getElementById(editor_id+"_fontSizeSelect");if(selectElm){var elm=tinyMCE.getParentElement(node);if(elm){var size=tinyMCE.getAttrib(elm,"size");if(size==''){var sizes=new Array('','8px','10px','12px','14px','18px','24px','36px');size=''+elm.style.fontSize;for(var i=0;i<sizes.length;i++){if((''+sizes[i])==size){size=i;break;}}}if(!selectByValue(selectElm,size))selectByValue(selectElm,"");}else selectByValue(selectElm,"0");}alignNode=node;breakOut=false;do{if(!alignNode.getAttribute||!alignNode.getAttribute('align')){continue;}switch(alignNode.getAttribute('align').toLowerCase()){case "left":tinyMCE.switchClassSticky(editor_id+'_justifyleft','mceButtonSelected');breakOut=true;break;case "right":tinyMCE.switchClassSticky(editor_id+'_justifyright','mceButtonSelected');breakOut=true;break;case "middle":case "center":tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonSelected');breakOut=true;break;case "justify":tinyMCE.switchClassSticky(editor_id+'_justifyfull','mceButtonSelected');breakOut=true;break;}}while(!breakOut&&(alignNode=alignNode.parentNode));var div=tinyMCE.getParentElement(node,"div");if(div&&div.style.textAlign=="center")tinyMCE.switchClassSticky(editor_id+'_justifycenter','mceButtonSelected');if(tinyMCE.isGecko&&node.nodeType==3){var inst=tinyMCE.getInstanceById(editor_id);var doc=inst.getDoc();if(doc.queryCommandState("Bold")){tinyMCE.switchClassSticky(editor_id+'_bold','mceButtonSelected');}if(doc.queryCommandState("Italic")){tinyMCE.switchClassSticky(editor_id+'_italic','mceButtonSelected');}if(doc.queryCommandState("Underline")&&(node.parentNode==null||node.parentNode.nodeName!="A")){tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonSelected');}if(doc.queryCommandState("Strikethrough")){tinyMCE.switchClassSticky(editor_id+'_strikethrough','mceButtonSelected');}}do{switch(node.nodeName.toLowerCase()){case "b":case "strong":tinyMCE.switchClassSticky(editor_id+'_bold','mceButtonSelected');break;case "i":case "em":tinyMCE.switchClassSticky(editor_id+'_italic','mceButtonSelected');break;case "u":tinyMCE.switchClassSticky(editor_id+'_underline','mceButtonSelected');break;case "strike":tinyMCE.switchClassSticky(editor_id+'_strikethrough','mceButtonSelected');break;case "ul":tinyMCE.switchClassSticky(editor_id+'_bullist','mceButtonSelected');break;case "ol":tinyMCE.switchClassSticky(editor_id+'_numlist','mceButtonSelected');break;case "sub":tinyMCE.switchClassSticky(editor_id+'_sub','mceButtonSelected');break;case "sup":tinyMCE.switchClassSticky(editor_id+'_sup','mceButtonSelected');break;case "hr":tinyMCE.switchClassSticky(editor_id+'_hr','mceButtonSelected');break;case "img":if(getAttrib(node,'name').indexOf('mce_')!=0){tinyMCE.switchClassSticky(editor_id+'_image','mceButtonSelected');}break;}}while((node=node.parentNode));};function TinyMCE_advanced_setupCSSClasses(editor_id){if(!TinyMCE_advanced_autoImportCSSClasses){return;}var selectElm=document.getElementById(editor_id+'_styleSelect');if(selectElm&&selectElm.getAttribute('cssImported')!='true'){var csses=tinyMCE.getCSSClasses(editor_id);if(csses&&selectElm){for(var i=0;i<csses.length;i++){selectElm.options[selectElm.length]=new Option(csses[i],csses[i]);}}if(csses!=null&&csses.length>0){selectElm.setAttribute('cssImported','true');}}};
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_template_src.js b/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_template_src.js index abaabf8..0f1d321 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_template_src.js +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/editor_template_src.js @@ -3,7 +3,6 @@ tinyMCE.importThemeLanguagePack('advanced'); // Variable declarations var TinyMCE_advanced_autoImportCSSClasses = true; -var TinyMCE_advanced_foreColor = "#000000"; var TinyMCE_advanced_resizer = new Object(); var TinyMCE_advanced_buttons = [ // Control id, button img, button title, command, user_interface, value @@ -69,13 +68,13 @@ function TinyMCE_advanced_getControlHTML(button_name) { if (buttonTileMap[x] == but[1]) { - return '<img id="{$editor_id}_' + but[0] +'" src="{$themeurl}/images/spacer.gif" style="background-image:url({$themeurl}/images/buttons.gif); background-position: ' + (0-(x*20)) + 'px 0px" title="' + but[2] + '" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'' + but[3] + '\', ' + (but.length > 4 ? but[4] : false) + (but.length > 5 ? ', \'' + but[5] + '\'' : '') + ')">'; + return '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'' + but[3] + '\', ' + (but.length > 4 ? but[4] : false) + (but.length > 5 ? ', \'' + but[5] + '\'' : '') + ')" onmousedown="return false;"><img id="{$editor_id}_' + but[0] +'" src="{$themeurl}/images/spacer.gif" style="background-image:url({$themeurl}/images/buttons.gif); background-position: ' + (0-(x*20)) + 'px 0px" title="' + but[2] + '" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>'; } } } // Old style - return '<img id="{$editor_id}_' + but[0] + '" src="{$themeurl}/images/' + but[1] + '" title="' + but[2] + '" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'' + but[3] + '\', ' + (but.length > 4 ? but[4] : false) + (but.length > 5 ? ', \'' + but[5] + '\'' : '') + ')">'; + return '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'' + but[3] + '\', ' + (but.length > 4 ? but[4] : false) + (but.length > 5 ? ', \'' + but[5] + '\'' : '') + ')" onmousedown="return false;"><img id="{$editor_id}_' + but[0] + '" src="{$themeurl}/images/' + but[1] + '" title="' + but[2] + '" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>'; } } @@ -83,7 +82,7 @@ function TinyMCE_advanced_getControlHTML(button_name) switch (button_name) { case "formatselect": - var html = '<select id="{$editor_id}_formatSelect" name="{$editor_id}_formatSelect" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FormatBlock\',false,this.options[this.selectedIndex].value);" class="mceSelectList">'; + var html = '<select id="{$editor_id}_formatSelect" name="{$editor_id}_formatSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FormatBlock\',false,this.options[this.selectedIndex].value);" class="mceSelectList">'; var formats = tinyMCE.getParam("theme_advanced_blockformats", "p,address,pre,h1,h2,h3,h4,h5,h6", true).split(','); var lookup = [ ['p', '{$lang_theme_paragraph}'], @@ -117,35 +116,27 @@ function TinyMCE_advanced_getControlHTML(button_name) case "styleselect": //styleselect - return '<select id="{$editor_id}_styleSelect" onmousedown="TinyMCE_advanced_setupCSSClasses(\'{$editor_id}\');" name="{$editor_id}_styleSelect" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSetCSSClass\',false,this.options[this.selectedIndex].value);" class="mceSelectList">{$style_select_options}</select>'; + return '<select id="{$editor_id}_styleSelect" onmousedown="TinyMCE_advanced_setupCSSClasses(\'{$editor_id}\');" name="{$editor_id}_styleSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSetCSSClass\',false,this.options[this.selectedIndex].value);" class="mceSelectList">{$style_select_options}</select>'; case "fontselect": - //fontselect - return '<select id="{$editor_id}_fontNameSelect" name="{$editor_id}_fontNameSelect" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontName\',false,this.options[this.selectedIndex].value);" class="mceSelectList">\ - <option value="">{$lang_theme_fontdefault}</option>\ - <option value="andale mono,times">Andale Mono</option>\ - <option value="arial,helvetica,sans-serif">Arial</option>\ - <option value="arial black,avant garde">Arial Black</option>\ - <option value="book antiqua,palatino">Book Antiqua</option>\ - <option value="comic sans ms,sand">Comic Sans MS</option>\ - <option value="courier new,courier">Courier New</option>\ - <option value="georgia,palatino">Georgia</option>\ - <option value="helvetica">Helvetica</option>\ - <option value="impact,chicago">Impact</option>\ - <option value="symbol">Symbol</option>\ - <option value="tahoma,arial,helvetica,sans-serif">Tahoma</option>\ - <option value="terminal,monaco">Terminal</option>\ - <option value="times new roman,times">Times New Roman</option>\ - <option value="trebuchet ms,geneva">Trebuchet MS</option>\ - <option value="verdana,geneva">Verdana</option>\ - <option value="webdings">Webdings</option>\ - <option value="wingdings,zapf dingbats">Wingdings</option>\ - </select>'; + var fontHTML = '<select id="{$editor_id}_fontNameSelect" name="{$editor_id}_fontNameSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontName\',false,this.options[this.selectedIndex].value);" class="mceSelectList"><option value="">{$lang_theme_fontdefault}</option>'; + var iFonts = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings'; + var nFonts = '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,sand;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'; + var fonts = tinyMCE.getParam("theme_advanced_fonts", nFonts).split(';'); + for (var i=0; i<fonts.length; i++) { + if (fonts[i] != '') { + var parts = fonts[i].split('='); + fontHTML += '<option value="' + parts[1] + '">' + parts[0] + '</option>'; + } + } + + fontHTML += '</select>'; + return fontHTML; case "fontsizeselect": //fontsizeselect - return '<select id="{$editor_id}_fontSizeSelect" name="{$editor_id}_fontSizeSelect" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontSize\',false,this.options[this.selectedIndex].value);" class="mceSelectList">\ - <option value="0">-- {$lang_theme_font_size} --</option>\ + return '<select id="{$editor_id}_fontSizeSelect" name="{$editor_id}_fontSizeSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontSize\',false,this.options[this.selectedIndex].value);" class="mceSelectList">\ + <option value="0">{$lang_theme_font_size}</option>\ <option value="1">1 (8 pt)</option>\ <option value="2">2 (10 pt)</option>\ <option value="3">3 (12 pt)</option>\ @@ -178,30 +169,36 @@ function TinyMCE_advanced_execCommand(editor_id, element, command, user_interfac { case "mceForeColor": var template = new Array(); - var inputColor = TinyMCE_advanced_foreColor; + var elm = tinyMCE.selectedInstance.getFocusElement(); + var inputColor = tinyMCE.getAttrib(elm, "color"); + + if (inputColor == '') + inputColor = elm.style.color; if (!inputColor) inputColor = "#000000"; template['file'] = 'color_picker.htm'; template['width'] = 220; - template['height'] = 240; + template['height'] = 190; tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "forecolor", input_color : inputColor}); return true; case "mceBackColor": var template = new Array(); - var inputColor = TinyMCE_advanced_foreColor; + var elm = tinyMCE.selectedInstance.getFocusElement(); + var inputColor = elm.style.backgroundColor; if (!inputColor) - { inputColor = "#000000"; - } template['file'] = 'color_picker.htm'; - template['width'] = 210; - template['height'] = 200; + template['width'] = 220; + template['height'] = 190; + + template['width'] += tinyMCE.getLang('lang_theme_advanced_backcolor_delta_width', 0); + template['height'] += tinyMCE.getLang('lang_theme_advanced_backcolor_delta_height', 0); tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "HiliteColor", input_color : inputColor}); //mceBackColor @@ -214,7 +211,10 @@ function TinyMCE_advanced_execCommand(editor_id, element, command, user_interfac template['file'] = 'color_picker.htm'; template['width'] = 220; - template['height'] = 210; + template['height'] = 190; + + template['width'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width', 0); + template['height'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height', 0); if (typeof(value['store_selection']) == "undefined") value['store_selection'] = true; @@ -233,8 +233,8 @@ function TinyMCE_advanced_execCommand(editor_id, element, command, user_interfac var template = new Array(); template['file'] = 'source_editor.htm'; - template['width'] = tinyMCE.getParam("theme_advanced_source_editor_width", 500); - template['height'] = tinyMCE.getParam("theme_advanced_source_editor_height", 400); + template['width'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_width", 500)); + template['height'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_height", 400)); tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "no", inline : "yes"}); //mceCodeEditor @@ -245,7 +245,10 @@ function TinyMCE_advanced_execCommand(editor_id, element, command, user_interfac template['file'] = 'charmap.htm'; template['width'] = 550; - template['height'] = 280; + template['height'] = 250; + + template['width'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_width', 0); + template['height'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_height', 0); tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"}); //mceCharMap @@ -256,7 +259,10 @@ function TinyMCE_advanced_execCommand(editor_id, element, command, user_interfac template['file'] = 'anchor.htm'; template['width'] = 320; - template['height'] = 110; + template['height'] = 90; + + template['width'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_width', 0); + template['height'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_height', 0); tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"}); return true; @@ -405,7 +411,6 @@ function TinyMCE_advanced_getEditorTemplate(settings, editorId) toolbarHTML = tinyMCE.replaceVars(toolbarHTML, tinyMCELang); toolbarHTML = tinyMCE.replaceVar(toolbarHTML, 'style_select_options', styleSelectHTML); toolbarHTML = tinyMCE.replaceVar(toolbarHTML, "editor_id", editorId); - toolbarHTML = tinyMCE.replaceVar(toolbarHTML, "default_document", tinyMCE.baseURL + "/blank.htm"); toolbarHTML = tinyMCE.applyTemplate(toolbarHTML); elm.className = "mceToolbarExternal"; @@ -579,10 +584,12 @@ function TinyMCE_advanced_setResizing(e, editor_id, state) { } function TinyMCE_advanced_initInstance(inst) { - var w = TinyMCE_advanced_getCookie("TinyMCE_" + inst.editorId + "_width"); - var h = TinyMCE_advanced_getCookie("TinyMCE_" + inst.editorId + "_height"); + if (tinyMCE.getParam("theme_advanced_resizing", false)) { + var w = TinyMCE_advanced_getCookie("TinyMCE_" + inst.editorId + "_width"); + var h = TinyMCE_advanced_getCookie("TinyMCE_" + inst.editorId + "_height"); - TinyMCE_advanced_resizeTo(inst, w, h, tinyMCE.getParam("theme_advanced_resize_horizontal", true)); + TinyMCE_advanced_resizeTo(inst, w, h, tinyMCE.getParam("theme_advanced_resize_horizontal", true)); + } } function TinyMCE_advanced_setCookie(name, value, expires, path, domain, secure) { @@ -718,8 +725,8 @@ function TinyMCE_advanced_getInsertLinkTemplate() var template = new Array(); template['file'] = 'link.htm'; - template['width'] = 300; - template['height'] = 150; + template['width'] = 330; + template['height'] = 170; // Language specific width and height addons template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0); @@ -737,7 +744,7 @@ function TinyMCE_advanced_getInsertImageTemplate() template['file'] = 'image.htm?src={$src}'; template['width'] = 340; - template['height'] = 280; + template['height'] = 245; // Language specific width and height addons template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0); @@ -827,11 +834,9 @@ function TinyMCE_advanced_handleNodeChange (editor_id, node, undo_index, nodeData += "id: " + path[i].getAttribute('id') + " "; } - var className = tinyMCE.getVisualAidClass(getAttrib(path[i], "className"), false); + var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false); if (className != "" && className.indexOf('mceItem') == -1) - { nodeData += "class: " + className + " "; - } if (getAttrib(path[i], 'src') != "") { @@ -858,11 +863,9 @@ function TinyMCE_advanced_handleNodeChange (editor_id, node, undo_index, if (getAttrib(path[i], 'name').indexOf("mce_") != 0) { - var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "className"), false); + var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false); if (className != "" && className.indexOf('mceItem') == -1) - { nodeName += "." + className; - } } if (tinyMCE.isMSIE) @@ -883,14 +886,6 @@ function TinyMCE_advanced_handleNodeChange (editor_id, node, undo_index, pathElm.innerHTML = tinyMCE.getLang('lang_theme_path') + ": " + html + ' '; } - // Get element color - var colorElm = tinyMCE.getParentElement(node, "font", "color"); - - if (colorElm) - { - TinyMCE_advanced_foreColor = "" + colorElm.color.toUpperCase(); - } - // Reset old states tinyMCE.switchClassSticky(editor_id + '_justifyleft', 'mceButtonNormal'); tinyMCE.switchClassSticky(editor_id + '_justifyright', 'mceButtonNormal'); @@ -911,7 +906,7 @@ function TinyMCE_advanced_handleNodeChange (editor_id, node, undo_index, tinyMCE.switchClassSticky(editor_id + '_image', 'mceButtonNormal'); tinyMCE.switchClassSticky(editor_id + '_hr', 'mceButtonNormal'); - if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, "class").indexOf('mceItemAnchor') != -1) + if (node.nodeName == "A" && tinyMCE.getAttrib(node, "class").indexOf('mceItemAnchor') != -1) tinyMCE.switchClassSticky(editor_id + '_anchor', 'mceButtonSelected'); // Get link @@ -999,36 +994,44 @@ function TinyMCE_advanced_handleNodeChange (editor_id, node, undo_index, // Select fontselect var selectElm = document.getElementById(editor_id + "_fontNameSelect"); - - if (selectElm) - { - var elm = tinyMCE.getParentElement(node, "font", "face"); - - if (elm) - { - selectByValue(selectElm, elm.getAttribute("face")); - } - else - { + if (selectElm) { + var elm = tinyMCE.getParentElement(node); + + if (elm) { + var family = tinyMCE.getAttrib(elm, "face"); + if (family == '') + family = '' + elm.style.fontFamily; + + if (!selectByValue(selectElm, family)) + selectByValue(selectElm, ""); + } else selectByValue(selectElm, ""); - } } // Select fontsize var selectElm = document.getElementById(editor_id + "_fontSizeSelect"); + if (selectElm) { + var elm = tinyMCE.getParentElement(node); - if (selectElm) - { - var elm = tinyMCE.getParentElement(node, "font", "size"); - - if (elm && getAttrib(elm, "size") != "") - { - selectByValue(selectElm, elm.getAttribute("size")); - } - else - { + if (elm) { + var size = tinyMCE.getAttrib(elm, "size"); + if (size == '') { + var sizes = new Array('', '8px', '10px', '12px', '14px', '18px', '24px', '36px'); + + size = '' + elm.style.fontSize; + + for (var i=0; i<sizes.length; i++) { + if (('' + sizes[i]) == size) { + size = i; + break; + } + } + } + + if (!selectByValue(selectElm, size)) + selectByValue(selectElm, ""); + } else selectByValue(selectElm, "0"); - } } // Handle align attributes diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/image.htm b/wp-inst/wp-includes/js/tinymce/themes/advanced/image.htm index 920b28f..7e7d533 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/image.htm +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/image.htm @@ -1,110 +1,11 @@ -<html> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> -<title>{$lang_insert_image_title}</title> -<script language="javascript" src="../../tiny_mce_popup.js"></script> -<script language="javascript"> -var url = tinyMCE.getParam("external_image_list_url"); -if (url != null) { - // Fix relative - if (url.charAt(0) != '/') - url = tinyMCE.documentBasePath + "/" + url; - - document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>'); -} -</script> -<script language="javascript"> - function insertImage() { - if (window.opener) { - var src = document.forms[0].src.value; - var alt = document.forms[0].alt.value; - var border = document.forms[0].border.value; - var vspace = document.forms[0].vspace.value; - var hspace = document.forms[0].hspace.value; - var width = document.forms[0].width.value; - var height = document.forms[0].height.value; - var align = document.forms[0].align.options[document.forms[0].align.selectedIndex].value; - - window.opener.tinyMCE.insertImage(src, alt, border, hspace, vspace, width, height, align); - top.close(); - } - } - - function init() { - // Focus form field - document.getElementById('src').focus(); - var formObj = document.forms[0]; - - for (var i=0; i<document.forms[0].align.options.length; i++) { - if (document.forms[0].align.options[i].value == tinyMCE.getWindowArg('align')) - document.forms[0].align.options.selectedIndex = i; - } - - formObj.src.value = tinyMCE.getWindowArg('src'); - formObj.alt.value = tinyMCE.getWindowArg('alt'); - formObj.border.value = tinyMCE.getWindowArg('border'); - formObj.vspace.value = tinyMCE.getWindowArg('vspace'); - formObj.hspace.value = tinyMCE.getWindowArg('hspace'); - formObj.width.value = tinyMCE.getWindowArg('width'); - formObj.height.value = tinyMCE.getWindowArg('height'); - formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true); - - // Handle file browser - if (tinyMCE.getParam("file_browser_callback") != null) { - document.getElementById('src').style.width = '180px'; - - var html = ''; - - html += '<img id="browserBtn" src="images/browse.gif"'; - html += ' onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');"'; - html += ' onmouseout="tinyMCE.restoreClass(this);"'; - html += ' onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');"'; - html += ' onclick="javascript:tinyMCE.openFileBrowser(\'src\',document.forms[0].src.value,\'image\',window);"'; - html += ' width="20" height="18" border="0" title="' + tinyMCE.getLang('lang_browse') + '"'; - html += ' class="mceButtonNormal" alt="' + tinyMCE.getLang('lang_browse') + '" />'; - - document.getElementById('browser').innerHTML = html; - } - - // Auto select image in list - if (typeof(tinyMCEImageList) != "undefined" && tinyMCEImageList.length > 0) { - for (var i=0; i<formObj.image_list.length; i++) { - if (formObj.image_list.options[i].value == tinyMCE.getWindowArg('src')) - formObj.image_list.options[i].selected = true; - } - } - } - - function cancelAction() { - tinyMCE.closeDialog(); - } - - var preloadImg = new Image(); - - function resetImageData() { - var formObj = document.forms[0]; - formObj.width.value = formObj.height.value = ""; - } - - function updateImageData() { - var formObj = document.forms[0]; - - if (formObj.width.value == "") - formObj.width.value = preloadImg.width; - - if (formObj.height.value == "") - formObj.height.value = preloadImg.height; - } - - function getImageData() { - preloadImg = new Image(); - tinyMCE.addEvent(preloadImg, "load", updateImageData); - tinyMCE.addEvent(preloadImg, "error", function () {var formObj = document.forms[0];formObj.width.value = formObj.height.value = "";}); - preloadImg.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], document.forms[0].src.value); - } - -</script> + <title>{$lang_insert_image_title}</title> + <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script> + <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script> + <script language="javascript" type="text/javascript" src="jscripts/image.js"></script> </head> -<body onload="init();"> +<body onload="init();" style="display: none"> <form onsubmit="insertImage();return false;"> <table border="0" cellpadding="0" cellspacing="0" width="200"> <tr> @@ -116,8 +17,8 @@ if (url != null) { <td nowrap="nowrap">{$lang_insert_image_src}:</td> <td><table border="0" cellspacing="0" cellpadding="0"> <tr> - <td><input name="src" type="text" id="src" value="http://" style="width: 200px" onchange="getImageData();"></td> - <td id="browser"></td> + <td><input name="src" type="text" id="src" value="" style="width: 200px" onchange="getImageData();"></td> + <td><script language="javascript" type="text/javascript">renderBrowser('srcbrowser','src','image','theme_advanced_image');</script></td> </tr> </table></td> </tr> @@ -158,27 +59,28 @@ if (url != null) { <option value="right">{$lang_insert_image_align_right}</option> </select></td> </tr> - <tr style="display: none;"> + <tr> <td nowrap="nowrap">{$lang_insert_image_dimensions}:</td> <td><input name="width" type="text" id="width" value="" size="3" maxlength="3"> x <input name="height" type="text" id="height" value="" size="3" maxlength="3"></td> </tr> - <tr style="display: none;"> + <tr> <td nowrap="nowrap">{$lang_insert_image_border}:</td> <td><input name="border" type="text" id="border" value="" size="3" maxlength="3"></td> </tr> - <tr style="display: none;"> + <tr> <td nowrap="nowrap">{$lang_insert_image_vspace}:</td> <td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3"></td> </tr> - <tr style="display: none;"> + <tr> <td nowrap="nowrap">{$lang_insert_image_hspace}:</td> <td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3"></td> </tr> <tr> - <td nowrap="nowrap"><input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onClick="cancelAction();"></td> - <td align="right"><input type="submit" id="insert" name="insert" value="{$lang_insert}" onClick="insertImage();"> </td> + <td nowrap="nowrap"><input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertImage();"> + </td> + <td align="right"><input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();"></td> </tr> </table></td> </tr> diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/anchor.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/anchor.gif Binary files differindex ae7b2f3..34ab715 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/anchor.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/anchor.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/anchor_symbol.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/anchor_symbol.gif Binary files differnew file mode 100644 index 0000000..2eafd79 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/anchor_symbol.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/backcolor.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/backcolor.gif Binary files differindex d44277d..8a532e5 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/backcolor.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/backcolor.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold.gif Binary files differindex 31f004b..d6a9cc2 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold_de_se.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold_de_se.gif Binary files differindex 2d86b00..9b129de 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold_de_se.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold_de_se.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold_fr.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold_fr.gif Binary files differindex 7782282..2816454 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold_fr.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold_fr.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold_ru.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold_ru.gif Binary files differindex c9e89b2..e000d46 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold_ru.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bold_ru.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/browse.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/browse.gif Binary files differindex 590f2de..c786d0b 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/browse.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/browse.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bullist.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bullist.gif Binary files differindex 12d0ec2..6e19467 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bullist.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/bullist.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/buttons.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/buttons.gif Binary files differindex b5e454c..5d5e08b 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/buttons.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/buttons.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/cancel_button_bg.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/cancel_button_bg.gif Binary files differnew file mode 100644 index 0000000..4b4aeef --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/cancel_button_bg.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/center.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/center.gif Binary files differindex a9e13e0..42d609a 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/center.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/center.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/charmap.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/charmap.gif Binary files differindex b826f88..3cdc4ac 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/charmap.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/charmap.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/cleanup.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/cleanup.gif Binary files differindex 87b8f87..16491f6 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/cleanup.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/cleanup.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/close.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/close.gif Binary files differindex 78883bd..679ca2a 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/close.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/close.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/code.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/code.gif Binary files differindex e16da11..c5d5a67 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/code.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/code.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/color.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/color.gif Binary files differnew file mode 100644 index 0000000..1ecd574 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/color.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/copy.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/copy.gif Binary files differindex f0b5187..dc14686 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/copy.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/copy.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/custom_1.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/custom_1.gif Binary files differindex 5e385c0..4cbccda 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/custom_1.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/custom_1.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/cut.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/cut.gif Binary files differindex 6a969e5..4e9a70b 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/cut.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/cut.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/forecolor.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/forecolor.gif Binary files differindex db21e1c..d5e3814 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/forecolor.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/forecolor.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/full.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/full.gif Binary files differindex 5a78c63..c8504f6 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/full.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/full.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/help.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/help.gif Binary files differindex a5d6771..51a1ee4 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/help.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/help.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/hr.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/hr.gif Binary files differindex 8e6b34d..1a1ba2a 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/hr.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/hr.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/image.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/image.gif Binary files differindex 36109de..4b88edd 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/image.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/image.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/indent.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/indent.gif Binary files differindex 7a17288..acd315b 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/indent.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/indent.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/insert_button_bg.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/insert_button_bg.gif Binary files differnew file mode 100644 index 0000000..69c131c --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/insert_button_bg.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/italic.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/italic.gif Binary files differindex ec03278..8bb330b 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/italic.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/italic.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/italic_de_se.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/italic_de_se.gif Binary files differindex 6ce0d8d..feb0309 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/italic_de_se.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/italic_de_se.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/italic_ru.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/italic_ru.gif Binary files differindex 5c2f7fe..a2bb69a 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/italic_ru.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/italic_ru.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/left.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/left.gif Binary files differindex 4225e00..e8f7e42 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/left.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/left.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/link.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/link.gif Binary files differindex 0de4274..1accf42 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/link.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/link.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/newdocument.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/newdocument.gif Binary files differindex 79a93da..a9d2938 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/newdocument.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/newdocument.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/numlist.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/numlist.gif Binary files differindex 7ff907b..a268352 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/numlist.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/numlist.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/outdent.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/outdent.gif Binary files differindex 53e89a7..23f6aa4 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/outdent.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/outdent.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/paste.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/paste.gif Binary files differindex a676604..1b45000 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/paste.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/paste.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/redo.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/redo.gif Binary files differindex 26a146b..3af9069 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/redo.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/redo.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/removeformat.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/removeformat.gif Binary files differindex 38a9cdf..0fa3cb7 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/removeformat.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/removeformat.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/right.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/right.gif Binary files differindex 88bfaf2..e4cea97 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/right.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/right.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/spacer.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/spacer.gif Binary files differindex fc25609..3884865 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/spacer.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/spacer.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/strikethrough.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/strikethrough.gif Binary files differindex ce7b653..3264635 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/strikethrough.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/strikethrough.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/sub.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/sub.gif Binary files differindex 4818407..4d7ce30 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/sub.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/sub.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/sup.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/sup.gif Binary files differindex 03f8efc..a7145e0 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/sup.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/sup.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table.gif Binary files differindex f8a0054..2911830 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_delete_col.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_delete_col.gif Binary files differindex 0b2f0fb..91f53af 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_delete_col.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_delete_col.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_delete_row.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_delete_row.gif Binary files differindex 1997065..7025733 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_delete_row.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_delete_row.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_col_after.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_col_after.gif Binary files differindex c30dafa..8505808 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_col_after.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_col_after.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_col_before.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_col_before.gif Binary files differindex 5d1ff37..b669d4f 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_col_before.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_col_before.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_row_after.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_row_after.gif Binary files differindex c3aa15f..b9c1446 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_row_after.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_row_after.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_row_before.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_row_before.gif Binary files differindex c3271e5..157d373 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_row_before.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/table_insert_row_before.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/underline.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/underline.gif Binary files differindex d6b8afd..1dfeb5f 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/underline.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/underline.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/underline_fr.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/underline_fr.gif Binary files differindex a8e3018..551d914 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/underline_fr.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/underline_fr.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/underline_ru.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/underline_ru.gif Binary files differindex 2a517e8..b78e2a4 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/underline_ru.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/underline_ru.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/undo.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/undo.gif Binary files differindex b0722d0..520796d 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/undo.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/undo.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/unlink.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/unlink.gif Binary files differindex dd073a2..5c8a33d 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/unlink.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/unlink.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/visualaid.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/visualaid.gif Binary files differindex 188b348..63caf18 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/visualaid.gif +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/visualaid.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/Thumbs.db b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/Thumbs.db Binary files differnew file mode 100644 index 0000000..de5e662 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/Thumbs.db diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tab_bg.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tab_bg.gif Binary files differnew file mode 100644 index 0000000..897a01f --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tab_bg.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tab_end.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tab_end.gif Binary files differnew file mode 100644 index 0000000..aee442b --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tab_end.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tab_sel_bg.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tab_sel_bg.gif Binary files differnew file mode 100644 index 0000000..9dc8abe --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tab_sel_bg.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tab_sel_end.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tab_sel_end.gif Binary files differnew file mode 100644 index 0000000..616a889 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tab_sel_end.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tabs_bg.gif b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tabs_bg.gif Binary files differnew file mode 100644 index 0000000..c303f66 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/images/xp/tabs_bg.gif diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/about.js b/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/about.js new file mode 100644 index 0000000..99162e2 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/about.js @@ -0,0 +1,74 @@ +function init() {
+ tinyMCEPopup.resizeToInnerSize();
+
+ // Give FF some time
+ window.setTimeout('insertHelpIFrame();', 10);
+
+ var tcont = document.getElementById('plugintablecontainer');
+ var plugins = tinyMCE.getParam('plugins', '', true, ',');
+ if (plugins.length == 0)
+ document.getElementById('plugins_tab').style.display = 'none';
+
+ var html = "";
+ html += '<table id="plugintable">';
+ html += '<thead>';
+ html += '<tr>';
+ html += '<td>' + tinyMCE.getLang('lang_plugin') + '</td>';
+ html += '<td>' + tinyMCE.getLang('lang_author') + '</td>';
+ html += '<td>' + tinyMCE.getLang('lang_version') + '</td>';
+ html += '</tr>';
+ html += '</thead>';
+ html += '<tbody>';
+
+ for (var i=0; i<plugins.length; i++) {
+ var info = getPluginInfo(plugins[i]);
+
+ html += '<tr>';
+
+ if (info.infourl != null && info.infourl != '')
+ html += '<td width="50%" title="' + plugins[i] + '"><a href="' + info.infourl + '" target="_blank">' + info.longname + '</a></td>';
+ else
+ html += '<td width="50%" title="' + plugins[i] + '">' + info.longname + '</td>';
+
+ if (info.authorurl != null && info.authorurl != '')
+ html += '<td width="35%"><a href="' + info.authorurl + '" target="_blank">' + info.author + '</a></td>';
+ else
+ html += '<td width="35%">' + info.author + '</td>';
+
+ html += '<td width="15%">' + info.version + '</td>';
+ html += '</tr>';
+ }
+
+ html += '</tbody>';
+ html += '</table>';
+
+ tcont.innerHTML = html;
+}
+
+function getPluginInfo(name) {
+ var fn = eval('tinyMCEPopup.windowOpener.TinyMCE_' + name + '_getInfo');
+
+ if (typeof(fn) != 'undefined')
+ return fn();
+
+ return {
+ longname : name,
+ authorurl : '',
+ infourl : '',
+ author : '--',
+ version : '--'
+ };
+}
+
+function insertHelpIFrame() {
+ var html = '<iframe width="100%" height="300" src="' + tinyMCE.themeURL + "/docs/" + tinyMCE.settings['docs_language'] + "/index.htm" + '"></iframe>';
+
+ document.getElementById('iframecontainer').innerHTML = html;
+
+ html = '';
+ html += '<a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a> ';
+ html += '<a href="http://sourceforge.net/projects/tinymce/" target="_blank"><img src="http://sourceforge.net/sflogo.php?group_id=103281" alt="Hosted By Sourceforge" border="0" /></a> ';
+ html += '<a href="http://www.freshmeat.net/projects/tinymce" target="_blank"><img src="http://tinymce.moxiecode.com/images/fm.gif" alt="Also on freshmeat" border="0" /></a> ';
+
+ document.getElementById('buttoncontainer').innerHTML = html;
+}
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/anchor.js b/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/anchor.js new file mode 100644 index 0000000..446a3ce --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/anchor.js @@ -0,0 +1,59 @@ +var action, element;
+
+function init() {
+ tinyMCEPopup.resizeToInnerSize();
+
+ var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
+ var anchor = tinyMCE.getParentElement(inst.getFocusElement(), "a", "name");
+ var img = inst.getFocusElement();
+ action = 'insert';
+
+ if (anchor != null) {
+ element = anchor;
+ action = "update";
+ }
+
+ if (tinyMCE.getAttrib(img, "class") == "mceItemAnchor") {
+ element = img;
+ action = "update";
+ }
+
+ if (action == "update")
+ document.forms[0].anchorName.value = element.nodeName == "IMG" ? element.getAttribute("title") : element.getAttribute("name");
+
+ document.forms[0].insert.value = tinyMCE.getLang('lang_' + action, 'Insert', true);
+}
+
+function insertAnchor() {
+ var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
+ var name = document.forms[0].anchorName.value;
+
+ tinyMCEPopup.execCommand("mceBeginUndoLevel");
+
+ if (action == "update") {
+ if (element.nodeName == "IMG")
+ element.setAttribute("title", name);
+ else
+ element.setAttribute("name", name);
+ } else {
+ var rng = inst.getRng();
+
+ if (rng.collapse)
+ rng.collapse(false);
+
+ name = name.replace(/&/g, '&');
+ name = name.replace(/\"/g, '"');
+ name = name.replace(/</g, '<');
+ name = name.replace(/>/g, '&gr;');
+
+ html = '<a name="' + name + '"></a>';
+
+ tinyMCEPopup.execCommand("mceInsertContent", false, html);
+ tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst);
+ }
+
+ tinyMCEPopup.execCommand("mceEndUndoLevel");
+
+ tinyMCE.triggerNodeChange();
+ tinyMCEPopup.close();
+}
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/charmap.js b/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/charmap.js new file mode 100644 index 0000000..c26fb27 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/charmap.js @@ -0,0 +1,325 @@ +function init() {
+ tinyMCEPopup.resizeToInnerSize();
+}
+
+var charmap = new Array();
+
+// for mor details please see w3c.org
+// now here is the complete list ;)
+
+charmap = [
+ [' ', ' ', true, 'no-break space'],
+ ['&', '&', true, 'ampersand'],
+ ['"', '"', true, 'quotation mark'],
+// finance
+ ['¢', '¢', true, 'cent sign'],
+ ['€', '€', true, 'euro sign'],
+ ['£', '£', true, 'pound sign'],
+ ['¥', '¥', true, 'yen sign'],
+// signs
+ ['©', '©', true, 'copyright sign'],
+ ['®', '®', true, 'registered sign'],
+ ['™', '™', true, 'trade mark sign'],
+ ['‰', '‰', true, 'per mille sign'],
+ ['µ', 'µ', true, 'micro sign'],
+ ['·', '·', true, 'middle dot'],
+ ['•', '•', true, 'bullet'],
+ ['…', '…', true, 'three dot leader'],
+ ['′', '′', true, 'minutes / feet'],
+ ['″', '″', true, 'seconds / inches'],
+ ['§', '§', true, 'section sign'],
+ ['¶', '¶', true, 'paragraph sign'],
+ ['ß', 'ß', true, 'sharp s / ess-zed'],
+// quotations
+ ['‹', '‹', true, 'single left-pointing angle quotation mark'],
+ ['›', '›', true, 'single right-pointing angle quotation mark'],
+ ['«', '«', true, 'left pointing guillemet'],
+ ['»', '»', true, 'right pointing guillemet'],
+ ['‘', '‘', true, 'left single quotation mark'],
+ ['’', '’', true, 'right single quotation mark'],
+ ['“', '“', true, 'left double quotation mark'],
+ ['”', '”', true, 'right double quotation mark'],
+ ['‚', '‚', true, 'single low-9 quotation mark'],
+ ['„', '„', true, 'double low-9 quotation mark'],
+ ['<', '<', true, 'less-than sign'],
+ ['>', '>', true, 'greater-than sign'],
+ ['≤', '≤', true, 'less-than or equal to'],
+ ['≥', '≥', true, 'greater-than or equal to'],
+ ['–', '–', true, 'en dash'],
+ ['—', '—', true, 'em dash'],
+ ['¯', '¯', true, 'macron'],
+ ['‾', '‾', true, 'overline'],
+ ['¤', '¤', true, 'currency sign'],
+ ['¦', '¦', true, 'broken bar'],
+ ['¨', '¨', true, 'diaeresis'],
+ ['¡', '¡', true, 'inverted exclamation mark'],
+ ['¿', '¿', true, 'turned question mark'],
+ ['ˆ', 'ˆ', true, 'circumflex accent'],
+ ['˜', '˜', true, 'small tilde'],
+ ['°', '°', true, 'degree sign'],
+ ['−', '−', true, 'minus sign'],
+ ['±', '±', true, 'plus-minus sign'],
+ ['÷', '÷', true, 'division sign'],
+ ['⁄', '⁄', true, 'fraction slash'],
+ ['×', '×', true, 'multiplication sign'],
+ ['¹', '¹', true, 'superscript one'],
+ ['²', '²', true, 'superscript two'],
+ ['³', '³', true, 'superscript three'],
+ ['¼', '¼', true, 'fraction one quarter'],
+ ['½', '½', true, 'fraction one half'],
+ ['¾', '¾', true, 'fraction three quarters'],
+// math / logical
+ ['ƒ', 'ƒ', true, 'function / florin'],
+ ['∫', '∫', true, 'integral'],
+ ['∑', '∑', true, 'n-ary sumation'],
+ ['∞', '∞', true, 'infinity'],
+ ['√', '√', true, 'square root'],
+ ['∼', '∼', false,'similar to'],
+ ['≅', '≅', false,'approximately equal to'],
+ ['≈', '≈', true, 'almost equal to'],
+ ['≠', '≠', true, 'not equal to'],
+ ['≡', '≡', true, 'identical to'],
+ ['∈', '∈', false,'element of'],
+ ['∉', '∉', false,'not an element of'],
+ ['∋', '∋', false,'contains as member'],
+ ['∏', '∏', true, 'n-ary product'],
+ ['∧', '∧', false,'logical and'],
+ ['∨', '∨', false,'logical or'],
+ ['¬', '¬', true, 'not sign'],
+ ['∩', '∩', true, 'intersection'],
+ ['∪', '∪', false,'union'],
+ ['∂', '∂', true, 'partial differential'],
+ ['∀', '∀', false,'for all'],
+ ['∃', '∃', false,'there exists'],
+ ['∅', '∅', false,'diameter'],
+ ['∇', '∇', false,'backward difference'],
+ ['∗', '∗', false,'asterisk operator'],
+ ['∝', '∝', false,'proportional to'],
+ ['∠', '∠', false,'angle'],
+// undefined
+ ['´', '´', true, 'acute accent'],
+ ['¸', '¸', true, 'cedilla'],
+ ['ª', 'ª', true, 'feminine ordinal indicator'],
+ ['º', 'º', true, 'masculine ordinal indicator'],
+ ['†', '†', true, 'dagger'],
+ ['‡', '‡', true, 'double dagger'],
+// alphabetical special chars
+ ['À', 'À', true, 'A - grave'],
+ ['Á', 'Á', true, 'A - acute'],
+ ['Â', 'Â', true, 'A - circumflex'],
+ ['Ã', 'Ã', true, 'A - tilde'],
+ ['Ä', 'Ä', true, 'A - diaeresis'],
+ ['Å', 'Å', true, 'A - ring above'],
+ ['Æ', 'Æ', true, 'ligature AE'],
+ ['Ç', 'Ç', true, 'C - cedilla'],
+ ['È', 'È', true, 'E - grave'],
+ ['É', 'É', true, 'E - acute'],
+ ['Ê', 'Ê', true, 'E - circumflex'],
+ ['Ë', 'Ë', true, 'E - diaeresis'],
+ ['Ì', 'Ì', true, 'I - grave'],
+ ['Í', 'Í', true, 'I - acute'],
+ ['Î', 'Î', true, 'I - circumflex'],
+ ['Ï', 'Ï', true, 'I - diaeresis'],
+ ['Ð', 'Ð', true, 'ETH'],
+ ['Ñ', 'Ñ', true, 'N - tilde'],
+ ['Ò', 'Ò', true, 'O - grave'],
+ ['Ó', 'Ó', true, 'O - acute'],
+ ['Ô', 'Ô', true, 'O - circumflex'],
+ ['Õ', 'Õ', true, 'O - tilde'],
+ ['Ö', 'Ö', true, 'O - diaeresis'],
+ ['Ø', 'Ø', true, 'O - slash'],
+ ['Œ', 'Œ', true, 'ligature OE'],
+ ['Š', 'Š', true, 'S - caron'],
+ ['Ù', 'Ù', true, 'U - grave'],
+ ['Ú', 'Ú', true, 'U - acute'],
+ ['Û', 'Û', true, 'U - circumflex'],
+ ['Ü', 'Ü', true, 'U - diaeresis'],
+ ['Ý', 'Ý', true, 'Y - acute'],
+ ['Ÿ', 'Ÿ', true, 'Y - diaeresis'],
+ ['Þ', 'Þ', true, 'THORN'],
+ ['à', 'à', true, 'a - grave'],
+ ['á', 'á', true, 'a - acute'],
+ ['â', 'â', true, 'a - circumflex'],
+ ['ã', 'ã', true, 'a - tilde'],
+ ['ä', 'ä', true, 'a - diaeresis'],
+ ['å', 'å', true, 'a - ring above'],
+ ['æ', 'æ', true, 'ligature ae'],
+ ['ç', 'ç', true, 'c - cedilla'],
+ ['è', 'è', true, 'e - grave'],
+ ['é', 'é', true, 'e - acute'],
+ ['ê', 'ê', true, 'e - circumflex'],
+ ['ë', 'ë', true, 'e - diaeresis'],
+ ['ì', 'ì', true, 'i - grave'],
+ ['í', 'í', true, 'i - acute'],
+ ['î', 'î', true, 'i - circumflex'],
+ ['ï', 'ï', true, 'i - diaeresis'],
+ ['ð', 'ð', true, 'eth'],
+ ['ñ', 'ñ', true, 'n - tilde'],
+ ['ò', 'ò', true, 'o - grave'],
+ ['ó', 'ó', true, 'o - acute'],
+ ['ô', 'ô', true, 'o - circumflex'],
+ ['õ', 'õ', true, 'o - tilde'],
+ ['ö', 'ö', true, 'o - diaeresis'],
+ ['ø', 'ø', true, 'o slash'],
+ ['œ', 'œ', true, 'ligature oe'],
+ ['š', 'š', true, 's - caron'],
+ ['ù', 'ù', true, 'u - grave'],
+ ['ú', 'ú', true, 'u - acute'],
+ ['û', 'û', true, 'u - circumflex'],
+ ['ü', 'ü', true, 'u - diaeresis'],
+ ['ý', 'ý', true, 'y - acute'],
+ ['þ', 'þ', true, 'thorn'],
+ ['ÿ', 'ÿ', true, 'y - diaeresis'],
+// ['Α', 'Α', true, 'Alpha'],
+ ['Β', 'Β', true, 'Beta'],
+ ['Γ', 'Γ', true, 'Gamma'],
+ ['Δ', 'Δ', true, 'Delta'],
+ ['Ε', 'Ε', true, 'Epsilon'],
+ ['Ζ', 'Ζ', true, 'Zeta'],
+ ['Η', 'Η', true, 'Eta'],
+ ['Θ', 'Θ', true, 'Theta'],
+ ['Ι', 'Ι', true, 'Iota'],
+ ['Κ', 'Κ', true, 'Kappa'],
+ ['Λ', 'Λ', true, 'Lambda'],
+ ['Μ', 'Μ', true, 'Mu'],
+ ['Ν', 'Ν', true, 'Nu'],
+ ['Ξ', 'Ξ', true, 'Xi'],
+ ['Ο', 'Ο', true, 'Omicron'],
+ ['Π', 'Π', true, 'Pi'],
+ ['Ρ', 'Ρ', true, 'Rho'],
+ ['Σ', 'Σ', true, 'Sigma'],
+ ['Τ', 'Τ', true, 'Tau'],
+ ['Υ', 'Υ', true, 'Upsilon'],
+ ['Φ', 'Φ', true, 'Phi'],
+ ['Χ', 'Χ', true, 'Chi'],
+ ['Ψ', 'Ψ', true, 'Psi'],
+ ['Ω', 'Ω', true, 'Omega'],
+ ['α', 'α', true, 'alpha'],
+ ['β', 'β', true, 'beta'],
+ ['γ', 'γ', true, 'gamma'],
+ ['δ', 'δ', true, 'delta'],
+ ['ε', 'ε', true, 'epsilon'],
+ ['ζ', 'ζ', true, 'zeta'],
+ ['η', 'η', true, 'eta'],
+ ['θ', 'θ', true, 'theta'],
+ ['ι', 'ι', true, 'iota'],
+ ['κ', 'κ', true, 'kappa'],
+ ['λ', 'λ', true, 'lambda'],
+ ['μ', 'μ', true, 'mu'],
+ ['ν', 'ν', true, 'nu'],
+ ['ξ', 'ξ', true, 'xi'],
+ ['ο', 'ο', true, 'omicron'],
+ ['π', 'π', true, 'pi'],
+ ['ρ', 'ρ', true, 'rho'],
+ ['ς', 'ς', true, 'final sigma'],
+ ['σ', 'σ', true, 'sigma'],
+ ['τ', 'τ', true, 'tau'],
+ ['υ', 'υ', true, 'upsilon'],
+ ['φ', 'φ', true, 'phi'],
+ ['χ', 'χ', true, 'chi'],
+ ['ψ', 'ψ', true, 'psi'],
+ ['ω', 'ω', true, 'omega'],
+// symbols
+ ['ℵ', 'ℵ', false,'alef symbol'],
+ ['ϖ', 'ϖ', false,'pi symbol'],
+ ['ℜ', 'ℜ', false,'real part symbol'],
+ ['ϑ','ϑ', false,'theta symbol'],
+ ['ϒ', 'ϒ', false,'upsilon - hook symbol'],
+ ['℘', '℘', false,'Weierstrass p'],
+ ['ℑ', 'ℑ', false,'imaginary part'],
+// arrows
+ ['←', '←', true, 'leftwards arrow'],
+ ['↑', '↑', true, 'upwards arrow'],
+ ['→', '→', true, 'rightwards arrow'],
+ ['↓', '↓', true, 'downwards arrow'],
+ ['↔', '↔', true, 'left right arrow'],
+ ['↵', '↵', false,'carriage return'],
+ ['⇐', '⇐', false,'leftwards double arrow'],
+ ['⇑', '⇑', false,'upwards double arrow'],
+ ['⇒', '⇒', false,'rightwards double arrow'],
+ ['⇓', '⇓', false,'downwards double arrow'],
+ ['⇔', '⇔', false,'left right double arrow'],
+ ['∴', '∴', false,'therefore'],
+ ['⊂', '⊂', false,'subset of'],
+ ['⊃', '⊃', false,'superset of'],
+ ['⊄', '⊄', false,'not a subset of'],
+ ['⊆', '⊆', false,'subset of or equal to'],
+ ['⊇', '⊇', false,'superset of or equal to'],
+ ['⊕', '⊕', false,'circled plus'],
+ ['⊗', '⊗', false,'circled times'],
+ ['⊥', '⊥', false,'perpendicular'],
+ ['⋅', '⋅', false,'dot operator'],
+ ['⌈', '⌈', false,'left ceiling'],
+ ['⌉', '⌉', false,'right ceiling'],
+ ['⌊', '⌊', false,'left floor'],
+ ['⌋', '⌋', false,'right floor'],
+ ['⟨', '〈', false,'left-pointing angle bracket'],
+ ['⟩', '〉', false,'right-pointing angle bracket'],
+ ['◊', '◊', true,'lozenge'],
+ ['♠', '♠', false,'black spade suit'],
+ ['♣', '♣', true, 'black club suit'],
+ ['♥', '♥', true, 'black heart suit'],
+ ['♦', '♦', true, 'black diamond suit'],
+ [' ', ' ', false,'en space'],
+ [' ', ' ', false,'em space'],
+ [' ', ' ', false,'thin space'],
+ ['‌', '‌', false,'zero width non-joiner'],
+ ['‍', '‍', false,'zero width joiner'],
+ ['‎', '‎', false,'left-to-right mark'],
+ ['‏', '‏', false,'right-to-left mark'],
+ ['­', '­', false,'soft hyphen']
+];
+
+function renderCharMapHTML() {
+ var charsPerRow = 20, tdWidth=20, tdHeight=20;
+ var html = '<table border="0" cellspacing="1" cellpadding="0" width="' + (tdWidth*charsPerRow) + '"><tr height="' + tdHeight + '">';
+ var cols=-1;
+ for (var i=0; i<charmap.length; i++) {
+ if (charmap[i][2]==true) {
+ cols++;
+ html += ''
+ + '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap"'
+ + ' onmouseover="tinyMCE.switchClass(this,\'charmapOver\');'
+ + 'previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');"'
+ + ' onmouseout="tinyMCE.restoreClass(this,\'charmapOver\');"'
+ + ' onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');return false;"'
+ + ' title="' + charmap[i][3] + '" nowrap="nowrap">'
+ + charmap[i][1]
+ + '</td>';
+ if ((cols+1) % charsPerRow == 0)
+ html += '</tr><tr height="' + tdHeight + '">';
+ }
+ }
+ if (cols % charsPerRow > 0) {
+ var padd = charsPerRow - (cols % charsPerRow);
+ for (var i=0; i<padd-1; i++)
+ html += '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap"> </td>';
+ }
+ html += '</tr></table>';
+ document.write(html);
+}
+
+function insertChar(chr) {
+ tinyMCEPopup.execCommand('mceInsertContent', false, '\&#' + chr + ';');
+
+ // Refocus in window
+ if (tinyMCEPopup.isWindow)
+ window.focus();
+}
+
+function previewChar(codeA, codeB, codeN) {
+ var elmA = document.getElementById('codeA');
+ var elmB = document.getElementById('codeB');
+ var elmV = document.getElementById('codeV');
+ var elmN = document.getElementById('codeN');
+
+ if (codeA=='#160;') {
+ elmV.innerHTML = '__';
+ } else {
+ elmV.innerHTML = '&' + codeA;
+ }
+
+ elmB.innerHTML = '&' + codeA;
+ elmA.innerHTML = '&' + codeB;
+ elmN.innerHTML = codeN;
+}
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/color_picker.js b/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/color_picker.js new file mode 100644 index 0000000..aab668e --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/color_picker.js @@ -0,0 +1,107 @@ +function init() {
+ if (tinyMCE.isMSIE)
+ tinyMCEPopup.resizeToInnerSize();
+}
+
+function selectColor() {
+ var color = document.getElementById("selectedColorBox").value;
+
+ tinyMCEPopup.execCommand(tinyMCE.getWindowArg('command'), false, color);
+ tinyMCEPopup.close();
+}
+
+function showColor(color) {
+ document.getElementById("selectedColor").style.backgroundColor = color;
+ document.getElementById("selectedColorBox").value = color;
+}
+
+var colors = new Array(
+ "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
+ "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
+ "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
+ "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
+ "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
+ "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
+ "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
+ "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
+ "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
+ "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
+ "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
+ "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
+ "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
+ "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
+ "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
+ "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
+ "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
+ "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
+ "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
+ "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
+ "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
+ "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
+ "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
+ "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
+ "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
+ "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
+ "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
+);
+
+function convertRGBToHex(col) {
+ var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
+
+ var rgb = col.replace(re, "$1,$2,$3").split(',');
+ if (rgb.length == 3) {
+ r = parseInt(rgb[0]).toString(16);
+ g = parseInt(rgb[1]).toString(16);
+ b = parseInt(rgb[2]).toString(16);
+
+ r = r.length == 1 ? '0' + r : r;
+ g = g.length == 1 ? '0' + g : g;
+ b = b.length == 1 ? '0' + b : b;
+
+ return "#" + r + g + b;
+ }
+
+ return col;
+}
+
+function convertHexToRGB(col) {
+ if (col.indexOf('#') != -1) {
+ col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
+
+ r = parseInt(col.substring(0, 2), 16);
+ g = parseInt(col.substring(2, 4), 16);
+ b = parseInt(col.substring(4, 6), 16);
+
+ return "rgb(" + r + "," + g + "," + b + ")";
+ }
+
+ return col;
+}
+
+function renderColorMap() {
+ var html = "";
+ var inputColor = convertRGBToHex(tinyMCE.getWindowArg('input_color'));
+
+ html += '<table border="0" cellspacing="1" cellpadding="0">'
+ + '<tr>';
+ for (var i=0; i<colors.length; i++) {
+ html += '<td bgcolor="' + colors[i] + '">'
+ + '<a href="javascript:selectColor();" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');">'
+ + '<img border="0" src="images/spacer.gif" width="10" height="10" title="' + colors[i] + '" alt="' + colors[i] + '" /></a></td>';
+ if ((i+1) % 18 == 0)
+ html += '</tr><tr>';
+ }
+ html += '<tr><td colspan="18">'
+ + '<table width="100%" border="0" cellspacing="0" cellpadding="0">'
+ + '<tr><td>'
+ + '<img id="selectedColor" style="background-color:' + tinyMCE.getWindowArg('input_color') + '" border="0" src="images/spacer.gif" width="80" height="16" />'
+ + '</td><td align="right">'
+ + '<input id="selectedColorBox" name="selectedColorBox" type="text" size="7" maxlength="7" style="width:65px" value="' + inputColor + '" />'
+ + '</td></tr>'
+ + '</table>'
+ + '<input type="button" id="insert" name="insert" value="{$lang_theme_colorpicker_apply}" style="margin-top:3px" onclick="selectColor();">'
+ + '</td></tr>'
+ + '</table>';
+
+ document.write(html);
+}
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/image.js b/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/image.js new file mode 100644 index 0000000..ea9c348 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/image.js @@ -0,0 +1,80 @@ +var url = tinyMCE.getParam("external_image_list_url");
+if (url != null) {
+ // Fix relative
+ if (url.charAt(0) != '/')
+ url = tinyMCE.documentBasePath + "/" + url;
+
+ document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
+}
+
+function insertImage() {
+ if (window.opener) {
+ var src = document.forms[0].src.value;
+ var alt = document.forms[0].alt.value;
+ var border = document.forms[0].border.value;
+ var vspace = document.forms[0].vspace.value;
+ var hspace = document.forms[0].hspace.value;
+ var width = document.forms[0].width.value;
+ var height = document.forms[0].height.value;
+ var align = document.forms[0].align.options[document.forms[0].align.selectedIndex].value;
+
+ window.opener.tinyMCE.insertImage(src, alt, border, hspace, vspace, width, height, align);
+ top.close();
+ }
+}
+
+function init() {
+ tinyMCEPopup.resizeToInnerSize();
+
+ var formObj = document.forms[0];
+
+ for (var i=0; i<document.forms[0].align.options.length; i++) {
+ if (document.forms[0].align.options[i].value == tinyMCE.getWindowArg('align'))
+ document.forms[0].align.options.selectedIndex = i;
+ }
+
+ formObj.src.value = tinyMCE.getWindowArg('src');
+ formObj.alt.value = tinyMCE.getWindowArg('alt');
+ formObj.border.value = tinyMCE.getWindowArg('border');
+ formObj.vspace.value = tinyMCE.getWindowArg('vspace');
+ formObj.hspace.value = tinyMCE.getWindowArg('hspace');
+ formObj.width.value = tinyMCE.getWindowArg('width');
+ formObj.height.value = tinyMCE.getWindowArg('height');
+ formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);
+
+ // Handle file browser
+ if (isVisible('srcbrowser'))
+ document.getElementById('src').style.width = '180px';
+
+ // Auto select image in list
+ if (typeof(tinyMCEImageList) != "undefined" && tinyMCEImageList.length > 0) {
+ for (var i=0; i<formObj.image_list.length; i++) {
+ if (formObj.image_list.options[i].value == tinyMCE.getWindowArg('src'))
+ formObj.image_list.options[i].selected = true;
+ }
+ }
+}
+
+var preloadImg = new Image();
+
+function resetImageData() {
+ var formObj = document.forms[0];
+ formObj.width.value = formObj.height.value = "";
+}
+
+function updateImageData() {
+ var formObj = document.forms[0];
+
+ if (formObj.width.value == "")
+ formObj.width.value = preloadImg.width;
+
+ if (formObj.height.value == "")
+ formObj.height.value = preloadImg.height;
+}
+
+function getImageData() {
+ preloadImg = new Image();
+ tinyMCE.addEvent(preloadImg, "load", updateImageData);
+ tinyMCE.addEvent(preloadImg, "error", function () {var formObj = document.forms[0];formObj.width.value = formObj.height.value = "";});
+ preloadImg.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], document.forms[0].src.value);
+}
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/link.js b/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/link.js new file mode 100644 index 0000000..369e489 --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/link.js @@ -0,0 +1,55 @@ +var url = tinyMCE.getParam("external_link_list_url");
+if (url != null) {
+ // Fix relative
+ if (url.charAt(0) != '/')
+ url = tinyMCE.documentBasePath + "/" + url;
+
+ document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
+}
+
+function init() {
+ tinyMCEPopup.resizeToInnerSize();
+
+ var formObj = document.forms[0];
+
+ for (var i=0; i<document.forms[0].target.options.length; i++) {
+ var option = document.forms[0].target.options[i];
+
+ if (option.value == tinyMCE.getWindowArg('target'))
+ option.selected = true;
+ }
+
+ document.forms[0].href.value = tinyMCE.getWindowArg('href');
+ document.forms[0].linktitle.value = tinyMCE.getWindowArg('title');
+ document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);
+
+ addClassesToList('styleSelect', 'theme_advanced_link_styles');
+ selectByValue(formObj, 'styleSelect', tinyMCE.getWindowArg('className'), true);
+
+ // Handle file browser
+ if (isVisible('hrefbrowser'))
+ document.getElementById('href').style.width = '180px';
+
+ // Auto select link in list
+ if (typeof(tinyMCELinkList) != "undefined" && tinyMCELinkList.length > 0) {
+ var formObj = document.forms[0];
+
+ for (var i=0; i<formObj.link_list.length; i++) {
+ if (formObj.link_list.options[i].value == tinyMCE.getWindowArg('href'))
+ formObj.link_list.options[i].selected = true;
+ }
+ }
+}
+
+function insertLink() {
+ if (window.opener) {
+ var href = document.forms[0].href.value;
+ var target = document.forms[0].target.options[document.forms[0].target.selectedIndex].value;
+ var title = document.forms[0].linktitle.value;
+ var style_class = document.forms[0].styleSelect.value;
+ var dummy;
+
+ window.opener.tinyMCE.insertLink(href, target, title, dummy, style_class);
+ tinyMCEPopup.close();
+ }
+}
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/source_editor.js b/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/source_editor.js new file mode 100644 index 0000000..5a374ae --- /dev/null +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/jscripts/source_editor.js @@ -0,0 +1,54 @@ +function saveContent() {
+ tinyMCE.setContent(document.getElementById('htmlSource').value);
+ tinyMCE.closeWindow(window);
+}
+
+// Fixes some charcode issues
+function fixContent(html) {
+ html = html.replace(new RegExp('<(p|hr|table|tr|td|ol|ul|object|embed|li|blockquote)', 'gi'),'\n<$1');
+ html = html.replace(new RegExp('<\/(p|ol|ul|li|table|tr|td|blockquote|object)>', 'gi'),'</$1>\n');
+ html = tinyMCE.regexpReplace(html, '<br />','<br />\n','gi');
+ html = tinyMCE.regexpReplace(html, '\n\n','\n','gi');
+ return html;
+}
+
+function onLoadInit() {
+ tinyMCEPopup.resizeToInnerSize();
+
+ document.forms[0].htmlSource.value = fixContent(tinyMCE.getContent(tinyMCE.getWindowArg('editor_id')));
+ resizeInputs();
+ setWrap('off');
+}
+
+function setWrap(val) {
+ // hard soft off
+ document.forms[0].htmlSource.wrap = val;
+}
+
+function toggleWordWrap(elm) {
+ if (elm.checked)
+ setWrap('soft');
+ else
+ setWrap('off');
+}
+
+var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
+
+function resizeInputs() {
+ if (!tinyMCE.isMSIE) {
+ wHeight = self.innerHeight-80;
+ wWidth = self.innerWidth-16;
+ } else {
+ wHeight = document.body.clientHeight-80;
+ wWidth = document.body.clientWidth-16;
+ }
+
+ document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';
+ document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px';
+
+}
+
+function renderWordWrap() {
+ if (tinyMCE.isMSIE)
+ document.write('<input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{$lang_theme_code_wordwrap}</label>');
+}
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/langs/en.js b/wp-inst/wp-includes/js/tinymce/themes/advanced/langs/en.js index 3306747..893dba9 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/langs/en.js +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/langs/en.js @@ -1,62 +1,75 @@ // UK lang variables
-tinyMCELang['lang_theme_style_select'] = '-- Styles --';
-tinyMCELang['lang_theme_code_desc'] = 'Edit HTML Source';
-tinyMCELang['lang_theme_code_title'] = 'HTML Source Editor';
-tinyMCELang['lang_theme_code_wordwrap'] = 'Word wrap';
-tinyMCELang['lang_theme_sub_desc'] = 'Subscript';
-tinyMCELang['lang_theme_sup_desc'] = 'Superscript';
-tinyMCELang['lang_theme_hr_desc'] = 'Insert horizontal ruler';
-tinyMCELang['lang_theme_removeformat_desc'] = 'Remove formatting';
-tinyMCELang['lang_theme_custom1_desc'] = 'Your custom description here';
-tinyMCELang['lang_insert_image_border'] = 'Border';
-tinyMCELang['lang_insert_image_dimensions'] = 'Dimensions';
-tinyMCELang['lang_insert_image_vspace'] = 'VSpace';
-tinyMCELang['lang_insert_image_hspace'] = 'HSpace';
-tinyMCELang['lang_insert_image_align'] = 'Alignment';
-tinyMCELang['lang_insert_image_align_default'] = 'Default';
-tinyMCELang['lang_insert_image_align_baseline'] = 'Baseline';
-tinyMCELang['lang_insert_image_align_top'] = 'Top';
-tinyMCELang['lang_insert_image_align_middle'] = 'Middle';
-tinyMCELang['lang_insert_image_align_bottom'] = 'Bottom';
-tinyMCELang['lang_insert_image_align_texttop'] = 'TextTop';
-tinyMCELang['lang_insert_image_align_absmiddle'] = 'Absolute Middle';
-tinyMCELang['lang_insert_image_align_absbottom'] = 'Absolute Bottom';
-tinyMCELang['lang_insert_image_align_left'] = 'Left';
-tinyMCELang['lang_insert_image_align_right'] = 'Right';
-tinyMCELang['lang_theme_font_size'] = 'Font size';
-tinyMCELang['lang_theme_fontdefault'] = '-- Font family --';
-tinyMCELang['lang_theme_block'] = '-- Format --';
-tinyMCELang['lang_theme_paragraph'] = 'Paragraph';
-tinyMCELang['lang_theme_div'] = 'Div';
-tinyMCELang['lang_theme_address'] = 'Address';
-tinyMCELang['lang_theme_pre'] = 'Preformatted';
-tinyMCELang['lang_theme_h1'] = 'Heading 1';
-tinyMCELang['lang_theme_h2'] = 'Heading 2';
-tinyMCELang['lang_theme_h3'] = 'Heading 3';
-tinyMCELang['lang_theme_h4'] = 'Heading 4';
-tinyMCELang['lang_theme_h5'] = 'Heading 5';
-tinyMCELang['lang_theme_h6'] = 'Heading 6';
-tinyMCELang['lang_theme_colorpicker_title'] = 'Select a color';
-tinyMCELang['lang_theme_colorpicker_apply'] = 'Apply';
-tinyMCELang['lang_theme_forecolor_desc'] = 'Select text color';
-tinyMCELang['lang_theme_backcolor_desc'] = 'Select background color';
-tinyMCELang['lang_theme_charmap_title'] = 'Select custom character';
-tinyMCELang['lang_theme_charmap_desc'] = 'Insert custom character';
-tinyMCELang['lang_theme_visualaid_desc'] = 'Toggle guidelines/invisible elements';
-tinyMCELang['lang_insert_anchor_title'] = 'Insert/edit anchor';
-tinyMCELang['lang_insert_anchor_name'] = 'Anchor name';
-tinyMCELang['lang_theme_anchor_desc'] = 'Insert/edit anchor';
-tinyMCELang['lang_theme_insert_link_titlefield'] = 'Title';
-tinyMCELang['lang_theme_clipboard_msg'] = 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?';
-tinyMCELang['lang_theme_path'] = 'Path';
-tinyMCELang['lang_cut_desc'] = 'Cut';
-tinyMCELang['lang_copy_desc'] = 'Copy';
-tinyMCELang['lang_paste_desc'] = 'Paste';
-tinyMCELang['lang_link_list'] = 'Link list';
-tinyMCELang['lang_image_list'] = 'Image list';
-tinyMCELang['lang_browse'] = 'Browse';
-tinyMCELang['lang_image_props_desc'] = 'Image properties';
-tinyMCELang['lang_newdocument_desc'] = 'New document';
-tinyMCELang['lang_class'] = 'Class';
-tinyMCELang['lang_newdocument'] = 'Are you sure you want clear all contents?';
+tinyMCE.addToLang('',{
+theme_style_select : '-- Styles --',
+theme_code_desc : 'Edit HTML Source',
+theme_code_title : 'HTML Source Editor',
+theme_code_wordwrap : 'Word wrap',
+theme_sub_desc : 'Subscript',
+theme_sup_desc : 'Superscript',
+theme_hr_desc : 'Insert horizontal ruler',
+theme_removeformat_desc : 'Remove formatting',
+theme_custom1_desc : 'Your custom description here',
+insert_image_border : 'Border',
+insert_image_dimensions : 'Dimensions',
+insert_image_vspace : 'Vertical space',
+insert_image_hspace : 'Horizontal space',
+insert_image_align : 'Alignment',
+insert_image_align_default : '-- Not set --',
+insert_image_align_baseline : 'Baseline',
+insert_image_align_top : 'Top',
+insert_image_align_middle : 'Middle',
+insert_image_align_bottom : 'Bottom',
+insert_image_align_texttop : 'TextTop',
+insert_image_align_absmiddle : 'Absolute Middle',
+insert_image_align_absbottom : 'Absolute Bottom',
+insert_image_align_left : 'Left',
+insert_image_align_right : 'Right',
+theme_font_size : '-- Font size --',
+theme_fontdefault : '-- Font family --',
+theme_block : '-- Format --',
+theme_paragraph : 'Paragraph',
+theme_div : 'Div',
+theme_address : 'Address',
+theme_pre : 'Preformatted',
+theme_h1 : 'Heading 1',
+theme_h2 : 'Heading 2',
+theme_h3 : 'Heading 3',
+theme_h4 : 'Heading 4',
+theme_h5 : 'Heading 5',
+theme_h6 : 'Heading 6',
+theme_colorpicker_title : 'Select a color',
+theme_colorpicker_apply : 'Apply',
+theme_forecolor_desc : 'Select text color',
+theme_backcolor_desc : 'Select background color',
+theme_charmap_title : 'Select custom character',
+theme_charmap_desc : 'Insert custom character',
+theme_visualaid_desc : 'Toggle guidelines/invisible elements',
+insert_anchor_title : 'Insert/edit anchor',
+insert_anchor_name : 'Anchor name',
+theme_anchor_desc : 'Insert/edit anchor',
+theme_insert_link_titlefield : 'Title',
+theme_clipboard_msg : 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?',
+theme_path : 'Path',
+cut_desc : 'Cut',
+copy_desc : 'Copy',
+paste_desc : 'Paste',
+link_list : 'Link list',
+image_list : 'Image list',
+browse : 'Browse',
+image_props_desc : 'Image properties',
+newdocument_desc : 'New document',
+class_name : 'Class',
+newdocument : 'Are you sure you want clear all contents?',
+about_title : 'About TinyMCE',
+about : 'About',
+license : 'License',
+plugins : 'Plugins',
+plugin : 'Plugin',
+author : 'Author',
+version : 'Version',
+loaded_plugins : 'Loaded plugins',
+help : 'Help',
+not_set : '-- Not set --',
+close : 'Close'
+});
diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/link.htm b/wp-inst/wp-includes/js/tinymce/themes/advanced/link.htm index 12cb326..53d686e 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/link.htm +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/link.htm @@ -1,111 +1,11 @@ -<html> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> -<title>{$lang_insert_link_title}</title> -<script language="javascript" src="../../tiny_mce_popup.js"></script> -<script language="javascript"> -var url = tinyMCE.getParam("external_link_list_url"); -if (url != null) { - // Fix relative - if (url.charAt(0) != '/') - url = tinyMCE.documentBasePath + "/" + url; - - document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>'); -} -</script> -<script language="javascript"> - function init() { - for (var i=0; i<document.forms[0].target.options.length; i++) { - var option = document.forms[0].target.options[i]; - - if (option.value == tinyMCE.getWindowArg('target')) - option.selected = true; - } - - document.forms[0].href.value = tinyMCE.getWindowArg('href'); - document.forms[0].linktitle.value = tinyMCE.getWindowArg('title'); - document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true); - - var className = tinyMCE.getWindowArg('className'); - var styleSelectElm = document.forms[0].styleSelect; - var stylesAr = tinyMCE.getParam('theme_advanced_styles', false); - if (stylesAr) { - stylesAr = stylesAr.split(';'); - - for (var i=0; i<stylesAr.length; i++) { - var key, value; - - key = stylesAr[i].split('=')[0]; - value = stylesAr[i].split('=')[1]; - - styleSelectElm.options[styleSelectElm.length] = new Option(key, value); - if (value == className) - styleSelectElm.options.selectedIndex = styleSelectElm.options.length-1; - } - } else { - var csses = tinyMCE.getCSSClasses(tinyMCE.getWindowArg('editor_id')); - for (var i=0; i<csses.length; i++) { - styleSelectElm.options[styleSelectElm.length] = new Option(csses[i], csses[i]); - if (csses[i] == className) - styleSelectElm.options.selectedIndex = styleSelectElm.options.length-1; - } - } - - // Hide it if there is no styles - if (styleSelectElm.options.length == 1) { - document.getElementById('styleSelectRow').style.display = "none"; - document.getElementById('styleSelectRow').style.overflow = "hidden"; - document.getElementById('styleSelectRow').style.height = "0px"; - } - - // Handle file browser - if (tinyMCE.getParam("file_browser_callback") != null) { - document.getElementById('href').style.width = '180px'; - - var html = ''; - - html += '<img id="browserBtn" src="images/browse.gif"'; - html += ' onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');"'; - html += ' onmouseout="tinyMCE.restoreClass(this);"'; - html += ' onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');"'; - html += ' onclick="javascript:tinyMCE.openFileBrowser(\'href\',document.forms[0].href.value,\'file\',window);"'; - html += ' width="20" height="18" border="0" title="' + tinyMCE.getLang('lang_browse') + '"'; - html += ' class="mceButtonNormal" alt="' + tinyMCE.getLang('lang_browse') + '" />'; - - document.getElementById('browser').innerHTML = html; - } - - // Auto select link in list - if (typeof(tinyMCELinkList) != "undefined" && tinyMCELinkList.length > 0) { - var formObj = document.forms[0]; - - for (var i=0; i<formObj.link_list.length; i++) { - if (formObj.link_list.options[i].value == tinyMCE.getWindowArg('href')) - formObj.link_list.options[i].selected = true; - } - } - // Focus form field - document.getElementById('href').focus(); - } - - function insertLink() { - if (window.opener) { - var href = document.forms[0].href.value; - var target = null; - var title = document.forms[0].linktitle.value; - var style_class = document.forms[0].styleSelect.value; - var dummy; - - window.opener.tinyMCE.insertLink(href, target, title, dummy, style_class); - tinyMCE.closeDialog(); - } - } - - function cancelAction() { - tinyMCE.closeDialog(); - } -</script> + <title>{$lang_insert_link_title}</title> + <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script> + <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script> + <script language="javascript" type="text/javascript" src="jscripts/link.js"></script> </head> -<body onload="init();"> +<body onload="init();" style="display: none"> <form onsubmit="insertLink();return false;"> <table border="0" cellpadding="0" cellspacing="0" width="100"> <tr> @@ -117,8 +17,8 @@ if (url != null) { <td nowrap="nowrap">{$lang_insert_link_url}:</td> <td> <table border="0" cellspacing="0" cellpadding="0"> <tr> - <td><input name="href" type="text" id="href" value="http://" style="width: 200px"></td> - <td id="browser"></td> + <td><input name="href" type="text" id="href" value="" style="width: 200px"></td> + <td><script language="javascript" type="text/javascript">renderBrowser('hrefbrowser','href','file','theme_advanced_link');</script></td> </tr> </table></td> </tr> @@ -140,12 +40,13 @@ if (url != null) { } </script> <!-- /Link list --> - <tr style="display: none;"> + <tr> <td nowrap="nowrap">{$lang_insert_link_target}:</td> <td><select name="target" style="width: 200px"> - <option value="">{$lang_insert_link_target_same}</option> + <option value="_self">{$lang_insert_link_target_same}</option> <option value="_blank">{$lang_insert_link_target_blank}</option> <script language="javascript"> + var html = ""; var targets = tinyMCE.getParam('theme_advanced_link_targets', '').split(';'); for (var i=0; i<targets.length; i++) { @@ -168,18 +69,19 @@ if (url != null) { <td nowrap="nowrap">{$lang_theme_insert_link_titlefield}:</td> <td><input name="linktitle" type="text" id="linktitle" value="" style="width: 200px"></td> </tr> - <tr id="styleSelectRow" style="display: none;"> - <td>{$lang_class}:</td> + <tr id="styleSelectRow"> + <td>{$lang_class_name}:</td> <td> - <select name="styleSelect"> + <select id="styleSelect" name="styleSelect"> <option value="" selected>{$lang_theme_style_select}</option> </select></td> <td align="right"> </td> <td align="right"> </td> </tr> <tr> - <td><input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onClick="cancelAction();"></td> - <td align="right"><input type="submit" id="insert" name="insert" value="Create hyperlink" onClick="insertLink();"> </td> + <td><input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertLink();"> + </td> + <td align="right"><input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();"></td> </tr> </table></td> </tr> diff --git a/wp-inst/wp-includes/js/tinymce/themes/advanced/source_editor.htm b/wp-inst/wp-includes/js/tinymce/themes/advanced/source_editor.htm index 4f68fd4..2c24522 100644 --- a/wp-inst/wp-includes/js/tinymce/themes/advanced/source_editor.htm +++ b/wp-inst/wp-includes/js/tinymce/themes/advanced/source_editor.htm @@ -1,86 +1,29 @@ -<html> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> -<title>{$lang_theme_code_title}</title> -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> -<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script> -<script language="javascript" type="text/javascript"> -<!-- - tinyMCE.setWindowArg('mce_windowresize', false); - - function saveContent() { - if (window.opener) { - window.opener.tinyMCE.setContent(document.getElementById('htmlSource').value); - window.close(); - } - } - - // Fixes some charcode issues - function fixContent(html) { - html = html.replace(new RegExp('<(p|hr|table|tr|td|ol|ul|object|embed|li|blockquote)', 'gi'),'\n<$1'); - html = html.replace(new RegExp('<\/(p|ol|ul|li|table|tr|td|blockquote|object)>', 'gi'),'</$1>\n'); - html = tinyMCE.regexpReplace(html, '<br />','<br />\n','gi'); - html = tinyMCE.regexpReplace(html, '\n\n','\n','gi'); - return html; - } - - function onLoadInit() { - document.forms[0].htmlSource.value = fixContent(tinyMCE.getContent(tinyMCE.getWindowArg('editor_id'))); - resizeInputs(); - setWrap('off'); - } - - function setWrap(val) { - // hard soft off - document.forms[0].htmlSource.wrap = val; - } - - function toggleWordWrap(elm) { - if (elm.checked) - setWrap('soft'); - else - setWrap('off'); - } - - var wHeight=0, wWidth=0, owHeight=0, owWidth=0; - - function resizeInputs() { - if (!tinyMCE.isMSIE) { - wHeight = self.innerHeight-80; - wWidth = self.innerWidth-25; - } else { - wHeight = document.body.clientHeight-80; - wWidth = document.body.clientWidth-25; - } - - document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px'; - document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px'; - - } -//--> -</script> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title>{$lang_theme_code_title}</title> + <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script> + <script language="javascript" type="text/javascript" src="jscripts/source_editor.js"></script> </head> -<body scroll="no" onload="onLoadInit();" onresize="resizeInputs();"> -<form name="source" onsubmit="saveContent();"> - <table border="0" cellpadding="0" cellspacing="2" align="center"> - <tr> - <td class="title">{$lang_theme_code_title}</td> - <td align="right"><script language="javascript" type="text/javascript"> -<!-- - if (tinyMCE.isMSIE) { - document.write('<input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{$lang_theme_code_wordwrap}</label>'); - } -//--> - </script></td> - </tr> - <tr> - <td colspan="2" align="center"> - <textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft"></textarea> - </td> - </tr> - <tr> - <td colspan="2" align="right"><input type="button" id="insert" name="insert" value="{$lang_update}" onclick="saveContent();" /></td> - </tr> - </table> -</form> +<body onload="onLoadInit();" onresize="resizeInputs();" style="display: none"> + <form name="source" onsubmit="saveContent();" action="#"> + <div style="float: left" class="title">{$lang_theme_code_title}</div> + + <div style="float: right"> + <script language="javascript" type="text/javascript">renderWordWrap();</script> + </div> + + <textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft"></textarea> + + <div class="mceActionPanel"> + <div style="float: left"> + <input type="button" name="insert" value="{$lang_update}" onclick="saveContent();" id="insert" /> + </div> + + <div style="float: right"> + <input type="button" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" id="cancel" /> + </div> + </div> + </form> </body> </html> diff --git a/wp-inst/wp-includes/js/tinymce/tiny_mce.js b/wp-inst/wp-includes/js/tinymce/tiny_mce.js index 144856d..301e129 100644 --- a/wp-inst/wp-includes/js/tinymce/tiny_mce.js +++ b/wp-inst/wp-includes/js/tinymce/tiny_mce.js @@ -1,12 +1,11 @@ /** - * $RCSfile: tiny_mce.js,v $ - * $Revision: 1.256 $ - * $Date: 2005/06/23 12:04:39 $ + * $RCSfile: tiny_mce_src.js,v $ + * $Revision: 1.233 $ + * $Date: 2005/08/26 15:20:32 $ * * @author Moxiecode * @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved. */ - function TinyMCE(){this.instances=new Array();this.stickyClassesLookup=new Array();this.windowArgs=new Array();this.loadedFiles=new Array();this.configs=new Array();this.currentConfig=0;this.eventHandlers=new Array();this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isMSIE5=this.isMSIE&&(navigator.userAgent.indexOf('MSIE 5')!=-1);this.isMSIE5_0=this.isMSIE&&(navigator.userAgent.indexOf('MSIE 5.0')!=-1);this.isGecko=navigator.userAgent.indexOf('Gecko')!=-1;this.isSafari=navigator.userAgent.indexOf('Safari')!=-1;this.isMac=navigator.userAgent.indexOf('Mac')!=-1;this.dialogCounter=0;this.idCounter=0;};TinyMCE.prototype.defParam=function(key,def_val){this.settings[key]=tinyMCE.getParam(key,def_val);};TinyMCE.prototype.init=function(settings){var theme;this.settings=settings;if(typeof(document.execCommand)=='undefined')return;if(!tinyMCE.baseURL){var elements=document.getElementsByTagName('script');for(var i=0;i<elements.length;i++){if(elements[i].src&&(elements[i].src.indexOf("tiny_mce.js")!=-1||elements[i].src.indexOf("tiny_mce_src.js")!=-1||elements[i].src.indexOf("tiny_mce_gzip.php")!=-1)){var src=elements[i].src;tinyMCE.srcMode=(src.indexOf('_src')!=-1)?'_src':'';src=src.substring(0,src.lastIndexOf('/'));tinyMCE.baseURL=src;break;}}}this.documentBasePath=document.location.href;if(this.documentBasePath.indexOf('?')!=-1)this.documentBasePath=this.documentBasePath.substring(0,this.documentBasePath.indexOf('?'));this.documentURL=this.documentBasePath;this.documentBasePath=this.documentBasePath.substring(0,this.documentBasePath.lastIndexOf('/'));if(tinyMCE.baseURL.indexOf('://')==-1&&tinyMCE.baseURL.charAt(0)!='/'){tinyMCE.baseURL=this.documentBasePath+"/"+tinyMCE.baseURL;}this.defParam("mode","none");this.defParam("theme","advanced");this.defParam("plugins","",true);this.defParam("language","en");this.defParam("docs_language",this.settings['language']);this.defParam("elements","");this.defParam("textarea_trigger","mce_editable");this.defParam("valid_elements","+a[name|href|target|title|class],strong/b[class],em/i[class],strike[class],u[class],+p[dir|class|align],ol,ul,li,br,img[class|src|border=0|alt|title|hspace|vspace|width|height|align],sub,sup,blockquote[dir|style],table[border=0|cellspacing|cellpadding|width|height|class|align],tr[class|rowspan|width|height|align|valign],td[dir|class|colspan|rowspan|width|height|align|valign],div[dir|class|align],span[class|align],pre[class|align],address[class|align],h1[dir|class|align],h2[dir|class|align],h3[dir|class|align],h4[dir|class|align],h5[dir|class|align],h6[dir|class|align],hr");this.defParam("extended_valid_elements","");this.defParam("invalid_elements","");this.defParam("encoding","");this.defParam("urlconverter_callback",tinyMCE.getParam("urlconvertor_callback","TinyMCE.prototype.convertURL"));this.defParam("save_callback","");this.defParam("debug",false);this.defParam("force_br_newlines",false);this.defParam("force_p_newlines",true);this.defParam("add_form_submit_trigger",true);this.defParam("relative_urls",true);this.defParam("remove_script_host",true);this.defParam("focus_alert",true);this.defParam("document_base_url",this.documentURL);this.defParam("visual",true);this.defParam("visual_table_class","mceVisualAid");this.defParam("setupcontent_callback","");this.defParam("fix_content_duplication",true);this.defParam("custom_undo_redo",true);this.defParam("custom_undo_redo_levels",-1);this.defParam("custom_undo_redo_keyboard_shortcuts",true);this.defParam("verify_css_classes",false);this.defParam("trim_span_elements",true);this.defParam("verify_html",true);this.defParam("apply_source_formatting",false);this.defParam("directionality","ltr");this.defParam("auto_cleanup_word",false);this.defParam("cleanup_on_startup",false);this.defParam("inline_styles",false);this.defParam("convert_newlines_to_brs",false);this.defParam("auto_reset_designmode",false);this.defParam("entities","160,nbsp,38,amp,34,quot,162,cent,8364,euro,163,pound,165,yen,169,copy,174,reg,8482,trade,8240,permil,181,micro,183,middot,8226,bull,8230,hellip,8242,prime,8243,Prime,167,sect,182,para,223,szlig,8249,lsaquo,8250,rsaquo,171,laquo,187,raquo,8216,lsquo,8217,rsquo,8220,ldquo,8221,rdquo,8218,sbquo,8222,bdquo,60,lt,62,gt,8804,le,8805,ge,8211,ndash,8212,mdash,175,macr,8254,oline,164,curren,166,brvbar,168,uml,161,iexcl,191,iquest,710,circ,732,tilde,176,deg,8722,minus,177,plusmn,247,divide,8260,frasl,215,times,185,sup1,178,sup2,179,sup3,188,frac14,189,frac12,190,frac34,402,fnof,8747,int,8721,sum,8734,infin,8730,radic,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8712,isin,8713,notin,8715,ni,8719,prod,8743,and,8744,or,172,not,8745,cap,8746,cup,8706,part,8704,forall,8707,exist,8709,empty,8711,nabla,8727,lowast,8733,prop,8736,ang,180,acute,184,cedil,170,ordf,186,ordm,8224,dagger,8225,Dagger,192,Agrave,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,202,Ecirc,203,Euml,204,Igrave,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,212,Ocirc,213,Otilde,214,Ouml,216,Oslash,338,OElig,217,Ugrave,219,Ucirc,220,Uuml,376,Yuml,222,THORN,224,agrave,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,234,ecirc,235,euml,236,igrave,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,244,ocirc,245,otilde,246,ouml,248,oslash,339,oelig,249,ugrave,251,ucirc,252,uuml,254,thorn,255,yuml,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,8501,alefsym,982,piv,8476,real,977,thetasym,978,upsih,8472,weierp,8465,image,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8756,there4,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,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,173,shy,233,eacute");this.defParam("entity_encoding","named");this.defParam("cleanup_callback","");this.defParam("add_unload_trigger",true);this.defParam("ask",false);this.defParam("nowrap",false);this.defParam("auto_resize",false);this.defParam("auto_focus",false);this.defParam("cleanup",true);this.defParam("remove_linebreaks",true);this.defParam("button_tile_map",false);this.defParam("submit_patch",true);this.defParam("browsers","msie,safari,gecko");this.defParam("dialog_type","window");if(this.isMSIE&&this.settings['browsers'].indexOf('msie')==-1)return;if(this.isGecko&&this.settings['browsers'].indexOf('gecko')==-1)return;if(this.isSafari&&this.settings['browsers'].indexOf('safari')==-1)return;var baseHREF=tinyMCE.settings['document_base_url'];if(baseHREF.indexOf('?')!=-1)baseHREF=baseHREF.substring(0,baseHREF.indexOf('?'));this.settings['base_href']=baseHREF.substring(0,baseHREF.lastIndexOf('/'))+"/";theme=this.settings['theme'];this.blockRegExp=new RegExp("^(h1|h2|h3|h4|h5|h6|p|div|address|pre|form|table|li|ol|ul|td)$","i");this.settings['theme_href']=tinyMCE.baseURL+"/themes/"+theme;if(!tinyMCE.isMSIE)this.settings['force_br_newlines']=false;if(tinyMCE.getParam("content_css",false)){var cssPath=tinyMCE.getParam("content_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings['content_css']=this.documentBasePath+"/"+cssPath;else this.settings['content_css']=cssPath;}else this.settings['content_css']=tinyMCE.baseURL+"/themes/"+theme+"/editor_content.css";if(tinyMCE.getParam("popups_css",false)){var cssPath=tinyMCE.getParam("popups_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings['popups_css']=this.documentBasePath+"/"+cssPath;else this.settings['popups_css']=cssPath;}else this.settings['popups_css']=tinyMCE.baseURL+"/themes/"+theme+"/editor_popup.css";if(tinyMCE.getParam("editor_css",false)){var cssPath=tinyMCE.getParam("editor_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings['editor_css']=this.documentBasePath+"/"+cssPath;else this.settings['editor_css']=cssPath;}else this.settings['editor_css']=tinyMCE.baseURL+"/themes/"+theme+"/editor_ui.css";if(tinyMCE.settings['debug']){var msg="Debug: \n";msg+="baseURL: "+this.baseURL+"\n";msg+="documentBasePath: "+this.documentBasePath+"\n";msg+="content_css: "+this.settings['content_css']+"\n";msg+="popups_css: "+this.settings['popups_css']+"\n";msg+="editor_css: "+this.settings['editor_css']+"\n";alert(msg);}this._initCleanup();if(this.configs.length==0){if(this.isSafari)alert("Safari support is very limited and should be considered experimental.\nSo there is no need to even submit bugreports on this early version.");tinyMCE.addEvent(window,"load",TinyMCE.prototype.onLoad);if(tinyMCE.isMSIE){if(tinyMCE.settings['add_unload_trigger']){tinyMCE.addEvent(window,"unload",TinyMCE.prototype.unloadHandler);tinyMCE.addEvent(window.document,"beforeunload",TinyMCE.prototype.unloadHandler);}}else{if(tinyMCE.settings['add_unload_trigger'])tinyMCE.addEvent(window,"unload",function(){tinyMCE.triggerSave(true,true);});}}this.loadScript(tinyMCE.baseURL+'/themes/'+this.settings['theme']+'/editor_template'+tinyMCE.srcMode+'.js');this.loadScript(tinyMCE.baseURL+'/langs/'+this.settings['language']+'.js');this.loadCSS(this.settings['editor_css']);var themePlugins=tinyMCE.getParam('plugins','',true,',');if(this.settings['plugins']!=''){for(var i=0;i<themePlugins.length;i++)this.loadScript(tinyMCE.baseURL+'/plugins/'+themePlugins[i]+'/editor_plugin'+tinyMCE.srcMode+'.js');}settings['index']=this.configs.length;this.configs[this.configs.length]=settings;};TinyMCE.prototype.loadScript=function(url){for(var i=0;i<this.loadedFiles.length;i++){if(this.loadedFiles[i]==url)return;}document.write('<sc'+'ript language="javascript" type="text/javascript" src="'+url+'"></script>');this.loadedFiles[this.loadedFiles.length]=url;};TinyMCE.prototype.loadCSS=function(url){for(var i=0;i<this.loadedFiles.length;i++){if(this.loadedFiles[i]==url)return;}document.write('<link href="'+url+'" rel="stylesheet" type="text/css" />');this.loadedFiles[this.loadedFiles.length]=url;};TinyMCE.prototype.importCSS=function(doc,css_file){if(tinyMCE.isMSIE)var styleSheet=doc.createStyleSheet(css_file);else{var elm=doc.createElement("link");elm.rel="stylesheet";elm.href=css_file;if(headArr=doc.getElementsByTagName("head"))headArr[0].appendChild(elm);}};TinyMCE.prototype.confirmAdd=function(e,settings){var elm=tinyMCE.isMSIE?event.srcElement:e.target;var elementId=elm.name?elm.name:elm.id;tinyMCE.settings=settings;if(!elm.getAttribute('mce_noask')&&confirm(tinyMCELang['lang_edit_confirm']))tinyMCE.addMCEControl(elm,elementId);elm.setAttribute('mce_noask','true');};TinyMCE.prototype.updateContent=function(form_element_name){var formElement=document.getElementById(form_element_name);for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];inst.switchSettings();if(inst.formElement==formElement){var doc=inst.getDoc();tinyMCE._setHTML(doc,inst.formElement.value);if(!tinyMCE.isMSIE)doc.body.innerHTML=tinyMCE._cleanupHTML(doc,this.settings,doc.body,inst.visualAid);}}};TinyMCE.prototype.addMCEControl=function(replace_element,form_element_name,target_document){var id="mce_editor_"+tinyMCE.idCounter++;var inst=new TinyMCEControl(tinyMCE.settings);inst.editorId=id;this.instances[id]=inst;inst.onAdd(replace_element,form_element_name,target_document);};TinyMCE.prototype.triggerSave=function(skip_cleanup,skip_callback){for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];inst.switchSettings();tinyMCE.settings['preformatted']=false;if(typeof(skip_cleanup)=="undefined")skip_cleanup=false;if(typeof(skip_callback)=="undefined")skip_callback=false;tinyMCE._setHTML(inst.getDoc(),inst.getBody().innerHTML);var htm=skip_cleanup?inst.getBody().innerHTML:tinyMCE._cleanupHTML(inst.getDoc(),this.settings,inst.getBody(),this.visualAid,true);if(tinyMCE.settings["encoding"]=="xml"||tinyMCE.settings["encoding"]=="html")htm=tinyMCE.convertStringToXML(htm);if(!skip_callback&&tinyMCE.settings['save_callback']!="")var content=eval(tinyMCE.settings['save_callback']+"(inst.formTargetElementId,htm,inst.getBody());");if((typeof(content)!="undefined")&&content!=null)htm=content;htm=tinyMCE.regexpReplace(htm,"(","(","gi");htm=tinyMCE.regexpReplace(htm,")",")","gi");htm=tinyMCE.regexpReplace(htm,";",";","gi");htm=tinyMCE.regexpReplace(htm,""",""","gi");htm=tinyMCE.regexpReplace(htm,"^","^","gi");if(inst.formElement)inst.formElement.value=htm;}};TinyMCE.prototype._convertOnClick=function(node){if(tinyMCE.isMSIE5)return;var elms=node.getElementsByTagName("a");for(var i=0;i<elms.length;i++){var onclick=elms[i].getAttribute('onclick');if(onclick&&onclick!=""){elms[i].removeAttribute("onclick");elms[i].setAttribute("mce_onclick",tinyMCE.cleanupEventStr(""+onclick));elms[i].onclick=null;}}};TinyMCE.prototype.resetForm=function(form_index){var formObj=document.forms[form_index];for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];inst.switchSettings();for(var i=0;i<formObj.elements.length;i++){if(inst.formTargetElementId==formObj.elements[i].name){inst.getBody().innerHTML=formObj.elements[i].value;return;}}}};TinyMCE.prototype.execInstanceCommand=function(editor_id,command,user_interface,value,focus){var inst=tinyMCE.getInstanceById(editor_id);if(inst){if(typeof(focus)=="undefined")focus=true;if(focus)inst.contentWindow.focus();inst.autoResetDesignMode();this.selectedElement=inst.getFocusElement();this.selectedInstance=inst;tinyMCE.execCommand(command,user_interface,value);}};TinyMCE.prototype.execCommand=function(command,user_interface,value){user_interface=user_interface?user_interface:false;value=value?value:null;if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.switchSettings();switch(command){case 'mceHelp':window.open(tinyMCE.themeURL+"/docs/"+this.settings['docs_language']+"/index.htm","mceHelp","menubar=yes,toolbar=yes,scrollbars=yes,left=20,top=20,width=550,height=600");return;case 'mceFocus':var inst=tinyMCE.getInstanceById(value);if(inst)inst.contentWindow.focus();return;case "mceAddControl":case "mceAddEditor":tinyMCE.addMCEControl(tinyMCE._getElementById(value),value);return;case "mceAddFrameControl":tinyMCE.addMCEControl(tinyMCE._getElementById(value),value['element'],value['document']);return;case "mceRemoveControl":case "mceRemoveEditor":tinyMCE.removeMCEControl(value);return;case "mceResetDesignMode":if(!tinyMCE.isMSIE){for(var n in tinyMCE.instances){try{tinyMCE.instances[n].getDoc().designMode="on";}catch(e){}}}return;}if(this.selectedInstance)this.selectedInstance.execCommand(command,user_interface,value);else if(tinyMCE.settings['focus_alert'])alert(tinyMCELang['lang_focus_alert']);};TinyMCE.prototype.eventPatch=function(editor_id){if(typeof(tinyMCE)=="undefined")return true;for(var i=0;i<document.frames.length;i++){if(document.frames[i].event){var event=document.frames[i].event;event.target=event.srcElement;event.target.editor_id=document.frames[i].editor_id;TinyMCE.prototype.handleEvent(event);return;}}};TinyMCE.prototype.unloadHandler=function(){tinyMCE.triggerSave(true,true);};TinyMCE.prototype.addEventHandlers=function(editor_id){if(tinyMCE.isMSIE){var doc=document.frames[editor_id].document;document.frames[editor_id].editor_id=editor_id;tinyMCE.addEvent(doc,"keypress",TinyMCE.prototype.eventPatch);tinyMCE.addEvent(doc,"keyup",TinyMCE.prototype.eventPatch);tinyMCE.addEvent(doc,"keydown",TinyMCE.prototype.eventPatch);tinyMCE.addEvent(doc,"mouseup",TinyMCE.prototype.eventPatch);tinyMCE.addEvent(doc,"click",TinyMCE.prototype.eventPatch);}else{var inst=tinyMCE.instances[editor_id];var doc=inst.getDoc();inst.switchSettings();doc.editor_id=editor_id;tinyMCE.addEvent(doc,"keypress",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"keypress",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"keydown",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"keyup",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"click",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"mouseup",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"mousedown",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"focus",tinyMCE.handleEvent);eval('try { doc.designMode = "On"; } catch(e) {}');}};TinyMCE.prototype._createIFrame=function(replace_element){var iframe=document.createElement("iframe");var id=replace_element.getAttribute("id");iframe.setAttribute("id",id);iframe.setAttribute("className","mceEditorArea");iframe.setAttribute("border","0");iframe.setAttribute("frameBorder","0");iframe.setAttribute("marginWidth","0");iframe.setAttribute("marginHeight","0");iframe.setAttribute("leftMargin","0");iframe.setAttribute("topMargin","0");iframe.setAttribute("width",tinyMCE.settings['area_width']);iframe.setAttribute("height",tinyMCE.settings['area_height']);iframe.setAttribute("allowtransparency","true");if(tinyMCE.settings["auto_resize"])iframe.setAttribute("scrolling","no");if(tinyMCE.isMSIE)iframe.setAttribute("src",this.settings['default_document']);iframe.style.width=tinyMCE.settings['area_width'];iframe.style.height=tinyMCE.settings['area_height'];if(tinyMCE.isMSIE)replace_element.outerHTML=iframe.outerHTML;else replace_element.parentNode.replaceChild(iframe,replace_element);if(tinyMCE.isMSIE)return window.frames[id];else return iframe;};TinyMCE.prototype.setupContent=function(editor_id){var inst=tinyMCE.instances[editor_id];var doc=inst.getDoc();var head=doc.getElementsByTagName('head').item(0);var content=inst.startContent;inst.switchSettings();if(!tinyMCE.isMSIE&&doc.title!="blank_page"){doc.location.href=tinyMCE.baseURL+"/blank.htm";window.setTimeout("tinyMCE.setupContent('"+editor_id+"');",1000);return;}if(!head){window.setTimeout("tinyMCE.setupContent('"+editor_id+"');",10);return;}tinyMCE.importCSS(inst.getDoc(),inst.settings['content_css']);tinyMCE.executeCallback('init_instance_callback','_initInstance',0,inst);if(tinyMCE.settings['nowrap'])doc.body.style.whiteSpace="nowrap";doc.body.dir=this.settings['directionality'];doc.editorId=editor_id;if(!tinyMCE.isMSIE)doc.documentElement.editorId=editor_id;base=doc.createElement("base");base.setAttribute('href',tinyMCE.settings['base_href']);head.appendChild(base);if(tinyMCE.settings['convert_newlines_to_brs']){content=tinyMCE.regexpReplace(content,"\r\n","<br />","gi");content=tinyMCE.regexpReplace(content,"\r","<br />","gi");content=tinyMCE.regexpReplace(content,"\n","<br />","gi");}content=tinyMCE._customCleanup("insert_to_editor",content);if(tinyMCE.isMSIE){window.setInterval('try{tinyMCE.getCSSClasses(document.frames["'+editor_id+'"].document, "'+editor_id+'");}catch(e){}',500);if(tinyMCE.settings["force_br_newlines"])document.frames[editor_id].document.styleSheets[0].addRule("p","margin: 0px;");var body=document.frames[editor_id].document.body;tinyMCE.addEvent(body,"beforepaste",TinyMCE.prototype.eventPatch);tinyMCE.addEvent(body,"beforecut",TinyMCE.prototype.eventPatch);tinyMCE.addEvent(body,"paste",TinyMCE.prototype.eventPatch);body.editorId=editor_id;}if(!tinyMCE.isMSIE){var contentElement=inst.getDoc().createElement("body");var doc=inst.getDoc();contentElement.innerHTML=content;if(tinyMCE.settings['force_p_newlines'])content=content.replace(new RegExp('<>','g'),"");if(tinyMCE.settings['cleanup_on_startup'])inst.getBody().innerHTML=tinyMCE._cleanupHTML(doc,this.settings,contentElement);else{content=tinyMCE.regexpReplace(content,"<strong","<b","gi");content=tinyMCE.regexpReplace(content,"<em","<i","gi");content=tinyMCE.regexpReplace(content,"</strong>","</b>","gi");content=tinyMCE.regexpReplace(content,"</em>","</i>","gi");inst.getBody().innerHTML=content;}inst.convertAllRelativeURLs();}else{if(tinyMCE.settings['cleanup_on_startup']){tinyMCE._setHTML(inst.getDoc(),content);eval('try {inst.getBody().innerHTML = tinyMCE._cleanupHTML(inst.contentDocument, this.settings, inst.getBody());} catch(e) {}');}else tinyMCE._setHTML(inst.getDoc(),content);}tinyMCE._convertOnClick(inst.getBody());var parentElm=document.getElementById(inst.editorId+'_parent');if(parentElm.lastChild.nodeName.toLowerCase()=="input")inst.formElement=parentElm.lastChild;else inst.formElement=parentElm.nextSibling;tinyMCE.handleVisualAid(inst.getBody(),true,tinyMCE.settings['visual']);tinyMCE.executeCallback('setupcontent_callback','_setupContent',0,editor_id,inst.getBody(),inst.getDoc());if(!tinyMCE.isMSIE)TinyMCE.prototype.addEventHandlers(editor_id);inst.startContent=inst.getBody().innerHTML;tinyMCE.selectedInstance=inst;tinyMCE.selectedElement=inst.contentWindow.document.body;tinyMCE.triggerNodeChange(false,true);tinyMCE._customCleanup("insert_to_editor_dom",inst.contentWindow.document.body);};TinyMCE.prototype.cancelEvent=function(e){if(tinyMCE.isMSIE){e.returnValue=false;e.cancelBubble=true;}else e.preventDefault();};TinyMCE.prototype.removeTinyMCEFormElements=function(form_obj){for(var i=0;i<form_obj.elements.length;i++){var elementId=form_obj.elements[i].name?form_obj.elements[i].name:form_obj.elements[i].id;if(elementId.indexOf('mce_editor_')==0)form_obj.elements[i].disabled=true;}};TinyMCE.prototype.handleEvent=function(e){if(typeof(tinyMCE)=="undefined")return true;switch(e.type){case "submit":tinyMCE.removeTinyMCEFormElements(tinyMCE.isMSIE?window.event.srcElement:e.target);tinyMCE.triggerSave();return;case "reset":var formObj=tinyMCE.isMSIE?window.event.srcElement:e.target;for(var i=0;i<document.forms.length;i++){if(document.forms[i]==formObj)window.setTimeout('tinyMCE.resetForm('+i+');',10);}return;case "paste":if(tinyMCE.settings['auto_cleanup_word']){var editorId=e.target.editorId;if(!editorId)editorId=e.target.ownerDocument.editorId;if(editorId)window.setTimeout("tinyMCE.execInstanceCommand('"+editorId+"', 'mceCleanupWord', false, null);",1);}break;case "beforecut":case "beforepaste":if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.execCommand("mceAddUndoLevel");break;case "keypress":if(e.target.editorId){tinyMCE.selectedInstance=tinyMCE.instances[e.target.editorId];}else{if(e.target.ownerDocument.editorId)tinyMCE.selectedInstance=tinyMCE.instances[e.target.ownerDocument.editorId];}if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.switchSettings();if(tinyMCE.isGecko&&tinyMCE.settings['force_p_newlines']&&e.keyCode==13&&!e.shiftKey){if(tinyMCE.selectedInstance._insertPara(e)){e.preventDefault();return false;}}if(tinyMCE.isGecko&&tinyMCE.settings['force_p_newlines']&&(e.keyCode==8||e.keyCode==46)&&!e.shiftKey){if(tinyMCE.selectedInstance._handleBackSpace(e.type)){e.preventDefault();return false;}}if(!tinyMCE.isMSIE&&e.ctrlKey&&tinyMCE.settings['custom_undo_redo']){if(e.charCode==120||e.charCode==118){tinyMCE.selectedInstance.execCommand("mceAddUndoLevel");return;}if(tinyMCE.settings['custom_undo_redo_keyboard_shortcuts']){if(e.charCode==122){tinyMCE.selectedInstance.execCommand("Undo");e.preventDefault();return false;}if(e.charCode==121){tinyMCE.selectedInstance.execCommand("Redo");e.preventDefault();return false;}}if(e.charCode==98){tinyMCE.selectedInstance.execCommand("Bold");e.preventDefault();return false;}if(e.charCode==105){tinyMCE.selectedInstance.execCommand("Italic");e.preventDefault();return false;}if(e.charCode==117){tinyMCE.selectedInstance.execCommand("Underline");e.preventDefault();return false;}}if(tinyMCE.settings['custom_undo_redo']){var keys=new Array(13,45,36,35,33,34,37,38,39,40);var posKey=false;for(var i=0;i<keys.length;i++){if(keys[i]==e.keyCode){tinyMCE.selectedInstance.typing=false;posKey=true;break;}}if(!tinyMCE.selectedInstance.typing&&!posKey){tinyMCE.selectedInstance.execCommand("mceAddUndoLevel");tinyMCE.selectedInstance.typing=true;}}if(tinyMCE.isMSIE&&tinyMCE.settings['force_br_newlines']&&e.keyCode==13){if(e.target.editorId)tinyMCE.selectedInstance=tinyMCE.instances[e.target.editorId];if(tinyMCE.selectedInstance){var sel=tinyMCE.selectedInstance.getDoc().selection;var rng=sel.createRange();if(tinyMCE.getParentElement(rng.parentElement(),"li")!=null)return false;e.returnValue=false;e.cancelBubble=true;rng.pasteHTML("<br />");rng.collapse(false);rng.select();tinyMCE.triggerNodeChange(false);return false;}}if(e.keyCode==8||e.keyCode==46){tinyMCE.selectedElement=e.target;tinyMCE.linkElement=tinyMCE.getParentElement(e.target,"a");tinyMCE.imgElement=tinyMCE.getParentElement(e.target,"img");tinyMCE.triggerNodeChange(false);}return false;break;case "keyup":case "keydown":if(e.target.editorId)tinyMCE.selectedInstance=tinyMCE.instances[e.target.editorId];else return;if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.switchSettings();if(tinyMCE.isGecko&&tinyMCE.settings['force_p_newlines']&&(e.keyCode==8||e.keyCode==46)&&!e.shiftKey){if(tinyMCE.selectedInstance._handleBackSpace(e.type)){e.preventDefault();return false;}}tinyMCE.selectedElement=null;tinyMCE.selectedNode=null;var elm=tinyMCE.selectedInstance.getFocusElement();tinyMCE.linkElement=tinyMCE.getParentElement(elm,"a");tinyMCE.imgElement=tinyMCE.getParentElement(elm,"img");tinyMCE.selectedElement=elm;if(tinyMCE.isGecko&&e.type=="keyup"&&e.keyCode==9)tinyMCE.handleVisualAid(tinyMCE.selectedInstance.getBody(),true,tinyMCE.settings['visual']);if(tinyMCE.isGecko&&tinyMCE.settings['document_base_url']!=""+document.location.href&&e.type=="keyup"&&e.ctrlKey&&e.keyCode==86)tinyMCE.selectedInstance.fixBrokenURLs();if(tinyMCE.isMSIE&&tinyMCE.settings['custom_undo_redo']){var keys=new Array(13,45,36,35,33,34,37,38,39,40);var posKey=false;for(var i=0;i<keys.length;i++){if(keys[i]==e.keyCode){tinyMCE.selectedInstance.typing=false;posKey=true;break;}}if(!tinyMCE.selectedInstance.typing&&!posKey&&(e.keyCode<16||e.keyCode>18&&e.keyCode!=255)){tinyMCE.selectedInstance.execCommand("mceAddUndoLevel");tinyMCE.selectedInstance.typing=true;tinyMCE.triggerNodeChange(false);}if(posKey&&e.type=="keyup")tinyMCE.triggerNodeChange(false);var keys=new Array(8,46);for(var i=0;i<keys.length;i++){if(keys[i]==e.keyCode){if(!tinyMCE.selectedInstance.typing){tinyMCE.selectedInstance.execCommand("mceAddUndoLevel");tinyMCE.selectedInstance.typing=true;}if(e.type=="keyup")tinyMCE.triggerNodeChange(false);return true;}}var ctrlKeys=new Array(66,73,85,86,88);for(var i=0;i<keys.length;i++){if(ctrlKeys[i]==e.keyCode&&e.ctrlKey){tinyMCE.selectedInstance.execCommand("mceAddUndoLevel");tinyMCE.triggerNodeChange(false);return true;}}if(tinyMCE.settings['custom_undo_redo_keyboard_shortcuts']){if(e.keyCode==90&&e.ctrlKey&&e.type=="keydown"){tinyMCE.selectedInstance.execCommand("Undo");tinyMCE.triggerNodeChange(false);e.returnValue=false;e.cancelBubble=true;return false;}if(e.keyCode==89&&e.ctrlKey&&e.type=="keydown"){tinyMCE.selectedInstance.execCommand("Redo");tinyMCE.triggerNodeChange(false);e.returnValue=false;e.cancelBubble=true;return false;}}}var keys=new Array(13,45,36,35,33,34,37,38,39,40);var posKey=false;for(var i=0;i<keys.length;i++){if(keys[i]==e.keyCode){posKey=true;break;}}if(posKey&&e.type=="keyup")tinyMCE.triggerNodeChange(false);break;case "mousedown":case "mouseup":case "click":case "focus":if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.switchSettings();var targetBody=tinyMCE.getParentElement(e.target,"body");for(var instanceName in tinyMCE.instances){var inst=tinyMCE.instances[instanceName];inst.autoResetDesignMode();if(inst.getBody()==targetBody){tinyMCE.selectedInstance=inst;tinyMCE.selectedElement=e.target;tinyMCE.linkElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"a");tinyMCE.imgElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"img");tinyMCE.selectedInstance.typing=false;break;}}if(tinyMCE.isSafari){tinyMCE.selectedInstance.lastSafariSelection=tinyMCE.selectedInstance.getBookmark();tinyMCE.selectedInstance.lastSafariSelectedElement=tinyMCE.selectedElement;var lnk=tinyMCE.getParentElement(tinyMCE.selectedElement,"a");if(lnk&&e.type=="mousedown"){lnk.setAttribute("mce_real_href",lnk.getAttribute("href"));lnk.setAttribute("href","javascript:void(0);");}if(lnk&&e.type=="click"){window.setTimeout(function(){lnk.setAttribute("href",lnk.getAttribute("mce_real_href"));lnk.removeAttribute("mce_real_href");},10);}}if(e.type!="focus")tinyMCE.selectedNode=null;tinyMCE.triggerNodeChange(false);if(!tinyMCE.selectedInstance&&e.target.editorId)tinyMCE.selectedInstance=tinyMCE.instances[e.target.editorId];if(e.target.nodeName.toLowerCase()=="a"&&e.type=="click"&&e.altKey){var evalCode=""+tinyMCE.cleanupEventStr(e.target.getAttribute("mce_onclick"));eval(evalCode.replace('return false;',''));}if(tinyMCE.isGecko&&tinyMCE.settings['document_base_url']!=""+document.location.href)window.setTimeout('tinyMCE.getInstanceById("'+inst.editorId+'").fixBrokenURLs();',10);return false;break;}};TinyMCE.prototype.switchClass=function(element,class_name,lock_state){var lockChanged=false;if(typeof(lock_state)!="undefined"&&element!=null){element.classLock=lock_state;lockChanged=true;}if(element!=null&&(lockChanged||!element.classLock)){element.oldClassName=element.className;element.className=class_name;}};TinyMCE.prototype.restoreAndSwitchClass=function(element,class_name){if(element!=null&&!element.classLock){this.restoreClass(element);this.switchClass(element,class_name);}};TinyMCE.prototype.switchClassSticky=function(element_name,class_name,lock_state){var element,lockChanged=false;if(!this.stickyClassesLookup[element_name])this.stickyClassesLookup[element_name]=document.getElementById(element_name);element=this.stickyClassesLookup[element_name];if(typeof(lock_state)!="undefined"&&element!=null){element.classLock=lock_state;lockChanged=true;}if(element!=null&&(lockChanged||!element.classLock)){element.className=class_name;element.oldClassName=class_name;}};TinyMCE.prototype.restoreClass=function(element){if(element!=null&&element.oldClassName&&!element.classLock){element.className=element.oldClassName;element.oldClassName=null;}};TinyMCE.prototype.setClassLock=function(element,lock_state){if(element!=null)element.classLock=lock_state;};TinyMCE.prototype.addEvent=function(obj,name,handler){if(tinyMCE.isMSIE){obj.attachEvent("on"+name,handler);}else obj.addEventListener(name,handler,false);};TinyMCE.prototype.submitPatch=function(){tinyMCE.removeTinyMCEFormElements(this);tinyMCE.triggerSave();this.oldSubmit();};TinyMCE.prototype.onLoad=function(){for(var c=0;c<tinyMCE.configs.length;c++){tinyMCE.settings=tinyMCE.configs[c];var elementRefAr=new Array();if(document.forms&&tinyMCE.settings['add_form_submit_trigger']&&!tinyMCE.submitTriggers){for(var i=0;i<document.forms.length;i++){var form=document.forms[i];tinyMCE.addEvent(form,"submit",TinyMCE.prototype.handleEvent);tinyMCE.addEvent(form,"reset",TinyMCE.prototype.handleEvent);tinyMCE.submitTriggers=true;if(tinyMCE.settings['submit_patch']){try{form.oldSubmit=form.submit;form.submit=TinyMCE.prototype.submitPatch;}catch(e){}}}}var mode=tinyMCE.settings['mode'];switch(mode){case "exact":var elements=tinyMCE.getParam('elements','',true,',');for(var i=0;i<elements.length;i++){var element=tinyMCE._getElementById(elements[i]);var trigger=element?element.getAttribute(tinyMCE.settings['textarea_trigger']):"";if(trigger=="false")continue;if(tinyMCE.settings['ask']&&element){elementRefAr[elementRefAr.length]=element;continue;}if(element)tinyMCE.addMCEControl(element,elements[i]);else if(tinyMCE.settings['debug'])alert("Error: Could not find element by id or name: "+elements[i]);}break;case "specific_textareas":case "textareas":var nodeList=document.getElementsByTagName("textarea");for(var i=0;i<nodeList.length;i++){var trigger=nodeList.item(i).getAttribute(tinyMCE.settings['textarea_trigger']);if((mode=="specific_textareas"&&trigger=="true")||(mode=="textareas"&&trigger!="false"))elementRefAr[elementRefAr.length]=nodeList.item(i);}break;}for(var i=0;i<elementRefAr.length;i++){var element=elementRefAr[i];var elementId=element.name?element.name:element.id;if(tinyMCE.settings['ask']){if(tinyMCE.isGecko){var settings=tinyMCE.settings;tinyMCE.addEvent(element,"focus",function(e){window.setTimeout(function(){TinyMCE.prototype.confirmAdd(e,settings);},10);});}else{var settings=tinyMCE.settings;tinyMCE.addEvent(element,"focus",function(){TinyMCE.prototype.confirmAdd(null,settings);});}}else tinyMCE.addMCEControl(element,elementId);}if(tinyMCE.settings['auto_focus']){window.setTimeout(function(){var inst=tinyMCE.getInstanceById(tinyMCE.settings['auto_focus']);inst.selectNode(inst.getBody(),true,true);inst.contentWindow.focus();},10);}tinyMCE.executeCallback('oninit','_oninit',0);}};TinyMCE.prototype.removeMCEControl=function(editor_id){var inst=tinyMCE.getInstanceById(editor_id);if(inst){inst.switchSettings();editor_id=inst.editorId;var html=tinyMCE.getContent(editor_id);var tmpInstances=new Array();for(var instanceName in tinyMCE.instances){var instance=tinyMCE.instances[instanceName];if(instanceName!=editor_id)tmpInstances[instanceName]=instance;}tinyMCE.instances=tmpInstances;tinyMCE.selectedElement=null;tinyMCE.selectedInstance=null;var replaceElement=document.getElementById(editor_id+"_parent");var oldTargetElement=inst.oldTargetElement;var targetName=oldTargetElement.nodeName.toLowerCase();if(targetName=="textarea"||targetName=="input"){replaceElement.parentNode.removeChild(replaceElement);oldTargetElement.style.display="inline";oldTargetElement.value=html;}else{oldTargetElement.innerHTML=html;replaceElement.parentNode.insertBefore(oldTargetElement,replaceElement);replaceElement.parentNode.removeChild(replaceElement);}}};TinyMCE.prototype._cleanupElementName=function(element_name,element){element_name=element_name.toLowerCase();if(element_name=="body")return null;if(tinyMCE.cleanup_verify_html){for(var i=0;i<tinyMCE.cleanup_invalidElements.length;i++){if(tinyMCE.cleanup_invalidElements[i]==element_name)return null;}var validElement=false;var elementAttribs=null;for(var i=0;i<tinyMCE.cleanup_validElements.length&&!elementAttribs;i++){for(var x=0,n=tinyMCE.cleanup_validElements[i][0].length;x<n;x++){var elmMatch=tinyMCE.cleanup_validElements[i][0][x];if(elmMatch.charAt(0)=='+')elmMatch=elmMatch.substring(1);if(elmMatch.match(new RegExp('\\*|\\?|\\+','g'))!=null){elmMatch=elmMatch.replace(new RegExp('\\?','g'),'(\\S?)');elmMatch=elmMatch.replace(new RegExp('\\+','g'),'(\\S+)');elmMatch=elmMatch.replace(new RegExp('\\*','g'),'(\\S*)');elmMatch="^"+elmMatch+"$";if(element_name.match(new RegExp(elmMatch,'g'))){elementAttribs=tinyMCE.cleanup_validElements[i];validElement=true;break;}}if(element_name==elmMatch){elementAttribs=tinyMCE.cleanup_validElements[i];validElement=true;element_name=elementAttribs[0][0];break;}}}if(!validElement)return null;}if(!tinyMCE.isMSIE){if(element_name=="strong"&&!tinyMCE.cleanup_on_save)element_name="b";else if(element_name=="em"&&!tinyMCE.cleanup_on_save)element_name="i";}if(tinyMCE.isMSIE){if(element_name=="table"){var attribValue=element.style.pixelWidth==0?element.getAttribute("width"):element.style.pixelWidth;element.setAttribute("width",attribValue);attribValue=element.style.pixelHeight==0?element.getAttribute("height"):element.style.pixelHeight;element.setAttribute("height",attribValue);}}var elmData=new Object();elmData.element_name=element_name;elmData.valid_attribs=elementAttribs;return elmData;};TinyMCE.prototype._fixInlineStyles=function(elm){var eName=elm.nodeName;if(elm.nodeName=="FONT"){if((c=tinyMCE.getAttrib(elm,"color"))!=""){elm.style.color=c;}}if(eName=="TABLE"||eName=="TD"||eName=="IMG"){var value;value=tinyMCE.isMSIE?elm.width:elm.getAttribute("width");if(value&&value!=""){if(typeof(value)!="string"||!value.indexOf("%"))value+="px";elm.style.width=value;}value=tinyMCE.isMSIE?elm.height:elm.getAttribute("height");if(value&&value!=""){if(typeof(value)!="string"||!value.indexOf("%"))value+="px";elm.style.height=value;}value=tinyMCE.isMSIE?elm.border:elm.getAttribute("border");if(value&&value!=""&&(value!="0"&&eName!="TABLE")){elm.style.borderWidth=value+"px";}}value=elm.getAttribute("align");if(value&&value!=""){if(elm.nodeName.toLowerCase()=="img"){if(tinyMCE.isMSIE)elm.style.styleFloat=value;else elm.style.cssFloat=value;}else elm.style.textAlign=value;}value=elm.getAttribute("vspace");if(value&&value!=""){elm.style.marginTop=value+"px";elm.style.marginBottom=value+"px";}value=elm.getAttribute("hspace");if(value&&value!=""){elm.style.marginLeft=value+"px";elm.style.marginRight=value+"px";}};TinyMCE.prototype._cleanupAttribute=function(valid_attributes,element_name,attribute_node,element_node){var attribName=attribute_node.nodeName.toLowerCase();var attribValue=attribute_node.nodeValue;var attribMustBeValue=null;var verified=false;if(tinyMCE.cleanup_inline_styles&&(element_name=="table"||element_name=="td"||element_name=="img")){if(attribName=="width"||attribName=="height"||attribName=="border"||attribName=="align"||attribName=="valign"||attribName=="hspace"||attribName=="vspace")return null;}if(attribName.indexOf('moz_')!=-1)return null;if(!tinyMCE.isMSIE&&(attribName=="mce_real_href"||attribName=="mce_real_src")){if(!tinyMCE.cleanup_on_save){var attrib=new Object();attrib.name=attribName;attrib.value=attribValue;return attrib;}else return null;}if(attribName=="mce_onclick")verified=true;if(tinyMCE.cleanup_verify_html&&!verified){for(var i=1;i<valid_attributes.length;i++){var attribMatch=valid_attributes[i][0];var re=null;if(attribMatch.match(new RegExp('\\*|\\?|\\+','g'))!=null){attribMatch=attribMatch.replace(new RegExp('\\?','g'),'(\\S?)');attribMatch=attribMatch.replace(new RegExp('\\+','g'),'(\\S+)');attribMatch=attribMatch.replace(new RegExp('\\*','g'),'(\\S*)');attribMatch="^"+attribMatch+"$";re=new RegExp(attribMatch,'g');}if((re&&attribName.match(re)!=null)||attribName==attribMatch){verified=true;attribMustBeValue=valid_attributes[i][3];break;}}if((element_name=="table"||element_name=="td")&&attribName=="style")verified=true;if(!verified)return false;}else verified=true;switch(attribName){case "size":if(tinyMCE.isMSIE5&&element_name=="font")attribValue=element_node.size;break;case "color":if(tinyMCE.isMSIE5&&element_name=="font")attribValue=element_node.color;break;case "width":if(tinyMCE.isMSIE)attribValue=element_node.width;break;case "height":if(tinyMCE.isMSIE)attribValue=element_node.height;break;case "border":if(tinyMCE.isMSIE)attribValue=element_node.border;break;case "class":if(element_name=="table"||element_name=="td"){if(tinyMCE.cleanup_visual_table_class!="")attribValue=tinyMCE.getVisualAidClass(attribValue,!tinyMCE.cleanup_on_save);}if(!tinyMCE._verifyClass(element_node)||attribValue=="")return null;break;case "style":attribValue=element_node.style.cssText.toLowerCase();if(tinyMCE.isMSIE){var border=element_node.style.border;var bt=element_node.style.borderTop;var bl=element_node.style.borderLeft;var br=element_node.style.borderRight;var bb=element_node.style.borderBottom;if(border!=""&&(bt==border&&bl==border&&br==border&&bb==border)){attribValue=tinyMCE.regexpReplace(attribValue,'border-top: '+border+'?; ?','');attribValue=tinyMCE.regexpReplace(attribValue,'border-left: '+border+'?; ?','');attribValue=tinyMCE.regexpReplace(attribValue,'border-right: '+border+'?; ?','');attribValue=tinyMCE.regexpReplace(attribValue,'border-bottom: '+border+'?;( ?)','border: '+border+';$1');}}break;case "onclick":case "mce_onclick":if(tinyMCE.isMSIE5)break;if(tinyMCE.cleanup_on_save){if(element_node.getAttribute("mce_onclick")){attribName="onclick";attribValue=""+element_node.getAttribute("mce_onclick");}}else{if(attribName=="onclick"&&!tinyMCE.cleanup_on_save)return null;}break;case "href":case "src":if(!tinyMCE.isMSIE&&attribName=="href"&&element_node.getAttribute("mce_real_href"))attribValue=element_node.getAttribute("mce_real_href");if(!tinyMCE.isMSIE&&attribName=="src"&&element_node.getAttribute("mce_real_src"))attribValue=element_node.getAttribute("mce_real_src");if(tinyMCE.isGecko&&!tinyMCE.settings['relative_urls'])attribValue=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],attribValue);attribValue=eval(tinyMCE.cleanup_urlconverter_callback+"(attribValue, element_node, tinyMCE.cleanup_on_save);");break;case "colspan":case "rowspan":if(attribValue=="1")return null;break;case "_moz-userdefined":case "editorid":case "editor_id":case "mce_real_href":case "mce_real_src":return null;}if(attribMustBeValue!=null){var isCorrect=false;for(var i=0;i<attribMustBeValue.length;i++){if(attribValue==attribMustBeValue[i]){isCorrect=true;break;}}if(!isCorrect)return null;}var attrib=new Object();attrib.name=attribName;attrib.value=attribValue;return attrib;};TinyMCE.prototype._verifyClass=function(node){if(tinyMCE.isGecko){var className=node.getAttribute('class');if(!className)return false;}if(tinyMCE.isMSIE)var className=node.getAttribute('className');if(tinyMCE.cleanup_verify_css_classes&&tinyMCE.cleanup_on_save){var csses=tinyMCE.getCSSClasses();nonDefinedCSS=true;for(var c=0;c<csses.length;c++){if(csses[c]==className){nonDefinedCSS=false;break;}}if(nonDefinedCSS&&className.indexOf('mce_')!=0){node.removeAttribute('className');node.removeAttribute('class');return false;}}return true;};TinyMCE.prototype.cleanupNode=function(node){var output="";switch(node.nodeType){case 1:var elementData=tinyMCE._cleanupElementName(node.nodeName,node);var elementName=elementData?elementData.element_name:null;var elementValidAttribs=elementData?elementData.valid_attribs:null;var elementAttribs="";var openTag=false;if(elementName!=null&&elementName.charAt(0)=='+'){elementName=elementName.substring(1);openTag=true;}if(tinyMCE.isMSIE&&tinyMCE.settings['fix_content_duplication']){var lookup=tinyMCE.cleanup_elementLookupTable;for(var i=0;i<lookup.length;i++){if(lookup[i]==node)return output;}lookup[lookup.length]=node;}if(!elementName){if(node.hasChildNodes()){for(var i=0;i<node.childNodes.length;i++)output+=this.cleanupNode(node.childNodes[i]);}return output;}if(node.style&&(node.style.cssText.indexOf('mso-')!=-1&&tinyMCE.settings['auto_cleanup_word'])||node.style.cssText==""){node.style.cssText="";node.removeAttribute("style");}if(tinyMCE.cleanup_inline_styles)tinyMCE._fixInlineStyles(node);if(elementValidAttribs){for(var a=1;a<elementValidAttribs.length;a++){var attribName,attribDefaultValue,attribForceValue,attribValue;attribName=elementValidAttribs[a][0];attribDefaultValue=elementValidAttribs[a][1];attribForceValue=elementValidAttribs[a][2];if(attribDefaultValue!=null||attribForceValue!=null){var attribValue=node.getAttribute(attribName);if(node.getAttribute(attribName)==null||node.getAttribute(attribName)=="")attribValue=attribDefaultValue;attribValue=attribForceValue?attribForceValue:attribValue;if(attribValue=="{$uid}")attribValue="uid_"+(tinyMCE.cleanup_idCount++);if(attribName=="class")attribValue=tinyMCE.getVisualAidClass(attribValue,tinyMCE.cleanup_on_save);node.setAttribute(attribName,attribValue);}}}if(elementName=="span"&&tinyMCE.cleanup_trim_span_elements){var re=new RegExp('^[ \t]+','g');var onlyWhiteSpace=true;for(var a=0;a<node.childNodes.length;a++){var tmpNode=node.childNodes[a];if((tmpNode.nodeType==3&&!tmpNode.nodeValue.match(re))||tmpNode.nodeName.toLowerCase()!="span"){onlyWhiteSpace=false;break;}}tinyMCE._verifyClass(node);var numAttribs=0;for(var i=0;i<node.attributes.length;i++){if(node.attributes[i].specified)numAttribs++;}if(onlyWhiteSpace||numAttribs==0){if(node.hasChildNodes()){for(var i=0;i<node.childNodes.length;i++)output+=this.cleanupNode(node.childNodes[i]);}return output;}}if(elementName=="table"&&!node.hasChildNodes())return "";if(tinyMCE.isGecko&&elementName=="img"){var w=node.style.width;if(w!=null&&w!="")node.setAttribute("width",w);var h=node.style.height;if(h!=null&&h!="")node.setAttribute("height",h);}if(node.attributes.length>0){for(var i=0;i<node.attributes.length;i++){if(node.attributes[i].specified){var attrib=tinyMCE._cleanupAttribute(elementValidAttribs,elementName,node.attributes[i],node);if(attrib)elementAttribs+=" "+attrib.name+"="+'"'+attrib.value+'"';}}}if(tinyMCE.isMSIE&&elementName=="input"){if(node.type){if(!elementAttribs.match(/type=/g))elementAttribs+=" type="+'"'+node.type+'"';}if(node.value){if(!elementAttribs.match(/value=/g))elementAttribs+=" value="+'"'+node.value+'"';}}if((elementName=="p"||elementName=="td")&&(node.innerHTML==""||node.innerHTML==" "))return "<"+elementName+elementAttribs+">"+this.convertStringToXML(String.fromCharCode(160))+"</"+elementName+">";if(tinyMCE.isMSIE&&elementName=="script")return "<"+elementName+elementAttribs+">"+node.text+"</"+elementName+">";if(node.hasChildNodes()){if(elementName=="p"&&tinyMCE.cleanup_force_br_newlines)output+="<div"+elementAttribs+">";else output+="<"+elementName+elementAttribs+">";for(var i=0;i<node.childNodes.length;i++)output+=this.cleanupNode(node.childNodes[i]);if(elementName=="p"&&tinyMCE.cleanup_force_br_newlines)output+="</div><br />";else output+="</"+elementName+">";}else{if(openTag)output+="<"+elementName+elementAttribs+"></"+elementName+">";else{output+="<"+elementName+elementAttribs+" />";}}return output;case 3:if(node.parentNode.nodeName.toLowerCase()=="script")return node.nodeValue;return this.convertStringToXML(node.nodeValue);case 8:return "<!--"+node.nodeValue+"-->";default:return "[UNKNOWN NODETYPE "+node.nodeType+"]";}};TinyMCE.prototype.convertStringToXML=function(html_data){var output="";for(var i=0;i<html_data.length;i++){var chr=html_data.charCodeAt(i);if(tinyMCE.settings['entity_encoding']=="numeric"){if(chr>127)output+='&#'+chr+";";else output+=String.fromCharCode(chr);continue;}if(tinyMCE.settings['entity_encoding']=="raw"){output+=String.fromCharCode(chr);continue;}if(typeof(tinyMCE.cleanup_entities["c"+chr])!='undefined'&&tinyMCE.cleanup_entities["c"+chr]!='')output+='&'+tinyMCE.cleanup_entities["c"+chr]+';';else output+=''+String.fromCharCode(chr);}return output;};TinyMCE.prototype._getCleanupElementName=function(chunk){var pos;if(chunk.charAt(0)=='+')chunk=chunk.substring(1);if((pos=chunk.indexOf('/'))!=-1)chunk=chunk.substring(0,pos);if((pos=chunk.indexOf('['))!=-1)chunk=chunk.substring(0,pos);return chunk;};TinyMCE.prototype._initCleanup=function(){var validElements=tinyMCE.settings["valid_elements"];validElements=validElements.split(',');var extendedValidElements=tinyMCE.settings["extended_valid_elements"];extendedValidElements=extendedValidElements.split(',');for(var i=0;i<extendedValidElements.length;i++){var elementName=this._getCleanupElementName(extendedValidElements[i]);var skipAdd=false;for(var x=0;x<validElements.length;x++){if(this._getCleanupElementName(validElements[x])==elementName){validElements[x]=extendedValidElements[i];skipAdd=true;break;}}if(!skipAdd)validElements[validElements.length]=extendedValidElements[i];}for(var i=0;i<validElements.length;i++){var item=validElements[i];item=item.replace('[','|');item=item.replace(']','');var attribs=item.split('|');for(var x=0;x<attribs.length;x++)attribs[x]=attribs[x].toLowerCase();attribs[0]=attribs[0].split('/');for(var x=1;x<attribs.length;x++){var attribName=attribs[x];var attribDefault=null;var attribForce=null;var attribMustBe=null;if((pos=attribName.indexOf('='))!=-1){attribDefault=attribName.substring(pos+1);attribName=attribName.substring(0,pos);}if((pos=attribName.indexOf(':'))!=-1){attribForce=attribName.substring(pos+1);attribName=attribName.substring(0,pos);}if((pos=attribName.indexOf('<'))!=-1){attribMustBe=attribName.substring(pos+1).split('?');attribName=attribName.substring(0,pos);}attribs[x]=new Array(attribName,attribDefault,attribForce,attribMustBe);}validElements[i]=attribs;}var invalidElements=tinyMCE.settings['invalid_elements'].split(',');for(var i=0;i<invalidElements.length;i++)invalidElements[i]=invalidElements[i].toLowerCase();tinyMCE.settings['cleanup_validElements']=validElements;tinyMCE.settings['cleanup_invalidElements']=invalidElements;tinyMCE.settings['cleanup_entities']=new Array();var entities=tinyMCE.getParam('entities','',true,',');for(var i=0;i<entities.length;i+=2)tinyMCE.settings['cleanup_entities']['c'+entities[i]]=entities[i+1];};TinyMCE.prototype._cleanupHTML=function(doc,config,element,visual,on_save){if(!tinyMCE.settings['cleanup'])return element.innerHTML;tinyMCE._customCleanup(on_save?"get_from_editor_dom":"insert_to_editor_dom",doc.body);tinyMCE.cleanup_validElements=tinyMCE.settings['cleanup_validElements'];tinyMCE.cleanup_entities=tinyMCE.settings['cleanup_entities'];tinyMCE.cleanup_invalidElements=tinyMCE.settings['cleanup_invalidElements'];tinyMCE.cleanup_verify_html=tinyMCE.settings['verify_html'];tinyMCE.cleanup_force_br_newlines=tinyMCE.settings['force_br_newlines'];tinyMCE.cleanup_urlconverter_callback=tinyMCE.settings['urlconverter_callback'];tinyMCE.cleanup_verify_css_classes=tinyMCE.settings['verify_css_classes'];tinyMCE.cleanup_visual_table_class=tinyMCE.settings['visual_table_class'];tinyMCE.cleanup_apply_source_formatting=tinyMCE.settings['apply_source_formatting'];tinyMCE.cleanup_trim_span_elements=tinyMCE.settings['trim_span_elements'];tinyMCE.cleanup_inline_styles=tinyMCE.settings['inline_styles'];tinyMCE.cleanup_visual_aid=visual;tinyMCE.cleanup_on_save=on_save;tinyMCE.cleanup_idCount=0;tinyMCE.cleanup_elementLookupTable=new Array();var startTime=new Date().getTime();tinyMCE._convertOnClick(element);if(tinyMCE.isMSIE){element.innerHTML=tinyMCE.regexpReplace(element.innerHTML,'<p>[ \n\r]*<hr id=null>[ \n\r]*</p>','<hr />','gi');element.innerHTML=tinyMCE.regexpReplace(element.innerHTML,'<!([^-(DOCTYPE)]* )|<!/[^-]*>','','gi');}var html=this.cleanupNode(element);if(tinyMCE.settings['debug'])alert("Cleanup process executed in: "+(new Date().getTime()-startTime)+" ms.");html=tinyMCE.regexpReplace(html,'<p><hr /></p>','<hr />');html=tinyMCE.regexpReplace(html,'<p> </p><hr /><p> </p>','<hr />');if(!tinyMCE.isMSIE)html=html.replace(new RegExp('<o:p _moz-userdefined="" />','g'),"");if(tinyMCE.settings['apply_source_formatting']){html=html.replace(new RegExp('<(p|div)([^>]*)>','g'),"\n<$1$2>\n");html=html.replace(new RegExp('<\/(p|div)([^>]*)>','g'),"\n</$1$2>\n");html=html.replace(new RegExp('<br />','g'),"<br />\n");}if(tinyMCE.settings['force_br_newlines']){var re=new RegExp('<p> </p>','g');html=html.replace(re,"<br />");}if(tinyMCE.settings['force_p_newlines']){var re=new RegExp('<>','g');html=html.replace(re,"");}if(tinyMCE.settings['remove_linebreaks'])html=html.replace(new RegExp('\r|\n','g'),' ');html=tinyMCE._customCleanup(on_save?"get_from_editor":"insert_to_editor",html);var chk=tinyMCE.regexpReplace(html,"[ \t\r\n]","").toLowerCase();if(chk=="<br/>"||chk=="<br>"||chk=="<p> </p>"||chk=="<p> </p>"||chk=="<p></p>")html="";if(tinyMCE.settings["preformatted"])return "<pre>"+html+"</pre>";return html;};TinyMCE.prototype.setAttrib=function(element,name,value,no_fix_value){if(!no_fix_value&&value!=null){var re=new RegExp('[^0-9%]','g');value=value.replace(re,'');}if(value!=null&&value!="")element.setAttribute(name,value);else element.removeAttribute(name);if(value!=null&&value!="")element.setAttribute(name,value);else element.removeAttribute(name);};TinyMCE.prototype.insertLink=function(href,target,title,onclick,style_class){this.execCommand("mceAddUndoLevel");if(this.selectedInstance&&this.selectedElement&&this.selectedElement.nodeName.toLowerCase()=="img"){var doc=this.selectedInstance.getDoc();var linkElement=tinyMCE.getParentElement(this.selectedElement,"a");var newLink=false;if(!linkElement){linkElement=doc.createElement("a");newLink=true;}href=eval(tinyMCE.settings['urlconverter_callback']+"(href, linkElement);");tinyMCE.setAttrib(linkElement,'href',href);tinyMCE.setAttrib(linkElement,'target',target);tinyMCE.setAttrib(linkElement,'title',title);tinyMCE.setAttrib(linkElement,'mce_onclick',onclick);tinyMCE.setAttrib(linkElement,'class',style_class);if(newLink){linkElement.appendChild(this.selectedElement.cloneNode(true));this.selectedElement.parentNode.replaceChild(linkElement,this.selectedElement);}return;}if(!this.linkElement&&this.selectedInstance){if(tinyMCE.isSafari){tinyMCE.execCommand("mceInsertContent",false,'<a href="#mce_temp_url#">'+this.selectedInstance.getSelectedHTML()+'</a>');}else this.selectedInstance.contentDocument.execCommand("createlink",false,"#mce_temp_url#");tinyMCE.linkElement=this.getElementByAttributeValue(this.selectedInstance.contentDocument.body,"a","href","#mce_temp_url#");var elementArray=this.getElementsByAttributeValue(this.selectedInstance.contentDocument.body,"a","href","#mce_temp_url#");for(var i=0;i<elementArray.length;i++){href=eval(tinyMCE.settings['urlconverter_callback']+"(href, elementArray[i]);");tinyMCE.setAttrib(elementArray[i],'href',href);tinyMCE.setAttrib(elementArray[i],'mce_real_href',href);tinyMCE.setAttrib(elementArray[i],'target',target);tinyMCE.setAttrib(elementArray[i],'title',title);tinyMCE.setAttrib(elementArray[i],'mce_onclick',onclick);tinyMCE.setAttrib(elementArray[i],'class',style_class);}tinyMCE.linkElement=elementArray[0];}if(this.linkElement){href=eval(tinyMCE.settings['urlconverter_callback']+"(href, this.linkElement);");tinyMCE.setAttrib(this.linkElement,'href',href);tinyMCE.setAttrib(this.linkElement,'mce_real_href',href);tinyMCE.setAttrib(this.linkElement,'target',target);tinyMCE.setAttrib(this.linkElement,'title',title);tinyMCE.setAttrib(this.linkElement,'mce_onclick',onclick);tinyMCE.setAttrib(this.linkElement,'class',style_class);}};TinyMCE.prototype.insertImage=function(src,alt,border,hspace,vspace,width,height,align,title,onmouseover,onmouseout){if(src=="")return;this.execCommand("mceAddUndoLevel");if(!this.imgElement&&tinyMCE.isSafari){var html="";html+='<img src="'+src+'" alt="'+alt+'"';html+=' border="'+border+'" hspace="'+hspace+'"';html+=' vspace="'+vspace+'" width="'+width+'"';html+=' height="'+height+'" align="'+align+'" title="'+title+'" onmouseover="'+onmouseover+'" onmouseout="'+onmouseout+'" />';tinyMCE.execCommand("mceInsertContent",false,html);}else{if(!this.imgElement&&this.selectedInstance){if(tinyMCE.isSafari)tinyMCE.execCommand("mceInsertContent",false,'<img src="#mce_temp_url#" />');else this.selectedInstance.contentDocument.execCommand("insertimage",false,"#mce_temp_url#");tinyMCE.imgElement=this.getElementByAttributeValue(this.selectedInstance.contentDocument.body,"img","src","#mce_temp_url#");}}if(this.imgElement){var needsRepaint=false;src=eval(tinyMCE.settings['urlconverter_callback']+"(src, tinyMCE.imgElement);");if(onmouseover&&onmouseover!="")onmouseover="this.src='"+eval(tinyMCE.settings['urlconverter_callback']+"(onmouseover, tinyMCE.imgElement);")+"';";if(onmouseout&&onmouseout!="")onmouseout="this.src='"+eval(tinyMCE.settings['urlconverter_callback']+"(onmouseout, tinyMCE.imgElement);")+"';";if(typeof(title)=="undefined")title=alt;if(width!=this.imgElement.getAttribute("width")||height!=this.imgElement.getAttribute("height")||align!=this.imgElement.getAttribute("align"))needsRepaint=true;tinyMCE.setAttrib(this.imgElement,'src',src);tinyMCE.setAttrib(this.imgElement,'mce_real_src',src);tinyMCE.setAttrib(this.imgElement,'alt',alt);tinyMCE.setAttrib(this.imgElement,'title',title);tinyMCE.setAttrib(this.imgElement,'align',align);tinyMCE.setAttrib(this.imgElement,'border',border,true);tinyMCE.setAttrib(this.imgElement,'hspace',hspace,true);tinyMCE.setAttrib(this.imgElement,'vspace',vspace,true);tinyMCE.setAttrib(this.imgElement,'width',width,true);tinyMCE.setAttrib(this.imgElement,'height',height,true);tinyMCE.setAttrib(this.imgElement,'onmouseover',onmouseover);tinyMCE.setAttrib(this.imgElement,'onmouseout',onmouseout);if(width&&width!="")this.imgElement.style.pixelWidth=width;if(height&&height!="")this.imgElement.style.pixelHeight=height;if(needsRepaint)tinyMCE.selectedInstance.repaint();}};TinyMCE.prototype.getElementByAttributeValue=function(node,element_name,attrib,value){var elements=this.getElementsByAttributeValue(node,element_name,attrib,value);if(elements.length==0)return null;return elements[0];};TinyMCE.prototype.getElementsByAttributeValue=function(node,element_name,attrib,value){var elements=new Array();if(node&&node.nodeName.toLowerCase()==element_name){if(node.getAttribute(attrib)&&node.getAttribute(attrib).indexOf(value)!=-1)elements[elements.length]=node;}if(node.hasChildNodes){for(var x=0,n=node.childNodes.length;x<n;x++){var childElements=this.getElementsByAttributeValue(node.childNodes[x],element_name,attrib,value);for(var i=0,m=childElements.length;i<m;i++)elements[elements.length]=childElements[i];}}return elements;};TinyMCE.prototype.isBlockElement=function(node){return node!=null&&node.nodeType==1&&this.blockRegExp.test(node.nodeName);};TinyMCE.prototype.getParentBlockElement=function(node){while(node){if(this.blockRegExp.test(node.nodeName))return node;node=node.parentNode;}return null;};TinyMCE.prototype.getNodeTree=function(node,node_array,type,node_name){if(typeof(type)=="undefined"||node.nodeType==type&&(typeof(node_name)=="undefined"||node.nodeName.toLowerCase()==node_name.toLowerCase()))node_array[node_array.length]=node;if(node.hasChildNodes()){for(var i=0;i<node.childNodes.length;i++)tinyMCE.getNodeTree(node.childNodes[i],node_array,type,node_name);}return node_array;};TinyMCE.prototype.getParentElement=function(node,names,attrib_name,attrib_value){if(typeof(names)=="undefined"){if(node.nodeType==1)return node;while((node=node.parentNode)!=null&&node.nodeType!=1);return node;}var namesAr=names.split(',');if(node==null)return null;do{for(var i=0;i<namesAr.length;i++){if(node.nodeName.toLowerCase()==namesAr[i].toLowerCase()||names=="*"){if(typeof(attrib_name)=="undefined")return node;else if(node.getAttribute(attrib_name)){if(typeof(attrib_value)=="undefined"){if(node.getAttribute(attrib_name)!="")return node;}else if(node.getAttribute(attrib_name)==attrib_value)return node;}}}}while(node=node.parentNode);return null;};TinyMCE.prototype.convertURL=function(url,node,on_save){var prot=document.location.protocol;var host=document.location.hostname;var port=document.location.port;var fileProto=(prot=="file:");url=tinyMCE.regexpReplace(url,'(http|https):///','/');if(url.indexOf('mailto:')!=-1||url.indexOf('javascript:')!=-1||tinyMCE.regexpReplace(url,'[ \t\r\n\+]|%20','').charAt(0)=="#")return url;if(!tinyMCE.isMSIE&&!on_save&&url.indexOf("://")==-1&&url.charAt(0)!='/')return tinyMCE.settings['base_href']+url;if(!tinyMCE.settings['relative_urls']){var urlParts=tinyMCE.parseURL(url);var baseUrlParts=tinyMCE.parseURL(tinyMCE.settings['base_href']);if(urlParts['anchor']&&urlParts['path']==baseUrlParts['path'])return "#"+urlParts['anchor'];}if(on_save&&tinyMCE.settings['relative_urls']){var urlParts=tinyMCE.parseURL(url);var tmpUrlParts=tinyMCE.parseURL(tinyMCE.settings['document_base_url']);if(urlParts['host']==tmpUrlParts['host']&&(!urlParts['port']||urlParts['port']==tmpUrlParts['port']))return tinyMCE.convertAbsoluteURLToRelativeURL(tinyMCE.settings['document_base_url'],url);}if(!fileProto&&tinyMCE.settings['remove_script_host']){var start="",portPart="";if(port!="")portPart=":"+port;start=prot+"//"+host+portPart+"/";if(url.indexOf(start)==0)url=url.substring(start.length-1);if(!tinyMCE.settings['relative_urls']&&url.indexOf('://')==-1&&url.charAt(0)!='/')url='/'+url;}return url;};TinyMCE.prototype.parseURL=function(url_str){var urlParts=new Array();if(url_str){var pos,lastPos;pos=url_str.indexOf('://');if(pos!=-1){urlParts['protocol']=url_str.substring(0,pos);lastPos=pos+3;}for(var i=lastPos;i<url_str.length;i++){var chr=url_str.charAt(i);if(chr==':')break;if(chr=='/')break;}pos=i;urlParts['host']=url_str.substring(lastPos,pos);lastPos=pos;if(url_str.charAt(pos)==':'){pos=url_str.indexOf('/',lastPos);urlParts['port']=url_str.substring(lastPos+1,pos);}lastPos=pos;pos=url_str.indexOf('?',lastPos);if(pos==-1)pos=url_str.indexOf('#',lastPos);if(pos==-1)pos=url_str.length;urlParts['path']=url_str.substring(lastPos,pos);lastPos=pos;if(url_str.charAt(pos)=='?'){pos=url_str.indexOf('#');pos=(pos==-1)?url_str.length:pos;urlParts['query']=url_str.substring(lastPos+1,pos);}lastPos=pos;if(url_str.charAt(pos)=='#'){pos=url_str.length;urlParts['anchor']=url_str.substring(lastPos+1,pos);}}return urlParts;};TinyMCE.prototype.convertAbsoluteURLToRelativeURL=function(base_url,url_to_relative){var strTok1;var strTok2;var breakPoint=0;var outputString="";base_url=base_url.substring(0,base_url.lastIndexOf('/'));strTok1=base_url.split('/');strTok2=url_to_relative.split('/');if(strTok1.length>=strTok2.length){for(var i=0;i<strTok1.length;i++){if(i>=strTok2.length||strTok1[i]!=strTok2[i]){breakPoint=i+1;break;}}}if(strTok1.length<strTok2.length){for(var i=0;i<strTok2.length;i++){if(i>=strTok1.length||strTok1[i]!=strTok2[i]){breakPoint=i+1;break;}}}if(breakPoint==1)return url_to_relative;for(var i=0;i<(strTok1.length-(breakPoint-1));i++)outputString+="../";for(var i=breakPoint-1;i<strTok2.length;i++){if(i!=(breakPoint-1))outputString+="/"+strTok2[i];else outputString+=strTok2[i];}return outputString;};TinyMCE.prototype.convertRelativeToAbsoluteURL=function(base_url,relative_url){var baseURL=TinyMCE.prototype.parseURL(base_url);var relURL=TinyMCE.prototype.parseURL(relative_url);if(relative_url==""||relative_url.charAt(0)=='/'||relative_url.indexOf('://')!=-1||relative_url.indexOf('mailto:')!=-1||relative_url.indexOf('javascript:')!=-1||tinyMCE.regexpReplace(relative_url,'[ \t\r\n\+]|%20','').charAt(0)=="#")return relative_url;baseURLParts=baseURL['path'].split('/');relURLParts=relURL['path'].split('/');var newBaseURLParts=new Array();for(var i=baseURLParts.length-1;i>=0;i--){if(baseURLParts[i].length==0)continue;newBaseURLParts[newBaseURLParts.length]=baseURLParts[i];}baseURLParts=newBaseURLParts.reverse();var newRelURLParts=new Array();var numBack=0;for(var i=relURLParts.length-1;i>=0;i--){if(relURLParts[i].length==0||relURLParts[i]==".")continue;if(relURLParts[i]=='..'){numBack++;continue;}if(numBack>0){numBack--;continue;}newRelURLParts[newRelURLParts.length]=relURLParts[i];}relURLParts=newRelURLParts.reverse();var len=baseURLParts.length-numBack;var absPath=(len<=0?"":"/")+baseURLParts.slice(0,len).join('/')+"/"+relURLParts.join('/');var start="",end="";if(baseURL['protocol'])start+=baseURL['protocol']+"://";if(baseURL['host'])start+=baseURL['host'];if(baseURL['port'])start+=":"+baseURL['port'];if(relURL['query'])end+="?"+relURL['query'];if(relURL['anchor'])end+="#"+relURL['anchor'];if(relative_url.charAt(relative_url.length-1)=="/")end+="/";return start+absPath+end;};TinyMCE.prototype.getParam=function(name,default_value,strip_whitespace,split_chr){var value=(typeof(this.settings[name])=="undefined")?default_value:this.settings[name];if(value=="true"||value=="false")return(value=="true");if(strip_whitespace)value=tinyMCE.regexpReplace(value,"[ \t\r\n]","");if(typeof(split_chr)!="undefined"&&split_chr!=null){value=value.split(split_chr);var outArray=new Array();for(var i=0;i<value.length;i++){if(value[i]&&value[i]!="")outArray[outArray.length]=value[i];}value=outArray;}return value;};TinyMCE.prototype.getLang=function(name,default_value,parse_entities){var value=(typeof(tinyMCELang[name])=="undefined")?default_value:tinyMCELang[name];if(parse_entities){var el=document.createElement("div");el.innerHTML=value;value=el.innerHTML;}return value;};TinyMCE.prototype.replaceVar=function(replace_haystack,replace_var,replace_str){var re=new RegExp('{\\\$'+replace_var+'}','g');return replace_haystack.replace(re,replace_str);};TinyMCE.prototype.replaceVars=function(replace_haystack,replace_vars){for(var key in replace_vars){var value=replace_vars[key];replace_haystack=tinyMCE.replaceVar(replace_haystack,key,value);}return replace_haystack;};TinyMCE.prototype.triggerNodeChange=function(focus,setup_content){if(tinyMCE.settings['handleNodeChangeCallback']){if(tinyMCE.selectedInstance){var inst=tinyMCE.selectedInstance;var editorId=inst.editorId;var elm=(typeof(setup_content)!="undefined"&&setup_content)?tinyMCE.selectedElement:inst.getFocusElement();var undoIndex=-1;var undoLevels=-1;var anySelection=false;var selectedText=inst.getSelectedText();if(tinyMCE.settings["auto_resize"]){var doc=inst.getDoc();inst.iframeElement.style.width=doc.body.offsetWidth+"px";inst.iframeElement.style.height=doc.body.offsetHeight+"px";}if(tinyMCE.selectedElement)anySelection=(tinyMCE.selectedElement.nodeName.toLowerCase()=="img")||(selectedText&&selectedText.length>0);if(tinyMCE.settings['custom_undo_redo']){undoIndex=inst.undoIndex;undoLevels=inst.undoLevels.length;}tinyMCE.executeCallback('handleNodeChangeCallback','_handleNodeChange',0,editorId,elm,undoIndex,undoLevels,inst.visualAid,anySelection);}}if(this.selectedInstance&&(typeof(focus)=="undefined"||focus))this.selectedInstance.contentWindow.focus();};TinyMCE.prototype._customCleanup=function(type,content){var customCleanup=tinyMCE.settings['cleanup_callback'];if(customCleanup!=""&&eval("typeof("+customCleanup+")")!="undefined")content=eval(customCleanup+"(type, content);");var plugins=tinyMCE.getParam('plugins','',true,',');for(var i=0;i<plugins.length;i++){if(eval("typeof(TinyMCE_"+plugins[i]+"_cleanup)")!="undefined")content=eval("TinyMCE_"+plugins[i]+"_cleanup(type, content);");}return content;};TinyMCE.prototype.getContent=function(editor_id){if(typeof(editor_id)!="undefined")tinyMCE.selectedInstance=tinyMCE.getInstanceById(editor_id);if(tinyMCE.selectedInstance)return tinyMCE._cleanupHTML(this.selectedInstance.getDoc(),tinyMCE.settings,this.selectedInstance.getBody(),false,true);return null;};TinyMCE.prototype.setContent=function(html_content){if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.execCommand('mceSetContent',false,html_content);};TinyMCE.prototype.importThemeLanguagePack=function(name){if(typeof(name)=="undefined")name=tinyMCE.settings['theme'];tinyMCE.loadScript(tinyMCE.baseURL+'/themes/'+name+'/langs/'+tinyMCE.settings['language']+'.js');};TinyMCE.prototype.importPluginLanguagePack=function(name,valid_languages){var lang="en";valid_languages=valid_languages.split(',');for(var i=0;i<valid_languages.length;i++){if(tinyMCE.settings['language']==valid_languages[i])lang=tinyMCE.settings['language'];}tinyMCE.loadScript(tinyMCE.baseURL+'/plugins/'+name+'/langs/'+lang+'.js');};TinyMCE.prototype.applyTemplate=function(html,args){html=tinyMCE.replaceVar(html,"themeurl",tinyMCE.themeURL);if(typeof(args)!="undefined")html=tinyMCE.replaceVars(html,args);html=tinyMCE.replaceVars(html,tinyMCE.settings);html=tinyMCE.replaceVars(html,tinyMCELang);return html;};TinyMCE.prototype.openWindow=function(template,args){var html,width,height,x,y,resizable,scrollbars,url;args['mce_template_file']=template['file'];tinyMCE.windowArgs=args;html=template['html'];if(!(width=template['width']))width=320;if(!(height=template['height']))height=200;if(tinyMCE.isMSIE)height+=30;x=parseInt(screen.width/2.0)-(width/2.0);y=parseInt(screen.height/2.0)-(height/2.0);resizable=(args&&args['resizable'])?args['resizable']:"no";scrollbars=(args&&args['scrollbars'])?args['scrollbars']:"no";if(template['file'].charAt(0)!='/'&&template['file'].indexOf('://')==-1)url=tinyMCE.baseURL+"/themes/"+tinyMCE.getParam("theme")+"/"+template['file'];else url=template['file'];for(var name in args)url=tinyMCE.replaceVar(url,name,escape(args[name]));if(html){html=tinyMCE.replaceVar(html,"css",this.settings['popups_css']);html=tinyMCE.applyTemplate(html,args);var win=window.open("","mcePopup","top="+y+",left="+x+",scrollbars="+scrollbars+",dialog=yes,minimizable="+resizable+",modal=yes,width="+width+",height="+height+",resizable="+resizable);if(win==null){alert(tinyMCELang['lang_popup_blocked']);return;}win.document.write(html);win.document.close();win.resizeTo(width,height);win.focus();}else{if(tinyMCE.isMSIE&&resizable!='yes'&&tinyMCE.settings["dialog_type"]=="modal"){var features="resizable:"+resizable+";scroll:"+scrollbars+";status:yes;center:yes;help:no;dialogWidth:"+width+"px;dialogHeight:"+height+"px;";window.showModalDialog(url,window,features);}else{if(tinyMCE.settings["dialog_type"]=="window"||tinyMCE.settings["dialog_type"]=="modal"){var modal=(resizable=="yes")?"no":"yes";if(tinyMCE.isGecko&&tinyMCE.isMac)modal="no";var win=window.open(url,"mcePopup","top="+y+",left="+x+",scrollbars="+scrollbars+",dialog="+modal+",minimizable="+resizable+",modal="+modal+",width="+width+",height="+height+",resizable="+resizable);if(win==null){alert(tinyMCELang['lang_popup_blocked']);return;}eval('try { win.resizeTo(width, height); } catch(e) { }');win.focus();}else{var div=document.createElement("div");var id="mceDialog"+(tinyMCE.dialogCounter++);height+=30;div.id=id;div.className="mceDialog";div.style.width=width+"px";div.style.height=height+"px";var html='<div class="mceDialogHeader"><div class="mceDialogTitle"></div><div class="mceDialogClose"><a href="javascript:tinyMCE.closeDialog();"></a></div></div>';html+='<div id="'+id+'IFrameWrapper" class="mceDialogIFrameWrapper"><iframe border="0" marginwidth="0" marginheight="0" frameborder="0" hspace="0" vspace="0" src="'+url+'" width="'+width+'" height="'+height+'"></iframe></div>';div.innerHTML=html;document.body.appendChild(div);tinyMCE._currentDialog=id;}}}};TinyMCE.prototype.closeDialog=function(){if(tinyMCE.settings["dialog_type"]=="div"){var div=document.getElementById(tinyMCE._currentDialog);if(div)div.parentNode.removeChild(div);}else window.close();};TinyMCE.prototype.getVisualAidClass=function(class_name,state){var aidClass=tinyMCE.settings['visual_table_class'];if(typeof(state)=="undefined")state=tinyMCE.settings['visual'];var classNames=new Array();var ar=class_name.split(' ');for(var i=0;i<ar.length;i++){if(ar[i]==aidClass)ar[i]="";if(ar[i]!="")classNames[classNames.length]=ar[i];}if(state)classNames[classNames.length]=aidClass;var className="";for(var i=0;i<classNames.length;i++){if(i>0)className+=" ";className+=classNames[i];}return className;};TinyMCE.prototype.handleVisualAid=function(element,deep,state){if(!element)return;var tableElement=null;switch(element.nodeName.toLowerCase()){case "table":var oldW=element.style.width;var oldH=element.style.height;element.className=tinyMCE.getVisualAidClass(element.className,state&&element.getAttribute("border")==0);element.style.width=oldW;element.style.height=oldH;for(var y=0;y<element.rows.length;y++){for(var x=0;x<element.rows[y].cells.length;x++){var className=tinyMCE.getVisualAidClass(element.rows[y].cells[x].className,state&&element.getAttribute("border")==0);element.rows[y].cells[x].className=className;}}break;}if(deep&&element.hasChildNodes()){for(var i=0;i<element.childNodes.length;i++)tinyMCE.handleVisualAid(element.childNodes[i],deep,state);}};TinyMCE.prototype.getAttrib=function(elm,name,default_value){var v=elm.getAttribute(name);if(name=="class"&&!v)v=elm.className;if(typeof(default_value)=="undefined")default_value="";return(v&&v!="")?v:default_value;};TinyMCE.prototype.setAttrib=function(element,name,value,fix_value){if(typeof(value)=="number")value=""+value;if(fix_value){if(value==null)value="";var re=new RegExp('[^0-9%]','g');value=value.replace(re,'');}if(name=="class")element.className=value;if(value!=null&&value!=""&&value!=-1)element.setAttribute(name,value);else element.removeAttribute(name);};TinyMCE.prototype._setHTML=function(doc,html_content){if(tinyMCE.isMSIE){var re=new RegExp('<p><hr /></p>','g');html_content=html_content.replace(re,"<hr>");}try{doc.body.innerHTML=html_content;}catch(e){if(this.isMSIE)doc.body.createTextRange().pasteHTML(html_content);}if(tinyMCE.isMSIE&&tinyMCE.settings['fix_content_duplication']){var paras=doc.getElementsByTagName("P");for(var i=0;i<paras.length;i++){var node=paras[i];while((node=node.parentNode)!=null){if(node.nodeName.toLowerCase()=="p")node.outerHTML=node.innerHTML;}}var html=doc.body.innerHTML;if(html.indexOf('="mso')!=-1){for(var i=0;i<doc.body.all.length;i++){var el=doc.body.all[i];el.removeAttribute("className","",0);el.removeAttribute("style","",0);}html=doc.body.innerHTML;html=tinyMCE.regexpReplace(html,"<o:p><\/o:p>","<br />");html=tinyMCE.regexpReplace(html,"<o:p> <\/o:p>","");html=tinyMCE.regexpReplace(html,"<st1:.*?>","");html=tinyMCE.regexpReplace(html,"<p><\/p>","");html=tinyMCE.regexpReplace(html,"<p><\/p>\r\n<p><\/p>","");html=tinyMCE.regexpReplace(html,"<p> <\/p>","<br />");html=tinyMCE.regexpReplace(html,"<p>\s*(<p>\s*)?","<p>");html=tinyMCE.regexpReplace(html,"<\/p>\s*(<\/p>\s*)?","</p>");}doc.body.innerHTML=html;}};TinyMCE.prototype.getImageSrc=function(str){var pos=-1;if(!str)return "";if((pos=str.indexOf('this.src='))!=-1){var src=str.substring(pos+10);src=src.substring(0,src.indexOf('\''));return src;}return "";};TinyMCE.prototype._getElementById=function(element_id){var elm=document.getElementById(element_id);if(!elm){for(var j=0;j<document.forms.length;j++){for(var k=0;k<document.forms[j].elements.length;k++){if(document.forms[j].elements[k].name==element_id){elm=document.forms[j].elements[k];break;}}}}return elm;};TinyMCE.prototype.getEditorId=function(form_element){var inst=this.getInstanceById(form_element);if(!inst)return null;return inst.editorId;};TinyMCE.prototype.getInstanceById=function(editor_id){var inst=this.instances[editor_id];if(!inst){for(var instanceName in tinyMCE.instances){var instance=tinyMCE.instances[instanceName];if(instance.formTargetElementId==editor_id){inst=instance;break;}}}return inst;};TinyMCE.prototype.queryInstanceCommandValue=function(editor_id,command){var inst=tinyMCE.getInstanceById(editor_id);if(inst)return inst.queryCommandValue(command);return false;};TinyMCE.prototype.queryInstanceCommandState=function(editor_id,command){var inst=tinyMCE.getInstanceById(editor_id);if(inst)return inst.queryCommandState(command);return null;};TinyMCE.prototype.setWindowArg=function(name,value){this.windowArgs[name]=value;};TinyMCE.prototype.getWindowArg=function(name,default_value){return(typeof(this.windowArgs[name])=="undefined")?default_value:this.windowArgs[name];};TinyMCE.prototype.getCSSClasses=function(editor_id,doc){var output=new Array();if(typeof(tinyMCE.cssClasses)!="undefined")return tinyMCE.cssClasses;if(typeof(editor_id)=="undefined"&&typeof(doc)=="undefined"){var instance;for(var instanceName in tinyMCE.instances){instance=tinyMCE.instances[instanceName];break;}doc=instance.getDoc();}if(typeof(doc)=="undefined"){var instance=tinyMCE.getInstanceById(editor_id);doc=instance.getDoc();}if(doc){var styles=tinyMCE.isMSIE?doc.styleSheets:doc.styleSheets;if(styles&&styles.length>0){var csses=null;eval("try {var csses = tinyMCE.isMSIE ? doc.styleSheets(0).rules : doc.styleSheets[0].cssRules;} catch(e) {}");if(!csses)return new Array();for(var i=0;i<csses.length;i++){var selectorText=csses[i].selectorText;if(selectorText){var rules=selectorText.split(',');for(var c=0;c<rules.length;c++){if(rules[c].indexOf(' ')!=-1||rules[c].indexOf(':')!=-1||rules[c].indexOf('mce_')==1)continue;if(rules[c]=="."+tinyMCE.settings['visual_table_class'])continue;if(rules[c].indexOf('.')!=-1){output[output.length]=rules[c].substring(rules[c].indexOf('.')+1);}}}}}}if(output.length>0)tinyMCE.cssClasses=output;return output;};TinyMCE.prototype.regexpReplace=function(in_str,reg_exp,replace_str,opts){if(typeof(opts)=="undefined")opts='g';var re=new RegExp(reg_exp,opts);return in_str.replace(re,replace_str);};TinyMCE.prototype.cleanupEventStr=function(str){str=""+str;str=str.replace('function anonymous()\n{\n','');str=str.replace('\n}','');return str;};TinyMCE.prototype.getAbsPosition=function(node){var pos=new Object();pos.absLeft=pos.absTop=0;var parentNode=node;while(parentNode){pos.absLeft+=parentNode.offsetLeft;pos.absTop+=parentNode.offsetTop;parentNode=parentNode.offsetParent;}return pos;};TinyMCE.prototype.openFileBrowser=function(field_name,url,type,win){var cb=tinyMCE.getParam("file_browser_callback");this.setWindowArg("window",win);if(eval('typeof('+cb+')')=="undefined")alert("Callback function: "+cb+" could not be found.");else eval(cb+"(field_name, url, type, win);");};TinyMCE.prototype.getControlHTML=function(control_name){var themePlugins=tinyMCE.getParam('plugins','',true,',');var templateFunction;for(var i=themePlugins.length;i>=0;i--){templateFunction='TinyMCE_'+themePlugins[i]+"_getControlHTML";if(eval("typeof("+templateFunction+")")!='undefined'){var html=eval(templateFunction+"('"+control_name+"');");if(html!="")return tinyMCE.replaceVar(html,"pluginurl",tinyMCE.baseURL+"/plugins/"+themePlugins[i]);}}return eval('TinyMCE_'+tinyMCE.settings['theme']+"_getControlHTML"+"('"+control_name+"');");};TinyMCE.prototype._themeExecCommand=function(editor_id,element,command,user_interface,value){var themePlugins=tinyMCE.getParam('plugins','',true,',');var templateFunction;for(var i=themePlugins.length;i>=0;i--){templateFunction='TinyMCE_'+themePlugins[i]+"_execCommand";if(eval("typeof("+templateFunction+")")!='undefined'){if(eval(templateFunction+"(editor_id, element, command, user_interface, value);"))return true;}}templateFunction='TinyMCE_'+tinyMCE.settings['theme']+"_execCommand";if(eval("typeof("+templateFunction+")")!='undefined')return eval(templateFunction+"(editor_id, element, command, user_interface, value);");return false;};TinyMCE.prototype._getThemeFunction=function(suffix,skip_plugins){if(skip_plugins)return 'TinyMCE_'+tinyMCE.settings['theme']+suffix;var themePlugins=tinyMCE.getParam('plugins','',true,',');var templateFunction;for(var i=themePlugins.length;i>=0;i--){templateFunction='TinyMCE_'+themePlugins[i]+suffix;if(eval("typeof("+templateFunction+")")!='undefined')return templateFunction;}return 'TinyMCE_'+tinyMCE.settings['theme']+suffix;};TinyMCE.prototype.isFunc=function(func_name){if(func_name==null||func_name=="")return false;return eval("typeof("+func_name+")")!="undefined";};TinyMCE.prototype.exec=function(func_name,args){var str=func_name+'(';for(var i=3;i<args.length;i++){str+='args['+i+']';if(i<args.length-1)str+=',';}str+=');';return eval(str);};TinyMCE.prototype.executeCallback=function(param,suffix,mode){switch(mode){case 0:var state=false;var plugins=tinyMCE.getParam('plugins','',true,',');for(var i=0;i<plugins.length;i++){var func="TinyMCE_"+plugins[i]+suffix;if(tinyMCE.isFunc(func)){tinyMCE.exec(func,this.executeCallback.arguments);state=true;}}var func='TinyMCE_'+tinyMCE.settings['theme']+suffix;if(tinyMCE.isFunc(func)){tinyMCE.exec(func,this.executeCallback.arguments);state=true;}var func=tinyMCE.getParam(param,'');if(tinyMCE.isFunc(func)){tinyMCE.exec(func,this.executeCallback.arguments);state=true;}return state;case 1:var plugins=tinyMCE.getParam('plugins','',true,',');for(var i=0;i<plugins.length;i++){var func="TinyMCE_"+plugins[i]+suffix;if(tinyMCE.isFunc(func)){if(tinyMCE.exec(func,this.executeCallback.arguments))return true;}}var func='TinyMCE_'+tinyMCE.settings['theme']+suffix;if(tinyMCE.isFunc(func)){if(tinyMCE.exec(func,this.executeCallback.arguments))return true;}var func=tinyMCE.getParam(param,'');if(tinyMCE.isFunc(func)){if(tinyMCE.exec(func,this.executeCallback.arguments))return true;}return false;}};function TinyMCEControl(settings){this.undoLevels=new Array();this.undoIndex=0;this.isDirty=false;this.settings=settings;this.settings['theme']=tinyMCE.getParam("theme","default");this.settings['width']=tinyMCE.getParam("width",-1);this.settings['height']=tinyMCE.getParam("height",-1);};TinyMCEControl.prototype.repaint=function(){if(tinyMCE.isMSIE)return;this.getBody().style.display='none';this.getBody().style.display='block';};TinyMCEControl.prototype.switchSettings=function(){if(tinyMCE.configs.length>1&&tinyMCE.currentConfig!=this.settings['index']){tinyMCE.settings=this.settings;tinyMCE.currentConfig=this.settings['index'];}};TinyMCEControl.prototype.fixBrokenURLs=function(){var body=this.getBody();var elms=body.getElementsByTagName("img");for(var i=0;i<elms.length;i++){var src=elms[i].getAttribute('mce_real_src');if(src&&src!="")elms[i].setAttribute("src",src);}var elms=body.getElementsByTagName("a");for(var i=0;i<elms.length;i++){var href=elms[i].getAttribute('mce_real_href');if(href&&href!="")elms[i].setAttribute("href",href);}};TinyMCEControl.prototype.convertAllRelativeURLs=function(){var body=this.getBody();var elms=body.getElementsByTagName("img");for(var i=0;i<elms.length;i++){var src=elms[i].getAttribute('src');if(src&&src!=""){src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],src);elms[i].setAttribute("src",src);elms[i].setAttribute("mce_real_src",src);}}var elms=body.getElementsByTagName("a");for(var i=0;i<elms.length;i++){var href=elms[i].getAttribute('href');if(href&&href!=""){href=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],href);elms[i].setAttribute("href",href);elms[i].setAttribute("mce_real_href",href);}}};TinyMCEControl.prototype.getSelectedHTML=function(){if(tinyMCE.isSafari){return this.getRng().toString();}var elm=document.createElement("body");if(tinyMCE.isGecko)elm.appendChild(this.getRng().cloneContents());else elm.innerHTML=this.getRng().htmlText;return tinyMCE._cleanupHTML(this.contentDocument,this.settings,elm,this.visualAid);};TinyMCEControl.prototype.getBookmark=function(){var rng=this.getRng();if(tinyMCE.isSafari)return rng;if(tinyMCE.isMSIE)return rng.getBookmark();if(tinyMCE.isGecko)return rng.cloneRange();return null;};TinyMCEControl.prototype.moveToBookmark=function(bookmark){if(tinyMCE.isSafari){var sel=this.getSel().realSelection;sel.setBaseAndExtent(bookmark.startContainer,bookmark.startOffset,bookmark.endContainer,bookmark.endOffset);return true;}if(tinyMCE.isMSIE)return this.getRng().moveToBookmark(bookmark);if(tinyMCE.isGecko){var rng=this.getDoc().createRange();var sel=this.getSel();rng.setStart(bookmark.startContainer,bookmark.startOffset);rng.setEnd(bookmark.endContainer,bookmark.endOffset);sel.removeAllRanges();sel.addRange(rng);return true;}return false;};TinyMCEControl.prototype.getSelectedText=function(){if(tinyMCE.isMSIE){var doc=this.getDoc();if(doc.selection.type=="Text"){var rng=doc.selection.createRange();selectedText=rng.text;}else selectedText='';}else{var sel=this.getSel();if(sel&&sel.toString)selectedText=sel.toString();else selectedText='';}return selectedText;};TinyMCEControl.prototype.selectNode=function(node,collapse,select_text_node,to_start){if(!node)return;if(typeof(collapse)=="undefined")collapse=true;if(typeof(select_text_node)=="undefined")select_text_node=false;if(typeof(to_start)=="undefined")to_start=true;if(tinyMCE.isMSIE){var rng=this.getBody().createTextRange();try{rng.moveToElementText(node);if(collapse)rng.collapse(to_start);rng.select();}catch(e){}}else{var sel=this.getSel();if(!sel)return;if(tinyMCE.isSafari){sel.realSelection.setBaseAndExtent(node,0,node,node.innerText.length);if(collapse){if(to_start)sel.realSelection.collapseToStart();else sel.realSelection.collapseToEnd();}this.scrollToNode(node);return;}var rng=this.getDoc().createRange();if(select_text_node){var nodes=tinyMCE.getNodeTree(node,new Array(),3);if(nodes.length>0)rng.selectNodeContents(nodes[0]);else rng.selectNodeContents(node);}else rng.selectNode(node);if(collapse){if(!to_start&&node.nodeType==3){rng.setStart(node,node.nodeValue.length);rng.setEnd(node,node.nodeValue.length);}else rng.collapse(to_start);}sel.removeAllRanges();sel.addRange(rng);}this.scrollToNode(node);tinyMCE.selectedElement=null;if(node.nodeType==1)tinyMCE.selectedElement=node;};TinyMCEControl.prototype.scrollToNode=function(node){var pos=tinyMCE.getAbsPosition(node);var doc=this.getDoc();var scrollX=doc.body.scrollLeft+doc.documentElement.scrollLeft;var scrollY=doc.body.scrollTop+doc.documentElement.scrollTop;var height=tinyMCE.isMSIE?document.getElementById(this.editorId).style.pixelHeight:this.targetElement.clientHeight;if(!tinyMCE.settings['auto_resize']&&!(node.absTop>scrollY&&node.absTop<(scrollY-25+height)))this.contentWindow.scrollTo(pos.absLeft,pos.absTop-height+25);};TinyMCEControl.prototype.getBody=function(){return this.getDoc().body;};TinyMCEControl.prototype.getDoc=function(){return this.contentWindow.document;};TinyMCEControl.prototype.getWin=function(){return this.contentWindow;};TinyMCEControl.prototype.getSel=function(){if(tinyMCE.isMSIE)return this.getDoc().selection;var sel=this.contentWindow.getSelection();if(tinyMCE.isSafari&&!sel.getRangeAt){var newSel=new Object();var doc=this.getDoc();function getRangeAt(idx){var rng=new Object();rng.startContainer=this.focusNode;rng.endContainer=this.anchorNode;rng.commonAncestorContainer=this.focusNode;rng.createContextualFragment=function(html){if(html.charAt(0)=='<'){var elm=doc.createElement("div");elm.innerHTML=html;return elm.firstChild;}return doc.createTextNode("UNSUPPORTED, DUE TO LIMITATIONS IN SAFARI!");};rng.deleteContents=function(){doc.execCommand("Delete",false,"");};return rng;}newSel.focusNode=sel.baseNode;newSel.focusOffset=sel.baseOffset;newSel.anchorNode=sel.extentNode;newSel.anchorOffset=sel.extentOffset;newSel.getRangeAt=getRangeAt;newSel.text=""+sel;newSel.realSelection=sel;newSel.toString=function(){return this.text;};return newSel;}return sel;};TinyMCEControl.prototype.getRng=function(){var sel=this.getSel();if(sel==null)return null;if(tinyMCE.isMSIE)return sel.createRange();if(tinyMCE.isSafari){var rng=this.getDoc().createRange();var sel=this.getSel().realSelection;rng.setStart(sel.baseNode,sel.baseOffset);rng.setEnd(sel.extentNode,sel.extentOffset);return rng;}return this.getSel().getRangeAt(0);};TinyMCEControl.prototype._insertPara=function(e){function isEmpty(para){function isEmptyHTML(html){return html.replace(new RegExp('[ \t\r\n]+','g'),'').toLowerCase()=="";}if(para.getElementsByTagName("img").length>0)return false;if(para.getElementsByTagName("table").length>0)return false;if(para.getElementsByTagName("hr").length>0)return false;var nodes=tinyMCE.getNodeTree(para,new Array(),3);for(var i=0;i<nodes.length;i++){if(!isEmptyHTML(nodes[i].nodeValue))return false;}return true;}var doc=this.getDoc();var sel=this.getSel();var win=this.contentWindow;var rng=sel.getRangeAt(0);var body=doc.body;var rootElm=doc.documentElement;var self=this;var blockName="P";var rngBefore=doc.createRange();rngBefore.setStart(sel.anchorNode,sel.anchorOffset);rngBefore.collapse(true);var rngAfter=doc.createRange();rngAfter.setStart(sel.focusNode,sel.focusOffset);rngAfter.collapse(true);var direct=rngBefore.compareBoundaryPoints(rngBefore.START_TO_END,rngAfter)<0;var startNode=direct?sel.anchorNode:sel.focusNode;var startOffset=direct?sel.anchorOffset:sel.focusOffset;var endNode=direct?sel.focusNode:sel.anchorNode;var endOffset=direct?sel.focusOffset:sel.anchorOffset;var startBlock=tinyMCE.getParentBlockElement(startNode);var endBlock=tinyMCE.getParentBlockElement(endNode);if(startBlock!=null){blockName=startBlock.nodeName.toUpperCase();if(blockName=="TD"||blockName=="TABLE")blockName="P";}if((startBlock!=null&&startBlock.nodeName.toLowerCase()=="li")||(endBlock!=null&&endBlock.nodeName.toLowerCase()=="li"))return false;if((startBlock!=null&&startBlock.nodeName.toLowerCase()=="table")||(endBlock!=null&&endBlock.nodeName.toLowerCase()=="table"))startBlock=endBlock=null;var paraBefore=(startBlock!=null&&startBlock.nodeName.toUpperCase()==blockName)?startBlock.cloneNode(false):doc.createElement(blockName);var paraAfter=(endBlock!=null&&endBlock.nodeName.toUpperCase()==blockName)?endBlock.cloneNode(false):doc.createElement(blockName);var startChop=startNode;var endChop=endNode;node=startChop;do{if(node==body||node.nodeType==9||tinyMCE.isBlockElement(node))break;startChop=node;}while((node=node.previousSibling?node.previousSibling:node.parentNode));node=endChop;do{if(node==body||node.nodeType==9||tinyMCE.isBlockElement(node))break;endChop=node;}while((node=node.nextSibling?node.nextSibling:node.parentNode));if(startBlock==null){rng.deleteContents();sel.removeAllRanges();if(startChop!=rootElm&&endChop!=rootElm){rngBefore=rng.cloneRange();if(startChop==body)rngBefore.setStart(startChop,0);else rngBefore.setStartBefore(startChop);paraBefore.appendChild(rngBefore.cloneContents());if(endChop.parentNode.nodeName==blockName)endChop=endChop.parentNode;rng.setEndAfter(endChop);var contents=rng.cloneContents();if(contents.firstChild&&(contents.firstChild.nodeName==blockName||contents.firstChild.nodeName.toLowerCase()=="body")){var nodes=contents.firstChild.childNodes;for(var i=0;i<nodes.length;i++){if(nodes[i].nodeName.toLowerCase()!="body")paraAfter.appendChild(nodes[i]);}}else paraAfter.appendChild(contents);if(isEmpty(paraBefore))paraBefore.innerHTML=" ";if(isEmpty(paraAfter))paraAfter.innerHTML=" ";rng.deleteContents();rngAfter.deleteContents();rngBefore.deleteContents();paraAfter.normalize();rngBefore.insertNode(paraAfter);paraBefore.normalize();rngBefore.insertNode(paraBefore);}else{body.innerHTML="<"+blockName+"> </"+blockName+"><"+blockName+"> </"+blockName+">";paraAfter=body.childNodes[1];}this.selectNode(paraAfter,true,true);return true;}if(startChop.nodeName==blockName)rngBefore.setStart(startChop,0);else rngBefore.setStartBefore(startChop);rngBefore.setEnd(startNode,startOffset);paraBefore.appendChild(rngBefore.cloneContents());rngAfter.setEndAfter(endChop);rngAfter.setStart(endNode,endOffset);var contents=rngAfter.cloneContents();if(contents.firstChild&&contents.firstChild.nodeName==blockName){var nodes=contents.firstChild.childNodes;for(var i=0;i<nodes.length;i++){if(nodes[i].nodeName.toLowerCase()!="body")paraAfter.appendChild(nodes[i]);}}else paraAfter.appendChild(contents);if(isEmpty(paraBefore))paraBefore.innerHTML=" ";if(isEmpty(paraAfter))paraAfter.innerHTML=" ";var rng=doc.createRange();if(!startChop.previousSibling&&startChop.parentNode.nodeName.toUpperCase()==blockName){rng.setStartBefore(startChop.parentNode);}else{if(rngBefore.startContainer.nodeName.toUpperCase()==blockName&&rngBefore.startOffset==0)rng.setStartBefore(rngBefore.startContainer);else rng.setStart(rngBefore.startContainer,rngBefore.startOffset);}if(!endChop.nextSibling&&endChop.parentNode.nodeName.toUpperCase()==blockName)rng.setEndAfter(endChop.parentNode);else rng.setEnd(rngAfter.endContainer,rngAfter.endOffset);rng.deleteContents();rng.insertNode(paraAfter);rng.insertNode(paraBefore);paraAfter.normalize();paraBefore.normalize();this.selectNode(paraAfter,true,true);return true;};TinyMCEControl.prototype._handleBackSpace=function(evt_type){var doc=this.getDoc();var sel=this.getSel();if(sel==null)return false;var rng=sel.getRangeAt(0);var node=rng.startContainer;var elm=node.nodeType==3?node.parentNode:node;if(node==null)return;if(elm&&elm.nodeName==""){var para=doc.createElement("p");while(elm.firstChild)para.appendChild(elm.firstChild);elm.parentNode.insertBefore(para,elm);elm.parentNode.removeChild(elm);var rng=rng.cloneRange();rng.setStartBefore(node.nextSibling);rng.setEndAfter(node.nextSibling);rng.extractContents();this.selectNode(node.nextSibling,true,true);}var para=tinyMCE.getParentBlockElement(node);if(para!=null&¶.nodeName.toLowerCase()=='p'&&evt_type=="keypress"){var htm=para.innerHTML;var block=tinyMCE.getParentBlockElement(node);if(htm==""||htm==" "||block.nodeName.toLowerCase()=="li"){var prevElm=para.previousSibling;while(prevElm!=null&&prevElm.nodeType!=1)prevElm=prevElm.previousSibling;if(prevElm==null)return false;var nodes=tinyMCE.getNodeTree(prevElm,new Array(),3);var lastTextNode=nodes.length==0?null:nodes[nodes.length-1];if(lastTextNode!=null)this.selectNode(lastTextNode,true,false,false);para.parentNode.removeChild(para);return true;}}return false;};TinyMCEControl.prototype._insertSpace=function(){return true;};TinyMCEControl.prototype.autoResetDesignMode=function(){if(!tinyMCE.isMSIE&&tinyMCE.settings['auto_reset_designmode']){var sel=this.getSel();if(!sel||!sel.rangeCount||sel.rangeCount==0)eval('try { this.getDoc().designMode = "On"; } catch(e) {}');}};TinyMCEControl.prototype.isDirty=function(){return this.isDirty;};TinyMCEControl.prototype.execCommand=function(command,user_interface,value){var doc=this.getDoc();var win=this.getWin();if(this.lastSafariSelection){this.moveToBookmark(this.lastSafariSelection);tinyMCE.selectedElement=this.lastSafariSelectedElement;}if(!tinyMCE.isMSIE&&!this.useCSS){doc.execCommand("useCSS",false,true);this.useCSS=true;}this.contentDocument=doc;if(tinyMCE._themeExecCommand(this.editorId,this.getBody(),command,user_interface,value))return;if(command!="mceAddUndoLevel"&&command!="Undo"&&command!="Redo"&&command!="mceImage"&&command!="mceLink"&&command!="mceToggleVisualAid"&&(command!="mceInsertTable"&&!user_interface))this.execCommand("mceAddUndoLevel");if(this.getFocusElement()&&this.getFocusElement().nodeName.toLowerCase()=="img"){var align=this.getFocusElement().getAttribute('align');switch(command){case "JustifyLeft":if(align=='left')this.getFocusElement().removeAttribute('align');else this.getFocusElement().setAttribute('align','left');tinyMCE.triggerNodeChange();return;case "JustifyCenter":if(align=='middle')this.getFocusElement().removeAttribute('align');else this.getFocusElement().setAttribute('align','middle');tinyMCE.triggerNodeChange();return;case "JustifyRight":if(align=='right')this.getFocusElement().removeAttribute('align');else this.getFocusElement().setAttribute('align','right');tinyMCE.triggerNodeChange();return;}}if(tinyMCE.settings['force_br_newlines']){var alignValue="";if(doc.selection.type!="Control"){switch(command){case "JustifyLeft":alignValue="left";break;case "JustifyCenter":alignValue="center";break;case "JustifyFull":alignValue="justify";break;case "JustifyRight":alignValue="right";break;}if(alignValue!=""){var rng=doc.selection.createRange();if((divElm=tinyMCE.getParentElement(rng.parentElement(),"div"))!=null)divElm.setAttribute("align",alignValue);else if(rng.pasteHTML&&rng.htmlText.length>0)rng.pasteHTML('<div align="'+alignValue+'">'+rng.htmlText+"</div>");tinyMCE.triggerNodeChange();return;}}}switch(command){case "mceStoreSelection":this.selectionBookmark=this.getBookmark();break;case "mceRestoreSelection":this.moveToBookmark(this.selectionBookmark);break;case "InsertUnorderedList":case "InsertOrderedList":var tag=(command=="InsertUnorderedList")?"ul":"ol";if(tinyMCE.isSafari)this.execCommand("mceInsertContent",false,"<"+tag+"><li> </li><"+tag+">");else this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();break;case "Strikethrough":if(tinyMCE.isSafari)this.execCommand("mceInsertContent",false,"<strike>"+this.getSelectedHTML()+"</strike>");else this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();break;case "mceSelectNode":this.selectNode(value);tinyMCE.triggerNodeChange();tinyMCE.selectedNode=value;break;case "FormatBlock":if(value==null||value==""){var elm=tinyMCE.getParentElement(this.getFocusElement(),"p,div,h1,h2,h3,h4,h5,h6,pre,address");if(elm)this.execCommand("mceRemoveNode",false,elm);}else this.getDoc().execCommand("FormatBlock",false,value);tinyMCE.triggerNodeChange();break;case "mceRemoveNode":if(!value)value=tinyMCE.getParentElement(this.getFocusElement());if(tinyMCE.isMSIE){value.outerHTML=value.innerHTML;}else{var rng=value.ownerDocument.createRange();rng.setStartBefore(value);rng.setEndAfter(value);rng.deleteContents();rng.insertNode(rng.createContextualFragment(value.innerHTML));}tinyMCE.triggerNodeChange();break;case "mceSelectNodeDepth":var parentNode=this.getFocusElement();for(var i=0;parentNode;i++){if(parentNode.nodeName.toLowerCase()=="body")break;if(parentNode.nodeName.toLowerCase()=="#text"){i--;parentNode=parentNode.parentNode;continue;}if(i==value){this.selectNode(parentNode,false);tinyMCE.triggerNodeChange();tinyMCE.selectedNode=parentNode;return;}parentNode=parentNode.parentNode;}break;case "HiliteColor":if(tinyMCE.isGecko){this.getDoc().execCommand("useCSS",false,false);this.getDoc().execCommand('hilitecolor',false,value);this.getDoc().execCommand("useCSS",false,true);}else this.getDoc().execCommand('BackColor',false,value);break;case "Cut":case "Copy":case "Paste":var cmdFailed=false;eval('try {this.getDoc().execCommand(command, user_interface, value);} catch (e) {cmdFailed = true;}');if(tinyMCE.isGecko&&cmdFailed){if(confirm(tinyMCE.getLang('lang_clipboard_msg')))window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html','mceExternal');return;}else tinyMCE.triggerNodeChange();break;case "mceSetContent":if(!value)value="";value=tinyMCE._customCleanup("insert_to_editor",value);tinyMCE._setHTML(doc,value);doc.body.innerHTML=tinyMCE._cleanupHTML(doc,tinyMCE.settings,doc.body);tinyMCE.handleVisualAid(doc.body,true,this.visualAid);return true;case "mceLink":var selectedText="";if(tinyMCE.isMSIE){var rng=doc.selection.createRange();selectedText=rng.text;}else selectedText=this.getSel().toString();if(!tinyMCE.linkElement){if((tinyMCE.selectedElement.nodeName.toLowerCase()!="img")&&(selectedText.length<=0))return;}var href="",target="",title="",onclick="",action="insert",style_class="";if(tinyMCE.selectedElement.nodeName.toLowerCase()=="a")tinyMCE.linkElement=tinyMCE.selectedElement;if(tinyMCE.linkElement!=null&&tinyMCE.getAttrib(tinyMCE.linkElement,'href')=="")tinyMCE.linkElement=null;if(tinyMCE.linkElement){href=tinyMCE.getAttrib(tinyMCE.linkElement,'href');target=tinyMCE.getAttrib(tinyMCE.linkElement,'target');title=tinyMCE.getAttrib(tinyMCE.linkElement,'title');onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'mce_onclick');style_class=tinyMCE.getAttrib(tinyMCE.linkElement,'class');if(onclick=="")onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');onclick=tinyMCE.cleanupEventStr(onclick);mceRealHref=tinyMCE.getAttrib(tinyMCE.linkElement,'mce_real_href');if(mceRealHref!="")href=mceRealHref;href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement, true);");action="update";}if(this.settings['insertlink_callback']){var returnVal=eval(this.settings['insertlink_callback']+"(href, target, title, onclick, action, style_class);");if(returnVal&&returnVal['href'])tinyMCE.insertLink(returnVal['href'],returnVal['target'],returnVal['title'],returnVal['onclick'],returnVal['style_class']);}else{tinyMCE.openWindow(this.insertLinkTemplate,{href:href,target:target,title:title,onclick:onclick,action:action,className:style_class});}break;case "mceImage":var src="",alt="",border="",hspace="",vspace="",width="",height="",align="";var title="",onmouseover="",onmouseout="",action="insert";var img=tinyMCE.imgElement;if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img"){img=tinyMCE.selectedElement;tinyMCE.imgElement=img;}if(img){if(tinyMCE.getAttrib(img,'name').indexOf('mce_')==0)return;src=tinyMCE.getAttrib(img,'src');alt=tinyMCE.getAttrib(img,'alt');if(alt=="")alt=tinyMCE.getAttrib(img,'title');if(tinyMCE.isGecko){var w=img.style.width;if(w!=null&&w!="")img.setAttribute("width",w);var h=img.style.height;if(h!=null&&h!="")img.setAttribute("height",h);}border=tinyMCE.getAttrib(img,'border');hspace=tinyMCE.getAttrib(img,'hspace');vspace=tinyMCE.getAttrib(img,'vspace');width=tinyMCE.getAttrib(img,'width');height=tinyMCE.getAttrib(img,'height');align=tinyMCE.getAttrib(img,'align');onmouseover=tinyMCE.getAttrib(img,'onmouseover');onmouseout=tinyMCE.getAttrib(img,'onmouseout');title=tinyMCE.getAttrib(img,'title');if(tinyMCE.isMSIE){width=img.attributes['width'].specified?width:"";height=img.attributes['height'].specified?height:"";}onmouseover=tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseover));onmouseout=tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseout));mceRealSrc=tinyMCE.getAttrib(img,'mce_real_src');if(mceRealSrc!="")src=mceRealSrc;src=eval(tinyMCE.settings['urlconverter_callback']+"(src, img, true);");if(onmouseover!="")onmouseover=eval(tinyMCE.settings['urlconverter_callback']+"(onmouseover, img, true);");if(onmouseout!="")onmouseout=eval(tinyMCE.settings['urlconverter_callback']+"(onmouseout, img, true);");action="update";}if(this.settings['insertimage_callback']){var returnVal=eval(this.settings['insertimage_callback']+"(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);");if(returnVal&&returnVal['src'])tinyMCE.insertImage(returnVal['src'],returnVal['alt'],returnVal['border'],returnVal['hspace'],returnVal['vspace'],returnVal['width'],returnVal['height'],returnVal['align'],returnVal['title'],returnVal['onmouseover'],returnVal['onmouseout']);}else tinyMCE.openWindow(this.insertImageTemplate,{src:src,alt:alt,border:border,hspace:hspace,vspace:vspace,width:width,height:height,align:align,title:title,onmouseover:onmouseover,onmouseout:onmouseout,action:action});break;case "mceCleanupWord":if(tinyMCE.isMSIE){var html=this.getBody().createTextRange().htmlText;if(html.indexOf('="mso')!=-1){tinyMCE._setHTML(this.contentDocument,this.getBody().innerHTML);html=tinyMCE._cleanupHTML(this.contentDocument,this.settings,this.getBody(),this.visualAid);}this.getBody().innerHTML=html;}break;case "mceCleanup":tinyMCE._setHTML(this.contentDocument,this.getBody().innerHTML);this.getBody().innerHTML=tinyMCE._cleanupHTML(this.contentDocument,this.settings,this.getBody(),this.visualAid);tinyMCE.handleVisualAid(this.getBody(),true,this.visualAid);this.repaint();tinyMCE.triggerNodeChange();break;case "mceAnchor":if(!user_interface){var aElm=tinyMCE.getParentElement(this.getFocusElement(),"a","name");if(aElm){if(value==null||value==""){if(tinyMCE.isMSIE){aElm.outerHTML=aElm.innerHTML;}else{var rng=aElm.ownerDocument.createRange();rng.setStartBefore(aElm);rng.setEndAfter(aElm);rng.deleteContents();rng.insertNode(rng.createContextualFragment(aElm.innerHTML));}}else aElm.setAttribute('name',value);}else{this.getDoc().execCommand("fontname",false,"#mce_temp_font#");var elementArray=tinyMCE.getElementsByAttributeValue(this.getBody(),"font","face","#mce_temp_font#");for(var x=0;x<elementArray.length;x++){elm=elementArray[x];var aElm=this.getDoc().createElement("a");aElm.setAttribute('name',value);if(elm.hasChildNodes()){for(var i=0;i<elm.childNodes.length;i++)aElm.appendChild(elm.childNodes[i].cloneNode(true));}elm.parentNode.replaceChild(aElm,elm);}}tinyMCE.triggerNodeChange();}break;case "mceReplaceContent":var selectedText="";if(tinyMCE.isMSIE){var rng=doc.selection.createRange();selectedText=rng.text;}else selectedText=this.getSel().toString();if(selectedText.length>0){value=tinyMCE.replaceVar(value,"selection",selectedText);tinyMCE.execCommand('mceInsertContent',false,value);}tinyMCE.triggerNodeChange();break;case "mceSetAttribute":if(typeof(value)=='object'){var targetElms=(typeof(value['targets'])=="undefined")?"p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address":value['targets'];var targetNode=tinyMCE.getParentElement(this.getFocusElement(),targetElms);if(targetNode){targetNode.setAttribute(value['name'],value['value']);tinyMCE.triggerNodeChange();}}break;case "mceSetCSSClass":var selectedText=false;if(tinyMCE.isMSIE){var rng=doc.selection.createRange();selectedText=(rng.text&&rng.text.length>0);}else selectedText=(this.getSel().toString().length>0);if(tinyMCE.selectedNode)tinyMCE.selectedElement=tinyMCE.selectedNode;if(selectedText&&!tinyMCE.selectedNode){this.getDoc().execCommand("RemoveFormat",false,null);if(value==null)return this.execCommand("RemoveFormat",false,null);this.getDoc().execCommand("fontname",false,"#mce_temp_font#");var elementArray=tinyMCE.getElementsByAttributeValue(this.getBody(),"font","face","#mce_temp_font#");for(var x=0;x<elementArray.length;x++){elm=elementArray[x];if(elm){var spanElm=this.getDoc().createElement("span");spanElm.className=value;if(elm.hasChildNodes()){for(var i=0;i<elm.childNodes.length;i++)spanElm.appendChild(elm.childNodes[i].cloneNode(true));}elm.parentNode.replaceChild(spanElm,elm);}}}else{var targetElm=this.getFocusElement();if(tinyMCE.selectedElement.nodeName.toLowerCase()=="img"||tinyMCE.selectedElement.nodeName.toLowerCase()=="table")targetElm=tinyMCE.selectedElement;var targetNode=tinyMCE.getParentElement(targetElm,"p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address");if(tinyMCE.selectedElement.nodeType==1)targetNode=tinyMCE.selectedElement;if(!tinyMCE.isMSIE&&!targetNode)targetNode=tinyMCE.imgElement;if(targetNode){if(targetNode.nodeName.toLowerCase()=="span"&&(!value||value=="")){if(targetNode.hasChildNodes()){for(var i=0;i<targetNode.childNodes.length;i++)targetNode.parentNode.insertBefore(targetNode.childNodes[i].cloneNode(true),targetNode);}targetNode.parentNode.removeChild(targetNode);}else{if(value!=null&&value!="")targetNode.className=value;else{targetNode.removeAttribute("className");targetNode.removeAttribute("class");}}}}tinyMCE.triggerNodeChange();break;case "mceInsertRawHTML":var key='tiny_mce_marker';this.execCommand('mceInsertContent',false,key);var html=this.getBody().innerHTML;if((pos=html.indexOf(key))!=-1)this.getBody().innerHTML=html.substring(0,pos)+value+html.substring(pos+key.length);break;case "mceInsertContent":if(!tinyMCE.isMSIE){var sel=this.getSel();var rng=this.getRng();var isHTML=value.indexOf('<')!=-1;if(isHTML){if(tinyMCE.isSafari){var tmpRng=this.getDoc().createRange();tmpRng.setStart(this.getBody(),0);tmpRng.setEnd(this.getBody(),0);value=tmpRng.createContextualFragment(value);}else value=rng.createContextualFragment(value);}else{var el=document.createElement("div");el.innerHTML=value;value=el.firstChild.nodeValue;value=doc.createTextNode(value);}if(tinyMCE.isSafari&&!isHTML){this.execCommand('InsertText',false,value.nodeValue);tinyMCE.triggerNodeChange();return true;}else if(tinyMCE.isSafari&&isHTML){rng.deleteContents();rng.insertNode(value);tinyMCE.triggerNodeChange();return true;}rng.deleteContents();if(rng.startContainer.nodeType==3){var node=rng.startContainer.splitText(rng.startOffset);node.parentNode.insertBefore(value,node);}else rng.insertNode(value);if(!isHTML){sel.selectAllChildren(doc.body);sel.removeAllRanges();var rng=doc.createRange();rng.selectNode(value);rng.collapse(false);sel.addRange(rng);}else rng.collapse(false);}else{var rng=doc.selection.createRange();if(rng.item)rng.item(0).outerHTML=value;else rng.pasteHTML(value);}tinyMCE.triggerNodeChange();break;case "mceAddUndoLevel":if(tinyMCE.settings['custom_undo_redo']){var customUndoLevels=tinyMCE.settings['custom_undo_redo_levels'];var newHTML=this.getBody().innerHTML;if(newHTML!=this.undoLevels[this.undoLevels.length-1]){tinyMCE.executeCallback('onchange_callback','_onchange',0,this);this.isDirty=true;if(customUndoLevels!=-1&&this.undoLevels.length>customUndoLevels){for(var i=0;i<this.undoLevels.length-1;i++){this.undoLevels[i]=this.undoLevels[i+1];}this.undoLevels.length--;this.undoIndex--;}this.undoLevels[this.undoIndex++]=newHTML;this.undoLevels.length=this.undoIndex;}tinyMCE.triggerNodeChange(false);}break;case "Undo":if(tinyMCE.settings['custom_undo_redo']){if(this.undoIndex==this.undoLevels.length){this.execCommand("mceAddUndoLevel");this.undoIndex--;}if(this.undoIndex>0){this.undoIndex--;this.getBody().innerHTML=this.undoLevels[this.undoIndex];}tinyMCE.triggerNodeChange();}else this.getDoc().execCommand(command,user_interface,value);break;case "Redo":if(tinyMCE.settings['custom_undo_redo']){if(this.undoIndex<(this.undoLevels.length-1)){this.undoIndex++;this.getBody().innerHTML=this.undoLevels[this.undoIndex];}tinyMCE.triggerNodeChange();}else this.getDoc().execCommand(command,user_interface,value);break;case "mceToggleVisualAid":this.visualAid=!this.visualAid;tinyMCE.handleVisualAid(this.getBody(),true,this.visualAid);tinyMCE.triggerNodeChange();break;case "removeformat":var text=this.getSelectedText();if(tinyMCE.isMSIE){try{win.focus();var rng=doc.selection.createRange();rng.execCommand("RemoveFormat",false,null);rng.pasteHTML(rng.text);}catch(e){}}else this.getDoc().execCommand(command,user_interface,value);if(text.length==0)this.execCommand("mceSetCSSClass",false,"");tinyMCE.triggerNodeChange();break;default:this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();}};TinyMCEControl.prototype.queryCommandValue=function(command){return this.getDoc().queryCommandValue(command);};TinyMCEControl.prototype.queryCommandState=function(command){return this.getDoc().queryCommandState(command);};TinyMCEControl.prototype.onAdd=function(replace_element,form_element_name,target_document){var targetDoc=target_document?target_document:document;this.targetDoc=targetDoc;tinyMCE.themeURL=tinyMCE.baseURL+"/themes/"+this.settings['theme'];this.settings['themeurl']=tinyMCE.themeURL;if(!replace_element){alert("Error: Could not find the target element.");return false;}var templateFunction=tinyMCE._getThemeFunction('_getInsertLinkTemplate');if(eval("typeof("+templateFunction+")")!='undefined')this.insertLinkTemplate=eval(templateFunction+'(this.settings);');var templateFunction=tinyMCE._getThemeFunction('_getInsertImageTemplate');if(eval("typeof("+templateFunction+")")!='undefined')this.insertImageTemplate=eval(templateFunction+'(this.settings);');var templateFunction=tinyMCE._getThemeFunction('_getEditorTemplate');if(eval("typeof("+templateFunction+")")=='undefined'){alert("Error: Could not find the template function: "+templateFunction);return false;}var editorTemplate=eval(templateFunction+'(this.settings, this.editorId);');var deltaWidth=editorTemplate['delta_width']?editorTemplate['delta_width']:0;var deltaHeight=editorTemplate['delta_height']?editorTemplate['delta_height']:0;var html='<span id="'+this.editorId+'_parent">'+editorTemplate['html'];var templateFunction=tinyMCE._getThemeFunction('_handleNodeChange',true);if(eval("typeof("+templateFunction+")")!='undefined')this.settings['handleNodeChangeCallback']=templateFunction;html=tinyMCE.replaceVar(html,"editor_id",this.editorId);html=tinyMCE.replaceVar(html,"default_document",tinyMCE.baseURL+"/blank.htm");this.settings['default_document']=tinyMCE.baseURL+"/blank.htm";this.settings['old_width']=this.settings['width'];this.settings['old_height']=this.settings['height'];if(this.settings['width']==-1)this.settings['width']=replace_element.offsetWidth;if(this.settings['height']==-1)this.settings['height']=replace_element.offsetHeight;if(this.settings['width']==0)this.settings['width']=replace_element.style.width;if(this.settings['height']==0)this.settings['height']=replace_element.style.height;if(this.settings['width']==0)this.settings['width']=320;if(this.settings['height']==0)this.settings['height']=240;this.settings['area_width']=parseInt(this.settings['width']);this.settings['area_height']=parseInt(this.settings['height']);this.settings['area_width']+=deltaWidth;this.settings['area_height']+=deltaHeight;if((""+this.settings['width']).indexOf('%')!=-1)this.settings['area_width']="100%";if((""+this.settings['height']).indexOf('%')!=-1)this.settings['area_height']="100%";if((""+replace_element.style.width).indexOf('%')!=-1){this.settings['width']=replace_element.style.width;this.settings['area_width']="100%";}if((""+replace_element.style.height).indexOf('%')!=-1){this.settings['height']=replace_element.style.height;this.settings['area_height']="100%";}html=tinyMCE.applyTemplate(html);this.settings['width']=this.settings['old_width'];this.settings['height']=this.settings['old_height'];this.visualAid=this.settings['visual'];this.formTargetElementId=form_element_name;if(replace_element.nodeName.toLowerCase()=="textarea")this.startContent=replace_element.value;else this.startContent=replace_element.innerHTML;if(replace_element.nodeName.toLowerCase()!="textarea"){this.oldTargetElement=replace_element.cloneNode(true);if(tinyMCE.settings['debug'])html+='<textarea wrap="off" id="'+form_element_name+'" name="'+form_element_name+'" cols="100" rows="15"></textarea>';else html+='<input type="hidden" type="text" id="'+form_element_name+'" name="'+form_element_name+'" />';html+='</span>';if(!tinyMCE.isMSIE){var rng=replace_element.ownerDocument.createRange();rng.setStartBefore(replace_element);var fragment=rng.createContextualFragment(html);replace_element.parentNode.replaceChild(fragment,replace_element);}else replace_element.outerHTML=html;}else{html+='</span>';this.oldTargetElement=replace_element;if(!tinyMCE.settings['debug'])this.oldTargetElement.style.display="none";if(!tinyMCE.isMSIE){var rng=replace_element.ownerDocument.createRange();rng.setStartBefore(replace_element);var fragment=rng.createContextualFragment(html);replace_element.parentNode.insertBefore(fragment,replace_element);}else replace_element.insertAdjacentHTML("beforeBegin",html);}var dynamicIFrame=false;var tElm=targetDoc.getElementById(this.editorId);if(!tinyMCE.isMSIE){if(tElm&&tElm.nodeName.toLowerCase()=="span"){tElm=tinyMCE._createIFrame(tElm);dynamicIFrame=true;}this.targetElement=tElm;this.iframeElement=tElm;this.contentDocument=tElm.contentDocument;this.contentWindow=tElm.contentWindow;}else{if(tElm&&tElm.nodeName.toLowerCase()=="span")tElm=tinyMCE._createIFrame(tElm);else tElm=targetDoc.frames[this.editorId];this.targetElement=tElm;this.iframeElement=targetDoc.getElementById(this.editorId);this.contentDocument=tElm.window.document;this.contentWindow=tElm.window;this.getDoc().designMode="on";}var doc=this.contentDocument;if(dynamicIFrame){var html=""+'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">'+'<html>'+'<head>'+'<base href="'+tinyMCE.settings['base_href']+'" />'+'<title>blank_page</title>'+'<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'+'</head>'+'<body class="mceContentBody">'+'</body>'+'</html>';try{this.getDoc().designMode="on";doc.open();doc.write(html);doc.close();}catch(e){this.getDoc().location.href=tinyMCE.baseURL+"/blank.htm";}}if(tinyMCE.isMSIE)window.setTimeout("TinyMCE.prototype.addEventHandlers('"+this.editorId+"');",1);tinyMCE.setupContent(this.editorId,true);return true;};TinyMCEControl.prototype.getFocusElement=function(){if(tinyMCE.isMSIE){var doc=this.getDoc();var rng=doc.selection.createRange();if(rng.collapse)rng.collapse(true);var elm=rng.item?rng.item(0):rng.parentElement();}else{var sel=this.getSel();var elm=(sel&&sel.anchorNode)?sel.anchorNode:null;if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img")elm=tinyMCE.selectedElement;}return elm;};var tinyMCE=new TinyMCE();var tinyMCELang=new Array();function debug(){var msg="";var elm=document.getElementById("tinymce_debug");if(!elm){var debugDiv=document.createElement("div");debugDiv.setAttribute("className","debugger");debugDiv.className="debugger";debugDiv.innerHTML='\ + function TinyMCE(){this.majorVersion="2";this.minorVersion="0RC2";this.releaseDate="2005-09-12";this.instances=new Array();this.stickyClassesLookup=new Array();this.windowArgs=new Array();this.loadedFiles=new Array();this.configs=new Array();this.currentConfig=0;this.eventHandlers=new Array();this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isMSIE5=this.isMSIE&&(navigator.userAgent.indexOf('MSIE 5')!=-1);this.isMSIE5_0=this.isMSIE&&(navigator.userAgent.indexOf('MSIE 5.0')!=-1);this.isGecko=navigator.userAgent.indexOf('Gecko')!=-1;this.isSafari=navigator.userAgent.indexOf('Safari')!=-1;this.isMac=navigator.userAgent.indexOf('Mac')!=-1;this.dialogCounter=0;this.idCounter=0;};TinyMCE.prototype.defParam=function(key,def_val){this.settings[key]=tinyMCE.getParam(key,def_val);};TinyMCE.prototype.init=function(settings){var theme;this.settings=settings;if(typeof(document.execCommand)=='undefined')return;if(!tinyMCE.baseURL){var elements=document.getElementsByTagName('script');for(var i=0;i<elements.length;i++){if(elements[i].src&&(elements[i].src.indexOf("tiny_mce.js")!=-1||elements[i].src.indexOf("tiny_mce_src.js")!=-1||elements[i].src.indexOf("tiny_mce_gzip.php")!=-1)){var src=elements[i].src;tinyMCE.srcMode=(src.indexOf('_src')!=-1)?'_src':'';src=src.substring(0,src.lastIndexOf('/'));tinyMCE.baseURL=src;break;}}}this.documentBasePath=document.location.href;if(this.documentBasePath.indexOf('?')!=-1)this.documentBasePath=this.documentBasePath.substring(0,this.documentBasePath.indexOf('?'));this.documentURL=this.documentBasePath;this.documentBasePath=this.documentBasePath.substring(0,this.documentBasePath.lastIndexOf('/'));if(tinyMCE.baseURL.indexOf('://')==-1&&tinyMCE.baseURL.charAt(0)!='/'){tinyMCE.baseURL=this.documentBasePath+"/"+tinyMCE.baseURL;}this.defParam("mode","none");this.defParam("theme","advanced");this.defParam("plugins","",true);this.defParam("language","en");this.defParam("docs_language",this.settings['language']);this.defParam("elements","");this.defParam("textarea_trigger","mce_editable");this.defParam("editor_selector","");this.defParam("editor_deselector","mceNoEditor");this.defParam("valid_elements","+a[id|style|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/b[class|style],-em/i[class|style],-strike[class|style],-u[class|style],+p[style|dir|class|align],-ol[class],-ul[class],-li[class],br,img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border=0|alt|title|hspace|vspace|width|height|align],-sub[style|class],-sup[style|class],-blockquote[dir|style],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],-td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[style|class|align],-pre[class|align],address[class|align],-h1[style|dir|class|align],-h2[style|dir|class|align],-h3[style|dir|class|align],-h4[style|dir|class|align],-h5[style|dir|class|align],-h6[style|dir|class|align],hr[class]");this.defParam("extended_valid_elements","");this.defParam("invalid_elements","");this.defParam("encoding","");this.defParam("urlconverter_callback",tinyMCE.getParam("urlconvertor_callback","TinyMCE.prototype.convertURL"));this.defParam("save_callback","");this.defParam("debug",false);this.defParam("force_br_newlines",false);this.defParam("force_p_newlines",true);this.defParam("add_form_submit_trigger",true);this.defParam("relative_urls",true);this.defParam("remove_script_host",true);this.defParam("focus_alert",true);this.defParam("document_base_url",this.documentURL);this.defParam("visual",true);this.defParam("visual_table_class","mceVisualAid");this.defParam("setupcontent_callback","");this.defParam("fix_content_duplication",true);this.defParam("custom_undo_redo",true);this.defParam("custom_undo_redo_levels",-1);this.defParam("custom_undo_redo_keyboard_shortcuts",true);this.defParam("verify_css_classes",false);this.defParam("verify_html",true);this.defParam("apply_source_formatting",false);this.defParam("directionality","ltr");this.defParam("cleanup_on_startup",false);this.defParam("inline_styles",false);this.defParam("convert_newlines_to_brs",false);this.defParam("auto_reset_designmode",true);this.defParam("entities","160,nbsp,38,amp,34,quot,162,cent,8364,euro,163,pound,165,yen,169,copy,174,reg,8482,trade,8240,permil,181,micro,183,middot,8226,bull,8230,hellip,8242,prime,8243,Prime,167,sect,182,para,223,szlig,8249,lsaquo,8250,rsaquo,171,laquo,187,raquo,8216,lsquo,8217,rsquo,8220,ldquo,8221,rdquo,8218,sbquo,8222,bdquo,60,lt,62,gt,8804,le,8805,ge,8211,ndash,8212,mdash,175,macr,8254,oline,164,curren,166,brvbar,168,uml,161,iexcl,191,iquest,710,circ,732,tilde,176,deg,8722,minus,177,plusmn,247,divide,8260,frasl,215,times,185,sup1,178,sup2,179,sup3,188,frac14,189,frac12,190,frac34,402,fnof,8747,int,8721,sum,8734,infin,8730,radic,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8712,isin,8713,notin,8715,ni,8719,prod,8743,and,8744,or,172,not,8745,cap,8746,cup,8706,part,8704,forall,8707,exist,8709,empty,8711,nabla,8727,lowast,8733,prop,8736,ang,180,acute,184,cedil,170,ordf,186,ordm,8224,dagger,8225,Dagger,192,Agrave,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,202,Ecirc,203,Euml,204,Igrave,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,212,Ocirc,213,Otilde,214,Ouml,216,Oslash,338,OElig,217,Ugrave,219,Ucirc,220,Uuml,376,Yuml,222,THORN,224,agrave,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,234,ecirc,235,euml,236,igrave,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,244,ocirc,245,otilde,246,ouml,248,oslash,339,oelig,249,ugrave,251,ucirc,252,uuml,254,thorn,255,yuml,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,8501,alefsym,982,piv,8476,real,977,thetasym,978,upsih,8472,weierp,8465,image,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8756,there4,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,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,173,shy,233,eacute,237,iacute,243,oacute,250,uacute,193,Aacute,225,aacute,201,Eacute,205,Iacute,211,Oacute,218,Uacute,221,Yacute,253,yacute");this.defParam("entity_encoding","named");this.defParam("cleanup_callback","");this.defParam("add_unload_trigger",true);this.defParam("ask",false);this.defParam("nowrap",false);this.defParam("auto_resize",false);this.defParam("auto_focus",false);this.defParam("cleanup",true);this.defParam("remove_linebreaks",true);this.defParam("button_tile_map",false);this.defParam("submit_patch",true);this.defParam("browsers","msie,safari,gecko");this.defParam("dialog_type","window");this.defParam("convert_fonts_to_styles",true);if(this.isMSIE&&this.settings['browsers'].indexOf('msie')==-1)return;if(this.isGecko&&this.settings['browsers'].indexOf('gecko')==-1)return;if(this.isSafari&&this.settings['browsers'].indexOf('safari')==-1)return;var baseHREF=tinyMCE.settings['document_base_url'];if(baseHREF.indexOf('?')!=-1)baseHREF=baseHREF.substring(0,baseHREF.indexOf('?'));this.settings['base_href']=baseHREF.substring(0,baseHREF.lastIndexOf('/'))+"/";theme=this.settings['theme'];this.blockRegExp=new RegExp("^(h[1-6]|p|div|address|pre|form|table|li|ol|ul|td)$","i");this.posKeyCodes=new Array(13,45,36,35,33,34,37,38,39,40);this.settings['theme_href']=tinyMCE.baseURL+"/themes/"+theme;if(!tinyMCE.isMSIE)this.settings['force_br_newlines']=false;if(tinyMCE.getParam("content_css",false)){var cssPath=tinyMCE.getParam("content_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings['content_css']=this.documentBasePath+"/"+cssPath;else this.settings['content_css']=cssPath;}else this.settings['content_css']='';if(tinyMCE.getParam("popups_css",false)){var cssPath=tinyMCE.getParam("popups_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings['popups_css']=this.documentBasePath+"/"+cssPath;else this.settings['popups_css']=cssPath;}else this.settings['popups_css']=tinyMCE.baseURL+"/themes/"+theme+"/css/editor_popup.css";if(tinyMCE.getParam("editor_css",false)){var cssPath=tinyMCE.getParam("editor_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings['editor_css']=this.documentBasePath+"/"+cssPath;else this.settings['editor_css']=cssPath;}else this.settings['editor_css']=tinyMCE.baseURL+"/themes/"+theme+"/css/editor_ui.css";if(tinyMCE.settings['debug']){var msg="Debug: \n";msg+="baseURL: "+this.baseURL+"\n";msg+="documentBasePath: "+this.documentBasePath+"\n";msg+="content_css: "+this.settings['content_css']+"\n";msg+="popups_css: "+this.settings['popups_css']+"\n";msg+="editor_css: "+this.settings['editor_css']+"\n";alert(msg);}this._initCleanup();if(this.configs.length==0){if(this.isSafari&&this.getParam('safari_warning',true))alert("Safari support is very limited and should be considered experimental.\nSo there is no need to even submit bugreports on this early version.");tinyMCE.addEvent(window,"load",TinyMCE.prototype.onLoad);if(tinyMCE.isMSIE){if(tinyMCE.settings['add_unload_trigger']){tinyMCE.addEvent(window,"unload",TinyMCE.prototype.unloadHandler);tinyMCE.addEvent(window.document,"beforeunload",TinyMCE.prototype.unloadHandler);}}else{if(tinyMCE.settings['add_unload_trigger'])tinyMCE.addEvent(window,"unload",function(){tinyMCE.triggerSave(true,true);});}}this.loadScript(tinyMCE.baseURL+'/themes/'+this.settings['theme']+'/editor_template'+tinyMCE.srcMode+'.js');this.loadScript(tinyMCE.baseURL+'/langs/'+this.settings['language']+'.js');this.loadCSS(this.settings['editor_css']);var themePlugins=tinyMCE.getParam('plugins','',true,',');if(this.settings['plugins']!=''){for(var i=0;i<themePlugins.length;i++)this.loadScript(tinyMCE.baseURL+'/plugins/'+themePlugins[i]+'/editor_plugin'+tinyMCE.srcMode+'.js');}settings['index']=this.configs.length;this.configs[this.configs.length]=settings;};TinyMCE.prototype.loadScript=function(url){for(var i=0;i<this.loadedFiles.length;i++){if(this.loadedFiles[i]==url)return;}document.write('<sc'+'ript language="javascript" type="text/javascript" src="'+url+'"></script>');this.loadedFiles[this.loadedFiles.length]=url;};TinyMCE.prototype.loadCSS=function(url){for(var i=0;i<this.loadedFiles.length;i++){if(this.loadedFiles[i]==url)return;}document.write('<link href="'+url+'" rel="stylesheet" type="text/css" />');this.loadedFiles[this.loadedFiles.length]=url;};TinyMCE.prototype.importCSS=function(doc,css_file){if(css_file=='')return;if(tinyMCE.isMSIE)var styleSheet=doc.createStyleSheet(css_file);else{var elm=doc.createElement("link");elm.rel="stylesheet";elm.href=css_file;if(headArr=doc.getElementsByTagName("head"))headArr[0].appendChild(elm);}};TinyMCE.prototype.confirmAdd=function(e,settings){var elm=tinyMCE.isMSIE?event.srcElement:e.target;var elementId=elm.name?elm.name:elm.id;tinyMCE.settings=settings;if(!elm.getAttribute('mce_noask')&&confirm(tinyMCELang['lang_edit_confirm']))tinyMCE.addMCEControl(elm,elementId);elm.setAttribute('mce_noask','true');};TinyMCE.prototype.updateContent=function(form_element_name){var formElement=document.getElementById(form_element_name);for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];inst.switchSettings();if(inst.formElement==formElement){var doc=inst.getDoc();tinyMCE._setHTML(doc,inst.formElement.value);if(!tinyMCE.isMSIE)doc.body.innerHTML=tinyMCE._cleanupHTML(inst,doc,this.settings,doc.body,inst.visualAid);}}};TinyMCE.prototype.addMCEControl=function(replace_element,form_element_name,target_document){var id="mce_editor_"+tinyMCE.idCounter++;var inst=new TinyMCEControl(tinyMCE.settings);inst.editorId=id;this.instances[id]=inst;inst.onAdd(replace_element,form_element_name,target_document);};TinyMCE.prototype.triggerSave=function(skip_cleanup,skip_callback){for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];inst.switchSettings();tinyMCE.settings['preformatted']=false;if(typeof(skip_cleanup)=="undefined")skip_cleanup=false;if(typeof(skip_callback)=="undefined")skip_callback=false;tinyMCE._setHTML(inst.getDoc(),inst.getBody().innerHTML);if(inst.settings['cleanup']==false){tinyMCE.handleVisualAid(inst.getBody(),true,false,inst);tinyMCE._setEventsEnabled(inst.getBody(),false);}tinyMCE._customCleanup(inst,"submit_content_dom",inst.contentWindow.document.body);var htm=skip_cleanup?inst.getBody().innerHTML:tinyMCE._cleanupHTML(inst,inst.getDoc(),this.settings,inst.getBody(),this.visualAid,true);htm=tinyMCE._customCleanup(inst,"submit_content",htm);if(tinyMCE.settings["encoding"]=="xml"||tinyMCE.settings["encoding"]=="html")htm=tinyMCE.convertStringToXML(htm);if(!skip_callback&&tinyMCE.settings['save_callback']!="")var content=eval(tinyMCE.settings['save_callback']+"(inst.formTargetElementId,htm,inst.getBody());");if((typeof(content)!="undefined")&&content!=null)htm=content;htm=tinyMCE.regexpReplace(htm,"(","(","gi");htm=tinyMCE.regexpReplace(htm,")",")","gi");htm=tinyMCE.regexpReplace(htm,";",";","gi");htm=tinyMCE.regexpReplace(htm,""",""","gi");htm=tinyMCE.regexpReplace(htm,"^","^","gi");if(inst.formElement)inst.formElement.value=htm;}};TinyMCE.prototype._setEventsEnabled=function(node,state){var events=new Array('onfocus','onblur','onclick','ondblclick','onmousedown','onmouseup','onmouseover','onmousemove','onmouseout','onkeypress','onkeydown','onkeydown','onkeyup');var elms=node.getElementsByTagName("a");for(var i=0;i<elms.length;i++){var event="";for(var x=0;x<events.length;x++){if((event=tinyMCE.getAttrib(elms[i],events[x]))!=''){event=tinyMCE.cleanupEventStr(""+event);if(state)event="return true;"+event;else event=event.replace(/^return true;/gi,'');elms[i].removeAttribute(events[x]);elms[i].setAttribute(events[x],event);}}}};TinyMCE.prototype.resetForm=function(form_index){var formObj=document.forms[form_index];for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];inst.switchSettings();for(var i=0;i<formObj.elements.length;i++){if(inst.formTargetElementId==formObj.elements[i].name){inst.getBody().innerHTML=formObj.elements[i].value;return;}}}};TinyMCE.prototype.execInstanceCommand=function(editor_id,command,user_interface,value,focus){var inst=tinyMCE.getInstanceById(editor_id);if(inst){if(typeof(focus)=="undefined")focus=true;if(focus)inst.contentWindow.focus();inst.autoResetDesignMode();this.selectedElement=inst.getFocusElement();this.selectedInstance=inst;tinyMCE.execCommand(command,user_interface,value);}};TinyMCE.prototype.execCommand=function(command,user_interface,value){user_interface=user_interface?user_interface:false;value=value?value:null;if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.switchSettings();switch(command){case 'mceHelp':var template=new Array();template['file']='about.htm';template['width']=480;template['height']=380;tinyMCE.openWindow(template,{tinymce_version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion,tinymce_releasedate:tinyMCE.releaseDate,inline:"yes"});return;case 'mceFocus':var inst=tinyMCE.getInstanceById(value);if(inst)inst.contentWindow.focus();return;case "mceAddControl":case "mceAddEditor":tinyMCE.addMCEControl(tinyMCE._getElementById(value),value);return;case "mceAddFrameControl":tinyMCE.addMCEControl(tinyMCE._getElementById(value),value['element'],value['document']);return;case "mceRemoveControl":case "mceRemoveEditor":tinyMCE.removeMCEControl(value);return;case "mceResetDesignMode":if(!tinyMCE.isMSIE){for(var n in tinyMCE.instances){try{tinyMCE.instances[n].getDoc().designMode="on";}catch(e){}}}return;}if(this.selectedInstance)this.selectedInstance.execCommand(command,user_interface,value);else if(tinyMCE.settings['focus_alert'])alert(tinyMCELang['lang_focus_alert']);};TinyMCE.prototype.eventPatch=function(editor_id){if(typeof(tinyMCE)=="undefined")return true;for(var i=0;i<document.frames.length;i++){if(document.frames[i].event){var event=document.frames[i].event;event.target=event.srcElement;TinyMCE.prototype.handleEvent(event);return;}}};TinyMCE.prototype.unloadHandler=function(){tinyMCE.triggerSave(true,true);};TinyMCE.prototype.addEventHandlers=function(editor_id){if(tinyMCE.isMSIE){var doc=document.frames[editor_id].document;tinyMCE.addEvent(doc,"keypress",TinyMCE.prototype.eventPatch);tinyMCE.addEvent(doc,"keyup",TinyMCE.prototype.eventPatch);tinyMCE.addEvent(doc,"keydown",TinyMCE.prototype.eventPatch);tinyMCE.addEvent(doc,"mouseup",TinyMCE.prototype.eventPatch);tinyMCE.addEvent(doc,"click",TinyMCE.prototype.eventPatch);}else{var inst=tinyMCE.instances[editor_id];var doc=inst.getDoc();inst.switchSettings();tinyMCE.addEvent(doc,"keypress",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"keydown",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"keyup",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"click",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"mouseup",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"mousedown",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"focus",tinyMCE.handleEvent);tinyMCE.addEvent(doc,"blur",tinyMCE.handleEvent);eval('try { doc.designMode = "On"; } catch(e) {}');}};TinyMCE.prototype._createIFrame=function(replace_element){var iframe=document.createElement("iframe");var id=replace_element.getAttribute("id");iframe.setAttribute("id",id);iframe.setAttribute("border","0");iframe.setAttribute("frameBorder","0");iframe.setAttribute("marginWidth","0");iframe.setAttribute("marginHeight","0");iframe.setAttribute("leftMargin","0");iframe.setAttribute("topMargin","0");iframe.setAttribute("width",tinyMCE.settings['area_width']);iframe.setAttribute("height",tinyMCE.settings['area_height']);iframe.setAttribute("allowtransparency","true");if(tinyMCE.settings["auto_resize"])iframe.setAttribute("scrolling","no");if(tinyMCE.isMSIE)iframe.setAttribute("src",this.settings['default_document']);iframe.style.width=tinyMCE.settings['area_width'];iframe.style.height=tinyMCE.settings['area_height'];if(tinyMCE.isMSIE)replace_element.outerHTML=iframe.outerHTML;else replace_element.parentNode.replaceChild(iframe,replace_element);if(tinyMCE.isMSIE)return window.frames[id];else return iframe;};TinyMCE.prototype.setupContent=function(editor_id){var inst=tinyMCE.instances[editor_id];var doc=inst.getDoc();var head=doc.getElementsByTagName('head').item(0);var content=inst.startContent;inst.switchSettings();if(!tinyMCE.isMSIE&&doc.title!="blank_page"){doc.location.href=tinyMCE.baseURL+"/blank.htm";window.setTimeout("tinyMCE.setupContent('"+editor_id+"');",1000);return;}if(!head){window.setTimeout("tinyMCE.setupContent('"+editor_id+"');",10);return;}tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/themes/"+inst.settings['theme']+"/css/editor_content.css");tinyMCE.importCSS(inst.getDoc(),inst.settings['content_css']);tinyMCE.executeCallback('init_instance_callback','_initInstance',0,inst);if(tinyMCE.settings['nowrap'])doc.body.style.whiteSpace="nowrap";doc.body.dir=this.settings['directionality'];doc.editorId=editor_id;if(!tinyMCE.isMSIE)doc.documentElement.editorId=editor_id;base=doc.createElement("base");base.setAttribute('href',tinyMCE.settings['base_href']);head.appendChild(base);if(tinyMCE.settings['convert_newlines_to_brs']){content=tinyMCE.regexpReplace(content,"\r\n","<br />","gi");content=tinyMCE.regexpReplace(content,"\r","<br />","gi");content=tinyMCE.regexpReplace(content,"\n","<br />","gi");}content=tinyMCE._customCleanup(inst,"insert_to_editor",content);if(tinyMCE.isMSIE){window.setInterval('try{tinyMCE.getCSSClasses(document.frames["'+editor_id+'"].document, "'+editor_id+'");}catch(e){}',500);if(tinyMCE.settings["force_br_newlines"])document.frames[editor_id].document.styleSheets[0].addRule("p","margin: 0px;");var body=document.frames[editor_id].document.body;tinyMCE.addEvent(body,"beforepaste",TinyMCE.prototype.eventPatch);tinyMCE.addEvent(body,"beforecut",TinyMCE.prototype.eventPatch);body.editorId=editor_id;}if(!tinyMCE.isMSIE){var contentElement=inst.getDoc().createElement("body");var doc=inst.getDoc();contentElement.innerHTML=content;if(tinyMCE.settings['force_p_newlines'])content=content.replace(new RegExp('<>','g'),"");if(tinyMCE.settings['cleanup_on_startup'])inst.getBody().innerHTML=tinyMCE._cleanupHTML(inst,doc,this.settings,contentElement);else{content=tinyMCE.regexpReplace(content,"<strong","<b","gi");content=tinyMCE.regexpReplace(content,"<em(/?)>","<i$1>","gi");content=tinyMCE.regexpReplace(content,"<em ","<i ","gi");content=tinyMCE.regexpReplace(content,"</strong>","</b>","gi");content=tinyMCE.regexpReplace(content,"</em>","</i>","gi");inst.getBody().innerHTML=content;}inst.convertAllRelativeURLs();}else{if(tinyMCE.settings['cleanup_on_startup']){tinyMCE._setHTML(inst.getDoc(),content);eval('try {inst.getBody().innerHTML = tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody());} catch(e) {}');}else tinyMCE._setHTML(inst.getDoc(),content);}var parentElm=document.getElementById(inst.editorId+'_parent');if(parentElm.lastChild.nodeName.toLowerCase()=="input")inst.formElement=parentElm.lastChild;else inst.formElement=parentElm.nextSibling;tinyMCE.handleVisualAid(inst.getBody(),true,tinyMCE.settings['visual'],inst);tinyMCE.executeCallback('setupcontent_callback','_setupContent',0,editor_id,inst.getBody(),inst.getDoc());if(!tinyMCE.isMSIE)TinyMCE.prototype.addEventHandlers(editor_id);if(tinyMCE.isMSIE)tinyMCE.addEvent(inst.getBody(),"blur",TinyMCE.prototype.eventPatch);tinyMCE.selectedInstance=inst;tinyMCE.selectedElement=inst.contentWindow.document.body;tinyMCE.triggerNodeChange(false,true);tinyMCE._customCleanup(inst,"insert_to_editor_dom",inst.getBody());tinyMCE._customCleanup(inst,"setup_content_dom",inst.getBody());tinyMCE._setEventsEnabled(inst.getBody(),true);inst.startContent=tinyMCE.trim(inst.getBody().innerHTML);inst.undoLevels[inst.undoLevels.length]=inst.startContent;};TinyMCE.prototype.cancelEvent=function(e){if(tinyMCE.isMSIE){e.returnValue=false;e.cancelBubble=true;}else e.preventDefault();};TinyMCE.prototype.removeTinyMCEFormElements=function(form_obj){for(var i=0;i<form_obj.elements.length;i++){var elementId=form_obj.elements[i].name?form_obj.elements[i].name:form_obj.elements[i].id;if(elementId.indexOf('mce_editor_')==0)form_obj.elements[i].disabled=true;}};TinyMCE.prototype.accessibleEventHandler=function(e){var win=this._win;e=tinyMCE.isMSIE?win.event:e;var elm=tinyMCE.isMSIE?e.srcElement:e.target;if(elm.nodeName=="SELECT"&&!elm.oldonchange){elm.oldonchange=elm.onchange;elm.onchange=null;}if(e.keyCode==13){elm.onchange=elm.oldonchange;elm.onchange();elm.oldonchange=null;tinyMCE.cancelEvent(e);}};TinyMCE.prototype.addSelectAccessibility=function(e,select,win){if(!select._isAccessible){select.onkeydown=tinyMCE.accessibleEventHandler;select._isAccessible=true;select._win=win;}};TinyMCE.prototype.handleEvent=function(e){if(typeof(tinyMCE)=="undefined")return true;switch(e.type){case "blur":if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.execCommand('mceEndTyping');return;case "submit":tinyMCE.removeTinyMCEFormElements(tinyMCE.isMSIE?window.event.srcElement:e.target);tinyMCE.triggerSave();tinyMCE.isNotDirty=true;return;case "reset":var formObj=tinyMCE.isMSIE?window.event.srcElement:e.target;for(var i=0;i<document.forms.length;i++){if(document.forms[i]==formObj)window.setTimeout('tinyMCE.resetForm('+i+');',10);}return;case "keypress":if(e.target.editorId){tinyMCE.selectedInstance=tinyMCE.instances[e.target.editorId];}else{if(e.target.ownerDocument.editorId)tinyMCE.selectedInstance=tinyMCE.instances[e.target.ownerDocument.editorId];}if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.switchSettings();if(tinyMCE.isGecko&&tinyMCE.settings['force_p_newlines']&&e.keyCode==13&&!e.shiftKey){if(tinyMCE.selectedInstance._insertPara(e)){tinyMCE.execCommand("mceAddUndoLevel");e.preventDefault();return false;}}if(tinyMCE.isGecko&&tinyMCE.settings['force_p_newlines']&&(e.keyCode==8||e.keyCode==46)&&!e.shiftKey){if(tinyMCE.selectedInstance._handleBackSpace(e.type)){tinyMCE.execCommand("mceAddUndoLevel");e.preventDefault();return false;}}if(tinyMCE.isGecko&&e.ctrlKey&&tinyMCE.settings['custom_undo_redo']){if(tinyMCE.settings['custom_undo_redo_keyboard_shortcuts']){if(e.charCode==122){tinyMCE.selectedInstance.execCommand("Undo");e.preventDefault();return false;}if(e.charCode==121){tinyMCE.selectedInstance.execCommand("Redo");e.preventDefault();return false;}}if(e.charCode==98){tinyMCE.selectedInstance.execCommand("Bold");e.preventDefault();return false;}if(e.charCode==105){tinyMCE.selectedInstance.execCommand("Italic");e.preventDefault();return false;}if(e.charCode==117){tinyMCE.selectedInstance.execCommand("Underline");e.preventDefault();return false;}}if(tinyMCE.isMSIE&&tinyMCE.settings['force_br_newlines']&&e.keyCode==13){if(e.target.editorId)tinyMCE.selectedInstance=tinyMCE.instances[e.target.editorId];if(tinyMCE.selectedInstance){var sel=tinyMCE.selectedInstance.getDoc().selection;var rng=sel.createRange();if(tinyMCE.getParentElement(rng.parentElement(),"li")!=null)return false;e.returnValue=false;e.cancelBubble=true;rng.pasteHTML("<br />");rng.collapse(false);rng.select();tinyMCE.execCommand("mceAddUndoLevel");tinyMCE.triggerNodeChange(false);return false;}}if(e.keyCode==8||e.keyCode==46){tinyMCE.selectedElement=e.target;tinyMCE.linkElement=tinyMCE.getParentElement(e.target,"a");tinyMCE.imgElement=tinyMCE.getParentElement(e.target,"img");tinyMCE.triggerNodeChange(false);}return false;break;case "keyup":case "keydown":if(e.target.editorId)tinyMCE.selectedInstance=tinyMCE.instances[e.target.editorId];else return;if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.switchSettings();var inst=tinyMCE.selectedInstance;if(tinyMCE.isGecko&&tinyMCE.settings['force_p_newlines']&&(e.keyCode==8||e.keyCode==46)&&!e.shiftKey){if(tinyMCE.selectedInstance._handleBackSpace(e.type)){tinyMCE.execCommand("mceAddUndoLevel");e.preventDefault();return false;}}tinyMCE.selectedElement=null;tinyMCE.selectedNode=null;var elm=tinyMCE.selectedInstance.getFocusElement();tinyMCE.linkElement=tinyMCE.getParentElement(elm,"a");tinyMCE.imgElement=tinyMCE.getParentElement(elm,"img");tinyMCE.selectedElement=elm;if(tinyMCE.isGecko&&e.type=="keyup"&&e.keyCode==9)tinyMCE.handleVisualAid(tinyMCE.selectedInstance.getBody(),true,tinyMCE.settings['visual'],tinyMCE.selectedInstance);if(tinyMCE.isGecko&&tinyMCE.settings['document_base_url']!=""+document.location.href&&e.type=="keyup"&&e.ctrlKey&&e.keyCode==86)tinyMCE.selectedInstance.fixBrokenURLs();if(tinyMCE.isMSIE&&e.type=="keydown"&&e.keyCode==13)tinyMCE.enterKeyElement=tinyMCE.selectedInstance.getFocusElement();if(tinyMCE.isMSIE&&e.type=="keyup"&&e.keyCode==13){var elm=tinyMCE.enterKeyElement;if(elm){var re=new RegExp('^HR|IMG|BR$','g');var dre=new RegExp('^H[1-6]$','g');if(!elm.hasChildNodes()&&!re.test(elm.nodeName)){if(dre.test(elm.nodeName))elm.innerHTML=" ";else elm.innerHTML=" ";}}}var keys=tinyMCE.posKeyCodes;var posKey=false;for(var i=0;i<keys.length;i++){if(keys[i]==e.keyCode){posKey=true;break;}}if(tinyMCE.isMSIE&&tinyMCE.settings['custom_undo_redo']){var keys=new Array(8,46);for(var i=0;i<keys.length;i++){if(keys[i]==e.keyCode){if(e.type=="keyup")tinyMCE.triggerNodeChange(false);}}if(tinyMCE.settings['custom_undo_redo_keyboard_shortcuts']){if(e.keyCode==90&&e.ctrlKey&&e.type=="keydown"){tinyMCE.selectedInstance.execCommand("Undo");tinyMCE.triggerNodeChange(false);}if(e.keyCode==89&&e.ctrlKey&&e.type=="keydown"){tinyMCE.selectedInstance.execCommand("Redo");tinyMCE.triggerNodeChange(false);}if((e.keyCode==90||e.keyCode==89)&&e.ctrlKey){e.returnValue=false;e.cancelBubble=true;return false;}}}if(!posKey&&e.type=="keyup")tinyMCE.execCommand("mceStartTyping");if(e.type=="keyup"&&(posKey||e.ctrlKey))tinyMCE.execCommand("mceEndTyping");if(posKey&&e.type=="keyup")tinyMCE.triggerNodeChange(false);break;case "mousedown":case "mouseup":case "click":case "focus":if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.switchSettings();var targetBody=tinyMCE.getParentElement(e.target,"body");for(var instanceName in tinyMCE.instances){var inst=tinyMCE.instances[instanceName];inst.autoResetDesignMode();if(inst.getBody()==targetBody){tinyMCE.selectedInstance=inst;tinyMCE.selectedElement=e.target;tinyMCE.linkElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"a");tinyMCE.imgElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"img");break;}}if(tinyMCE.isSafari){tinyMCE.selectedInstance.lastSafariSelection=tinyMCE.selectedInstance.getBookmark();tinyMCE.selectedInstance.lastSafariSelectedElement=tinyMCE.selectedElement;var lnk=tinyMCE.getParentElement(tinyMCE.selectedElement,"a");if(lnk&&e.type=="mousedown"){lnk.setAttribute("mce_real_href",lnk.getAttribute("href"));lnk.setAttribute("href","javascript:void(0);");}if(lnk&&e.type=="click"){window.setTimeout(function(){lnk.setAttribute("href",lnk.getAttribute("mce_real_href"));lnk.removeAttribute("mce_real_href");},10);}}if(e.type!="focus")tinyMCE.selectedNode=null;tinyMCE.triggerNodeChange(false);tinyMCE.execCommand("mceEndTyping");if(e.type=="mouseup")tinyMCE.execCommand("mceAddUndoLevel");if(!tinyMCE.selectedInstance&&e.target.editorId)tinyMCE.selectedInstance=tinyMCE.instances[e.target.editorId];if(tinyMCE.isGecko&&tinyMCE.settings['document_base_url']!=""+document.location.href)window.setTimeout('tinyMCE.getInstanceById("'+inst.editorId+'").fixBrokenURLs();',10);return false;break;}};TinyMCE.prototype.switchClass=function(element,class_name,lock_state){var lockChanged=false;if(typeof(lock_state)!="undefined"&&element!=null){element.classLock=lock_state;lockChanged=true;}if(element!=null&&(lockChanged||!element.classLock)){element.oldClassName=element.className;element.className=class_name;}};TinyMCE.prototype.restoreAndSwitchClass=function(element,class_name){if(element!=null&&!element.classLock){this.restoreClass(element);this.switchClass(element,class_name);}};TinyMCE.prototype.switchClassSticky=function(element_name,class_name,lock_state){var element,lockChanged=false;if(!this.stickyClassesLookup[element_name])this.stickyClassesLookup[element_name]=document.getElementById(element_name);element=this.stickyClassesLookup[element_name];if(typeof(lock_state)!="undefined"&&element!=null){element.classLock=lock_state;lockChanged=true;}if(element!=null&&(lockChanged||!element.classLock)){element.className=class_name;element.oldClassName=class_name;}};TinyMCE.prototype.restoreClass=function(element){if(element!=null&&element.oldClassName&&!element.classLock){element.className=element.oldClassName;element.oldClassName=null;}};TinyMCE.prototype.setClassLock=function(element,lock_state){if(element!=null)element.classLock=lock_state;};TinyMCE.prototype.addEvent=function(obj,name,handler){if(tinyMCE.isMSIE){obj.attachEvent("on"+name,handler);}else obj.addEventListener(name,handler,false);};TinyMCE.prototype.submitPatch=function(){tinyMCE.removeTinyMCEFormElements(this);tinyMCE.triggerSave();this.oldSubmit();tinyMCE.isNotDirty=true;};TinyMCE.prototype.onLoad=function(){for(var c=0;c<tinyMCE.configs.length;c++){tinyMCE.settings=tinyMCE.configs[c];var selector=tinyMCE.getParam("editor_selector");var deselector=tinyMCE.getParam("editor_deselector");var elementRefAr=new Array();if(document.forms&&tinyMCE.settings['add_form_submit_trigger']&&!tinyMCE.submitTriggers){for(var i=0;i<document.forms.length;i++){var form=document.forms[i];tinyMCE.addEvent(form,"submit",TinyMCE.prototype.handleEvent);tinyMCE.addEvent(form,"reset",TinyMCE.prototype.handleEvent);tinyMCE.submitTriggers=true;if(tinyMCE.settings['submit_patch']){try{form.oldSubmit=form.submit;form.submit=TinyMCE.prototype.submitPatch;}catch(e){}}}}var mode=tinyMCE.settings['mode'];switch(mode){case "exact":var elements=tinyMCE.getParam('elements','',true,',');for(var i=0;i<elements.length;i++){var element=tinyMCE._getElementById(elements[i]);var trigger=element?element.getAttribute(tinyMCE.settings['textarea_trigger']):"";if(tinyMCE.getAttrib(element,"class").indexOf(deselector)!=-1)continue;if(trigger=="false")continue;if(tinyMCE.settings['ask']&&element){elementRefAr[elementRefAr.length]=element;continue;}if(element)tinyMCE.addMCEControl(element,elements[i]);else if(tinyMCE.settings['debug'])alert("Error: Could not find element by id or name: "+elements[i]);}break;case "specific_textareas":case "textareas":var nodeList=document.getElementsByTagName("textarea");for(var i=0;i<nodeList.length;i++){var elm=nodeList.item(i);var trigger=elm.getAttribute(tinyMCE.settings['textarea_trigger']);if(selector!=''&&tinyMCE.getAttrib(elm,"class").indexOf(selector)==-1)continue;if(tinyMCE.getAttrib(elm,"class").indexOf(deselector)!=-1)continue;if((mode=="specific_textareas"&&trigger=="true")||(mode=="textareas"&&trigger!="false"))elementRefAr[elementRefAr.length]=elm;}break;}for(var i=0;i<elementRefAr.length;i++){var element=elementRefAr[i];var elementId=element.name?element.name:element.id;if(tinyMCE.settings['ask']){if(tinyMCE.isGecko){var settings=tinyMCE.settings;tinyMCE.addEvent(element,"focus",function(e){window.setTimeout(function(){TinyMCE.prototype.confirmAdd(e,settings);},10);});}else{var settings=tinyMCE.settings;tinyMCE.addEvent(element,"focus",function(){TinyMCE.prototype.confirmAdd(null,settings);});}}else tinyMCE.addMCEControl(element,elementId);}if(tinyMCE.settings['auto_focus']){window.setTimeout(function(){var inst=tinyMCE.getInstanceById(tinyMCE.settings['auto_focus']);inst.selectNode(inst.getBody(),true,true);inst.contentWindow.focus();},10);}tinyMCE.executeCallback('oninit','_oninit',0);}};TinyMCE.prototype.removeMCEControl=function(editor_id){var inst=tinyMCE.getInstanceById(editor_id);if(inst){inst.switchSettings();editor_id=inst.editorId;var html=tinyMCE.getContent(editor_id);var tmpInstances=new Array();for(var instanceName in tinyMCE.instances){var instance=tinyMCE.instances[instanceName];if(instanceName!=editor_id)tmpInstances[instanceName]=instance;}tinyMCE.instances=tmpInstances;tinyMCE.selectedElement=null;tinyMCE.selectedInstance=null;var replaceElement=document.getElementById(editor_id+"_parent");var oldTargetElement=inst.oldTargetElement;var targetName=oldTargetElement.nodeName.toLowerCase();if(targetName=="textarea"||targetName=="input"){replaceElement.parentNode.removeChild(replaceElement);oldTargetElement.style.display="inline";oldTargetElement.value=html;}else{oldTargetElement.innerHTML=html;replaceElement.parentNode.insertBefore(oldTargetElement,replaceElement);replaceElement.parentNode.removeChild(replaceElement);}}};TinyMCE.prototype._cleanupElementName=function(element_name,element){var name="";element_name=element_name.toLowerCase();if(element_name=="body")return null;if(tinyMCE.cleanup_verify_html){for(var i=0;i<tinyMCE.cleanup_invalidElements.length;i++){if(tinyMCE.cleanup_invalidElements[i]==element_name)return null;}var validElement=false;var elementAttribs=null;for(var i=0;i<tinyMCE.cleanup_validElements.length&&!elementAttribs;i++){for(var x=0,n=tinyMCE.cleanup_validElements[i][0].length;x<n;x++){var elmMatch=tinyMCE.cleanup_validElements[i][0][x];if(elmMatch.charAt(0)=='+'||elmMatch.charAt(0)=='-')elmMatch=elmMatch.substring(1);if(elmMatch.match(new RegExp('\\*|\\?|\\+','g'))!=null){elmMatch=elmMatch.replace(new RegExp('\\?','g'),'(\\S?)');elmMatch=elmMatch.replace(new RegExp('\\+','g'),'(\\S+)');elmMatch=elmMatch.replace(new RegExp('\\*','g'),'(\\S*)');elmMatch="^"+elmMatch+"$";if(element_name.match(new RegExp(elmMatch,'g'))){elementAttribs=tinyMCE.cleanup_validElements[i];validElement=true;break;}}if(element_name==elmMatch){elementAttribs=tinyMCE.cleanup_validElements[i];validElement=true;element_name=elementAttribs[0][0];break;}}}if(!validElement)return null;}if(element_name.charAt(0)=='+'||element_name.charAt(0)=='-')name=element_name.substring(1);if(!tinyMCE.isMSIE){if(name=="strong"&&!tinyMCE.cleanup_on_save)element_name="b";else if(name=="em"&&!tinyMCE.cleanup_on_save)element_name="i";}var elmData=new Object();elmData.element_name=element_name;elmData.valid_attribs=elementAttribs;return elmData;};TinyMCE.prototype._moveStyle=function(elm,style,attrib){if(tinyMCE.cleanup_inline_styles){var val=tinyMCE.getAttrib(elm,attrib);if(val!=''){val=''+val;switch(attrib){case "background":val="url('"+val+"');";break;case "bordercolor":if(elm.style.borderStyle==''||elm.style.borderStyle=='none')elm.style.borderStyle='solid';break;case "border":case "width":case "height":if(attrib=="border"&&elm.style.borderWidth>0)return;if(val.indexOf('%')==-1)val+='px';break;case "vspace":case "hspace":elm.style.marginTop=val+"px";elm.style.marginBottom=val+"px";elm.removeAttribute(attrib);return;case "align":if(elm.nodeName=="IMG"){if(tinyMCE.isMSIE)elm.style.styleFloat=val;else elm.style.cssFloat=val;}else elm.style.textAlign=val;elm.removeAttribute(attrib);return;}if(val!=''){eval('elm.style.'+style+' = val;');elm.removeAttribute(attrib);}}}else{if(style=='')return;var val=eval('elm.style.'+style)==''?tinyMCE.getAttrib(elm,attrib):eval('elm.style.'+style);val=val==null?'':''+val;switch(attrib){case "background":if(val.indexOf('url')==-1&&val!='')val="url('"+val+"');";if(val!=''){elm.style.backgroundImage=val;elm.removeAttribute(attrib);}return;case "border":case "width":case "height":val=val.replace('px','');break;case "align":if(tinyMCE.getAttrib(elm,'align')==''){if(elm.nodeName=="IMG"){if(tinyMCE.isMSIE&&elm.style.styleFloat!=''){val=elm.style.styleFloat;style='styleFloat';}else if(tinyMCE.isGecko&&elm.style.cssFloat!=''){val=elm.style.cssFloat;style='cssFloat';}}}break;}if(val!=''){elm.removeAttribute(attrib);elm.setAttribute(attrib,val);eval('elm.style.'+style+' = "";');}}};TinyMCE.prototype._cleanupAttribute=function(valid_attributes,element_name,attribute_node,element_node){var attribName=attribute_node.nodeName.toLowerCase();var attribValue=attribute_node.nodeValue;var attribMustBeValue=null;var verified=false;if(attribName.indexOf('moz_')!=-1)return null;if(!tinyMCE.isMSIE&&(attribName=="mce_real_href"||attribName=="mce_real_src")){if(!tinyMCE.cleanup_on_save){var attrib=new Object();attrib.name=attribName;attrib.value=attribValue;return attrib;}else return null;}if(attribName=="mce_onclick")verified=true;if(tinyMCE.cleanup_verify_html&&!verified){for(var i=1;i<valid_attributes.length;i++){var attribMatch=valid_attributes[i][0];var re=null;if(attribMatch.match(new RegExp('\\*|\\?|\\+','g'))!=null){attribMatch=attribMatch.replace(new RegExp('\\?','g'),'(\\S?)');attribMatch=attribMatch.replace(new RegExp('\\+','g'),'(\\S+)');attribMatch=attribMatch.replace(new RegExp('\\*','g'),'(\\S*)');attribMatch="^"+attribMatch+"$";re=new RegExp(attribMatch,'g');}if((re&&attribName.match(re)!=null)||attribName==attribMatch){verified=true;attribMustBeValue=valid_attributes[i][3];break;}}if(!verified)return false;}else verified=true;switch(attribName){case "size":if(tinyMCE.isMSIE5&&element_name=="font")attribValue=element_node.size;break;case "width":case "height":case "border":if(tinyMCE.isMSIE5)attribValue=eval("element_node."+attribName);break;case "color":if(tinyMCE.isMSIE5&&element_name=="font")attribValue=element_node.color;break;case "class":if(element_name=="table"||element_name=="td"){if(tinyMCE.cleanup_visual_table_class!="")attribValue=tinyMCE.getVisualAidClass(attribValue,!tinyMCE.cleanup_on_save);}if(!tinyMCE._verifyClass(element_node)||attribValue=="")return null;break;case "onfocus":case "onblur":case "onclick":case "ondblclick":case "onmousedown":case "onmouseup":case "onmouseover":case "onmousemove":case "onmouseout":case "onkeypress":case "onkeydown":case "onkeydown":case "onkeyup":attribValue=tinyMCE.cleanupEventStr(""+attribValue);if(attribValue.indexOf('return false;')==0)attribValue=attribValue.substring(14);break;case "style":attribValue=tinyMCE.serializeStyle(tinyMCE.parseStyle(element_node.style.cssText));break;case "href":case "src":if(!tinyMCE.isMSIE&&attribName=="href"&&element_node.getAttribute("mce_real_href"))attribValue=element_node.getAttribute("mce_real_href");if(!tinyMCE.isMSIE&&attribName=="src"&&element_node.getAttribute("mce_real_src"))attribValue=element_node.getAttribute("mce_real_src");if(tinyMCE.isGecko&&!tinyMCE.settings['relative_urls'])attribValue=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],attribValue);attribValue=eval(tinyMCE.cleanup_urlconverter_callback+"(attribValue, element_node, tinyMCE.cleanup_on_save);");break;case "colspan":case "rowspan":if(attribValue=="1")return null;break;case "_moz-userdefined":case "editorid":case "mce_real_href":case "mce_real_src":return null;}if(attribMustBeValue!=null){var isCorrect=false;for(var i=0;i<attribMustBeValue.length;i++){if(attribValue==attribMustBeValue[i]){isCorrect=true;break;}}if(!isCorrect)return null;}var attrib=new Object();attrib.name=attribName;attrib.value=attribValue;return attrib;};TinyMCE.prototype.parseStyle=function(str){var ar=new Array();var st=str.split(';');for(var i=0;i<st.length;i++){if(st[i]=='')continue;var re=new RegExp('^\\s*([^:]*):\\s*(.*)\\s*$');var pa=st[i].replace(re,'$1||$2').split('||');if(pa.length==2)ar[pa[0].toLowerCase()]=pa[1];}return ar;};TinyMCE.prototype.compressStyle=function(ar,pr,sf,res){var box=new Array();box[0]=ar[pr+'-top'+sf];box[1]=ar[pr+'-left'+sf];box[2]=ar[pr+'-right'+sf];box[3]=ar[pr+'-bottom'+sf];for(var i=0;i<box.length;i++){if(box[i]==null)return;for(var a=0;a<box.length;a++){if(box[a]!=box[i])return;}}ar[res]=box[0];ar[pr+'-top'+sf]=null;ar[pr+'-left'+sf]=null;ar[pr+'-right'+sf]=null;ar[pr+'-bottom'+sf]=null;};TinyMCE.prototype.serializeStyle=function(ar){var str="";tinyMCE.compressStyle(ar,"border","","border");tinyMCE.compressStyle(ar,"border","-width","border-width");tinyMCE.compressStyle(ar,"border","-color","border-color");for(var key in ar){var val=ar[key];if(val!=null&&val!=''){val=''+val;val=val.replace(new RegExp("url\\(\\'?([^\\']*)\\'?\\)",'gi'),"url('$1')");if(val!="url('')")str+=key.toLowerCase()+": "+val+"; ";}}if(new RegExp('; $').test(str))str=str.substring(0,str.length-2);return str;};TinyMCE.prototype._verifyClass=function(node){if(tinyMCE.isGecko){var className=node.getAttribute('class');if(!className)return false;}if(tinyMCE.isMSIE)var className=node.getAttribute('className');if(tinyMCE.cleanup_verify_css_classes&&tinyMCE.cleanup_on_save){var csses=tinyMCE.getCSSClasses();nonDefinedCSS=true;for(var c=0;c<csses.length;c++){if(csses[c]==className){nonDefinedCSS=false;break;}}if(nonDefinedCSS&&className.indexOf('mce_')!=0){node.removeAttribute('className');node.removeAttribute('class');return false;}}return true;};TinyMCE.prototype.cleanupNode=function(node){var output="";switch(node.nodeType){case 1:var elementData=tinyMCE._cleanupElementName(node.nodeName,node);var elementName=elementData?elementData.element_name:null;var elementValidAttribs=elementData?elementData.valid_attribs:null;var elementAttribs="";var openTag=false,nonEmptyTag=false;if(elementName!=null&&elementName.charAt(0)=='+'){elementName=elementName.substring(1);openTag=true;}if(elementName!=null&&elementName.charAt(0)=='-'){elementName=elementName.substring(1);nonEmptyTag=true;}if(tinyMCE.isMSIE&&tinyMCE.settings['fix_content_duplication']){var lookup=tinyMCE.cleanup_elementLookupTable;for(var i=0;i<lookup.length;i++){if(lookup[i]==node)return output;}lookup[lookup.length]=node;}if(!elementName){if(node.hasChildNodes()){for(var i=0;i<node.childNodes.length;i++)output+=this.cleanupNode(node.childNodes[i]);}return output;}if(tinyMCE.cleanup_on_save){if(node.nodeName=="A"&&node.className=="mceItemAnchor")return '<a name="'+this.convertStringToXML(node.getAttribute("name"))+'"></a>';}if(tinyMCE.cleanup_inline_styles){var re=new RegExp("^(TABLE|TD|TR|IMG|HR)$");if(re.test(node.nodeName)){tinyMCE._moveStyle(node,'width','width');tinyMCE._moveStyle(node,'height','height');tinyMCE._moveStyle(node,'borderWidth','border');tinyMCE._moveStyle(node,'','vspace');tinyMCE._moveStyle(node,'','hspace');tinyMCE._moveStyle(node,'textAlign','align');tinyMCE._moveStyle(node,'backgroundColor','bgColor');tinyMCE._moveStyle(node,'borderColor','borderColor');tinyMCE._moveStyle(node,'backgroundImage','background');if(tinyMCE.isMSIE5)node.outerHTML=node.outerHTML;}else if(tinyMCE.isBlockElement(node))tinyMCE._moveStyle(node,'textAlign','align');if(node.nodeName=="FONT")tinyMCE._moveStyle(node,'color','color');}if(elementValidAttribs){for(var a=1;a<elementValidAttribs.length;a++){var attribName,attribDefaultValue,attribForceValue,attribValue;attribName=elementValidAttribs[a][0];attribDefaultValue=elementValidAttribs[a][1];attribForceValue=elementValidAttribs[a][2];if(attribDefaultValue!=null||attribForceValue!=null){var attribValue=node.getAttribute(attribName);if(node.getAttribute(attribName)==null||node.getAttribute(attribName)=="")attribValue=attribDefaultValue;attribValue=attribForceValue?attribForceValue:attribValue;if(attribValue=="{$uid}")attribValue="uid_"+(tinyMCE.cleanup_idCount++);if(attribName=="class")attribValue=tinyMCE.getVisualAidClass(attribValue,tinyMCE.cleanup_on_save);node.setAttribute(attribName,attribValue);}}}if(elementName=="table"&&!node.hasChildNodes())return "";if(node.attributes.length>0){for(var i=0;i<node.attributes.length;i++){if(node.attributes[i].specified){var attrib=tinyMCE._cleanupAttribute(elementValidAttribs,elementName,node.attributes[i],node);if(attrib&&attrib.value!="")elementAttribs+=" "+attrib.name+"="+'"'+this.convertStringToXML(""+attrib.value)+'"';}}}if(tinyMCE.isMSIE&&elementName=="table"&&node.getAttribute("summary")!=null&&elementAttribs.indexOf('summary')==-1){elementAttribs+=" summary="+'"'+this.convertStringToXML(""+node.getAttribute("summary"))+'"';}if(tinyMCE.isMSIE&&elementName=="input"){if(node.type){if(!elementAttribs.match(/type=/g))elementAttribs+=" type="+'"'+node.type+'"';}if(node.value){if(!elementAttribs.match(/value=/g))elementAttribs+=" value="+'"'+node.value+'"';}}if((elementName=="p"||elementName=="td")&&(node.innerHTML==""||node.innerHTML==" "))return "<"+elementName+elementAttribs+">"+this.convertStringToXML(String.fromCharCode(160))+"</"+elementName+">";if(tinyMCE.isMSIE&&elementName=="script")return "<"+elementName+elementAttribs+">"+node.text+"</"+elementName+">";if(node.hasChildNodes()){if(elementName=="p"&&tinyMCE.cleanup_force_br_newlines)output+="<div"+elementAttribs+">";else output+="<"+elementName+elementAttribs+">";for(var i=0;i<node.childNodes.length;i++)output+=this.cleanupNode(node.childNodes[i]);if(elementName=="p"&&tinyMCE.cleanup_force_br_newlines)output+="</div><br />";else output+="</"+elementName+">";}else{if(!nonEmptyTag){if(openTag)output+="<"+elementName+elementAttribs+"></"+elementName+">";else output+="<"+elementName+elementAttribs+" />";}}return output;case 3:if(node.parentNode.nodeName.toLowerCase()=="script")return node.nodeValue;return this.convertStringToXML(node.nodeValue);case 8:return "<!--"+node.nodeValue+"-->";default:return "[UNKNOWN NODETYPE "+node.nodeType+"]";}};TinyMCE.prototype.convertStringToXML=function(html_data){var output="";for(var i=0;i<html_data.length;i++){var chr=html_data.charCodeAt(i);if(tinyMCE.settings['entity_encoding']=="numeric"){if(chr>127)output+='&#'+chr+";";else output+=String.fromCharCode(chr);continue;}if(tinyMCE.settings['entity_encoding']=="raw"){output+=String.fromCharCode(chr);continue;}if(typeof(tinyMCE.cleanup_entities["c"+chr])!='undefined'&&tinyMCE.cleanup_entities["c"+chr]!='')output+='&'+tinyMCE.cleanup_entities["c"+chr]+';';else output+=''+String.fromCharCode(chr);}return output;};TinyMCE.prototype._getCleanupElementName=function(chunk){var pos;if(chunk.charAt(0)=='+')chunk=chunk.substring(1);if(chunk.charAt(0)=='-')chunk=chunk.substring(1);if((pos=chunk.indexOf('/'))!=-1)chunk=chunk.substring(0,pos);if((pos=chunk.indexOf('['))!=-1)chunk=chunk.substring(0,pos);return chunk;};TinyMCE.prototype._initCleanup=function(){var validElements=tinyMCE.settings["valid_elements"];validElements=validElements.split(',');var extendedValidElements=tinyMCE.settings["extended_valid_elements"];extendedValidElements=extendedValidElements.split(',');for(var i=0;i<extendedValidElements.length;i++){var elementName=this._getCleanupElementName(extendedValidElements[i]);var skipAdd=false;for(var x=0;x<validElements.length;x++){if(this._getCleanupElementName(validElements[x])==elementName){validElements[x]=extendedValidElements[i];skipAdd=true;break;}}if(!skipAdd)validElements[validElements.length]=extendedValidElements[i];}for(var i=0;i<validElements.length;i++){var item=validElements[i];item=item.replace('[','|');item=item.replace(']','');var attribs=item.split('|');for(var x=0;x<attribs.length;x++)attribs[x]=attribs[x].toLowerCase();attribs[0]=attribs[0].split('/');for(var x=1;x<attribs.length;x++){var attribName=attribs[x];var attribDefault=null;var attribForce=null;var attribMustBe=null;if((pos=attribName.indexOf('='))!=-1){attribDefault=attribName.substring(pos+1);attribName=attribName.substring(0,pos);}if((pos=attribName.indexOf(':'))!=-1){attribForce=attribName.substring(pos+1);attribName=attribName.substring(0,pos);}if((pos=attribName.indexOf('<'))!=-1){attribMustBe=attribName.substring(pos+1).split('?');attribName=attribName.substring(0,pos);}attribs[x]=new Array(attribName,attribDefault,attribForce,attribMustBe);}validElements[i]=attribs;}var invalidElements=tinyMCE.settings['invalid_elements'].split(',');for(var i=0;i<invalidElements.length;i++)invalidElements[i]=invalidElements[i].toLowerCase();tinyMCE.settings['cleanup_validElements']=validElements;tinyMCE.settings['cleanup_invalidElements']=invalidElements;tinyMCE.settings['cleanup_entities']=new Array();var entities=tinyMCE.getParam('entities','',true,',');for(var i=0;i<entities.length;i+=2)tinyMCE.settings['cleanup_entities']['c'+entities[i]]=entities[i+1];};TinyMCE.prototype._cleanupHTML=function(inst,doc,config,element,visual,on_save){if(!tinyMCE.settings['cleanup'])return element.innerHTML;tinyMCE._customCleanup(inst,on_save?"get_from_editor_dom":"insert_to_editor_dom",doc.body);tinyMCE.cleanup_validElements=tinyMCE.settings['cleanup_validElements'];tinyMCE.cleanup_entities=tinyMCE.settings['cleanup_entities'];tinyMCE.cleanup_invalidElements=tinyMCE.settings['cleanup_invalidElements'];tinyMCE.cleanup_verify_html=tinyMCE.settings['verify_html'];tinyMCE.cleanup_force_br_newlines=tinyMCE.settings['force_br_newlines'];tinyMCE.cleanup_urlconverter_callback=tinyMCE.settings['urlconverter_callback'];tinyMCE.cleanup_verify_css_classes=tinyMCE.settings['verify_css_classes'];tinyMCE.cleanup_visual_table_class=tinyMCE.settings['visual_table_class'];tinyMCE.cleanup_apply_source_formatting=tinyMCE.settings['apply_source_formatting'];tinyMCE.cleanup_inline_styles=tinyMCE.settings['inline_styles'];tinyMCE.cleanup_visual_aid=visual;tinyMCE.cleanup_on_save=on_save;tinyMCE.cleanup_idCount=0;tinyMCE.cleanup_elementLookupTable=new Array();var startTime=new Date().getTime();if(tinyMCE.isMSIE){var nodes=element.getElementsByTagName("hr");for(var i=0;i<nodes.length;i++){if(nodes[i].id=="null")nodes[i].removeAttribute("id");}element.innerHTML=tinyMCE.regexpReplace(element.innerHTML,'<p>[ \n\r]*<hr.*>[ \n\r]*</p>','<hr />','gi');element.innerHTML=tinyMCE.regexpReplace(element.innerHTML,'<!([^-(DOCTYPE)]* )|<!/[^-]*>','','gi');}var html=this.cleanupNode(element);if(tinyMCE.settings['debug'])tinyMCE.debug("Cleanup process executed in: "+(new Date().getTime()-startTime)+" ms.");html=tinyMCE.regexpReplace(html,'<p><hr /></p>','<hr />');html=tinyMCE.regexpReplace(html,'<p> </p><hr /><p> </p>','<hr />');html=tinyMCE.regexpReplace(html,'<td>\\s*<br />\\s*</td>','<td> </td>');html=html.replace(new RegExp('<a>(.*?)</a>','gi'),'$1');if(!tinyMCE.isMSIE)html=html.replace(new RegExp('<o:p _moz-userdefined="" />','g'),"");if(tinyMCE.settings['apply_source_formatting']){html=html.replace(new RegExp('<(p|div)([^>]*)>','g'),"\n<$1$2>\n");html=html.replace(new RegExp('<\/(p|div)([^>]*)>','g'),"\n</$1$2>\n");html=html.replace(new RegExp('<br />','g'),"<br />\n");}if(tinyMCE.settings['force_br_newlines']){var re=new RegExp('<p> </p>','g');html=html.replace(re,"<br />");}if(tinyMCE.settings['force_p_newlines']){var re=new RegExp('<>','g');html=html.replace(re,"");}if(tinyMCE.settings['remove_linebreaks'])html=html.replace(new RegExp('\r|\n','g'),' ');html=tinyMCE._customCleanup(inst,on_save?"get_from_editor":"insert_to_editor",html);var chk=tinyMCE.regexpReplace(html,"[ \t\r\n]","").toLowerCase();if(chk=="<br/>"||chk=="<br>"||chk=="<p> </p>"||chk=="<p> </p>"||chk=="<p></p>")html="";if(tinyMCE.settings["preformatted"])return "<pre>"+html+"</pre>";return html;};TinyMCE.prototype.insertLink=function(href,target,title,onclick,style_class){tinyMCE.execCommand('mceBeginUndoLevel');if(this.selectedInstance&&this.selectedElement&&this.selectedElement.nodeName.toLowerCase()=="img"){var doc=this.selectedInstance.getDoc();var linkElement=tinyMCE.getParentElement(this.selectedElement,"a");var newLink=false;if(!linkElement){linkElement=doc.createElement("a");newLink=true;}href=eval(tinyMCE.settings['urlconverter_callback']+"(href, linkElement);");tinyMCE.setAttrib(linkElement,'href',href);tinyMCE.setAttrib(linkElement,'target',target);tinyMCE.setAttrib(linkElement,'title',title);tinyMCE.setAttrib(linkElement,'onclick',onclick);tinyMCE.setAttrib(linkElement,'class',style_class);if(newLink){linkElement.appendChild(this.selectedElement.cloneNode(true));this.selectedElement.parentNode.replaceChild(linkElement,this.selectedElement);}return;}if(!this.linkElement&&this.selectedInstance){if(tinyMCE.isSafari){tinyMCE.execCommand("mceInsertContent",false,'<a href="#mce_temp_url#">'+this.selectedInstance.getSelectedHTML()+'</a>');}else this.selectedInstance.contentDocument.execCommand("createlink",false,"#mce_temp_url#");tinyMCE.linkElement=this.getElementByAttributeValue(this.selectedInstance.contentDocument.body,"a","href","#mce_temp_url#");var elementArray=this.getElementsByAttributeValue(this.selectedInstance.contentDocument.body,"a","href","#mce_temp_url#");for(var i=0;i<elementArray.length;i++){href=eval(tinyMCE.settings['urlconverter_callback']+"(href, elementArray[i]);");tinyMCE.setAttrib(elementArray[i],'href',href);tinyMCE.setAttrib(elementArray[i],'mce_real_href',href);tinyMCE.setAttrib(elementArray[i],'target',target);tinyMCE.setAttrib(elementArray[i],'title',title);tinyMCE.setAttrib(elementArray[i],'onclick',onclick);tinyMCE.setAttrib(elementArray[i],'class',style_class);}tinyMCE.linkElement=elementArray[0];}if(this.linkElement){href=eval(tinyMCE.settings['urlconverter_callback']+"(href, this.linkElement);");tinyMCE.setAttrib(this.linkElement,'href',href);tinyMCE.setAttrib(this.linkElement,'mce_real_href',href);tinyMCE.setAttrib(this.linkElement,'target',target);tinyMCE.setAttrib(this.linkElement,'title',title);tinyMCE.setAttrib(this.linkElement,'onclick',onclick);tinyMCE.setAttrib(this.linkElement,'class',style_class);}tinyMCE.execCommand('mceEndUndoLevel');};TinyMCE.prototype.insertImage=function(src,alt,border,hspace,vspace,width,height,align,title,onmouseover,onmouseout){tinyMCE.execCommand('mceBeginUndoLevel');if(src=="")return;if(!this.imgElement&&tinyMCE.isSafari){var html="";html+='<img src="'+src+'" alt="'+alt+'"';html+=' border="'+border+'" hspace="'+hspace+'"';html+=' vspace="'+vspace+'" width="'+width+'"';html+=' height="'+height+'" align="'+align+'" title="'+title+'" onmouseover="'+onmouseover+'" onmouseout="'+onmouseout+'" />';tinyMCE.execCommand("mceInsertContent",false,html);}else{if(!this.imgElement&&this.selectedInstance){if(tinyMCE.isSafari)tinyMCE.execCommand("mceInsertContent",false,'<img src="#mce_temp_url#" />');else this.selectedInstance.contentDocument.execCommand("insertimage",false,"#mce_temp_url#");tinyMCE.imgElement=this.getElementByAttributeValue(this.selectedInstance.contentDocument.body,"img","src","#mce_temp_url#");}}if(this.imgElement){var needsRepaint=false;src=eval(tinyMCE.settings['urlconverter_callback']+"(src, tinyMCE.imgElement);");if(onmouseover&&onmouseover!="")onmouseover="this.src='"+eval(tinyMCE.settings['urlconverter_callback']+"(onmouseover, tinyMCE.imgElement);")+"';";if(onmouseout&&onmouseout!="")onmouseout="this.src='"+eval(tinyMCE.settings['urlconverter_callback']+"(onmouseout, tinyMCE.imgElement);")+"';";if(typeof(title)=="undefined")title=alt;if(width!=this.imgElement.getAttribute("width")||height!=this.imgElement.getAttribute("height")||align!=this.imgElement.getAttribute("align"))needsRepaint=true;tinyMCE.setAttrib(this.imgElement,'src',src);tinyMCE.setAttrib(this.imgElement,'mce_real_src',src);tinyMCE.setAttrib(this.imgElement,'alt',alt);tinyMCE.setAttrib(this.imgElement,'title',title);tinyMCE.setAttrib(this.imgElement,'align',align);tinyMCE.setAttrib(this.imgElement,'border',border,true);tinyMCE.setAttrib(this.imgElement,'hspace',hspace,true);tinyMCE.setAttrib(this.imgElement,'vspace',vspace,true);tinyMCE.setAttrib(this.imgElement,'width',width,true);tinyMCE.setAttrib(this.imgElement,'height',height,true);tinyMCE.setAttrib(this.imgElement,'onmouseover',onmouseover);tinyMCE.setAttrib(this.imgElement,'onmouseout',onmouseout);if(width&&width!="")this.imgElement.style.pixelWidth=width;if(height&&height!="")this.imgElement.style.pixelHeight=height;if(needsRepaint)tinyMCE.selectedInstance.repaint();}tinyMCE.execCommand('mceEndUndoLevel');};TinyMCE.prototype.getElementByAttributeValue=function(node,element_name,attrib,value){var elements=this.getElementsByAttributeValue(node,element_name,attrib,value);if(elements.length==0)return null;return elements[0];};TinyMCE.prototype.getElementsByAttributeValue=function(node,element_name,attrib,value){var elements=new Array();if(node&&node.nodeName.toLowerCase()==element_name){if(node.getAttribute(attrib)&&node.getAttribute(attrib).indexOf(value)!=-1)elements[elements.length]=node;}if(node.hasChildNodes){for(var x=0,n=node.childNodes.length;x<n;x++){var childElements=this.getElementsByAttributeValue(node.childNodes[x],element_name,attrib,value);for(var i=0,m=childElements.length;i<m;i++)elements[elements.length]=childElements[i];}}return elements;};TinyMCE.prototype.isBlockElement=function(node){return node!=null&&node.nodeType==1&&this.blockRegExp.test(node.nodeName);};TinyMCE.prototype.getParentBlockElement=function(node){while(node){if(this.blockRegExp.test(node.nodeName))return node;node=node.parentNode;}return null;};TinyMCE.prototype.getNodeTree=function(node,node_array,type,node_name){if(typeof(type)=="undefined"||node.nodeType==type&&(typeof(node_name)=="undefined"||node.nodeName==node_name))node_array[node_array.length]=node;if(node.hasChildNodes()){for(var i=0;i<node.childNodes.length;i++)tinyMCE.getNodeTree(node.childNodes[i],node_array,type,node_name);}return node_array;};TinyMCE.prototype.getParentElement=function(node,names,attrib_name,attrib_value){if(typeof(names)=="undefined"){if(node.nodeType==1)return node;while((node=node.parentNode)!=null&&node.nodeType!=1);return node;}var namesAr=names.split(',');if(node==null)return null;do{for(var i=0;i<namesAr.length;i++){if(node.nodeName.toLowerCase()==namesAr[i].toLowerCase()||names=="*"){if(typeof(attrib_name)=="undefined")return node;else if(node.getAttribute(attrib_name)){if(typeof(attrib_value)=="undefined"){if(node.getAttribute(attrib_name)!="")return node;}else if(node.getAttribute(attrib_name)==attrib_value)return node;}}}}while(node=node.parentNode);return null;};TinyMCE.prototype.convertURL=function(url,node,on_save){var prot=document.location.protocol;var host=document.location.hostname;var port=document.location.port;var fileProto=(prot=="file:");url=tinyMCE.regexpReplace(url,'(http|https):///','/');if(url.indexOf('mailto:')!=-1||url.indexOf('javascript:')!=-1||tinyMCE.regexpReplace(url,'[ \t\r\n\+]|%20','').charAt(0)=="#")return url;if(!tinyMCE.isMSIE&&!on_save&&url.indexOf("://")==-1&&url.charAt(0)!='/')return tinyMCE.settings['base_href']+url;if(!tinyMCE.settings['relative_urls']){var urlParts=tinyMCE.parseURL(url);var baseUrlParts=tinyMCE.parseURL(tinyMCE.settings['base_href']);if(urlParts['anchor']&&urlParts['path']==baseUrlParts['path'])return "#"+urlParts['anchor'];}if(on_save&&tinyMCE.settings['relative_urls']){var urlParts=tinyMCE.parseURL(url);var tmpUrlParts=tinyMCE.parseURL(tinyMCE.settings['document_base_url']);if(urlParts['host']==tmpUrlParts['host']&&(!urlParts['port']||urlParts['port']==tmpUrlParts['port']))return tinyMCE.convertAbsoluteURLToRelativeURL(tinyMCE.settings['document_base_url'],url);}if(!fileProto&&tinyMCE.settings['remove_script_host']){var start="",portPart="";if(port!="")portPart=":"+port;start=prot+"//"+host+portPart+"/";if(url.indexOf(start)==0)url=url.substring(start.length-1);if(!tinyMCE.settings['relative_urls']&&url.indexOf('://')==-1&&url.charAt(0)!='/')url='/'+url;}return url;};TinyMCE.prototype.parseURL=function(url_str){var urlParts=new Array();if(url_str){var pos,lastPos;pos=url_str.indexOf('://');if(pos!=-1){urlParts['protocol']=url_str.substring(0,pos);lastPos=pos+3;}for(var i=lastPos;i<url_str.length;i++){var chr=url_str.charAt(i);if(chr==':')break;if(chr=='/')break;}pos=i;urlParts['host']=url_str.substring(lastPos,pos);lastPos=pos;if(url_str.charAt(pos)==':'){pos=url_str.indexOf('/',lastPos);urlParts['port']=url_str.substring(lastPos+1,pos);}lastPos=pos;pos=url_str.indexOf('?',lastPos);if(pos==-1)pos=url_str.indexOf('#',lastPos);if(pos==-1)pos=url_str.length;urlParts['path']=url_str.substring(lastPos,pos);lastPos=pos;if(url_str.charAt(pos)=='?'){pos=url_str.indexOf('#');pos=(pos==-1)?url_str.length:pos;urlParts['query']=url_str.substring(lastPos+1,pos);}lastPos=pos;if(url_str.charAt(pos)=='#'){pos=url_str.length;urlParts['anchor']=url_str.substring(lastPos+1,pos);}}return urlParts;};TinyMCE.prototype.convertAbsoluteURLToRelativeURL=function(base_url,url_to_relative){var strTok1;var strTok2;var breakPoint=0;var outputString="";base_url=base_url.substring(0,base_url.lastIndexOf('/'));strTok1=base_url.split('/');strTok2=url_to_relative.split('/');if(strTok1.length>=strTok2.length){for(var i=0;i<strTok1.length;i++){if(i>=strTok2.length||strTok1[i]!=strTok2[i]){breakPoint=i+1;break;}}}if(strTok1.length<strTok2.length){for(var i=0;i<strTok2.length;i++){if(i>=strTok1.length||strTok1[i]!=strTok2[i]){breakPoint=i+1;break;}}}if(breakPoint==1)return url_to_relative;for(var i=0;i<(strTok1.length-(breakPoint-1));i++)outputString+="../";for(var i=breakPoint-1;i<strTok2.length;i++){if(i!=(breakPoint-1))outputString+="/"+strTok2[i];else outputString+=strTok2[i];}return outputString;};TinyMCE.prototype.convertRelativeToAbsoluteURL=function(base_url,relative_url){var baseURL=TinyMCE.prototype.parseURL(base_url);var relURL=TinyMCE.prototype.parseURL(relative_url);if(relative_url==""||relative_url.charAt(0)=='/'||relative_url.indexOf('://')!=-1||relative_url.indexOf('mailto:')!=-1||relative_url.indexOf('javascript:')!=-1||tinyMCE.regexpReplace(relative_url,'[ \t\r\n\+]|%20','').charAt(0)=="#")return relative_url;baseURLParts=baseURL['path'].split('/');relURLParts=relURL['path'].split('/');var newBaseURLParts=new Array();for(var i=baseURLParts.length-1;i>=0;i--){if(baseURLParts[i].length==0)continue;newBaseURLParts[newBaseURLParts.length]=baseURLParts[i];}baseURLParts=newBaseURLParts.reverse();var newRelURLParts=new Array();var numBack=0;for(var i=relURLParts.length-1;i>=0;i--){if(relURLParts[i].length==0||relURLParts[i]==".")continue;if(relURLParts[i]=='..'){numBack++;continue;}if(numBack>0){numBack--;continue;}newRelURLParts[newRelURLParts.length]=relURLParts[i];}relURLParts=newRelURLParts.reverse();var len=baseURLParts.length-numBack;var absPath=(len<=0?"":"/")+baseURLParts.slice(0,len).join('/')+"/"+relURLParts.join('/');var start="",end="";if(baseURL['protocol'])start+=baseURL['protocol']+"://";if(baseURL['host'])start+=baseURL['host'];if(baseURL['port'])start+=":"+baseURL['port'];if(relURL['query'])end+="?"+relURL['query'];if(relURL['anchor'])end+="#"+relURL['anchor'];if(relative_url.charAt(relative_url.length-1)=="/")end+="/";return start+absPath+end;};TinyMCE.prototype.getParam=function(name,default_value,strip_whitespace,split_chr){var value=(typeof(this.settings[name])=="undefined")?default_value:this.settings[name];if(value=="true"||value=="false")return(value=="true");if(strip_whitespace)value=tinyMCE.regexpReplace(value,"[ \t\r\n]","");if(typeof(split_chr)!="undefined"&&split_chr!=null){value=value.split(split_chr);var outArray=new Array();for(var i=0;i<value.length;i++){if(value[i]&&value[i]!="")outArray[outArray.length]=value[i];}value=outArray;}return value;};TinyMCE.prototype.getLang=function(name,default_value,parse_entities){var value=(typeof(tinyMCELang[name])=="undefined")?default_value:tinyMCELang[name];if(parse_entities){var el=document.createElement("div");el.innerHTML=value;value=el.innerHTML;}return value;};TinyMCE.prototype.addToLang=function(prefix,ar){for(var key in ar)tinyMCELang[(key.indexOf('lang_')==-1?'lang_':'')+(prefix!=''?(prefix+"_"):'')+key]=ar[key];};TinyMCE.prototype.replaceVar=function(replace_haystack,replace_var,replace_str){var re=new RegExp('{\\\$'+replace_var+'}','g');return replace_haystack.replace(re,replace_str);};TinyMCE.prototype.replaceVars=function(replace_haystack,replace_vars){for(var key in replace_vars){var value=replace_vars[key];replace_haystack=tinyMCE.replaceVar(replace_haystack,key,value);}return replace_haystack;};TinyMCE.prototype.triggerNodeChange=function(focus,setup_content){if(tinyMCE.settings['handleNodeChangeCallback']){if(tinyMCE.selectedInstance){var inst=tinyMCE.selectedInstance;var editorId=inst.editorId;var elm=(typeof(setup_content)!="undefined"&&setup_content)?tinyMCE.selectedElement:inst.getFocusElement();var undoIndex=-1;var undoLevels=-1;var anySelection=false;var selectedText=inst.getSelectedText();if(tinyMCE.settings["auto_resize"]){var doc=inst.getDoc();inst.iframeElement.style.width=doc.body.offsetWidth+"px";inst.iframeElement.style.height=doc.body.offsetHeight+"px";}if(tinyMCE.selectedElement)anySelection=(tinyMCE.selectedElement.nodeName.toLowerCase()=="img")||(selectedText&&selectedText.length>0);if(tinyMCE.settings['custom_undo_redo']){undoIndex=inst.undoIndex;undoLevels=inst.undoLevels.length;}tinyMCE.executeCallback('handleNodeChangeCallback','_handleNodeChange',0,editorId,elm,undoIndex,undoLevels,inst.visualAid,anySelection);}}if(this.selectedInstance&&(typeof(focus)=="undefined"||focus))this.selectedInstance.contentWindow.focus();};TinyMCE.prototype._customCleanup=function(inst,type,content){var customCleanup=tinyMCE.settings['cleanup_callback'];if(customCleanup!=""&&eval("typeof("+customCleanup+")")!="undefined")content=eval(customCleanup+"(type, content, inst);");var plugins=tinyMCE.getParam('plugins','',true,',');for(var i=0;i<plugins.length;i++){if(eval("typeof(TinyMCE_"+plugins[i]+"_cleanup)")!="undefined")content=eval("TinyMCE_"+plugins[i]+"_cleanup(type, content, inst);");}return content;};TinyMCE.prototype.getContent=function(editor_id){if(typeof(editor_id)!="undefined")tinyMCE.selectedInstance=tinyMCE.getInstanceById(editor_id);if(tinyMCE.selectedInstance)return tinyMCE._cleanupHTML(this.selectedInstance,this.selectedInstance.getDoc(),tinyMCE.settings,this.selectedInstance.getBody(),false,true);return null;};TinyMCE.prototype.setContent=function(html_content){if(tinyMCE.selectedInstance){tinyMCE.selectedInstance.execCommand('mceSetContent',false,html_content);tinyMCE.selectedInstance.repaint();}};TinyMCE.prototype.importThemeLanguagePack=function(name){if(typeof(name)=="undefined")name=tinyMCE.settings['theme'];tinyMCE.loadScript(tinyMCE.baseURL+'/themes/'+name+'/langs/'+tinyMCE.settings['language']+'.js');};TinyMCE.prototype.importPluginLanguagePack=function(name,valid_languages){var lang="en";valid_languages=valid_languages.split(',');for(var i=0;i<valid_languages.length;i++){if(tinyMCE.settings['language']==valid_languages[i])lang=tinyMCE.settings['language'];}tinyMCE.loadScript(tinyMCE.baseURL+'/plugins/'+name+'/langs/'+lang+'.js');};TinyMCE.prototype.applyTemplate=function(html,args){html=tinyMCE.replaceVar(html,"themeurl",tinyMCE.themeURL);if(typeof(args)!="undefined")html=tinyMCE.replaceVars(html,args);html=tinyMCE.replaceVars(html,tinyMCE.settings);html=tinyMCE.replaceVars(html,tinyMCELang);return html;};TinyMCE.prototype.openWindow=function(template,args){var html,width,height,x,y,resizable,scrollbars,url;args['mce_template_file']=template['file'];args['mce_width']=template['width'];args['mce_height']=template['height'];tinyMCE.windowArgs=args;html=template['html'];if(!(width=parseInt(template['width'])))width=320;if(!(height=parseInt(template['height'])))height=200;if(tinyMCE.isMSIE)height+=40;else height+=20;x=parseInt(screen.width/2.0)-(width/2.0);y=parseInt(screen.height/2.0)-(height/2.0);resizable=(args&&args['resizable'])?args['resizable']:"no";scrollbars=(args&&args['scrollbars'])?args['scrollbars']:"no";if(template['file'].charAt(0)!='/'&&template['file'].indexOf('://')==-1)url=tinyMCE.baseURL+"/themes/"+tinyMCE.getParam("theme")+"/"+template['file'];else url=template['file'];for(var name in args)url=tinyMCE.replaceVar(url,name,escape(args[name]));if(html){html=tinyMCE.replaceVar(html,"css",this.settings['popups_css']);html=tinyMCE.applyTemplate(html,args);var win=window.open("","mcePopup"+new Date().getTime(),"top="+y+",left="+x+",scrollbars="+scrollbars+",dialog=yes,minimizable="+resizable+",modal=yes,width="+width+",height="+height+",resizable="+resizable);if(win==null){alert(tinyMCELang['lang_popup_blocked']);return;}win.document.write(html);win.document.close();win.resizeTo(width,height);win.focus();}else{if(tinyMCE.isMSIE&&resizable!='yes'&&tinyMCE.settings["dialog_type"]=="modal"){var features="resizable:"+resizable+";scroll:"+scrollbars+";status:yes;center:yes;help:no;dialogWidth:"+width+"px;dialogHeight:"+height+"px;";window.showModalDialog(url,window,features);}else{var modal=(resizable=="yes")?"no":"yes";if(tinyMCE.isGecko&&tinyMCE.isMac)modal="no";var win=window.open(url,"mcePopup"+new Date().getTime(),"top="+y+",left="+x+",scrollbars="+scrollbars+",dialog="+modal+",minimizable="+resizable+",modal="+modal+",width="+width+",height="+height+",resizable="+resizable);if(win==null){alert(tinyMCELang['lang_popup_blocked']);return;}eval('try { win.resizeTo(width, height); } catch(e) { }');if(tinyMCE.isGecko){if(win.document.defaultView.statusbar.visible)win.resizeBy(0,tinyMCE.isMac?10:24);}win.focus();}}};TinyMCE.prototype.closeWindow=function(win){win.close();};TinyMCE.prototype.getVisualAidClass=function(class_name,state){var aidClass=tinyMCE.settings['visual_table_class'];if(typeof(state)=="undefined")state=tinyMCE.settings['visual'];var classNames=new Array();var ar=class_name.split(' ');for(var i=0;i<ar.length;i++){if(ar[i]==aidClass)ar[i]="";if(ar[i]!="")classNames[classNames.length]=ar[i];}if(state)classNames[classNames.length]=aidClass;var className="";for(var i=0;i<classNames.length;i++){if(i>0)className+=" ";className+=classNames[i];}return className;};TinyMCE.prototype.handleVisualAid=function(element,deep,state,inst){if(!element)return;var tableElement=null;switch(element.nodeName){case "TABLE":var oldW=element.style.width;var oldH=element.style.height;element.className=tinyMCE.getVisualAidClass(element.className,state&&element.getAttribute("border")==0);element.style.width=oldW;element.style.height=oldH;for(var y=0;y<element.rows.length;y++){for(var x=0;x<element.rows[y].cells.length;x++){var className=tinyMCE.getVisualAidClass(element.rows[y].cells[x].className,state&&element.getAttribute("border")==0);element.rows[y].cells[x].className=className;}}break;case "A":var anchorName=tinyMCE.getAttrib(element,"name");if(anchorName!=''&&state){element.title=anchorName;element.className='mceItemAnchor';}else if(anchorName!=''&&!state)element.className='';break;}if(deep&&element.hasChildNodes()){for(var i=0;i<element.childNodes.length;i++)tinyMCE.handleVisualAid(element.childNodes[i],deep,state,inst);}};TinyMCE.prototype.getAttrib=function(elm,name,default_value){if(typeof(default_value)=="undefined")default_value="";if(!elm||elm.nodeType!=1)return default_value;var v=elm.getAttribute(name);if(name=="class"&&!v)v=elm.className;if(name=="style")v=elm.style.cssText;return(v&&v!="")?v:default_value;};TinyMCE.prototype.setAttrib=function(element,name,value,fix_value){if(typeof(value)=="number"&&value!=null)value=""+value;if(fix_value){if(value==null)value="";var re=new RegExp('[^0-9%]','g');value=value.replace(re,'');}if(name=="style")element.style.cssText=value;if(name=="class")element.className=value;if(value!=null&&value!=""&&value!=-1)element.setAttribute(name,value);else element.removeAttribute(name);};TinyMCE.prototype._setHTML=function(doc,html_content){if(tinyMCE.isMSIE){var re=new RegExp('<p><hr /></p>','g');html_content=html_content.replace(re,"<hr>");}try{doc.body.innerHTML=html_content;}catch(e){if(this.isMSIE)doc.body.createTextRange().pasteHTML(html_content);}if(tinyMCE.isMSIE&&tinyMCE.settings['fix_content_duplication']){var paras=doc.getElementsByTagName("P");for(var i=0;i<paras.length;i++){var node=paras[i];while((node=node.parentNode)!=null){if(node.nodeName.toLowerCase()=="p")node.outerHTML=node.innerHTML;}}var html=doc.body.innerHTML;if(html.indexOf('="mso')!=-1){for(var i=0;i<doc.body.all.length;i++){var el=doc.body.all[i];el.removeAttribute("className","",0);el.removeAttribute("style","",0);}html=doc.body.innerHTML;html=tinyMCE.regexpReplace(html,"<o:p><\/o:p>","<br />");html=tinyMCE.regexpReplace(html,"<o:p> <\/o:p>","");html=tinyMCE.regexpReplace(html,"<st1:.*?>","");html=tinyMCE.regexpReplace(html,"<p><\/p>","");html=tinyMCE.regexpReplace(html,"<p><\/p>\r\n<p><\/p>","");html=tinyMCE.regexpReplace(html,"<p> <\/p>","<br />");html=tinyMCE.regexpReplace(html,"<p>\s*(<p>\s*)?","<p>");html=tinyMCE.regexpReplace(html,"<\/p>\s*(<\/p>\s*)?","</p>");}doc.body.innerHTML=html;}};TinyMCE.prototype.getImageSrc=function(str){var pos=-1;if(!str)return "";if((pos=str.indexOf('this.src='))!=-1){var src=str.substring(pos+10);src=src.substring(0,src.indexOf('\''));return src;}return "";};TinyMCE.prototype._getElementById=function(element_id){var elm=document.getElementById(element_id);if(!elm){for(var j=0;j<document.forms.length;j++){for(var k=0;k<document.forms[j].elements.length;k++){if(document.forms[j].elements[k].name==element_id){elm=document.forms[j].elements[k];break;}}}}return elm;};TinyMCE.prototype.getEditorId=function(form_element){var inst=this.getInstanceById(form_element);if(!inst)return null;return inst.editorId;};TinyMCE.prototype.getInstanceById=function(editor_id){var inst=this.instances[editor_id];if(!inst){for(var instanceName in tinyMCE.instances){var instance=tinyMCE.instances[instanceName];if(instance.formTargetElementId==editor_id){inst=instance;break;}}}return inst;};TinyMCE.prototype.queryInstanceCommandValue=function(editor_id,command){var inst=tinyMCE.getInstanceById(editor_id);if(inst)return inst.queryCommandValue(command);return false;};TinyMCE.prototype.queryInstanceCommandState=function(editor_id,command){var inst=tinyMCE.getInstanceById(editor_id);if(inst)return inst.queryCommandState(command);return null;};TinyMCE.prototype.setWindowArg=function(name,value){this.windowArgs[name]=value;};TinyMCE.prototype.getWindowArg=function(name,default_value){return(typeof(this.windowArgs[name])=="undefined")?default_value:this.windowArgs[name];};TinyMCE.prototype.getCSSClasses=function(editor_id,doc){var output=new Array();if(typeof(tinyMCE.cssClasses)!="undefined")return tinyMCE.cssClasses;if(typeof(editor_id)=="undefined"&&typeof(doc)=="undefined"){var instance;for(var instanceName in tinyMCE.instances){instance=tinyMCE.instances[instanceName];break;}doc=instance.getDoc();}if(typeof(doc)=="undefined"){var instance=tinyMCE.getInstanceById(editor_id);doc=instance.getDoc();}if(doc){var styles=tinyMCE.isMSIE?doc.styleSheets:doc.styleSheets;if(styles&&styles.length>0){for(var x=0;x<styles.length;x++){var csses=null;eval("try {var csses = tinyMCE.isMSIE ? doc.styleSheets("+x+").rules : doc.styleSheets["+x+"].cssRules;} catch(e) {}");if(!csses)return new Array();for(var i=0;i<csses.length;i++){var selectorText=csses[i].selectorText;if(selectorText){var rules=selectorText.split(',');for(var c=0;c<rules.length;c++){if(rules[c].indexOf(' ')!=-1||rules[c].indexOf(':')!=-1||rules[c].indexOf('mceItem')!=-1)continue;if(rules[c]=="."+tinyMCE.settings['visual_table_class'])continue;if(rules[c].indexOf('.')!=-1){output[output.length]=rules[c].substring(rules[c].indexOf('.')+1);}}}}}}}if(output.length>0)tinyMCE.cssClasses=output;return output;};TinyMCE.prototype.regexpReplace=function(in_str,reg_exp,replace_str,opts){if(typeof(opts)=="undefined")opts='g';var re=new RegExp(reg_exp,opts);return in_str.replace(re,replace_str);};TinyMCE.prototype.trim=function(str){return str.replace(/^\s*|\s*$/g,"");};TinyMCE.prototype.cleanupEventStr=function(str){str=""+str;str=str.replace('function anonymous()\n{\n','');str=str.replace('\n}','');str=str.replace(/^return true;/gi,'');return str;};TinyMCE.prototype.getAbsPosition=function(node){var pos=new Object();pos.absLeft=pos.absTop=0;var parentNode=node;while(parentNode){pos.absLeft+=parentNode.offsetLeft;pos.absTop+=parentNode.offsetTop;parentNode=parentNode.offsetParent;}return pos;};TinyMCE.prototype.getControlHTML=function(control_name){var themePlugins=tinyMCE.getParam('plugins','',true,',');var templateFunction;for(var i=themePlugins.length;i>=0;i--){templateFunction='TinyMCE_'+themePlugins[i]+"_getControlHTML";if(eval("typeof("+templateFunction+")")!='undefined'){var html=eval(templateFunction+"('"+control_name+"');");if(html!="")return tinyMCE.replaceVar(html,"pluginurl",tinyMCE.baseURL+"/plugins/"+themePlugins[i]);}}return eval('TinyMCE_'+tinyMCE.settings['theme']+"_getControlHTML"+"('"+control_name+"');");};TinyMCE.prototype._themeExecCommand=function(editor_id,element,command,user_interface,value){var themePlugins=tinyMCE.getParam('plugins','',true,',');var templateFunction;for(var i=themePlugins.length;i>=0;i--){templateFunction='TinyMCE_'+themePlugins[i]+"_execCommand";if(eval("typeof("+templateFunction+")")!='undefined'){if(eval(templateFunction+"(editor_id, element, command, user_interface, value);"))return true;}}templateFunction='TinyMCE_'+tinyMCE.settings['theme']+"_execCommand";if(eval("typeof("+templateFunction+")")!='undefined')return eval(templateFunction+"(editor_id, element, command, user_interface, value);");return false;};TinyMCE.prototype._getThemeFunction=function(suffix,skip_plugins){if(skip_plugins)return 'TinyMCE_'+tinyMCE.settings['theme']+suffix;var themePlugins=tinyMCE.getParam('plugins','',true,',');var templateFunction;for(var i=themePlugins.length;i>=0;i--){templateFunction='TinyMCE_'+themePlugins[i]+suffix;if(eval("typeof("+templateFunction+")")!='undefined')return templateFunction;}return 'TinyMCE_'+tinyMCE.settings['theme']+suffix;};TinyMCE.prototype.isFunc=function(func_name){if(func_name==null||func_name=="")return false;return eval("typeof("+func_name+")")!="undefined";};TinyMCE.prototype.exec=function(func_name,args){var str=func_name+'(';for(var i=3;i<args.length;i++){str+='args['+i+']';if(i<args.length-1)str+=',';}str+=');';return eval(str);};TinyMCE.prototype.executeCallback=function(param,suffix,mode){switch(mode){case 0:var state=false;var plugins=tinyMCE.getParam('plugins','',true,',');for(var i=0;i<plugins.length;i++){var func="TinyMCE_"+plugins[i]+suffix;if(tinyMCE.isFunc(func)){tinyMCE.exec(func,this.executeCallback.arguments);state=true;}}var func='TinyMCE_'+tinyMCE.settings['theme']+suffix;if(tinyMCE.isFunc(func)){tinyMCE.exec(func,this.executeCallback.arguments);state=true;}var func=tinyMCE.getParam(param,'');if(tinyMCE.isFunc(func)){tinyMCE.exec(func,this.executeCallback.arguments);state=true;}return state;case 1:var plugins=tinyMCE.getParam('plugins','',true,',');for(var i=0;i<plugins.length;i++){var func="TinyMCE_"+plugins[i]+suffix;if(tinyMCE.isFunc(func)){if(tinyMCE.exec(func,this.executeCallback.arguments))return true;}}var func='TinyMCE_'+tinyMCE.settings['theme']+suffix;if(tinyMCE.isFunc(func)){if(tinyMCE.exec(func,this.executeCallback.arguments))return true;}var func=tinyMCE.getParam(param,'');if(tinyMCE.isFunc(func)){if(tinyMCE.exec(func,this.executeCallback.arguments))return true;}return false;}};TinyMCE.prototype.debug=function(){var msg="";var elm=document.getElementById("tinymce_debug");if(!elm){var debugDiv=document.createElement("div");debugDiv.setAttribute("className","debugger");debugDiv.className="debugger";debugDiv.innerHTML='\ Debug output:\ - <textarea id="tinymce_debug" style="width: 100%; height: 300px">\ - </textarea>';document.body.appendChild(debugDiv);elm=document.getElementById("tinymce_debug");}var args=this.debug.arguments;for(var i=0;i<args.length;i++){msg+=args[i];if(i<args.length-1)msg+=', ';}elm.value+=msg+"\n";};
\ No newline at end of file + <textarea id="tinymce_debug" style="width: 100%; height: 300px"></textarea>';document.body.appendChild(debugDiv);elm=document.getElementById("tinymce_debug");}var args=this.debug.arguments;for(var i=0;i<args.length;i++){msg+=args[i];if(i<args.length-1)msg+=', ';}elm.value+=msg+"\n";};function TinyMCEControl(settings){this.undoLevels=new Array();this.undoIndex=0;this.typingUndoIndex=-1;this.undoRedo=true;this.settings=settings;this.settings['theme']=tinyMCE.getParam("theme","default");this.settings['width']=tinyMCE.getParam("width",-1);this.settings['height']=tinyMCE.getParam("height",-1);};TinyMCEControl.prototype.repaint=function(){if(tinyMCE.isMSIE)return;this.getBody().style.display='none';this.getBody().style.display='block';};TinyMCEControl.prototype.switchSettings=function(){if(tinyMCE.configs.length>1&&tinyMCE.currentConfig!=this.settings['index']){tinyMCE.settings=this.settings;tinyMCE.currentConfig=this.settings['index'];}};TinyMCEControl.prototype.fixBrokenURLs=function(){var body=this.getBody();var elms=body.getElementsByTagName("img");for(var i=0;i<elms.length;i++){var src=elms[i].getAttribute('mce_real_src');if(src&&src!="")elms[i].setAttribute("src",src);}var elms=body.getElementsByTagName("a");for(var i=0;i<elms.length;i++){var href=elms[i].getAttribute('mce_real_href');if(href&&href!="")elms[i].setAttribute("href",href);}};TinyMCEControl.prototype.convertAllRelativeURLs=function(){var body=this.getBody();var elms=body.getElementsByTagName("img");for(var i=0;i<elms.length;i++){var src=elms[i].getAttribute('src');if(src&&src!=""){src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],src);elms[i].setAttribute("src",src);elms[i].setAttribute("mce_real_src",src);}}var elms=body.getElementsByTagName("a");for(var i=0;i<elms.length;i++){var href=elms[i].getAttribute('href');if(href&&href!=""){href=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],href);elms[i].setAttribute("href",href);elms[i].setAttribute("mce_real_href",href);}}};TinyMCEControl.prototype.getSelectedHTML=function(){if(tinyMCE.isSafari){return this.getRng().toString();}var elm=document.createElement("body");if(tinyMCE.isGecko)elm.appendChild(this.getRng().cloneContents());else elm.innerHTML=this.getRng().htmlText;return tinyMCE._cleanupHTML(this,this.contentDocument,this.settings,elm,this.visualAid);};TinyMCEControl.prototype.getBookmark=function(){var rng=this.getRng();if(tinyMCE.isSafari)return rng;if(tinyMCE.isMSIE)return rng;if(tinyMCE.isGecko)return rng.cloneRange();return null;};TinyMCEControl.prototype.moveToBookmark=function(bookmark){if(tinyMCE.isSafari){var sel=this.getSel().realSelection;sel.setBaseAndExtent(bookmark.startContainer,bookmark.startOffset,bookmark.endContainer,bookmark.endOffset);return true;}if(tinyMCE.isMSIE)return bookmark.select();if(tinyMCE.isGecko){var rng=this.getDoc().createRange();var sel=this.getSel();rng.setStart(bookmark.startContainer,bookmark.startOffset);rng.setEnd(bookmark.endContainer,bookmark.endOffset);sel.removeAllRanges();sel.addRange(rng);return true;}return false;};TinyMCEControl.prototype.getSelectedText=function(){if(tinyMCE.isMSIE){var doc=this.getDoc();if(doc.selection.type=="Text"){var rng=doc.selection.createRange();selectedText=rng.text;}else selectedText='';}else{var sel=this.getSel();if(sel&&sel.toString)selectedText=sel.toString();else selectedText='';}return selectedText;};TinyMCEControl.prototype.selectNode=function(node,collapse,select_text_node,to_start){if(!node)return;if(typeof(collapse)=="undefined")collapse=true;if(typeof(select_text_node)=="undefined")select_text_node=false;if(typeof(to_start)=="undefined")to_start=true;if(tinyMCE.isMSIE){var rng=this.getBody().createTextRange();try{rng.moveToElementText(node);if(collapse)rng.collapse(to_start);rng.select();}catch(e){}}else{var sel=this.getSel();if(!sel)return;if(tinyMCE.isSafari){sel.realSelection.setBaseAndExtent(node,0,node,node.innerText.length);if(collapse){if(to_start)sel.realSelection.collapseToStart();else sel.realSelection.collapseToEnd();}this.scrollToNode(node);return;}var rng=this.getDoc().createRange();if(select_text_node){var nodes=tinyMCE.getNodeTree(node,new Array(),3);if(nodes.length>0)rng.selectNodeContents(nodes[0]);else rng.selectNodeContents(node);}else rng.selectNode(node);if(collapse){if(!to_start&&node.nodeType==3){rng.setStart(node,node.nodeValue.length);rng.setEnd(node,node.nodeValue.length);}else rng.collapse(to_start);}sel.removeAllRanges();sel.addRange(rng);}this.scrollToNode(node);tinyMCE.selectedElement=null;if(node.nodeType==1)tinyMCE.selectedElement=node;};TinyMCEControl.prototype.scrollToNode=function(node){var pos=tinyMCE.getAbsPosition(node);var doc=this.getDoc();var scrollX=doc.body.scrollLeft+doc.documentElement.scrollLeft;var scrollY=doc.body.scrollTop+doc.documentElement.scrollTop;var height=tinyMCE.isMSIE?document.getElementById(this.editorId).style.pixelHeight:this.targetElement.clientHeight;if(!tinyMCE.settings['auto_resize']&&!(node.absTop>scrollY&&node.absTop<(scrollY-25+height)))this.contentWindow.scrollTo(pos.absLeft,pos.absTop-height+25);};TinyMCEControl.prototype.getBody=function(){return this.getDoc().body;};TinyMCEControl.prototype.getDoc=function(){return this.contentWindow.document;};TinyMCEControl.prototype.getWin=function(){return this.contentWindow;};TinyMCEControl.prototype.getSel=function(){if(tinyMCE.isMSIE)return this.getDoc().selection;var sel=this.contentWindow.getSelection();if(tinyMCE.isSafari&&!sel.getRangeAt){var newSel=new Object();var doc=this.getDoc();function getRangeAt(idx){var rng=new Object();rng.startContainer=this.focusNode;rng.endContainer=this.anchorNode;rng.commonAncestorContainer=this.focusNode;rng.createContextualFragment=function(html){if(html.charAt(0)=='<'){var elm=doc.createElement("div");elm.innerHTML=html;return elm.firstChild;}return doc.createTextNode("UNSUPPORTED, DUE TO LIMITATIONS IN SAFARI!");};rng.deleteContents=function(){doc.execCommand("Delete",false,"");};return rng;}newSel.focusNode=sel.baseNode;newSel.focusOffset=sel.baseOffset;newSel.anchorNode=sel.extentNode;newSel.anchorOffset=sel.extentOffset;newSel.getRangeAt=getRangeAt;newSel.text=""+sel;newSel.realSelection=sel;newSel.toString=function(){return this.text;};return newSel;}return sel;};TinyMCEControl.prototype.getRng=function(){var sel=this.getSel();if(sel==null)return null;if(tinyMCE.isMSIE)return sel.createRange();if(tinyMCE.isSafari){var rng=this.getDoc().createRange();var sel=this.getSel().realSelection;rng.setStart(sel.baseNode,sel.baseOffset);rng.setEnd(sel.extentNode,sel.extentOffset);return rng;}return this.getSel().getRangeAt(0);};TinyMCEControl.prototype._insertPara=function(e){function isEmpty(para){function isEmptyHTML(html){return html.replace(new RegExp('[ \t\r\n]+','g'),'').toLowerCase()=="";}if(para.getElementsByTagName("img").length>0)return false;if(para.getElementsByTagName("table").length>0)return false;if(para.getElementsByTagName("hr").length>0)return false;var nodes=tinyMCE.getNodeTree(para,new Array(),3);for(var i=0;i<nodes.length;i++){if(!isEmptyHTML(nodes[i].nodeValue))return false;}return true;}var doc=this.getDoc();var sel=this.getSel();var win=this.contentWindow;var rng=sel.getRangeAt(0);var body=doc.body;var rootElm=doc.documentElement;var self=this;var blockName="P";var rngBefore=doc.createRange();rngBefore.setStart(sel.anchorNode,sel.anchorOffset);rngBefore.collapse(true);var rngAfter=doc.createRange();rngAfter.setStart(sel.focusNode,sel.focusOffset);rngAfter.collapse(true);var direct=rngBefore.compareBoundaryPoints(rngBefore.START_TO_END,rngAfter)<0;var startNode=direct?sel.anchorNode:sel.focusNode;var startOffset=direct?sel.anchorOffset:sel.focusOffset;var endNode=direct?sel.focusNode:sel.anchorNode;var endOffset=direct?sel.focusOffset:sel.anchorOffset;var startBlock=tinyMCE.getParentBlockElement(startNode);var endBlock=tinyMCE.getParentBlockElement(endNode);if(startBlock!=null){blockName=startBlock.nodeName.toUpperCase();if(blockName=="TD"||blockName=="TABLE")blockName="P";}if((startBlock!=null&&startBlock.nodeName.toLowerCase()=="li")||(endBlock!=null&&endBlock.nodeName.toLowerCase()=="li"))return false;if((startBlock!=null&&startBlock.nodeName.toLowerCase()=="table")||(endBlock!=null&&endBlock.nodeName.toLowerCase()=="table"))startBlock=endBlock=null;var paraBefore=(startBlock!=null&&startBlock.nodeName.toUpperCase()==blockName)?startBlock.cloneNode(false):doc.createElement(blockName);var paraAfter=(endBlock!=null&&endBlock.nodeName.toUpperCase()==blockName)?endBlock.cloneNode(false):doc.createElement(blockName);var startChop=startNode;var endChop=endNode;node=startChop;do{if(node==body||node.nodeType==9||tinyMCE.isBlockElement(node))break;startChop=node;}while((node=node.previousSibling?node.previousSibling:node.parentNode));node=endChop;do{if(node==body||node.nodeType==9||tinyMCE.isBlockElement(node))break;endChop=node;}while((node=node.nextSibling?node.nextSibling:node.parentNode));if(startBlock==null){rng.deleteContents();sel.removeAllRanges();if(startChop!=rootElm&&endChop!=rootElm){rngBefore=rng.cloneRange();if(startChop==body)rngBefore.setStart(startChop,0);else rngBefore.setStartBefore(startChop);paraBefore.appendChild(rngBefore.cloneContents());if(endChop.parentNode.nodeName==blockName)endChop=endChop.parentNode;rng.setEndAfter(endChop);var contents=rng.cloneContents();if(contents.firstChild&&(contents.firstChild.nodeName==blockName||contents.firstChild.nodeName.toLowerCase()=="body")){var nodes=contents.firstChild.childNodes;for(var i=0;i<nodes.length;i++){if(nodes[i].nodeName.toLowerCase()!="body")paraAfter.appendChild(nodes[i]);}}else paraAfter.appendChild(contents);if(isEmpty(paraBefore))paraBefore.innerHTML=" ";if(isEmpty(paraAfter))paraAfter.innerHTML=" ";rng.deleteContents();rngAfter.deleteContents();rngBefore.deleteContents();paraAfter.normalize();rngBefore.insertNode(paraAfter);paraBefore.normalize();rngBefore.insertNode(paraBefore);}else{body.innerHTML="<"+blockName+"> </"+blockName+"><"+blockName+"> </"+blockName+">";paraAfter=body.childNodes[1];}this.selectNode(paraAfter,true,true);return true;}if(startChop.nodeName==blockName)rngBefore.setStart(startChop,0);else rngBefore.setStartBefore(startChop);rngBefore.setEnd(startNode,startOffset);paraBefore.appendChild(rngBefore.cloneContents());rngAfter.setEndAfter(endChop);rngAfter.setStart(endNode,endOffset);var contents=rngAfter.cloneContents();if(contents.firstChild&&contents.firstChild.nodeName==blockName){var nodes=contents.firstChild.childNodes;for(var i=0;i<nodes.length;i++){if(nodes[i].nodeName.toLowerCase()!="body")paraAfter.appendChild(nodes[i]);}}else paraAfter.appendChild(contents);if(isEmpty(paraBefore))paraBefore.innerHTML=" ";if(isEmpty(paraAfter))paraAfter.innerHTML=" ";var rng=doc.createRange();if(!startChop.previousSibling&&startChop.parentNode.nodeName.toUpperCase()==blockName){rng.setStartBefore(startChop.parentNode);}else{if(rngBefore.startContainer.nodeName.toUpperCase()==blockName&&rngBefore.startOffset==0)rng.setStartBefore(rngBefore.startContainer);else rng.setStart(rngBefore.startContainer,rngBefore.startOffset);}if(!endChop.nextSibling&&endChop.parentNode.nodeName.toUpperCase()==blockName)rng.setEndAfter(endChop.parentNode);else rng.setEnd(rngAfter.endContainer,rngAfter.endOffset);rng.deleteContents();rng.insertNode(paraAfter);rng.insertNode(paraBefore);paraAfter.normalize();paraBefore.normalize();this.selectNode(paraAfter,true,true);return true;};TinyMCEControl.prototype._handleBackSpace=function(evt_type){var doc=this.getDoc();var sel=this.getSel();if(sel==null)return false;var rng=sel.getRangeAt(0);var node=rng.startContainer;var elm=node.nodeType==3?node.parentNode:node;if(node==null)return;if(elm&&elm.nodeName==""){var para=doc.createElement("p");while(elm.firstChild)para.appendChild(elm.firstChild);elm.parentNode.insertBefore(para,elm);elm.parentNode.removeChild(elm);var rng=rng.cloneRange();rng.setStartBefore(node.nextSibling);rng.setEndAfter(node.nextSibling);rng.extractContents();this.selectNode(node.nextSibling,true,true);}var para=tinyMCE.getParentBlockElement(node);if(para!=null&¶.nodeName.toLowerCase()=='p'&&evt_type=="keypress"){var htm=para.innerHTML;var block=tinyMCE.getParentBlockElement(node);if(htm==""||htm==" "||block.nodeName.toLowerCase()=="li"){var prevElm=para.previousSibling;while(prevElm!=null&&prevElm.nodeType!=1)prevElm=prevElm.previousSibling;if(prevElm==null)return false;var nodes=tinyMCE.getNodeTree(prevElm,new Array(),3);var lastTextNode=nodes.length==0?null:nodes[nodes.length-1];if(lastTextNode!=null)this.selectNode(lastTextNode,true,false,false);para.parentNode.removeChild(para);return true;}}return false;};TinyMCEControl.prototype._insertSpace=function(){return true;};TinyMCEControl.prototype.autoResetDesignMode=function(){if(!tinyMCE.isMSIE&&tinyMCE.settings['auto_reset_designmode']){var sel=this.getSel();if(!sel||!sel.rangeCount||sel.rangeCount==0)eval('try { this.getDoc().designMode = "On"; } catch(e) {}');}};TinyMCEControl.prototype.isDirty=function(){return this.startContent!=tinyMCE.trim(this.getBody().innerHTML)&&!tinyMCE.isNotDirty;};TinyMCEControl.prototype._mergeElements=function(pa,ch,override){ch=ch.cloneNode(true);var st=tinyMCE.parseStyle(tinyMCE.getAttrib(pa,"style"));var stc=tinyMCE.parseStyle(tinyMCE.getAttrib(ch,"style"));var className=tinyMCE.getAttrib(pa,"class");className+=" "+tinyMCE.getAttrib(ch,"class");if(override){for(var n in st)stc[n]=st[n];}else{for(var n in stc)st[n]=stc[n];}tinyMCE.setAttrib(ch,"style",tinyMCE.serializeStyle(st));tinyMCE.setAttrib(ch,"class",tinyMCE.trim(className));pa.parentNode.replaceChild(ch,pa);};TinyMCEControl.prototype.execCommand=function(command,user_interface,value){var doc=this.getDoc();var win=this.getWin();var focusElm=this.getFocusElement();if(this.lastSafariSelection&&!new RegExp('mceStartTyping|mceEndTyping|mceBeginUndoLevel|mceEndUndoLevel|mceAddUndoLevel','gi').test(command)){this.moveToBookmark(this.lastSafariSelection);tinyMCE.selectedElement=this.lastSafariSelectedElement;}if(!tinyMCE.isMSIE&&!this.useCSS){doc.execCommand("useCSS",false,true);this.useCSS=true;}this.contentDocument=doc;if(tinyMCE._themeExecCommand(this.editorId,this.getBody(),command,user_interface,value))return;if(focusElm&&focusElm.nodeName=="IMG"){var align=focusElm.getAttribute('align');var img=command=="JustifyCenter"?focusElm.cloneNode(false):focusElm;switch(command){case "JustifyLeft":if(align=='left')img.removeAttribute('align');else img.setAttribute('align','left');var div=focusElm.parentNode;if(div&&div.nodeName=="DIV"&&div.childNodes.length==1&&div.parentNode)div.parentNode.replaceChild(img,div);this.selectNode(img);this.repaint();tinyMCE.triggerNodeChange();return;case "JustifyCenter":img.removeAttribute('align');var div=tinyMCE.getParentElement(focusElm,"div");if(div&&div.style.textAlign=="center"){if(div.nodeName=="DIV"&&div.childNodes.length==1&&div.parentNode)div.parentNode.replaceChild(img,div);}else{var div=this.getDoc().createElement("div");div.style.textAlign='center';div.appendChild(img);focusElm.parentNode.replaceChild(div,focusElm);}this.selectNode(img);this.repaint();tinyMCE.triggerNodeChange();return;case "JustifyRight":if(align=='right')img.removeAttribute('align');else img.setAttribute('align','right');var div=focusElm.parentNode;if(div&&div.nodeName=="DIV"&&div.childNodes.length==1&&div.parentNode)div.parentNode.replaceChild(img,div);this.selectNode(img);this.repaint();tinyMCE.triggerNodeChange();return;}}if(tinyMCE.settings['force_br_newlines']){var alignValue="";if(doc.selection.type!="Control"){switch(command){case "JustifyLeft":alignValue="left";break;case "JustifyCenter":alignValue="center";break;case "JustifyFull":alignValue="justify";break;case "JustifyRight":alignValue="right";break;}if(alignValue!=""){var rng=doc.selection.createRange();if((divElm=tinyMCE.getParentElement(rng.parentElement(),"div"))!=null)divElm.setAttribute("align",alignValue);else if(rng.pasteHTML&&rng.htmlText.length>0)rng.pasteHTML('<div align="'+alignValue+'">'+rng.htmlText+"</div>");tinyMCE.triggerNodeChange();return;}}}switch(command){case "mceRepaint":this.repaint();return true;case "mceStoreSelection":this.selectionBookmark=this.getBookmark();return true;case "mceRestoreSelection":this.moveToBookmark(this.selectionBookmark);return true;case "InsertUnorderedList":case "InsertOrderedList":var tag=(command=="InsertUnorderedList")?"ul":"ol";if(tinyMCE.isSafari)this.execCommand("mceInsertContent",false,"<"+tag+"><li> </li><"+tag+">");else this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();break;case "Strikethrough":if(tinyMCE.isSafari)this.execCommand("mceInsertContent",false,"<strike>"+this.getSelectedHTML()+"</strike>");else this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();break;case "mceSelectNode":this.selectNode(value);tinyMCE.triggerNodeChange();tinyMCE.selectedNode=value;break;case "FormatBlock":if(value==null||value==""){var elm=tinyMCE.getParentElement(this.getFocusElement(),"p,div,h1,h2,h3,h4,h5,h6,pre,address");if(elm)this.execCommand("mceRemoveNode",false,elm);}else this.getDoc().execCommand("FormatBlock",false,value);tinyMCE.triggerNodeChange();break;case "mceRemoveNode":if(!value)value=tinyMCE.getParentElement(this.getFocusElement());if(tinyMCE.isMSIE){value.outerHTML=value.innerHTML;}else{var rng=value.ownerDocument.createRange();rng.setStartBefore(value);rng.setEndAfter(value);rng.deleteContents();rng.insertNode(rng.createContextualFragment(value.innerHTML));}tinyMCE.triggerNodeChange();break;case "mceSelectNodeDepth":var parentNode=this.getFocusElement();for(var i=0;parentNode;i++){if(parentNode.nodeName.toLowerCase()=="body")break;if(parentNode.nodeName.toLowerCase()=="#text"){i--;parentNode=parentNode.parentNode;continue;}if(i==value){this.selectNode(parentNode,false);tinyMCE.triggerNodeChange();tinyMCE.selectedNode=parentNode;return;}parentNode=parentNode.parentNode;}break;case "SetStyleInfo":var rng=this.getRng();var sel=this.getSel();var scmd=value['command'];var sname=value['name'];var svalue=value['value'];var wrapper=value['wrapper']?value['wrapper']:"span";var parentElm=null;if(tinyMCE.isMSIE){if(rng.item)parentElm=rng.item(0);else{var pelm=rng.parentElement();var prng=doc.selection.createRange();prng.moveToElementText(pelm);if(rng.htmlText==prng.htmlText||rng.boundingWidth==0)parentElm=pelm;}}else{var felm=this.getFocusElement();if(sel.isCollapsed||(/td|tr|tbody|table/ig.test(felm.nodeName)&&sel.anchorNode==felm.parentNode))parentElm=felm;}if(parentElm){if(scmd=="setstyle")eval("parentElm.style."+sname+" = svalue;");if(scmd=="setattrib")tinyMCE.setAttrib(parentElm,sname,svalue);}else{doc.execCommand("fontname",false,"#mce_temp_font#");var elementArray=tinyMCE.getElementsByAttributeValue(this.getBody(),"font","face","#mce_temp_font#");for(var x=0;x<elementArray.length;x++){elm=elementArray[x];if(elm){var spanElm=doc.createElement(wrapper);if(scmd=="setstyle")eval("spanElm.style."+sname+" = svalue;");if(scmd=="setattrib")tinyMCE.setAttrib(spanElm,sname,svalue);if(elm.hasChildNodes()){for(var i=0;i<elm.childNodes.length;i++)spanElm.appendChild(elm.childNodes[i].cloneNode(true));}spanElm.setAttribute("mce_new","true");elm.parentNode.replaceChild(spanElm,elm);}}}var nodes=doc.getElementsByTagName(wrapper);for(var i=nodes.length-1;i>=0;i--){var elm=nodes[i];var isNew=tinyMCE.getAttrib(elm,"mce_new")=="true";elm.removeAttribute("mce_new");if(elm.childNodes&&elm.childNodes.length==1&&elm.childNodes[0].nodeType==1){this._mergeElements(elm,elm.childNodes[0],isNew);continue;}if(elm.parentNode.childNodes.length==1){this._mergeElements(elm.parentNode,elm,false);}}var nodes=doc.getElementsByTagName(wrapper);for(var i=nodes.length-1;i>=0;i--){var elm=nodes[i];var isEmpty=true;var tmp=doc.createElement("body");tmp.appendChild(elm.cloneNode(false));if(new RegExp('<span>|<span style="">','gi').test(tmp.innerHTML)){for(var i=elm.childNodes.length-1;i>=0;i--){if(elm.parentNode!=null){elm.parentNode.insertBefore(elm.childNodes[i].cloneNode(true),elm);elm.parentNode.removeChild(elm);}}}}tinyMCE.triggerNodeChange();break;case "FontName":if(tinyMCE.getParam("convert_fonts_to_styles"))this.execCommand("SetStyleInfo",false,{command:"setstyle",name:"fontFamily",value:value});else this.getDoc().execCommand('FontName',false,value);break;case "FontSize":if(tinyMCE.getParam("convert_fonts_to_styles")){var sizes=new Array('',8,10,12,14,18,24,36);var size=sizes[value]==''?'':sizes[value]+'px';this.execCommand("SetStyleInfo",false,{command:"setstyle",name:"fontSize",value:size});}else this.getDoc().execCommand('FontSize',false,value);break;case "forecolor":if(tinyMCE.getParam("convert_fonts_to_styles"))this.execCommand("SetStyleInfo",false,{command:"setstyle",name:"color",value:value});else{if(tinyMCE.isGecko){this.getDoc().execCommand("useCSS",false,true);this.getDoc().execCommand('forecolor',false,value);this.getDoc().execCommand("useCSS",false,true);}else this.getDoc().execCommand('forecolor',false,value);}break;case "HiliteColor":if(tinyMCE.getParam("convert_fonts_to_styles"))this.execCommand("SetStyleInfo",false,{command:"setstyle",name:"backgroundColor",value:value});else{if(tinyMCE.isGecko){this.getDoc().execCommand("useCSS",false,false);this.getDoc().execCommand('hilitecolor',false,value);this.getDoc().execCommand("useCSS",false,true);}else this.getDoc().execCommand('BackColor',false,value);}break;case "Cut":case "Copy":case "Paste":var cmdFailed=false;eval('try {this.getDoc().execCommand(command, user_interface, value);} catch (e) {cmdFailed = true;}');if(tinyMCE.isGecko&&cmdFailed){if(confirm(tinyMCE.getLang('lang_clipboard_msg')))window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html','mceExternal');return;}else tinyMCE.triggerNodeChange();break;case "mceSetContent":if(!value)value="";value=tinyMCE._customCleanup(this,"insert_to_editor",value);tinyMCE._setHTML(doc,value);doc.body.innerHTML=tinyMCE._cleanupHTML(this,doc,tinyMCE.settings,doc.body);tinyMCE.handleVisualAid(doc.body,true,this.visualAid,this);tinyMCE._setEventsEnabled(doc.body,true);return true;case "mceLink":var selectedText="";if(tinyMCE.isMSIE){var rng=doc.selection.createRange();selectedText=rng.text;}else selectedText=this.getSel().toString();if(!tinyMCE.linkElement){if((tinyMCE.selectedElement.nodeName.toLowerCase()!="img")&&(selectedText.length<=0))return;}var href="",target="",title="",onclick="",action="insert",style_class="";if(tinyMCE.selectedElement.nodeName.toLowerCase()=="a")tinyMCE.linkElement=tinyMCE.selectedElement;if(tinyMCE.linkElement!=null&&tinyMCE.getAttrib(tinyMCE.linkElement,'href')=="")tinyMCE.linkElement=null;if(tinyMCE.linkElement){href=tinyMCE.getAttrib(tinyMCE.linkElement,'href');target=tinyMCE.getAttrib(tinyMCE.linkElement,'target');title=tinyMCE.getAttrib(tinyMCE.linkElement,'title');onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');style_class=tinyMCE.getAttrib(tinyMCE.linkElement,'class');if(onclick=="")onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');onclick=tinyMCE.cleanupEventStr(onclick);mceRealHref=tinyMCE.getAttrib(tinyMCE.linkElement,'mce_real_href');if(mceRealHref!="")href=mceRealHref;href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement, true);");action="update";}if(this.settings['insertlink_callback']){var returnVal=eval(this.settings['insertlink_callback']+"(href, target, title, onclick, action, style_class);");if(returnVal&&returnVal['href'])tinyMCE.insertLink(returnVal['href'],returnVal['target'],returnVal['title'],returnVal['onclick'],returnVal['style_class']);}else{tinyMCE.openWindow(this.insertLinkTemplate,{href:href,target:target,title:title,onclick:onclick,action:action,className:style_class});}break;case "mceImage":var src="",alt="",border="",hspace="",vspace="",width="",height="",align="";var title="",onmouseover="",onmouseout="",action="insert";var img=tinyMCE.imgElement;if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img"){img=tinyMCE.selectedElement;tinyMCE.imgElement=img;}if(img){if(tinyMCE.getAttrib(img,'name').indexOf('mce_')==0)return;src=tinyMCE.getAttrib(img,'src');alt=tinyMCE.getAttrib(img,'alt');if(alt=="")alt=tinyMCE.getAttrib(img,'title');if(tinyMCE.isGecko){var w=img.style.width;if(w!=null&&w!="")img.setAttribute("width",w);var h=img.style.height;if(h!=null&&h!="")img.setAttribute("height",h);}border=tinyMCE.getAttrib(img,'border');hspace=tinyMCE.getAttrib(img,'hspace');vspace=tinyMCE.getAttrib(img,'vspace');width=tinyMCE.getAttrib(img,'width');height=tinyMCE.getAttrib(img,'height');align=tinyMCE.getAttrib(img,'align');onmouseover=tinyMCE.getAttrib(img,'onmouseover');onmouseout=tinyMCE.getAttrib(img,'onmouseout');title=tinyMCE.getAttrib(img,'title');if(tinyMCE.isMSIE){width=img.attributes['width'].specified?width:"";height=img.attributes['height'].specified?height:"";}onmouseover=tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseover));onmouseout=tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseout));mceRealSrc=tinyMCE.getAttrib(img,'mce_real_src');if(mceRealSrc!="")src=mceRealSrc;src=eval(tinyMCE.settings['urlconverter_callback']+"(src, img, true);");if(onmouseover!="")onmouseover=eval(tinyMCE.settings['urlconverter_callback']+"(onmouseover, img, true);");if(onmouseout!="")onmouseout=eval(tinyMCE.settings['urlconverter_callback']+"(onmouseout, img, true);");action="update";}if(this.settings['insertimage_callback']){var returnVal=eval(this.settings['insertimage_callback']+"(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);");if(returnVal&&returnVal['src'])tinyMCE.insertImage(returnVal['src'],returnVal['alt'],returnVal['border'],returnVal['hspace'],returnVal['vspace'],returnVal['width'],returnVal['height'],returnVal['align'],returnVal['title'],returnVal['onmouseover'],returnVal['onmouseout']);}else tinyMCE.openWindow(this.insertImageTemplate,{src:src,alt:alt,border:border,hspace:hspace,vspace:vspace,width:width,height:height,align:align,title:title,onmouseover:onmouseover,onmouseout:onmouseout,action:action});break;case "mceCleanup":tinyMCE._setHTML(this.contentDocument,this.getBody().innerHTML);this.getBody().innerHTML=tinyMCE._cleanupHTML(this,this.contentDocument,this.settings,this.getBody(),this.visualAid);tinyMCE.handleVisualAid(this.getBody(),true,this.visualAid,this);tinyMCE._setEventsEnabled(this.getBody(),true);this.repaint();tinyMCE.triggerNodeChange();break;case "mceReplaceContent":var selectedText="";if(tinyMCE.isMSIE){var rng=doc.selection.createRange();selectedText=rng.text;}else selectedText=this.getSel().toString();if(selectedText.length>0){value=tinyMCE.replaceVar(value,"selection",selectedText);tinyMCE.execCommand('mceInsertContent',false,value);}tinyMCE.triggerNodeChange();break;case "mceSetAttribute":if(typeof(value)=='object'){var targetElms=(typeof(value['targets'])=="undefined")?"p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address":value['targets'];var targetNode=tinyMCE.getParentElement(this.getFocusElement(),targetElms);if(targetNode){targetNode.setAttribute(value['name'],value['value']);tinyMCE.triggerNodeChange();}}break;case "mceSetCSSClass":this.execCommand("SetStyleInfo",false,{command:"setattrib",name:"class",value:value});break;case "mceInsertRawHTML":var key='tiny_mce_marker';this.execCommand('mceBeginUndoLevel');this.execCommand('mceInsertContent',false,key);var scrollX=this.getDoc().body.scrollLeft+this.getDoc().documentElement.scrollLeft;var scrollY=this.getDoc().body.scrollTop+this.getDoc().documentElement.scrollTop;var html=this.getBody().innerHTML;if((pos=html.indexOf(key))!=-1)this.getBody().innerHTML=html.substring(0,pos)+value+html.substring(pos+key.length);this.contentWindow.scrollTo(scrollX,scrollY);this.execCommand('mceEndUndoLevel');break;case "mceInsertContent":if(!tinyMCE.isMSIE){var sel=this.getSel();var rng=this.getRng();var isHTML=value.indexOf('<')!=-1;if(isHTML){if(tinyMCE.isSafari){var tmpRng=this.getDoc().createRange();tmpRng.setStart(this.getBody(),0);tmpRng.setEnd(this.getBody(),0);value=tmpRng.createContextualFragment(value);}else value=rng.createContextualFragment(value);}else{var el=document.createElement("div");el.innerHTML=value;value=el.firstChild.nodeValue;value=doc.createTextNode(value);}if(tinyMCE.isSafari&&!isHTML){this.execCommand('InsertText',false,value.nodeValue);tinyMCE.triggerNodeChange();return true;}else if(tinyMCE.isSafari&&isHTML){rng.deleteContents();rng.insertNode(value);tinyMCE.triggerNodeChange();return true;}rng.deleteContents();if(rng.startContainer.nodeType==3){var node=rng.startContainer.splitText(rng.startOffset);node.parentNode.insertBefore(value,node);}else rng.insertNode(value);if(!isHTML){sel.selectAllChildren(doc.body);sel.removeAllRanges();var rng=doc.createRange();rng.selectNode(value);rng.collapse(false);sel.addRange(rng);}else rng.collapse(false);}else{var rng=doc.selection.createRange();if(rng.item)rng.item(0).outerHTML=value;else rng.pasteHTML(value);}tinyMCE.triggerNodeChange();break;case "mceStartTyping":if(tinyMCE.settings['custom_undo_redo']&&this.typingUndoIndex==-1){this.typingUndoIndex=this.undoIndex;this.execCommand('mceAddUndoLevel');}break;case "mceEndTyping":if(tinyMCE.settings['custom_undo_redo']&&this.typingUndoIndex!=-1){this.execCommand('mceAddUndoLevel');this.typingUndoIndex=-1;}break;case "mceBeginUndoLevel":this.undoRedo=false;break;case "mceEndUndoLevel":this.undoRedo=true;this.execCommand('mceAddUndoLevel');break;case "mceAddUndoLevel":if(tinyMCE.settings['custom_undo_redo']&&this.undoRedo){if(this.typingUndoIndex!=-1){this.undoIndex=this.typingUndoIndex;}var newHTML=tinyMCE.trim(this.getBody().innerHTML);if(newHTML!=this.undoLevels[this.undoIndex]){tinyMCE.executeCallback('onchange_callback','_onchange',0,this);var customUndoLevels=tinyMCE.settings['custom_undo_redo_levels'];if(customUndoLevels!=-1&&this.undoLevels.length>customUndoLevels){for(var i=0;i<this.undoLevels.length-1;i++){this.undoLevels[i]=this.undoLevels[i+1];}this.undoLevels.length--;this.undoIndex--;}this.undoIndex++;this.undoLevels[this.undoIndex]=newHTML;this.undoLevels.length=this.undoIndex+1;tinyMCE.triggerNodeChange(false);}}break;case "Undo":if(tinyMCE.settings['custom_undo_redo']){tinyMCE.execCommand("mceEndTyping");if(this.undoIndex>0){this.undoIndex--;this.getBody().innerHTML=this.undoLevels[this.undoIndex];this.repaint();}tinyMCE.triggerNodeChange();}else this.getDoc().execCommand(command,user_interface,value);break;case "Redo":if(tinyMCE.settings['custom_undo_redo']){tinyMCE.execCommand("mceEndTyping");if(this.undoIndex<(this.undoLevels.length-1)){this.undoIndex++;this.getBody().innerHTML=this.undoLevels[this.undoIndex];this.repaint();}tinyMCE.triggerNodeChange();}else this.getDoc().execCommand(command,user_interface,value);break;case "mceToggleVisualAid":this.visualAid=!this.visualAid;tinyMCE.handleVisualAid(this.getBody(),true,this.visualAid,this);tinyMCE.triggerNodeChange();break;case "removeformat":var text=this.getSelectedText();if(tinyMCE.isMSIE){try{win.focus();var rng=doc.selection.createRange();rng.execCommand("RemoveFormat",false,null);if(rng.text==rng.parentElement().innerText){rng.moveToElementText(rng.parentElement());rng.select();}rng.pasteHTML(rng.text);}catch(e){}}else this.getDoc().execCommand(command,user_interface,value);if(text.length==0)this.execCommand("mceSetCSSClass",false,"");tinyMCE.triggerNodeChange();break;default:this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();}if(command!="mceAddUndoLevel"&&command!="Undo"&&command!="Redo"&&command!="mceStartTyping"&&command!="mceEndTyping")tinyMCE.execCommand("mceAddUndoLevel");};TinyMCEControl.prototype.queryCommandValue=function(command){return this.getDoc().queryCommandValue(command);};TinyMCEControl.prototype.queryCommandState=function(command){return this.getDoc().queryCommandState(command);};TinyMCEControl.prototype.onAdd=function(replace_element,form_element_name,target_document){var targetDoc=target_document?target_document:document;this.targetDoc=targetDoc;tinyMCE.themeURL=tinyMCE.baseURL+"/themes/"+this.settings['theme'];this.settings['themeurl']=tinyMCE.themeURL;if(!replace_element){alert("Error: Could not find the target element.");return false;}var templateFunction=tinyMCE._getThemeFunction('_getInsertLinkTemplate');if(eval("typeof("+templateFunction+")")!='undefined')this.insertLinkTemplate=eval(templateFunction+'(this.settings);');var templateFunction=tinyMCE._getThemeFunction('_getInsertImageTemplate');if(eval("typeof("+templateFunction+")")!='undefined')this.insertImageTemplate=eval(templateFunction+'(this.settings);');var templateFunction=tinyMCE._getThemeFunction('_getEditorTemplate');if(eval("typeof("+templateFunction+")")=='undefined'){alert("Error: Could not find the template function: "+templateFunction);return false;}var editorTemplate=eval(templateFunction+'(this.settings, this.editorId);');var deltaWidth=editorTemplate['delta_width']?editorTemplate['delta_width']:0;var deltaHeight=editorTemplate['delta_height']?editorTemplate['delta_height']:0;var html='<span id="'+this.editorId+'_parent">'+editorTemplate['html'];var templateFunction=tinyMCE._getThemeFunction('_handleNodeChange',true);if(eval("typeof("+templateFunction+")")!='undefined')this.settings['handleNodeChangeCallback']=templateFunction;html=tinyMCE.replaceVar(html,"editor_id",this.editorId);this.settings['default_document']=tinyMCE.baseURL+"/blank.htm";this.settings['old_width']=this.settings['width'];this.settings['old_height']=this.settings['height'];if(this.settings['width']==-1)this.settings['width']=replace_element.offsetWidth;if(this.settings['height']==-1)this.settings['height']=replace_element.offsetHeight;if(this.settings['width']==0)this.settings['width']=replace_element.style.width;if(this.settings['height']==0)this.settings['height']=replace_element.style.height;if(this.settings['width']==0)this.settings['width']=320;if(this.settings['height']==0)this.settings['height']=240;this.settings['area_width']=parseInt(this.settings['width']);this.settings['area_height']=parseInt(this.settings['height']);this.settings['area_width']+=deltaWidth;this.settings['area_height']+=deltaHeight;if((""+this.settings['width']).indexOf('%')!=-1)this.settings['area_width']="100%";if((""+this.settings['height']).indexOf('%')!=-1)this.settings['area_height']="100%";if((""+replace_element.style.width).indexOf('%')!=-1){this.settings['width']=replace_element.style.width;this.settings['area_width']="100%";}if((""+replace_element.style.height).indexOf('%')!=-1){this.settings['height']=replace_element.style.height;this.settings['area_height']="100%";}html=tinyMCE.applyTemplate(html);this.settings['width']=this.settings['old_width'];this.settings['height']=this.settings['old_height'];this.visualAid=this.settings['visual'];this.formTargetElementId=form_element_name;if(replace_element.nodeName=="TEXTAREA"||replace_element.nodeName=="INPUT")this.startContent=replace_element.value;else this.startContent=replace_element.innerHTML;if(replace_element.nodeName.toLowerCase()!="textarea"){this.oldTargetElement=replace_element.cloneNode(true);if(tinyMCE.settings['debug'])html+='<textarea wrap="off" id="'+form_element_name+'" name="'+form_element_name+'" cols="100" rows="15"></textarea>';else html+='<input type="hidden" type="text" id="'+form_element_name+'" name="'+form_element_name+'" />';html+='</span>';if(!tinyMCE.isMSIE){var rng=replace_element.ownerDocument.createRange();rng.setStartBefore(replace_element);var fragment=rng.createContextualFragment(html);replace_element.parentNode.replaceChild(fragment,replace_element);}else replace_element.outerHTML=html;}else{html+='</span>';this.oldTargetElement=replace_element;if(!tinyMCE.settings['debug'])this.oldTargetElement.style.display="none";if(!tinyMCE.isMSIE){var rng=replace_element.ownerDocument.createRange();rng.setStartBefore(replace_element);var fragment=rng.createContextualFragment(html);replace_element.parentNode.insertBefore(fragment,replace_element);}else replace_element.insertAdjacentHTML("beforeBegin",html);}var dynamicIFrame=false;var tElm=targetDoc.getElementById(this.editorId);if(!tinyMCE.isMSIE){if(tElm&&tElm.nodeName.toLowerCase()=="span"){tElm=tinyMCE._createIFrame(tElm);dynamicIFrame=true;}this.targetElement=tElm;this.iframeElement=tElm;this.contentDocument=tElm.contentDocument;this.contentWindow=tElm.contentWindow;}else{if(tElm&&tElm.nodeName.toLowerCase()=="span")tElm=tinyMCE._createIFrame(tElm);else tElm=targetDoc.frames[this.editorId];this.targetElement=tElm;this.iframeElement=targetDoc.getElementById(this.editorId);this.contentDocument=tElm.window.document;this.contentWindow=tElm.window;this.getDoc().designMode="on";}var doc=this.contentDocument;if(dynamicIFrame){var html='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><base href="'+tinyMCE.settings['base_href']+'" /><title>blank_page</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body class="mceContentBody"></body></html>';try{this.getDoc().designMode="on";doc.open();doc.write(html);doc.close();}catch(e){this.getDoc().location.href=tinyMCE.baseURL+"/blank.htm";}}if(tinyMCE.isMSIE)window.setTimeout("TinyMCE.prototype.addEventHandlers('"+this.editorId+"');",1);tinyMCE.setupContent(this.editorId,true);return true;};TinyMCEControl.prototype.getFocusElement=function(){if(tinyMCE.isMSIE){var doc=this.getDoc();var rng=doc.selection.createRange();if(rng.collapse)rng.collapse(true);var elm=rng.item?rng.item(0):rng.parentElement();}else{var sel=this.getSel();var rng=this.getRng();var elm=rng.commonAncestorContainer;if(!rng.collapsed){if(rng.startContainer==rng.endContainer){if(rng.startOffset-rng.endOffset<2){if(rng.startContainer.hasChildNodes())elm=rng.startContainer.childNodes[rng.startOffset];}}}elm=tinyMCE.getParentElement(elm);}return elm;};var tinyMCE=new TinyMCE();var tinyMCELang=new Array();
\ No newline at end of file diff --git a/wp-inst/wp-includes/js/tinymce/tiny_mce_gzip.php b/wp-inst/wp-includes/js/tinymce/tiny_mce_gzip.php index c91281d..a5147a1 100644 --- a/wp-inst/wp-includes/js/tinymce/tiny_mce_gzip.php +++ b/wp-inst/wp-includes/js/tinymce/tiny_mce_gzip.php @@ -5,7 +5,7 @@ * $Date: 2005/06/14 18:55:34 $ * * @author Moxiecode - * @copyright Copyright 2004, Moxiecode Systems AB, All rights reserved. + * @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved. * * This file compresses the TinyMCE JavaScript using GZip and * enables the browser to do two requests instead of one for each .js file. @@ -16,7 +16,7 @@ */ // General options - $suffix = "_src"; // Set to "_src" to use source version + $suffix = ""; // Set to "_src" to use source version $expiresOffset = 3600 * 24 * 10; // 10 days util client cache expires // Get data to load diff --git a/wp-inst/wp-includes/js/tinymce/tiny_mce_popup.js b/wp-inst/wp-includes/js/tinymce/tiny_mce_popup.js index b9f9c56..0486e74 100644 --- a/wp-inst/wp-includes/js/tinymce/tiny_mce_popup.js +++ b/wp-inst/wp-includes/js/tinymce/tiny_mce_popup.js @@ -1,52 +1,144 @@ -// Get tinyMCE window -var win = window.opener ? window.opener : window.dialogArguments; +/** + * $RCSfile: tiny_mce_popup.js,v $ + * $Revision: 1.14 $ + * $Date: 2005/08/23 17:01:39 $ + * + * @author Moxiecode + * @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved. + */ -var tinyMCE = null; -var tinyMCELang = null; +var tinyMCE = null, tinyMCELang = null; -// Use top window if not defined -if (!win) - win = top; +function TinyMCEPopup() { +}; -var tinyMCE = win.tinyMCE; -var tinyMCELang = win.tinyMCELang; +TinyMCEPopup.prototype.init = function() { + var win = window.opener ? window.opener : window.dialogArguments; -if (!tinyMCE) - alert("tinyMCE object reference not found from popup."); + if (!win) + win = top; -// Setup window openerer -window.opener = win; + window.opener = win; + this.windowOpener = win; -// Setup title -var re = new RegExp('{|\\\$|}', 'g'); -var title = document.title.replace(re, ""); -if (typeof tinyMCELang[title] != "undefined") { - var divElm = document.createElement("div"); - divElm.innerHTML = tinyMCELang[title]; - document.title = divElm.innerHTML; -} + // Setup parent references + tinyMCE = win.tinyMCE; + tinyMCELang = win.tinyMCELang; -// Setup dir -if (tinyMCELang['lang_dir']) - document.dir = tinyMCELang['lang_dir']; + if (!tinyMCE) { + alert("tinyMCE object reference not found from popup."); + return; + } -function TinyMCEPlugin_onLoad() { - if (tinyMCE.getWindowArg('mce_replacevariables', true)) - document.body.innerHTML = tinyMCE.applyTemplate(document.body.innerHTML, tinyMCE.windowArgs); + this.isWindow = tinyMCE.getWindowArg('mce_inside_iframe', false) == false; + this.storeSelection = tinyMCE.isMSIE && !this.isWindow && tinyMCE.getWindowArg('mce_store_selection', true); - // Auto resize window - if (tinyMCE.getWindowArg('mce_windowresize', true)) - TinyMCEPopup_autoResize(); + // Store selection + if (this.storeSelection) + tinyMCE.selectedInstance.execCommand('mceStoreSelection'); - if (tinyMCE.settings["dialog_type"] == "window") - window.focus(); -} + // Setup dir + if (tinyMCELang['lang_dir']) + document.dir = tinyMCELang['lang_dir']; -function TinyMCEPopup_autoResize() { - // Div mode, skip resize - if (tinyMCE.settings["dialog_type"] == "div") - return; + // Setup title + var re = new RegExp('{|\\\$|}', 'g'); + var title = document.title.replace(re, ""); + if (typeof tinyMCELang[title] != "undefined") { + var divElm = document.createElement("div"); + divElm.innerHTML = tinyMCELang[title]; + document.title = divElm.innerHTML; + + if (tinyMCE.setWindowTitle != null) + tinyMCE.setWindowTitle(window, divElm.innerHTML); + } + + // Output Popup CSS class + document.write('<link href="' + tinyMCE.getParam("popups_css") + '" rel="stylesheet" type="text/css">'); + + tinyMCE.addEvent(window, "load", this.onLoad); +}; + +TinyMCEPopup.prototype.onLoad = function() { + var body = document.body; + + if (tinyMCE.getWindowArg('mce_replacevariables', true)) + body.innerHTML = tinyMCE.applyTemplate(body.innerHTML, tinyMCE.windowArgs); + + var dir = tinyMCE.selectedInstance.settings['directionality']; + if (dir == "rtl") { + var elms = document.forms[0].elements; + for (var i=0; i<elms.length; i++) { + if ((elms[i].type == "text" || elms[i].type == "textarea") && elms[i].getAttribute("dir") != "ltr") + elms[i].dir = dir; + } + } + + if (body.style.display == 'none') + body.style.display = 'block'; +}; + +TinyMCEPopup.prototype.resizeToInnerSize = function() { + if (this.isWindow) { + var doc = document; + var body = doc.body; + var oldMargin, wrapper, iframe, nodes, dx, dy; + + if (body.style.display == 'none') + body.style.display = 'block'; + + // Remove margin + oldMargin = body.style.margin; + body.style.margin = '0px'; + + // Create wrapper + wrapper = doc.createElement("div"); + wrapper.id = 'mcBodyWrapper'; + wrapper.style.display = 'none'; + wrapper.style.margin = '0px'; + + // Wrap body elements + nodes = doc.body.childNodes; + for (var i=nodes.length-1; i>=0; i--) { + if (wrapper.hasChildNodes()) + wrapper.insertBefore(nodes[i].cloneNode(true), wrapper.firstChild); + else + wrapper.appendChild(nodes[i].cloneNode(true)); + + nodes[i].parentNode.removeChild(nodes[i]); + } + // Add wrapper + doc.body.appendChild(wrapper); + + // Create iframe + iframe = document.createElement("iframe"); + iframe.id = "mcWinIframe"; + iframe.src = "about:blank"; + iframe.width = "100%"; + iframe.height = "100%"; + iframe.style.margin = '0px'; + + // Add iframe + doc.body.appendChild(iframe); + + // Measure iframe + iframe = document.getElementById('mcWinIframe'); + dx = tinyMCE.getWindowArg('mce_width') - iframe.clientWidth; + dy = tinyMCE.getWindowArg('mce_height') - iframe.clientHeight; + + // Resize window + // tinyMCE.debug(tinyMCE.getWindowArg('mce_width') + "," + tinyMCE.getWindowArg('mce_height') + " - " + dx + "," + dy); + window.resizeBy(dx, dy); + + // Hide iframe and show wrapper + body.style.margin = oldMargin; + iframe.style.display = 'none'; + wrapper.style.display = 'block'; + } +}; + +TinyMCEPopup.prototype.resizeToContent = function() { var isMSIE = (navigator.appName == "Microsoft Internet Explorer"); var isOpera = (navigator.userAgent.indexOf("Opera") != -1); @@ -74,23 +166,56 @@ function TinyMCEPopup_autoResize() { window.moveTo(x, y); } } -} - -// Re-patch it -if (tinyMCE.settings["dialog_type"] == "window") { - tinyMCE.closeDialog = function() { - // Remove div or close window - if (tinyMCE.settings["dialog_type"] == "div") { - var div = document.getElementById(tinyMCE._currentDialog); - if (div) - div.parentNode.removeChild(div); - } else - window.close(); - }; -} - -// Add onload trigger -tinyMCE.addEvent(window, "load", TinyMCEPlugin_onLoad); - -// Output Popup CSS class -document.write('<link href="' + tinyMCE.getParam("popups_css") + '" rel="stylesheet" type="text/css">'); +}; + +TinyMCEPopup.prototype.getWindowArg = function(name, default_value) { + return tinyMCE.getWindowArg(name, default_value); +}; + +TinyMCEPopup.prototype.execCommand = function(command, user_interface, value) { + var inst = tinyMCE.selectedInstance; + + // Restore selection + if (this.storeSelection) { + inst.getWin().focus(); + inst.execCommand('mceRestoreSelection'); + } + + inst.execCommand(command, user_interface, value); + + // Store selection + if (this.storeSelection) + inst.execCommand('mceStoreSelection'); +}; + +TinyMCEPopup.prototype.close = function() { + tinyMCE.closeWindow(window); +}; + +TinyMCEPopup.prototype.pickColor = function(e, element_id) { + tinyMCE.selectedInstance.execCommand('mceColorPicker', true, { + element_id : element_id, + document : document, + window : window, + store_selection : false + }); +}; + +TinyMCEPopup.prototype.openBrowser = function(element_id, type, option) { + var cb = tinyMCE.getParam(option, tinyMCE.getParam("file_browser_callback")); + var url = document.getElementById(element_id).value; + + tinyMCE.setWindowArg("window", window); + tinyMCE.setWindowArg("document", document); + + // Call to external callback + if (eval('typeof(tinyMCEPopup.windowOpener.' + cb + ')') == "undefined") + alert("Callback function: " + cb + " could not be found."); + else + eval("tinyMCEPopup.windowOpener." + cb + "(element_id, url, type, window);"); +}; + +// Setup global instance +var tinyMCEPopup = new TinyMCEPopup(); + +tinyMCEPopup.init(); diff --git a/wp-inst/wp-includes/js/tinymce/tiny_mce_src.js b/wp-inst/wp-includes/js/tinymce/tiny_mce_src.js index ee3cdc0..0147c8e 100644 --- a/wp-inst/wp-includes/js/tinymce/tiny_mce_src.js +++ b/wp-inst/wp-includes/js/tinymce/tiny_mce_src.js @@ -1,13 +1,17 @@ /** * $RCSfile: tiny_mce_src.js,v $ - * $Revision: 1.215 $ - * $Date: 2005/06/23 12:04:41 $ + * $Revision: 1.233 $ + * $Date: 2005/08/26 15:20:32 $ * * @author Moxiecode - * @copyright Copyright 2004, Moxiecode Systems AB, All rights reserved. + * @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved. */ function TinyMCE() { + this.majorVersion = "2"; + this.minorVersion = "0RC2"; + this.releaseDate = "2005-09-12"; + this.instances = new Array(); this.stickyClassesLookup = new Array(); this.windowArgs = new Array(); @@ -80,7 +84,9 @@ TinyMCE.prototype.init = function(settings) { this.defParam("docs_language", this.settings['language']); this.defParam("elements", ""); this.defParam("textarea_trigger", "mce_editable"); - this.defParam("valid_elements", "+a[name|href|target|title|class],strong/b[class],em/i[class],strike[class],u[class],+p[dir|class|align],ol,ul,li,br,img[class|src|border=0|alt|title|hspace|vspace|width|height|align],sub,sup,blockquote[dir|style],table[border=0|cellspacing|cellpadding|width|height|class|align],tr[class|rowspan|width|height|align|valign],td[dir|class|colspan|rowspan|width|height|align|valign],div[dir|class|align],span[class|align],pre[class|align],address[class|align],h1[dir|class|align],h2[dir|class|align],h3[dir|class|align],h4[dir|class|align],h5[dir|class|align],h6[dir|class|align],hr"); + this.defParam("editor_selector", ""); + this.defParam("editor_deselector", "mceNoEditor"); + this.defParam("valid_elements", "+a[id|style|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/b[class|style],-em/i[class|style],-strike[class|style],-u[class|style],+p[style|dir|class|align],-ol[class],-ul[class],-li[class],br,img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border=0|alt|title|hspace|vspace|width|height|align],-sub[style|class],-sup[style|class],-blockquote[dir|style],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],-td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[style|class|align],-pre[class|align],address[class|align],-h1[style|dir|class|align],-h2[style|dir|class|align],-h3[style|dir|class|align],-h4[style|dir|class|align],-h5[style|dir|class|align],-h6[style|dir|class|align],hr[class]"); this.defParam("extended_valid_elements", ""); this.defParam("invalid_elements", ""); this.defParam("encoding", ""); @@ -102,16 +108,14 @@ TinyMCE.prototype.init = function(settings) { this.defParam("custom_undo_redo_levels", -1); this.defParam("custom_undo_redo_keyboard_shortcuts", true); this.defParam("verify_css_classes", false); - this.defParam("trim_span_elements", true); this.defParam("verify_html", true); this.defParam("apply_source_formatting", false); this.defParam("directionality", "ltr"); - this.defParam("auto_cleanup_word", false); this.defParam("cleanup_on_startup", false); this.defParam("inline_styles", false); this.defParam("convert_newlines_to_brs", false); - this.defParam("auto_reset_designmode", false); - this.defParam("entities", "160,nbsp,38,amp,34,quot,162,cent,8364,euro,163,pound,165,yen,169,copy,174,reg,8482,trade,8240,permil,181,micro,183,middot,8226,bull,8230,hellip,8242,prime,8243,Prime,167,sect,182,para,223,szlig,8249,lsaquo,8250,rsaquo,171,laquo,187,raquo,8216,lsquo,8217,rsquo,8220,ldquo,8221,rdquo,8218,sbquo,8222,bdquo,60,lt,62,gt,8804,le,8805,ge,8211,ndash,8212,mdash,175,macr,8254,oline,164,curren,166,brvbar,168,uml,161,iexcl,191,iquest,710,circ,732,tilde,176,deg,8722,minus,177,plusmn,247,divide,8260,frasl,215,times,185,sup1,178,sup2,179,sup3,188,frac14,189,frac12,190,frac34,402,fnof,8747,int,8721,sum,8734,infin,8730,radic,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8712,isin,8713,notin,8715,ni,8719,prod,8743,and,8744,or,172,not,8745,cap,8746,cup,8706,part,8704,forall,8707,exist,8709,empty,8711,nabla,8727,lowast,8733,prop,8736,ang,180,acute,184,cedil,170,ordf,186,ordm,8224,dagger,8225,Dagger,192,Agrave,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,202,Ecirc,203,Euml,204,Igrave,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,212,Ocirc,213,Otilde,214,Ouml,216,Oslash,338,OElig,217,Ugrave,219,Ucirc,220,Uuml,376,Yuml,222,THORN,224,agrave,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,234,ecirc,235,euml,236,igrave,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,244,ocirc,245,otilde,246,ouml,248,oslash,339,oelig,249,ugrave,251,ucirc,252,uuml,254,thorn,255,yuml,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,8501,alefsym,982,piv,8476,real,977,thetasym,978,upsih,8472,weierp,8465,image,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8756,there4,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,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,173,shy,233,eacute"); + this.defParam("auto_reset_designmode", true); + this.defParam("entities", "160,nbsp,38,amp,34,quot,162,cent,8364,euro,163,pound,165,yen,169,copy,174,reg,8482,trade,8240,permil,181,micro,183,middot,8226,bull,8230,hellip,8242,prime,8243,Prime,167,sect,182,para,223,szlig,8249,lsaquo,8250,rsaquo,171,laquo,187,raquo,8216,lsquo,8217,rsquo,8220,ldquo,8221,rdquo,8218,sbquo,8222,bdquo,60,lt,62,gt,8804,le,8805,ge,8211,ndash,8212,mdash,175,macr,8254,oline,164,curren,166,brvbar,168,uml,161,iexcl,191,iquest,710,circ,732,tilde,176,deg,8722,minus,177,plusmn,247,divide,8260,frasl,215,times,185,sup1,178,sup2,179,sup3,188,frac14,189,frac12,190,frac34,402,fnof,8747,int,8721,sum,8734,infin,8730,radic,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8712,isin,8713,notin,8715,ni,8719,prod,8743,and,8744,or,172,not,8745,cap,8746,cup,8706,part,8704,forall,8707,exist,8709,empty,8711,nabla,8727,lowast,8733,prop,8736,ang,180,acute,184,cedil,170,ordf,186,ordm,8224,dagger,8225,Dagger,192,Agrave,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,202,Ecirc,203,Euml,204,Igrave,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,212,Ocirc,213,Otilde,214,Ouml,216,Oslash,338,OElig,217,Ugrave,219,Ucirc,220,Uuml,376,Yuml,222,THORN,224,agrave,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,234,ecirc,235,euml,236,igrave,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,244,ocirc,245,otilde,246,ouml,248,oslash,339,oelig,249,ugrave,251,ucirc,252,uuml,254,thorn,255,yuml,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,8501,alefsym,982,piv,8476,real,977,thetasym,978,upsih,8472,weierp,8465,image,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8756,there4,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,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,173,shy,233,eacute,237,iacute,243,oacute,250,uacute,193,Aacute,225,aacute,201,Eacute,205,Iacute,211,Oacute,218,Uacute,221,Yacute,253,yacute"); this.defParam("entity_encoding", "named"); this.defParam("cleanup_callback", ""); this.defParam("add_unload_trigger", true); @@ -125,6 +129,7 @@ TinyMCE.prototype.init = function(settings) { this.defParam("submit_patch", true); this.defParam("browsers", "msie,safari,gecko"); this.defParam("dialog_type", "window"); + this.defParam("convert_fonts_to_styles", true); // Browser check IE if (this.isMSIE && this.settings['browsers'].indexOf('msie') == -1) @@ -146,7 +151,8 @@ TinyMCE.prototype.init = function(settings) { theme = this.settings['theme']; - this.blockRegExp = new RegExp("^(h1|h2|h3|h4|h5|h6|p|div|address|pre|form|table|li|ol|ul|td)$", "i"); + this.blockRegExp = new RegExp("^(h[1-6]|p|div|address|pre|form|table|li|ol|ul|td)$", "i"); + this.posKeyCodes = new Array(13,45,36,35,33,34,37,38,39,40); // Theme url this.settings['theme_href'] = tinyMCE.baseURL + "/themes/" + theme; @@ -163,7 +169,7 @@ TinyMCE.prototype.init = function(settings) { else this.settings['content_css'] = cssPath; } else - this.settings['content_css'] = tinyMCE.baseURL + "/themes/" + theme + "/editor_content.css"; + this.settings['content_css'] = ''; if (tinyMCE.getParam("popups_css", false)) { var cssPath = tinyMCE.getParam("popups_css", ""); @@ -174,7 +180,7 @@ TinyMCE.prototype.init = function(settings) { else this.settings['popups_css'] = cssPath; } else - this.settings['popups_css'] = tinyMCE.baseURL + "/themes/" + theme + "/editor_popup.css"; + this.settings['popups_css'] = tinyMCE.baseURL + "/themes/" + theme + "/css/editor_popup.css"; if (tinyMCE.getParam("editor_css", false)) { var cssPath = tinyMCE.getParam("editor_css", ""); @@ -185,7 +191,7 @@ TinyMCE.prototype.init = function(settings) { else this.settings['editor_css'] = cssPath; } else - this.settings['editor_css'] = tinyMCE.baseURL + "/themes/" + theme + "/editor_ui.css"; + this.settings['editor_css'] = tinyMCE.baseURL + "/themes/" + theme + "/css/editor_ui.css"; if (tinyMCE.settings['debug']) { var msg = "Debug: \n"; @@ -205,8 +211,8 @@ TinyMCE.prototype.init = function(settings) { // Only do this once if (this.configs.length == 0) { // Is Safari enabled -// if (this.isSafari) -// alert("Safari support is very limited and should be considered experimental.\nSo there is no need to even submit bugreports on this early version."); + if (this.isSafari && this.getParam('safari_warning', true)) + alert("Safari support is very limited and should be considered experimental.\nSo there is no need to even submit bugreports on this early version."); tinyMCE.addEvent(window, "load", TinyMCE.prototype.onLoad); @@ -260,6 +266,9 @@ TinyMCE.prototype.loadCSS = function(url) { }; TinyMCE.prototype.importCSS = function(doc, css_file) { + if (css_file == '') + return; + if (tinyMCE.isMSIE) var styleSheet = doc.createStyleSheet(css_file); else { @@ -299,7 +308,7 @@ TinyMCE.prototype.updateContent = function(form_element_name) { tinyMCE._setHTML(doc, inst.formElement.value); if (!tinyMCE.isMSIE) - doc.body.innerHTML = tinyMCE._cleanupHTML(doc, this.settings, doc.body, inst.visualAid); + doc.body.innerHTML = tinyMCE._cleanupHTML(inst, doc, this.settings, doc.body, inst.visualAid); } } }; @@ -333,9 +342,15 @@ TinyMCE.prototype.triggerSave = function(skip_cleanup, skip_callback) { tinyMCE._setHTML(inst.getDoc(), inst.getBody().innerHTML); - var htm = skip_cleanup ? inst.getBody().innerHTML : tinyMCE._cleanupHTML(inst.getDoc(), this.settings, inst.getBody(), this.visualAid, true); + // Remove visual aids when cleanup is disabled + if (inst.settings['cleanup'] == false) { + tinyMCE.handleVisualAid(inst.getBody(), true, false, inst); + tinyMCE._setEventsEnabled(inst.getBody(), false); + } - //var htm = tinyMCE._cleanupHTML(inst.getDoc(), tinyMCE.settings, inst.getBody(), false, true); + tinyMCE._customCleanup(inst, "submit_content_dom", inst.contentWindow.document.body); + var htm = skip_cleanup ? inst.getBody().innerHTML : tinyMCE._cleanupHTML(inst, inst.getDoc(), this.settings, inst.getBody(), this.visualAid, true); + htm = tinyMCE._customCleanup(inst, "submit_content", htm); if (tinyMCE.settings["encoding"] == "xml" || tinyMCE.settings["encoding"] == "html") htm = tinyMCE.convertStringToXML(htm); @@ -359,19 +374,27 @@ TinyMCE.prototype.triggerSave = function(skip_cleanup, skip_callback) { } }; -TinyMCE.prototype._convertOnClick = function(node) { - // Skip on MSIE < 6+ - if (tinyMCE.isMSIE5) - return; +TinyMCE.prototype._setEventsEnabled = function(node, state) { + var events = new Array('onfocus','onblur','onclick','ondblclick', + 'onmousedown','onmouseup','onmouseover','onmousemove', + 'onmouseout','onkeypress','onkeydown','onkeydown','onkeyup'); - // Convert all onclick to mce_onclick var elms = node.getElementsByTagName("a"); for (var i=0; i<elms.length; i++) { - var onclick = elms[i].getAttribute('onclick'); - if (onclick && onclick != "") { - elms[i].removeAttribute("onclick"); - elms[i].setAttribute("mce_onclick", tinyMCE.cleanupEventStr("" + onclick)); - elms[i].onclick = null; + var event = ""; + + for (var x=0; x<events.length; x++) { + if ((event = tinyMCE.getAttrib(elms[i], events[x])) != '') { + event = tinyMCE.cleanupEventStr("" + event); + + if (state) + event = "return true;" + event; + else + event = event.replace(/^return true;/gi, ''); + + elms[i].removeAttribute(events[x]); + elms[i].setAttribute(events[x], event); + } } } }; @@ -421,7 +444,17 @@ TinyMCE.prototype.execCommand = function(command, user_interface, value) { switch (command) { case 'mceHelp': - window.open(tinyMCE.themeURL + "/docs/" + this.settings['docs_language'] + "/index.htm", "mceHelp", "menubar=yes,toolbar=yes,scrollbars=yes,left=20,top=20,width=550,height=600"); + var template = new Array(); + + template['file'] = 'about.htm'; + template['width'] = 480; + template['height'] = 380; + + tinyMCE.openWindow(template, { + tinymce_version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion, + tinymce_releasedate : tinyMCE.releaseDate, + inline : "yes" + }); return; case 'mceFocus': @@ -475,7 +508,6 @@ TinyMCE.prototype.eventPatch = function(editor_id) { var event = document.frames[i].event; event.target = event.srcElement; - event.target.editor_id = document.frames[i].editor_id; TinyMCE.prototype.handleEvent(event); return; @@ -492,7 +524,6 @@ TinyMCE.prototype.addEventHandlers = function(editor_id) { var doc = document.frames[editor_id].document; // Event patch - document.frames[editor_id].editor_id = editor_id; tinyMCE.addEvent(doc, "keypress", TinyMCE.prototype.eventPatch); tinyMCE.addEvent(doc, "keyup", TinyMCE.prototype.eventPatch); tinyMCE.addEvent(doc, "keydown", TinyMCE.prototype.eventPatch); @@ -504,8 +535,6 @@ TinyMCE.prototype.addEventHandlers = function(editor_id) { inst.switchSettings(); - doc.editor_id = editor_id; - tinyMCE.addEvent(doc, "keypress", tinyMCE.handleEvent); tinyMCE.addEvent(doc, "keypress", tinyMCE.handleEvent); tinyMCE.addEvent(doc, "keydown", tinyMCE.handleEvent); tinyMCE.addEvent(doc, "keyup", tinyMCE.handleEvent); @@ -513,6 +542,7 @@ TinyMCE.prototype.addEventHandlers = function(editor_id) { tinyMCE.addEvent(doc, "mouseup", tinyMCE.handleEvent); tinyMCE.addEvent(doc, "mousedown", tinyMCE.handleEvent); tinyMCE.addEvent(doc, "focus", tinyMCE.handleEvent); + tinyMCE.addEvent(doc, "blur", tinyMCE.handleEvent); eval('try { doc.designMode = "On"; } catch(e) {}'); } @@ -523,7 +553,7 @@ TinyMCE.prototype._createIFrame = function(replace_element) { var id = replace_element.getAttribute("id"); iframe.setAttribute("id", id); - iframe.setAttribute("className", "mceEditorArea"); + //iframe.setAttribute("className", "mceEditorArea"); iframe.setAttribute("border", "0"); iframe.setAttribute("frameBorder", "0"); iframe.setAttribute("marginWidth", "0"); @@ -577,6 +607,8 @@ TinyMCE.prototype.setupContent = function(editor_id) { return; } + // Import theme specific content CSS the user specific + tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css"); tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']); tinyMCE.executeCallback('init_instance_callback', '_initInstance', 0, inst); @@ -603,7 +635,7 @@ TinyMCE.prototype.setupContent = function(editor_id) { } // Call custom cleanup code - content = tinyMCE._customCleanup("insert_to_editor", content); + content = tinyMCE._customCleanup(inst, "insert_to_editor", content); if (tinyMCE.isMSIE) { // Ugly!!! @@ -616,7 +648,6 @@ TinyMCE.prototype.setupContent = function(editor_id) { tinyMCE.addEvent(body, "beforepaste", TinyMCE.prototype.eventPatch); tinyMCE.addEvent(body, "beforecut", TinyMCE.prototype.eventPatch); - tinyMCE.addEvent(body, "paste", TinyMCE.prototype.eventPatch); body.editorId = editor_id; } @@ -633,11 +664,12 @@ TinyMCE.prototype.setupContent = function(editor_id) { content = content.replace(new RegExp('<>', 'g'), ""); if (tinyMCE.settings['cleanup_on_startup']) - inst.getBody().innerHTML = tinyMCE._cleanupHTML(doc, this.settings, contentElement); + inst.getBody().innerHTML = tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement); else { // Convert all strong/em to b/i content = tinyMCE.regexpReplace(content, "<strong", "<b", "gi"); - content = tinyMCE.regexpReplace(content, "<em", "<i", "gi"); + content = tinyMCE.regexpReplace(content, "<em(/?)>", "<i$1>", "gi"); + content = tinyMCE.regexpReplace(content, "<em ", "<i ", "gi"); content = tinyMCE.regexpReplace(content, "</strong>", "</b>", "gi"); content = tinyMCE.regexpReplace(content, "</em>", "</i>", "gi"); inst.getBody().innerHTML = content; @@ -649,13 +681,11 @@ TinyMCE.prototype.setupContent = function(editor_id) { tinyMCE._setHTML(inst.getDoc(), content); // Produces permission denied error in MSIE 5.5 - eval('try {inst.getBody().innerHTML = tinyMCE._cleanupHTML(inst.contentDocument, this.settings, inst.getBody());} catch(e) {}'); + eval('try {inst.getBody().innerHTML = tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody());} catch(e) {}'); } else tinyMCE._setHTML(inst.getDoc(), content); } - tinyMCE._convertOnClick(inst.getBody()); - // Fix for bug #957681 //inst.getDoc().designMode = inst.getDoc().designMode; @@ -666,14 +696,16 @@ TinyMCE.prototype.setupContent = function(editor_id) { else inst.formElement = parentElm.nextSibling; - tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual']); + tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst); tinyMCE.executeCallback('setupcontent_callback', '_setupContent', 0, editor_id, inst.getBody(), inst.getDoc()); // Re-add design mode on mozilla if (!tinyMCE.isMSIE) TinyMCE.prototype.addEventHandlers(editor_id); - inst.startContent = inst.getBody().innerHTML; + // Add blur handler + if (tinyMCE.isMSIE) + tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE.prototype.eventPatch); // Trigger node change, this call locks buttons for tables and so forth tinyMCE.selectedInstance = inst; @@ -681,7 +713,12 @@ TinyMCE.prototype.setupContent = function(editor_id) { tinyMCE.triggerNodeChange(false, true); // Call custom DOM cleanup - tinyMCE._customCleanup("insert_to_editor_dom", inst.contentWindow.document.body); + tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody()); + tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody()); + tinyMCE._setEventsEnabled(inst.getBody(), true); + + inst.startContent = tinyMCE.trim(inst.getBody().innerHTML); + inst.undoLevels[inst.undoLevels.length] = inst.startContent; }; TinyMCE.prototype.cancelEvent = function(e) { @@ -702,17 +739,53 @@ TinyMCE.prototype.removeTinyMCEFormElements = function(form_obj) { } }; +TinyMCE.prototype.accessibleEventHandler = function(e) { + var win = this._win; + e = tinyMCE.isMSIE ? win.event : e; + var elm = tinyMCE.isMSIE ? e.srcElement : e.target; + + // Piggyback onchange + if (elm.nodeName == "SELECT" && !elm.oldonchange) { + elm.oldonchange = elm.onchange; + elm.onchange = null; + } + + // Execute onchange and remove piggyback + if (e.keyCode == 13) { + elm.onchange = elm.oldonchange; + elm.onchange(); + elm.oldonchange = null; + tinyMCE.cancelEvent(e); + } +}; + +TinyMCE.prototype.addSelectAccessibility = function(e, select, win) { + // Add event handlers + if (!select._isAccessible) { + select.onkeydown = tinyMCE.accessibleEventHandler; + select._isAccessible = true; + select._win = win; + } +}; + TinyMCE.prototype.handleEvent = function(e) { // Remove odd, error if (typeof(tinyMCE) == "undefined") return true; - //debug(e.type + " " + e.target.nodeName + " " + (e.relatedTarget ? e.relatedTarget.nodeName : "")); + //tinyMCE.debug(e.type + " " + e.target.nodeName + " " + (e.relatedTarget ? e.relatedTarget.nodeName : "")); switch (e.type) { + case "blur": + if (tinyMCE.selectedInstance) + tinyMCE.selectedInstance.execCommand('mceEndTyping'); + + return; + case "submit": tinyMCE.removeTinyMCEFormElements(tinyMCE.isMSIE ? window.event.srcElement : e.target); tinyMCE.triggerSave(); + tinyMCE.isNotDirty = true; return; case "reset": @@ -722,26 +795,8 @@ TinyMCE.prototype.handleEvent = function(e) { if (document.forms[i] == formObj) window.setTimeout('tinyMCE.resetForm(' + i + ');', 10); } - return; - - case "paste": - if (tinyMCE.settings['auto_cleanup_word']) { - var editorId = e.target.editorId; - - if (!editorId) - editorId = e.target.ownerDocument.editorId; - - if (editorId) - window.setTimeout("tinyMCE.execInstanceCommand('" + editorId + "', 'mceCleanupWord', false, null);", 1); - } - break; - - case "beforecut": - case "beforepaste": - if (tinyMCE.selectedInstance) - tinyMCE.selectedInstance.execCommand("mceAddUndoLevel"); - break; + return; case "keypress": if (e.target.editorId) { @@ -768,6 +823,7 @@ TinyMCE.prototype.handleEvent = function(e) { // Insert P element instead of BR if (tinyMCE.selectedInstance._insertPara(e)) { // Cancel event + tinyMCE.execCommand("mceAddUndoLevel"); e.preventDefault(); return false; } @@ -778,18 +834,14 @@ TinyMCE.prototype.handleEvent = function(e) { // Insert P element instead of BR if (tinyMCE.selectedInstance._handleBackSpace(e.type)) { // Cancel event + tinyMCE.execCommand("mceAddUndoLevel"); e.preventDefault(); return false; } } // Mozilla custom key handling - if (!tinyMCE.isMSIE && e.ctrlKey && tinyMCE.settings['custom_undo_redo']) { - if (e.charCode == 120 || e.charCode == 118) { // Ctrl+X, Ctrl+V - tinyMCE.selectedInstance.execCommand("mceAddUndoLevel"); - return; - } - + if (tinyMCE.isGecko && e.ctrlKey && tinyMCE.settings['custom_undo_redo']) { if (tinyMCE.settings['custom_undo_redo_keyboard_shortcuts']) { if (e.charCode == 122) { // Ctrl+Z tinyMCE.selectedInstance.execCommand("Undo"); @@ -833,28 +885,6 @@ TinyMCE.prototype.handleEvent = function(e) { } } - if (tinyMCE.settings['custom_undo_redo']) { - // Check if it's a position key press - var keys = new Array(13,45,36,35,33,34,37,38,39,40); - var posKey = false; - for (var i=0; i<keys.length; i++) { - if (keys[i] == e.keyCode) { - tinyMCE.selectedInstance.typing = false; - posKey = true; - break; - } - } - - // Add typing undo level - if (!tinyMCE.selectedInstance.typing && !posKey) { - tinyMCE.selectedInstance.execCommand("mceAddUndoLevel"); - tinyMCE.selectedInstance.typing = true; - } - } - - //window.status = e.keyCode; - //window.status = e.type + " " + e.target.nodeName; - // Return key pressed if (tinyMCE.isMSIE && tinyMCE.settings['force_br_newlines'] && e.keyCode == 13) { if (e.target.editorId) @@ -876,6 +906,7 @@ TinyMCE.prototype.handleEvent = function(e) { rng.collapse(false); rng.select(); + tinyMCE.execCommand("mceAddUndoLevel"); tinyMCE.triggerNodeChange(false); return false; } @@ -902,11 +933,14 @@ TinyMCE.prototype.handleEvent = function(e) { if (tinyMCE.selectedInstance) tinyMCE.selectedInstance.switchSettings(); + var inst = tinyMCE.selectedInstance; + // Handle backspace if (tinyMCE.isGecko && tinyMCE.settings['force_p_newlines'] && (e.keyCode == 8 || e.keyCode == 46) && !e.shiftKey) { // Insert P element instead of BR if (tinyMCE.selectedInstance._handleBackSpace(e.type)) { // Cancel event + tinyMCE.execCommand("mceAddUndoLevel"); e.preventDefault(); return false; } @@ -921,66 +955,51 @@ TinyMCE.prototype.handleEvent = function(e) { // Update visualaids on tabs if (tinyMCE.isGecko && e.type == "keyup" && e.keyCode == 9) - tinyMCE.handleVisualAid(tinyMCE.selectedInstance.getBody(), true, tinyMCE.settings['visual']); + tinyMCE.handleVisualAid(tinyMCE.selectedInstance.getBody(), true, tinyMCE.settings['visual'], tinyMCE.selectedInstance); // Run image/link fix on Gecko if diffrent document base on paste if (tinyMCE.isGecko && tinyMCE.settings['document_base_url'] != "" + document.location.href && e.type == "keyup" && e.ctrlKey && e.keyCode == 86) tinyMCE.selectedInstance.fixBrokenURLs(); - // Insert space instead of -/* if (e.type == "keydown" && e.keyCode == 32) { - if (tinyMCE.selectedInstance._insertSpace()) { - // Cancel event - e.returnValue = false; - e.cancelBubble = true; - return false; - } - }*/ - - // MSIE custom key handling - if (tinyMCE.isMSIE && tinyMCE.settings['custom_undo_redo']) { - // Check if it's a position key press - var keys = new Array(13,45,36,35,33,34,37,38,39,40); - var posKey = false; - for (var i=0; i<keys.length; i++) { - if (keys[i] == e.keyCode) { - tinyMCE.selectedInstance.typing = false; - posKey = true; - break; + // Fix empty elements on return/enter, check where enter occured + if (tinyMCE.isMSIE && e.type == "keydown" && e.keyCode == 13) + tinyMCE.enterKeyElement = tinyMCE.selectedInstance.getFocusElement(); + + // Fix empty elements on return/enter + if (tinyMCE.isMSIE && e.type == "keyup" && e.keyCode == 13) { + var elm = tinyMCE.enterKeyElement; + if (elm) { + var re = new RegExp('^HR|IMG|BR$','g'); // Skip these + var dre = new RegExp('^H[1-6]$','g'); // Add double on these + + if (!elm.hasChildNodes() && !re.test(elm.nodeName)) { + if (dre.test(elm.nodeName)) + elm.innerHTML = " "; + else + elm.innerHTML = " "; } } + } - // Add typing undo level (unless pos keys or shift, alt, ctrl, capslock) - if (!tinyMCE.selectedInstance.typing && !posKey && (e.keyCode < 16 || e.keyCode > 18 && e.keyCode != 255)) { - tinyMCE.selectedInstance.execCommand("mceAddUndoLevel"); - tinyMCE.selectedInstance.typing = true; - tinyMCE.triggerNodeChange(false); + // Check if it's a position key + var keys = tinyMCE.posKeyCodes; + var posKey = false; + for (var i=0; i<keys.length; i++) { + if (keys[i] == e.keyCode) { + posKey = true; + break; } + } - if (posKey && e.type == "keyup") - tinyMCE.triggerNodeChange(false); + //tinyMCE.debug(e.keyCode); + // MSIE custom key handling + if (tinyMCE.isMSIE && tinyMCE.settings['custom_undo_redo']) { var keys = new Array(8,46); // Backspace,Delete for (var i=0; i<keys.length; i++) { if (keys[i] == e.keyCode) { - if (!tinyMCE.selectedInstance.typing) { - tinyMCE.selectedInstance.execCommand("mceAddUndoLevel"); - tinyMCE.selectedInstance.typing = true; - } - if (e.type == "keyup") tinyMCE.triggerNodeChange(false); - - return true; - } - } - - var ctrlKeys = new Array(66,73,85,86,88); // B/I/U/V/X - for (var i=0; i<keys.length; i++) { - if (ctrlKeys[i] == e.keyCode && e.ctrlKey) { - tinyMCE.selectedInstance.execCommand("mceAddUndoLevel"); - tinyMCE.triggerNodeChange(false); - return true; } } @@ -988,17 +1007,14 @@ TinyMCE.prototype.handleEvent = function(e) { if (e.keyCode == 90 && e.ctrlKey && e.type == "keydown") { // Ctrl+Z tinyMCE.selectedInstance.execCommand("Undo"); tinyMCE.triggerNodeChange(false); - - // Cancel event - e.returnValue = false; - e.cancelBubble = true; - return false; } if (e.keyCode == 89 && e.ctrlKey && e.type == "keydown") { // Ctrl+Y tinyMCE.selectedInstance.execCommand("Redo"); tinyMCE.triggerNodeChange(false); + } + if ((e.keyCode == 90 || e.keyCode == 89) && e.ctrlKey) { // Cancel event e.returnValue = false; e.cancelBubble = true; @@ -1007,17 +1023,16 @@ TinyMCE.prototype.handleEvent = function(e) { } } - // Check if it's a position key press - var keys = new Array(13,45,36,35,33,34,37,38,39,40); - var posKey = false; - for (var i=0; i<keys.length; i++) { - if (keys[i] == e.keyCode) { - posKey = true; - break; - } - } + // Handle Undo/Redo when typing content + + // Start typing (non position key) + if (!posKey && e.type == "keyup") + tinyMCE.execCommand("mceStartTyping"); + + // End typing (position key) or some Ctrl event + if (e.type == "keyup" && (posKey || e.ctrlKey)) + tinyMCE.execCommand("mceEndTyping"); - // Trigger some nodechange on keyup if (posKey && e.type == "keyup") tinyMCE.triggerNodeChange(false); break; @@ -1042,9 +1057,6 @@ TinyMCE.prototype.handleEvent = function(e) { tinyMCE.selectedElement = e.target; tinyMCE.linkElement = tinyMCE.getParentElement(tinyMCE.selectedElement, "a"); tinyMCE.imgElement = tinyMCE.getParentElement(tinyMCE.selectedElement, "img"); - - // Reset typing - tinyMCE.selectedInstance.typing = false; break; } } @@ -1075,22 +1087,15 @@ TinyMCE.prototype.handleEvent = function(e) { tinyMCE.selectedNode = null; tinyMCE.triggerNodeChange(false); + tinyMCE.execCommand("mceEndTyping"); + + if (e.type == "mouseup") + tinyMCE.execCommand("mceAddUndoLevel"); // Just in case if (!tinyMCE.selectedInstance && e.target.editorId) tinyMCE.selectedInstance = tinyMCE.instances[e.target.editorId]; - // Was it alt click on link - if (e.target.nodeName.toLowerCase() == "a" && e.type == "click" && e.altKey) { - var evalCode = "" + tinyMCE.cleanupEventStr(e.target.getAttribute("mce_onclick")); - - // Remove any return too - eval(evalCode.replace('return false;', '')); - } - - //if (tinyMCE.selectedInstance) - // tinyMCE.selectedInstance.fixBrokenURLs(); - // Run image/link fix on Gecko if diffrent document base if (tinyMCE.isGecko && tinyMCE.settings['document_base_url'] != "" + document.location.href) window.setTimeout('tinyMCE.getInstanceById("' + inst.editorId + '").fixBrokenURLs();', 10); @@ -1165,12 +1170,15 @@ TinyMCE.prototype.submitPatch = function() { tinyMCE.removeTinyMCEFormElements(this); tinyMCE.triggerSave(); this.oldSubmit(); + tinyMCE.isNotDirty = true; }; TinyMCE.prototype.onLoad = function() { for (var c=0; c<tinyMCE.configs.length; c++) { tinyMCE.settings = tinyMCE.configs[c]; + var selector = tinyMCE.getParam("editor_selector"); + var deselector = tinyMCE.getParam("editor_deselector"); var elementRefAr = new Array(); // Add submit triggers @@ -1204,6 +1212,9 @@ TinyMCE.prototype.onLoad = function() { var element = tinyMCE._getElementById(elements[i]); var trigger = element ? element.getAttribute(tinyMCE.settings['textarea_trigger']) : ""; + if (tinyMCE.getAttrib(element, "class").indexOf(deselector) != -1) + continue; + if (trigger == "false") continue; @@ -1224,10 +1235,17 @@ TinyMCE.prototype.onLoad = function() { var nodeList = document.getElementsByTagName("textarea"); for (var i=0; i<nodeList.length; i++) { - var trigger = nodeList.item(i).getAttribute(tinyMCE.settings['textarea_trigger']); + var elm = nodeList.item(i); + var trigger = elm.getAttribute(tinyMCE.settings['textarea_trigger']); + + if (selector != '' && tinyMCE.getAttrib(elm, "class").indexOf(selector) == -1) + continue; + + if (tinyMCE.getAttrib(elm, "class").indexOf(deselector) != -1) + continue; if ((mode == "specific_textareas" && trigger == "true") || (mode == "textareas" && trigger != "false")) - elementRefAr[elementRefAr.length] = nodeList.item(i); + elementRefAr[elementRefAr.length] = elm; } break; } @@ -1305,6 +1323,8 @@ TinyMCE.prototype.removeMCEControl = function(editor_id) { }; TinyMCE.prototype._cleanupElementName = function(element_name, element) { + var name = ""; + element_name = element_name.toLowerCase(); // Never include body @@ -1326,7 +1346,7 @@ TinyMCE.prototype._cleanupElementName = function(element_name, element) { for (var x=0, n=tinyMCE.cleanup_validElements[i][0].length; x<n; x++) { var elmMatch = tinyMCE.cleanup_validElements[i][0][x]; - if (elmMatch.charAt(0) == '+') + if (elmMatch.charAt(0) == '+' || elmMatch.charAt(0) == '-') elmMatch = elmMatch.substring(1); // Handle wildcard/regexp @@ -1356,26 +1376,18 @@ TinyMCE.prototype._cleanupElementName = function(element_name, element) { return null; } + if (element_name.charAt(0) == '+' || element_name.charAt(0) == '-') + name = element_name.substring(1); + // Special Mozilla stuff if (!tinyMCE.isMSIE) { // Fix for bug #958498 - if (element_name == "strong" && !tinyMCE.cleanup_on_save) + if (name == "strong" && !tinyMCE.cleanup_on_save) element_name = "b"; - else if (element_name == "em" && !tinyMCE.cleanup_on_save) + else if (name == "em" && !tinyMCE.cleanup_on_save) element_name = "i"; } - // Special MSIE stuff - if (tinyMCE.isMSIE) { - if (element_name == "table") { - var attribValue = element.style.pixelWidth == 0 ? element.getAttribute("width") : element.style.pixelWidth; - element.setAttribute("width", attribValue); - - attribValue = element.style.pixelHeight == 0 ? element.getAttribute("height") : element.style.pixelHeight; - element.setAttribute("height", attribValue); - } - } - var elmData = new Object(); elmData.element_name = element_name; @@ -1385,71 +1397,105 @@ TinyMCE.prototype._cleanupElementName = function(element_name, element) { }; /** - * Converts some element attributes to inline styles. + * This function moves CSS styles to/from attributes. */ -TinyMCE.prototype._fixInlineStyles = function(elm) { - var eName = elm.nodeName; +TinyMCE.prototype._moveStyle = function(elm, style, attrib) { + if (tinyMCE.cleanup_inline_styles) { + var val = tinyMCE.getAttrib(elm, attrib); - if (elm.nodeName == "FONT") { - // Move out color - if ((c = tinyMCE.getAttrib(elm, "color")) != "") { - elm.style.color = c; - } - } + if (val != '') { + val = '' + val; - // Handle table, td and img elements - if (eName == "TABLE" || eName == "TD" || eName == "IMG") { - var value; + switch (attrib) { + case "background": + val = "url('" + val + "');"; + break; + + case "bordercolor": + if (elm.style.borderStyle == '' || elm.style.borderStyle == 'none') + elm.style.borderStyle = 'solid'; + break; - // Setup width - value = tinyMCE.isMSIE ? elm.width : elm.getAttribute("width"); - if (value && value != "") { - if (typeof(value) != "string" || !value.indexOf("%")) - value += "px"; + case "border": + case "width": + case "height": + if (attrib == "border" && elm.style.borderWidth > 0) + return; - elm.style.width = value; - } + if (val.indexOf('%') == -1) + val += 'px'; + break; - // Setup height - value = tinyMCE.isMSIE ? elm.height : elm.getAttribute("height"); - if (value && value != "") { - if (typeof(value) != "string" || !value.indexOf("%")) - value += "px"; + case "vspace": + case "hspace": + elm.style.marginTop = val + "px"; + elm.style.marginBottom = val + "px"; + elm.removeAttribute(attrib); + return; - elm.style.height = value; - } + case "align": + if (elm.nodeName == "IMG") { + if (tinyMCE.isMSIE) + elm.style.styleFloat = val; + else + elm.style.cssFloat = val; + } else + elm.style.textAlign = val; - // Setup border - value = tinyMCE.isMSIE ? elm.border : elm.getAttribute("border"); - if (value && value != "" && (value != "0" && eName != "TABLE")) { - elm.style.borderWidth = value + "px"; + elm.removeAttribute(attrib); + return; + } + + if (val != '') { + eval('elm.style.' + style + ' = val;'); + elm.removeAttribute(attrib); + } } - } + } else { + if (style == '') + return; - // Setup align - value = elm.getAttribute("align"); - if (value && value != "") { - if (elm.nodeName.toLowerCase() == "img") { - if (tinyMCE.isMSIE) - elm.style.styleFloat = value; - else - elm.style.cssFloat = value; - } else - elm.style.textAlign = value; - } + var val = eval('elm.style.' + style) == '' ? tinyMCE.getAttrib(elm, attrib) : eval('elm.style.' + style); + val = val == null ? '' : '' + val; - // Setup vspace - value = elm.getAttribute("vspace"); - if (value && value != "") { - elm.style.marginTop = value + "px"; - elm.style.marginBottom = value + "px"; - } + switch (attrib) { + // Always move background to style + case "background": + if (val.indexOf('url') == -1 && val != '') + val = "url('" + val + "');"; + + if (val != '') { + elm.style.backgroundImage = val; + elm.removeAttribute(attrib); + } + return; + + case "border": + case "width": + case "height": + val = val.replace('px', ''); + break; + + case "align": + if (tinyMCE.getAttrib(elm, 'align') == '') { + if (elm.nodeName == "IMG") { + if (tinyMCE.isMSIE && elm.style.styleFloat != '') { + val = elm.style.styleFloat; + style = 'styleFloat'; + } else if (tinyMCE.isGecko && elm.style.cssFloat != '') { + val = elm.style.cssFloat; + style = 'cssFloat'; + } + } + } + break; + } - // Setup hspace - value = elm.getAttribute("hspace"); - if (value && value != "") { - elm.style.marginLeft = value + "px"; - elm.style.marginRight = value + "px"; + if (val != '') { + elm.removeAttribute(attrib); + elm.setAttribute(attrib, val); + eval('elm.style.' + style + ' = "";'); + } } }; @@ -1459,12 +1505,6 @@ TinyMCE.prototype._cleanupAttribute = function(valid_attributes, element_name, a var attribMustBeValue = null; var verified = false; - // Inline styling, skip them - if (tinyMCE.cleanup_inline_styles && (element_name == "table" || element_name == "td" || element_name == "img")) { - if (attribName == "width" || attribName == "height" || attribName == "border" || attribName == "align" || attribName == "valign" || attribName == "hspace" || attribName == "vspace") - return null; - } - // Mozilla attibute, remove them if (attribName.indexOf('moz_') != -1) return null; @@ -1508,10 +1548,6 @@ TinyMCE.prototype._cleanupAttribute = function(valid_attributes, element_name, a } } - // Allways pass styles on table and td elements if visual_aid - if ((element_name == "table" || element_name == "td") && attribName == "style") - verified = true; - if (!verified) return false; } else @@ -1524,30 +1560,19 @@ TinyMCE.prototype._cleanupAttribute = function(valid_attributes, element_name, a attribValue = element_node.size; break; - case "color": - if (tinyMCE.isMSIE5 && element_name == "font") - attribValue = element_node.color; - break; - case "width": - // MSIE 5.5 issue - if (tinyMCE.isMSIE) - attribValue = element_node.width; - break; - case "height": - // MSIE 5.5 issue - if (tinyMCE.isMSIE) - attribValue = element_node.height; + case "border": + // Old MSIE needs this + if (tinyMCE.isMSIE5) + attribValue = eval("element_node." + attribName); break; - case "border": - // MSIE 5.5 issue - if (tinyMCE.isMSIE) - attribValue = element_node.border; + case "color": + if (tinyMCE.isMSIE5 && element_name == "font") + attribValue = element_node.color; break; -// case "className": case "class": if (element_name == "table" || element_name == "td") { // Handle visual aid @@ -1558,50 +1583,30 @@ TinyMCE.prototype._cleanupAttribute = function(valid_attributes, element_name, a if (!tinyMCE._verifyClass(element_node) || attribValue == "") return null; -// if (tinyMCE.isMSIE) -// attribValue = node.getAttribute('className'); - break; - case "style": - attribValue = element_node.style.cssText.toLowerCase(); - - // Compress borders some - if (tinyMCE.isMSIE) { - var border = element_node.style.border; - var bt = element_node.style.borderTop; - var bl = element_node.style.borderLeft; - var br = element_node.style.borderRight; - var bb = element_node.style.borderBottom; - - // All the same - if (border != "" && (bt == border && bl == border && br == border && bb == border)) { - attribValue = tinyMCE.regexpReplace(attribValue, 'border-top: ' + border + '?; ?', ''); - attribValue = tinyMCE.regexpReplace(attribValue, 'border-left: ' + border + '?; ?', ''); - attribValue = tinyMCE.regexpReplace(attribValue, 'border-right: ' + border + '?; ?', ''); - attribValue = tinyMCE.regexpReplace(attribValue, 'border-bottom: ' + border + '?;( ?)', 'border: ' + border + ';$1'); - } - } - break; - - // Handle onclick + case "onfocus": + case "onblur": case "onclick": - case "mce_onclick": - // Skip on MSIE < 6+ - if (tinyMCE.isMSIE5) - break; + case "ondblclick": + case "onmousedown": + case "onmouseup": + case "onmouseover": + case "onmousemove": + case "onmouseout": + case "onkeypress": + case "onkeydown": + case "onkeydown": + case "onkeyup": + attribValue = tinyMCE.cleanupEventStr("" + attribValue); + + if (attribValue.indexOf('return false;') == 0) + attribValue = attribValue.substring(14); - // Fix onclick attrib - if (tinyMCE.cleanup_on_save) { - if (element_node.getAttribute("mce_onclick")) { - attribName = "onclick"; - attribValue = "" + element_node.getAttribute("mce_onclick"); - } - } else { - if (attribName == "onclick" && !tinyMCE.cleanup_on_save) - return null; - } + break; + case "style": + attribValue = tinyMCE.serializeStyle(tinyMCE.parseStyle(element_node.style.cssText)); break; // Convert the URLs of these @@ -1632,7 +1637,6 @@ TinyMCE.prototype._cleanupAttribute = function(valid_attributes, element_name, a // Skip these case "_moz-userdefined": case "editorid": - case "editor_id": case "mce_real_href": case "mce_real_src": return null; @@ -1660,6 +1664,78 @@ TinyMCE.prototype._cleanupAttribute = function(valid_attributes, element_name, a return attrib; }; +TinyMCE.prototype.parseStyle = function(str) { + var ar = new Array(); + var st = str.split(';'); + + for (var i=0; i<st.length; i++) { + if (st[i] == '') + continue; + + var re = new RegExp('^\\s*([^:]*):\\s*(.*)\\s*$'); + var pa = st[i].replace(re, '$1||$2').split('||'); +//tinyMCE.debug(str, pa[0] + "=" + pa[1], st[i].replace(re, '$1||$2')); + if (pa.length == 2) + ar[pa[0].toLowerCase()] = pa[1]; + } + + return ar; +}; + +TinyMCE.prototype.compressStyle = function(ar, pr, sf, res) { + var box = new Array(); + + box[0] = ar[pr + '-top' + sf]; + box[1] = ar[pr + '-left' + sf]; + box[2] = ar[pr + '-right' + sf]; + box[3] = ar[pr + '-bottom' + sf]; + + for (var i=0; i<box.length; i++) { + if (box[i] == null) + return; + + for (var a=0; a<box.length; a++) { + if (box[a] != box[i]) + return; + } + } + + // They are all the same + ar[res] = box[0]; + ar[pr + '-top' + sf] = null; + ar[pr + '-left' + sf] = null; + ar[pr + '-right' + sf] = null; + ar[pr + '-bottom' + sf] = null; +}; + +TinyMCE.prototype.serializeStyle = function(ar) { + var str = ""; + + // Compress box + tinyMCE.compressStyle(ar, "border", "", "border"); + tinyMCE.compressStyle(ar, "border", "-width", "border-width"); + tinyMCE.compressStyle(ar, "border", "-color", "border-color"); + + for (var key in ar) { + var val = ar[key]; + + if (val != null && val != '') { + val = '' + val; // Force string + + // Fix style URL + val = val.replace(new RegExp("url\\(\\'?([^\\']*)\\'?\\)", 'gi'), "url('$1')"); + + if (val != "url('')") + str += key.toLowerCase() + ": " + val + "; "; + } + } + + if (new RegExp('; $').test(str)) + str = str.substring(0, str.length - 2); + + return str; +}; + TinyMCE.prototype._verifyClass = function(node) { // Sometimes the class gets set to null, weird Gecko bug? if (tinyMCE.isGecko) { @@ -1701,13 +1777,18 @@ TinyMCE.prototype.cleanupNode = function(node) { var elementName = elementData ? elementData.element_name : null; var elementValidAttribs = elementData ? elementData.valid_attribs : null; var elementAttribs = ""; - var openTag = false; + var openTag = false, nonEmptyTag = false; if (elementName != null && elementName.charAt(0) == '+') { elementName = elementName.substring(1); openTag = true; } + if (elementName != null && elementName.charAt(0) == '-') { + elementName = elementName.substring(1); + nonEmptyTag = true; + } + // Checking DOM tree for MSIE weirdness!! if (tinyMCE.isMSIE && tinyMCE.settings['fix_content_duplication']) { var lookup = tinyMCE.cleanup_elementLookupTable; @@ -1732,15 +1813,34 @@ TinyMCE.prototype.cleanupNode = function(node) { return output; } - // Has mso/microsuck crap or empty attrib - if (node.style && (node.style.cssText.indexOf('mso-') != -1 && tinyMCE.settings['auto_cleanup_word']) || node.style.cssText == "") { - node.style.cssText = ""; - node.removeAttribute("style"); + if (tinyMCE.cleanup_on_save) { + if (node.nodeName == "A" && node.className == "mceItemAnchor") + return '<a name="' + this.convertStringToXML(node.getAttribute("name")) + '"></a>'; } - // Handle inline styles - if (tinyMCE.cleanup_inline_styles) - tinyMCE._fixInlineStyles(node); + // Handle inline/outline styles + if (tinyMCE.cleanup_inline_styles) { + var re = new RegExp("^(TABLE|TD|TR|IMG|HR)$"); + if (re.test(node.nodeName)) { + tinyMCE._moveStyle(node, 'width', 'width'); + tinyMCE._moveStyle(node, 'height', 'height'); + tinyMCE._moveStyle(node, 'borderWidth', 'border'); + tinyMCE._moveStyle(node, '', 'vspace'); + tinyMCE._moveStyle(node, '', 'hspace'); + tinyMCE._moveStyle(node, 'textAlign', 'align'); + tinyMCE._moveStyle(node, 'backgroundColor', 'bgColor'); + tinyMCE._moveStyle(node, 'borderColor', 'borderColor'); + tinyMCE._moveStyle(node, 'backgroundImage', 'background'); + + // Refresh element in old MSIE + if (tinyMCE.isMSIE5) + node.outerHTML = node.outerHTML; + } else if (tinyMCE.isBlockElement(node)) + tinyMCE._moveStyle(node, 'textAlign', 'align'); + + if (node.nodeName == "FONT") + tinyMCE._moveStyle(node, 'color', 'color'); + } // Set attrib data if (elementValidAttribs) { @@ -1773,79 +1873,25 @@ TinyMCE.prototype.cleanupNode = function(node) { } } - // Remove non needed span elements - if (elementName == "span" && tinyMCE.cleanup_trim_span_elements) { - var re = new RegExp('^[ \t]+', 'g'); - var onlyWhiteSpace = true; - for (var a=0; a<node.childNodes.length; a++) { - var tmpNode = node.childNodes[a]; - if ((tmpNode.nodeType == 3 && !tmpNode.nodeValue.match(re)) || tmpNode.nodeName.toLowerCase() != "span") { - onlyWhiteSpace = false; - break; - } - } - - // Count attributes - tinyMCE._verifyClass(node); - var numAttribs = 0; - for (var i=0; i<node.attributes.length; i++) { - if (node.attributes[i].specified) - numAttribs++; - } - - // Is not a valid span, remove it - if (onlyWhiteSpace || numAttribs == 0) { - if (node.hasChildNodes()) { - for (var i=0; i<node.childNodes.length; i++) - output += this.cleanupNode(node.childNodes[i]); - } - - return output; - } - } - - // Add some visual aids -/* if (elementName == "table" || elementName == "td") { - // Handle visual aid - if (tinyMCE.cleanup_visual_table_class != "") { - // Find parent table - var tableElement = node; - if (elementName == "td") - tableElement = tinyMCE.getParentElement(tableElement, "table"); - - if (tableElement && tableElement.getAttribute("border") == 0) { - if (tinyMCE.cleanup_visual_aid) - elementAttribs += ' class="' + tinyMCE.getVisualAidClass(tinyMCE.getAttrib(node, "class")) + '"'; - } - } - }*/ - // Remove empty tables if (elementName == "table" && !node.hasChildNodes()) return ""; - // Fix width/height attributes if the styles is specified - if (tinyMCE.isGecko && elementName == "img") { - var w = node.style.width; - if (w != null && w != "") - node.setAttribute("width", w); - - var h = node.style.height; - if (h != null && h != "") - node.setAttribute("height", h); - } - // Handle element attributes if (node.attributes.length > 0) { for (var i=0; i<node.attributes.length; i++) { if (node.attributes[i].specified) { + // tinyMCE.debug(node.attributes[i].nodeName + "=" + node.attributes[i].nodeValue); var attrib = tinyMCE._cleanupAttribute(elementValidAttribs, elementName, node.attributes[i], node); - if (attrib) - elementAttribs += " " + attrib.name + "=" + '"' + attrib.value + '"'; + if (attrib && attrib.value != "") + elementAttribs += " " + attrib.name + "=" + '"' + this.convertStringToXML("" + attrib.value) + '"'; } } + } - //alert(elementAttribs); + // MSIE table summary fix + if (tinyMCE.isMSIE && elementName == "table" && node.getAttribute("summary") != null && elementAttribs.indexOf('summary') == -1) { + elementAttribs += " summary=" + '"' + this.convertStringToXML("" + node.getAttribute("summary")) + '"'; } // MSIE form element issue @@ -1886,12 +1932,11 @@ TinyMCE.prototype.cleanupNode = function(node) { else output += "</" + elementName + ">"; } else { - // Allways leave anchor elements open - if (openTag) - output += "<" + elementName + elementAttribs + "></" + elementName + ">"; - else { - // No children - output += "<" + elementName + elementAttribs + " />"; + if (!nonEmptyTag) { + if (openTag) + output += "<" + elementName + elementAttribs + "></" + elementName + ">"; + else + output += "<" + elementName + elementAttribs + " />"; } } @@ -1950,6 +1995,9 @@ TinyMCE.prototype._getCleanupElementName = function(chunk) { if (chunk.charAt(0) == '+') chunk = chunk.substring(1); + if (chunk.charAt(0) == '-') + chunk = chunk.substring(1); + if ((pos = chunk.indexOf('/')) != -1) chunk = chunk.substring(0, pos); @@ -2044,12 +2092,12 @@ TinyMCE.prototype._initCleanup = function() { tinyMCE.settings['cleanup_entities']['c' + entities[i]] = entities[i+1]; }; -TinyMCE.prototype._cleanupHTML = function(doc, config, element, visual, on_save) { +TinyMCE.prototype._cleanupHTML = function(inst, doc, config, element, visual, on_save) { if (!tinyMCE.settings['cleanup']) return element.innerHTML; // Call custom cleanup code - tinyMCE._customCleanup(on_save ? "get_from_editor_dom" : "insert_to_editor_dom", doc.body); + tinyMCE._customCleanup(inst, on_save ? "get_from_editor_dom" : "insert_to_editor_dom", doc.body); // Set these for performance tinyMCE.cleanup_validElements = tinyMCE.settings['cleanup_validElements']; @@ -2061,7 +2109,6 @@ TinyMCE.prototype._cleanupHTML = function(doc, config, element, visual, on_save) tinyMCE.cleanup_verify_css_classes = tinyMCE.settings['verify_css_classes']; tinyMCE.cleanup_visual_table_class = tinyMCE.settings['visual_table_class']; tinyMCE.cleanup_apply_source_formatting = tinyMCE.settings['apply_source_formatting']; - tinyMCE.cleanup_trim_span_elements = tinyMCE.settings['trim_span_elements']; tinyMCE.cleanup_inline_styles = tinyMCE.settings['inline_styles']; tinyMCE.cleanup_visual_aid = visual; tinyMCE.cleanup_on_save = on_save; @@ -2070,22 +2117,31 @@ TinyMCE.prototype._cleanupHTML = function(doc, config, element, visual, on_save) var startTime = new Date().getTime(); - tinyMCE._convertOnClick(element); - // Cleanup madness that breaks the editor in MSIE if (tinyMCE.isMSIE) { - element.innerHTML = tinyMCE.regexpReplace(element.innerHTML, '<p>[ \n\r]*<hr id=null>[ \n\r]*</p>', '<hr />', 'gi'); + // Remove null ids from HR elements, results in runtime error + var nodes = element.getElementsByTagName("hr"); + for (var i=0; i<nodes.length; i++) { + if (nodes[i].id == "null") + nodes[i].removeAttribute("id"); + } + + element.innerHTML = tinyMCE.regexpReplace(element.innerHTML, '<p>[ \n\r]*<hr.*>[ \n\r]*</p>', '<hr />', 'gi'); element.innerHTML = tinyMCE.regexpReplace(element.innerHTML, '<!([^-(DOCTYPE)]* )|<!/[^-]*>', '', 'gi'); } var html = this.cleanupNode(element); if (tinyMCE.settings['debug']) - alert("Cleanup process executed in: " + (new Date().getTime()-startTime) + " ms."); + tinyMCE.debug("Cleanup process executed in: " + (new Date().getTime()-startTime) + " ms."); // Remove pesky HR paragraphs html = tinyMCE.regexpReplace(html, '<p><hr /></p>', '<hr />'); html = tinyMCE.regexpReplace(html, '<p> </p><hr /><p> </p>', '<hr />'); + html = tinyMCE.regexpReplace(html, '<td>\\s*<br />\\s*</td>', '<td> </td>'); + + // Remove empty achors + html = html.replace(new RegExp('<a>(.*?)</a>', 'gi'), '$1'); // Remove some mozilla crap if (!tinyMCE.isMSIE) @@ -2112,7 +2168,7 @@ TinyMCE.prototype._cleanupHTML = function(doc, config, element, visual, on_save) html = html.replace(new RegExp('\r|\n', 'g'), ' '); // Call custom cleanup code - html = tinyMCE._customCleanup(on_save ? "get_from_editor" : "insert_to_editor", html); + html = tinyMCE._customCleanup(inst, on_save ? "get_from_editor" : "insert_to_editor", html); // Emtpy node, return empty var chk = tinyMCE.regexpReplace(html, "[ \t\r\n]", "").toLowerCase(); @@ -2125,25 +2181,8 @@ TinyMCE.prototype._cleanupHTML = function(doc, config, element, visual, on_save) return html; }; -TinyMCE.prototype.setAttrib = function(element, name, value, no_fix_value) { - if (!no_fix_value && value != null) { - var re = new RegExp('[^0-9%]', 'g'); - value = value.replace(re, ''); - } - - if (value != null && value != "") - element.setAttribute(name, value); - else - element.removeAttribute(name); - - if (value != null && value != "") - element.setAttribute(name, value); - else - element.removeAttribute(name); -}; - TinyMCE.prototype.insertLink = function(href, target, title, onclick, style_class) { - this.execCommand("mceAddUndoLevel"); + tinyMCE.execCommand('mceBeginUndoLevel'); if (this.selectedInstance && this.selectedElement && this.selectedElement.nodeName.toLowerCase() == "img") { var doc = this.selectedInstance.getDoc(); @@ -2159,7 +2198,7 @@ TinyMCE.prototype.insertLink = function(href, target, title, onclick, style_clas tinyMCE.setAttrib(linkElement, 'href', href); tinyMCE.setAttrib(linkElement, 'target', target); tinyMCE.setAttrib(linkElement, 'title', title); - tinyMCE.setAttrib(linkElement, 'mce_onclick', onclick); + tinyMCE.setAttrib(linkElement, 'onclick', onclick); tinyMCE.setAttrib(linkElement, 'class', style_class); if (newLink) { @@ -2186,7 +2225,7 @@ TinyMCE.prototype.insertLink = function(href, target, title, onclick, style_clas tinyMCE.setAttrib(elementArray[i], 'mce_real_href', href); tinyMCE.setAttrib(elementArray[i], 'target', target); tinyMCE.setAttrib(elementArray[i], 'title', title); - tinyMCE.setAttrib(elementArray[i], 'mce_onclick', onclick); + tinyMCE.setAttrib(elementArray[i], 'onclick', onclick); tinyMCE.setAttrib(elementArray[i], 'class', style_class); } @@ -2199,17 +2238,19 @@ TinyMCE.prototype.insertLink = function(href, target, title, onclick, style_clas tinyMCE.setAttrib(this.linkElement, 'mce_real_href', href); tinyMCE.setAttrib(this.linkElement, 'target', target); tinyMCE.setAttrib(this.linkElement, 'title', title); - tinyMCE.setAttrib(this.linkElement, 'mce_onclick', onclick); + tinyMCE.setAttrib(this.linkElement, 'onclick', onclick); tinyMCE.setAttrib(this.linkElement, 'class', style_class); } + + tinyMCE.execCommand('mceEndUndoLevel'); }; TinyMCE.prototype.insertImage = function(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout) { + tinyMCE.execCommand('mceBeginUndoLevel'); + if (src == "") return; - this.execCommand("mceAddUndoLevel"); - if (!this.imgElement && tinyMCE.isSafari) { var html = ""; @@ -2271,6 +2312,8 @@ TinyMCE.prototype.insertImage = function(src, alt, border, hspace, vspace, width if (needsRepaint) tinyMCE.selectedInstance.repaint(); } + + tinyMCE.execCommand('mceEndUndoLevel'); }; TinyMCE.prototype.getElementByAttributeValue = function(node, element_name, attrib, value) { @@ -2317,7 +2360,7 @@ TinyMCE.prototype.getParentBlockElement = function(node) { }; TinyMCE.prototype.getNodeTree = function(node, node_array, type, node_name) { - if (typeof(type) == "undefined" || node.nodeType == type && (typeof(node_name) == "undefined" || node.nodeName.toLowerCase() == node_name.toLowerCase())) + if (typeof(type) == "undefined" || node.nodeType == type && (typeof(node_name) == "undefined" || node.nodeName == node_name)) node_array[node_array.length] = node; if (node.hasChildNodes()) { @@ -2660,6 +2703,14 @@ TinyMCE.prototype.getLang = function(name, default_value, parse_entities) { return value; }; +TinyMCE.prototype.addToLang = function(prefix, ar) { + for (var key in ar) + tinyMCELang[(key.indexOf('lang_') == -1 ? 'lang_' : '') + (prefix != '' ? (prefix + "_") : '') + key] = ar[key]; + +// for (var key in ar) +// tinyMCELang[(key.indexOf('lang_') == -1 ? 'lang_' : '') + (prefix != '' ? (prefix + "_") : '') + key] = "|" + ar[key] + "|"; +}; + TinyMCE.prototype.replaceVar = function(replace_haystack, replace_var, replace_str) { var re = new RegExp('{\\\$' + replace_var + '}', 'g'); return replace_haystack.replace(re, replace_str); @@ -2708,17 +2759,17 @@ TinyMCE.prototype.triggerNodeChange = function(focus, setup_content) { this.selectedInstance.contentWindow.focus(); }; -TinyMCE.prototype._customCleanup = function(type, content) { +TinyMCE.prototype._customCleanup = function(inst, type, content) { // Call custom cleanup var customCleanup = tinyMCE.settings['cleanup_callback']; if (customCleanup != "" && eval("typeof(" + customCleanup + ")") != "undefined") - content = eval(customCleanup + "(type, content);"); + content = eval(customCleanup + "(type, content, inst);"); // Trigger plugin cleanups var plugins = tinyMCE.getParam('plugins', '', true, ','); for (var i=0; i<plugins.length; i++) { if (eval("typeof(TinyMCE_" + plugins[i] + "_cleanup)") != "undefined") - content = eval("TinyMCE_" + plugins[i] + "_cleanup(type, content);"); + content = eval("TinyMCE_" + plugins[i] + "_cleanup(type, content, inst);"); } return content; @@ -2729,14 +2780,16 @@ TinyMCE.prototype.getContent = function(editor_id) { tinyMCE.selectedInstance = tinyMCE.getInstanceById(editor_id); if (tinyMCE.selectedInstance) - return tinyMCE._cleanupHTML(this.selectedInstance.getDoc(), tinyMCE.settings, this.selectedInstance.getBody(), false, true); + return tinyMCE._cleanupHTML(this.selectedInstance, this.selectedInstance.getDoc(), tinyMCE.settings, this.selectedInstance.getBody(), false, true); return null; }; TinyMCE.prototype.setContent = function(html_content) { - if (tinyMCE.selectedInstance) + if (tinyMCE.selectedInstance) { tinyMCE.selectedInstance.execCommand('mceSetContent', false, html_content); + tinyMCE.selectedInstance.repaint(); + } }; TinyMCE.prototype.importThemeLanguagePack = function(name) { @@ -2777,18 +2830,22 @@ TinyMCE.prototype.openWindow = function(template, args) { var html, width, height, x, y, resizable, scrollbars, url; args['mce_template_file'] = template['file']; + args['mce_width'] = template['width']; + args['mce_height'] = template['height']; tinyMCE.windowArgs = args; html = template['html']; - if (!(width = template['width'])) + if (!(width = parseInt(template['width']))) width = 320; - if (!(height = template['height'])) + if (!(height = parseInt(template['height']))) height = 200; // Add to height in M$ due to SP2 WHY DON'T YOU GUYS IMPLEMENT innerWidth of windows!! if (tinyMCE.isMSIE) - height += 30; + height += 40; + else + height += 20; x = parseInt(screen.width / 2.0) - (width / 2.0); y = parseInt(screen.height / 2.0) - (height / 2.0); @@ -2809,7 +2866,7 @@ TinyMCE.prototype.openWindow = function(template, args) { html = tinyMCE.replaceVar(html, "css", this.settings['popups_css']); html = tinyMCE.applyTemplate(html, args); - var win = window.open("", "mcePopup", "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=yes,minimizable=" + resizable + ",modal=yes,width=" + width + ",height=" + height + ",resizable=" + resizable); + var win = window.open("", "mcePopup" + new Date().getTime(), "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=yes,minimizable=" + resizable + ",modal=yes,width=" + width + ",height=" + height + ",resizable=" + resizable); if (win == null) { alert(tinyMCELang['lang_popup_blocked']); return; @@ -2828,52 +2885,32 @@ TinyMCE.prototype.openWindow = function(template, args) { window.showModalDialog(url, window, features); } else { - if (tinyMCE.settings["dialog_type"] == "window" || tinyMCE.settings["dialog_type"] == "modal") { - var modal = (resizable == "yes") ? "no" : "yes"; + var modal = (resizable == "yes") ? "no" : "yes"; - if (tinyMCE.isGecko && tinyMCE.isMac) - modal = "no"; + if (tinyMCE.isGecko && tinyMCE.isMac) + modal = "no"; - var win = window.open(url, "mcePopup", "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=" + modal + ",minimizable=" + resizable + ",modal=" + modal + ",width=" + width + ",height=" + height + ",resizable=" + resizable); - if (win == null) { - alert(tinyMCELang['lang_popup_blocked']); - return; - } - - eval('try { win.resizeTo(width, height); } catch(e) { }'); - win.focus(); - } else { - var div = document.createElement("div"); - var id = "mceDialog" + (tinyMCE.dialogCounter++); - - height += 30; - - div.id = id; - div.className = "mceDialog"; - div.style.width = width + "px"; - div.style.height = height + "px"; - - var html = '<div class="mceDialogHeader"><div class="mceDialogTitle"></div><div class="mceDialogClose"><a href="javascript:tinyMCE.closeDialog();"></a></div></div>'; - html += '<div id="' + id + 'IFrameWrapper" class="mceDialogIFrameWrapper"><iframe border="0" marginwidth="0" marginheight="0" frameborder="0" hspace="0" vspace="0" src="' + url + '" width="' + width + '" height="' + height + '"></iframe></div>'; - - div.innerHTML = html; + var win = window.open(url, "mcePopup" + new Date().getTime(), "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=" + modal + ",minimizable=" + resizable + ",modal=" + modal + ",width=" + width + ",height=" + height + ",resizable=" + resizable); + if (win == null) { + alert(tinyMCELang['lang_popup_blocked']); + return; + } - document.body.appendChild(div); + eval('try { win.resizeTo(width, height); } catch(e) { }'); - tinyMCE._currentDialog = id; + // Make it bigger if statusbar is forced + if (tinyMCE.isGecko) { + if (win.document.defaultView.statusbar.visible) + win.resizeBy(0, tinyMCE.isMac ? 10 : 24); } + + win.focus(); } } }; -TinyMCE.prototype.closeDialog = function() { - // Remove div or close window - if (tinyMCE.settings["dialog_type"] == "div") { - var div = document.getElementById(tinyMCE._currentDialog); - if (div) - div.parentNode.removeChild(div); - } else - window.close(); +TinyMCE.prototype.closeWindow = function(win) { + win.close(); }; TinyMCE.prototype.getVisualAidClass = function(class_name, state) { @@ -2908,14 +2945,14 @@ TinyMCE.prototype.getVisualAidClass = function(class_name, state) { return className; }; -TinyMCE.prototype.handleVisualAid = function(element, deep, state) { +TinyMCE.prototype.handleVisualAid = function(element, deep, state, inst) { if (!element) return; var tableElement = null; - switch (element.nodeName.toLowerCase()) { - case "table": + switch (element.nodeName) { + case "TABLE": var oldW = element.style.width; var oldH = element.style.height; @@ -2933,37 +2970,46 @@ TinyMCE.prototype.handleVisualAid = function(element, deep, state) { break; -/* case "a": - var name = element.getAttribute("name"); - if (name && name != "" && state) { - //element.innerHTML += '<img mceVisualAid="true" src="' + (tinyMCE.themeURL + "/images/anchor.gif") + '" />'; - return; - } + case "A": + var anchorName = tinyMCE.getAttrib(element, "name"); + + if (anchorName != '' && state) { + element.title = anchorName; + element.className = 'mceItemAnchor'; + } else if (anchorName != '' && !state) + element.className = ''; - break;*/ + break; } if (deep && element.hasChildNodes()) { for (var i=0; i<element.childNodes.length; i++) - tinyMCE.handleVisualAid(element.childNodes[i], deep, state); + tinyMCE.handleVisualAid(element.childNodes[i], deep, state, inst); } }; TinyMCE.prototype.getAttrib = function(elm, name, default_value) { + if (typeof(default_value) == "undefined") + default_value = ""; + + // Not a element + if (!elm || elm.nodeType != 1) + return default_value; + var v = elm.getAttribute(name); // Try className for class attrib if (name == "class" && !v) v = elm.className; - if (typeof(default_value) == "undefined") - default_value = ""; + if (name == "style") + v = elm.style.cssText; return (v && v != "") ? v : default_value; }; TinyMCE.prototype.setAttrib = function(element, name, value, fix_value) { - if (typeof(value) == "number") + if (typeof(value) == "number" && value != null) value = "" + value; if (fix_value) { @@ -2974,6 +3020,9 @@ TinyMCE.prototype.setAttrib = function(element, name, value, fix_value) { value = value.replace(re, ''); } + if (name == "style") + element.style.cssText = value; + if (name == "class") element.className = value; @@ -3144,31 +3193,33 @@ TinyMCE.prototype.getCSSClasses = function(editor_id, doc) { var styles = tinyMCE.isMSIE ? doc.styleSheets : doc.styleSheets; if (styles && styles.length > 0) { - var csses = null; - - // Just ignore any errors - eval("try {var csses = tinyMCE.isMSIE ? doc.styleSheets(0).rules : doc.styleSheets[0].cssRules;} catch(e) {}"); - if (!csses) - return new Array(); - - for (var i=0; i<csses.length; i++) { - var selectorText = csses[i].selectorText; - - // Can be multiple rules per selector - if (selectorText) { - var rules = selectorText.split(','); - for (var c=0; c<rules.length; c++) { - // Invalid rule - if (rules[c].indexOf(' ') != -1 || rules[c].indexOf(':') != -1 || rules[c].indexOf('mce_') == 1) - continue; - - if (rules[c] == "." + tinyMCE.settings['visual_table_class']) - continue; - - // Is class rule - if (rules[c].indexOf('.') != -1) { - //alert(rules[c].substring(rules[c].indexOf('.'))); - output[output.length] = rules[c].substring(rules[c].indexOf('.')+1); + for (var x=0; x<styles.length; x++) { + var csses = null; + + // Just ignore any errors + eval("try {var csses = tinyMCE.isMSIE ? doc.styleSheets(" + x + ").rules : doc.styleSheets[" + x + "].cssRules;} catch(e) {}"); + if (!csses) + return new Array(); + + for (var i=0; i<csses.length; i++) { + var selectorText = csses[i].selectorText; + + // Can be multiple rules per selector + if (selectorText) { + var rules = selectorText.split(','); + for (var c=0; c<rules.length; c++) { + // Invalid rule + if (rules[c].indexOf(' ') != -1 || rules[c].indexOf(':') != -1 || rules[c].indexOf('mceItem') != -1) + continue; + + if (rules[c] == "." + tinyMCE.settings['visual_table_class']) + continue; + + // Is class rule + if (rules[c].indexOf('.') != -1) { + //alert(rules[c].substring(rules[c].indexOf('.'))); + output[output.length] = rules[c].substring(rules[c].indexOf('.')+1); + } } } } @@ -3191,10 +3242,15 @@ TinyMCE.prototype.regexpReplace = function(in_str, reg_exp, replace_str, opts) { return in_str.replace(re, replace_str); }; +TinyMCE.prototype.trim = function(str) { + return str.replace(/^\s*|\s*$/g, ""); +}; + TinyMCE.prototype.cleanupEventStr = function(str) { str = "" + str; str = str.replace('function anonymous()\n{\n', ''); str = str.replace('\n}', ''); + str = str.replace(/^return true;/gi, ''); return str; }; @@ -3215,18 +3271,6 @@ TinyMCE.prototype.getAbsPosition = function(node) { return pos; }; -TinyMCE.prototype.openFileBrowser = function(field_name, url, type, win) { - var cb = tinyMCE.getParam("file_browser_callback"); - - this.setWindowArg("window", win); - - // Call to external callback - if(eval('typeof('+cb+')') == "undefined") - alert("Callback function: " + cb + " could not be found."); - else - eval(cb + "(field_name, url, type, win);"); -}; - TinyMCE.prototype.getControlHTML = function(control_name) { var themePlugins = tinyMCE.getParam('plugins', '', true, ','); var templateFunction; @@ -3369,12 +3413,39 @@ TinyMCE.prototype.executeCallback = function(param, suffix, mode) { } }; +TinyMCE.prototype.debug = function() { + var msg = ""; + + var elm = document.getElementById("tinymce_debug"); + if (!elm) { + var debugDiv = document.createElement("div"); + debugDiv.setAttribute("className", "debugger"); + debugDiv.className = "debugger"; + debugDiv.innerHTML = '\ + Debug output:\ + <textarea id="tinymce_debug" style="width: 100%; height: 300px"></textarea>'; + + document.body.appendChild(debugDiv); + elm = document.getElementById("tinymce_debug"); + } + + var args = this.debug.arguments; + for (var i=0; i<args.length; i++) { + msg += args[i]; + if (i<args.length-1) + msg += ', '; + } + + elm.value += msg + "\n"; +}; + // TinyMCEControl function TinyMCEControl(settings) { // Undo levels this.undoLevels = new Array(); this.undoIndex = 0; - this.isDirty = false; + this.typingUndoIndex = -1; + this.undoRedo = true; // Default settings this.settings = settings; @@ -3456,7 +3527,7 @@ TinyMCEControl.prototype.getSelectedHTML = function() { else elm.innerHTML = this.getRng().htmlText; - return tinyMCE._cleanupHTML(this.contentDocument, this.settings, elm, this.visualAid); + return tinyMCE._cleanupHTML(this, this.contentDocument, this.settings, elm, this.visualAid); }; TinyMCEControl.prototype.getBookmark = function() { @@ -3466,7 +3537,7 @@ TinyMCEControl.prototype.getBookmark = function() { return rng; if (tinyMCE.isMSIE) - return rng.getBookmark(); + return rng; if (tinyMCE.isGecko) return rng.cloneRange(); @@ -3484,7 +3555,7 @@ TinyMCEControl.prototype.moveToBookmark = function(bookmark) { } if (tinyMCE.isMSIE) - return this.getRng().moveToBookmark(bookmark); + return bookmark.select(); if (tinyMCE.isGecko) { var rng = this.getDoc().createRange(); @@ -3860,7 +3931,7 @@ TinyMCEControl.prototype._insertPara = function(e) { paraBefore.normalize(); rngBefore.insertNode(paraBefore); - // debug("1: ", paraBefore.innerHTML, paraAfter.innerHTML); +// tinyMCE.debug("1: ", paraBefore.innerHTML, paraAfter.innerHTML); } else { body.innerHTML = "<" + blockName + "> </" + blockName + "><" + blockName + "> </" + blockName + ">"; paraAfter = body.childNodes[1]; @@ -4025,14 +4096,37 @@ TinyMCEControl.prototype.autoResetDesignMode = function() { }; TinyMCEControl.prototype.isDirty = function() { - return this.isDirty; + // Is content modified and not in a submit procedure + return this.startContent != tinyMCE.trim(this.getBody().innerHTML) && !tinyMCE.isNotDirty; +}; + +TinyMCEControl.prototype._mergeElements = function(pa, ch, override) { + ch = ch.cloneNode(true); + var st = tinyMCE.parseStyle(tinyMCE.getAttrib(pa, "style")); + var stc = tinyMCE.parseStyle(tinyMCE.getAttrib(ch, "style")); + var className = tinyMCE.getAttrib(pa, "class"); + + className += " " + tinyMCE.getAttrib(ch, "class"); + + if (override) { + for (var n in st) + stc[n] = st[n]; + } else { + for (var n in stc) + st[n] = stc[n]; + } + + tinyMCE.setAttrib(ch, "style", tinyMCE.serializeStyle(st)); + tinyMCE.setAttrib(ch, "class", tinyMCE.trim(className)); + pa.parentNode.replaceChild(ch, pa); }; TinyMCEControl.prototype.execCommand = function(command, user_interface, value) { var doc = this.getDoc(); var win = this.getWin(); + var focusElm = this.getFocusElement(); - if (this.lastSafariSelection) { + if (this.lastSafariSelection && !new RegExp('mceStartTyping|mceEndTyping|mceBeginUndoLevel|mceEndUndoLevel|mceAddUndoLevel', 'gi').test(command)) { this.moveToBookmark(this.lastSafariSelection); tinyMCE.selectedElement = this.lastSafariSelectedElement; } @@ -4050,39 +4144,63 @@ TinyMCEControl.prototype.execCommand = function(command, user_interface, value) if (tinyMCE._themeExecCommand(this.editorId, this.getBody(), command, user_interface, value)) return; - // Add undo level of operation - if (command != "mceAddUndoLevel" && command != "Undo" && command != "Redo" && command != "mceImage" && command != "mceLink" && command != "mceToggleVisualAid" && (command != "mceInsertTable" && !user_interface)) - this.execCommand("mceAddUndoLevel"); - // Fix align on images - if (this.getFocusElement() && this.getFocusElement().nodeName.toLowerCase() == "img") { - var align = this.getFocusElement().getAttribute('align'); + if (focusElm && focusElm.nodeName == "IMG") { + var align = focusElm.getAttribute('align'); + var img = command == "JustifyCenter" ? focusElm.cloneNode(false) : focusElm; switch (command) { case "JustifyLeft": if (align == 'left') - this.getFocusElement().removeAttribute('align'); + img.removeAttribute('align'); else - this.getFocusElement().setAttribute('align', 'left'); + img.setAttribute('align', 'left'); + // Remove the div + var div = focusElm.parentNode; + if (div && div.nodeName == "DIV" && div.childNodes.length == 1 && div.parentNode) + div.parentNode.replaceChild(img, div); + + this.selectNode(img); + this.repaint(); tinyMCE.triggerNodeChange(); return; case "JustifyCenter": - if (align == 'middle') - this.getFocusElement().removeAttribute('align'); - else - this.getFocusElement().setAttribute('align', 'middle'); + img.removeAttribute('align'); + + // Is centered + var div = tinyMCE.getParentElement(focusElm, "div"); + if (div && div.style.textAlign == "center") { + // Remove div + if (div.nodeName == "DIV" && div.childNodes.length == 1 && div.parentNode) + div.parentNode.replaceChild(img, div); + } else { + // Add div + var div = this.getDoc().createElement("div"); + div.style.textAlign = 'center'; + div.appendChild(img); + focusElm.parentNode.replaceChild(div, focusElm); + } + this.selectNode(img); + this.repaint(); tinyMCE.triggerNodeChange(); return; case "JustifyRight": if (align == 'right') - this.getFocusElement().removeAttribute('align'); + img.removeAttribute('align'); else - this.getFocusElement().setAttribute('align', 'right'); + img.setAttribute('align', 'right'); + // Remove the div + var div = focusElm.parentNode; + if (div && div.nodeName == "DIV" && div.childNodes.length == 1 && div.parentNode) + div.parentNode.replaceChild(img, div); + + this.selectNode(img); + this.repaint(); tinyMCE.triggerNodeChange(); return; } @@ -4125,13 +4243,17 @@ TinyMCEControl.prototype.execCommand = function(command, user_interface, value) } switch (command) { + case "mceRepaint": + this.repaint(); + return true; + case "mceStoreSelection": this.selectionBookmark = this.getBookmark(); - break; + return true; case "mceRestoreSelection": this.moveToBookmark(this.selectionBookmark); - break; + return true; case "InsertUnorderedList": case "InsertOrderedList": @@ -4215,13 +4337,157 @@ TinyMCEControl.prototype.execCommand = function(command, user_interface, value) break; - case "HiliteColor": - if (tinyMCE.isGecko) { - this.getDoc().execCommand("useCSS", false, false); - this.getDoc().execCommand('hilitecolor', false, value); - this.getDoc().execCommand("useCSS", false, true); + case "SetStyleInfo": + var rng = this.getRng(); + var sel = this.getSel(); + var scmd = value['command']; + var sname = value['name']; + var svalue = value['value']; + var wrapper = value['wrapper'] ? value['wrapper'] : "span"; + var parentElm = null; + + // Whole element selected check + if (tinyMCE.isMSIE) { + // Control range + if (rng.item) + parentElm = rng.item(0); + else { + var pelm = rng.parentElement(); + var prng = doc.selection.createRange(); + prng.moveToElementText(pelm); + + if (rng.htmlText == prng.htmlText || rng.boundingWidth == 0) + parentElm = pelm; + } + } else { + var felm = this.getFocusElement(); + if (sel.isCollapsed || (/td|tr|tbody|table/ig.test(felm.nodeName) && sel.anchorNode == felm.parentNode)) + parentElm = felm; + } + + // Whole element selected + if (parentElm) { + if (scmd == "setstyle") + eval("parentElm.style." + sname + " = svalue;"); + + if (scmd == "setattrib") + tinyMCE.setAttrib(parentElm, sname, svalue); + } else { + doc.execCommand("fontname", false, "#mce_temp_font#"); + var elementArray = tinyMCE.getElementsByAttributeValue(this.getBody(), "font", "face", "#mce_temp_font#"); + + // Change them all + for (var x=0; x<elementArray.length; x++) { + elm = elementArray[x]; + if (elm) { + var spanElm = doc.createElement(wrapper); + + if (scmd == "setstyle") + eval("spanElm.style." + sname + " = svalue;"); + + if (scmd == "setattrib") + tinyMCE.setAttrib(spanElm, sname, svalue); + + if (elm.hasChildNodes()) { + for (var i=0; i<elm.childNodes.length; i++) + spanElm.appendChild(elm.childNodes[i].cloneNode(true)); + } + + spanElm.setAttribute("mce_new", "true"); + elm.parentNode.replaceChild(spanElm, elm); + } + } + } + + // Cleaup wrappers + var nodes = doc.getElementsByTagName(wrapper); + for (var i=nodes.length-1; i>=0; i--) { + var elm = nodes[i]; + var isNew = tinyMCE.getAttrib(elm, "mce_new") == "true"; + + elm.removeAttribute("mce_new"); + + // Is only child a element + if (elm.childNodes && elm.childNodes.length == 1 && elm.childNodes[0].nodeType == 1) { + // tinyMCE.debug("merge1" + isNew); + this._mergeElements(elm, elm.childNodes[0], isNew); + continue; + } + + // Is I the only child + if (elm.parentNode.childNodes.length == 1) { + // tinyMCE.debug("merge2" + isNew); + this._mergeElements(elm.parentNode, elm, false); + } + } + + // Remove empty wrappers + var nodes = doc.getElementsByTagName(wrapper); + for (var i=nodes.length-1; i>=0; i--) { + var elm = nodes[i]; + var isEmpty = true; + + // Check if it has any attribs + var tmp = doc.createElement("body"); + tmp.appendChild(elm.cloneNode(false)); + + // Is empty span, remove it + if (new RegExp('<span>|<span style="">', 'gi').test(tmp.innerHTML)) { + for (var i=elm.childNodes.length-1; i>=0; i--) { + if (elm.parentNode != null) { + elm.parentNode.insertBefore(elm.childNodes[i].cloneNode(true), elm); + elm.parentNode.removeChild(elm); + } + } + } + } + + tinyMCE.triggerNodeChange(); + + break; + + case "FontName": + if (tinyMCE.getParam("convert_fonts_to_styles")) + this.execCommand("SetStyleInfo", false, {command : "setstyle", name : "fontFamily", value : value}); + else + this.getDoc().execCommand('FontName', false, value); + break; + + case "FontSize": + if (tinyMCE.getParam("convert_fonts_to_styles")) { + var sizes = new Array('', 8, 10, 12, 14, 18, 24, 36); + var size = sizes[value] == '' ? '' : sizes[value] + 'px'; + + this.execCommand("SetStyleInfo", false, {command : "setstyle", name : "fontSize", value : size}); } else - this.getDoc().execCommand('BackColor', false, value); + this.getDoc().execCommand('FontSize', false, value); + + break; + + case "forecolor": + if (tinyMCE.getParam("convert_fonts_to_styles")) + this.execCommand("SetStyleInfo", false, {command : "setstyle", name : "color", value : value}); + else { + if (tinyMCE.isGecko) { + this.getDoc().execCommand("useCSS", false, true); + this.getDoc().execCommand('forecolor', false, value); + this.getDoc().execCommand("useCSS", false, true); + } else + this.getDoc().execCommand('forecolor', false, value); + } + break; + + case "HiliteColor": + if (tinyMCE.getParam("convert_fonts_to_styles")) + this.execCommand("SetStyleInfo", false, {command : "setstyle", name : "backgroundColor", value : value}); + else { + if (tinyMCE.isGecko) { + this.getDoc().execCommand("useCSS", false, false); + this.getDoc().execCommand('hilitecolor', false, value); + this.getDoc().execCommand("useCSS", false, true); + } else + this.getDoc().execCommand('BackColor', false, value); + } break; @@ -4249,10 +4515,11 @@ TinyMCEControl.prototype.execCommand = function(command, user_interface, value) value = ""; // Call custom cleanup code - value = tinyMCE._customCleanup("insert_to_editor", value); + value = tinyMCE._customCleanup(this, "insert_to_editor", value); tinyMCE._setHTML(doc, value); - doc.body.innerHTML = tinyMCE._cleanupHTML(doc, tinyMCE.settings, doc.body); - tinyMCE.handleVisualAid(doc.body, true, this.visualAid); + doc.body.innerHTML = tinyMCE._cleanupHTML(this, doc, tinyMCE.settings, doc.body); + tinyMCE.handleVisualAid(doc.body, true, this.visualAid, this); + tinyMCE._setEventsEnabled(doc.body, true); return true; case "mceLink": @@ -4282,7 +4549,7 @@ TinyMCEControl.prototype.execCommand = function(command, user_interface, value) href = tinyMCE.getAttrib(tinyMCE.linkElement, 'href'); target = tinyMCE.getAttrib(tinyMCE.linkElement, 'target'); title = tinyMCE.getAttrib(tinyMCE.linkElement, 'title'); - onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'mce_onclick'); + onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick'); style_class = tinyMCE.getAttrib(tinyMCE.linkElement, 'class'); // Try old onclick to if copy/pasted content @@ -4385,65 +4652,15 @@ TinyMCEControl.prototype.execCommand = function(command, user_interface, value) tinyMCE.openWindow(this.insertImageTemplate, {src : src, alt : alt, border : border, hspace : hspace, vspace : vspace, width : width, height : height, align : align, title : title, onmouseover : onmouseover, onmouseout : onmouseout, action : action}); break; - case "mceCleanupWord": - if (tinyMCE.isMSIE) { - var html = this.getBody().createTextRange().htmlText; - - if (html.indexOf('="mso') != -1) { - tinyMCE._setHTML(this.contentDocument, this.getBody().innerHTML); - html = tinyMCE._cleanupHTML(this.contentDocument, this.settings, this.getBody(), this.visualAid); - } - - this.getBody().innerHTML = html; - } - break; - case "mceCleanup": tinyMCE._setHTML(this.contentDocument, this.getBody().innerHTML); - this.getBody().innerHTML = tinyMCE._cleanupHTML(this.contentDocument, this.settings, this.getBody(), this.visualAid); - tinyMCE.handleVisualAid(this.getBody(), true, this.visualAid); + this.getBody().innerHTML = tinyMCE._cleanupHTML(this, this.contentDocument, this.settings, this.getBody(), this.visualAid); + tinyMCE.handleVisualAid(this.getBody(), true, this.visualAid, this); + tinyMCE._setEventsEnabled(this.getBody(), true); this.repaint(); tinyMCE.triggerNodeChange(); break; - case "mceAnchor": - if (!user_interface) { - var aElm = tinyMCE.getParentElement(this.getFocusElement(), "a", "name"); - if (aElm) { - if (value == null || value == "") { - if (tinyMCE.isMSIE) { - aElm.outerHTML = aElm.innerHTML; - } else { - var rng = aElm.ownerDocument.createRange(); - rng.setStartBefore(aElm); - rng.setEndAfter(aElm); - rng.deleteContents(); - rng.insertNode(rng.createContextualFragment(aElm.innerHTML)); - } - } else - aElm.setAttribute('name', value); - } else { - this.getDoc().execCommand("fontname", false, "#mce_temp_font#"); - var elementArray = tinyMCE.getElementsByAttributeValue(this.getBody(), "font", "face", "#mce_temp_font#"); - for (var x=0; x<elementArray.length; x++) { - elm = elementArray[x]; - - var aElm = this.getDoc().createElement("a"); - aElm.setAttribute('name', value); - - if (elm.hasChildNodes()) { - for (var i=0; i<elm.childNodes.length; i++) - aElm.appendChild(elm.childNodes[i].cloneNode(true)); - } - - elm.parentNode.replaceChild(aElm, elm); - } - } - - tinyMCE.triggerNodeChange(); - } - break; - case "mceReplaceContent": var selectedText = ""; @@ -4474,90 +4691,31 @@ TinyMCEControl.prototype.execCommand = function(command, user_interface, value) break; case "mceSetCSSClass": - var selectedText = false; - - if (tinyMCE.isMSIE) { - var rng = doc.selection.createRange(); - selectedText = (rng.text && rng.text.length > 0); - } else - selectedText = (this.getSel().toString().length > 0); - - // Use selectedNode instead if defined - if (tinyMCE.selectedNode) - tinyMCE.selectedElement = tinyMCE.selectedNode; - - if (selectedText && !tinyMCE.selectedNode) { - this.getDoc().execCommand("RemoveFormat", false, null); - if (value == null) - return this.execCommand("RemoveFormat", false, null); - - this.getDoc().execCommand("fontname", false, "#mce_temp_font#"); - var elementArray = tinyMCE.getElementsByAttributeValue(this.getBody(), "font", "face", "#mce_temp_font#"); - - // Change them all - for (var x=0; x<elementArray.length; x++) { - elm = elementArray[x]; - if (elm) { - var spanElm = this.getDoc().createElement("span"); - spanElm.className = value; - if (elm.hasChildNodes()) { - for (var i=0; i<elm.childNodes.length; i++) - spanElm.appendChild(elm.childNodes[i].cloneNode(true)); - } - - elm.parentNode.replaceChild(spanElm, elm); - } - } - } else { - var targetElm = this.getFocusElement(); - - // Select element - if (tinyMCE.selectedElement.nodeName.toLowerCase() == "img" || tinyMCE.selectedElement.nodeName.toLowerCase() == "table") - targetElm = tinyMCE.selectedElement; - - var targetNode = tinyMCE.getParentElement(targetElm, "p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address"); - - // Selected element - if (tinyMCE.selectedElement.nodeType == 1) - targetNode = tinyMCE.selectedElement; - - // Mozilla img patch - if (!tinyMCE.isMSIE && !targetNode) - targetNode = tinyMCE.imgElement; - - if (targetNode) { - if (targetNode.nodeName.toLowerCase() == "span" && (!value || value == "")) { - if (targetNode.hasChildNodes()) { - for (var i=0; i<targetNode.childNodes.length; i++) - targetNode.parentNode.insertBefore(targetNode.childNodes[i].cloneNode(true), targetNode); - } - - targetNode.parentNode.removeChild(targetNode); - } else { - if (value != null && value != "") - targetNode.className = value; - else { - targetNode.removeAttribute("className"); - targetNode.removeAttribute("class"); - } - } - } - } - - tinyMCE.triggerNodeChange(); + this.execCommand("SetStyleInfo", false, {command : "setattrib", name : "class", value : value}); break; case "mceInsertRawHTML": var key = 'tiny_mce_marker'; + this.execCommand('mceBeginUndoLevel'); + // Insert marker key this.execCommand('mceInsertContent', false, key); + // Store away scroll pos + var scrollX = this.getDoc().body.scrollLeft + this.getDoc().documentElement.scrollLeft; + var scrollY = this.getDoc().body.scrollTop + this.getDoc().documentElement.scrollTop; + // Find marker and replace with RAW HTML var html = this.getBody().innerHTML; if ((pos = html.indexOf(key)) != -1) this.getBody().innerHTML = html.substring(0, pos) + value + html.substring(pos + key.length); + // Restore scoll pos + this.contentWindow.scrollTo(scrollX, scrollY); + + this.execCommand('mceEndUndoLevel'); + break; case "mceInsertContent": @@ -4631,22 +4789,51 @@ TinyMCEControl.prototype.execCommand = function(command, user_interface, value) tinyMCE.triggerNodeChange(); break; + case "mceStartTyping": + if (tinyMCE.settings['custom_undo_redo'] && this.typingUndoIndex == -1) { + this.typingUndoIndex = this.undoIndex; + this.execCommand('mceAddUndoLevel'); + //tinyMCE.debug("mceStartTyping"); + } + break; + + case "mceEndTyping": + if (tinyMCE.settings['custom_undo_redo'] && this.typingUndoIndex != -1) { + this.execCommand('mceAddUndoLevel'); + this.typingUndoIndex = -1; + //tinyMCE.debug("mceEndTyping"); + } + break; + + case "mceBeginUndoLevel": + this.undoRedo = false; + break; + + case "mceEndUndoLevel": + this.undoRedo = true; + this.execCommand('mceAddUndoLevel'); + break; + case "mceAddUndoLevel": - if (tinyMCE.settings['custom_undo_redo']) { - var customUndoLevels = tinyMCE.settings['custom_undo_redo_levels']; + if (tinyMCE.settings['custom_undo_redo'] && this.undoRedo) { + // tinyMCE.debug("add level"); + + if (this.typingUndoIndex != -1) { + this.undoIndex = this.typingUndoIndex; + // tinyMCE.debug("Override: " + this.undoIndex); + } + + var newHTML = tinyMCE.trim(this.getBody().innerHTML); + if (newHTML != this.undoLevels[this.undoIndex]) { + // tinyMCE.debug("[" + newHTML + "," + this.undoLevels[this.undoIndex] + "]"); - var newHTML = this.getBody().innerHTML; -//debug("x: " + newHTML, this.undoLevels[this.undoLevels.length-1] + "\n"); - if (newHTML != this.undoLevels[this.undoLevels.length-1]) { -// debug(newHTML, this.undoLevels[this.undoLevels.length-1]); - // Trigger onchange and set is dirty tinyMCE.executeCallback('onchange_callback', '_onchange', 0, this); - this.isDirty = true; // Time to compress + var customUndoLevels = tinyMCE.settings['custom_undo_redo_levels']; if (customUndoLevels != -1 && this.undoLevels.length > customUndoLevels) { for (var i=0; i<this.undoLevels.length-1; i++) { - //alert(this.undoLevels[i] + "=" + this.undoLevels[i+1]); + //tinyMCE.debug(this.undoLevels[i] + "=" + this.undoLevels[i+1]); this.undoLevels[i] = this.undoLevels[i+1]; } @@ -4654,33 +4841,30 @@ TinyMCEControl.prototype.execCommand = function(command, user_interface, value) this.undoIndex--; } - //alert(newHTML + "=" + this.undoLevels[this.undoIndex]); - // Add new level - this.undoLevels[this.undoIndex++] = newHTML; - this.undoLevels.length = this.undoIndex; -// debug("mceAddUndoLevel - undo levels:" + this.undoLevels.length + ", undo index: " + this.undoIndex); - //window.status = "mceAddUndoLevel - undo levels:" + this.undoLevels.length + ", undo index: " + this.undoIndex; - } + this.undoIndex++; + this.undoLevels[this.undoIndex] = newHTML; + this.undoLevels.length = this.undoIndex + 1; - tinyMCE.triggerNodeChange(false); + // tinyMCE.debug("level added" + this.undoIndex); + tinyMCE.triggerNodeChange(false); + + // tinyMCE.debug(this.undoIndex + "," + (this.undoLevels.length-1)); + } } break; case "Undo": if (tinyMCE.settings['custom_undo_redo']) { - // Is first level - if (this.undoIndex == this.undoLevels.length) { - this.execCommand("mceAddUndoLevel"); - this.undoIndex--; - } + tinyMCE.execCommand("mceEndTyping"); // Do undo if (this.undoIndex > 0) { this.undoIndex--; this.getBody().innerHTML = this.undoLevels[this.undoIndex]; + this.repaint(); } - // debug("Undo - undo levels:" + this.undoLevels.length + ", undo index: " + this.undoIndex); + // tinyMCE.debug("Undo - undo levels:" + this.undoLevels.length + ", undo index: " + this.undoIndex); tinyMCE.triggerNodeChange(); } else this.getDoc().execCommand(command, user_interface, value); @@ -4688,10 +4872,13 @@ TinyMCEControl.prototype.execCommand = function(command, user_interface, value) case "Redo": if (tinyMCE.settings['custom_undo_redo']) { + tinyMCE.execCommand("mceEndTyping"); + if (this.undoIndex < (this.undoLevels.length-1)) { this.undoIndex++; this.getBody().innerHTML = this.undoLevels[this.undoIndex]; - // debug("Redo - undo levels:" + this.undoLevels.length + ", undo index: " + this.undoIndex); + this.repaint(); + // tinyMCE.debug("Redo - undo levels:" + this.undoLevels.length + ", undo index: " + this.undoIndex); } tinyMCE.triggerNodeChange(); @@ -4701,7 +4888,7 @@ TinyMCEControl.prototype.execCommand = function(command, user_interface, value) case "mceToggleVisualAid": this.visualAid = !this.visualAid; - tinyMCE.handleVisualAid(this.getBody(), true, this.visualAid); + tinyMCE.handleVisualAid(this.getBody(), true, this.visualAid, this); tinyMCE.triggerNodeChange(); break; @@ -4713,6 +4900,13 @@ TinyMCEControl.prototype.execCommand = function(command, user_interface, value) win.focus(); var rng = doc.selection.createRange(); rng.execCommand("RemoveFormat", false, null); + + // If all element contents is selected, move selection around element + if (rng.text == rng.parentElement().innerText) { + rng.moveToElementText(rng.parentElement()); + rng.select(); + } + rng.pasteHTML(rng.text); } catch (e) { // Do nothing @@ -4731,6 +4925,10 @@ TinyMCEControl.prototype.execCommand = function(command, user_interface, value) this.getDoc().execCommand(command, user_interface, value); tinyMCE.triggerNodeChange(); } + + // Add undo level after modification + if (command != "mceAddUndoLevel" && command != "Undo" && command != "Redo" && command != "mceStartTyping" && command != "mceEndTyping") + tinyMCE.execCommand("mceAddUndoLevel"); }; TinyMCEControl.prototype.queryCommandValue = function(command) { @@ -4779,7 +4977,6 @@ TinyMCEControl.prototype.onAdd = function(replace_element, form_element_name, ta this.settings['handleNodeChangeCallback'] = templateFunction; html = tinyMCE.replaceVar(html, "editor_id", this.editorId); - html = tinyMCE.replaceVar(html, "default_document", tinyMCE.baseURL + "/blank.htm"); this.settings['default_document'] = tinyMCE.baseURL + "/blank.htm"; this.settings['old_width'] = this.settings['width']; @@ -4838,7 +5035,7 @@ TinyMCEControl.prototype.onAdd = function(replace_element, form_element_name, ta this.formTargetElementId = form_element_name; // Get replace_element contents - if (replace_element.nodeName.toLowerCase() == "textarea") + if (replace_element.nodeName == "TEXTAREA" || replace_element.nodeName == "INPUT") this.startContent = replace_element.value; else this.startContent = replace_element.innerHTML; @@ -4916,17 +5113,7 @@ TinyMCEControl.prototype.onAdd = function(replace_element, form_element_name, ta // Setup base HTML var doc = this.contentDocument; if (dynamicIFrame) { - var html = "" - + '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">' - + '<html>' - + '<head>' - + '<base href="' + tinyMCE.settings['base_href'] + '" />' - + '<title>blank_page</title>' - + '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">' - + '</head>' - + '<body class="mceContentBody">' - + '</body>' - + '</html>'; + var html = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><base href="' + tinyMCE.settings['base_href'] + '" /><title>blank_page</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body class="mceContentBody"></body></html>'; try { this.getDoc().designMode = "on"; @@ -4960,10 +5147,26 @@ TinyMCEControl.prototype.getFocusElement = function() { var elm = rng.item ? rng.item(0) : rng.parentElement(); } else { var sel = this.getSel(); - var elm = (sel && sel.anchorNode) ? sel.anchorNode : null; + var rng = this.getRng(); + var elm = rng.commonAncestorContainer; + //var elm = (sel && sel.anchorNode) ? sel.anchorNode : null; + + // Handle selection a image or other control like element such as anchors + if (!rng.collapsed) { + // Is selection small + if (rng.startContainer == rng.endContainer) { + if (rng.startOffset - rng.endOffset < 2) { + if (rng.startContainer.hasChildNodes()) + elm = rng.startContainer.childNodes[rng.startOffset]; + } + } + } + + // Get the element parent of the node + elm = tinyMCE.getParentElement(elm); - if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "img") - elm = tinyMCE.selectedElement; + //if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "img") + // elm = tinyMCE.selectedElement; } return elm; @@ -4972,30 +5175,3 @@ TinyMCEControl.prototype.getFocusElement = function() { // Global instances var tinyMCE = new TinyMCE(); var tinyMCELang = new Array(); - -function debug() { - var msg = ""; - - var elm = document.getElementById("tinymce_debug"); - if (!elm) { - var debugDiv = document.createElement("div"); - debugDiv.setAttribute("className", "debugger"); - debugDiv.className = "debugger"; - debugDiv.innerHTML = '\ - Debug output:\ - <textarea id="tinymce_debug" style="width: 100%; height: 300px">\ - </textarea>'; - - document.body.appendChild(debugDiv); - elm = document.getElementById("tinymce_debug"); - } - - var args = this.debug.arguments; - for (var i=0; i<args.length; i++) { - msg += args[i]; - if (i<args.length-1) - msg += ', '; - } - - elm.value += msg + "\n"; -}; diff --git a/wp-inst/wp-includes/registration-functions.php b/wp-inst/wp-includes/registration-functions.php index c55bab1..bd7f7dc 100644 --- a/wp-inst/wp-includes/registration-functions.php +++ b/wp-inst/wp-includes/registration-functions.php @@ -105,7 +105,7 @@ function wp_update_user($userdata) { return $user_id; } -function wp_create_user( $username, $password, $email ) { +function wp_create_user( $username, $password, $email = '') { global $wpdb; $user_login = $wpdb->escape( $username ); |