Changeset 8242
- Timestamp:
- 07/02/2008 11:07:56 PM (17 years ago)
- Location:
- branches/crazyhorse
- Files:
-
- 83 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/crazyhorse/wp-admin/admin-ajax.php
r8219 r8242 14 14 $s = $_GET['q']; // is this slashed already? 15 15 16 if ( strstr( $s, ',' ) ) 17 die; // it's a multiple tag insert, we won't find anything 18 $results = $wpdb->get_col( $wpdb->prepare("SELECT name FROM $wpdb->terms WHERE name LIKE (%s)", '%' . $s . '%') ); 16 if ( strstr( $s, ',' ) ) { 17 $s = explode( ',', $s ); 18 $s = $s[count( $s ) - 1]; 19 } 20 $s = trim( $s ); 21 if ( strlen( $s ) < 2 ) 22 die; // require 2 chars for matching 23 $results = $wpdb->get_col( "SELECT name FROM $wpdb->terms WHERE name LIKE ('%". $s . "%')" ); 19 24 echo join( $results, "\n" ); 20 25 die; -
branches/crazyhorse/wp-admin/admin-header.php
r8143 r8242 80 80 <div id="gears-msg1"> 81 81 <h3 class="info-box-title"><?php _e('Speed up WordPress'); ?></h3> 82 <p><?php _e('WordPress has support for Gears thatadds new features to your web browser.'); ?><br />82 <p><?php _e('WordPress now has support for Gears, which adds new features to your web browser.'); ?><br /> 83 83 <a href="http://gears.google.com/" target="_blank" style="font-weight:normal;"><?php _e('More information...'); ?></a></p> 84 <p><?php _e('After installing and enabling it, most of the WordPress images, scripts and CSS files will be stored on this computer. This will speed up page loading.'); ?></p> 85 <p><strong><?php _e('Please make sure you are not using a public or shared computer.'); ?></strong></p> 86 <div class="submit"><button onclick="window.location = 'http://gears.google.com/?action=install&return=<?php echo urlencode( admin_url() ); ?>';" class="button"><?php _e('Install Now'); ?></button> 87 <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';">Cancel</button></div> 84 <p><?php _e('After you install and enable Gears most of WordPress’ images, scripts, and CSS files will be stored locally on your computer. This speeds up page load time.'); ?></p> 85 <p><strong><?php _e('Don’t install on a public or shared computer.'); ?></strong></p> <div class="submit"><button onclick="window.location = 'http://gears.google.com/?action=install&return=<?php echo urlencode( admin_url() ); ?>';" class="button"><?php _e('Install Now'); ?></button> 86 <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';"><?php _e('Cancel'); ?></button></div> 88 87 </div> 89 88 … … 94 93 <p><strong><?php _e('However if this is a public or shared computer, Gears should not be enabled.'); ?></strong></p> 95 94 <div class="submit"><button class="button" onclick="wpGears.getPermission();"><?php _e('Enable Gears'); ?></button> 96 <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';"> Cancel</button></div>95 <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';"><?php _e('Cancel'); ?></button></div> 97 96 </div> 98 97 … … 111 110 <?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> | 112 111 <a href="<?php echo site_url('wp-login.php?action=logout', 'login') ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a> 113 <?php if ( $gears_compat ) { ?>| <span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e(' Speed up!') ?></a></span><?php } ?>112 <?php if ( $gears_compat ) { ?>| <span id="gears-menu"><a href="#" onclick="wpGears.message(1);return false;"><?php _e('Turbo') ?></a></span><?php } ?> 114 113 </p></div> 115 114 -
branches/crazyhorse/wp-admin/async-upload.php
r8023 r8242 11 11 12 12 // Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead 13 if ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) 13 if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) 14 $_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie']; 15 elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) ) 14 16 $_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie']; 15 17 unset($current_user); -
branches/crazyhorse/wp-admin/css/press-this.css
r8151 r8242 295 295 } 296 296 297 #img_container a { 298 display: block; 299 width: 79px; 300 height: 79px; 301 float: left; 302 } 297 303 #img_container img { 298 304 width: 75px; 299 305 height: 75px; 306 border: 0px; 300 307 padding: 2px; 301 308 background-color: #f4f4f4; 302 margin-right: 7px;303 margin-bottom: 7px;304 309 cursor: pointer; 305 310 } 311 #img_container a, #img_container a:link, #img_container a:visited { 312 border: 2px solid #ccc; 313 margin: 0 4px 4px 0; 314 } 315 #img_container a:hover, #img_container a:active { 316 border: 2px solid #000; 317 } 306 318 .submit { 307 -moz-border-radius-bottomleft: 3px;308 -khtml-border-bottom-left-radius: 3px;309 -webkit-border-bottom-left-radius: 3px;310 border-bottom-left-radius: 3px;311 -moz-border-radius-bottomright: 3px;312 -khtml-border-bottom-right-radius: 3px;313 -webkit-border-bottom-right-radius: 3px;314 border-bottom-right-radius: 3px;315 margin: 0;316 padding: 0;319 -moz-border-radius-bottomleft: 3px; 320 -khtml-border-bottom-left-radius: 3px; 321 -webkit-border-bottom-left-radius: 3px; 322 border-bottom-left-radius: 3px; 323 -moz-border-radius-bottomright: 3px; 324 -khtml-border-bottom-right-radius: 3px; 325 -webkit-border-bottom-right-radius: 3px; 326 border-bottom-right-radius: 3px; 327 margin: 0; 328 padding: 0; 317 329 } 318 330 .submitbox { … … 467 479 468 480 #post_status { 469 margin-left: 10px;470 margin-bottom: 1em;471 display: block;481 margin-left: 10px; 482 margin-bottom: 1em; 483 display: block; 472 484 } 473 485 -
branches/crazyhorse/wp-admin/edit-form-advanced.php
r8222 r8242 23 23 $form_extra = "<input type='hidden' id='post_ID' name='post_ID' value='$post_ID' />"; 24 24 $autosave = wp_get_post_autosave( $post_id ); 25 if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) ) 26 $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) ); 25 26 // Detect if there exists an autosave newer than the post and if that autosave is different than the post 27 if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) ) { 28 foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) { 29 if ( wp_text_diff( $autosave->$autosave_field, $post->$autosave_field ) ) { 30 $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) ); 31 break; 32 } 33 } 34 unset($autosave_field, $_autosave_field); 35 } 27 36 } 28 37 -
branches/crazyhorse/wp-admin/gears-manifest.php
r8151 r8242 16 16 function site_url() {} 17 17 function admin_url() {} 18 function wp_guess_url() {} 18 19 19 20 require(ABSPATH . '/wp-includes/script-loader.php'); … … 64 65 { 65 66 "betaManifestVersion" : 1, 66 "version" : "<?php echo $man_version; ?>_20080 618",67 "version" : "<?php echo $man_version; ?>_20080701", 67 68 "entries" : [ 68 69 <?php echo $defaults; ?> … … 112 113 { "url" : "../wp-includes/js/swfupload/swfupload_f9.swf" }, 113 114 114 { "url" : "../wp-includes/js/tinymce/tiny_mce_popup.js?ver=31 01" },115 { "url" : "../wp-includes/js/tinymce/utils/mctabs.js?ver=31 01" },116 { "url" : "../wp-includes/js/tinymce/utils/validate.js?ver=31 01" },117 { "url" : "../wp-includes/js/tinymce/utils/form_utils.js?ver=31 01" },118 { "url" : "../wp-includes/js/tinymce/utils/editable_selects.js?ver=31 01" },119 { "url" : "../wp-includes/js/tinymce/plugins/paste/js/pasteword.js?ver=31 01" },120 { "url" : "../wp-includes/js/tinymce/plugins/paste/js/pastetext.js?ver=31 01" },121 { "url" : "../wp-includes/js/tinymce/plugins/media/js/media.js?ver=31 01" },122 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/color_picker.js?ver=31 01" },123 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/charmap.js?ver=31 01" },124 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/image.js?ver=31 01" },125 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/link.js?ver=31 01" },126 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=31 01" },127 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=31 01" },128 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=31 01" },115 { "url" : "../wp-includes/js/tinymce/tiny_mce_popup.js?ver=311" }, 116 { "url" : "../wp-includes/js/tinymce/utils/mctabs.js?ver=311" }, 117 { "url" : "../wp-includes/js/tinymce/utils/validate.js?ver=311" }, 118 { "url" : "../wp-includes/js/tinymce/utils/form_utils.js?ver=311" }, 119 { "url" : "../wp-includes/js/tinymce/utils/editable_selects.js?ver=311" }, 120 { "url" : "../wp-includes/js/tinymce/plugins/paste/js/pasteword.js?ver=311" }, 121 { "url" : "../wp-includes/js/tinymce/plugins/paste/js/pastetext.js?ver=311" }, 122 { "url" : "../wp-includes/js/tinymce/plugins/media/js/media.js?ver=311" }, 123 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/color_picker.js?ver=311" }, 124 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/charmap.js?ver=311" }, 125 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/image.js?ver=311" }, 126 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/link.js?ver=311" }, 127 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=311" }, 128 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=311" }, 129 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=311" }, 129 130 130 { "url" : "../wp-includes/js/tinymce/themes/advanced/source_editor.htm?ver=31 01" },131 { "url" : "../wp-includes/js/tinymce/themes/advanced/anchor.htm?ver=31 01" },132 { "url" : "../wp-includes/js/tinymce/themes/advanced/image.htm?ver=31 01" },133 { "url" : "../wp-includes/js/tinymce/themes/advanced/link.htm?ver=31 01" },134 { "url" : "../wp-includes/js/tinymce/themes/advanced/color_picker.htm?ver=31 01" },135 { "url" : "../wp-includes/js/tinymce/themes/advanced/charmap.htm?ver=31 01" },136 { "url" : "../wp-includes/js/tinymce/plugins/media/media.htm?ver=31 01" },137 { "url" : "../wp-includes/js/tinymce/plugins/paste/pasteword.htm?ver=31 01" },138 { "url" : "../wp-includes/js/tinymce/plugins/paste/blank.htm?ver=31 01" },139 { "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=31 01" },140 { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=31 01" },141 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=31 01" },142 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=31 01" },143 { "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=31 01" },131 { "url" : "../wp-includes/js/tinymce/themes/advanced/source_editor.htm?ver=311" }, 132 { "url" : "../wp-includes/js/tinymce/themes/advanced/anchor.htm?ver=311" }, 133 { "url" : "../wp-includes/js/tinymce/themes/advanced/image.htm?ver=311" }, 134 { "url" : "../wp-includes/js/tinymce/themes/advanced/link.htm?ver=311" }, 135 { "url" : "../wp-includes/js/tinymce/themes/advanced/color_picker.htm?ver=311" }, 136 { "url" : "../wp-includes/js/tinymce/themes/advanced/charmap.htm?ver=311" }, 137 { "url" : "../wp-includes/js/tinymce/plugins/media/media.htm?ver=311" }, 138 { "url" : "../wp-includes/js/tinymce/plugins/paste/pasteword.htm?ver=311" }, 139 { "url" : "../wp-includes/js/tinymce/plugins/paste/blank.htm?ver=311" }, 140 { "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=311" }, 141 { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=311" }, 142 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=311" }, 143 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311" }, 144 { "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=311" }, 144 145 145 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=31 01" },146 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver=31 01" },147 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css?ver=31 01" },148 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css?ver=31 01" },149 { "url" : "../wp-includes/js/tinymce/plugins/spellchecker/css/content.css?ver=31 01" },150 { "url" : "../wp-includes/js/tinymce/plugins/wordpress/css/content.css?ver=31 01" },151 { "url" : "../wp-includes/js/tinymce/plugins/media/css/content.css?ver=31 01" },152 { "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=31 01" },153 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=31 01" },154 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=31 01" },155 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=31 01" },156 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=31 01" },157 { "url" : "../wp-includes/js/tinymce/wordpress.css?ver=31 01" },146 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=311" }, 147 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver=311" }, 148 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css?ver=311" }, 149 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css?ver=311" }, 150 { "url" : "../wp-includes/js/tinymce/plugins/spellchecker/css/content.css?ver=311" }, 151 { "url" : "../wp-includes/js/tinymce/plugins/wordpress/css/content.css?ver=311" }, 152 { "url" : "../wp-includes/js/tinymce/plugins/media/css/content.css?ver=311" }, 153 { "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=311" }, 154 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=311" }, 155 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=311" }, 156 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311" }, 157 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=311" }, 158 { "url" : "../wp-includes/js/tinymce/wordpress.css?ver=311" }, 158 159 159 160 { "url" : "../wp-includes/js/tinymce/themes/advanced/img/icons.gif" }, -
branches/crazyhorse/wp-admin/includes/file.php
r8103 r8242 286 286 287 287 $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback ); 288 288 289 // Strip the query strings. 290 $filename = str_replace('?','-', $filename); 291 $filename = str_replace('&','-', $filename); 292 289 293 // Move the file to the uploads dir 290 294 $new_file = $uploads['path'] . "/$filename"; -
branches/crazyhorse/wp-admin/includes/media.php
r8067 r8242 63 63 } 64 64 65 function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) { 66 67 if ( empty($alt) ) return $html; 68 $id = ( 0 < (int) $id ) ? 'attachment_' . $id : ''; 69 70 preg_match( '/width="([0-9]+)/', $html, $matches ); 71 if ( ! isset($matches[1]) ) return $html; 72 $width = $matches[1]; 73 74 $html = preg_replace( '/align[^\s\'"]+\s?/', '', $html ); 75 if ( empty($align) ) $align = 'none'; 76 77 $shcode = '[wp_caption id="' . $id . '" align="align' . $align 78 . '" width="' . $width . '" caption="' . $alt . '"]' . $html . '[/wp_caption]'; 79 80 return apply_filters( 'image_add_caption_shortcode', $shcode, $html ); 81 } 82 add_filter( 'image_send_to_editor', 'image_add_caption', 20, 7 ); 83 65 84 function media_send_to_editor($html) { 66 85 ?> 67 86 <script type="text/javascript"> 68 <!-- 69 top.send_to_editor('<?php echo addslashes($html); ?>');70 top.tb_remove();71 --> 87 /* <![CDATA[ */ 88 var win = window.dialogArguments || opener || parent || top; 89 win.send_to_editor('<?php echo addslashes($html); ?>'); 90 /* ]]> */ 72 91 </script> 73 92 <?php … … 116 135 } 117 136 118 119 function media_sideload_image($file, $post_id, $desc = null) {120 121 if (!empty($file) ) {122 // Upload File button was clicked123 124 $file_array['name'] = basename($file);125 $file_array['tmp_name'] = download_url($file);126 $desc = @$desc;127 128 $sideload = media_handle_sideload($file_array, $post_id, $desc);129 130 $id = $sideload['id'];131 $src = $sideload['src'];132 133 unset($file_array['tmp_name']);134 unset($file_array);135 136 if ( is_wp_error($id) ) {137 $errors['upload_error'] = $id;138 $id = false;139 }140 }141 142 if ( !empty($src) && !strpos($src, '://') )143 144 $src = "http://$src";145 $alt = @$desc;146 147 if ( !empty($src) )148 $html = "<img src='$src' alt='$alt' />";149 return $html;150 151 }152 153 137 function media_handle_sideload($file_array, $post_id, $desc = null, $post_data = array()) { 154 138 $overrides = array('test_form'=>false); … … 187 171 if ( !is_wp_error($id) ) { 188 172 wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); 189 } 190 191 return array('id' => $id, 'src' => $url); 192 173 return $url; 174 } 175 return $id; 193 176 } 194 177 … … 347 330 348 331 return wp_iframe( 'media_upload_type_form', 'image', $errors, $id ); 332 } 333 334 function media_sideload_image($file, $post_id, $desc = null) { 335 if (!empty($file) ) { 336 $file_array['name'] = basename($file); 337 $file_array['tmp_name'] = download_url($file); 338 $desc = @$desc; 339 340 $id = media_handle_sideload($file_array, $post_id, $desc); 341 $src = $id; 342 343 unset($file_array); 344 345 if ( is_wp_error($id) ) { 346 $errors['upload_error'] = $id; 347 return $id; 348 } 349 } 350 351 if ( !empty($src) ) { 352 $alt = @$desc; 353 $html = "<img src='$src' alt='$alt' />"; 354 return $html; 355 } 349 356 } 350 357 … … 861 868 post_params : { 862 869 "post_id" : "<?php echo $post_id; ?>", 863 "auth_cookie" : "<?php echo $_COOKIE[AUTH_COOKIE]; ?>",870 "auth_cookie" : "<?php if ( is_ssl() ) echo $_COOKIE[SECURE_AUTH_COOKIE]; else echo $_COOKIE[AUTH_COOKIE]; ?>", 864 871 "_wpnonce" : "<?php echo wp_create_nonce('media-form'); ?>", 865 872 "type" : "<?php echo $type; ?>", -
branches/crazyhorse/wp-admin/includes/misc.php
r7508 r8242 68 68 } 69 69 if (!$foundit) { 70 fwrite( $f, " # BEGIN {$marker}\n" );70 fwrite( $f, "\n# BEGIN {$marker}\n" ); 71 71 foreach ( $insertion as $insertline ) 72 72 fwrite( $f, "{$insertline}\n" ); -
branches/crazyhorse/wp-admin/includes/schema.php
r8151 r8242 154 154 function populate_options() { 155 155 global $wpdb, $wp_db_version; 156 157 $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 158 $guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 156 157 $guessurl = wp_guess_url(); 159 158 160 159 do_action('populate_options'); … … 256 255 // 2.6 257 256 add_option('avatar_default', 'mystery'); 258 add_option('enable_app', 0);259 add_option('enable_xmlrpc', 0);257 add_option('enable_app', 0); 258 add_option('enable_xmlrpc', 0); 260 259 261 260 // Delete unused options -
branches/crazyhorse/wp-admin/includes/template.php
r8222 r8242 758 758 $actions = array(); 759 759 760 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | ';761 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | ';762 763 // we're looking at list of only approved or only unapproved comments764 if ( 'moderated' == $comment_status ) {765 $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | ';766 unset($actions['unapprove']);767 } elseif ( 'approved' == $comment_status ) {768 $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | ';769 unset($actions['approve']);770 }771 772 760 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 761 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | '; 762 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | '; 763 764 // we're looking at list of only approved or only unapproved comments 765 if ( 'moderated' == $comment_status ) { 766 $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | '; 767 unset($actions['unapprove']); 768 } elseif ( 'approved' == $comment_status ) { 769 $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | '; 770 unset($actions['approve']); 771 } 772 773 773 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a> | '; 774 774 $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a> | '; 775 775 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete'>" . __('Delete') . '</a>'; 776 $actions = apply_filters( 'comment_row_actions', $actions, $comment ); 776 777 foreach ( $actions as $action => $link ) 777 778 echo "<span class='$action'>$link</span>"; … … 912 913 <tr class="submit"><td colspan="3"> 913 914 <?php wp_nonce_field( 'add-meta', '_ajax_nonce', false ); ?> 914 <input type="submit" id="addmetasub" name="addmeta" class="add:the-list:newmeta ::post_id=<?php echo $GLOBALS['post_ID'] ? $GLOBALS['post_ID'] : $GLOBALS['temp_ID']; ?>" tabindex="9" value="<?php _e( 'Add Custom Field' ) ?>" />915 <input type="submit" id="addmetasub" name="addmeta" class="add:the-list:newmeta" tabindex="9" value="<?php _e( 'Add Custom Field' ) ?>" /> 915 916 </td></tr> 916 917 </table> -
branches/crazyhorse/wp-admin/includes/upgrade.php
r8151 r8242 7 7 8 8 if ( !function_exists('wp_install') ) : 9 function wp_install($blog_title, $user_name, $user_email, $public, $ remote) {9 function wp_install($blog_title, $user_name, $user_email, $public, $deprecated='') { 10 10 global $wp_rewrite; 11 11 … … 19 19 update_option('admin_email', $user_email); 20 20 update_option('blog_public', $public); 21 update_option('enable_app',$remote); 22 update_option('enable_xmlrpc',$remote); 23 24 $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 25 26 if ( defined('WP_SITEURL') && '' != WP_SITEURL ) 27 $guessurl = WP_SITEURL; 28 else 29 $guessurl = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 21 22 $guessurl = wp_guess_url(); 30 23 31 24 update_option('siteurl', $guessurl); … … 212 205 upgrade_252(); 213 206 214 if ( $wp_current_db_version < 8 000)207 if ( $wp_current_db_version < 8201 ) 215 208 upgrade_260(); 216 209 … … 750 743 751 744 function upgrade_260() { 752 populate_roles_260(); 745 if ( $wp_current_db_version < 8000 ) 746 populate_roles_260(); 747 748 if ( $wp_current_db_version < 8201 ) { 749 update_option('enable_app', 1); 750 update_option('enable_xmlrpc', 1); 751 } 753 752 } 754 753 … … 882 881 global $wpdb; 883 882 884 // Sep erate individual queries into an array883 // Separate individual queries into an array 885 884 if( !is_array($queries) ) { 886 885 $queries = explode( ';', $queries ); -
branches/crazyhorse/wp-admin/includes/user.php
r7645 r8242 355 355 function do_paging() { 356 356 if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results 357 $args = array(); 358 if( ! empty($this->search_term) ) 359 $args['usersearch'] = urlencode($this->search_term); 360 if( ! empty($this->role) ) 361 $args['role'] = urlencode($this->role); 362 357 363 $this->paging_text = paginate_links( array( 358 364 'total' => ceil($this->total_users_for_query / $this->users_per_page), … … 360 366 'base' => 'users.php?%_%', 361 367 'format' => 'userspage=%#%', 362 'add_args' => array( 'usersearch' => urlencode($this->search_term) )368 'add_args' => $args 363 369 ) ); 364 370 } -
branches/crazyhorse/wp-admin/install.php
r8151 r8242 54 54 <td colspan="2"><label><input type="checkbox" name="blog_public" value="1" checked="checked" /> <?php _e('Allow my blog to appear in search engines like Google and Technorati.'); ?></label></td> 55 55 </tr> 56 <tr>57 <td colspan="2"><label><input type="checkbox" name="enable_remotepublishing" value="0" /> <?php _e('Enable remote publishing using the WordPress, Movable Type, MetaWeblog, Blogger and Atom publishing protocols for my blog.'); ?></label></td>58 </tr>59 </table>60 56 </table> 61 57 <input type="submit" name="Submit" value="<?php _e('Install WordPress'); ?>" class="button" /> … … 73 69 $admin_email = stripslashes($_POST['admin_email']); 74 70 $public = (int) $_POST['blog_public']; 75 $remote = (int) $_POST['enable_remotepublishing'];76 71 // check e-mail address 77 72 if (empty($admin_email)) { … … 84 79 85 80 $wpdb->show_errors(); 86 $result = wp_install($weblog_title, 'admin', $admin_email, $public , $remote);81 $result = wp_install($weblog_title, 'admin', $admin_email, $public); 87 82 extract($result, EXTR_SKIP); 88 83 ?> -
branches/crazyhorse/wp-admin/js/editor.js
r7716 r8242 53 53 content = content.replace(new RegExp('\\s*<div', 'mg'), '\n<div'); 54 54 content = content.replace(new RegExp('</div>\\s*', 'mg'), '</div>\n'); 55 content = content.replace(new RegExp('\\s*\\[wp_caption([^\\[]+)\\[/wp_caption\\]\\s*', 'gi'), '\n\n[wp_caption$1[/wp_caption]\n\n'); 55 56 56 57 var blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre'; … … 70 71 // Trim whitespace 71 72 content = content.replace(new RegExp('^\\s*', ''), ''); 72 content = content.replace(new RegExp(' \\s*$', ''), '');73 content = content.replace(new RegExp('[\\s\\u00a0]*$', ''), ''); 73 74 74 75 // put back the line breaks in pre|script … … 165 166 pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*<br />', 'gi'), "$1"); 166 167 pee = pee.replace(new RegExp('<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)', 'gi'), '$1'); 168 pee = pee.replace(new RegExp('(?:<p>|<br ?/?>)*\\s*\\[wp_caption([^\\[]+)\\[/wp_caption\\]\\s*(?:</p>|<br ?/?>)*', 'gi'), '[wp_caption$1[/wp_caption]'); 167 169 // pee = pee.replace(new RegExp('^((?: )*)\\s', 'mg'), '$1 '); 168 170 -
branches/crazyhorse/wp-admin/js/media-upload.js
r7989 r8242 1 1 // send html to the post editor 2 2 function send_to_editor(h) { 3 var win = window.dialogArguments || opener || parent || top; 3 if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.activeEditor ) && !ed.isHidden() ) { 4 ed.focus(); 5 if (tinymce.isIE) 6 ed.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark); 4 7 5 tinyMCE = win.tinyMCE; 6 if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.getInstanceById('content') ) && !ed.isHidden() ) { 7 tinyMCE.selectedInstance.getWin().focus(); 8 tinyMCE.execCommand('mceInsertContent', false, h); 8 ed.execCommand('mceInsertContent', false, h); 9 ed.execCommand('mceCleanup'); 9 10 } else 10 win.edInsertContent(win.edCanvas, h); 11 edInsertContent(edCanvas, h); 12 13 tb_remove(); 11 14 } 12 15 … … 23 26 $('#TB_iframeContent').width( W - 50 ).height( H - 75 ); 24 27 tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'}); 25 if ( ! ( $.browser.msie && $.browser.version.substr(0,1) < 7 ))28 if ( typeof document.body.style.maxWidth != 'undefined' ) 26 29 tbWindow.css({'top':'20px','margin-top':'0'}); 27 30 $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'}); … … 36 39 }); 37 40 }; 41 42 jQuery('a.thickbox').click(function(){ 43 if ( typeof tinyMCE != 'undefined' && tinyMCE.activeEditor ) { 44 tinyMCE.get('content').focus(); 45 tinyMCE.activeEditor.windowManager.bookmark = tinyMCE.activeEditor.selection.getBookmark('simple'); 46 } 47 }); 38 48 39 49 $(window).resize( function() { tb_position() } ); -
branches/crazyhorse/wp-admin/js/post.js
r8220 r8242 99 99 100 100 // auto-suggest stuff 101 jQuery('#newtag').suggest( 'admin-ajax.php?action=ajax-tag-search', { delay: 500, minchars: 2 } );101 jQuery('#newtag').suggest( 'admin-ajax.php?action=ajax-tag-search', { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } ); 102 102 jQuery('#newtag').keypress( tag_press_key ); 103 103 … … 182 182 autosave_update_post_ID(s.parsed.responses[0].supplemental.postid); 183 183 } 184 } }); 184 }, addBefore: function( s ) { 185 s.data += '&post_id=' + jQuery('#post_ID').val(); 186 return s; 187 } 188 }); 185 189 }); -
branches/crazyhorse/wp-admin/js/theme-preview.js
r7989 r8242 13 13 $('#TB_iframeContent').width( W - 90 ).height( H - 90 ); 14 14 tbWindow.css({'margin-left': '-' + parseInt((( W - 90 ) / 2),10) + 'px'}); 15 if ( ! ( $.browser.msie && $.browser.version.substr(0,1) < 7 ))15 if ( typeof document.body.style.maxWidth != 'undefined' ) 16 16 tbWindow.css({'top':'30px','margin-top':'0'}); 17 17 }; -
branches/crazyhorse/wp-admin/options-writing.php
r8151 r8242 134 134 <p class="submit"> 135 135 <input type="hidden" name="action" value="update" /> 136 <input type="hidden" name="page_options" value="default_post_edit_rows,use_smilies,ping_sites,mailserver_url,mailserver_port,mailserver_login,mailserver_pass,default_category,default_email_category,use_balanceTags,default_link_category " />136 <input type="hidden" name="page_options" value="default_post_edit_rows,use_smilies,ping_sites,mailserver_url,mailserver_port,mailserver_login,mailserver_pass,default_category,default_email_category,use_balanceTags,default_link_category,enable_app,enable_xmlrpc" /> 137 137 <input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" /> 138 138 </p> -
branches/crazyhorse/wp-admin/plugins.php
r8158 r8242 3 3 4 4 $action = ''; 5 foreach( array('activate-selected', 'deactivate-selected', 'delete-selected' ) as $action_key ) {5 foreach( array('activate-selected', 'deactivate-selected', 'delete-selected', 'clear-recent-list') as $action_key ) { 6 6 if( isset($_POST[$action_key]) ) { 7 7 $action = $action_key; … … 150 150 require_once('admin-footer.php'); 151 151 exit; 152 } 152 } //Endif verify-delete 153 153 $delete_result = delete_plugins($plugins); 154 154 155 155 wp_cache_delete('plugins', 'plugins'); 156 156 break; 157 case 'clear-recent-list': 158 update_option('recently_activated', array()); 157 159 break; 158 160 } … … 198 200 <?php 199 201 202 $all_plugins = get_plugins(); 200 203 $active_plugins = array(); 201 $ available_plugins = array();204 $inactive_plugins = array(); 202 205 $recent_plugins = array(); 203 206 $recently_activated = (array)get_option('recently_activated'); … … 209 212 if( $recently_activated != get_option('recently_activated') ) //If array changed, update it. 210 213 update_option('recently_activated', $recently_activated); 211 212 $all_plugins = get_plugins();213 214 214 215 $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()); … … 224 225 $plugin_data['Description'] .= ' <cite>' . sprintf( __('By %s'), $plugin_data['Author'] ) . '.</cite>'; 225 226 227 //Filter into individual sections 226 228 if ( is_plugin_active($plugin_file) ) { 227 229 $active_plugins[ $plugin_file ] = $plugin_data; … … 230 232 $recent_plugins[ $plugin_file ] = $plugin_data; 231 233 else 232 $ available_plugins[ $plugin_file ] = $plugin_data;234 $inactive_plugins[ $plugin_file ] = $plugin_data; 233 235 } 234 236 } … … 290 292 ?> 291 293 294 <?php if ( ! empty($active_plugins) ) : ?> 292 295 <h3 id="currently-active"><?php _e('Currently Active Plugins') ?></h3> 293 296 <form method="post" action="<?php echo admin_url('plugins.php') ?>"> … … 308 311 309 312 <p><?php printf(__('If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the <code>%s</code> directory and it will be automatically deactivated.'), WP_PLUGIN_DIR); ?></p> 313 <?php endif; ?> 310 314 311 315 <?php if ( ! empty($recent_plugins) ) : ?> 312 316 <h3 id="recent-plugins"><?php _e('Recently Active Plugins') ?></h3> 317 <p><?php _e('The following plugins were recently active. When a plugin has been inactive for more than 7 days it will be moved to the Inactive plugin list.') ?></p> 313 318 <form method="post" action="<?php echo admin_url('plugins.php') ?>"> 314 319 <?php wp_nonce_field('bulk-manage-plugins') ?> … … 324 329 </select> 325 330 <input type="submit" value="<?php _e('Apply'); ?>" name="doaction" class="button-secondary action" /> 331 <input type="submit" name="clear-recent-list" value="<?php _e('Clear List') ?>" class="button-secondary" /> 326 332 </div> 327 333 </div> … … 331 337 <?php endif; ?> 332 338 333 <h3 id="available-plugins"><?php _e('Available Plugins') ?></h3> 339 <?php if ( ! empty($inactive_plugins) ) : ?> 340 <h3 id="inactive-plugins"><?php _e('Inactive Plugins') ?></h3> 334 341 <form method="post" action="<?php echo admin_url('plugins.php') ?>"> 335 342 <?php wp_nonce_field('bulk-manage-plugins') ?> 336 343 337 <?php if ( ! empty($available_plugins) ) : ?>338 344 <div class="tablenav"> 339 345 <div class="alignleft"> … … 345 351 </div> 346 352 <br class="clear" /> 347 <?php print_plugins_table($ available_plugins, 'available') ?>353 <?php print_plugins_table($inactive_plugins, 'inactive') ?> 348 354 </form> 355 <?php endif; ?> 356 357 <?php if ( empty($all_plugins) ) : ?> 358 <p><?php _e('You do not appear to have any plugins available at this time.') ?></p> 349 359 <?php endif; ?> 350 360 -
branches/crazyhorse/wp-admin/press-this.php
r8151 r8242 5 5 6 6 <?php 7 8 function preg_quote2($string) { 9 return str_replace('/', '\/', preg_quote($string)); 10 } 7 11 function press_it() { 8 #define some basic variables12 // define some basic variables 9 13 $quick['post_status'] = $_REQUEST['post_status']; 10 14 $quick['post_category'] = $_REQUEST['post_category']; … … 13 17 $quick['post_content'] = ''; 14 18 15 #insert the post with nothing in it, to get an ID19 // insert the post with nothing in it, to get an ID 16 20 $post_ID = wp_insert_post($quick, true); 17 21 … … 24 28 25 29 case 'photo': 26 foreach($_REQUEST['photo_src'] as $key => $data) { 30 $content = $_REQUEST['content']; 31 32 foreach($_REQUEST['photo_src'] as $key => $image) { 27 33 #quote for matching 28 $quoted = str_replace('/', '\/', preg_quote($data));34 $quoted = preg_quote2($image); 29 35 30 #see if files exist in content - we don't want to upload non-used selected files.36 // see if files exist in content - we don't want to upload non-used selected files. 31 37 preg_match('/'.$quoted.'/', $_REQUEST['content'], $matches[0]); 32 if($matches[0]) 33 media_sideload_image($data, $post_ID, $_REQUEST['photo_description'][$key]); 38 if($matches[0]) { 39 $upload = media_sideload_image($image, $post_ID, $_REQUEST['photo_description'][$key]); 40 // Replace the POSTED content <img> with correct uploaded ones. 41 if( !is_wp_error($upload) ) $content = preg_replace('/<img ([^>]*)src=(\"|\')'.$quoted.'(\2)([^>\/]*)\/*>/is', $upload, $content); 42 } 34 43 } 35 $content = $_REQUEST['content'];44 36 45 break; 37 46 … … 46 55 47 56 #error handling for $post 48 if ( is_wp_error($post_ID) 57 if ( is_wp_error($post_ID)) { 49 58 wp_die($id); 50 59 wp_delete_post($post_ID); 51 52 60 #error handling for media_sideload 61 } elseif ( is_wp_error($upload)) { 62 wp_die($upload); 63 wp_delete_post($post_ID); 53 64 } else { 54 65 $quick['ID'] = $post_ID; … … 79 90 </head> 80 91 <body class="press-this"> 81 <div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a onclick="window.opener.location.replace(this.href); window.close();" href="<?php echo get_permalink( $post_ID); ?>"><?php _e('View post'); ?></a> | <a href="post.php?action=edit&post=<?php echo $post_ID; ?>" onclick="window.opener.location.replace(this.href); window.close();"><?php _e('Edit post'); ?></a> | <a href="#" onclick="window.close();">Close Window</a></p></div> 92 93 <div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a onclick="window.opener.location.replace(this.href); window.close();" href="<?php echo get_permalink( $post_ID); ?>"><?php _e('View post'); ?></a> | <a href="post.php?action=edit&post=<?php echo $post_ID; ?>" onclick="window.opener.location.replace(this.href); window.close();"><?php _e('Edit post'); ?></a> | <a href="#" onclick="window.close();"><?php _e('Close Window'); ?></a></p></div> 82 94 83 95 <div id="footer"> … … 104 116 105 117 // Ajax Requests 106 $title = wp_specialchars( stripslashes($_GET['t']));118 $title = wp_specialchars(aposfix(stripslashes($_GET['t']))); 107 119 108 120 $selection = str_replace("\n", "<br />", aposfix( stripslashes($_GET['s']) ) ); … … 111 123 112 124 if($_REQUEST['ajax'] == 'thickbox') { ?> 125 <script type="text/javascript" charset="utf-8"> 126 jQuery('.cancel').click(function() { 127 tb_remove(); 128 }); 129 130 jQuery('.select').click(function() { 131 image_selector(); 132 }); 133 </script> 113 134 <h3 id="title"><label for="post_title"><?php _e('Description') ?></label></h3> 114 135 <div class="titlewrap"> … … 116 137 </div> 117 138 118 <p><input type="hidden" name="this_photo" value="<?php echo $image; ?>" id="this_photo" />119 <a href="#" class="select"><img src="<?php echo $image; ?>" width="475" alt="Click to insert." title="Click to insert." /></a></p>120 121 <p id="options"><a href="#" class="select"> Insert Image</a> | <a href="#" class="cancel">Cancel</a></p>139 <p><input type="hidden" name="this_photo" value="<?php echo attribute_escape($image); ?>" id="this_photo" /> 140 <a href="#" class="select"><img src="<?php echo clean_url($image); ?>" width="475" alt="<?php echo attribute_escape(__('Click to insert.')); ?>" title="<?php echo attribute_escape(__('Click to insert.')); ?>" /></a></p> 141 142 <p id="options"><a href="#" class="select"><?php _e('Insert Image'); ?></a> | <a href="#" class="cancel"><?php _e('Cancel'); ?></a></p> 122 143 <?php die; 123 144 } 124 145 125 146 if($_REQUEST['ajax'] == 'thickbox_url') { ?> 147 <script type="text/javascript" charset="utf-8"> 148 jQuery('.cancel').click(function() { 149 tb_remove(); 150 }); 151 152 jQuery('.select').click(function() { 153 image_selector(); 154 }); 155 </script> 126 156 <h3 id="title"><label for="post_title"><?php _e('URL') ?></label></h3> 127 157 <div class="titlewrap"> … … 135 165 </div> 136 166 137 <p id="options"><a href="#" class="select"> Insert Image</a> | <a href="#" class="cancel">Cancel</a></p>167 <p id="options"><a href="#" class="select"><?php _e('Insert Image'); ?></a> | <a href="#" class="cancel"><?php _e('Cancel'); ?></a></p> 138 168 <?php die; 139 169 } … … 142 172 <h2 id="embededcode"><label for="embed_code"><?php _e('Embed Code') ?></label></h2> 143 173 <div class="titlewrap" > 144 <textarea name="embed_code" id="embed_code" rows="8" cols="40"><?php echo $selection; ?></textarea>174 <textarea name="embed_code" id="embed_code" rows="8" cols="40"><?php echo format_to_edit($selection); ?></textarea> 145 175 </div> 146 176 <?php die; … … 149 179 if($_REQUEST['ajax'] == 'photo_images') { 150 180 function get_images_from_uri($uri) { 151 if(preg_match('/\.(jpg| png|gif)/', $uri) && !strpos($uri,'blogger.com'))181 if(preg_match('/\.(jpg|jpe|jpeg|png|gif)/', $uri) && !strpos($uri,'blogger.com')) 152 182 return "'".$uri."'"; 153 183 … … 157 187 $host = parse_url($uri); 158 188 159 $pattern = '/<img ([^>]*)src=(\"|\')( .+?)(\2)([^>\/]*)\/*>/is';189 $pattern = '/<img ([^>]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif))(\2)([^>\/]*)\/*>/is'; 160 190 preg_match_all($pattern, $content, $matches); 161 191 … … 170 200 $src = 'http://'.str_replace('//','/', $host['host'].'/'.$host['path'].'/'.$src); 171 201 172 $sources[] = $src;202 $sources[] = clean_url($src); 173 203 } 174 204 return "'" . implode("','", $sources) . "'"; … … 182 212 183 213 if($_REQUEST['ajax'] == 'photo_js') { ?> 184 185 tb_init('a.thickbox, area.thickbox, input.thickbox'); //pass where to apply thickbox 214 215 216 // gather images and load some default JS 217 218 var last = null 219 var img, img_tag, aspect, w, h, skip, i, strtoappend = ""; 220 var my_src = eval( 221 jQuery.ajax({ 222 type: "GET", 223 url: "<?php echo clean_url($_SERVER['PHP_SELF']); ?>", 224 cache : false, 225 async : false, 226 data: "ajax=photo_images&u=<?php echo urlencode($url); ?>", 227 dataType : "script" 228 }).responseText 229 ); 230 231 for (i = 0; i < my_src.length; i++) { 232 img = new Image(); 233 img.src = my_src[i]; 234 img_attr = 'id="img' + i + '"'; 235 skip = false; 236 if (img.width && img.height) { 237 if (img.width * img.height < 2500) 238 skip = true; 239 aspect = img.width / img.height; 240 scale = (aspect > 1) ? (75 / img.width) : (75 / img.height); 186 241 187 function image_selector() {188 desc = jQuery('#this_photo_description').val();189 src = jQuery('#this_photo').val();190 pick(src, desc);191 tb_remove();192 return false;242 w = img.width; 243 h = img.height; 244 245 if (scale < 1) { 246 w = parseInt(img.width * scale); 247 h = parseInt(img.height * scale); 193 248 } 194 195 jQuery(document).ready(function() { 196 jQuery('#this_photo').focus(); 197 198 jQuery('.cancel').click(function() { 199 tb_remove(); 200 }); 201 202 jQuery('.select').click(function() { 203 image_selector(); 204 }); 205 206 jQuery('#photo_add_url').attr('href', '?ajax=thickbox_url&height=200&width=500'); 207 208 }); 209 210 211 function pick(img, desc) { 212 if (img) { 213 length = jQuery('.photolist input').length; 214 if(length == 0) length = 1; 215 jQuery('.photolist').append('<input name="photo_src[' + length + ']" value="' + img +'" type="hidden"/>'); 216 jQuery('.photolist').append('<input name="photo_description[' + length + ']" value="' + desc +'" type="hidden"/>'); 217 append_editor('<img src="' + img +'" alt="' + desc + '" />'); } 218 tinyMCE.activeEditor.resizeToContent(); 219 return false; 220 } 221 222 var last = null 223 var my_src, img, img_tag, aspect, w, h, skip, i, strtoappend = ""; 224 var my_src = eval( 225 jQuery.ajax({ 226 type: "GET", 227 url: "<?php echo clean_url($_SERVER['PHP_SELF']); ?>", 228 cache : false, 229 async : false, 230 data: "ajax=photo_images&u=<?php echo urlencode($url); ?>", 231 dataType : "script" 232 }).responseText); 233 234 for (i = 0; i < my_src.length; i++) { 235 img = new Image(); img.src = my_src[i]; img_attr = 'id="img' + i; skip = false; 236 237 if (img.width && img.height) { 238 if (img.width * img.height < 2500) 239 skip = true; 240 aspect = img.width / img.height; 241 scale = (aspect > 1) ? (75 / img.width) : (75 / img.height); 242 243 if (scale < 1) { 244 w = parseInt(img.width * scale); 245 h = parseInt(img.height * scale); 246 } else { 247 w = img.width; 248 h = img.height; 249 } 250 img_attr += ' style="width: ' + w + 'px; height: ' + h + 'px;"'; 251 } 252 253 if (!skip) strtoappend += '<a href="?ajax=thickbox&i=' + img.src + '&u=<?php echo $url; ?>&height=400&width=500" title="" class="thickbox"><img src="' + img.src + '" ' + img_attr + '/></a>'; 254 255 } 256 jQuery('#img_container').html(strtoappend); 257 249 img_attr += ' style="width: ' + w + 'px; height: ' + h + 'px;"'; 250 } 251 if (!skip) strtoappend += '<a href="?ajax=thickbox&i=' + img.src + '&u=<?php echo $url; ?>&height=400&width=500" title="" class="thickbox"><img src="' + img.src + '" ' + img_attr + '/></a>'; 252 } 253 254 function pick(img, desc) { 255 if (img) { 256 length = jQuery('.photolist input').length; 257 if(length == 0) length = 1; 258 jQuery('.photolist').append('<input name="photo_src[' + length + ']" value="' + img +'" type="hidden"/>'); 259 jQuery('.photolist').append('<input name="photo_description[' + length + ']" value="' + desc +'" type="hidden"/>'); 260 append_editor('<img src="' + img +'" alt="' + desc + '" />'); 261 } 262 tinyMCE.activeEditor.resizeToContent(); 263 return false; 264 } 265 266 function image_selector() { 267 tb_remove(); 268 desc = jQuery('#this_photo_description').val(); 269 src = jQuery('#this_photo').val(); 270 pick(src, desc); 271 return false; 272 } 273 274 jQuery(document).ready(function() { 275 jQuery('#img_container').html(strtoappend); 276 jQuery('#photo_add_url').attr('href', '?ajax=thickbox_url&height=200&width=500'); 277 tb_init('a.thickbox, area.thickbox, input.thickbox'); 278 }); 279 258 280 <?php die; } 259 281 … … 288 310 <script type="text/javascript"> 289 311 jQuery('#tags-input').hide(); 290 291 312 tag_update_quickclicks(); 292 313 … … 314 335 jQuery("#post_type").val(type); 315 336 } 337 316 338 function set_editor(text) { 317 339 … … 319 341 if(tinyMCE.activeEditor) tinyMCE.execCommand('mceInsertContent' ,false, text); 320 342 } 343 321 344 function append_editor(text) { 322 345 if(tinyMCE.activeEditor) tinyMCE.execCommand('mceInsertContent' ,false, text); 323 346 } 347 324 348 function set_title(title) { jQuery("#content_type").text(title); } 325 349 … … 331 355 set_menu('text'); 332 356 set_title('<?php _e('Post') ?>'); 333 334 357 return false; 335 break;358 break; 336 359 case 'quote' : 337 360 set_menu('quote'); 338 361 set_title('<?php _e('Quote') ?>'); 339 set_editor("<blockquote><p><?php echo $selection; ?> </p><p><cite><a href='<?php echo $url; ?>'><?php echo $title; ?> </a> </cite> </p></blockquote>");362 set_editor("<blockquote><p><?php echo format_to_edit($selection); ?> </p><p><cite><a href='<?php echo $url; ?>'><?php echo $title; ?> </a> </cite> </p></blockquote>"); 340 363 return false; 341 break;364 break; 342 365 case 'video' : 343 344 366 set_menu('video'); 345 367 set_title('<?php _e('Caption') ?>'); … … 348 370 jQuery('body').addClass('video_split'); 349 371 jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo attribute_escape($selection); ?>'}, function() { 350 351 372 <?php 352 373 if ( preg_match("/youtube\.com\/watch/i", $url) ) { … … 359 380 $content = '<object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=' . $video_id . '&server=www.vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /> <embed src="http://www.vimeo.com/moogaloop.swf?clip_id=' . $video_id . '&server=www.vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object>'; 360 381 361 if(trim($selection) == '') $selection = '<a href="http://www.vimeo.com/' . $video_id . '?pg=embed&sec=' . $video_id . '">' . $title . '</a> on <a href="http://vimeo.com?pg=embed&sec=' . $video_id . '">Vimeo</a>'; 362 }else { 382 if ( trim($selection) == '' ) 383 $selection = '<a href="http://www.vimeo.com/' . $video_id . '?pg=embed&sec=' . $video_id . '">' . $title . '</a> on <a href="http://vimeo.com?pg=embed&sec=' . $video_id . '">Vimeo</a>'; 384 } else { 363 385 $content = $selection; 364 386 } ?> … … 367 389 set_editor("<?php echo $title; ?>"); 368 390 }); 369 370 391 return false; 371 break; 372 392 break; 373 393 case 'photo' : 374 394 set_menu('photo'); 375 set_title(' Post');376 <?php if ($selection) { ?>377 set_editor("<?php echo $selection; ?>");395 set_title('<?php _e('Post') ?>'); 396 <?php if ($selection) { ?> 397 set_editor("<?php echo format_to_edit($selection); ?>"); 378 398 <?php } ?> 379 399 jQuery('#extra_fields').show(); 380 jQuery('#extra_fields').before('<h2 id="waiting"><img src="images/loading.gif" alt="" /> Loading...</h2>');400 jQuery('#extra_fields').before('<h2 id="waiting"><img src="images/loading.gif" alt="" /><?php echo js_escape( __( 'Loading...' ) ); ?></h2>'); 381 401 jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']).'/?ajax=photo&u='.attribute_escape($url); ?>'); 382 402 jQuery.ajax({ … … 390 410 } 391 411 }); 392 393 412 return false; 394 break; 395 413 break; 396 414 } 397 398 415 } 399 416 … … 405 422 }); 406 423 424 // Set default tabs 407 425 <?php if ( preg_match("/youtube\.com\/watch/i", $url) ) { ?> 408 426 show('video'); … … 413 431 <?php } ?> 414 432 }); 433 415 434 </script> 416 435 </head> 417 436 <body class="press-this"> 418 437 <div id="wphead"> 419 <h1><span id="viewsite"><a href="<?php echo get_option('home'); ?>/"><?php _e('Visit:') ?> <?php bloginfo('name'); ?></a></span></h1>438 <h1><span id="viewsite"><a href="<?php echo get_option('home'); ?>/"><?php _e('Visit:') ?> <?php bloginfo('name'); ?></a></span></h1> 420 439 </div> 421 440 422 <ul id="menu" class="ui-tabs-nav"> 423 <li id="text_button" class="ui-tabs-selected"><a href="#"><?php _e('Text') ?></a></li> 424 <li id="photo_button"><a href="#"><?php _e('Photo') ?></a></li> 425 <li id="quote_button"><a href="#"><?php _e('Quote') ?></a></li> 426 <li id="video_button"><a href="#"><?php _e('Video') ?></a></li> 427 </ul> 428 429 <form action="press-this.php?action=post" method="post"> 430 431 <?php wp_nonce_field('press-this') ?> 432 <input type="hidden" name="post_type" id="post_type" value="text"/> 433 <div id="posting"> 434 435 <h2 id="title"><label for="post_title"><?php _e('Title') ?></label></h2> 436 <div class="titlewrap"> 437 <input name="post_title" id="post_title" class="text" value="<?php echo attribute_escape($title);?>"/> 438 </div> 439 440 <div id="extra_fields" style="display: none"></div> 441 <div class="editor_area"> 442 <h2 id="content_type"><label for="content"><?php _e('Post') ?></label></h2> 443 <div class="editor-container"> 444 <textarea name="content" id="content" style="width:100%;" class="mceEditor"><?php if($selection) { ?><a href='<?php echo $url ?>'><?php echo $selection ?></a><?php } else { ?><a href='<?php echo $url ?>'><?php echo $title; ?></a><?php } ?></textarea> 445 </div> 446 </div> 447 448 </div> 449 <div id="categories"> 450 <div class="submitbox" id="submitpost"> 451 <div id="previewview"></div> 452 <div class="inside"> 453 <h2><?php _e('Categories') ?></h2> 454 <div id="categories-all"> 455 <ul id="categorychecklist" class="list:category categorychecklist form-no-clear"> 456 <?php wp_category_checklist() ?> 457 </ul> 458 </div> 459 <h2><?php _e('Tags') ?></h2> 460 <p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p> 461 <div id="tagchecklist"></div> 462 </div> 463 <label for="post_status" id="post_status"><input type="radio" name="post_status" value="publish" checked="checked" id="published" />Published <input type="radio" name="post_status" value="draft" id="unpubplished" /> Unpublished</label> 464 465 <p class="submit"> 466 <input type="submit" value="<?php _e('Publish') ?>" onclick="document.getElementById('photo_saving').style.display = '';"/> 467 <img src="images/loading-publish.gif" alt="" id="photo_saving" style="display:none;"/> 468 </p> 469 </div> 470 471 472 </form> 473 441 <ul id="menu" class="ui-tabs-nav"> 442 <li id="text_button" class="ui-tabs-selected"><a href="#"><?php _e('Text') ?></a></li> 443 <li id="photo_button"><a href="#"><?php _e('Photo') ?></a></li> 444 <li id="quote_button"><a href="#"><?php _e('Quote') ?></a></li> 445 <li id="video_button"><a href="#"><?php _e('Video') ?></a></li> 446 </ul> 447 448 <form action="press-this.php?action=post" method="post"> 449 <?php wp_nonce_field('press-this') ?> 450 <input type="hidden" name="post_type" id="post_type" value="text"/> 451 <div id="posting"> 452 <h2 id="title"><label for="post_title"><?php _e('Title') ?></label></h2> 453 <div class="titlewrap"> 454 <input name="post_title" id="post_title" class="text" value="<?php echo attribute_escape($title);?>"/> 455 </div> 456 457 <div id="extra_fields" style="display: none"></div> 458 459 <div class="editor_area"> 460 <h2 id="content_type"><label for="content"><?php _e('Post') ?></label></h2> 461 <div class="editor-container"> 462 <textarea name="content" id="content" style="width:100%;" class="mceEditor"><?php if ($selection) { ?><a href='<?php echo $url ?>'><?php echo format_to_edit($selection) ?></a><?php } else { ?><a href='<?php echo $url ?>'><?php echo $title; ?></a><?php } ?></textarea> 463 </div> 464 </div> 465 </div> 466 467 <div id="categories"> 468 <div class="submitbox" id="submitpost"> 469 <div id="previewview"></div> 470 <div class="inside"> 471 <h2><?php _e('Categories') ?></h2> 472 <div id="categories-all"> 473 <ul id="categorychecklist" class="list:category categorychecklist form-no-clear"> 474 <?php wp_category_checklist() ?> 475 </ul> 476 </div> 477 <h2><?php _e('Tags') ?></h2> 478 <p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p> 479 <div id="tagchecklist"></div> 480 </div> 481 <div id="post_status"> 482 <input type="radio" name="post_status" value="publish" checked="checked" id="published" /> <label for="published"><?php _e('Published'); ?></label> 483 <input type="radio" name="post_status" value="draft" id="unpublished" /> <label for="unpublished"><?php _e('Unpublished'); ?></label> 484 </div> 485 <p class="submit"> 486 <input type="submit" value="<?php _e('Publish') ?>" onclick="document.getElementById('photo_saving').style.display = '';"/> 487 <img src="images/loading-publish.gif" alt="" id="photo_saving" style="display:none;"/> 488 </p> 489 </div> 490 </form> 474 491 </body> 475 492 </html> -
branches/crazyhorse/wp-admin/revision.php
r8012 r8242 43 43 if ( !current_user_can( 'read_post', $left_revision->ID ) || !current_user_can( 'read_post', $right_revision->ID ) ) 44 44 break; 45 46 // If we're comparing a revision to itself, redirect to the 'view' page for that revision or the edit page for that post 47 if ( $left_revision->ID == $right_revision->ID ) { 48 $redirect = get_edit_post_link( $left_revision->ID ); 49 break; 50 } 45 51 46 52 // Don't allow reverse diffs? -
branches/crazyhorse/wp-admin/setup-config.php
r7971 r8242 1 1 <?php 2 2 define('WP_INSTALLING', true); 3 //These t wodefines are required to allow us to use require_wp_db() to load the database class while being wp-content/wp-db.php aware3 //These three defines are required to allow us to use require_wp_db() to load the database class while being wp-content/wp-db.php aware 4 4 define('ABSPATH', dirname(dirname(__FILE__)).'/'); 5 5 define('WPINC', 'wp-includes'); 6 define('WP_CONTENT_DIR', ABSPATH . 'wp-content'); 6 7 7 8 require_once('../wp-includes/compat.php'); -
branches/crazyhorse/wp-admin/theme-editor.php
r7979 r8242 44 44 $theme = urlencode($theme); 45 45 if (is_writeable($real_file)) { 46 //is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable 46 47 $f = fopen($real_file, 'w+'); 47 fwrite($f, $newcontent); 48 fclose($f); 49 $location = "theme-editor.php?file=$file&theme=$theme&a=te"; 48 if ($f !== FALSE) { 49 fwrite($f, $newcontent); 50 fclose($f); 51 $location = "theme-editor.php?file=$file&theme=$theme&a=te"; 52 } else { 53 $location = "theme-editor.php?file=$file&theme=$theme"; 54 } 50 55 } else { 51 56 $location = "theme-editor.php?file=$file&theme=$theme"; -
branches/crazyhorse/wp-admin/user-edit.php
r8151 r8242 319 319 ?> 320 320 <tr> 321 <th><label for="pass1"><?php _e('New Password :'); ?></label></th>321 <th><label for="pass1"><?php _e('New Password'); ?></label></th> 322 322 <td><input type="password" name="pass1" id="pass1" size="16" value="" /> <?php _e("If you would like to change the password type a new one. Otherwise leave this blank."); ?><br /> 323 323 <input type="password" name="pass2" id="pass2" size="16" value="" /> <?php _e("Type your new password again."); ?><br /> 324 324 <?php if ( $is_profile_page ): ?> 325 <p><strong><?php _e('Password Strength :'); ?></strong></p>325 <p><strong><?php _e('Password Strength'); ?></strong></p> 326 326 <div id="pass-strength-result"><?php _e('Too short'); ?></div> <?php _e('Hint: Use upper and lower case characters, numbers and symbols like !"?$%^&( in your password.'); ?> 327 327 <?php endif; ?> … … 343 343 <table width="99%" style="border: none;" cellspacing="2" cellpadding="3" class="editform"> 344 344 <tr> 345 <th scope="row"><?php _e('Additional Capabilities :') ?></th>345 <th scope="row"><?php _e('Additional Capabilities') ?></th> 346 346 <td><?php 347 347 $output = ''; -
branches/crazyhorse/wp-app.php
r8031 r8242 195 195 $this->redirect($this->get_service_url()); 196 196 } 197 198 // check to see if AtomPub is enabled 199 if( !get_option( 'enable_app' ) ) 200 $this->not_allowed( sprintf( __( 'AtomPub services are disabled on this blog. An admin user can enable them at %s' ), admin_url('options-writing.php') ) ); 197 201 198 202 // dispatch -
branches/crazyhorse/wp-content/themes/classic/style.css
r7361 r8242 320 320 text-transform: capitalize; 321 321 } 322 323 /* Captions & aligment */ 324 .aligncenter, 325 dl.aligncenter { 326 display: block; 327 margin-left: auto; 328 margin-right: auto; 329 } 330 331 .alignleft { 332 float: left; 333 } 334 335 .alignright { 336 float: right; 337 } 338 339 .wp_caption { 340 border: 1px solid #ddd; 341 text-align: center; 342 background-color: #f3f3f3; 343 padding-top: 4px; 344 margin: 10px; 345 -moz-border-radius: 3px; 346 -khtml-border-radius: 3px; 347 -webkit-border-radius: 3px; 348 border-radius: 3px; 349 } 350 351 .wp_caption img { 352 margin: 0; 353 padding: 0; 354 border: 0 none; 355 } 356 357 .wp_caption_dd { 358 font-size: 11px; 359 line-height: 17px; 360 padding: 0 4px 5px; 361 margin: 0; 362 } 363 /* End captions & aligment */ -
branches/crazyhorse/wp-content/themes/default/style.css
r7883 r8242 639 639 640 640 641 /* Captions */ 642 .aligncenter, 643 dl.aligncenter { 644 display: block; 645 margin-left: auto; 646 margin-right: auto; 647 } 648 649 .wp_caption { 650 border: 1px solid #ddd; 651 text-align: center; 652 background-color: #f3f3f3; 653 padding-top: 4px; 654 margin: 10px; 655 -moz-border-radius: 3px; 656 -khtml-border-radius: 3px; 657 -webkit-border-radius: 3px; 658 border-radius: 3px; 659 } 660 661 .wp_caption img { 662 margin: 0; 663 padding: 0; 664 border: 0 none; 665 } 666 667 .wp_caption_dd { 668 font-size: 11px; 669 line-height: 17px; 670 padding: 0 4px 5px; 671 margin: 0; 672 } 673 /* End captions */ 674 675 641 676 /* "Daisy, Daisy, give me your answer do. I'm half crazy all for the love of you. 642 677 It won't be a stylish marriage, I can't afford a carriage. -
branches/crazyhorse/wp-includes/bookmark-template.php
r8151 r8242 187 187 $defaults = array( 188 188 'orderby' => 'name', 'order' => 'ASC', 189 'limit' => -1, 'category' => '', 189 'limit' => -1, 'category' => '', 'exclude_category' => '', 190 190 'category_name' => '', 'hide_invisible' => 1, 191 191 'show_updated' => 0, 'echo' => 1, … … 204 204 if ( $categorize ) { 205 205 //Split the bookmarks into ul's for each category 206 $cats = get_terms('link_category', array('name__like' => $category_name, 'include' => $category, ' orderby' => $category_orderby, 'order' => $category_order, 'hierarchical' => 0));206 $cats = get_terms('link_category', array('name__like' => $category_name, 'include' => $category, 'exclude' => $exclude_category, 'orderby' => $category_orderby, 'order' => $category_order, 'hierarchical' => 0)); 207 207 208 208 foreach ( (array) $cats as $cat ) { -
branches/crazyhorse/wp-includes/class-smtp.php
r8103 r8242 250 250 * that is to be send with the headers. Each header needs to be 251 251 * on a single line followed by a <CRLF> with the message headers 252 * and the message body being sep erated by and additional <CRLF>.252 * and the message body being separated by and additional <CRLF>. 253 253 * 254 254 * Implements rfc 821: DATA <CRLF> -
branches/crazyhorse/wp-includes/comment-template.php
r7999 r8242 10 10 11 11 /** 12 * get_comment_author() - Retrieve the author of the current comment13 * 14 * If the comment has an empty comment_author field, then 'Anonymous' person 15 * isassumed.12 * Retrieve the author of the current comment. 13 * 14 * If the comment has an empty comment_author field, then 'Anonymous' person is 15 * assumed. 16 16 * 17 17 * @since 1.5 … … 30 30 31 31 /** 32 * comment_author() - Displays the author of the current comment32 * Displays the author of the current comment. 33 33 * 34 34 * @since 0.71 … … 41 41 42 42 /** 43 * get_comment_author_email() - Retrieve the email of the author of the current comment43 * Retrieve the email of the author of the current comment. 44 44 * 45 45 * @since 1.5 … … 55 55 56 56 /** 57 * comment_author_email() - Display the email of the author of the current global $comment 58 * 59 * Care should be taken to protect the email address and assure that email harvesters 60 * do not capture your commentors' email address. Most assume that their email address will 61 * not appear in raw form on the blog. Doing so will enable anyone, including those that 62 * people don't want to get the email address and use it for their own means good and bad. 57 * Display the email of the author of the current global $comment. 58 * 59 * Care should be taken to protect the email address and assure that email 60 * harvesters do not capture your commentors' email address. Most assume that 61 * their email address will not appear in raw form on the blog. Doing so will 62 * enable anyone, including those that people don't want to get the email 63 * address and use it for their own means good and bad. 63 64 * 64 65 * @since 0.71 … … 70 71 71 72 /** 72 * comment_author_email_link() - Display the html email link to the author of the current comment 73 * 74 * Care should be taken to protect the email address and assure that email harvesters 75 * do not capture your commentors' email address. Most assume that their email address will 76 * not appear in raw form on the blog. Doing so will enable anyone, including those that 77 * people don't want to get the email address and use it for their own means good and bad. 73 * Display the html email link to the author of the current comment. 74 * 75 * Care should be taken to protect the email address and assure that email 76 * harvesters do not capture your commentors' email address. Most assume that 77 * their email address will not appear in raw form on the blog. Doing so will 78 * enable anyone, including those that people don't want to get the email 79 * address and use it for their own means good and bad. 78 80 * 79 81 * @since 0.71 … … 97 99 98 100 /** 99 * get_comment_author_link() - Retrieve the html link to the url of the author of the current comment101 * Retrieve the html link to the url of the author of the current comment. 100 102 * 101 103 * @since 1.5 … … 117 119 118 120 /** 119 * comment_author_link() - Display the html link to the url of the author of the current comment121 * Display the html link to the url of the author of the current comment. 120 122 * 121 123 * @since 0.71 … … 127 129 128 130 /** 129 * get_comment_author_IP() - Retrieve the IP address of the author of the current comment131 * Retrieve the IP address of the author of the current comment. 130 132 * 131 133 * @since 1.5 … … 141 143 142 144 /** 143 * comment_author_IP() - Displays the IP address of the author of the current comment145 * Display the IP address of the author of the current comment. 144 146 * 145 147 * @since 0.71 … … 151 153 152 154 /** 153 * get_comment_author_url() - Returns the url of the author of the current comment155 * Retrieve the url of the author of the current comment. 154 156 * 155 157 * @since 1.5 … … 164 166 165 167 /** 166 * comment_author_url() - Display the url of the author of the current comment168 * Display the url of the author of the current comment. 167 169 * 168 170 * @since 0.71 … … 175 177 176 178 /** 177 * get_comment_author_url_link() - Retrieves the HTML link of the url of the author of the current comment 178 * 179 * $linktext parameter is only used if the URL does not exist for the comment author. If the URL does 180 * exist then the URL will be used and the $linktext will be ignored. 181 * 182 * Encapsulate the HTML link between the $before and $after. So it will appear in the order of $before, 183 * link, and finally $after. 179 * Retrieves the HTML link of the url of the author of the current comment. 180 * 181 * $linktext parameter is only used if the URL does not exist for the comment 182 * author. If the URL does exist then the URL will be used and the $linktext 183 * will be ignored. 184 * 185 * Encapsulate the HTML link between the $before and $after. So it will appear 186 * in the order of $before, link, and finally $after. 184 187 * 185 188 * @since 1.5 … … 203 206 204 207 /** 205 * comment_author_url_link() - Displays the HTML link of the url of the author of the current comment208 * Displays the HTML link of the url of the author of the current comment. 206 209 * 207 210 * @since 0.71 … … 217 220 218 221 /** 219 * get_comment_date() - Retrieve the comment date of the current comment222 * Retrieve the comment date of the current comment. 220 223 * 221 224 * @since 1.5 … … 236 239 237 240 /** 238 * comment_date() - Display the comment date of the current comment241 * Display the comment date of the current comment. 239 242 * 240 243 * @since 0.71 … … 247 250 248 251 /** 249 * get_comment_excerpt() - Retrieve the excerpt of the current comment252 * Retrieve the excerpt of the current comment. 250 253 * 251 254 * Will cut each word and only output the first 20 words with '...' at the end. … … 279 282 280 283 /** 281 * comment_excerpt() - Returns the excerpt of the current comment284 * Display the excerpt of the current comment. 282 285 * 283 286 * @since 1.2 … … 289 292 290 293 /** 291 * get_comment_ID() - Retrieve the comment id of the current comment294 * Retrieve the comment id of the current comment. 292 295 * 293 296 * @since 1.5 … … 303 306 304 307 /** 305 * comment_ID() - Displays the comment id of the current comment308 * Displays the comment id of the current comment. 306 309 * 307 310 * @since 0.71 … … 313 316 314 317 /** 315 * get_comment_link() - Retrieve the link to the current comment318 * Retrieve the link to the current comment. 316 319 * 317 320 * @since 1.5 … … 326 329 327 330 /** 328 * get_comments_link() - Retrieves the link to the current post comments331 * Retrieves the link to the current post comments. 329 332 * 330 333 * @since 1.5 … … 337 340 338 341 /** 339 * comments_link() - Displays the link to the current post comments342 * Displays the link to the current post comments. 340 343 * 341 344 * @since 0.71 … … 349 352 350 353 /** 351 * get_comments_number() - Retrieve the amount of comments a post has354 * Retrieve the amount of comments a post has. 352 355 * 353 356 * @since 1.5 … … 374 377 375 378 /** 376 * comments_number() - Display the language string for the number of comments the current post has379 * Display the language string for the number of comments the current post has. 377 380 * 378 381 * @since 0.71 … … 400 403 401 404 /** 402 * get_comment_text() - Retrieve the text of the current comment405 * Retrieve the text of the current comment. 403 406 * 404 407 * @since 1.5 … … 413 416 414 417 /** 415 * comment_text() - Displays the text of the current comment418 * Displays the text of the current comment. 416 419 * 417 420 * @since 0.71 … … 424 427 425 428 /** 426 * get_comment_time() - Retrieve the comment time of the current comment429 * Retrieve the comment time of the current comment. 427 430 * 428 431 * @since 1.5 … … 445 448 446 449 /** 447 * comment_time() - Display the comment time of the current comment450 * Display the comment time of the current comment. 448 451 * 449 452 * @since 0.71 … … 456 459 457 460 /** 458 * get_comment_type() - Retrieve the comment type of the current comment461 * Retrieve the comment type of the current comment. 459 462 * 460 463 * @since 1.5 … … 474 477 475 478 /** 476 * comment_type() - Display the comment type of the current comment479 * Display the comment type of the current comment. 477 480 * 478 481 * @since 0.71 … … 497 500 498 501 /** 499 * get_trackback_url() - Retrieve The current post's trackback URL500 * 501 * There is a check to see if permalink's have been enabled and if so, will retrieve502 * the pretty path. If permalinks weren't enabled, the ID of the current post is used503 * and appended to the correct page to go to.502 * Retrieve The current post's trackback URL. 503 * 504 * There is a check to see if permalink's have been enabled and if so, will 505 * retrieve the pretty path. If permalinks weren't enabled, the ID of the 506 * current post is used and appended to the correct page to go to. 504 507 * 505 508 * @since 1.5 … … 520 523 521 524 /** 522 * trackback_url() - Displays the current post's trackback URL525 * Displays the current post's trackback URL. 523 526 * 524 527 * @since 0.71 … … 534 537 535 538 /** 536 * trackback_rdf() - Generates and displays the RDF for the trackback information of current post539 * Generates and displays the RDF for the trackback information of current post. 537 540 * 538 541 * @since 0.71 … … 558 561 559 562 /** 560 * comments_open() - Whether the current post is open for comments563 * Whether the current post is open for comments. 561 564 * 562 565 * @since 1.5 … … 575 578 576 579 /** 577 * pings_open() - Whether the current post is open for pings580 * Whether the current post is open for pings. 578 581 * 579 582 * @since 1.5 … … 592 595 593 596 /** 594 * wp_comment_form_unfiltered_html_nonce() - Displays form token for unfiltered comments595 * 596 * Will only display nonce token if the current user has permissions for unfiltered html.597 * Won't display the token for other users.598 * 599 * The function was backported to 2.0.10 and was added to versions 2.1.3 and above. Does not600 * exist in versions prior to 2.0.10 in the 2.0 branch and in the 2.1 branch, prior to 2.1.3.601 * Technically added in 2.2.0.597 * Displays form token for unfiltered comments. 598 * 599 * Will only display nonce token if the current user has permissions for 600 * unfiltered html. Won't display the token for other users. 601 * 602 * The function was backported to 2.0.10 and was added to versions 2.1.3 and 603 * above. Does not exist in versions prior to 2.0.10 in the 2.0 branch and in 604 * the 2.1 branch, prior to 2.1.3. Technically added in 2.2.0. 602 605 * 603 606 * @since 2.0.10 Backported to 2.0 branch … … 612 615 613 616 /** 614 * comments_template() - Loads the comment template specified in $file615 * 616 * Will not display the comments template if not on single post or page, or 617 * ifthe post does not have comments.617 * Loads the comment template specified in $file. 618 * 619 * Will not display the comments template if not on single post or page, or if 620 * the post does not have comments. 618 621 * 619 622 * Uses the WordPress database object to query for the comments. The comments … … 670 673 671 674 /** 672 * comments_popup_script() - Displays the JS popup script to show a comment675 * Displays the JS popup script to show a comment. 673 676 * 674 677 * If the $file parameter is empty, then the home page is assumed. The defaults … … 701 704 702 705 /** 703 * comments_popup_link() - Displays the link to the comments popup window for the current post ID. 704 * 705 * Is not meant to be displayed on single posts and pages. Should be used on the lists of posts 706 * Displays the link to the comments popup window for the current post ID. 707 * 708 * Is not meant to be displayed on single posts and pages. Should be used on the 709 * lists of posts 706 710 * 707 711 * @since 0.71 -
branches/crazyhorse/wp-includes/default-filters.php
r8011 r8242 154 154 add_filter('pre_comment_content', 'wp_rel_nofollow', 15); 155 155 add_filter('comment_email', 'antispambot'); 156 add_filter('option_tag_base', '_wp_filter_taxonomy_base'); 157 add_filter('option_category_base', '_wp_filter_taxonomy_base'); 156 158 157 159 //Atom SSL support -
branches/crazyhorse/wp-includes/functions.php
r8103 r8242 100 100 } 101 101 102 102 /** 103 * Retrieve the date in localized format, based on timestamp. 104 * 105 * If the locale specifies the locale month and weekday, then the locale will 106 * take over the format for the date. If it isn't, then the date format string 107 * will be used instead. 108 * 109 * @since 0.71 110 * 111 * @param string $dateformatstring Format to display the date 112 * @param int $unixtimestamp Unix timestamp 113 * @return string The date, translated if locale specifies it. 114 */ 103 115 function date_i18n( $dateformatstring, $unixtimestamp ) { 104 116 global $wp_locale; 105 117 $i = $unixtimestamp; 118 // Sanity check for PHP 5.1.0- 119 if ( -1 == $i ) 120 $i = false; 121 106 122 if ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) { 107 123 $datemonth = $wp_locale->get_month( date( 'm', $i ) ); … … 277 293 } 278 294 279 /* Options functions */280 281 295 /** 282 296 * Retrieve option value based on setting name. 283 297 * 284 * {@internal Missing Long Description}} 298 * If the option does not exist or does not have a value, then the return value 299 * will be false. This is useful to check whether you need to install an option 300 * and is commonly used during installation of plugin options and to test 301 * whether upgrading is required. 302 * 303 * You can "short-circuit" the retrieval of the option from the database for 304 * your plugin or core options that aren't protected. You can do so by hooking 305 * into the 'pre_option_$option' with the $option being replaced by the option 306 * name. You should not try to override special options, but you will not be 307 * prevented from doing so. 308 * 309 * There is a second filter called 'option_$option' with the $option being 310 * replaced with the option name. This gives the value as the only parameter. 285 311 * 286 312 * @since 1.5.0 287 313 * @package WordPress 288 314 * @subpackage Option 315 * @uses apply_filters() Calls 'pre_option_$optionname' false to allow 316 * overwriting the option value in a plugin. 317 * @uses apply_filters() Calls 'option_$optionname' with the option name value. 289 318 * 290 319 * @param string $setting Name of option to retrieve. Should already be SQL-escaped … … 371 400 } 372 401 402 /** 403 * Retrieve all autoload options or all options, if no autoloaded ones exist. 404 * 405 * This is different from wp_load_alloptions(), in this that function does not 406 * cache all options and will retrieve all options from the database every time 407 * it is called. 408 * 409 * @since 1.0.0 410 * @package WordPress 411 * @subpackage Option 412 * @uses apply_filters() Calls 'pre_option_$optionname' hook with option value as parameter. 413 * @uses apply_filters() Calls 'all_options' on options list. 414 * 415 * @return array List of all options. 416 */ 373 417 function get_alloptions() { 374 418 global $wpdb, $wp_queries; … … 381 425 // "When trying to design a foolproof system, 382 426 // never underestimate the ingenuity of the fools :)" -- Dougal 383 if ( in_array( $option->option_name, array( 'siteurl', 'home', 'category_base' ) ) )427 if ( in_array( $option->option_name, array( 'siteurl', 'home', 'category_base', 'tag_base' ) ) ) 384 428 $option->option_value = untrailingslashit( $option->option_value ); 385 429 $value = maybe_unserialize( $option->option_value ); … … 389 433 } 390 434 391 435 /** 436 * Loads and caches all autoloaded options, if available or all options. 437 * 438 * This is different from get_alloptions(), in that this function will cache the 439 * options and will return the cached options when called again. 440 * 441 * @since 2.2.0 442 * @package WordPress 443 * @subpackage Option 444 * 445 * @return array List all options. 446 */ 392 447 function wp_load_alloptions() { 393 448 global $wpdb; … … 408 463 } 409 464 410 411 // expects $option_name to NOT be SQL-escaped 465 /** 466 * Update the value of an option that was already added. 467 * 468 * If the option does not exist, then the option will be added with the option 469 * value, but you will not be able to set whether it is autoloaded. If you want 470 * to set whether an option autoloaded, then you need to use the add_option(). 471 * 472 * When the option is updated, then the filter named 473 * 'update_option_$option_name', with the $option_name as the $option_name 474 * parameter value, will be called. The hook should accept two parameters, the 475 * first is the old parameter and the second is the new parameter. 476 * 477 * @since 1.0.0 478 * @package WordPress 479 * @subpackage Option 480 * 481 * @param string $option_name Option name. Expected to not be SQL-escaped 482 * @param mixed $newvalue Option value. 483 * @return bool False if value was not updated and true if value was updated. 484 */ 412 485 function update_option( $option_name, $newvalue ) { 413 486 global $wpdb; … … 453 526 } 454 527 455 456 // thx Alex Stapleton, http://alex.vort-x.net/blog/ 457 // expects $name to NOT be SQL-escaped 528 /** 529 * Add a new option. 530 * 531 * You can create options without values and then add values later. Does not 532 * check whether the option has already been added, but does check that you 533 * aren't adding a protected WordPress option. Care should be taken to not name 534 * options, the same as the ones which are protected and to not add options 535 * that were already added. 536 * 537 * The filter named 'add_option_$optionname', with the $optionname being 538 * replaced with the option's name, will be called. The hook should accept two 539 * parameters, the first is the option name, and the second is the value. 540 * 541 * @package WordPress 542 * @subpackage Option 543 * @since 1.0.0 544 * @link http://alex.vort-x.net/blog/ Thanks Alex Stapleton 545 * 546 * @param string $name Option name to add. Expects to NOT be SQL escaped. 547 * @param mixed $value Optional. Option value, can be anything. 548 * @param mixed $deprecated Optional. Description. Not used anymore. 549 * @param bool $autoload Optional. Default is enabled. Whether to load the option when WordPress starts up. 550 * @return null returns when finished. 551 */ 458 552 function add_option( $name, $value = '', $deprecated = '', $autoload = 'yes' ) { 459 553 global $wpdb; … … 489 583 $wpdb->query( $wpdb->prepare( "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES (%s, %s, %s)", $name, $value, $autoload ) ); 490 584 491 do_action( "add_option_{$name}", $name, $value ); 585 do_action( "add_option_{$name}", $name, $value ); 492 586 return; 493 587 } 494 588 495 589 /** 590 * Removes option by name and prevents removal of protected WordPress options. 591 * 592 * @package WordPress 593 * @subpackage Option 594 * @since unknown 595 * 596 * @param string $name Option name to remove. 597 * @return bool True, if succeed. False, if failure. 598 */ 496 599 function delete_option( $name ) { 497 600 global $wpdb; … … 518 621 } 519 622 520 623 /** 624 * Serialize data, if needed. 625 * 626 * @param mixed $data Data that might be serialized. 627 * @return mixed A scalar data 628 */ 521 629 function maybe_serialize( $data ) { 522 630 if ( is_string( $data ) ) … … 582 690 } 583 691 584 692 /** 693 * Open the file handle for debugging. 694 * 695 * This function is used for XMLRPC feature, but it is general purpose enough 696 * to be used in anywhere. 697 * 698 * @see fopen() for mode options. 699 * @package WordPress 700 * @subpackage Debug 701 * @since unknown 702 * @uses $debug Used for whether debugging is enabled. 703 * 704 * @param string $filename File path to debug file. 705 * @param string $mode Same as fopen() mode parameter. 706 * @return bool|resource File handle. False on failure. 707 */ 585 708 function debug_fopen( $filename, $mode ) { 586 709 global $debug; … … 593 716 } 594 717 595 718 /** 719 * Write contents to the file used for debugging. 720 * 721 * Technically, this can be used to write to any file handle when the global 722 * $debug is set to 1 or true. 723 * 724 * @package WordPress 725 * @subpackage Debug 726 * @since unknown 727 * @uses $debug Used for whether debugging is enabled. 728 * 729 * @param resource $fp File handle for debugging file. 730 * @param string $string Content to write to debug file. 731 */ 596 732 function debug_fwrite( $fp, $string ) { 597 733 global $debug; … … 600 736 } 601 737 602 738 /** 739 * Close the debugging file handle. 740 * 741 * Technically, this can be used to close any file handle when the global $debug 742 * is set to 1 or true. 743 * 744 * @package WordPress 745 * @subpackage Debug 746 * @since unknown 747 * @uses $debug Used for whether debugging is enabled. 748 * 749 * @param resource $fp Debug File handle. 750 */ 603 751 function debug_fclose( $fp ) { 604 752 global $debug; … … 769 917 } 770 918 771 919 /** 920 * Build URL query based on an associative and, or indexed array. 921 * 922 * This is a convenient function for easily building url queries. It sets the 923 * separator to '&' and uses _http_build_query() function. 924 * 925 * @see _http_build_query() Used to build the query 926 * @link http://us2.php.net/manual/en/function.http-build-query.php more on what 927 * http_build_query() does. 928 * 929 * @since unknown 930 * 931 * @param array $data URL-encode key/value pairs. 932 * @return string URL encoded string 933 */ 772 934 function build_query( $data ) { 773 935 return _http_build_query( $data, NULL, '&', '', false ); … … 775 937 776 938 /** 777 * Retrieve a modified query string. 778 * 779 * {@internal Missing Long Description}} 780 * 781 * Adding a single key & value or an associative array. 782 * Setting a key value to emptystring removes the key. 783 * Omitting oldquery_or_uri uses the $_SERVER value. 939 * Retrieve a modified URL query string. 940 * 941 * You can rebuild the URL and append a new query variable to the URL query by 942 * using this function. You can also retrieve the full URL with query data. 943 * 944 * Adding a single key & value or an associative array. Setting a key value to 945 * emptystring removes the key. Omitting oldquery_or_uri uses the $_SERVER 946 * value. 784 947 * 785 948 * @since 1.5.0 … … 894 1057 } 895 1058 1059 /** 1060 * HTTP request for URI to retrieve content. 1061 * 1062 * Tries to retrieve the HTTP content with fopen first and then using cURL, if 1063 * fopen can't be used. 1064 * 1065 * @since unknown 1066 * 1067 * @param string $uri URI/URL of web page to retrieve. 1068 * @return string HTTP content. 1069 */ 896 1070 function wp_remote_fopen( $uri ) { 897 1071 $timeout = 10; … … 1005 1179 } 1006 1180 1007 1181 /** 1182 * Set HTTP status header. 1183 * 1184 * @since unknown 1185 * @uses apply_filters() Calls 'status_header' on status header string, HTTP 1186 * HTTP code, HTTP code description, and protocol string as separate 1187 * parameters. 1188 * 1189 * @param int $header HTTP status code 1190 * @return null Does not return anything. 1191 */ 1008 1192 function status_header( $header ) { 1009 1193 $text = get_status_header_desc( $header ); … … 1301 1485 // $dir is absolute, $path is (maybe) relative to ABSPATH 1302 1486 $dir = path_join( ABSPATH, $upload_path ); 1303 $path = str_replace( ABSPATH, '', trim( $upload_path ) );1304 1487 1305 1488 if ( !$url = get_option( 'upload_url_path' ) ) 1306 $url = trailingslashit( $siteurl ) . $path;1489 $url = WP_CONTENT_URL . '/uploads'; 1307 1490 1308 1491 if ( defined('UPLOADS') ) { … … 1310 1493 $url = trailingslashit( $siteurl ) . UPLOADS; 1311 1494 } 1312 1495 1313 1496 $subdir = ''; 1314 1497 if ( get_option( 'uploads_use_yearmonth_folders' ) ) { … … 1791 1974 } 1792 1975 1793 1794 1976 /** 1795 1977 * Load the correct database class file. … … 1809 1991 require_once( ABSPATH . WPINC . '/wp-db.php' ); 1810 1992 } 1811 1812 1993 1813 1994 /** … … 1858 2039 } 1859 2040 1860 1861 2041 /** 1862 2042 * Converts value to positive integer. … … 1870 2050 return abs( intval( $maybeint ) ); 1871 2051 } 1872 1873 2052 1874 2053 /** … … 1904 2083 return false; 1905 2084 } 1906 1907 2085 1908 2086 /** … … 1922 2100 } 1923 2101 1924 1925 2102 /** 1926 2103 * Marks a function as deprecated and informs when it has been used. … … 1960 2137 } 1961 2138 1962 1963 2139 /** 1964 2140 * Marks a file as deprecated and informs when it has been used. … … 1998 2174 } 1999 2175 2000 2001 2176 /** 2002 2177 * Is the server running earlier than 1.5.0 version of lighttpd … … 2011 2186 return 'lighttpd' == $server_parts[0] && -1 == version_compare( $server_parts[1], '1.5.0' ); 2012 2187 } 2013 2014 2188 2015 2189 /** … … 2042 2216 } 2043 2217 2044 2045 2218 /** 2046 2219 * File validates against allowed set of defined rules. … … 2073 2246 } 2074 2247 2075 2076 2248 /** 2077 2249 * Determine if SSL is used. … … 2084 2256 return ( 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false; 2085 2257 } 2086 2087 2258 2088 2259 /** … … 2106 2277 } 2107 2278 2108 2109 2279 /** 2110 2280 * Whether to force SSL used for the Administration Panels. … … 2127 2297 } 2128 2298 2299 /** 2300 * Guess the URL for the site. 2301 * 2302 * Will remove wp-admin links to retrieve only return URLs not in the wp-admin 2303 * directory. 2304 * 2305 * @since 2.6 2306 * 2307 * @return string 2308 */ 2309 function wp_guess_url() { 2310 if ( defined('WP_SITEURL') && '' != WP_SITEURL ) { 2311 $url = WP_SITEURL; 2312 } else { 2313 $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 2314 $url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 2315 } 2316 return $url; 2317 } 2318 2129 2319 ?> -
branches/crazyhorse/wp-includes/js/autosave.js
r8222 r8242 2 2 var autosavePeriodical; 3 3 var autosaveOldMessage = ''; 4 var autosaveDelayURL = null; 5 var previewwin; 4 6 5 7 jQuery(function($) { … … 9 11 //Disable autosave after the form has been submitted 10 12 $("#post").submit(function() { $.cancel(autosavePeriodical); }); 13 14 // Autosave when the preview button is clicked. 15 $('#previewview a').click(function(e) { 16 autosave(); 17 autosaveDelayURL = this.href; 18 previewwin = window.open('','_blank'); 19 20 e.preventDefault(); 21 return false; 22 }); 11 23 }); 12 24 … … 97 109 }, function(permalink) { 98 110 jQuery('#previewview').html('<a class="button" target="_blank" href="'+permalink+'" tabindex="4">'+previewText+'</a>'); 111 112 // Autosave when the preview button is clicked. 113 jQuery('#previewview a').click(function(e) { 114 autosave(); 115 autosaveDelayURL = this.href; 116 previewwin = window.open('','_blank'); 117 118 e.preventDefault(); 119 return false; 120 }); 99 121 }); 100 122 } … … 126 148 function autosave_enable_buttons() { 127 149 jQuery("#submitpost :button:disabled, #submitpost :submit:disabled").attr('disabled', ''); 150 if ( autosaveDelayURL ) { 151 previewwin.location = autosaveDelayURL; 152 autosaveDelayURL = null; 153 } 128 154 } 129 155 -
branches/crazyhorse/wp-includes/js/jquery/suggest.js
r7324 r8242 1 1 /* 2 * jquery.suggest 1.1 - 2007-08-06 2 * jquery.suggest 1.1b - 2007-08-06 3 * Patched by Mark Jaquith with Alexander Dick's "multiple items" patch to allow for auto-suggesting of more than one tag before submitting 4 * See: http://www.vulgarisoip.com/2007/06/29/jquerysuggest-an-alternative-jquery-based-autocomplete-library/#comment-7228 3 5 * 4 6 * Uses code and techniques from following libraries: … … 114 116 var q = $.trim($input.val()); 115 117 118 if ( options.multiple ) { 119 var multipleSepPos = q.lastIndexOf(options.multipleSep); 120 if ( multipleSepPos != -1 ) { 121 q = q.substr(multipleSepPos + options.multipleSep.length); 122 } 123 } 116 124 if (q.length >= options.minchars) { 117 125 … … 246 254 247 255 if ($currentResult) { 248 $input.val($currentResult.text()); 256 if ( options.multiple ) { 257 if ( $input.val().indexOf(options.multipleSep) != -1 ) { 258 $currentVal = $input.val().substr( 0, ( $input.val().lastIndexOf(options.multipleSep) + options.multipleSep.length ) ); 259 } else { 260 $currentVal = ""; 261 } 262 $input.val( $currentVal + $currentResult.text() + options.multipleSep); 263 $input.focus(); 264 } else { 265 $input.val($currentResult.text()); 266 } 249 267 $results.hide(); 250 268 … … 292 310 293 311 options = options || {}; 312 options.multiple = options.multiple || false; 313 options.multipleSep = options.multipleSep || ", "; 294 314 options.source = source; 295 315 options.delay = options.delay || 100; -
branches/crazyhorse/wp-includes/js/jquery/ui.core.js
r8064 r8242 1 eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(3(C){C.8={2 t:{1o:3(E,F,H){6 G=C.8[E].m;1v(6 D 2s H){G.u[D]=G.u[D]||[];G.u[D].2r([F,H[D]])}},1n:3(D,F,E){6 H=D.u[F];5(!H){4}1v(6 G=0;G<H.2q;G++){5(D.a[H[G][0]]){H[G][1].r(D.c,E)}}}},n:{},f:3(D){5(C.8.n[D]){4 C.8.n[D]}6 E=C(\'<2p 2o="8-2n-2m">\').1i(D).f({2l:"2k",11:"-1u",2j:"-1u",2i:"2h"}).2g("1t");C.8.n[D]=!!((!(/2f|2e/).h(E.f("2d"))||(/^[1-9]/).h(E.f("2c"))||(/^[1-9]/).h(E.f("2b"))||!(/1r/).h(E.f("2a"))||!(/29|28\\(0, 0, 0, 0\\)/).h(E.f("27"))));26{C("1t").1s(0).25(E.1s(0))}24(F){}4 C.8.n[D]},23:3(D){D.j="1g";D.1q=3(){4 7};5(D.t){D.t.1p="1r"}},22:3(D){D.j="21";D.1q=3(){4 d};5(D.t){D.t.1p=""}},20:3(G,E){6 D=/11/.h(E||"11")?"1Z":"1Y",F=7;5(G[D]>0){4 d}G[D]=1;F=G[D]>0?d:7;G[D]=0;4 F}};6 B=C.Z.q;C.Z.q=3(){C("*",2).1o(2).1X("q");4 B.r(2,1m)};3 A(E,F,G){6 D=C[E][F].1W||[];D=(U D=="T"?D.10(/,?\\s+/):D);4(C.1V(G,D)!=-1)}C.X=3(E,D){6 F=E.10(".")[0];E=E.10(".")[1];C.Z[E]=3(J){6 H=(U J=="T"),I=1U.m.1T.1n(1m,1);5(H&&A(F,E,J)){6 G=C.Y(2[0],E);4(G?G[J].r(G,I):1S)}4 2.1R(3(){6 K=C.Y(2,E);5(H&&K&&C.1Q(K[J])){K[J].r(K,I)}1P{5(!H){C.Y(2,E,1O C[F][E](2,J))}}})};C[F][E]=3(I,H){6 G=2;2.e=E;2.1h=F+"-"+E;2.a=C.1l({k:7},C[F][E].13,H);2.c=C(I).g("l."+E,3(L,J,K){4 G.l(J,K)}).g("W."+E,3(K,J){4 G.W(J)}).g("q",3(){4 G.1j()});2.1k()};C[F][E].m=C.1l({},C.X.m,D)};C.X.m={1k:3(){},1j:3(){2.c.1N(2.e)},W:3(D){4 2.a[D]},l:3(D,E){2.a[D]=E;5(D=="k"){2.c[E?"1i":"1M"](2.1h+"-k")}},1L:3(){2.l("k",7)},1K:3(){2.l("k",d)}};C.8.14={1J:3(){6 D=2;2.c.g("1I."+2.e,3(E){4 D.1e(E)});5(C.S.R){2.1f=2.c.V("j");2.c.V("j","1g")}2.1H=7},1G:3(){2.c.P("."+2.e);(C.S.R&&2.c.V("j",2.1f))},1e:3(F){(2.b&&2.i(F));2.p=F;6 E=2,G=(F.1F==1),D=(U 2.a.w=="T"?C(F.1E).1D(2.a.w):7);5(!G||D||!2.15(F)){4 d}2.o=!2.a.v;5(!2.o){2.1C=1B(3(){E.o=d},2.a.v)}5(2.N(F)&&2.z(F)){2.b=(2.y(F)!==7);5(!2.b){F.1A();4 d}}2.Q=3(H){4 E.1d(H)};2.O=3(H){4 E.i(H)};C(1c).g("1b."+2.e,2.Q).g("1a."+2.e,2.O);4 7},1d:3(D){5(C.S.R&&!D.1z){4 2.i(D)}5(2.b){2.x(D);4 7}5(2.N(D)&&2.z(D)){2.b=(2.y(2.p,D)!==7);(2.b?2.x(D):2.i(D))}4!2.b},i:3(D){C(1c).P("1b."+2.e,2.Q).P("1a."+2.e,2.O);5(2.b){2.b=7;2.16(D)}4 7},N:3(D){4(M.1y(M.18(2.p.19-D.19),M.18(2.p.17-D.17))>=2.a.12)},z:3(D){4 2.o},y:3(D){},x:3(D){},16:3(D){},15:3(D){4 d}};C.8.14.13={w:1x,12:1,v:0}})(1w)',62,154,'||this|function|return|if|var|false|ui||options|_mouseStarted|element|true|widgetName|css|bind|test|mouseUp|unselectable|disabled|setData|prototype|cssCache|_mouseDelayMet|_mouseDownEvent|remove|apply||style|plugins|delay|cancel|mouseDrag|mouseStart|mouseDelayMet|||||||||||||Math|mouseDistanceMet|_mouseUpDelegate|unbind|_mouseMoveDelegate|msie|browser|string|typeof|attr|getData|widget|data|fn|split|top|distance|defaults|mouse|mouseCapture|mouseStop|pageY|abs|pageX|mouseup|mousemove|document|mouseMove|mouseDown|_mouseUnselectable|on|widgetBaseClass|addClass|destroy|init|extend|arguments|call|add|MozUserSelect|onselectstart|none|get|body|5000px|for|jQuery|null|max|button|preventDefault|setTimeout|_mouseDelayTimer|is|target|which|mouseDestroy|started|mousedown|mouseInit|disable|enable|removeClass|removeData|new|else|isFunction|each|undefined|slice|Array|inArray|getter|trigger|scrollLeft|scrollTop|hasScroll|off|enableSelection|disableSelection|catch|removeChild|try|backgroundColor|rgba|transparent|backgroundImage|width|height|cursor|default|auto|appendTo|block|display|left|absolute|position|gen|resizable|class|div|length|push|in|plugin'.split('|'),0,{}))1 eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(3(C){C.8={2s:{1o:3(E,F,H){6 G=C.8[E].n;1v(6 D 2r H){G.w[D]=G.w[D]||[];G.w[D].2q([F,H[D]])}},1n:3(D,F,E){6 H=D.w[F];5(!H){4}1v(6 G=0;G<H.2p;G++){5(D.a[H[G][0]]){H[G][1].u(D.c,E)}}}},o:{},f:3(D){5(C.8.o[D]){4 C.8.o[D]}6 E=C(\'<2o 2n="8-2m">\').1i(D).f({2l:"2k",12:"-1u",2j:"-1u",2i:"2h"}).2g("1t");C.8.o[D]=!!((!(/2f|2e/).h(E.f("2d"))||(/^[1-9]/).h(E.f("2c"))||(/^[1-9]/).h(E.f("2b"))||!(/1r/).h(E.f("2a"))||!(/29|28\\(0, 0, 0, 0\\)/).h(E.f("27"))));26{C("1t").1s(0).25(E.1s(0))}24(F){}4 C.8.o[D]},23:3(D){D.j="1g";D.1q=3(){4 7};5(D.v){D.v.1p="1r"}},22:3(D){D.j="21";D.1q=3(){4 d};5(D.v){D.v.1p=""}},20:3(G,E){6 D=/12/.h(E||"12")?"1Z":"1Y",F=7;5(G[D]>0){4 d}G[D]=1;F=G[D]>0?d:7;G[D]=0;4 F}};6 B=C.10.t;C.10.t=3(){C("*",2).1o(2).1X("t");4 B.u(2,1m)};3 A(E,F,G){6 D=C[E][F].1W||[];D=(W D=="V"?D.11(/,?\\s+/):D);4(C.1V(G,D)!=-1)}C.l=3(E,D){6 F=E.11(".")[0];E=E.11(".")[1];C.10[E]=3(J){6 H=(W J=="V"),I=1U.n.1T.1n(1m,1);5(H&&A(F,E,J)){6 G=C.Z(2[0],E);4(G?G[J].u(G,I):1S)}4 2.1R(3(){6 K=C.Z(2,E);5(H&&K&&C.1Q(K[J])){K[J].u(K,I)}1P{5(!H){C.Z(2,E,1O C[F][E](2,J))}}})};C[F][E]=3(I,H){6 G=2;2.e=E;2.1h=F+"-"+E;2.a=C.1l({},C.l.p,C[F][E].p,H);2.c=C(I).g("m."+E,3(L,J,K){4 G.m(J,K)}).g("Y."+E,3(K,J){4 G.Y(J)}).g("t",3(){4 G.1j()});2.1k()};C[F][E].n=C.1l({},C.l.n,D)};C.l.n={1k:3(){},1j:3(){2.c.1N(2.e)},Y:3(D){4 2.a[D]},m:3(D,E){2.a[D]=E;5(D=="k"){2.c[E?"1i":"1M"](2.1h+"-k")}},1L:3(){2.m("k",7)},1K:3(){2.m("k",d)}};C.l.p={k:7};C.8.14={1J:3(){6 D=2;2.c.g("1I."+2.e,3(E){4 D.1e(E)});5(C.U.T){2.1f=2.c.X("j");2.c.X("j","1g")}2.1H=7},1G:3(){2.c.R("."+2.e);(C.U.T&&2.c.X("j",2.1f))},1e:3(F){(2.b&&2.i(F));2.r=F;6 E=2,G=(F.1F==1),D=(W 2.a.y=="V"?C(F.1E).1D(2.a.y):7);5(!G||D||!2.15(F)){4 d}2.q=!2.a.x;5(!2.q){2.1C=1B(3(){E.q=d},2.a.x)}5(2.P(F)&&2.N(F)){2.b=(2.M(F)!==7);5(!2.b){F.1A();4 d}}2.S=3(H){4 E.1d(H)};2.Q=3(H){4 E.i(H)};C(1c).g("1b."+2.e,2.S).g("1a."+2.e,2.Q);4 7},1d:3(D){5(C.U.T&&!D.1z){4 2.i(D)}5(2.b){2.z(D);4 7}5(2.P(D)&&2.N(D)){2.b=(2.M(2.r,D)!==7);(2.b?2.z(D):2.i(D))}4!2.b},i:3(D){C(1c).R("1b."+2.e,2.S).R("1a."+2.e,2.Q);5(2.b){2.b=7;2.16(D)}4 7},P:3(D){4(O.1y(O.18(2.r.19-D.19),O.18(2.r.17-D.17))>=2.a.13)},N:3(D){4 2.q},M:3(D){},z:3(D){},16:3(D){},15:3(D){4 d}};C.8.14.p={y:1x,13:1,x:0}})(1w)',62,153,'||this|function|return|if|var|false|ui||options|_mouseStarted|element|true|widgetName|css|bind|test|mouseUp|unselectable|disabled|widget|setData|prototype|cssCache|defaults|_mouseDelayMet|_mouseDownEvent||remove|apply|style|plugins|delay|cancel|mouseDrag|||||||||||||mouseStart|mouseDelayMet|Math|mouseDistanceMet|_mouseUpDelegate|unbind|_mouseMoveDelegate|msie|browser|string|typeof|attr|getData|data|fn|split|top|distance|mouse|mouseCapture|mouseStop|pageY|abs|pageX|mouseup|mousemove|document|mouseMove|mouseDown|_mouseUnselectable|on|widgetBaseClass|addClass|destroy|init|extend|arguments|call|add|MozUserSelect|onselectstart|none|get|body|5000px|for|jQuery|null|max|button|preventDefault|setTimeout|_mouseDelayTimer|is|target|which|mouseDestroy|started|mousedown|mouseInit|disable|enable|removeClass|removeData|new|else|isFunction|each|undefined|slice|Array|inArray|getter|trigger|scrollLeft|scrollTop|hasScroll|off|enableSelection|disableSelection|catch|removeChild|try|backgroundColor|rgba|transparent|backgroundImage|width|height|cursor|default|auto|appendTo|block|display|left|absolute|position|gen|class|div|length|push|in|plugin'.split('|'),0,{})) 2 2 -
branches/crazyhorse/wp-includes/js/jquery/ui.sortable.js
r8064 r8242 1 eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(b(B){b A(E,D){9 C=B.2 Q.3T&&B.2Q.3S<3R;5(E.2P&&!C){c E.2P(D)}5(E.2O){c!!(E.2O(D)&16)}1O(D=D.1g){5(D==E){c W}}c w}B.3Q("k.o",B.2f(B.k.3P,{3O:b(){9 C=4.6;4.O={};4.g.24("k-o");4.25();4.13=4.f.z?(/7|23/).17(4.f[0].v.e("3N")):w;5(!(/(2N|1s|3M)/).17(4.g.e("Y"))){4.g.e("Y","2N")}4.a=4.g.a();4.3L()},3K:{},k:b(C){c{l:(C||4)["l"],q:(C||4)["q"]||B([]),Y:(C||4)["Y"],3J:(C||4)["1b"],6:4.6,g:4.g,v:(C||4)["j"],3I:C?C.g:X}},t:b(F,E,C,D){B.k.1o.14(4,F,[E,4.k(C)]);5(!D){4.g.3H(F=="1z"?F:"1z"+F,[E,4.k(C)],4.6[F])}},2e:b(E){9 C=(B.1L(4.6.f)?4.6.f.14(4.g):B(4.6.f,4.g)).1F(".k-o-l");9 D=[];E=E||{};C.1v(b(){9 F=(B(4).2L(E.3G||"2K")||"").3F(E.3E||(/(.+)[-=3D](.+)/));5(F){D.1w((E.2M||F[1])+"[]="+(E.2M?F[1]:F[2]))}});c D.3C("&")},2d:b(C){9 D=(B.1L(4.6.f)?4.6.f.14(4.g):B(4.6.f,4.g)).1F(".k-o-l");9 E=[];D.1v(b(){E.1w(B(4).2L(C||"2K"))});c E},2F:b(J){9 E=4.1b.7,D=E+4.r.m,I=4.1b.8,H=I+4.r.n;9 F=J.7,C=F+J.m,K=J.8,G=K+J.n;5(4.6.1r=="2J"||(4.6.1r=="1S"&&4.r[4.13?"m":"n"]>J[4.13?"m":"n"])){c(I+4.a.p.8>K&&I+4.a.p.8<G&&E+4.a.p.7>F&&E+4.a.p.7<C)}Z{c(F<E+(4.r.m/2)&&D-(4.r.m/2)<C&&K<I+(4.r.n/2)&&H-(4.r.n/2)<G)}},2s:b(J){9 E=4.1b.7,D=E+4.r.m,I=4.1b.8,H=I+4.r.n;9 F=J.7,C=F+J.m,K=J.8,G=K+J.n;5(4.6.1r=="2J"||(4.6.1r=="1S"&&4.r[4.13?"m":"n"]>J[4.13?"m":"n"])){5(!(I+4.a.p.8>K&&I+4.a.p.8<G&&E+4.a.p.7>F&&E+4.a.p.7<C)){c w}5(4.13){5(E+4.a.p.7>F&&E+4.a.p.7<F+J.m/2){c 2}5(E+4.a.p.7>F+J.m/2&&E+4.a.p.7<C){c 1}}Z{5(I+4.a.p.8>K&&I+4.a.p.8<K+J.n/2){c 2}5(I+4.a.p.8>K+J.n/2&&I+4.a.p.8<G){c 1}}}Z{5(!(F<E+(4.r.m/2)&&D-(4.r.m/2)<C&&K<I+(4.r.n/2)&&H-(4.r.n/2)<G)){c w}5(4.13){5(D>F&&E<F){c 2}5(E<C&&D>C){c 1}}Z{5(H>K&&I<K){c 1}5(I<G&&H>G){c 2}}}c w},25:b(){4.2I();4.1T()},2I:b(){4.f=[];4.d=[4];9 C=4.f;9 E=[B.1L(4.6.f)?4.6.f.14(4.g):B(4.6.f,4.g)];5(4.6.28){P(9 F=4.6.28.z-1;F>=0;F--){9 H=B(4.6.28[F]);P(9 D=H.z-1;D>=0;D--){9 G=B.1f(H[D],"o");5(G&&!G.6.27){E.1w(B.1L(G.6.f)?G.6.f.14(G.g):B(G.6.f,G.g));4.d.1w(G)}}}}P(9 F=E.z-1;F>=0;F--){E[F].1v(b(){B.1f(4,"o-v",W);C.1w({v:B(4),m:0,n:0,7:0,8:0})})}},1T:b(C){P(9 E=4.f.z-1;E>=0;E--){9 D=4.f[E].v;5(!C){4.f[E].m=(4.6.1l?B(4.6.1l,D):D).1u()}5(!C){4.f[E].n=(4.6.1l?B(4.6.1l,D):D).1t()}9 F=(4.6.1l?B(4.6.1l,D):D).a();4.f[E].7=F.7;4.f[E].8=F.8}P(9 E=4.d.z-1;E>=0;E--){9 F=4.d[E].g.a();4.d[E].O.7=F.7;4.d[E].O.8=F.8;4.d[E].O.m=4.d[E].g.1u();4.d[E].O.n=4.d[E].g.1t()}},3B:b(){4.g.3A("k-o k-o-27").2H("o").3z(".o");4.3y();P(9 C=4.f.z-1;C>=0;C--){4.f[C].v.2H("o-v")}},1Z:b(E){9 C=E||4,F=C.6;5(F.q.3x==3w){9 D=F.q;F.q={g:b(){c B("<2G></2G>").24(D)[0]},1i:b(G,H){H.e(G.a()).e({m:G.1u(),n:G.1t()})}}}C.q=B(F.q.g.14(C.g,C.j)).1q("S").e({Y:"1s"});F.q.1i.14(C.g,C.j,C.q)},2q:b(F){P(9 D=4.d.z-1;D>=0;D--){5(4.2F(4.d[D].O)){5(!4.d[D].O.1a){5(4.26!=4.d[D]){9 I=3v;9 H=X;9 E=4.1b[4.d[D].13?"7":"8"];P(9 C=4.f.z-1;C>=0;C--){5(!A(4.d[D].g[0],4.f[C].v[0])){1X}9 G=4.f[C][4.d[D].13?"7":"8"];5(1k.2E(G-E)<I){I=1k.2E(G-E);H=4.f[C]}}5(!H&&!4.6.2c){1X}5(4.q){4.q.1E()}5(4.d[D].6.q){4.d[D].1Z(4)}Z{4.q=X}H?4.1D(F,H):4.1D(F,X,4.d[D].g);4.t("1W",F);4.d[D].t("1W",F,4);4.26=4.d[D]}4.d[D].t("1a",F,4);4.d[D].O.1a=1}}Z{5(4.d[D].O.1a){4.d[D].t("2k",F,4);4.d[D].O.1a=0}}}},3u:b(F,E){5(4.6.27||4.6.2r=="3t"){c w}9 D=X,C=B(F.1K).2C().1v(b(){5(B.1f(4,"o-v")){D=B(4);c w}});5(B.1f(F.1K,"o-v")){D=B(F.1K)}5(!D){c w}5(4.6.2D&&!E){9 G=w;B(4.6.2D,D).3s("*").3r().1v(b(){5(4==F.1K){G=W}});5(!G){c w}}4.j=D;c W},3q:b(H,F,C){9 J=4.6;4.26=4;4.25();4.l=3p J.l=="b"?B(J.l.3o(4.g[0],[H,4.j])):4.j.2w();5(!4.l.2C("S").z){4.l.1q((J.1q!="s"?J.1q:4.j[0].1g))}4.l.e({Y:"1s",1H:"3n"}).24("k-o-l");4.T={7:(L(4.j.e("3m"),10)||0),8:(L(4.j.e("3l"),10)||0)};4.a=4.j.a();4.a={8:4.a.8-4.T.8,7:4.a.7-4.T.7};4.a.p={7:H.1c-4.a.7,8:H.1e-4.a.8};4.u=4.l.u();9 D=4.u.a();4.a.s={8:D.8+(L(4.u.e("21"),10)||0),7:D.7+(L(4.u.e("22"),10)||0)};4.1j=4.1Y(H);4.r={m:4.l.1u(),n:4.l.1t()};5(J.12){5(J.12.7!=1J){4.a.p.7=J.12.7}5(J.12.23!=1J){4.a.p.7=4.r.m-J.12.23}5(J.12.8!=1J){4.a.p.8=J.12.8}5(J.12.2B!=1J){4.a.p.8=4.r.n-J.12.2B}}4.1U=4.j.1G()[0];5(J.i){5(J.i=="s"){J.i=4.l[0].1g}5(J.i=="h"||J.i=="1d"){4.i=[0-4.a.s.7,0-4.a.s.8,B(J.i=="h"?h:1d).m()-4.a.s.7-4.r.m-4.T.7-(L(4.g.e("2A"),10)||0),(B(J.i=="h"?h:1d).n()||h.S.1g.2y)-4.a.s.8-4.r.n-4.T.8-(L(4.g.e("2x"),10)||0)]}5(!(/^(h|1d|s)$/).17(J.i)){9 G=B(J.i)[0];9 I=B(J.i).a();4.i=[I.7+(L(B(G).e("22"),10)||0)-4.a.s.7,I.8+(L(B(G).e("21"),10)||0)-4.a.s.8,I.7+1k.2z(G.3k,G.29)-(L(B(G).e("22"),10)||0)-4.a.s.7-4.r.m-4.T.7-(L(4.j.e("2A"),10)||0),I.8+1k.2z(G.2y,G.2a)-(L(B(G).e("21"),10)||0)-4.a.s.8-4.r.n-4.T.8-(L(4.j.e("2x"),10)||0)]}}5(J.q){4.1Z()}4.t("1n",H);4.r={m:4.l.1u(),n:4.l.1t()};5(4.6.q!="2w"){4.j.e("2i","3j")}5(!C){P(9 E=4.d.z-1;E>=0;E--){4.d[E].t("3i",H,4)}}5(B.k.15){B.k.15.3h=4}5(B.k.15&&!J.2n){B.k.15.3g(4,H)}4.2j=W;4.2u(H);c W},2t:b(D,E){5(!E){E=4.Y}9 C=D=="1s"?1:-1;c{8:(E.8+4.a.s.8*C-(4.u[0]==h.S?0:4.u[0].N)*C+4.T.8*C),7:(E.7+4.a.s.7*C-(4.u[0]==h.S?0:4.u[0].M)*C+4.T.7*C)}},1Y:b(F){9 G=4.6;9 C={8:(F.1e-4.a.p.8-4.a.s.8+(4.u[0]==h.S?0:4.u[0].N)),7:(F.1c-4.a.p.7-4.a.s.7+(4.u[0]==h.S?0:4.u[0].M))};5(!4.1j){c C}5(4.i){5(C.7<4.i[0]){C.7=4.i[0]}5(C.8<4.i[1]){C.8=4.i[1]}5(C.7>4.i[2]){C.7=4.i[2]}5(C.8>4.i[3]){C.8=4.i[3]}}5(G.11){9 E=4.1j.8+1k.2v((C.8-4.1j.8)/G.11[1])*G.11[1];C.8=4.i?(!(E<4.i[1]||E>4.i[3])?E:(!(E<4.i[1])?E-G.11[1]:E+G.11[1])):E;9 D=4.1j.7+1k.2v((C.7-4.1j.7)/G.11[0])*G.11[0];C.7=4.i?(!(D<4.i[0]||D>4.i[2])?D:(!(D<4.i[0])?D-G.11[0]:D+G.11[0])):D}c C},2u:b(D){4.Y=4.1Y(D);4.1b=4.2t("1s");P(9 C=4.f.z-1;C>=0;C--){9 E=4.2s(4.f[C]);5(!E){1X}5(4.f[C].v[0]!=4.j[0]&&4.j[E==1?"3f":"1G"]()[0]!=4.f[C].v[0]&&!A(4.j[0],4.f[C].v[0])&&(4.6.2r=="3e-3d"?!A(4.g[0],4.f[C].v[0]):W)){4.2h=E==1?"2g":"3c";4.1D(D,4.f[C]);4.t("1W",D);3b}}4.2q(D);4.t("1z",D);5(!4.6.1I||4.6.1I=="x"){4.l[0].2p.7=4.Y.7+"2o"}5(!4.6.1I||4.6.1I=="y"){4.l[0].2p.8=4.Y.8+"2o"}5(B.k.15){B.k.15.3a(4,D)}c w},39:b(E,D){5(B.k.15&&!4.6.2n){B.k.15.38(4,E)}5(4.6.1V){9 C=4;9 F=C.j.a();5(C.q){C.q.2m({18:"37"},(L(4.6.1V,10)||2l)-36)}B(4.l).2m({7:F.7-4.a.s.7-C.T.7+(4.u[0]==h.S?0:4.u[0].M),8:F.8-4.a.s.8-C.T.8+(4.u[0]==h.S?0:4.u[0].N)},L(4.6.1V,10)||2l,b(){C.t("1p",E,X,D);C.1H(E)})}Z{4.t("1p",E,X,D);4.1H(E,D)}c w},1H:b(E,D){5(4.1U!=4.j.1G().1F(".k-o-l")[0]){4.t("1i",E,X,D)}5(!A(4.g[0],4.j[0])){5(4.1U==4.j.1G().1F(".k-o-l")[0]){4.t("1i",E,X,D)}4.t("1E",E,X,D);P(9 C=4.d.z-1;C>=0;C--){5(A(4.d[C].g[0],4.j[0])){4.d[C].t("1i",E,4,D);4.d[C].t("35",E,4,D)}}}P(9 C=4.d.z-1;C>=0;C--){4.d[C].t("34",E,4,D);5(4.d[C].O.1a){4.d[C].t("2k",E,4);4.d[C].O.1a=0}}4.2j=w;5(4.33){c w}B(4.j).e("2i","");5(4.q){4.q.1E()}4.l.1E();c W},1D:b(E,D,C){C?C.32(4.j):D.v[4.2h=="2g"?"31":"30"](4.j);4.1T(W);5(4.6.q){4.6.q.1i.14(4.g,4.j,4.q)}}}));B.2f(B.k.o,{2Z:"2e 2d",2Y:{1r:"1S",2X:0,2W:0,2V:":2U,2T",f:"> *",19:2S,2c:W,1q:"s"}});B.k.1o.1C("o","1h",{1n:b(E,D){9 C=B("S");5(C.e("1h")){D.6.1R=C.e("1h")}C.e("1h",D.6.1h)},1p:b(D,C){5(C.6.1R){B("S").e("1h",C.6.1R)}}});B.k.1o.1C("o","19",{1n:b(E,D){9 C=D.l;5(C.e("19")){D.6.1Q=C.e("19")}C.e("19",D.6.19)},1p:b(D,C){5(C.6.1Q){B(C.l).e("19",C.6.1Q)}}});B.k.1o.1C("o","18",{1n:b(E,D){9 C=D.l;5(C.e("18")){D.6.1P=C.e("18")}C.e("18",D.6.18)},1p:b(D,C){5(C.6.1P){B(C.l).e("18",C.6.1P)}}});B.k.1o.1C("o","1m",{1n:b(E,D){9 F=D.6;9 C=B(4).1f("o");F.V=F.V||20;F.U=F.U||20;C.R=b(G){2b{5(/1B|1m/.17(G.e("1A"))||(/1B|1m/).17(G.e("1A-y"))){c G}G=G.s()}1O(G[0].1g);c B(h)}(C.j);C.Q=b(G){2b{5(/1B|1m/.17(G.e("1A"))||(/1B|1m/).17(G.e("1A-x"))){c G}G=G.s()}1O(G[0].1g);c B(h)}(C.j);5(C.R[0]!=h&&C.R[0].1y!="1x"){C.1N=C.R.a()}5(C.Q[0]!=h&&C.Q[0].1y!="1x"){C.1M=C.Q.a()}},1z:b(E,D){9 F=D.6;9 C=B(4).1f("o");5(C.R[0]!=h&&C.R[0].1y!="1x"){5((C.1N.8+C.R[0].2a)-E.1e<F.V){C.R[0].N=C.R[0].N+F.U}5(E.1e-C.1N.8<F.V){C.R[0].N=C.R[0].N-F.U}}Z{5(E.1e-B(h).N()<F.V){B(h).N(B(h).N()-F.U)}5(B(1d).n()-(E.1e-B(h).N())<F.V){B(h).N(B(h).N()+F.U)}}5(C.Q[0]!=h&&C.Q[0].1y!="1x"){5((C.1M.7+C.Q[0].29)-E.1c<F.V){C.Q[0].M=C.Q[0].M+F.U}5(E.1c-C.1M.7<F.V){C.Q[0].M=C.Q[0].M-F.U}}Z{5(E.1c-B(h).M()<F.V){B(h).M(B(h).M()-F.U)}5(B(1d).m()-(E.1c-B(h).M())<F.V){B(h).M(B(h).M()+F.U)}}}})})(2R)',62,242,'||||this|if|options|left|top|var|offset|function|return|containers|css|items|element|document|containment|currentItem|ui|helper|width|height|sortable|click|placeholder|helperProportions|parent|propagate|offsetParent|item|false|||length||||||||||||parseInt|scrollLeft|scrollTop|containerCache|for|overflowX|overflowY|body|margins|scrollSpeed|scrollSensitivity|true|null|position|else||grid|cursorAt|floating|call|ddmanager||test|opacity|zIndex|over|positionAbs|pageX|window|pageY|data|parentNode|cursor|update|originalPosition|Math|toleranceElement|scroll|start|plugin|stop|appendTo|tolerance|absolute|outerHeight|outerWidth|each|push|HTML|tagName|sort|overflow|auto|add|rearrange|remove|not|prev|clear|axis|undefined|target|isFunction|overflowXOffset|overflowYOffset|while|_opacity|_zIndex|_cursor|guess|refreshPositions|domPosition|revert|change|continue|generatePosition|createPlaceholder||borderTopWidth|borderLeftWidth|right|addClass|refresh|currentContainer|disabled|connectWith|offsetWidth|offsetHeight|do|dropOnEmpty|toArray|serialize|extend|down|direction|visibility|dragging|out|500|animate|dropBehaviour|px|style|contactContainers|type|intersectsWithEdge|convertPositionTo|mouseDrag|round|clone|marginBottom|scrollHeight|max|marginRight|bottom|parents|handle|abs|intersectsWith|div|removeData|refreshItems|pointer|id|attr|key|relative|compareDocumentPosition|contains|browser|jQuery|1000|button|input|cancel|delay|distance|defaults|getter|after|before|append|cancelHelperRemoval|deactivate|receive|50|hide|drop|mouseStop|drag|break|up|dynamic|semi|next|prepareOffsets|current|activate|hidden|scrollWidth|marginTop|marginLeft|both|apply|typeof|mouseStart|andSelf|find|static|mouseCapture|10000|String|constructor|mouseDestroy|unbind|removeClass|destroy|join|_|expression|match|attribute|triggerHandler|sender|absolutePosition|plugins|mouseInit|fixed|float|init|mouse|widget|522|version|safari'.split('|'),0,{}))1 eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(b(B){b A(E,D){9 C=B.2U.3W&&B.2U.3V<3U;5(E.2T&&!C){d E.2T(D)}5(E.2S){d!!(E.2S(D)&16)}1R(D=D.1g){5(D==E){d U}}d w}B.3T("m.q",B.2h(B.m.3S,{3R:b(){9 C=4.8;4.P={};4.g.27("m-q");4.2L();4.13=4.c.z?(/6|25/).18(4.c[0].u.f("3Q")):w;5(!(/(2R|1t|3P)/).18(4.g.f("W"))){4.g.f("W","2R")}4.a=4.g.a();4.3O()},3N:{},m:b(C){d{k:(C||4)["k"],r:(C||4)["r"]||B([]),W:(C||4)["W"],3M:(C||4)["1c"],8:4.8,g:4.g,u:(C||4)["i"],3L:C?C.g:O}},v:b(F,E,C,D){B.m.1m.15(4,F,[E,4.m(C)]);5(!D){4.g.3K(F=="1C"?F:"1C"+F,[E,4.m(C)],4.8[F])}},2g:b(E){9 C=(B.1O(4.8.c)?4.8.c.15(4.g):B(4.8.c,4.g)).1Y(".m-q-k");9 D=[];E=E||{};C.1y(b(){9 F=(B(4).2O(E.3J||"2N")||"").3I(E.2P||(/(.+)[-=3H](.+)/));5(F){D.1z((E.2Q||F[1])+"[]="+(E.2Q&&E.2P?F[1]:F[2]))}});d D.3G("&")},2f:b(C){9 D=(B.1O(4.8.c)?4.8.c.15(4.g):B(4.8.c,4.g)).1Y(".m-q-k");9 E=[];D.1y(b(){E.1z(B(4).2O(C||"2N"))});d E},2G:b(J){9 E=4.1c.6,D=E+4.s.n,I=4.1c.7,H=I+4.s.o;9 F=J.6,C=F+J.n,K=J.7,G=K+J.o;5(4.8.1p=="2M"||(4.8.1p=="1V"&&4.s[4.13?"n":"o"]>J[4.13?"n":"o"])){d(I+4.a.p.7>K&&I+4.a.p.7<G&&E+4.a.p.6>F&&E+4.a.p.6<C)}Z{d(F<E+(4.s.n/2)&&D-(4.s.n/2)<C&&K<I+(4.s.o/2)&&H-(4.s.o/2)<G)}},2u:b(J){9 E=4.1c.6,D=E+4.s.n,I=4.1c.7,H=I+4.s.o;9 F=J.6,C=F+J.n,K=J.7,G=K+J.o;5(4.8.1p=="2M"||(4.8.1p=="1V"&&4.s[4.13?"n":"o"]>J[4.13?"n":"o"])){5(!(I+4.a.p.7>K&&I+4.a.p.7<G&&E+4.a.p.6>F&&E+4.a.p.6<C)){d w}5(4.13){5(E+4.a.p.6>F&&E+4.a.p.6<F+J.n/2){d 2}5(E+4.a.p.6>F+J.n/2&&E+4.a.p.6<C){d 1}}Z{5(I+4.a.p.7>K&&I+4.a.p.7<K+J.o/2){d 2}5(I+4.a.p.7>K+J.o/2&&I+4.a.p.7<G){d 1}}}Z{5(!(F<E+(4.s.n/2)&&D-(4.s.n/2)<C&&K<I+(4.s.o/2)&&H-(4.s.o/2)<G)){d w}5(4.13){5(D>F&&E<F){d 2}5(E<C&&D>C){d 1}}Z{5(H>K&&I<K){d 1}5(I<G&&H>G){d 2}}}d w},2L:b(){4.28();4.1I()},28:b(){4.c=[];4.e=[4];9 D=4.c;9 C=4;9 F=[[B.1O(4.8.c)?4.8.c.15(4.g,O,{8:4.8,u:4.i}):B(4.8.c,4.g),4]];5(4.8.2a){Q(9 G=4.8.2a.z-1;G>=0;G--){9 I=B(4.8.2a[G]);Q(9 E=I.z-1;E>=0;E--){9 H=B.1f(I[E],"q");5(H&&!H.8.29){F.1z([B.1O(H.8.c)?H.8.c.15(H.g):B(H.8.c,H.g),H]);4.e.1z(H)}}}}Q(9 G=F.z-1;G>=0;G--){F[G][0].1y(b(){B.1f(4,"q-u",F[G][1]);D.1z({u:B(4),2K:F[G][1],n:0,o:0,6:0,7:0})})}},1I:b(D){5(4.t){9 C=4.t.a();4.a.l={7:C.7+4.1w.7,6:C.6+4.1w.6}}Q(9 F=4.c.z-1;F>=0;F--){5(4.c[F].2K!=4.1x&&4.1x&&4.c[F].u[0]!=4.i[0]){1L}9 E=4.8.2J?B(4.8.2J,4.c[F].u):4.c[F].u;5(!D){4.c[F].n=E.1v();4.c[F].o=E.1u()}9 G=E.a();4.c[F].6=G.6;4.c[F].7=G.7}Q(9 F=4.e.z-1;F>=0;F--){9 G=4.e[F].g.a();4.e[F].P.6=G.6;4.e[F].P.7=G.7;4.e[F].P.n=4.e[F].g.1v();4.e[F].P.o=4.e[F].g.1u()}},3F:b(){4.g.3E("m-q m-q-29").2I("q").3D(".q");4.3C();Q(9 C=4.c.z-1;C>=0;C--){4.c[C].u.2I("q-u")}},26:b(E){9 C=E||4,F=C.8;5(F.r.3B==3A){9 D=F.r;F.r={g:b(){d B("<2H></2H>").27(D)[0]},1q:b(G,H){H.f(G.a()).f({n:G.1v(),o:G.1u()})}}}C.r=B(F.r.g.15(C.g,C.i)).1o("T").f({W:"1t"});F.r.1q.15(C.g,C.i,C.r)},2s:b(F){Q(9 D=4.e.z-1;D>=0;D--){5(4.2G(4.e[D].P)){5(!4.e[D].P.1b){5(4.1x!=4.e[D]){9 I=3z;9 H=O;9 E=4.1c[4.e[D].13?"6":"7"];Q(9 C=4.c.z-1;C>=0;C--){5(!A(4.e[D].g[0],4.c[C].u[0])){1L}9 G=4.c[C][4.e[D].13?"6":"7"];5(1k.2F(G-E)<I){I=1k.2F(G-E);H=4.c[C]}}5(!H&&!4.8.2e){1L}5(4.r){4.r.1G()}5(4.e[D].8.r){4.e[D].26(4)}Z{4.r=O}4.1x=4.e[D];H?4.1J(F,H,O,U):4.1J(F,O,4.e[D].g,U);4.v("21",F);4.e[D].v("21",F,4)}4.e[D].v("1b",F,4);4.e[D].P.1b=1}}Z{5(4.e[D].P.1b){4.e[D].v("2k",F,4);4.e[D].P.1b=0}}}},3y:b(G,F){5(4.8.29||4.8.2t=="3x"){d w}4.28();9 E=O,D=4,C=B(G.1N).2D().1y(b(){5(B.1f(4,"q-u")==D){E=B(4);d w}});5(B.1f(G.1N,"q-u")==D){E=B(G.1N)}5(!E){d w}5(4.8.2E&&!F){9 H=w;B(4.8.2E,E).3w("*").3v().1y(b(){5(4==G.1N){H=U}});5(!H){d w}}4.i=E;d U},3u:b(H,F,C){9 J=4.8;4.1x=4;4.1I();4.k=3t J.k=="b"?B(J.k.3s(4.g[0],[H,4.i])):4.i.1W();5(!4.k.2D("T").z){4.k.1o((J.1o!="l"?J.1o:4.i[0].1g))}4.k.f({W:"1t",1H:"3r"}).27("m-q-k");4.V={6:(L(4.i.f("3q"),10)||0),7:(L(4.i.f("3p"),10)||0)};4.a=4.i.a();4.a={7:4.a.7-4.V.7,6:4.a.6-4.V.6};4.a.p={6:H.1d-4.a.6,7:H.1e-4.a.7};4.t=4.k.t();9 D=4.t.a();4.1w={7:(L(4.t.f("23"),10)||0),6:(L(4.t.f("24"),10)||0)};4.a.l={7:D.7+4.1w.7,6:D.6+4.1w.6};4.1j=4.22(H);4.1X={1r:4.i.1r()[0],l:4.i.l()[0]};4.s={n:4.k.1v(),o:4.k.1u()};5(J.r){4.26()}4.v("1l",H);4.s={n:4.k.1v(),o:4.k.1u()};5(J.12){5(J.12.6!=1M){4.a.p.6=J.12.6}5(J.12.25!=1M){4.a.p.6=4.s.n-J.12.25}5(J.12.7!=1M){4.a.p.7=J.12.7}5(J.12.2C!=1M){4.a.p.7=4.s.o-J.12.2C}}5(J.j){5(J.j=="l"){J.j=4.k[0].1g}5(J.j=="h"||J.j=="17"){4.j=[0-4.a.l.6,0-4.a.l.7,B(J.j=="h"?h:17).n()-4.a.l.6-4.s.n-4.V.6-(L(4.g.f("2B"),10)||0),(B(J.j=="h"?h:17).o()||h.T.1g.2z)-4.a.l.7-4.s.o-4.V.7-(L(4.g.f("2y"),10)||0)]}5(!(/^(h|17|l)$/).18(J.j)){9 G=B(J.j)[0];9 I=B(J.j).a();4.j=[I.6+(L(B(G).f("24"),10)||0)-4.a.l.6,I.7+(L(B(G).f("23"),10)||0)-4.a.l.7,I.6+1k.2A(G.3o,G.2b)-(L(B(G).f("24"),10)||0)-4.a.l.6-4.s.n-4.V.6-(L(4.i.f("2B"),10)||0),I.7+1k.2A(G.2z,G.2c)-(L(B(G).f("23"),10)||0)-4.a.l.7-4.s.o-4.V.7-(L(4.i.f("2y"),10)||0)]}}5(4.8.r!="1W"){4.i.f("2i","3n")}5(!C){Q(9 E=4.e.z-1;E>=0;E--){4.e[E].v("3m",H,4)}}5(B.m.14){B.m.14.3l=4}5(B.m.14&&!J.2n){B.m.14.3k(4,H)}4.2j=U;4.2w(H);d U},2v:b(D,E){5(!E){E=4.W}9 C=D=="1t"?1:-1;d{7:(E.7+4.a.l.7*C-(4.t[0]==h.T?0:4.t[0].N)*C+4.V.7*C),6:(E.6+4.a.l.6*C-(4.t[0]==h.T?0:4.t[0].M)*C+4.V.6*C)}},22:b(F){9 G=4.8;9 C={7:(F.1e-4.a.p.7-4.a.l.7+(4.t[0]==h.T?0:4.t[0].N)),6:(F.1d-4.a.p.6-4.a.l.6+(4.t[0]==h.T?0:4.t[0].M))};5(!4.1j){d C}5(4.j){5(C.6<4.j[0]){C.6=4.j[0]}5(C.7<4.j[1]){C.7=4.j[1]}5(C.6>4.j[2]){C.6=4.j[2]}5(C.7>4.j[3]){C.7=4.j[3]}}5(G.11){9 E=4.1j.7+1k.2x((C.7-4.1j.7)/G.11[1])*G.11[1];C.7=4.j?(!(E<4.j[1]||E>4.j[3])?E:(!(E<4.j[1])?E-G.11[1]:E+G.11[1])):E;9 D=4.1j.6+1k.2x((C.6-4.1j.6)/G.11[0])*G.11[0];C.6=4.j?(!(D<4.j[0]||D>4.j[2])?D:(!(D<4.j[0])?D-G.11[0]:D+G.11[0])):D}d C},2w:b(D){4.W=4.22(D);4.1c=4.2v("1t");Q(9 C=4.c.z-1;C>=0;C--){9 E=4.2u(4.c[C]);5(!E){1L}5(4.c[C].u[0]!=4.i[0]&&4.i[E==1?"3j":"1r"]()[0]!=4.c[C].u[0]&&!A(4.i[0],4.c[C].u[0])&&(4.8.2t=="3i-3h"?!A(4.g[0],4.c[C].u[0]):U)){4.2p=E==1?"2o":"3g";4.1J(D,4.c[C]);4.v("21",D);3f}}4.2s(D);4.v("1C",D);5(!4.8.1K||4.8.1K=="x"){4.k[0].2r.6=4.W.6+"2q"}5(!4.8.1K||4.8.1K=="y"){4.k[0].2r.7=4.W.7+"2q"}5(B.m.14){B.m.14.3e(4,D)}d w},1J:b(H,G,D,F){D?D.3d(4.i):G.u[4.2p=="2o"?"3c":"3b"](4.i);4.1s=4.1s?++4.1s:1;9 E=4,C=4.1s;17.3a(b(){5(C==E.1s){E.1I(!F)}},0);5(4.8.r){4.8.r.1q.15(4.g,4.i,4.r)}},39:b(E,D){5(B.m.14&&!4.8.2n){B.m.14.38(4,E)}5(4.8.1Z){9 C=4;9 F=C.i.a();5(C.r){C.r.2m({19:"37"},(L(4.8.1Z,10)||2l)-36)}B(4.k).2m({6:F.6-4.a.l.6-C.V.6+(4.t[0]==h.T?0:4.t[0].M),7:F.7-4.a.l.7-C.V.7+(4.t[0]==h.T?0:4.t[0].N)},L(4.8.1Z,10)||2l,b(){C.1H(E)})}Z{4.1H(E,D)}d w},1H:b(E,D){5(4.1X.1r!=4.i.1r().1Y(".m-q-k")[0]||4.1X.l!=4.i.l()[0]){4.v("1q",E,O,D)}5(!A(4.g[0],4.i[0])){4.v("1G",E,O,D);Q(9 C=4.e.z-1;C>=0;C--){5(A(4.e[C].g[0],4.i[0])){4.e[C].v("1q",E,4,D);4.e[C].v("35",E,4,D)}}}Q(9 C=4.e.z-1;C>=0;C--){4.e[C].v("34",E,4,D);5(4.e[C].P.1b){4.e[C].v("2k",E,4);4.e[C].P.1b=0}}4.2j=w;5(4.33){4.v("1n",E,O,D);d w}B(4.i).f("2i","");5(4.r){4.r.1G()}4.k.1G();4.k=O;4.v("1n",E,O,D);d U}}));B.2h(B.m.q,{32:"2g 2f",31:{k:"1W",1p:"1V",30:1,2Z:0,1h:U,Y:20,X:20,2Y:":2X",c:"> *",1a:2W,2e:U,1o:"l"}});B.m.1m.1F("q","1i",{1l:b(E,D){9 C=B("T");5(C.f("1i")){D.8.1U=C.f("1i")}C.f("1i",D.8.1i)},1n:b(D,C){5(C.8.1U){B("T").f("1i",C.8.1U)}}});B.m.1m.1F("q","1a",{1l:b(E,D){9 C=D.k;5(C.f("1a")){D.8.1T=C.f("1a")}C.f("1a",D.8.1a)},1n:b(D,C){5(C.8.1T){B(C.k).f("1a",C.8.1T)}}});B.m.1m.1F("q","19",{1l:b(E,D){9 C=D.k;5(C.f("19")){D.8.1S=C.f("19")}C.f("19",D.8.19)},1n:b(D,C){5(C.8.1S){B(C.k).f("19",C.8.1S)}}});B.m.1m.1F("q","1h",{1l:b(E,D){9 F=D.8;9 C=B(4).1f("q");C.S=b(G){2d{5(/1E|1h/.18(G.f("1D"))||(/1E|1h/).18(G.f("1D-y"))){d G}G=G.l()}1R(G[0].1g);d B(h)}(C.i);C.R=b(G){2d{5(/1E|1h/.18(G.f("1D"))||(/1E|1h/).18(G.f("1D-x"))){d G}G=G.l()}1R(G[0].1g);d B(h)}(C.i);5(C.S[0]!=h&&C.S[0].1B!="1A"){C.1Q=C.S.a()}5(C.R[0]!=h&&C.R[0].1B!="1A"){C.1P=C.R.a()}},1C:b(E,D){9 F=D.8;9 C=B(4).1f("q");5(C.S[0]!=h&&C.S[0].1B!="1A"){5((C.1Q.7+C.S[0].2c)-E.1e<F.Y){C.S[0].N=C.S[0].N+F.X}5(E.1e-C.1Q.7<F.Y){C.S[0].N=C.S[0].N-F.X}}Z{5(E.1e-B(h).N()<F.Y){B(h).N(B(h).N()-F.X)}5(B(17).o()-(E.1e-B(h).N())<F.Y){B(h).N(B(h).N()+F.X)}}5(C.R[0]!=h&&C.R[0].1B!="1A"){5((C.1P.6+C.R[0].2b)-E.1d<F.Y){C.R[0].M=C.R[0].M+F.X}5(E.1d-C.1P.6<F.Y){C.R[0].M=C.R[0].M-F.X}}Z{5(E.1d-B(h).M()<F.Y){B(h).M(B(h).M()-F.X)}5(B(17).n()-(E.1d-B(h).M())<F.Y){B(h).M(B(h).M()+F.X)}}}})})(2V)',62,245,'||||this|if|left|top|options|var|offset|function|items|return|containers|css|element|document|currentItem|containment|helper|parent|ui|width|height|click|sortable|placeholder|helperProportions|offsetParent|item|propagate|false|||length||||||||||||parseInt|scrollLeft|scrollTop|null|containerCache|for|overflowX|overflowY|body|true|margins|position|scrollSpeed|scrollSensitivity|else||grid|cursorAt|floating|ddmanager|call||window|test|opacity|zIndex|over|positionAbs|pageX|pageY|data|parentNode|scroll|cursor|originalPosition|Math|start|plugin|stop|appendTo|tolerance|update|prev|counter|absolute|outerHeight|outerWidth|offsetParentBorders|currentContainer|each|push|HTML|tagName|sort|overflow|auto|add|remove|clear|refreshPositions|rearrange|axis|continue|undefined|target|isFunction|overflowXOffset|overflowYOffset|while|_opacity|_zIndex|_cursor|guess|clone|domPosition|not|revert||change|generatePosition|borderTopWidth|borderLeftWidth|right|createPlaceholder|addClass|refreshItems|disabled|connectWith|offsetWidth|offsetHeight|do|dropOnEmpty|toArray|serialize|extend|visibility|dragging|out|500|animate|dropBehaviour|down|direction|px|style|contactContainers|type|intersectsWithEdge|convertPositionTo|mouseDrag|round|marginBottom|scrollHeight|max|marginRight|bottom|parents|handle|abs|intersectsWith|div|removeData|toleranceElement|instance|refresh|pointer|id|attr|expression|key|relative|compareDocumentPosition|contains|browser|jQuery|1000|input|cancel|delay|distance|defaults|getter|cancelHelperRemoval|deactivate|receive|50|hide|drop|mouseStop|setTimeout|after|before|append|drag|break|up|dynamic|semi|next|prepareOffsets|current|activate|hidden|scrollWidth|marginTop|marginLeft|both|apply|typeof|mouseStart|andSelf|find|static|mouseCapture|10000|String|constructor|mouseDestroy|unbind|removeClass|destroy|join|_|match|attribute|triggerHandler|sender|absolutePosition|plugins|mouseInit|fixed|float|init|mouse|widget|522|version|safari'.split('|'),0,{})) 2 2 -
branches/crazyhorse/wp-includes/js/jquery/ui.tabs.js
r8064 r8242 1 eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4(A){A.39("8.3",{38:4(){2.c. u+=".3";2.1e(1c)},37:4(B,C){5((/^7/).1Z(B)){2.16(C)}m{2.c[B]=C;2.1e()}},i:4(){f 2.$3.i},1E:4(B){f B.24&&B.24.13(/\\s/g,"23").13(/[^A-36-35-9\\-23:\\.]/g,"")||2.c.1Q+A.e(B)},8:4(C,B){f{c:2.c,34:C,1M:B}},1e:4(O){2.$h=A("1i:33(a[n])",2.k);2.$3=2.$h.1s(4(){f A("a",2)[0]});2.$b=A([]);6 P=2,D=2.c;2.$3.V(4(R,Q){5(Q.t&&Q.t.13("#","")){P.$b=P.$b.1b(Q.t)}m{5(A(Q).12("n")!="#"){A.e(Q,"n.3",Q.n);A.e(Q,"p.3",Q.n);6 T=P.1E(Q);Q.n="#"+T;6 S=A("#"+T);5(!S.i){S=A(D.1x).12("1f",T).l(D.18).32(P.$b[R-1]||P.k);S.e("1a.3",1c)}P.$b=P.$b.1b(S)}m{D.d.1U(R+1)}}});5(O){2.k.l(D.1w);2.$b.V(4(){6 Q=A(2);Q.l(D.18)});5(D.7===1p){5(1J.t){2.$3.V(4(S,Q){5(Q.t==1J.t){D.7=S;5(A.W.1g||A.W.31){6 R=A(1J.t),T=R.12("1f");R.12("1f","");1z(4(){R.12("1f",T)},30)}2Z(0,0);f o}})}m{5(D.Y){6 J=2Y(A.Y("8-3"+A.e(P.k)),10);5(J&&P.$3[J]){D.7=J}}m{5(P.$h.z("."+D.j).i){D.7=P.$h.Z(P.$h.z("."+D.j)[0])}}}}D.7=D.7===v||D.7!==1p?D.7:0;D.d=A.2X(D.d.2W(A.1s(2.$h.z("."+D.U),4(R,Q){f P.$h.Z(R)}))).1T();5(A.1r(D.7,D.d)!=-1){D.d.2V(A.1r(D.7,D.d),1)}2.$b.l(D.w);2.$h.q(D.j);5(D.7!==v){2.$b.r(D.7).1G().q(D.w);2.$h.r(D.7).l(D.j);6 K=4(){A(P.k).y("20",[P.8(P.$3[D.7],P.$b[D.7])],D.1G)};5(A.e(2.$3[D.7],"p.3")){2.p(D.7,K)}m{K()}}A(2U).15("2T",4(){P.$3.14(".3");P.$h=P.$3=P.$b=v})}2S(6 G=0,N;N=2.$h[G];G++){A(N)[A.1r(G,D.d)!=-1&&!A(N).11(D.j)?"l":"q"](D.U)}5(D.x===o){2.$3.1m("x.3")}6 C,I,B={"2R-2Q":0,1I:1},E="2P";5(D.X&&D.X.2O==2N){C=D.X[0]||B,I=D.X[1]||B}m{C=I=D.X||B}6 H={1q:"",2M:"",2L:""};5(!A.W.1g){H.1H=""}4 M(R,Q,S){Q.22(C,C.1I||E,4(){Q.l(D.w).1d(H);5(A.W.1g&&C.1H){Q[0].21.z=""}5(S){L(R,S,Q)}})}4 L(R,S,Q){5(I===B){S.1d("1q","1D")}S.22(I,I.1I||E,4(){S.q(D.w).1d(H);5(A.W.1g&&I.1H){S[0].21.z=""}A(P.k).y("20",[P.8(R,S[0])],D.1G)})}4 F(R,T,Q,S){T.l(D.j).2K().q(D.j);M(R,Q,S)}2.$3.14(".3").15(D.u,4(){6 T=A(2).2J("1i:r(0)"),Q=P.$b.z(":2I"),S=A(2.t);5((T.11(D.j)&&!D.1h)||T.11(D.U)||A(2).11(D.17)||A(P.k).y("2H",[P.8(2,S[0])],D.16)===o){2.1t();f o}P.c.7=P.$3.Z(2);5(D.1h){5(T.11(D.j)){P.c.7=v;T.q(D.j);P.$b.1F();M(2,Q);2.1t();f o}m{5(!Q.i){P.$b.1F();6 R=2;P.p(P.$3.Z(2),4(){T.l(D.j).l(D.1v);L(R,S)});2.1t();f o}}}5(D.Y){A.Y("8-3"+A.e(P.k),P.c.7,D.Y)}P.$b.1F();5(S.i){6 R=2;P.p(P.$3.Z(2),Q.i?4(){F(R,T,Q,S)}:4(){T.l(D.j);L(R,S)})}m{2G"1K 2F 2E: 2D 2C 2B."}5(A.W.1g){2.1t()}f o});5(!(/^1y/).1Z(D.u)){2.$3.15("1y.3",4(){f o})}},1b:4(E,D,C){5(C==1p){C=2.$3.i}6 G=2.c;6 I=A(G.1P.13(/#\\{n\\}/g,E).13(/#\\{1j\\}/g,D));I.e("1a.3",1c);6 H=E.2A("#")==0?E.13("#",""):2.1E(A("a:2z-2y",I)[0]);6 F=A("#"+H);5(!F.i){F=A(G.1x).12("1f",H).l(G.w).e("1a.3",1c)}F.l(G.18);5(C>=2.$h.i){I.1Y(2.k);F.1Y(2.k[0].2x)}m{I.1X(2.$h[C]);F.1X(2.$b[C])}G.d=A.1s(G.d,4(K,J){f K>=C?++K:K});2.1e();5(2.$3.i==1){I.l(G.j);F.q(G.w);6 B=A.e(2.$3[0],"p.3");5(B){2.p(C,B)}}2.k.y("2w",[2.8(2.$3[C],2.$b[C])],G.1b)},19:4(B){6 D=2.c,E=2.$h.r(B).19(),C=2.$b.r(B).19();5(E.11(D.j)&&2.$3.i>1){2.16(B+(B+1<2.$3.i?1:-1))}D.d=A.1s(A.1W(D.d,4(G,F){f G!=B}),4(G,F){f G>=B?--G:G});2.1e();2.k.y("2v",[2.8(E.1C("a")[0],C[0])],D.19)},1V:4(B){6 C=2.c;5(A.1r(B,C.d)==-1){f}6 D=2.$h.r(B).q(C.U);5(A.W.2u){D.1d("1q","2t-1D");1z(4(){D.1d("1q","1D")},0)}C.d=A.1W(C.d,4(F,E){f F!=B});2.k.y("2s",[2.8(2.$3[B],2.$b[B])],C.1V)},1S:4(C){6 B=2,D=2.c;5(C!=D.7){2.$h.r(C).l(D.U);D.d.1U(C);D.d.1T();2.k.y("2r",[2.8(2.$3[C],2.$b[C])],D.1S)}},16:4(B){5(2q B=="2p"){B=2.$3.Z(2.$3.z("[n$="+B+"]")[0])}2.$3.r(B).2o(2.c.u)},p:4(G,K){6 L=2,D=2.c,E=2.$3.r(G),J=E[0],H=K==1p||K===o,B=E.e("p.3");K=K||4(){};5(!B||!H&&A.e(J,"x.3")){K();f}6 M=4(N){6 O=A(N),P=O.1C("*:2n");f P.i&&P||O};6 C=4(){L.$3.z("."+D.17).q(D.17).V(4(){5(D.1l){M(2).2m().1o(M(2).e("1j.3"))}});L.1n=v};5(D.1l){6 I=M(J).1o();M(J).2l("<1B></1B>").1C("1B").e("1j.3",I).1o(D.1l)}6 F=A.1L({},D.1k,{1R:B,1A:4(O,N){A(J.t).1o(O);C();5(D.x){A.e(J,"x.3",1c)}A(L.k).y("2k",[L.8(L.$3[G],L.$b[G])],D.p);D.1k.1A&&D.1k.1A(O,N);K()}});5(2.1n){2.1n.2j();C()}E.l(D.17);1z(4(){L.1n=A.2i(F)},0)},1R:4(C,B){2.$3.r(C).1m("x.3").e("p.3",B)},1a:4(){6 B=2.c;2.k.14(".3").q(B.1w).1m("3");2.$3.V(4(){6 C=A.e(2,"n.3");5(C){2.n=C}6 D=A(2).14(".3");A.V(["n","p","x"],4(E,F){D.1m(F+".3")})});2.$h.1b(2.$b).V(4(){5(A.e(2,"1a.3")){A(2).19()}m{A(2).q([B.j,B.1v,B.U,B.18,B.w].2h(" "))}})}});A.8.3.2g={1h:o,u:"1y",d:[],Y:v,1l:"2fe;",x:o,1Q:"8-3-",1k:{},X:v,1P:\'<1i><a n="#{n}"><1O>#{1j}</1O></a></1i>\',1x:"<1N></1N>",1w:"8-3-2d",j:"8-3-7",1v:"8-3-1h",U:"8-3-d",18:"8-3-1M",w:"8-3-2c",17:"8-3-2b"};A.8.3.2a="i";A.1L(A.8.3.29,{1u:v,28:4(C,F){F=F||o;6 B=2,E=2.c.7;4 G(){B.1u=27(4(){E=++E<B.$3.i?E:0;B.16(E)},C)}4 D(H){5(!H||H.26){25(B.1u)}}5(C){G();5(!F){2.$3.15(2.c.u,D)}m{2.$3.15(2.c.u,4(){D();E=B.c.7;G()})}}m{D();2.$3.14(2.c.u,D)}}})})(1K)',62,196,'||this|tabs|function|if|var|selected|ui|||panels|options|disabled|data|return||lis|length|selectedClass|element|addClass|else|href|false|load|removeClass|eq||hash|event|null|hideClass|cache|triggerHandler|filter|||||||||||||||||||||disabledClass|each|browser|fx|cookie|index||hasClass|attr|replace|unbind|bind|select|loadingClass|panelClass|remove|destroy|add|true|css|tabify|id|msie|unselect|li|label|ajaxOptions|spinner|removeData|xhr|html|undefined|display|inArray|map|blur|rotation|unselectClass|navClass|panelTemplate|click|setTimeout|success|em|find|block|tabId|stop|show|opacity|duration|location|jQuery|extend|panel|div|span|tabTemplate|idPrefix|url|disable|sort|push|enable|grep|insertBefore|appendTo|test|tabsshow|style|animate|_|title|clearInterval|clientX|setInterval|rotate|prototype|getter|loading|hide|nav|8230|Loading|defaults|join|ajax|abort|tabsload|wrapInner|parent|last|trigger|string|typeof|tabsdisable|tabsenable|inline|safari|tabsremove|tabsadd|parentNode|child|first|indexOf|identifier|fragment|Mismatching|Tabs|UI|throw|tabsselect|visible|parents|siblings|height|overflow|Array|constructor|normal|width|min|for|unload|window|splice|concat|unique|parseInt|scrollTo|500|opera|insertAfter|has|tab|z0|Za|setData|init|widget'.split('|'),0,{}))1 eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4(A){A.39("8.3",{38:4(){2.c.v+=".3";2.1e(1c)},37:4(B,C){5((/^7/).1Z(B)){2.16(C)}n{2.c[B]=C;2.1e()}},i:4(){f 2.$3.i},1E:4(B){f B.24&&B.24.13(/\\s/g,"23").13(/[^A-36-35-9\\-23:\\.]/g,"")||2.c.1Q+A.e(B)},8:4(C,B){f{c:2.c,34:C,1M:B}},1e:4(O){2.$h=A("1i:33(a[o])",2.l);2.$3=2.$h.1s(4(){f A("a",2)[0]});2.$b=A([]);6 P=2,D=2.c;2.$3.V(4(R,Q){5(Q.u&&Q.u.13("#","")){P.$b=P.$b.1b(Q.u)}n{5(A(Q).12("o")!="#"){A.e(Q,"o.3",Q.o);A.e(Q,"q.3",Q.o);6 T=P.1E(Q);Q.o="#"+T;6 S=A("#"+T);5(!S.i){S=A(D.1x).12("1f",T).m(D.18).32(P.$b[R-1]||P.l);S.e("1a.3",1c)}P.$b=P.$b.1b(S)}n{D.d.1U(R+1)}}});5(O){2.l.m(D.1w);2.$b.V(4(){6 Q=A(2);Q.m(D.18)});5(D.7===1p){5(1J.u){2.$3.V(4(S,Q){5(Q.u==1J.u){D.7=S;5(A.W.1g||A.W.31){6 R=A(1J.u),T=R.12("1f");R.12("1f","");1z(4(){R.12("1f",T)},30)}2Z(0,0);f p}})}n{5(D.Y){6 J=2Y(A.Y("8-3"+A.e(P.l)),10);5(J&&P.$3[J]){D.7=J}}n{5(P.$h.z("."+D.k).i){D.7=P.$h.Z(P.$h.z("."+D.k)[0])}}}}D.7=D.7===j||D.7!==1p?D.7:0;D.d=A.2X(D.d.2W(A.1s(2.$h.z("."+D.U),4(R,Q){f P.$h.Z(R)}))).1T();5(A.1r(D.7,D.d)!=-1){D.d.2V(A.1r(D.7,D.d),1)}2.$b.m(D.w);2.$h.r(D.k);5(D.7!==j){2.$b.t(D.7).1G().r(D.w);2.$h.t(D.7).m(D.k);6 K=4(){A(P.l).y("20",[j,P.8(P.$3[D.7],P.$b[D.7])],D.1G)};5(A.e(2.$3[D.7],"q.3")){2.q(D.7,K)}n{K()}}A(2U).15("2T",4(){P.$3.14(".3");P.$h=P.$3=P.$b=j})}2S(6 G=0,N;N=2.$h[G];G++){A(N)[A.1r(G,D.d)!=-1&&!A(N).11(D.k)?"m":"r"](D.U)}5(D.x===p){2.$3.1m("x.3")}6 C,I,B={"2R-2Q":0,1I:1},E="2P";5(D.X&&D.X.2O==2N){C=D.X[0]||B,I=D.X[1]||B}n{C=I=D.X||B}6 H={1q:"",2M:"",2L:""};5(!A.W.1g){H.1H=""}4 M(R,Q,S){Q.22(C,C.1I||E,4(){Q.m(D.w).1d(H);5(A.W.1g&&C.1H){Q[0].21.z=""}5(S){L(R,S,Q)}})}4 L(R,S,Q){5(I===B){S.1d("1q","1D")}S.22(I,I.1I||E,4(){S.r(D.w).1d(H);5(A.W.1g&&I.1H){S[0].21.z=""}A(P.l).y("20",[j,P.8(R,S[0])],D.1G)})}4 F(R,T,Q,S){T.m(D.k).2K().r(D.k);M(R,Q,S)}2.$3.14(".3").15(D.v,4(){6 T=A(2).2J("1i:t(0)"),Q=P.$b.z(":2I"),S=A(2.u);5((T.11(D.k)&&!D.1h)||T.11(D.U)||A(2).11(D.17)||A(P.l).y("2H",[j,P.8(2,S[0])],D.16)===p){2.1t();f p}P.c.7=P.$3.Z(2);5(D.1h){5(T.11(D.k)){P.c.7=j;T.r(D.k);P.$b.1F();M(2,Q);2.1t();f p}n{5(!Q.i){P.$b.1F();6 R=2;P.q(P.$3.Z(2),4(){T.m(D.k).m(D.1v);L(R,S)});2.1t();f p}}}5(D.Y){A.Y("8-3"+A.e(P.l),P.c.7,D.Y)}P.$b.1F();5(S.i){6 R=2;P.q(P.$3.Z(2),Q.i?4(){F(R,T,Q,S)}:4(){T.m(D.k);L(R,S)})}n{2G"1K 2F 2E: 2D 2C 2B."}5(A.W.1g){2.1t()}f p});5(!(/^1y/).1Z(D.v)){2.$3.15("1y.3",4(){f p})}},1b:4(E,D,C){5(C==1p){C=2.$3.i}6 G=2.c;6 I=A(G.1P.13(/#\\{o\\}/g,E).13(/#\\{1j\\}/g,D));I.e("1a.3",1c);6 H=E.2A("#")==0?E.13("#",""):2.1E(A("a:2z-2y",I)[0]);6 F=A("#"+H);5(!F.i){F=A(G.1x).12("1f",H).m(G.w).e("1a.3",1c)}F.m(G.18);5(C>=2.$h.i){I.1Y(2.l);F.1Y(2.l[0].2x)}n{I.1X(2.$h[C]);F.1X(2.$b[C])}G.d=A.1s(G.d,4(K,J){f K>=C?++K:K});2.1e();5(2.$3.i==1){I.m(G.k);F.r(G.w);6 B=A.e(2.$3[0],"q.3");5(B){2.q(C,B)}}2.l.y("2w",[j,2.8(2.$3[C],2.$b[C])],G.1b)},19:4(B){6 D=2.c,E=2.$h.t(B).19(),C=2.$b.t(B).19();5(E.11(D.k)&&2.$3.i>1){2.16(B+(B+1<2.$3.i?1:-1))}D.d=A.1s(A.1W(D.d,4(G,F){f G!=B}),4(G,F){f G>=B?--G:G});2.1e();2.l.y("2v",[j,2.8(E.1C("a")[0],C[0])],D.19)},1V:4(B){6 C=2.c;5(A.1r(B,C.d)==-1){f}6 D=2.$h.t(B).r(C.U);5(A.W.2u){D.1d("1q","2t-1D");1z(4(){D.1d("1q","1D")},0)}C.d=A.1W(C.d,4(F,E){f F!=B});2.l.y("2s",[j,2.8(2.$3[B],2.$b[B])],C.1V)},1S:4(C){6 B=2,D=2.c;5(C!=D.7){2.$h.t(C).m(D.U);D.d.1U(C);D.d.1T();2.l.y("2r",[j,2.8(2.$3[C],2.$b[C])],D.1S)}},16:4(B){5(2q B=="2p"){B=2.$3.Z(2.$3.z("[o$="+B+"]")[0])}2.$3.t(B).2o(2.c.v)},q:4(G,K){6 L=2,D=2.c,E=2.$3.t(G),J=E[0],H=K==1p||K===p,B=E.e("q.3");K=K||4(){};5(!B||!H&&A.e(J,"x.3")){K();f}6 M=4(N){6 O=A(N),P=O.1C("*:2n");f P.i&&P||O};6 C=4(){L.$3.z("."+D.17).r(D.17).V(4(){5(D.1l){M(2).2m().1o(M(2).e("1j.3"))}});L.1n=j};5(D.1l){6 I=M(J).1o();M(J).2l("<1B></1B>").1C("1B").e("1j.3",I).1o(D.1l)}6 F=A.1L({},D.1k,{1R:B,1A:4(O,N){A(J.u).1o(O);C();5(D.x){A.e(J,"x.3",1c)}A(L.l).y("2k",[j,L.8(L.$3[G],L.$b[G])],D.q);D.1k.1A&&D.1k.1A(O,N);K()}});5(2.1n){2.1n.2j();C()}E.m(D.17);1z(4(){L.1n=A.2i(F)},0)},1R:4(C,B){2.$3.t(C).1m("x.3").e("q.3",B)},1a:4(){6 B=2.c;2.l.14(".3").r(B.1w).1m("3");2.$3.V(4(){6 C=A.e(2,"o.3");5(C){2.o=C}6 D=A(2).14(".3");A.V(["o","q","x"],4(E,F){D.1m(F+".3")})});2.$h.1b(2.$b).V(4(){5(A.e(2,"1a.3")){A(2).19()}n{A(2).r([B.k,B.1v,B.U,B.18,B.w].2h(" "))}})}});A.8.3.2g={1h:p,v:"1y",d:[],Y:j,1l:"2fe;",x:p,1Q:"8-3-",1k:{},X:j,1P:\'<1i><a o="#{o}"><1O>#{1j}</1O></a></1i>\',1x:"<1N></1N>",1w:"8-3-2d",k:"8-3-7",1v:"8-3-1h",U:"8-3-d",18:"8-3-1M",w:"8-3-2c",17:"8-3-2b"};A.8.3.2a="i";A.1L(A.8.3.29,{1u:j,28:4(C,F){F=F||p;6 B=2,E=2.c.7;4 G(){B.1u=27(4(){E=++E<B.$3.i?E:0;B.16(E)},C)}4 D(H){5(!H||H.26){25(B.1u)}}5(C){G();5(!F){2.$3.15(2.c.v,D)}n{2.$3.15(2.c.v,4(){D();E=B.c.7;G()})}}n{D();2.$3.14(2.c.v,D)}}})})(1K)',62,196,'||this|tabs|function|if|var|selected|ui|||panels|options|disabled|data|return||lis|length|null|selectedClass|element|addClass|else|href|false|load|removeClass||eq|hash|event|hideClass|cache|triggerHandler|filter|||||||||||||||||||||disabledClass|each|browser|fx|cookie|index||hasClass|attr|replace|unbind|bind|select|loadingClass|panelClass|remove|destroy|add|true|css|tabify|id|msie|unselect|li|label|ajaxOptions|spinner|removeData|xhr|html|undefined|display|inArray|map|blur|rotation|unselectClass|navClass|panelTemplate|click|setTimeout|success|em|find|block|tabId|stop|show|opacity|duration|location|jQuery|extend|panel|div|span|tabTemplate|idPrefix|url|disable|sort|push|enable|grep|insertBefore|appendTo|test|tabsshow|style|animate|_|title|clearInterval|clientX|setInterval|rotate|prototype|getter|loading|hide|nav|8230|Loading|defaults|join|ajax|abort|tabsload|wrapInner|parent|last|trigger|string|typeof|tabsdisable|tabsenable|inline|safari|tabsremove|tabsadd|parentNode|child|first|indexOf|identifier|fragment|Mismatching|Tabs|UI|throw|tabsselect|visible|parents|siblings|height|overflow|Array|constructor|normal|width|min|for|unload|window|splice|concat|unique|parseInt|scrollTo|500|opera|insertAfter|has|tab|z0|Za|setData|init|widget'.split('|'),0,{})) 2 2 -
branches/crazyhorse/wp-includes/js/tinymce/langs/wp-langs.php
r8103 r8242 4 4 function mce_escape($text) { 5 5 global $language; 6 6 7 7 if ( 'en' == $language ) return $text; 8 8 else return js_escape($text); … … 401 401 tinyMCE.addI18n("' . $language . '.wpeditimage",{ 402 402 edit_img:"' . mce_escape( __('Edit Image') ) . '", 403 del_img:"' . mce_escape( __('Delete Image') ) . '", 403 404 adv_settings:"' . mce_escape( __('Advanced Settings') ) . '", 404 405 none:"' . mce_escape( __('None') ) . '", … … 422 423 orig_size:"' . mce_escape( __('Original Size') ) . '", 423 424 css:"' . mce_escape( __('CSS Class') ) . '", 425 s60:"' . mce_escape( __('60%') ) . '", 426 s70:"' . mce_escape( __('70%') ) . '", 427 s80:"' . mce_escape( __('80%') ) . '", 428 s90:"' . mce_escape( __('90%') ) . '", 429 s100:"' . mce_escape( __('100%') ) . '", 430 s110:"' . mce_escape( __('110%') ) . '", 431 s120:"' . mce_escape( __('120%') ) . '", 432 s130:"' . mce_escape( __('130%') ) . '", 424 433 caption:"' . mce_escape( __('Caption') ) . '" 425 434 }); 426 '; 435 '; 427 436 ?> -
branches/crazyhorse/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js
r7679 r8242 1 (function(){var DOM=tinymce.DOM;tinymce.create('tinymce.plugins.FullScreenPlugin',{init:function(ed,url){var t=this,s={},vp;t.editor=ed;ed.addCommand('mceFullScreen',function(){var win,de=DOM.doc.documentElement;if(ed.getParam('fullscreen_is_enabled')){if(ed.getParam('fullscreen_new_window'))closeFullscreen();else{DOM.win.setTimeout(function(){tinymce.dom.Event.remove(DOM.win,'resize',t.resizeFunc);tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent({format:'raw'}),{format:'raw'});tinyMCE.remove(ed);DOM.remove('mce_fullscreen_container');de.style.overflow=ed.getParam('fullscreen_html_overflow');DOM.setStyle(DOM.doc.body,'overflow',ed.getParam('fullscreen_overflow'));DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'),ed.getParam('fullscreen_scrolly'));tinyMCE.settings=tinyMCE.oldSettings;},10);}return;}if(ed.getParam('fullscreen_new_window')){win=DOM.win.open(url+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{win.resizeTo(screen.availWidth,screen.availHeight);}catch(e){}}else{tinyMCE.oldSettings=tinyMCE.settings;s.fullscreen_overflow=DOM.getStyle(DOM.doc.body,'overflow',1)||'auto';s.fullscreen_html_overflow=DOM.getStyle(de,'overflow',1);vp=DOM.getViewPort();s.fullscreen_scrollx=vp.x;s.fullscreen_scrolly=vp.y;if(tinymce.isOpera&&s.fullscreen_overflow=='visible')s.fullscreen_overflow='auto';if(tinymce.isIE&&s.fullscreen_overflow=='scroll')s.fullscreen_overflow='auto';if(s.fullscreen_overflow=='0px')s.fullscreen_overflow='';DOM.setStyle(DOM.doc.body,'overflow','hidden');de.style.overflow='hidden';vp=DOM.getViewPort();DOM.win.scrollTo(0,0);if(tinymce.isIE)vp.h-=1;n=DOM.add(DOM.doc.body,'div',{id:'mce_fullscreen_container',style:'position: absolute;top:0;left:0;width:'+vp.w+'px;height:'+vp.h+'px;z-index:200000;'});DOM.add(n,'div',{id:'mce_fullscreen'});tinymce.each(ed.settings,function(v,n){s[n]=v;});s.id='mce_fullscreen';s.width=n.clientWidth;s.height=n.clientHeight-15;s.fullscreen_is_enabled=true;s.fullscreen_editor_id=ed.id;s.theme_advanced_resizing=false;s.save_onsavecallback=function(){ed.setContent(tinyMCE.get(s.id).getContent({format:'raw'}),{format:'raw'});ed.execCommand('mceSave');};tinymce.each(ed.getParam('fullscreen_settings'),function(v,k){s[k]=v;});if(s.theme_advanced_toolbar_location==='external')s.theme_advanced_toolbar_location='top';t.fullscreenEditor=new tinymce.Editor('mce_fullscreen',s);t.fullscreenEditor.onInit.add(function(){t.fullscreenEditor.setContent(ed.getContent());t.fullscreenEditor.focus();});t.fullscreenEditor.render();tinyMCE.add(t.fullscreenEditor);t.fullscreenElement=new tinymce.dom.Element('mce_fullscreen_container');t.fullscreenElement.update();t.resizeFunc=tinymce.dom.Event.add(DOM.win,'resize',function(){var vp=tinymce.DOM.getViewPort();t.fullscreenEditor.theme.resizeTo(vp.w,vp.h);});}});ed.addButton('fullscreen',{title:'fullscreen.desc',cmd:'mceFullScreen'});ed.onNodeChange.add(function(ed,cm){cm.setActive('fullscreen',ed.getParam('fullscreen_is_enabled'));});},getInfo:function(){return{longname:'Fullscreen',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('fullscreen',tinymce.plugins.FullScreenPlugin);})();1 (function(){var DOM=tinymce.DOM;tinymce.create('tinymce.plugins.FullScreenPlugin',{init:function(ed,url){var t=this,s={},vp;t.editor=ed;ed.addCommand('mceFullScreen',function(){var win,de=DOM.doc.documentElement;if(ed.getParam('fullscreen_is_enabled')){if(ed.getParam('fullscreen_new_window'))closeFullscreen();else{DOM.win.setTimeout(function(){tinymce.dom.Event.remove(DOM.win,'resize',t.resizeFunc);tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent({format:'raw'}),{format:'raw'});tinyMCE.remove(ed);DOM.remove('mce_fullscreen_container');de.style.overflow=ed.getParam('fullscreen_html_overflow');DOM.setStyle(DOM.doc.body,'overflow',ed.getParam('fullscreen_overflow'));DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'),ed.getParam('fullscreen_scrolly'));tinyMCE.settings=tinyMCE.oldSettings;},10);}return;}if(ed.getParam('fullscreen_new_window')){win=DOM.win.open(url+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{win.resizeTo(screen.availWidth,screen.availHeight);}catch(e){}}else{tinyMCE.oldSettings=tinyMCE.settings;s.fullscreen_overflow=DOM.getStyle(DOM.doc.body,'overflow',1)||'auto';s.fullscreen_html_overflow=DOM.getStyle(de,'overflow',1);vp=DOM.getViewPort();s.fullscreen_scrollx=vp.x;s.fullscreen_scrolly=vp.y;if(tinymce.isOpera&&s.fullscreen_overflow=='visible')s.fullscreen_overflow='auto';if(tinymce.isIE&&s.fullscreen_overflow=='scroll')s.fullscreen_overflow='auto';if(s.fullscreen_overflow=='0px')s.fullscreen_overflow='';DOM.setStyle(DOM.doc.body,'overflow','hidden');de.style.overflow='hidden';vp=DOM.getViewPort();DOM.win.scrollTo(0,0);if(tinymce.isIE)vp.h-=1;n=DOM.add(DOM.doc.body,'div',{id:'mce_fullscreen_container',style:'position:'+(tinymce.isIE6||(tinymce.isIE&&!DOM.boxModel)?'absolute':'fixed')+';top:0;left:0;width:'+vp.w+'px;height:'+vp.h+'px;z-index:200000;'});DOM.add(n,'div',{id:'mce_fullscreen'});tinymce.each(ed.settings,function(v,n){s[n]=v;});s.id='mce_fullscreen';s.width=n.clientWidth;s.height=n.clientHeight-15;s.fullscreen_is_enabled=true;s.fullscreen_editor_id=ed.id;s.theme_advanced_resizing=false;s.save_onsavecallback=function(){ed.setContent(tinyMCE.get(s.id).getContent({format:'raw'}),{format:'raw'});ed.execCommand('mceSave');};tinymce.each(ed.getParam('fullscreen_settings'),function(v,k){s[k]=v;});if(s.theme_advanced_toolbar_location==='external')s.theme_advanced_toolbar_location='top';t.fullscreenEditor=new tinymce.Editor('mce_fullscreen',s);t.fullscreenEditor.onInit.add(function(){t.fullscreenEditor.setContent(ed.getContent());t.fullscreenEditor.focus();});t.fullscreenEditor.render();tinyMCE.add(t.fullscreenEditor);t.fullscreenElement=new tinymce.dom.Element('mce_fullscreen_container');t.fullscreenElement.update();t.resizeFunc=tinymce.dom.Event.add(DOM.win,'resize',function(){var vp=tinymce.DOM.getViewPort();t.fullscreenEditor.theme.resizeTo(vp.w,vp.h);});}});ed.addButton('fullscreen',{title:'fullscreen.desc',cmd:'mceFullScreen'});ed.onNodeChange.add(function(ed,cm){cm.setActive('fullscreen',ed.getParam('fullscreen_is_enabled'));});},getInfo:function(){return{longname:'Fullscreen',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('fullscreen',tinymce.plugins.FullScreenPlugin);})(); -
branches/crazyhorse/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm
r8151 r8242 4 4 <title></title> 5 5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 6 <script type="text/javascript" src="../../tiny_mce.js?ver=31 01"></script>6 <script type="text/javascript" src="../../tiny_mce.js?ver=311"></script> 7 7 <script type="text/javascript"> 8 8 function patchCallback(settings, key) { -
branches/crazyhorse/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js
r8047 r8242 1 (function(){var DOM=tinymce.DOM,Element=tinymce.dom.Element,Event=tinymce.dom.Event,each=tinymce.each,is=tinymce.is;tinymce.create('tinymce.plugins.InlinePopups',{init:function(ed,url){ed.onBeforeRenderUI.add(function(){ed.windowManager=new tinymce.InlineWindowManager(ed);DOM.loadCSS(url+'/skins/'+(ed.settings.inlinepopups_skin||'clearlooks2')+"/window.css");});},getInfo:function(){return{longname:'InlinePopups',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager',{InlineWindowManager:function(ed){var t=this;t.parent(ed);t.zIndex=300000;t.count=0;},open:function(f,p){var t=this,id,opt='',ed=t.editor,dw=0,dh=0,vp,po,mdf,clf,we,w,u;f=f||{};p=p||{};if(!f.inline)return t.parent(f,p);if(!f.type)t.bookmark=ed.selection.getBookmark('simple');id=DOM.uniqueId();vp=DOM.getViewPort();f.width=parseInt(f.width||320);f.height=parseInt(f.height||240)+(tinymce.isIE?8:0);f.min_width=parseInt(f.min_width||150);f.min_height=parseInt(f.min_height||100);f.max_width=parseInt(f.max_width||2000);f.max_height=parseInt(f.max_height||2000);f.left=f.left||Math.round(Math.max(vp.x,vp.x+(vp.w/ 2.0) - (f.width /2.0)));f.top=f.top||Math.round(Math.max(vp.y,vp.y+(vp.h/ 2.0) - (f.height /2.0)));f.movable=f.resizable=true;p.mce_width=f.width;p.mce_height=f.height;p.mce_inline=true;p.mce_window_id=id;p.mce_auto_focus=f.auto_focus;t.features=f;t.params=p;t.onOpen.dispatch(t,f,p);if(f.type){opt+=' mceModal';if(f.type)opt+=' mce'+f.type.substring(0,1).toUpperCase()+f.type.substring(1);f.resizable=false;}if(f.statusbar)opt+=' mceStatusbar';if(f.resizable)opt+=' mceResizable';if(f.minimizable)opt+=' mceMinimizable';if(f.maximizable)opt+=' mceMaximizable';if(f.movable)opt+=' mceMovable';t._addAll(DOM.doc.body,['div',{id:id,'class':ed.settings.inlinepopups_skin||'clearlooks2',style:'width:100px;height:100px'},['div',{id:id+'_wrapper','class':'mceWrapper'+opt},['div',{id:id+'_top','class':'mceTop'},['div',{'class':'mceLeft'}],['div',{'class':'mceCenter'}],['div',{'class':'mceRight'}],['span',{id:id+'_title'},f.title||'']],['div',{id:id+'_middle','class':'mceMiddle'},['div',{id:id+'_left','class':'mceLeft'}],['span',{id:id+'_content'}],['div',{id:id+'_right','class':'mceRight'}]],['div',{id:id+'_bottom','class':'mceBottom'},['div',{'class':'mceLeft'}],['div',{'class':'mceCenter'}],['div',{'class':'mceRight'}],['span',{id:id+'_status'},'Content']],['a',{'class':'mceMove',tabindex:'-1',href:'javascript:;'}],['a',{'class':'mceMin',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceMax',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceMed',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceClose',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{id:id+'_resize_n','class':'mceResize mceResizeN',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_s','class':'mceResize mceResizeS',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_w','class':'mceResize mceResizeW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_e','class':'mceResize mceResizeE',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_nw','class':'mceResize mceResizeNW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_ne','class':'mceResize mceResizeNE',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_sw','class':'mceResize mceResizeSW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_se','class':'mceResize mceResizeSE',tabindex:'-1',href:'javascript:;'}]]]);DOM.setStyles(id,{top:-10000,left:-10000});if(tinymce.isGecko)DOM.setStyle(id,'overflow','auto');if(!f.type){dw+=DOM.get(id+'_left').clientWidth;dw+=DOM.get(id+'_right').clientWidth;dh+=DOM.get(id+'_top').clientHeight;dh+=DOM.get(id+'_bottom').clientHeight;}DOM.setStyles(id,{top:f.top,left:f.left,width:f.width+dw,height:f.height+dh});u=f.url||f.file;if(u){if(tinymce.relaxedDomain)u+=(u.indexOf('?')==-1?'?':'&')+'mce_rdomain='+tinymce.relaxedDomain;u=tinymce._addVer(u);}if(!f.type){DOM.add(id+'_content','iframe',{id:id+'_ifr',src:'javascript:""',frameBorder:0,style:'border:0;width:10px;height:10px'});DOM.setStyles(id+'_ifr',{width:f.width,height:f.height});DOM.setAttrib(id+'_ifr','src',u);}else{DOM.add(id+'_wrapper','a',{id:id+'_ok','class':'mceButton mceOk',href:'javascript:;',onmousedown:'return false;'},'Ok');if(f.type=='confirm')DOM.add(id+'_wrapper','a',{'class':'mceButton mceCancel',href:'javascript:;',onmousedown:'return false;'},'Cancel');DOM.add(id+'_middle','div',{'class':'mceIcon'});DOM.setHTML(id+'_content',f.content.replace('\n','<br />'));}mdf=Event.add(id,'mousedown',function(e){var n=e.target,w,vp;w=t.windows[id];t.focus(id);if(n.nodeName=='A'||n.nodeName=='a'){if(n.className=='mceMax'){w.oldPos=w.element.getXY();w.oldSize=w.element.getSize();vp=DOM.getViewPort();vp.w-=2;vp.h-=2;w.element.moveTo(vp.x,vp.y);w.element.resizeTo(vp.w,vp.h);DOM.setStyles(id+'_ifr',{width:vp.w-w.deltaWidth,height:vp.h-w.deltaHeight});DOM.addClass(id+'_wrapper','mceMaximized');}else if(n.className=='mceMed'){w.element.moveTo(w.oldPos.x,w.oldPos.y);w.element.resizeTo(w.oldSize.w,w.oldSize.h);w.iframeElement.resizeTo(w.oldSize.w-w.deltaWidth,w.oldSize.h-w.deltaHeight);DOM.removeClass(id+'_wrapper','mceMaximized');}else if(n.className=='mceMove')return t._startDrag(id,e,n.className);else if(DOM.hasClass(n,'mceResize'))return t._startDrag(id,e,n.className.substring(13));}});clf=Event.add(id,'click',function(e){var n=e.target;t.focus(id);if(n.nodeName=='A'||n.nodeName=='a'){switch(n.className){case'mceClose':t.close(null,id);return Event.cancel(e);case'mceButton mceOk':case'mceButton mceCancel':f.button_func(n.className=='mceButton mceOk');return Event.cancel(e);}}});t.windows=t.windows||{};w=t.windows[id]={id:id,mousedown_func:mdf,click_func:clf,element:new Element(id,{blocker:1,container:ed.getContainer()}),iframeElement:new Element(id+'_ifr'),features:f,deltaWidth:dw,deltaHeight:dh};w.iframeElement.on('focus',function(){t.focus(id);});if(t.count==0&&t.editor.getParam('dialog_type')=='modal'){DOM.add(DOM.doc.body,'div',{id:'mceModalBlocker','class':(t.editor.settings.inlinepopups_skin||'clearlooks2')+'_modalBlocker',style:{left:vp.x,top:vp.y,zIndex:t.zIndex-1}});DOM.show('mceModalBlocker');}else DOM.setStyle('mceModalBlocker','z-index',t.zIndex-1); t.focus(id);t._fixIELayout(id,1);if(DOM.get(id+'_ok'))DOM.get(id+'_ok').focus();t.count++;return w;},focus:function(id){var t=this,w=t.windows[id];w.zIndex=this.zIndex++;w.element.setStyle('zIndex',w.zIndex);w.element.update();id=id+'_wrapper';DOM.removeClass(t.lastId,'mceFocus');DOM.addClass(id,'mceFocus');t.lastId=id;},_addAll:function(te,ne){var i,n,t=this,dom=tinymce.DOM;if(is(ne,'string'))te.appendChild(dom.doc.createTextNode(ne));else if(ne.length){te=te.appendChild(dom.create(ne[0],ne[1]));for(i=2;i<ne.length;i++)t._addAll(te,ne[i]);}},_startDrag:function(id,se,ac){var t=this,mu,mm,d=DOM.doc,eb,w=t.windows[id],we=w.element,sp=we.getXY(),p,sz,ph,cp,vp,sx,sy,sex,sey,dx,dy,dw,dh;cp={x:0,y:0};vp=DOM.getViewPort();vp.w-=2;vp.h-=2;sex=se.screenX;sey=se.screenY;dx=dy=dw=dh=0;mu=Event.add(d,'mouseup',function(e){Event.remove(d,'mouseup',mu);Event.remove(d,'mousemove',mm);if(eb)eb.remove();we.moveBy(dx,dy);we.resizeBy(dw,dh);sz=we.getSize();DOM.setStyles(id+'_ifr',{width:sz.w-w.deltaWidth,height:sz.h-w.deltaHeight});t._fixIELayout(id,1);return Event.cancel(e);});if(ac!='Move')startMove();function startMove(){if(eb)return;t._fixIELayout(id,0);DOM.add(d.body,'div',{id:'mceEventBlocker','class':'mceEventBlocker '+(t.editor.settings.inlinepopups_skin||'clearlooks2'),style:{left:vp.x,top:vp.y,zIndex:t.zIndex+1}});eb=new Element('mceEventBlocker');eb.update();p=we.getXY();sz=we.getSize();sx=cp.x+p.x-vp.x;sy=cp.y+p.y-vp.y;DOM.add(eb.get(),'div',{id:'mcePlaceHolder','class':'mcePlaceHolder',style:{left:sx,top:sy,width:sz.w,height:sz.h}});ph=new Element('mcePlaceHolder');};mm=Event.add(d,'mousemove',function(e){var x,y,v;startMove();x=e.screenX-sex;y=e.screenY-sey;switch(ac){case'ResizeW':dx=x;dw=0-x;break;case'ResizeE':dw=x;break;case'ResizeN':case'ResizeNW':case'ResizeNE':if(ac=="ResizeNW"){dx=x;dw=0-x;}else if(ac=="ResizeNE")dw=x;dy=y;dh=0-y;break;case'ResizeS':case'ResizeSW':case'ResizeSE':if(ac=="ResizeSW"){dx=x;dw=0-x;}else if(ac=="ResizeSE")dw=x;dh=y;break;case'mceMove':dx=x;dy=y;break;}if(dw<(v=w.features.min_width-sz.w)){if(dx!==0)dx+=dw-v;dw=v;}if(dh<(v=w.features.min_height-sz.h)){if(dy!==0)dy+=dh-v;dh=v;}dw=Math.min(dw,w.features.max_width-sz.w);dh=Math.min(dh,w.features.max_height-sz.h);dx=Math.max(dx,vp.x-(sx+vp.x));dy=Math.max(dy,vp.y-(sy+vp.y));dx=Math.min(dx,(vp.w+vp.x)-(sx+sz.w+vp.x));dy=Math.min(dy,(vp.h+vp.y)-(sy+sz.h+vp.y));if(dx+dy!==0){if(sx+dx<0)dx=0;if(sy+dy<0)dy=0;ph.moveTo(sx+dx,sy+dy);}if(dw+dh!==0)ph.resizeTo(sz.w+dw,sz.h+dh);return Event.cancel(e);});return Event.cancel(se);},resizeBy:function(dw,dh,id){var w=this.windows[id];if(w){w.element.resizeBy(dw,dh);w.iframeElement.resizeBy(dw,dh);}},close:function(win,id){var t=this,w,d=DOM.doc,ix=0,fw,id;id=t._findId(id||win);t.count--;if(t.count==0)DOM.remove('mceModalBlocker');if(!id&&win){t.parent(win);return;}if(w=t.windows[id]){t.onClose.dispatch(t);Event.remove(d,'mousedown',w.mousedownFunc);Event.remove(d,'click',w.clickFunc);Event.clear(id);Event.clear(id+'_ifr');DOM.setAttrib(id+'_ifr','src','javascript:""');w.element.remove();delete t.windows[id];each(t.windows,function(w){if(w.zIndex>ix){fw=w;ix=w.zIndex;}});if(fw)t.focus(fw.id);}},setTitle:function(w,ti){var e;w=this._findId(w);if(e=DOM.get(w+'_title'))e.innerHTML=DOM.encode(ti);},alert:function(txt,cb,s){var t=this,w;w=t.open({title:t,type:'alert',button_func:function(s){if(cb)cb.call(s||t,s);t.close(null,w.id);},content:DOM.encode(t.editor.getLang(txt,txt)),inline:1,width:400,height:130});},confirm:function(txt,cb,s){var t=this,w;w=t.open({title:t,type:'confirm',button_func:function(s){if(cb)cb.call(s||t,s);t.close(null,w.id);},content:DOM.encode(t.editor.getLang(txt,txt)),inline:1,width:400,height:130});},_findId:function(w){var t=this;if(typeof(w)=='string')return w;each(t.windows,function(wo){var ifr=DOM.get(wo.id+'_ifr');if(ifr&&w==ifr.contentWindow){w=wo.id;return false;}});return w;},_fixIELayout:function(id,s){var w,img;if(!tinymce.isIE6)return;each(['n','s','w','e','nw','ne','sw','se'],function(v){var e=DOM.get(id+'_resize_'+v);DOM.setStyles(e,{width:s?e.clientWidth:'',height:s?e.clientHeight:'',cursor:DOM.getStyle(e,'cursor',1)});DOM.setStyle(id+"_bottom",'bottom','-1px');e=0;});if(w=this.windows[id]){w.element.hide();w.element.show();each(DOM.select('div,a',id),function(e,i){if(e.currentStyle.backgroundImage!='none'){img=new Image();img.src=e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,'$1');}});DOM.get(id).style.filter='';}}});tinymce.PluginManager.add('inlinepopups',tinymce.plugins.InlinePopups);})();1 (function(){var DOM=tinymce.DOM,Element=tinymce.dom.Element,Event=tinymce.dom.Event,each=tinymce.each,is=tinymce.is;tinymce.create('tinymce.plugins.InlinePopups',{init:function(ed,url){ed.onBeforeRenderUI.add(function(){ed.windowManager=new tinymce.InlineWindowManager(ed);DOM.loadCSS(url+'/skins/'+(ed.settings.inlinepopups_skin||'clearlooks2')+"/window.css");});},getInfo:function(){return{longname:'InlinePopups',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager',{InlineWindowManager:function(ed){var t=this;t.parent(ed);t.zIndex=300000;t.count=0;},open:function(f,p){var t=this,id,opt='',ed=t.editor,dw=0,dh=0,vp,po,mdf,clf,we,w,u;f=f||{};p=p||{};if(!f.inline)return t.parent(f,p);if(!f.type)t.bookmark=ed.selection.getBookmark('simple');id=DOM.uniqueId();vp=DOM.getViewPort();f.width=parseInt(f.width||320);f.height=parseInt(f.height||240)+(tinymce.isIE?8:0);f.min_width=parseInt(f.min_width||150);f.min_height=parseInt(f.min_height||100);f.max_width=parseInt(f.max_width||2000);f.max_height=parseInt(f.max_height||2000);f.left=f.left||Math.round(Math.max(vp.x,vp.x+(vp.w/ 2.0) - (f.width /2.0)));f.top=f.top||Math.round(Math.max(vp.y,vp.y+(vp.h/ 2.0) - (f.height /2.0)));f.movable=f.resizable=true;p.mce_width=f.width;p.mce_height=f.height;p.mce_inline=true;p.mce_window_id=id;p.mce_auto_focus=f.auto_focus;t.features=f;t.params=p;t.onOpen.dispatch(t,f,p);if(f.type){opt+=' mceModal';if(f.type)opt+=' mce'+f.type.substring(0,1).toUpperCase()+f.type.substring(1);f.resizable=false;}if(f.statusbar)opt+=' mceStatusbar';if(f.resizable)opt+=' mceResizable';if(f.minimizable)opt+=' mceMinimizable';if(f.maximizable)opt+=' mceMaximizable';if(f.movable)opt+=' mceMovable';t._addAll(DOM.doc.body,['div',{id:id,'class':ed.settings.inlinepopups_skin||'clearlooks2',style:'width:100px;height:100px'},['div',{id:id+'_wrapper','class':'mceWrapper'+opt},['div',{id:id+'_top','class':'mceTop'},['div',{'class':'mceLeft'}],['div',{'class':'mceCenter'}],['div',{'class':'mceRight'}],['span',{id:id+'_title'},f.title||'']],['div',{id:id+'_middle','class':'mceMiddle'},['div',{id:id+'_left','class':'mceLeft'}],['span',{id:id+'_content'}],['div',{id:id+'_right','class':'mceRight'}]],['div',{id:id+'_bottom','class':'mceBottom'},['div',{'class':'mceLeft'}],['div',{'class':'mceCenter'}],['div',{'class':'mceRight'}],['span',{id:id+'_status'},'Content']],['a',{'class':'mceMove',tabindex:'-1',href:'javascript:;'}],['a',{'class':'mceMin',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceMax',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceMed',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceClose',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{id:id+'_resize_n','class':'mceResize mceResizeN',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_s','class':'mceResize mceResizeS',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_w','class':'mceResize mceResizeW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_e','class':'mceResize mceResizeE',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_nw','class':'mceResize mceResizeNW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_ne','class':'mceResize mceResizeNE',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_sw','class':'mceResize mceResizeSW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_se','class':'mceResize mceResizeSE',tabindex:'-1',href:'javascript:;'}]]]);DOM.setStyles(id,{top:-10000,left:-10000});if(tinymce.isGecko)DOM.setStyle(id,'overflow','auto');if(!f.type){dw+=DOM.get(id+'_left').clientWidth;dw+=DOM.get(id+'_right').clientWidth;dh+=DOM.get(id+'_top').clientHeight;dh+=DOM.get(id+'_bottom').clientHeight;}DOM.setStyles(id,{top:f.top,left:f.left,width:f.width+dw,height:f.height+dh});u=f.url||f.file;if(u){if(tinymce.relaxedDomain)u+=(u.indexOf('?')==-1?'?':'&')+'mce_rdomain='+tinymce.relaxedDomain;u=tinymce._addVer(u);}if(!f.type){DOM.add(id+'_content','iframe',{id:id+'_ifr',src:'javascript:""',frameBorder:0,style:'border:0;width:10px;height:10px'});DOM.setStyles(id+'_ifr',{width:f.width,height:f.height});DOM.setAttrib(id+'_ifr','src',u);}else{DOM.add(id+'_wrapper','a',{id:id+'_ok','class':'mceButton mceOk',href:'javascript:;',onmousedown:'return false;'},'Ok');if(f.type=='confirm')DOM.add(id+'_wrapper','a',{'class':'mceButton mceCancel',href:'javascript:;',onmousedown:'return false;'},'Cancel');DOM.add(id+'_middle','div',{'class':'mceIcon'});DOM.setHTML(id+'_content',f.content.replace('\n','<br />'));}mdf=Event.add(id,'mousedown',function(e){var n=e.target,w,vp;w=t.windows[id];t.focus(id);if(n.nodeName=='A'||n.nodeName=='a'){if(n.className=='mceMax'){w.oldPos=w.element.getXY();w.oldSize=w.element.getSize();vp=DOM.getViewPort();vp.w-=2;vp.h-=2;w.element.moveTo(vp.x,vp.y);w.element.resizeTo(vp.w,vp.h);DOM.setStyles(id+'_ifr',{width:vp.w-w.deltaWidth,height:vp.h-w.deltaHeight});DOM.addClass(id+'_wrapper','mceMaximized');}else if(n.className=='mceMed'){w.element.moveTo(w.oldPos.x,w.oldPos.y);w.element.resizeTo(w.oldSize.w,w.oldSize.h);w.iframeElement.resizeTo(w.oldSize.w-w.deltaWidth,w.oldSize.h-w.deltaHeight);DOM.removeClass(id+'_wrapper','mceMaximized');}else if(n.className=='mceMove')return t._startDrag(id,e,n.className);else if(DOM.hasClass(n,'mceResize'))return t._startDrag(id,e,n.className.substring(13));}});clf=Event.add(id,'click',function(e){var n=e.target;t.focus(id);if(n.nodeName=='A'||n.nodeName=='a'){switch(n.className){case'mceClose':t.close(null,id);return Event.cancel(e);case'mceButton mceOk':case'mceButton mceCancel':f.button_func(n.className=='mceButton mceOk');return Event.cancel(e);}}});t.windows=t.windows||{};w=t.windows[id]={id:id,mousedown_func:mdf,click_func:clf,element:new Element(id,{blocker:1,container:ed.getContainer()}),iframeElement:new Element(id+'_ifr'),features:f,deltaWidth:dw,deltaHeight:dh};w.iframeElement.on('focus',function(){t.focus(id);});if(t.count==0&&t.editor.getParam('dialog_type')=='modal'){DOM.add(DOM.doc.body,'div',{id:'mceModalBlocker','class':(t.editor.settings.inlinepopups_skin||'clearlooks2')+'_modalBlocker',style:{left:vp.x,top:vp.y,zIndex:t.zIndex-1}});DOM.show('mceModalBlocker');}else DOM.setStyle('mceModalBlocker','z-index',t.zIndex-1);if(tinymce.isIE6||(tinymce.isIE&&!DOM.boxModel))DOM.setStyles('mceModalBlocker',{position:'absolute',width:vp.w-2,height:vp.h-2});t.focus(id);t._fixIELayout(id,1);if(DOM.get(id+'_ok'))DOM.get(id+'_ok').focus();t.count++;return w;},focus:function(id){var t=this,w=t.windows[id];w.zIndex=this.zIndex++;w.element.setStyle('zIndex',w.zIndex);w.element.update();id=id+'_wrapper';DOM.removeClass(t.lastId,'mceFocus');DOM.addClass(id,'mceFocus');t.lastId=id;},_addAll:function(te,ne){var i,n,t=this,dom=tinymce.DOM;if(is(ne,'string'))te.appendChild(dom.doc.createTextNode(ne));else if(ne.length){te=te.appendChild(dom.create(ne[0],ne[1]));for(i=2;i<ne.length;i++)t._addAll(te,ne[i]);}},_startDrag:function(id,se,ac){var t=this,mu,mm,d=DOM.doc,eb,w=t.windows[id],we=w.element,sp=we.getXY(),p,sz,ph,cp,vp,sx,sy,sex,sey,dx,dy,dw,dh;cp={x:0,y:0};vp=DOM.getViewPort();vp.w-=2;vp.h-=2;sex=se.screenX;sey=se.screenY;dx=dy=dw=dh=0;mu=Event.add(d,'mouseup',function(e){Event.remove(d,'mouseup',mu);Event.remove(d,'mousemove',mm);if(eb)eb.remove();we.moveBy(dx,dy);we.resizeBy(dw,dh);sz=we.getSize();DOM.setStyles(id+'_ifr',{width:sz.w-w.deltaWidth,height:sz.h-w.deltaHeight});t._fixIELayout(id,1);return Event.cancel(e);});if(ac!='Move')startMove();function startMove(){if(eb)return;t._fixIELayout(id,0);DOM.add(d.body,'div',{id:'mceEventBlocker','class':'mceEventBlocker '+(t.editor.settings.inlinepopups_skin||'clearlooks2'),style:{left:vp.x,top:vp.y,zIndex:t.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!DOM.boxModel))DOM.setStyles('mceEventBlocker',{position:'absolute',width:vp.w-2,height:vp.h-2});eb=new Element('mceEventBlocker');eb.update();p=we.getXY();sz=we.getSize();sx=cp.x+p.x-vp.x;sy=cp.y+p.y-vp.y;DOM.add(eb.get(),'div',{id:'mcePlaceHolder','class':'mcePlaceHolder',style:{left:sx,top:sy,width:sz.w,height:sz.h}});ph=new Element('mcePlaceHolder');};mm=Event.add(d,'mousemove',function(e){var x,y,v;startMove();x=e.screenX-sex;y=e.screenY-sey;switch(ac){case'ResizeW':dx=x;dw=0-x;break;case'ResizeE':dw=x;break;case'ResizeN':case'ResizeNW':case'ResizeNE':if(ac=="ResizeNW"){dx=x;dw=0-x;}else if(ac=="ResizeNE")dw=x;dy=y;dh=0-y;break;case'ResizeS':case'ResizeSW':case'ResizeSE':if(ac=="ResizeSW"){dx=x;dw=0-x;}else if(ac=="ResizeSE")dw=x;dh=y;break;case'mceMove':dx=x;dy=y;break;}if(dw<(v=w.features.min_width-sz.w)){if(dx!==0)dx+=dw-v;dw=v;}if(dh<(v=w.features.min_height-sz.h)){if(dy!==0)dy+=dh-v;dh=v;}dw=Math.min(dw,w.features.max_width-sz.w);dh=Math.min(dh,w.features.max_height-sz.h);dx=Math.max(dx,vp.x-(sx+vp.x));dy=Math.max(dy,vp.y-(sy+vp.y));dx=Math.min(dx,(vp.w+vp.x)-(sx+sz.w+vp.x));dy=Math.min(dy,(vp.h+vp.y)-(sy+sz.h+vp.y));if(dx+dy!==0){if(sx+dx<0)dx=0;if(sy+dy<0)dy=0;ph.moveTo(sx+dx,sy+dy);}if(dw+dh!==0)ph.resizeTo(sz.w+dw,sz.h+dh);return Event.cancel(e);});return Event.cancel(se);},resizeBy:function(dw,dh,id){var w=this.windows[id];if(w){w.element.resizeBy(dw,dh);w.iframeElement.resizeBy(dw,dh);}},close:function(win,id){var t=this,w,d=DOM.doc,ix=0,fw,id;id=t._findId(id||win);t.count--;if(t.count==0)DOM.remove('mceModalBlocker');if(!id&&win){t.parent(win);return;}if(w=t.windows[id]){t.onClose.dispatch(t);Event.remove(d,'mousedown',w.mousedownFunc);Event.remove(d,'click',w.clickFunc);Event.clear(id);Event.clear(id+'_ifr');DOM.setAttrib(id+'_ifr','src','javascript:""');w.element.remove();delete t.windows[id];each(t.windows,function(w){if(w.zIndex>ix){fw=w;ix=w.zIndex;}});if(fw)t.focus(fw.id);}},setTitle:function(w,ti){var e;w=this._findId(w);if(e=DOM.get(w+'_title'))e.innerHTML=DOM.encode(ti);},alert:function(txt,cb,s){var t=this,w;w=t.open({title:t,type:'alert',button_func:function(s){if(cb)cb.call(s||t,s);t.close(null,w.id);},content:DOM.encode(t.editor.getLang(txt,txt)),inline:1,width:400,height:130});},confirm:function(txt,cb,s){var t=this,w;w=t.open({title:t,type:'confirm',button_func:function(s){if(cb)cb.call(s||t,s);t.close(null,w.id);},content:DOM.encode(t.editor.getLang(txt,txt)),inline:1,width:400,height:130});},_findId:function(w){var t=this;if(typeof(w)=='string')return w;each(t.windows,function(wo){var ifr=DOM.get(wo.id+'_ifr');if(ifr&&w==ifr.contentWindow){w=wo.id;return false;}});return w;},_fixIELayout:function(id,s){var w,img;if(!tinymce.isIE6)return;each(['n','s','w','e','nw','ne','sw','se'],function(v){var e=DOM.get(id+'_resize_'+v);DOM.setStyles(e,{width:s?e.clientWidth:'',height:s?e.clientHeight:'',cursor:DOM.getStyle(e,'cursor',1)});DOM.setStyle(id+"_bottom",'bottom','-1px');e=0;});if(w=this.windows[id]){w.element.hide();w.element.show();each(DOM.select('div,a',id),function(e,i){if(e.currentStyle.backgroundImage!='none'){img=new Image();img.src=e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,'$1');}});DOM.get(id).style.filter='';}}});tinymce.PluginManager.add('inlinepopups',tinymce.plugins.InlinePopups);})(); -
branches/crazyhorse/wp-includes/js/tinymce/plugins/inlinepopups/template.htm
r8151 r8242 3 3 <head> 4 4 <title>Template for dialogs</title> 5 <link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css?ver=31 01" />5 <link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css?ver=311" /> 6 6 </head> 7 7 <body> -
branches/crazyhorse/wp-includes/js/tinymce/plugins/media/editor_plugin.js
r8151 r8242 1 (function(){var each=tinymce.each;tinymce.create('tinymce.plugins.MediaPlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;function isMediaElm(n){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);};ed.onPreInit.add(function(){ed.serializer.addRules('param[name|value|_value]');});ed.addCommand('mceMedia',function(){ed.windowManager.open({file:url+'/media.htm',width:430+parseInt(ed.getLang('media.delta_width',0)),height:470+parseInt(ed.getLang('media.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('media',{title:'media.desc',cmd:'mceMedia'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('media',n.nodeName=='IMG'&&isMediaElm(n));});ed.onInit.add(function(){var lo={mceItemFlash:'flash',mceItemShockWave:'shockwave',mceItemWindowsMedia:'windowsmedia',mceItemQuickTime:'quicktime',mceItemRealMedia:'realmedia'};if(ed.settings.content_css!==false)ed.dom.loadCSS(url+"/css/content.css");if(ed.theme.onResolveName){ed.theme.onResolveName.add(function(th,o){if(o.name=='img'){each(lo,function(v,k){if(ed.dom.hasClass(o.node,k)){o.name=v;o.title=ed.dom.getAttrib(o.node,'title');return false;}});}});}if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){if(e.nodeName=='IMG'&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)){m.add({title:'media.edit',icon:'media',cmd:'mceMedia'});}});}});ed.onBeforeSetContent.add(function(ed,o){var h=o.content;h=h.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,function(a,b,c){var o=t._parse(c);return'<img class="mceItem'+b+'" title="'+ed.dom.encode(c)+'" src="'+url+'/img/trans.gif" width="'+o.width+'" height="'+o.height+'" />'});h=h.replace(/<object([^>]*)>/gi,'<span class="mceItemObject" $1>');h=h.replace(/<embed([^>]*)\/ >/gi,'<span class="mceItemEmbed" $1>');h=h.replace(/<embed([^>]*)>/gi,'<span class="mceItemEmbed" $1>');h=h.replace(/<\/(object|embed)([^>]*)>/gi,'</span>');h=h.replace(/<param([^>]*)>/gi,function(a,b){return'<span '+b.replace(/value=/gi,'_value=')+' class="mceItemParam"></span>'});h=h.replace(/\/ class=\"mceItemParam\"><\/span>/gi,'class="mceItemParam"></span>');o.content=h;});ed.onSetContent.add(function(){t._spansToImgs(ed.getBody());});ed.onPreProcess.add(function(ed,o){var dom=ed.dom;if(o.set){t._spansToImgs(o.node);each(dom.select('IMG',o.node),function(n){var p;if(isMediaElm(n)){p=t._parse(n.title);dom.setAttrib(n,'width',dom.getAttrib(n,'width',p.width||100));dom.setAttrib(n,'height',dom.getAttrib(n,'height',p.height||100));}});}if(o.get){each(dom.select('IMG',o.node),function(n){var ci,cb,mt;if(ed.getParam('media_use_script')){if(isMediaElm(n))n.className=n.className.replace(/mceItem/g,'mceTemp');return;}switch(n.className){case'mceItemFlash':ci='d27cdb6e-ae6d-11cf-96b8-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='application/x-shockwave-flash';break;case'mceItemShockWave':ci='166b1bca-3f9c-11cf-8075-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';mt='application/x-director';break;case'mceItemWindowsMedia':ci=ed.getParam('media_wmp6_compatible')?'05589fa1-c356-11ce-bf01-00aa0055595a':'6bf52a52-394a-11d3-b153-00c04f79faa6';cb='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';mt='application/x-mplayer2';break;case'mceItemQuickTime':ci='02bf25d5-8c17-4b23-bc80-d3488abddc6b';cb='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';mt='video/quicktime';break;case'mceItemRealMedia':ci='cfcdaa03-8be4-11cf-b84b-0020afbbccfa';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='audio/x-pn-realaudio-plugin';break;}if(ci){dom.replace(t._buildObj({classid:ci,codebase:cb,type:mt},n),n);}});}});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/_value=/g,'value=');});if(ed.getParam('media_use_script')){function getAttr(s,n){n=new RegExp(n+'=\"([^\"]+)\"','g').exec(s);return n?ed.dom.decode(n[1]):'';};ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/<img[^>]+>/g,function(im){var cl=getAttr(im,'class');if(/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)){at=t._parse(getAttr(im,'title'));at.width=getAttr(im,'width');at.height=getAttr(im,'height');im='<script type="text/javascript">write'+cl.substring(7)+'({'+t._serialize(at)+'});</script>';}return im;});});}},getInfo:function(){return{longname:'Media',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_buildObj:function(o,n){var ob,ed=this.editor,dom=ed.dom,p=this._parse(n.title);p.width=o.width=dom.getAttrib(n,'width')||100;p.height=o.height=dom.getAttrib(n,'height')||100;ob=dom.create('span',{mce_name:'object',classid:"clsid:"+o.classid,codebase:o.codebase,width:o.width,height:o.height});if(p.src)p.src=ed.convertURL(p.src,'src',n);each(p,function(v,k){if(!/^(width|height|codebase|classid)$/.test(k)){if(o.type=='application/x-mplayer2'&&k=='src')k='url';dom.add(ob,'span',{mce_name:'param',name:k,'_value':v});}});dom.add(ob,'span',tinymce.extend({mce_name:'embed',type:o.type},p));return ob;},_spansToImgs:function(p){var t=this,dom=t.editor.dom,im,ci;each(dom.select('span',p),function(n){if(dom.getAttrib(n,'class')=='mceItemObject'){ci=dom.getAttrib(n,"classid").toLowerCase().replace(/\s+/g,'');switch(ci){case'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':dom.replace(t._createImg('mceItemFlash',n),n);break;case'clsid:166b1bca-3f9c-11cf-8075-444553540000':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':case'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':case'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}return;}if(dom.getAttrib(n,'class')=='mceItemEmbed'){switch(dom.getAttrib(n,'type')){case'application/x-shockwave-flash':dom.replace(t._createImg('mceItemFlash',n),n);break;case'application/x-director':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'application/x-mplayer2':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'video/quicktime':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'audio/x-pn-realaudio-plugin':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}}});},_createImg:function(cl,n){var im,dom=this.editor.dom,pa={},ti='';im=dom.create('img',{src:this.url+'/img/trans.gif',width:dom.getAttrib(n,'width')||100,height:dom.getAttrib(n,'height')||100,'class':cl});each(['id','name','width','height','bgcolor','align','flashvars','src','wmode'],function(na){var v=dom.getAttrib(n,na);if(v)pa[na]=v;});each(dom.select('span',n),function(n){if(dom.hasClass(n,'mceItemParam'))pa[dom.getAttrib(n,'name')]=dom.getAttrib(n,'_value');});if(pa.movie){pa.src=pa.movie;delete pa.movie;}delete pa.width;delete pa.height;im.title=this._serialize(pa);return im;},_parse:function(s){return tinymce.util.JSON.parse('{'+s+'}');},_serialize:function(o){return tinymce.util.JSON.serialize(o).replace(/[{}]/g,'');}});tinymce.PluginManager.add('media',tinymce.plugins.MediaPlugin);})();1 (function(){var each=tinymce.each;tinymce.create('tinymce.plugins.MediaPlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;function isMediaElm(n){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);};ed.onPreInit.add(function(){ed.serializer.addRules('param[name|value|_value]');});ed.addCommand('mceMedia',function(){ed.windowManager.open({file:url+'/media.htm',width:430+parseInt(ed.getLang('media.delta_width',0)),height:470+parseInt(ed.getLang('media.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('media',{title:'media.desc',cmd:'mceMedia'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('media',n.nodeName=='IMG'&&isMediaElm(n));});ed.onInit.add(function(){var lo={mceItemFlash:'flash',mceItemShockWave:'shockwave',mceItemWindowsMedia:'windowsmedia',mceItemQuickTime:'quicktime',mceItemRealMedia:'realmedia'};if(ed.settings.content_css!==false)ed.dom.loadCSS(url+"/css/content.css");if(ed.theme.onResolveName){ed.theme.onResolveName.add(function(th,o){if(o.name=='img'){each(lo,function(v,k){if(ed.dom.hasClass(o.node,k)){o.name=v;o.title=ed.dom.getAttrib(o.node,'title');return false;}});}});}if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){if(e.nodeName=='IMG'&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)){m.add({title:'media.edit',icon:'media',cmd:'mceMedia'});}});}});ed.onBeforeSetContent.add(function(ed,o){var h=o.content;h=h.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,function(a,b,c){var o=t._parse(c);return'<img class="mceItem'+b+'" title="'+ed.dom.encode(c)+'" src="'+url+'/img/trans.gif" width="'+o.width+'" height="'+o.height+'" />'});h=h.replace(/<object([^>]*)>/gi,'<span class="mceItemObject" $1>');h=h.replace(/<embed([^>]*)\/?>/gi,'<span class="mceItemEmbed" $1></span>');h=h.replace(/<embed([^>]*)>/gi,'<span class="mceItemEmbed" $1>');h=h.replace(/<\/(object)([^>]*)>/gi,'</span>');h=h.replace(/<\/embed>/gi,'');h=h.replace(/<param([^>]*)>/gi,function(a,b){return'<span '+b.replace(/value=/gi,'_value=')+' class="mceItemParam"></span>'});h=h.replace(/\/ class=\"mceItemParam\"><\/span>/gi,'class="mceItemParam"></span>');o.content=h;});ed.onSetContent.add(function(){t._spansToImgs(ed.getBody());});ed.onPreProcess.add(function(ed,o){var dom=ed.dom;if(o.set){t._spansToImgs(o.node);each(dom.select('IMG',o.node),function(n){var p;if(isMediaElm(n)){p=t._parse(n.title);dom.setAttrib(n,'width',dom.getAttrib(n,'width',p.width||100));dom.setAttrib(n,'height',dom.getAttrib(n,'height',p.height||100));}});}if(o.get){each(dom.select('IMG',o.node),function(n){var ci,cb,mt;if(ed.getParam('media_use_script')){if(isMediaElm(n))n.className=n.className.replace(/mceItem/g,'mceTemp');return;}switch(n.className){case'mceItemFlash':ci='d27cdb6e-ae6d-11cf-96b8-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='application/x-shockwave-flash';break;case'mceItemShockWave':ci='166b1bca-3f9c-11cf-8075-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';mt='application/x-director';break;case'mceItemWindowsMedia':ci=ed.getParam('media_wmp6_compatible')?'05589fa1-c356-11ce-bf01-00aa0055595a':'6bf52a52-394a-11d3-b153-00c04f79faa6';cb='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';mt='application/x-mplayer2';break;case'mceItemQuickTime':ci='02bf25d5-8c17-4b23-bc80-d3488abddc6b';cb='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';mt='video/quicktime';break;case'mceItemRealMedia':ci='cfcdaa03-8be4-11cf-b84b-0020afbbccfa';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='audio/x-pn-realaudio-plugin';break;}if(ci){dom.replace(t._buildObj({classid:ci,codebase:cb,type:mt},n),n);}});}});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/_value=/g,'value=');});if(ed.getParam('media_use_script')){function getAttr(s,n){n=new RegExp(n+'=\"([^\"]+)\"','g').exec(s);return n?ed.dom.decode(n[1]):'';};ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/<img[^>]+>/g,function(im){var cl=getAttr(im,'class');if(/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)){at=t._parse(getAttr(im,'title'));at.width=getAttr(im,'width');at.height=getAttr(im,'height');im='<script type="text/javascript">write'+cl.substring(7)+'({'+t._serialize(at)+'});</script>';}return im;});});}},getInfo:function(){return{longname:'Media',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_buildObj:function(o,n){var ob,ed=this.editor,dom=ed.dom,p=this._parse(n.title);p.width=o.width=dom.getAttrib(n,'width')||100;p.height=o.height=dom.getAttrib(n,'height')||100;ob=dom.create('span',{mce_name:'object',classid:"clsid:"+o.classid,codebase:o.codebase,width:o.width,height:o.height});if(p.src)p.src=ed.convertURL(p.src,'src',n);each(p,function(v,k){if(!/^(width|height|codebase|classid)$/.test(k)){if(o.type=='application/x-mplayer2'&&k=='src')k='url';dom.add(ob,'span',{mce_name:'param',name:k,'_value':v});}});dom.add(ob,'span',tinymce.extend({mce_name:'embed',type:o.type},p));return ob;},_spansToImgs:function(p){var t=this,dom=t.editor.dom,im,ci;each(dom.select('span',p),function(n){if(dom.getAttrib(n,'class')=='mceItemObject'){ci=dom.getAttrib(n,"classid").toLowerCase().replace(/\s+/g,'');switch(ci){case'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':dom.replace(t._createImg('mceItemFlash',n),n);break;case'clsid:166b1bca-3f9c-11cf-8075-444553540000':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':case'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':case'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}return;}if(dom.getAttrib(n,'class')=='mceItemEmbed'){switch(dom.getAttrib(n,'type')){case'application/x-shockwave-flash':dom.replace(t._createImg('mceItemFlash',n),n);break;case'application/x-director':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'application/x-mplayer2':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'video/quicktime':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'audio/x-pn-realaudio-plugin':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}}});},_createImg:function(cl,n){var im,dom=this.editor.dom,pa={},ti='';im=dom.create('img',{src:this.url+'/img/trans.gif',width:dom.getAttrib(n,'width')||100,height:dom.getAttrib(n,'height')||100,'class':cl});each(['id','name','width','height','bgcolor','align','flashvars','src','wmode'],function(na){var v=dom.getAttrib(n,na);if(v)pa[na]=v;});each(dom.select('span',n),function(n){if(dom.hasClass(n,'mceItemParam'))pa[dom.getAttrib(n,'name')]=dom.getAttrib(n,'_value');});if(pa.movie){pa.src=pa.movie;delete pa.movie;}delete pa.width;delete pa.height;im.title=this._serialize(pa);return im;},_parse:function(s){return tinymce.util.JSON.parse('{'+s+'}');},_serialize:function(o){return tinymce.util.JSON.serialize(o).replace(/[{}]/g,'');}});tinymce.PluginManager.add('media',tinymce.plugins.MediaPlugin);})(); -
branches/crazyhorse/wp-includes/js/tinymce/plugins/media/media.htm
r8151 r8242 3 3 <head> 4 4 <title>{#media_dlg.title}</title> 5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=31 01"></script>6 <script type="text/javascript" src="js/media.js?ver=31 01"></script>7 <script type="text/javascript" src="../../utils/mctabs.js?ver=31 01"></script>8 <script type="text/javascript" src="../../utils/validate.js?ver=31 01"></script>9 <script type="text/javascript" src="../../utils/form_utils.js?ver=31 01"></script>10 <script type="text/javascript" src="../../utils/editable_selects.js?ver=31 01"></script>11 <link href="css/media.css?ver=31 01" rel="stylesheet" type="text/css" />5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script> 6 <script type="text/javascript" src="js/media.js?ver=311"></script> 7 <script type="text/javascript" src="../../utils/mctabs.js?ver=311"></script> 8 <script type="text/javascript" src="../../utils/validate.js?ver=311"></script> 9 <script type="text/javascript" src="../../utils/form_utils.js?ver=311"></script> 10 <script type="text/javascript" src="../../utils/editable_selects.js?ver=311"></script> 11 <link href="css/media.css?ver=311" rel="stylesheet" type="text/css" /> 12 12 <base target="_self" /> 13 13 </head> -
branches/crazyhorse/wp-includes/js/tinymce/plugins/paste/blank.htm
r8151 r8242 3 3 <title>blank_page</title> 4 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 <link href="css/blank.css?ver=31 01" rel="stylesheet" type="text/css" />5 <link href="css/blank.css?ver=311" rel="stylesheet" type="text/css" /> 6 6 <base target="_self" /> 7 7 <script type="text/javascript"> -
branches/crazyhorse/wp-includes/js/tinymce/plugins/paste/pastetext.htm
r8151 r8242 3 3 <title>{#paste.paste_text_desc}</title> 4 4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=31 01"></script>6 <script type="text/javascript" src="js/pastetext.js?ver=31 01"></script>5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script> 6 <script type="text/javascript" src="js/pastetext.js?ver=311"></script> 7 7 <base target="_self" /> 8 8 </head> -
branches/crazyhorse/wp-includes/js/tinymce/plugins/paste/pasteword.htm
r8151 r8242 3 3 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 4 4 <title>{#paste.paste_word_desc}</title> 5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=31 01"></script>6 <script type="text/javascript" src="js/pasteword.js?ver=31 01"></script>7 <link href="css/pasteword.css?ver=31 01" rel="stylesheet" type="text/css" />5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script> 6 <script type="text/javascript" src="js/pasteword.js?ver=311"></script> 7 <link href="css/pasteword.css?ver=311" rel="stylesheet" type="text/css" /> 8 8 <base target="_self" /> 9 9 </head> -
branches/crazyhorse/wp-includes/js/tinymce/plugins/safari/editor_plugin.js
r7513 r8242 1 (function(){var Event=tinymce.dom.Event,grep=tinymce.grep,each=tinymce.each,inArray=tinymce.inArray,isOldWebKit=tinymce.isOldWebKit;tinymce.create('tinymce.plugins.Safari',{init:function(ed){var t=this,dom;if(!tinymce.isWebKit)return;t.editor=ed;t.webKitFontSizes=['x-small','small','medium','large','x-large','xx-large','-webkit-xxx-large'];t.namedFontSizes=['xx-small','x-small','small','medium','large','x-large','xx-large'];ed. onPaste.add(function(ed,e){function removeStyles(e){e=e.target;if(e.nodeType==1){e.style.cssText='';each(ed.dom.select('*',e),function(e){e.style.cssText='';});}};Event.add(ed.getDoc(),'DOMNodeInserted',removeStyles);window.setTimeout(function(){Event.remove(ed.getDoc(),'DOMNodeInserted',removeStyles);},0);});ed.onKeyUp.add(function(ed,e){var h,b;if(e.keyCode==46||e.keyCode==8){b=ed.getBody();h=b.innerHTML;if(b.childNodes.length==1&&!/<(img|hr)/.test(h)&&tinymce.trim(h.replace(/<[^>]+>/g,'')).length==0)ed.setContent('',{format:'raw'});}});ed.addCommand('FormatBlock',function(u,v){var dom=ed.dom,e=dom.getParent(ed.selection.getNode(),dom.isBlock);if(e)dom.replace(dom.create(v),e,1);else ed.getDoc().execCommand("FormatBlock",false,v);});ed.addCommand('mceInsertContent',function(u,v){ed.getDoc().execCommand("InsertText",false,'mce_marker');ed.getBody().innerHTML=ed.getBody().innerHTML.replace(/mce_marker/g,v+'<span id="_mce_tmp">XX</span>');ed.selection.select(ed.dom.get('_mce_tmp'));ed.getDoc().execCommand("Delete",false,' ');});ed.onKeyPress.add(function(ed,e){if(e.keyCode==13&&(e.shiftKey||ed.settings.force_br_newlines&&ed.selection.getNode().nodeName!='LI')){t._insertBR(ed);Event.cancel(e);}});ed.addQueryValueHandler('FontSize',function(u,v){var e,v;if((e=ed.dom.getParent(ed.selection.getStart(),'span'))&&(v=e.style.fontSize))return tinymce.inArray(t.namedFontSizes,v)+1;if((e=ed.dom.getParent(ed.selection.getEnd(),'span'))&&(v=e.style.fontSize))return tinymce.inArray(t.namedFontSizes,v)+1;return ed.getDoc().queryCommandValue('FontSize');});ed.addQueryValueHandler('FontName',function(u,v){var e,v;if((e=ed.dom.getParent(ed.selection.getStart(),'span'))&&(v=e.style.fontFamily))return v.replace(/, /g,',');if((e=ed.dom.getParent(ed.selection.getEnd(),'span'))&&(v=e.style.fontFamily))return v.replace(/, /g,',');return ed.getDoc().queryCommandValue('FontName');});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName=='IMG'){t.selElm=e;ed.selection.select(e);}else t.selElm=null;});ed.onInit.add(function(){t._fixWebKitSpans();if(isOldWebKit)t._patchSafari2x(ed);});ed.onSetContent.add(function(){dom=ed.dom;each(['strong','b','em','u','strike','sub','sup','a'],function(v){each(grep(dom.select(v)).reverse(),function(n){var nn=n.nodeName.toLowerCase(),st;if(nn=='a'){if(n.name)dom.replace(dom.create('img',{mce_name:'a',name:n.name,'class':'mceItemAnchor'}),n);return;}switch(nn){case'b':case'strong':if(nn=='b')nn='strong';st='font-weight: bold;';break;case'em':st='font-style: italic;';break;case'u':st='text-decoration: underline;';break;case'sub':st='vertical-align: sub;';break;case'sup':st='vertical-align: super;';break;case'strike':st='text-decoration: line-through;';break;}dom.replace(dom.create('span',{mce_name:nn,style:st,'class':'Apple-style-span'}),n,1);});});});ed.onPreProcess.add(function(ed,o){dom=ed.dom;each(grep(o.node.getElementsByTagName('span')).reverse(),function(n){var v,bg;if(o.get){if(dom.hasClass(n,'Apple-style-span')){bg=n.style.backgroundColor;switch(dom.getAttrib(n,'mce_name')){case'font':if(!ed.settings.convert_fonts_to_spans)dom.setAttrib(n,'style','');break;case'strong':case'em':case'sub':case'sup':dom.setAttrib(n,'style','');break;case'strike':case'u':if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');else dom.setAttrib(n,'mce_name','');break;default:if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');}if(bg)n.style.backgroundColor=bg;}}if(dom.hasClass(n,'mceItemRemoved'))dom.remove(n,1);});});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/<br \/><\/(h[1-6]|div|p|address|pre)>/g,'</$1>');o.content=o.content.replace(/ id=\"undefined\"/g,'');});},getInfo:function(){return{longname:'Safari compatibility',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_fixWebKitSpans:function(){var t=this,ed=t.editor;if(!isOldWebKit){Event.add(ed.getDoc(),'DOMNodeInserted',function(e){e=e.target;if(e&&e.nodeType==1)t._fixAppleSpan(e);});}else{ed.onExecCommand.add(function(){each(ed.dom.select('span'),function(n){t._fixAppleSpan(n);});ed.nodeChanged();});}},_fixAppleSpan:function(e){var ed=this.editor,dom=ed.dom,fz=this.webKitFontSizes,fzn=this.namedFontSizes,s=ed.settings,st,p;if(dom.getAttrib(e,'mce_fixed'))return;if(e.nodeName=='SPAN'&&e.className=='Apple-style-span'){st=e.style;if(!s.convert_fonts_to_spans){if(st.fontSize){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'size',inArray(fz,st.fontSize)+1);}if(st.fontFamily){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'face',st.fontFamily);}if(st.color){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'color',dom.toHex(st.color));}if(st.backgroundColor){dom.setAttrib(e,'mce_name','font');dom.setStyle(e,'background-color',st.backgroundColor);}}else{if(st.fontSize)dom.setStyle(e,'fontSize',fzn[inArray(fz,st.fontSize)]);}if(st.fontWeight=='bold')dom.setAttrib(e,'mce_name','strong');if(st.fontStyle=='italic')dom.setAttrib(e,'mce_name','em');if(st.textDecoration=='underline')dom.setAttrib(e,'mce_name','u');if(st.textDecoration=='line-through')dom.setAttrib(e,'mce_name','strike');if(st.verticalAlign=='super')dom.setAttrib(e,'mce_name','sup');if(st.verticalAlign=='sub')dom.setAttrib(e,'mce_name','sub');dom.setAttrib(e,'mce_fixed','1');}},_patchSafari2x:function(ed){var t=this,setContent,getNode,dom=ed.dom,lr;if(ed.windowManager.onBeforeOpen){ed.windowManager.onBeforeOpen.add(function(){r=ed.selection.getRng();});}ed.selection.select=function(n){this.getSel().setBaseAndExtent(n,0,n,1);};getNode=ed.selection.getNode;ed.selection.getNode=function(){return t.selElm||getNode.call(this);};ed.selection.getRng=function(){var t=this,s=t.getSel(),d=ed.getDoc(),r,rb,ra,di;if(s.anchorNode){r=d.createRange();try{rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(1);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(1);di=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;r.setStart(di?s.anchorNode:s.focusNode,di?s.anchorOffset:s.focusOffset);r.setEnd(di?s.focusNode:s.anchorNode,di?s.focusOffset:s.anchorOffset);lr=r;}catch(ex){}}return r||lr;};setContent=ed.selection.setContent;ed.selection.setContent=function(h,s){var r=this.getRng(),b;try{setContent.call(this,h,s);}catch(ex){b=dom.create('body');b.innerHTML=h;each(b.childNodes,function(n){r.insertNode(n.cloneNode(true));});}};},_insertBR:function(ed){var dom=ed.dom,s=ed.selection,r=s.getRng(),br;r.insertNode(br=dom.create('br'));r.setStartAfter(br);r.setEndAfter(br);s.setRng(r);if(s.getSel().focusNode==br.previousSibling){s.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'),br));s.collapse(1);}ed.getWin().scrollTo(0,dom.getPos(s.getRng().startContainer).y);}});tinymce.PluginManager.add('safari',tinymce.plugins.Safari);})();1 (function(){var Event=tinymce.dom.Event,grep=tinymce.grep,each=tinymce.each,inArray=tinymce.inArray,isOldWebKit=tinymce.isOldWebKit;tinymce.create('tinymce.plugins.Safari',{init:function(ed){var t=this,dom;if(!tinymce.isWebKit)return;t.editor=ed;t.webKitFontSizes=['x-small','small','medium','large','x-large','xx-large','-webkit-xxx-large'];t.namedFontSizes=['xx-small','x-small','small','medium','large','x-large','xx-large'];ed.addCommand('CreateLink',function(u,v){var n=ed.selection.getNode(),dom=ed.dom,a;if(n&&(/^(left|right)$/i.test(dom.getStyle(n,'float',1))||/^(left|right)$/i.test(dom.getAttrib(n,'align')))){a=dom.create('a',{href:v},n.cloneNode());n.parentNode.replaceChild(a,n);ed.selection.select(a);}else ed.getDoc().execCommand("CreateLink",false,v);});ed.onPaste.add(function(ed,e){function removeStyles(e){e=e.target;if(e.nodeType==1){e.style.cssText='';each(ed.dom.select('*',e),function(e){e.style.cssText='';});}};Event.add(ed.getDoc(),'DOMNodeInserted',removeStyles);window.setTimeout(function(){Event.remove(ed.getDoc(),'DOMNodeInserted',removeStyles);},0);});ed.onKeyUp.add(function(ed,e){var h,b;if(e.keyCode==46||e.keyCode==8){b=ed.getBody();h=b.innerHTML;if(b.childNodes.length==1&&!/<(img|hr)/.test(h)&&tinymce.trim(h.replace(/<[^>]+>/g,'')).length==0)ed.setContent('',{format:'raw'});}});ed.addCommand('FormatBlock',function(u,v){var dom=ed.dom,e=dom.getParent(ed.selection.getNode(),dom.isBlock);if(e)dom.replace(dom.create(v),e,1);else ed.getDoc().execCommand("FormatBlock",false,v);});ed.addCommand('mceInsertContent',function(u,v){ed.getDoc().execCommand("InsertText",false,'mce_marker');ed.getBody().innerHTML=ed.getBody().innerHTML.replace(/mce_marker/g,v+'<span id="_mce_tmp">XX</span>');ed.selection.select(ed.dom.get('_mce_tmp'));ed.getDoc().execCommand("Delete",false,' ');});ed.onKeyPress.add(function(ed,e){if(e.keyCode==13&&(e.shiftKey||ed.settings.force_br_newlines&&ed.selection.getNode().nodeName!='LI')){t._insertBR(ed);Event.cancel(e);}});ed.addQueryValueHandler('FontSize',function(u,v){var e,v;if((e=ed.dom.getParent(ed.selection.getStart(),'span'))&&(v=e.style.fontSize))return tinymce.inArray(t.namedFontSizes,v)+1;if((e=ed.dom.getParent(ed.selection.getEnd(),'span'))&&(v=e.style.fontSize))return tinymce.inArray(t.namedFontSizes,v)+1;return ed.getDoc().queryCommandValue('FontSize');});ed.addQueryValueHandler('FontName',function(u,v){var e,v;if((e=ed.dom.getParent(ed.selection.getStart(),'span'))&&(v=e.style.fontFamily))return v.replace(/, /g,',');if((e=ed.dom.getParent(ed.selection.getEnd(),'span'))&&(v=e.style.fontFamily))return v.replace(/, /g,',');return ed.getDoc().queryCommandValue('FontName');});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName=='IMG'){t.selElm=e;ed.selection.select(e);}else t.selElm=null;});ed.onInit.add(function(){t._fixWebKitSpans();if(isOldWebKit)t._patchSafari2x(ed);});ed.onSetContent.add(function(){dom=ed.dom;each(['strong','b','em','u','strike','sub','sup','a'],function(v){each(grep(dom.select(v)).reverse(),function(n){var nn=n.nodeName.toLowerCase(),st;if(nn=='a'){if(n.name)dom.replace(dom.create('img',{mce_name:'a',name:n.name,'class':'mceItemAnchor'}),n);return;}switch(nn){case'b':case'strong':if(nn=='b')nn='strong';st='font-weight: bold;';break;case'em':st='font-style: italic;';break;case'u':st='text-decoration: underline;';break;case'sub':st='vertical-align: sub;';break;case'sup':st='vertical-align: super;';break;case'strike':st='text-decoration: line-through;';break;}dom.replace(dom.create('span',{mce_name:nn,style:st,'class':'Apple-style-span'}),n,1);});});});ed.onPreProcess.add(function(ed,o){dom=ed.dom;each(grep(o.node.getElementsByTagName('span')).reverse(),function(n){var v,bg;if(o.get){if(dom.hasClass(n,'Apple-style-span')){bg=n.style.backgroundColor;switch(dom.getAttrib(n,'mce_name')){case'font':if(!ed.settings.convert_fonts_to_spans)dom.setAttrib(n,'style','');break;case'strong':case'em':case'sub':case'sup':dom.setAttrib(n,'style','');break;case'strike':case'u':if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');else dom.setAttrib(n,'mce_name','');break;default:if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');}if(bg)n.style.backgroundColor=bg;}}if(dom.hasClass(n,'mceItemRemoved'))dom.remove(n,1);});});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/<br \/><\/(h[1-6]|div|p|address|pre)>/g,'</$1>');o.content=o.content.replace(/ id=\"undefined\"/g,'');});},getInfo:function(){return{longname:'Safari compatibility',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_fixWebKitSpans:function(){var t=this,ed=t.editor;if(!isOldWebKit){Event.add(ed.getDoc(),'DOMNodeInserted',function(e){e=e.target;if(e&&e.nodeType==1)t._fixAppleSpan(e);});}else{ed.onExecCommand.add(function(){each(ed.dom.select('span'),function(n){t._fixAppleSpan(n);});ed.nodeChanged();});}},_fixAppleSpan:function(e){var ed=this.editor,dom=ed.dom,fz=this.webKitFontSizes,fzn=this.namedFontSizes,s=ed.settings,st,p;if(dom.getAttrib(e,'mce_fixed'))return;if(e.nodeName=='SPAN'&&e.className=='Apple-style-span'){st=e.style;if(!s.convert_fonts_to_spans){if(st.fontSize){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'size',inArray(fz,st.fontSize)+1);}if(st.fontFamily){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'face',st.fontFamily);}if(st.color){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'color',dom.toHex(st.color));}if(st.backgroundColor){dom.setAttrib(e,'mce_name','font');dom.setStyle(e,'background-color',st.backgroundColor);}}else{if(st.fontSize)dom.setStyle(e,'fontSize',fzn[inArray(fz,st.fontSize)]);}if(st.fontWeight=='bold')dom.setAttrib(e,'mce_name','strong');if(st.fontStyle=='italic')dom.setAttrib(e,'mce_name','em');if(st.textDecoration=='underline')dom.setAttrib(e,'mce_name','u');if(st.textDecoration=='line-through')dom.setAttrib(e,'mce_name','strike');if(st.verticalAlign=='super')dom.setAttrib(e,'mce_name','sup');if(st.verticalAlign=='sub')dom.setAttrib(e,'mce_name','sub');dom.setAttrib(e,'mce_fixed','1');}},_patchSafari2x:function(ed){var t=this,setContent,getNode,dom=ed.dom,lr;if(ed.windowManager.onBeforeOpen){ed.windowManager.onBeforeOpen.add(function(){r=ed.selection.getRng();});}ed.selection.select=function(n){this.getSel().setBaseAndExtent(n,0,n,1);};getNode=ed.selection.getNode;ed.selection.getNode=function(){return t.selElm||getNode.call(this);};ed.selection.getRng=function(){var t=this,s=t.getSel(),d=ed.getDoc(),r,rb,ra,di;if(s.anchorNode){r=d.createRange();try{rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(1);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(1);di=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;r.setStart(di?s.anchorNode:s.focusNode,di?s.anchorOffset:s.focusOffset);r.setEnd(di?s.focusNode:s.anchorNode,di?s.focusOffset:s.anchorOffset);lr=r;}catch(ex){}}return r||lr;};setContent=ed.selection.setContent;ed.selection.setContent=function(h,s){var r=this.getRng(),b;try{setContent.call(this,h,s);}catch(ex){b=dom.create('body');b.innerHTML=h;each(b.childNodes,function(n){r.insertNode(n.cloneNode(true));});}};},_insertBR:function(ed){var dom=ed.dom,s=ed.selection,r=s.getRng(),br;r.insertNode(br=dom.create('br'));r.setStartAfter(br);r.setEndAfter(br);s.setRng(r);if(s.getSel().focusNode==br.previousSibling){s.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'),br));s.collapse(1);}ed.getWin().scrollTo(0,dom.getPos(s.getRng().startContainer).y);}});tinymce.PluginManager.add('safari',tinymce.plugins.Safari);})(); -
branches/crazyhorse/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js
r7929 r8242 25 25 } 26 26 }); 27 27 28 28 // Register commands 29 29 ed.addCommand('WP_More', function() { 30 30 ed.execCommand('mceInsertContent', 0, moreHTML); 31 31 }); 32 32 33 33 ed.addCommand('WP_Page', function() { 34 34 ed.execCommand('mceInsertContent', 0, nextpageHTML); 35 35 }); 36 36 37 37 ed.addCommand('WP_Help', function() { 38 38 ed.windowManager.open({ … … 81 81 title : 'wordpress.wp_help_desc', 82 82 image : url + '/img/help.gif', 83 cmd : 'WP_Help' 83 cmd : 'WP_Help' 84 84 }); 85 85 … … 91 91 92 92 // Add class "alignleft", "alignright" and "aligncenter" when selecting align for images. 93 ed.onExecCommand.add(function( ed itor, cmd ) {94 var n ode, bl, dom = editor.dom;93 ed.onExecCommand.add(function( ed, cmd ) { 94 var n, bl, dom = ed.dom; 95 95 96 96 if ( 'JustifyCenter' == cmd ) { 97 if ( ( node = editor.selection.getNode() ) && node.nodeName == 'IMG' ) { 98 if ( ! dom.hasClass( node, "aligncenter" ) && ( bl = editor.forceBlocks.getParentBlock(node) ) && bl.childNodes.length == 1 ) 99 dom.setStyle(bl, 'text-align', ''); 100 } 101 editor.execCommand('mceRepaint'); 102 } 103 }); 104 105 ed.onBeforeExecCommand.add(function( editor, cmd ) { 106 var node, dir, xdir, bl, dom = editor.dom; 107 108 if ( ( cmd.indexOf('Justify') != -1 ) && ( node = editor.selection.getNode() ) ) { 109 if ( 'JustifyFull' == cmd || node.nodeName !== 'IMG' ) return; 97 tinymce.each(dom.select('img'), function(n) { 98 var v = n.className; 99 100 if (v.indexOf('aligncenter') == -1) { 101 dom.getParent(n, function(P) { 102 if (P && P.style && P.style.textAlign == 'center') 103 dom.setStyle(P, 'textAlign', ''); 104 }); 105 } 106 }); 107 108 ed.execCommand('mceRepaint'); 109 } 110 }); 111 112 ed.onBeforeExecCommand.add(function( ed, cmd ) { 113 var n, dir, xdir, bl, dom = ed.dom; 114 115 if ( ( cmd.indexOf('Justify') != -1 ) && ( n = ed.selection.getNode() ) ) { 116 if ( 'JustifyFull' == cmd || n.nodeName !== 'IMG' ) return; 110 117 dir = cmd.substring(7).toLowerCase(); 111 118 112 if ( editor.queryCommandState( cmd ) ) { 113 dom.removeClass( node, "alignleft" ); 114 dom.removeClass( node, "alignright" ); 115 dom.removeClass( node, "aligncenter" ); 119 if ( ed.queryCommandState( cmd ) ) { 120 n.className = n.className.replace(/align[^ '"]+\s?/g, ''); 121 dom.addClass( n, "alignnone" ); 116 122 } else if ( 'JustifyCenter' == cmd ) { 117 dom.removeClass( node, "alignleft" ); 118 dom.removeClass( node, "alignright" ); 119 120 if ( dom.hasClass( node, "aligncenter" ) ) { 121 dom.removeClass( node, "aligncenter" ); 122 if ( ( bl = editor.forceBlocks.getParentBlock(node) ) && bl.childNodes.length == 1 && tinymce.isGecko ) 123 editor.selection.select(bl.firstChild); 124 } else dom.addClass( node, "aligncenter" ); 123 n.className = n.className.replace(/alignleft\s?|alignright\s?|alignnone\s?/g, ''); 124 if ( dom.hasClass( n, "aligncenter" ) ) { 125 dom.removeClass( n, "aligncenter" ); 126 dom.addClass( n, "alignnone" ); 127 } else 128 dom.addClass( n, "aligncenter" ); 125 129 126 130 } else { 127 xdir = ( dir == 'left' ) ? 'right' : 'left'; 128 dom.removeClass( node, "aligncenter" ); 129 dom.removeClass( node, "align"+xdir ); 130 dom.addClass( node, "align"+dir ); 131 n.className = n.className.replace(/align[^ '"]+\s?/g, ''); 132 dom.addClass( n, "align"+dir ); 131 133 } 132 134 } -
branches/crazyhorse/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css
r8103 r8242 5 5 } 6 6 7 .align .field label {7 #basic .align .field label { 8 8 display: block; 9 9 float: right; 10 padding: 0 2 5px 0 0;10 padding: 0 24px 0 0; 11 11 margin: 5px 3px 5px 5px; 12 12 } … … 37 37 } 38 38 39 .alignleft {40 float: right;41 }42 43 39 .show-align, 44 .alignright { 40 .alignright, 41 #img_size { 45 42 float: left; 46 43 } … … 51 48 #img_dim input, 52 49 #img_prop label, 53 #img_prop input { 50 #img_prop input, 51 #img_size_div, 52 .alignleft { 54 53 float: right; 55 54 } … … 64 63 margin: 0 5px 0 10px; 65 64 } 65 66 #img_size_title { 67 text-align: left; 68 } -
branches/crazyhorse/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css
r8103 r8242 19 19 border-radius: 3px; 20 20 cursor: pointer; 21 text-decoration: none; 21 text-decoration: none; 22 22 } 23 23 … … 60 60 61 61 th.label { 62 width: 1 28px;62 width: 107px; 63 63 } 64 64 … … 105 105 #sidemenu li { 106 106 list-style: none; 107 108 107 } 109 108 110 109 #sidemenu li { 111 112 110 display: inline; 113 111 } … … 129 127 130 128 #sidemenu a.current { 131 -moz-border-radius-topleft:4px; 132 -moz-border-radius-topright:4px; 129 -moz-border-radius-topleft: 4px; 130 -khtml-border-top-left-radius: 4px; 131 -webkit-border-top-left-radius: 4px; 132 border-top-left-radius: 4px; 133 -moz-border-radius-topright: 4px; 134 -khtml-border-top-right-radius: 4px; 135 -webkit-border-top-right-radius: 4px; 136 border-top-right-radius: 4px; 133 137 border-style:solid; 134 138 border-width:1px; … … 176 180 } 177 181 182 #basic .align .field label { 183 padding: 0 0 0 24px; 184 } 185 186 #basic { 187 padding-top: 2px; 188 } 189 190 td { 191 padding: 2px 0; 192 } 193 194 #img_size { 195 float: right; 196 text-align: center; 197 cursor: pointer; 198 background-color: #f1f1f1; 199 padding: 5px 0; 200 width: 45px; 201 } 202 203 #img_size div { 204 font-size: 10px; 205 padding: 2px; 206 border: 1px solid #f1f1f1; 207 line-height: 15px; 208 height: 15px; 209 -moz-border-radius: 3px; 210 -khtml-border-radius: 3px; 211 -webkit-border-radius: 3px; 212 border-radius: 3px; 213 color: #07273E; 214 } 215 216 #img_size div#s100 { 217 border-color: #A3A3A3; 218 background-color: #E5E5E5; 219 } 220 221 #img_size_div { 222 width: 100px; 223 float: left; 224 cursor: default; 225 } 226 227 #img_size_title { 228 margin: 0 7px 5px; 229 text-align: right; 230 font-weight: bold; 231 } 232 233 #img_align_td { 234 padding: 2px 0 8px; 235 } -
branches/crazyhorse/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html
r8151 r8242 5 5 <title></title> 6 6 7 <script type="text/javascript" src="js/editimage.js?ver=31 01"></script>8 <script type="text/javascript" src="../../utils/form_utils.js?ver=31 01"></script>9 10 <link rel="stylesheet" href="css/editimage.css?ver=31 01" type="text/css" media="all" />11 <link rel="stylesheet" href="../../../../../wp-admin/css/media.css?ver=2.6-b leeding2" type="text/css" media="all" />7 <script type="text/javascript" src="js/editimage.js?ver=311"></script> 8 <script type="text/javascript" src="../../utils/form_utils.js?ver=311"></script> 9 10 <link rel="stylesheet" href="css/editimage.css?ver=311" type="text/css" media="all" /> 11 <link rel="stylesheet" href="../../../../../wp-admin/css/media.css?ver=2.6-beta1" type="text/css" media="all" /> 12 12 <script type="text/javascript"> 13 13 if ( 'rtl' == tinyMCEPopup.editor.getParam('directionality','') ) 14 document.write('<link rel="stylesheet" href="css/editimage-rtl.css?ver=31 01" type="text/css" media="all" />');14 document.write('<link rel="stylesheet" href="css/editimage-rtl.css?ver=311" type="text/css" media="all" />'); 15 15 </script> 16 16 <base target="_self" /> … … 27 27 <div id="img-edit"> 28 28 <form class="media-upload-form" action="" onsubmit="wpImage.update();"> 29 30 <label for="show_align"> 31 <span id="show_align_sp" class="alignleft">{#preview.preview_desc}</span> 32 </label> 29 <div id="img_size_div"> 30 <div id="img_size_title">{#wpeditimage.size}</div> 31 <div id="img_size" onmouseout="wpImage.showSizeRem()"> 32 <div id="s130" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s130}</div> 33 <div id="s120" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s120}</div> 34 <div id="s110" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s110}</div> 35 <div id="s100" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s100}</div> 36 <div id="s90" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s90}</div> 37 <div id="s80" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s80}</div> 38 <div id="s70" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s70}</div> 39 <div id="s60" onmouseover="wpImage.showSize(this)" onclick="wpImage.imgEditSize(this)">{#wpeditimage.s60}</div> 40 </div> 41 </div> 33 42 <div class="show-align" id="show_align"> 34 43 <img id="img_demo" src="img/image.png" alt="" /> … … 66 75 </tr> 67 76 68 <tr class="image-size">69 <th valign="top" scope="row" class="label">70 <label for="img_size">71 <span class="alignleft">{#wpeditimage.size}</span>72 </label>73 </th>74 <td class="field" id="img_size">75 <input onclick="wpImage.imgEditSize('thumbnail')" type="radio" name="img_size" id="thumbnail" value="thumbnail" />76 <label for="thumbnail" id="lb_sizethumb">{#wpeditimage.thumbnail}</label>77 78 <input onclick="wpImage.imgEditSize('medium')" type="radio" name="img_size" id="medium" value="medium" />79 <label for="medium" id="lb_sizemedium">{#wpeditimage.medium}</label>80 81 <input onclick="wpImage.imgEditSize('full')" type="radio" name="img_size" id="full" value="full" />82 <label for="full" id="lb_sizefull">{#wpeditimage.full_size}</label>83 </td>84 </tr>85 86 77 <tr class=""> 87 78 <th valign="top" scope="row" class="label"> … … 115 106 </th> 116 107 <td class="field"> 117 <input type="text" id="link_href" name="link_href" value="" /><br />108 <input type="text" id="link_href" name="link_href" value="" size="60" /><br /> 118 109 <input type="button" class="button" onclick="wpImage.I('link_href').value='';" value="{#wpeditimage.none}" /> 119 110 <input type="button" class="button" id="img_url_current" onclick="wpImage.img_seturl('current')" value="{#wpeditimage.current_link}" /> -
branches/crazyhorse/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js
r8066 r8242 26 26 }); 27 27 28 ed.onExecCommand.add(function(ed, cmd, ui, val) { 29 if ( 'mceFullScreen' == cmd ) 30 ed.plugins.wpeditimage.hideButtons(); 28 ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) { 29 ed.plugins.wpeditimage.hideButtons(); 31 30 }); 32 31 … … 36 35 37 36 ed.onMouseUp.add(function(ed, e) { 38 if ( tinymce.isOpera ) 39 ed.plugins.wpeditimage.showButtons(e); 37 if ( ! tinymce.isOpera ) return; 38 if ( e.target.nodeName == 'IMG' ) 39 ed.plugins.wpeditimage.showButtons(e.target); 40 40 }); 41 41 42 42 ed.onMouseDown.add(function(ed, e) { 43 if ( tinymce.isOpera ) return; 44 ed.plugins.wpeditimage.showButtons(e); 45 }); 46 }, 47 48 showButtons : function(e) { 49 var t = this, ed = tinyMCE.activeEditor, p1, p2, vp, DOM = tinymce.DOM, X, Y, el = e.target; 50 51 t.hideButtons(); 52 if (el.nodeName == 'IMG') { 53 if (ed.dom.getAttrib(el, 'class').indexOf('mceItem') != -1) 43 if ( tinymce.isOpera || e.target.nodeName != 'IMG' ) { 44 t.hideButtons(); 54 45 return; 55 56 vp = ed.dom.getViewPort(ed.getWin()); 57 p1 = DOM.getPos(ed.getContentAreaContainer()); 58 p2 = ed.dom.getPos(el); 59 60 X = Math.max(p2.x - vp.x, 0) + p1.x; 61 Y = Math.max(p2.y - vp.y, 0) + p1.y; 62 63 DOM.setStyles('wp_editbtns', { 64 'top' : Y+5+'px', 65 'left' : X+5+'px', 66 'display' : 'block' 67 }); 68 69 t.btnsTout = window.setTimeout( function(){ed.plugins.wpeditimage.hideButtons();}, 5000 ); 70 } 71 }, 72 46 } 47 ed.plugins.wpeditimage.showButtons(e.target); 48 }); 49 50 ed.onKeyPress.add(function(ed, e) { 51 var DL, DIV; 52 53 if ( e.keyCode == 13 && (DL = ed.dom.getParent(ed.selection.getNode(), 'DL')) ) { 54 var P = ed.dom.create('p', {}, ' '); 55 if ( (DIV = DL.parentNode) && DIV.nodeName == 'DIV' ) 56 ed.dom.insertAfter( P, DIV ); 57 else ed.dom.insertAfter( P, DL ); 58 59 tinymce.dom.Event.cancel(e); 60 ed.selection.select(P); 61 return false; 62 } 63 }); 64 65 ed.onBeforeSetContent.add(function(ed, o) { 66 o.content = t._do_shcode(o.content); 67 }); 68 69 ed.onPostProcess.add(function(ed, o) { 70 if (o.get) 71 o.content = t._get_shcode(o.content); 72 }); 73 }, 74 75 _do_shcode : function(co) { 76 return co.replace(/\[wp_caption([^\]]+)\]([\s\S]+?)\[\/wp_caption\][\s\u00a0]*/g, function(a,b,c){ 77 var id = b.match(/id=['"]([^'"]+)/), cls = b.match(/align=['"]([^'"]+)/); 78 var w = b.match(/width=['"]([0-9]+)/), cap = b.match(/caption=['"]([^'"]+)/); 79 80 id = ( id && id[1] ) ? id[1] : ''; 81 cls = ( cls && cls[1] ) ? cls[1] : 'alignnone'; 82 w = ( w && w[1] ) ? w[1] : ''; 83 cap = ( cap && cap[1] ) ? cap[1] : ''; 84 if ( ! w || ! cap ) return c; 85 86 var div_cls = (cls == 'aligncenter') ? 'mceTemp mceIEcenter' : 'mceTemp'; 87 88 return '<div class="'+div_cls+'"><dl id="'+id+'" class="wp_caption '+cls+'" style="width: '+(10+parseInt(w))+ 89 'px"><dt class="wp_caption_dt">'+c+'</dt><dd class="wp_caption_dd">'+cap+'</dd></dl></div>'; 90 }); 91 }, 92 93 _get_shcode : function(co) { 94 return co.replace(/<div class="mceTemp[^"]*">\s*<dl([^>]+)>\s*<dt[^>]+>([\s\S]+?)<\/dt>\s*<dd[^>]+>([^<]+)<\/dd>\s*<\/dl>\s*<\/div>\s*/g, function(a,b,c,cap){ 95 var id = b.match(/id=['"]([^'"]+)/), cls = b.match(/class=['"]([^'"]+)/); 96 var w = c.match(/width=['"]([0-9]+)/); 97 98 id = ( id && id[1] ) ? id[1] : ''; 99 cls = ( cls && cls[1] ) ? cls[1] : 'alignnone'; 100 w = ( w && w[1] ) ? w[1] : ''; 101 102 if ( ! w || ! cap ) return c; 103 cls = cls ? cls.match(/align[^ '"]+/) : ''; 104 105 return '[wp_caption id="'+id+'" align="'+cls+'" width="'+w+'" caption="'+cap+'"]'+c+'[/wp_caption]'; 106 }); 107 }, 108 109 _fixCenter : function(c) { 110 var ed = tinyMCE.activeEditor; 111 112 tinymce.each(ed.dom.select('img', c), function(n) { 113 if ( ed.dom.hasClass(n, 'aligncenter') ) { 114 var P = ed.dom.getParent(n, 'p'); 115 if ( tinymce.isIE ) 116 ed.dom.addClass(P, 'mce_iecenter'); 117 if ( P.style && P.style.textAlign == 'center' ) 118 ed.dom.setStyle(P, 'textAlign', ''); 119 } 120 }); 121 }, 122 123 showButtons : function(n) { 124 var t = this, ed = tinyMCE.activeEditor, p1, p2, vp, DOM = tinymce.DOM, X, Y; 125 126 if (ed.dom.getAttrib(n, 'class').indexOf('mceItem') != -1) 127 return; 128 129 vp = ed.dom.getViewPort(ed.getWin()); 130 p1 = DOM.getPos(ed.getContentAreaContainer()); 131 p2 = ed.dom.getPos(n); 132 133 X = Math.max(p2.x - vp.x, 0) + p1.x; 134 Y = Math.max(p2.y - vp.y, 0) + p1.y; 135 136 DOM.setStyles('wp_editbtns', { 137 'top' : Y+5+'px', 138 'left' : X+5+'px', 139 'display' : 'block' 140 }); 141 142 t.btnsTout = window.setTimeout( function(){ed.plugins.wpeditimage.hideButtons();}, 5000 ); 143 }, 144 73 145 hideButtons : function() { 146 if ( tinymce.DOM.isHidden('wp_editbtns') ) return; 147 74 148 tinymce.DOM.hide('wp_editbtns'); 75 149 window.clearTimeout(this.btnsTout); … … 91 165 width : '24', 92 166 height : '24', 93 title : 'Edit'167 title : ed.getLang('wpeditimage.edit_img') 94 168 }); 95 169 … … 106 180 width : '24', 107 181 height : '24', 108 title : 'Delete'182 title : ed.getLang('wpeditimage.del_img') 109 183 }); 110 184 … … 112 186 var ed = tinyMCE.activeEditor, el = ed.selection.getNode(), p; 113 187 114 if ( el.nodeName != 'IMG' || ed.dom.getAttrib(el, 'class').indexOf('mceItem') != -1 ) return; 115 116 if ( (p = ed.dom.getParent(el, 'A')) && p.childNodes.length == 1) 117 ed.dom.remove(p); 118 else ed.dom.remove(el); 119 120 this.parentNode.style.display = 'none'; 121 ed.execCommand('mceRepaint'); 122 return false; 188 if ( el.nodeName == 'IMG' && ed.dom.getAttrib(el, 'class').indexOf('mceItem') == -1 ) { 189 if ( (p = ed.dom.getParent(el, 'div')) && ed.dom.hasClass(p, 'mceTemp') ) 190 ed.dom.remove(p); 191 else if ( (p = ed.dom.getParent(el, 'A')) && p.childNodes.length == 1 ) 192 ed.dom.remove(p); 193 else ed.dom.remove(el); 194 195 this.parentNode.style.display = 'none'; 196 ed.execCommand('mceRepaint'); 197 return false; 198 } 123 199 } 124 200 }, -
branches/crazyhorse/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js
r8103 r8242 41 41 // To avoid domain relaxing issue in Opera 42 42 function close() { 43 t.editor.execCommand('mceRepaint');44 43 win.tb_remove(); 45 tinymce = tinyMCE = t.editor = t. params = t.dom = t.dom.doc = null; // Cleanup44 tinymce = tinyMCE = t.editor = t.dom = t.dom.doc = null; // Cleanup 46 45 }; 47 46 … … 81 80 for ( i = 0; i < styles.length; i++ ) { 82 81 var url = styles.item(i).href; 83 if ( url && url.indexOf('colors-') != -1 ) {82 if ( url && url.indexOf('colors-') != -1 ) 84 83 document.write( '<link rel="stylesheet" href="'+url+'" type="text/css" media="all" />' ); 85 break;86 }87 84 } 88 85 }, … … 96 93 link_rel : '', 97 94 target_value : '', 95 current_size_sel : 's100', 96 width : '', 97 height : '', 98 align : '', 99 img_alt : '', 98 100 99 101 setTabs : function(tab) { 100 102 var t = this; 101 103 102 104 if ( 'current' == tab.className ) return false; 103 105 t.I('div_advanced').style.display = ( 'tab_advanced' == tab.id ) ? 'block' : 'none'; … … 126 128 var t = this, cls = t.I('img_classes').value; 127 129 128 t.I('img_demo').className = v;130 t.I('img_demo').className = t.align = v; 129 131 130 132 cls = cls.replace( /align[^ "']+/gi, '' ); … … 132 134 cls = cls.replace( /\s+/g, ' ' ).replace( /^\s/, '' ); 133 135 136 if ( 'aligncenter' == v ) { 137 t.I('hspace').value = ''; 138 t.updateStyle('hspace'); 139 } 140 134 141 t.I('img_classes').value = cls; 135 142 }, 136 143 137 imgSizeCls : function(v) { 138 var t = this, cls = t.I('img_classes').value; 139 140 if (v) { 141 if ( cls.indexOf('size-') != -1 ) 142 cls = cls.replace( /size-[^ "']+/i, 'size-' + v ); 143 else cls += (' size-' + v); 144 } else { 145 cls = cls.replace( /size-[^ "']+/gi, '' ); 146 t.demoSetSize(); 147 t.I('thumbnail').checked = ''; 148 t.I('medium').checked = ''; 149 t.I('full').checked = ''; 150 } 151 cls = cls.replace( /\s+/g, ' ' ).replace( /^\s|\s$/, '' ); 152 153 t.I('img_classes').value = cls; 154 }, 155 156 imgEditSize : function(size) { 157 var t = this, f = document.forms[0], sz, m = null; 158 159 var W = parseInt(t.preloadImg.width), H = parseInt(t.preloadImg.height); 160 161 if ( ! t.preloadImg || W == "" || H == "" ) 162 return; 163 164 switch(size) { 165 case 'thumbnail': 166 m = 150; 167 t.imgSizeCls('thumbnail'); 168 break; 169 case 'medium': 170 m = 300; 171 t.imgSizeCls('medium'); 172 break; 173 case 'full': 174 m = 500; 175 t.imgSizeCls('full'); 176 break; 177 } 178 179 if (m) { 180 if ( W > H ) { 181 m = Math.min(W, m); 182 f.width.value = m; 183 f.height.value = Math.round((m / W) * H); 184 } else { 185 m = Math.min(H, m); 186 f.height.value = m; 187 f.width.value = Math.round((m / H) * W); 188 } 189 190 t.width = f.width.value; 191 t.height = f.height.value; 192 } 144 showSize : function(el) { 145 var t = this, demo = t.I('img_demo'), w = t.width, h = t.height, id = el.id || 's100', size; 146 147 size = parseInt(id.substring(1)) / 200; 148 demo.width = Math.round(w * size); 149 demo.height = Math.round(h * size); 150 151 t.showSizeClear(); 152 el.style.borderColor = '#A3A3A3'; 153 el.style.backgroundColor = '#E5E5E5'; 154 }, 155 156 showSizeSet : function() { 157 var t = this; 158 159 if ( (t.width * 1.3) > parseInt(t.preloadImg.width) ) { 160 var s130 = t.I('s130'), s120 = t.I('s120'), s110 = t.I('s110'); 161 162 s130.onclick = s120.onclick = s110.onclick = null; 163 s130.onmouseover = s120.onmouseover = s110.onmouseover = null; 164 s130.style.color = s120.style.color = s110.style.color = '#aaa'; 165 } 166 }, 167 168 showSizeRem : function() { 169 var t = this, demo = t.I('img_demo'), f = document.forms[0]; 170 171 demo.width = Math.round(f.width.value * 0.5); 172 demo.height = Math.round(f.height.value * 0.5); 173 t.showSizeClear(); 174 t.I(t.current_size_sel).style.borderColor = '#A3A3A3'; 175 t.I(t.current_size_sel).style.backgroundColor = '#E5E5E5'; 176 177 return false; 178 }, 179 180 showSizeClear : function() { 181 var divs = this.I('img_size').getElementsByTagName('div'); 182 183 for ( i = 0; i < divs.length; i++ ) { 184 divs[i].style.borderColor = '#f1f1f1'; 185 divs[i].style.backgroundColor = '#f1f1f1'; 186 } 187 }, 188 189 imgEditSize : function(el) { 190 var t = this, f = document.forms[0]; 191 192 if ( ! t.preloadImg || ! t.preloadImg.width || ! t.preloadImg.height ) return; 193 var W = parseInt(t.preloadImg.width), H = parseInt(t.preloadImg.height), w = t.width || W, h = t.height || H, id = el.id || 's100'; 194 195 size = parseInt(id.substring(1)) / 100; 196 197 w = Math.round(w * size); 198 h = Math.round(h * size); 199 200 f.width.value = Math.min(W, w); 201 f.height.value = Math.min(H, h); 202 203 t.current_size_sel = id; 193 204 t.demoSetSize(); 194 205 }, … … 197 208 var demo = this.I('img_demo'), f = document.forms[0]; 198 209 199 demo.width = f.width.value ? Math. floor(f.width.value * 0.5) : '';200 demo.height = f.height.value ? Math. floor(f.height.value * 0.5) : '';201 }, 202 210 demo.width = f.width.value ? Math.round(f.width.value * 0.5) : ''; 211 demo.height = f.height.value ? Math.round(f.height.value * 0.5) : ''; 212 }, 213 203 214 demoSetStyle : function() { 204 var f = document.forms[0], demo = this.I('img_demo'); 205 206 if (demo) 207 tinyMCEPopup.editor.dom.setAttrib(demo, 'style', f.img_style.value); 208 }, 209 215 var f = document.forms[0], demo = this.I('img_demo'), dom = tinyMCEPopup.editor.dom; 216 217 if (demo) { 218 dom.setAttrib(demo, 'style', f.img_style.value); 219 dom.setStyle(demo, 'width', ''); 220 dom.setStyle(demo, 'height', ''); 221 } 222 }, 223 210 224 origSize : function() { 211 var t = this, f = document.forms[0]; 212 213 f.width.value = t.preloadImg.width; 214 f.height.value = t.preloadImg.height; 225 var t = this, f = document.forms[0], el = t.I('s100'); 226 227 f.width.value = t.width = t.preloadImg.width; 228 f.height.value = t.height = t.preloadImg.height; 229 t.showSizeSet(); 215 230 t.demoSetSize(); 216 t. imgSizeCls();231 t.showSize(el); 217 232 }, 218 233 … … 231 246 232 247 setup : function() { 233 var t = this, h, c, el, id, link, fname, f = document.forms[0], ed = tinyMCEPopup.editor, d = t.I('img_demo'), dom = tinyMCEPopup.dom ;234 document.dir = tinyMCEPopup.editor.getParam('directionality','');248 var t = this, h, c, el, id, link, fname, f = document.forms[0], ed = tinyMCEPopup.editor, d = t.I('img_demo'), dom = tinyMCEPopup.dom, DL, caption; 249 document.dir = tinyMCEPopup.editor.getParam('directionality',''); 235 250 tinyMCEPopup.restoreSelection(); 236 251 el = ed.selection.getNode(); … … 238 253 239 254 f.img_src.value = d.src = link = ed.dom.getAttrib(el, 'src'); 255 ed.dom.setStyle(el, 'float', ''); 256 t.getImageData(); 257 c = ed.dom.getAttrib(el, 'class'); 258 caption = t.img_alt = ed.dom.getAttrib(el, 'alt'); 259 260 if ( DL = dom.getParent(el, 'dl') ) { 261 var dlc = ed.dom.getAttrib(DL, 'class'); 262 dlc = dlc.match(/align[^ "']+/i); 263 if ( ! dom.hasClass(el, dlc) ) 264 c += ' '+dlc; 265 266 tinymce.each(DL.childNodes, function(e) { 267 if ( e.nodeName == 'DD' ) { 268 caption = e.innerHTML; 269 return; 270 } 271 }); 272 } 240 273 241 274 f.img_title.value = ed.dom.getAttrib(el, 'title'); 242 f.img_alt.value = ed.dom.getAttrib(el, 'alt');275 f.img_alt.value = caption; 243 276 f.border.value = ed.dom.getAttrib(el, 'border'); 244 277 f.vspace.value = ed.dom.getAttrib(el, 'vspace'); … … 247 280 f.width.value = t.width = ed.dom.getAttrib(el, 'width'); 248 281 f.height.value = t.height = ed.dom.getAttrib(el, 'height'); 249 f.img_classes.value = c = ed.dom.getAttrib(el, 'class');282 f.img_classes.value = c; 250 283 f.img_style.value = ed.dom.getAttrib(el, 'style'); 251 284 252 285 // Move attribs to styles 253 if (dom.getAttrib(el, 'align'))254 t.updateStyle('align');255 256 286 if (dom.getAttrib(el, 'hspace')) 257 287 t.updateStyle('hspace'); … … 273 303 274 304 f.link_target.checked = ( t.target_value && t.target_value == '_blank' ) ? 'checked' : ''; 275 305 276 306 fname = link.substring( link.lastIndexOf('/') ); 277 307 fname = fname.replace(/-[0-9]{2,4}x[0-9]{2,4}/, '' ); 278 308 t.link = link.substring( 0, link.lastIndexOf('/') ) + fname; 279 309 280 if ( c.indexOf('size-thumbnail') != -1 )281 t.I('thumbnail').checked = "checked";282 else if ( c.indexOf('size-medium') != -1 )283 t.I('medium').checked = "checked";284 else if ( c.indexOf('size-full') != -1 )285 t.I('full').checked = "checked";286 287 310 if ( c.indexOf('alignleft') != -1 ) { 288 311 t.I('alignleft').checked = "checked"; 289 d.className = "alignleft";312 d.className = t.align = "alignleft"; 290 313 } else if ( c.indexOf('aligncenter') != -1 ) { 291 314 t.I('aligncenter').checked = "checked"; 292 d.className = "aligncenter";315 d.className = t.align = "aligncenter"; 293 316 } else if ( c.indexOf('alignright') != -1 ) { 294 317 t.I('alignright').checked = "checked"; 295 d.className = "alignright";318 d.className = t.align = "alignright"; 296 319 } else if ( c.indexOf('alignnone') != -1 ) { 297 320 t.I('alignnone').checked = "checked"; 298 d.className = "alignnone"; 299 } 300 321 d.className = t.align = "alignnone"; 322 } 323 324 if ( t.width && t.preloadImg.width ) t.showSizeSet(); 301 325 document.body.style.display = ''; 302 t.getImageData();303 t.demoSetStyle();304 305 // Test if is attachment306 // if ( (id = c.match( /wp-image-([0-9]{1,6})/ )) && id[1] ) {307 // t.I('tab_attachment').href = tinymce.documentBaseURL + 'media.php?action=edit&attachment_id=' + id[1];308 // t.I('tab_attachment').style.display = 'inline';309 // }310 326 }, 311 327 … … 317 333 if (el.nodeName != 'IMG') return; 318 334 319 if ( (p = ed.dom.getParent(el, ' A')) && p.childNodes.length == 1)335 if ( (p = ed.dom.getParent(el, 'div')) && ed.dom.hasClass(p, 'mceTemp') ) 320 336 ed.dom.remove(p); 321 else 322 ed.dom.remove(el); 337 else if ( (p = ed.dom.getParent(el, 'A')) && p.childNodes.length == 1 ) 338 ed.dom.remove(p); 339 else ed.dom.remove(el); 323 340 324 341 ed.execCommand('mceRepaint'); … … 328 345 329 346 update : function() { 330 var t = this, f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, p, el, b;347 var t = this, f = document.forms[0], ed = tinyMCEPopup.editor, el, b, fixSafari = null, DL, P, A, DIV, do_caption = null, img_class = f.img_classes.value, html; 331 348 332 349 tinyMCEPopup.restoreSelection(); … … 334 351 335 352 if (el.nodeName != 'IMG') return; 336 if (f.img_src.value === '') t.remove(); 353 if (f.img_src.value === '') { 354 t.remove(); 355 return; 356 } 357 358 if ( f.img_alt.value != '' && f.width.value != '' ) { 359 do_caption = 1; 360 img_class = img_class.replace( /align[^ "']+\s?/gi, '' ); 361 } 362 363 A = ed.dom.getParent(el, 'a'); 364 P = ed.dom.getParent(el, 'p'); 365 DL = ed.dom.getParent(el, 'dl'); 366 DIV = ed.dom.getParent(el, 'div'); 367 368 tinyMCEPopup.execCommand("mceBeginUndoLevel"); 337 369 338 370 ed.dom.setAttribs(el, { 339 371 src : f.img_src.value, 340 372 title : f.img_title.value, 341 alt : f.img_alt.value,373 alt : t.img_alt, 342 374 width : f.width.value, 343 375 height : f.height.value, 344 376 style : f.img_style.value, 345 'class' : f.img_classes.value377 'class' : img_class 346 378 }); 347 379 348 pa = ed.dom.getParent(el, 'A');349 350 380 if ( ! f.link_href.value ) { 351 if ( pa ) { 352 tinyMCEPopup.execCommand("mceBeginUndoLevel"); 381 if ( A ) { 353 382 b = ed.selection.getBookmark(); 354 ed.dom.remove( pa, 1);383 ed.dom.remove(A, 1); 355 384 ed.selection.moveToBookmark(b); 356 tinyMCEPopup.execCommand("mceEndUndoLevel"); 357 tinyMCEPopup.close(); 358 return; 359 } 360 } 361 362 tinyMCEPopup.execCommand("mceBeginUndoLevel"); 363 364 // Create new anchor elements 365 if (pa == null) { 366 tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); 367 368 tinymce.each(ed.dom.select("a"), function(n) { 369 if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { 370 371 ed.dom.setAttribs(n, { 372 href : f.link_href.value, 373 title : f.link_title.value, 374 rel : f.link_rel.value, 375 target : (f.link_target.checked == true) ? '_blank' : '', 376 'class' : f.link_classes.value, 377 style : f.link_style.value 378 }); 379 } 380 }); 385 } 381 386 } else { 382 ed.dom.setAttribs(pa, { 383 href : f.link_href.value, 384 title : f.link_title.value, 385 rel : f.link_rel.value, 386 target : (f.link_target.checked == true) ? '_blank' : '', 387 'class' : f.link_classes.value, 388 style : f.link_style.value 389 }); 387 // Create new anchor elements 388 if ( A == null ) { 389 if ( ! f.link_href.value.match(/https?:\/\//) ) 390 f.link_href.value = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.link_href.value); 391 392 if ( tinymce.isWebKit && ed.dom.hasClass(el, 'aligncenter') ) { 393 ed.dom.removeClass(el, 'aligncenter'); 394 fixSafari = 1; 395 } 396 397 tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); 398 if ( fixSafari ) ed.dom.addClass(el, 'aligncenter'); 399 400 tinymce.each(ed.dom.select("a"), function(n) { 401 if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { 402 403 ed.dom.setAttribs(n, { 404 href : f.link_href.value, 405 title : f.link_title.value, 406 rel : f.link_rel.value, 407 target : (f.link_target.checked == true) ? '_blank' : '', 408 'class' : f.link_classes.value, 409 style : f.link_style.value 410 }); 411 } 412 }); 413 } else { 414 ed.dom.setAttribs(A, { 415 href : f.link_href.value, 416 title : f.link_title.value, 417 rel : f.link_rel.value, 418 target : (f.link_target.checked == true) ? '_blank' : '', 419 'class' : f.link_classes.value, 420 style : f.link_style.value 421 }); 422 } 423 } 424 425 if ( do_caption ) { 426 var id, cap_id = '', cap, DT, DD, cap_width = 10 + parseInt(f.width.value), align = t.align.substring(5), div_cls = (t.align == 'aligncenter') ? 'mceTemp mceIEcenter' : 'mceTemp'; 427 428 if ( DL ) { 429 ed.dom.setAttribs(DL, { 430 'class' : 'wp_caption '+t.align, 431 style : 'width: '+cap_width+'px;' 432 }); 433 434 if ( DIV ) 435 ed.dom.setAttrib(DIV, 'class', div_cls); 436 437 if ( (DT = ed.dom.getParent(el, 'dt')) && (DD = DT.nextSibling) && ed.dom.hasClass(DD, 'wp_caption_dd') ) 438 ed.dom.setHTML(DD, f.img_alt.value); 439 440 } else { 441 if ( (id = f.img_classes.value.match( /wp-image-([0-9]{1,6})/ )) && id[1] ) 442 cap_id = 'attachment_'+id[1]; 443 444 if ( f.link_href.value ) html = ed.dom.getOuterHTML(ed.dom.getParent(el, 'a')); 445 else html = ed.dom.getOuterHTML(el); 446 447 html = '<dl id="'+cap_id+'" class="wp_caption '+t.align+'" style="width: '+cap_width+ 448 'px"><dt class="wp_caption_dt">'+html+'</dt><dd class="wp_caption_dd">'+f.img_alt.value+'</dd></dl>'; 449 450 cap = ed.dom.create('div', {'class': div_cls}, html); 451 452 if ( P ) { 453 P.parentNode.insertBefore(cap, P); 454 ed.dom.remove(P); 455 } 456 } 457 458 tinyMCEPopup.execCommand("mceEndUndoLevel"); 459 ed.execCommand('mceRepaint'); 460 tinyMCEPopup.close(); 461 return; 462 } else { 463 if ( DL ) { 464 if ( f.link_href.value ) html = ed.dom.getOuterHTML(ed.dom.getParent(el, 'a')); 465 else html = ed.dom.getOuterHTML(el); 466 467 P = ed.dom.create('p', {}, html); 468 DL.parentNode.insertBefore(P,DL); 469 ed.dom.remove(DL.childNodes); 470 ed.dom.remove(DL); 471 } 472 } 473 474 if ( f.img_classes.value.indexOf('aligncenter') != -1 ) { 475 if ( P && ( ! P.style || P.style.textAlign != 'center' ) ) 476 ed.dom.setStyle(P, 'textAlign', 'center'); 477 } else { 478 if ( P && P.style && P.style.textAlign == 'center' ) 479 ed.dom.setStyle(P, 'textAlign', ''); 390 480 } 391 481 392 482 tinyMCEPopup.execCommand("mceEndUndoLevel"); 483 ed.execCommand('mceRepaint'); 393 484 tinyMCEPopup.close(); 394 485 }, 395 486 396 487 updateStyle : function(ty) { 397 488 var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : f.img_style.value}); … … 467 558 var f = document.forms[0]; 468 559 469 f.width.value = f.height.value = ''; 560 f.width.value = f.height.value = ''; 470 561 }, 471 562 … … 474 565 475 566 if ( f.width.value == '' || f.height.value == '' ) { 476 f.width.value = t.preloadImg.width; 477 f.height.value = t.preloadImg.height; 478 } 567 f.width.value = t.width = t.preloadImg.width; 568 f.height.value = t.height = t.preloadImg.height; 569 } 570 571 t.showSizeSet(); 479 572 t.demoSetSize(); 573 if ( f.img_style.value ) 574 t.demoSetStyle(); 480 575 }, 481 576 -
branches/crazyhorse/wp-includes/js/tinymce/themes/advanced/about.htm
r8151 r8242 3 3 <head> 4 4 <title>{#advanced_dlg.about_title}</title> 5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=31 01"></script>6 <script type="text/javascript" src="../../utils/mctabs.js?ver=31 01"></script>7 <script type="text/javascript" src="js/about.js?ver=31 01"></script>5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script> 6 <script type="text/javascript" src="../../utils/mctabs.js?ver=311"></script> 7 <script type="text/javascript" src="js/about.js?ver=311"></script> 8 8 </head> 9 9 <body id="about" style="display: none"> -
branches/crazyhorse/wp-includes/js/tinymce/themes/advanced/anchor.htm
r8151 r8242 3 3 <head> 4 4 <title>{#advanced_dlg.anchor_title}</title> 5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=31 01"></script>6 <script type="text/javascript" src="js/anchor.js?ver=31 01"></script>5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script> 6 <script type="text/javascript" src="js/anchor.js?ver=311"></script> 7 7 <base target="_self" /> 8 8 </head> -
branches/crazyhorse/wp-includes/js/tinymce/themes/advanced/charmap.htm
r8151 r8242 4 4 <title>{#advanced_dlg.charmap_title}</title> 5 5 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> 6 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=31 01"></script>7 <script type="text/javascript" src="js/charmap.js?ver=31 01"></script>6 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script> 7 <script type="text/javascript" src="js/charmap.js?ver=311"></script> 8 8 <base target="_self" /> 9 9 </head> -
branches/crazyhorse/wp-includes/js/tinymce/themes/advanced/color_picker.htm
r8151 r8242 3 3 <head> 4 4 <title>{#advanced_dlg.colorpicker_title}</title> 5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=31 01"></script>6 <script type="text/javascript" src="../../utils/mctabs.js?ver=31 01"></script>7 <script type="text/javascript" src="js/color_picker.js?ver=31 01"></script>5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script> 6 <script type="text/javascript" src="../../utils/mctabs.js?ver=311"></script> 7 <script type="text/javascript" src="js/color_picker.js?ver=311"></script> 8 8 <base target="_self" /> 9 9 </head> -
branches/crazyhorse/wp-includes/js/tinymce/themes/advanced/image.htm
r8151 r8242 3 3 <head> 4 4 <title>{#advanced_dlg.image_title}</title> 5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=31 01"></script>6 <script type="text/javascript" src="../../utils/mctabs.js?ver=31 01"></script>7 <script type="text/javascript" src="../../utils/form_utils.js?ver=31 01"></script>8 <script type="text/javascript" src="js/image.js?ver=31 01"></script>5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script> 6 <script type="text/javascript" src="../../utils/mctabs.js?ver=311"></script> 7 <script type="text/javascript" src="../../utils/form_utils.js?ver=311"></script> 8 <script type="text/javascript" src="js/image.js?ver=311"></script> 9 9 <base target="_self" /> 10 10 </head> -
branches/crazyhorse/wp-includes/js/tinymce/themes/advanced/link.htm
r8151 r8242 3 3 <head> 4 4 <title>{#advanced_dlg.link_title}</title> 5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=31 01"></script>6 <script type="text/javascript" src="../../utils/mctabs.js?ver=31 01"></script>7 <script type="text/javascript" src="../../utils/form_utils.js?ver=31 01"></script>8 <script type="text/javascript" src="../../utils/validate.js?ver=31 01"></script>9 <script type="text/javascript" src="js/link.js?ver=31 01"></script>5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script> 6 <script type="text/javascript" src="../../utils/mctabs.js?ver=311"></script> 7 <script type="text/javascript" src="../../utils/form_utils.js?ver=311"></script> 8 <script type="text/javascript" src="../../utils/validate.js?ver=311"></script> 9 <script type="text/javascript" src="js/link.js?ver=311"></script> 10 10 <base target="_self" /> 11 11 </head> -
branches/crazyhorse/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css
r7378 r8242 1 body, td , pre{color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}1 body, td {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} 2 2 body {background:#FFF;} 3 3 body.mceForceColors {background:#FFF; color:#000;} … … 12 12 img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;} 13 13 img {border:0;} 14 15 /* IE 16 * html body { 17 scrollbar-3dlight-color:#F0F0EE; 18 scrollbar-arrow-color:#676662; 19 scrollbar-base-color:#F0F0EE; 20 scrollbar-darkshadow-color:#DDD; 21 scrollbar-face-color:#E0E0DD; 22 scrollbar-highlight-color:#F0F0EE; 23 scrollbar-shadow-color:#F0F0EE; 24 scrollbar-track-color:#F5F5F5; 25 } 26 */ 14 table {cursor:default} 15 table td, table th {cursor:text} 16 ins {border-bottom:1px solid green; text-decoration: none; color:green} 17 del {color:red; text-decoration:line-through} 18 cite {border-bottom:1px dashed blue} 19 acronym {border-bottom:1px dotted #CCC; cursor:help} -
branches/crazyhorse/wp-includes/js/tinymce/themes/advanced/source_editor.htm
r8151 r8242 3 3 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 4 4 <title>{#advanced_dlg.code_title}</title> 5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=31 01"></script>6 <script type="text/javascript" src="js/source_editor.js?ver=31 01"></script>5 <script type="text/javascript" src="../../tiny_mce_popup.js?ver=311"></script> 6 <script type="text/javascript" src="js/source_editor.js?ver=311"></script> 7 7 <base target="_self" /> 8 8 </head> -
branches/crazyhorse/wp-includes/js/tinymce/tiny_mce.js
r8151 r8242 1 var tinymce={majorVersion:'3',minorVersion:'1. 0.1',releaseDate:'2008-06-18',_init:function(){var t=this,d=document,w=window,na=navigator,ua=na.userAgent,i,nl,n,base,p,v;t.isOpera=w.opera&&opera.buildNumber;t.isWebKit=/WebKit/.test(ua);t.isOldWebKit=t.isWebKit&&!w.getSelection().getRangeAt;t.isIE=!t.isWebKit&&!t.isOpera&&(/MSIE/gi).test(ua)&&(/Explorer/gi).test(na.appName);t.isIE6=t.isIE&&/MSIE [56]/.test(ua);t.isGecko=!t.isWebKit&&/Gecko/.test(ua);t.isMac=ua.indexOf('Mac')!=-1;if(w.tinyMCEPreInit){t.suffix=tinyMCEPreInit.suffix;t.baseURL=tinyMCEPreInit.base;t.query=tinyMCEPreInit.query;return;}t.suffix='';nl=d.getElementsByTagName('base');for(i=0;i<nl.length;i++){if(v=nl[i].href){if(/^https?:\/\/[^\/]+$/.test(v))v+='/';base=v?v.match(/.*\//)[0]:'';}}function getBase(n){if(n.src&&/tiny_mce(|_dev|_src|_gzip|_jquery|_prototype).js/.test(n.src)){if(/_(src|dev)\.js/g.test(n.src))t.suffix='_src';if((p=n.src.indexOf('?'))!=-1)t.query=n.src.substring(p+1);t.baseURL=n.src.substring(0,n.src.lastIndexOf('/'));if(base&&t.baseURL.indexOf('://')==-1)t.baseURL=base+t.baseURL;return t.baseURL;}return null;};nl=d.getElementsByTagName('script');for(i=0;i<nl.length;i++){if(getBase(nl[i]))return;}n=d.getElementsByTagName('head')[0];if(n){nl=n.getElementsByTagName('script');for(i=0;i<nl.length;i++){if(getBase(nl[i]))return;}}return;},is:function(o,t){var n=typeof(o);if(!t)return n!='undefined';if(t=='array'&&(o instanceof Array))return true;return n==t;},each:function(o,cb,s){var n,l;if(!o)return 0;s=s||o;if(typeof(o.length)!='undefined'){for(n=0,l=o.length;n<l;n++){if(cb.call(s,o[n],n,o)===false)return 0;}}else{for(n in o){if(o.hasOwnProperty(n)){if(cb.call(s,o[n],n,o)===false)return 0;}}}return 1;},map:function(a,f){var o=[];tinymce.each(a,function(v){o.push(f(v));});return o;},grep:function(a,f){var o=[];tinymce.each(a,function(v){if(!f||f(v))o.push(v);});return o;},inArray:function(a,v){var i,l;if(a){for(i=0,l=a.length;i<l;i++){if(a[i]===v)return i;}}return-1;},extend:function(o,e){var i,a=arguments;for(i=1;i<a.length;i++){e=a[i];tinymce.each(e,function(v,n){if(typeof(v)!=='undefined')o[n]=v;});}return o;},trim:function(s){return(s?''+s:'').replace(/^\s*|\s*$/g,'');},create:function(s,p){var t=this,sp,ns,cn,scn,c,de=0;s=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(s);cn=s[3].match(/(^|\.)(\w+)$/i)[2];ns=t.createNS(s[3].replace(/\.\w+$/,''));if(ns[cn])return;if(s[2]=='static'){ns[cn]=p;if(this.onCreate)this.onCreate(s[2],s[3],ns[cn]);return;}if(!p[cn]){p[cn]=function(){};de=1;}ns[cn]=p[cn];t.extend(ns[cn].prototype,p);if(s[5]){sp=t.resolve(s[5]).prototype;scn=s[5].match(/\.(\w+)$/i)[1];c=ns[cn];if(de){ns[cn]=function(){return sp[scn].apply(this,arguments);};}else{ns[cn]=function(){this.parent=sp[scn];return c.apply(this,arguments);};}ns[cn].prototype[cn]=ns[cn];t.each(sp,function(f,n){ns[cn].prototype[n]=sp[n];});t.each(p,function(f,n){if(sp[n]){ns[cn].prototype[n]=function(){this.parent=sp[n];return f.apply(this,arguments);};}else{if(n!=cn)ns[cn].prototype[n]=f;}});}t.each(p['static'],function(f,n){ns[cn][n]=f;});if(this.onCreate)this.onCreate(s[2],s[3],ns[cn].prototype);},walk:function(o,f,n,s){s=s||this;if(o){if(n)o=o[n];tinymce.each(o,function(o,i){if(f.call(s,o,i,n)===false)return false;tinymce.walk(o,f,n,s);});}},createNS:function(n,o){var i,v;o=o||window;n=n.split('.');for(i=0;i<n.length;i++){v=n[i];if(!o[v])o[v]={};o=o[v];}return o;},resolve:function(n,o){var i,l;o=o||window;n=n.split('.');for(i=0,l=n.length;i<l;i++){o=o[n[i]];if(!o)break;}return o;},addUnload:function(f,s){var t=this,w=window;f={func:f,scope:s||this};if(!t.unloads){function unload(){var li=t.unloads,o,n;if(li){for(n in li){o=li[n];if(o&&o.func)o.func.call(o.scope,1);}if(w.detachEvent){w.detachEvent('onbeforeunload',fakeUnload);w.detachEvent('onunload',unload);}else if(w.removeEventListener)w.removeEventListener('unload',unload,false);t.unloads=o=li=w=unload=null;if(window.CollectGarbage)window.CollectGarbage();}};function fakeUnload(){var d=document;if(d.readyState=='interactive'){function stop(){d.detachEvent('onstop',stop);unload();d=null;};d.attachEvent('onstop',stop);window.setTimeout(function(){d.detachEvent('onstop',stop);},0);}};if(w.attachEvent){w.attachEvent('onunload',unload);w.attachEvent('onbeforeunload',fakeUnload);}else if(w.addEventListener)w.addEventListener('unload',unload,false);t.unloads=[f];}else t.unloads.push(f);return f;},removeUnload:function(f){var u=this.unloads,r=null;tinymce.each(u,function(o,i){if(o&&o.func==f){u.splice(i,1);r=f;return false;}});return r;},explode:function(s,d){return s?tinymce.map(s.split(d||','),tinymce.trim):s;},_addVer:function(u){var v;if(!this.query)return u;v=(u.indexOf('?')==-1?'?':'&')+this.query;if(u.indexOf('#')==-1)return u+v;return u.replace('#',v+'#');}};window.tinymce=tinymce;tinymce._init();tinymce.create('tinymce.util.Dispatcher',{scope:null,listeners:null,Dispatcher:function(s){this.scope=s||this;this.listeners=[];},add:function(cb,s){this.listeners.push({cb:cb,scope:s||this.scope});return cb;},addToTop:function(cb,s){this.listeners.unshift({cb:cb,scope:s||this.scope});return cb;},remove:function(cb){var l=this.listeners,o=null;tinymce.each(l,function(c,i){if(cb==c.cb){o=cb;l.splice(i,1);return false;}});return o;},dispatch:function(){var s,a=arguments,i,li=this.listeners,c;for(i=0;i<li.length;i++){c=li[i];s=c.cb.apply(c.scope,a);if(s===false)break;}return s;}});(function(){var each=tinymce.each;tinymce.create('tinymce.util.URI',{URI:function(u,s){var t=this,o,a,b;s=t.settings=s||{};if(/^(mailto|news|javascript|about):/i.test(u)||/^\s*#/.test(u)){t.source=u;return;}if(u.indexOf('/')===0&&u.indexOf('//')!==0)u=(s.base_uri?s.base_uri.protocol||'http':'http')+'://mce_host'+u;if(u.indexOf('://')===-1&&u.indexOf('//')!==0)u=(s.base_uri.protocol||'http')+'://mce_host'+t.toAbsPath(s.base_uri.path,u);u=u.replace(/@@/g,'(mce_at)');u=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(u);each(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(v,i){var s=u[i];if(s)s=s.replace(/\(mce_at\)/g,'@@');t[v]=s;});if(b=s.base_uri){if(!t.protocol)t.protocol=b.protocol;if(!t.userInfo)t.userInfo=b.userInfo;if(!t.port&&t.host=='mce_host')t.port=b.port;if(!t.host||t.host=='mce_host')t.host=b.host;t.source='';}},setPath:function(p){var t=this;p=/^(.*?)\/?(\w+)?$/.exec(p);t.path=p[0];t.directory=p[1];t.file=p[2];t.source='';t.getURI();},toRelative:function(u){var t=this,o;u=new tinymce.util.URI(u,{base_uri:t});if((u.host!='mce_host'&&t.host!=u.host&&u.host)||t.port!=u.port||t.protocol!=u.protocol)return u.getURI();o=t.toRelPath(t.path,u.path);if(u.query)o+='?'+u.query;if(u.anchor)o+='#'+u.anchor;return o;},toAbsolute:function(u,nh){var u=new tinymce.util.URI(u,{base_uri:this});return u.getURI(this.host==u.host?nh:0);},toRelPath:function(base,path){var items,bp=0,out='',i;base=base.substring(0,base.lastIndexOf('/'));base=base.split('/');items=path.split('/');if(base.length>=items.length){for(i=0;i<base.length;i++){if(i>=items.length||base[i]!=items[i]){bp=i+1;break;}}}if(base.length<items.length){for(i=0;i<items.length;i++){if(i>=base.length||base[i]!=items[i]){bp=i+1;break;}}}if(bp==1)return path;for(i=0;i<base.length-(bp-1);i++)out+="../";for(i=bp-1;i<items.length;i++){if(i!=bp-1)out+="/"+items[i];else out+=items[i];}return out;},toAbsPath:function(base,path){var i,nb=0,o=[];base=base.split('/');path=path.split('/');each(base,function(k){if(k)o.push(k);});base=o;for(i=path.length-1,o=[];i>=0;i--){if(path[i].length==0||path[i]==".")continue;if(path[i]=='..'){nb++;continue;}if(nb>0){nb--;continue;}o.push(path[i]);}i=base.length-nb;if(i<=0)return'/'+o.reverse().join('/');return'/'+base.slice(0,i).join('/')+'/'+o.reverse().join('/');},getURI:function(nh){var s,t=this;if(!t.source||nh){s='';if(!nh){if(t.protocol)s+=t.protocol+'://';if(t.userInfo)s+=t.userInfo+'@';if(t.host)s+=t.host;if(t.port)s+=':'+t.port;}if(t.path)s+=t.path;if(t.query)s+='?'+t.query;if(t.anchor)s+='#'+t.anchor;t.source=s;}return t.source;}});})();(function(){var each=tinymce.each;tinymce.create('static tinymce.util.Cookie',{getHash:function(n){var v=this.get(n),h;if(v){each(v.split('&'),function(v){v=v.split('=');h=h||{};h[unescape(v[0])]=unescape(v[1]);});}return h;},setHash:function(n,v,e,p,d,s){var o='';each(v,function(v,k){o+=(!o?'':'&')+escape(k)+'='+escape(v);});this.set(n,o,e,p,d,s);},get:function(n){var c=document.cookie,e,p=n+"=",b;if(!c)return;b=c.indexOf("; "+p);if(b==-1){b=c.indexOf(p);if(b!=0)return null;}else b+=2;e=c.indexOf(";",b);if(e==-1)e=c.length;return unescape(c.substring(b+p.length,e));},set:function(n,v,e,p,d,s){document.cookie=n+"="+escape(v)+((e)?"; expires="+e.toGMTString():"")+((p)?"; path="+escape(p):"")+((d)?"; domain="+d:"")+((s)?"; secure":"");},remove:function(n,p){var d=new Date();d.setTime(d.getTime()-1000);this.set(n,'',d,p,d);}});})();tinymce.create('static tinymce.util.JSON',{serialize:function(o){var i,v,s=tinymce.util.JSON.serialize,t;if(o==null)return'null';t=typeof o;if(t=='string'){v='\bb\tt\nn\ff\rr\""\'\'\\\\';return'"'+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'])/g,function(a,b){i=v.indexOf(b);if(i+1)return'\\'+v.charAt(i+1);a=b.charCodeAt().toString(16);return'\\u'+'0000'.substring(a.length)+a;})+'"';}if(t=='object'){if(o instanceof Array){for(i=0,v='[';i<o.length;i++)v+=(i>0?',':'')+s(o[i]);return v+']';}v='{';for(i in o)v+=typeof o[i]!='function'?(v.length>1?',"':'"')+i+'":'+s(o[i]):'';return v+'}';}return''+o;},parse:function(s){try{return eval('('+s+')');}catch(ex){}}});tinymce.create('static tinymce.util.XHR',{send:function(o){var x,t,w=window,c=0;o.scope=o.scope||this;o.success_scope=o.success_scope||o.scope;o.error_scope=o.error_scope||o.scope;o.async=o.async===false?false:true;o.data=o.data||'';function get(s){x=0;try{x=new ActiveXObject(s);}catch(ex){}return x;};x=w.XMLHttpRequest?new XMLHttpRequest():get('Microsoft.XMLHTTP')||get('Msxml2.XMLHTTP');if(x){if(x.overrideMimeType)x.overrideMimeType(o.content_type);x.open(o.type||(o.data?'POST':'GET'),o.url,o.async);if(o.content_type)x.setRequestHeader('Content-Type',o.content_type);x.send(o.data);function ready(){if(!o.async||x.readyState==4||c++>10000){if(o.success&&c<10000&&x.status==200)o.success.call(o.success_scope,''+x.responseText,x,o);else if(o.error)o.error.call(o.error_scope,c>10000?'TIMED_OUT':'GENERAL',x,o);x=null;}else w.setTimeout(ready,10);};if(!o.async)return ready();t=w.setTimeout(ready,10);}}});(function(){var extend=tinymce.extend,JSON=tinymce.util.JSON,XHR=tinymce.util.XHR;tinymce.create('tinymce.util.JSONRequest',{JSONRequest:function(s){this.settings=extend({},s);this.count=0;},send:function(o){var ecb=o.error,scb=o.success;o=extend(this.settings,o);o.success=function(c,x){c=JSON.parse(c);if(typeof(c)=='undefined'){c={error:'JSON Parse error.'};}if(c.error)ecb.call(o.error_scope||o.scope,c.error,x);else scb.call(o.success_scope||o.scope,c.result);};o.error=function(ty,x){ecb.call(o.error_scope||o.scope,ty,x);};o.data=JSON.serialize({id:o.id||'c'+(this.count++),method:o.method,params:o.params});o.content_type='application/json';XHR.send(o);},'static':{sendRPC:function(o){return new tinymce.util.JSONRequest().send(o);}}});}());(function(){var each=tinymce.each,is=tinymce.is;var isWebKit=tinymce.isWebKit,isIE=tinymce.isIE;tinymce.create('tinymce.dom.DOMUtils',{doc:null,root:null,files:null,listeners:{},pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,cache:{},idPattern:/^#[\w]+$/,elmPattern:/^[\w_*]+$/,elmClassPattern:/^([\w_]*)\.([\w_]+)$/,DOMUtils:function(d,s){var t=this;t.doc=d;t.win=window;t.files={};t.cssFlicker=false;t.counter=0;t.boxModel=!tinymce.isIE||d.compatMode=="CSS1Compat";t.stdMode=d.documentMode===8;this.settings=s=tinymce.extend({keep_values:false,hex_colors:1,process_html:1},s);if(tinymce.isIE6){try{d.execCommand('BackgroundImageCache',false,true);}catch(e){t.cssFlicker=true;}}tinymce.addUnload(t.destroy,t);},getRoot:function(){var t=this,s=t.settings;return(s&&t.get(s.root_element))||t.doc.body;},getViewPort:function(w){var d,b;w=!w?this.win:w;d=w.document;b=this.boxModel?d.documentElement:d.body;return{x:w.pageXOffset||b.scrollLeft,y:w.pageYOffset||b.scrollTop,w:w.innerWidth||b.clientWidth,h:w.innerHeight||b.clientHeight};},getRect:function(e){var p,t=this,w,h;e=t.get(e);p=t.getPos(e);w=t.getStyle(e,'width');h=t.getStyle(e,'height');if(w.indexOf('px')===-1)w=0;if(h.indexOf('px')===-1)h=0;return{x:p.x,y:p.y,w:parseInt(w)||e.offsetWidth||e.clientWidth,h:parseInt(h)||e.offsetHeight||e.clientHeight};},getParent:function(n,f,r){var na,se=this.settings;n=this.get(n);if(se.strict_root)r=r||this.getRoot();if(is(f,'string')){na=f.toUpperCase();f=function(n){var s=false;if(n.nodeType==1&&na==='*'){s=true;return false;}each(na.split(','),function(v){if(n.nodeType==1&&((se.strict&&n.nodeName.toUpperCase()==v)||n.nodeName.toUpperCase()==v)){s=true;return false;}});return s;};}while(n){if(n==r)return null;if(f(n))return n;n=n.parentNode;}return null;},get:function(e){var n;if(e&&this.doc&&typeof(e)=='string'){n=e;e=this.doc.getElementById(e);if(e&&e.id!==n)return this.doc.getElementsByName(n)[1];}return e;},select:function(pa,s){var t=this,cs,c,pl,o=[],x,i,l,n;s=t.get(s)||t.doc;if(s.querySelectorAll){if(s!=t.doc){i=s.id;s.id='_mc_tmp';pa='#_mc_tmp '+pa;}l=tinymce.grep(s.querySelectorAll(pa));s.id=i;return l;}if(t.settings.strict){function get(s,n){return s.getElementsByTagName(n.toLowerCase());};}else{function get(s,n){return s.getElementsByTagName(n);};}if(t.elmPattern.test(pa)){x=get(s,pa);for(i=0,l=x.length;i<l;i++)o.push(x[i]);return o;}if(t.elmClassPattern.test(pa)){pl=t.elmClassPattern.exec(pa);x=get(s,pl[1]||'*');c=' '+pl[2]+' ';for(i=0,l=x.length;i<l;i++){n=x[i];if(n.className&&(' '+n.className+' ').indexOf(c)!==-1)o.push(n);}return o;}function collect(n){if(!n.mce_save){n.mce_save=1;o.push(n);}};function collectIE(n){if(!n.getAttribute('mce_save')){n.setAttribute('mce_save','1');o.push(n);}};function find(n,f,r){var i,l,nl=get(r,n);for(i=0,l=nl.length;i<l;i++)f(nl[i]);};each(pa.split(','),function(v,i){v=tinymce.trim(v);if(t.elmPattern.test(v)){each(get(s,v),function(n){collect(n);});return;}if(t.elmClassPattern.test(v)){x=t.elmClassPattern.exec(v);each(get(s,x[1]),function(n){if(t.hasClass(n,x[2]))collect(n);});return;}if(!(cs=t.cache[pa])){cs='x=(function(cf, s) {';pl=v.split(' ');each(pl,function(v){var p=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@([\w\\]+)([\^\$\*!]?=)([\w\\]+)\])?(?:\:([\w\\]+))?/i.exec(v);p[1]=p[1]||'*';cs+='find("'+p[1]+'", function(n) {';if(p[2])cs+='if (n.id !== "'+p[2]+'") return;';if(p[3]){cs+='var c = " " + n.className + " ";';cs+='if (';c='';each(p[3].split('.'),function(v){if(v)c+=(c?'||':'')+'c.indexOf(" '+v+' ") === -1';});cs+=c+') return;';}});cs+='cf(n);';for(i=pl.length-1;i>=0;i--)cs+='}, '+(i?'n':'s')+');';cs+='})';t.cache[pa]=cs=eval(cs);}cs(isIE?collectIE:collect,s);});each(o,function(n){if(isIE)n.removeAttribute('mce_save');else delete n.mce_save;});return o;},add:function(p,n,a,h,c){var t=this;return this.run(p,function(p){var e,k;e=is(n,'string')?t.doc.createElement(n):n;if(a){for(k in a){if(a.hasOwnProperty(k)&&!is(a[k],'object'))t.setAttrib(e,k,''+a[k]);}if(a.style&&!is(a.style,'string')){each(a.style,function(v,n){t.setStyle(e,n,v);});}}if(h){if(h.nodeType)e.appendChild(h);else t.setHTML(e,h);}return!c?p.appendChild(e):e;});},create:function(n,a,h){return this.add(this.doc.createElement(n),n,a,h,1);},createHTML:function(n,a,h){var o='',t=this,k;o+='<'+n;for(k in a){if(a.hasOwnProperty(k))o+=' '+k+'="'+t.encode(a[k])+'"';}if(tinymce.is(h))return o+'>'+h+'</'+n+'>';return o+' />';},remove:function(n,k){return this.run(n,function(n){var p,g;p=n.parentNode;if(!p)return null;if(k){each(n.childNodes,function(c){p.insertBefore(c.cloneNode(true),n);});}return p.removeChild(n);});},setStyle:function(n,na,v){var t=this;return t.run(n,function(e){var s,i;s=e.style;na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();});if(t.pixelStyles.test(na)&&(tinymce.is(v,'number')||/^[\-0-9\.]+$/.test(v)))v+='px';switch(na){case'opacity':if(isIE){s.filter=v===''?'':"alpha(opacity="+(v*100)+")";if(!n.currentStyle||!n.currentStyle.hasLayout)s.display='inline-block';}s[na]=s['-moz-opacity']=s['-khtml-opacity']=v||'';break;case'float':isIE?s.styleFloat=v:s.cssFloat=v;break;default:s[na]=v||'';}if(t.settings.update_styles)t.setAttrib(e,'mce_style');});},getStyle:function(n,na,c){n=this.get(n);if(!n)return false;if(this.doc.defaultView&&c){na=na.replace(/[A-Z]/g,function(a){return'-'+a;});try{return this.doc.defaultView.getComputedStyle(n,null).getPropertyValue(na);}catch(ex){return null;}}na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();});if(na=='float')na=isIE?'styleFloat':'cssFloat';if(n.currentStyle&&c)return n.currentStyle[na];return n.style[na];},setStyles:function(e,o){var t=this,s=t.settings,ol;ol=s.update_styles;s.update_styles=0;each(o,function(v,n){t.setStyle(e,n,v);});s.update_styles=ol;if(s.update_styles)t.setAttrib(e,s.cssText);},setAttrib:function(e,n,v){var t=this;if(t.settings.strict)n=n.toLowerCase();return this.run(e,function(e){var s=t.settings;switch(n){case"style":if(s.keep_values){if(v&&!t._isRes(v))e.setAttribute('mce_style',v,2);else e.removeAttribute('mce_style',2);}e.style.cssText=v;break;case"class":e.className=v||'';break;case"src":case"href":if(s.keep_values){if(s.url_converter)v=s.url_converter.call(s.url_converter_scope||t,v,n,e);t.setAttrib(e,'mce_'+n,v,2);}break;case"shape":e.setAttribute('mce_style',v);break;}if(is(v)&&v!==null&&v.length!==0)e.setAttribute(n,''+v,2);else e.removeAttribute(n,2);});},setAttribs:function(e,o){var t=this;return this.run(e,function(e){each(o,function(v,n){t.setAttrib(e,n,v);});});},getAttrib:function(e,n,dv){var v,t=this;e=t.get(e);if(!e||e.nodeType!==1)return false;if(!is(dv))dv="";if(/^(src|href|style|coords|shape)$/.test(n)){v=e.getAttribute("mce_"+n);if(v)return v;}v=e.getAttribute(n,2);if(!v){switch(n){case'class':v=e.className;break;default:if(isIE&&n==='name'&&e.nodeName==='A'){v=e.name;break;}v=e.attributes[n];v=v&&is(v.nodeValue)?v.nodeValue:v;}}switch(n){case'style':v=v||e.style.cssText;if(v){v=t.serializeStyle(t.parseStyle(v));if(t.settings.keep_values&&!t._isRes(v))e.setAttribute('mce_style',v);}break;}if(isWebKit&&n==="class"&&v)v=v.replace(/(apple|webkit)\-[a-z\-]+/gi,'');if(isIE){switch(n){case'rowspan':case'colspan':if(v===1)v='';break;case'size':if(v==='+0')v='';break;case'hspace':if(v===-1)v='';break;case'tabindex':if(v===32768)v='';break;case'maxlength':if(v===2147483647)v='';break;case'shape':v=v.toLowerCase();break;default:if(n.indexOf('on')===0&&v)v=(''+v).replace(/^function\s+anonymous\(\)\s+\{\s+(.*)\s+\}$/,'$1');}}return(v&&v!='')?''+v:dv;},getPos:function(n){var t=this,x=0,y=0,e,d=t.doc,r;n=t.get(n);if(n&&isIE){n=n.getBoundingClientRect();e=t.boxModel?d.documentElement:d.body;x=t.getStyle(t.select('html')[0],'borderWidth');x=(x=='medium'||t.boxModel&&!t.isIE6)&&2||x;n.top+=t.win.self!=t.win.top?2:0;return{x:n.left+e.scrollLeft-x,y:n.top+e.scrollTop-x};}r=n;while(r){x+=r.offsetLeft||0;y+=r.offsetTop||0;r=r.offsetParent;}r=n;while(r){if(!/^table-row|inline.*/i.test(t.getStyle(r,"display",1))){x-=r.scrollLeft||0;y-=r.scrollTop||0;}r=r.parentNode;if(r==d.body)break;}return{x:x,y:y};},parseStyle:function(st){var t=this,s=t.settings,o={};if(!st)return o;function compress(p,s,ot){var t,r,b,l;t=o[p+'-top'+s];if(!t)return;r=o[p+'-right'+s];if(t!=r)return;b=o[p+'-bottom'+s];if(r!=b)return;l=o[p+'-left'+s];if(b!=l)return;o[ot]=l;delete o[p+'-top'+s];delete o[p+'-right'+s];delete o[p+'-bottom'+s];delete o[p+'-left'+s];};function compress2(ta,a,b,c){var t;t=o[a];if(!t)return;t=o[b];if(!t)return;t=o[c];if(!t)return;o[ta]=o[a]+' '+o[b]+' '+o[c];delete o[a];delete o[b];delete o[c];};st=st.replace(/&(#?[a-z0-9]+);/g,'&$1_MCE_SEMI_');each(st.split(';'),function(v){var sv,ur=[];if(v){v=v.replace(/_MCE_SEMI_/g,';');v=v.replace(/url\([^\)]+\)/g,function(v){ur.push(v);return'url('+ur.length+')';});v=v.split(':');sv=tinymce.trim(v[1]);sv=sv.replace(/url\(([^\)]+)\)/g,function(a,b){return ur[parseInt(b)-1];});sv=sv.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);});if(s.url_converter){sv=sv.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(x,c){return'url('+s.url_converter.call(s.url_converter_scope||t,t.decode(c),'style',null)+')';});}o[tinymce.trim(v[0]).toLowerCase()]=sv;}});compress("border","","border");compress("border","-width","border-width");compress("border","-color","border-color");compress("border","-style","border-style");compress("padding","","padding");compress("margin","","margin");compress2('border','border-width','border-style','border-color');if(isIE){if(o.border=='medium none')o.border='';}return o;},serializeStyle:function(o){var s='';each(o,function(v,k){if(k&&v){if(tinymce.isGecko&&k.indexOf('-moz-')===0)return;switch(k){case'color':case'background-color':v=v.toLowerCase();break;}s+=(s?' ':'')+k+': '+v+';';}});return s;},loadCSS:function(u){var t=this,d=t.doc;if(!u)u='';each(u.split(','),function(u){if(t.files[u])return;t.files[u]=true;t.add(t.select('head')[0],'link',{rel:'stylesheet',href:tinymce._addVer(u)});});},addClass:function(e,c){return this.run(e,function(e){var o;if(!c)return 0;if(this.hasClass(e,c))return e.className;o=this.removeClass(e,c);return e.className=(o!=''?(o+' '):'')+c;});},removeClass:function(e,c){var t=this,re;return t.run(e,function(e){var v;if(t.hasClass(e,c)){if(!re)re=new RegExp("(^|\\s+)"+c+"(\\s+|$)","g");v=e.className.replace(re,' ');return e.className=tinymce.trim(v!=' '?v:'');}return e.className;});},hasClass:function(n,c){n=this.get(n);if(!n||!c)return false;return(' '+n.className+' ').indexOf(' '+c+' ')!==-1;},show:function(e){return this.setStyle(e,'display','block');},hide:function(e){return this.setStyle(e,'display','none');},isHidden:function(e){e=this.get(e);return e.style.display=='none'||this.getStyle(e,'display')=='none';},uniqueId:function(p){return(!p?'mce_':p)+(this.counter++);},setHTML:function(e,h){var t=this;return this.run(e,function(e){var x,i,nl,n,p,x;h=t.processHTML(h);if(isIE){function set(){try{e.innerHTML='<br />'+h;e.removeChild(e.firstChild);}catch(ex){while(e.firstChild)e.firstChild.removeNode();x=t.create('div');x.innerHTML='<br />'+h;each(x.childNodes,function(n,i){if(i)e.appendChild(n);});}};if(t.settings.fix_ie_paragraphs)h=h.replace(/<p><\/p>|<p([^>]+)><\/p>|<p[^\/+]\/>/gi,'<p$1 mce_keep="true"> </p>');set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("p");for(i=nl.length-1,x=0;i>=0;i--){n=nl[i];if(!n.hasChildNodes()){if(!n.mce_keep){x=1;break;}n.removeAttribute('mce_keep');}}}if(x){h=h.replace(/<p([^>]+)>|<p>/g,'<div$1 mce_tmp="1">');h=h.replace(/<\/p>/g,'</div>');set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("DIV");for(i=nl.length-1;i>=0;i--){n=nl[i];if(n.mce_tmp){p=t.doc.createElement('p');n.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(a,b){var v;if(b!=='mce_tmp'){v=n.getAttribute(b);if(!v&&b==='class')v=n.className;p.setAttribute(b,v);}});for(x=0;x<n.childNodes.length;x++)p.appendChild(n.childNodes[x].cloneNode(true));n.swapNode(p);}}}}}else e.innerHTML=h;return h;});},processHTML:function(h){var t=this,s=t.settings;if(!s.process_html)return h;if(tinymce.isGecko){h=h.replace(/<(\/?)strong>|<strong( [^>]+)>/gi,'<$1b$2>');h=h.replace(/<(\/?)em>|<em( [^>]+)>/gi,'<$1i$2>');}else if(isIE)h=h.replace(/'/g,''');h=h.replace(/<a( )([^>]+)\/>|<a\/>/gi,'<a$1$2></a>');if(s.keep_values){if(/<script|style/.test(h)){function trim(s){s=s.replace(/^[\r\n]*|[\r\n]*$/g,'');s=s.replace(/^\s*(\/\/\s*<!--|\/\/\s*<\[CDATA\[|<!--|<\[CDATA\[)[\r\n]*/g,'');s=s.replace(/\s*(\/\/\s*\]\]>|\/\/\s*-->|\]\]>|-->)\s*$/g,'');return s;};h=h.replace(/<script([^>]+|)>([\s\S]*?)<\/script>/g,function(v,a,b){b=trim(b);if(!a)a=' type="text/javascript"';if(b)b='<!--\n'+b+'\n// -->';return'<mce:script'+a+'>'+b+'</mce:script>';});h=h.replace(/<style([^>]+|)>([\s\S]*?)<\/style>/g,function(v,a,b){b=trim(b);return'<mce:style'+a+'><!--\n'+b+'\n--></mce:style><style'+a+' mce_bogus="1">'+b+'</style>';});}h=h.replace(/<([\w:]+) [^>]*(src|href|style|shape|coords)[^>]*>/gi,function(a,n){function handle(m,b,c){var u=c;if(a.indexOf('mce_'+b)!=-1)return m;if(b=='style'){if(t._isRes(c))return m;if(s.hex_colors){u=u.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);});}if(s.url_converter){u=u.replace(/url\([\'\"]?([^\)\'\"]+)\)/g,function(x,c){return'url('+t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n))+')';});}}else if(b!='coords'&&b!='shape'){if(s.url_converter)u=t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n));}return' '+b+'="'+c+'" mce_'+b+'="'+u+'"';};a=a.replace(/ (src|href|style|coords|shape)=[\"]([^\"]+)[\"]/gi,handle);a=a.replace(/ (src|href|style|coords|shape)=[\']([^\']+)[\']/gi,handle);return a.replace(/ (src|href|style|coords|shape)=([^\s\"\'>]+)/gi,handle);});}return h;},getOuterHTML:function(e){var d;e=this.get(e);if(!e)return null;if(isIE)return e.outerHTML;d=(e.ownerDocument||this.doc).createElement("body");d.appendChild(e.cloneNode(true));return d.innerHTML;},setOuterHTML:function(e,h,d){var t=this;return this.run(e,function(e){var n,tp;e=t.get(e);d=d||e.ownerDocument||t.doc;if(isIE&&e.nodeType==1)e.outerHTML=h;else{tp=d.createElement("body");tp.innerHTML=h;n=tp.lastChild;while(n){t.insertAfter(n.cloneNode(true),e);n=n.previousSibling;}t.remove(e);}});},decode:function(s){var e;if(/&[^;]+;/.test(s)){e=this.doc.createElement("div");e.innerHTML=s;return!e.firstChild?s:e.firstChild.nodeValue;}return s;},encode:function(s){return s?(''+s).replace(/[<>&\"]/g,function(c,b){switch(c){case'&':return'&';case'"':return'"';case'<':return'<';case'>':return'>';}return c;}):s;},insertAfter:function(n,r){var t=this;r=t.get(r);return this.run(n,function(n){var p,ns;p=r.parentNode;ns=r.nextSibling;if(ns)p.insertBefore(n,ns);else p.appendChild(n);return n;});},isBlock:function(n){if(n.nodeType&&n.nodeType!==1)return false;n=n.nodeName||n;return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n);},replace:function(n,o,k){if(is(o,'array'))n=n.cloneNode(true);return this.run(o,function(o){if(k){each(o.childNodes,function(c){n.appendChild(c.cloneNode(true));});}return o.parentNode.replaceChild(n,o);});},toHex:function(s){var c=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(s);function hex(s){s=parseInt(s).toString(16);return s.length>1?s:'0'+s;};if(c){s='#'+hex(c[1])+hex(c[2])+hex(c[3]);return s;}return s;},getClasses:function(){var t=this,cl=[],i,lo={},f=t.settings.class_filter,ov;if(t.classes)return t.classes;function addClasses(s){each(s.imports,function(r){addClasses(r);});each(s.cssRules||s.rules,function(r){switch(r.type||1){case 1:if(r.selectorText){each(r.selectorText.split(','),function(v){v=v.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(v)||!/\.[\w\-]+$/.test(v))return;ov=v;v=v.replace(/.*\.([a-z0-9_\-]+).*/i,'$1');if(f&&!(v=f(v,ov)))return;if(!lo[v]){cl.push({'class':v});lo[v]=1;}});}break;case 3:addClasses(r.styleSheet);break;}});};try{each(t.doc.styleSheets,addClasses);}catch(ex){}if(cl.length>0)t.classes=cl;return cl;},run:function(e,f,s){var t=this,o;if(t.doc&&typeof(e)==='string')e=t.doc.getElementById(e);if(!e)return false;s=s||this;if(!e.nodeType&&(e.length||e.length===0)){o=[];each(e,function(e,i){if(e){if(typeof(e)=='string')e=t.doc.getElementById(e);o.push(f.call(s,e,i));}});return o;}return f.call(s,e);},getAttribs:function(n){var o;n=this.get(n);if(!n)return[];if(isIE){o=[];if(n.nodeName=='OBJECT')return n.attributes;n.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(a,b){o.push({specified:1,nodeName:b});});return o;}return n.attributes;},destroy:function(s){var t=this;t.win=t.doc=t.root=null;if(!s)tinymce.removeUnload(t.destroy);},_isRes:function(c){return/^(top|left|bottom|right|width|height)/i.test(c)||/;\s*(top|left|bottom|right|width|height)/i.test(c);}});tinymce.DOM=new tinymce.dom.DOMUtils(document,{process_html:0});})();(function(){var each=tinymce.each,DOM=tinymce.DOM,isIE=tinymce.isIE,isWebKit=tinymce.isWebKit,Event;tinymce.create('static tinymce.dom.Event',{inits:[],events:[],add:function(o,n,f,s){var cb,t=this,el=t.events,r;if(o&&o instanceof Array){r=[];each(o,function(o){o=DOM.get(o);r.push(t.add(o,n,f,s));});return r;}o=DOM.get(o);if(!o)return;cb=function(e){e=e||window.event;if(e&&!e.target&&isIE)e.target=e.srcElement;if(!s)return f(e);return f.call(s,e);};if(n=='unload'){tinymce.unloads.unshift({func:cb});return cb;}if(n=='init'){if(t.domLoaded)cb();else t.inits.push(cb);return cb;}el.push({obj:o,name:n,func:f,cfunc:cb,scope:s});t._add(o,n,cb);return f;},remove:function(o,n,f){var t=this,a=t.events,s=false,r;if(o&&o instanceof Array){r=[];each(o,function(o){o=DOM.get(o);r.push(t.remove(o,n,f));});return r;}o=DOM.get(o);each(a,function(e,i){if(e.obj==o&&e.name==n&&(!f||(e.func==f||e.cfunc==f))){a.splice(i,1);t._remove(o,n,e.cfunc);s=true;return false;}});return s;},clear:function(o){var t=this,a=t.events,i,e;if(o){o=DOM.get(o);for(i=a.length-1;i>=0;i--){e=a[i];if(e.obj===o){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null;a.splice(i,1);}}}},cancel:function(e){if(!e)return false;this.stop(e);return this.prevent(e);},stop:function(e){if(e.stopPropagation)e.stopPropagation();else e.cancelBubble=true;return false;},prevent:function(e){if(e.preventDefault)e.preventDefault();else e.returnValue=false;return false;},_unload:function(){var t=Event;each(t.events,function(e,i){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null;});t.events=[];t=null;},_add:function(o,n,f){if(o.attachEvent)o.attachEvent('on'+n,f);else if(o.addEventListener)o.addEventListener(n,f,false);else o['on'+n]=f;},_remove:function(o,n,f){if(o){try{if(o.detachEvent)o.detachEvent('on'+n,f);else if(o.removeEventListener)o.removeEventListener(n,f,false);else o['on'+n]=null;}catch(ex){}}},_pageInit:function(){var e=Event;e._remove(window,'DOMContentLoaded',e._pageInit);e.domLoaded=true;each(e.inits,function(c){c();});e.inits=[];},_wait:function(){var t;if(window.tinyMCE_GZ&&tinyMCE_GZ.loaded){Event.domLoaded=1;return;}if(isIE&&document.location.protocol!='https:'){document.write('<script id=__ie_onload defer src=\'javascript:""\';><\/script>');DOM.get("__ie_onload").onreadystatechange=function(){if(this.readyState=="complete"){Event._pageInit();DOM.get("__ie_onload").onreadystatechange=null;}};}else{Event._add(window,'DOMContentLoaded',Event._pageInit,Event);if(isIE||isWebKit){t=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(t);Event._pageInit();}},10);}}}});Event=tinymce.dom.Event;Event._wait();tinymce.addUnload(Event._unload);})();(function(){var each=tinymce.each;tinymce.create('tinymce.dom.Element',{Element:function(id,s){var t=this,dom,el;s=s||{};t.id=id;t.dom=dom=s.dom||tinymce.DOM;t.settings=s;if(!tinymce.isIE)el=t.dom.get(t.id);each(['getPos','getRect','getParent','add','setStyle','getStyle','setStyles','setAttrib','setAttribs','getAttrib','addClass','removeClass','hasClass','getOuterHTML','setOuterHTML','remove','show','hide','isHidden','setHTML','get'],function(k){t[k]=function(){var a=arguments,o;if(tinymce.isOpera){a=[id];each(arguments,function(v){a.push(v);});}else Array.prototype.unshift.call(a,el||id);o=dom[k].apply(dom,a);t.update(k);return o;};});},on:function(n,f,s){return tinymce.dom.Event.add(this.id,n,f,s);},getXY:function(){return{x:parseInt(this.getStyle('left')),y:parseInt(this.getStyle('top'))};},getSize:function(){var n=this.dom.get(this.id);return{w:parseInt(this.getStyle('width')||n.clientWidth),h:parseInt(this.getStyle('height')||n.clientHeight)};},moveTo:function(x,y){this.setStyles({left:x,top:y});},moveBy:function(x,y){var p=this.getXY();this.moveTo(p.x+x,p.y+y);},resizeTo:function(w,h){this.setStyles({width:w,height:h});},resizeBy:function(w,h){var s=this.getSize();this.resizeTo(s.w+w,s.h+h);},update:function(k){var t=this,b,dom=t.dom;if(tinymce.isIE6&&t.settings.blocker){k=k||'';if(k.indexOf('get')===0||k.indexOf('has')===0||k.indexOf('is')===0)return;if(k=='remove'){dom.remove(t.blocker);return;}if(!t.blocker){t.blocker=dom.uniqueId();b=dom.add(t.settings.container||dom.getRoot(),'iframe',{id:t.blocker,style:'position:absolute;',frameBorder:0,src:'javascript:""'});dom.setStyle(b,'opacity',0);}else b=dom.get(t.blocker);dom.setStyle(b,'left',t.getStyle('left',1));dom.setStyle(b,'top',t.getStyle('top',1));dom.setStyle(b,'width',t.getStyle('width',1));dom.setStyle(b,'height',t.getStyle('height',1));dom.setStyle(b,'display',t.getStyle('display',1));dom.setStyle(b,'zIndex',parseInt(t.getStyle('zIndex',1)||0)-1);}}});})();(function(){function trimNl(s){return s.replace(/[\n\r]+/g,'');};var is=tinymce.is,isIE=tinymce.isIE,each=tinymce.each;tinymce.create('tinymce.dom.Selection',{Selection:function(dom,win,serializer){var t=this;t.dom=dom;t.win=win;t.serializer=serializer;tinymce.addUnload(t.destroy,t);},getContent:function(s){var t=this,r=t.getRng(),e=t.dom.create("body"),se=t.getSel(),wb,wa,n;s=s||{};wb=wa='';s.get=true;s.format=s.format||'html';if(s.format=='text')return t.isCollapsed()?'':(r.text||(se.toString?se.toString():''));if(r.cloneContents){n=r.cloneContents();if(n)e.appendChild(n);}else if(is(r.item)||is(r.htmlText))e.innerHTML=r.item?r.item(0).outerHTML:r.htmlText;else e.innerHTML=r.toString();if(/^\s/.test(e.innerHTML))wb=' ';if(/\s+$/.test(e.innerHTML))wa=' ';s.getInner=true;return t.isCollapsed()?'':wb+t.serializer.serialize(e,s)+wa;},setContent:function(h,s){var t=this,r=t.getRng(),d=t.win.document;s=s||{format:'html'};s.set=true;h=t.dom.processHTML(h);if(r.insertNode){if(tinymce.isGecko&&h.indexOf('<')==-1){r.deleteContents();r.insertNode(t.getRng().createContextualFragment(h+'<span id="__caret">_</span>'));t.select(t.dom.get('__caret'));t.getRng().deleteContents();return;}try{if(d.queryCommandEnabled('InsertHTML'))return d.execCommand('InsertHTML',false,h);}catch(ex){r.deleteContents();r.insertNode(t.getRng().createContextualFragment(h));}}else{if(r.item){d.execCommand('Delete',false,null);r=t.getRng();}r.pasteHTML(h);}},getStart:function(){var t=this,r=t.getRng(),e;if(isIE){if(r.item)return r.item(0);r=r.duplicate();r.collapse(1);e=r.parentElement();if(e&&e.nodeName=='BODY')return e.firstChild;return e;}else{e=r.startContainer;if(e.nodeName=='BODY')return e.firstChild;return t.dom.getParent(e,function(n){return n.nodeType==1;});}},getEnd:function(){var t=this,r=t.getRng(),e;if(isIE){if(r.item)return r.item(0);r=r.duplicate();r.collapse(0);e=r.parentElement();if(e&&e.nodeName=='BODY')return e.lastChild;return e;}else{e=r.endContainer;if(e.nodeName=='BODY')return e.lastChild;return t.dom.getParent(e,function(n){return n.nodeType==1;});}},getBookmark:function(si){var t=this,r=t.getRng(),tr,sx,sy,vp=t.dom.getViewPort(t.win),e,sp,bp,le,c=-0xFFFFFF,s,ro=t.dom.getRoot(),wb=0,wa=0,nv;sx=vp.x;sy=vp.y;if(si=='simple')return{rng:r,scrollX:sx,scrollY:sy};if(isIE){if(r.item){e=r.item(0);each(t.dom.select(e.nodeName),function(n,i){if(e==n){sp=i;return false;}});return{tag:e.nodeName,index:sp,scrollX:sx,scrollY:sy};}tr=t.dom.doc.body.createTextRange();tr.moveToElementText(ro);tr.collapse(true);bp=Math.abs(tr.move('character',c));tr=r.duplicate();tr.collapse(true);sp=Math.abs(tr.move('character',c));tr=r.duplicate();tr.collapse(false);le=Math.abs(tr.move('character',c))-sp;return{start:sp-bp,length:le,scrollX:sx,scrollY:sy};}e=t.getNode();s=t.getSel();if(!s)return null;if(e&&e.nodeName=='IMG'){return{scrollX:sx,scrollY:sy};}function getPos(r,sn,en){var w=t.dom.doc.createTreeWalker(r,NodeFilter.SHOW_TEXT,null,false),n,p=0,d={};while((n=w.nextNode())!=null){if(n==sn)d.start=p;if(n==en){d.end=p;return d;}p+=trimNl(n.nodeValue||'').length;}return null;};if(s.anchorNode==s.focusNode&&s.anchorOffset==s.focusOffset){e=getPos(ro,s.anchorNode,s.focusNode);if(!e)return{scrollX:sx,scrollY:sy};trimNl(s.anchorNode.nodeValue||'').replace(/^\s+/,function(a){wb=a.length;});return{start:Math.max(e.start+s.anchorOffset-wb,0),end:Math.max(e.end+s.focusOffset-wb,0),scrollX:sx,scrollY:sy,beg:s.anchorOffset-wb==0};}else{e=getPos(ro,r.startContainer,r.endContainer);if(!e)return{scrollX:sx,scrollY:sy};return{start:Math.max(e.start+r.startOffset-wb,0),end:Math.max(e.end+r.endOffset-wa,0),scrollX:sx,scrollY:sy,beg:r.startOffset-wb==0};}},moveToBookmark:function(b){var t=this,r=t.getRng(),s=t.getSel(),ro=t.dom.getRoot(),sd,nvl,nv;function getPos(r,sp,ep){var w=t.dom.doc.createTreeWalker(r,NodeFilter.SHOW_TEXT,null,false),n,p=0,d={},o,v,wa,wb;while((n=w.nextNode())!=null){wa=wb=0;nv=n.nodeValue||'';nvl=trimNl(nv).length;p+=nvl;if(p>=sp&&!d.startNode){o=sp-(p-nvl);if(b.beg&&o>=nvl)continue;d.startNode=n;d.startOffset=o+wb;}if(p>=ep){d.endNode=n;d.endOffset=ep-(p-nvl)+wb;return d;}}return null;};if(!b)return false;t.win.scrollTo(b.scrollX,b.scrollY);if(isIE){if(r=b.rng){try{r.select();}catch(ex){}return true;}t.win.focus();if(b.tag){r=ro.createControlRange();each(t.dom.select(b.tag),function(n,i){if(i==b.index)r.addElement(n);});}else{try{if(b.start<0)return true;r=s.createRange();r.moveToElementText(ro);r.collapse(true);r.moveStart('character',b.start);r.moveEnd('character',b.length);}catch(ex2){return true;}}try{r.select();}catch(ex){}return true;}if(!s)return false;if(b.rng){s.removeAllRanges();s.addRange(b.rng);}else{if(is(b.start)&&is(b.end)){try{sd=getPos(ro,b.start,b.end);if(sd){r=t.dom.doc.createRange();r.setStart(sd.startNode,sd.startOffset);r.setEnd(sd.endNode,sd.endOffset);s.removeAllRanges();s.addRange(r);}if(!tinymce.isOpera)t.win.focus();}catch(ex){}}}},select:function(n,c){var t=this,r=t.getRng(),s=t.getSel(),b,fn,ln,d=t.win.document;function first(n){return n?d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false).nextNode():null;};function last(n){var c,o,w;if(!n)return null;w=d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false);while(c=w.nextNode())o=c;return o;};if(isIE){try{b=d.body;if(/^(IMG|TABLE)$/.test(n.nodeName)){r=b.createControlRange();r.addElement(n);}else{r=b.createTextRange();r.moveToElementText(n);}r.select();}catch(ex){}}else{if(c){fn=first(n);ln=last(n);if(fn&&ln){r=d.createRange();r.setStart(fn,0);r.setEnd(ln,ln.nodeValue.length);}else r.selectNode(n);}else r.selectNode(n);t.setRng(r);}return n;},isCollapsed:function(){var t=this,r=t.getRng(),s=t.getSel();if(!r||r.item)return false;return!s||r.boundingWidth==0||s.isCollapsed;},collapse:function(b){var t=this,r=t.getRng(),n;if(r.item){n=r.item(0);r=this.win.document.body.createTextRange();r.moveToElementText(n);}r.collapse(!!b);t.setRng(r);},getSel:function(){var t=this,w=this.win;return w.getSelection?w.getSelection():w.document.selection;},getRng:function(){var t=this,s=t.getSel(),r;try{if(s)r=s.rangeCount>0?s.getRangeAt(0):(s.createRange?s.createRange():t.win.document.createRange());}catch(ex){}if(!r)r=isIE?t.win.document.body.createTextRange():t.win.document.createRange();return r;},setRng:function(r){var s;if(!isIE){s=this.getSel();if(s){s.removeAllRanges();s.addRange(r);}}else{try{r.select();}catch(ex){}}},setNode:function(n){var t=this;t.setContent(t.dom.getOuterHTML(n));return n;},getNode:function(){var t=this,r=t.getRng(),s=t.getSel(),e;if(!isIE){if(!r)return t.dom.getRoot();e=r.commonAncestorContainer;if(!r.collapsed){if(r.startContainer==r.endContainer||(tinymce.isWebKit&&r.startContainer==r.endContainer.parentNode)){if(r.startOffset-r.endOffset<2||tinymce.isWebKit){if(r.startContainer.hasChildNodes())e=r.startContainer.childNodes[r.startOffset];}}}return t.dom.getParent(e,function(n){return n.nodeType==1;});}return r.item?r.item(0):r.parentElement();},destroy:function(s){var t=this;t.win=null;if(!s)tinymce.removeUnload(t.destroy);}});})();(function(){tinymce.create('tinymce.dom.XMLWriter',{node:null,XMLWriter:function(s){function getXML(){var i=document.implementation;if(!i||!i.createDocument){try{return new ActiveXObject('MSXML2.DOMDocument');}catch(ex){}try{return new ActiveXObject('Microsoft.XmlDom');}catch(ex){}}else return i.createDocument('','',null);};this.doc=getXML();this.valid=tinymce.isOpera||tinymce.isWebKit;this.reset();},reset:function(){var t=this,d=t.doc;if(d.firstChild)d.removeChild(d.firstChild);t.node=d.appendChild(d.createElement("html"));},writeStartElement:function(n){var t=this;t.node=t.node.appendChild(t.doc.createElement(n));},writeAttribute:function(n,v){if(this.valid)v=v.replace(/>/g,'%MCGT%');this.node.setAttribute(n,v);},writeEndElement:function(){this.node=this.node.parentNode;},writeFullEndElement:function(){var t=this,n=t.node;n.appendChild(t.doc.createTextNode(""));t.node=n.parentNode;},writeText:function(v){if(this.valid)v=v.replace(/>/g,'%MCGT%');this.node.appendChild(this.doc.createTextNode(v));},writeCDATA:function(v){this.node.appendChild(this.doc.createCDATA(v));},writeComment:function(v){this.node.appendChild(this.doc.createComment(v.replace(/\-\-/g,' ')));},getContent:function(){var h;h=this.doc.xml||new XMLSerializer().serializeToString(this.doc);h=h.replace(/<\?[^?]+\?>|<html>|<\/html>|<html\/>|<!DOCTYPE[^>]+>/g,'');h=h.replace(/ ?\/>/g,' />');if(this.valid)h=h.replace(/\%MCGT%/g,'>');return h;}});})();(function(){tinymce.create('tinymce.dom.StringWriter',{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(s){this.settings=tinymce.extend({indent_char:' ',indentation:1},s);this.reset();},reset:function(){this.indent='';this.str="";this.tags=[];this.count=0;},writeStartElement:function(n){this._writeAttributesEnd();this.writeRaw('<'+n);this.tags.push(n);this.inAttr=true;this.count++;this.elementCount=this.count;},writeAttribute:function(n,v){var t=this;t.writeRaw(" "+t.encode(n)+'="'+t.encode(v)+'"');},writeEndElement:function(){var n;if(this.tags.length>0){n=this.tags.pop();if(this._writeAttributesEnd(1))this.writeRaw('</'+n+'>');if(this.settings.indentation>0)this.writeRaw('\n');}},writeFullEndElement:function(){if(this.tags.length>0){this._writeAttributesEnd();this.writeRaw('</'+this.tags.pop()+'>');if(this.settings.indentation>0)this.writeRaw('\n');}},writeText:function(v){this._writeAttributesEnd();this.writeRaw(this.encode(v));this.count++;},writeCDATA:function(v){this._writeAttributesEnd();this.writeRaw('<![CDATA['+v+']]>');this.count++;},writeComment:function(v){this._writeAttributesEnd();this.writeRaw('<!-- '+v+'-->');this.count++;},writeRaw:function(v){this.str+=v;},encode:function(s){return s.replace(/[<>&"]/g,function(v){switch(v){case'<':return'<';case'>':return'>';case'&':return'&';case'"':return'"';}return v;});},getContent:function(){return this.str;},_writeAttributesEnd:function(s){if(!this.inAttr)return;this.inAttr=false;if(s&&this.elementCount==this.count){this.writeRaw(' />');return false;}this.writeRaw('>');return true;}});})();(function(){var extend=tinymce.extend,each=tinymce.each,Dispatcher=tinymce.util.Dispatcher,isIE=tinymce.isIE,isGecko=tinymce.isGecko;function getIEAtts(n){var o=[];if(n.nodeName=='OBJECT')return n.attributes;n.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(a,b){o.push({specified:1,nodeName:b});});return o;};function wildcardToRE(s){return s.replace(/([?+*])/g,'.$1');};tinymce.create('tinymce.dom.Serializer',{Serializer:function(s){var t=this;t.key=0;t.onPreProcess=new Dispatcher(t);t.onPostProcess=new Dispatcher(t);if(tinymce.relaxedDomain&&tinymce.isGecko){t.writer=new tinymce.dom.StringWriter();}else{try{t.writer=new tinymce.dom.XMLWriter();}catch(ex){t.writer=new tinymce.dom.StringWriter();}}t.settings=s=extend({dom:tinymce.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(mce_|_moz_)/,closed:/(br|hr|input|meta|img|link|param)/,entity_encoding:'named',entities:'160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro',valid_elements:'*[*]',extended_valid_elements:0,valid_child_elements:0,invalid_elements:0,fix_table_elements:0,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,font_size_style_values:0,apply_source_formatting:0,indent_mode:'simple',indent_char:'\t',indent_levels:1,remove_linebreaks:1},s);t.dom=s.dom;if(s.fix_list_elements){t.onPreProcess.add(function(se,o){var nl,x,a=['ol','ul'],i,n,p,r=/^(OL|UL)$/,np;function prevNode(e,n){var a=n.split(','),i;while((e=e.previousSibling)!=null){for(i=0;i<a.length;i++){if(e.nodeName==a[i])return e;}}return null;};for(x=0;x<a.length;x++){nl=t.dom.select(a[x],o.node);for(i=0;i<nl.length;i++){n=nl[i];p=n.parentNode;if(r.test(p.nodeName)){np=prevNode(n,'LI');if(!np){np=t.dom.create('li');np.innerHTML=' ';np.appendChild(n);p.insertBefore(np,p.firstChild);}else np.appendChild(n);}}}});}if(s.fix_table_elements){t.onPreProcess.add(function(se,o){each(t.dom.select('table',o.node),function(e){var pa=t.dom.getParent(e,'H1,H2,H3,H4,H5,H6,P'),pa2,n,tm,pl=[],i,ns;if(pa){pa2=pa.cloneNode(false);pl.push(e);for(n=e;n=n.parentNode;){pl.push(n);if(n==pa)break;}tm=pa2;for(i=pl.length-1;i>=0;i--){if(i==pl.length-1){while(ns=pl[i-1].nextSibling)tm.appendChild(ns.parentNode.removeChild(ns));}else{n=pl[i].cloneNode(false);if(i!=0){while(ns=pl[i-1].nextSibling)n.appendChild(ns.parentNode.removeChild(ns));}tm=tm.appendChild(n);}}e=t.dom.insertAfter(e.parentNode.removeChild(e),pa);t.dom.insertAfter(e,pa);t.dom.insertAfter(pa2,e);}});});}},setEntities:function(s){var t=this,a,i,l={},re='',v;if(t.entityLookup)return;a=s.split(',');for(i=0;i<a.length;i+=2){v=a[i];if(v==34||v==38||v==60||v==62)continue;l[String.fromCharCode(a[i])]=a[i+1];v=parseInt(a[i]).toString(16);re+='\\u'+'0000'.substring(v.length)+v;}if(!re){t.settings.entity_encoding='raw';return;}t.entitiesRE=new RegExp('['+re+']','g');t.entityLookup=l;},setValidChildRules:function(s){this.childRules=null;this.addValidChildRules(s);},addValidChildRules:function(s){var t=this,inst,intr,bloc;if(!s)return;inst='A|BR|SPAN|BDO|MAP|OBJECT|IMG|TT|I|B|BIG|SMALL|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|#text|#comment';intr='A|BR|SPAN|BDO|OBJECT|APPLET|IMG|MAP|IFRAME|TT|I|B|U|S|STRIKE|BIG|SMALL|FONT|BASEFONT|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|INPUT|SELECT|TEXTAREA|LABEL|BUTTON|#text|#comment';bloc='H[1-6]|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|FORM|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP';each(s.split(','),function(s){var p=s.split(/\[|\]/),re;s='';each(p[1].split('|'),function(v){if(s)s+='|';switch(v){case'%itrans':v=intr;break;case'%itrans_na':v=intr.substring(2);break;case'%istrict':v=inst;break;case'%istrict_na':v=inst.substring(2);break;case'%btrans':v=bloc;break;case'%bstrict':v=bloc;break;}s+=v;});re=new RegExp('^('+s.toLowerCase()+')$','i');each(p[0].split('/'),function(s){t.childRules=t.childRules||{};t.childRules[s]=re;});});s='';each(t.childRules,function(v,k){if(s)s+='|';s+=k;});t.parentElementsRE=new RegExp('^('+s.toLowerCase()+')$','i');},setRules:function(s){var t=this;t._setup();t.rules={};t.wildRules=[];t.validElements={};return t.addRules(s);},addRules:function(s){var t=this,dr;if(!s)return;t._setup();each(s.split(','),function(s){var p=s.split(/\[|\]/),tn=p[0].split('/'),ra,at,wat,va=[];if(dr)at=tinymce.extend([],dr.attribs);if(p.length>1){each(p[1].split('|'),function(s){var ar={},i;at=at||[];s=s.replace(/::/g,'~');s=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(s);s[2]=s[2].replace(/~/g,':');if(s[1]=='!'){ra=ra||[];ra.push(s[2]);}if(s[1]=='-'){for(i=0;i<at.length;i++){if(at[i].name==s[2]){at.splice(i,1);return;}}}switch(s[3]){case'=':ar.defaultVal=s[4]||'';break;case':':ar.forcedVal=s[4];break;case'<':ar.validVals=s[4].split('?');break;}if(/[*.?]/.test(s[2])){wat=wat||[];ar.nameRE=new RegExp('^'+wildcardToRE(s[2])+'$');wat.push(ar);}else{ar.name=s[2];at.push(ar);}va.push(s[2]);});}each(tn,function(s,i){var pr=s.charAt(0),x=1,ru={};if(dr){if(dr.noEmpty)ru.noEmpty=dr.noEmpty;if(dr.fullEnd)ru.fullEnd=dr.fullEnd;if(dr.padd)ru.padd=dr.padd;}switch(pr){case'-':ru.noEmpty=true;break;case'+':ru.fullEnd=true;break;case'#':ru.padd=true;break;default:x=0;}tn[i]=s=s.substring(x);t.validElements[s]=1;if(/[*.?]/.test(tn[0])){ru.nameRE=new RegExp('^'+wildcardToRE(tn[0])+'$');t.wildRules=t.wildRules||{};t.wildRules.push(ru);}else{ru.name=tn[0];if(tn[0]=='@')dr=ru;t.rules[s]=ru;}ru.attribs=at;if(ra)ru.requiredAttribs=ra;if(wat){s='';each(va,function(v){if(s)s+='|';s+='('+wildcardToRE(v)+')';});ru.validAttribsRE=new RegExp('^'+s.toLowerCase()+'$');ru.wildAttribs=wat;}});});s='';each(t.validElements,function(v,k){if(s)s+='|';if(k!='@')s+=k;});t.validElementsRE=new RegExp('^('+wildcardToRE(s.toLowerCase())+')$');},findRule:function(n){var t=this,rl=t.rules,i,r;t._setup();r=rl[n];if(r)return r;rl=t.wildRules;for(i=0;i<rl.length;i++){if(rl[i].nameRE.test(n))return rl[i];}return null;},findAttribRule:function(ru,n){var i,wa=ru.wildAttribs;for(i=0;i<wa.length;i++){if(wa[i].nameRE.test(n))return wa[i];}return null;},serialize:function(n,o){var h,t=this;t._setup();o=o||{};o.format=o.format||'html';t.processObj=o;n=n.cloneNode(true);t.key=''+(parseInt(t.key)+1);if(!o.no_events){o.node=n;t.onPreProcess.dispatch(t,o);}t.writer.reset();t._serializeNode(n,o.getInner);o.content=t.writer.getContent();if(!o.no_events)t.onPostProcess.dispatch(t,o);t._postProcess(o);o.node=null;return tinymce.trim(o.content);},_postProcess:function(o){var t=this,s=t.settings,h=o.content,sc=[],p;if(o.format=='html'){p=t._protect({content:h,patterns:[{pattern:/(<script[^>]*>)(.*?)(<\/script>)/g},{pattern:/(<style[^>]*>)(.*?)(<\/style>)/g},{pattern:/(<pre[^>]*>)(.*?)(<\/pre>)/g,encode:1}]});h=p.content;if(s.entity_encoding!=='raw')h=t._encode(h);if(!o.set){h=h.replace(/<p>\s+<\/p>|<p([^>]+)>\s+<\/p>/g,s.entity_encoding=='numeric'?'<p$1> </p>':'<p$1> </p>');if(s.remove_linebreaks){h=h.replace(/\r?\n|\r/g,' ');h=h.replace(/(<[^>]+>)\s+/g,'$1 ');h=h.replace(/\s+(<\/[^>]+>)/g,' $1');h=h.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object) ([^>]+)>\s+/g,'<$1 $2>');h=h.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>\s+/g,'<$1>');h=h.replace(/\s+<\/(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>/g,'</$1>');}if(s.apply_source_formatting&&s.indent_mode=='simple'){h=h.replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,'\n<$1$2$3>\n');h=h.replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,'\n<$1$2>');h=h.replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,'</$1>\n');h=h.replace(/\n\n/g,'\n');}}h=t._unprotect(h,p);if(s.entity_encoding=='raw')h=h.replace(/<p> <\/p>|<p([^>]+)> <\/p>/g,'<p$1>\u00a0</p>');}o.content=h;},_serializeNode:function(n,inn){var t=this,s=t.settings,w=t.writer,hc,el,cn,i,l,a,at,no,v,nn,ru,ar,iv;if(!s.node_filter||s.node_filter(n)){switch(n.nodeType){case 1:if(n.hasAttribute?n.hasAttribute('mce_bogus'):n.getAttribute('mce_bogus'))return;iv=false;hc=n.hasChildNodes();nn=n.getAttribute('mce_name')||n.nodeName.toLowerCase();if(isIE){if(n.scopeName!=='HTML'&&n.scopeName!=='html')nn=n.scopeName+':'+nn;}if(nn.indexOf('mce:')===0)nn=nn.substring(4);if(!t.validElementsRE.test(nn)||(t.invalidElementsRE&&t.invalidElementsRE.test(nn))||inn){iv=true;break;}if(isIE){if(s.fix_content_duplication){if(n.mce_serialized==t.key)return;n.mce_serialized=t.key;}if(nn.charAt(0)=='/')nn=nn.substring(1);}else if(isGecko){if(n.nodeName==='BR'&&n.getAttribute('type')=='_moz')return;}if(t.childRules){if(t.parentElementsRE.test(t.elementName)){if(!t.childRules[t.elementName].test(nn)){iv=true;break;}}t.elementName=nn;}ru=t.findRule(nn);nn=ru.name||nn;if((!hc&&ru.noEmpty)||(isIE&&!nn)){iv=true;break;}if(ru.requiredAttribs){a=ru.requiredAttribs;for(i=a.length-1;i>=0;i--){if(this.dom.getAttrib(n,a[i])!=='')break;}if(i==-1){iv=true;break;}}w.writeStartElement(nn);if(ru.attribs){for(i=0,at=ru.attribs,l=at.length;i<l;i++){a=at[i];v=t._getAttrib(n,a);if(v!==null)w.writeAttribute(a.name,v);}}if(ru.validAttribsRE){at=isIE?getIEAtts(n):n.attributes;for(i=at.length-1;i>-1;i--){no=at[i];if(no.specified){a=no.nodeName.toLowerCase();if(s.invalid_attrs.test(a)||!ru.validAttribsRE.test(a))continue;ar=t.findAttribRule(ru,a);v=t._getAttrib(n,ar,a);if(v!==null)w.writeAttribute(a,v);}}}if(!hc&&ru.padd)w.writeText('\u00a0');break;case 3:if(t.childRules&&t.parentElementsRE.test(t.elementName)){if(!t.childRules[t.elementName].test(n.nodeName))return;}return w.writeText(n.nodeValue);case 4:return w.writeCDATA(n.nodeValue);case 8:return w.writeComment(n.nodeValue);}}else if(n.nodeType==1)hc=n.hasChildNodes();if(hc){cn=n.firstChild;while(cn){t._serializeNode(cn);t.elementName=nn;cn=cn.nextSibling;}}if(!iv){if(hc||!s.closed.test(nn))w.writeFullEndElement();else w.writeEndElement();}},_protect:function(o){var t=this;o.items=o.items||[];function enc(s){return s.replace(/[\r\n\\]/g,function(c){if(c==='\n')return'\\n';else if(c==='\\')return'\\\\';return'\\r';});};function dec(s){return s.replace(/\\[\\rn]/g,function(c){if(c==='\\n')return'\n';else if(c==='\\\\')return'\\';return'\r';});};each(o.patterns,function(p){o.content=dec(enc(o.content).replace(p.pattern,function(x,a,b,c){b=dec(b);if(p.encode)b=t._encode(b);o.items.push(b);return a+'<!--mce:'+(o.items.length-1)+'-->'+c;}));});return o;},_unprotect:function(h,o){h=h.replace(/\<!--mce:([0-9]+)--\>/g,function(a,b){return o.items[parseInt(b)];});o.items=[];return h;},_encode:function(h){var t=this,s=t.settings,l;if(s.entity_encoding!=='raw'){if(s.entity_encoding.indexOf('named')!=-1){t.setEntities(s.entities);l=t.entityLookup;h=h.replace(t.entitiesRE,function(a){var v;if(v=l[a])a='&'+v+';';return a;});}if(s.entity_encoding.indexOf('numeric')!=-1){h=h.replace(/[\u007E-\uFFFF]/g,function(a){return'&#'+a.charCodeAt(0)+';';});}}return h;},_setup:function(){var t=this,s=this.settings;if(t.done)return;t.done=1;t.setRules(s.valid_elements);t.addRules(s.extended_valid_elements);t.addValidChildRules(s.valid_child_elements);if(s.invalid_elements)t.invalidElementsRE=new RegExp('^('+wildcardToRE(s.invalid_elements.replace(/,/g,'|').toLowerCase())+')$');if(s.attrib_value_filter)t.attribValueFilter=s.attribValueFilter;},_getAttrib:function(n,a,na){var i,v;na=na||a.name;if(a.forcedVal&&(v=a.forcedVal)){if(v==='{$uid}')return this.dom.uniqueId();return v;}v=this.dom.getAttrib(n,na);switch(na){case'rowspan':case'colspan':if(v=='1')v='';break;}if(this.attribValueFilter)v=this.attribValueFilter(na,v,n);if(a.validVals){for(i=a.validVals.length-1;i>=0;i--){if(v==a.validVals[i])break;}if(i==-1)return null;}if(v===''&&typeof(a.defaultVal)!='undefined'){v=a.defaultVal;if(v==='{$uid}')return this.dom.uniqueId();return v;}else{if(na=='class'&&this.processObj.get)v=v.replace(/\s?mceItem\w+\s?/g,'');}if(v==='')return null;return v;}});})();(function(){var each=tinymce.each;tinymce.create('tinymce.dom.ScriptLoader',{ScriptLoader:function(s){this.settings=s||{};this.queue=[];this.lookup={};},isDone:function(u){return this.lookup[u]?this.lookup[u].state==2:0;},markDone:function(u){this.lookup[u]={state:2,url:u};},add:function(u,cb,s,pr){var t=this,lo=t.lookup,o;if(o=lo[u]){if(cb&&o.state==2)cb.call(s||this);return o;}o={state:0,url:u,func:cb,scope:s||this};if(pr)t.queue.unshift(o);else t.queue.push(o);lo[u]=o;return o;},load:function(u,cb,s){var t=this,o;if(o=t.lookup[u]){if(cb&&o.state==2)cb.call(s||t);return o;}function loadScript(u){if(tinymce.dom.Event.domLoaded||t.settings.strict_mode){tinymce.util.XHR.send({url:tinymce._addVer(u),error:t.settings.error,async:false,success:function(co){t.eval(co);}});}else document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"></script>');};if(!tinymce.is(u,'string')){each(u,function(u){loadScript(u);});if(cb)cb.call(s||t);}else{loadScript(u);if(cb)cb.call(s||t);}},loadQueue:function(cb,s){var t=this;if(!t.queueLoading){t.queueLoading=1;t.queueCallbacks=[];t.loadScripts(t.queue,function(){t.queueLoading=0;if(cb)cb.call(s||t);each(t.queueCallbacks,function(o){o.func.call(o.scope);});});}else if(cb)t.queueCallbacks.push({func:cb,scope:s||t});},eval:function(co){var w=window;if(!w.execScript){try{eval.call(w,co);}catch(ex){eval(co,w);}}else w.execScript(co);},loadScripts:function(sc,cb,s){var t=this,lo=t.lookup;function done(o){o.state=2;if(o.func)o.func.call(o.scope||t);};function allDone(){var l;l=sc.length;each(sc,function(o){o=lo[o.url];if(o.state===2){done(o);l--;}else load(o);});if(l===0&&cb){cb.call(s||t);cb=0;}};function load(o){if(o.state>0)return;o.state=1;tinymce.util.XHR.send({url:o.url,error:t.settings.error,success:function(co){t.eval(co);done(o);allDone();}});};each(sc,function(o){var u=o.url;if(!lo[u]){lo[u]=o;t.queue.push(o);}else o=lo[u];if(o.state>0)return;if(!tinymce.dom.Event.domLoaded&&!t.settings.strict_mode){var ix,ol='';if(cb||o.func){o.state=1;ix=tinymce.dom.ScriptLoader._addOnLoad(function(){done(o);allDone();});if(tinymce.isIE)ol=' onreadystatechange="';else ol=' onload="';ol+='tinymce.dom.ScriptLoader._onLoad(this,\''+u+'\','+ix+');"';}document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"'+ol+'></script>');if(!o.func)done(o);}else load(o);});allDone();},'static':{_addOnLoad:function(f){var t=this;t._funcs=t._funcs||[];t._funcs.push(f);return t._funcs.length-1;},_onLoad:function(e,u,ix){if(!tinymce.isIE||e.readyState=='complete')this._funcs[ix].call(this);}}});tinymce.ScriptLoader=new tinymce.dom.ScriptLoader();})();(function(){var DOM=tinymce.DOM,is=tinymce.is;tinymce.create('tinymce.ui.Control',{Control:function(id,s){this.id=id;this.settings=s=s||{};this.rendered=false;this.onRender=new tinymce.util.Dispatcher(this);this.classPrefix='';this.scope=s.scope||this;this.disabled=0;this.active=0;},setDisabled:function(s){var e;if(s!=this.disabled){e=DOM.get(this.id);if(e&&this.settings.unavailable_prefix){if(s){this.prevTitle=e.title;e.title=this.settings.unavailable_prefix+": "+e.title;}else e.title=this.prevTitle;}this.setState('Disabled',s);this.setState('Enabled',!s);this.disabled=s;}},isDisabled:function(){return this.disabled;},setActive:function(s){if(s!=this.active){this.setState('Active',s);this.active=s;}},isActive:function(){return this.active;},setState:function(c,s){var n=DOM.get(this.id);c=this.classPrefix+c;if(s)DOM.addClass(n,c);else DOM.removeClass(n,c);},isRendered:function(){return this.rendered;},renderHTML:function(){},renderTo:function(n){DOM.setHTML(n,this.renderHTML());},postRender:function(){var t=this,b;if(is(t.disabled)){b=t.disabled;t.disabled=-1;t.setDisabled(b);}if(is(t.active)){b=t.active;t.active=-1;t.setActive(b);}},remove:function(){DOM.remove(this.id);this.destroy();},destroy:function(){tinymce.dom.Event.clear(this.id);}});})();tinymce.create('tinymce.ui.Container:tinymce.ui.Control',{Container:function(id,s){this.parent(id,s);this.controls=[];this.lookup={};},add:function(c){this.lookup[c.id]=c;this.controls.push(c);return c;},get:function(n){return this.lookup[n];}});tinymce.create('tinymce.ui.Separator:tinymce.ui.Control',{Separator:function(id,s){this.parent(id,s);this.classPrefix='mceSeparator';},renderHTML:function(){return tinymce.DOM.createHTML('span',{'class':this.classPrefix});}});(function(){var is=tinymce.is,DOM=tinymce.DOM,each=tinymce.each,walk=tinymce.walk;tinymce.create('tinymce.ui.MenuItem:tinymce.ui.Control',{MenuItem:function(id,s){this.parent(id,s);this.classPrefix='mceMenuItem';},setSelected:function(s){this.setState('Selected',s);this.selected=s;},isSelected:function(){return this.selected;},postRender:function(){var t=this;t.parent();if(is(t.selected))t.setSelected(t.selected);}});})();(function(){var is=tinymce.is,DOM=tinymce.DOM,each=tinymce.each,walk=tinymce.walk;tinymce.create('tinymce.ui.Menu:tinymce.ui.MenuItem',{Menu:function(id,s){var t=this;t.parent(id,s);t.items={};t.collapsed=false;t.menuCount=0;t.onAddItem=new tinymce.util.Dispatcher(this);},expand:function(d){var t=this;if(d){walk(t,function(o){if(o.expand)o.expand();},'items',t);}t.collapsed=false;},collapse:function(d){var t=this;if(d){walk(t,function(o){if(o.collapse)o.collapse();},'items',t);}t.collapsed=true;},isCollapsed:function(){return this.collapsed;},add:function(o){if(!o.settings)o=new tinymce.ui.MenuItem(o.id||DOM.uniqueId(),o);this.onAddItem.dispatch(this,o);return this.items[o.id]=o;},addSeparator:function(){return this.add({separator:true});},addMenu:function(o){if(!o.collapse)o=this.createMenu(o);this.menuCount++;return this.add(o);},hasMenus:function(){return this.menuCount!==0;},remove:function(o){delete this.items[o.id];},removeAll:function(){var t=this;walk(t,function(o){if(o.removeAll)o.removeAll();else o.remove();o.destroy();},'items',t);t.items={};},createMenu:function(o){var m=new tinymce.ui.Menu(o.id||DOM.uniqueId(),o);m.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return m;}});})();(function(){var is=tinymce.is,DOM=tinymce.DOM,each=tinymce.each,Event=tinymce.dom.Event,Element=tinymce.dom.Element;tinymce.create('tinymce.ui.DropMenu:tinymce.ui.Menu',{DropMenu:function(id,s){s=s||{};s.container=s.container||DOM.doc.body;s.offset_x=s.offset_x||0;s.offset_y=s.offset_y||0;s.vp_offset_x=s.vp_offset_x||0;s.vp_offset_y=s.vp_offset_y||0;if(is(s.icons)&&!s.icons)s['class']+=' mceNoIcons';this.parent(id,s);this.onShowMenu=new tinymce.util.Dispatcher(this);this.onHideMenu=new tinymce.util.Dispatcher(this);this.classPrefix='mceMenu';},createMenu:function(s){var t=this,cs=t.settings,m;s.container=s.container||cs.container;s.parent=t;s.constrain=s.constrain||cs.constrain;s['class']=s['class']||cs['class'];s.vp_offset_x=s.vp_offset_x||cs.vp_offset_x;s.vp_offset_y=s.vp_offset_y||cs.vp_offset_y;m=new tinymce.ui.DropMenu(s.id||DOM.uniqueId(),s);m.onAddItem.add(t.onAddItem.dispatch,t.onAddItem);return m;},update:function(){var t=this,s=t.settings,tb=DOM.get('menu_'+t.id+'_tbl'),co=DOM.get('menu_'+t.id+'_co'),tw,th;tw=s.max_width?Math.min(tb.clientWidth,s.max_width):tb.clientWidth;th=s.max_height?Math.min(tb.clientHeight,s.max_height):tb.clientHeight;if(!DOM.boxModel)t.element.setStyles({width:tw+2,height:th+2});else t.element.setStyles({width:tw,height:th});if(s.max_width)DOM.setStyle(co,'width',tw);if(s.max_height){DOM.setStyle(co,'height',th);if(tb.clientHeight<s.max_height)DOM.setStyle(co,'overflow','hidden');}},showMenu:function(x,y,px){var t=this,s=t.settings,co,vp=DOM.getViewPort(),w,h,mx,my,ot=2,dm,tb,cp=t.classPrefix;t.collapse(1);if(t.isMenuVisible)return;if(!t.rendered){co=DOM.add(t.settings.container,t.renderNode());each(t.items,function(o){o.postRender();});t.element=new Element('menu_'+t.id,{blocker:1,container:s.container});}else co=DOM.get('menu_'+t.id);if(!tinymce.isOpera)DOM.setStyles(co,{left:-0xFFFF,top:-0xFFFF});DOM.show(co);t.update();x+=s.offset_x||0;y+=s.offset_y||0;vp.w-=4;vp.h-=4;if(s.constrain){w=co.clientWidth-ot;h=co.clientHeight-ot;mx=vp.x+vp.w;my=vp.y+vp.h;if((x+s.vp_offset_x+w)>mx)x=px?px-w:Math.max(0,(mx-s.vp_offset_x)-w);if((y+s.vp_offset_y+h)>my)y=Math.max(0,(my-s.vp_offset_y)-h);}DOM.setStyles(co,{left:x,top:y});t.element.update();t.isMenuVisible=1;t.mouseClickFunc=Event.add(co,'click',function(e){var m;e=e.target;if(e&&(e=DOM.getParent(e,'TR'))&&!DOM.hasClass(e,cp+'ItemSub')){m=t.items[e.id];if(m.isDisabled())return;dm=t;while(dm){if(dm.hideMenu)dm.hideMenu();dm=dm.settings.parent;}if(m.settings.onclick)m.settings.onclick(e);return Event.cancel(e);}});if(t.hasMenus()){t.mouseOverFunc=Event.add(co,'mouseover',function(e){var m,r,mi;e=e.target;if(e&&(e=DOM.getParent(e,'TR'))){m=t.items[e.id];if(t.lastMenu)t.lastMenu.collapse(1);if(m.isDisabled())return;if(e&&DOM.hasClass(e,cp+'ItemSub')){r=DOM.getRect(e);m.showMenu((r.x+r.w-ot),r.y-ot,r.x);t.lastMenu=m;DOM.addClass(DOM.get(m.id).firstChild,cp+'ItemActive');}}});}t.onShowMenu.dispatch(t);if(s.keyboard_focus){Event.add(co,'keydown',t._keyHandler,t);DOM.select('a','menu_'+t.id)[0].focus();t._focusIdx=0;}},hideMenu:function(c){var t=this,co=DOM.get('menu_'+t.id),e;if(!t.isMenuVisible)return;Event.remove(co,'mouseover',t.mouseOverFunc);Event.remove(co,'click',t.mouseClickFunc);Event.remove(co,'keydown',t._keyHandler);DOM.hide(co);t.isMenuVisible=0;if(!c)t.collapse(1);if(t.element)t.element.hide();if(e=DOM.get(t.id))DOM.removeClass(e.firstChild,t.classPrefix+'ItemActive');t.onHideMenu.dispatch(t);},add:function(o){var t=this,co;o=t.parent(o);if(t.isRendered&&(co=DOM.get('menu_'+t.id)))t._add(DOM.select('tbody',co)[0],o);return o;},collapse:function(d){this.parent(d);this.hideMenu(1);},remove:function(o){DOM.remove(o.id);this.destroy();return this.parent(o);},destroy:function(){var t=this,co=DOM.get('menu_'+t.id);Event.remove(co,'mouseover',t.mouseOverFunc);Event.remove(co,'click',t.mouseClickFunc);if(t.element)t.element.remove();DOM.remove(co);},renderNode:function(){var t=this,s=t.settings,n,tb,co,w;w=DOM.create('div',{id:'menu_'+t.id,'class':s['class'],'style':'position:absolute;left:0;top:0;z-index:200000'});co=DOM.add(w,'div',{id:'menu_'+t.id+'_co','class':t.classPrefix+(s['class']?' '+s['class']:'')});t.element=new Element('menu_'+t.id,{blocker:1,container:s.container});if(s.menu_line)DOM.add(co,'span',{'class':t.classPrefix+'Line'});n=DOM.add(co,'table',{id:'menu_'+t.id+'_tbl',border:0,cellPadding:0,cellSpacing:0});tb=DOM.add(n,'tbody');each(t.items,function(o){t._add(tb,o);});t.rendered=true;return w;},_keyHandler:function(e){var t=this,kc=e.keyCode;function focus(d){var i=t._focusIdx+d,e=DOM.select('a','menu_'+t.id)[i];if(e){t._focusIdx=i;e.focus();}};switch(kc){case 38:focus(-1);return;case 40:focus(1);return;case 13:return;case 27:return this.hideMenu();}},_add:function(tb,o){var n,s=o.settings,a,ro,it,cp=this.classPrefix;if(s.separator){ro=DOM.add(tb,'tr',{id:o.id,'class':cp+'ItemSeparator'});DOM.add(ro,'td',{'class':cp+'ItemSeparator'});if(n=ro.previousSibling)DOM.addClass(n,'mceLast');return;}n=ro=DOM.add(tb,'tr',{id:o.id,'class':cp+'Item '+cp+'ItemEnabled'});n=it=DOM.add(n,'td');n=a=DOM.add(n,'a',{href:'javascript:;',onclick:"return false;",onmousedown:'return false;'});DOM.addClass(it,s['class']);DOM.add(n,'span',{'class':'mceIcon'+(s.icon?' mce_'+s.icon:'')});n=DOM.add(n,s.element||'span',{'class':'mceText',title:o.settings.title},o.settings.title);if(o.settings.style)DOM.setAttrib(n,'style',o.settings.style);if(tb.childNodes.length==1)DOM.addClass(ro,'mceFirst');if((n=ro.previousSibling)&&DOM.hasClass(n,cp+'ItemSeparator'))DOM.addClass(ro,'mceFirst');if(o.collapse)DOM.addClass(ro,cp+'ItemSub');if(n=ro.previousSibling)DOM.removeClass(n,'mceLast');DOM.addClass(ro,'mceLast');}});})();(function(){var DOM=tinymce.DOM;tinymce.create('tinymce.ui.Button:tinymce.ui.Control',{Button:function(id,s){this.parent(id,s);this.classPrefix='mceButton';},renderHTML:function(){var cp=this.classPrefix,s=this.settings,h,l;l=DOM.encode(s.label||'');h='<a id="'+this.id+'" href="javascript:;" class="'+cp+' '+cp+'Enabled '+s['class']+(l?' '+cp+'Labeled':'')+'" onmousedown="return false;" onclick="return false;" title="'+DOM.encode(s.title)+'">';if(s.image)h+='<img class="mceIcon" src="'+s.image+'" />'+l+'</a>';else h+='<span class="mceIcon '+s['class']+'"></span>'+(l?'<span class="'+cp+'Label">'+l+'</span>':'')+'</a>';return h;},postRender:function(){var t=this,s=t.settings;tinymce.dom.Event.add(t.id,'click',function(e){if(!t.isDisabled())return s.onclick.call(s.scope,e);});}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,Dispatcher=tinymce.util.Dispatcher;tinymce.create('tinymce.ui.ListBox:tinymce.ui.Control',{ListBox:function(id,s){var t=this;t.parent(id,s);t.items=[];t.onChange=new Dispatcher(t);t.onPostRender=new Dispatcher(t);t.onAdd=new Dispatcher(t);t.onRenderMenu=new tinymce.util.Dispatcher(this);t.classPrefix='mceListBox';},select:function(v){var t=this,e,fv;if(v!=t.selectedValue){e=DOM.get(t.id+'_text');t.selectedValue=v;each(t.items,function(o){if(o.value==v){DOM.setHTML(e,DOM.encode(o.title));fv=1;return false;}});if(!fv){DOM.setHTML(e,DOM.encode(t.settings.title));DOM.addClass(e,'mceTitle');e=0;return;}else DOM.removeClass(e,'mceTitle');}e=0;},add:function(n,v,o){var t=this;o=o||{};o=tinymce.extend(o,{title:n,value:v});t.items.push(o);t.onAdd.dispatch(t,o);},getLength:function(){return this.items.length;},renderHTML:function(){var h='',t=this,s=t.settings,cp=t.classPrefix;h='<table id="'+t.id+'" cellpadding="0" cellspacing="0" class="'+cp+' '+cp+'Enabled'+(s['class']?(' '+s['class']):'')+'"><tbody><tr>';h+='<td>'+DOM.createHTML('a',{id:t.id+'_text',href:'javascript:;','class':'mceText',onclick:"return false;",onmousedown:'return false;'},DOM.encode(t.settings.title))+'</td>';h+='<td>'+DOM.createHTML('a',{id:t.id+'_open',tabindex:-1,href:'javascript:;','class':'mceOpen',onclick:"return false;",onmousedown:'return false;'},'<span></span>')+'</td>';h+='</tr></tbody></table>';return h;},showMenu:function(){var t=this,p1,p2,e=DOM.get(this.id),m;if(t.isDisabled()||t.items.length==0)return;if(t.menu&&t.menu.isMenuVisible)return t.hideMenu();if(!t.isMenuRendered){t.renderMenu();t.isMenuRendered=true;}p1=DOM.getPos(this.settings.menu_container);p2=DOM.getPos(e);m=t.menu;m.settings.offset_x=p2.x;m.settings.offset_y=p2.y;m.settings.keyboard_focus=!tinymce.isOpera;if(t.oldID)m.items[t.oldID].setSelected(0);each(t.items,function(o){if(o.value===t.selectedValue){m.items[o.id].setSelected(1);t.oldID=o.id;}});m.showMenu(0,e.clientHeight);Event.add(DOM.doc,'mousedown',t.hideMenu,t);DOM.addClass(t.id,t.classPrefix+'Selected');},hideMenu:function(e){var t=this;if(e&&e.type=="mousedown"&&(e.target.id==t.id+'_text'||e.target.id==t.id+'_open'))return;if(!e||!DOM.getParent(e.target,function(n){return DOM.hasClass(n,'mceMenu');})){DOM.removeClass(t.id,t.classPrefix+'Selected');Event.remove(DOM.doc,'mousedown',t.hideMenu,t);if(t.menu)t.menu.hideMenu();}},renderMenu:function(){var t=this,m;m=t.settings.control_manager.createDropMenu(t.id+'_menu',{menu_line:1,'class':t.classPrefix+'Menu mceNoIcons',max_width:150,max_height:150});m.onHideMenu.add(t.hideMenu,t);m.add({title:t.settings.title,'class':'mceMenuItemTitle',onclick:function(){if(t.settings.onselect('')!==false)t.select('');}});each(t.items,function(o){o.id=DOM.uniqueId();o.onclick=function(){if(t.settings.onselect(o.value)!==false)t.select(o.value);};m.add(o);});t.onRenderMenu.dispatch(t,m);t.menu=m;},postRender:function(){var t=this,cp=t.classPrefix;Event.add(t.id,'click',t.showMenu,t);Event.add(t.id+'_text','focus',function(e){if(!t._focused){t.keyDownHandler=Event.add(t.id+'_text','keydown',function(e){var idx=-1,v,kc=e.keyCode;each(t.items,function(v,i){if(t.selectedValue==v.value)idx=i;});if(kc==38)v=t.items[idx-1];else if(kc==40)v=t.items[idx+1];else if(kc==13){v=t.selectedValue;t.selectedValue=null;t.settings.onselect(v);return Event.cancel(e);}if(v){t.hideMenu();t.select(v.value);}});}t._focused=1;});Event.add(t.id+'_text','blur',function(){Event.remove(t.id+'_text','keydown',t.keyDownHandler);t._focused=0;});if(tinymce.isIE6||!DOM.boxModel){Event.add(t.id,'mouseover',function(){if(!DOM.hasClass(t.id,cp+'Disabled'))DOM.addClass(t.id,cp+'Hover');});Event.add(t.id,'mouseout',function(){if(!DOM.hasClass(t.id,cp+'Disabled'))DOM.removeClass(t.id,cp+'Hover');});}t.onPostRender.dispatch(t,DOM.get(t.id));},destroy:function(){this.parent();Event.clear(this.id+'_text');}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,Dispatcher=tinymce.util.Dispatcher;tinymce.create('tinymce.ui.NativeListBox:tinymce.ui.ListBox',{NativeListBox:function(id,s){this.parent(id,s);this.classPrefix='mceNativeListBox';},setDisabled:function(s){DOM.get(this.id).disabled=s;},isDisabled:function(){return DOM.get(this.id).disabled;},select:function(v){var e=DOM.get(this.id),ol=e.options;v=''+(v||'');e.selectedIndex=0;each(ol,function(o,i){if(o.value==v){e.selectedIndex=i;return false;}});},add:function(n,v,a){var o,t=this;a=a||{};a.value=v;if(t.isRendered())DOM.add(DOM.get(this.id),'option',a,n);o={title:n,value:v,attribs:a};t.items.push(o);t.onAdd.dispatch(t,o);},getLength:function(){return DOM.get(this.id).options.length-1;},renderHTML:function(){var h,t=this;h=DOM.createHTML('option',{value:''},'-- '+t.settings.title+' --');each(t.items,function(it){h+=DOM.createHTML('option',{value:it.value},it.title);});h=DOM.createHTML('select',{id:t.id,'class':'mceNativeListBox'},h);return h;},postRender:function(){var t=this,ch;t.rendered=true;function onChange(e){var v=e.target.options[e.target.selectedIndex].value;t.onChange.dispatch(t,v);if(t.settings.onselect)t.settings.onselect(v);};Event.add(t.id,'change',onChange);Event.add(t.id,'keydown',function(e){var bf;Event.remove(t.id,'change',ch);bf=Event.add(t.id,'blur',function(){Event.add(t.id,'change',onChange);Event.remove(t.id,'blur',bf);});if(e.keyCode==13||e.keyCode==32){onChange(e);return Event.cancel(e);}});t.onPostRender.dispatch(t,DOM.get(t.id));}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each;tinymce.create('tinymce.ui.MenuButton:tinymce.ui.Button',{MenuButton:function(id,s){this.parent(id,s);this.onRenderMenu=new tinymce.util.Dispatcher(this);s.menu_container=s.menu_container||DOM.doc.body;},showMenu:function(){var t=this,p1,p2,e=DOM.get(t.id),m;if(t.isDisabled())return;if(!t.isMenuRendered){t.renderMenu();t.isMenuRendered=true;}if(t.isMenuVisible)return t.hideMenu();p1=DOM.getPos(t.settings.menu_container);p2=DOM.getPos(e);m=t.menu;m.settings.offset_x=p2.x;m.settings.offset_y=p2.y;m.settings.vp_offset_x=p2.x;m.settings.vp_offset_y=p2.y;m.settings.keyboard_focus=t._focused;m.showMenu(0,e.clientHeight);Event.add(DOM.doc,'mousedown',t.hideMenu,t);t.setState('Selected',1);t.isMenuVisible=1;},renderMenu:function(){var t=this,m;m=t.settings.control_manager.createDropMenu(t.id+'_menu',{menu_line:1,'class':this.classPrefix+'Menu',icons:t.settings.icons});m.onHideMenu.add(t.hideMenu,t);t.onRenderMenu.dispatch(t,m);t.menu=m;},hideMenu:function(e){var t=this;if(e&&e.type=="mousedown"&&DOM.getParent(e.target,function(e){return e.id===t.id||e.id===t.id+'_open';}))return;if(!e||!DOM.getParent(e.target,function(n){return DOM.hasClass(n,'mceMenu');})){t.setState('Selected',0);Event.remove(DOM.doc,'mousedown',t.hideMenu,t);if(t.menu)t.menu.hideMenu();}t.isMenuVisible=0;},postRender:function(){var t=this,s=t.settings;Event.add(t.id,'click',function(){if(!t.isDisabled()){if(s.onclick)s.onclick(t.value);t.showMenu();}});}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each;tinymce.create('tinymce.ui.SplitButton:tinymce.ui.MenuButton',{SplitButton:function(id,s){this.parent(id,s);this.classPrefix='mceSplitButton';},renderHTML:function(){var h,t=this,s=t.settings,h1;h='<tbody><tr>';if(s.image)h1=DOM.createHTML('img ',{src:s.image,'class':'mceAction '+s['class']});else h1=DOM.createHTML('span',{'class':'mceAction '+s['class']},'');h+='<td>'+DOM.createHTML('a',{id:t.id+'_action',href:'javascript:;','class':'mceAction '+s['class'],onclick:"return false;",onmousedown:'return false;',title:s.title},h1)+'</td>';h1=DOM.createHTML('span',{'class':'mceOpen '+s['class']});h+='<td>'+DOM.createHTML('a',{id:t.id+'_open',href:'javascript:;','class':'mceOpen '+s['class'],onclick:"return false;",onmousedown:'return false;',title:s.title},h1)+'</td>';h+='</tr></tbody>';return DOM.createHTML('table',{id:t.id,'class':'mceSplitButton mceSplitButtonEnabled '+s['class'],cellpadding:'0',cellspacing:'0',onmousedown:'return false;',title:s.title},h);},postRender:function(){var t=this,s=t.settings;if(s.onclick){Event.add(t.id+'_action','click',function(){if(!t.isDisabled())s.onclick(t.value);});}Event.add(t.id+'_open','click',t.showMenu,t);Event.add(t.id+'_open','focus',function(){t._focused=1;});Event.add(t.id+'_open','blur',function(){t._focused=0;});if(tinymce.isIE6||!DOM.boxModel){Event.add(t.id,'mouseover',function(){if(!DOM.hasClass(t.id,'mceSplitButtonDisabled'))DOM.addClass(t.id,'mceSplitButtonHover');});Event.add(t.id,'mouseout',function(){if(!DOM.hasClass(t.id,'mceSplitButtonDisabled'))DOM.removeClass(t.id,'mceSplitButtonHover');});}},destroy:function(){this.parent();Event.clear(this.id+'_action');Event.clear(this.id+'_open');}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,is=tinymce.is,each=tinymce.each;tinymce.create('tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton',{ColorSplitButton:function(id,s){var t=this;t.parent(id,s);t.settings=s=tinymce.extend({colors:'000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF',grid_width:8,default_color:'#888888'},t.settings);t.onShowMenu=new tinymce.util.Dispatcher(t);t.onHideMenu=new tinymce.util.Dispatcher(t);t.value=s.default_color;},showMenu:function(){var t=this,r,p,e,p2;if(t.isDisabled())return;if(!t.isMenuRendered){t.renderMenu();t.isMenuRendered=true;}if(t.isMenuVisible)return t.hideMenu();e=DOM.get(t.id);DOM.show(t.id+'_menu');DOM.addClass(e,'mceSplitButtonSelected');p2=DOM.getPos(e);DOM.setStyles(t.id+'_menu',{left:p2.x,top:p2.y+e.clientHeight,zIndex:200000});e=0;Event.add(DOM.doc,'mousedown',t.hideMenu,t);if(t._focused){t._keyHandler=Event.add(t.id+'_menu','keydown',function(e){if(e.keyCode==27)t.hideMenu();});DOM.select('a',t.id+'_menu')[0].focus();}t.onShowMenu.dispatch(t);t.isMenuVisible=1;},hideMenu:function(e){var t=this;if(e&&e.type=="mousedown"&&DOM.getParent(e.target,function(e){return e.id===t.id+'_open';}))return;if(!e||!DOM.getParent(e.target,function(n){return DOM.hasClass(n,'mceSplitButtonMenu');})){DOM.removeClass(t.id,'mceSplitButtonSelected');Event.remove(DOM.doc,'mousedown',t.hideMenu,t);Event.remove(t.id+'_menu','keydown',t._keyHandler);DOM.hide(t.id+'_menu');}t.onHideMenu.dispatch(t);t.isMenuVisible=0;},renderMenu:function(){var t=this,m,i=0,s=t.settings,n,tb,tr,w;w=DOM.add(s.menu_container,'div',{id:t.id+'_menu','class':s['menu_class']+' '+s['class'],style:'position:absolute;left:0;top:-1000px;'});m=DOM.add(w,'div',{'class':s['class']+' mceSplitButtonMenu'});DOM.add(m,'span',{'class':'mceMenuLine'});n=DOM.add(m,'table',{'class':'mceColorSplitMenu'});tb=DOM.add(n,'tbody');i=0;each(is(s.colors,'array')?s.colors:s.colors.split(','),function(c){c=c.replace(/^#/,'');if(!i--){tr=DOM.add(tb,'tr');i=s.grid_width-1;}n=DOM.add(tr,'td');n=DOM.add(n,'a',{href:'javascript:;',style:{backgroundColor:'#'+c},mce_color:'#'+c});});if(s.more_colors_func){n=DOM.add(tb,'tr');n=DOM.add(n,'td',{colspan:s.grid_width,'class':'mceMoreColors'});n=DOM.add(n,'a',{id:t.id+'_more',href:'javascript:;',onclick:'return false;','class':'mceMoreColors'},s.more_colors_title);Event.add(n,'click',function(e){s.more_colors_func.call(s.more_colors_scope||this);return Event.cancel(e);});}DOM.addClass(m,'mceColorSplitMenu');Event.add(t.id+'_menu','click',function(e){var c;e=e.target;if(e.nodeName=='A'&&(c=e.getAttribute('mce_color')))t.setColor(c);return Event.cancel(e);});return w;},setColor:function(c){var t=this;DOM.setStyle(t.id+'_preview','backgroundColor',c);t.value=c;t.hideMenu();t.settings.onselect(c);},postRender:function(){var t=this,id=t.id;t.parent();DOM.add(id+'_action','div',{id:id+'_preview','class':'mceColorPreview'});},destroy:function(){this.parent();Event.clear(this.id+'_menu');Event.clear(this.id+'_more');DOM.remove(this.id+'_menu');}});})();tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container',{renderHTML:function(){var t=this,h='',c,co,dom=tinymce.DOM,s=t.settings,i,pr,nx,cl;cl=t.controls;for(i=0;i<cl.length;i++){co=cl[i];pr=cl[i-1];nx=cl[i+1];if(i===0){c='mceToolbarStart';if(co.Button)c+=' mceToolbarStartButton';else if(co.SplitButton)c+=' mceToolbarStartSplitButton';else if(co.ListBox)c+=' mceToolbarStartListBox';h+=dom.createHTML('td',{'class':c},dom.createHTML('span',null,'<!-- IE -->'));}if(pr&&co.ListBox){if(pr.Button||pr.SplitButton)h+=dom.createHTML('td',{'class':'mceToolbarEnd'},dom.createHTML('span',null,'<!-- IE -->'));}if(dom.stdMode)h+='<td style="position: relative">'+co.renderHTML()+'</td>';else h+='<td>'+co.renderHTML()+'</td>';if(nx&&co.ListBox){if(nx.Button||nx.SplitButton)h+=dom.createHTML('td',{'class':'mceToolbarStart'},dom.createHTML('span',null,'<!-- IE -->'));}}c='mceToolbarEnd';if(co.Button)c+=' mceToolbarEndButton';else if(co.SplitButton)c+=' mceToolbarEndSplitButton';else if(co.ListBox)c+=' mceToolbarEndListBox';h+=dom.createHTML('td',{'class':c},dom.createHTML('span',null,'<!-- IE -->'));return dom.createHTML('table',{id:t.id,'class':'mceToolbar'+(s['class']?' '+s['class']:''),cellpadding:'0',cellspacing:'0',align:t.settings.align||''},'<tbody><tr>'+h+'</tr></tbody>');}});(function(){var Dispatcher=tinymce.util.Dispatcher,each=tinymce.each;tinymce.create('tinymce.AddOnManager',{items:[],urls:{},lookup:{},onAdd:new Dispatcher(this),get:function(n){return this.lookup[n];},requireLangPack:function(n){var u,s;if(tinymce.EditorManager.settings){u=this.urls[n]+'/langs/'+tinymce.EditorManager.settings.language+'.js';s=tinymce.EditorManager.settings;if(s){if(!tinymce.dom.Event.domLoaded&&!s.strict_mode)tinymce.ScriptLoader.load(u);else tinymce.ScriptLoader.add(u);}}},add:function(id,o){this.items.push(o);this.lookup[id]=o;this.onAdd.dispatch(this,id,o);return o;},load:function(n,u,cb,s){var t=this;if(t.urls[n])return;if(u.indexOf('/')!=0&&u.indexOf('://')==-1)u=tinymce.baseURL+'/'+u;t.urls[n]=u.substring(0,u.lastIndexOf('/'));tinymce.ScriptLoader.add(u,cb,s);}});tinymce.PluginManager=new tinymce.AddOnManager();tinymce.ThemeManager=new tinymce.AddOnManager();}());(function(){var each=tinymce.each,extend=tinymce.extend,DOM=tinymce.DOM,Event=tinymce.dom.Event,ThemeManager=tinymce.ThemeManager,PluginManager=tinymce.PluginManager,explode=tinymce.explode;tinymce.create('static tinymce.EditorManager',{editors:{},i18n:{},activeEditor:null,preInit:function(){var t=this,lo=window.location;tinymce.documentBaseURL=lo.href.replace(/[\?#].*$/,'').replace(/[\/\\][^\/]+$/,'');if(!/[\/\\]$/.test(tinymce.documentBaseURL))tinymce.documentBaseURL+='/';tinymce.baseURL=new tinymce.util.URI(tinymce.documentBaseURL).toAbsolute(tinymce.baseURL);tinymce.EditorManager.baseURI=new tinymce.util.URI(tinymce.baseURL);if(tinymce.EditorManager.baseURI.host!=lo.hostname&&lo.hostname)document.domain=tinymce.relaxedDomain=lo.hostname.replace(/.*\.(.+\..+)$/,'$1');t.onBeforeUnload=new tinymce.util.Dispatcher(t);Event.add(window,'beforeunload',function(e){t.onBeforeUnload.dispatch(t,e);});},init:function(s){var t=this,pl,sl=tinymce.ScriptLoader,c,e;function execCallback(se,n,s){var f=se[n];if(!f)return;if(tinymce.is(f,'string')){s=f.replace(/\.\w+$/,'');s=s?tinymce.resolve(s):0;f=tinymce.resolve(f);}return f.apply(s||this,Array.prototype.slice.call(arguments,2));};s=extend({theme:"simple",language:"en",strict_loading_mode:document.contentType=='application/xhtml+xml'},s);t.settings=s;if(!Event.domLoaded&&!s.strict_loading_mode){if(s.language)sl.add(tinymce.baseURL+'/langs/'+s.language+'.js');if(s.theme&&s.theme.charAt(0)!='-'&&!ThemeManager.urls[s.theme])ThemeManager.load(s.theme,'themes/'+s.theme+'/editor_template'+tinymce.suffix+'.js');if(s.plugins){pl=explode(s.plugins);if(tinymce.inArray(pl,'compat2x')!=-1)PluginManager.load('compat2x','plugins/compat2x/editor_plugin'+tinymce.suffix+'.js');each(pl,function(v){if(v&&v.charAt(0)!='-'&&!PluginManager.urls[v]){if(!tinymce.isWebKit&&v=='safari')return;PluginManager.load(v,'plugins/'+v+'/editor_plugin'+tinymce.suffix+'.js');}});}sl.loadQueue();}Event.add(document,'init',function(){var l,co;execCallback(s,'onpageload');if(s.browsers){l=false;each(explode(s.browsers),function(v){switch(v){case'ie':case'msie':if(tinymce.isIE)l=true;break;case'gecko':if(tinymce.isGecko)l=true;break;case'safari':case'webkit':if(tinymce.isWebKit)l=true;break;case'opera':if(tinymce.isOpera)l=true;break;}});if(!l)return;}switch(s.mode){case"exact":l=s.elements||'';if(l.length>0){each(explode(l),function(v){if(DOM.get(v))new tinymce.Editor(v,s).render(1);else{c=0;each(document.forms,function(f){each(f.elements,function(e){if(e.name===v){v='mce_editor_'+c;DOM.setAttrib(e,'id',v);new tinymce.Editor(v,s).render(1);}});});}});}break;case"textareas":case"specific_textareas":function hasClass(n,c){return c.constructor===RegExp?c.test(n.className):DOM.hasClass(n,c);};each(DOM.select('textarea'),function(v){if(s.editor_deselector&&hasClass(v,s.editor_deselector))return;if(!s.editor_selector||hasClass(v,s.editor_selector)){e=DOM.get(v.name);if(!v.id&&!e)v.id=v.name;if(!v.id||t.get(v.id))v.id=DOM.uniqueId();new tinymce.Editor(v.id,s).render(1);}});break;}if(s.oninit){l=co=0;each(t.editors,function(ed){co++;if(!ed.initialized){ed.onInit.add(function(){l++;if(l==co)execCallback(s,'oninit');});}else l++;if(l==co)execCallback(s,'oninit');});}});},get:function(id){return this.editors[id];},getInstanceById:function(id){return this.get(id);},add:function(e){this.editors[e.id]=e;this._setActive(e);return e;},remove:function(e){var t=this;if(!t.editors[e.id])return null;delete t.editors[e.id];if(t.activeEditor==e){each(t.editors,function(e){t._setActive(e);return false;});}e.destroy();return e;},execCommand:function(c,u,v){var t=this,ed=t.get(v),w;switch(c){case"mceFocus":ed.focus();return true;case"mceAddEditor":case"mceAddControl":if(!t.get(v))new tinymce.Editor(v,t.settings).render();return true;case"mceAddFrameControl":w=v.window;w.tinyMCE=tinyMCE;w.tinymce=tinymce;tinymce.DOM.doc=w.document;tinymce.DOM.win=w;ed=new tinymce.Editor(v.element_id,v);ed.render();if(tinymce.isIE){function clr(){ed.destroy();w.detachEvent('onunload',clr);w=w.tinyMCE=w.tinymce=null;};w.attachEvent('onunload',clr);}v.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":ed.remove();return true;case'mceToggleEditor':if(!ed){t.execCommand('mceAddControl',0,v);return true;}if(ed.isHidden())ed.show();else ed.hide();return true;}if(t.activeEditor)return t.activeEditor.execCommand(c,u,v);return false;},execInstanceCommand:function(id,c,u,v){var ed=this.get(id);if(ed)return ed.execCommand(c,u,v);return false;},triggerSave:function(){each(this.editors,function(e){e.save();});},addI18n:function(p,o){var lo,i18n=this.i18n;if(!tinymce.is(p,'string')){each(p,function(o,lc){each(o,function(o,g){each(o,function(o,k){if(g==='common')i18n[lc+'.'+k]=o;else i18n[lc+'.'+g+'.'+k]=o;});});});}else{each(o,function(o,k){i18n[p+'.'+k]=o;});}},_setActive:function(e){this.selectedInstance=this.activeEditor=e;}});tinymce.EditorManager.preInit();})();var tinyMCE=window.tinyMCE=tinymce.EditorManager;(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,extend=tinymce.extend,Dispatcher=tinymce.util.Dispatcher;var each=tinymce.each,isGecko=tinymce.isGecko,isIE=tinymce.isIE,isWebKit=tinymce.isWebKit;var is=tinymce.is,ThemeManager=tinymce.ThemeManager,PluginManager=tinymce.PluginManager,EditorManager=tinymce.EditorManager;var inArray=tinymce.inArray,grep=tinymce.grep,explode=tinymce.explode;tinymce.create('tinymce.Editor',{Editor:function(id,s){var t=this;t.id=t.editorId=id;t.execCommands={};t.queryStateCommands={};t.queryValueCommands={};t.plugins={};each(['onPreInit','onBeforeRenderUI','onPostRender','onInit','onRemove','onActivate','onDeactivate','onClick','onEvent','onMouseUp','onMouseDown','onDblClick','onKeyDown','onKeyUp','onKeyPress','onContextMenu','onSubmit','onReset','onPaste','onPreProcess','onPostProcess','onBeforeSetContent','onBeforeGetContent','onSetContent','onGetContent','onLoadContent','onSaveContent','onNodeChange','onChange','onBeforeExecCommand','onExecCommand','onUndo','onRedo','onVisualAid','onSetProgressState'],function(e){t[e]=new Dispatcher(t);});t.settings=s=extend({id:id,language:'en',docs_language:'en',theme:'simple',skin:'default',delta_width:0,delta_height:0,popup_css:'',plugins:'',document_base_url:tinymce.documentBaseURL,add_form_submit_trigger:1,submit_patch:1,add_unload_trigger:1,convert_urls:1,relative_urls:1,remove_script_host:1,table_inline_editing:0,object_resizing:1,cleanup:1,accessibility_focus:1,custom_shortcuts:1,custom_undo_redo_keyboard_shortcuts:1,custom_undo_redo_restore_selection:1,custom_undo_redo:1,doctype:'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',visual_table_class:'mceItemTable',visual:1,inline_styles:true,convert_fonts_to_spans:true,font_size_style_values:'xx-small,x-small,small,medium,large,x-large,xx-large',apply_source_formatting:1,directionality:'ltr',forced_root_block:'p',valid_elements:'@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,#p[align],-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote[cite],-table[border=0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big',hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:'30px'},s);t.documentBaseURI=new tinymce.util.URI(s.document_base_url||tinymce.documentBaseURL,{base_uri:tinyMCE.baseURI});t.baseURI=EditorManager.baseURI;t.execCallback('setup',t);},render:function(nst){var t=this,s=t.settings,id=t.id,sl=tinymce.ScriptLoader;if(!Event.domLoaded){Event.add(document,'init',function(){t.render();});return;}if(!nst){s.strict_loading_mode=1;tinyMCE.settings=s;}if(!t.getElement())return;if(s.strict_loading_mode){sl.settings.strict_mode=s.strict_loading_mode;tinymce.DOM.settings.strict=1;}if(!/TEXTAREA|INPUT/i.test(t.getElement().nodeName)&&s.hidden_input&&DOM.getParent(id,'form'))DOM.insertAfter(DOM.create('input',{type:'hidden',name:id}),id);t.windowManager=new tinymce.WindowManager(t);if(s.encoding=='xml'){t.onGetContent.add(function(ed,o){if(o.save)o.content=DOM.encode(o.content);});}if(s.add_form_submit_trigger){t.onSubmit.addToTop(function(){if(t.initialized){t.save();t.isNotDirty=1;}});}if(s.add_unload_trigger&&!s.ask){t._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(t.initialized&&!t.destroyed&&!t.isHidden())t.save({format:'raw',no_events:true});});}tinymce.addUnload(t.destroy,t);if(s.submit_patch){t.onBeforeRenderUI.add(function(){var n=t.getElement().form;if(!n)return;if(n._mceOldSubmit)return;if(!n.submit.nodeType&&!n.submit.length){t.formElement=n;n._mceOldSubmit=n.submit;n.submit=function(){EditorManager.triggerSave();t.isNotDirty=1;return this._mceOldSubmit(this);};}n=null;});}function loadScripts(){if(s.language)sl.add(tinymce.baseURL+'/langs/'+s.language+'.js');if(s.theme.charAt(0)!='-'&&!ThemeManager.urls[s.theme])ThemeManager.load(s.theme,'themes/'+s.theme+'/editor_template'+tinymce.suffix+'.js');each(explode(s.plugins),function(p){if(p&&p.charAt(0)!='-'&&!PluginManager.urls[p]){if(!isWebKit&&p=='safari')return;PluginManager.load(p,'plugins/'+p+'/editor_plugin'+tinymce.suffix+'.js');}});sl.loadQueue(function(){if(s.ask){function ask(){window.setTimeout(function(){Event.remove(t.id,'focus',ask);t.windowManager.confirm(t.getLang('edit_confirm'),function(s){if(s)t.init();});},0);};Event.add(t.id,'focus',ask);return;}if(!t.removed)t.init();});};if(s.plugins.indexOf('compat2x')!=-1){PluginManager.load('compat2x','plugins/compat2x/editor_plugin'+tinymce.suffix+'.js');sl.loadQueue(loadScripts);}else loadScripts();},init:function(){var n,t=this,s=t.settings,w,h,e=t.getElement(),o,ti,u,bi,bc,re;EditorManager.add(t);s.theme=s.theme.replace(/-/,'');o=ThemeManager.get(s.theme);t.theme=new o();if(t.theme.init&&s.init_theme)t.theme.init(t,ThemeManager.urls[s.theme]||tinymce.documentBaseURL.replace(/\/$/,''));each(explode(s.plugins.replace(/\-/g,'')),function(p){var c=PluginManager.get(p),u=PluginManager.urls[p]||tinymce.documentBaseURL.replace(/\/$/,''),po;if(c){po=new c(t,u);t.plugins[p]=po;if(po.init)po.init(t,u);}});if(s.popup_css)s.popup_css=t.documentBaseURI.toAbsolute(s.popup_css);else s.popup_css=t.baseURI.toAbsolute("themes/"+s.theme+"/skins/"+s.skin+"/dialog.css");if(s.popup_css_add)s.popup_css+=','+t.documentBaseURI.toAbsolute(s.popup_css_add);t.controlManager=new tinymce.ControlManager(t);t.undoManager=new tinymce.UndoManager(t);t.undoManager.onAdd.add(function(um,l){if(!l.initial)return t.onChange.dispatch(t,l,um);});t.undoManager.onUndo.add(function(um,l){return t.onUndo.dispatch(t,l,um);});t.undoManager.onRedo.add(function(um,l){return t.onRedo.dispatch(t,l,um);});if(s.custom_undo_redo){t.onExecCommand.add(function(ed,cmd,ui,val,a){if(cmd!='Undo'&&cmd!='Redo'&&cmd!='mceRepaint'&&(!a||!a.skip_undo))t.undoManager.add();});}t.onExecCommand.add(function(ed,c){if(!/^(FontName|FontSize)$/.test(c))t.nodeChanged();});if(isGecko){function repaint(a,o){if(!o||!o.initial)t.execCommand('mceRepaint');};t.onUndo.add(repaint);t.onRedo.add(repaint);t.onSetContent.add(repaint);}t.onBeforeRenderUI.dispatch(t,t.controlManager);if(s.render_ui){w=s.width||e.style.width||e.offsetWidth;h=s.height||e.style.height||e.offsetHeight;t.orgDisplay=e.style.display;re=/^[0-9\.]+(|px)$/i;if(re.test(''+w))w=Math.max(parseInt(w)+(o.deltaWidth||0),100);if(re.test(''+h))h=Math.max(parseInt(h)+(o.deltaHeight||0),100);o=t.theme.renderUI({targetNode:e,width:w,height:h,deltaWidth:s.delta_width,deltaHeight:s.delta_height});t.editorContainer=o.editorContainer;}DOM.setStyles(o.sizeContainer||o.editorContainer,{width:w,height:h});h=(o.iframeHeight||h)+((h+'').indexOf('%')==-1?(o.deltaHeight||0):'');if(h<100)h=100;t.iframeHTML=s.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml"><base href="'+t.documentBaseURI.getURI()+'" />';t.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';if(tinymce.relaxedDomain)t.iframeHTML+='<script type="text/javascript">document.domain = "'+tinymce.relaxedDomain+'";</script>';bi=s.body_id||'tinymce';if(bi.indexOf('=')!=-1){bi=t.getParam('body_id','','hash');bi=bi[t.id]||bi;}bc=s.body_class||'';if(bc.indexOf('=')!=-1){bc=t.getParam('body_class','','hash');bc=bc[t.id]||'';}t.iframeHTML+='</head><body id="'+bi+'" class="mceContentBody '+bc+'"></body></html>';if(tinymce.relaxedDomain){if(isIE)u='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()';else if(tinymce.isOpera)u='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()';}n=DOM.add(o.iframeContainer,'iframe',{id:t.id+"_ifr",src:u||'javascript:""',frameBorder:'0',style:{width:'100%',height:h}});t.contentAreaContainer=o.iframeContainer;DOM.get(o.editorContainer).style.display=t.orgDisplay;DOM.get(t.id).style.display='none';if(tinymce.isOldWebKit){Event.add(n,'load',t.setupIframe,t);n.src=tinymce.baseURL+'/plugins/safari/blank.htm';}else{if(!isIE||!tinymce.relaxedDomain)t.setupIframe();e=n=o=null;}},setupIframe:function(){var t=this,s=t.settings,e=DOM.get(t.id),d=t.getDoc(),h,b;if(!isIE||!tinymce.relaxedDomain){d.open();d.write(t.iframeHTML);d.close();}if(!isIE){try{d.designMode='On';}catch(ex){}}if(isIE){b=t.getBody();DOM.hide(b);b.contentEditable=true;DOM.show(b);}t.dom=new tinymce.DOM.DOMUtils(t.getDoc(),{keep_values:true,url_converter:t.convertURL,url_converter_scope:t,hex_colors:s.force_hex_style_colors,class_filter:s.class_filter,update_styles:1,fix_ie_paragraphs:1});t.serializer=new tinymce.dom.Serializer({entity_encoding:s.entity_encoding,entities:s.entities,valid_elements:s.verify_html===false?'*[*]':s.valid_elements,extended_valid_elements:s.extended_valid_elements,valid_child_elements:s.valid_child_elements,invalid_elements:s.invalid_elements,fix_table_elements:s.fix_table_elements,fix_list_elements:s.fix_list_elements,fix_content_duplication:s.fix_content_duplication,convert_fonts_to_spans:s.convert_fonts_to_spans,font_size_classes:s.font_size_classes,font_size_style_values:s.font_size_style_values,apply_source_formatting:s.apply_source_formatting,remove_linebreaks:s.remove_linebreaks,dom:t.dom});t.selection=new tinymce.dom.Selection(t.dom,t.getWin(),t.serializer);t.forceBlocks=new tinymce.ForceBlocks(t,{forced_root_block:s.forced_root_block});t.editorCommands=new tinymce.EditorCommands(t);t.serializer.onPreProcess.add(function(se,o){return t.onPreProcess.dispatch(t,o,se);});t.serializer.onPostProcess.add(function(se,o){return t.onPostProcess.dispatch(t,o,se);});t.onPreInit.dispatch(t);if(!s.gecko_spellcheck)t.getBody().spellcheck=0;t._addEvents();t.controlManager.onPostRender.dispatch(t,t.controlManager);t.onPostRender.dispatch(t);if(s.directionality)t.getBody().dir=s.directionality;if(s.nowrap)t.getBody().style.whiteSpace="nowrap";if(s.auto_resize)t.onNodeChange.add(t.resizeToContent,t);if(s.custom_elements){function handleCustom(ed,o){each(explode(s.custom_elements),function(v){var n;if(v.indexOf('~')===0){v=v.substring(1);n='span';}else n='div';o.content=o.content.replace(new RegExp('<('+v+')([^>]*)>','g'),'<'+n+' mce_name="$1"$2>');o.content=o.content.replace(new RegExp('</('+v+')>','g'),'</'+n+'>');});};t.onBeforeSetContent.add(handleCustom);t.onPostProcess.add(function(ed,o){if(o.set)handleCustom(ed,o)});}if(s.handle_node_change_callback){t.onNodeChange.add(function(ed,cm,n){t.execCallback('handle_node_change_callback',t.id,n,-1,-1,true,t.selection.isCollapsed());});}if(s.save_callback){t.onSaveContent.add(function(ed,o){var h=t.execCallback('save_callback',t.id,o.content,t.getBody());if(h)o.content=h;});}if(s.onchange_callback){t.onChange.add(function(ed,l){t.execCallback('onchange_callback',t,l);});}if(s.convert_newlines_to_brs){t.onBeforeSetContent.add(function(ed,o){if(o.initial)o.content=o.content.replace(/\r?\n/g,'<br />');});}if(s.fix_nesting&&isIE){t.onBeforeSetContent.add(function(ed,o){o.content=t._fixNesting(o.content);});}if(s.preformatted){t.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^\s*<pre.*?>/,'');o.content=o.content.replace(/<\/pre>\s*$/,'');if(o.set)o.content='<pre class="mceItemHidden">'+o.content+'</pre>';});}if(s.verify_css_classes){t.serializer.attribValueFilter=function(n,v){var s,cl;if(n=='class'){if(!t.classesRE){cl=t.dom.getClasses();if(cl.length>0){s='';each(cl,function(o){s+=(s?'|':'')+o['class'];});t.classesRE=new RegExp('('+s+')','gi');}}return!t.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(v)||t.classesRE.test(v)?v:'';}return v;};}if(s.convert_fonts_to_spans)t._convertFonts();if(s.inline_styles)t._convertInlineElements();if(s.cleanup_callback){t.onBeforeSetContent.add(function(ed,o){o.content=t.execCallback('cleanup_callback','insert_to_editor',o.content,o);});t.onPreProcess.add(function(ed,o){if(o.set)t.execCallback('cleanup_callback','insert_to_editor_dom',o.node,o);if(o.get)t.execCallback('cleanup_callback','get_from_editor_dom',o.node,o);});t.onPostProcess.add(function(ed,o){if(o.set)o.content=t.execCallback('cleanup_callback','insert_to_editor',o.content,o);if(o.get)o.content=t.execCallback('cleanup_callback','get_from_editor',o.content,o);});}if(s.save_callback){t.onGetContent.add(function(ed,o){if(o.save)o.content=t.execCallback('save_callback',t.id,o.content,t.getBody());});}if(s.handle_event_callback){t.onEvent.add(function(ed,e,o){if(t.execCallback('handle_event_callback',e,ed,o)===false)Event.cancel(e);});}t.onSetContent.add(function(){t.addVisual(t.getBody());});if(s.padd_empty_editor){t.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^(<p>( | |\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,'');});}if(isGecko){try{d.designMode='Off';d.designMode='On';}catch(ex){}}setTimeout(function(){if(t.removed)return;t.load({initial:true,format:(s.cleanup_on_startup?'html':'raw')});t.startContent=t.getContent({format:'raw'});t.undoManager.add({initial:true});t.initialized=true;t.onInit.dispatch(t);t.execCallback('setupcontent_callback',t.id,t.getBody(),t.getDoc());t.execCallback('init_instance_callback',t);t.focus(true);t.nodeChanged({initial:1});if(s.content_css){tinymce.each(explode(s.content_css),function(u){t.dom.loadCSS(t.documentBaseURI.toAbsolute(u));});}if(s.auto_focus){setTimeout(function(){var ed=EditorManager.get(s.auto_focus);ed.selection.select(ed.getBody(),1);ed.selection.collapse(1);ed.getWin().focus();},100);}},1);e=null;},focus:function(sf){var oed,t=this,ce=t.settings.content_editable;if(!sf){if(!ce&&(!isIE||t.selection.getNode().ownerDocument!=t.getDoc()))t.getWin().focus();}if(EditorManager.activeEditor!=t){if((oed=EditorManager.activeEditor)!=null)oed.onDeactivate.dispatch(oed,t);t.onActivate.dispatch(t,oed);}EditorManager._setActive(t);},execCallback:function(n){var t=this,f=t.settings[n],s;if(!f)return;if(t.callbackLookup&&(s=t.callbackLookup[n])){f=s.func;s=s.scope;}if(is(f,'string')){s=f.replace(/\.\w+$/,'');s=s?tinymce.resolve(s):0;f=tinymce.resolve(f);t.callbackLookup=t.callbackLookup||{};t.callbackLookup[n]={func:f,scope:s};}return f.apply(s||t,Array.prototype.slice.call(arguments,1));},translate:function(s){var c=this.settings.language,i18n=EditorManager.i18n;if(!s)return'';return i18n[c+'.'+s]||s.replace(/{\#([^}]+)\}/g,function(a,b){return i18n[c+'.'+b]||'{#'+b+'}';});},getLang:function(n,dv){return EditorManager.i18n[this.settings.language+'.'+n]||(is(dv)?dv:'{#'+n+'}');},getParam:function(n,dv,ty){var tr=tinymce.trim,v=is(this.settings[n])?this.settings[n]:dv,o;if(ty==='hash'){o={};if(is(v,'string')){each(v.indexOf('=')>0?v.split(/[;,](?![^=;,]*(?:[;,]|$))/):v.split(','),function(v){v=v.split('=');if(v.length>1)o[tr(v[0])]=tr(v[1]);else o[tr(v[0])]=tr(v);});}else o=v;return o;}return v;},nodeChanged:function(o){var t=this,s=t.selection,n=s.getNode()||t.getBody();if(t.initialized){t.onNodeChange.dispatch(t,o?o.controlManager||t.controlManager:t.controlManager,isIE&&n.ownerDocument!=t.getDoc()?t.getBody():n,s.isCollapsed(),o);}},addButton:function(n,s){var t=this;t.buttons=t.buttons||{};t.buttons[n]=s;},addCommand:function(n,f,s){this.execCommands[n]={func:f,scope:s||this};},addQueryStateHandler:function(n,f,s){this.queryStateCommands[n]={func:f,scope:s||this};},addQueryValueHandler:function(n,f,s){this.queryValueCommands[n]={func:f,scope:s||this};},addShortcut:function(pa,desc,cmd_func,sc){var t=this,c;if(!t.settings.custom_shortcuts)return false;t.shortcuts=t.shortcuts||{};if(is(cmd_func,'string')){c=cmd_func;cmd_func=function(){t.execCommand(c,false,null);};}if(is(cmd_func,'object')){c=cmd_func;cmd_func=function(){t.execCommand(c[0],c[1],c[2]);};}each(explode(pa),function(pa){var o={func:cmd_func,scope:sc||this,desc:desc,alt:false,ctrl:false,shift:false};each(explode(pa,'+'),function(v){switch(v){case'alt':case'ctrl':case'shift':o[v]=true;break;default:o.charCode=v.charCodeAt(0);o.keyCode=v.toUpperCase().charCodeAt(0);}});t.shortcuts[(o.ctrl?'ctrl':'')+','+(o.alt?'alt':'')+','+(o.shift?'shift':'')+','+o.keyCode]=o;});return true;},execCommand:function(cmd,ui,val,a){var t=this,s=0,o,st;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd)&&(!a||!a.skip_focus))t.focus();o={};t.onBeforeExecCommand.dispatch(t,cmd,ui,val,o);if(o.terminate)return false;if(t.execCallback('execcommand_callback',t.id,t.selection.getNode(),cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}if(o=t.execCommands[cmd]){st=o.func.call(o.scope,ui,val);if(st!==true){t.onExecCommand.dispatch(t,cmd,ui,val,a);return st;}}each(t.plugins,function(p){if(p.execCommand&&p.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);s=1;return false;}});if(s)return true;if(t.theme.execCommand&&t.theme.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}if(t.editorCommands.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}t.getDoc().execCommand(cmd,ui,val);t.onExecCommand.dispatch(t,cmd,ui,val,a);},queryCommandState:function(c){var t=this,o,s;if(t._isHidden())return;if(o=t.queryStateCommands[c]){s=o.func.call(o.scope);if(s!==true)return s;}o=t.editorCommands.queryCommandState(c);if(o!==-1)return o;try{return this.getDoc().queryCommandState(c);}catch(ex){}},queryCommandValue:function(c){var t=this,o,s;if(t._isHidden())return;if(o=t.queryValueCommands[c]){s=o.func.call(o.scope);if(s!==true)return s;}o=t.editorCommands.queryCommandValue(c);if(is(o))return o;try{return this.getDoc().queryCommandValue(c);}catch(ex){}},show:function(){var t=this;DOM.show(t.getContainer());DOM.hide(t.id);t.load();},hide:function(){var t=this,d=t.getDoc();if(isIE&&d)d.execCommand('SelectAll');t.save();DOM.hide(t.getContainer());DOM.setStyle(t.id,'display',t.orgDisplay);},isHidden:function(){return!DOM.isHidden(this.id);},setProgressState:function(b,ti,o){this.onSetProgressState.dispatch(this,b,ti,o);return b;},resizeToContent:function(){var t=this;DOM.setStyle(t.id+"_ifr",'height',t.getBody().scrollHeight);},load:function(o){var t=this,e=t.getElement(),h;o=o||{};o.load=true;h=t.setContent(is(e.value)?e.value:e.innerHTML,o);o.element=e;if(!o.no_events)t.onLoadContent.dispatch(t,o);o.element=e=null;return h;},save:function(o){var t=this,e=t.getElement(),h,f;if(!t.initialized)return;o=o||{};o.save=true;if(!o.no_events){t.undoManager.typing=0;t.undoManager.add();}o.element=e;h=o.content=t.getContent(o);if(!o.no_events)t.onSaveContent.dispatch(t,o);h=o.content;if(!/TEXTAREA|INPUT/i.test(e.nodeName)){e.innerHTML=h;if(f=DOM.getParent(t.id,'form')){each(f.elements,function(e){if(e.name==t.id){e.value=h;return false;}});}}else e.value=h;o.element=e=null;return h;},setContent:function(h,o){var t=this;o=o||{};o.format=o.format||'html';o.set=true;o.content=h;if(!o.no_events)t.onBeforeSetContent.dispatch(t,o);if(!tinymce.isIE&&(h.length===0||/^\s+$/.test(h))){o.content=t.dom.setHTML(t.getBody(),'<br mce_bogus="1" />');o.format='raw';}o.content=t.dom.setHTML(t.getBody(),tinymce.trim(o.content));if(o.format!='raw'&&t.settings.cleanup){o.getInner=true;o.content=t.dom.setHTML(t.getBody(),t.serializer.serialize(t.getBody(),o));}if(!o.no_events)t.onSetContent.dispatch(t,o);return o.content;},getContent:function(o){var t=this,h;o=o||{};o.format=o.format||'html';o.get=true;if(!o.no_events)t.onBeforeGetContent.dispatch(t,o);if(o.format!='raw'&&t.settings.cleanup){o.getInner=true;h=t.serializer.serialize(t.getBody(),o);}else h=t.getBody().innerHTML;h=h.replace(/^\s*|\s*$/g,'');o.content=h;if(!o.no_events)t.onGetContent.dispatch(t,o);return o.content;},isDirty:function(){var t=this;return tinymce.trim(t.startContent)!=tinymce.trim(t.getContent({format:'raw',no_events:1}))&&!t.isNotDirty;},getContainer:function(){var t=this;if(!t.container)t.container=DOM.get(t.editorContainer||t.id+'_parent');return t.container;},getContentAreaContainer:function(){return this.contentAreaContainer;},getElement:function(){return DOM.get(this.settings.content_element||this.id);},getWin:function(){var t=this,e;if(!t.contentWindow){e=DOM.get(t.id+"_ifr");if(e)t.contentWindow=e.contentWindow;}return t.contentWindow;},getDoc:function(){var t=this,w;if(!t.contentDocument){w=t.getWin();if(w)t.contentDocument=w.document;}return t.contentDocument;},getBody:function(){return this.bodyElement||this.getDoc().body;},convertURL:function(u,n,e){var t=this,s=t.settings;if(s.urlconverter_callback)return t.execCallback('urlconverter_callback',u,e,true,n);if(!s.convert_urls||(e&&e.nodeName=='LINK')||u.indexOf('file:')===0)return u;if(s.relative_urls)return t.documentBaseURI.toRelative(u);u=t.documentBaseURI.toAbsolute(u,s.remove_script_host);return u;},addVisual:function(e){var t=this,s=t.settings;e=e||t.getBody();if(!is(t.hasVisual))t.hasVisual=s.visual;each(t.dom.select('table,a',e),function(e){var v;switch(e.nodeName){case'TABLE':v=t.dom.getAttrib(e,'border');if(!v||v=='0'){if(t.hasVisual)t.dom.addClass(e,s.visual_table_class);else t.dom.removeClass(e,s.visual_table_class);}return;case'A':v=t.dom.getAttrib(e,'name');if(v){if(t.hasVisual)t.dom.addClass(e,'mceItemAnchor');else t.dom.removeClass(e,'mceItemAnchor');}return;}});t.onVisualAid.dispatch(t,e,t.hasVisual);},remove:function(){var t=this,e=t.getContainer();t.removed=1;t.hide();t.execCallback('remove_instance_callback',t);t.onRemove.dispatch(t);t.onExecCommand.listeners=[];EditorManager.remove(t);DOM.remove(e);},destroy:function(s){var t=this;if(t.destroyed)return;if(!s){tinymce.removeUnload(t.destroy);tinyMCE.onBeforeUnload.remove(t._beforeUnload);if(t.theme.destroy)t.theme.destroy();t.controlManager.destroy();t.selection.destroy();t.dom.destroy();if(!t.settings.content_editable){Event.clear(t.getWin());Event.clear(t.getDoc());}Event.clear(t.getBody());Event.clear(t.formElement);}if(t.formElement){t.formElement.submit=t.formElement._mceOldSubmit;t.formElement._mceOldSubmit=null;}t.contentAreaContainer=t.formElement=t.container=t.settings.content_element=t.bodyElement=t.contentDocument=t.contentWindow=null;if(t.selection)t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null;t.destroyed=1;},_addEvents:function(){var t=this,i,s=t.settings,lo={mouseup:'onMouseUp',mousedown:'onMouseDown',click:'onClick',keyup:'onKeyUp',keydown:'onKeyDown',keypress:'onKeyPress',submit:'onSubmit',reset:'onReset',contextmenu:'onContextMenu',dblclick:'onDblClick',paste:'onPaste'};function eventHandler(e,o){var ty=e.type;if(t.removed)return;if(t.onEvent.dispatch(t,e,o)!==false){t[lo[e.fakeType||e.type]].dispatch(t,e,o);}};each(lo,function(v,k){switch(k){case'contextmenu':if(tinymce.isOpera){Event.add(t.getBody(),'mousedown',function(e){if(e.ctrlKey){e.fakeType='contextmenu';eventHandler(e);}});}else Event.add(t.getBody(),k,eventHandler);break;case'paste':Event.add(t.getBody(),k,function(e){var tx,h,el,r;if(e.clipboardData)tx=e.clipboardData.getData('text/plain');else if(tinymce.isIE)tx=t.getWin().clipboardData.getData('Text');eventHandler(e,{text:tx,html:h});});break;case'submit':case'reset':Event.add(t.getElement().form||DOM.getParent(t.id,'form'),k,eventHandler);break;default:Event.add(s.content_editable?t.getBody():t.getDoc(),k,eventHandler);}});Event.add(s.content_editable?t.getBody():(isGecko?t.getDoc():t.getWin()),'focus',function(e){t.focus(true);});if(tinymce.isGecko){Event.add(t.getDoc(),'DOMNodeInserted',function(e){var v;e=e.target;if(e.nodeType===1&&e.nodeName==='IMG'&&(v=e.getAttribute('mce_src')))e.src=t.documentBaseURI.toAbsolute(v);});}if(isGecko){function setOpts(){var t=this,d=t.getDoc(),s=t.settings;if(isGecko){if(t._isHidden()){try{if(!s.content_editable)d.designMode='On';}catch(ex){}}try{d.execCommand("styleWithCSS",0,false);}catch(ex){if(!t._isHidden())try{d.execCommand("useCSS",0,true);}catch(ex){}}if(!s.table_inline_editing)try{d.execCommand('enableInlineTableEditing',false,false);}catch(ex){}if(!s.object_resizing)try{d.execCommand('enableObjectResizing',false,false);}catch(ex){}}};t.onBeforeExecCommand.add(setOpts);t.onMouseDown.add(setOpts);}t.onMouseUp.add(t.nodeChanged);t.onClick.add(t.nodeChanged);t.onKeyUp.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45||e.keyCode==46||e.keyCode==8||e.ctrlKey)t.nodeChanged();});t.onReset.add(function(){t.setContent(t.startContent,{format:'raw'});});if(t.getParam('tab_focus')){function tabCancel(ed,e){if(e.keyCode===9)return Event.cancel(e);};function tabHandler(ed,e){var x,i,f,el,v;function find(d){f=DOM.getParent(ed.id,'form');el=f.elements;if(f){each(el,function(e,i){if(e.id==ed.id){x=i;return false;}});if(d>0){for(i=x+1;i<el.length;i++){if(el[i].type!='hidden')return el[i];}}else{for(i=x-1;i>=0;i--){if(el[i].type!='hidden')return el[i];}}}return null;};if(e.keyCode===9){v=explode(ed.getParam('tab_focus'));if(v.length==1){v[1]=v[0];v[0]=':prev';}if(e.shiftKey){if(v[0]==':prev')el=find(-1);else el=DOM.get(v[0]);}else{if(v[1]==':next')el=find(1);else el=DOM.get(v[1]);}if(el){if(ed=EditorManager.get(el.id||el.name))ed.focus();else window.setTimeout(function(){window.focus();el.focus();},10);return Event.cancel(e);}}};t.onKeyUp.add(tabCancel);if(isGecko){t.onKeyPress.add(tabHandler);t.onKeyDown.add(tabCancel);}else t.onKeyDown.add(tabHandler);}if(s.custom_shortcuts){if(s.custom_undo_redo_keyboard_shortcuts){t.addShortcut('ctrl+z',t.getLang('undo_desc'),'Undo');t.addShortcut('ctrl+y',t.getLang('redo_desc'),'Redo');}if(isGecko){t.addShortcut('ctrl+b',t.getLang('bold_desc'),'Bold');t.addShortcut('ctrl+i',t.getLang('italic_desc'),'Italic');t.addShortcut('ctrl+u',t.getLang('underline_desc'),'Underline');}for(i=1;i<=6;i++)t.addShortcut('ctrl+'+i,'',['FormatBlock',false,'<h'+i+'>']);t.addShortcut('ctrl+7','',['FormatBlock',false,'<p>']);t.addShortcut('ctrl+8','',['FormatBlock',false,'<div>']);t.addShortcut('ctrl+9','',['FormatBlock',false,'<address>']);function find(e){var v=null;if(!e.altKey&&!e.ctrlKey&&!e.metaKey)return v;each(t.shortcuts,function(o){if(o.ctrl!=e.ctrlKey&&(!tinymce.isMac||o.ctrl==e.metaKey))return;if(o.alt!=e.altKey)return;if(o.shift!=e.shiftKey)return;if(e.keyCode==o.keyCode||(e.charCode&&e.charCode==o.charCode)){v=o;return false;}});return v;};t.onKeyUp.add(function(ed,e){var o=find(e);if(o)return Event.cancel(e);});t.onKeyPress.add(function(ed,e){var o=find(e);if(o)return Event.cancel(e);});t.onKeyDown.add(function(ed,e){var o=find(e);if(o){o.func.call(o.scope);return Event.cancel(e);}});}if(tinymce.isIE){Event.add(t.getDoc(),'controlselect',function(e){var re=t.resizeInfo,cb;e=e.target;if(e.nodeName!=='IMG')return;if(re)Event.remove(re.node,re.ev,re.cb);if(!t.dom.hasClass(e,'mceItemNoResize')){ev='resizeend';cb=Event.add(e,ev,function(e){var v;e=e.target;if(v=t.dom.getStyle(e,'width')){t.dom.setAttrib(e,'width',v.replace(/[^0-9%]+/g,''));t.dom.setStyle(e,'width','');}if(v=t.dom.getStyle(e,'height')){t.dom.setAttrib(e,'height',v.replace(/[^0-9%]+/g,''));t.dom.setStyle(e,'height','');}});}else{ev='resizestart';cb=Event.add(e,'resizestart',Event.cancel,Event);}re=t.resizeInfo={node:e,ev:ev,cb:cb};});t.onKeyDown.add(function(ed,e){switch(e.keyCode){case 8:if(t.selection.getRng().item){t.selection.getRng().item(0).removeNode();return Event.cancel(e);}}});}if(tinymce.isOpera){t.onClick.add(function(ed,e){Event.prevent(e);});}if(s.custom_undo_redo){function addUndo(){t.undoManager.typing=0;t.undoManager.add();};if(tinymce.isIE){Event.add(t.getWin(),'blur',function(e){var n;if(t.selection){n=t.selection.getNode();if(!t.removed&&n.ownerDocument&&n.ownerDocument!=t.getDoc())addUndo();}});}else{Event.add(t.getDoc(),'blur',function(){if(t.selection&&!t.removed)addUndo();});}t.onMouseDown.add(addUndo);t.onKeyUp.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45||e.ctrlKey){t.undoManager.typing=0;t.undoManager.add();}});t.onKeyDown.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45){if(t.undoManager.typing){t.undoManager.add();t.undoManager.typing=0;}return;}if(!t.undoManager.typing){t.undoManager.add();t.undoManager.typing=1;}});}},_convertInlineElements:function(){var t=this,s=t.settings,dom=t.dom,v,e,na,st,sp;function convert(ed,o){if(!s.inline_styles)return;if(o.get){each(t.dom.select('table,u,strike',o.node),function(n){switch(n.nodeName){case'TABLE':if(v=dom.getAttrib(n,'height')){dom.setStyle(n,'height',v);dom.setAttrib(n,'height','');}break;case'U':case'STRIKE':n.style.textDecoration=n.nodeName=='U'?'underline':'line-through';dom.setAttrib(n,'mce_style','');dom.setAttrib(n,'mce_name','span');break;}});}else if(o.set){each(t.dom.select('table,span',o.node).reverse(),function(n){if(n.nodeName=='TABLE'){if(v=dom.getStyle(n,'height'))dom.setAttrib(n,'height',v.replace(/[^0-9%]+/g,''));}else{if(n.style.textDecoration=='underline')na='u';else if(n.style.textDecoration=='line-through')na='strike';else na='';if(na){n.style.textDecoration='';dom.setAttrib(n,'mce_style','');e=dom.create(na,{style:dom.getAttrib(n,'style')});dom.replace(e,n,1);}}});}};t.onPreProcess.add(convert);if(!s.cleanup_on_startup){t.onSetContent.add(function(ed,o){if(o.initial)convert(t,{node:t.getBody(),set:1});});}},_convertFonts:function(){var t=this,s=t.settings,dom=t.dom,fz,fzn,sl,cl;if(!s.inline_styles)return;fz=[8,10,12,14,18,24,36];fzn=['xx-small','x-small','small','medium','large','x-large','xx-large'];if(sl=s.font_size_style_values)sl=explode(sl);if(cl=s.font_size_classes)cl=explode(cl);function convertToFonts(no){var n,f,nl,x,i,v,st;if(tinymce.isWebKit||!s.inline_styles)return;nl=t.dom.select('span',no);for(x=nl.length-1;x>=0;x--){n=nl[x];f=dom.create('font',{color:dom.toHex(dom.getStyle(n,'color')),face:dom.getStyle(n,'fontFamily'),style:dom.getAttrib(n,'style'),'class':dom.getAttrib(n,'class')});st=f.style;if(st.color||st.fontFamily){st.color=st.fontFamily='';dom.setAttrib(f,'mce_style','');}if(sl){i=inArray(sl,dom.getStyle(n,'fontSize'));if(i!=-1){dom.setAttrib(f,'size',''+(i+1||1));}}else if(cl){i=inArray(cl,dom.getAttrib(n,'class'));v=dom.getStyle(n,'fontSize');if(i==-1&&v.indexOf('pt')>0)i=inArray(fz,parseInt(v));if(i==-1)i=inArray(fzn,v);if(i!=-1){dom.setAttrib(f,'size',''+(i+1||1));f.style.fontSize='';}}if(f.color||f.face||f.size){f.style.fontFamily='';dom.setAttrib(f,'mce_style','');dom.replace(f,n,1);}f=n=null;}};t.onSetContent.add(function(ed,o){convertToFonts(ed.getBody());});t.onPreProcess.add(function(ed,o){var n,sp,nl,x;if(!s.inline_styles)return;if(o.get){nl=t.dom.select('font',o.node);for(x=nl.length-1;x>=0;x--){n=nl[x];sp=dom.create('span',{style:dom.getAttrib(n,'style'),'class':dom.getAttrib(n,'class')});dom.setStyles(sp,{fontFamily:dom.getAttrib(n,'face'),color:dom.getAttrib(n,'color'),backgroundColor:n.style.backgroundColor});if(n.size){if(sl)dom.setStyle(sp,'fontSize',sl[parseInt(n.size)-1]);else dom.setAttrib(sp,'class',cl[parseInt(n.size)-1]);}dom.setAttrib(sp,'mce_style','');dom.replace(sp,n,1);}}});},_isHidden:function(){var s;if(!isGecko)return 0;s=this.selection.getSel();return(!s||!s.rangeCount||s.rangeCount==0);},_fixNesting:function(s){var d=[],i;s=s.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(a,b,c){var e;if(b==='/'){if(!d.length)return'';if(c!==d[d.length-1].tag){for(i=d.length-1;i>=0;i--){if(d[i].tag===c){d[i].close=1;break;}}return'';}else{d.pop();if(d.length&&d[d.length-1].close){a=a+'</'+d[d.length-1].tag+'>';d.pop();}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(c))return a;if(/\/>$/.test(a))return a;d.push({tag:c});}return a;});for(i=d.length-1;i>=0;i--)s+='</'+d[i].tag+'>';return s;}});})();(function(){var each=tinymce.each,isIE=tinymce.isIE,isGecko=tinymce.isGecko,isOpera=tinymce.isOpera,isWebKit=tinymce.isWebKit;tinymce.create('tinymce.EditorCommands',{EditorCommands:function(ed){this.editor=ed;},execCommand:function(cmd,ui,val){var t=this,ed=t.editor,f;switch(cmd){case'Cut':case'Copy':case'Paste':try{ed.getDoc().execCommand(cmd,ui,val);}catch(ex){if(isGecko){ed.windowManager.confirm(ed.getLang('clipboard_msg'),function(s){if(s)window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html','mceExternal');});}else ed.windowManager.alert(ed.getLang('clipboard_no_support'));}return true;case'mceResetDesignMode':case'mceBeginUndoLevel':return true;case'unlink':t.UnLink();return true;case'JustifyLeft':case'JustifyCenter':case'JustifyRight':case'JustifyFull':t.mceJustify(cmd,cmd.substring(7).toLowerCase());return true;case'mceEndUndoLevel':case'mceAddUndoLevel':ed.undoManager.add();return true;default:f=this[cmd];if(f){f.call(this,ui,val);return true;}}return false;},Indent:function(){var ed=this.editor,d=ed.dom,s=ed.selection,e,iv,iu;iv=ed.settings.indentation;iu=/[a-z%]+$/i.exec(iv);iv=parseInt(iv);if(ed.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){each(this._getSelectedBlocks(),function(e){d.setStyle(e,'paddingLeft',(parseInt(e.style.paddingLeft||0)+iv)+iu);});return;}ed.getDoc().execCommand('Indent',false,null);if(isIE){d.getParent(s.getNode(),function(n){if(n.nodeName=='BLOCKQUOTE'){n.dir=n.style.cssText='';}});}},Outdent:function(){var ed=this.editor,d=ed.dom,s=ed.selection,e,v,iv,iu;iv=ed.settings.indentation;iu=/[a-z%]+$/i.exec(iv);iv=parseInt(iv);if(ed.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){each(this._getSelectedBlocks(),function(e){v=Math.max(0,parseInt(e.style.paddingLeft||0)-iv);d.setStyle(e,'paddingLeft',v?v+iu:'');});return;}ed.getDoc().execCommand('Outdent',false,null);},mceSetAttribute:function(u,v){var ed=this.editor,d=ed.dom,e;if(e=d.getParent(ed.selection.getNode(),d.isBlock))d.setAttrib(e,v.name,v.value);},mceSetContent:function(u,v){this.editor.setContent(v);},mceToggleVisualAid:function(){var ed=this.editor;ed.hasVisual=!ed.hasVisual;ed.addVisual();},mceReplaceContent:function(u,v){var s=this.editor.selection;s.setContent(v.replace(/\{\$selection\}/g,s.getContent({format:'text'})));},mceInsertLink:function(u,v){var ed=this.editor,s=ed.selection,e=ed.dom.getParent(s.getNode(),'A');if(tinymce.is(v,'string'))v={href:v};function set(e){each(v,function(v,k){ed.dom.setAttrib(e,k,v);});};if(!e){ed.execCommand('CreateLink',false,'javascript:mctmp(0);');each(ed.dom.select('a'),function(e){if(e.href=='javascript:mctmp(0);')set(e);});}else{if(v.href)set(e);else ed.dom.remove(e,1);}},UnLink:function(){var ed=this.editor,s=ed.selection;if(s.isCollapsed())s.select(s.getNode());ed.getDoc().execCommand('unlink',false,null);s.collapse(0);},FontName:function(u,v){var t=this,ed=t.editor,s=ed.selection,e;if(!v){if(s.isCollapsed())s.select(s.getNode());t.RemoveFormat();}else ed.getDoc().execCommand('FontName',false,v);},FontSize:function(u,v){var ed=this.editor,s=ed.settings,fz=tinymce.explode(s.font_size_style_values),fzc=tinymce.explode(s.font_size_classes),h,bm;each(ed.dom.select('font'),function(e){e.style.fontSize='';});ed.getDoc().execCommand('FontSize',false,v);if(s.inline_styles){each(ed.dom.select('font'),function(e){if(e.parentNode.nodeName=='FONT'&&e.size==e.parentNode.size){if(!bm)bm=ed.selection.getBookmark();ed.dom.remove(e,1);return;}if(v=e.size){if(fzc&&fzc.length>0)ed.dom.setAttrib(e,'class',fzc[parseInt(v)-1]);else ed.dom.setStyle(e,'fontSize',fz[parseInt(v)-1]);}});}ed.selection.moveToBookmark(bm);},queryCommandValue:function(c){var f=this['queryValue'+c];if(f)return f.call(this,c);return false;},queryCommandState:function(cmd){var f;switch(cmd){case'JustifyLeft':case'JustifyCenter':case'JustifyRight':case'JustifyFull':return this.queryStateJustify(cmd,cmd.substring(7).toLowerCase());default:if(f=this['queryState'+cmd])return f.call(this,cmd);}return-1;},_queryState:function(c){try{return this.editor.getDoc().queryCommandState(c);}catch(ex){}},_queryVal:function(c){try{return this.editor.getDoc().queryCommandValue(c);}catch(ex){}},queryValueFontSize:function(){var ed=this.editor,v=0,p;if(isOpera||isWebKit){if(p=ed.dom.getParent(ed.selection.getNode(),'FONT'))v=p.size;return v;}return this._queryVal('FontSize');},queryValueFontName:function(){var ed=this.editor,v=0,p;if(p=ed.dom.getParent(ed.selection.getNode(),'FONT'))v=p.face;if(!v)v=this._queryVal('FontName');return v;},mceJustify:function(c,v){var ed=this.editor,se=ed.selection,n=se.getNode(),nn=n.nodeName,bl,nb,dom=ed.dom,rm;if(ed.settings.inline_styles&&this.queryStateJustify(c,v))rm=1;bl=dom.getParent(n,ed.dom.isBlock);if(nn=='IMG'){if(v=='full')return;if(rm){if(v=='center')dom.setStyle(n.parentNode,'textAlign','');dom.setStyle(n,'float','');this.mceRepaint();return;}if(v=='center'){if(/^(TD|TH)$/.test(bl.nodeName))bl=0;if(!bl||bl.childNodes.length>1){nb=dom.create('p');nb.appendChild(n.cloneNode(false));if(bl)dom.insertAfter(nb,bl);else dom.insertAfter(nb,n);dom.remove(n);n=nb.firstChild;bl=nb;}dom.setStyle(bl,'textAlign',v);dom.setStyle(n,'float','');}else{dom.setStyle(n,'float',v);dom.setStyle(n.parentNode,'textAlign','');}this.mceRepaint();return;}if(ed.settings.inline_styles&&ed.settings.forced_root_block){if(rm)v='';each(this._getSelectedBlocks(dom.getParent(se.getStart(),dom.isBlock),dom.getParent(se.getEnd(),dom.isBlock)),function(e){dom.setAttrib(e,'align','');dom.setStyle(e,'textAlign',v=='full'?'justify':v);});return;}else if(!rm)ed.getDoc().execCommand(c,false,null);if(ed.settings.inline_styles){if(rm){dom.getParent(ed.selection.getNode(),function(n){if(n.style&&n.style.textAlign)dom.setStyle(n,'textAlign','');});return;}each(dom.select('*'),function(n){var v=n.align;if(v){if(v=='full')v='justify';dom.setStyle(n,'textAlign',v);dom.setAttrib(n,'align','');}});}},mceSetCSSClass:function(u,v){this.mceSetStyleInfo(0,{command:'setattrib',name:'class',value:v});},getSelectedElement:function(){var t=this,ed=t.editor,dom=ed.dom,se=ed.selection,r=se.getRng(),r1,r2,sc,ec,so,eo,e,sp,ep,re;if(se.isCollapsed()||r.item)return se.getNode();re=ed.settings.merge_styles_invalid_parents;if(tinymce.is(re,'string'))re=new RegExp(re,'i');if(isIE){r1=r.duplicate();r1.collapse(true);sc=r1.parentElement();r2=r.duplicate();r2.collapse(false);ec=r2.parentElement();if(sc!=ec){r1.move('character',1);sc=r1.parentElement();}if(sc==ec){r1=r.duplicate();r1.moveToElementText(sc);if(r1.compareEndPoints('StartToStart',r)==0&&r1.compareEndPoints('EndToEnd',r)==0)return re&&re.test(sc.nodeName)?null:sc;}}else{function getParent(n){return dom.getParent(n,function(n){return n.nodeType==1;});};sc=r.startContainer;ec=r.endContainer;so=r.startOffset;eo=r.endOffset;if(!r.collapsed){if(sc==ec){if(so-eo<2){if(sc.hasChildNodes()){sp=sc.childNodes[so];return re&&re.test(sp.nodeName)?null:sp;}}}}if(sc.nodeType!=3||ec.nodeType!=3)return null;if(so==0){sp=getParent(sc);if(sp&&sp.firstChild!=sc)sp=null;}if(so==sc.nodeValue.length){e=sc.nextSibling;if(e&&e.nodeType==1)sp=sc.nextSibling;}if(eo==0){e=ec.previousSibling;if(e&&e.nodeType==1)ep=e;}if(eo==ec.nodeValue.length){ep=getParent(ec);if(ep&&ep.lastChild!=ec)ep=null;}if(sp==ep)return re&&sp&&re.test(sp.nodeName)?null:sp;}return null;},InsertHorizontalRule:function(){if(isGecko||isIE)this.editor.selection.setContent('<hr />');else this.editor.getDoc().execCommand('InsertHorizontalRule',false,'');},RemoveFormat:function(){var t=this,ed=t.editor,s=ed.selection,b;if(isWebKit)s.setContent(s.getContent({format:'raw'}).replace(/(<(span|b|i|strong|em|strike) [^>]+>|<(span|b|i|strong|em|strike)>|<\/(span|b|i|strong|em|strike)>|)/g,''),{format:'raw'});else ed.getDoc().execCommand('RemoveFormat',false,null);t.mceSetStyleInfo(0,{command:'removeformat'});ed.addVisual();},mceSetStyleInfo:function(u,v){var t=this,ed=t.editor,d=ed.getDoc(),dom=ed.dom,e,b,s=ed.selection,nn=v.wrapper||'span',b=s.getBookmark(),re;function set(n,e){if(n.nodeType==1){switch(v.command){case'setattrib':return dom.setAttrib(n,v.name,v.value);case'setstyle':return dom.setStyle(n,v.name,v.value);case'removeformat':return dom.setAttrib(n,'class','');}}};re=ed.settings.merge_styles_invalid_parents;if(tinymce.is(re,'string'))re=new RegExp(re,'i');if(e=t.getSelectedElement())set(e,1);else{d.execCommand('FontName',false,'__');each(isWebKit?dom.select('span'):dom.select('font'),function(n){var sp,e;if(dom.getAttrib(n,'face')=='__'||n.style.fontFamily==='__'){sp=dom.create(nn,{mce_new:'1'});set(sp);each(n.childNodes,function(n){sp.appendChild(n.cloneNode(true));});dom.replace(sp,n);}});}each(dom.select(nn).reverse(),function(n){var p=n.parentNode;if(!dom.getAttrib(n,'mce_new')){p=dom.getParent(n,function(n){return n.nodeType==1&&dom.getAttrib(n,'mce_new');});if(p)dom.remove(n,1);}});each(dom.select(nn).reverse(),function(n){var p=n.parentNode;if(!p||!dom.getAttrib(n,'mce_new'))return;if(p.nodeName==nn.toUpperCase()&&p.childNodes.length==1)return dom.remove(p,1);if(n.nodeType==1&&(!re||!re.test(p.nodeName))&&p.childNodes.length==1){set(p);dom.setAttrib(n,'class','');}});each(dom.select(nn).reverse(),function(n){if(dom.getAttrib(n,'mce_new')||(dom.getAttribs(n).length<=1&&n.className==='')){if(!dom.getAttrib(n,'class')&&!dom.getAttrib(n,'style'))return dom.remove(n,1);dom.setAttrib(n,'mce_new','');}});s.moveToBookmark(b);},queryStateJustify:function(c,v){var ed=this.editor,n=ed.selection.getNode(),dom=ed.dom;if(n&&n.nodeName=='IMG'){if(dom.getStyle(n,'float')==v)return 1;return n.parentNode.style.textAlign==v;}n=dom.getParent(ed.selection.getStart(),function(n){return n.nodeType==1&&n.style.textAlign;});if(v=='full')v='justify';if(ed.settings.inline_styles)return(n&&n.style.textAlign==v);return this._queryState(c);},HiliteColor:function(ui,val){var t=this,ed=t.editor,d=ed.getDoc();function set(s){if(!isGecko)return;try{d.execCommand("styleWithCSS",0,s);}catch(ex){d.execCommand("useCSS",0,!s);}};if(isGecko||isOpera){set(true);d.execCommand('hilitecolor',false,val);set(false);}else d.execCommand('BackColor',false,val);},Undo:function(){var ed=this.editor;if(ed.settings.custom_undo_redo){ed.undoManager.undo();ed.nodeChanged();}else ed.getDoc().execCommand('Undo',false,null);},Redo:function(){var ed=this.editor;if(ed.settings.custom_undo_redo){ed.undoManager.redo();ed.nodeChanged();}else ed.getDoc().execCommand('Redo',false,null);},FormatBlock:function(ui,val){var t=this,ed=t.editor,s=ed.selection,dom=ed.dom,bl,nb,b;function isBlock(n){return/^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test(n.nodeName);};bl=dom.getParent(s.getNode(),function(n){return isBlock(n);});if(bl){if((isIE&&isBlock(bl.parentNode))||bl.nodeName=='DIV'){nb=ed.dom.create(val);each(dom.getAttribs(bl),function(v){dom.setAttrib(nb,v.nodeName,dom.getAttrib(bl,v.nodeName));});b=s.getBookmark();dom.replace(nb,bl,1);s.moveToBookmark(b);ed.nodeChanged();return;}}val=ed.settings.forced_root_block?(val||'<p>'):val;if(val.indexOf('<')==-1)val='<'+val+'>';if(tinymce.isGecko)val=val.replace(/<(div|blockquote|code|dt|dd|dl|samp)>/gi,'$1');ed.getDoc().execCommand('FormatBlock',false,val);},mceCleanup:function(){var ed=this.editor,s=ed.selection,b=s.getBookmark();ed.setContent(ed.getContent());s.moveToBookmark(b);},mceRemoveNode:function(ui,val){var ed=this.editor,s=ed.selection,b,n=val||s.getNode();if(n==ed.getBody())return;b=s.getBookmark();ed.dom.remove(n,1);s.moveToBookmark(b);ed.nodeChanged();},mceSelectNodeDepth:function(ui,val){var ed=this.editor,s=ed.selection,c=0;ed.dom.getParent(s.getNode(),function(n){if(n.nodeType==1&&c++==val){s.select(n);ed.nodeChanged();return false;}},ed.getBody());},mceSelectNode:function(u,v){this.editor.selection.select(v);},mceInsertContent:function(ui,val){this.editor.selection.setContent(val);},mceInsertRawHTML:function(ui,val){var ed=this.editor;ed.selection.setContent('tiny_mce_marker');ed.setContent(ed.getContent().replace(/tiny_mce_marker/g,val));},mceRepaint:function(){var s,b,e=this.editor;if(tinymce.isGecko){try{s=e.selection;b=s.getBookmark(true);if(s.getSel())s.getSel().selectAllChildren(e.getBody());s.collapse(true);s.moveToBookmark(b);}catch(ex){}}},queryStateUnderline:function(){var ed=this.editor,n=ed.selection.getNode();if(n&&n.nodeName=='A')return false;return this._queryState('Underline');},queryStateOutdent:function(){var ed=this.editor,n;if(ed.settings.inline_styles){if((n=ed.dom.getParent(ed.selection.getStart(),ed.dom.isBlock))&&parseInt(n.style.paddingLeft)>0)return true;if((n=ed.dom.getParent(ed.selection.getEnd(),ed.dom.isBlock))&&parseInt(n.style.paddingLeft)>0)return true;}else return!!ed.dom.getParent(ed.selection.getNode(),'BLOCKQUOTE');return this.queryStateInsertUnorderedList()||this.queryStateInsertOrderedList();},queryStateInsertUnorderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),'UL');},queryStateInsertOrderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),'OL');},queryStatemceBlockQuote:function(){return!!this.editor.dom.getParent(this.editor.selection.getStart(),function(n){return n.nodeName==='BLOCKQUOTE';});},mceBlockQuote:function(){var t=this,ed=t.editor,s=ed.selection,dom=ed.dom,sb,eb,n,bm,bq,r,bq2,i,nl;function getBQ(e){return dom.getParent(e,function(n){return n.nodeName==='BLOCKQUOTE';});};sb=dom.getParent(s.getStart(),dom.isBlock);eb=dom.getParent(s.getEnd(),dom.isBlock);if(bq=getBQ(sb)){if(sb!=eb||sb.childNodes.length>1||(sb.childNodes.length==1&&sb.firstChild.nodeName!='BR'))bm=s.getBookmark();if(getBQ(eb)){bq2=bq.cloneNode(false);while(n=eb.nextSibling)bq2.appendChild(n.parentNode.removeChild(n));}if(bq2)dom.insertAfter(bq2,bq);nl=t._getSelectedBlocks(sb,eb);for(i=nl.length-1;i>=0;i--){dom.insertAfter(nl[i],bq);}if(/^\s*$/.test(bq.innerHTML))dom.remove(bq,1);if(bq2&&/^\s*$/.test(bq2.innerHTML))dom.remove(bq2,1);if(!bm){if(!isIE){r=ed.getDoc().createRange();r.setStart(sb,0);r.setEnd(sb,0);s.setRng(r);}else{s.select(sb);s.collapse(0);if(dom.getParent(s.getStart(),dom.isBlock)!=sb){r=s.getRng();r.move('character',-1);r.select();}}}else t.editor.selection.moveToBookmark(bm);return;}if(isIE&&!sb&&!eb){t.editor.getDoc().execCommand('Indent');n=getBQ(s.getNode());n.style.margin=n.dir='';return;}if(!sb||!eb)return;if(sb!=eb||sb.childNodes.length>1||(sb.childNodes.length==1&&sb.firstChild.nodeName!='BR'))bm=s.getBookmark();each(t._getSelectedBlocks(getBQ(s.getStart()),getBQ(s.getEnd())),function(e){if(e.nodeName=='BLOCKQUOTE'&&!bq){bq=e;return;}if(!bq){bq=dom.create('blockquote');e.parentNode.insertBefore(bq,e);}if(e.nodeName=='BLOCKQUOTE'&&bq){n=e.firstChild;while(n){bq.appendChild(n.cloneNode(true));n=n.nextSibling;}dom.remove(e);return;}bq.appendChild(dom.remove(e));});if(!bm){if(!isIE){r=ed.getDoc().createRange();r.setStart(sb,0);r.setEnd(sb,0);s.setRng(r);}else{s.select(sb);s.collapse(1);}}else s.moveToBookmark(bm);},_getSelectedBlocks:function(st,en){var ed=this.editor,dom=ed.dom,s=ed.selection,sb,eb,n,bl=[];sb=dom.getParent(st||s.getStart(),dom.isBlock);eb=dom.getParent(en||s.getEnd(),dom.isBlock);if(sb)bl.push(sb);if(sb&&eb&&sb!=eb){n=sb;while((n=n.nextSibling)&&n!=eb){if(dom.isBlock(n))bl.push(n);}}if(eb&&sb!=eb)bl.push(eb);return bl;}});})();tinymce.create('tinymce.UndoManager',{index:0,data:null,typing:0,UndoManager:function(ed){var t=this,Dispatcher=tinymce.util.Dispatcher;t.editor=ed;t.data=[];t.onAdd=new Dispatcher(this);t.onUndo=new Dispatcher(this);t.onRedo=new Dispatcher(this);},add:function(l){var t=this,i,ed=t.editor,b,s=ed.settings,la;l=l||{};l.content=l.content||ed.getContent({format:'raw',no_events:1});l.content=l.content.replace(/^\s*|\s*$/g,'');la=t.data[t.index>0&&(t.index==0||t.index==t.data.length)?t.index-1:t.index];if(!l.initial&&la&&l.content==la.content)return null;if(s.custom_undo_redo_levels){if(t.data.length>s.custom_undo_redo_levels){for(i=0;i<t.data.length-1;i++)t.data[i]=t.data[i+1];t.data.length--;t.index=t.data.length;}}if(s.custom_undo_redo_restore_selection&&!l.initial)l.bookmark=b=l.bookmark||ed.selection.getBookmark();if(t.index<t.data.length)t.index++;if(t.data.length===0&&!l.initial)return null;t.data.length=t.index+1;t.data[t.index++]=l;if(l.initial)t.index=0;if(t.data.length==2&&t.data[0].initial)t.data[0].bookmark=b;t.onAdd.dispatch(t,l);ed.isNotDirty=0;return l;},undo:function(){var t=this,ed=t.editor,l=l,i;if(t.typing){t.add();t.typing=0;}if(t.index>0){if(t.index==t.data.length&&t.index>1){i=t.index;t.typing=0;if(!t.add())t.index=i;--t.index;}l=t.data[--t.index];ed.setContent(l.content,{format:'raw'});ed.selection.moveToBookmark(l.bookmark);t.onUndo.dispatch(t,l);}return l;},redo:function(){var t=this,ed=t.editor,l=null;if(t.index<t.data.length-1){l=t.data[++t.index];ed.setContent(l.content,{format:'raw'});ed.selection.moveToBookmark(l.bookmark);t.onRedo.dispatch(t,l);}return l;},clear:function(){var t=this;t.data=[];t.index=0;t.typing=0;t.add({initial:true});},hasUndo:function(){return this.index!=0||this.typing;},hasRedo:function(){return this.index<this.data.length-1;}});(function(){var Event,isIE,isGecko,isOpera,each,extend;Event=tinymce.dom.Event;isIE=tinymce.isIE;isGecko=tinymce.isGecko;isOpera=tinymce.isOpera;each=tinymce.each;extend=tinymce.extend;tinymce.create('tinymce.ForceBlocks',{ForceBlocks:function(ed){var t=this,s=ed.settings,elm;t.editor=ed;t.dom=ed.dom;elm=(s.forced_root_block||'p').toLowerCase();s.element=elm.toUpperCase();ed.onPreInit.add(t.setup,t);t.reOpera=new RegExp('(\\u00a0| | )<\/'+elm+'>','gi');t.rePadd=new RegExp('<p( )([^>]+)><\\\/p>|<p( )([^>]+)\\\/>|<p( )([^>]+)>\\s+<\\\/p>|<p><\\\/p>|<p\\\/>|<p>\\s+<\\\/p>'.replace(/p/g,elm),'gi');t.reNbsp2BR1=new RegExp('<p( )([^>]+)>[\\s\\u00a0]+<\\\/p>|<p>[\\s\\u00a0]+<\\\/p>'.replace(/p/g,elm),'gi');t.reNbsp2BR2=new RegExp('<p( )([^>]+)>( | )<\\\/p>|<p>( | )<\\\/p>'.replace(/p/g,elm),'gi');t.reBR2Nbsp=new RegExp('<p( )([^>]+)>\\s*<br \\\/>\\s*<\\\/p>|<p>\\s*<br \\\/>\\s*<\\\/p>'.replace(/p/g,elm),'gi');t.reTrailBr=new RegExp('\\s*<br \\/>\\s*<\\\/p>'.replace(/p/g,elm),'gi');function padd(ed,o){if(isOpera)o.content=o.content.replace(t.reOpera,'</'+elm+'>');o.content=o.content.replace(t.rePadd,'<'+elm+'$1$2$3$4$5$6>\u00a0</'+elm+'>');if(!isIE&&!isOpera&&o.set){o.content=o.content.replace(t.reNbsp2BR1,'<'+elm+'$1$2><br /></'+elm+'>');o.content=o.content.replace(t.reNbsp2BR2,'<'+elm+'$1$2><br /></'+elm+'>');}else{o.content=o.content.replace(t.reBR2Nbsp,'<'+elm+'$1$2>\u00a0</'+elm+'>');o.content=o.content.replace(t.reTrailBr,'</'+elm+'>');}};ed.onBeforeSetContent.add(padd);ed.onPostProcess.add(padd);if(s.forced_root_block){ed.onInit.add(t.forceRoots,t);ed.onSetContent.add(t.forceRoots,t);ed.onBeforeGetContent.add(t.forceRoots,t);}},setup:function(){var t=this,ed=t.editor,s=ed.settings;if(s.forced_root_block){ed.onKeyUp.add(t.forceRoots,t);ed.onPreProcess.add(t.forceRoots,t);}if(s.force_br_newlines){if(isIE){ed.onKeyPress.add(function(ed,e){var n,s=ed.selection;if(e.keyCode==13&&s.getNode().nodeName!='LI'){s.setContent('<br id="__" /> ',{format:'raw'});n=ed.dom.get('__');n.removeAttribute('id');s.select(n);s.collapse();return Event.cancel(e);}});}return;}if(!isIE&&s.force_p_newlines){ed.onKeyPress.add(function(ed,e){if(e.keyCode==13&&!e.shiftKey){if(!t.insertPara(e))Event.cancel(e);}});if(isGecko){ed.onKeyDown.add(function(ed,e){if((e.keyCode==8||e.keyCode==46)&&!e.shiftKey)t.backspaceDelete(e,e.keyCode==8);});}}function ren(rn,na){var ne=ed.dom.create(na);each(rn.attributes,function(a){if(a.specified&&a.nodeValue)ne.setAttribute(a.nodeName.toLowerCase(),a.nodeValue);});each(rn.childNodes,function(n){ne.appendChild(n.cloneNode(true));});rn.parentNode.replaceChild(ne,rn);return ne;};if(isIE&&s.element!='P'){ed.onKeyPress.add(function(ed,e){t.lastElm=ed.selection.getNode().nodeName;});ed.onKeyUp.add(function(ed,e){var bl,sel=ed.selection,n=sel.getNode(),b=ed.getBody();if(b.childNodes.length===1&&n.nodeName=='P'){n=ren(n,s.element);sel.select(n);sel.collapse();ed.nodeChanged();}else if(e.keyCode==13&&!e.shiftKey&&t.lastElm!='P'){bl=ed.dom.getParent(n,'P');if(bl){ren(bl,s.element);ed.nodeChanged();}}});}},find:function(n,t,s){var ed=this.editor,w=ed.getDoc().createTreeWalker(n,4,null,false),c=-1;while(n=w.nextNode()){c++;if(t==0&&n==s)return c;if(t==1&&c==s)return n;}return-1;},forceRoots:function(ed,e){var t=this,ed=t.editor,b=ed.getBody(),d=ed.getDoc(),se=ed.selection,s=se.getSel(),r=se.getRng(),si=-2,ei,so,eo,tr,c=-0xFFFFFF;var nx,bl,bp,sp,le,nl=b.childNodes,i;if(e&&e.keyCode==13)return true;for(i=nl.length-1;i>=0;i--){nx=nl[i];if(nx.nodeType==3||(!t.dom.isBlock(nx)&&nx.nodeType!=8)){if(!bl){if(nx.nodeType!=3||/[^\s]/g.test(nx.nodeValue)){if(si==-2&&r){if(!isIE){if(ed.dom.getParent(r.startContainer,function(e){return e===b;})){so=r.startOffset;eo=r.endOffset;si=t.find(b,0,r.startContainer);ei=t.find(b,0,r.endContainer);}}else{tr=d.body.createTextRange();tr.moveToElementText(b);tr.collapse(1);bp=tr.move('character',c)*-1;tr=r.duplicate();tr.collapse(1);sp=tr.move('character',c)*-1;tr=r.duplicate();tr.collapse(0);le=(tr.move('character',c)*-1)-sp;si=sp-bp;ei=le;}}bl=ed.dom.create(ed.settings.forced_root_block);bl.appendChild(nx.cloneNode(1));nx.parentNode.replaceChild(bl,nx);}}else{if(bl.hasChildNodes())bl.insertBefore(nx,bl.firstChild);else bl.appendChild(nx);}}else bl=null;}if(si!=-2){if(!isIE){bl=b.getElementsByTagName(ed.settings.element)[0];r=d.createRange();if(si!=-1)r.setStart(t.find(b,1,si),so);else r.setStart(bl,0);if(ei!=-1)r.setEnd(t.find(b,1,ei),eo);else r.setEnd(bl,0);if(s){s.removeAllRanges();s.addRange(r);}}else{try{r=s.createRange();r.moveToElementText(b);r.collapse(1);r.moveStart('character',si);r.moveEnd('character',ei);r.select();}catch(ex){}}}},getParentBlock:function(n){var d=this.dom;return d.getParent(n,d.isBlock);},insertPara:function(e){var t=this,ed=t.editor,dom=ed.dom,d=ed.getDoc(),se=ed.settings,s=ed.selection.getSel(),r=s.getRangeAt(0),b=d.body;var rb,ra,dir,sn,so,en,eo,sb,eb,bn,bef,aft,sc,ec,n,vp=dom.getViewPort(ed.getWin()),y,ch;function isEmpty(n){n=n.innerHTML;n=n.replace(/<(img|hr|table)/gi,'-');n=n.replace(/<[^>]+>/g,'');return n.replace(/[ \t\r\n]+/g,'')=='';};rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(true);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(true);dir=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;sn=dir?s.anchorNode:s.focusNode;so=dir?s.anchorOffset:s.focusOffset;en=dir?s.focusNode:s.anchorNode;eo=dir?s.focusOffset:s.anchorOffset;if(sn===en&&/^(TD|TH)$/.test(sn.nodeName)){dom.remove(sn.firstChild);ed.dom.add(sn,se.element,null,'<br />');aft=ed.dom.add(sn,se.element,null,'<br />');r=d.createRange();r.selectNodeContents(aft);r.collapse(1);ed.selection.setRng(r);return false;}if(sn==b&&en==b&&b.firstChild&&ed.dom.isBlock(b.firstChild)){sn=en=sn.firstChild;so=eo=0;rb=d.createRange();rb.setStart(sn,0);ra=d.createRange();ra.setStart(en,0);}sn=sn.nodeName=="HTML"?d.body:sn;sn=sn.nodeName=="BODY"?sn.firstChild:sn;en=en.nodeName=="HTML"?d.body:en;en=en.nodeName=="BODY"?en.firstChild:en;sb=t.getParentBlock(sn);eb=t.getParentBlock(en);bn=sb?sb.nodeName:se.element;if(t.dom.getParent(sb,function(n){return/OL|UL|PRE/.test(n.nodeName);}))return true;if(sb&&(sb.nodeName=='CAPTION'||/absolute|relative|static/gi.test(sb.style.position))){bn=se.element;sb=null;}if(eb&&(eb.nodeName=='CAPTION'||/absolute|relative|static/gi.test(eb.style.position))){bn=se.element;eb=null;}if(/(TD|TABLE|TH|CAPTION)/.test(bn)||(sb&&bn=="DIV"&&/left|right/gi.test(sb.style.cssFloat))){bn=se.element;sb=eb=null;}bef=(sb&&sb.nodeName==bn)?sb.cloneNode(0):ed.dom.create(bn);aft=(eb&&eb.nodeName==bn)?eb.cloneNode(0):ed.dom.create(bn);aft.removeAttribute('id');if(/^(H[1-6])$/.test(bn)&&sn.nodeValue&&so==sn.nodeValue.length)aft=ed.dom.create(se.element);n=sc=sn;do{if(n==b||n.nodeType==9||t.dom.isBlock(n)||/(TD|TABLE|TH|CAPTION)/.test(n.nodeName))break;sc=n;}while((n=n.previousSibling?n.previousSibling:n.parentNode));n=ec=en;do{if(n==b||n.nodeType==9||t.dom.isBlock(n)||/(TD|TABLE|TH|CAPTION)/.test(n.nodeName))break;ec=n;}while((n=n.nextSibling?n.nextSibling:n.parentNode));if(sc.nodeName==bn)rb.setStart(sc,0);else rb.setStartBefore(sc);rb.setEnd(sn,so);bef.appendChild(rb.cloneContents()||d.createTextNode(''));try{ra.setEndAfter(ec);}catch(ex){}ra.setStart(en,eo);aft.appendChild(ra.cloneContents()||d.createTextNode(''));r=d.createRange();if(!sc.previousSibling&&sc.parentNode.nodeName==bn){r.setStartBefore(sc.parentNode);}else{if(rb.startContainer.nodeName==bn&&rb.startOffset==0)r.setStartBefore(rb.startContainer);else r.setStart(rb.startContainer,rb.startOffset);}if(!ec.nextSibling&&ec.parentNode.nodeName==bn)r.setEndAfter(ec.parentNode);else r.setEnd(ra.endContainer,ra.endOffset);r.deleteContents();if(isOpera)ed.getWin().scrollTo(0,vp.y);if(bef.firstChild&&bef.firstChild.nodeName==bn)bef.innerHTML=bef.firstChild.innerHTML;if(aft.firstChild&&aft.firstChild.nodeName==bn)aft.innerHTML=aft.firstChild.innerHTML;if(isEmpty(bef))bef.innerHTML='<br />';if(isEmpty(aft))aft.innerHTML=isOpera?' ':'<br />';if(isOpera&&parseFloat(opera.version())<9.5){r.insertNode(bef);r.insertNode(aft);}else{r.insertNode(aft);r.insertNode(bef);}aft.normalize();bef.normalize();function first(n){return d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false).nextNode()||n;};r=d.createRange();r.selectNodeContents(isGecko?first(aft):aft);r.collapse(1);s.removeAllRanges();s.addRange(r);y=ed.dom.getPos(aft).y;ch=aft.clientHeight;if(y<vp.y||y+ch>vp.y+vp.h){ed.getWin().scrollTo(0,y<vp.y?y:y-vp.h+ch);}return false;},backspaceDelete:function(e,bs){var t=this,ed=t.editor,b=ed.getBody(),n,se=ed.selection,r=se.getRng(),sc=r.startContainer,n,w,tn;if(sc&&ed.dom.isBlock(sc)&&!/^(TD|TH)$/.test(sc.nodeName)&&bs){if(sc.childNodes.length==0||(sc.childNodes.length==1&&sc.firstChild.nodeName=='BR')){n=sc;while((n=n.previousSibling)&&!ed.dom.isBlock(n));if(n){if(sc!=b.firstChild){w=ed.dom.doc.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false);while(tn=w.nextNode())n=tn;r=ed.getDoc().createRange();r.setStart(n,n.nodeValue?n.nodeValue.length:0);r.setEnd(n,n.nodeValue?n.nodeValue.length:0);se.setRng(r);ed.dom.remove(sc);}return Event.cancel(e);}}}function handler(e){e=e.target;if(e&&e.parentNode&&e.nodeName=='BR'&&(n=t.getParentBlock(e))){Event.remove(b,'DOMNodeInserted',handler);if(e.previousSibling||e.nextSibling)ed.dom.remove(e);}};Event._add(b,'DOMNodeInserted',handler);window.setTimeout(function(){Event._remove(b,'DOMNodeInserted',handler);},1);}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,extend=tinymce.extend;tinymce.create('tinymce.ControlManager',{ControlManager:function(ed,s){var t=this,i;s=s||{};t.editor=ed;t.controls={};t.onAdd=new tinymce.util.Dispatcher(t);t.onPostRender=new tinymce.util.Dispatcher(t);t.prefix=s.prefix||ed.id+'_';t._cls={};t.onPostRender.add(function(){each(t.controls,function(c){c.postRender();});});},get:function(id){return this.controls[this.prefix+id]||this.controls[id];},setActive:function(id,s){var c=null;if(c=this.get(id))c.setActive(s);return c;},setDisabled:function(id,s){var c=null;if(c=this.get(id))c.setDisabled(s);return c;},add:function(c){var t=this;if(c){t.controls[c.id]=c;t.onAdd.dispatch(c,t);}return c;},createControl:function(n){var c,t=this,ed=t.editor;each(ed.plugins,function(p){if(p.createControl){c=p.createControl(n,t);if(c)return false;}});switch(n){case"|":case"separator":return t.createSeparator();}if(!c&&ed.buttons&&(c=ed.buttons[n]))return t.createButton(n,c);return t.add(c);},createDropMenu:function(id,s,cc){var t=this,ed=t.editor,c,bm,v,cls;s=extend({'class':'mceDropDown',constrain:ed.settings.constrain_menus},s);s['class']=s['class']+' '+ed.getParam('skin')+'Skin';if(v=ed.getParam('skin_variant'))s['class']+=' '+ed.getParam('skin')+'Skin'+v.substring(0,1).toUpperCase()+v.substring(1);id=t.prefix+id;cls=cc||t._cls.dropmenu||tinymce.ui.DropMenu;c=t.controls[id]=new cls(id,s);c.onAddItem.add(function(c,o){var s=o.settings;s.title=ed.getLang(s.title,s.title);if(!s.onclick){s.onclick=function(v){ed.execCommand(s.cmd,s.ui||false,s.value);};}});ed.onRemove.add(function(){c.destroy();});if(tinymce.isIE){c.onShowMenu.add(function(){bm=ed.selection.getBookmark(1);});c.onHideMenu.add(function(){if(bm)ed.selection.moveToBookmark(bm);});}return t.add(c);},createListBox:function(id,s,cc){var t=this,ed=t.editor,cmd,c,cls;if(t.get(id))return null;s.title=ed.translate(s.title);s.scope=s.scope||ed;if(!s.onselect){s.onselect=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}s=extend({title:s.title,'class':'mce_'+id,scope:s.scope,control_manager:t},s);id=t.prefix+id;if(ed.settings.use_native_selects)c=new tinymce.ui.NativeListBox(id,s);else{cls=cc||t._cls.listbox||tinymce.ui.ListBox;c=new cls(id,s);}t.controls[id]=c;if(tinymce.isWebKit){c.onPostRender.add(function(c,n){Event.add(n,'mousedown',function(){ed.bookmark=ed.selection.getBookmark('simple');});Event.add(n,'focus',function(){ed.selection.moveToBookmark(ed.bookmark);ed.bookmark=null;});});}if(c.hideMenu)ed.onMouseDown.add(c.hideMenu,c);return t.add(c);},createButton:function(id,s,cc){var t=this,ed=t.editor,o,c,cls;if(t.get(id))return null;s.title=ed.translate(s.title);s.label=ed.translate(s.label);s.scope=s.scope||ed;if(!s.onclick&&!s.menu_button){s.onclick=function(){ed.execCommand(s.cmd,s.ui||false,s.value);};}s=extend({title:s.title,'class':'mce_'+id,unavailable_prefix:ed.getLang('unavailable',''),scope:s.scope,control_manager:t},s);id=t.prefix+id;if(s.menu_button){cls=cc||t._cls.menubutton||tinymce.ui.MenuButton;c=new cls(id,s);ed.onMouseDown.add(c.hideMenu,c);}else{cls=t._cls.button||tinymce.ui.Button;c=new cls(id,s);}return t.add(c);},createMenuButton:function(id,s){s=s||{};s.menu_button=1;return this.createButton(id,s);},createSplitButton:function(id,s,cc){var t=this,ed=t.editor,cmd,c,cls;if(t.get(id))return null;s.title=ed.translate(s.title);s.scope=s.scope||ed;if(!s.onclick){s.onclick=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}if(!s.onselect){s.onselect=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}s=extend({title:s.title,'class':'mce_'+id,scope:s.scope,control_manager:t},s);id=t.prefix+id;cls=cc||t._cls.splitbutton||tinymce.ui.SplitButton;c=t.add(new cls(id,s));ed.onMouseDown.add(c.hideMenu,c);return c;},createColorSplitButton:function(id,s,cc){var t=this,ed=t.editor,cmd,c,cls,bm;if(t.get(id))return null;s.title=ed.translate(s.title);s.scope=s.scope||ed;if(!s.onclick){s.onclick=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}if(!s.onselect){s.onselect=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}s=extend({title:s.title,'class':'mce_'+id,'menu_class':ed.getParam('skin')+'Skin',scope:s.scope,more_colors_title:ed.getLang('more_colors')},s);id=t.prefix+id;cls=cc||t._cls.colorsplitbutton||tinymce.ui.ColorSplitButton;c=new cls(id,s);ed.onMouseDown.add(c.hideMenu,c);ed.onRemove.add(function(){c.destroy();});if(tinymce.isIE){c.onShowMenu.add(function(){bm=ed.selection.getBookmark(1);});c.onHideMenu.add(function(){if(bm){ed.selection.moveToBookmark(bm);bm=0;}});}return t.add(c);},createToolbar:function(id,s,cc){var c,t=this,cls;id=t.prefix+id;cls=cc||t._cls.toolbar||tinymce.ui.Toolbar;c=new cls(id,s);if(t.get(id))return null;return t.add(c);},createSeparator:function(cc){var cls=cc||this._cls.separator||tinymce.ui.Separator;return new cls();},setControlType:function(n,c){return this._cls[n.toLowerCase()]=c;},destroy:function(){each(this.controls,function(c){c.destroy();});this.controls=null;}});})();(function(){var Dispatcher=tinymce.util.Dispatcher,each=tinymce.each,isIE=tinymce.isIE,isOpera=tinymce.isOpera;tinymce.create('tinymce.WindowManager',{WindowManager:function(ed){var t=this;t.editor=ed;t.onOpen=new Dispatcher(t);t.onClose=new Dispatcher(t);t.params={};t.features={};},open:function(s,p){var t=this,f='',x,y,mo=t.editor.settings.dialog_type=='modal',w,sw,sh,vp=tinymce.DOM.getViewPort(),u;s=s||{};p=p||{};sw=isOpera?vp.w:screen.width;sh=isOpera?vp.h:screen.height;s.name=s.name||'mc_'+new Date().getTime();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240);s.resizable=true;s.left=s.left||parseInt(sw/ 2.0) - (s.width /2.0);s.top=s.top||parseInt(sh/ 2.0) - (s.height /2.0);p.inline=false;p.mce_width=s.width;p.mce_height=s.height;p.mce_auto_focus=s.auto_focus;if(mo){if(isIE){s.center=true;s.help=false;s.dialogWidth=s.width+'px';s.dialogHeight=s.height+'px';s.scroll=s.scrollbars||false;}}each(s,function(v,k){if(tinymce.is(v,'boolean'))v=v?'yes':'no';if(!/^(name|url)$/.test(k)){if(isIE&&mo)f+=(f?';':'')+k+':'+v;else f+=(f?',':'')+k+'='+v;}});t.features=s;t.params=p;t.onOpen.dispatch(t,s,p);u=s.url||s.file;if(tinymce.relaxedDomain)u+=(u.indexOf('?')==-1?'?':'&')+'mce_rdomain='+tinymce.relaxedDomain;u=tinymce._addVer(u);try{if(isIE&&mo){w=1;window.showModalDialog(u,window,f);}else w=window.open(u,s.name,f);}catch(ex){}if(!w)alert(t.editor.getLang('popup_blocked'));},close:function(w){w.close();this.onClose.dispatch(this);},createInstance:function(cl,a,b,c,d,e){var f=tinymce.resolve(cl);return new f(a,b,c,d,e);},confirm:function(t,cb,s){cb.call(s||this,confirm(this._decode(this.editor.getLang(t,t))));},alert:function(tx,cb,s){var t=this;alert(t._decode(t.editor.getLang(tx,tx)));if(cb)cb.call(s||t);},_decode:function(s){return tinymce.DOM.decode(s).replace(/\\n/g,'\n');}});}());1 var tinymce={majorVersion:'3',minorVersion:'1.1',releaseDate:'2008-06-25',_init:function(){var t=this,d=document,w=window,na=navigator,ua=na.userAgent,i,nl,n,base,p,v;t.isOpera=w.opera&&opera.buildNumber;t.isWebKit=/WebKit/.test(ua);t.isOldWebKit=t.isWebKit&&!w.getSelection().getRangeAt;t.isIE=!t.isWebKit&&!t.isOpera&&(/MSIE/gi).test(ua)&&(/Explorer/gi).test(na.appName);t.isIE6=t.isIE&&/MSIE [56]/.test(ua);t.isGecko=!t.isWebKit&&/Gecko/.test(ua);t.isMac=ua.indexOf('Mac')!=-1;if(w.tinyMCEPreInit){t.suffix=tinyMCEPreInit.suffix;t.baseURL=tinyMCEPreInit.base;t.query=tinyMCEPreInit.query;return;}t.suffix='';nl=d.getElementsByTagName('base');for(i=0;i<nl.length;i++){if(v=nl[i].href){if(/^https?:\/\/[^\/]+$/.test(v))v+='/';base=v?v.match(/.*\//)[0]:'';}}function getBase(n){if(n.src&&/tiny_mce(|_dev|_src|_gzip|_jquery|_prototype).js/.test(n.src)){if(/_(src|dev)\.js/g.test(n.src))t.suffix='_src';if((p=n.src.indexOf('?'))!=-1)t.query=n.src.substring(p+1);t.baseURL=n.src.substring(0,n.src.lastIndexOf('/'));if(base&&t.baseURL.indexOf('://')==-1)t.baseURL=base+t.baseURL;return t.baseURL;}return null;};nl=d.getElementsByTagName('script');for(i=0;i<nl.length;i++){if(getBase(nl[i]))return;}n=d.getElementsByTagName('head')[0];if(n){nl=n.getElementsByTagName('script');for(i=0;i<nl.length;i++){if(getBase(nl[i]))return;}}return;},is:function(o,t){var n=typeof(o);if(!t)return n!='undefined';if(t=='array'&&(o instanceof Array))return true;return n==t;},each:function(o,cb,s){var n,l;if(!o)return 0;s=s||o;if(typeof(o.length)!='undefined'){for(n=0,l=o.length;n<l;n++){if(cb.call(s,o[n],n,o)===false)return 0;}}else{for(n in o){if(o.hasOwnProperty(n)){if(cb.call(s,o[n],n,o)===false)return 0;}}}return 1;},map:function(a,f){var o=[];tinymce.each(a,function(v){o.push(f(v));});return o;},grep:function(a,f){var o=[];tinymce.each(a,function(v){if(!f||f(v))o.push(v);});return o;},inArray:function(a,v){var i,l;if(a){for(i=0,l=a.length;i<l;i++){if(a[i]===v)return i;}}return-1;},extend:function(o,e){var i,a=arguments;for(i=1;i<a.length;i++){e=a[i];tinymce.each(e,function(v,n){if(typeof(v)!=='undefined')o[n]=v;});}return o;},trim:function(s){return(s?''+s:'').replace(/^\s*|\s*$/g,'');},create:function(s,p){var t=this,sp,ns,cn,scn,c,de=0;s=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(s);cn=s[3].match(/(^|\.)(\w+)$/i)[2];ns=t.createNS(s[3].replace(/\.\w+$/,''));if(ns[cn])return;if(s[2]=='static'){ns[cn]=p;if(this.onCreate)this.onCreate(s[2],s[3],ns[cn]);return;}if(!p[cn]){p[cn]=function(){};de=1;}ns[cn]=p[cn];t.extend(ns[cn].prototype,p);if(s[5]){sp=t.resolve(s[5]).prototype;scn=s[5].match(/\.(\w+)$/i)[1];c=ns[cn];if(de){ns[cn]=function(){return sp[scn].apply(this,arguments);};}else{ns[cn]=function(){this.parent=sp[scn];return c.apply(this,arguments);};}ns[cn].prototype[cn]=ns[cn];t.each(sp,function(f,n){ns[cn].prototype[n]=sp[n];});t.each(p,function(f,n){if(sp[n]){ns[cn].prototype[n]=function(){this.parent=sp[n];return f.apply(this,arguments);};}else{if(n!=cn)ns[cn].prototype[n]=f;}});}t.each(p['static'],function(f,n){ns[cn][n]=f;});if(this.onCreate)this.onCreate(s[2],s[3],ns[cn].prototype);},walk:function(o,f,n,s){s=s||this;if(o){if(n)o=o[n];tinymce.each(o,function(o,i){if(f.call(s,o,i,n)===false)return false;tinymce.walk(o,f,n,s);});}},createNS:function(n,o){var i,v;o=o||window;n=n.split('.');for(i=0;i<n.length;i++){v=n[i];if(!o[v])o[v]={};o=o[v];}return o;},resolve:function(n,o){var i,l;o=o||window;n=n.split('.');for(i=0,l=n.length;i<l;i++){o=o[n[i]];if(!o)break;}return o;},addUnload:function(f,s){var t=this,w=window;f={func:f,scope:s||this};if(!t.unloads){function unload(){var li=t.unloads,o,n;if(li){for(n in li){o=li[n];if(o&&o.func)o.func.call(o.scope,1);}if(w.detachEvent){w.detachEvent('onbeforeunload',fakeUnload);w.detachEvent('onunload',unload);}else if(w.removeEventListener)w.removeEventListener('unload',unload,false);t.unloads=o=li=w=unload=null;if(window.CollectGarbage)window.CollectGarbage();}};function fakeUnload(){var d=document;if(d.readyState=='interactive'){function stop(){d.detachEvent('onstop',stop);unload();d=null;};d.attachEvent('onstop',stop);window.setTimeout(function(){d.detachEvent('onstop',stop);},0);}};if(w.attachEvent){w.attachEvent('onunload',unload);w.attachEvent('onbeforeunload',fakeUnload);}else if(w.addEventListener)w.addEventListener('unload',unload,false);t.unloads=[f];}else t.unloads.push(f);return f;},removeUnload:function(f){var u=this.unloads,r=null;tinymce.each(u,function(o,i){if(o&&o.func==f){u.splice(i,1);r=f;return false;}});return r;},explode:function(s,d){return s?tinymce.map(s.split(d||','),tinymce.trim):s;},_addVer:function(u){var v;if(!this.query)return u;v=(u.indexOf('?')==-1?'?':'&')+this.query;if(u.indexOf('#')==-1)return u+v;return u.replace('#',v+'#');}};window.tinymce=tinymce;tinymce._init();tinymce.create('tinymce.util.Dispatcher',{scope:null,listeners:null,Dispatcher:function(s){this.scope=s||this;this.listeners=[];},add:function(cb,s){this.listeners.push({cb:cb,scope:s||this.scope});return cb;},addToTop:function(cb,s){this.listeners.unshift({cb:cb,scope:s||this.scope});return cb;},remove:function(cb){var l=this.listeners,o=null;tinymce.each(l,function(c,i){if(cb==c.cb){o=cb;l.splice(i,1);return false;}});return o;},dispatch:function(){var s,a=arguments,i,li=this.listeners,c;for(i=0;i<li.length;i++){c=li[i];s=c.cb.apply(c.scope,a);if(s===false)break;}return s;}});(function(){var each=tinymce.each;tinymce.create('tinymce.util.URI',{URI:function(u,s){var t=this,o,a,b;s=t.settings=s||{};if(/^(mailto|news|javascript|about):/i.test(u)||/^\s*#/.test(u)){t.source=u;return;}if(u.indexOf('/')===0&&u.indexOf('//')!==0)u=(s.base_uri?s.base_uri.protocol||'http':'http')+'://mce_host'+u;if(u.indexOf('://')===-1&&u.indexOf('//')!==0)u=(s.base_uri.protocol||'http')+'://mce_host'+t.toAbsPath(s.base_uri.path,u);u=u.replace(/@@/g,'(mce_at)');u=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(u);each(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(v,i){var s=u[i];if(s)s=s.replace(/\(mce_at\)/g,'@@');t[v]=s;});if(b=s.base_uri){if(!t.protocol)t.protocol=b.protocol;if(!t.userInfo)t.userInfo=b.userInfo;if(!t.port&&t.host=='mce_host')t.port=b.port;if(!t.host||t.host=='mce_host')t.host=b.host;t.source='';}},setPath:function(p){var t=this;p=/^(.*?)\/?(\w+)?$/.exec(p);t.path=p[0];t.directory=p[1];t.file=p[2];t.source='';t.getURI();},toRelative:function(u){var t=this,o;u=new tinymce.util.URI(u,{base_uri:t});if((u.host!='mce_host'&&t.host!=u.host&&u.host)||t.port!=u.port||t.protocol!=u.protocol)return u.getURI();o=t.toRelPath(t.path,u.path);if(u.query)o+='?'+u.query;if(u.anchor)o+='#'+u.anchor;return o;},toAbsolute:function(u,nh){var u=new tinymce.util.URI(u,{base_uri:this});return u.getURI(this.host==u.host?nh:0);},toRelPath:function(base,path){var items,bp=0,out='',i;base=base.substring(0,base.lastIndexOf('/'));base=base.split('/');items=path.split('/');if(base.length>=items.length){for(i=0;i<base.length;i++){if(i>=items.length||base[i]!=items[i]){bp=i+1;break;}}}if(base.length<items.length){for(i=0;i<items.length;i++){if(i>=base.length||base[i]!=items[i]){bp=i+1;break;}}}if(bp==1)return path;for(i=0;i<base.length-(bp-1);i++)out+="../";for(i=bp-1;i<items.length;i++){if(i!=bp-1)out+="/"+items[i];else out+=items[i];}return out;},toAbsPath:function(base,path){var i,nb=0,o=[];base=base.split('/');path=path.split('/');each(base,function(k){if(k)o.push(k);});base=o;for(i=path.length-1,o=[];i>=0;i--){if(path[i].length==0||path[i]==".")continue;if(path[i]=='..'){nb++;continue;}if(nb>0){nb--;continue;}o.push(path[i]);}i=base.length-nb;if(i<=0)return'/'+o.reverse().join('/');return'/'+base.slice(0,i).join('/')+'/'+o.reverse().join('/');},getURI:function(nh){var s,t=this;if(!t.source||nh){s='';if(!nh){if(t.protocol)s+=t.protocol+'://';if(t.userInfo)s+=t.userInfo+'@';if(t.host)s+=t.host;if(t.port)s+=':'+t.port;}if(t.path)s+=t.path;if(t.query)s+='?'+t.query;if(t.anchor)s+='#'+t.anchor;t.source=s;}return t.source;}});})();(function(){var each=tinymce.each;tinymce.create('static tinymce.util.Cookie',{getHash:function(n){var v=this.get(n),h;if(v){each(v.split('&'),function(v){v=v.split('=');h=h||{};h[unescape(v[0])]=unescape(v[1]);});}return h;},setHash:function(n,v,e,p,d,s){var o='';each(v,function(v,k){o+=(!o?'':'&')+escape(k)+'='+escape(v);});this.set(n,o,e,p,d,s);},get:function(n){var c=document.cookie,e,p=n+"=",b;if(!c)return;b=c.indexOf("; "+p);if(b==-1){b=c.indexOf(p);if(b!=0)return null;}else b+=2;e=c.indexOf(";",b);if(e==-1)e=c.length;return unescape(c.substring(b+p.length,e));},set:function(n,v,e,p,d,s){document.cookie=n+"="+escape(v)+((e)?"; expires="+e.toGMTString():"")+((p)?"; path="+escape(p):"")+((d)?"; domain="+d:"")+((s)?"; secure":"");},remove:function(n,p){var d=new Date();d.setTime(d.getTime()-1000);this.set(n,'',d,p,d);}});})();tinymce.create('static tinymce.util.JSON',{serialize:function(o){var i,v,s=tinymce.util.JSON.serialize,t;if(o==null)return'null';t=typeof o;if(t=='string'){v='\bb\tt\nn\ff\rr\""\'\'\\\\';return'"'+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'])/g,function(a,b){i=v.indexOf(b);if(i+1)return'\\'+v.charAt(i+1);a=b.charCodeAt().toString(16);return'\\u'+'0000'.substring(a.length)+a;})+'"';}if(t=='object'){if(o instanceof Array){for(i=0,v='[';i<o.length;i++)v+=(i>0?',':'')+s(o[i]);return v+']';}v='{';for(i in o)v+=typeof o[i]!='function'?(v.length>1?',"':'"')+i+'":'+s(o[i]):'';return v+'}';}return''+o;},parse:function(s){try{return eval('('+s+')');}catch(ex){}}});tinymce.create('static tinymce.util.XHR',{send:function(o){var x,t,w=window,c=0;o.scope=o.scope||this;o.success_scope=o.success_scope||o.scope;o.error_scope=o.error_scope||o.scope;o.async=o.async===false?false:true;o.data=o.data||'';function get(s){x=0;try{x=new ActiveXObject(s);}catch(ex){}return x;};x=w.XMLHttpRequest?new XMLHttpRequest():get('Microsoft.XMLHTTP')||get('Msxml2.XMLHTTP');if(x){if(x.overrideMimeType)x.overrideMimeType(o.content_type);x.open(o.type||(o.data?'POST':'GET'),o.url,o.async);if(o.content_type)x.setRequestHeader('Content-Type',o.content_type);x.send(o.data);function ready(){if(!o.async||x.readyState==4||c++>10000){if(o.success&&c<10000&&x.status==200)o.success.call(o.success_scope,''+x.responseText,x,o);else if(o.error)o.error.call(o.error_scope,c>10000?'TIMED_OUT':'GENERAL',x,o);x=null;}else w.setTimeout(ready,10);};if(!o.async)return ready();t=w.setTimeout(ready,10);}}});(function(){var extend=tinymce.extend,JSON=tinymce.util.JSON,XHR=tinymce.util.XHR;tinymce.create('tinymce.util.JSONRequest',{JSONRequest:function(s){this.settings=extend({},s);this.count=0;},send:function(o){var ecb=o.error,scb=o.success;o=extend(this.settings,o);o.success=function(c,x){c=JSON.parse(c);if(typeof(c)=='undefined'){c={error:'JSON Parse error.'};}if(c.error)ecb.call(o.error_scope||o.scope,c.error,x);else scb.call(o.success_scope||o.scope,c.result);};o.error=function(ty,x){ecb.call(o.error_scope||o.scope,ty,x);};o.data=JSON.serialize({id:o.id||'c'+(this.count++),method:o.method,params:o.params});o.content_type='application/json';XHR.send(o);},'static':{sendRPC:function(o){return new tinymce.util.JSONRequest().send(o);}}});}());(function(){var each=tinymce.each,is=tinymce.is;var isWebKit=tinymce.isWebKit,isIE=tinymce.isIE;tinymce.create('tinymce.dom.DOMUtils',{doc:null,root:null,files:null,listeners:{},pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,cache:{},idPattern:/^#[\w]+$/,elmPattern:/^[\w_*]+$/,elmClassPattern:/^([\w_]*)\.([\w_]+)$/,DOMUtils:function(d,s){var t=this;t.doc=d;t.win=window;t.files={};t.cssFlicker=false;t.counter=0;t.boxModel=!tinymce.isIE||d.compatMode=="CSS1Compat";t.stdMode=d.documentMode===8;this.settings=s=tinymce.extend({keep_values:false,hex_colors:1,process_html:1},s);if(tinymce.isIE6){try{d.execCommand('BackgroundImageCache',false,true);}catch(e){t.cssFlicker=true;}}tinymce.addUnload(t.destroy,t);},getRoot:function(){var t=this,s=t.settings;return(s&&t.get(s.root_element))||t.doc.body;},getViewPort:function(w){var d,b;w=!w?this.win:w;d=w.document;b=this.boxModel?d.documentElement:d.body;return{x:w.pageXOffset||b.scrollLeft,y:w.pageYOffset||b.scrollTop,w:w.innerWidth||b.clientWidth,h:w.innerHeight||b.clientHeight};},getRect:function(e){var p,t=this,w,h;e=t.get(e);p=t.getPos(e);w=t.getStyle(e,'width');h=t.getStyle(e,'height');if(w.indexOf('px')===-1)w=0;if(h.indexOf('px')===-1)h=0;return{x:p.x,y:p.y,w:parseInt(w)||e.offsetWidth||e.clientWidth,h:parseInt(h)||e.offsetHeight||e.clientHeight};},getParent:function(n,f,r){var na,se=this.settings;n=this.get(n);if(se.strict_root)r=r||this.getRoot();if(is(f,'string')){na=f.toUpperCase();f=function(n){var s=false;if(n.nodeType==1&&na==='*'){s=true;return false;}each(na.split(','),function(v){if(n.nodeType==1&&((se.strict&&n.nodeName.toUpperCase()==v)||n.nodeName.toUpperCase()==v)){s=true;return false;}});return s;};}while(n){if(n==r)return null;if(f(n))return n;n=n.parentNode;}return null;},get:function(e){var n;if(e&&this.doc&&typeof(e)=='string'){n=e;e=this.doc.getElementById(e);if(e&&e.id!==n)return this.doc.getElementsByName(n)[1];}return e;},select:function(pa,s){var t=this,cs,c,pl,o=[],x,i,l,n;s=t.get(s)||t.doc;if(s.querySelectorAll){if(s!=t.doc){i=s.id;s.id='_mc_tmp';pa='#_mc_tmp '+pa;}l=tinymce.grep(s.querySelectorAll(pa));s.id=i;return l;}if(t.settings.strict){function get(s,n){return s.getElementsByTagName(n.toLowerCase());};}else{function get(s,n){return s.getElementsByTagName(n);};}if(t.elmPattern.test(pa)){x=get(s,pa);for(i=0,l=x.length;i<l;i++)o.push(x[i]);return o;}if(t.elmClassPattern.test(pa)){pl=t.elmClassPattern.exec(pa);x=get(s,pl[1]||'*');c=' '+pl[2]+' ';for(i=0,l=x.length;i<l;i++){n=x[i];if(n.className&&(' '+n.className+' ').indexOf(c)!==-1)o.push(n);}return o;}function collect(n){if(!n.mce_save){n.mce_save=1;o.push(n);}};function collectIE(n){if(!n.getAttribute('mce_save')){n.setAttribute('mce_save','1');o.push(n);}};function find(n,f,r){var i,l,nl=get(r,n);for(i=0,l=nl.length;i<l;i++)f(nl[i]);};each(pa.split(','),function(v,i){v=tinymce.trim(v);if(t.elmPattern.test(v)){each(get(s,v),function(n){collect(n);});return;}if(t.elmClassPattern.test(v)){x=t.elmClassPattern.exec(v);each(get(s,x[1]),function(n){if(t.hasClass(n,x[2]))collect(n);});return;}if(!(cs=t.cache[pa])){cs='x=(function(cf, s) {';pl=v.split(' ');each(pl,function(v){var p=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@([\w\\]+)([\^\$\*!]?=)([\w\\]+)\])?(?:\:([\w\\]+))?/i.exec(v);p[1]=p[1]||'*';cs+='find("'+p[1]+'", function(n) {';if(p[2])cs+='if (n.id !== "'+p[2]+'") return;';if(p[3]){cs+='var c = " " + n.className + " ";';cs+='if (';c='';each(p[3].split('.'),function(v){if(v)c+=(c?'||':'')+'c.indexOf(" '+v+' ") === -1';});cs+=c+') return;';}});cs+='cf(n);';for(i=pl.length-1;i>=0;i--)cs+='}, '+(i?'n':'s')+');';cs+='})';t.cache[pa]=cs=eval(cs);}cs(isIE?collectIE:collect,s);});each(o,function(n){if(isIE)n.removeAttribute('mce_save');else delete n.mce_save;});return o;},add:function(p,n,a,h,c){var t=this;return this.run(p,function(p){var e,k;e=is(n,'string')?t.doc.createElement(n):n;if(a){for(k in a){if(a.hasOwnProperty(k)&&!is(a[k],'object'))t.setAttrib(e,k,''+a[k]);}if(a.style&&!is(a.style,'string')){each(a.style,function(v,n){t.setStyle(e,n,v);});}}if(h){if(h.nodeType)e.appendChild(h);else t.setHTML(e,h);}return!c?p.appendChild(e):e;});},create:function(n,a,h){return this.add(this.doc.createElement(n),n,a,h,1);},createHTML:function(n,a,h){var o='',t=this,k;o+='<'+n;for(k in a){if(a.hasOwnProperty(k))o+=' '+k+'="'+t.encode(a[k])+'"';}if(tinymce.is(h))return o+'>'+h+'</'+n+'>';return o+' />';},remove:function(n,k){return this.run(n,function(n){var p,g;p=n.parentNode;if(!p)return null;if(k){each(n.childNodes,function(c){p.insertBefore(c.cloneNode(true),n);});}return p.removeChild(n);});},setStyle:function(n,na,v){var t=this;return t.run(n,function(e){var s,i;s=e.style;na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();});if(t.pixelStyles.test(na)&&(tinymce.is(v,'number')||/^[\-0-9\.]+$/.test(v)))v+='px';switch(na){case'opacity':if(isIE){s.filter=v===''?'':"alpha(opacity="+(v*100)+")";if(!n.currentStyle||!n.currentStyle.hasLayout)s.display='inline-block';}s[na]=s['-moz-opacity']=s['-khtml-opacity']=v||'';break;case'float':isIE?s.styleFloat=v:s.cssFloat=v;break;default:s[na]=v||'';}if(t.settings.update_styles)t.setAttrib(e,'mce_style');});},getStyle:function(n,na,c){n=this.get(n);if(!n)return false;if(this.doc.defaultView&&c){na=na.replace(/[A-Z]/g,function(a){return'-'+a;});try{return this.doc.defaultView.getComputedStyle(n,null).getPropertyValue(na);}catch(ex){return null;}}na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();});if(na=='float')na=isIE?'styleFloat':'cssFloat';if(n.currentStyle&&c)return n.currentStyle[na];return n.style[na];},setStyles:function(e,o){var t=this,s=t.settings,ol;ol=s.update_styles;s.update_styles=0;each(o,function(v,n){t.setStyle(e,n,v);});s.update_styles=ol;if(s.update_styles)t.setAttrib(e,s.cssText);},setAttrib:function(e,n,v){var t=this;if(t.settings.strict)n=n.toLowerCase();return this.run(e,function(e){var s=t.settings;switch(n){case"style":if(s.keep_values){if(v&&!t._isRes(v))e.setAttribute('mce_style',v,2);else e.removeAttribute('mce_style',2);}e.style.cssText=v;break;case"class":e.className=v||'';break;case"src":case"href":if(s.keep_values){if(s.url_converter)v=s.url_converter.call(s.url_converter_scope||t,v,n,e);t.setAttrib(e,'mce_'+n,v,2);}break;case"shape":e.setAttribute('mce_style',v);break;}if(is(v)&&v!==null&&v.length!==0)e.setAttribute(n,''+v,2);else e.removeAttribute(n,2);});},setAttribs:function(e,o){var t=this;return this.run(e,function(e){each(o,function(v,n){t.setAttrib(e,n,v);});});},getAttrib:function(e,n,dv){var v,t=this;e=t.get(e);if(!e||e.nodeType!==1)return false;if(!is(dv))dv="";if(/^(src|href|style|coords|shape)$/.test(n)){v=e.getAttribute("mce_"+n);if(v)return v;}v=e.getAttribute(n,2);if(!v){switch(n){case'class':v=e.className;break;default:if(isIE&&n==='name'&&e.nodeName==='A'){v=e.name;break;}v=e.attributes[n];v=v&&is(v.nodeValue)?v.nodeValue:v;}}switch(n){case'style':v=v||e.style.cssText;if(v){v=t.serializeStyle(t.parseStyle(v));if(t.settings.keep_values&&!t._isRes(v))e.setAttribute('mce_style',v);}break;}if(isWebKit&&n==="class"&&v)v=v.replace(/(apple|webkit)\-[a-z\-]+/gi,'');if(isIE){switch(n){case'rowspan':case'colspan':if(v===1)v='';break;case'size':if(v==='+0')v='';break;case'hspace':if(v===-1)v='';break;case'maxlength':case'tabindex':if(v===32768||v===2147483647)v='';break;case'noshade':if(v===65535)return'noshade';break;case'shape':v=v.toLowerCase();break;default:if(n.indexOf('on')===0&&v)v=(''+v).replace(/^function\s+anonymous\(\)\s+\{\s+(.*)\s+\}$/,'$1');}}return(v&&v!='')?''+v:dv;},getPos:function(n){var t=this,x=0,y=0,e,d=t.doc,r;n=t.get(n);if(n&&isIE){n=n.getBoundingClientRect();e=t.boxModel?d.documentElement:d.body;x=t.getStyle(t.select('html')[0],'borderWidth');x=(x=='medium'||t.boxModel&&!t.isIE6)&&2||x;n.top+=t.win.self!=t.win.top?2:0;return{x:n.left+e.scrollLeft-x,y:n.top+e.scrollTop-x};}r=n;while(r){x+=r.offsetLeft||0;y+=r.offsetTop||0;r=r.offsetParent;}r=n;while(r){if(!/^table-row|inline.*/i.test(t.getStyle(r,"display",1))){x-=r.scrollLeft||0;y-=r.scrollTop||0;}r=r.parentNode;if(r==d.body)break;}return{x:x,y:y};},parseStyle:function(st){var t=this,s=t.settings,o={};if(!st)return o;function compress(p,s,ot){var t,r,b,l;t=o[p+'-top'+s];if(!t)return;r=o[p+'-right'+s];if(t!=r)return;b=o[p+'-bottom'+s];if(r!=b)return;l=o[p+'-left'+s];if(b!=l)return;o[ot]=l;delete o[p+'-top'+s];delete o[p+'-right'+s];delete o[p+'-bottom'+s];delete o[p+'-left'+s];};function compress2(ta,a,b,c){var t;t=o[a];if(!t)return;t=o[b];if(!t)return;t=o[c];if(!t)return;o[ta]=o[a]+' '+o[b]+' '+o[c];delete o[a];delete o[b];delete o[c];};st=st.replace(/&(#?[a-z0-9]+);/g,'&$1_MCE_SEMI_');each(st.split(';'),function(v){var sv,ur=[];if(v){v=v.replace(/_MCE_SEMI_/g,';');v=v.replace(/url\([^\)]+\)/g,function(v){ur.push(v);return'url('+ur.length+')';});v=v.split(':');sv=tinymce.trim(v[1]);sv=sv.replace(/url\(([^\)]+)\)/g,function(a,b){return ur[parseInt(b)-1];});sv=sv.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);});if(s.url_converter){sv=sv.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(x,c){return'url('+s.url_converter.call(s.url_converter_scope||t,t.decode(c),'style',null)+')';});}o[tinymce.trim(v[0]).toLowerCase()]=sv;}});compress("border","","border");compress("border","-width","border-width");compress("border","-color","border-color");compress("border","-style","border-style");compress("padding","","padding");compress("margin","","margin");compress2('border','border-width','border-style','border-color');if(isIE){if(o.border=='medium none')o.border='';}return o;},serializeStyle:function(o){var s='';each(o,function(v,k){if(k&&v){if(tinymce.isGecko&&k.indexOf('-moz-')===0)return;switch(k){case'color':case'background-color':v=v.toLowerCase();break;}s+=(s?' ':'')+k+': '+v+';';}});return s;},loadCSS:function(u){var t=this,d=t.doc;if(!u)u='';each(u.split(','),function(u){if(t.files[u])return;t.files[u]=true;t.add(t.select('head')[0],'link',{rel:'stylesheet',href:tinymce._addVer(u)});});},addClass:function(e,c){return this.run(e,function(e){var o;if(!c)return 0;if(this.hasClass(e,c))return e.className;o=this.removeClass(e,c);return e.className=(o!=''?(o+' '):'')+c;});},removeClass:function(e,c){var t=this,re;return t.run(e,function(e){var v;if(t.hasClass(e,c)){if(!re)re=new RegExp("(^|\\s+)"+c+"(\\s+|$)","g");v=e.className.replace(re,' ');return e.className=tinymce.trim(v!=' '?v:'');}return e.className;});},hasClass:function(n,c){n=this.get(n);if(!n||!c)return false;return(' '+n.className+' ').indexOf(' '+c+' ')!==-1;},show:function(e){return this.setStyle(e,'display','block');},hide:function(e){return this.setStyle(e,'display','none');},isHidden:function(e){e=this.get(e);return e.style.display=='none'||this.getStyle(e,'display')=='none';},uniqueId:function(p){return(!p?'mce_':p)+(this.counter++);},setHTML:function(e,h){var t=this;return this.run(e,function(e){var x,i,nl,n,p,x;h=t.processHTML(h);if(isIE){function set(){try{e.innerHTML='<br />'+h;e.removeChild(e.firstChild);}catch(ex){while(e.firstChild)e.firstChild.removeNode();x=t.create('div');x.innerHTML='<br />'+h;each(x.childNodes,function(n,i){if(i)e.appendChild(n);});}};if(t.settings.fix_ie_paragraphs)h=h.replace(/<p><\/p>|<p([^>]+)><\/p>|<p[^\/+]\/>/gi,'<p$1 mce_keep="true"> </p>');set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("p");for(i=nl.length-1,x=0;i>=0;i--){n=nl[i];if(!n.hasChildNodes()){if(!n.mce_keep){x=1;break;}n.removeAttribute('mce_keep');}}}if(x){h=h.replace(/<p([^>]+)>|<p>/g,'<div$1 mce_tmp="1">');h=h.replace(/<\/p>/g,'</div>');set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("DIV");for(i=nl.length-1;i>=0;i--){n=nl[i];if(n.mce_tmp){p=t.doc.createElement('p');n.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(a,b){var v;if(b!=='mce_tmp'){v=n.getAttribute(b);if(!v&&b==='class')v=n.className;p.setAttribute(b,v);}});for(x=0;x<n.childNodes.length;x++)p.appendChild(n.childNodes[x].cloneNode(true));n.swapNode(p);}}}}}else e.innerHTML=h;return h;});},processHTML:function(h){var t=this,s=t.settings;if(!s.process_html)return h;if(tinymce.isGecko){h=h.replace(/<(\/?)strong>|<strong( [^>]+)>/gi,'<$1b$2>');h=h.replace(/<(\/?)em>|<em( [^>]+)>/gi,'<$1i$2>');}else if(isIE)h=h.replace(/'/g,''');h=h.replace(/<a( )([^>]+)\/>|<a\/>/gi,'<a$1$2></a>');if(s.keep_values){if(/<script|style/.test(h)){function trim(s){s=s.replace(/^[\r\n]*|[\r\n]*$/g,'');s=s.replace(/^\s*(\/\/\s*<!--|\/\/\s*<\[CDATA\[|<!--|<\[CDATA\[)[\r\n]*/g,'');s=s.replace(/\s*(\/\/\s*\]\]>|\/\/\s*-->|\]\]>|-->)\s*$/g,'');return s;};h=h.replace(/<script([^>]+|)>([\s\S]*?)<\/script>/g,function(v,a,b){b=trim(b);if(!a)a=' type="text/javascript"';if(b)b='<!--\n'+b+'\n// -->';return'<mce:script'+a+'>'+b+'</mce:script>';});h=h.replace(/<style([^>]+|)>([\s\S]*?)<\/style>/g,function(v,a,b){b=trim(b);return'<mce:style'+a+'><!--\n'+b+'\n--></mce:style><style'+a+' mce_bogus="1">'+b+'</style>';});}h=h.replace(/<([\w:]+) [^>]*(src|href|style|shape|coords)[^>]*>/gi,function(a,n){function handle(m,b,c){var u=c;if(a.indexOf('mce_'+b)!=-1)return m;if(b=='style'){if(t._isRes(c))return m;if(s.hex_colors){u=u.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);});}if(s.url_converter){u=u.replace(/url\([\'\"]?([^\)\'\"]+)\)/g,function(x,c){return'url('+t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n))+')';});}}else if(b!='coords'&&b!='shape'){if(s.url_converter)u=t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n));}return' '+b+'="'+c+'" mce_'+b+'="'+u+'"';};a=a.replace(/ (src|href|style|coords|shape)=[\"]([^\"]+)[\"]/gi,handle);a=a.replace(/ (src|href|style|coords|shape)=[\']([^\']+)[\']/gi,handle);return a.replace(/ (src|href|style|coords|shape)=([^\s\"\'>]+)/gi,handle);});}return h;},getOuterHTML:function(e){var d;e=this.get(e);if(!e)return null;if(isIE)return e.outerHTML;d=(e.ownerDocument||this.doc).createElement("body");d.appendChild(e.cloneNode(true));return d.innerHTML;},setOuterHTML:function(e,h,d){var t=this;return this.run(e,function(e){var n,tp;e=t.get(e);d=d||e.ownerDocument||t.doc;if(isIE&&e.nodeType==1)e.outerHTML=h;else{tp=d.createElement("body");tp.innerHTML=h;n=tp.lastChild;while(n){t.insertAfter(n.cloneNode(true),e);n=n.previousSibling;}t.remove(e);}});},decode:function(s){var e;if(/&[^;]+;/.test(s)){e=this.doc.createElement("div");e.innerHTML=s;return!e.firstChild?s:e.firstChild.nodeValue;}return s;},encode:function(s){return s?(''+s).replace(/[<>&\"]/g,function(c,b){switch(c){case'&':return'&';case'"':return'"';case'<':return'<';case'>':return'>';}return c;}):s;},insertAfter:function(n,r){var t=this;r=t.get(r);return this.run(n,function(n){var p,ns;p=r.parentNode;ns=r.nextSibling;if(ns)p.insertBefore(n,ns);else p.appendChild(n);return n;});},isBlock:function(n){if(n.nodeType&&n.nodeType!==1)return false;n=n.nodeName||n;return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n);},replace:function(n,o,k){if(is(o,'array'))n=n.cloneNode(true);return this.run(o,function(o){if(k){each(o.childNodes,function(c){n.appendChild(c.cloneNode(true));});}return o.parentNode.replaceChild(n,o);});},toHex:function(s){var c=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(s);function hex(s){s=parseInt(s).toString(16);return s.length>1?s:'0'+s;};if(c){s='#'+hex(c[1])+hex(c[2])+hex(c[3]);return s;}return s;},getClasses:function(){var t=this,cl=[],i,lo={},f=t.settings.class_filter,ov;if(t.classes)return t.classes;function addClasses(s){each(s.imports,function(r){addClasses(r);});each(s.cssRules||s.rules,function(r){switch(r.type||1){case 1:if(r.selectorText){each(r.selectorText.split(','),function(v){v=v.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(v)||!/\.[\w\-]+$/.test(v))return;ov=v;v=v.replace(/.*\.([a-z0-9_\-]+).*/i,'$1');if(f&&!(v=f(v,ov)))return;if(!lo[v]){cl.push({'class':v});lo[v]=1;}});}break;case 3:addClasses(r.styleSheet);break;}});};try{each(t.doc.styleSheets,addClasses);}catch(ex){}if(cl.length>0)t.classes=cl;return cl;},run:function(e,f,s){var t=this,o;if(t.doc&&typeof(e)==='string')e=t.doc.getElementById(e);if(!e)return false;s=s||this;if(!e.nodeType&&(e.length||e.length===0)){o=[];each(e,function(e,i){if(e){if(typeof(e)=='string')e=t.doc.getElementById(e);o.push(f.call(s,e,i));}});return o;}return f.call(s,e);},getAttribs:function(n){var o;n=this.get(n);if(!n)return[];if(isIE){o=[];if(n.nodeName=='OBJECT')return n.attributes;n.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(a,b){o.push({specified:1,nodeName:b});});return o;}return n.attributes;},destroy:function(s){var t=this;t.win=t.doc=t.root=null;if(!s)tinymce.removeUnload(t.destroy);},_isRes:function(c){return/^(top|left|bottom|right|width|height)/i.test(c)||/;\s*(top|left|bottom|right|width|height)/i.test(c);}});tinymce.DOM=new tinymce.dom.DOMUtils(document,{process_html:0});})();(function(){var each=tinymce.each,DOM=tinymce.DOM,isIE=tinymce.isIE,isWebKit=tinymce.isWebKit,Event;tinymce.create('static tinymce.dom.Event',{inits:[],events:[],add:function(o,n,f,s){var cb,t=this,el=t.events,r;if(o&&o instanceof Array){r=[];each(o,function(o){o=DOM.get(o);r.push(t.add(o,n,f,s));});return r;}o=DOM.get(o);if(!o)return;cb=function(e){e=e||window.event;if(e&&!e.target&&isIE)e.target=e.srcElement;if(!s)return f(e);return f.call(s,e);};if(n=='unload'){tinymce.unloads.unshift({func:cb});return cb;}if(n=='init'){if(t.domLoaded)cb();else t.inits.push(cb);return cb;}el.push({obj:o,name:n,func:f,cfunc:cb,scope:s});t._add(o,n,cb);return f;},remove:function(o,n,f){var t=this,a=t.events,s=false,r;if(o&&o instanceof Array){r=[];each(o,function(o){o=DOM.get(o);r.push(t.remove(o,n,f));});return r;}o=DOM.get(o);each(a,function(e,i){if(e.obj==o&&e.name==n&&(!f||(e.func==f||e.cfunc==f))){a.splice(i,1);t._remove(o,n,e.cfunc);s=true;return false;}});return s;},clear:function(o){var t=this,a=t.events,i,e;if(o){o=DOM.get(o);for(i=a.length-1;i>=0;i--){e=a[i];if(e.obj===o){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null;a.splice(i,1);}}}},cancel:function(e){if(!e)return false;this.stop(e);return this.prevent(e);},stop:function(e){if(e.stopPropagation)e.stopPropagation();else e.cancelBubble=true;return false;},prevent:function(e){if(e.preventDefault)e.preventDefault();else e.returnValue=false;return false;},_unload:function(){var t=Event;each(t.events,function(e,i){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null;});t.events=[];t=null;},_add:function(o,n,f){if(o.attachEvent)o.attachEvent('on'+n,f);else if(o.addEventListener)o.addEventListener(n,f,false);else o['on'+n]=f;},_remove:function(o,n,f){if(o){try{if(o.detachEvent)o.detachEvent('on'+n,f);else if(o.removeEventListener)o.removeEventListener(n,f,false);else o['on'+n]=null;}catch(ex){}}},_pageInit:function(){var e=Event;e._remove(window,'DOMContentLoaded',e._pageInit);e.domLoaded=true;each(e.inits,function(c){c();});e.inits=[];},_wait:function(){var t;if(window.tinyMCE_GZ&&tinyMCE_GZ.loaded){Event.domLoaded=1;return;}if(isIE&&document.location.protocol!='https:'){document.write('<script id=__ie_onload defer src=\'javascript:""\';><\/script>');DOM.get("__ie_onload").onreadystatechange=function(){if(this.readyState=="complete"){Event._pageInit();DOM.get("__ie_onload").onreadystatechange=null;}};}else{Event._add(window,'DOMContentLoaded',Event._pageInit,Event);if(isIE||isWebKit){t=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(t);Event._pageInit();}},10);}}}});Event=tinymce.dom.Event;Event._wait();tinymce.addUnload(Event._unload);})();(function(){var each=tinymce.each;tinymce.create('tinymce.dom.Element',{Element:function(id,s){var t=this,dom,el;s=s||{};t.id=id;t.dom=dom=s.dom||tinymce.DOM;t.settings=s;if(!tinymce.isIE)el=t.dom.get(t.id);each(['getPos','getRect','getParent','add','setStyle','getStyle','setStyles','setAttrib','setAttribs','getAttrib','addClass','removeClass','hasClass','getOuterHTML','setOuterHTML','remove','show','hide','isHidden','setHTML','get'],function(k){t[k]=function(){var a=arguments,o;if(tinymce.isOpera){a=[id];each(arguments,function(v){a.push(v);});}else Array.prototype.unshift.call(a,el||id);o=dom[k].apply(dom,a);t.update(k);return o;};});},on:function(n,f,s){return tinymce.dom.Event.add(this.id,n,f,s);},getXY:function(){return{x:parseInt(this.getStyle('left')),y:parseInt(this.getStyle('top'))};},getSize:function(){var n=this.dom.get(this.id);return{w:parseInt(this.getStyle('width')||n.clientWidth),h:parseInt(this.getStyle('height')||n.clientHeight)};},moveTo:function(x,y){this.setStyles({left:x,top:y});},moveBy:function(x,y){var p=this.getXY();this.moveTo(p.x+x,p.y+y);},resizeTo:function(w,h){this.setStyles({width:w,height:h});},resizeBy:function(w,h){var s=this.getSize();this.resizeTo(s.w+w,s.h+h);},update:function(k){var t=this,b,dom=t.dom;if(tinymce.isIE6&&t.settings.blocker){k=k||'';if(k.indexOf('get')===0||k.indexOf('has')===0||k.indexOf('is')===0)return;if(k=='remove'){dom.remove(t.blocker);return;}if(!t.blocker){t.blocker=dom.uniqueId();b=dom.add(t.settings.container||dom.getRoot(),'iframe',{id:t.blocker,style:'position:absolute;',frameBorder:0,src:'javascript:""'});dom.setStyle(b,'opacity',0);}else b=dom.get(t.blocker);dom.setStyle(b,'left',t.getStyle('left',1));dom.setStyle(b,'top',t.getStyle('top',1));dom.setStyle(b,'width',t.getStyle('width',1));dom.setStyle(b,'height',t.getStyle('height',1));dom.setStyle(b,'display',t.getStyle('display',1));dom.setStyle(b,'zIndex',parseInt(t.getStyle('zIndex',1)||0)-1);}}});})();(function(){function trimNl(s){return s.replace(/[\n\r]+/g,'');};var is=tinymce.is,isIE=tinymce.isIE,each=tinymce.each;tinymce.create('tinymce.dom.Selection',{Selection:function(dom,win,serializer){var t=this;t.dom=dom;t.win=win;t.serializer=serializer;tinymce.addUnload(t.destroy,t);},getContent:function(s){var t=this,r=t.getRng(),e=t.dom.create("body"),se=t.getSel(),wb,wa,n;s=s||{};wb=wa='';s.get=true;s.format=s.format||'html';if(s.format=='text')return t.isCollapsed()?'':(r.text||(se.toString?se.toString():''));if(r.cloneContents){n=r.cloneContents();if(n)e.appendChild(n);}else if(is(r.item)||is(r.htmlText))e.innerHTML=r.item?r.item(0).outerHTML:r.htmlText;else e.innerHTML=r.toString();if(/^\s/.test(e.innerHTML))wb=' ';if(/\s+$/.test(e.innerHTML))wa=' ';s.getInner=true;return t.isCollapsed()?'':wb+t.serializer.serialize(e,s)+wa;},setContent:function(h,s){var t=this,r=t.getRng(),d=t.win.document;s=s||{format:'html'};s.set=true;h=t.dom.processHTML(h);if(r.insertNode){if(tinymce.isGecko&&h.indexOf('<')==-1){r.deleteContents();r.insertNode(t.getRng().createContextualFragment(h+'<span id="__caret">_</span>'));t.select(t.dom.get('__caret'));t.getRng().deleteContents();return;}try{if(d.queryCommandEnabled('InsertHTML'))return d.execCommand('InsertHTML',false,h);}catch(ex){r.deleteContents();r.insertNode(t.getRng().createContextualFragment(h));}}else{if(r.item){d.execCommand('Delete',false,null);r=t.getRng();}r.pasteHTML(h);}},getStart:function(){var t=this,r=t.getRng(),e;if(isIE){if(r.item)return r.item(0);r=r.duplicate();r.collapse(1);e=r.parentElement();if(e&&e.nodeName=='BODY')return e.firstChild;return e;}else{e=r.startContainer;if(e.nodeName=='BODY')return e.firstChild;return t.dom.getParent(e,function(n){return n.nodeType==1;});}},getEnd:function(){var t=this,r=t.getRng(),e;if(isIE){if(r.item)return r.item(0);r=r.duplicate();r.collapse(0);e=r.parentElement();if(e&&e.nodeName=='BODY')return e.lastChild;return e;}else{e=r.endContainer;if(e.nodeName=='BODY')return e.lastChild;return t.dom.getParent(e,function(n){return n.nodeType==1;});}},getBookmark:function(si){var t=this,r=t.getRng(),tr,sx,sy,vp=t.dom.getViewPort(t.win),e,sp,bp,le,c=-0xFFFFFF,s,ro=t.dom.getRoot(),wb=0,wa=0,nv;sx=vp.x;sy=vp.y;if(si=='simple')return{rng:r,scrollX:sx,scrollY:sy};if(isIE){if(r.item){e=r.item(0);each(t.dom.select(e.nodeName),function(n,i){if(e==n){sp=i;return false;}});return{tag:e.nodeName,index:sp,scrollX:sx,scrollY:sy};}tr=t.dom.doc.body.createTextRange();tr.moveToElementText(ro);tr.collapse(true);bp=Math.abs(tr.move('character',c));tr=r.duplicate();tr.collapse(true);sp=Math.abs(tr.move('character',c));tr=r.duplicate();tr.collapse(false);le=Math.abs(tr.move('character',c))-sp;return{start:sp-bp,length:le,scrollX:sx,scrollY:sy};}e=t.getNode();s=t.getSel();if(!s)return null;if(e&&e.nodeName=='IMG'){return{scrollX:sx,scrollY:sy};}function getPos(r,sn,en){var w=t.dom.doc.createTreeWalker(r,NodeFilter.SHOW_TEXT,null,false),n,p=0,d={};while((n=w.nextNode())!=null){if(n==sn)d.start=p;if(n==en){d.end=p;return d;}p+=trimNl(n.nodeValue||'').length;}return null;};if(s.anchorNode==s.focusNode&&s.anchorOffset==s.focusOffset){e=getPos(ro,s.anchorNode,s.focusNode);if(!e)return{scrollX:sx,scrollY:sy};trimNl(s.anchorNode.nodeValue||'').replace(/^\s+/,function(a){wb=a.length;});return{start:Math.max(e.start+s.anchorOffset-wb,0),end:Math.max(e.end+s.focusOffset-wb,0),scrollX:sx,scrollY:sy,beg:s.anchorOffset-wb==0};}else{e=getPos(ro,r.startContainer,r.endContainer);if(!e)return{scrollX:sx,scrollY:sy};return{start:Math.max(e.start+r.startOffset-wb,0),end:Math.max(e.end+r.endOffset-wa,0),scrollX:sx,scrollY:sy,beg:r.startOffset-wb==0};}},moveToBookmark:function(b){var t=this,r=t.getRng(),s=t.getSel(),ro=t.dom.getRoot(),sd,nvl,nv;function getPos(r,sp,ep){var w=t.dom.doc.createTreeWalker(r,NodeFilter.SHOW_TEXT,null,false),n,p=0,d={},o,v,wa,wb;while((n=w.nextNode())!=null){wa=wb=0;nv=n.nodeValue||'';nvl=trimNl(nv).length;p+=nvl;if(p>=sp&&!d.startNode){o=sp-(p-nvl);if(b.beg&&o>=nvl)continue;d.startNode=n;d.startOffset=o+wb;}if(p>=ep){d.endNode=n;d.endOffset=ep-(p-nvl)+wb;return d;}}return null;};if(!b)return false;t.win.scrollTo(b.scrollX,b.scrollY);if(isIE){if(r=b.rng){try{r.select();}catch(ex){}return true;}t.win.focus();if(b.tag){r=ro.createControlRange();each(t.dom.select(b.tag),function(n,i){if(i==b.index)r.addElement(n);});}else{try{if(b.start<0)return true;r=s.createRange();r.moveToElementText(ro);r.collapse(true);r.moveStart('character',b.start);r.moveEnd('character',b.length);}catch(ex2){return true;}}try{r.select();}catch(ex){}return true;}if(!s)return false;if(b.rng){s.removeAllRanges();s.addRange(b.rng);}else{if(is(b.start)&&is(b.end)){try{sd=getPos(ro,b.start,b.end);if(sd){r=t.dom.doc.createRange();r.setStart(sd.startNode,sd.startOffset);r.setEnd(sd.endNode,sd.endOffset);s.removeAllRanges();s.addRange(r);}if(!tinymce.isOpera)t.win.focus();}catch(ex){}}}},select:function(n,c){var t=this,r=t.getRng(),s=t.getSel(),b,fn,ln,d=t.win.document;function first(n){return n?d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false).nextNode():null;};function last(n){var c,o,w;if(!n)return null;w=d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false);while(c=w.nextNode())o=c;return o;};if(isIE){try{b=d.body;if(/^(IMG|TABLE)$/.test(n.nodeName)){r=b.createControlRange();r.addElement(n);}else{r=b.createTextRange();r.moveToElementText(n);}r.select();}catch(ex){}}else{if(c){fn=first(n);ln=last(n);if(fn&&ln){r=d.createRange();r.setStart(fn,0);r.setEnd(ln,ln.nodeValue.length);}else r.selectNode(n);}else r.selectNode(n);t.setRng(r);}return n;},isCollapsed:function(){var t=this,r=t.getRng(),s=t.getSel();if(!r||r.item)return false;return!s||r.boundingWidth==0||s.isCollapsed;},collapse:function(b){var t=this,r=t.getRng(),n;if(r.item){n=r.item(0);r=this.win.document.body.createTextRange();r.moveToElementText(n);}r.collapse(!!b);t.setRng(r);},getSel:function(){var t=this,w=this.win;return w.getSelection?w.getSelection():w.document.selection;},getRng:function(){var t=this,s=t.getSel(),r;try{if(s)r=s.rangeCount>0?s.getRangeAt(0):(s.createRange?s.createRange():t.win.document.createRange());}catch(ex){}if(!r)r=isIE?t.win.document.body.createTextRange():t.win.document.createRange();return r;},setRng:function(r){var s;if(!isIE){s=this.getSel();if(s){s.removeAllRanges();s.addRange(r);}}else{try{r.select();}catch(ex){}}},setNode:function(n){var t=this;t.setContent(t.dom.getOuterHTML(n));return n;},getNode:function(){var t=this,r=t.getRng(),s=t.getSel(),e;if(!isIE){if(!r)return t.dom.getRoot();e=r.commonAncestorContainer;if(!r.collapsed){if(tinymce.isWebKit&&s.anchorNode&&s.anchorNode.nodeType==1)return s.anchorNode.childNodes[s.anchorOffset];if(r.startContainer==r.endContainer){if(r.startOffset-r.endOffset<2){if(r.startContainer.hasChildNodes())e=r.startContainer.childNodes[r.startOffset];}}}return t.dom.getParent(e,function(n){return n.nodeType==1;});}return r.item?r.item(0):r.parentElement();},destroy:function(s){var t=this;t.win=null;if(!s)tinymce.removeUnload(t.destroy);}});})();(function(){tinymce.create('tinymce.dom.XMLWriter',{node:null,XMLWriter:function(s){function getXML(){var i=document.implementation;if(!i||!i.createDocument){try{return new ActiveXObject('MSXML2.DOMDocument');}catch(ex){}try{return new ActiveXObject('Microsoft.XmlDom');}catch(ex){}}else return i.createDocument('','',null);};this.doc=getXML();this.valid=tinymce.isOpera||tinymce.isWebKit;this.reset();},reset:function(){var t=this,d=t.doc;if(d.firstChild)d.removeChild(d.firstChild);t.node=d.appendChild(d.createElement("html"));},writeStartElement:function(n){var t=this;t.node=t.node.appendChild(t.doc.createElement(n));},writeAttribute:function(n,v){if(this.valid)v=v.replace(/>/g,'%MCGT%');this.node.setAttribute(n,v);},writeEndElement:function(){this.node=this.node.parentNode;},writeFullEndElement:function(){var t=this,n=t.node;n.appendChild(t.doc.createTextNode(""));t.node=n.parentNode;},writeText:function(v){if(this.valid)v=v.replace(/>/g,'%MCGT%');this.node.appendChild(this.doc.createTextNode(v));},writeCDATA:function(v){this.node.appendChild(this.doc.createCDATA(v));},writeComment:function(v){this.node.appendChild(this.doc.createComment(v.replace(/\-\-/g,' ')));},getContent:function(){var h;h=this.doc.xml||new XMLSerializer().serializeToString(this.doc);h=h.replace(/<\?[^?]+\?>|<html>|<\/html>|<html\/>|<!DOCTYPE[^>]+>/g,'');h=h.replace(/ ?\/>/g,' />');if(this.valid)h=h.replace(/\%MCGT%/g,'>');return h;}});})();(function(){tinymce.create('tinymce.dom.StringWriter',{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(s){this.settings=tinymce.extend({indent_char:' ',indentation:1},s);this.reset();},reset:function(){this.indent='';this.str="";this.tags=[];this.count=0;},writeStartElement:function(n){this._writeAttributesEnd();this.writeRaw('<'+n);this.tags.push(n);this.inAttr=true;this.count++;this.elementCount=this.count;},writeAttribute:function(n,v){var t=this;t.writeRaw(" "+t.encode(n)+'="'+t.encode(v)+'"');},writeEndElement:function(){var n;if(this.tags.length>0){n=this.tags.pop();if(this._writeAttributesEnd(1))this.writeRaw('</'+n+'>');if(this.settings.indentation>0)this.writeRaw('\n');}},writeFullEndElement:function(){if(this.tags.length>0){this._writeAttributesEnd();this.writeRaw('</'+this.tags.pop()+'>');if(this.settings.indentation>0)this.writeRaw('\n');}},writeText:function(v){this._writeAttributesEnd();this.writeRaw(this.encode(v));this.count++;},writeCDATA:function(v){this._writeAttributesEnd();this.writeRaw('<![CDATA['+v+']]>');this.count++;},writeComment:function(v){this._writeAttributesEnd();this.writeRaw('<!-- '+v+'-->');this.count++;},writeRaw:function(v){this.str+=v;},encode:function(s){return s.replace(/[<>&"]/g,function(v){switch(v){case'<':return'<';case'>':return'>';case'&':return'&';case'"':return'"';}return v;});},getContent:function(){return this.str;},_writeAttributesEnd:function(s){if(!this.inAttr)return;this.inAttr=false;if(s&&this.elementCount==this.count){this.writeRaw(' />');return false;}this.writeRaw('>');return true;}});})();(function(){var extend=tinymce.extend,each=tinymce.each,Dispatcher=tinymce.util.Dispatcher,isIE=tinymce.isIE,isGecko=tinymce.isGecko;function getIEAtts(n){var o=[];if(n.nodeName=='OBJECT')return n.attributes;n.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(a,b){o.push({specified:1,nodeName:b});});return o;};function wildcardToRE(s){return s.replace(/([?+*])/g,'.$1');};tinymce.create('tinymce.dom.Serializer',{Serializer:function(s){var t=this;t.key=0;t.onPreProcess=new Dispatcher(t);t.onPostProcess=new Dispatcher(t);if(tinymce.relaxedDomain&&tinymce.isGecko){t.writer=new tinymce.dom.StringWriter();}else{try{t.writer=new tinymce.dom.XMLWriter();}catch(ex){t.writer=new tinymce.dom.StringWriter();}}t.settings=s=extend({dom:tinymce.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(mce_|_moz_)/,closed:/(br|hr|input|meta|img|link|param)/,entity_encoding:'named',entities:'160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro',valid_elements:'*[*]',extended_valid_elements:0,valid_child_elements:0,invalid_elements:0,fix_table_elements:0,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,font_size_style_values:0,apply_source_formatting:0,indent_mode:'simple',indent_char:'\t',indent_levels:1,remove_linebreaks:1},s);t.dom=s.dom;if(s.fix_list_elements){t.onPreProcess.add(function(se,o){var nl,x,a=['ol','ul'],i,n,p,r=/^(OL|UL)$/,np;function prevNode(e,n){var a=n.split(','),i;while((e=e.previousSibling)!=null){for(i=0;i<a.length;i++){if(e.nodeName==a[i])return e;}}return null;};for(x=0;x<a.length;x++){nl=t.dom.select(a[x],o.node);for(i=0;i<nl.length;i++){n=nl[i];p=n.parentNode;if(r.test(p.nodeName)){np=prevNode(n,'LI');if(!np){np=t.dom.create('li');np.innerHTML=' ';np.appendChild(n);p.insertBefore(np,p.firstChild);}else np.appendChild(n);}}}});}if(s.fix_table_elements){t.onPreProcess.add(function(se,o){each(t.dom.select('table',o.node),function(e){var pa=t.dom.getParent(e,'H1,H2,H3,H4,H5,H6,P'),pa2,n,tm,pl=[],i,ns;if(pa){pa2=pa.cloneNode(false);pl.push(e);for(n=e;n=n.parentNode;){pl.push(n);if(n==pa)break;}tm=pa2;for(i=pl.length-1;i>=0;i--){if(i==pl.length-1){while(ns=pl[i-1].nextSibling)tm.appendChild(ns.parentNode.removeChild(ns));}else{n=pl[i].cloneNode(false);if(i!=0){while(ns=pl[i-1].nextSibling)n.appendChild(ns.parentNode.removeChild(ns));}tm=tm.appendChild(n);}}e=t.dom.insertAfter(e.parentNode.removeChild(e),pa);t.dom.insertAfter(e,pa);t.dom.insertAfter(pa2,e);}});});}},setEntities:function(s){var t=this,a,i,l={},re='',v;if(t.entityLookup)return;a=s.split(',');for(i=0;i<a.length;i+=2){v=a[i];if(v==34||v==38||v==60||v==62)continue;l[String.fromCharCode(a[i])]=a[i+1];v=parseInt(a[i]).toString(16);re+='\\u'+'0000'.substring(v.length)+v;}if(!re){t.settings.entity_encoding='raw';return;}t.entitiesRE=new RegExp('['+re+']','g');t.entityLookup=l;},setValidChildRules:function(s){this.childRules=null;this.addValidChildRules(s);},addValidChildRules:function(s){var t=this,inst,intr,bloc;if(!s)return;inst='A|BR|SPAN|BDO|MAP|OBJECT|IMG|TT|I|B|BIG|SMALL|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|#text|#comment';intr='A|BR|SPAN|BDO|OBJECT|APPLET|IMG|MAP|IFRAME|TT|I|B|U|S|STRIKE|BIG|SMALL|FONT|BASEFONT|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|INPUT|SELECT|TEXTAREA|LABEL|BUTTON|#text|#comment';bloc='H[1-6]|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|FORM|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP';each(s.split(','),function(s){var p=s.split(/\[|\]/),re;s='';each(p[1].split('|'),function(v){if(s)s+='|';switch(v){case'%itrans':v=intr;break;case'%itrans_na':v=intr.substring(2);break;case'%istrict':v=inst;break;case'%istrict_na':v=inst.substring(2);break;case'%btrans':v=bloc;break;case'%bstrict':v=bloc;break;}s+=v;});re=new RegExp('^('+s.toLowerCase()+')$','i');each(p[0].split('/'),function(s){t.childRules=t.childRules||{};t.childRules[s]=re;});});s='';each(t.childRules,function(v,k){if(s)s+='|';s+=k;});t.parentElementsRE=new RegExp('^('+s.toLowerCase()+')$','i');},setRules:function(s){var t=this;t._setup();t.rules={};t.wildRules=[];t.validElements={};return t.addRules(s);},addRules:function(s){var t=this,dr;if(!s)return;t._setup();each(s.split(','),function(s){var p=s.split(/\[|\]/),tn=p[0].split('/'),ra,at,wat,va=[];if(dr)at=tinymce.extend([],dr.attribs);if(p.length>1){each(p[1].split('|'),function(s){var ar={},i;at=at||[];s=s.replace(/::/g,'~');s=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(s);s[2]=s[2].replace(/~/g,':');if(s[1]=='!'){ra=ra||[];ra.push(s[2]);}if(s[1]=='-'){for(i=0;i<at.length;i++){if(at[i].name==s[2]){at.splice(i,1);return;}}}switch(s[3]){case'=':ar.defaultVal=s[4]||'';break;case':':ar.forcedVal=s[4];break;case'<':ar.validVals=s[4].split('?');break;}if(/[*.?]/.test(s[2])){wat=wat||[];ar.nameRE=new RegExp('^'+wildcardToRE(s[2])+'$');wat.push(ar);}else{ar.name=s[2];at.push(ar);}va.push(s[2]);});}each(tn,function(s,i){var pr=s.charAt(0),x=1,ru={};if(dr){if(dr.noEmpty)ru.noEmpty=dr.noEmpty;if(dr.fullEnd)ru.fullEnd=dr.fullEnd;if(dr.padd)ru.padd=dr.padd;}switch(pr){case'-':ru.noEmpty=true;break;case'+':ru.fullEnd=true;break;case'#':ru.padd=true;break;default:x=0;}tn[i]=s=s.substring(x);t.validElements[s]=1;if(/[*.?]/.test(tn[0])){ru.nameRE=new RegExp('^'+wildcardToRE(tn[0])+'$');t.wildRules=t.wildRules||{};t.wildRules.push(ru);}else{ru.name=tn[0];if(tn[0]=='@')dr=ru;t.rules[s]=ru;}ru.attribs=at;if(ra)ru.requiredAttribs=ra;if(wat){s='';each(va,function(v){if(s)s+='|';s+='('+wildcardToRE(v)+')';});ru.validAttribsRE=new RegExp('^'+s.toLowerCase()+'$');ru.wildAttribs=wat;}});});s='';each(t.validElements,function(v,k){if(s)s+='|';if(k!='@')s+=k;});t.validElementsRE=new RegExp('^('+wildcardToRE(s.toLowerCase())+')$');},findRule:function(n){var t=this,rl=t.rules,i,r;t._setup();r=rl[n];if(r)return r;rl=t.wildRules;for(i=0;i<rl.length;i++){if(rl[i].nameRE.test(n))return rl[i];}return null;},findAttribRule:function(ru,n){var i,wa=ru.wildAttribs;for(i=0;i<wa.length;i++){if(wa[i].nameRE.test(n))return wa[i];}return null;},serialize:function(n,o){var h,t=this;t._setup();o=o||{};o.format=o.format||'html';t.processObj=o;n=n.cloneNode(true);t.key=''+(parseInt(t.key)+1);if(!o.no_events){o.node=n;t.onPreProcess.dispatch(t,o);}t.writer.reset();t._serializeNode(n,o.getInner);o.content=t.writer.getContent();if(!o.no_events)t.onPostProcess.dispatch(t,o);t._postProcess(o);o.node=null;return tinymce.trim(o.content);},_postProcess:function(o){var t=this,s=t.settings,h=o.content,sc=[],p;if(o.format=='html'){p=t._protect({content:h,patterns:[{pattern:/(<script[^>]*>)(.*?)(<\/script>)/g},{pattern:/(<style[^>]*>)(.*?)(<\/style>)/g},{pattern:/(<pre[^>]*>)(.*?)(<\/pre>)/g,encode:1}]});h=p.content;if(s.entity_encoding!=='raw')h=t._encode(h);if(!o.set){h=h.replace(/<p>\s+<\/p>|<p([^>]+)>\s+<\/p>/g,s.entity_encoding=='numeric'?'<p$1> </p>':'<p$1> </p>');if(s.remove_linebreaks){h=h.replace(/\r?\n|\r/g,' ');h=h.replace(/(<[^>]+>)\s+/g,'$1 ');h=h.replace(/\s+(<\/[^>]+>)/g,' $1');h=h.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object) ([^>]+)>\s+/g,'<$1 $2>');h=h.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>\s+/g,'<$1>');h=h.replace(/\s+<\/(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>/g,'</$1>');}if(s.apply_source_formatting&&s.indent_mode=='simple'){h=h.replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,'\n<$1$2$3>\n');h=h.replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,'\n<$1$2>');h=h.replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,'</$1>\n');h=h.replace(/\n\n/g,'\n');}}h=t._unprotect(h,p);if(s.entity_encoding=='raw')h=h.replace(/<p> <\/p>|<p([^>]+)> <\/p>/g,'<p$1>\u00a0</p>');}o.content=h;},_serializeNode:function(n,inn){var t=this,s=t.settings,w=t.writer,hc,el,cn,i,l,a,at,no,v,nn,ru,ar,iv;if(!s.node_filter||s.node_filter(n)){switch(n.nodeType){case 1:if(n.hasAttribute?n.hasAttribute('mce_bogus'):n.getAttribute('mce_bogus'))return;iv=false;hc=n.hasChildNodes();nn=n.getAttribute('mce_name')||n.nodeName.toLowerCase();if(isIE){if(n.scopeName!=='HTML'&&n.scopeName!=='html')nn=n.scopeName+':'+nn;}if(nn.indexOf('mce:')===0)nn=nn.substring(4);if(!t.validElementsRE.test(nn)||(t.invalidElementsRE&&t.invalidElementsRE.test(nn))||inn){iv=true;break;}if(isIE){if(s.fix_content_duplication){if(n.mce_serialized==t.key)return;n.mce_serialized=t.key;}if(nn.charAt(0)=='/')nn=nn.substring(1);}else if(isGecko){if(n.nodeName==='BR'&&n.getAttribute('type')=='_moz')return;}if(t.childRules){if(t.parentElementsRE.test(t.elementName)){if(!t.childRules[t.elementName].test(nn)){iv=true;break;}}t.elementName=nn;}ru=t.findRule(nn);nn=ru.name||nn;if((!hc&&ru.noEmpty)||(isIE&&!nn)){iv=true;break;}if(ru.requiredAttribs){a=ru.requiredAttribs;for(i=a.length-1;i>=0;i--){if(this.dom.getAttrib(n,a[i])!=='')break;}if(i==-1){iv=true;break;}}w.writeStartElement(nn);if(ru.attribs){for(i=0,at=ru.attribs,l=at.length;i<l;i++){a=at[i];v=t._getAttrib(n,a);if(v!==null)w.writeAttribute(a.name,v);}}if(ru.validAttribsRE){at=isIE?getIEAtts(n):n.attributes;for(i=at.length-1;i>-1;i--){no=at[i];if(no.specified){a=no.nodeName.toLowerCase();if(s.invalid_attrs.test(a)||!ru.validAttribsRE.test(a))continue;ar=t.findAttribRule(ru,a);v=t._getAttrib(n,ar,a);if(v!==null)w.writeAttribute(a,v);}}}if(!hc&&ru.padd)w.writeText('\u00a0');break;case 3:if(t.childRules&&t.parentElementsRE.test(t.elementName)){if(!t.childRules[t.elementName].test(n.nodeName))return;}return w.writeText(n.nodeValue);case 4:return w.writeCDATA(n.nodeValue);case 8:return w.writeComment(n.nodeValue);}}else if(n.nodeType==1)hc=n.hasChildNodes();if(hc){cn=n.firstChild;while(cn){t._serializeNode(cn);t.elementName=nn;cn=cn.nextSibling;}}if(!iv){if(hc||!s.closed.test(nn))w.writeFullEndElement();else w.writeEndElement();}},_protect:function(o){var t=this;o.items=o.items||[];function enc(s){return s.replace(/[\r\n\\]/g,function(c){if(c==='\n')return'\\n';else if(c==='\\')return'\\\\';return'\\r';});};function dec(s){return s.replace(/\\[\\rn]/g,function(c){if(c==='\\n')return'\n';else if(c==='\\\\')return'\\';return'\r';});};each(o.patterns,function(p){o.content=dec(enc(o.content).replace(p.pattern,function(x,a,b,c){b=dec(b);if(p.encode)b=t._encode(b);o.items.push(b);return a+'<!--mce:'+(o.items.length-1)+'-->'+c;}));});return o;},_unprotect:function(h,o){h=h.replace(/\<!--mce:([0-9]+)--\>/g,function(a,b){return o.items[parseInt(b)];});o.items=[];return h;},_encode:function(h){var t=this,s=t.settings,l;if(s.entity_encoding!=='raw'){if(s.entity_encoding.indexOf('named')!=-1){t.setEntities(s.entities);l=t.entityLookup;h=h.replace(t.entitiesRE,function(a){var v;if(v=l[a])a='&'+v+';';return a;});}if(s.entity_encoding.indexOf('numeric')!=-1){h=h.replace(/[\u007E-\uFFFF]/g,function(a){return'&#'+a.charCodeAt(0)+';';});}}return h;},_setup:function(){var t=this,s=this.settings;if(t.done)return;t.done=1;t.setRules(s.valid_elements);t.addRules(s.extended_valid_elements);t.addValidChildRules(s.valid_child_elements);if(s.invalid_elements)t.invalidElementsRE=new RegExp('^('+wildcardToRE(s.invalid_elements.replace(/,/g,'|').toLowerCase())+')$');if(s.attrib_value_filter)t.attribValueFilter=s.attribValueFilter;},_getAttrib:function(n,a,na){var i,v;na=na||a.name;if(a.forcedVal&&(v=a.forcedVal)){if(v==='{$uid}')return this.dom.uniqueId();return v;}v=this.dom.getAttrib(n,na);switch(na){case'rowspan':case'colspan':if(v=='1')v='';break;}if(this.attribValueFilter)v=this.attribValueFilter(na,v,n);if(a.validVals){for(i=a.validVals.length-1;i>=0;i--){if(v==a.validVals[i])break;}if(i==-1)return null;}if(v===''&&typeof(a.defaultVal)!='undefined'){v=a.defaultVal;if(v==='{$uid}')return this.dom.uniqueId();return v;}else{if(na=='class'&&this.processObj.get)v=v.replace(/\s?mceItem\w+\s?/g,'');}if(v==='')return null;return v;}});})();(function(){var each=tinymce.each;tinymce.create('tinymce.dom.ScriptLoader',{ScriptLoader:function(s){this.settings=s||{};this.queue=[];this.lookup={};},isDone:function(u){return this.lookup[u]?this.lookup[u].state==2:0;},markDone:function(u){this.lookup[u]={state:2,url:u};},add:function(u,cb,s,pr){var t=this,lo=t.lookup,o;if(o=lo[u]){if(cb&&o.state==2)cb.call(s||this);return o;}o={state:0,url:u,func:cb,scope:s||this};if(pr)t.queue.unshift(o);else t.queue.push(o);lo[u]=o;return o;},load:function(u,cb,s){var t=this,o;if(o=t.lookup[u]){if(cb&&o.state==2)cb.call(s||t);return o;}function loadScript(u){if(tinymce.dom.Event.domLoaded||t.settings.strict_mode){tinymce.util.XHR.send({url:tinymce._addVer(u),error:t.settings.error,async:false,success:function(co){t.eval(co);}});}else document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"></script>');};if(!tinymce.is(u,'string')){each(u,function(u){loadScript(u);});if(cb)cb.call(s||t);}else{loadScript(u);if(cb)cb.call(s||t);}},loadQueue:function(cb,s){var t=this;if(!t.queueLoading){t.queueLoading=1;t.queueCallbacks=[];t.loadScripts(t.queue,function(){t.queueLoading=0;if(cb)cb.call(s||t);each(t.queueCallbacks,function(o){o.func.call(o.scope);});});}else if(cb)t.queueCallbacks.push({func:cb,scope:s||t});},eval:function(co){var w=window;if(!w.execScript){try{eval.call(w,co);}catch(ex){eval(co,w);}}else w.execScript(co);},loadScripts:function(sc,cb,s){var t=this,lo=t.lookup;function done(o){o.state=2;if(o.func)o.func.call(o.scope||t);};function allDone(){var l;l=sc.length;each(sc,function(o){o=lo[o.url];if(o.state===2){done(o);l--;}else load(o);});if(l===0&&cb){cb.call(s||t);cb=0;}};function load(o){if(o.state>0)return;o.state=1;tinymce.util.XHR.send({url:o.url,error:t.settings.error,success:function(co){t.eval(co);done(o);allDone();}});};each(sc,function(o){var u=o.url;if(!lo[u]){lo[u]=o;t.queue.push(o);}else o=lo[u];if(o.state>0)return;if(!tinymce.dom.Event.domLoaded&&!t.settings.strict_mode){var ix,ol='';if(cb||o.func){o.state=1;ix=tinymce.dom.ScriptLoader._addOnLoad(function(){done(o);allDone();});if(tinymce.isIE)ol=' onreadystatechange="';else ol=' onload="';ol+='tinymce.dom.ScriptLoader._onLoad(this,\''+u+'\','+ix+');"';}document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"'+ol+'></script>');if(!o.func)done(o);}else load(o);});allDone();},'static':{_addOnLoad:function(f){var t=this;t._funcs=t._funcs||[];t._funcs.push(f);return t._funcs.length-1;},_onLoad:function(e,u,ix){if(!tinymce.isIE||e.readyState=='complete')this._funcs[ix].call(this);}}});tinymce.ScriptLoader=new tinymce.dom.ScriptLoader();})();(function(){var DOM=tinymce.DOM,is=tinymce.is;tinymce.create('tinymce.ui.Control',{Control:function(id,s){this.id=id;this.settings=s=s||{};this.rendered=false;this.onRender=new tinymce.util.Dispatcher(this);this.classPrefix='';this.scope=s.scope||this;this.disabled=0;this.active=0;},setDisabled:function(s){var e;if(s!=this.disabled){e=DOM.get(this.id);if(e&&this.settings.unavailable_prefix){if(s){this.prevTitle=e.title;e.title=this.settings.unavailable_prefix+": "+e.title;}else e.title=this.prevTitle;}this.setState('Disabled',s);this.setState('Enabled',!s);this.disabled=s;}},isDisabled:function(){return this.disabled;},setActive:function(s){if(s!=this.active){this.setState('Active',s);this.active=s;}},isActive:function(){return this.active;},setState:function(c,s){var n=DOM.get(this.id);c=this.classPrefix+c;if(s)DOM.addClass(n,c);else DOM.removeClass(n,c);},isRendered:function(){return this.rendered;},renderHTML:function(){},renderTo:function(n){DOM.setHTML(n,this.renderHTML());},postRender:function(){var t=this,b;if(is(t.disabled)){b=t.disabled;t.disabled=-1;t.setDisabled(b);}if(is(t.active)){b=t.active;t.active=-1;t.setActive(b);}},remove:function(){DOM.remove(this.id);this.destroy();},destroy:function(){tinymce.dom.Event.clear(this.id);}});})();tinymce.create('tinymce.ui.Container:tinymce.ui.Control',{Container:function(id,s){this.parent(id,s);this.controls=[];this.lookup={};},add:function(c){this.lookup[c.id]=c;this.controls.push(c);return c;},get:function(n){return this.lookup[n];}});tinymce.create('tinymce.ui.Separator:tinymce.ui.Control',{Separator:function(id,s){this.parent(id,s);this.classPrefix='mceSeparator';},renderHTML:function(){return tinymce.DOM.createHTML('span',{'class':this.classPrefix});}});(function(){var is=tinymce.is,DOM=tinymce.DOM,each=tinymce.each,walk=tinymce.walk;tinymce.create('tinymce.ui.MenuItem:tinymce.ui.Control',{MenuItem:function(id,s){this.parent(id,s);this.classPrefix='mceMenuItem';},setSelected:function(s){this.setState('Selected',s);this.selected=s;},isSelected:function(){return this.selected;},postRender:function(){var t=this;t.parent();if(is(t.selected))t.setSelected(t.selected);}});})();(function(){var is=tinymce.is,DOM=tinymce.DOM,each=tinymce.each,walk=tinymce.walk;tinymce.create('tinymce.ui.Menu:tinymce.ui.MenuItem',{Menu:function(id,s){var t=this;t.parent(id,s);t.items={};t.collapsed=false;t.menuCount=0;t.onAddItem=new tinymce.util.Dispatcher(this);},expand:function(d){var t=this;if(d){walk(t,function(o){if(o.expand)o.expand();},'items',t);}t.collapsed=false;},collapse:function(d){var t=this;if(d){walk(t,function(o){if(o.collapse)o.collapse();},'items',t);}t.collapsed=true;},isCollapsed:function(){return this.collapsed;},add:function(o){if(!o.settings)o=new tinymce.ui.MenuItem(o.id||DOM.uniqueId(),o);this.onAddItem.dispatch(this,o);return this.items[o.id]=o;},addSeparator:function(){return this.add({separator:true});},addMenu:function(o){if(!o.collapse)o=this.createMenu(o);this.menuCount++;return this.add(o);},hasMenus:function(){return this.menuCount!==0;},remove:function(o){delete this.items[o.id];},removeAll:function(){var t=this;walk(t,function(o){if(o.removeAll)o.removeAll();else o.remove();o.destroy();},'items',t);t.items={};},createMenu:function(o){var m=new tinymce.ui.Menu(o.id||DOM.uniqueId(),o);m.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return m;}});})();(function(){var is=tinymce.is,DOM=tinymce.DOM,each=tinymce.each,Event=tinymce.dom.Event,Element=tinymce.dom.Element;tinymce.create('tinymce.ui.DropMenu:tinymce.ui.Menu',{DropMenu:function(id,s){s=s||{};s.container=s.container||DOM.doc.body;s.offset_x=s.offset_x||0;s.offset_y=s.offset_y||0;s.vp_offset_x=s.vp_offset_x||0;s.vp_offset_y=s.vp_offset_y||0;if(is(s.icons)&&!s.icons)s['class']+=' mceNoIcons';this.parent(id,s);this.onShowMenu=new tinymce.util.Dispatcher(this);this.onHideMenu=new tinymce.util.Dispatcher(this);this.classPrefix='mceMenu';},createMenu:function(s){var t=this,cs=t.settings,m;s.container=s.container||cs.container;s.parent=t;s.constrain=s.constrain||cs.constrain;s['class']=s['class']||cs['class'];s.vp_offset_x=s.vp_offset_x||cs.vp_offset_x;s.vp_offset_y=s.vp_offset_y||cs.vp_offset_y;m=new tinymce.ui.DropMenu(s.id||DOM.uniqueId(),s);m.onAddItem.add(t.onAddItem.dispatch,t.onAddItem);return m;},update:function(){var t=this,s=t.settings,tb=DOM.get('menu_'+t.id+'_tbl'),co=DOM.get('menu_'+t.id+'_co'),tw,th;tw=s.max_width?Math.min(tb.clientWidth,s.max_width):tb.clientWidth;th=s.max_height?Math.min(tb.clientHeight,s.max_height):tb.clientHeight;if(!DOM.boxModel)t.element.setStyles({width:tw+2,height:th+2});else t.element.setStyles({width:tw,height:th});if(s.max_width)DOM.setStyle(co,'width',tw);if(s.max_height){DOM.setStyle(co,'height',th);if(tb.clientHeight<s.max_height)DOM.setStyle(co,'overflow','hidden');}},showMenu:function(x,y,px){var t=this,s=t.settings,co,vp=DOM.getViewPort(),w,h,mx,my,ot=2,dm,tb,cp=t.classPrefix;t.collapse(1);if(t.isMenuVisible)return;if(!t.rendered){co=DOM.add(t.settings.container,t.renderNode());each(t.items,function(o){o.postRender();});t.element=new Element('menu_'+t.id,{blocker:1,container:s.container});}else co=DOM.get('menu_'+t.id);if(!tinymce.isOpera)DOM.setStyles(co,{left:-0xFFFF,top:-0xFFFF});DOM.show(co);t.update();x+=s.offset_x||0;y+=s.offset_y||0;vp.w-=4;vp.h-=4;if(s.constrain){w=co.clientWidth-ot;h=co.clientHeight-ot;mx=vp.x+vp.w;my=vp.y+vp.h;if((x+s.vp_offset_x+w)>mx)x=px?px-w:Math.max(0,(mx-s.vp_offset_x)-w);if((y+s.vp_offset_y+h)>my)y=Math.max(0,(my-s.vp_offset_y)-h);}DOM.setStyles(co,{left:x,top:y});t.element.update();t.isMenuVisible=1;t.mouseClickFunc=Event.add(co,'click',function(e){var m;e=e.target;if(e&&(e=DOM.getParent(e,'TR'))&&!DOM.hasClass(e,cp+'ItemSub')){m=t.items[e.id];if(m.isDisabled())return;dm=t;while(dm){if(dm.hideMenu)dm.hideMenu();dm=dm.settings.parent;}if(m.settings.onclick)m.settings.onclick(e);return Event.cancel(e);}});if(t.hasMenus()){t.mouseOverFunc=Event.add(co,'mouseover',function(e){var m,r,mi;e=e.target;if(e&&(e=DOM.getParent(e,'TR'))){m=t.items[e.id];if(t.lastMenu)t.lastMenu.collapse(1);if(m.isDisabled())return;if(e&&DOM.hasClass(e,cp+'ItemSub')){r=DOM.getRect(e);m.showMenu((r.x+r.w-ot),r.y-ot,r.x);t.lastMenu=m;DOM.addClass(DOM.get(m.id).firstChild,cp+'ItemActive');}}});}t.onShowMenu.dispatch(t);if(s.keyboard_focus){Event.add(co,'keydown',t._keyHandler,t);DOM.select('a','menu_'+t.id)[0].focus();t._focusIdx=0;}},hideMenu:function(c){var t=this,co=DOM.get('menu_'+t.id),e;if(!t.isMenuVisible)return;Event.remove(co,'mouseover',t.mouseOverFunc);Event.remove(co,'click',t.mouseClickFunc);Event.remove(co,'keydown',t._keyHandler);DOM.hide(co);t.isMenuVisible=0;if(!c)t.collapse(1);if(t.element)t.element.hide();if(e=DOM.get(t.id))DOM.removeClass(e.firstChild,t.classPrefix+'ItemActive');t.onHideMenu.dispatch(t);},add:function(o){var t=this,co;o=t.parent(o);if(t.isRendered&&(co=DOM.get('menu_'+t.id)))t._add(DOM.select('tbody',co)[0],o);return o;},collapse:function(d){this.parent(d);this.hideMenu(1);},remove:function(o){DOM.remove(o.id);this.destroy();return this.parent(o);},destroy:function(){var t=this,co=DOM.get('menu_'+t.id);Event.remove(co,'mouseover',t.mouseOverFunc);Event.remove(co,'click',t.mouseClickFunc);if(t.element)t.element.remove();DOM.remove(co);},renderNode:function(){var t=this,s=t.settings,n,tb,co,w;w=DOM.create('div',{id:'menu_'+t.id,'class':s['class'],'style':'position:absolute;left:0;top:0;z-index:200000'});co=DOM.add(w,'div',{id:'menu_'+t.id+'_co','class':t.classPrefix+(s['class']?' '+s['class']:'')});t.element=new Element('menu_'+t.id,{blocker:1,container:s.container});if(s.menu_line)DOM.add(co,'span',{'class':t.classPrefix+'Line'});n=DOM.add(co,'table',{id:'menu_'+t.id+'_tbl',border:0,cellPadding:0,cellSpacing:0});tb=DOM.add(n,'tbody');each(t.items,function(o){t._add(tb,o);});t.rendered=true;return w;},_keyHandler:function(e){var t=this,kc=e.keyCode;function focus(d){var i=t._focusIdx+d,e=DOM.select('a','menu_'+t.id)[i];if(e){t._focusIdx=i;e.focus();}};switch(kc){case 38:focus(-1);return;case 40:focus(1);return;case 13:return;case 27:return this.hideMenu();}},_add:function(tb,o){var n,s=o.settings,a,ro,it,cp=this.classPrefix;if(s.separator){ro=DOM.add(tb,'tr',{id:o.id,'class':cp+'ItemSeparator'});DOM.add(ro,'td',{'class':cp+'ItemSeparator'});if(n=ro.previousSibling)DOM.addClass(n,'mceLast');return;}n=ro=DOM.add(tb,'tr',{id:o.id,'class':cp+'Item '+cp+'ItemEnabled'});n=it=DOM.add(n,'td');n=a=DOM.add(n,'a',{href:'javascript:;',onclick:"return false;",onmousedown:'return false;'});DOM.addClass(it,s['class']);DOM.add(n,'span',{'class':'mceIcon'+(s.icon?' mce_'+s.icon:'')});n=DOM.add(n,s.element||'span',{'class':'mceText',title:o.settings.title},o.settings.title);if(o.settings.style)DOM.setAttrib(n,'style',o.settings.style);if(tb.childNodes.length==1)DOM.addClass(ro,'mceFirst');if((n=ro.previousSibling)&&DOM.hasClass(n,cp+'ItemSeparator'))DOM.addClass(ro,'mceFirst');if(o.collapse)DOM.addClass(ro,cp+'ItemSub');if(n=ro.previousSibling)DOM.removeClass(n,'mceLast');DOM.addClass(ro,'mceLast');}});})();(function(){var DOM=tinymce.DOM;tinymce.create('tinymce.ui.Button:tinymce.ui.Control',{Button:function(id,s){this.parent(id,s);this.classPrefix='mceButton';},renderHTML:function(){var cp=this.classPrefix,s=this.settings,h,l;l=DOM.encode(s.label||'');h='<a id="'+this.id+'" href="javascript:;" class="'+cp+' '+cp+'Enabled '+s['class']+(l?' '+cp+'Labeled':'')+'" onmousedown="return false;" onclick="return false;" title="'+DOM.encode(s.title)+'">';if(s.image)h+='<img class="mceIcon" src="'+s.image+'" />'+l+'</a>';else h+='<span class="mceIcon '+s['class']+'"></span>'+(l?'<span class="'+cp+'Label">'+l+'</span>':'')+'</a>';return h;},postRender:function(){var t=this,s=t.settings;tinymce.dom.Event.add(t.id,'click',function(e){if(!t.isDisabled())return s.onclick.call(s.scope,e);});}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,Dispatcher=tinymce.util.Dispatcher;tinymce.create('tinymce.ui.ListBox:tinymce.ui.Control',{ListBox:function(id,s){var t=this;t.parent(id,s);t.items=[];t.onChange=new Dispatcher(t);t.onPostRender=new Dispatcher(t);t.onAdd=new Dispatcher(t);t.onRenderMenu=new tinymce.util.Dispatcher(this);t.classPrefix='mceListBox';},select:function(v){var t=this,e,fv;if(v!=t.selectedValue){e=DOM.get(t.id+'_text');t.selectedValue=v;each(t.items,function(o){if(o.value==v){DOM.setHTML(e,DOM.encode(o.title));fv=1;return false;}});if(!fv){DOM.setHTML(e,DOM.encode(t.settings.title));DOM.addClass(e,'mceTitle');e=0;return;}else DOM.removeClass(e,'mceTitle');}e=0;},add:function(n,v,o){var t=this;o=o||{};o=tinymce.extend(o,{title:n,value:v});t.items.push(o);t.onAdd.dispatch(t,o);},getLength:function(){return this.items.length;},renderHTML:function(){var h='',t=this,s=t.settings,cp=t.classPrefix;h='<table id="'+t.id+'" cellpadding="0" cellspacing="0" class="'+cp+' '+cp+'Enabled'+(s['class']?(' '+s['class']):'')+'"><tbody><tr>';h+='<td>'+DOM.createHTML('a',{id:t.id+'_text',href:'javascript:;','class':'mceText',onclick:"return false;",onmousedown:'return false;'},DOM.encode(t.settings.title))+'</td>';h+='<td>'+DOM.createHTML('a',{id:t.id+'_open',tabindex:-1,href:'javascript:;','class':'mceOpen',onclick:"return false;",onmousedown:'return false;'},'<span></span>')+'</td>';h+='</tr></tbody></table>';return h;},showMenu:function(){var t=this,p1,p2,e=DOM.get(this.id),m;if(t.isDisabled()||t.items.length==0)return;if(t.menu&&t.menu.isMenuVisible)return t.hideMenu();if(!t.isMenuRendered){t.renderMenu();t.isMenuRendered=true;}p1=DOM.getPos(this.settings.menu_container);p2=DOM.getPos(e);m=t.menu;m.settings.offset_x=p2.x;m.settings.offset_y=p2.y;m.settings.keyboard_focus=!tinymce.isOpera;if(t.oldID)m.items[t.oldID].setSelected(0);each(t.items,function(o){if(o.value===t.selectedValue){m.items[o.id].setSelected(1);t.oldID=o.id;}});m.showMenu(0,e.clientHeight);Event.add(DOM.doc,'mousedown',t.hideMenu,t);DOM.addClass(t.id,t.classPrefix+'Selected');},hideMenu:function(e){var t=this;if(e&&e.type=="mousedown"&&(e.target.id==t.id+'_text'||e.target.id==t.id+'_open'))return;if(!e||!DOM.getParent(e.target,function(n){return DOM.hasClass(n,'mceMenu');})){DOM.removeClass(t.id,t.classPrefix+'Selected');Event.remove(DOM.doc,'mousedown',t.hideMenu,t);if(t.menu)t.menu.hideMenu();}},renderMenu:function(){var t=this,m;m=t.settings.control_manager.createDropMenu(t.id+'_menu',{menu_line:1,'class':t.classPrefix+'Menu mceNoIcons',max_width:150,max_height:150});m.onHideMenu.add(t.hideMenu,t);m.add({title:t.settings.title,'class':'mceMenuItemTitle',onclick:function(){if(t.settings.onselect('')!==false)t.select('');}});each(t.items,function(o){o.id=DOM.uniqueId();o.onclick=function(){if(t.settings.onselect(o.value)!==false)t.select(o.value);};m.add(o);});t.onRenderMenu.dispatch(t,m);t.menu=m;},postRender:function(){var t=this,cp=t.classPrefix;Event.add(t.id,'click',t.showMenu,t);Event.add(t.id+'_text','focus',function(e){if(!t._focused){t.keyDownHandler=Event.add(t.id+'_text','keydown',function(e){var idx=-1,v,kc=e.keyCode;each(t.items,function(v,i){if(t.selectedValue==v.value)idx=i;});if(kc==38)v=t.items[idx-1];else if(kc==40)v=t.items[idx+1];else if(kc==13){v=t.selectedValue;t.selectedValue=null;t.settings.onselect(v);return Event.cancel(e);}if(v){t.hideMenu();t.select(v.value);}});}t._focused=1;});Event.add(t.id+'_text','blur',function(){Event.remove(t.id+'_text','keydown',t.keyDownHandler);t._focused=0;});if(tinymce.isIE6||!DOM.boxModel){Event.add(t.id,'mouseover',function(){if(!DOM.hasClass(t.id,cp+'Disabled'))DOM.addClass(t.id,cp+'Hover');});Event.add(t.id,'mouseout',function(){if(!DOM.hasClass(t.id,cp+'Disabled'))DOM.removeClass(t.id,cp+'Hover');});}t.onPostRender.dispatch(t,DOM.get(t.id));},destroy:function(){this.parent();Event.clear(this.id+'_text');}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,Dispatcher=tinymce.util.Dispatcher;tinymce.create('tinymce.ui.NativeListBox:tinymce.ui.ListBox',{NativeListBox:function(id,s){this.parent(id,s);this.classPrefix='mceNativeListBox';},setDisabled:function(s){DOM.get(this.id).disabled=s;},isDisabled:function(){return DOM.get(this.id).disabled;},select:function(v){var e=DOM.get(this.id),ol=e.options;v=''+(v||'');e.selectedIndex=0;each(ol,function(o,i){if(o.value==v){e.selectedIndex=i;return false;}});},add:function(n,v,a){var o,t=this;a=a||{};a.value=v;if(t.isRendered())DOM.add(DOM.get(this.id),'option',a,n);o={title:n,value:v,attribs:a};t.items.push(o);t.onAdd.dispatch(t,o);},getLength:function(){return DOM.get(this.id).options.length-1;},renderHTML:function(){var h,t=this;h=DOM.createHTML('option',{value:''},'-- '+t.settings.title+' --');each(t.items,function(it){h+=DOM.createHTML('option',{value:it.value},it.title);});h=DOM.createHTML('select',{id:t.id,'class':'mceNativeListBox'},h);return h;},postRender:function(){var t=this,ch;t.rendered=true;function onChange(e){var v=e.target.options[e.target.selectedIndex].value;t.onChange.dispatch(t,v);if(t.settings.onselect)t.settings.onselect(v);};Event.add(t.id,'change',onChange);Event.add(t.id,'keydown',function(e){var bf;Event.remove(t.id,'change',ch);bf=Event.add(t.id,'blur',function(){Event.add(t.id,'change',onChange);Event.remove(t.id,'blur',bf);});if(e.keyCode==13||e.keyCode==32){onChange(e);return Event.cancel(e);}});t.onPostRender.dispatch(t,DOM.get(t.id));}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each;tinymce.create('tinymce.ui.MenuButton:tinymce.ui.Button',{MenuButton:function(id,s){this.parent(id,s);this.onRenderMenu=new tinymce.util.Dispatcher(this);s.menu_container=s.menu_container||DOM.doc.body;},showMenu:function(){var t=this,p1,p2,e=DOM.get(t.id),m;if(t.isDisabled())return;if(!t.isMenuRendered){t.renderMenu();t.isMenuRendered=true;}if(t.isMenuVisible)return t.hideMenu();p1=DOM.getPos(t.settings.menu_container);p2=DOM.getPos(e);m=t.menu;m.settings.offset_x=p2.x;m.settings.offset_y=p2.y;m.settings.vp_offset_x=p2.x;m.settings.vp_offset_y=p2.y;m.settings.keyboard_focus=t._focused;m.showMenu(0,e.clientHeight);Event.add(DOM.doc,'mousedown',t.hideMenu,t);t.setState('Selected',1);t.isMenuVisible=1;},renderMenu:function(){var t=this,m;m=t.settings.control_manager.createDropMenu(t.id+'_menu',{menu_line:1,'class':this.classPrefix+'Menu',icons:t.settings.icons});m.onHideMenu.add(t.hideMenu,t);t.onRenderMenu.dispatch(t,m);t.menu=m;},hideMenu:function(e){var t=this;if(e&&e.type=="mousedown"&&DOM.getParent(e.target,function(e){return e.id===t.id||e.id===t.id+'_open';}))return;if(!e||!DOM.getParent(e.target,function(n){return DOM.hasClass(n,'mceMenu');})){t.setState('Selected',0);Event.remove(DOM.doc,'mousedown',t.hideMenu,t);if(t.menu)t.menu.hideMenu();}t.isMenuVisible=0;},postRender:function(){var t=this,s=t.settings;Event.add(t.id,'click',function(){if(!t.isDisabled()){if(s.onclick)s.onclick(t.value);t.showMenu();}});}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each;tinymce.create('tinymce.ui.SplitButton:tinymce.ui.MenuButton',{SplitButton:function(id,s){this.parent(id,s);this.classPrefix='mceSplitButton';},renderHTML:function(){var h,t=this,s=t.settings,h1;h='<tbody><tr>';if(s.image)h1=DOM.createHTML('img ',{src:s.image,'class':'mceAction '+s['class']});else h1=DOM.createHTML('span',{'class':'mceAction '+s['class']},'');h+='<td>'+DOM.createHTML('a',{id:t.id+'_action',href:'javascript:;','class':'mceAction '+s['class'],onclick:"return false;",onmousedown:'return false;',title:s.title},h1)+'</td>';h1=DOM.createHTML('span',{'class':'mceOpen '+s['class']});h+='<td>'+DOM.createHTML('a',{id:t.id+'_open',href:'javascript:;','class':'mceOpen '+s['class'],onclick:"return false;",onmousedown:'return false;',title:s.title},h1)+'</td>';h+='</tr></tbody>';return DOM.createHTML('table',{id:t.id,'class':'mceSplitButton mceSplitButtonEnabled '+s['class'],cellpadding:'0',cellspacing:'0',onmousedown:'return false;',title:s.title},h);},postRender:function(){var t=this,s=t.settings;if(s.onclick){Event.add(t.id+'_action','click',function(){if(!t.isDisabled())s.onclick(t.value);});}Event.add(t.id+'_open','click',t.showMenu,t);Event.add(t.id+'_open','focus',function(){t._focused=1;});Event.add(t.id+'_open','blur',function(){t._focused=0;});if(tinymce.isIE6||!DOM.boxModel){Event.add(t.id,'mouseover',function(){if(!DOM.hasClass(t.id,'mceSplitButtonDisabled'))DOM.addClass(t.id,'mceSplitButtonHover');});Event.add(t.id,'mouseout',function(){if(!DOM.hasClass(t.id,'mceSplitButtonDisabled'))DOM.removeClass(t.id,'mceSplitButtonHover');});}},destroy:function(){this.parent();Event.clear(this.id+'_action');Event.clear(this.id+'_open');}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,is=tinymce.is,each=tinymce.each;tinymce.create('tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton',{ColorSplitButton:function(id,s){var t=this;t.parent(id,s);t.settings=s=tinymce.extend({colors:'000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF',grid_width:8,default_color:'#888888'},t.settings);t.onShowMenu=new tinymce.util.Dispatcher(t);t.onHideMenu=new tinymce.util.Dispatcher(t);t.value=s.default_color;},showMenu:function(){var t=this,r,p,e,p2;if(t.isDisabled())return;if(!t.isMenuRendered){t.renderMenu();t.isMenuRendered=true;}if(t.isMenuVisible)return t.hideMenu();e=DOM.get(t.id);DOM.show(t.id+'_menu');DOM.addClass(e,'mceSplitButtonSelected');p2=DOM.getPos(e);DOM.setStyles(t.id+'_menu',{left:p2.x,top:p2.y+e.clientHeight,zIndex:200000});e=0;Event.add(DOM.doc,'mousedown',t.hideMenu,t);if(t._focused){t._keyHandler=Event.add(t.id+'_menu','keydown',function(e){if(e.keyCode==27)t.hideMenu();});DOM.select('a',t.id+'_menu')[0].focus();}t.onShowMenu.dispatch(t);t.isMenuVisible=1;},hideMenu:function(e){var t=this;if(e&&e.type=="mousedown"&&DOM.getParent(e.target,function(e){return e.id===t.id+'_open';}))return;if(!e||!DOM.getParent(e.target,function(n){return DOM.hasClass(n,'mceSplitButtonMenu');})){DOM.removeClass(t.id,'mceSplitButtonSelected');Event.remove(DOM.doc,'mousedown',t.hideMenu,t);Event.remove(t.id+'_menu','keydown',t._keyHandler);DOM.hide(t.id+'_menu');}t.onHideMenu.dispatch(t);t.isMenuVisible=0;},renderMenu:function(){var t=this,m,i=0,s=t.settings,n,tb,tr,w;w=DOM.add(s.menu_container,'div',{id:t.id+'_menu','class':s['menu_class']+' '+s['class'],style:'position:absolute;left:0;top:-1000px;'});m=DOM.add(w,'div',{'class':s['class']+' mceSplitButtonMenu'});DOM.add(m,'span',{'class':'mceMenuLine'});n=DOM.add(m,'table',{'class':'mceColorSplitMenu'});tb=DOM.add(n,'tbody');i=0;each(is(s.colors,'array')?s.colors:s.colors.split(','),function(c){c=c.replace(/^#/,'');if(!i--){tr=DOM.add(tb,'tr');i=s.grid_width-1;}n=DOM.add(tr,'td');n=DOM.add(n,'a',{href:'javascript:;',style:{backgroundColor:'#'+c},mce_color:'#'+c});});if(s.more_colors_func){n=DOM.add(tb,'tr');n=DOM.add(n,'td',{colspan:s.grid_width,'class':'mceMoreColors'});n=DOM.add(n,'a',{id:t.id+'_more',href:'javascript:;',onclick:'return false;','class':'mceMoreColors'},s.more_colors_title);Event.add(n,'click',function(e){s.more_colors_func.call(s.more_colors_scope||this);return Event.cancel(e);});}DOM.addClass(m,'mceColorSplitMenu');Event.add(t.id+'_menu','click',function(e){var c;e=e.target;if(e.nodeName=='A'&&(c=e.getAttribute('mce_color')))t.setColor(c);return Event.cancel(e);});return w;},setColor:function(c){var t=this;DOM.setStyle(t.id+'_preview','backgroundColor',c);t.value=c;t.hideMenu();t.settings.onselect(c);},postRender:function(){var t=this,id=t.id;t.parent();DOM.add(id+'_action','div',{id:id+'_preview','class':'mceColorPreview'});},destroy:function(){this.parent();Event.clear(this.id+'_menu');Event.clear(this.id+'_more');DOM.remove(this.id+'_menu');}});})();tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container',{renderHTML:function(){var t=this,h='',c,co,dom=tinymce.DOM,s=t.settings,i,pr,nx,cl;cl=t.controls;for(i=0;i<cl.length;i++){co=cl[i];pr=cl[i-1];nx=cl[i+1];if(i===0){c='mceToolbarStart';if(co.Button)c+=' mceToolbarStartButton';else if(co.SplitButton)c+=' mceToolbarStartSplitButton';else if(co.ListBox)c+=' mceToolbarStartListBox';h+=dom.createHTML('td',{'class':c},dom.createHTML('span',null,'<!-- IE -->'));}if(pr&&co.ListBox){if(pr.Button||pr.SplitButton)h+=dom.createHTML('td',{'class':'mceToolbarEnd'},dom.createHTML('span',null,'<!-- IE -->'));}if(dom.stdMode)h+='<td style="position: relative">'+co.renderHTML()+'</td>';else h+='<td>'+co.renderHTML()+'</td>';if(nx&&co.ListBox){if(nx.Button||nx.SplitButton)h+=dom.createHTML('td',{'class':'mceToolbarStart'},dom.createHTML('span',null,'<!-- IE -->'));}}c='mceToolbarEnd';if(co.Button)c+=' mceToolbarEndButton';else if(co.SplitButton)c+=' mceToolbarEndSplitButton';else if(co.ListBox)c+=' mceToolbarEndListBox';h+=dom.createHTML('td',{'class':c},dom.createHTML('span',null,'<!-- IE -->'));return dom.createHTML('table',{id:t.id,'class':'mceToolbar'+(s['class']?' '+s['class']:''),cellpadding:'0',cellspacing:'0',align:t.settings.align||''},'<tbody><tr>'+h+'</tr></tbody>');}});(function(){var Dispatcher=tinymce.util.Dispatcher,each=tinymce.each;tinymce.create('tinymce.AddOnManager',{items:[],urls:{},lookup:{},onAdd:new Dispatcher(this),get:function(n){return this.lookup[n];},requireLangPack:function(n){var u,s;if(tinymce.EditorManager.settings){u=this.urls[n]+'/langs/'+tinymce.EditorManager.settings.language+'.js';s=tinymce.EditorManager.settings;if(s){if(!tinymce.dom.Event.domLoaded&&!s.strict_mode)tinymce.ScriptLoader.load(u);else tinymce.ScriptLoader.add(u);}}},add:function(id,o){this.items.push(o);this.lookup[id]=o;this.onAdd.dispatch(this,id,o);return o;},load:function(n,u,cb,s){var t=this;if(t.urls[n])return;if(u.indexOf('/')!=0&&u.indexOf('://')==-1)u=tinymce.baseURL+'/'+u;t.urls[n]=u.substring(0,u.lastIndexOf('/'));tinymce.ScriptLoader.add(u,cb,s);}});tinymce.PluginManager=new tinymce.AddOnManager();tinymce.ThemeManager=new tinymce.AddOnManager();}());(function(){var each=tinymce.each,extend=tinymce.extend,DOM=tinymce.DOM,Event=tinymce.dom.Event,ThemeManager=tinymce.ThemeManager,PluginManager=tinymce.PluginManager,explode=tinymce.explode;tinymce.create('static tinymce.EditorManager',{editors:{},i18n:{},activeEditor:null,preInit:function(){var t=this,lo=window.location;tinymce.documentBaseURL=lo.href.replace(/[\?#].*$/,'').replace(/[\/\\][^\/]+$/,'');if(!/[\/\\]$/.test(tinymce.documentBaseURL))tinymce.documentBaseURL+='/';tinymce.baseURL=new tinymce.util.URI(tinymce.documentBaseURL).toAbsolute(tinymce.baseURL);tinymce.EditorManager.baseURI=new tinymce.util.URI(tinymce.baseURL);if(tinymce.EditorManager.baseURI.host!=lo.hostname&&lo.hostname)document.domain=tinymce.relaxedDomain=lo.hostname.replace(/.*\.(.+\..+)$/,'$1');t.onBeforeUnload=new tinymce.util.Dispatcher(t);Event.add(window,'beforeunload',function(e){t.onBeforeUnload.dispatch(t,e);});},init:function(s){var t=this,pl,sl=tinymce.ScriptLoader,c,e;function execCallback(se,n,s){var f=se[n];if(!f)return;if(tinymce.is(f,'string')){s=f.replace(/\.\w+$/,'');s=s?tinymce.resolve(s):0;f=tinymce.resolve(f);}return f.apply(s||this,Array.prototype.slice.call(arguments,2));};s=extend({theme:"simple",language:"en",strict_loading_mode:document.contentType=='application/xhtml+xml'},s);t.settings=s;if(!Event.domLoaded&&!s.strict_loading_mode){if(s.language)sl.add(tinymce.baseURL+'/langs/'+s.language+'.js');if(s.theme&&s.theme.charAt(0)!='-'&&!ThemeManager.urls[s.theme])ThemeManager.load(s.theme,'themes/'+s.theme+'/editor_template'+tinymce.suffix+'.js');if(s.plugins){pl=explode(s.plugins);if(tinymce.inArray(pl,'compat2x')!=-1)PluginManager.load('compat2x','plugins/compat2x/editor_plugin'+tinymce.suffix+'.js');each(pl,function(v){if(v&&v.charAt(0)!='-'&&!PluginManager.urls[v]){if(!tinymce.isWebKit&&v=='safari')return;PluginManager.load(v,'plugins/'+v+'/editor_plugin'+tinymce.suffix+'.js');}});}sl.loadQueue();}Event.add(document,'init',function(){var l,co;execCallback(s,'onpageload');if(s.browsers){l=false;each(explode(s.browsers),function(v){switch(v){case'ie':case'msie':if(tinymce.isIE)l=true;break;case'gecko':if(tinymce.isGecko)l=true;break;case'safari':case'webkit':if(tinymce.isWebKit)l=true;break;case'opera':if(tinymce.isOpera)l=true;break;}});if(!l)return;}switch(s.mode){case"exact":l=s.elements||'';if(l.length>0){each(explode(l),function(v){if(DOM.get(v))new tinymce.Editor(v,s).render(1);else{c=0;each(document.forms,function(f){each(f.elements,function(e){if(e.name===v){v='mce_editor_'+c;DOM.setAttrib(e,'id',v);new tinymce.Editor(v,s).render(1);}});});}});}break;case"textareas":case"specific_textareas":function hasClass(n,c){return c.constructor===RegExp?c.test(n.className):DOM.hasClass(n,c);};each(DOM.select('textarea'),function(v){if(s.editor_deselector&&hasClass(v,s.editor_deselector))return;if(!s.editor_selector||hasClass(v,s.editor_selector)){e=DOM.get(v.name);if(!v.id&&!e)v.id=v.name;if(!v.id||t.get(v.id))v.id=DOM.uniqueId();new tinymce.Editor(v.id,s).render(1);}});break;}if(s.oninit){l=co=0;each(t.editors,function(ed){co++;if(!ed.initialized){ed.onInit.add(function(){l++;if(l==co)execCallback(s,'oninit');});}else l++;if(l==co)execCallback(s,'oninit');});}});},get:function(id){return this.editors[id];},getInstanceById:function(id){return this.get(id);},add:function(e){this.editors[e.id]=e;this._setActive(e);return e;},remove:function(e){var t=this;if(!t.editors[e.id])return null;delete t.editors[e.id];if(t.activeEditor==e){each(t.editors,function(e){t._setActive(e);return false;});}e.destroy();return e;},execCommand:function(c,u,v){var t=this,ed=t.get(v),w;switch(c){case"mceFocus":ed.focus();return true;case"mceAddEditor":case"mceAddControl":if(!t.get(v))new tinymce.Editor(v,t.settings).render();return true;case"mceAddFrameControl":w=v.window;w.tinyMCE=tinyMCE;w.tinymce=tinymce;tinymce.DOM.doc=w.document;tinymce.DOM.win=w;ed=new tinymce.Editor(v.element_id,v);ed.render();if(tinymce.isIE){function clr(){ed.destroy();w.detachEvent('onunload',clr);w=w.tinyMCE=w.tinymce=null;};w.attachEvent('onunload',clr);}v.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":ed.remove();return true;case'mceToggleEditor':if(!ed){t.execCommand('mceAddControl',0,v);return true;}if(ed.isHidden())ed.show();else ed.hide();return true;}if(t.activeEditor)return t.activeEditor.execCommand(c,u,v);return false;},execInstanceCommand:function(id,c,u,v){var ed=this.get(id);if(ed)return ed.execCommand(c,u,v);return false;},triggerSave:function(){each(this.editors,function(e){e.save();});},addI18n:function(p,o){var lo,i18n=this.i18n;if(!tinymce.is(p,'string')){each(p,function(o,lc){each(o,function(o,g){each(o,function(o,k){if(g==='common')i18n[lc+'.'+k]=o;else i18n[lc+'.'+g+'.'+k]=o;});});});}else{each(o,function(o,k){i18n[p+'.'+k]=o;});}},_setActive:function(e){this.selectedInstance=this.activeEditor=e;}});tinymce.EditorManager.preInit();})();var tinyMCE=window.tinyMCE=tinymce.EditorManager;(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,extend=tinymce.extend,Dispatcher=tinymce.util.Dispatcher;var each=tinymce.each,isGecko=tinymce.isGecko,isIE=tinymce.isIE,isWebKit=tinymce.isWebKit;var is=tinymce.is,ThemeManager=tinymce.ThemeManager,PluginManager=tinymce.PluginManager,EditorManager=tinymce.EditorManager;var inArray=tinymce.inArray,grep=tinymce.grep,explode=tinymce.explode;tinymce.create('tinymce.Editor',{Editor:function(id,s){var t=this;t.id=t.editorId=id;t.execCommands={};t.queryStateCommands={};t.queryValueCommands={};t.plugins={};each(['onPreInit','onBeforeRenderUI','onPostRender','onInit','onRemove','onActivate','onDeactivate','onClick','onEvent','onMouseUp','onMouseDown','onDblClick','onKeyDown','onKeyUp','onKeyPress','onContextMenu','onSubmit','onReset','onPaste','onPreProcess','onPostProcess','onBeforeSetContent','onBeforeGetContent','onSetContent','onGetContent','onLoadContent','onSaveContent','onNodeChange','onChange','onBeforeExecCommand','onExecCommand','onUndo','onRedo','onVisualAid','onSetProgressState'],function(e){t[e]=new Dispatcher(t);});t.settings=s=extend({id:id,language:'en',docs_language:'en',theme:'simple',skin:'default',delta_width:0,delta_height:0,popup_css:'',plugins:'',document_base_url:tinymce.documentBaseURL,add_form_submit_trigger:1,submit_patch:1,add_unload_trigger:1,convert_urls:1,relative_urls:1,remove_script_host:1,table_inline_editing:0,object_resizing:1,cleanup:1,accessibility_focus:1,custom_shortcuts:1,custom_undo_redo_keyboard_shortcuts:1,custom_undo_redo_restore_selection:1,custom_undo_redo:1,doctype:'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',visual_table_class:'mceItemTable',visual:1,inline_styles:true,convert_fonts_to_spans:true,font_size_style_values:'xx-small,x-small,small,medium,large,x-large,xx-large',apply_source_formatting:1,directionality:'ltr',forced_root_block:'p',valid_elements:'@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,#p[align],-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote[cite],-table[border=0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value|tabindex|accesskey],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big',hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:'30px'},s);t.documentBaseURI=new tinymce.util.URI(s.document_base_url||tinymce.documentBaseURL,{base_uri:tinyMCE.baseURI});t.baseURI=EditorManager.baseURI;t.execCallback('setup',t);},render:function(nst){var t=this,s=t.settings,id=t.id,sl=tinymce.ScriptLoader;if(!Event.domLoaded){Event.add(document,'init',function(){t.render();});return;}if(!nst){s.strict_loading_mode=1;tinyMCE.settings=s;}if(!t.getElement())return;if(s.strict_loading_mode){sl.settings.strict_mode=s.strict_loading_mode;tinymce.DOM.settings.strict=1;}if(!/TEXTAREA|INPUT/i.test(t.getElement().nodeName)&&s.hidden_input&&DOM.getParent(id,'form'))DOM.insertAfter(DOM.create('input',{type:'hidden',name:id}),id);t.windowManager=new tinymce.WindowManager(t);if(s.encoding=='xml'){t.onGetContent.add(function(ed,o){if(o.save)o.content=DOM.encode(o.content);});}if(s.add_form_submit_trigger){t.onSubmit.addToTop(function(){if(t.initialized){t.save();t.isNotDirty=1;}});}if(s.add_unload_trigger&&!s.ask){t._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(t.initialized&&!t.destroyed&&!t.isHidden())t.save({format:'raw',no_events:true});});}tinymce.addUnload(t.destroy,t);if(s.submit_patch){t.onBeforeRenderUI.add(function(){var n=t.getElement().form;if(!n)return;if(n._mceOldSubmit)return;if(!n.submit.nodeType&&!n.submit.length){t.formElement=n;n._mceOldSubmit=n.submit;n.submit=function(){EditorManager.triggerSave();t.isNotDirty=1;return this._mceOldSubmit(this);};}n=null;});}function loadScripts(){if(s.language)sl.add(tinymce.baseURL+'/langs/'+s.language+'.js');if(s.theme.charAt(0)!='-'&&!ThemeManager.urls[s.theme])ThemeManager.load(s.theme,'themes/'+s.theme+'/editor_template'+tinymce.suffix+'.js');each(explode(s.plugins),function(p){if(p&&p.charAt(0)!='-'&&!PluginManager.urls[p]){if(!isWebKit&&p=='safari')return;PluginManager.load(p,'plugins/'+p+'/editor_plugin'+tinymce.suffix+'.js');}});sl.loadQueue(function(){if(s.ask){function ask(){window.setTimeout(function(){Event.remove(t.id,'focus',ask);t.windowManager.confirm(t.getLang('edit_confirm'),function(s){if(s)t.init();});},0);};Event.add(t.id,'focus',ask);return;}if(!t.removed)t.init();});};if(s.plugins.indexOf('compat2x')!=-1){PluginManager.load('compat2x','plugins/compat2x/editor_plugin'+tinymce.suffix+'.js');sl.loadQueue(loadScripts);}else loadScripts();},init:function(){var n,t=this,s=t.settings,w,h,e=t.getElement(),o,ti,u,bi,bc,re;EditorManager.add(t);s.theme=s.theme.replace(/-/,'');o=ThemeManager.get(s.theme);t.theme=new o();if(t.theme.init&&s.init_theme)t.theme.init(t,ThemeManager.urls[s.theme]||tinymce.documentBaseURL.replace(/\/$/,''));each(explode(s.plugins.replace(/\-/g,'')),function(p){var c=PluginManager.get(p),u=PluginManager.urls[p]||tinymce.documentBaseURL.replace(/\/$/,''),po;if(c){po=new c(t,u);t.plugins[p]=po;if(po.init)po.init(t,u);}});if(s.popup_css)s.popup_css=t.documentBaseURI.toAbsolute(s.popup_css);else s.popup_css=t.baseURI.toAbsolute("themes/"+s.theme+"/skins/"+s.skin+"/dialog.css");if(s.popup_css_add)s.popup_css+=','+t.documentBaseURI.toAbsolute(s.popup_css_add);t.controlManager=new tinymce.ControlManager(t);t.undoManager=new tinymce.UndoManager(t);t.undoManager.onAdd.add(function(um,l){if(!l.initial)return t.onChange.dispatch(t,l,um);});t.undoManager.onUndo.add(function(um,l){return t.onUndo.dispatch(t,l,um);});t.undoManager.onRedo.add(function(um,l){return t.onRedo.dispatch(t,l,um);});if(s.custom_undo_redo){t.onExecCommand.add(function(ed,cmd,ui,val,a){if(cmd!='Undo'&&cmd!='Redo'&&cmd!='mceRepaint'&&(!a||!a.skip_undo))t.undoManager.add();});}t.onExecCommand.add(function(ed,c){if(!/^(FontName|FontSize)$/.test(c))t.nodeChanged();});if(isGecko){function repaint(a,o){if(!o||!o.initial)t.execCommand('mceRepaint');};t.onUndo.add(repaint);t.onRedo.add(repaint);t.onSetContent.add(repaint);}t.onBeforeRenderUI.dispatch(t,t.controlManager);if(s.render_ui){w=s.width||e.style.width||e.offsetWidth;h=s.height||e.style.height||e.offsetHeight;t.orgDisplay=e.style.display;re=/^[0-9\.]+(|px)$/i;if(re.test(''+w))w=Math.max(parseInt(w)+(o.deltaWidth||0),100);if(re.test(''+h))h=Math.max(parseInt(h)+(o.deltaHeight||0),100);o=t.theme.renderUI({targetNode:e,width:w,height:h,deltaWidth:s.delta_width,deltaHeight:s.delta_height});t.editorContainer=o.editorContainer;}DOM.setStyles(o.sizeContainer||o.editorContainer,{width:w,height:h});h=(o.iframeHeight||h)+((h+'').indexOf('%')==-1?(o.deltaHeight||0):'');if(h<100)h=100;t.iframeHTML=s.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml"><base href="'+t.documentBaseURI.getURI()+'" />';t.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';if(tinymce.relaxedDomain)t.iframeHTML+='<script type="text/javascript">document.domain = "'+tinymce.relaxedDomain+'";</script>';bi=s.body_id||'tinymce';if(bi.indexOf('=')!=-1){bi=t.getParam('body_id','','hash');bi=bi[t.id]||bi;}bc=s.body_class||'';if(bc.indexOf('=')!=-1){bc=t.getParam('body_class','','hash');bc=bc[t.id]||'';}t.iframeHTML+='</head><body id="'+bi+'" class="mceContentBody '+bc+'"></body></html>';if(tinymce.relaxedDomain){if(isIE||(tinymce.isOpera&&parseFloat(opera.version())>=9.5))u='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()';else if(tinymce.isOpera)u='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()';}n=DOM.add(o.iframeContainer,'iframe',{id:t.id+"_ifr",src:u||'javascript:""',frameBorder:'0',style:{width:'100%',height:h}});t.contentAreaContainer=o.iframeContainer;DOM.get(o.editorContainer).style.display=t.orgDisplay;DOM.get(t.id).style.display='none';if(tinymce.isOldWebKit){Event.add(n,'load',t.setupIframe,t);n.src=tinymce.baseURL+'/plugins/safari/blank.htm';}else{if(!isIE||!tinymce.relaxedDomain)t.setupIframe();e=n=o=null;}},setupIframe:function(){var t=this,s=t.settings,e=DOM.get(t.id),d=t.getDoc(),h,b;if(!isIE||!tinymce.relaxedDomain){d.open();d.write(t.iframeHTML);d.close();}if(!isIE){try{d.designMode='On';}catch(ex){}}if(isIE){b=t.getBody();DOM.hide(b);b.contentEditable=true;DOM.show(b);}t.dom=new tinymce.DOM.DOMUtils(t.getDoc(),{keep_values:true,url_converter:t.convertURL,url_converter_scope:t,hex_colors:s.force_hex_style_colors,class_filter:s.class_filter,update_styles:1,fix_ie_paragraphs:1});t.serializer=new tinymce.dom.Serializer({entity_encoding:s.entity_encoding,entities:s.entities,valid_elements:s.verify_html===false?'*[*]':s.valid_elements,extended_valid_elements:s.extended_valid_elements,valid_child_elements:s.valid_child_elements,invalid_elements:s.invalid_elements,fix_table_elements:s.fix_table_elements,fix_list_elements:s.fix_list_elements,fix_content_duplication:s.fix_content_duplication,convert_fonts_to_spans:s.convert_fonts_to_spans,font_size_classes:s.font_size_classes,font_size_style_values:s.font_size_style_values,apply_source_formatting:s.apply_source_formatting,remove_linebreaks:s.remove_linebreaks,dom:t.dom});t.selection=new tinymce.dom.Selection(t.dom,t.getWin(),t.serializer);t.forceBlocks=new tinymce.ForceBlocks(t,{forced_root_block:s.forced_root_block});t.editorCommands=new tinymce.EditorCommands(t);t.serializer.onPreProcess.add(function(se,o){return t.onPreProcess.dispatch(t,o,se);});t.serializer.onPostProcess.add(function(se,o){return t.onPostProcess.dispatch(t,o,se);});t.onPreInit.dispatch(t);if(!s.gecko_spellcheck)t.getBody().spellcheck=0;t._addEvents();t.controlManager.onPostRender.dispatch(t,t.controlManager);t.onPostRender.dispatch(t);if(s.directionality)t.getBody().dir=s.directionality;if(s.nowrap)t.getBody().style.whiteSpace="nowrap";if(s.auto_resize)t.onNodeChange.add(t.resizeToContent,t);if(s.custom_elements){function handleCustom(ed,o){each(explode(s.custom_elements),function(v){var n;if(v.indexOf('~')===0){v=v.substring(1);n='span';}else n='div';o.content=o.content.replace(new RegExp('<('+v+')([^>]*)>','g'),'<'+n+' mce_name="$1"$2>');o.content=o.content.replace(new RegExp('</('+v+')>','g'),'</'+n+'>');});};t.onBeforeSetContent.add(handleCustom);t.onPostProcess.add(function(ed,o){if(o.set)handleCustom(ed,o)});}if(s.handle_node_change_callback){t.onNodeChange.add(function(ed,cm,n){t.execCallback('handle_node_change_callback',t.id,n,-1,-1,true,t.selection.isCollapsed());});}if(s.save_callback){t.onSaveContent.add(function(ed,o){var h=t.execCallback('save_callback',t.id,o.content,t.getBody());if(h)o.content=h;});}if(s.onchange_callback){t.onChange.add(function(ed,l){t.execCallback('onchange_callback',t,l);});}if(s.convert_newlines_to_brs){t.onBeforeSetContent.add(function(ed,o){if(o.initial)o.content=o.content.replace(/\r?\n/g,'<br />');});}if(s.fix_nesting&&isIE){t.onBeforeSetContent.add(function(ed,o){o.content=t._fixNesting(o.content);});}if(s.preformatted){t.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^\s*<pre.*?>/,'');o.content=o.content.replace(/<\/pre>\s*$/,'');if(o.set)o.content='<pre class="mceItemHidden">'+o.content+'</pre>';});}if(s.verify_css_classes){t.serializer.attribValueFilter=function(n,v){var s,cl;if(n=='class'){if(!t.classesRE){cl=t.dom.getClasses();if(cl.length>0){s='';each(cl,function(o){s+=(s?'|':'')+o['class'];});t.classesRE=new RegExp('('+s+')','gi');}}return!t.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(v)||t.classesRE.test(v)?v:'';}return v;};}if(s.convert_fonts_to_spans)t._convertFonts();if(s.inline_styles)t._convertInlineElements();if(s.cleanup_callback){t.onBeforeSetContent.add(function(ed,o){o.content=t.execCallback('cleanup_callback','insert_to_editor',o.content,o);});t.onPreProcess.add(function(ed,o){if(o.set)t.execCallback('cleanup_callback','insert_to_editor_dom',o.node,o);if(o.get)t.execCallback('cleanup_callback','get_from_editor_dom',o.node,o);});t.onPostProcess.add(function(ed,o){if(o.set)o.content=t.execCallback('cleanup_callback','insert_to_editor',o.content,o);if(o.get)o.content=t.execCallback('cleanup_callback','get_from_editor',o.content,o);});}if(s.save_callback){t.onGetContent.add(function(ed,o){if(o.save)o.content=t.execCallback('save_callback',t.id,o.content,t.getBody());});}if(s.handle_event_callback){t.onEvent.add(function(ed,e,o){if(t.execCallback('handle_event_callback',e,ed,o)===false)Event.cancel(e);});}t.onSetContent.add(function(){t.addVisual(t.getBody());});if(s.padd_empty_editor){t.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^(<p>( | |\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,'');});}if(isGecko){try{d.designMode='Off';d.designMode='On';}catch(ex){}}setTimeout(function(){if(t.removed)return;t.load({initial:true,format:(s.cleanup_on_startup?'html':'raw')});t.startContent=t.getContent({format:'raw'});t.undoManager.add({initial:true});t.initialized=true;t.onInit.dispatch(t);t.execCallback('setupcontent_callback',t.id,t.getBody(),t.getDoc());t.execCallback('init_instance_callback',t);t.focus(true);t.nodeChanged({initial:1});if(s.content_css){tinymce.each(explode(s.content_css),function(u){t.dom.loadCSS(t.documentBaseURI.toAbsolute(u));});}if(s.auto_focus){setTimeout(function(){var ed=EditorManager.get(s.auto_focus);ed.selection.select(ed.getBody(),1);ed.selection.collapse(1);ed.getWin().focus();},100);}},1);e=null;},focus:function(sf){var oed,t=this,ce=t.settings.content_editable;if(!sf){if(!ce&&(!isIE||t.selection.getNode().ownerDocument!=t.getDoc()))t.getWin().focus();}if(EditorManager.activeEditor!=t){if((oed=EditorManager.activeEditor)!=null)oed.onDeactivate.dispatch(oed,t);t.onActivate.dispatch(t,oed);}EditorManager._setActive(t);},execCallback:function(n){var t=this,f=t.settings[n],s;if(!f)return;if(t.callbackLookup&&(s=t.callbackLookup[n])){f=s.func;s=s.scope;}if(is(f,'string')){s=f.replace(/\.\w+$/,'');s=s?tinymce.resolve(s):0;f=tinymce.resolve(f);t.callbackLookup=t.callbackLookup||{};t.callbackLookup[n]={func:f,scope:s};}return f.apply(s||t,Array.prototype.slice.call(arguments,1));},translate:function(s){var c=this.settings.language,i18n=EditorManager.i18n;if(!s)return'';return i18n[c+'.'+s]||s.replace(/{\#([^}]+)\}/g,function(a,b){return i18n[c+'.'+b]||'{#'+b+'}';});},getLang:function(n,dv){return EditorManager.i18n[this.settings.language+'.'+n]||(is(dv)?dv:'{#'+n+'}');},getParam:function(n,dv,ty){var tr=tinymce.trim,v=is(this.settings[n])?this.settings[n]:dv,o;if(ty==='hash'){o={};if(is(v,'string')){each(v.indexOf('=')>0?v.split(/[;,](?![^=;,]*(?:[;,]|$))/):v.split(','),function(v){v=v.split('=');if(v.length>1)o[tr(v[0])]=tr(v[1]);else o[tr(v[0])]=tr(v);});}else o=v;return o;}return v;},nodeChanged:function(o){var t=this,s=t.selection,n=s.getNode()||t.getBody();if(t.initialized){t.onNodeChange.dispatch(t,o?o.controlManager||t.controlManager:t.controlManager,isIE&&n.ownerDocument!=t.getDoc()?t.getBody():n,s.isCollapsed(),o);}},addButton:function(n,s){var t=this;t.buttons=t.buttons||{};t.buttons[n]=s;},addCommand:function(n,f,s){this.execCommands[n]={func:f,scope:s||this};},addQueryStateHandler:function(n,f,s){this.queryStateCommands[n]={func:f,scope:s||this};},addQueryValueHandler:function(n,f,s){this.queryValueCommands[n]={func:f,scope:s||this};},addShortcut:function(pa,desc,cmd_func,sc){var t=this,c;if(!t.settings.custom_shortcuts)return false;t.shortcuts=t.shortcuts||{};if(is(cmd_func,'string')){c=cmd_func;cmd_func=function(){t.execCommand(c,false,null);};}if(is(cmd_func,'object')){c=cmd_func;cmd_func=function(){t.execCommand(c[0],c[1],c[2]);};}each(explode(pa),function(pa){var o={func:cmd_func,scope:sc||this,desc:desc,alt:false,ctrl:false,shift:false};each(explode(pa,'+'),function(v){switch(v){case'alt':case'ctrl':case'shift':o[v]=true;break;default:o.charCode=v.charCodeAt(0);o.keyCode=v.toUpperCase().charCodeAt(0);}});t.shortcuts[(o.ctrl?'ctrl':'')+','+(o.alt?'alt':'')+','+(o.shift?'shift':'')+','+o.keyCode]=o;});return true;},execCommand:function(cmd,ui,val,a){var t=this,s=0,o,st;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd)&&(!a||!a.skip_focus))t.focus();o={};t.onBeforeExecCommand.dispatch(t,cmd,ui,val,o);if(o.terminate)return false;if(t.execCallback('execcommand_callback',t.id,t.selection.getNode(),cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}if(o=t.execCommands[cmd]){st=o.func.call(o.scope,ui,val);if(st!==true){t.onExecCommand.dispatch(t,cmd,ui,val,a);return st;}}each(t.plugins,function(p){if(p.execCommand&&p.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);s=1;return false;}});if(s)return true;if(t.theme.execCommand&&t.theme.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}if(t.editorCommands.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}t.getDoc().execCommand(cmd,ui,val);t.onExecCommand.dispatch(t,cmd,ui,val,a);},queryCommandState:function(c){var t=this,o,s;if(t._isHidden())return;if(o=t.queryStateCommands[c]){s=o.func.call(o.scope);if(s!==true)return s;}o=t.editorCommands.queryCommandState(c);if(o!==-1)return o;try{return this.getDoc().queryCommandState(c);}catch(ex){}},queryCommandValue:function(c){var t=this,o,s;if(t._isHidden())return;if(o=t.queryValueCommands[c]){s=o.func.call(o.scope);if(s!==true)return s;}o=t.editorCommands.queryCommandValue(c);if(is(o))return o;try{return this.getDoc().queryCommandValue(c);}catch(ex){}},show:function(){var t=this;DOM.show(t.getContainer());DOM.hide(t.id);t.load();},hide:function(){var t=this,d=t.getDoc();if(isIE&&d)d.execCommand('SelectAll');t.save();DOM.hide(t.getContainer());DOM.setStyle(t.id,'display',t.orgDisplay);},isHidden:function(){return!DOM.isHidden(this.id);},setProgressState:function(b,ti,o){this.onSetProgressState.dispatch(this,b,ti,o);return b;},resizeToContent:function(){var t=this;DOM.setStyle(t.id+"_ifr",'height',t.getBody().scrollHeight);},load:function(o){var t=this,e=t.getElement(),h;o=o||{};o.load=true;h=t.setContent(is(e.value)?e.value:e.innerHTML,o);o.element=e;if(!o.no_events)t.onLoadContent.dispatch(t,o);o.element=e=null;return h;},save:function(o){var t=this,e=t.getElement(),h,f;if(!t.initialized)return;o=o||{};o.save=true;if(!o.no_events){t.undoManager.typing=0;t.undoManager.add();}o.element=e;h=o.content=t.getContent(o);if(!o.no_events)t.onSaveContent.dispatch(t,o);h=o.content;if(!/TEXTAREA|INPUT/i.test(e.nodeName)){e.innerHTML=h;if(f=DOM.getParent(t.id,'form')){each(f.elements,function(e){if(e.name==t.id){e.value=h;return false;}});}}else e.value=h;o.element=e=null;return h;},setContent:function(h,o){var t=this;o=o||{};o.format=o.format||'html';o.set=true;o.content=h;if(!o.no_events)t.onBeforeSetContent.dispatch(t,o);if(!tinymce.isIE&&(h.length===0||/^\s+$/.test(h))){o.content=t.dom.setHTML(t.getBody(),'<br mce_bogus="1" />');o.format='raw';}o.content=t.dom.setHTML(t.getBody(),tinymce.trim(o.content));if(o.format!='raw'&&t.settings.cleanup){o.getInner=true;o.content=t.dom.setHTML(t.getBody(),t.serializer.serialize(t.getBody(),o));}if(!o.no_events)t.onSetContent.dispatch(t,o);return o.content;},getContent:function(o){var t=this,h;o=o||{};o.format=o.format||'html';o.get=true;if(!o.no_events)t.onBeforeGetContent.dispatch(t,o);if(o.format!='raw'&&t.settings.cleanup){o.getInner=true;h=t.serializer.serialize(t.getBody(),o);}else h=t.getBody().innerHTML;h=h.replace(/^\s*|\s*$/g,'');o.content=h;if(!o.no_events)t.onGetContent.dispatch(t,o);return o.content;},isDirty:function(){var t=this;return tinymce.trim(t.startContent)!=tinymce.trim(t.getContent({format:'raw',no_events:1}))&&!t.isNotDirty;},getContainer:function(){var t=this;if(!t.container)t.container=DOM.get(t.editorContainer||t.id+'_parent');return t.container;},getContentAreaContainer:function(){return this.contentAreaContainer;},getElement:function(){return DOM.get(this.settings.content_element||this.id);},getWin:function(){var t=this,e;if(!t.contentWindow){e=DOM.get(t.id+"_ifr");if(e)t.contentWindow=e.contentWindow;}return t.contentWindow;},getDoc:function(){var t=this,w;if(!t.contentDocument){w=t.getWin();if(w)t.contentDocument=w.document;}return t.contentDocument;},getBody:function(){return this.bodyElement||this.getDoc().body;},convertURL:function(u,n,e){var t=this,s=t.settings;if(s.urlconverter_callback)return t.execCallback('urlconverter_callback',u,e,true,n);if(!s.convert_urls||(e&&e.nodeName=='LINK')||u.indexOf('file:')===0)return u;if(s.relative_urls)return t.documentBaseURI.toRelative(u);u=t.documentBaseURI.toAbsolute(u,s.remove_script_host);return u;},addVisual:function(e){var t=this,s=t.settings;e=e||t.getBody();if(!is(t.hasVisual))t.hasVisual=s.visual;each(t.dom.select('table,a',e),function(e){var v;switch(e.nodeName){case'TABLE':v=t.dom.getAttrib(e,'border');if(!v||v=='0'){if(t.hasVisual)t.dom.addClass(e,s.visual_table_class);else t.dom.removeClass(e,s.visual_table_class);}return;case'A':v=t.dom.getAttrib(e,'name');if(v){if(t.hasVisual)t.dom.addClass(e,'mceItemAnchor');else t.dom.removeClass(e,'mceItemAnchor');}return;}});t.onVisualAid.dispatch(t,e,t.hasVisual);},remove:function(){var t=this,e=t.getContainer();t.removed=1;t.hide();t.execCallback('remove_instance_callback',t);t.onRemove.dispatch(t);t.onExecCommand.listeners=[];EditorManager.remove(t);DOM.remove(e);},destroy:function(s){var t=this;if(t.destroyed)return;if(!s){tinymce.removeUnload(t.destroy);tinyMCE.onBeforeUnload.remove(t._beforeUnload);if(t.theme.destroy)t.theme.destroy();t.controlManager.destroy();t.selection.destroy();t.dom.destroy();if(!t.settings.content_editable){Event.clear(t.getWin());Event.clear(t.getDoc());}Event.clear(t.getBody());Event.clear(t.formElement);}if(t.formElement){t.formElement.submit=t.formElement._mceOldSubmit;t.formElement._mceOldSubmit=null;}t.contentAreaContainer=t.formElement=t.container=t.settings.content_element=t.bodyElement=t.contentDocument=t.contentWindow=null;if(t.selection)t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null;t.destroyed=1;},_addEvents:function(){var t=this,i,s=t.settings,lo={mouseup:'onMouseUp',mousedown:'onMouseDown',click:'onClick',keyup:'onKeyUp',keydown:'onKeyDown',keypress:'onKeyPress',submit:'onSubmit',reset:'onReset',contextmenu:'onContextMenu',dblclick:'onDblClick',paste:'onPaste'};function eventHandler(e,o){var ty=e.type;if(t.removed)return;if(t.onEvent.dispatch(t,e,o)!==false){t[lo[e.fakeType||e.type]].dispatch(t,e,o);}};each(lo,function(v,k){switch(k){case'contextmenu':if(tinymce.isOpera){Event.add(t.getBody(),'mousedown',function(e){if(e.ctrlKey){e.fakeType='contextmenu';eventHandler(e);}});}else Event.add(t.getBody(),k,eventHandler);break;case'paste':Event.add(t.getBody(),k,function(e){var tx,h,el,r;if(e.clipboardData)tx=e.clipboardData.getData('text/plain');else if(tinymce.isIE)tx=t.getWin().clipboardData.getData('Text');eventHandler(e,{text:tx,html:h});});break;case'submit':case'reset':Event.add(t.getElement().form||DOM.getParent(t.id,'form'),k,eventHandler);break;default:Event.add(s.content_editable?t.getBody():t.getDoc(),k,eventHandler);}});Event.add(s.content_editable?t.getBody():(isGecko?t.getDoc():t.getWin()),'focus',function(e){t.focus(true);});if(tinymce.isGecko){Event.add(t.getDoc(),'DOMNodeInserted',function(e){var v;e=e.target;if(e.nodeType===1&&e.nodeName==='IMG'&&(v=e.getAttribute('mce_src')))e.src=t.documentBaseURI.toAbsolute(v);});}if(isGecko){function setOpts(){var t=this,d=t.getDoc(),s=t.settings;if(isGecko){if(t._isHidden()){try{if(!s.content_editable)d.designMode='On';}catch(ex){}}try{d.execCommand("styleWithCSS",0,false);}catch(ex){if(!t._isHidden())try{d.execCommand("useCSS",0,true);}catch(ex){}}if(!s.table_inline_editing)try{d.execCommand('enableInlineTableEditing',false,false);}catch(ex){}if(!s.object_resizing)try{d.execCommand('enableObjectResizing',false,false);}catch(ex){}}};t.onBeforeExecCommand.add(setOpts);t.onMouseDown.add(setOpts);}t.onMouseUp.add(t.nodeChanged);t.onClick.add(t.nodeChanged);t.onKeyUp.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45||e.keyCode==46||e.keyCode==8||e.ctrlKey)t.nodeChanged();});t.onReset.add(function(){t.setContent(t.startContent,{format:'raw'});});if(t.getParam('tab_focus')){function tabCancel(ed,e){if(e.keyCode===9)return Event.cancel(e);};function tabHandler(ed,e){var x,i,f,el,v;function find(d){f=DOM.getParent(ed.id,'form');el=f.elements;if(f){each(el,function(e,i){if(e.id==ed.id){x=i;return false;}});if(d>0){for(i=x+1;i<el.length;i++){if(el[i].type!='hidden')return el[i];}}else{for(i=x-1;i>=0;i--){if(el[i].type!='hidden')return el[i];}}}return null;};if(e.keyCode===9){v=explode(ed.getParam('tab_focus'));if(v.length==1){v[1]=v[0];v[0]=':prev';}if(e.shiftKey){if(v[0]==':prev')el=find(-1);else el=DOM.get(v[0]);}else{if(v[1]==':next')el=find(1);else el=DOM.get(v[1]);}if(el){if(ed=EditorManager.get(el.id||el.name))ed.focus();else window.setTimeout(function(){window.focus();el.focus();},10);return Event.cancel(e);}}};t.onKeyUp.add(tabCancel);if(isGecko){t.onKeyPress.add(tabHandler);t.onKeyDown.add(tabCancel);}else t.onKeyDown.add(tabHandler);}if(s.custom_shortcuts){if(s.custom_undo_redo_keyboard_shortcuts){t.addShortcut('ctrl+z',t.getLang('undo_desc'),'Undo');t.addShortcut('ctrl+y',t.getLang('redo_desc'),'Redo');}if(isGecko){t.addShortcut('ctrl+b',t.getLang('bold_desc'),'Bold');t.addShortcut('ctrl+i',t.getLang('italic_desc'),'Italic');t.addShortcut('ctrl+u',t.getLang('underline_desc'),'Underline');}for(i=1;i<=6;i++)t.addShortcut('ctrl+'+i,'',['FormatBlock',false,'<h'+i+'>']);t.addShortcut('ctrl+7','',['FormatBlock',false,'<p>']);t.addShortcut('ctrl+8','',['FormatBlock',false,'<div>']);t.addShortcut('ctrl+9','',['FormatBlock',false,'<address>']);function find(e){var v=null;if(!e.altKey&&!e.ctrlKey&&!e.metaKey)return v;each(t.shortcuts,function(o){if(o.ctrl!=e.ctrlKey&&(!tinymce.isMac||o.ctrl==e.metaKey))return;if(o.alt!=e.altKey)return;if(o.shift!=e.shiftKey)return;if(e.keyCode==o.keyCode||(e.charCode&&e.charCode==o.charCode)){v=o;return false;}});return v;};t.onKeyUp.add(function(ed,e){var o=find(e);if(o)return Event.cancel(e);});t.onKeyPress.add(function(ed,e){var o=find(e);if(o)return Event.cancel(e);});t.onKeyDown.add(function(ed,e){var o=find(e);if(o){o.func.call(o.scope);return Event.cancel(e);}});}if(tinymce.isIE){Event.add(t.getDoc(),'controlselect',function(e){var re=t.resizeInfo,cb;e=e.target;if(e.nodeName!=='IMG')return;if(re)Event.remove(re.node,re.ev,re.cb);if(!t.dom.hasClass(e,'mceItemNoResize')){ev='resizeend';cb=Event.add(e,ev,function(e){var v;e=e.target;if(v=t.dom.getStyle(e,'width')){t.dom.setAttrib(e,'width',v.replace(/[^0-9%]+/g,''));t.dom.setStyle(e,'width','');}if(v=t.dom.getStyle(e,'height')){t.dom.setAttrib(e,'height',v.replace(/[^0-9%]+/g,''));t.dom.setStyle(e,'height','');}});}else{ev='resizestart';cb=Event.add(e,'resizestart',Event.cancel,Event);}re=t.resizeInfo={node:e,ev:ev,cb:cb};});t.onKeyDown.add(function(ed,e){switch(e.keyCode){case 8:if(t.selection.getRng().item){t.selection.getRng().item(0).removeNode();return Event.cancel(e);}}});}if(tinymce.isOpera){t.onClick.add(function(ed,e){Event.prevent(e);});}if(s.custom_undo_redo){function addUndo(){t.undoManager.typing=0;t.undoManager.add();};if(tinymce.isIE){Event.add(t.getWin(),'blur',function(e){var n;if(t.selection){n=t.selection.getNode();if(!t.removed&&n.ownerDocument&&n.ownerDocument!=t.getDoc())addUndo();}});}else{Event.add(t.getDoc(),'blur',function(){if(t.selection&&!t.removed)addUndo();});}t.onMouseDown.add(addUndo);t.onKeyUp.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45||e.ctrlKey){t.undoManager.typing=0;t.undoManager.add();}});t.onKeyDown.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45){if(t.undoManager.typing){t.undoManager.add();t.undoManager.typing=0;}return;}if(!t.undoManager.typing){t.undoManager.add();t.undoManager.typing=1;}});}},_convertInlineElements:function(){var t=this,s=t.settings,dom=t.dom,v,e,na,st,sp;function convert(ed,o){if(!s.inline_styles)return;if(o.get){each(t.dom.select('table,u,strike',o.node),function(n){switch(n.nodeName){case'TABLE':if(v=dom.getAttrib(n,'height')){dom.setStyle(n,'height',v);dom.setAttrib(n,'height','');}break;case'U':case'STRIKE':n.style.textDecoration=n.nodeName=='U'?'underline':'line-through';dom.setAttrib(n,'mce_style','');dom.setAttrib(n,'mce_name','span');break;}});}else if(o.set){each(t.dom.select('table,span',o.node).reverse(),function(n){if(n.nodeName=='TABLE'){if(v=dom.getStyle(n,'height'))dom.setAttrib(n,'height',v.replace(/[^0-9%]+/g,''));}else{if(n.style.textDecoration=='underline')na='u';else if(n.style.textDecoration=='line-through')na='strike';else na='';if(na){n.style.textDecoration='';dom.setAttrib(n,'mce_style','');e=dom.create(na,{style:dom.getAttrib(n,'style')});dom.replace(e,n,1);}}});}};t.onPreProcess.add(convert);if(!s.cleanup_on_startup){t.onSetContent.add(function(ed,o){if(o.initial)convert(t,{node:t.getBody(),set:1});});}},_convertFonts:function(){var t=this,s=t.settings,dom=t.dom,fz,fzn,sl,cl;if(!s.inline_styles)return;fz=[8,10,12,14,18,24,36];fzn=['xx-small','x-small','small','medium','large','x-large','xx-large'];if(sl=s.font_size_style_values)sl=explode(sl);if(cl=s.font_size_classes)cl=explode(cl);function convertToFonts(no){var n,f,nl,x,i,v,st;if(tinymce.isWebKit||!s.inline_styles)return;nl=t.dom.select('span',no);for(x=nl.length-1;x>=0;x--){n=nl[x];f=dom.create('font',{color:dom.toHex(dom.getStyle(n,'color')),face:dom.getStyle(n,'fontFamily'),style:dom.getAttrib(n,'style'),'class':dom.getAttrib(n,'class')});st=f.style;if(st.color||st.fontFamily){st.color=st.fontFamily='';dom.setAttrib(f,'mce_style','');}if(sl){i=inArray(sl,dom.getStyle(n,'fontSize'));if(i!=-1){dom.setAttrib(f,'size',''+(i+1||1));}}else if(cl){i=inArray(cl,dom.getAttrib(n,'class'));v=dom.getStyle(n,'fontSize');if(i==-1&&v.indexOf('pt')>0)i=inArray(fz,parseInt(v));if(i==-1)i=inArray(fzn,v);if(i!=-1){dom.setAttrib(f,'size',''+(i+1||1));f.style.fontSize='';}}if(f.color||f.face||f.size){f.style.fontFamily='';dom.setAttrib(f,'mce_style','');dom.replace(f,n,1);}f=n=null;}};t.onSetContent.add(function(ed,o){convertToFonts(ed.getBody());});t.onPreProcess.add(function(ed,o){var n,sp,nl,x;if(!s.inline_styles)return;if(o.get){nl=t.dom.select('font',o.node);for(x=nl.length-1;x>=0;x--){n=nl[x];sp=dom.create('span',{style:dom.getAttrib(n,'style'),'class':dom.getAttrib(n,'class')});dom.setStyles(sp,{fontFamily:dom.getAttrib(n,'face'),color:dom.getAttrib(n,'color'),backgroundColor:n.style.backgroundColor});if(n.size){if(sl)dom.setStyle(sp,'fontSize',sl[parseInt(n.size)-1]);else dom.setAttrib(sp,'class',cl[parseInt(n.size)-1]);}dom.setAttrib(sp,'mce_style','');dom.replace(sp,n,1);}}});},_isHidden:function(){var s;if(!isGecko)return 0;s=this.selection.getSel();return(!s||!s.rangeCount||s.rangeCount==0);},_fixNesting:function(s){var d=[],i;s=s.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(a,b,c){var e;if(b==='/'){if(!d.length)return'';if(c!==d[d.length-1].tag){for(i=d.length-1;i>=0;i--){if(d[i].tag===c){d[i].close=1;break;}}return'';}else{d.pop();if(d.length&&d[d.length-1].close){a=a+'</'+d[d.length-1].tag+'>';d.pop();}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(c))return a;if(/\/>$/.test(a))return a;d.push({tag:c});}return a;});for(i=d.length-1;i>=0;i--)s+='</'+d[i].tag+'>';return s;}});})();(function(){var each=tinymce.each,isIE=tinymce.isIE,isGecko=tinymce.isGecko,isOpera=tinymce.isOpera,isWebKit=tinymce.isWebKit;tinymce.create('tinymce.EditorCommands',{EditorCommands:function(ed){this.editor=ed;},execCommand:function(cmd,ui,val){var t=this,ed=t.editor,f;switch(cmd){case'Cut':case'Copy':case'Paste':try{ed.getDoc().execCommand(cmd,ui,val);}catch(ex){if(isGecko){ed.windowManager.confirm(ed.getLang('clipboard_msg'),function(s){if(s)window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html','mceExternal');});}else ed.windowManager.alert(ed.getLang('clipboard_no_support'));}return true;case'mceResetDesignMode':case'mceBeginUndoLevel':return true;case'unlink':t.UnLink();return true;case'JustifyLeft':case'JustifyCenter':case'JustifyRight':case'JustifyFull':t.mceJustify(cmd,cmd.substring(7).toLowerCase());return true;case'mceEndUndoLevel':case'mceAddUndoLevel':ed.undoManager.add();return true;default:f=this[cmd];if(f){f.call(this,ui,val);return true;}}return false;},Indent:function(){var ed=this.editor,d=ed.dom,s=ed.selection,e,iv,iu;iv=ed.settings.indentation;iu=/[a-z%]+$/i.exec(iv);iv=parseInt(iv);if(ed.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){each(this._getSelectedBlocks(),function(e){d.setStyle(e,'paddingLeft',(parseInt(e.style.paddingLeft||0)+iv)+iu);});return;}ed.getDoc().execCommand('Indent',false,null);if(isIE){d.getParent(s.getNode(),function(n){if(n.nodeName=='BLOCKQUOTE'){n.dir=n.style.cssText='';}});}},Outdent:function(){var ed=this.editor,d=ed.dom,s=ed.selection,e,v,iv,iu;iv=ed.settings.indentation;iu=/[a-z%]+$/i.exec(iv);iv=parseInt(iv);if(ed.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){each(this._getSelectedBlocks(),function(e){v=Math.max(0,parseInt(e.style.paddingLeft||0)-iv);d.setStyle(e,'paddingLeft',v?v+iu:'');});return;}ed.getDoc().execCommand('Outdent',false,null);},mceSetAttribute:function(u,v){var ed=this.editor,d=ed.dom,e;if(e=d.getParent(ed.selection.getNode(),d.isBlock))d.setAttrib(e,v.name,v.value);},mceSetContent:function(u,v){this.editor.setContent(v);},mceToggleVisualAid:function(){var ed=this.editor;ed.hasVisual=!ed.hasVisual;ed.addVisual();},mceReplaceContent:function(u,v){var s=this.editor.selection;s.setContent(v.replace(/\{\$selection\}/g,s.getContent({format:'text'})));},mceInsertLink:function(u,v){var ed=this.editor,s=ed.selection,e=ed.dom.getParent(s.getNode(),'A');if(tinymce.is(v,'string'))v={href:v};function set(e){each(v,function(v,k){ed.dom.setAttrib(e,k,v);});};if(!e){ed.execCommand('CreateLink',false,'javascript:mctmp(0);');each(ed.dom.select('a'),function(e){if(e.href=='javascript:mctmp(0);')set(e);});}else{if(v.href)set(e);else ed.dom.remove(e,1);}},UnLink:function(){var ed=this.editor,s=ed.selection;if(s.isCollapsed())s.select(s.getNode());ed.getDoc().execCommand('unlink',false,null);s.collapse(0);},FontName:function(u,v){var t=this,ed=t.editor,s=ed.selection,e;if(!v){if(s.isCollapsed())s.select(s.getNode());t.RemoveFormat();}else ed.getDoc().execCommand('FontName',false,v);},FontSize:function(u,v){var ed=this.editor,s=ed.settings,fz=tinymce.explode(s.font_size_style_values),fzc=tinymce.explode(s.font_size_classes),h,bm;each(ed.dom.select('font'),function(e){e.style.fontSize='';});ed.getDoc().execCommand('FontSize',false,v);if(s.inline_styles){each(ed.dom.select('font'),function(e){if(e.parentNode.nodeName=='FONT'&&e.size==e.parentNode.size){if(!bm)bm=ed.selection.getBookmark();ed.dom.remove(e,1);return;}if(v=e.size){if(fzc&&fzc.length>0)ed.dom.setAttrib(e,'class',fzc[parseInt(v)-1]);else ed.dom.setStyle(e,'fontSize',fz[parseInt(v)-1]);}});}ed.selection.moveToBookmark(bm);},queryCommandValue:function(c){var f=this['queryValue'+c];if(f)return f.call(this,c);return false;},queryCommandState:function(cmd){var f;switch(cmd){case'JustifyLeft':case'JustifyCenter':case'JustifyRight':case'JustifyFull':return this.queryStateJustify(cmd,cmd.substring(7).toLowerCase());default:if(f=this['queryState'+cmd])return f.call(this,cmd);}return-1;},_queryState:function(c){try{return this.editor.getDoc().queryCommandState(c);}catch(ex){}},_queryVal:function(c){try{return this.editor.getDoc().queryCommandValue(c);}catch(ex){}},queryValueFontSize:function(){var ed=this.editor,v=0,p;if(isOpera||isWebKit){if(p=ed.dom.getParent(ed.selection.getNode(),'FONT'))v=p.size;return v;}return this._queryVal('FontSize');},queryValueFontName:function(){var ed=this.editor,v=0,p;if(p=ed.dom.getParent(ed.selection.getNode(),'FONT'))v=p.face;if(!v)v=this._queryVal('FontName');return v;},mceJustify:function(c,v){var ed=this.editor,se=ed.selection,n=se.getNode(),nn=n.nodeName,bl,nb,dom=ed.dom,rm;if(ed.settings.inline_styles&&this.queryStateJustify(c,v))rm=1;bl=dom.getParent(n,ed.dom.isBlock);if(nn=='IMG'){if(v=='full')return;if(rm){if(v=='center')dom.setStyle(bl||n.parentNode,'textAlign','');dom.setStyle(n,'float','');this.mceRepaint();return;}if(v=='center'){if(bl&&/^(TD|TH)$/.test(bl.nodeName))bl=0;if(!bl||bl.childNodes.length>1){nb=dom.create('p');nb.appendChild(n.cloneNode(false));if(bl)dom.insertAfter(nb,bl);else dom.insertAfter(nb,n);dom.remove(n);n=nb.firstChild;bl=nb;}dom.setStyle(bl,'textAlign',v);dom.setStyle(n,'float','');}else{dom.setStyle(n,'float',v);dom.setStyle(bl||n.parentNode,'textAlign','');}this.mceRepaint();return;}if(ed.settings.inline_styles&&ed.settings.forced_root_block){if(rm)v='';each(this._getSelectedBlocks(dom.getParent(se.getStart(),dom.isBlock),dom.getParent(se.getEnd(),dom.isBlock)),function(e){dom.setAttrib(e,'align','');dom.setStyle(e,'textAlign',v=='full'?'justify':v);});return;}else if(!rm)ed.getDoc().execCommand(c,false,null);if(ed.settings.inline_styles){if(rm){dom.getParent(ed.selection.getNode(),function(n){if(n.style&&n.style.textAlign)dom.setStyle(n,'textAlign','');});return;}each(dom.select('*'),function(n){var v=n.align;if(v){if(v=='full')v='justify';dom.setStyle(n,'textAlign',v);dom.setAttrib(n,'align','');}});}},mceSetCSSClass:function(u,v){this.mceSetStyleInfo(0,{command:'setattrib',name:'class',value:v});},getSelectedElement:function(){var t=this,ed=t.editor,dom=ed.dom,se=ed.selection,r=se.getRng(),r1,r2,sc,ec,so,eo,e,sp,ep,re;if(se.isCollapsed()||r.item)return se.getNode();re=ed.settings.merge_styles_invalid_parents;if(tinymce.is(re,'string'))re=new RegExp(re,'i');if(isIE){r1=r.duplicate();r1.collapse(true);sc=r1.parentElement();r2=r.duplicate();r2.collapse(false);ec=r2.parentElement();if(sc!=ec){r1.move('character',1);sc=r1.parentElement();}if(sc==ec){r1=r.duplicate();r1.moveToElementText(sc);if(r1.compareEndPoints('StartToStart',r)==0&&r1.compareEndPoints('EndToEnd',r)==0)return re&&re.test(sc.nodeName)?null:sc;}}else{function getParent(n){return dom.getParent(n,function(n){return n.nodeType==1;});};sc=r.startContainer;ec=r.endContainer;so=r.startOffset;eo=r.endOffset;if(!r.collapsed){if(sc==ec){if(so-eo<2){if(sc.hasChildNodes()){sp=sc.childNodes[so];return re&&re.test(sp.nodeName)?null:sp;}}}}if(sc.nodeType!=3||ec.nodeType!=3)return null;if(so==0){sp=getParent(sc);if(sp&&sp.firstChild!=sc)sp=null;}if(so==sc.nodeValue.length){e=sc.nextSibling;if(e&&e.nodeType==1)sp=sc.nextSibling;}if(eo==0){e=ec.previousSibling;if(e&&e.nodeType==1)ep=e;}if(eo==ec.nodeValue.length){ep=getParent(ec);if(ep&&ep.lastChild!=ec)ep=null;}if(sp==ep)return re&&sp&&re.test(sp.nodeName)?null:sp;}return null;},InsertHorizontalRule:function(){if(isGecko||isIE)this.editor.selection.setContent('<hr />');else this.editor.getDoc().execCommand('InsertHorizontalRule',false,'');},RemoveFormat:function(){var t=this,ed=t.editor,s=ed.selection,b;if(isWebKit)s.setContent(s.getContent({format:'raw'}).replace(/(<(span|b|i|strong|em|strike) [^>]+>|<(span|b|i|strong|em|strike)>|<\/(span|b|i|strong|em|strike)>|)/g,''),{format:'raw'});else ed.getDoc().execCommand('RemoveFormat',false,null);t.mceSetStyleInfo(0,{command:'removeformat'});ed.addVisual();},mceSetStyleInfo:function(u,v){var t=this,ed=t.editor,d=ed.getDoc(),dom=ed.dom,e,b,s=ed.selection,nn=v.wrapper||'span',b=s.getBookmark(),re;function set(n,e){if(n.nodeType==1){switch(v.command){case'setattrib':return dom.setAttrib(n,v.name,v.value);case'setstyle':return dom.setStyle(n,v.name,v.value);case'removeformat':return dom.setAttrib(n,'class','');}}};re=ed.settings.merge_styles_invalid_parents;if(tinymce.is(re,'string'))re=new RegExp(re,'i');if(e=t.getSelectedElement())set(e,1);else{d.execCommand('FontName',false,'__');each(isWebKit?dom.select('span'):dom.select('font'),function(n){var sp,e;if(dom.getAttrib(n,'face')=='__'||n.style.fontFamily==='__'){sp=dom.create(nn,{mce_new:'1'});set(sp);each(n.childNodes,function(n){sp.appendChild(n.cloneNode(true));});dom.replace(sp,n);}});}each(dom.select(nn).reverse(),function(n){var p=n.parentNode;if(!dom.getAttrib(n,'mce_new')){p=dom.getParent(n,function(n){return n.nodeType==1&&dom.getAttrib(n,'mce_new');});if(p)dom.remove(n,1);}});each(dom.select(nn).reverse(),function(n){var p=n.parentNode;if(!p||!dom.getAttrib(n,'mce_new'))return;if(p.nodeName==nn.toUpperCase()&&p.childNodes.length==1)return dom.remove(p,1);if(n.nodeType==1&&(!re||!re.test(p.nodeName))&&p.childNodes.length==1){set(p);dom.setAttrib(n,'class','');}});each(dom.select(nn).reverse(),function(n){if(dom.getAttrib(n,'mce_new')||(dom.getAttribs(n).length<=1&&n.className==='')){if(!dom.getAttrib(n,'class')&&!dom.getAttrib(n,'style'))return dom.remove(n,1);dom.setAttrib(n,'mce_new','');}});s.moveToBookmark(b);},queryStateJustify:function(c,v){var ed=this.editor,n=ed.selection.getNode(),dom=ed.dom;if(n&&n.nodeName=='IMG'){if(dom.getStyle(n,'float')==v)return 1;return n.parentNode.style.textAlign==v;}n=dom.getParent(ed.selection.getStart(),function(n){return n.nodeType==1&&n.style.textAlign;});if(v=='full')v='justify';if(ed.settings.inline_styles)return(n&&n.style.textAlign==v);return this._queryState(c);},HiliteColor:function(ui,val){var t=this,ed=t.editor,d=ed.getDoc();function set(s){if(!isGecko)return;try{d.execCommand("styleWithCSS",0,s);}catch(ex){d.execCommand("useCSS",0,!s);}};if(isGecko||isOpera){set(true);d.execCommand('hilitecolor',false,val);set(false);}else d.execCommand('BackColor',false,val);},Undo:function(){var ed=this.editor;if(ed.settings.custom_undo_redo){ed.undoManager.undo();ed.nodeChanged();}else ed.getDoc().execCommand('Undo',false,null);},Redo:function(){var ed=this.editor;if(ed.settings.custom_undo_redo){ed.undoManager.redo();ed.nodeChanged();}else ed.getDoc().execCommand('Redo',false,null);},FormatBlock:function(ui,val){var t=this,ed=t.editor,s=ed.selection,dom=ed.dom,bl,nb,b;function isBlock(n){return/^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test(n.nodeName);};bl=dom.getParent(s.getNode(),function(n){return isBlock(n);});if(bl){if((isIE&&isBlock(bl.parentNode))||bl.nodeName=='DIV'){nb=ed.dom.create(val);each(dom.getAttribs(bl),function(v){dom.setAttrib(nb,v.nodeName,dom.getAttrib(bl,v.nodeName));});b=s.getBookmark();dom.replace(nb,bl,1);s.moveToBookmark(b);ed.nodeChanged();return;}}val=ed.settings.forced_root_block?(val||'<p>'):val;if(val.indexOf('<')==-1)val='<'+val+'>';if(tinymce.isGecko)val=val.replace(/<(div|blockquote|code|dt|dd|dl|samp)>/gi,'$1');ed.getDoc().execCommand('FormatBlock',false,val);},mceCleanup:function(){var ed=this.editor,s=ed.selection,b=s.getBookmark();ed.setContent(ed.getContent());s.moveToBookmark(b);},mceRemoveNode:function(ui,val){var ed=this.editor,s=ed.selection,b,n=val||s.getNode();if(n==ed.getBody())return;b=s.getBookmark();ed.dom.remove(n,1);s.moveToBookmark(b);ed.nodeChanged();},mceSelectNodeDepth:function(ui,val){var ed=this.editor,s=ed.selection,c=0;ed.dom.getParent(s.getNode(),function(n){if(n.nodeType==1&&c++==val){s.select(n);ed.nodeChanged();return false;}},ed.getBody());},mceSelectNode:function(u,v){this.editor.selection.select(v);},mceInsertContent:function(ui,val){this.editor.selection.setContent(val);},mceInsertRawHTML:function(ui,val){var ed=this.editor;ed.selection.setContent('tiny_mce_marker');ed.setContent(ed.getContent().replace(/tiny_mce_marker/g,val));},mceRepaint:function(){var s,b,e=this.editor;if(tinymce.isGecko){try{s=e.selection;b=s.getBookmark(true);if(s.getSel())s.getSel().selectAllChildren(e.getBody());s.collapse(true);s.moveToBookmark(b);}catch(ex){}}},queryStateUnderline:function(){var ed=this.editor,n=ed.selection.getNode();if(n&&n.nodeName=='A')return false;return this._queryState('Underline');},queryStateOutdent:function(){var ed=this.editor,n;if(ed.settings.inline_styles){if((n=ed.dom.getParent(ed.selection.getStart(),ed.dom.isBlock))&&parseInt(n.style.paddingLeft)>0)return true;if((n=ed.dom.getParent(ed.selection.getEnd(),ed.dom.isBlock))&&parseInt(n.style.paddingLeft)>0)return true;}else return!!ed.dom.getParent(ed.selection.getNode(),'BLOCKQUOTE');return this.queryStateInsertUnorderedList()||this.queryStateInsertOrderedList();},queryStateInsertUnorderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),'UL');},queryStateInsertOrderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),'OL');},queryStatemceBlockQuote:function(){return!!this.editor.dom.getParent(this.editor.selection.getStart(),function(n){return n.nodeName==='BLOCKQUOTE';});},mceBlockQuote:function(){var t=this,ed=t.editor,s=ed.selection,dom=ed.dom,sb,eb,n,bm,bq,r,bq2,i,nl;function getBQ(e){return dom.getParent(e,function(n){return n.nodeName==='BLOCKQUOTE';});};sb=dom.getParent(s.getStart(),dom.isBlock);eb=dom.getParent(s.getEnd(),dom.isBlock);if(bq=getBQ(sb)){if(sb!=eb||sb.childNodes.length>1||(sb.childNodes.length==1&&sb.firstChild.nodeName!='BR'))bm=s.getBookmark();if(getBQ(eb)){bq2=bq.cloneNode(false);while(n=eb.nextSibling)bq2.appendChild(n.parentNode.removeChild(n));}if(bq2)dom.insertAfter(bq2,bq);nl=t._getSelectedBlocks(sb,eb);for(i=nl.length-1;i>=0;i--){dom.insertAfter(nl[i],bq);}if(/^\s*$/.test(bq.innerHTML))dom.remove(bq,1);if(bq2&&/^\s*$/.test(bq2.innerHTML))dom.remove(bq2,1);if(!bm){if(!isIE){r=ed.getDoc().createRange();r.setStart(sb,0);r.setEnd(sb,0);s.setRng(r);}else{s.select(sb);s.collapse(0);if(dom.getParent(s.getStart(),dom.isBlock)!=sb){r=s.getRng();r.move('character',-1);r.select();}}}else t.editor.selection.moveToBookmark(bm);return;}if(isIE&&!sb&&!eb){t.editor.getDoc().execCommand('Indent');n=getBQ(s.getNode());n.style.margin=n.dir='';return;}if(!sb||!eb)return;if(sb!=eb||sb.childNodes.length>1||(sb.childNodes.length==1&&sb.firstChild.nodeName!='BR'))bm=s.getBookmark();each(t._getSelectedBlocks(getBQ(s.getStart()),getBQ(s.getEnd())),function(e){if(e.nodeName=='BLOCKQUOTE'&&!bq){bq=e;return;}if(!bq){bq=dom.create('blockquote');e.parentNode.insertBefore(bq,e);}if(e.nodeName=='BLOCKQUOTE'&&bq){n=e.firstChild;while(n){bq.appendChild(n.cloneNode(true));n=n.nextSibling;}dom.remove(e);return;}bq.appendChild(dom.remove(e));});if(!bm){if(!isIE){r=ed.getDoc().createRange();r.setStart(sb,0);r.setEnd(sb,0);s.setRng(r);}else{s.select(sb);s.collapse(1);}}else s.moveToBookmark(bm);},_getSelectedBlocks:function(st,en){var ed=this.editor,dom=ed.dom,s=ed.selection,sb,eb,n,bl=[];sb=dom.getParent(st||s.getStart(),dom.isBlock);eb=dom.getParent(en||s.getEnd(),dom.isBlock);if(sb)bl.push(sb);if(sb&&eb&&sb!=eb){n=sb;while((n=n.nextSibling)&&n!=eb){if(dom.isBlock(n))bl.push(n);}}if(eb&&sb!=eb)bl.push(eb);return bl;}});})();tinymce.create('tinymce.UndoManager',{index:0,data:null,typing:0,UndoManager:function(ed){var t=this,Dispatcher=tinymce.util.Dispatcher;t.editor=ed;t.data=[];t.onAdd=new Dispatcher(this);t.onUndo=new Dispatcher(this);t.onRedo=new Dispatcher(this);},add:function(l){var t=this,i,ed=t.editor,b,s=ed.settings,la;l=l||{};l.content=l.content||ed.getContent({format:'raw',no_events:1});l.content=l.content.replace(/^\s*|\s*$/g,'');la=t.data[t.index>0&&(t.index==0||t.index==t.data.length)?t.index-1:t.index];if(!l.initial&&la&&l.content==la.content)return null;if(s.custom_undo_redo_levels){if(t.data.length>s.custom_undo_redo_levels){for(i=0;i<t.data.length-1;i++)t.data[i]=t.data[i+1];t.data.length--;t.index=t.data.length;}}if(s.custom_undo_redo_restore_selection&&!l.initial)l.bookmark=b=l.bookmark||ed.selection.getBookmark();if(t.index<t.data.length)t.index++;if(t.data.length===0&&!l.initial)return null;t.data.length=t.index+1;t.data[t.index++]=l;if(l.initial)t.index=0;if(t.data.length==2&&t.data[0].initial)t.data[0].bookmark=b;t.onAdd.dispatch(t,l);ed.isNotDirty=0;return l;},undo:function(){var t=this,ed=t.editor,l=l,i;if(t.typing){t.add();t.typing=0;}if(t.index>0){if(t.index==t.data.length&&t.index>1){i=t.index;t.typing=0;if(!t.add())t.index=i;--t.index;}l=t.data[--t.index];ed.setContent(l.content,{format:'raw'});ed.selection.moveToBookmark(l.bookmark);t.onUndo.dispatch(t,l);}return l;},redo:function(){var t=this,ed=t.editor,l=null;if(t.index<t.data.length-1){l=t.data[++t.index];ed.setContent(l.content,{format:'raw'});ed.selection.moveToBookmark(l.bookmark);t.onRedo.dispatch(t,l);}return l;},clear:function(){var t=this;t.data=[];t.index=0;t.typing=0;t.add({initial:true});},hasUndo:function(){return this.index!=0||this.typing;},hasRedo:function(){return this.index<this.data.length-1;}});(function(){var Event,isIE,isGecko,isOpera,each,extend;Event=tinymce.dom.Event;isIE=tinymce.isIE;isGecko=tinymce.isGecko;isOpera=tinymce.isOpera;each=tinymce.each;extend=tinymce.extend;tinymce.create('tinymce.ForceBlocks',{ForceBlocks:function(ed){var t=this,s=ed.settings,elm;t.editor=ed;t.dom=ed.dom;elm=(s.forced_root_block||'p').toLowerCase();s.element=elm.toUpperCase();ed.onPreInit.add(t.setup,t);t.reOpera=new RegExp('(\\u00a0| | )<\/'+elm+'>','gi');t.rePadd=new RegExp('<p( )([^>]+)><\\\/p>|<p( )([^>]+)\\\/>|<p( )([^>]+)>\\s+<\\\/p>|<p><\\\/p>|<p\\\/>|<p>\\s+<\\\/p>'.replace(/p/g,elm),'gi');t.reNbsp2BR1=new RegExp('<p( )([^>]+)>[\\s\\u00a0]+<\\\/p>|<p>[\\s\\u00a0]+<\\\/p>'.replace(/p/g,elm),'gi');t.reNbsp2BR2=new RegExp('<p( )([^>]+)>( | )<\\\/p>|<p>( | )<\\\/p>'.replace(/p/g,elm),'gi');t.reBR2Nbsp=new RegExp('<p( )([^>]+)>\\s*<br \\\/>\\s*<\\\/p>|<p>\\s*<br \\\/>\\s*<\\\/p>'.replace(/p/g,elm),'gi');t.reTrailBr=new RegExp('\\s*<br \\/>\\s*<\\\/p>'.replace(/p/g,elm),'gi');function padd(ed,o){if(isOpera)o.content=o.content.replace(t.reOpera,'</'+elm+'>');o.content=o.content.replace(t.rePadd,'<'+elm+'$1$2$3$4$5$6>\u00a0</'+elm+'>');if(!isIE&&!isOpera&&o.set){o.content=o.content.replace(t.reNbsp2BR1,'<'+elm+'$1$2><br /></'+elm+'>');o.content=o.content.replace(t.reNbsp2BR2,'<'+elm+'$1$2><br /></'+elm+'>');}else{o.content=o.content.replace(t.reBR2Nbsp,'<'+elm+'$1$2>\u00a0</'+elm+'>');o.content=o.content.replace(t.reTrailBr,'</'+elm+'>');}};ed.onBeforeSetContent.add(padd);ed.onPostProcess.add(padd);if(s.forced_root_block){ed.onInit.add(t.forceRoots,t);ed.onSetContent.add(t.forceRoots,t);ed.onBeforeGetContent.add(t.forceRoots,t);}},setup:function(){var t=this,ed=t.editor,s=ed.settings;if(s.forced_root_block){ed.onKeyUp.add(t.forceRoots,t);ed.onPreProcess.add(t.forceRoots,t);}if(s.force_br_newlines){if(isIE){ed.onKeyPress.add(function(ed,e){var n,s=ed.selection;if(e.keyCode==13&&s.getNode().nodeName!='LI'){s.setContent('<br id="__" /> ',{format:'raw'});n=ed.dom.get('__');n.removeAttribute('id');s.select(n);s.collapse();return Event.cancel(e);}});}return;}if(!isIE&&s.force_p_newlines){ed.onKeyPress.add(function(ed,e){if(e.keyCode==13&&!e.shiftKey){if(!t.insertPara(e))Event.cancel(e);}});if(isGecko){ed.onKeyDown.add(function(ed,e){if((e.keyCode==8||e.keyCode==46)&&!e.shiftKey)t.backspaceDelete(e,e.keyCode==8);});}}function ren(rn,na){var ne=ed.dom.create(na);each(rn.attributes,function(a){if(a.specified&&a.nodeValue)ne.setAttribute(a.nodeName.toLowerCase(),a.nodeValue);});each(rn.childNodes,function(n){ne.appendChild(n.cloneNode(true));});rn.parentNode.replaceChild(ne,rn);return ne;};if(isIE&&s.element!='P'){ed.onKeyPress.add(function(ed,e){t.lastElm=ed.selection.getNode().nodeName;});ed.onKeyUp.add(function(ed,e){var bl,sel=ed.selection,n=sel.getNode(),b=ed.getBody();if(b.childNodes.length===1&&n.nodeName=='P'){n=ren(n,s.element);sel.select(n);sel.collapse();ed.nodeChanged();}else if(e.keyCode==13&&!e.shiftKey&&t.lastElm!='P'){bl=ed.dom.getParent(n,'P');if(bl){ren(bl,s.element);ed.nodeChanged();}}});}},find:function(n,t,s){var ed=this.editor,w=ed.getDoc().createTreeWalker(n,4,null,false),c=-1;while(n=w.nextNode()){c++;if(t==0&&n==s)return c;if(t==1&&c==s)return n;}return-1;},forceRoots:function(ed,e){var t=this,ed=t.editor,b=ed.getBody(),d=ed.getDoc(),se=ed.selection,s=se.getSel(),r=se.getRng(),si=-2,ei,so,eo,tr,c=-0xFFFFFF;var nx,bl,bp,sp,le,nl=b.childNodes,i;if(e&&e.keyCode==13)return true;for(i=nl.length-1;i>=0;i--){nx=nl[i];if(nx.nodeType==3||(!t.dom.isBlock(nx)&&nx.nodeType!=8)){if(!bl){if(nx.nodeType!=3||/[^\s]/g.test(nx.nodeValue)){if(si==-2&&r){if(!isIE){if(ed.dom.getParent(r.startContainer,function(e){return e===b;})){so=r.startOffset;eo=r.endOffset;si=t.find(b,0,r.startContainer);ei=t.find(b,0,r.endContainer);}}else{tr=d.body.createTextRange();tr.moveToElementText(b);tr.collapse(1);bp=tr.move('character',c)*-1;tr=r.duplicate();tr.collapse(1);sp=tr.move('character',c)*-1;tr=r.duplicate();tr.collapse(0);le=(tr.move('character',c)*-1)-sp;si=sp-bp;ei=le;}}bl=ed.dom.create(ed.settings.forced_root_block);bl.appendChild(nx.cloneNode(1));nx.parentNode.replaceChild(bl,nx);}}else{if(bl.hasChildNodes())bl.insertBefore(nx,bl.firstChild);else bl.appendChild(nx);}}else bl=null;}if(si!=-2){if(!isIE){bl=b.getElementsByTagName(ed.settings.element)[0];r=d.createRange();if(si!=-1)r.setStart(t.find(b,1,si),so);else r.setStart(bl,0);if(ei!=-1)r.setEnd(t.find(b,1,ei),eo);else r.setEnd(bl,0);if(s){s.removeAllRanges();s.addRange(r);}}else{try{r=s.createRange();r.moveToElementText(b);r.collapse(1);r.moveStart('character',si);r.moveEnd('character',ei);r.select();}catch(ex){}}}},getParentBlock:function(n){var d=this.dom;return d.getParent(n,d.isBlock);},insertPara:function(e){var t=this,ed=t.editor,dom=ed.dom,d=ed.getDoc(),se=ed.settings,s=ed.selection.getSel(),r=s.getRangeAt(0),b=d.body;var rb,ra,dir,sn,so,en,eo,sb,eb,bn,bef,aft,sc,ec,n,vp=dom.getViewPort(ed.getWin()),y,ch;function isEmpty(n){n=n.innerHTML;n=n.replace(/<(img|hr|table)/gi,'-');n=n.replace(/<[^>]+>/g,'');return n.replace(/[ \t\r\n]+/g,'')=='';};rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(true);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(true);dir=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;sn=dir?s.anchorNode:s.focusNode;so=dir?s.anchorOffset:s.focusOffset;en=dir?s.focusNode:s.anchorNode;eo=dir?s.focusOffset:s.anchorOffset;if(sn===en&&/^(TD|TH)$/.test(sn.nodeName)){dom.remove(sn.firstChild);ed.dom.add(sn,se.element,null,'<br />');aft=ed.dom.add(sn,se.element,null,'<br />');r=d.createRange();r.selectNodeContents(aft);r.collapse(1);ed.selection.setRng(r);return false;}if(sn==b&&en==b&&b.firstChild&&ed.dom.isBlock(b.firstChild)){sn=en=sn.firstChild;so=eo=0;rb=d.createRange();rb.setStart(sn,0);ra=d.createRange();ra.setStart(en,0);}sn=sn.nodeName=="HTML"?d.body:sn;sn=sn.nodeName=="BODY"?sn.firstChild:sn;en=en.nodeName=="HTML"?d.body:en;en=en.nodeName=="BODY"?en.firstChild:en;sb=t.getParentBlock(sn);eb=t.getParentBlock(en);bn=sb?sb.nodeName:se.element;if(t.dom.getParent(sb,function(n){return/OL|UL|PRE/.test(n.nodeName);}))return true;if(sb&&(sb.nodeName=='CAPTION'||/absolute|relative|static/gi.test(sb.style.position))){bn=se.element;sb=null;}if(eb&&(eb.nodeName=='CAPTION'||/absolute|relative|static/gi.test(eb.style.position))){bn=se.element;eb=null;}if(/(TD|TABLE|TH|CAPTION)/.test(bn)||(sb&&bn=="DIV"&&/left|right/gi.test(sb.style.cssFloat))){bn=se.element;sb=eb=null;}bef=(sb&&sb.nodeName==bn)?sb.cloneNode(0):ed.dom.create(bn);aft=(eb&&eb.nodeName==bn)?eb.cloneNode(0):ed.dom.create(bn);aft.removeAttribute('id');if(/^(H[1-6])$/.test(bn)&&sn.nodeValue&&so==sn.nodeValue.length)aft=ed.dom.create(se.element);n=sc=sn;do{if(n==b||n.nodeType==9||t.dom.isBlock(n)||/(TD|TABLE|TH|CAPTION)/.test(n.nodeName))break;sc=n;}while((n=n.previousSibling?n.previousSibling:n.parentNode));n=ec=en;do{if(n==b||n.nodeType==9||t.dom.isBlock(n)||/(TD|TABLE|TH|CAPTION)/.test(n.nodeName))break;ec=n;}while((n=n.nextSibling?n.nextSibling:n.parentNode));if(sc.nodeName==bn)rb.setStart(sc,0);else rb.setStartBefore(sc);rb.setEnd(sn,so);bef.appendChild(rb.cloneContents()||d.createTextNode(''));try{ra.setEndAfter(ec);}catch(ex){}ra.setStart(en,eo);aft.appendChild(ra.cloneContents()||d.createTextNode(''));r=d.createRange();if(!sc.previousSibling&&sc.parentNode.nodeName==bn){r.setStartBefore(sc.parentNode);}else{if(rb.startContainer.nodeName==bn&&rb.startOffset==0)r.setStartBefore(rb.startContainer);else r.setStart(rb.startContainer,rb.startOffset);}if(!ec.nextSibling&&ec.parentNode.nodeName==bn)r.setEndAfter(ec.parentNode);else r.setEnd(ra.endContainer,ra.endOffset);r.deleteContents();if(isOpera)ed.getWin().scrollTo(0,vp.y);if(bef.firstChild&&bef.firstChild.nodeName==bn)bef.innerHTML=bef.firstChild.innerHTML;if(aft.firstChild&&aft.firstChild.nodeName==bn)aft.innerHTML=aft.firstChild.innerHTML;if(isEmpty(bef))bef.innerHTML='<br />';if(isEmpty(aft))aft.innerHTML=isOpera?' ':'<br />';if(isOpera&&parseFloat(opera.version())<9.5){r.insertNode(bef);r.insertNode(aft);}else{r.insertNode(aft);r.insertNode(bef);}aft.normalize();bef.normalize();function first(n){return d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false).nextNode()||n;};r=d.createRange();r.selectNodeContents(isGecko?first(aft):aft);r.collapse(1);s.removeAllRanges();s.addRange(r);y=ed.dom.getPos(aft).y;ch=aft.clientHeight;if(y<vp.y||y+ch>vp.y+vp.h){ed.getWin().scrollTo(0,y<vp.y?y:y-vp.h+ch);}return false;},backspaceDelete:function(e,bs){var t=this,ed=t.editor,b=ed.getBody(),n,se=ed.selection,r=se.getRng(),sc=r.startContainer,n,w,tn;if(sc&&ed.dom.isBlock(sc)&&!/^(TD|TH)$/.test(sc.nodeName)&&bs){if(sc.childNodes.length==0||(sc.childNodes.length==1&&sc.firstChild.nodeName=='BR')){n=sc;while((n=n.previousSibling)&&!ed.dom.isBlock(n));if(n){if(sc!=b.firstChild){w=ed.dom.doc.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false);while(tn=w.nextNode())n=tn;r=ed.getDoc().createRange();r.setStart(n,n.nodeValue?n.nodeValue.length:0);r.setEnd(n,n.nodeValue?n.nodeValue.length:0);se.setRng(r);ed.dom.remove(sc);}return Event.cancel(e);}}}function handler(e){e=e.target;if(e&&e.parentNode&&e.nodeName=='BR'&&(n=t.getParentBlock(e))){Event.remove(b,'DOMNodeInserted',handler);if(e.previousSibling||e.nextSibling)ed.dom.remove(e);}};Event._add(b,'DOMNodeInserted',handler);window.setTimeout(function(){Event._remove(b,'DOMNodeInserted',handler);},1);}});})();(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,extend=tinymce.extend;tinymce.create('tinymce.ControlManager',{ControlManager:function(ed,s){var t=this,i;s=s||{};t.editor=ed;t.controls={};t.onAdd=new tinymce.util.Dispatcher(t);t.onPostRender=new tinymce.util.Dispatcher(t);t.prefix=s.prefix||ed.id+'_';t._cls={};t.onPostRender.add(function(){each(t.controls,function(c){c.postRender();});});},get:function(id){return this.controls[this.prefix+id]||this.controls[id];},setActive:function(id,s){var c=null;if(c=this.get(id))c.setActive(s);return c;},setDisabled:function(id,s){var c=null;if(c=this.get(id))c.setDisabled(s);return c;},add:function(c){var t=this;if(c){t.controls[c.id]=c;t.onAdd.dispatch(c,t);}return c;},createControl:function(n){var c,t=this,ed=t.editor;each(ed.plugins,function(p){if(p.createControl){c=p.createControl(n,t);if(c)return false;}});switch(n){case"|":case"separator":return t.createSeparator();}if(!c&&ed.buttons&&(c=ed.buttons[n]))return t.createButton(n,c);return t.add(c);},createDropMenu:function(id,s,cc){var t=this,ed=t.editor,c,bm,v,cls;s=extend({'class':'mceDropDown',constrain:ed.settings.constrain_menus},s);s['class']=s['class']+' '+ed.getParam('skin')+'Skin';if(v=ed.getParam('skin_variant'))s['class']+=' '+ed.getParam('skin')+'Skin'+v.substring(0,1).toUpperCase()+v.substring(1);id=t.prefix+id;cls=cc||t._cls.dropmenu||tinymce.ui.DropMenu;c=t.controls[id]=new cls(id,s);c.onAddItem.add(function(c,o){var s=o.settings;s.title=ed.getLang(s.title,s.title);if(!s.onclick){s.onclick=function(v){ed.execCommand(s.cmd,s.ui||false,s.value);};}});ed.onRemove.add(function(){c.destroy();});if(tinymce.isIE){c.onShowMenu.add(function(){bm=ed.selection.getBookmark(1);});c.onHideMenu.add(function(){if(bm)ed.selection.moveToBookmark(bm);});}return t.add(c);},createListBox:function(id,s,cc){var t=this,ed=t.editor,cmd,c,cls;if(t.get(id))return null;s.title=ed.translate(s.title);s.scope=s.scope||ed;if(!s.onselect){s.onselect=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}s=extend({title:s.title,'class':'mce_'+id,scope:s.scope,control_manager:t},s);id=t.prefix+id;if(ed.settings.use_native_selects)c=new tinymce.ui.NativeListBox(id,s);else{cls=cc||t._cls.listbox||tinymce.ui.ListBox;c=new cls(id,s);}t.controls[id]=c;if(tinymce.isWebKit){c.onPostRender.add(function(c,n){Event.add(n,'mousedown',function(){ed.bookmark=ed.selection.getBookmark('simple');});Event.add(n,'focus',function(){ed.selection.moveToBookmark(ed.bookmark);ed.bookmark=null;});});}if(c.hideMenu)ed.onMouseDown.add(c.hideMenu,c);return t.add(c);},createButton:function(id,s,cc){var t=this,ed=t.editor,o,c,cls;if(t.get(id))return null;s.title=ed.translate(s.title);s.label=ed.translate(s.label);s.scope=s.scope||ed;if(!s.onclick&&!s.menu_button){s.onclick=function(){ed.execCommand(s.cmd,s.ui||false,s.value);};}s=extend({title:s.title,'class':'mce_'+id,unavailable_prefix:ed.getLang('unavailable',''),scope:s.scope,control_manager:t},s);id=t.prefix+id;if(s.menu_button){cls=cc||t._cls.menubutton||tinymce.ui.MenuButton;c=new cls(id,s);ed.onMouseDown.add(c.hideMenu,c);}else{cls=t._cls.button||tinymce.ui.Button;c=new cls(id,s);}return t.add(c);},createMenuButton:function(id,s){s=s||{};s.menu_button=1;return this.createButton(id,s);},createSplitButton:function(id,s,cc){var t=this,ed=t.editor,cmd,c,cls;if(t.get(id))return null;s.title=ed.translate(s.title);s.scope=s.scope||ed;if(!s.onclick){s.onclick=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}if(!s.onselect){s.onselect=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}s=extend({title:s.title,'class':'mce_'+id,scope:s.scope,control_manager:t},s);id=t.prefix+id;cls=cc||t._cls.splitbutton||tinymce.ui.SplitButton;c=t.add(new cls(id,s));ed.onMouseDown.add(c.hideMenu,c);return c;},createColorSplitButton:function(id,s,cc){var t=this,ed=t.editor,cmd,c,cls,bm;if(t.get(id))return null;s.title=ed.translate(s.title);s.scope=s.scope||ed;if(!s.onclick){s.onclick=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}if(!s.onselect){s.onselect=function(v){ed.execCommand(s.cmd,s.ui||false,v||s.value);};}s=extend({title:s.title,'class':'mce_'+id,'menu_class':ed.getParam('skin')+'Skin',scope:s.scope,more_colors_title:ed.getLang('more_colors')},s);id=t.prefix+id;cls=cc||t._cls.colorsplitbutton||tinymce.ui.ColorSplitButton;c=new cls(id,s);ed.onMouseDown.add(c.hideMenu,c);ed.onRemove.add(function(){c.destroy();});if(tinymce.isIE){c.onShowMenu.add(function(){bm=ed.selection.getBookmark(1);});c.onHideMenu.add(function(){if(bm){ed.selection.moveToBookmark(bm);bm=0;}});}return t.add(c);},createToolbar:function(id,s,cc){var c,t=this,cls;id=t.prefix+id;cls=cc||t._cls.toolbar||tinymce.ui.Toolbar;c=new cls(id,s);if(t.get(id))return null;return t.add(c);},createSeparator:function(cc){var cls=cc||this._cls.separator||tinymce.ui.Separator;return new cls();},setControlType:function(n,c){return this._cls[n.toLowerCase()]=c;},destroy:function(){each(this.controls,function(c){c.destroy();});this.controls=null;}});})();(function(){var Dispatcher=tinymce.util.Dispatcher,each=tinymce.each,isIE=tinymce.isIE,isOpera=tinymce.isOpera;tinymce.create('tinymce.WindowManager',{WindowManager:function(ed){var t=this;t.editor=ed;t.onOpen=new Dispatcher(t);t.onClose=new Dispatcher(t);t.params={};t.features={};},open:function(s,p){var t=this,f='',x,y,mo=t.editor.settings.dialog_type=='modal',w,sw,sh,vp=tinymce.DOM.getViewPort(),u;s=s||{};p=p||{};sw=isOpera?vp.w:screen.width;sh=isOpera?vp.h:screen.height;s.name=s.name||'mc_'+new Date().getTime();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240);s.resizable=true;s.left=s.left||parseInt(sw/ 2.0) - (s.width /2.0);s.top=s.top||parseInt(sh/ 2.0) - (s.height /2.0);p.inline=false;p.mce_width=s.width;p.mce_height=s.height;p.mce_auto_focus=s.auto_focus;if(mo){if(isIE){s.center=true;s.help=false;s.dialogWidth=s.width+'px';s.dialogHeight=s.height+'px';s.scroll=s.scrollbars||false;}}each(s,function(v,k){if(tinymce.is(v,'boolean'))v=v?'yes':'no';if(!/^(name|url)$/.test(k)){if(isIE&&mo)f+=(f?';':'')+k+':'+v;else f+=(f?',':'')+k+'='+v;}});t.features=s;t.params=p;t.onOpen.dispatch(t,s,p);u=s.url||s.file;if(tinymce.relaxedDomain)u+=(u.indexOf('?')==-1?'?':'&')+'mce_rdomain='+tinymce.relaxedDomain;u=tinymce._addVer(u);try{if(isIE&&mo){w=1;window.showModalDialog(u,window,f);}else w=window.open(u,s.name,f);}catch(ex){}if(!w)alert(t.editor.getLang('popup_blocked'));},close:function(w){w.close();this.onClose.dispatch(this);},createInstance:function(cl,a,b,c,d,e){var f=tinymce.resolve(cl);return new f(a,b,c,d,e);},confirm:function(t,cb,s){cb.call(s||this,confirm(this._decode(this.editor.getLang(t,t))));},alert:function(tx,cb,s){var t=this;alert(t._decode(t.editor.getLang(tx,tx)));if(cb)cb.call(s||t);},_decode:function(s){return tinymce.DOM.decode(s).replace(/\\n/g,'\n');}});}()); -
branches/crazyhorse/wp-includes/js/tinymce/tiny_mce_config.php
r8151 r8242 52 52 53 53 // Set up init variables 54 $https = ( isset($_SERVER['HTTPS']) && 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false; 55 56 $baseurl = get_option('siteurl') . '/wp-includes/js/tinymce'; 57 if ( $https ) $baseurl = str_replace('http://', 'https://', $baseurl); 54 $baseurl = includes_url('js/tinymce'); 58 55 59 56 $mce_css = $baseurl . '/wordpress.css'; 60 57 $mce_css = apply_filters('mce_css', $mce_css); 61 if ( $https ) $mce_css = str_replace('http://', 'https://', $mce_css);62 58 63 59 $mce_locale = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); // only ISO 639-1 … … 110 106 foreach ( $mce_external_plugins as $name => $url ) { 111 107 112 if ( $https) $url = str_replace('http://', 'https://', $url);108 if ( is_ssl() ) $url = str_replace('http://', 'https://', $url); 113 109 114 110 $plugins[] = '-' . $name; … … 227 223 if ( $disk_cache ) { 228 224 229 $cacheKey = apply_filters('tiny_mce_version', '200806 18');225 $cacheKey = apply_filters('tiny_mce_version', '20080626'); 230 226 231 227 foreach ( $initArray as $v ) … … 274 270 $mce_options = rtrim( trim($mce_options), '\n\r,' ); 275 271 276 $content = 'var tinyMCEPreInit = { settings : { themes : "' . $theme . '", plugins : "' . $initArray['plugins'] . '", languages : "' . $language . '", debug : false }, base : "' . $baseurl . '", suffix : "", query : "ver=31 01" };';272 $content = 'var tinyMCEPreInit = { settings : { themes : "' . $theme . '", plugins : "' . $initArray['plugins'] . '", languages : "' . $language . '", debug : false }, base : "' . $baseurl . '", suffix : "", query : "ver=311" };'; 277 273 278 274 // Load patch -
branches/crazyhorse/wp-includes/js/tinymce/wordpress.css
r7687 r8242 1 1 /* This file contains the CSS data for the editable area(iframe) of TinyMCE */ 2 2 3 .aligncenter { 3 .aligncenter, 4 dl.aligncenter { 4 5 display: block; 5 6 margin-left: auto; … … 13 14 .alignright { 14 15 float: right; 16 } 17 18 .wp_caption { 19 border: 1px solid #ddd; 20 text-align: center; 21 background-color: #f3f3f3; 22 padding-top: 4px; 23 margin: 10px; 24 -moz-border-radius: 3px; 25 -khtml-border-radius: 3px; 26 -webkit-border-radius: 3px; 27 border-radius: 3px; 28 } 29 30 .wp_caption img { 31 margin: 0; 32 padding: 0; 33 border: 0 none; 34 } 35 36 .wp_caption_dd { 37 font-size: 11px; 38 line-height: 17px; 39 padding: 0 4px 5px; 40 margin: 0; 15 41 } 16 42 … … 64 90 background: url(img/items.gif) no-repeat bottom left; 65 91 } 92 93 .mceIEcenter { 94 text-align: center; 95 } -
branches/crazyhorse/wp-includes/js/tinymce/wp-mce-help.php
r8151 r8242 7 7 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 8 8 <title><?php _e('Rich Editor Help') ?></title> 9 <script type="text/javascript" src="tiny_mce_popup.js?ver=31 01"></script>9 <script type="text/javascript" src="tiny_mce_popup.js?ver=311"></script> 10 10 <?php 11 11 wp_admin_css( 'global', true ); -
branches/crazyhorse/wp-includes/link-template.php
r8116 r8242 782 782 // should the list of allowed schemes be maintained elsewhere? 783 783 if ( !in_array($scheme, array('http', 'https')) ) { 784 if ( ('login' == $scheme) && ( force_ssl_login() || force_ssl_admin() ) ) 784 if ( ('login_post' == $scheme) && ( force_ssl_login() || force_ssl_admin() ) ) 785 $scheme = 'https'; 786 elseif ( ('login' == $scheme) && ( force_ssl_admin() ) ) 785 787 $scheme = 'https'; 786 788 elseif ( ('admin' == $scheme) && force_ssl_admin() ) -
branches/crazyhorse/wp-includes/media.php
r8029 r8242 349 349 350 350 return $html; 351 } 352 353 add_shortcode('wp_caption', 'wp_caption_shortcode'); 354 355 function wp_caption_shortcode($attr, $content = null) { 356 357 // Allow plugins/themes to override the default caption template. 358 $output = apply_filters('wp_caption_shortcode', '', $attr, $content); 359 if ( $output != '' ) 360 return $output; 361 362 extract(shortcode_atts(array( 363 'id' => '', 364 'align' => 'alignnone', 365 'width' => '', 366 'caption' => '' 367 ), $attr)); 368 369 if ( 1 > (int) $width || empty($caption) ) 370 return $content; 371 372 if ( $id ) $id = 'id="' . $id . '" '; 373 374 return '<dl ' . $id . 'class="wp_caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">' 375 . '<dt class="wp_caption_dt">' . $content . '</dt><dd class="wp_caption_dd">' . $caption . '</dd></dl>'; 351 376 } 352 377 -
branches/crazyhorse/wp-includes/pluggable.php
r8103 r8242 1 1 <?php 2 2 /** 3 * These functions can be replaced via plugins. They are loaded after4 * plugins are loaded.3 * These functions can be replaced via plugins. If plugins do not redefine these 4 * functions, then these will be used instead. 5 5 * 6 6 * @package WordPress … … 9 9 if ( !function_exists('set_current_user') ) : 10 10 /** 11 * set_current_user() - Populates global user information for any user12 * 13 * Set $id to null and specify a name if you do not know a user's ID 11 * Changes the current user by ID or name. 12 * 13 * Set $id to null and specify a name if you do not know a user's ID. 14 14 * 15 15 * @since 2.0.1 … … 27 27 if ( !function_exists('wp_set_current_user') ) : 28 28 /** 29 * wp_set_current_user() - Changes the current user by ID or name30 * 31 * Set $id to null and specify a name if you do not know a user's ID 32 * 33 * Some WordPress functionality is based on the current user and 34 * not based on the signed in user. Therefore, it opens the ability35 * to edit and performactions on users who aren't signed in.29 * Changes the current user by ID or name. 30 * 31 * Set $id to null and specify a name if you do not know a user's ID. 32 * 33 * Some WordPress functionality is based on the current user and not based on 34 * the signed in user. Therefore, it opens the ability to edit and perform 35 * actions on users who aren't signed in. 36 36 * 37 37 * @since 2.0.4 … … 61 61 if ( !function_exists('wp_get_current_user') ) : 62 62 /** 63 * wp_get_current_user() - Retrieve the current user object63 * Retrieve the current user object. 64 64 * 65 65 * @since 2.0.4 … … 78 78 if ( !function_exists('get_currentuserinfo') ) : 79 79 /** 80 * get_currentuserinfo() - Populate global variables with information about the currently logged in user 81 * 82 * Will set the current user, if the current user is not set. The current 83 * user will be set to the logged in person. If no user is logged in, then 84 * it will set the current user to 0, which is invalid and won't have any 85 * permissions. 80 * Populate global variables with information about the currently logged in user. 81 * 82 * Will set the current user, if the current user is not set. The current user 83 * will be set to the logged in person. If no user is logged in, then it will 84 * set the current user to 0, which is invalid and won't have any permissions. 86 85 * 87 86 * @since 0.71 … … 113 112 if ( !function_exists('get_userdata') ) : 114 113 /** 115 * get_userdata() - Retrieve user info by user ID114 * Retrieve user info by user ID. 116 115 * 117 116 * @since 0.71 … … 143 142 if ( !function_exists('update_user_cache') ) : 144 143 /** 145 * update_user_cache() - Updates a users cache when overridden by a plugin144 * Updates a users cache when overridden by a plugin. 146 145 * 147 146 * Core function does nothing. … … 158 157 if ( !function_exists('get_userdatabylogin') ) : 159 158 /** 160 * get_userdatabylogin() - Retrieve user info by login name159 * Retrieve user info by login name. 161 160 * 162 161 * @since 0.71 … … 192 191 if ( !function_exists('get_user_by_email') ) : 193 192 /** 194 * get_user_by_email() - Retrieve user info by email193 * Retrieve user info by email. 195 194 * 196 195 * @since 2.5 … … 222 221 if ( !function_exists( 'wp_mail' ) ) : 223 222 /** 224 * wp_mail() - Function to send mail, similar to PHP's mail 225 * 226 * A true return value does not automatically mean that the 227 * user received the email successfully. It just only means 228 * that the method used was able to process the request 229 * without any errors. 230 * 231 * Using the two 'wp_mail_from' and 'wp_mail_from_name' hooks 232 * allow from creating a from address like 'Name <email@address.com>' 233 * when both are set. If just 'wp_mail_from' is set, then just 234 * the email address will be used with no name. 235 * 236 * The default content type is 'text/plain' which does not 237 * allow using HTML. However, you can set the content type 238 * of the email by using the 'wp_mail_content_type' filter. 239 * 240 * The default charset is based on the charset used on the 241 * blog. The charset can be set using the 'wp_mail_charset' 242 * filter. 223 * Send mail, similar to PHP's mail 224 * 225 * A true return value does not automatically mean that the user received the 226 * email successfully. It just only means that the method used was able to 227 * process the request without any errors. 228 * 229 * Using the two 'wp_mail_from' and 'wp_mail_from_name' hooks allow from 230 * creating a from address like 'Name <email@address.com>' when both are set. If 231 * just 'wp_mail_from' is set, then just the email address will be used with no 232 * name. 233 * 234 * The default content type is 'text/plain' which does not allow using HTML. 235 * However, you can set the content type of the email by using the 236 * 'wp_mail_content_type' filter. 237 * 238 * The default charset is based on the charset used on the blog. The charset can 239 * be set using the 'wp_mail_charset' filter. 243 240 * 244 241 * @since 1.2.1 … … 420 417 421 418 /** 422 * wp_authenticate() - Checks a user's login information and logs them in if it checks out 419 * Checks a user's login information and logs them in if it checks out. 420 * 423 421 * @since 2.5 424 422 * … … 460 458 461 459 /** 462 * wp_logout() - Log the current user out 460 * Log the current user out. 461 * 463 462 * @since 2.5 464 *465 463 */ 466 464 if ( !function_exists('wp_logout') ) : … … 473 471 if ( !function_exists('wp_validate_auth_cookie') ) : 474 472 /** 475 * wp_validate_auth_cookie() - Validates authentication cookie476 * 477 * The checks include making sure that the authentication cookie 478 * is set andpulling in the contents (if $cookie is not used).479 * 480 * Makes sure the cookie is not expired. Verifies the hash in 481 * cookie is what isshould be and compares the two.473 * Validates authentication cookie. 474 * 475 * The checks include making sure that the authentication cookie is set and 476 * pulling in the contents (if $cookie is not used). 477 * 478 * Makes sure the cookie is not expired. Verifies the hash in cookie is what is 479 * should be and compares the two. 482 480 * 483 481 * @since 2.5 … … 534 532 if ( !function_exists('wp_generate_auth_cookie') ) : 535 533 /** 536 * wp_generate_auth_cookie() - Generate authentication cookie contents534 * Generate authentication cookie contents. 537 535 * 538 536 * @since 2.5 … … 559 557 if ( !function_exists('wp_set_auth_cookie') ) : 560 558 /** 561 * wp_set_auth_cookie() - Sets the authentication cookies based User ID 562 * 563 * The $remember parameter increases the time that the cookie will 564 * be kept. The default the cookie is kept without remembering is 565 * two days. When $remember is set, the cookies will be kept for 566 * 14 days or two weeks. 559 * Sets the authentication cookies based User ID. 560 * 561 * The $remember parameter increases the time that the cookie will be kept. The 562 * default the cookie is kept without remembering is two days. When $remember is 563 * set, the cookies will be kept for 14 days or two weeks. 567 564 * 568 565 * @since 2.5 … … 593 590 $logged_in_cookie = wp_generate_auth_cookie($user_id, $expiration, 'logged_in'); 594 591 595 do_action('set_auth_cookie', $auth_cookie, $expire, $scheme); 596 do_action('set_auth_cookie', $logged_in_cookie, $expire, 'logged_in'); 597 598 setcookie($auth_cookie_name, $auth_cookie, $expire, SITECOOKIEPATH . 'wp-admin', COOKIE_DOMAIN, $secure); 592 do_action('set_auth_cookie', $auth_cookie, $expire, $expiration, $user_id, $scheme); 593 do_action('set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in'); 594 595 setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure); 596 setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure); 599 597 setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, COOKIE_DOMAIN); 600 598 if ( COOKIEPATH != SITECOOKIEPATH ) … … 605 603 if ( !function_exists('wp_clear_auth_cookie') ) : 606 604 /** 607 * wp_clear_auth_cookie() - Deletes all of the cookies associated with authentication605 * Removes all of the cookies associated with authentication. 608 606 * 609 607 * @since 2.5 610 608 */ 611 609 function wp_clear_auth_cookie() { 612 setcookie(AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH . 'wp-admin', COOKIE_DOMAIN);613 setcookie( AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH . 'wp-admin', COOKIE_DOMAIN);614 setcookie( SECURE_AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH . 'wp-admin', COOKIE_DOMAIN);615 setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH . 'wp-admin', COOKIE_DOMAIN);610 setcookie(AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN); 611 setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN); 612 setcookie(AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN); 613 setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN); 616 614 setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); 617 615 setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN); 618 616 619 617 // Old cookies 618 setcookie(AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); 619 setcookie(AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN); 620 setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); 621 setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN); 622 623 // Even older cookies 620 624 setcookie(USER_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); 621 625 setcookie(PASS_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN); … … 627 631 if ( !function_exists('is_user_logged_in') ) : 628 632 /** 629 * is_user_logged_in() - Checks if the current visitor is a logged in user633 * Checks if the current visitor is a logged in user. 630 634 * 631 635 * @since 2.0.0 … … 645 649 if ( !function_exists('auth_redirect') ) : 646 650 /** 647 * auth_redirect() - Checks if a user is logged in, if not it redirects them to the login page651 * Checks if a user is logged in, if not it redirects them to the login page. 648 652 * 649 653 * @since 1.5 … … 688 692 if ( !function_exists('check_admin_referer') ) : 689 693 /** 690 * check_admin_referer() - Makes sure that a user was referred from another admin page, to avoid security exploits 694 * Makes sure that a user was referred from another admin page. 695 * 696 * To avoid security exploits. 691 697 * 692 698 * @since 1.2.0 … … 710 716 if ( !function_exists('check_ajax_referer') ) : 711 717 /** 712 * check_ajax_referer() -Verifies the AJAX request to prevent processing requests external of the blog.718 * Verifies the AJAX request to prevent processing requests external of the blog. 713 719 * 714 720 * @since 2.0.4 … … 736 742 if ( !function_exists('wp_redirect') ) : 737 743 /** 738 * wp_redirect() - Redirects to another page, with a workaround for the IIS Set-Cookie bug744 * Redirects to another page, with a workaround for the IIS Set-Cookie bug. 739 745 * 740 746 * @link http://support.microsoft.com/kb/q176113/ … … 769 775 if ( !function_exists('wp_sanitize_redirect') ) : 770 776 /** 771 * wp_sanitize_redirect() - Sanitizes a URL for use in a redirect777 * Sanitizes a URL for use in a redirect. 772 778 * 773 779 * @since 2.3 … … 797 803 if ( !function_exists('wp_safe_redirect') ) : 798 804 /** 799 * wp_safe_redirect() - Performs a safe (local) redirect, using wp_redirect()805 * Performs a safe (local) redirect, using wp_redirect(). 800 806 * 801 807 * Checks whether the $location is using an allowed host, if it has an absolute 802 * path. A plugin can therefore set or remove allowed host(s) to or from the list. 808 * path. A plugin can therefore set or remove allowed host(s) to or from the 809 * list. 803 810 * 804 811 * If the host is not allowed, then the redirect is to wp-admin on the siteurl 805 * instead. This prevents malicious redirects which redirect to another host, but806 * only used in a few places.812 * instead. This prevents malicious redirects which redirect to another host, 813 * but only used in a few places. 807 814 * 808 815 * @since 2.3 … … 835 842 if ( ! function_exists('wp_notify_postauthor') ) : 836 843 /** 837 * wp_notify_postauthor() - Notify an author of a comment/trackback/pingback to one of their posts844 * Notify an author of a comment/trackback/pingback to one of their posts. 838 845 * 839 846 * @since 1.0.0 … … 914 921 if ( !function_exists('wp_notify_moderator') ) : 915 922 /** 916 * wp_notify_moderator() - Notifies the moderator of the blog about a new comment that is awaiting approval923 * Notifies the moderator of the blog about a new comment that is awaiting approval. 917 924 * 918 925 * @since 1.0 … … 983 990 if ( !function_exists('wp_new_user_notification') ) : 984 991 /** 985 * wp_new_user_notification() - Notify the blog admin of a new user, normally via email992 * Notify the blog admin of a new user, normally via email. 986 993 * 987 994 * @since 2.0 … … 1016 1023 if ( !function_exists('wp_nonce_tick') ) : 1017 1024 /** 1018 * wp_nonce_tick() - Get the time-dependent variable for nonce creation 1019 * 1020 * A nonce has a lifespan of two ticks. Nonces in their second tick may be updated, e.g. by autosave. 1025 * Get the time-dependent variable for nonce creation. 1026 * 1027 * A nonce has a lifespan of two ticks. Nonces in their second tick may be 1028 * updated, e.g. by autosave. 1021 1029 * 1022 1030 * @since 2.5 … … 1033 1041 if ( !function_exists('wp_verify_nonce') ) : 1034 1042 /** 1035 * wp_verify_nonce() - Verify that correct nonce was used with time limit1036 * 1037 * The user is given an amount of time to use the token, so therefore, since 1038 * theUID and $action remain the same, the independent variable is the time.1043 * Verify that correct nonce was used with time limit. 1044 * 1045 * The user is given an amount of time to use the token, so therefore, since the 1046 * UID and $action remain the same, the independent variable is the time. 1039 1047 * 1040 1048 * @since 2.0.4 … … 1063 1071 if ( !function_exists('wp_create_nonce') ) : 1064 1072 /** 1065 * wp_create_nonce() - Creates a random, one time use token1073 * Creates a random, one time use token. 1066 1074 * 1067 1075 * @since 2.0.4 … … 1082 1090 if ( !function_exists('wp_salt') ) : 1083 1091 /** 1084 * wp_salt() - Get salt to add to hashes to help prevent attacks 1085 * 1086 * You can set the salt by defining two areas. One is in the database and 1087 * the other is in your wp-config.php file. The database location is defined 1088 * in the option named 'secret', but most likely will not need to be changed. 1089 * 1090 * The second, located in wp-config.php, is a constant named 'SECRET_KEY', but 1091 * is not required. If the constant is not defined then the database constants 1092 * will be used, since they are most likely given to be unique. However, given 1093 * that the salt will be added to the password and can be seen, the constant 1094 * is recommended to be set manually. 1092 * Get salt to add to hashes to help prevent attacks. 1093 * 1094 * The secret key is located in two places: the database in case the secret key 1095 * isn't defined in the second place, which is in the wp-config.php file. If you 1096 * are going to set the secret key, then you must do so in the wp-config.php 1097 * file. 1098 * 1099 * The secret key in the database is randomly generated and will be appended to 1100 * the secret key that is in wp-config.php file in some instances. It is 1101 * important to have the secret key defined or changed in wp-config.php. 1102 * 1103 * If you have installed WordPress 2.5 or later, then you will have the 1104 * SECRET_KEY defined in the wp-config.php already. You will want to change the 1105 * value in it because hackers will know what it is. If you have upgraded to 1106 * WordPress 2.5 or later version from a version before WordPress 2.5, then you 1107 * should add the constant to your wp-config.php file. 1108 * 1109 * Below is an example of how the SECRET_KEY constant is defined with a value. 1110 * You must not copy the below example and paste into your wp-config.php. If you 1111 * need an example, then you can have a 1112 * {@link http://api.wordpress.org/secret-key/1.0/ secret key created} for you. 1095 1113 * 1096 1114 * <code> … … 1098 1116 * </code> 1099 1117 * 1100 * Attention: Do not use above example! 1101 * 1102 * Salting passwords helps against tools which has stored hashed values 1103 * of common dictionary strings. The added values makes it harder to crack 1104 * if given salt string is not weak. 1105 * 1106 * Salting only helps if the string is not predictable and should be 1107 * made up of various characters. Think of the salt as a password for 1108 * securing your passwords, but common among all of your passwords. 1109 * Therefore the salt should be as long as possible as as difficult as 1110 * possible, because you will not have to remember it. 1118 * Salting passwords helps against tools which has stored hashed values of 1119 * common dictionary strings. The added values makes it harder to crack if given 1120 * salt string is not weak. 1111 1121 * 1112 1122 * @since 2.5 1123 * @link http://api.wordpress.org/secret-key/1.0/ Create a Secret Key for wp-config.php 1113 1124 * 1114 1125 * @return string Salt value from either 'SECRET_KEY' or 'secret' option … … 1169 1180 if ( !function_exists('wp_hash') ) : 1170 1181 /** 1171 * wp_hash() - Get hash of given string1182 * Get hash of given string. 1172 1183 * 1173 1184 * @since 2.0.4 … … 1186 1197 if ( !function_exists('wp_hash_password') ) : 1187 1198 /** 1188 * wp_hash_password() - Create a hash (encrypt) of a plain text password 1189 * 1190 * For integration with other applications, this function can be 1191 * overwritten to instead use the other package password checking 1192 * algorithm. 1199 * Create a hash (encrypt) of a plain text password. 1200 * 1201 * For integration with other applications, this function can be overwritten to 1202 * instead use the other package password checking algorithm. 1193 1203 * 1194 1204 * @since 2.5 … … 1214 1224 if ( !function_exists('wp_check_password') ) : 1215 1225 /** 1216 * wp_check_password() - Checks the plaintext password against the encrypted Password 1217 * 1218 * Maintains compatibility between old version and the new cookie 1219 * authentication protocol using PHPass library. The $hash parameter 1220 * is the encrypted password and the function compares the plain text 1221 * password when encypted similarly against the already encrypted 1222 * password to see if they match. 1223 * 1224 * For integration with other applications, this function can be 1225 * overwritten to instead use the other package password checking 1226 * algorithm. 1226 * Checks the plaintext password against the encrypted Password. 1227 * 1228 * Maintains compatibility between old version and the new cookie authentication 1229 * protocol using PHPass library. The $hash parameter is the encrypted password 1230 * and the function compares the plain text password when encypted similarly 1231 * against the already encrypted password to see if they match. 1232 * 1233 * For integration with other applications, this function can be overwritten to 1234 * instead use the other package password checking algorithm. 1227 1235 * 1228 1236 * @since 2.5 … … 1266 1274 if ( !function_exists('wp_generate_password') ) : 1267 1275 /** 1268 * wp_generate_password() - Generates a random password drawn from the defined set of characters1276 * Generates a random password drawn from the defined set of characters. 1269 1277 * 1270 1278 * @since 2.5 … … 1286 1294 if ( !function_exists('wp_set_password') ) : 1287 1295 /** 1288 * wp_set_password() - Updates the user's password with a new encrypted one 1289 * 1290 * For integration with other applications, this function can be 1291 * overwritten to instead use the other package password checking 1292 * algorithm. 1296 * Updates the user's password with a new encrypted one. 1297 * 1298 * For integration with other applications, this function can be overwritten to 1299 * instead use the other package password checking algorithm. 1293 1300 * 1294 1301 * @since 2.5 … … 1311 1318 if ( !function_exists( 'get_avatar' ) ) : 1312 1319 /** 1313 * get_avatar() - Get avatar for a user 1314 * 1315 * Retrieve the avatar for a user provided a user ID or email address 1320 * Retrieve the avatar for a user who provided a user ID or email address. 1316 1321 * 1317 1322 * @since 2.5 … … 1389 1394 if ( !function_exists('wp_setcookie') ) : 1390 1395 /** 1391 * wp_setcookie() - Sets a cookie for a user who just logged in1396 * Sets a cookie for a user who just logged in. 1392 1397 * 1393 1398 * @since 1.5 … … 1411 1416 if ( !function_exists('wp_clearcookie') ) : 1412 1417 /** 1413 * wp_clearcookie() - Clears the authentication cookie, logging the user out1418 * Clears the authentication cookie, logging the user out. 1414 1419 * 1415 1420 * @since 1.5 … … 1425 1430 if ( !function_exists('wp_get_cookie_login') ): 1426 1431 /** 1427 * wp_get_cookie_login() - Gets the user cookie login1428 * 1429 * This function is deprecated and should no longer be extended as it won't 1430 * beused anywhere in WordPress. Also, plugins shouldn't use it either.1432 * Gets the user cookie login. 1433 * 1434 * This function is deprecated and should no longer be extended as it won't be 1435 * used anywhere in WordPress. Also, plugins shouldn't use it either. 1431 1436 * 1432 1437 * @since 2.0.4 … … 1443 1448 if ( !function_exists('wp_login') ) : 1444 1449 /** 1445 * wp_login() - Checks a users login information and logs them in if it checks out 1446 * 1447 * Use the global $error to get the reason why the login failed. 1448 * If the username is blank, no error will be set, so assume 1449 * blank username on that case. 1450 * 1451 * Plugins extending this function should also provide the global 1452 * $error and set what the error is, so that those checking the 1453 * global for why there was a failure can utilize it later. 1450 * Checks a users login information and logs them in if it checks out. 1451 * 1452 * Use the global $error to get the reason why the login failed. If the username 1453 * is blank, no error will be set, so assume blank username on that case. 1454 * 1455 * Plugins extending this function should also provide the global $error and set 1456 * what the error is, so that those checking the global for why there was a 1457 * failure can utilize it later. 1454 1458 * 1455 1459 * @since 1.2.2 … … 1477 1481 if ( !function_exists( 'wp_text_diff' ) ) : 1478 1482 /** 1479 * wp_text_diff() - compares two strings and outputs a human readable HTML representation of their difference 1480 * 1481 * Basically a wrapper for man diff(1) 1482 * 1483 * Must accept an optional third parameter, $args @see wp_parse_args() 1484 * (string) title: optional. If present, titles the diff in a manner compatible with the output 1485 * 1486 * Must return the empty string if the two compared strings are found to be equivalent according to whatever metric 1483 * Displays a human readable HTML representation of the difference between two strings. 1484 * 1485 * The Diff is available for getting the changes between versions. The output is 1486 * HTML, so the primary use is for displaying the changes. If the two strings 1487 * are equivalent, then an empty string will be returned. 1488 * 1489 * The arguments supported and can be changed are listed below. 1490 * 1491 * 'title' : Default is an empty string. Titles the diff in a manner compatible 1492 * with the output. 1493 * 'title_left' : Default is an empty string. Change the HTML to the left of the 1494 * title. 1495 * 'title_right' : Default is an empty string. Change the HTML to the right of 1496 * the title. 1487 1497 * 1488 1498 * @since 2.6 1499 * @see wp_parse_args() Used to change defaults to user defined settings. 1489 1500 * @uses Text_Diff 1490 1501 * @uses WP_Text_Diff_Renderer_Table … … 1492 1503 * @param string $left_string "old" (left) version of string 1493 1504 * @param string $right_string "new" (right) version of string 1494 * @param string|array $args @see wp_parse_args()1495 * @return string human readable HTML of string differences. Empty string if strings are equivalent1505 * @param string|array $args Optional. Change 'title', 'title_left', and 'title_right' defaults. 1506 * @return string Empty string if strings are equivalent or HTML with differences. 1496 1507 */ 1497 1508 function wp_text_diff( $left_string, $right_string, $args = null ) { -
branches/crazyhorse/wp-includes/post.php
r8103 r8242 13 13 14 14 /** 15 * get_attached_file() - Get metadata for an attached file 16 * 17 * {@internal Missing Long Description}} 15 * Retrieve attached file path based on attachment ID. 16 * 17 * You can optionally send it through the 'get_attached_file' filter, but by 18 * default it will just return the file path unfiltered. 19 * 20 * The function works by getting the single post meta name, named 21 * '_wp_attached_file' and returning it. This is a convenience function to 22 * prevent looking up the meta name and provide a mechanism for sending the 23 * attached filename through a filter. 18 24 * 19 25 * @package WordPress 20 26 * @subpackage Post 21 27 * @since 2.0 28 * @uses apply_filters() Calls 'get_attached_file' on file path and attachment ID 22 29 * 23 30 * @param int $attachment_id Attachment ID 24 31 * @param bool $unfiltered Whether to apply filters or not 25 * @return array {@internal Missing Description}}32 * @return string The file path to the attached file. 26 33 */ 27 34 function get_attached_file( $attachment_id, $unfiltered = false ) { … … 33 40 34 41 /** 35 * update_attached_file() - Update attached file metadata 36 * 37 * {@internal Missing Long Description}} 42 * Update attachment file path based on attachment ID. 43 * 44 * Used to update the file path of the attachment, which uses post meta name 45 * '_wp_attached_file' to store the path of the attachment. 38 46 * 39 47 * @package WordPress 40 48 * @subpackage Post 41 49 * @since 2.1 50 * @uses apply_filters() Calls 'update_attached_file' on file path and attachment ID 42 51 * 43 52 * @param int $attachment_id Attachment ID 44 * @param string $file {@internal Missing Description}}45 * @return bool |mixed {@internal Missing Description}}53 * @param string $file File path for the attachment 54 * @return bool False on failure, true on success. 46 55 */ 47 56 function update_attached_file( $attachment_id, $file ) { … … 55 64 56 65 /** 57 * get_children() - Get post children 58 * 59 * {@internal Missing Long Description}} 66 * Retrieve all children of the post parent ID. 67 * 68 * Normally, without any enhancements, the children would apply to pages. In the 69 * context of the inner workings of WordPress, pages, posts, and attachments 70 * share the same table, so therefore the functionality could apply to any one 71 * of them. It is then noted that while this function does not work on posts, it 72 * does not mean that it won't work on posts. It is recommended that you know 73 * what context you wish to retrieve the children of. 74 * 75 * Attachments may also be made the child of a post, so if that is an accurate 76 * statement (which needs to be verified), it would then be possible to get 77 * all of the attachments for a post. Attachments have since changed since 78 * version 2.5, so this is most likely unaccurate, but serves generally as an 79 * example of what is possible. 80 * 81 * The arguments listed as defaults are for this function and also of the 82 * get_posts() function. The arguments are combined with the get_children 83 * defaults and are then passed to the get_posts() function, which accepts 84 * additional arguments. You can replace the defaults in this function, listed 85 * below and the additional arguments listed in the get_posts() function. 86 * 87 * The 'post_parent' is the most important argument and important attention 88 * needs to be paid to the $args parameter. If you pass either an object or an 89 * integer (number), then just the 'post_parent' is grabbed and everything else 90 * is lost. If you don't specify any arguments, then it is assumed that you are 91 * in The Loop and the post parent will be grabbed for from the current post. 92 * 93 * The 'post_parent' argument is the ID to get the children. The 'numberposts' 94 * is the amount of posts to retrieve that has a default of '-1', which is 95 * used to get all of the posts. Giving a number higher than 0 will only 96 * retrieve that amount of posts. 97 * 98 * The 'post_type' and 'post_status' arguments can be used to choose what 99 * criteria of posts to retrieve. The 'post_type' can be anything, but WordPress 100 * post types are 'post', 'pages', and 'attachments'. The 'post_status' 101 * argument will accept any post status within the write administration panels. 102 * 103 * @see get_posts() Has additional arguments that can be replaced. 104 * @internal Claims made in the long description might be inaccurate. 60 105 * 61 106 * @package WordPress … … 63 108 * @since 2.0 64 109 * 65 * @param mixed $args {@internal Missing Description}}66 * @param string $output {@internal Missing Description}}67 * @return mixed {@internal Missing Description}}110 * @param mixed $args Optional. User defined arguments for replacing the defaults. 111 * @param string $output Optional. Constant for return type, either OBJECT (default), ARRAY_A, ARRAY_N. 112 * @return array|bool False on failure and the type will be determined by $output parameter. 68 113 */ 69 114 function &get_children($args = '', $output = OBJECT) { … … 112 157 113 158 /** 114 * get_extended() - get extended entry info (<!--more-->)115 * 116 * {@internal Missing Long Description}} 117 * 118 * @package WordPress 119 * @subpackage Post 120 * @since 1.0. 1159 * get_extended() - Get extended entry info (<!--more-->) 160 * 161 * {@internal Missing Long Description}} 162 * 163 * @package WordPress 164 * @subpackage Post 165 * @since 1.0.0 121 166 * 122 167 * @param string $post {@internal Missing Description}} … … 148 193 * @since 1.5.1 149 194 * @uses $wpdb 195 * @link http://codex.wordpress.org/Function_Reference/get_post 150 196 * 151 197 * @param int|object &$post post ID or post object … … 171 217 if ( ! $_post = wp_cache_get($post, 'posts') ) { 172 218 $_post = & $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d LIMIT 1", $post)); 219 if ( ! $_post ) 220 return $null; 173 221 _get_post_ancestors($_post); 174 222 wp_cache_add($_post->ID, $_post, 'posts'); … … 192 240 193 241 /** 194 * get_post_ancestors() - Retrieve ancestors for a post242 * Retrieve ancestors of a post. 195 243 * 196 244 * @package WordPress … … 198 246 * @since 2.5 199 247 * 200 * @param int|object $post post ID or post object201 * @return array of ancestor IDs248 * @param int|object $post Post ID or post object 249 * @return array Ancestor IDs or empty array if none are found. 202 250 */ 203 251 function get_post_ancestors($post) { … … 211 259 212 260 /** 213 * get_post_field() - Retrieve a field based on a post ID. 261 * Retrieve data from a post field based on Post ID. 262 * 263 * Examples of the post field will be, 'post_type', 'post_status', 'content', 264 * etc and based off of the post object property or key names. 265 * 266 * The context values are based off of the taxonomy filter functions and 267 * supported values are found within those functions. 214 268 * 215 269 * @package WordPress 216 270 * @subpackage Post 217 271 * @since 2.3 218 * 219 * @param string $field {@internal Missing Description}} 272 * @uses sanitize_post_field() See for possible $context values. 273 * 274 * @param string $field Post field name 220 275 * @param id $post Post ID 221 * @param string $context Optional. How to filter the field 276 * @param string $context Optional. How to filter the field. Default is display. 222 277 * @return WP_Error|string Value in post field or WP_Error on failure 223 278 */ … … 239 294 240 295 /** 241 * get_post_mime_type() - Takes a post ID, returns its mime type. 296 * Retrieve the mime type of an attachment based on the ID. 297 * 298 * This function can be used with any post type, but it makes more sense with 299 * attachments. 242 300 * 243 301 * @package WordPress … … 245 303 * @since 2.0 246 304 * 247 * @param int $ID Post ID305 * @param int $ID Optional. Post ID. 248 306 * @return bool|string False on failure or returns the mime type 249 307 */ … … 258 316 259 317 /** 260 * get_post_status() - Takes a post ID and returns its status 261 * 262 * {@internal Missing Long Description}} 318 * Retrieve the post status based on the Post ID. 319 * 320 * If the post ID is of an attachment, then the parent post status will be given 321 * instead. 263 322 * 264 323 * @package WordPress … … 266 325 * @since 2.0 267 326 * 268 * @param int $ID {@internal Missing Description}}269 * @return string|bool post status or false327 * @param int $ID Post ID 328 * @return string|bool Post status or false on failure. 270 329 */ 271 330 function get_post_status($ID = '') { … … 283 342 284 343 /** 285 * get_post_statuses( ) - Retuns the possible user post status values344 * Retrieve all of the WordPress supported post statuses. 286 345 * 287 346 * Posts have a limited set of valid status values, this provides the … … 292 351 * @since 2.5 293 352 * 294 * @return array 353 * @return array List of post statuses. 295 354 */ 296 355 function get_post_statuses( ) { … … 306 365 307 366 /** 308 * get_page_statuses( ) - Retuns the possible user page status values367 * Retrieve all of the WordPress support page statuses. 309 368 * 310 369 * Pages have a limited set of valid status values, this provides the … … 315 374 * @since 2.5 316 375 * 317 * @return array 376 * @return array List of page statuses. 318 377 */ 319 378 function get_page_statuses( ) { … … 395 454 * @since 1.2 396 455 * @uses $wpdb 456 * @link http://codex.wordpress.org/Template_Tags/get_posts 397 457 * 398 458 * @param array $args {@internal Missing Description}} … … 441 501 * @since 1.5 442 502 * @uses $wpdb 503 * @link http://codex.wordpress.org/Function_Reference/add_post_meta 443 504 * 444 505 * @param int $post_id post ID … … 475 536 * @since 1.5 476 537 * @uses $wpdb 538 * @link http://codex.wordpress.org/Function_Reference/delete_post_meta 477 539 * 478 540 * @param int $post_id post ID … … 517 579 * @since 1.5 518 580 * @uses $wpdb 581 * @link http://codex.wordpress.org/Function_Reference/get_post_meta 519 582 * 520 583 * @param int $post_id post ID … … 560 623 * @since 1.5 561 624 * @uses $wpdb 625 * @link http://codex.wordpress.org/Function_Reference/update_post_meta 562 626 * 563 627 * @param int $post_id post ID … … 621 685 * @subpackage Post 622 686 * @since 1.2 687 * @link http://codex.wordpress.org/Function_Reference/get_post_custom 623 688 * 624 689 * @uses $id … … 648 713 * @subpackage Post 649 714 * @since 1.2 715 * @link http://codex.wordpress.org/Function_Reference/get_post_custom_keys 650 716 * 651 717 * @param int $post_id post ID … … 662 728 } 663 729 664 730 /** 731 * get_post_custom_values() - Retrieve values for a custom post field 732 * 733 * @package WordPress 734 * @subpackage Post 735 * @since 1.2 736 * @link http://codex.wordpress.org/Function_Reference/get_post_custom_values 737 * 738 * @param string $key field name 739 * @param int $post_id post ID 740 * @return mixed {@internal Missing Description}} 741 */ 665 742 function get_post_custom_values( $key = '', $post_id = 0 ) { 666 743 $custom = get_post_custom($post_id); … … 669 746 } 670 747 748 /** 749 * sanitize_post() - Sanitize every post field 750 * 751 * {@internal Missing Long Description}} 752 * 753 * @package WordPress 754 * @subpackage Post 755 * @since 2.3 756 * 757 * @param object|array $post The Post Object or Array 758 * @param string $context How to sanitize post fields 759 * @return object|array The now sanitized Post Object or Array (will be the same type as $post) 760 */ 671 761 function sanitize_post($post, $context = 'display') { 672 762 if ( 'raw' == $context ) … … 755 845 756 846 /** 757 * Count number of posts of a post type and is permissible. 758 * 759 * This function provides an efficient method of finding the amount 760 * of post's type a blog has. Another method is to count the amount 761 * of items in get_posts(), but that method has a lot of overhead 762 * with doing so. Therefore, when developing for 2.5+, use this 763 * function instead. 764 * 765 * The $perm parameter checks for 'readable' value and if the user 766 * can read private posts, it will display that for the user that 767 * is signed in. 847 * Count number of posts of a post type and is user has permissions to view. 848 * 849 * This function provides an efficient method of finding the amount of post's 850 * type a blog has. Another method is to count the amount of items in 851 * get_posts(), but that method has a lot of overhead with doing so. Therefore, 852 * when developing for 2.5+, use this function instead. 853 * 854 * The $perm parameter checks for 'readable' value and if the user can read 855 * private posts, it will display that for the user that is signed in. 768 856 * 769 857 * @package WordPress … … 928 1016 * @package WordPress 929 1017 * @subpackage Post 930 * @since 1.0. 11018 * @since 1.0.0 931 1019 * 932 1020 * @param int $postid post ID … … 1056 1144 * @package WordPress 1057 1145 * @subpackage Post 1058 * @since 1.0. 11146 * @since 1.0.0 1059 1147 * 1060 1148 * @param int $num number of posts to get … … 1083 1171 * @package WordPress 1084 1172 * @subpackage Post 1085 * @since 1.0. 11173 * @since 1.0.0 1086 1174 * @uses $wpdb 1087 1175 * … … 1115 1203 * @package WordPress 1116 1204 * @subpackage Post 1117 * @since 1.0. 11205 * @since 1.0.0 1118 1206 * 1119 1207 * @uses $wpdb … … 1335 1423 * @package WordPress 1336 1424 * @subpackage Post 1337 * @since 1.0. 11425 * @since 1.0.0 1338 1426 * @uses $wpdb 1339 1427 * … … 1448 1536 } 1449 1537 1538 /** 1539 * wp_add_post_tags() - Adds the tags to a post 1540 * 1541 * @uses wp_set_post_tags() Same first two paraeters, but the last parameter is always set to true. 1542 * 1543 * @package WordPress 1544 * @subpackage Post 1545 * @since 2.3 1546 * 1547 * @param int $post_id Optional. Post ID 1548 * @param string $tags The tags to set for the post 1549 * @return bool|null Will return false if $post_id is not an integer or is 0. Will return null otherwise 1550 */ 1450 1551 function wp_add_post_tags($post_id = 0, $tags = '') { 1451 1552 return wp_set_post_tags($post_id, $tags, true); 1452 1553 } 1453 1554 1555 /** 1556 * wp_set_post_tags() - Set the tags for a post 1557 * 1558 * {@internal Missing Long Description}} 1559 * 1560 * @package WordPress 1561 * @subpackage Post 1562 * @since 2.3 1563 * @uses $wpdb 1564 * 1565 * @param int $post_id post ID 1566 * @param string $tags The tags to set for the post 1567 * @param bool $append If true, don't delete existing tags, just add on. If false, replace the tags with the new tags. 1568 * @return bool|null Will return false if $post_id is not an integer or is 0. Will return null otherwise 1569 */ 1454 1570 function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) { 1455 /* $append - true = don't delete existing tags, just add on, false = replace the tags with the new tags */1456 1571 1457 1572 $post_id = (int) $post_id; … … 1546 1661 } 1547 1662 1548 function get_enclosed($post_id) { // Get enclosures already enclosed for a post 1663 /** 1664 * get_enclosed() - Get enclosures already enclosed for a post 1665 * 1666 * {@internal Missing Long Description}} 1667 * 1668 * @package WordPress 1669 * @subpackage Post 1670 * @since 1.5 1671 * @uses $wpdb 1672 * 1673 * @param int $post_id post ID 1674 * @return array {@internal Missing Description}} 1675 */ 1676 function get_enclosed($post_id) { 1549 1677 $custom_fields = get_post_custom( $post_id ); 1550 1678 $pung = array(); … … 1615 1743 * @package WordPress 1616 1744 * @subpackage Post 1617 * @since 1.0. 11745 * @since 1.0.0 1618 1746 * 1619 1747 * @param string $tb_list comma separated list of URLs -
branches/crazyhorse/wp-includes/query.php
r7941 r8242 929 929 $q['pagename'] = sanitize_title(basename($page_paths)); 930 930 $q['name'] = $q['pagename']; 931 $where .= " AND ( ID = '$reqpage')";931 $where .= " AND ($wpdb->posts.ID = '$reqpage')"; 932 932 $reqpage_obj = get_page($reqpage); 933 933 if ( 'attachment' == $reqpage_obj->post_type ) { … … 1531 1531 if ($this->current_post + 1 < $this->post_count) { 1532 1532 return true; 1533 } elseif ($this->current_post + 1 == $this->post_count ) {1533 } elseif ($this->current_post + 1 == $this->post_count && $this->post_count > 0) { 1534 1534 do_action('loop_end'); 1535 1535 // Do some cleaning up after the loop -
branches/crazyhorse/wp-includes/rewrite.php
r7841 r8242 32 32 } 33 33 $hook = 'do_feed_' . $feedname; 34 remove_action($hook, $function, 10, 1); 34 // Remove default function hook 35 remove_action($hook, $hook, 10, 1); 35 36 add_action($hook, $function, 10, 1); 36 37 return $hook; … … 58 59 global $wp_rewrite; 59 60 $wp_rewrite->add_endpoint($name, $places); 61 } 62 63 /** 64 * _wp_filter_taxonomy_base() - filter the URL base for taxonomies, to remove any manually prepended /index.php/ 65 * @param string $base the taxonomy base that we're going to filter 66 * @return string 67 * @author Mark Jaquith 68 */ 69 function _wp_filter_taxonomy_base( $base ) { 70 if ( !empty( $base ) ) 71 $base = preg_replace( '|^/index\.php/|', '/', $base ); 72 return $base; 60 73 } 61 74 … … 981 994 $this->root = $this->index . '/'; 982 995 } 983 $this->category_base = get_option( 'category_base' );984 $this->tag_base = get_option( 'tag_base' );996 $this->category_base = ( ( $this->using_index_permalinks() ) ? '/' . $this->index : '' ) . get_option( 'category_base' ); 997 $this->tag_base = ( ( $this->using_index_permalinks() ) ? '/' . $this->index : '' ) . get_option( 'tag_base' ); 985 998 unset($this->category_structure); 986 999 unset($this->author_structure); -
branches/crazyhorse/wp-includes/script-loader.php
r8224 r8242 8 8 9 9 function wp_default_scripts( &$scripts ) { 10 $scripts->base_url = site_url(); 10 if (!$guessurl = site_url()) 11 $guessurl = wp_guess_url(); 12 $scripts->base_url = $guessurl; 11 13 $scripts->default_version = get_bloginfo( 'version' ); 12 14 … … 33 35 $scripts->add( 'editor', false, $visual_editor, '20080321' ); 34 36 35 $scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080 325' );37 $scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080701' ); 36 38 37 39 // Modify this version when tinyMCE plugins are changed. 38 $mce_version = apply_filters('tiny_mce_version', '20080 618');40 $mce_version = apply_filters('tiny_mce_version', '20080701'); 39 41 $scripts->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version ); 40 42 … … 69 71 $scripts->add( 'jquery-color', '/wp-includes/js/jquery/jquery.color.js', array('jquery'), '2.0-4561'); 70 72 $scripts->add( 'interface', '/wp-includes/js/jquery/interface.js', array('jquery'), '1.2' ); 71 $scripts->add( 'suggest', '/wp-includes/js/jquery/suggest.js', array('jquery'), '1.1 ');73 $scripts->add( 'suggest', '/wp-includes/js/jquery/suggest.js', array('jquery'), '1.1b'); 72 74 $scripts->add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20'); 73 75 $scripts->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.js', array('jquery'), '3.1-20080430'); … … 99 101 ) ); 100 102 101 $scripts->add( 'jquery-ui-core', '/wp-includes/js/jquery/ui.core.js', array('jquery'), '1.5 ' );102 $scripts->add( 'jquery-ui-tabs', '/wp-includes/js/jquery/ui.tabs.js', array('jquery-ui-core'), '1.5 ' );103 $scripts->add( 'jquery-ui-sortable', '/wp-includes/js/jquery/ui.sortable.js', array('jquery-ui-core'), '1.5 ' );103 $scripts->add( 'jquery-ui-core', '/wp-includes/js/jquery/ui.core.js', array('jquery'), '1.5.1' ); 104 $scripts->add( 'jquery-ui-tabs', '/wp-includes/js/jquery/ui.tabs.js', array('jquery-ui-core'), '1.5.1' ); 105 $scripts->add( 'jquery-ui-sortable', '/wp-includes/js/jquery/ui.sortable.js', array('jquery-ui-core'), '1.5.1' ); 104 106 105 107 if ( is_admin() ) { … … 158 160 ) ); 159 161 $scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20080520' ); 160 $scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080 523' );162 $scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080701' ); 161 163 $scripts->localize( 'upload', 'uploadL10n', array( 162 164 'browseTitle' => attribute_escape(__('Browse your files')), … … 199 201 )); 200 202 201 $scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'jquery' ), '20080 523' );203 $scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'jquery' ), '20080625' ); 202 204 } 203 205 } 204 206 205 207 function wp_default_styles( &$styles ) { 206 $styles->base_url = site_url(); 208 if (!$guessurl = site_url()) 209 $guessurl = wp_guess_url(); 210 $styles->base_url = $guessurl; 207 211 $styles->default_version = get_bloginfo( 'version' ); 208 212 $styles->text_direction = 'rtl' == get_bloginfo( 'text_direction' ) ? 'rtl' : 'ltr'; -
branches/crazyhorse/wp-includes/shortcodes.php
r8054 r8242 1 1 <?php 2 3 /* 4 5 An API for creating shortcode tags that support attributes and enclosed content, such as: 6 7 [shortcode /] 8 [shortcode foo="bar" baz="bing" /] 9 [shortcode foo="bar"]content[/shortcode] 10 11 tag and attrbute parsing regexp code based on the Textpattern tag parser. 12 13 To apply shortcode tags to content: 14 15 $out = do_shortcode($content); 16 17 Simplest example of a shortcode tag using the API: 18 19 // [footag foo="bar"] 20 function footag_func($atts) { 21 return "foo = {$atts[foo]}"; 22 } 23 add_shortcode('footag', 'footag_func'); 24 25 Example with nice attribute defaults: 26 27 // [bartag foo="bar"] 28 function bartag_func($atts) { 29 extract(shortcode_atts(array( 30 'foo' => 'no foo', 31 'baz' => 'default baz', 32 ), $atts)); 33 34 return "foo = {$foo}"; 35 } 36 add_shortcode('bartag', 'bartag_func'); 37 38 Example with enclosed content: 39 40 // [baztag]content[/baztag] 41 function baztag_func($atts, $content='') { 42 return "content = $content"; 43 } 44 add_shortcode('baztag', 'baztag_func'); 45 46 */ 47 2 /** 3 * WordPress API for creating bbcode like tags or what WordPress calls 4 * "shortcodes." The tag and attribute parsing or regular expression code is 5 * based on the Textpattern tag parser. 6 * 7 * A few examples are below: 8 * 9 * [shortcode /] 10 * [shortcode foo="bar" baz="bing" /] 11 * [shortcode foo="bar"]content[/shortcode] 12 * 13 * Shortcode tags support attributes and enclosed content, but does not entirely 14 * support inline shortcodes in other shortcodes. You will have to call the 15 * shortcode parser in your function to account for that. 16 * 17 * {@internal 18 * Please be aware that the above note was made during the beta of WordPress 2.6 19 * and in the future may not be accurate. Please update the note when it is no 20 * longer the case.}} 21 * 22 * To apply shortcode tags to content: 23 * 24 * <code> 25 * $out = do_shortcode($content); 26 * </code> 27 * 28 * @link http://codex.wordpress.org/Shortcode_API 29 * 30 * @package WordPress 31 * @subpackage Shortcodes 32 * @since 2.5 33 */ 34 35 /** 36 * Container for storing shortcode tags and their hook to call for the shortcode 37 * 38 * @since 2.5 39 * @name $shortcode_tags 40 * @var array 41 * @global array $shortcode_tags 42 */ 48 43 $shortcode_tags = array(); 49 44 45 /** 46 * Add hook for shortcode tag. 47 * 48 * There can only be one hook for each shortcode. Which means that if another 49 * plugin has a similar shortcode, it will override yours or yours will override 50 * theirs depending on which order the plugins are included and/or ran. 51 * 52 * Simplest example of a shortcode tag using the API: 53 * 54 * <code> 55 * // [footag foo="bar"] 56 * function footag_func($atts) { 57 * return "foo = {$atts[foo]}"; 58 * } 59 * add_shortcode('footag', 'footag_func'); 60 * </code> 61 * 62 * Example with nice attribute defaults: 63 * 64 * <code> 65 * // [bartag foo="bar"] 66 * function bartag_func($atts) { 67 * extract(shortcode_atts(array( 68 * 'foo' => 'no foo', 69 * 'baz' => 'default baz', 70 * ), $atts)); 71 * 72 * return "foo = {$foo}"; 73 * } 74 * add_shortcode('bartag', 'bartag_func'); 75 * </code> 76 * 77 * Example with enclosed content: 78 * 79 * <code> 80 * // [baztag]content[/baztag] 81 * function baztag_func($atts, $content='') { 82 * return "content = $content"; 83 * } 84 * add_shortcode('baztag', 'baztag_func'); 85 * </code> 86 * 87 * @since 2.5 88 * @uses $shortcode_tags 89 * 90 * @param string $tag Shortcode tag to be searched in post content. 91 * @param callable $func Hook to run when shortcode is found. 92 */ 50 93 function add_shortcode($tag, $func) { 51 94 global $shortcode_tags; … … 55 98 } 56 99 100 /** 101 * Removes hook for shortcode. 102 * 103 * @since 2.5 104 * @uses $shortcode_tags 105 * 106 * @param string $tag shortcode tag to remove hook for. 107 */ 57 108 function remove_shortcode($tag) { 58 109 global $shortcode_tags; … … 61 112 } 62 113 114 /** 115 * Clear all shortcodes. 116 * 117 * This function is simple, it clears all of the shortcode tags by replacing the 118 * shortcodes global by a empty array. This is actually a very efficient method 119 * for removing all shortcodes. 120 * 121 * @since 2.5 122 * @uses $shortcode_tags 123 */ 63 124 function remove_all_shortcodes() { 64 125 global $shortcode_tags; … … 67 128 } 68 129 130 /** 131 * Search content for shortcodes and filter shortcodes through their hooks. 132 * 133 * If there are no shortcode tags defined, then the content will be returned 134 * without any filtering. This might cause issues when plugins are disabled but 135 * the shortcode will still show up in the post or content. 136 * 137 * @since 2.5 138 * @uses $shortcode_tags 139 * @uses get_shortcode_regex() Gets the search pattern for searching shortcodes. 140 * 141 * @param string $content Content to search for shortcodes 142 * @return string Content with shortcodes filtered out. 143 */ 69 144 function do_shortcode($content) { 70 145 global $shortcode_tags; … … 77 152 } 78 153 154 /** 155 * Retrieve the shortcode regular expression for searching. 156 * 157 * The regular expression combines the shortcode tags in the regular expression 158 * in a regex class. 159 * 160 * @since 2.5 161 * @uses $shortcode_tags 162 * 163 * @return string The shortcode search regular expression 164 */ 79 165 function get_shortcode_regex() { 80 166 global $shortcode_tags; … … 85 171 } 86 172 173 /** 174 * Regular Expression callable for do_shortcode() for calling shortcode hook. 175 * 176 * @since 2.5 177 * @access private 178 * @uses $shortcode_tags 179 * 180 * @param array $m Regular expression match array 181 * @return mixed False on failure. 182 */ 87 183 function do_shortcode_tag($m) { 88 184 global $shortcode_tags; … … 100 196 } 101 197 198 /** 199 * Retrieve all attributes from the shortcodes tag. 200 * 201 * The attributes list has the attribute name as the key and the value of the 202 * attribute as the value in the key/value pair. This allows for easier 203 * retrieval of the attributes, since all attributes have to be known. 204 * 205 * @since 2.5 206 * 207 * @param string $text 208 * @return array List of attributes and their value. 209 */ 102 210 function shortcode_parse_atts($text) { 103 211 $atts = array(); … … 123 231 } 124 232 233 /** 234 * Combine user attributes with known attributes and fill in defaults when needed. 235 * 236 * The pairs should be considered to be all of the attributes which are 237 * supported by the caller and given as a list. The returned attributes will 238 * only contain the attributes in the $pairs list. 239 * 240 * If the $atts list has unsupported attributes, then they will be ignored and 241 * removed from the final returned list. 242 * 243 * @since 2.5 244 * 245 * @param array $pairs Entire list of supported attributes and their defaults. 246 * @param array $atts User defined attributes in shortcode tag. 247 * @return array Combined and filtered attribute list. 248 */ 125 249 function shortcode_atts($pairs, $atts) { 126 250 $atts = (array)$atts; … … 135 259 } 136 260 137 /* 138 * stip all the shortcodes from a post's content 139 * returns the content without shortcodes 140 */ 141 function strip_shortcodes( $content ) { 142 261 /** 262 * Remove all shortcode tags from the given content. 263 * 264 * @since 2.5 265 * @uses $shortcode_tags 266 * 267 * @param string $content Content to remove shortcode tags. 268 * @return string Content without shortcode tags. 269 */ 270 function strip_shortcodes( $content ) { 143 271 global $shortcode_tags; 144 272 … … 149 277 150 278 return preg_replace('/'.$pattern.'/s', '', $content); 151 152 279 } 153 280 -
branches/crazyhorse/wp-includes/taxonomy.php
r7952 r8242 21 21 22 22 /** 23 * get_object_taxonomies() - Return all of the taxonomy names that are of $object_type23 * Return all of the taxonomy names that are of $object_type. 24 24 * 25 25 * It appears that this function can be used to find all of the names inside of 26 26 * $wp_taxonomies global variable. 27 27 * 28 * <code><?php $taxonomies = get_object_taxonomies('post'); ?></code> 29 * Shouldresult in <code>Array('category', 'post_tag')</code>28 * <code><?php $taxonomies = get_object_taxonomies('post'); ?></code> Should 29 * result in <code>Array('category', 'post_tag')</code> 30 30 * 31 31 * @package WordPress … … 59 59 60 60 /** 61 * get_taxonomy() - Returns the taxonomy object of $taxonomy.61 * Retrieves the taxonomy object of $taxonomy. 62 62 * 63 63 * The get_taxonomy function will first check that the parameter string given … … 84 84 85 85 /** 86 * is_taxonomy() - Checks that the taxonomy name exists86 * Checks that the taxonomy name exists. 87 87 * 88 88 * @package WordPress … … 102 102 103 103 /** 104 * is_taxonomy_hierarchical() - Whether the taxonomy object is hierarchical105 * 106 * Checks to make sure that the taxonomy is an object first. Then Gets the object, and finally107 * returns the hierarchical value in the object.104 * Whether the taxonomy object is hierarchical. 105 * 106 * Checks to make sure that the taxonomy is an object first. Then Gets the 107 * object, and finally returns the hierarchical value in the object. 108 108 * 109 109 * A false return value might also mean that the taxonomy does not exist. … … 128 128 129 129 /** 130 * register_taxonomy() - Create or modify a taxonomy object. Do not use before init. 131 * 132 * A simple function for creating or modifying a taxonomy object based on the parameters given. 133 * The function will accept an array (third optional parameter), along with strings for the 134 * taxonomy name and another string for the object type. 135 * 136 * Nothing is returned, so expect error maybe or use is_taxonomy() to check whether taxonomy exists. 130 * Create or modify a taxonomy object. Do not use before init. 131 * 132 * A simple function for creating or modifying a taxonomy object based on the 133 * parameters given. The function will accept an array (third optional 134 * parameter), along with strings for the taxonomy name and another string for 135 * the object type. 136 * 137 * Nothing is returned, so expect error maybe or use is_taxonomy() to check 138 * whether taxonomy exists. 137 139 * 138 140 * Optional $args contents: 139 * hierarachical - has some defined purpose at other parts of the API and is a boolean value. 140 * update_count_callback - works much like a hook, in that it will be called when the count is updated. 141 * rewrite - false to prevent rewrite, or array('slug'=>$slug) to customize permastruct; default will use $taxonomy as slug 142 * query_var - false to prevent queries, or string to customize query var (?$query_var=$term); default will use $taxonomy as query var 141 * 142 * hierarachical - has some defined purpose at other parts of the API and is a 143 * boolean value. 144 * 145 * update_count_callback - works much like a hook, in that it will be called 146 * when the count is updated. 147 * 148 * rewrite - false to prevent rewrite, or array('slug'=>$slug) to customize 149 * permastruct; default will use $taxonomy as slug. 150 * 151 * query_var - false to prevent queries, or string to customize query var 152 * (?$query_var=$term); default will use $taxonomy as query var. 143 153 * 144 154 * @package WordPress … … 185 195 186 196 /** 187 * get_objects_in_term() - Return object_ids of valid taxonomy and term 188 * 189 * The strings of $taxonomies must exist before this function will continue. On failure of finding 190 * a valid taxonomy, it will return an WP_Error class, kind of like Exceptions in PHP 5, except you 191 * can't catch them. Even so, you can still test for the WP_Error class and get the error message. 192 * 193 * The $terms aren't checked the same as $taxonomies, but still need to exist for $object_ids to 194 * be returned. 195 * 196 * It is possible to change the order that object_ids is returned by either using PHP sort family 197 * functions or using the database by using $args with either ASC or DESC array. The value should 198 * be in the key named 'order'. 197 * Retrieve object_ids of valid taxonomy and term. 198 * 199 * The strings of $taxonomies must exist before this function will continue. On 200 * failure of finding a valid taxonomy, it will return an WP_Error class, kind 201 * of like Exceptions in PHP 5, except you can't catch them. Even so, you can 202 * still test for the WP_Error class and get the error message. 203 * 204 * The $terms aren't checked the same as $taxonomies, but still need to exist 205 * for $object_ids to be returned. 206 * 207 * It is possible to change the order that object_ids is returned by either 208 * using PHP sort family functions or using the database by using $args with 209 * either ASC or DESC array. The value should be in the key named 'order'. 199 210 * 200 211 * @package WordPress … … 245 256 246 257 /** 247 * get_term() -Get all Term data from database by Term ID.248 * 249 * The usage of the get_term function is to apply filters to a term object. 250 * Itis possible to get a term object from the database before applying the258 * Get all Term data from database by Term ID. 259 * 260 * The usage of the get_term function is to apply filters to a term object. It 261 * is possible to get a term object from the database before applying the 251 262 * filters. 252 263 * 253 * $term ID must be part of $taxonomy, to get from the database. Failure, might be 254 * able to be captured by the hooks. Failure would be the same value as $wpdb returns for the 255 * get_row method. 256 * 257 * There are two hooks, one is specifically for each term, named 'get_term', and the second is 258 * for the taxonomy name, 'term_$taxonomy'. Both hooks gets the term object, and the taxonomy 259 * name as parameters. Both hooks are expected to return a Term object. 260 * 261 * 'get_term' hook - Takes two parameters the term Object and the taxonomy name. Must return 262 * term object. Used in get_term() as a catch-all filter for every $term. 263 * 264 * 'get_$taxonomy' hook - Takes two parameters the term Object and the taxonomy name. Must return 265 * term object. $taxonomy will be the taxonomy name, so for example, if 'category', it would be 266 * 'get_category' as the filter name. Useful for custom taxonomies or plugging into default taxonomies. 264 * $term ID must be part of $taxonomy, to get from the database. Failure, might 265 * be able to be captured by the hooks. Failure would be the same value as $wpdb 266 * returns for the get_row method. 267 * 268 * There are two hooks, one is specifically for each term, named 'get_term', and 269 * the second is for the taxonomy name, 'term_$taxonomy'. Both hooks gets the 270 * term object, and the taxonomy name as parameters. Both hooks are expected to 271 * return a Term object. 272 * 273 * 'get_term' hook - Takes two parameters the term Object and the taxonomy name. 274 * Must return term object. Used in get_term() as a catch-all filter for every 275 * $term. 276 * 277 * 'get_$taxonomy' hook - Takes two parameters the term Object and the taxonomy 278 * name. Must return term object. $taxonomy will be the taxonomy name, so for 279 * example, if 'category', it would be 'get_category' as the filter name. Useful 280 * for custom taxonomies or plugging into default taxonomies. 267 281 * 268 282 * @package WordPress … … 317 331 318 332 /** 319 * get_term_by() - Get all Term data from database by Term field and data. 320 * 321 * Warning: $value is not escaped for 'name' $field. You must do it yourself, if required. 322 * 323 * The default $field is 'id', therefore it is possible to also use null for field, but not 324 * recommended that you do so. 325 * 326 * If $value does not exist, the return value will be false. If $taxonomy exists and $field 327 * and $value combinations exist, the Term will be returned. 333 * Get all Term data from database by Term field and data. 334 * 335 * Warning: $value is not escaped for 'name' $field. You must do it yourself, if 336 * required. 337 * 338 * The default $field is 'id', therefore it is possible to also use null for 339 * field, but not recommended that you do so. 340 * 341 * If $value does not exist, the return value will be false. If $taxonomy exists 342 * and $field and $value combinations exist, the Term will be returned. 328 343 * 329 344 * @package WordPress … … 381 396 382 397 /** 383 * get_term_children() -Merge all term children into a single array.384 * 385 * This recursive function will merge all of the children of $term into 386 * the samearray. Only useful for taxonomies which are hierarchical.398 * Merge all term children into a single array. 399 * 400 * This recursive function will merge all of the children of $term into the same 401 * array. Only useful for taxonomies which are hierarchical. 387 402 * 388 403 * Will return an empty array if $term does not exist in $taxonomy. … … 420 435 421 436 /** 422 * get_term_field() - Get sanitized Term field423 * 424 * Does checks for $term, based on the $taxonomy. The function is for 425 * contextual reasons and for simplicity of usage. See sanitize_term_field() for426 * moreinformation.437 * Get sanitized Term field. 438 * 439 * Does checks for $term, based on the $taxonomy. The function is for contextual 440 * reasons and for simplicity of usage. See sanitize_term_field() for more 441 * information. 427 442 * 428 443 * @package WordPress … … 454 469 455 470 /** 456 * get_term_to_edit() - Sanitizes Term for editing457 * 458 * Return value is sanitize_term() and usage is for sanitizing the term 459 * forediting. Function is for contextual and simplicity.471 * Sanitizes Term for editing. 472 * 473 * Return value is sanitize_term() and usage is for sanitizing the term for 474 * editing. Function is for contextual and simplicity. 460 475 * 461 476 * @package WordPress … … 482 497 483 498 /** 484 * get_terms() - Retrieve the terms in taxonomy or list of taxonomies. 485 * 486 * You can fully inject any customizations to the query before it is sent, as well as control 487 * the output with a filter. 488 * 489 * The 'get_terms' filter will be called when the cache has the term and will pass the found 490 * term along with the array of $taxonomies and array of $args. This filter is also called 491 * before the array of terms is passed and will pass the array of terms, along with the $taxonomies 492 * and $args. 493 * 494 * The 'list_terms_exclusions' filter passes the compiled exclusions along with the $args. 499 * Retrieve the terms in taxonomy or list of taxonomies. 500 * 501 * You can fully inject any customizations to the query before it is sent, as 502 * well as control the output with a filter. 503 * 504 * The 'get_terms' filter will be called when the cache has the term and will 505 * pass the found term along with the array of $taxonomies and array of $args. 506 * This filter is also called before the array of terms is passed and will pass 507 * the array of terms, along with the $taxonomies and $args. 508 * 509 * The 'list_terms_exclusions' filter passes the compiled exclusions along with 510 * the $args. 495 511 * 496 512 * The list that $args can contain, which will overwrite the defaults. 497 * orderby - Default is 'name'. Can be name, count, or nothing (will use term_id). 513 * 514 * orderby - Default is 'name'. Can be name, count, or nothing (will use 515 * term_id). 516 * 498 517 * order - Default is ASC. Can use DESC. 499 518 * hide_empty - Default is true. Will not return empty $terms. … … 503 522 * name__like - Default is empty string. 504 523 * 505 * The argument 'pad_counts' will count all of the children along with the $terms. 506 * 507 * The 'get' argument allows for overwriting 'hide_empty' and 'child_of', which can be done by 508 * setting the value to 'all', instead of its default empty string value. 509 * 510 * The 'child_of' argument will be used if you use multiple taxonomy or the first $taxonomy 511 * isn't hierarchical or 'parent' isn't used. The default is 0, which will be translated to 512 * a false value. If 'child_of' is set, then 'child_of' value will be tested against 513 * $taxonomy to see if 'child_of' is contained within. Will return an empty array if test 514 * fails. 515 * 516 * If 'parent' is set, then it will be used to test against the first taxonomy. Much like 517 * 'child_of'. Will return an empty array if the test fails. 524 * The argument 'pad_counts' will count all of the children along with the 525 * $terms. 526 * 527 * The 'get' argument allows for overwriting 'hide_empty' and 'child_of', which 528 * can be done by setting the value to 'all', instead of its default empty 529 * string value. 530 * 531 * The 'child_of' argument will be used if you use multiple taxonomy or the 532 * first $taxonomy isn't hierarchical or 'parent' isn't used. The default is 0, 533 * which will be translated to a false value. If 'child_of' is set, then 534 * 'child_of' value will be tested against $taxonomy to see if 'child_of' is 535 * contained within. Will return an empty array if test fails. 536 * 537 * If 'parent' is set, then it will be used to test against the first taxonomy. 538 * Much like 'child_of'. Will return an empty array if the test fails. 518 539 * 519 540 * @package WordPress … … 523 544 * @uses $wpdb 524 545 * @uses wp_parse_args() Merges the defaults with those defined by $args and allows for strings. 525 *526 546 * 527 547 * @param string|array Taxonomy name or list of Taxonomy names … … 582 602 583 603 // $args can be whatever, only use the args defined in defaults to compute the key 584 $key = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) ); 604 $filter_key = ( has_filter('list_terms_exclusions') ) ? serialize($GLOBALS['wp_filter']['list_terms_exclusions']) : ''; 605 $key = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) . $filter_key ); 585 606 586 607 if ( $cache = wp_cache_get( 'get_terms', 'terms' ) ) { … … 724 745 725 746 /** 726 * is_term() - Check if Term exists747 * Check if Term exists. 727 748 * 728 749 * Returns the index of a defined term, or 0 (false) if the term doesn't exist. … … 758 779 759 780 /** 760 * sanitize_term() - Sanitize Term all fields761 * 762 * Relys on sanitize_term_field() to sanitize the term. The difference 763 * is that this function will sanitize <strong>all</strong> fields. The context764 * is basedon sanitize_term_field().781 * Sanitize Term all fields. 782 * 783 * Relys on sanitize_term_field() to sanitize the term. The difference is that 784 * this function will sanitize <strong>all</strong> fields. The context is based 785 * on sanitize_term_field(). 765 786 * 766 787 * The $term is expected to be either an array or an object. … … 799 820 800 821 /** 801 * sanitize_term_field() - Cleanse the field value in the term based on the context 802 * 803 * Passing a term field value through the function should be assumed to have cleansed 804 * the value for whatever context the term field is going to be used. 805 * 806 * If no context or an unsupported context is given, then default filters will be applied. 807 * 808 * There are enough filters for each context to support a custom filtering without creating 809 * your own filter function. Simply create a function that hooks into the filter you need. 822 * Cleanse the field value in the term based on the context. 823 * 824 * Passing a term field value through the function should be assumed to have 825 * cleansed the value for whatever context the term field is going to be used. 826 * 827 * If no context or an unsupported context is given, then default filters will 828 * be applied. 829 * 830 * There are enough filters for each context to support a custom filtering 831 * without creating your own filter function. Simply create a function that 832 * hooks into the filter you need. 810 833 * 811 834 * @package WordPress … … 864 887 865 888 /** 866 * wp_count_terms() - Count how many terms are in Taxonomy867 * 868 * Default $args is 'ignore_empty' which can be <code>'ignore_empty=true'</code> or869 * <code>array('ignore_empty' => true);</code>.889 * Count how many terms are in Taxonomy. 890 * 891 * Default $args is 'ignore_empty' which can be <code>'ignore_empty=true'</code> 892 * or <code>array('ignore_empty' => true);</code>. 870 893 * 871 894 * @package WordPress … … 895 918 896 919 /** 897 * wp_delete_object_term_relationships() - Will unlink the term from the taxonomy898 * 899 * Will remove the term's relationship to the taxonomy, not the term or taxonomy itself.900 * The term and taxonomy will still exist. Will require the term's object ID to perform901 * the operation.920 * Will unlink the term from the taxonomy. 921 * 922 * Will remove the term's relationship to the taxonomy, not the term or taxonomy 923 * itself. The term and taxonomy will still exist. Will require the term's 924 * object ID to perform the operation. 902 925 * 903 926 * @package WordPress … … 926 949 927 950 /** 928 * wp_delete_term() -Removes a term from the database.929 * 930 * If the term is a parent of other terms, then the children will be updated 931 * t o that term's parent.951 * Removes a term from the database. 952 * 953 * If the term is a parent of other terms, then the children will be updated to 954 * that term's parent. 932 955 * 933 956 * The $args 'default' will only override the terms found, if there is only one … … 939 962 * 940 963 * @uses $wpdb 941 * @uses do_action() Calls both 'delete_term' and 'delete_$taxonomy' action hooks,942 * passing term object, term id. 'delete_term' gets an additional parameter with943 * the $taxonomy parameter.964 * @uses do_action() Calls both 'delete_term' and 'delete_$taxonomy' action 965 * hooks, passing term object, term id. 'delete_term' gets an additional 966 * parameter with the $taxonomy parameter. 944 967 * 945 968 * @param int $term Term ID … … 1007 1030 1008 1031 /** 1009 * wp_get_object_terms() - Retrieves the terms associated with the given object(s), in the supplied taxonomies. 1010 * 1011 * The following information has to do the $args parameter and for what can be contained in the string 1012 * or array of that parameter, if it exists. 1013 * 1014 * The first argument is called, 'orderby' and has the default value of 'name'. The other value that is 1015 * supported is 'count'. 1016 * 1017 * The second argument is called, 'order' and has the default value of 'ASC'. The only other value that 1018 * will be acceptable is 'DESC'. 1019 * 1020 * The final argument supported is called, 'fields' and has the default value of 'all'. There are 1021 * multiple other options that can be used instead. Supported values are as follows: 'all', 'ids', 1022 * 'names', and finally 'all_with_object_id'. 1023 * 1024 * The fields argument also decides what will be returned. If 'all' or 'all_with_object_id' is choosen or 1025 * the default kept intact, then all matching terms objects will be returned. If either 'ids' or 'names' 1026 * is used, then an array of all matching term ids or term names will be returned respectively. 1032 * Retrieves the terms associated with the given object(s), in the supplied taxonomies. 1033 * 1034 * The following information has to do the $args parameter and for what can be 1035 * contained in the string or array of that parameter, if it exists. 1036 * 1037 * The first argument is called, 'orderby' and has the default value of 'name'. 1038 * The other value that is supported is 'count'. 1039 * 1040 * The second argument is called, 'order' and has the default value of 'ASC'. 1041 * The only other value that will be acceptable is 'DESC'. 1042 * 1043 * The final argument supported is called, 'fields' and has the default value of 1044 * 'all'. There are multiple other options that can be used instead. Supported 1045 * values are as follows: 'all', 'ids', 'names', and finally 1046 * 'all_with_object_id'. 1047 * 1048 * The fields argument also decides what will be returned. If 'all' or 1049 * 'all_with_object_id' is choosen or the default kept intact, then all matching 1050 * terms objects will be returned. If either 'ids' or 'names' is used, then an 1051 * array of all matching term ids or term names will be returned respectively. 1027 1052 * 1028 1053 * @package WordPress … … 1115 1140 1116 1141 /** 1117 * wp_insert_term() - Adds a new term to the database. Optionally marks it as an alias of an existing term. 1118 * 1119 * Error handling is assigned for the nonexistance of the $taxonomy and $term parameters before inserting. 1120 * If both the term id and taxonomy exist previously, then an array will be returned that contains the term 1121 * id and the contents of what is returned. The keys of the array are 'term_id' and 'term_taxonomy_id' containing 1122 * numeric values. 1123 * 1124 * It is assumed that the term does not yet exist or the above will apply. The term will be first added to the term 1125 * table and then related to the taxonomy if everything is well. If everything is correct, then several actions 1126 * will be run prior to a filter and then several actions will be run after the filter is run. 1127 * 1128 * The arguments decide how the term is handled based on the $args parameter. The following 1129 * is a list of the available overrides and the defaults. 1130 * 1131 * 'alias_of'. There is no default, but if added, expected is the slug that the term will be an alias of. 1132 * Expected to be a string. 1133 * 1134 * 'description'. There is no default. If exists, will be added to the database along with the term. Expected 1135 * to be a string. 1136 * 1137 * 'parent'. Expected to be numeric and default is 0 (zero). Will assign value of 'parent' to the term. 1142 * Adds a new term to the database. Optionally marks it as an alias of an existing term. 1143 * 1144 * Error handling is assigned for the nonexistance of the $taxonomy and $term 1145 * parameters before inserting. If both the term id and taxonomy exist 1146 * previously, then an array will be returned that contains the term id and the 1147 * contents of what is returned. The keys of the array are 'term_id' and 1148 * 'term_taxonomy_id' containing numeric values. 1149 * 1150 * It is assumed that the term does not yet exist or the above will apply. The 1151 * term will be first added to the term table and then related to the taxonomy 1152 * if everything is well. If everything is correct, then several actions will be 1153 * run prior to a filter and then several actions will be run after the filter 1154 * is run. 1155 * 1156 * The arguments decide how the term is handled based on the $args parameter. 1157 * The following is a list of the available overrides and the defaults. 1158 * 1159 * 'alias_of'. There is no default, but if added, expected is the slug that the 1160 * term will be an alias of. Expected to be a string. 1161 * 1162 * 'description'. There is no default. If exists, will be added to the database 1163 * along with the term. Expected to be a string. 1164 * 1165 * 'parent'. Expected to be numeric and default is 0 (zero). Will assign value 1166 * of 'parent' to the term. 1138 1167 * 1139 1168 * 'slug'. Expected to be a string. There is no default. 1140 1169 * 1141 * If 'slug' argument exists then the slug will be checked to see if it is not a valid term. If that check 1142 * succeeds (it is not a valid term), then it is added and the term id is given. If it fails, then a check 1143 * is made to whether the taxonomy is hierarchical and the parent argument is not empty. If the second check 1144 * succeeds, the term will be inserted and the term id will be given. 1170 * If 'slug' argument exists then the slug will be checked to see if it is not 1171 * a valid term. If that check succeeds (it is not a valid term), then it is 1172 * added and the term id is given. If it fails, then a check is made to whether 1173 * the taxonomy is hierarchical and the parent argument is not empty. If the 1174 * second check succeeds, the term will be inserted and the term id will be 1175 * given. 1145 1176 * 1146 1177 * @package WordPress … … 1236 1267 1237 1268 /** 1238 * wp_set_object_terms() - Create Term and Taxonomy Relationships 1239 * 1240 * Relates an object (post, link etc) to a term and taxonomy type. Creates the term and taxonomy 1241 * relationship if it doesn't already exist. Creates a term if it doesn't exist (using the slug). 1242 * 1243 * A relationship means that the term is grouped in or belongs to the taxonomy. A term has no 1244 * meaning until it is given context by defining which taxonomy it exists under. 1269 * Create Term and Taxonomy Relationships. 1270 * 1271 * Relates an object (post, link etc) to a term and taxonomy type. Creates the 1272 * term and taxonomy relationship if it doesn't already exist. Creates a term if 1273 * it doesn't exist (using the slug). 1274 * 1275 * A relationship means that the term is grouped in or belongs to the taxonomy. 1276 * A term has no meaning until it is given context by defining which taxonomy it 1277 * exists under. 1245 1278 * 1246 1279 * @package WordPress … … 1316 1349 1317 1350 /** 1318 * wp_unique_term_slug() - Will make slug unique, if it isn't already1319 * 1320 * The $slug has to be unique global to every taxonomy, meaning that one taxonomy1321 * t erm can't have a matching slug with another taxonomy term. Each slug has to be1322 * globally unique for every taxonomy.1323 * 1324 * The way this works is that if the taxonomy that the term belongs to is heirarchical1325 * and has a parent, it will append that parent to the $slug.1326 * 1327 * If that still doesn't return an unique slug, then it try to append a number until1328 * it finds a number that is truely unique.1351 * Will make slug unique, if it isn't already. 1352 * 1353 * The $slug has to be unique global to every taxonomy, meaning that one 1354 * taxonomy term can't have a matching slug with another taxonomy term. Each 1355 * slug has to be globally unique for every taxonomy. 1356 * 1357 * The way this works is that if the taxonomy that the term belongs to is 1358 * heirarchical and has a parent, it will append that parent to the $slug. 1359 * 1360 * If that still doesn't return an unique slug, then it try to append a number 1361 * until it finds a number that is truely unique. 1329 1362 * 1330 1363 * The only purpose for $term is for appending a parent, if one exists. … … 1377 1410 1378 1411 /** 1379 * wp_update_term() - Update term based on arguments provided1380 * 1381 * The $args will indiscriminately override all values with the same field name. Care1382 * must be taken to not override important information need to update or update will1383 * fail (or perhaps create a new term, neither would be acceptable).1384 * 1385 * Defaults will set 'alias_of', 'description', 'parent', and 'slug' if not defined1386 * in $args already.1387 * 1388 * 'alias_of' will create a term group, if it doesn't already exist, and update it for1389 * the $term.1390 * 1391 * If the 'slug' argument in $args is missing, then the 'name' in $args will be used.1392 * It should also be noted that if you set 'slug' and it isn't unique then a WP_Error1393 * will be passed back. If you don't pass any slug, then a unique one will be created1394 * for you.1395 * 1396 * For what can be overrode in $args, check the term scheme can contain and stay away1397 * from the term keys.1412 * Update term based on arguments provided. 1413 * 1414 * The $args will indiscriminately override all values with the same field name. 1415 * Care must be taken to not override important information need to update or 1416 * update will fail (or perhaps create a new term, neither would be acceptable). 1417 * 1418 * Defaults will set 'alias_of', 'description', 'parent', and 'slug' if not 1419 * defined in $args already. 1420 * 1421 * 'alias_of' will create a term group, if it doesn't already exist, and update 1422 * it for the $term. 1423 * 1424 * If the 'slug' argument in $args is missing, then the 'name' in $args will be 1425 * used. It should also be noted that if you set 'slug' and it isn't unique then 1426 * a WP_Error will be passed back. If you don't pass any slug, then a unique one 1427 * will be created for you. 1428 * 1429 * For what can be overrode in $args, check the term scheme can contain and stay 1430 * away from the term keys. 1398 1431 * 1399 1432 * @package WordPress … … 1403 1436 * @uses $wpdb 1404 1437 * @uses do_action() Will call both 'edit_term' and 'edit_$taxonomy' twice. 1405 * @uses apply_filters() Will call the 'term_id_filter' filter and pass the term id and1406 * taxonomy id.1438 * @uses apply_filters() Will call the 'term_id_filter' filter and pass the term 1439 * id and taxonomy id. 1407 1440 * 1408 1441 * @param int $term The ID of the term … … 1490 1523 } 1491 1524 1492 // enable or disable term count deferring 1493 // if no value is supplied, the current value of the defer setting is returned 1525 /** 1526 * Enable or disable term counting. 1527 * 1528 * @since 2.6 1529 * 1530 * @param bool $defer Optional. 1531 * @return bool 1532 */ 1494 1533 function wp_defer_term_counting($defer=NULL) { 1495 1534 static $_defer = false; … … 1506 1545 1507 1546 /** 1508 * wp_update_term_count() - Updates the amount of terms in taxonomy 1509 * 1510 * If there is a taxonomy callback applyed, then it will be called for updating the count. 1511 * 1512 * The default action is to count what the amount of terms have the relationship of term ID. 1513 * Once that is done, then update the database. 1547 * Updates the amount of terms in taxonomy. 1548 * 1549 * If there is a taxonomy callback applyed, then it will be called for updating 1550 * the count. 1551 * 1552 * The default action is to count what the amount of terms have the relationship 1553 * of term ID. Once that is done, then update the database. 1514 1554 * 1515 1555 * @package WordPress … … 1548 1588 } 1549 1589 1590 /** 1591 * Perform term count update immediately. 1592 * 1593 * @since 2.6 1594 * 1595 * @param array $terms IDs of Terms to update. 1596 * @param string $taxonomy The context of the term. 1597 * @return bool Always true when complete. 1598 */ 1550 1599 function wp_update_term_count_now( $terms, $taxonomy ) { 1551 1600 global $wpdb; … … 1574 1623 // 1575 1624 1576 /** 1577 * clean_object_term_cache() - Removes the taxonomy relationship to terms from the cache. 1578 * 1579 * Will remove the entire taxonomy relationship containing term $object_id. The term IDs 1580 * have to exist within the taxonomy $object_type for the deletion to take place. 1625 1626 /** 1627 * Removes the taxonomy relationship to terms from the cache. 1628 * 1629 * Will remove the entire taxonomy relationship containing term $object_id. The 1630 * term IDs have to exist within the taxonomy $object_type for the deletion to 1631 * take place. 1581 1632 * 1582 1633 * @package WordPress … … 1602 1653 } 1603 1654 1604 /** 1605 * clean_term_cache() - Will remove all of the term ids from the cache 1655 1656 /** 1657 * Will remove all of the term ids from the cache. 1606 1658 * 1607 1659 * @package WordPress … … 1647 1699 } 1648 1700 1649 /** 1650 * get_object_term_cache() - Retrieves the taxonomy relationship to the term object id. 1701 1702 /** 1703 * Retrieves the taxonomy relationship to the term object id. 1651 1704 * 1652 1705 * @package WordPress … … 1665 1718 } 1666 1719 1667 /** 1668 * update_object_term_cache() - Updates the cache for Term ID(s) 1720 1721 /** 1722 * Updates the cache for Term ID(s). 1669 1723 * 1670 1724 * Will only update the cache for terms not already cached. 1671 1725 * 1672 * The $object_ids expects that the ids be separated by commas, if it is 1673 * a string. 1674 * 1675 * It should be noted that update_object_term_cache() is very time extensive. 1676 * It is advised that the function is not called very often or at least not 1677 * for a lot of terms that exist in a lot of taxonomies. The amount of time 1678 * increases for each term and it also increases for each taxonomy the term 1679 * belongs to. 1726 * The $object_ids expects that the ids be separated by commas, if it is a 1727 * string. 1728 * 1729 * It should be noted that update_object_term_cache() is very time extensive. It 1730 * is advised that the function is not called very often or at least not for a 1731 * lot of terms that exist in a lot of taxonomies. The amount of time increases 1732 * for each term and it also increases for each taxonomy the term belongs to. 1680 1733 * 1681 1734 * @package WordPress … … 1735 1788 } 1736 1789 1737 /** 1738 * update_term_cache() - Updates Terms to Taxonomy in cache. 1790 1791 /** 1792 * Updates Terms to Taxonomy in cache. 1739 1793 * 1740 1794 * @package WordPress … … 1759 1813 // 1760 1814 1761 /** 1762 * _get_term_hierarchy() - Retrieves children of taxonomy 1815 1816 /** 1817 * Retrieves children of taxonomy. 1763 1818 * 1764 1819 * @package WordPress … … 1767 1822 * @since 2.3 1768 1823 * 1769 * @uses update_option() Stores all of the children in "$taxonomy_children" option.1770 * That is the name of the taxonomy, immediately followed by '_children'.1824 * @uses update_option() Stores all of the children in "$taxonomy_children" 1825 * option. That is the name of the taxonomy, immediately followed by '_children'. 1771 1826 * 1772 1827 * @param string $taxonomy Taxonomy Name … … 1791 1846 } 1792 1847 1793 /** 1794 * _get_term_children() - Get array of child terms 1795 * 1796 * If $terms is an array of objects, then objects will returned from the function. 1797 * If $terms is an array of IDs, then an array of ids of children will be returned. 1848 1849 /** 1850 * Get array of child terms. 1851 * 1852 * If $terms is an array of objects, then objects will returned from the 1853 * function. If $terms is an array of IDs, then an array of ids of children will 1854 * be returned. 1798 1855 * 1799 1856 * @package WordPress … … 1847 1904 } 1848 1905 1849 /** 1850 * _pad_term_counts() - Add count of children to parent count 1851 * 1852 * Recalculates term counts by including items from child terms. 1853 * Assumes all relevant children are already in the $terms argument 1906 1907 /** 1908 * Add count of children to parent count. 1909 * 1910 * Recalculates term counts by including items from child terms. Assumes all 1911 * relevant children are already in the $terms argument. 1854 1912 * 1855 1913 * @package WordPress … … 1911 1969 1912 1970 /** 1913 * _update_post_term_count() - Will update term count based on posts 1914 * 1915 * Private function for the default callback for post_tag and category taxonomies. 1971 * Will update term count based on posts. 1972 * 1973 * Private function for the default callback for post_tag and category 1974 * taxonomies. 1916 1975 * 1917 1976 * @package WordPress … … 1932 1991 } 1933 1992 1934 /** 1935 * get_term_link() - Generates a permalink for a taxonomy term archive 1993 1994 /** 1995 * Generates a permalink for a taxonomy term archive. 1996 * 1997 * @since 2.6 1936 1998 * 1937 1999 * @param object|int|string $term … … 1976 2038 } 1977 2039 2040 /** 2041 * Display the taxonomies of a post with available options. 2042 * 2043 * This function can be used within the loop to display the taxonomies for a 2044 * post without specifying the Post ID. You can also use it outside the Loop to 2045 * display the taxonomies for a specific post. 2046 * 2047 * The available defaults are: 2048 * 'post' : default is 0. The post ID to get taxonomies of. 2049 * 'before' : default is empty string. Display before taxonomies list. 2050 * 'sep' : default is empty string. Separate every taxonomy with value in this. 2051 * 'after' : default is empty string. Display this after the taxonomies list. 2052 * 2053 * @since 2.6 2054 * @uses get_the_taxonomies() 2055 * 2056 * @param array $args Override the defaults. 2057 */ 1978 2058 function the_taxonomies($args = array()) { 1979 2059 $defaults = array( … … 1990 2070 } 1991 2071 2072 /** 2073 * Retrieve all taxonomies associated with a post. 2074 * 2075 * This function can be used within the loop. It will also return an array of 2076 * the taxonomies with links to the taxonomy and name. 2077 * 2078 * @since 2.6 2079 * 2080 * @param int $post Optional. Post ID or will use Global Post ID (in loop). 2081 * @return array 2082 */ 1992 2083 function get_the_taxonomies($post = 0) { 1993 2084 if ( is_int($post) ) … … 2027 2118 } 2028 2119 2120 /** 2121 * Retrieve all taxonomies of a post with just the names. 2122 * 2123 * @since 2.6 2124 * @uses get_object_taxonomies() 2125 * 2126 * @param int $post Optional. Post ID 2127 * @return array 2128 */ 2029 2129 function get_post_taxonomies($post = 0) { 2030 2130 $post =& get_post($post); -
branches/crazyhorse/wp-includes/version.php
r8151 r8242 12 12 13 13 /** 14 * Holds the WordPress DB revision, increments when changes are made to the WordPress DB scheme 15 * changes. 14 * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. 16 15 * 17 16 * @global int $wp_db_version 18 17 */ 19 $wp_db_version = 8 134;18 $wp_db_version = 8201; 20 19 21 20 ?> -
branches/crazyhorse/wp-includes/widgets.php
r8058 r8242 453 453 454 454 $before_widget = preg_replace('/id="[^"]*"/','id="%id"', $before_widget); 455 wp_list_bookmarks(a rray(455 wp_list_bookmarks(apply_filters('widget_links_args', array( 456 456 'title_before' => $before_title, 'title_after' => $after_title, 457 457 'category_before' => $before_widget, 'category_after' => $after_widget, 458 458 'show_images' => true, 'class' => 'linkcat widget' 459 )) ;459 ))); 460 460 } 461 461 -
branches/crazyhorse/wp-includes/wp-db.php
r8151 r8242 1 1 <?php 2 // WordPress DB Class 3 4 // ORIGINAL CODE FROM: 5 // Justin Vincent (justin@visunet.ie) 6 // http://php.justinvincent.com 7 2 /** 3 * WordPress DB Class 4 * 5 * Original code from {@link http://php.justinvincent.com Justin Vincent (justin@visunet.ie)} 6 * 7 * @package WordPress 8 * @subpackage Database 9 * @since 0.71 10 */ 11 12 /** 13 * @since 0.71 14 */ 8 15 define('EZSQL_VERSION', 'WP1.25'); 16 17 /** 18 * @since 0.71 19 */ 9 20 define('OBJECT', 'OBJECT', true); 21 22 /** 23 * @since {@internal Version Unknown}} 24 */ 10 25 define('OBJECT_K', 'OBJECT_K', false); 26 27 /** 28 * @since 0.71 29 */ 11 30 define('ARRAY_A', 'ARRAY_A', false); 31 32 /** 33 * @since 0.71 34 */ 12 35 define('ARRAY_N', 'ARRAY_N', false); 13 36 37 /** 38 * WordPress Database Access Abstraction Object 39 * 40 * It is possible to replace this class with your own 41 * by setting the $wpdb global variable in wp-content/wpdb.php 42 * file with your class. You can name it wpdb also, since 43 * this file will not be included, if the other file is 44 * available. 45 * 46 * @link http://codex.wordpress.org/Function_Reference/wpdb_Class 47 * 48 * @package WordPress 49 * @subpackage Database 50 * @since 0.71 51 * @final 52 */ 14 53 class wpdb { 15 54 55 /** 56 * Whether to show SQL/DB errors 57 * 58 * @since 0.71 59 * @access private 60 * @var bool 61 */ 16 62 var $show_errors = false; 63 64 /** 65 * Whether to suppress errors during the DB bootstrapping. 66 * 67 * @access private 68 * @since {@internal Version Unknown}} 69 * @var bool 70 */ 17 71 var $suppress_errors = false; 72 73 /** 74 * The last error during query. 75 * 76 * @since {@internal Version Unknown}} 77 * @var string 78 */ 18 79 var $last_error = ''; 80 81 /** 82 * Amount of queries made 83 * 84 * @since 1.2.0 85 * @access private 86 * @var int 87 */ 19 88 var $num_queries = 0; 89 90 /** 91 * Saved result of the last query made 92 * 93 * @since 1.2.0 94 * @access private 95 * @var array 96 */ 20 97 var $last_query; 98 99 /** 100 * Saved info on the table column 101 * 102 * @since 1.2.0 103 * @access private 104 * @var array 105 */ 21 106 var $col_info; 107 108 /** 109 * Saved queries that were executed 110 * 111 * @since 1.5.0 112 * @access private 113 * @var array 114 */ 22 115 var $queries; 116 117 /** 118 * WordPress table prefix 119 * 120 * You can set this to have multiple WordPress installations 121 * in a single database. The second reason is for possible 122 * security precautions. 123 * 124 * @since 0.71 125 * @access private 126 * @var string 127 */ 23 128 var $prefix = ''; 129 130 /** 131 * Whether the database queries are ready to start executing. 132 * 133 * @since 2.5.0 134 * @access private 135 * @var bool 136 */ 24 137 var $ready = false; 25 138 26 // Our tables 139 /** 140 * WordPress Posts table 141 * 142 * @since 1.5.0 143 * @access public 144 * @var string 145 */ 27 146 var $posts; 147 148 /** 149 * WordPress Users table 150 * 151 * @since 1.5.0 152 * @access public 153 * @var string 154 */ 28 155 var $users; 156 157 /** 158 * WordPress Categories table 159 * 160 * @since 1.5.0 161 * @access public 162 * @var string 163 */ 29 164 var $categories; 165 166 /** 167 * WordPress Post to Category table 168 * 169 * @since 1.5.0 170 * @access public 171 * @var string 172 */ 30 173 var $post2cat; 174 175 /** 176 * WordPress Comments table 177 * 178 * @since 1.5.0 179 * @access public 180 * @var string 181 */ 31 182 var $comments; 183 184 /** 185 * WordPress Links table 186 * 187 * @since 1.5.0 188 * @access public 189 * @var string 190 */ 32 191 var $links; 192 193 /** 194 * WordPress Options table 195 * 196 * @since 1.5.0 197 * @access public 198 * @var string 199 */ 33 200 var $options; 201 202 /** 203 * WordPress Post Metadata table 204 * 205 * @since {@internal Version Unknown}} 206 * @access public 207 * @var string 208 */ 34 209 var $postmeta; 210 211 /** 212 * WordPress User Metadata table 213 * 214 * @since 2.3.0 215 * @access public 216 * @var string 217 */ 35 218 var $usermeta; 219 220 /** 221 * WordPress Terms table 222 * 223 * @since 2.3.0 224 * @access public 225 * @var string 226 */ 36 227 var $terms; 228 229 /** 230 * WordPress Term Taxonomy table 231 * 232 * @since 2.3.0 233 * @access public 234 * @var string 235 */ 37 236 var $term_taxonomy; 237 238 /** 239 * WordPress Term Relationships table 240 * 241 * @since 2.3.0 242 * @access public 243 * @var string 244 */ 38 245 var $term_relationships; 246 247 /** 248 * List of WordPress tables 249 * 250 * @since {@internal Version Unknown}} 251 * @access private 252 * @var array 253 */ 39 254 var $tables = array('users', 'usermeta', 'posts', 'categories', 'post2cat', 'comments', 'links', 'link2cat', 'options', 40 255 'postmeta', 'terms', 'term_taxonomy', 'term_relationships'); 256 257 /** 258 * Database table columns charset 259 * 260 * @since 2.2.0 261 * @access public 262 * @var string 263 */ 41 264 var $charset; 265 266 /** 267 * Database table columns collate 268 * 269 * @since 2.2.0 270 * @access public 271 * @var string 272 */ 42 273 var $collate; 43 274 44 275 /** 45 276 * Connects to the database server and selects a database 46 * @param string $dbuser 47 * @param string $dbpassword 48 * @param string $dbname 49 * @param string $dbhost 277 * 278 * PHP4 compatibility layer for calling the PHP5 constructor. 279 * 280 * @uses wpdb::__construct() Passes parameters and returns result 281 * @since 0.71 282 * 283 * @param string $dbuser MySQL database user 284 * @param string $dbpassword MySQL database password 285 * @param string $dbname MySQL database name 286 * @param string $dbhost MySQL database host 50 287 */ 51 288 function wpdb($dbuser, $dbpassword, $dbname, $dbhost) { … … 53 290 } 54 291 292 /** 293 * Connects to the database server and selects a database 294 * 295 * PHP5 style constructor for compatibility with PHP5. Does 296 * the actual setting up of the class properties and connection 297 * to the database. 298 * 299 * @since 2.0.8 300 * 301 * @param string $dbuser MySQL database user 302 * @param string $dbpassword MySQL database password 303 * @param string $dbname MySQL database name 304 * @param string $dbhost MySQL database host 305 */ 55 306 function __construct($dbuser, $dbpassword, $dbname, $dbhost) { 56 307 register_shutdown_function(array(&$this, "__destruct")); … … 67 318 $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword, true); 68 319 if (!$this->dbh) { 69 $this->bail( "320 $this->bail(sprintf(/*WP_I18N_DB_CONN_ERROR*/" 70 321 <h1>Error establishing a database connection</h1> 71 <p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code> $dbhost</code>. This could mean your host's database server is down.</p>322 <p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>%s</code>. This could mean your host's database server is down.</p> 72 323 <ul> 73 324 <li>Are you sure you have the correct username and password?</li> … … 76 327 </ul> 77 328 <p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p> 78 " );329 "/*/WP_I18N_DB_CONN_ERROR*/, $dbhost)); 79 330 return; 80 331 } … … 98 349 } 99 350 351 /** 352 * PHP5 style destructor and will run when database object is destroyed. 353 * 354 * @since 2.0.8 355 * 356 * @return bool Always true 357 */ 100 358 function __destruct() { 101 359 return true; 102 360 } 103 361 362 /** 363 * Sets the table prefix for the WordPress tables. 364 * 365 * Also allows for the CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE to 366 * override the WordPress users and usersmeta tables. 367 * 368 * @since 2.5.0 369 * 370 * @param string $prefix Alphanumeric name for the new prefix. 371 * @return string Old prefix 372 */ 104 373 function set_prefix($prefix) { 105 374 106 375 if ( preg_match('|[^a-z0-9_]|i', $prefix) ) 107 return new WP_Error('invalid_db_prefix', 'Invalid database prefix'); // No gettext here376 return new WP_Error('invalid_db_prefix', /*WP_I18N_DB_BAD_PREFIX*/'Invalid database prefix'/*/WP_I18N_DB_BAD_PREFIX*/); 108 377 109 378 $old_prefix = $this->prefix; … … 123 392 124 393 /** 125 * Selects a database using the current class's $this->dbh 126 * @param string $db name 394 * Selects a database using the current database connection. 395 * 396 * The database name will be changed based on the current database 397 * connection. On failure, the execution will bail and display an DB error. 398 * 399 * @since 0.71 400 * 401 * @param string $db MySQL database name 402 * @return null Always null. 127 403 */ 128 404 function select($db) { 129 405 if (!@mysql_select_db($db, $this->dbh)) { 130 406 $this->ready = false; 131 $this->bail( "407 $this->bail(sprintf(/*WP_I18N_DB_SELECT_DB*/' 132 408 <h1>Can’t select database</h1> 133 <p>We were able to connect to the database server (which means your username and password is okay) but not able to select the <code> $db</code> database.</p>409 <p>We were able to connect to the database server (which means your username and password is okay) but not able to select the <code>%1$s</code> database.</p> 134 410 <ul> 135 411 <li>Are you sure it exists?</li> 136 <li>Does the user <code> ".DB_USER."</code> have permission to use the <code>$db</code> database?</li>412 <li>Does the user <code>%2$s</code> have permission to use the <code>%1$s</code> database?</li> 137 413 <li>On some systems the name of your database is prefixed with your username, so it would be like username_wordpress. Could that be the problem?</li> 138 414 </ul> 139 <p>If you don 't know how to setup a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>");415 <p>If you don\'t know how to setup a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="http://wordpress.org/support/">WordPress Support Forums</a>.</p>'/*/WP_I18N_DB_SELECT_DB*/, $db, DB_USER)); 140 416 return; 141 417 } … … 144 420 /** 145 421 * Escapes content for insertion into the database, for security 422 * 423 * @since 0.71 146 424 * 147 425 * @param string $string … … 161 439 /** 162 440 * Escapes content by reference for insertion into the database, for security 441 * 442 * @since 2.3.0 443 * 163 444 * @param string $s 164 445 */ … … 168 449 169 450 /** 170 * Prepares a SQL query for safe use, using sprintf() syntax 171 */ 172 function prepare($args=NULL) { 173 if ( NULL === $args ) 451 * Prepares a SQL query for safe use, using sprintf() syntax. 452 * 453 * @link http://php.net/sprintf See for syntax to use for query string. 454 * @since 2.3.0 455 * 456 * @param null|string $args If string, first parameter must be query statement 457 * @param mixed $args,... If additional parameters, they will be set inserted into the query. 458 * @return null|string Sanitized query string 459 */ 460 function prepare($args=null) { 461 if ( is_null( $args ) ) 174 462 return; 175 463 $args = func_get_args(); … … 182 470 } 183 471 184 // ================================================================== 185 // Print SQL/DB error. 186 472 /** 473 * Print SQL/DB error. 474 * 475 * @since 0.71 476 * @global array $EZSQL_ERROR Stores error information of query and error string 477 * 478 * @param string $str The error to display 479 * @return bool False if the showing of errors is disabled. 480 */ 187 481 function print_error($str = '') { 188 482 global $EZSQL_ERROR; 189 483 190 484 if (!$str) $str = mysql_error($this->dbh); 191 $EZSQL_ERROR[] = 192 array ('query' => $this->last_query, 'error_str' => $str); 485 $EZSQL_ERROR[] = array ('query' => $this->last_query, 'error_str' => $str); 193 486 194 487 if ( $this->suppress_errors ) 195 488 return false; 196 489 197 $error_str = "WordPress database error $str for query $this->last_query";198 490 if ( $caller = $this->get_caller() ) 199 $error_str .= " made by $caller"; 491 $error_str = sprintf(/*WP_I18N_DB_QUERY_ERROR_FULL*/'WordPress database error %1$s for query %2$s made by %3$s'/*/WP_I18N_DB_QUERY_ERROR_FULL*/, $str, $this->last_query, $caller); 492 else 493 $error_str = sprintf(/*WP_I18N_DB_QUERY_ERROR*/'WordPress database error %1$s for query %2$s'/*/WP_I18N_DB_QUERY_ERROR*/, $str, $this->last_query); 200 494 201 495 $log_error = true; … … 224 518 } 225 519 226 // ================================================================== 227 // Turn error handling on or off.. 228 520 /** 521 * Enables showing of database errors. 522 * 523 * This function should be used only to enable showing of errors. 524 * wpdb::hide_errors() should be used instead for hiding of errors. However, 525 * this function can be used to enable and disable showing of database 526 * errors. 527 * 528 * @since 0.71 529 * 530 * @param bool $show Whether to show or hide errors 531 * @return bool Old value for showing errors. 532 */ 229 533 function show_errors( $show = true ) { 230 534 $errors = $this->show_errors; … … 233 537 } 234 538 539 /** 540 * Disables showing of database errors. 541 * 542 * @since 0.71 543 * 544 * @return bool Whether showing of errors was active or not 545 */ 235 546 function hide_errors() { 236 547 $show = $this->show_errors; … … 239 550 } 240 551 552 /** 553 * Whether to suppress database errors. 554 * 555 * @param unknown_type $suppress 556 * @return unknown 557 */ 241 558 function suppress_errors( $suppress = true ) { 242 559 $errors = $this->suppress_errors; … … 245 562 } 246 563 247 // ================================================================== 248 // Kill cached query results 249 564 /** 565 * Kill cached query results. 566 * 567 * @since 0.71 568 */ 250 569 function flush() { 251 570 $this->last_result = array(); … … 254 573 } 255 574 256 // ================================================================== 257 // Basic Query - see docs for more detail 258 575 /** 576 * Perform a MySQL database query, using current database connection. 577 * 578 * More information can be found on the codex page. 579 * 580 * @since 0.71 581 * 582 * @param string $query 583 * @return unknown 584 */ 259 585 function query($query) { 260 586 if ( ! $this->ready ) … … 325 651 326 652 /** 327 * Insert an array of data into a table 653 * Insert an array of data into a table. 654 * 655 * @since 2.5.0 656 * 328 657 * @param string $table WARNING: not sanitized! 329 * @param array $data should not already be SQL-escaped330 * @return mixed results of $this->query()658 * @param array $data Should not already be SQL-escaped 659 * @return mixed Results of $this->query() 331 660 */ 332 661 function insert($table, $data) { … … 337 666 338 667 /** 339 * Update a row in the table with an array of data 668 * Update a row in the table with an array of data. 669 * 670 * @since 2.5.0 671 * 340 672 * @param string $table WARNING: not sanitized! 341 * @param array $data should not already be SQL-escaped342 * @param array $where anamed array of WHERE column => value relationships. Multiple member pairs will be joined with ANDs. WARNING: the column names are not currently sanitized!343 * @return mixed results of $this->query()673 * @param array $data Should not already be SQL-escaped 674 * @param array $where A named array of WHERE column => value relationships. Multiple member pairs will be joined with ANDs. WARNING: the column names are not currently sanitized! 675 * @return mixed Results of $this->query() 344 676 */ 345 677 function update($table, $data, $where){ … … 358 690 359 691 /** 360 * Get one variable from the database 361 * @param string $query (can be null as well, for caching, see codex) 362 * @param int $x = 0 row num to return 363 * @param int $y = 0 col num to return 364 * @return mixed results 692 * Retrieve one variable from the database. 693 * 694 * This combines the functionality of wpdb::get_row() and wpdb::get_col(), 695 * so both the column and row can be picked. 696 * 697 * It is possible to use this function without executing more queries. If 698 * you already made a query, you can set the $query to 'null' value and just 699 * retrieve either the column and row of the last query result. 700 * 701 * @since 0.71 702 * 703 * @param string $query Can be null as well, for caching 704 * @param int $x Column num to return 705 * @param int $y Row num to return 706 * @return mixed Database query results 365 707 */ 366 708 function get_var($query=null, $x = 0, $y = 0) { … … 379 721 380 722 /** 381 * Get one row from the database 382 * @param string $query 723 * Retrieve one row from the database. 724 * 725 * @since 0.71 726 * 727 * @param string $query SQL query 383 728 * @param string $output ARRAY_A | ARRAY_N | OBJECT 384 * @param int $y row num to return385 * @return mixed results729 * @param int $y Row num to return 730 * @return mixed Database query results 386 731 */ 387 732 function get_row($query = null, $output = OBJECT, $y = 0) { … … 402 747 return $this->last_result[$y] ? array_values(get_object_vars($this->last_result[$y])) : null; 403 748 } else { 404 $this->print_error(" \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N"); 405 } 406 } 407 408 /** 409 * Gets one column from the database 410 * @param string $query (can be null as well, for caching, see codex) 411 * @param int $x col num to return 412 * @return array results 749 $this->print_error(/*WP_I18N_DB_GETROW_ERROR*/" \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N"/*/WP_I18N_DB_GETROW_ERROR*/); 750 } 751 } 752 753 /** 754 * Retrieve one column from the database. 755 * 756 * @since 0.71 757 * 758 * @param string $query Can be null as well, for caching 759 * @param int $x Col num to return. Starts from 0. 760 * @return array Column results 413 761 */ 414 762 function get_col($query = null , $x = 0) { … … 425 773 426 774 /** 427 * Return an entire result set from the database 428 * @param string $query (can also be null to pull from the cache) 775 * Retrieve an entire result set from the database. 776 * 777 * @since 0.71 778 * 779 * @param string|null $query Can also be null to pull from the cache 429 780 * @param string $output ARRAY_A | ARRAY_N | OBJECT_K | OBJECT 430 * @return mixed results781 * @return mixed Database query results 431 782 */ 432 783 function get_results($query = null, $output = OBJECT) { … … 470 821 471 822 /** 472 * Grabs column metadata from the last query 823 * Retrieve column metadata from the last query. 824 * 825 * @since 0.71 826 * 473 827 * @param string $info_type one of name, table, def, max_length, not_null, primary_key, multiple_key, unique_key, numeric, blob, type, unsigned, zerofill 474 828 * @param int $col_offset 0: col name. 1: which table the col's in. 2: col's max length. 3: if the col is numeric. 4: col's type 475 * @return mixed results829 * @return mixed Column Results 476 830 */ 477 831 function get_col_info($info_type = 'name', $col_offset = -1) { … … 491 845 492 846 /** 493 * Starts the timer, for debugging purposes 847 * Starts the timer, for debugging purposes. 848 * 849 * @since 1.5.0 850 * 851 * @return bool Always returns true 494 852 */ 495 853 function timer_start() { … … 501 859 502 860 /** 503 * Stops the debugging timer 504 * @return int total time spent on the query, in milliseconds 861 * Stops the debugging timer. 862 * 863 * @since 1.5.0 864 * 865 * @return int Total time spent on the query, in milliseconds 505 866 */ 506 867 function timer_stop() { … … 514 875 /** 515 876 * Wraps fatal errors in a nice header and footer and dies. 877 * 878 * @since 1.5.0 879 * 516 880 * @param string $message 517 */ 518 function bail($message) { // Just wraps errors in a nice header and footer 881 * @return unknown 882 */ 883 function bail($message) { 519 884 if ( !$this->show_errors ) { 520 885 if ( class_exists('WP_Error') ) … … 528 893 529 894 /** 530 * Checks wether of not the database version is high enough to support the features WordPress uses 531 * @global $wp_version 895 * Whether or not MySQL database is minimal required version. 896 * 897 * @since 2.5.0 898 * @uses $wp_version 899 * 900 * @return WP_Error 532 901 */ 533 902 function check_database_version() … … 541 910 542 911 /** 543 * This function is called when WordPress is generating the table schema to determine wether or not the current database 544 * supports or needs the collation statements. 912 * Whether of not the database version supports collation. 913 * 914 * Called when WordPress is generating the table scheme. 915 * 916 * @since 2.5.0 917 * 918 * @return bool True if collation is supported, false if version does not 545 919 */ 546 920 function supports_collation() … … 550 924 551 925 /** 552 * Get the name of the function that called wpdb. 553 * @return string the name of the calling function 926 * Retrieve the name of the function that called wpdb. 927 * 928 * Requires PHP 4.3 and searches up the list of functions until it reaches 929 * the one that would most logically had called this method. 930 * 931 * @since 2.5.0 932 * 933 * @return string The name of the calling function 554 934 */ 555 935 function get_caller() { … … 579 959 } 580 960 581 if ( ! isset($wpdb) ) 961 if ( ! isset($wpdb) ) { 962 /** 963 * WordPress Database Object, if it isn't set already in wp-content/wpdb.php 964 * @global object $wpdb Creates a new wpdb object based on wp-config.php Constants for the database 965 * @since 0.71 966 */ 582 967 $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST); 968 } 583 969 ?> -
branches/crazyhorse/wp-load.php
r8103 r8242 44 44 require_once( ABSPATH . '/wp-includes/functions.php' ); 45 45 require_once( ABSPATH . '/wp-includes/plugin.php' ); 46 wp_die( "There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>. You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.</p><p><a href='{$path}setup-config.php' class='button'>Create a Configuration File</a>", "WordPress › Error");46 wp_die(sprintf(/*WP_I18N_NO_CONFIG*/"There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>. You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.</p><p><a href='%ssetup-config.php' class='button'>Create a Configuration File</a>"/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/"WordPress › Error"/*/WP_I18N_ERROR_TITLE*/); 47 47 48 48 } -
branches/crazyhorse/wp-login.php
r8069 r8242 13 13 14 14 // Redirect to https login if forced to use SSL 15 if ( (force_ssl_admin() || force_ssl_login()) && !is_ssl() ) {15 if ( force_ssl_admin() && !is_ssl() ) { 16 16 if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) { 17 17 wp_redirect(preg_replace('|^http://|', 'https://', $_SERVER['REQUEST_URI'])); … … 313 313 ?> 314 314 315 <form name="lostpasswordform" id="lostpasswordform" action=" wp-login.php?action=lostpassword" method="post">315 <form name="lostpasswordform" id="lostpasswordform" action="<?php echo site_url('wp-login.php?action=lostpassword', 'login_post') ?>" method="post"> 316 316 <p> 317 317 <label><?php _e('Username or E-mail:') ?><br /> … … 377 377 ?> 378 378 379 <form name="registerform" id="registerform" action=" wp-login.php?action=register" method="post">379 <form name="registerform" id="registerform" action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" method="post"> 380 380 <p> 381 381 <label><?php _e('Username') ?><br /> … … 410 410 $redirect_to = $_REQUEST['redirect_to']; 411 411 else 412 $redirect_to = 'wp-admin/';413 414 if ( is_ssl() && force_ssl_login() && !force_ssl_admin() && ( 0 !== strpos($redirect_to, 'https') ) )412 $redirect_to = admin_url(); 413 414 if ( is_ssl() && force_ssl_login() && !force_ssl_admin() && ( 0 !== strpos($redirect_to, 'https') ) && ( 0 === strpos($redirect_to, 'http') ) ) 415 415 $secure_cookie = false; 416 416 else … … 446 446 ?> 447 447 448 <form name="loginform" id="loginform" action=" wp-login.php" method="post">448 <form name="loginform" id="loginform" action="<?php echo site_url('wp-login.php', 'login_post') ?>" method="post"> 449 449 <?php if ( !isset($_GET['checkemail']) || !in_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?> 450 450 <p> -
branches/crazyhorse/wp-settings.php
r8069 r8242 98 98 99 99 if ( version_compare( '4.3', phpversion(), '>' ) ) { 100 die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.3.');100 die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %s but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/, php_version() ) ); 101 101 } 102 102 … … 105 105 106 106 if ( !extension_loaded('mysql') && !file_exists(WP_CONTENT_DIR . '/db.php') ) 107 die( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.');107 die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ ); 108 108 109 109 /** … … 213 213 214 214 if ( is_wp_error($prefix) ) 215 wp_die( '<strong>ERROR</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.');215 wp_die(/*WP_I18N_BAD_PREFIX*/'<strong>ERROR</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/); 216 216 217 217 if ( file_exists(WP_CONTENT_DIR . '/object-cache.php') ) … … 363 363 /** 364 364 * It is possible to define this in wp-config.php 365 * @since 2.6 366 */ 367 if ( !defined('ADMIN_COOKIE_PATH') ) 368 define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' ); 369 370 /** 371 * It is possible to define this in wp-config.php 372 * @since 2.6 373 */ 374 if ( !defined('PLUGINS_COOKIE_PATH') ) 375 define( 'PLUGINS_COOKIE_PATH', preg_replace('|https?://[^/]+|i', '', WP_PLUGIN_URL) ); 376 377 /** 378 * It is possible to define this in wp-config.php 365 379 * @since 2.0.0 366 380 */ -
branches/crazyhorse/xmlrpc.php
r8151 r8242 40 40 <homePageLink><?php bloginfo_rss('url') ?></homePageLink> 41 41 <apis> 42 <?php if ( get_option('enable_xmlrpc') ) :?>43 42 <api name="WordPress" blogID="1" preferred="true" apiLink="<?php bloginfo_rss('wpurl') ?>/xmlrpc.php" /> 44 43 <api name="Movable Type" blogID="1" preferred="false" apiLink="<?php bloginfo_rss('wpurl') ?>/xmlrpc.php" /> 45 44 <api name="MetaWeblog" blogID="1" preferred="false" apiLink="<?php bloginfo_rss('wpurl') ?>/xmlrpc.php" /> 46 45 <api name="Blogger" blogID="1" preferred="false" apiLink="<?php bloginfo_rss('wpurl') ?>/xmlrpc.php" /> 47 <?php endif; if ( get_option('enable_app') ) :?>48 46 <api name="Atom" blogID="" preferred="false" apiLink="<?php echo apply_filters('atom_service_url', (get_bloginfo('url')."/wp-app.php/service"))?>" /> 49 <?php endif; ?>50 47 </apis> 51 48 </service> … … 112 109 113 110 function wp_xmlrpc_server() { 114 $ xmlrpc_methods = array(111 $this->methods = array( 115 112 // WordPress API 116 113 'wp.getUsersBlogs' => 'this:wp_getUsersBlogs', … … 168 165 'mt.supportedTextFilters' => 'this:mt_supportedTextFilters', 169 166 'mt.getTrackbackPings' => 'this:mt_getTrackbackPings', 170 'mt.publishPost' => 'this:mt_publishPost' 171 ); 172 173 $xmlrpc_functions = array ( 167 'mt.publishPost' => 'this:mt_publishPost', 168 174 169 // PingBack 175 170 'pingback.ping' => 'this:pingback_ping', … … 180 175 ); 181 176 182 if ( get_option('enable_xmlrpc') )183 {184 $this->methods = array_merge($xmlrpc_methods,$xmlrpc_functions);185 } else {186 $this->methods = $xmlrpc_functions;187 }188 189 177 $this->initialise_blog_option_info( ); 190 178 $this->methods = apply_filters('xmlrpc_methods', $this->methods); … … 203 191 204 192 function login_pass_ok($user_login, $user_pass) { 193 if ( !get_option( 'enable_xmlrpc' ) ) { 194 $this->error = new IXR_Error( 405, sprintf( __( 'XML-RPC services are disabled on this blog. An admin user can enable them at %s'), admin_url('options-writing.php') ) ); 195 return false; 196 } 197 205 198 if (!user_pass_ok($user_login, $user_pass)) { 206 199 $this->error = new IXR_Error(403, __('Bad login/pass combination.')); … … 846 839 847 840 if( !$this->login_pass_ok( $username, $password ) ) { 848 return new IXR_Error( 403, __( 'Bad login/pass combination.' ) );841 return $this->error; 849 842 } 850 843 … … 874 867 875 868 if( !$this->login_pass_ok( $username, $password ) ) { 876 return new IXR_Error( 403, __( 'Bad login/pass combination.' ) );869 return $this->error; 877 870 } 878 871 … … 896 889 897 890 if( !$this->login_pass_ok( $username, $password ) ) { 898 return new IXR_Error( 403, __( 'Bad login/pass combination.' ) );891 return $this->error; 899 892 } 900 893 … … 917 910 918 911 if( !$this->login_pass_ok( $username, $password ) ) { 919 return new IXR_Error( 403, __( 'Bad login/pass combination.' ) );912 return $this->error; 920 913 } 921 914 … … 940 933 941 934 if( !$this->login_pass_ok( $username, $password ) ) 942 return new IXR_Error( 403, __( 'Bad login/pass combination.' ) );935 return $this->error; 943 936 944 937 $user = set_current_user( 0, $username ); … … 979 972 980 973 if( !$this->login_pass_ok( $username, $password ) ) 981 return new IXR_Error( 403, __( 'Bad login/pass combination.' ) );974 return $this->error; 982 975 983 976 $user = set_current_user( 0, $username );
Note: See TracChangeset
for help on using the changeset viewer.