Changeset 1218118
- Timestamp:
- 08/11/2015 12:10:17 PM (11 years ago)
- Location:
- commentpress-core/trunk
- Files:
-
- 12 edited
-
commentpress-core.php (modified) (2 diffs)
-
commentpress-core/assets/includes/theme/theme-functions.php (modified) (1 diff)
-
commentpress-core/assets/js/jquery.commentpress.js (modified) (4 diffs)
-
commentpress-core/assets/js/jquery.commentpress.min.js (modified) (1 diff)
-
commentpress-core/class_commentpress_db.php (modified) (3 diffs)
-
commentpress-core/class_commentpress_display.php (modified) (18 diffs)
-
languages/commentpress-core.pot (modified) (34 diffs)
-
readme.txt (modified) (2 diffs)
-
themes/commentpress-modern/assets/js/screen.js (modified) (1 diff)
-
themes/commentpress-modern/functions.php (modified) (9 diffs)
-
themes/commentpress-theme/assets/js/cp_js_common.js (modified) (19 diffs)
-
themes/commentpress-theme/assets/js/cp_js_common.min.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
commentpress-core/trunk/commentpress-core.php
r1197799 r1218118 5 5 Description: CommentPress allows readers to comment in the margins of a text. You can use it to annotate, gloss, workshop, debate and more! 6 6 Author: Institute for the Future of the Book 7 Version: 3.8. 17 Version: 3.8.2 8 8 Author URI: http://www.futureofthebook.org 9 9 Text Domain: commentpress-core … … 23 23 24 24 // set version 25 define( 'COMMENTPRESS_VERSION', '3.8. 1' );25 define( 'COMMENTPRESS_VERSION', '3.8.2' ); 26 26 27 27 // store reference to this file -
commentpress-core/trunk/commentpress-core/assets/includes/theme/theme-functions.php
r1189714 r1218118 3436 3436 3437 3437 3438 if ( ! function_exists( 'commentpress_amend_search_query' ) ): 3439 /** 3440 * Restrict search query to pages only 3441 * 3442 * @param object $query The query object, passed by reference 3443 * @return void 3444 */ 3445 function commentpress_amend_search_query( &$query ) { 3446 3447 // restrict to search outside admin (BP does a redirect to the blog page and so $query->is_search is not set) 3448 if ( ! is_admin() AND isset( $query->query['s'] ) AND ! empty( $query->query['s'] ) ) { 3449 3450 // is this a BuddyPress search on the main BP instance? 3451 if ( function_exists( 'bp_search_form_type_select' ) AND bp_is_root_blog() ) { 3452 3453 // search posts and pages 3454 $query->set( 'post_type', apply_filters( 'commentpress_amend_search_query_post_types', array( 'post', 'page' ) ) ); 3455 3456 // declare access to globals 3457 global $commentpress_core; 3458 3459 // if we have the plugin enabled... 3460 if ( is_object( $commentpress_core ) ) { 3461 3462 // get special pages array, if it's there 3463 $special_pages = $commentpress_core->db->option_get( 'cp_special_pages' ); 3464 3465 // do we have an array? 3466 if ( is_array( $special_pages ) ) { 3467 3468 // exclude them 3469 $query->set( 'post__not_in', apply_filters( 'commentpress_amend_search_query_exclusions', $special_pages ) ); 3470 3471 } 3472 3473 } 3474 3475 } 3476 3477 } 3478 3479 } 3480 endif; 3481 3482 // add filter for search query modification 3483 add_filter( 'pre_get_posts', 'commentpress_amend_search_query' ); 3484 3485 3486 3438 3487 if ( ! function_exists( 'commentpress_amend_password_form' ) ): 3439 3488 /** -
commentpress-core/trunk/commentpress-core/assets/js/jquery.commentpress.js
r1197799 r1218118 1216 1216 event.preventDefault(); 1217 1217 1218 // prevent bubbling 1219 event.stopPropagation(); 1220 1218 1221 // get target 1219 1222 target = $(this).prop('href').split('#')[1]; … … 1244 1247 // override event 1245 1248 event.preventDefault(); 1249 1250 // prevent bubbling 1251 event.stopPropagation(); 1246 1252 1247 1253 // remove url … … 1273 1279 // override event 1274 1280 event.preventDefault(); 1281 1282 // prevent bubbling 1283 event.stopPropagation(); 1275 1284 1276 1285 // get target … … 1614 1623 1615 1624 // activate it (this will become a theme method) 1616 CommentPress.theme.sidebars.activate_sidebar( 'comments');1625 CommentPress.theme.sidebars.activate_sidebar( 'comments' ); 1617 1626 1618 1627 }); -
commentpress-core/trunk/commentpress-core/assets/js/jquery.commentpress.min.js
r1197799 r1218118 1 var msie_detected=!1;if("undefined"!=typeof cp_msie&&(msie_detected=!0),"undefined"!=typeof CommentpressSettings){var cp_comments_open,cp_special_page,cp_tinymce,cp_tinymce_version,cp_promote_reading,cp_is_mobile,cp_is_touch,cp_is_tablet,cp_cookie_path,cp_multipage_page,cp_toc_chapter_is_page,cp_show_subpages,cp_default_sidebar,cp_is_signup_page,cp_scroll_speed,cp_min_page_width,cp_textblock_meta,cp_touch_testing;cp_comments_open=CommentpressSettings.cp_comments_open,cp_special_page=CommentpressSettings.cp_special_page,cp_tinymce=CommentpressSettings.cp_tinymce,cp_tinymce_version=CommentpressSettings.cp_tinymce_version,cp_promote_reading=CommentpressSettings.cp_promote_reading,cp_is_mobile=CommentpressSettings.cp_is_mobile,cp_is_touch=CommentpressSettings.cp_is_touch,cp_is_tablet=CommentpressSettings.cp_is_tablet,cp_touch_testing=CommentpressSettings.cp_touch_testing,cp_cookie_path=CommentpressSettings.cp_cookie_path,cp_multipage_page=CommentpressSettings.cp_multipage_page,cp_toc_chapter_is_page=CommentpressSettings.cp_toc_chapter_is_page,cp_show_subpages=CommentpressSettings.cp_show_subpages,cp_default_sidebar=CommentpressSettings.cp_default_sidebar,cp_is_signup_page=CommentpressSettings.cp_is_signup_page,cp_scroll_speed=CommentpressSettings.cp_js_scroll_speed,cp_min_page_width=CommentpressSettings.cp_min_page_width,cp_textblock_meta=CommentpressSettings.cp_textblock_meta}var CommentPress=CommentPress||{};CommentPress.settings={},CommentPress.settings.DOM=new function(){{var t=this;jQuery.noConflict()}this.init=function(){t.init_wp_adminbar(),t.init_bp_adminbar(),t.init_wp_adminbar_height()},this.dom_ready=function(){},this.original_permalink=document.location.toString(),"undefined"!=typeof CommentpressSettings&&""!=CommentpressSettings.cp_permalink&&(this.original_permalink=CommentpressSettings.cp_permalink),this.set_permalink=function(t){this.original_permalink=t},this.get_permalink=function(){return this.original_permalink},this.bp_adminbar="n",this.init_bp_adminbar=function(t){"undefined"!=typeof CommentpressSettings&&(this.bp_adminbar=CommentpressSettings.cp_bp_adminbar)},this.set_bp_adminbar=function(t){this.bp_adminbar=t},this.get_bp_adminbar=function(){return this.bp_adminbar},this.wp_adminbar="n",this.init_wp_adminbar=function(t){"undefined"!=typeof CommentpressSettings&&(this.wp_adminbar=CommentpressSettings.cp_wp_adminbar)},this.set_wp_adminbar=function(t){this.wp_adminbar=t},this.get_wp_adminbar=function(){return this.wp_adminbar},this.wp_adminbar_height=0,this.init_wp_adminbar_height=function(e){"undefined"!=typeof CommentpressSettings&&(this.wp_adminbar_height=parseInt(CommentpressSettings.cp_wp_adminbar_height)),"y"==t.get_bp_adminbar()&&(this.wp_adminbar_height=25,t.set_wp_adminbar("y"))},this.set_wp_adminbar_height=function(t){this.wp_adminbar_height=t},this.get_wp_adminbar_height=function(){return this.wp_adminbar_height},this.wp_adminbar_height=0,this.init_wp_adminbar_expanded=function(t){"undefined"!=typeof CommentpressSettings&&(this.wp_adminbar_expanded=parseInt(CommentpressSettings.cp_wp_adminbar_expanded))},this.set_wp_adminbar_expanded=function(t){this.wp_adminbar_expanded=t},this.get_wp_adminbar_expanded=function(){return this.wp_adminbar_expanded}},CommentPress.settings.page=new function(){jQuery.noConflict();this.init=function(){},this.dom_ready=function(){},this.highlight=!1,this.toggle_highlight=function(){this.highlight=!this.highlight},this.set_highlight=function(t){this.highlight=t},this.get_highlight=function(){return this.highlight}},CommentPress.settings.textblock=new function(){jQuery.noConflict();this.init=function(){},this.dom_ready=function(){},this.scroll_target="para_heading",this.set_scroll_target=function(t){this.scroll_target=t},this.get_scroll_target=function(){return this.scroll_target},this.permalink_shown=!1,this.set_permalink_shown=function(t){this.permalink_shown=t},this.get_permalink_shown=function(){return this.permalink_shown}},CommentPress.common={},CommentPress.common.DOM=new function(){jQuery.noConflict();this.init=function(){},this.dom_ready=function(){},this.location_set=function(t){window.history&&window.history.replaceState&&window.history.replaceState({},"",t)},this.location_reset=function(){window.history&&window.history.replaceState&&window.history.replaceState({},"",CommentPress.settings.DOM.get_permalink())}},CommentPress.common.navigation=new function(){var t=this,e=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){t.headings(),t.menu()},this.headings=function(){e("h3.activity_heading").css("cursor","pointer"),e("#toc_sidebar").on("click","h3.activity_heading",function(t){var n;t.preventDefault(),n=e(this).next("div.paragraph_wrapper"),n.css("width",e(this).parent().css("width")),n.slideToggle("slow",function(){n.css("width","auto")})})},this.menu=function(){e("#toc_sidebar").on("click","ul#toc_list li a",function(t){if("0"==cp_toc_chapter_is_page){var n;n=e(this).parent().find("ul"),n.length>0&&("0"==cp_show_subpages&&e(this).next("ul").slideToggle(),t.preventDefault())}})}},CommentPress.common.content=new function(){var t=this,e=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){t.title_links(),t.textblocks(),t.para_markers(),t.textblock_permalink_show(),t.comment_icons(),t.links_in_textblocks(),t.footnotes_compatibility()},this.title_links=function(){e("#container").on("click",".post_title a",function(t){t.preventDefault();var n="";CommentPress.settings.textblock.set_scroll_target("para_heading"),e(document).trigger("commentpress-post-title-pre-align"),CommentPress.theme.viewport.align_content(n,CommentPress.settings.textblock.get_scroll_target()),e(document).trigger("commentpress-post-title-clicked")})},this.textblocks=function(){"0"==cp_is_mobile&&"0"==cp_textblock_meta&&(e("#container").on("mouseover",".textblock",function(t){e(this).addClass("textblock-in")}),e("#container").on("mouseout",".textblock",function(t){e(this).removeClass("textblock-in")})),e("#container").on("click",".textblock",function(t){var n;n=e(this).prop("id"),n=n.split("textblock-")[1],CommentPress.settings.textblock.set_scroll_target("para_heading"),e(document).trigger("commentpress-post-title-clicked"),e(document).trigger("commentpress-textblock-pre-align"),CommentPress.theme.viewport.align_content(n,CommentPress.settings.textblock.get_scroll_target()),e(document).trigger("commentpress-textblock-clicked")})},this.para_markers=function(){e("#container").on("click","span.para_marker a",function(t){t.preventDefault(),e(document).trigger("commentpress-paramarker-clicked")}),e("#container").on("mouseenter","span.para_marker a",function(t){var n;n=e(this).parent().next().children(".comment_count"),n.addClass("js-hover")}),e("#container").on("mouseleave","span.para_marker a",function(t){var n;n=e(this).parent().next().children(".comment_count"),n.removeClass("js-hover")})},this.textblock_permalink_show=function(){e(".textblock_permalink").tooltip({position:{my:"left-30 bottom-20",at:"left top",using:function(t,n){e(this).css(t),e("<div>").addClass("arrow").addClass(n.vertical).addClass(n.horizontal).appendTo(this)}}}),e("#wrapper").on("click",".textblock_permalink",function(n){var i;i=e(this).attr("href"),i&&(CommentPress.common.DOM.location_set(i),CommentPress.settings.textblock.set_permalink_shown(!0),e(document).bind("click",t.textblock_permalink_handler))}),e(document).on("commentpress-textblock-click commentpress-comment-block-permalink-clicked commentpress-commenticonbox-clicked commentpress-link-in-textblock-clicked",function(n){CommentPress.settings.textblock.get_permalink_shown()&&(e(document).unbind("click",t.textblock_permalink_handler),CommentPress.settings.textblock.set_permalink_shown(!1),CommentPress.common.DOM.location_reset())})},this.textblock_permalink_handler=function(n){e(n.target).closest(".textblock_permalink").length||(e(document).unbind("click",t.textblock_permalink_handler),CommentPress.settings.textblock.set_permalink_shown(!1),CommentPress.common.DOM.location_reset())},this.comment_icons=function(){e("#container").on("click",".commenticonbox",function(t){var n;t.preventDefault(),t.stopPropagation(),n=e(this).children("a.para_permalink").prop("href").split("#")[1],CommentPress.settings.textblock.set_scroll_target("commentform"),e(document).trigger("commentpress-commenticonbox-pre-align"),CommentPress.theme.viewport.align_content(n,CommentPress.settings.textblock.get_scroll_target()),e(document).trigger("commentpress-commenticonbox-clicked")}),e("#container").on("click","a.para_permalink",function(t){t.preventDefault()}),e("#container").on("mouseenter","a.para_permalink",function(t){var n;n=e(this).prop("href").split("#")[1],e("span.para_marker a#"+n).addClass("js-hover")}),e("#container").on("mouseleave","a.para_permalink",function(t){var n;n=e(this).prop("href").split("#")[1],e("span.para_marker a#"+n).removeClass("js-hover")})},this.links_in_textblocks=function(){e("#container").on("click","a.cp_para_link",function(t){var n;t.preventDefault(),t.stopPropagation(),n=e(this).prop("href").split("#")[1],CommentPress.settings.textblock.set_scroll_target("commentform"),e(document).trigger("commentpress-link-in-textblock-pre-align"),CommentPress.theme.viewport.align_content(n,CommentPress.settings.textblock.get_scroll_target()),e(document).trigger("commentpress-link-in-textblock-clicked")})},this.footnotes_compatibility=function(){e("#container").on("click","span.footnotereverse a, a.footnote-back-link",function(n){var i;n.preventDefault(), i=e(this).prop("href").split("#")[1],t.quick_scroll_page("#"+i,100)}),e("#container").on("click",".simple-footnotes ol li > a",function(n){var i;i=e(this).prop("href"),i.match("#return-note-")&&(n.preventDefault(),i=i.split("#")[1],t.quick_scroll_page("#"+i,100))}),e("#container").on("click","a.simple-footnote, sup.footnote a, sup a.footnote-identifier-link, a.zp-ZotpressInText",function(n){var i;n.preventDefault(),i=e(this).prop("href").split("#")[1],t.quick_scroll_page("#"+i,100)})},this.scroll_page=function(t){"undefined"!=typeof t&&("0"==cp_is_mobile||"1"==cp_is_tablet)&&e(window).stop(!0).scrollTo(t,{duration:1.5*cp_scroll_speed,axis:"y",offset:CommentPress.theme.header.get_offset()})},this.quick_scroll_page=function(t,n){"undefined"!=typeof t&&("0"==cp_is_mobile||"1"==cp_is_tablet)&&e(window).stop(!0).scrollTo(t,{duration:1.5*n,axis:"y",offset:CommentPress.theme.header.get_offset()})},this.scroll_page_to_textblock=function(n){var i;""!==n?(i=e("#textblock-"+n),e.highlight_para(i),t.scroll_page(i)):(CommentPress.settings.page.toggle_highlight()||CommentPress.theme.viewport.scroll_to_top(0,cp_scroll_speed),CommentPress.settings.page.toggle_highlight())},this.on_load_scroll_to_comment=function(){var t,n,i;return t=document.location.toString(),t.match("#comment-")?(n=t.split("#comment-")[1],i=e("#comment-"+n),i.length&&("0"==cp_is_mobile||"1"==cp_is_tablet)&&e(window).stop(!0).scrollTo(i,{duration:cp_scroll_speed,axis:"y",offset:CommentPress.theme.header.get_offset()}),void CommentPress.common.DOM.location_reset()):void(t.match("#respond")&&(comment_form=e("#respond"),comment_form.length&&("0"==cp_is_mobile||"1"==cp_is_tablet)&&e(window).stop(!0).scrollTo(comment_form,{duration:cp_scroll_speed,axis:"y",offset:CommentPress.theme.header.get_offset()}),CommentPress.common.DOM.location_reset()))},this.workflow_tabs=function(t,n){e("#literal .post").css("display","none"),e("#original .post").css("display","none"),e("#container").on("click","#content-tabs li h2 a",function(i){var o;i.preventDefault(),o=this.href.split("#")[1],e(".post").css("display","none"),e(".workflow-wrapper").css("min-height","0"),e(".workflow-wrapper").css("padding-bottom","0"),e("#"+o+".workflow-wrapper").css("min-height",t),e("#"+o+".workflow-wrapper").css("padding-bottom",n),e("#"+o+" .post").css("display","block"),e("#content-tabs li").removeClass("default-content-tab"),e(this).parent().parent().addClass("default-content-tab")})}},CommentPress.common.comments=new function(){var t=this,e=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){t.header(),t.minimiser(),t.comment_block_permalinks(),t.comment_permalinks(),t.comment_permalink_show()},this.header=function(){e("#sidebar").on("click","#comments_header h2 a",function(t){t.preventDefault(),CommentPress.theme.sidebars.activate_sidebar("comments")})},this.minimiser=function(){e("#sidebar").on("click","#cp_minimise_all_comments",function(t){t.preventDefault(),e("#comments_sidebar div.paragraph_wrapper").slideUp(),e.unhighlight_para()})},this.comment_block_permalinks=function(){"1"!=cp_special_page&&(e("a.comment_block_permalink").css("cursor","pointer"),e("#comments_sidebar").on("click","a.comment_block_permalink",function(n){var i,o,s,r,a,c,m,p,_,l;return n.preventDefault(),CommentPress.settings.textblock.set_scroll_target("para_heading"),e(document).trigger("commentpress-comment-block-permalink-pre-align"),"none"==CommentPress.settings.textblock.get_scroll_target()?void e(document).trigger("commentpress-comment-block-permalink-clicked"):(i=e(this).parent().prop("id").split("para_heading-")[1],o=e(this).parent().next("div.paragraph_wrapper"),s=e("#para_wrapper-"+i).find("ol.commentlist"),r=!1,a=o.css("display"),"none"==a&&(r=!0),"undefined"!=typeof i&&(""!==i&&"pingbacksandtrackbacks"!=i?(c=e("#textblock-"+i),r?(e.unhighlight_para(),e.highlight_para(c),CommentPress.common.content.scroll_page(c)):"0"==cp_promote_reading?e("#para_wrapper-"+i).find("#respond")[0]?e.unhighlight_para():s[0]||(e.unhighlight_para(),e.highlight_para(c),CommentPress.common.content.scroll_page(c)):e.is_highlighted(c)&&e.unhighlight_para()):(e.unhighlight_para(),"pingbacksandtrackbacks"!=i&&(CommentPress.theme.viewport.scroll_to_top(0,cp_scroll_speed),CommentPress.settings.page.toggle_highlight()))),"0"==cp_promote_reading&&"pingbacksandtrackbacks"!=i&&"y"==cp_comments_open&&(m=e("#comment_post_ID").prop("value"),p=e("#para_wrapper-"+i+" .reply_to_para").prop("id"),_=p.split("-")[1],l=e("#para_wrapper-"+i).find("#respond")[0],s.length>0&&s[0]?(r||l)&&addComment.moveFormToPara(_,i,m):(l||(o.css("display","none"),r=!0),addComment.moveFormToPara(_,i,m))),o.slideToggle("slow",function(){r&&t.scroll_comments(e("#para_heading-"+i),cp_scroll_speed)}),void e(document).trigger("commentpress-comment-block-permalink-clicked"))}))},this.comment_permalinks=function(){e("#wrapper").on("click",".comment_permalink",function(t){if("1"==cp_special_page){var n,i;t.preventDefault(),n=this.href.split("#")[1],i=CommentPress.theme.header.get_offset(),e(window).stop(!0).scrollTo(e("#"+n),{duration:cp_scroll_speed,axis:"y",offset:i,onAfter:function(){e(document).trigger("commentpress-comments-in-page-scrolled")}})}}),e("#comments_sidebar").on("click",".comment_permalink",function(n){var i,o;n.preventDefault(),i=this.href.split("#")[1],e.unhighlight_para(),o=e.get_text_sig_by_comment_id("#"+i),"pingbacksandtrackbacks"!=o&&CommentPress.common.content.scroll_page_to_textblock(o),t.scroll_comments(e("#"+i),cp_scroll_speed)})},this.comment_permalink_show=function(){e(".comment_permalink").tooltip({position:{my:"left bottom-20",at:"left top",using:function(t,n){e(this).css(t),e("<div>").addClass("arrow").addClass(n.vertical).addClass(n.horizontal).appendTo(this)}}}),e("#comments_sidebar, #wrapper").on("click",".comment_permalink",function(n){var i;i=e(this).attr("href"),i&&(CommentPress.common.DOM.location_set(i),e(document).bind("click",t.comment_permalink_handler))})},this.comment_permalink_handler=function(n){e(n.target).closest(".comment_permalink").length||(e(document).unbind("click",t.comment_permalink_handler),CommentPress.common.DOM.location_reset())},this.comment_rollovers=function(){e("#comments_sidebar").on("mouseenter",".comment-wrapper",function(t){e(this).addClass("background-highlight")}),e("#comments_sidebar").on("mouseleave",".comment-wrapper",function(t){e(this).removeClass("background-highlight")})},this.highlight=function(t){t.addClass("notransition"),t.hasClass("comment-fade")&&t.removeClass("comment-fade"),t.hasClass("comment-highlighted")&&t.removeClass("comment-highlighted"),t.addClass("comment-highlighted"),t.removeClass("notransition"),t.height(),t.addClass("comment-fade")},this.scroll_comments=function(n,i,o){switch(arguments.length){case 2:o="noflash";break;case 3:break;default:throw new Error("illegal argument count")}("0"==cp_is_mobile||"1"==cp_is_tablet)&&("flash"==o?e("#comments_sidebar .sidebar_contents_wrapper").stop(!0).scrollTo(n,{duration:i,axis:"y",onAfter:function(){t.highlight(n),e(document).trigger("commentpress-comments-scrolled")}}):e("#comments_sidebar .sidebar_contents_wrapper").stop(!0).scrollTo(n,{duration:i,onAfter:function(){e(document).trigger("commentpress-comments-scrolled")}}))}},CommentPress.common.activity=new function(){var t=this,e=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){t.header(),t.minimiser(),t.headings(),t.see_in_context_links()},this.header=function(){e("#sidebar").on("click","#activity_header h2 a",function(t){t.preventDefault(),CommentPress.theme.sidebars.activate_sidebar("activity")})},this.minimiser=function(){e("#sidebar").on("click","#cp_minimise_all_activity",function(t){t.preventDefault(),e("#activity_sidebar div.paragraph_wrapper").slideUp()})},this.headings=function(){e("h3.activity_heading").css("cursor","pointer"),e("#activity_sidebar").on("click","h3.activity_heading",function(t){var n;t.preventDefault(),n=e(this).next("div.paragraph_wrapper"),n.css("width",e(this).parent().css("width")),n.slideToggle("slow",function(){n.css("width","auto")})})},this.see_in_context_links=function(){"1"!=cp_special_page&&e("#activity_sidebar").on("click","a.comment_on_post",function(t){var n,i,o,s,r,a;t.preventDefault(),CommentPress.theme.sidebars.activate_sidebar("comments"),n=this.href.split("#")[1],i=e("#"+n),o=i.parents("div.paragraph_wrapper").map(function(){return this}),o.length>0&&(s=e(o[0]),s.show(),"1"==cp_special_page?(r=CommentPress.theme.header.get_offset(),e(window).stop(!0).scrollTo(i,{duration:cp_scroll_speed,axis:"y",offset:r})):(e.unhighlight_para(),a=s.prop("id").split("-")[1],CommentPress.common.content.scroll_page_to_textblock(a),e("#comments_sidebar .sidebar_contents_wrapper").stop(!0).scrollTo(i,{duration:cp_scroll_speed,axis:"y",onAfter:function(){CommentPress.common.comments.highlight(i)}})))})}},CommentPress.common.viewport=new function(){jQuery.noConflict();this.init=function(){},this.dom_ready=function(){}},function($){var highlighted_para="";$.highlight_para=function(t){"object"==typeof t&&t.addClass("selected_para")},$.unhighlight_para=function(){var t=$(".textblock");t.removeClass("selected_para")},$.get_highlighted_para=function(){return highlighted_para},$.is_highlighted=function(t){return"object"!=typeof t?!1:t.hasClass("selected_para")?!0:!1},$.in_array=function(t,e,n){var i,o=!1,s=!!n;for(i in e)if(s&&e[i]===t||!s&&e[i]==t){o=!0;break}return o},$.remove_from_array=function(t,e){for(var n=0;n<e.length;n++)if(t===e[n]){e.splice(n,1);break}return e},$.is_object=function(t){return t instanceof Array?!1:null!==t&&"object"==typeof t},$.is_function_defined=function(function_name){return eval("typeof("+function_name+") == typeof(Function)")?!0:!1},$.px_to_num=function(t){return parseInt(t.substring(0,t.length-2))},$.css_to_num=function(t){if(t&&""!=t){var e=parseFloat(t);return"NaN"==e.toString()?0:e}return 0},$.frivolous=function(t){alert(t)},$.get_current_menu_item_id=function(){var t,e,n,i,o=0;if(t=$(".current_page_item"),t.length>0)if(e=t.prop("id"),e.length>0)o=e.split("-")[2];else{i=t.prop("class"),n=i.split(" ");for(var s,r=0;s=n[r++];)if(s.match("page-item-")){o=s.split("-")[2];break}}return o},$.get_text_sig_by_comment_id=function(t){var e,n,i,o;return i="",t.match("#comment-")&&(e=parseInt(t.split("#comment-")[1])),n=$("#comment-"+e).parents("div.paragraph_wrapper").map(function(){return this}),n.length>0&&(o=$(n[0]),i=o.prop("id").split("-")[1]),i}}(jQuery),CommentPress.settings.DOM.init(),CommentPress.settings.page.init(),CommentPress.settings.textblock.init(),CommentPress.common.DOM.init(),CommentPress.common.navigation.init(),CommentPress.common.content.init(),CommentPress.common.comments.init(),CommentPress.common.activity.init(),jQuery(document).ready(function(t){CommentPress.settings.DOM.dom_ready(),CommentPress.settings.page.dom_ready(),CommentPress.settings.textblock.dom_ready(),CommentPress.common.DOM.dom_ready(),CommentPress.common.navigation.dom_ready(),CommentPress.common.content.dom_ready(),CommentPress.common.comments.dom_ready(),CommentPress.common.activity.dom_ready(),jQuery(document).trigger("commentpress-initialised")});1 var msie_detected=!1;if("undefined"!=typeof cp_msie&&(msie_detected=!0),"undefined"!=typeof CommentpressSettings){var cp_comments_open,cp_special_page,cp_tinymce,cp_tinymce_version,cp_promote_reading,cp_is_mobile,cp_is_touch,cp_is_tablet,cp_cookie_path,cp_multipage_page,cp_toc_chapter_is_page,cp_show_subpages,cp_default_sidebar,cp_is_signup_page,cp_scroll_speed,cp_min_page_width,cp_textblock_meta,cp_touch_testing;cp_comments_open=CommentpressSettings.cp_comments_open,cp_special_page=CommentpressSettings.cp_special_page,cp_tinymce=CommentpressSettings.cp_tinymce,cp_tinymce_version=CommentpressSettings.cp_tinymce_version,cp_promote_reading=CommentpressSettings.cp_promote_reading,cp_is_mobile=CommentpressSettings.cp_is_mobile,cp_is_touch=CommentpressSettings.cp_is_touch,cp_is_tablet=CommentpressSettings.cp_is_tablet,cp_touch_testing=CommentpressSettings.cp_touch_testing,cp_cookie_path=CommentpressSettings.cp_cookie_path,cp_multipage_page=CommentpressSettings.cp_multipage_page,cp_toc_chapter_is_page=CommentpressSettings.cp_toc_chapter_is_page,cp_show_subpages=CommentpressSettings.cp_show_subpages,cp_default_sidebar=CommentpressSettings.cp_default_sidebar,cp_is_signup_page=CommentpressSettings.cp_is_signup_page,cp_scroll_speed=CommentpressSettings.cp_js_scroll_speed,cp_min_page_width=CommentpressSettings.cp_min_page_width,cp_textblock_meta=CommentpressSettings.cp_textblock_meta}var CommentPress=CommentPress||{};CommentPress.settings={},CommentPress.settings.DOM=new function(){{var t=this;jQuery.noConflict()}this.init=function(){t.init_wp_adminbar(),t.init_bp_adminbar(),t.init_wp_adminbar_height()},this.dom_ready=function(){},this.original_permalink=document.location.toString(),"undefined"!=typeof CommentpressSettings&&""!=CommentpressSettings.cp_permalink&&(this.original_permalink=CommentpressSettings.cp_permalink),this.set_permalink=function(t){this.original_permalink=t},this.get_permalink=function(){return this.original_permalink},this.bp_adminbar="n",this.init_bp_adminbar=function(t){"undefined"!=typeof CommentpressSettings&&(this.bp_adminbar=CommentpressSettings.cp_bp_adminbar)},this.set_bp_adminbar=function(t){this.bp_adminbar=t},this.get_bp_adminbar=function(){return this.bp_adminbar},this.wp_adminbar="n",this.init_wp_adminbar=function(t){"undefined"!=typeof CommentpressSettings&&(this.wp_adminbar=CommentpressSettings.cp_wp_adminbar)},this.set_wp_adminbar=function(t){this.wp_adminbar=t},this.get_wp_adminbar=function(){return this.wp_adminbar},this.wp_adminbar_height=0,this.init_wp_adminbar_height=function(e){"undefined"!=typeof CommentpressSettings&&(this.wp_adminbar_height=parseInt(CommentpressSettings.cp_wp_adminbar_height)),"y"==t.get_bp_adminbar()&&(this.wp_adminbar_height=25,t.set_wp_adminbar("y"))},this.set_wp_adminbar_height=function(t){this.wp_adminbar_height=t},this.get_wp_adminbar_height=function(){return this.wp_adminbar_height},this.wp_adminbar_height=0,this.init_wp_adminbar_expanded=function(t){"undefined"!=typeof CommentpressSettings&&(this.wp_adminbar_expanded=parseInt(CommentpressSettings.cp_wp_adminbar_expanded))},this.set_wp_adminbar_expanded=function(t){this.wp_adminbar_expanded=t},this.get_wp_adminbar_expanded=function(){return this.wp_adminbar_expanded}},CommentPress.settings.page=new function(){jQuery.noConflict();this.init=function(){},this.dom_ready=function(){},this.highlight=!1,this.toggle_highlight=function(){this.highlight=!this.highlight},this.set_highlight=function(t){this.highlight=t},this.get_highlight=function(){return this.highlight}},CommentPress.settings.textblock=new function(){jQuery.noConflict();this.init=function(){},this.dom_ready=function(){},this.scroll_target="para_heading",this.set_scroll_target=function(t){this.scroll_target=t},this.get_scroll_target=function(){return this.scroll_target},this.permalink_shown=!1,this.set_permalink_shown=function(t){this.permalink_shown=t},this.get_permalink_shown=function(){return this.permalink_shown}},CommentPress.common={},CommentPress.common.DOM=new function(){jQuery.noConflict();this.init=function(){},this.dom_ready=function(){},this.location_set=function(t){window.history&&window.history.replaceState&&window.history.replaceState({},"",t)},this.location_reset=function(){window.history&&window.history.replaceState&&window.history.replaceState({},"",CommentPress.settings.DOM.get_permalink())}},CommentPress.common.navigation=new function(){var t=this,e=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){t.headings(),t.menu()},this.headings=function(){e("h3.activity_heading").css("cursor","pointer"),e("#toc_sidebar").on("click","h3.activity_heading",function(t){var n;t.preventDefault(),n=e(this).next("div.paragraph_wrapper"),n.css("width",e(this).parent().css("width")),n.slideToggle("slow",function(){n.css("width","auto")})})},this.menu=function(){e("#toc_sidebar").on("click","ul#toc_list li a",function(t){if("0"==cp_toc_chapter_is_page){var n;n=e(this).parent().find("ul"),n.length>0&&("0"==cp_show_subpages&&e(this).next("ul").slideToggle(),t.preventDefault())}})}},CommentPress.common.content=new function(){var t=this,e=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){t.title_links(),t.textblocks(),t.para_markers(),t.textblock_permalink_show(),t.comment_icons(),t.links_in_textblocks(),t.footnotes_compatibility()},this.title_links=function(){e("#container").on("click",".post_title a",function(t){t.preventDefault();var n="";CommentPress.settings.textblock.set_scroll_target("para_heading"),e(document).trigger("commentpress-post-title-pre-align"),CommentPress.theme.viewport.align_content(n,CommentPress.settings.textblock.get_scroll_target()),e(document).trigger("commentpress-post-title-clicked")})},this.textblocks=function(){"0"==cp_is_mobile&&"0"==cp_textblock_meta&&(e("#container").on("mouseover",".textblock",function(t){e(this).addClass("textblock-in")}),e("#container").on("mouseout",".textblock",function(t){e(this).removeClass("textblock-in")})),e("#container").on("click",".textblock",function(t){var n;n=e(this).prop("id"),n=n.split("textblock-")[1],CommentPress.settings.textblock.set_scroll_target("para_heading"),e(document).trigger("commentpress-post-title-clicked"),e(document).trigger("commentpress-textblock-pre-align"),CommentPress.theme.viewport.align_content(n,CommentPress.settings.textblock.get_scroll_target()),e(document).trigger("commentpress-textblock-clicked")})},this.para_markers=function(){e("#container").on("click","span.para_marker a",function(t){t.preventDefault(),e(document).trigger("commentpress-paramarker-clicked")}),e("#container").on("mouseenter","span.para_marker a",function(t){var n;n=e(this).parent().next().children(".comment_count"),n.addClass("js-hover")}),e("#container").on("mouseleave","span.para_marker a",function(t){var n;n=e(this).parent().next().children(".comment_count"),n.removeClass("js-hover")})},this.textblock_permalink_show=function(){e(".textblock_permalink").tooltip({position:{my:"left-30 bottom-20",at:"left top",using:function(t,n){e(this).css(t),e("<div>").addClass("arrow").addClass(n.vertical).addClass(n.horizontal).appendTo(this)}}}),e("#wrapper").on("click",".textblock_permalink",function(n){var i;i=e(this).attr("href"),i&&(CommentPress.common.DOM.location_set(i),CommentPress.settings.textblock.set_permalink_shown(!0),e(document).bind("click",t.textblock_permalink_handler))}),e(document).on("commentpress-textblock-click commentpress-comment-block-permalink-clicked commentpress-commenticonbox-clicked commentpress-link-in-textblock-clicked",function(n){CommentPress.settings.textblock.get_permalink_shown()&&(e(document).unbind("click",t.textblock_permalink_handler),CommentPress.settings.textblock.set_permalink_shown(!1),CommentPress.common.DOM.location_reset())})},this.textblock_permalink_handler=function(n){e(n.target).closest(".textblock_permalink").length||(e(document).unbind("click",t.textblock_permalink_handler),CommentPress.settings.textblock.set_permalink_shown(!1),CommentPress.common.DOM.location_reset())},this.comment_icons=function(){e("#container").on("click",".commenticonbox",function(t){var n;t.preventDefault(),t.stopPropagation(),n=e(this).children("a.para_permalink").prop("href").split("#")[1],CommentPress.settings.textblock.set_scroll_target("commentform"),e(document).trigger("commentpress-commenticonbox-pre-align"),CommentPress.theme.viewport.align_content(n,CommentPress.settings.textblock.get_scroll_target()),e(document).trigger("commentpress-commenticonbox-clicked")}),e("#container").on("click","a.para_permalink",function(t){t.preventDefault()}),e("#container").on("mouseenter","a.para_permalink",function(t){var n;n=e(this).prop("href").split("#")[1],e("span.para_marker a#"+n).addClass("js-hover")}),e("#container").on("mouseleave","a.para_permalink",function(t){var n;n=e(this).prop("href").split("#")[1],e("span.para_marker a#"+n).removeClass("js-hover")})},this.links_in_textblocks=function(){e("#container").on("click","a.cp_para_link",function(t){var n;t.preventDefault(),t.stopPropagation(),n=e(this).prop("href").split("#")[1],CommentPress.settings.textblock.set_scroll_target("commentform"),e(document).trigger("commentpress-link-in-textblock-pre-align"),CommentPress.theme.viewport.align_content(n,CommentPress.settings.textblock.get_scroll_target()),e(document).trigger("commentpress-link-in-textblock-clicked")})},this.footnotes_compatibility=function(){e("#container").on("click","span.footnotereverse a, a.footnote-back-link",function(n){var i;n.preventDefault(),n.stopPropagation(),i=e(this).prop("href").split("#")[1],t.quick_scroll_page("#"+i,100)}),e("#container").on("click",".simple-footnotes ol li > a",function(n){var i;i=e(this).prop("href"),i.match("#return-note-")&&(n.preventDefault(),n.stopPropagation(),i=i.split("#")[1],t.quick_scroll_page("#"+i,100))}),e("#container").on("click","a.simple-footnote, sup.footnote a, sup a.footnote-identifier-link, a.zp-ZotpressInText",function(n){var i;n.preventDefault(),n.stopPropagation(),i=e(this).prop("href").split("#")[1],t.quick_scroll_page("#"+i,100)})},this.scroll_page=function(t){"undefined"!=typeof t&&("0"==cp_is_mobile||"1"==cp_is_tablet)&&e(window).stop(!0).scrollTo(t,{duration:1.5*cp_scroll_speed,axis:"y",offset:CommentPress.theme.header.get_offset()})},this.quick_scroll_page=function(t,n){"undefined"!=typeof t&&("0"==cp_is_mobile||"1"==cp_is_tablet)&&e(window).stop(!0).scrollTo(t,{duration:1.5*n,axis:"y",offset:CommentPress.theme.header.get_offset()})},this.scroll_page_to_textblock=function(n){var i;""!==n?(i=e("#textblock-"+n),e.highlight_para(i),t.scroll_page(i)):(CommentPress.settings.page.toggle_highlight()||CommentPress.theme.viewport.scroll_to_top(0,cp_scroll_speed),CommentPress.settings.page.toggle_highlight())},this.on_load_scroll_to_comment=function(){var t,n,i;return t=document.location.toString(),t.match("#comment-")?(n=t.split("#comment-")[1],i=e("#comment-"+n),i.length&&("0"==cp_is_mobile||"1"==cp_is_tablet)&&e(window).stop(!0).scrollTo(i,{duration:cp_scroll_speed,axis:"y",offset:CommentPress.theme.header.get_offset()}),void CommentPress.common.DOM.location_reset()):void(t.match("#respond")&&(comment_form=e("#respond"),comment_form.length&&("0"==cp_is_mobile||"1"==cp_is_tablet)&&e(window).stop(!0).scrollTo(comment_form,{duration:cp_scroll_speed,axis:"y",offset:CommentPress.theme.header.get_offset()}),CommentPress.common.DOM.location_reset()))},this.workflow_tabs=function(t,n){e("#literal .post").css("display","none"),e("#original .post").css("display","none"),e("#container").on("click","#content-tabs li h2 a",function(i){var o;i.preventDefault(),o=this.href.split("#")[1],e(".post").css("display","none"),e(".workflow-wrapper").css("min-height","0"),e(".workflow-wrapper").css("padding-bottom","0"),e("#"+o+".workflow-wrapper").css("min-height",t),e("#"+o+".workflow-wrapper").css("padding-bottom",n),e("#"+o+" .post").css("display","block"),e("#content-tabs li").removeClass("default-content-tab"),e(this).parent().parent().addClass("default-content-tab")})}},CommentPress.common.comments=new function(){var t=this,e=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){t.header(),t.minimiser(),t.comment_block_permalinks(),t.comment_permalinks(),t.comment_permalink_show()},this.header=function(){e("#sidebar").on("click","#comments_header h2 a",function(t){t.preventDefault(),CommentPress.theme.sidebars.activate_sidebar("comments")})},this.minimiser=function(){e("#sidebar").on("click","#cp_minimise_all_comments",function(t){t.preventDefault(),e("#comments_sidebar div.paragraph_wrapper").slideUp(),e.unhighlight_para()})},this.comment_block_permalinks=function(){"1"!=cp_special_page&&(e("a.comment_block_permalink").css("cursor","pointer"),e("#comments_sidebar").on("click","a.comment_block_permalink",function(n){var i,o,s,r,a,c,m,p,_,l;return n.preventDefault(),CommentPress.settings.textblock.set_scroll_target("para_heading"),e(document).trigger("commentpress-comment-block-permalink-pre-align"),"none"==CommentPress.settings.textblock.get_scroll_target()?void e(document).trigger("commentpress-comment-block-permalink-clicked"):(i=e(this).parent().prop("id").split("para_heading-")[1],o=e(this).parent().next("div.paragraph_wrapper"),s=e("#para_wrapper-"+i).find("ol.commentlist"),r=!1,a=o.css("display"),"none"==a&&(r=!0),"undefined"!=typeof i&&(""!==i&&"pingbacksandtrackbacks"!=i?(c=e("#textblock-"+i),r?(e.unhighlight_para(),e.highlight_para(c),CommentPress.common.content.scroll_page(c)):"0"==cp_promote_reading?e("#para_wrapper-"+i).find("#respond")[0]?e.unhighlight_para():s[0]||(e.unhighlight_para(),e.highlight_para(c),CommentPress.common.content.scroll_page(c)):e.is_highlighted(c)&&e.unhighlight_para()):(e.unhighlight_para(),"pingbacksandtrackbacks"!=i&&(CommentPress.theme.viewport.scroll_to_top(0,cp_scroll_speed),CommentPress.settings.page.toggle_highlight()))),"0"==cp_promote_reading&&"pingbacksandtrackbacks"!=i&&"y"==cp_comments_open&&(m=e("#comment_post_ID").prop("value"),p=e("#para_wrapper-"+i+" .reply_to_para").prop("id"),_=p.split("-")[1],l=e("#para_wrapper-"+i).find("#respond")[0],s.length>0&&s[0]?(r||l)&&addComment.moveFormToPara(_,i,m):(l||(o.css("display","none"),r=!0),addComment.moveFormToPara(_,i,m))),o.slideToggle("slow",function(){r&&t.scroll_comments(e("#para_heading-"+i),cp_scroll_speed)}),void e(document).trigger("commentpress-comment-block-permalink-clicked"))}))},this.comment_permalinks=function(){e("#wrapper").on("click",".comment_permalink",function(t){if("1"==cp_special_page){var n,i;t.preventDefault(),n=this.href.split("#")[1],i=CommentPress.theme.header.get_offset(),e(window).stop(!0).scrollTo(e("#"+n),{duration:cp_scroll_speed,axis:"y",offset:i,onAfter:function(){e(document).trigger("commentpress-comments-in-page-scrolled")}})}}),e("#comments_sidebar").on("click",".comment_permalink",function(n){var i,o;n.preventDefault(),i=this.href.split("#")[1],e.unhighlight_para(),o=e.get_text_sig_by_comment_id("#"+i),"pingbacksandtrackbacks"!=o&&CommentPress.common.content.scroll_page_to_textblock(o),t.scroll_comments(e("#"+i),cp_scroll_speed)})},this.comment_permalink_show=function(){e(".comment_permalink").tooltip({position:{my:"left bottom-20",at:"left top",using:function(t,n){e(this).css(t),e("<div>").addClass("arrow").addClass(n.vertical).addClass(n.horizontal).appendTo(this)}}}),e("#comments_sidebar, #wrapper").on("click",".comment_permalink",function(n){var i;i=e(this).attr("href"),i&&(CommentPress.common.DOM.location_set(i),e(document).bind("click",t.comment_permalink_handler))})},this.comment_permalink_handler=function(n){e(n.target).closest(".comment_permalink").length||(e(document).unbind("click",t.comment_permalink_handler),CommentPress.common.DOM.location_reset())},this.comment_rollovers=function(){e("#comments_sidebar").on("mouseenter",".comment-wrapper",function(t){e(this).addClass("background-highlight")}),e("#comments_sidebar").on("mouseleave",".comment-wrapper",function(t){e(this).removeClass("background-highlight")})},this.highlight=function(t){t.addClass("notransition"),t.hasClass("comment-fade")&&t.removeClass("comment-fade"),t.hasClass("comment-highlighted")&&t.removeClass("comment-highlighted"),t.addClass("comment-highlighted"),t.removeClass("notransition"),t.height(),t.addClass("comment-fade")},this.scroll_comments=function(n,i,o){switch(arguments.length){case 2:o="noflash";break;case 3:break;default:throw new Error("illegal argument count")}("0"==cp_is_mobile||"1"==cp_is_tablet)&&("flash"==o?e("#comments_sidebar .sidebar_contents_wrapper").stop(!0).scrollTo(n,{duration:i,axis:"y",onAfter:function(){t.highlight(n),e(document).trigger("commentpress-comments-scrolled")}}):e("#comments_sidebar .sidebar_contents_wrapper").stop(!0).scrollTo(n,{duration:i,onAfter:function(){e(document).trigger("commentpress-comments-scrolled")}}))}},CommentPress.common.activity=new function(){var t=this,e=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){t.header(),t.minimiser(),t.headings(),t.see_in_context_links()},this.header=function(){e("#sidebar").on("click","#activity_header h2 a",function(t){t.preventDefault(),CommentPress.theme.sidebars.activate_sidebar("activity")})},this.minimiser=function(){e("#sidebar").on("click","#cp_minimise_all_activity",function(t){t.preventDefault(),e("#activity_sidebar div.paragraph_wrapper").slideUp()})},this.headings=function(){e("h3.activity_heading").css("cursor","pointer"),e("#activity_sidebar").on("click","h3.activity_heading",function(t){var n;t.preventDefault(),n=e(this).next("div.paragraph_wrapper"),n.css("width",e(this).parent().css("width")),n.slideToggle("slow",function(){n.css("width","auto")})})},this.see_in_context_links=function(){"1"!=cp_special_page&&e("#activity_sidebar").on("click","a.comment_on_post",function(t){var n,i,o,s,r,a;t.preventDefault(),CommentPress.theme.sidebars.activate_sidebar("comments"),n=this.href.split("#")[1],i=e("#"+n),o=i.parents("div.paragraph_wrapper").map(function(){return this}),o.length>0&&(s=e(o[0]),s.show(),"1"==cp_special_page?(r=CommentPress.theme.header.get_offset(),e(window).stop(!0).scrollTo(i,{duration:cp_scroll_speed,axis:"y",offset:r})):(e.unhighlight_para(),a=s.prop("id").split("-")[1],CommentPress.common.content.scroll_page_to_textblock(a),e("#comments_sidebar .sidebar_contents_wrapper").stop(!0).scrollTo(i,{duration:cp_scroll_speed,axis:"y",onAfter:function(){CommentPress.common.comments.highlight(i)}})))})}},CommentPress.common.viewport=new function(){jQuery.noConflict();this.init=function(){},this.dom_ready=function(){}},function($){var highlighted_para="";$.highlight_para=function(t){"object"==typeof t&&t.addClass("selected_para")},$.unhighlight_para=function(){var t=$(".textblock");t.removeClass("selected_para")},$.get_highlighted_para=function(){return highlighted_para},$.is_highlighted=function(t){return"object"!=typeof t?!1:t.hasClass("selected_para")?!0:!1},$.in_array=function(t,e,n){var i,o=!1,s=!!n;for(i in e)if(s&&e[i]===t||!s&&e[i]==t){o=!0;break}return o},$.remove_from_array=function(t,e){for(var n=0;n<e.length;n++)if(t===e[n]){e.splice(n,1);break}return e},$.is_object=function(t){return t instanceof Array?!1:null!==t&&"object"==typeof t},$.is_function_defined=function(function_name){return eval("typeof("+function_name+") == typeof(Function)")?!0:!1},$.px_to_num=function(t){return parseInt(t.substring(0,t.length-2))},$.css_to_num=function(t){if(t&&""!=t){var e=parseFloat(t);return"NaN"==e.toString()?0:e}return 0},$.frivolous=function(t){alert(t)},$.get_current_menu_item_id=function(){var t,e,n,i,o=0;if(t=$(".current_page_item"),t.length>0)if(e=t.prop("id"),e.length>0)o=e.split("-")[2];else{i=t.prop("class"),n=i.split(" ");for(var s,r=0;s=n[r++];)if(s.match("page-item-")){o=s.split("-")[2];break}}return o},$.get_text_sig_by_comment_id=function(t){var e,n,i,o;return i="",t.match("#comment-")&&(e=parseInt(t.split("#comment-")[1])),n=$("#comment-"+e).parents("div.paragraph_wrapper").map(function(){return this}),n.length>0&&(o=$(n[0]),i=o.prop("id").split("-")[1]),i}}(jQuery),CommentPress.settings.DOM.init(),CommentPress.settings.page.init(),CommentPress.settings.textblock.init(),CommentPress.common.DOM.init(),CommentPress.common.navigation.init(),CommentPress.common.content.init(),CommentPress.common.comments.init(),CommentPress.common.activity.init(),jQuery(document).ready(function(t){CommentPress.settings.DOM.dom_ready(),CommentPress.settings.page.dom_ready(),CommentPress.settings.textblock.dom_ready(),CommentPress.common.DOM.dom_ready(),CommentPress.common.navigation.dom_ready(),CommentPress.common.content.dom_ready(),CommentPress.common.comments.dom_ready(),CommentPress.common.activity.dom_ready(),jQuery(document).trigger("commentpress-initialised")}); -
commentpress-core/trunk/commentpress-core/class_commentpress_db.php
r1189714 r1218118 522 522 // add the column, if not already there 523 523 $result = maybe_add_column( 524 525 524 $wpdb->comments, 526 525 'comment_signature', 527 526 "ALTER TABLE `$wpdb->comments` ADD `comment_signature` VARCHAR(255) NULL;" 528 529 527 ); 530 528 … … 3619 3617 // init options array 3620 3618 $this->commentpress_options = array( 3621 3622 3619 'cp_show_posts_or_pages_in_toc' => $this->toc_content, 3623 3620 'cp_toc_chapter_is_page' => $this->toc_chapter_is_page, … … 3638 3635 'cp_featured_images' => $this->featured_images, 3639 3636 'cp_textblock_meta' => $this->textblock_meta, 3640 3641 3637 ); 3642 3638 -
commentpress-core/trunk/commentpress-core/class_commentpress_display.php
r1189714 r1218118 382 382 // add our javascript script and dependencies 383 383 wp_enqueue_script( 384 385 384 'commentpress_custom_quicktags', 386 385 plugin_dir_url( COMMENTPRESS_PLUGIN_FILE ) . 'commentpress-core/assets/js/cp_quicktags_3.3.js', … … 388 387 COMMENTPRESS_VERSION, // version 389 388 true // in footer 390 391 389 ); 392 390 … … 395 393 // add our javascript script and dependencies 396 394 wp_enqueue_script( 397 398 395 'commentpress_custom_quicktags', 399 396 plugin_dir_url( COMMENTPRESS_PLUGIN_FILE ) . 'commentpress-core/assets/js/cp_quicktags.js', … … 401 398 COMMENTPRESS_VERSION, // version 402 399 false // not in footer (but may need to be in WP 3.3) 403 404 400 ); 405 401 … … 419 415 // add jQuery UI stylesheet -> needed for resizable columns 420 416 wp_enqueue_style( 421 422 417 'cp_jquery_ui_base', 423 418 plugins_url( 'commentpress-core/assets/css/jquery.ui.css', COMMENTPRESS_PLUGIN_FILE ), … … 425 420 COMMENTPRESS_VERSION, // version 426 421 'all' // media 427 428 422 ); 429 423 … … 781 775 // set list pages defaults 782 776 $args = array( 783 784 777 'sort_column' => 'menu_order, post_title', 785 778 'menu_class' => 'menu', … … 790 783 'link_before' => '', 791 784 'link_after' => '' 792 793 785 ); 794 786 */ … … 799 791 // try and use it 800 792 wp_nav_menu( array( 801 802 793 'theme_location' => 'toc', 803 794 'echo' => true, 804 795 'container' => '', 805 796 'items_wrap' => '%3$s', 806 807 797 ) ); 808 798 … … 857 847 // set list pages defaults 858 848 $defaults = array( 859 860 849 'depth' => $depth, 861 850 'show_date' => '', … … 869 858 'link_before' => '', 870 859 'link_after' => '', 871 'exclude_tree' => '' 872 860 'exclude_tree' => '', 873 861 ); 874 862 … … 926 914 927 915 // define title text 928 $title_text = sprintf( _n( 929 930 // singular 931 'There is %d comment written for this paragraph', 932 933 // plural 934 'There are %d comments written for this paragraph', 935 936 // number 937 $comment_count, 938 939 // domain 940 'commentpress-core' 941 942 // substitution 943 ), $comment_count ); 916 $title_text = sprintf( 917 _n( 918 'There is %d comment written for this paragraph', // singular 919 'There are %d comments written for this paragraph', // plural 920 $comment_count, // number 921 'commentpress-core' // domain 922 ), 923 $comment_count // substitution 924 ); 944 925 945 926 // define add comment text 946 $add_text = sprintf( _n( 947 948 // singular 949 'Leave a comment on paragraph %d', 950 951 // plural 952 'Leave a comment on paragraph %d', 953 954 // number 955 $para_num, 956 957 // domain 958 'commentpress-core' 959 960 // substitution 961 ), $para_num ); 927 $add_text = sprintf( 928 _n( 929 'Leave a comment on paragraph %d', // singular 930 'Leave a comment on paragraph %d', // plural 931 $para_num, // number 932 'commentpress-core' // domain 933 ), 934 $para_num // substitution 935 ); 962 936 963 937 break; … … 969 943 970 944 // define title text 971 $title_text = sprintf( _n( 972 973 // singular 974 'There is %d comment written for this line', 975 976 // plural 977 'There are %d comments written for this line', 978 979 // number 980 $comment_count, 981 982 // domain 983 'commentpress-core' 984 985 // substitution 986 ), $comment_count ); 945 $title_text = sprintf( 946 _n( 947 'There is %d comment written for this line', // singular 948 'There are %d comments written for this line', // plural 949 $comment_count, // number 950 'commentpress-core' // domain 951 ), 952 $comment_count // substitution 953 ); 987 954 988 955 // define add comment text 989 $add_text = sprintf( _n( 990 991 // singular 992 'Leave a comment on line %d', 993 994 // plural 995 'Leave a comment on line %d', 996 997 // number 998 $para_num, 999 1000 // domain 1001 'commentpress-core' 1002 1003 // substitution 1004 ), $para_num ); 956 $add_text = sprintf( 957 _n( 958 'Leave a comment on line %d', // singular 959 'Leave a comment on line %d', // plural 960 $para_num, // number 961 'commentpress-core' // domain 962 ), 963 $para_num // substitution 964 ); 1005 965 1006 966 break; … … 1013 973 1014 974 // define title text 1015 $title_text = sprintf( _n( 1016 1017 // singular 1018 'There is %d comment written for this block', 1019 1020 // plural 1021 'There are %d comments written for this block', 1022 1023 // number 1024 $comment_count, 1025 1026 // domain 1027 'commentpress-core' 1028 1029 // substitution 1030 ), $comment_count ); 975 $title_text = sprintf( 976 _n( 977 'There is %d comment written for this block', // singular 978 'There are %d comments written for this block', // plural 979 $comment_count, // number 980 'commentpress-core' // domain 981 ), 982 $comment_count // substitution 983 ); 1031 984 1032 985 // define add comment text 1033 $add_text = sprintf( _n( 1034 1035 // singular 1036 'Leave a comment on block %d', 1037 1038 // plural 1039 'Leave a comment on block %d', 1040 1041 // number 1042 $para_num, 1043 1044 // domain 1045 'commentpress-core' 1046 1047 // substitution 1048 ), $para_num ); 986 $add_text = sprintf( 987 _n( 988 'Leave a comment on block %d', // singular 989 'Leave a comment on block %d', // plural 990 $para_num, // number 991 'commentpress-core' // domain 992 ), 993 $para_num // substitution 994 ); 1049 995 1050 996 break; … … 1093 1039 1094 1040 // define permalink text 1095 $permalink_text = sprintf( _n( 1096 1097 // singular 1098 'Permalink for paragraph %d', 1099 1100 // plural 1101 'Permalink for paragraph %d', 1102 1103 // number 1104 $para_num, 1105 1106 // domain 1107 'commentpress-core' 1108 1109 // substitution 1110 ), $para_num ); 1041 $permalink_text = sprintf( 1042 _n( 1043 'Permalink for paragraph %d', // singular 1044 'Permalink for paragraph %d', // plural 1045 $para_num, // number 1046 'commentpress-core' // domain 1047 ), 1048 $para_num // substitution 1049 ); 1111 1050 1112 1051 // define paragraph marker … … 1121 1060 1122 1061 // define permalink text 1123 $permalink_text = sprintf( _n( 1124 1125 // singular 1126 'Permalink for line %d', 1127 1128 // plural 1129 'Permalink for line %d', 1130 1131 // number 1132 $para_num, 1133 1134 // domain 1135 'commentpress-core' 1136 1137 // substitution 1138 ), $para_num ); 1062 $permalink_text = sprintf( 1063 _n( 1064 'Permalink for line %d', // singular 1065 'Permalink for line %d', // plural 1066 $para_num, // number 1067 'commentpress-core' // domain 1068 ), 1069 $para_num // substitution 1070 ); 1139 1071 1140 1072 // define paragraph marker … … 1150 1082 1151 1083 // define permalink text 1152 $permalink_text = sprintf( _n( 1153 1154 // singular 1155 'Permalink for block %d', 1156 1157 // plural 1158 'Permalink for block %d', 1159 1160 // number 1161 $para_num, 1162 1163 // domain 1164 'commentpress-core' 1165 1166 // substitution 1167 ), $para_num ); 1084 $permalink_text = sprintf( 1085 _n( 1086 'Permalink for block %d', // singular 1087 'Permalink for block %d', // plural 1088 $para_num, // number 1089 'commentpress-core' // domain 1090 ), 1091 $para_num // substitution 1092 ); 1168 1093 1169 1094 // define paragraph marker … … 1480 1405 // if there are options 1481 1406 if ( $upgrade != '' ) { 1482 1483 1407 $options_text = __( ' The following options have become available in the new version.', 'commentpress-core' ); 1484 1485 1408 } 1486 1409 -
commentpress-core/trunk/languages/commentpress-core.pot
r1197799 r1218118 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: CommentPress Core 3.8. 1\n"5 "Project-Id-Version: CommentPress Core 3.8.2\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/commentpress-core\n" 7 "POT-Creation-Date: 2015-0 7-13 09:46:52+00:00\n"7 "POT-Creation-Date: 2015-08-11 12:06:58+00:00\n" 8 8 "MIME-Version: 1.0\n" 9 9 "Content-Type: text/plain; charset=UTF-8\n" … … 68 68 #: commentpress-ajax/cp-ajax-comments.php:181 69 69 #: commentpress-core/class_commentpress.php:2576 70 #: commentpress-core/class_commentpress_display.php:1 86971 #: commentpress-core/class_commentpress_display.php:22 9470 #: commentpress-core/class_commentpress_display.php:1792 71 #: commentpress-core/class_commentpress_display.php:2217 72 72 #: themes/commentpress-modern/activity/index.php:120 73 73 #: themes/commentpress-modern/assets/templates/comments_sidebar.php:20 … … 113 113 #: commentpress-core/assets/includes/bp-compat/ajax.php:564 114 114 #: themes/commentpress-modern/activity/entry.php:104 115 #: themes/commentpress-modern/functions.php:27 6115 #: themes/commentpress-modern/functions.php:270 116 116 #: themes/commentpress-theme/activity/entry.php:104 117 117 msgid "Remove Favorite" … … 121 121 #: commentpress-core/assets/includes/bp-compat/ajax.php:562 122 122 #: themes/commentpress-modern/activity/entry.php:100 123 #: themes/commentpress-modern/functions.php:2 73123 #: themes/commentpress-modern/functions.php:267 124 124 #: themes/commentpress-theme/activity/entry.php:100 125 125 msgid "Favorite" … … 289 289 290 290 #: commentpress-core/assets/includes/theme/theme-functions.php:1008 291 #: commentpress-core/class_commentpress_display.php:63 9291 #: commentpress-core/class_commentpress_display.php:633 292 292 #: commentpress-multisite/class_commentpress_mu_bp.php:783 293 293 msgid " & " … … 296 296 #: commentpress-core/assets/includes/theme/theme-functions.php:1036 297 297 #: commentpress-core/assets/includes/theme/theme-functions.php:1052 298 #: commentpress-core/class_commentpress_display.php:66 9299 #: commentpress-core/class_commentpress_display.php:68 9298 #: commentpress-core/class_commentpress_display.php:663 299 #: commentpress-core/class_commentpress_display.php:683 300 300 #: themes/commentpress-modern/image.php:54 301 301 #: themes/commentpress-theme/author.php:138 … … 309 309 310 310 #: commentpress-core/assets/includes/theme/theme-functions.php:1131 311 #: commentpress-core/class_commentpress_display.php:7 40311 #: commentpress-core/class_commentpress_display.php:734 312 312 msgid "Posts by %s" 313 313 msgstr "" … … 341 341 #: commentpress-core/assets/includes/theme/theme-functions.php:1420 342 342 #: commentpress-core/class_commentpress.php:1603 343 #: commentpress-core/class_commentpress_db.php:332 7343 #: commentpress-core/class_commentpress_db.php:3325 344 344 msgid "Comments by Commenter" 345 345 msgstr "" … … 460 460 461 461 #: commentpress-core/assets/includes/theme/theme-functions.php:2826 462 #: themes/commentpress-modern/functions.php:8 60462 #: themes/commentpress-modern/functions.php:850 463 463 #: themes/commentpress-theme/functions.php:547 464 464 msgid "Next page" … … 466 466 467 467 #: commentpress-core/assets/includes/theme/theme-functions.php:2827 468 #: themes/commentpress-modern/functions.php:8 90468 #: themes/commentpress-modern/functions.php:880 469 469 #: themes/commentpress-theme/functions.php:575 470 470 msgid "Previous page" … … 475 475 msgstr "" 476 476 477 #: commentpress-core/assets/includes/theme/theme-functions.php:3 477477 #: commentpress-core/assets/includes/theme/theme-functions.php:3526 478 478 msgid "CommentPress Footer" 479 479 msgstr "" 480 480 481 #: commentpress-core/assets/includes/theme/theme-functions.php:3 479481 #: commentpress-core/assets/includes/theme/theme-functions.php:3528 482 482 msgid "An optional widget area in the page footer of the CommentPress theme" 483 483 msgstr "" 484 484 485 #: commentpress-core/assets/includes/theme/theme-functions.php:36 39485 #: commentpress-core/assets/includes/theme/theme-functions.php:3688 486 486 msgid "Newer version" 487 487 msgstr "" 488 488 489 #: commentpress-core/assets/includes/theme/theme-functions.php:3 676489 #: commentpress-core/assets/includes/theme/theme-functions.php:3725 490 490 msgid "Older version" 491 491 msgstr "" … … 500 500 501 501 #: commentpress-core/class_commentpress.php:416 502 #: commentpress-core/class_commentpress_display.php:1 525502 #: commentpress-core/class_commentpress_display.php:1448 503 503 #: commentpress-multisite/class_commentpress_mu_admin.php:959 504 504 #: commentpress-multisite/class_commentpress_mu_admin.php:1103 … … 537 537 538 538 #: commentpress-core/class_commentpress.php:991 539 #: commentpress-core/class_commentpress_display.php:1 622540 #: commentpress-core/class_commentpress_display.php:18 91539 #: commentpress-core/class_commentpress_display.php:1545 540 #: commentpress-core/class_commentpress_display.php:1814 541 541 msgid "Show page meta" 542 542 msgstr "" 543 543 544 544 #: commentpress-core/class_commentpress.php:992 545 #: commentpress-core/class_commentpress_display.php:1 623546 #: commentpress-core/class_commentpress_display.php:18 92545 #: commentpress-core/class_commentpress_display.php:1546 546 #: commentpress-core/class_commentpress_display.php:1815 547 547 msgid "Hide page meta" 548 548 msgstr "" … … 598 598 599 599 #: commentpress-core/class_commentpress.php:1581 600 #: commentpress-core/class_commentpress_db.php:315 9600 #: commentpress-core/class_commentpress_db.php:3157 601 601 #: themes/commentpress-modern/assets/templates/navigation.php:82 602 602 #: themes/commentpress-theme/assets/templates/navigation.php:213 … … 605 605 606 606 #: commentpress-core/class_commentpress.php:1586 607 #: commentpress-core/class_commentpress_db.php:327 6608 #: themes/commentpress-modern/functions.php:11 21607 #: commentpress-core/class_commentpress_db.php:3274 608 #: themes/commentpress-modern/functions.php:1111 609 609 #: themes/commentpress-theme/functions.php:804 610 610 msgid "All Comments" … … 612 612 613 613 #: commentpress-core/class_commentpress.php:1590 614 #: commentpress-core/class_commentpress_db.php:322 5614 #: commentpress-core/class_commentpress_db.php:3223 615 615 #: themes/commentpress-modern/comments-general.php:34 616 616 #: themes/commentpress-theme/comments-general.php:33 … … 619 619 620 620 #: commentpress-core/class_commentpress.php:1594 621 #: commentpress-core/class_commentpress_db.php:337 8621 #: commentpress-core/class_commentpress_db.php:3376 622 622 #: themes/commentpress-theme/assets/templates/navigation.php:76 623 623 msgid "Blog" … … 625 625 626 626 #: commentpress-core/class_commentpress.php:1599 627 #: commentpress-core/class_commentpress_db.php:343 2627 #: commentpress-core/class_commentpress_db.php:3430 628 628 msgid "Blog Archive" 629 629 msgstr "" … … 646 646 647 647 #: commentpress-core/class_commentpress.php:2574 648 #: commentpress-core/class_commentpress_display.php:1 867649 #: commentpress-core/class_commentpress_display.php:22 92648 #: commentpress-core/class_commentpress_display.php:1790 649 #: commentpress-core/class_commentpress_display.php:2215 650 650 #: themes/commentpress-modern/assets/templates/toc_sidebar.php:15 651 651 #: themes/commentpress-theme/sidebar.php:160 … … 654 654 655 655 #: commentpress-core/class_commentpress.php:2575 656 #: commentpress-core/class_commentpress_display.php:1 868657 #: commentpress-core/class_commentpress_display.php:22 93656 #: commentpress-core/class_commentpress_display.php:1791 657 #: commentpress-core/class_commentpress_display.php:2216 658 658 #: themes/commentpress-modern/sidebar.php:122 659 659 #: themes/commentpress-theme/sidebar.php:113 … … 665 665 msgstr "" 666 666 667 #: commentpress-core/class_commentpress_db.php:95 7667 #: commentpress-core/class_commentpress_db.php:955 668 668 #: commentpress-multisite/class_commentpress_mu_admin.php:406 669 669 msgid "You must supply an option to option_exists()" 670 670 msgstr "" 671 671 672 #: commentpress-core/class_commentpress_db.php:9 81672 #: commentpress-core/class_commentpress_db.php:979 673 673 #: commentpress-multisite/class_commentpress_mu_admin.php:430 674 674 msgid "You must supply an option to option_get()" 675 675 msgstr "" 676 676 677 #: commentpress-core/class_commentpress_db.php:100 5677 #: commentpress-core/class_commentpress_db.php:1003 678 678 #: commentpress-multisite/class_commentpress_mu_admin.php:454 679 679 msgid "You must supply an option to option_set()" 680 680 msgstr "" 681 681 682 #: commentpress-core/class_commentpress_db.php:101 3682 #: commentpress-core/class_commentpress_db.php:1011 683 683 #: commentpress-multisite/class_commentpress_mu_admin.php:462 684 684 msgid "You must supply the option as a string to option_set()" 685 685 msgstr "" 686 686 687 #: commentpress-core/class_commentpress_db.php:103 6687 #: commentpress-core/class_commentpress_db.php:1034 688 688 #: commentpress-multisite/class_commentpress_mu_admin.php:485 689 689 msgid "You must supply an option to option_delete()" 690 690 msgstr "" 691 691 692 #: commentpress-core/class_commentpress_db.php:105 9692 #: commentpress-core/class_commentpress_db.php:1057 693 693 msgid "You must supply an option to option_wp_exists()" 694 694 msgstr "" 695 695 696 #: commentpress-core/class_commentpress_db.php:109 3696 #: commentpress-core/class_commentpress_db.php:1091 697 697 msgid "You must supply an option to option_wp_get()" 698 698 msgstr "" 699 699 700 #: commentpress-core/class_commentpress_db.php:111 7700 #: commentpress-core/class_commentpress_db.php:1115 701 701 msgid "You must supply an option to option_wp_set()" 702 702 msgstr "" 703 703 704 #: commentpress-core/class_commentpress_db.php:307 9704 #: commentpress-core/class_commentpress_db.php:3077 705 705 msgid "Copy of " 706 706 msgstr "" 707 707 708 #: commentpress-core/class_commentpress_db.php:316 5708 #: commentpress-core/class_commentpress_db.php:3163 709 709 #: commentpress-multisite/class_commentpress_mu_ms.php:780 710 710 msgid "" … … 716 716 msgstr "" 717 717 718 #: commentpress-core/class_commentpress_db.php:32 31719 #: commentpress-core/class_commentpress_db.php:328 2720 #: commentpress-core/class_commentpress_db.php:333 3721 #: commentpress-core/class_commentpress_db.php:338 4722 #: commentpress-core/class_commentpress_db.php:343 8723 #: commentpress-core/class_commentpress_db.php:348 9718 #: commentpress-core/class_commentpress_db.php:3229 719 #: commentpress-core/class_commentpress_db.php:3280 720 #: commentpress-core/class_commentpress_db.php:3331 721 #: commentpress-core/class_commentpress_db.php:3382 722 #: commentpress-core/class_commentpress_db.php:3436 723 #: commentpress-core/class_commentpress_db.php:3487 724 724 msgid "Do not delete this page. Page content is generated with a custom template." 725 725 msgstr "" 726 726 727 #: commentpress-core/class_commentpress_db.php:348 3728 #: commentpress-core/class_commentpress_display.php:15 82727 #: commentpress-core/class_commentpress_db.php:3481 728 #: commentpress-core/class_commentpress_display.php:1505 729 729 #: themes/commentpress-modern/assets/templates/toc_dropdown.php:9 730 730 #: themes/commentpress-modern/assets/templates/toc_sidebar.php:68 731 #: themes/commentpress-modern/functions.php:12 5731 #: themes/commentpress-modern/functions.php:121 732 732 #: themes/commentpress-theme/assets/templates/toc_dropdown.php:9 733 733 #: themes/commentpress-theme/assets/templates/toc_sidebar.php:9 … … 760 760 msgstr "" 761 761 762 #: commentpress-core/class_commentpress_display.php:1 331762 #: commentpress-core/class_commentpress_display.php:1256 763 763 msgid "Minimise all Comment Sections" 764 764 msgstr "" 765 765 766 #: commentpress-core/class_commentpress_display.php:1 336766 #: commentpress-core/class_commentpress_display.php:1261 767 767 msgid "Minimise all Activity Sections" 768 768 msgstr "" 769 769 770 #: commentpress-core/class_commentpress_display.php:1 341770 #: commentpress-core/class_commentpress_display.php:1266 771 771 msgid "Minimise all Contents Sections" 772 772 msgstr "" 773 773 774 #: commentpress-core/class_commentpress_display.php:1 361774 #: commentpress-core/class_commentpress_display.php:1286 775 775 msgid "Minimise Header" 776 776 msgstr "" 777 777 778 #: commentpress-core/class_commentpress_display.php:14 83778 #: commentpress-core/class_commentpress_display.php:1407 779 779 msgid " The following options have become available in the new version." 780 780 msgstr "" 781 781 782 #: commentpress-core/class_commentpress_display.php:14 91782 #: commentpress-core/class_commentpress_display.php:1414 783 783 msgid "CommentPress Core Upgrade" 784 784 msgstr "" 785 785 786 #: commentpress-core/class_commentpress_display.php:1 501786 #: commentpress-core/class_commentpress_display.php:1424 787 787 msgid "Please upgrade CommentPress Core" 788 788 msgstr "" 789 789 790 #: commentpress-core/class_commentpress_display.php:1 503790 #: commentpress-core/class_commentpress_display.php:1426 791 791 msgid "It looks like you are running an older version of CommentPress Core." 792 792 msgstr "" 793 793 794 #: commentpress-core/class_commentpress_display.php:1 514794 #: commentpress-core/class_commentpress_display.php:1437 795 795 #: commentpress-multisite/class_commentpress_mu_admin.php:1095 796 796 msgid "Upgrade" 797 797 msgstr "" 798 798 799 #: commentpress-core/class_commentpress_display.php:1 560799 #: commentpress-core/class_commentpress_display.php:1483 800 800 msgid "When a supplied CommentPress theme (or a valid CommentPress child theme) is active, the following options modify its behaviour." 801 801 msgstr "" 802 802 803 #: commentpress-core/class_commentpress_display.php:1 566803 #: commentpress-core/class_commentpress_display.php:1489 804 804 #: commentpress-multisite/class_commentpress_mu_ms.php:537 805 805 msgid "Global Options" 806 806 msgstr "" 807 807 808 #: commentpress-core/class_commentpress_display.php:15 84808 #: commentpress-core/class_commentpress_display.php:1507 809 809 msgid "" 810 810 "Choose how you want your Table of Contents to appear and function.<br />\n" … … 812 812 msgstr "" 813 813 814 #: commentpress-core/class_commentpress_display.php:15 97814 #: commentpress-core/class_commentpress_display.php:1520 815 815 msgid "Page Display Options" 816 816 msgstr "" 817 817 818 #: commentpress-core/class_commentpress_display.php:1 602819 #: commentpress-core/class_commentpress_display.php:1 843818 #: commentpress-core/class_commentpress_display.php:1525 819 #: commentpress-core/class_commentpress_display.php:1766 820 820 msgid "Enable Featured Images (Note: if you have already implemented this in a child theme, you should choose \"No\")" 821 821 msgstr "" 822 822 823 #: commentpress-core/class_commentpress_display.php:1 604824 #: commentpress-core/class_commentpress_display.php:1 844823 #: commentpress-core/class_commentpress_display.php:1527 824 #: commentpress-core/class_commentpress_display.php:1767 825 825 #: themes/commentpress-modern/groups/single/admin.php:26 826 826 #: themes/commentpress-modern/registration/register.php:265 … … 830 830 msgstr "" 831 831 832 #: commentpress-core/class_commentpress_display.php:1 605833 #: commentpress-core/class_commentpress_display.php:1 845832 #: commentpress-core/class_commentpress_display.php:1528 833 #: commentpress-core/class_commentpress_display.php:1768 834 834 #: themes/commentpress-modern/groups/single/admin.php:27 835 835 #: themes/commentpress-modern/registration/register.php:266 … … 839 839 msgstr "" 840 840 841 #: commentpress-core/class_commentpress_display.php:1 611841 #: commentpress-core/class_commentpress_display.php:1534 842 842 msgid "Default page title visibility (can be overridden on individual pages)" 843 843 msgstr "" 844 844 845 #: commentpress-core/class_commentpress_display.php:1 613846 #: commentpress-core/class_commentpress_display.php: 2053845 #: commentpress-core/class_commentpress_display.php:1536 846 #: commentpress-core/class_commentpress_display.php:1976 847 847 msgid "Show page titles" 848 848 msgstr "" 849 849 850 #: commentpress-core/class_commentpress_display.php:1 614851 #: commentpress-core/class_commentpress_display.php: 2054850 #: commentpress-core/class_commentpress_display.php:1537 851 #: commentpress-core/class_commentpress_display.php:1977 852 852 msgid "Hide page titles" 853 853 msgstr "" 854 854 855 #: commentpress-core/class_commentpress_display.php:1 620855 #: commentpress-core/class_commentpress_display.php:1543 856 856 msgid "Default page meta visibility (can be overridden on individual pages)" 857 857 msgstr "" 858 858 859 #: commentpress-core/class_commentpress_display.php:1 631859 #: commentpress-core/class_commentpress_display.php:1554 860 860 msgid "Blog excerpt length" 861 861 msgstr "" 862 862 863 #: commentpress-core/class_commentpress_display.php:1 632863 #: commentpress-core/class_commentpress_display.php:1555 864 864 msgid "words" 865 865 msgstr "" 866 866 867 #: commentpress-core/class_commentpress_display.php:1 641867 #: commentpress-core/class_commentpress_display.php:1564 868 868 msgid "Commenting Options" 869 869 msgstr "" 870 870 871 #: commentpress-core/class_commentpress_display.php:1 655871 #: commentpress-core/class_commentpress_display.php:1578 872 872 msgid "Theme Customisation" 873 873 msgstr "" 874 874 875 #: commentpress-core/class_commentpress_display.php:1 657875 #: commentpress-core/class_commentpress_display.php:1580 876 876 msgid "" 877 877 "You can set a custom background colour in <em>Appearance → Background</em>.<br />\n" … … 880 880 msgstr "" 881 881 882 #: commentpress-core/class_commentpress_display.php:1 664883 #: commentpress-core/class_commentpress_display.php: 2074882 #: commentpress-core/class_commentpress_display.php:1587 883 #: commentpress-core/class_commentpress_display.php:1997 884 884 msgid "Header Background Colour" 885 885 msgstr "" 886 886 887 #: commentpress-core/class_commentpress_display.php:1 665888 #: commentpress-core/class_commentpress_display.php: 2075887 #: commentpress-core/class_commentpress_display.php:1588 888 #: commentpress-core/class_commentpress_display.php:1998 889 889 msgid "If you want to hide header text, add <strong>#blank</strong> as text colour." 890 890 msgstr "" 891 891 892 #: commentpress-core/class_commentpress_display.php:1 665893 #: commentpress-core/class_commentpress_display.php: 2076892 #: commentpress-core/class_commentpress_display.php:1588 893 #: commentpress-core/class_commentpress_display.php:1999 894 894 msgid "Select a Colour" 895 895 msgstr "" 896 896 897 #: commentpress-core/class_commentpress_display.php:1 669898 #: commentpress-core/class_commentpress_display.php:20 93897 #: commentpress-core/class_commentpress_display.php:1592 898 #: commentpress-core/class_commentpress_display.php:2016 899 899 msgid "Scroll speed" 900 900 msgstr "" 901 901 902 #: commentpress-core/class_commentpress_display.php:1 670903 #: commentpress-core/class_commentpress_display.php:20 94902 #: commentpress-core/class_commentpress_display.php:1593 903 #: commentpress-core/class_commentpress_display.php:2017 904 904 msgid "milliseconds" 905 905 msgstr "" 906 906 907 #: commentpress-core/class_commentpress_display.php:1 674908 #: commentpress-core/class_commentpress_display.php:2 111907 #: commentpress-core/class_commentpress_display.php:1597 908 #: commentpress-core/class_commentpress_display.php:2034 909 909 msgid "Minimum page width" 910 910 msgstr "" 911 911 912 #: commentpress-core/class_commentpress_display.php:1 675913 #: commentpress-core/class_commentpress_display.php:2 112912 #: commentpress-core/class_commentpress_display.php:1598 913 #: commentpress-core/class_commentpress_display.php:2035 914 914 msgid "pixels" 915 915 msgstr "" 916 916 917 #: commentpress-core/class_commentpress_display.php:1 718917 #: commentpress-core/class_commentpress_display.php:1641 918 918 #: commentpress-core/class_commentpress_formatter.php:108 919 919 msgid "Default Text Format" 920 920 msgstr "" 921 921 922 #: commentpress-core/class_commentpress_display.php:1 724922 #: commentpress-core/class_commentpress_display.php:1647 923 923 msgid " (can be overridden on individual pages)" 924 924 msgstr "" 925 925 926 #: commentpress-core/class_commentpress_display.php:1 772927 #: commentpress-core/class_commentpress_display.php:1 966926 #: commentpress-core/class_commentpress_display.php:1695 927 #: commentpress-core/class_commentpress_display.php:1889 928 928 #: commentpress-multisite/class_commentpress_mu_admin.php:734 929 929 #: commentpress-multisite/class_commentpress_mu_bp.php:1692 … … 932 932 msgstr "" 933 933 934 #: commentpress-core/class_commentpress_display.php:1 820935 #: commentpress-core/class_commentpress_display.php:2 355934 #: commentpress-core/class_commentpress_display.php:1743 935 #: commentpress-core/class_commentpress_display.php:2278 936 936 msgid "Show paragraph meta (Number and Comment Icon)" 937 937 msgstr "" 938 938 939 #: commentpress-core/class_commentpress_display.php:1 821940 #: commentpress-core/class_commentpress_display.php:2 357939 #: commentpress-core/class_commentpress_display.php:1744 940 #: commentpress-core/class_commentpress_display.php:2280 941 941 msgid "Always" 942 942 msgstr "" 943 943 944 #: commentpress-core/class_commentpress_display.php:1 822945 #: commentpress-core/class_commentpress_display.php:2 358944 #: commentpress-core/class_commentpress_display.php:1745 945 #: commentpress-core/class_commentpress_display.php:2281 946 946 msgid "On rollover" 947 947 msgstr "" 948 948 949 #: commentpress-core/class_commentpress_display.php:1 866950 #: commentpress-core/class_commentpress_display.php:22 91949 #: commentpress-core/class_commentpress_display.php:1789 950 #: commentpress-core/class_commentpress_display.php:2214 951 951 msgid "Which sidebar do you want to be active by default? (can be overridden on individual pages)" 952 952 msgstr "" 953 953 954 #: commentpress-core/class_commentpress_display.php:18 90954 #: commentpress-core/class_commentpress_display.php:1813 955 955 msgid "Show or hide page meta by default" 956 956 msgstr "" 957 957 958 #: commentpress-core/class_commentpress_display.php:1 921958 #: commentpress-core/class_commentpress_display.php:1844 959 959 msgid "Blog Type" 960 960 msgstr "" 961 961 962 #: commentpress-core/class_commentpress_display.php:19 87963 #: commentpress-core/class_commentpress_display.php:2 231962 #: commentpress-core/class_commentpress_display.php:1910 963 #: commentpress-core/class_commentpress_display.php:2154 964 964 msgid "Appearance of TOC for posts" 965 965 msgstr "" 966 966 967 #: commentpress-core/class_commentpress_display.php:19 88968 #: commentpress-core/class_commentpress_display.php:2 232967 #: commentpress-core/class_commentpress_display.php:1911 968 #: commentpress-core/class_commentpress_display.php:2155 969 969 msgid "Extended information" 970 970 msgstr "" 971 971 972 #: commentpress-core/class_commentpress_display.php:19 89973 #: commentpress-core/class_commentpress_display.php:2 233972 #: commentpress-core/class_commentpress_display.php:1912 973 #: commentpress-core/class_commentpress_display.php:2156 974 974 msgid "Just the title" 975 975 msgstr "" 976 976 977 #: commentpress-core/class_commentpress_display.php: 2009978 #: commentpress-core/class_commentpress_display.php:21 79977 #: commentpress-core/class_commentpress_display.php:1932 978 #: commentpress-core/class_commentpress_display.php:2102 979 979 msgid "Comment form editor" 980 980 msgstr "" 981 981 982 #: commentpress-core/class_commentpress_display.php: 2010983 #: commentpress-core/class_commentpress_display.php:21 80982 #: commentpress-core/class_commentpress_display.php:1933 983 #: commentpress-core/class_commentpress_display.php:2103 984 984 msgid "Rich-text Editor" 985 985 msgstr "" 986 986 987 #: commentpress-core/class_commentpress_display.php: 2011988 #: commentpress-core/class_commentpress_display.php:21 81987 #: commentpress-core/class_commentpress_display.php:1934 988 #: commentpress-core/class_commentpress_display.php:2104 989 989 msgid "Plain-text Editor" 990 990 msgstr "" 991 991 992 #: commentpress-core/class_commentpress_display.php: 2030993 #: commentpress-core/class_commentpress_display.php:21 83992 #: commentpress-core/class_commentpress_display.php:1953 993 #: commentpress-core/class_commentpress_display.php:2106 994 994 msgid "Default comment form behaviour" 995 995 msgstr "" 996 996 997 #: commentpress-core/class_commentpress_display.php: 2031998 #: commentpress-core/class_commentpress_display.php:21 84997 #: commentpress-core/class_commentpress_display.php:1954 998 #: commentpress-core/class_commentpress_display.php:2107 999 999 msgid "Promote reading" 1000 1000 msgstr "" 1001 1001 1002 #: commentpress-core/class_commentpress_display.php: 20321003 #: commentpress-core/class_commentpress_display.php:21 851002 #: commentpress-core/class_commentpress_display.php:1955 1003 #: commentpress-core/class_commentpress_display.php:2108 1004 1004 msgid "Promote commenting" 1005 1005 msgstr "" 1006 1006 1007 #: commentpress-core/class_commentpress_display.php: 20521007 #: commentpress-core/class_commentpress_display.php:1975 1008 1008 msgid "Show or hide page titles by default" 1009 1009 msgstr "" 1010 1010 1011 #: commentpress-core/class_commentpress_display.php:2 1541011 #: commentpress-core/class_commentpress_display.php:2077 1012 1012 msgid "Reset options to plugin defaults" 1013 1013 msgstr "" 1014 1014 1015 #: commentpress-core/class_commentpress_display.php:2 2231015 #: commentpress-core/class_commentpress_display.php:2146 1016 1016 msgid "Table of Contents contains" 1017 1017 msgstr "" 1018 1018 1019 #: commentpress-core/class_commentpress_display.php:2 2241019 #: commentpress-core/class_commentpress_display.php:2147 1020 1020 #: themes/commentpress-modern/activity/index.php:119 1021 1021 #: themes/commentpress-modern/forums/forums-loop.php:40 … … 1027 1027 msgstr "" 1028 1028 1029 #: commentpress-core/class_commentpress_display.php:2 2251030 #: commentpress-core/class_commentpress_display.php:2 2281029 #: commentpress-core/class_commentpress_display.php:2148 1030 #: commentpress-core/class_commentpress_display.php:2151 1031 1031 msgid "Pages" 1032 1032 msgstr "" 1033 1033 1034 #: commentpress-core/class_commentpress_display.php:2 2271034 #: commentpress-core/class_commentpress_display.php:2150 1035 1035 msgid "Chapters are" 1036 1036 msgstr "" 1037 1037 1038 #: commentpress-core/class_commentpress_display.php:2 2291038 #: commentpress-core/class_commentpress_display.php:2152 1039 1039 msgid "Headings" 1040 1040 msgstr "" 1041 1041 1042 #: commentpress-core/class_commentpress_display.php:2 3281042 #: commentpress-core/class_commentpress_display.php:2251 1043 1043 msgid "Enable \"live\" comment refreshing (Please note: may cause heavy load on your server)" 1044 1044 msgstr "" 1045 1045 1046 #: commentpress-core/class_commentpress_display.php:23 801046 #: commentpress-core/class_commentpress_display.php:2303 1047 1047 #: commentpress-multisite/class_commentpress_mu_admin.php:1088 1048 1048 #: commentpress-multisite/class_commentpress_mu_ms.php:620 … … 2315 2315 #. translators: header image description 2316 2316 2317 #: themes/commentpress-modern/functions.php:9 52317 #: themes/commentpress-modern/functions.php:91 2318 2318 #: themes/commentpress-theme/functions.php:87 2319 2319 msgid "Abstract Green" … … 2322 2322 #. translators: header image description 2323 2323 2324 #: themes/commentpress-modern/functions.php: 1012324 #: themes/commentpress-modern/functions.php:97 2325 2325 #: themes/commentpress-theme/functions.php:93 2326 2326 msgid "Abstract Red" … … 2329 2329 #. translators: header image description 2330 2330 2331 #: themes/commentpress-modern/functions.php:10 72331 #: themes/commentpress-modern/functions.php:103 2332 2332 #: themes/commentpress-theme/functions.php:99 2333 2333 msgid "Abstract Blue" … … 2336 2336 #. translators: header image description 2337 2337 2338 #: themes/commentpress-modern/functions.php:1 132338 #: themes/commentpress-modern/functions.php:109 2339 2339 #: themes/commentpress-theme/functions.php:105 2340 2340 msgid "Abstract Violet" 2341 2341 msgstr "" 2342 2342 2343 #: themes/commentpress-modern/functions.php:26 92343 #: themes/commentpress-modern/functions.php:263 2344 2344 msgid "Accepted" 2345 2345 msgstr "" 2346 2346 2347 #: themes/commentpress-modern/functions.php:2 702347 #: themes/commentpress-modern/functions.php:264 2348 2348 #: themes/commentpress-modern/members/single/profile/edit.php:45 2349 2349 #: themes/commentpress-modern/registration/register.php:110 … … 2353 2353 msgstr "" 2354 2354 2355 #: themes/commentpress-modern/functions.php:265 2356 msgid "comments" 2357 msgstr "" 2358 2359 #: themes/commentpress-modern/functions.php:266 2360 msgid "Are you sure you want to leave this group?" 2361 msgstr "" 2362 2363 #: themes/commentpress-modern/functions.php:268 2364 msgid "My Favorites" 2365 msgstr "" 2366 2367 #: themes/commentpress-modern/functions.php:269 2368 msgid "Rejected" 2369 msgstr "" 2370 2355 2371 #: themes/commentpress-modern/functions.php:271 2356 msgid " comments"2372 msgid "Show all" 2357 2373 msgstr "" 2358 2374 2359 2375 #: themes/commentpress-modern/functions.php:272 2360 msgid "Are you sure you want to leave this group?" 2376 msgid "Show all comments for this thread" 2377 msgstr "" 2378 2379 #: themes/commentpress-modern/functions.php:273 2380 msgid "Show all %d comments" 2361 2381 msgstr "" 2362 2382 2363 2383 #: themes/commentpress-modern/functions.php:274 2364 msgid " My Favorites"2384 msgid "Your profile has unsaved changes. If you leave the page, the changes will be lost." 2365 2385 msgstr "" 2366 2386 2367 2387 #: themes/commentpress-modern/functions.php:275 2368 msgid "Rejected"2369 msgstr ""2370 2371 #: themes/commentpress-modern/functions.php:2772372 msgid "Show all"2373 msgstr ""2374 2375 #: themes/commentpress-modern/functions.php:2782376 msgid "Show all comments for this thread"2377 msgstr ""2378 2379 #: themes/commentpress-modern/functions.php:2792380 msgid "Show all %d comments"2381 msgstr ""2382 2383 #: themes/commentpress-modern/functions.php:2802384 msgid "Your profile has unsaved changes. If you leave the page, the changes will be lost."2385 msgstr ""2386 2387 #: themes/commentpress-modern/functions.php:2812388 2388 msgid "View" 2389 2389 msgstr "" 2390 2390 2391 #: themes/commentpress-modern/functions.php:8 662391 #: themes/commentpress-modern/functions.php:856 2392 2392 #: themes/commentpress-theme/functions.php:553 2393 2393 msgid "Next page with comments" 2394 2394 msgstr "" 2395 2395 2396 #: themes/commentpress-modern/functions.php:8 962396 #: themes/commentpress-modern/functions.php:886 2397 2397 #: themes/commentpress-theme/functions.php:581 2398 2398 msgid "Previous page with comments" 2399 2399 msgstr "" 2400 2400 2401 #: themes/commentpress-modern/functions.php:10 372401 #: themes/commentpress-modern/functions.php:1027 2402 2402 #: themes/commentpress-theme/functions.php:720 2403 2403 msgid "Password protected" 2404 2404 msgstr "" 2405 2405 2406 #: themes/commentpress-modern/functions.php:11 332406 #: themes/commentpress-modern/functions.php:1123 2407 2407 #: themes/commentpress-theme/functions.php:816 2408 2408 msgid "Comments on the Blog" 2409 2409 msgstr "" 2410 2410 2411 #: themes/commentpress-modern/functions.php:11 392411 #: themes/commentpress-modern/functions.php:1129 2412 2412 #: themes/commentpress-theme/functions.php:822 2413 2413 msgid "Comments on the Pages" -
commentpress-core/trunk/readme.txt
r1197799 r1218118 4 4 Tags: commentpress, buddypress, groups, blogs, groupblogs, comments, commenting, debate, collaboration 5 5 Requires at least: 3.4 6 Tested up to: 4. 27 Stable tag: 3.8. 16 Tested up to: 4.3 7 Stable tag: 3.8.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 222 222 223 223 224 <h4>3.8.2</h4> 225 226 * Fix default theme header minimiser 227 * Fix footnotes scrolling 228 * Fix search when BuddyPress active on main site 229 224 230 <h4>3.8.1</h4> 225 231 -
commentpress-core/trunk/themes/commentpress-modern/assets/js/screen.js
r1189714 r1218118 115 115 116 116 // define vars 117 var styles, cp_header_height , cp_container_top, cp_container_width, cp_book_nav_width;117 var styles, cp_header_height; 118 118 119 119 // init styles -
commentpress-core/trunk/themes/commentpress-modern/functions.php
r1189714 r1218118 44 44 // allow custom backgrounds 45 45 add_theme_support( 'custom-background', array( 46 47 46 'default-color' => 'ccc', 48 47 'default-image' => '', … … 50 49 'admin-head-callback' => '', 51 50 'admin-preview-callback' => '' 52 53 51 ) ); 54 52 55 53 // allow custom header 56 54 add_theme_support( 'custom-header', array( 57 58 55 'default-text-color' => 'eeeeee', 59 56 'width' => apply_filters( 'cp_header_image_width', 940 ), … … 61 58 'wp-head-callback' => 'commentpress_header', 62 59 'admin-head-callback' => 'commentpress_admin_header' 63 64 60 ) ); 65 61 … … 184 180 // add our own BuddyPress css 185 181 wp_enqueue_style( 186 187 182 'cp_buddypress_css', 188 183 get_template_directory_uri() . '/assets/css/bp-overrides' . $dev . '.css', … … 190 185 COMMENTPRESS_VERSION, // version 191 186 'all' // media 192 193 187 ); 194 188 … … 593 587 // add print css 594 588 wp_enqueue_style( 595 596 589 'cp_print_css', 597 590 get_template_directory_uri() . '/assets/css/print' . $dev . '.css', … … 599 592 COMMENTPRESS_VERSION, // version 600 593 'print' 601 602 594 ); 603 595 … … 626 618 } 627 619 628 // enqueue accordion-like js620 // enqueue support for WP FEE 629 621 wp_enqueue_script( 630 631 622 'cp_wp_fee_js', 632 623 get_template_directory_uri() . '/assets/js/wp_fee' . $dev . '.js', 633 624 array( 'cp_common_js' ), // deps 634 625 COMMENTPRESS_VERSION // version 635 636 626 ); 637 627 … … 639 629 endif; // commentpress_enqueue_wp_fee_js 640 630 641 // add a filter for the above, very late so it (hopefully) is last in the queue631 // add an action to include WP FEE script if detected 642 632 add_action( 'commentpress_editor_include_javascript', 'commentpress_enqueue_wp_fee_js' ); 643 633 -
commentpress-core/trunk/themes/commentpress-theme/assets/js/cp_js_common.js
r1189714 r1218118 66 66 67 67 // set container top max and save 68 me.set_container_top_max( $.px_to_num( $('#container').css( 'top') ) );68 me.set_container_top_max( $.px_to_num( $('#container').css( 'top' ) ) ); 69 69 me.save_container_top_max(); 70 70 … … 80 80 81 81 // init container top max 82 this.container_top_m in= false;82 this.container_top_max = false; 83 83 84 84 /** … … 185 185 186 186 /** 187 * Setter for container top min187 * Setter for Contents tab "on top" flag 188 188 */ 189 189 this.set_toc_on_top = function( val ) { … … 192 192 193 193 /** 194 * Getter for container top min194 * Getter for Contents tab "on top" flag 195 195 */ 196 196 this.get_toc_on_top = function() { … … 337 337 if ( CommentPress.theme.original.header.is_minimised() ) { 338 338 339 // no -> skip 339 // YES, header is minimised 340 341 // do not show header 342 styles += '#book_header { display: none; } '; 343 344 // adjust for admin bar 345 cp_container_top = CommentPress.theme.settings.get_container_top_min(); 346 347 // is the admin bar shown? 348 if ( CommentPress.settings.DOM.get_wp_adminbar() == 'y' ) { 349 cp_container_top = CommentPress.theme.settings.get_container_top_min() - CommentPress.settings.DOM.get_wp_adminbar_height(); 350 } 340 351 341 352 // set tops of divs 353 styles += '#container { top: ' + cp_container_top + 'px; } '; 354 styles += '#sidebar { top: ' + CommentPress.theme.settings.get_container_top_min() + 'px; } '; 355 356 // is the admin bar shown? 357 if ( CommentPress.settings.DOM.get_wp_adminbar() == 'y' ) { 358 359 // if we have the responsive admin bar in 3.8+ 360 if ( CommentPress.settings.DOM.get_wp_adminbar_height() == '32' ) { 361 362 // react to responsive admin bar 363 styles += '@media screen and ( max-width: 782px ) { ' + 364 '#sidebar { top: ' + (cp_container_top + CommentPress.settings.DOM.get_wp_adminbar_expanded()) + 'px; }' + 365 ' } '; 366 367 } 368 369 } 370 371 } else { 372 373 // NO, header is NOT minimised 342 374 343 375 // adjust for admin bar … … 351 383 styles += '#container { top: ' + cp_container_top + 'px; } '; 352 384 styles += '#sidebar { top: ' + CommentPress.theme.settings.get_container_top_max() + 'px; } '; 353 354 // is the admin bar shown?355 if ( CommentPress.settings.DOM.get_wp_adminbar() == 'y' ) {356 357 // if we have the responsive admin bar in 3.8+358 if ( CommentPress.settings.DOM.get_wp_adminbar_height() == '32' ) {359 360 // react to responsive admin bar361 styles += '@media screen and ( max-width: 782px ) { ' +362 '#sidebar { top: ' + (cp_container_top + CommentPress.settings.DOM.get_wp_adminbar_expanded()) + 'px; }' +363 ' } ';364 365 }366 367 }368 369 } else {370 371 // set visibility of comments372 styles += '#book_header { display: none; } ';373 374 // adjust for admin bar375 cp_container_top = CommentPress.theme.settings.get_container_top_min();376 377 // is the admin bar shown?378 if ( CommentPress.settings.DOM.get_wp_adminbar() == 'y' ) {379 cp_container_top = CommentPress.theme.settings.get_container_top_min() - CommentPress.settings.DOM.get_wp_adminbar_height();380 }381 382 // set tops of divs383 styles += '#container { top: ' + cp_container_top + 'px; } ';384 styles += '#sidebar { top: ' + CommentPress.theme.settings.get_container_top_min() + 'px; } ';385 385 386 386 // is the admin bar shown? … … 825 825 * Clicking on the "Contents" sidebar header 826 826 * 827 * @return false827 * @return void 828 828 */ 829 829 $('#sidebar').on( 'click', '#toc_header h2 a', function( event ) { … … 1040 1040 1041 1041 // get "visibility" of the requested sidebar 1042 ontop = $('#' + sidebar + '_sidebar').css( 'z-index');1042 ontop = $('#' + sidebar + '_sidebar').css( 'z-index' ); 1043 1043 1044 1044 // is it hidden (ie, does it have a lower z-index) … … 1074 1074 1075 1075 // hide all 1076 $('.sidebar_container').css( 'visibility','hidden');1076 $('.sidebar_container').css( 'visibility', 'hidden' ); 1077 1077 1078 1078 // show it 1079 $('#' + sidebar + '_sidebar').css( 'visibility','visible');1079 $('#' + sidebar + '_sidebar').css( 'visibility', 'visible' ); 1080 1080 1081 1081 /* … … 1542 1542 1543 1543 // activate comments sidebar 1544 CommentPress.theme.sidebars.activate_sidebar( 'comments');1544 CommentPress.theme.sidebars.activate_sidebar( 'comments' ); 1545 1545 1546 1546 // open the matching block … … 2113 2113 // toggle 2114 2114 if ( me.is_minimised() ) { 2115 me.open(); 2116 } else { 2115 2117 me.close(); 2116 } else {2117 me.open();2118 2118 } 2119 2119 … … 2172 2172 duration: 'fast' 2173 2173 2174 }, function () {2175 2176 //book_header.show();2177 2178 // slide book header 2179 book_header.fadeIn('fast', function() {2180 2181 // when done 2182 header_animating = false;2183 2184 } );2185 2186 });2174 }, function () { 2175 2176 // slide book header 2177 book_header.fadeIn('fast', function() { 2178 2179 // when done 2180 header_animating = false; 2181 2182 }); 2183 2184 } 2185 2186 ); 2187 2187 2188 2188 // is the sidebar minimised? … … 2199 2199 duration: 'fast' 2200 2200 2201 }, function() { 2202 2203 // when done 2204 target_sidebar.css('height','auto'); 2205 2206 }); 2201 }, function() { 2202 2203 // when done 2204 target_sidebar.css( 'height','auto' ); 2205 2206 } 2207 2208 ); 2207 2209 2208 2210 // animate inner … … 2283 2285 container = $('#container'); 2284 2286 2285 // slide header2287 // hide header 2286 2288 book_header.hide(); 2287 2289 … … 2320 2322 2321 2323 // when done 2322 target_sidebar.css( 'height','auto');2324 target_sidebar.css( 'height','auto' ); 2323 2325 2324 2326 } … … 2332 2334 duration: 'fast' 2333 2335 2334 }, function() { 2335 2336 // don't set height when mobile device (but allow tablets) 2337 if ( cp_is_mobile == '0' || cp_is_tablet == '1' ) { 2338 2339 // fit column 2340 CommentPress.theme.sidebars.set_height(); 2336 }, function() { 2337 2338 // don't set height when mobile device (but allow tablets) 2339 if ( cp_is_mobile == '0' || cp_is_tablet == '1' ) { 2340 2341 // fit column 2342 CommentPress.theme.sidebars.set_height(); 2343 2344 } 2345 2346 // when done 2347 header_animating = false; 2341 2348 2342 2349 } 2343 2350 2344 // when done 2345 header_animating = false; 2346 2347 }); 2351 ); 2348 2352 2349 2353 } else { … … 2355 2359 duration: 'fast' 2356 2360 2357 }, function() { 2358 2359 // when done 2360 header_animating = false; 2361 2362 // don't set height when mobile device (but allow tablets) 2363 if ( cp_is_mobile == '0' || cp_is_tablet == '1' ) { 2364 2365 // fit column 2366 CommentPress.theme.sidebars.set_height(); 2361 }, function() { 2362 2363 // when done 2364 header_animating = false; 2365 2366 // don't set height when mobile device (but allow tablets) 2367 if ( cp_is_mobile == '0' || cp_is_tablet == '1' ) { 2368 2369 // fit column 2370 CommentPress.theme.sidebars.set_height(); 2371 2372 } 2367 2373 2368 2374 } 2369 2375 2370 });2376 ); 2371 2377 2372 2378 } … … 2411 2417 2412 2418 2419 2420 // the default theme implements custom header actions 2421 CommentPress.theme.original.header.dom_ready(); 2413 2422 2414 2423 // trigger DOM ready methods … … 2421 2430 CommentPress.theme.viewport.dom_ready(); 2422 2431 2423 // the default theme implements custom header actions2424 CommentPress.theme.original.header.dom_ready();2425 2426 2432 2427 2433 -
commentpress-core/trunk/themes/commentpress-theme/assets/js/cp_js_common.min.js
r1189714 r1218118 1 CommentPress.theme={},CommentPress.theme.settings=new function(){var e=this,t=jQuery.noConflict();this.init=function(){e.init_container_top_max(),e.init_container_top_min()},this.dom_ready=function(){t.cookie("cp_container_top_min")||(e.set_container_top_max(t.px_to_num(t("#container").css("top"))),e.save_container_top_max(),e.set_container_top_min(e.get_container_top_max()-CommentPress.theme.original.header.get_height()),e.save_container_top_min())},this.container_top_m in=!1,this.init_container_top_max=function(){this.container_top_max=t.cookie("cp_container_top_max"),("undefined"==typeof this.container_top_max||null===this.container_top_max)&&(this.container_top_max=108),"y"==CommentPress.settings.DOM.get_wp_adminbar()&&(this.container_top_max=parseInt(this.container_top_max)+CommentPress.settings.DOM.get_wp_adminbar_height())},this.set_container_top_max=function(e){this.container_top_max=e},this.save_container_top_max=function(n){t.cookie("cp_container_top_max",e.get_container_top_max().toString(),{expires:28,path:cp_cookie_path})},this.get_container_top_max=function(){return this.container_top_max},this.container_top_min=!1,this.init_container_top_min=function(){this.container_top_min=t.cookie("cp_container_top_min"),("undefined"==typeof this.container_top_min||null===this.container_top_min)&&(this.container_top_min=108),"y"==CommentPress.settings.DOM.get_wp_adminbar()&&(this.container_top_min=parseInt(this.container_top_min)+CommentPress.settings.DOM.get_wp_adminbar_height())},this.set_container_top_min=function(e){this.container_top_min=e},this.save_container_top_min=function(n){t.cookie("cp_container_top_min",e.get_container_top_min().toString(),{expires:28,path:cp_cookie_path})},this.get_container_top_min=function(){return this.container_top_min},this.toc_on_top="n",this.set_toc_on_top=function(e){this.toc_on_top=e},this.get_toc_on_top=function(){return this.toc_on_top},this.comment_border="",this.set_comment_border=function(e){this.comment_border=e},this.get_comment_border=function(){return this.comment_border}},CommentPress.theme.DOM=new function(){var e=this,t=jQuery.noConflict();this.init=function(){e.head()},this.dom_ready=function(){e.layout()},this.head=function(){var e,n,i,o;e="",document.getElementById&&(e+='<style type="text/css" media="screen">',"0"==cp_is_mobile&&"0"==cp_textblock_meta&&(e+="#content .textblock span.para_marker, #content .textblock span.commenticonbox { display: none; } ",e+=".content .textblock span.para_marker, .content .textblock span.commenticonbox { display: none; } "),e+="ul.all_comments_listing div.item_body { display: none; } ","y"==CommentPress.settings.DOM.get_wp_adminbar()&&(e+="#header { top: "+CommentPress.settings.DOM.get_wp_adminbar_height()+"px; } ",e+="#book_header { top: "+(CommentPress.settings.DOM.get_wp_adminbar_height()+32)+"px; } ","32"==CommentPress.settings.DOM.get_wp_adminbar_height()&&(e+="@media screen and ( max-width: 782px ) { #header { top: "+CommentPress.settings.DOM.get_wp_adminbar_expanded()+"px; }#book_header { top: "+(CommentPress.settings.DOM.get_wp_adminbar_expanded()+32)+"px; } } ")),"0"==cp_show_subpages&&(e+="#toc_sidebar .sidebar_contents_wrapper ul li ul { display: none; } "),CommentPress.theme.original.header.is_minimised()?(n=CommentPress.theme.settings.get_container_top_max(),"y"==CommentPress.settings.DOM.get_wp_adminbar()&&(n=CommentPress.theme.settings.get_container_top_max()-CommentPress.settings.DOM.get_wp_adminbar_height()),e+="#container { top: "+n+"px; } ",e+="#sidebar { top: "+CommentPress.theme.settings.get_container_top_max()+"px; } ","y"==CommentPress.settings.DOM.get_wp_adminbar()&&"32"==CommentPress.settings.DOM.get_wp_adminbar_height()&&(e+="@media screen and ( max-width: 782px ) { #sidebar { top: "+(n+CommentPress.settings.DOM.get_wp_adminbar_expanded())+"px; } } ")):(e+="#book_header { display: none; } ",n=CommentPress.theme.settings.get_container_top_min(),"y"==CommentPress.settings.DOM.get_wp_adminbar()&&(n=CommentPress.theme.settings.get_container_top_min()-CommentPress.settings.DOM.get_wp_adminbar_height()),e+="#container { top: "+n+"px; } ",e+="#sidebar { top: "+CommentPress.theme.settings.get_container_top_min()+"px; } ","y"==CommentPress.settings.DOM.get_wp_adminbar()&&"32"==CommentPress.settings.DOM.get_wp_adminbar_height()&&(e+="@media screen and ( max-width: 782px ) { #sidebar { top: "+(n+CommentPress.settings.DOM.get_wp_adminbar_expanded())+"px; } } ")),"0"==cp_special_page&&(e+=".paragraph_wrapper { display: none; } ",e+="#respond { display: none; } ","y"==CommentPress.theme.sidebars.get_minimised()&&(e+="#comments_sidebar .sidebar_contents_wrapper { display: none; } ")),e+="#activity_sidebar .paragraph_wrapper { display: none; } ",t.cookie("cp_container_width")&&(i=t.cookie("cp_container_width"),e+="1"==cp_is_signup_page?"#content { width: "+i+"%; } ":"#page_wrapper { width: "+i+"%; } ",e+="#footer { width: "+i+"%; } "),t.cookie("cp_book_nav_width")&&(o=t.cookie("cp_book_nav_width"),e+="#book_nav div#cp_book_nav { width: "+o+"%; } "),t.cookie("cp_sidebar_width")&&(e+="#sidebar { width: "+t.cookie("cp_sidebar_width")+"%; } "),t.cookie("cp_sidebar_left")&&(e+="#sidebar { left: "+t.cookie("cp_sidebar_left")+"%; } "),e+="ul#sidebar_tabs, #toc_header.sidebar_header, body.blog_post #activity_header.sidebar_header { display: block; } ","1"==cp_is_mobile&&"0"==cp_is_tablet&&(e+=".sidebar_contents_wrapper { height: auto; } "),e+="</style>"),document.write(e)},this.layout=function(){var e;e=t("1"==cp_is_signup_page?"#content":"#page_wrapper"),e.each(function(e){var n,i,o,s,m,r,_,a,c,p,d,h,g;n=t(this),i=t("#content"),o=t("#sidebar"),s=t("#footer"),m=t("#book_header"),r=t("#book_nav_wrapper"),_=t("#cp_book_nav"),a=t("#cp_book_info"),c=n.width(),p=o.width(),g=o.offset().left-c,n.resizable({handles:"e",minWidth:cp_min_page_width,alsoResize:"#footer",start:function(e,t){c=n.width(),p=o.width(),d=_.width(),h=o.css("left"),g=o.offset().left-c},resize:function(e,t){var i;n.css("height","auto"),s.css("height","auto"),o.css("left",n.width()+g+"px"),i=c-n.width(),o.css("width",p+i+"px"),_.css("width",d-i+"px")},stop:function(e,s){var m,r,a,c,p,d,h;m=parseFloat(t(window).width()),r=n.width(),a=parseFloat(Math.ceil(1e6*parseFloat(r)/m)/1e4),n.css("width",a+"%"),"0"==cp_is_signup_page&&i.css("width","auto"),r=_.width(),c=parseFloat(Math.ceil(1e6*parseFloat(r)/m)/1e4),_.css("width",c+"%"),r=o.width(),p=parseFloat(Math.ceil(1e6*parseFloat(r)/m)/1e4),o.css("width",p+"%"),d=o.position().left,h=parseFloat(Math.ceil(1e6*parseFloat(d)/m)/1e4),o.css("left",h+"%"),t.cookie("cp_container_width",a.toString(),{expires:28,path:cp_cookie_path}),t.cookie("cp_book_nav_width",c.toString(),{expires:28,path:cp_cookie_path}),t.cookie("cp_sidebar_left",h.toString(),{expires:28,path:cp_cookie_path}),t.cookie("cp_sidebar_width",p.toString(),{expires:28,path:cp_cookie_path})}})})}},CommentPress.theme.header=new function(){var e=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){},this.get_offset=function(){var t;return t=0-e.px_to_num(e("#container").css("top")),"y"==CommentPress.settings.DOM.get_wp_adminbar()&&(t-=CommentPress.settings.DOM.get_wp_adminbar_height()),t}},CommentPress.theme.navigation=new function(){var e=this,t=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){e.menu()},this.menu=function(){t("#sidebar").on("click","#toc_header h2 a",function(e){e.preventDefault(),CommentPress.theme.sidebars.activate_sidebar("toc")})}},CommentPress.theme.content=new function(){var e=this,t=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){e.tabs()},this.tabs=function(){var e,n;e=t("#content").css("min-height"),n=t("#content").css("padding-bottom"),t("#literal .post").css("display","none"),t("#original .post").css("display","none"),CommentPress.common.content.workflow_tabs(e,n)}},CommentPress.theme.sidebars=new function(){var e=this,t=jQuery.noConflict();this.init=function(){e.init_minimised()},this.dom_ready=function(){("0"==cp_is_mobile||"1"==cp_is_tablet)&&e.set_height()},this.minimised="n",this.init_minimised=function(){this.sidebar_minimised=t.cookie("cp_sidebar_minimised"),("undefined"==typeof this.sidebar_minimised||null===this.sidebar_minimised)&&(this.sidebar_minimised="n")},this.set_minimised=function(e){this.minimised=e},this.get_minimised=function(){return this.minimised},this.is_minimised=function(){return"undefined"==typeof this.minimised||null===this.minimised||"n"==this.minimised?"n":this.minimised},this.toggle_minimised=function(){"y"===this.minimised?this.minimised="n":this.minimised="y"},this.activate_sidebar=function(n){var i,o,s;i=t("#"+n+"_sidebar").css("z-index"),"2001"==i&&(t(".sidebar_container").css("z-index","2001"),t("#"+n+"_sidebar").css("z-index","2010"),o=e.get_top(),s=e.get_top_border(),t(".sidebar_header").css("height",o-s+"px"),t("#"+n+"_header.sidebar_header").css("height",o+"px"),CommentPress.theme.settings.set_toc_on_top("y")),"0"==cp_is_mobile||"1"==cp_is_tablet?e.set_height():(t(".sidebar_container").css("visibility","hidden"),t("#"+n+"_sidebar").css("visibility","visible"))},this.get_top=function(){return t.px_to_num(t("#toc_sidebar").css("top"))},this.get_top_border=function(){return t.px_to_num(t(".sidebar_minimiser").css("borderTopWidth"))},this.get_sidebar_pane=function(){var n=e.get_sidebar_name();return t("#"+n+"_sidebar .sidebar_minimiser")},this.get_sidebar_name=function(){var e="toc";return"comments"==cp_default_sidebar&&(e="comments","y"==CommentPress.theme.settings.get_toc_on_top()&&(e="toc")),"activity"==cp_default_sidebar&&(e="activity","y"==CommentPress.theme.settings.get_toc_on_top()&&(e="toc")),e},this.get_element_adjust=function(e){var n,i,o,s,m,r,_;return n=t.css_to_num(t.px_to_num(e.css("borderTopWidth"))),i=t.css_to_num(t.px_to_num(e.css("borderBottomWidth"))),o=t.css_to_num(t.px_to_num(e.css("padding-top"))),s=t.css_to_num(t.px_to_num(e.css("padding-bottom"))),m=t.css_to_num(t.px_to_num(e.css("margin-top"))),r=t.css_to_num(t.px_to_num(e.css("margin-bottom"))),_=n+i+o+s+m+r},this.set_height=function(){var n,i,o,s,m,r,_,a,c,p,d,h,g,l,u,b,f,C,P;return n=t("#sidebar"),i=t("#sidebar_inner"),o=t("#toc_sidebar"),s=t("#"+CommentPress.theme.sidebars.get_sidebar_name()+"_sidebar .sidebar_header"),m=e.get_sidebar_pane(),r=n.offset().top,_=e.get_element_adjust(n),a=e.get_element_adjust(i),c=r+_+a,p=o.position().top,d=e.get_element_adjust(o),h=p+d,g=0,"none"!=s.css("display")&&(g=s.height()+e.get_element_adjust(s)),l=e.get_element_adjust(m),u=t.css_to_num("1"==cp_is_signup_page?t.px_to_num(t("#content").css("margin-bottom")):t.px_to_num(t("#page_wrapper").css("margin-bottom"))),b=t(window).height(),f=t(window).scrollTop(),C=b+f,P=C-(c+h+g+l+u),t("#sidebar div.sidebar_contents_wrapper").css("height",P+"px"),P}},CommentPress.theme.viewport=new function(){var e=this,t=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){},this.scroll_to_top=function(e,n){"undefined"!=typeof e&&("0"==cp_is_mobile||"1"==cp_is_tablet)&&t(window).stop(!0).scrollTo(e,n)},this.on_load_scroll_to_anchor=function(){var n,i,o,s,m,r;if(n="",r=!1,i=document.location.toString(),i.match("#comment-"))return tmp=i.split("#comment-"),o=0,2==tmp.length&&(o=parseInt(tmp[1])),0!==o&&e.on_load_scroll_to_comment(o),void CommentPress.common.DOM.location_reset();if(t("span.para_marker > a").each(function(n){var o;o=t(this).prop("id"),(i.match("#"+o)||i.match("#para_heading-"+o))&&(e.align_content(o,"para_heading"),CommentPress.common.DOM.location_reset(),r=!0)}),r!==!0){if(i.match("#respond"))return i.match("replytocom")?(comment_parent=parseInt(t("#comment_parent").val()),e.on_load_scroll_to_comment(comment_parent)):i.match("replytopara")?(n=t("#text_signature").val(),e.align_content(n,"commentform")):t("h3#para_heading- a.comment_block_permalink").click(),void CommentPress.common.DOM.location_reset();if(i.match("#")){if(s=i.split("#")[1],"edit=true"==s)return;if("fee-edit-link"==s)return;return m=t("#"+s),m.length&&(m.addClass("selected_para"),CommentPress.common.content.scroll_page(m)),void CommentPress.common.DOM.location_reset()}}},this.on_load_scroll_to_comment=function(e){var n,i,o,s,m,r,_;CommentPress.theme.sidebars.activate_sidebar("comments"),i=t("#comment-"+e).parents("div.paragraph_wrapper").map(function(){return this}),i.length>0&&(o=t(i[0]),"y"==cp_comments_open&&(n=o.prop("id").split("-")[1],s=t("#para_wrapper-"+n+" .reply_to_para").prop("id"),m=s.split("-")[1],r=t("#comment_post_ID").prop("value"),"1"==cp_tinymce?""!==t("#comment-"+e+" > .reply").text()&&(cp_tinymce="0",addComment.moveForm("comment-"+e,e,"respond",r,n),cp_tinymce="1"):addComment.moveForm("comment-"+e,e,"respond",r,n)),o.show(),CommentPress.common.comments.scroll_comments(t("#comment-"+e),1,"flash"),""!==n?(_=t("#textblock-"+n),t.highlight_para(_),CommentPress.common.content.scroll_page(_)):(CommentPress.settings.page.get_highlight()||CommentPress.theme.viewport.scroll_to_top(0,cp_scroll_speed),CommentPress.settings.page.toggle_highlight()))},this.align_content=function(e,n){if("none"!=n){CommentPress.theme.sidebars.activate_sidebar("comments");var i,o,s,m,r,_,a,c,p,d;if(i=t("#para_heading-"+e).next("div.paragraph_wrapper"),0!=i.length){if(o=t("#para_wrapper-"+e+" .commentlist"),s=i.find("#respond"),m=addComment.getLevel(),r=!1,_=i.css("display"),"none"==_&&(r=!0),t.unhighlight_para(),""!==e&&(a=t("#textblock-"+e),("1"!=cp_promote_reading||r)&&(t.highlight_para(a),CommentPress.common.content.scroll_page(a))),"0"==cp_promote_reading){if("y"==cp_comments_open&&(c=t("#comment_post_ID").prop("value"),p=t("#para_wrapper-"+e+" .reply_to_para").prop("id"),d=p.split("-")[1]),s[0]||"y"==cp_comments_open&&addComment.moveFormToPara(d,e,c),s[0]&&!m)return void("y"==cp_comments_open?(addComment.moveFormToPara(d,e,c),"para_heading"==n?CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#respond"),cp_scroll_speed)):CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed));if(!s[0]&&o[0]&&!r)return void("y"==cp_comments_open?"para_heading"==n?CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#respond"),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed));if(!r&&o[0])return void("y"==cp_comments_open?"para_heading"==n?CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#respond"),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed));if(s[0]&&!o[0]&&!r)return void("y"==cp_comments_open?"para_heading"==n?CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#respond"),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed));r||o[0]||(i.css("display","none"),r=!0)}i.slideToggle("slow",function(){"1"==cp_promote_reading&&r?CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed):r&&("y"==cp_comments_open?"para_heading"==n?CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#respond"),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed))})}}}},CommentPress.theme.original={},CommentPress.theme.original.header=new function(){var e=this,t=jQuery.noConflict(),n=!1;this.init=function(){e.init_minimised()},this.dom_ready=function(){e.init_height(),e.minimiser()},this.header_height=0,this.init_height=function(){this.header_height=t("#book_header").height()},this.set_height=function(e){this.header_height=e},this.get_height=function(){return this.header_height},this.minimised="n",this.init_minimised=function(){this.minimised=t.cookie("cp_header_minimised"),("undefined"==typeof this.minimised||null===this.minimised)&&(this.minimised="n")},this.set_minimised=function(e){this.minimised=e},this.get_minimised=function(){return this.minimised},this.is_minimised=function(){return"undefined"==typeof this.minimised||null===this.minimised||"n"==this.minimised?!1:!0},this.toggle_minimised=function(){"y"===this.minimised?this.minimised="n":this.minimised="y"},this.minimiser=function(){t("#header").on("click","#btn_header_min",function(t){t.preventDefault(),e.toggle()})},this.toggle=function(){return n===!0?!1:(n=!0,e.is_minimised()?e.close():e.open(),e.toggle_minimised(),void t.cookie("cp_header_minimised",e.get_minimised(),{expires:28,path:cp_cookie_path}))},this.open=function(){var i,o,s,m,r,_,a;i=t("#book_nav").height(),o=t("#sidebar"),s=CommentPress.theme.sidebars.get_sidebar_pane(),m=t("#book_header"),r=t("#container"),_=CommentPress.theme.settings.get_container_top_max(),"y"==CommentPress.settings.DOM.get_wp_adminbar()&&(_=CommentPress.theme.settings.get_container_top_max()-CommentPress.settings.DOM.get_wp_adminbar_height()),r.animate({top:_+"px",duration:"fast"},function(){m.fadeIn("fast",function(){n=!1})}),"n"==CommentPress.theme.sidebars.get_minimised()?(a=o.height()-e.get_height(),o.animate({top:CommentPress.theme.settings.get_container_top_max()+"px",height:a+"px",duration:"fast"},function(){o.css("height","auto")}),s.animate({height:s.height()-e.get_height()+"px",duration:"fast"},function(){("0"==cp_is_mobile||"1"==cp_is_tablet)&&CommentPress.theme.sidebars.set_height(),n=!1})):o.animate({top:CommentPress.theme.settings.get_container_top_max()+"px",duration:"fast"},function(){n=!1,("0"==cp_is_mobile||"1"==cp_is_tablet)&&CommentPress.theme.sidebars.set_height()})},this.close=function(){var i,o,s,m,r,_,a;i=t("#book_nav").height(),o=t("#sidebar"),s=CommentPress.theme.sidebars.get_sidebar_pane(),m=t("#book_header"),r=t("#container"),m.hide(),_=CommentPress.theme.settings.get_container_top_min(),"y"==CommentPress.settings.DOM.get_wp_adminbar()&&(_=CommentPress.theme.settings.get_container_top_min()-CommentPress.settings.DOM.get_wp_adminbar_height()),r.animate({top:_+"px",duration:"fast"}),"n"==CommentPress.theme.sidebars.get_minimised()?(a=o.height()+e.get_height(),o.animate({top:CommentPress.theme.settings.get_container_top_min()+"px",height:a+"px",duration:"fast"},function(){o.css("height","auto")}),s.animate({height:s.height()+e.get_height()+"px",duration:"fast"},function(){("0"==cp_is_mobile||"1"==cp_is_tablet)&&CommentPress.theme.sidebars.set_height(),n=!1})):o.animate({top:CommentPress.theme.settings.get_container_top_min()+"px",duration:"fast"},function(){n=!1,("0"==cp_is_mobile||"1"==cp_is_tablet)&&CommentPress.theme.sidebars.set_height()})}},CommentPress.theme.settings.init(),CommentPress.theme.original.header.init(),CommentPress.theme.DOM.init(),CommentPress.theme.header.init(),CommentPress.theme.navigation.init(),CommentPress.theme.content.init(),CommentPress.theme.sidebars.init(),CommentPress.theme.viewport.init(),jQuery(document).ready(function(e){CommentPress.theme.settings.dom_ready(),CommentPress.theme.DOM.dom_ready(),CommentPress.theme.header.dom_ready(),CommentPress.theme.navigation.dom_ready(),CommentPress.theme.content.dom_ready(),CommentPress.theme.sidebars.dom_ready(),CommentPress.theme.viewport.dom_ready(),CommentPress.theme.original.header.dom_ready(),e(document).on("commentpress-comment-highlight",function(e,t){var n;jQuery("#li-comment-"+t+" > .comment-wrapper").css("background-color","#CBFFBD"),n=jQuery("#comment-"+t+" > .comment-content").css("border-bottom"),CommentPress.theme.settings.set_comment_border(n),jQuery("#comment-"+t+" > .comment-content").css("border-bottom","1px dashed #b8b8b8")}),e(document).on("commentpress-comment-unhighlight",function(e,t){var n;n=CommentPress.theme.settings.get_comment_border(),jQuery("#li-comment-"+t+" > .comment-wrapper").css("background-color","#fff"),jQuery("#comment-"+t+" > .comment-content").css("border-bottom",n)}),e(document).on("commentpress-comment-highlights-clear",function(e){var t;t=CommentPress.theme.settings.get_comment_border(),jQuery(".comment-wrapper").css("background-color","#fff"),jQuery(".comment-content").css("border-bottom",t)}),"1"==cp_special_page?CommentPress.common.content.on_load_scroll_to_comment():CommentPress.theme.viewport.on_load_scroll_to_anchor(),e(document).trigger("commentpress-document-ready")});1 CommentPress.theme={},CommentPress.theme.settings=new function(){var e=this,t=jQuery.noConflict();this.init=function(){e.init_container_top_max(),e.init_container_top_min()},this.dom_ready=function(){t.cookie("cp_container_top_min")||(e.set_container_top_max(t.px_to_num(t("#container").css("top"))),e.save_container_top_max(),e.set_container_top_min(e.get_container_top_max()-CommentPress.theme.original.header.get_height()),e.save_container_top_min())},this.container_top_max=!1,this.init_container_top_max=function(){this.container_top_max=t.cookie("cp_container_top_max"),("undefined"==typeof this.container_top_max||null===this.container_top_max)&&(this.container_top_max=108),"y"==CommentPress.settings.DOM.get_wp_adminbar()&&(this.container_top_max=parseInt(this.container_top_max)+CommentPress.settings.DOM.get_wp_adminbar_height())},this.set_container_top_max=function(e){this.container_top_max=e},this.save_container_top_max=function(n){t.cookie("cp_container_top_max",e.get_container_top_max().toString(),{expires:28,path:cp_cookie_path})},this.get_container_top_max=function(){return this.container_top_max},this.container_top_min=!1,this.init_container_top_min=function(){this.container_top_min=t.cookie("cp_container_top_min"),("undefined"==typeof this.container_top_min||null===this.container_top_min)&&(this.container_top_min=108),"y"==CommentPress.settings.DOM.get_wp_adminbar()&&(this.container_top_min=parseInt(this.container_top_min)+CommentPress.settings.DOM.get_wp_adminbar_height())},this.set_container_top_min=function(e){this.container_top_min=e},this.save_container_top_min=function(n){t.cookie("cp_container_top_min",e.get_container_top_min().toString(),{expires:28,path:cp_cookie_path})},this.get_container_top_min=function(){return this.container_top_min},this.toc_on_top="n",this.set_toc_on_top=function(e){this.toc_on_top=e},this.get_toc_on_top=function(){return this.toc_on_top},this.comment_border="",this.set_comment_border=function(e){this.comment_border=e},this.get_comment_border=function(){return this.comment_border}},CommentPress.theme.DOM=new function(){var e=this,t=jQuery.noConflict();this.init=function(){e.head()},this.dom_ready=function(){e.layout()},this.head=function(){var e,n,i,o;e="",document.getElementById&&(e+='<style type="text/css" media="screen">',"0"==cp_is_mobile&&"0"==cp_textblock_meta&&(e+="#content .textblock span.para_marker, #content .textblock span.commenticonbox { display: none; } ",e+=".content .textblock span.para_marker, .content .textblock span.commenticonbox { display: none; } "),e+="ul.all_comments_listing div.item_body { display: none; } ","y"==CommentPress.settings.DOM.get_wp_adminbar()&&(e+="#header { top: "+CommentPress.settings.DOM.get_wp_adminbar_height()+"px; } ",e+="#book_header { top: "+(CommentPress.settings.DOM.get_wp_adminbar_height()+32)+"px; } ","32"==CommentPress.settings.DOM.get_wp_adminbar_height()&&(e+="@media screen and ( max-width: 782px ) { #header { top: "+CommentPress.settings.DOM.get_wp_adminbar_expanded()+"px; }#book_header { top: "+(CommentPress.settings.DOM.get_wp_adminbar_expanded()+32)+"px; } } ")),"0"==cp_show_subpages&&(e+="#toc_sidebar .sidebar_contents_wrapper ul li ul { display: none; } "),CommentPress.theme.original.header.is_minimised()?(e+="#book_header { display: none; } ",n=CommentPress.theme.settings.get_container_top_min(),"y"==CommentPress.settings.DOM.get_wp_adminbar()&&(n=CommentPress.theme.settings.get_container_top_min()-CommentPress.settings.DOM.get_wp_adminbar_height()),e+="#container { top: "+n+"px; } ",e+="#sidebar { top: "+CommentPress.theme.settings.get_container_top_min()+"px; } ","y"==CommentPress.settings.DOM.get_wp_adminbar()&&"32"==CommentPress.settings.DOM.get_wp_adminbar_height()&&(e+="@media screen and ( max-width: 782px ) { #sidebar { top: "+(n+CommentPress.settings.DOM.get_wp_adminbar_expanded())+"px; } } ")):(n=CommentPress.theme.settings.get_container_top_max(),"y"==CommentPress.settings.DOM.get_wp_adminbar()&&(n=CommentPress.theme.settings.get_container_top_max()-CommentPress.settings.DOM.get_wp_adminbar_height()),e+="#container { top: "+n+"px; } ",e+="#sidebar { top: "+CommentPress.theme.settings.get_container_top_max()+"px; } ","y"==CommentPress.settings.DOM.get_wp_adminbar()&&"32"==CommentPress.settings.DOM.get_wp_adminbar_height()&&(e+="@media screen and ( max-width: 782px ) { #sidebar { top: "+(n+CommentPress.settings.DOM.get_wp_adminbar_expanded())+"px; } } ")),"0"==cp_special_page&&(e+=".paragraph_wrapper { display: none; } ",e+="#respond { display: none; } ","y"==CommentPress.theme.sidebars.get_minimised()&&(e+="#comments_sidebar .sidebar_contents_wrapper { display: none; } ")),e+="#activity_sidebar .paragraph_wrapper { display: none; } ",t.cookie("cp_container_width")&&(i=t.cookie("cp_container_width"),e+="1"==cp_is_signup_page?"#content { width: "+i+"%; } ":"#page_wrapper { width: "+i+"%; } ",e+="#footer { width: "+i+"%; } "),t.cookie("cp_book_nav_width")&&(o=t.cookie("cp_book_nav_width"),e+="#book_nav div#cp_book_nav { width: "+o+"%; } "),t.cookie("cp_sidebar_width")&&(e+="#sidebar { width: "+t.cookie("cp_sidebar_width")+"%; } "),t.cookie("cp_sidebar_left")&&(e+="#sidebar { left: "+t.cookie("cp_sidebar_left")+"%; } "),e+="ul#sidebar_tabs, #toc_header.sidebar_header, body.blog_post #activity_header.sidebar_header { display: block; } ","1"==cp_is_mobile&&"0"==cp_is_tablet&&(e+=".sidebar_contents_wrapper { height: auto; } "),e+="</style>"),document.write(e)},this.layout=function(){var e;e=t("1"==cp_is_signup_page?"#content":"#page_wrapper"),e.each(function(e){var n,i,o,s,m,r,_,a,c,p,d,h,g;n=t(this),i=t("#content"),o=t("#sidebar"),s=t("#footer"),m=t("#book_header"),r=t("#book_nav_wrapper"),_=t("#cp_book_nav"),a=t("#cp_book_info"),c=n.width(),p=o.width(),g=o.offset().left-c,n.resizable({handles:"e",minWidth:cp_min_page_width,alsoResize:"#footer",start:function(e,t){c=n.width(),p=o.width(),d=_.width(),h=o.css("left"),g=o.offset().left-c},resize:function(e,t){var i;n.css("height","auto"),s.css("height","auto"),o.css("left",n.width()+g+"px"),i=c-n.width(),o.css("width",p+i+"px"),_.css("width",d-i+"px")},stop:function(e,s){var m,r,a,c,p,d,h;m=parseFloat(t(window).width()),r=n.width(),a=parseFloat(Math.ceil(1e6*parseFloat(r)/m)/1e4),n.css("width",a+"%"),"0"==cp_is_signup_page&&i.css("width","auto"),r=_.width(),c=parseFloat(Math.ceil(1e6*parseFloat(r)/m)/1e4),_.css("width",c+"%"),r=o.width(),p=parseFloat(Math.ceil(1e6*parseFloat(r)/m)/1e4),o.css("width",p+"%"),d=o.position().left,h=parseFloat(Math.ceil(1e6*parseFloat(d)/m)/1e4),o.css("left",h+"%"),t.cookie("cp_container_width",a.toString(),{expires:28,path:cp_cookie_path}),t.cookie("cp_book_nav_width",c.toString(),{expires:28,path:cp_cookie_path}),t.cookie("cp_sidebar_left",h.toString(),{expires:28,path:cp_cookie_path}),t.cookie("cp_sidebar_width",p.toString(),{expires:28,path:cp_cookie_path})}})})}},CommentPress.theme.header=new function(){var e=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){},this.get_offset=function(){var t;return t=0-e.px_to_num(e("#container").css("top")),"y"==CommentPress.settings.DOM.get_wp_adminbar()&&(t-=CommentPress.settings.DOM.get_wp_adminbar_height()),t}},CommentPress.theme.navigation=new function(){var e=this,t=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){e.menu()},this.menu=function(){t("#sidebar").on("click","#toc_header h2 a",function(e){e.preventDefault(),CommentPress.theme.sidebars.activate_sidebar("toc")})}},CommentPress.theme.content=new function(){var e=this,t=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){e.tabs()},this.tabs=function(){var e,n;e=t("#content").css("min-height"),n=t("#content").css("padding-bottom"),t("#literal .post").css("display","none"),t("#original .post").css("display","none"),CommentPress.common.content.workflow_tabs(e,n)}},CommentPress.theme.sidebars=new function(){var e=this,t=jQuery.noConflict();this.init=function(){e.init_minimised()},this.dom_ready=function(){("0"==cp_is_mobile||"1"==cp_is_tablet)&&e.set_height()},this.minimised="n",this.init_minimised=function(){this.sidebar_minimised=t.cookie("cp_sidebar_minimised"),("undefined"==typeof this.sidebar_minimised||null===this.sidebar_minimised)&&(this.sidebar_minimised="n")},this.set_minimised=function(e){this.minimised=e},this.get_minimised=function(){return this.minimised},this.is_minimised=function(){return"undefined"==typeof this.minimised||null===this.minimised||"n"==this.minimised?"n":this.minimised},this.toggle_minimised=function(){"y"===this.minimised?this.minimised="n":this.minimised="y"},this.activate_sidebar=function(n){var i,o,s;i=t("#"+n+"_sidebar").css("z-index"),"2001"==i&&(t(".sidebar_container").css("z-index","2001"),t("#"+n+"_sidebar").css("z-index","2010"),o=e.get_top(),s=e.get_top_border(),t(".sidebar_header").css("height",o-s+"px"),t("#"+n+"_header.sidebar_header").css("height",o+"px"),CommentPress.theme.settings.set_toc_on_top("y")),"0"==cp_is_mobile||"1"==cp_is_tablet?e.set_height():(t(".sidebar_container").css("visibility","hidden"),t("#"+n+"_sidebar").css("visibility","visible"))},this.get_top=function(){return t.px_to_num(t("#toc_sidebar").css("top"))},this.get_top_border=function(){return t.px_to_num(t(".sidebar_minimiser").css("borderTopWidth"))},this.get_sidebar_pane=function(){var n=e.get_sidebar_name();return t("#"+n+"_sidebar .sidebar_minimiser")},this.get_sidebar_name=function(){var e="toc";return"comments"==cp_default_sidebar&&(e="comments","y"==CommentPress.theme.settings.get_toc_on_top()&&(e="toc")),"activity"==cp_default_sidebar&&(e="activity","y"==CommentPress.theme.settings.get_toc_on_top()&&(e="toc")),e},this.get_element_adjust=function(e){var n,i,o,s,m,r,_;return n=t.css_to_num(t.px_to_num(e.css("borderTopWidth"))),i=t.css_to_num(t.px_to_num(e.css("borderBottomWidth"))),o=t.css_to_num(t.px_to_num(e.css("padding-top"))),s=t.css_to_num(t.px_to_num(e.css("padding-bottom"))),m=t.css_to_num(t.px_to_num(e.css("margin-top"))),r=t.css_to_num(t.px_to_num(e.css("margin-bottom"))),_=n+i+o+s+m+r},this.set_height=function(){var n,i,o,s,m,r,_,a,c,p,d,h,g,l,u,b,f,C,P;return n=t("#sidebar"),i=t("#sidebar_inner"),o=t("#toc_sidebar"),s=t("#"+CommentPress.theme.sidebars.get_sidebar_name()+"_sidebar .sidebar_header"),m=e.get_sidebar_pane(),r=n.offset().top,_=e.get_element_adjust(n),a=e.get_element_adjust(i),c=r+_+a,p=o.position().top,d=e.get_element_adjust(o),h=p+d,g=0,"none"!=s.css("display")&&(g=s.height()+e.get_element_adjust(s)),l=e.get_element_adjust(m),u=t.css_to_num("1"==cp_is_signup_page?t.px_to_num(t("#content").css("margin-bottom")):t.px_to_num(t("#page_wrapper").css("margin-bottom"))),b=t(window).height(),f=t(window).scrollTop(),C=b+f,P=C-(c+h+g+l+u),t("#sidebar div.sidebar_contents_wrapper").css("height",P+"px"),P}},CommentPress.theme.viewport=new function(){var e=this,t=jQuery.noConflict();this.init=function(){},this.dom_ready=function(){},this.scroll_to_top=function(e,n){"undefined"!=typeof e&&("0"==cp_is_mobile||"1"==cp_is_tablet)&&t(window).stop(!0).scrollTo(e,n)},this.on_load_scroll_to_anchor=function(){var n,i,o,s,m,r;if(n="",r=!1,i=document.location.toString(),i.match("#comment-"))return tmp=i.split("#comment-"),o=0,2==tmp.length&&(o=parseInt(tmp[1])),0!==o&&e.on_load_scroll_to_comment(o),void CommentPress.common.DOM.location_reset();if(t("span.para_marker > a").each(function(n){var o;o=t(this).prop("id"),(i.match("#"+o)||i.match("#para_heading-"+o))&&(e.align_content(o,"para_heading"),CommentPress.common.DOM.location_reset(),r=!0)}),r!==!0){if(i.match("#respond"))return i.match("replytocom")?(comment_parent=parseInt(t("#comment_parent").val()),e.on_load_scroll_to_comment(comment_parent)):i.match("replytopara")?(n=t("#text_signature").val(),e.align_content(n,"commentform")):t("h3#para_heading- a.comment_block_permalink").click(),void CommentPress.common.DOM.location_reset();if(i.match("#")){if(s=i.split("#")[1],"edit=true"==s)return;if("fee-edit-link"==s)return;return m=t("#"+s),m.length&&(m.addClass("selected_para"),CommentPress.common.content.scroll_page(m)),void CommentPress.common.DOM.location_reset()}}},this.on_load_scroll_to_comment=function(e){var n,i,o,s,m,r,_;CommentPress.theme.sidebars.activate_sidebar("comments"),i=t("#comment-"+e).parents("div.paragraph_wrapper").map(function(){return this}),i.length>0&&(o=t(i[0]),"y"==cp_comments_open&&(n=o.prop("id").split("-")[1],s=t("#para_wrapper-"+n+" .reply_to_para").prop("id"),m=s.split("-")[1],r=t("#comment_post_ID").prop("value"),"1"==cp_tinymce?""!==t("#comment-"+e+" > .reply").text()&&(cp_tinymce="0",addComment.moveForm("comment-"+e,e,"respond",r,n),cp_tinymce="1"):addComment.moveForm("comment-"+e,e,"respond",r,n)),o.show(),CommentPress.common.comments.scroll_comments(t("#comment-"+e),1,"flash"),""!==n?(_=t("#textblock-"+n),t.highlight_para(_),CommentPress.common.content.scroll_page(_)):(CommentPress.settings.page.get_highlight()||CommentPress.theme.viewport.scroll_to_top(0,cp_scroll_speed),CommentPress.settings.page.toggle_highlight()))},this.align_content=function(e,n){if("none"!=n){CommentPress.theme.sidebars.activate_sidebar("comments");var i,o,s,m,r,_,a,c,p,d;if(i=t("#para_heading-"+e).next("div.paragraph_wrapper"),0!=i.length){if(o=t("#para_wrapper-"+e+" .commentlist"),s=i.find("#respond"),m=addComment.getLevel(),r=!1,_=i.css("display"),"none"==_&&(r=!0),t.unhighlight_para(),""!==e&&(a=t("#textblock-"+e),("1"!=cp_promote_reading||r)&&(t.highlight_para(a),CommentPress.common.content.scroll_page(a))),"0"==cp_promote_reading){if("y"==cp_comments_open&&(c=t("#comment_post_ID").prop("value"),p=t("#para_wrapper-"+e+" .reply_to_para").prop("id"),d=p.split("-")[1]),s[0]||"y"==cp_comments_open&&addComment.moveFormToPara(d,e,c),s[0]&&!m)return void("y"==cp_comments_open?(addComment.moveFormToPara(d,e,c),"para_heading"==n?CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#respond"),cp_scroll_speed)):CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed));if(!s[0]&&o[0]&&!r)return void("y"==cp_comments_open?"para_heading"==n?CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#respond"),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed));if(!r&&o[0])return void("y"==cp_comments_open?"para_heading"==n?CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#respond"),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed));if(s[0]&&!o[0]&&!r)return void("y"==cp_comments_open?"para_heading"==n?CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#respond"),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed));r||o[0]||(i.css("display","none"),r=!0)}i.slideToggle("slow",function(){"1"==cp_promote_reading&&r?CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed):r&&("y"==cp_comments_open?"para_heading"==n?CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#respond"),cp_scroll_speed):CommentPress.common.comments.scroll_comments(t("#para_heading-"+e),cp_scroll_speed))})}}}},CommentPress.theme.original={},CommentPress.theme.original.header=new function(){var e=this,t=jQuery.noConflict(),n=!1;this.init=function(){e.init_minimised()},this.dom_ready=function(){e.init_height(),e.minimiser()},this.header_height=0,this.init_height=function(){this.header_height=t("#book_header").height()},this.set_height=function(e){this.header_height=e},this.get_height=function(){return this.header_height},this.minimised="n",this.init_minimised=function(){this.minimised=t.cookie("cp_header_minimised"),("undefined"==typeof this.minimised||null===this.minimised)&&(this.minimised="n")},this.set_minimised=function(e){this.minimised=e},this.get_minimised=function(){return this.minimised},this.is_minimised=function(){return"undefined"==typeof this.minimised||null===this.minimised||"n"==this.minimised?!1:!0},this.toggle_minimised=function(){"y"===this.minimised?this.minimised="n":this.minimised="y"},this.minimiser=function(){t("#header").on("click","#btn_header_min",function(t){t.preventDefault(),e.toggle()})},this.toggle=function(){return n===!0?!1:(n=!0,e.is_minimised()?e.open():e.close(),e.toggle_minimised(),void t.cookie("cp_header_minimised",e.get_minimised(),{expires:28,path:cp_cookie_path}))},this.open=function(){var i,o,s,m,r,_,a;i=t("#book_nav").height(),o=t("#sidebar"),s=CommentPress.theme.sidebars.get_sidebar_pane(),m=t("#book_header"),r=t("#container"),_=CommentPress.theme.settings.get_container_top_max(),"y"==CommentPress.settings.DOM.get_wp_adminbar()&&(_=CommentPress.theme.settings.get_container_top_max()-CommentPress.settings.DOM.get_wp_adminbar_height()),r.animate({top:_+"px",duration:"fast"},function(){m.fadeIn("fast",function(){n=!1})}),"n"==CommentPress.theme.sidebars.get_minimised()?(a=o.height()-e.get_height(),o.animate({top:CommentPress.theme.settings.get_container_top_max()+"px",height:a+"px",duration:"fast"},function(){o.css("height","auto")}),s.animate({height:s.height()-e.get_height()+"px",duration:"fast"},function(){("0"==cp_is_mobile||"1"==cp_is_tablet)&&CommentPress.theme.sidebars.set_height(),n=!1})):o.animate({top:CommentPress.theme.settings.get_container_top_max()+"px",duration:"fast"},function(){n=!1,("0"==cp_is_mobile||"1"==cp_is_tablet)&&CommentPress.theme.sidebars.set_height()})},this.close=function(){var i,o,s,m,r,_,a;i=t("#book_nav").height(),o=t("#sidebar"),s=CommentPress.theme.sidebars.get_sidebar_pane(),m=t("#book_header"),r=t("#container"),m.hide(),_=CommentPress.theme.settings.get_container_top_min(),"y"==CommentPress.settings.DOM.get_wp_adminbar()&&(_=CommentPress.theme.settings.get_container_top_min()-CommentPress.settings.DOM.get_wp_adminbar_height()),r.animate({top:_+"px",duration:"fast"}),"n"==CommentPress.theme.sidebars.get_minimised()?(a=o.height()+e.get_height(),o.animate({top:CommentPress.theme.settings.get_container_top_min()+"px",height:a+"px",duration:"fast"},function(){o.css("height","auto")}),s.animate({height:s.height()+e.get_height()+"px",duration:"fast"},function(){("0"==cp_is_mobile||"1"==cp_is_tablet)&&CommentPress.theme.sidebars.set_height(),n=!1})):o.animate({top:CommentPress.theme.settings.get_container_top_min()+"px",duration:"fast"},function(){n=!1,("0"==cp_is_mobile||"1"==cp_is_tablet)&&CommentPress.theme.sidebars.set_height()})}},CommentPress.theme.settings.init(),CommentPress.theme.original.header.init(),CommentPress.theme.DOM.init(),CommentPress.theme.header.init(),CommentPress.theme.navigation.init(),CommentPress.theme.content.init(),CommentPress.theme.sidebars.init(),CommentPress.theme.viewport.init(),jQuery(document).ready(function(e){CommentPress.theme.original.header.dom_ready(),CommentPress.theme.settings.dom_ready(),CommentPress.theme.DOM.dom_ready(),CommentPress.theme.header.dom_ready(),CommentPress.theme.navigation.dom_ready(),CommentPress.theme.content.dom_ready(),CommentPress.theme.sidebars.dom_ready(),CommentPress.theme.viewport.dom_ready(),e(document).on("commentpress-comment-highlight",function(e,t){var n;jQuery("#li-comment-"+t+" > .comment-wrapper").css("background-color","#CBFFBD"),n=jQuery("#comment-"+t+" > .comment-content").css("border-bottom"),CommentPress.theme.settings.set_comment_border(n),jQuery("#comment-"+t+" > .comment-content").css("border-bottom","1px dashed #b8b8b8")}),e(document).on("commentpress-comment-unhighlight",function(e,t){var n;n=CommentPress.theme.settings.get_comment_border(),jQuery("#li-comment-"+t+" > .comment-wrapper").css("background-color","#fff"),jQuery("#comment-"+t+" > .comment-content").css("border-bottom",n)}),e(document).on("commentpress-comment-highlights-clear",function(e){var t;t=CommentPress.theme.settings.get_comment_border(),jQuery(".comment-wrapper").css("background-color","#fff"),jQuery(".comment-content").css("border-bottom",t)}),"1"==cp_special_page?CommentPress.common.content.on_load_scroll_to_comment():CommentPress.theme.viewport.on_load_scroll_to_anchor(),e(document).trigger("commentpress-document-ready")});
Note: See TracChangeset
for help on using the changeset viewer.