Plugin Directory

Changeset 1218118


Ignore:
Timestamp:
08/11/2015 12:10:17 PM (11 years ago)
Author:
commentpress
Message:

release 3.8.2

Location:
commentpress-core/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • commentpress-core/trunk/commentpress-core.php

    r1197799 r1218118  
    55Description: CommentPress allows readers to comment in the margins of a text. You can use it to annotate, gloss, workshop, debate and more!
    66Author: Institute for the Future of the Book
    7 Version: 3.8.1
     7Version: 3.8.2
    88Author URI: http://www.futureofthebook.org
    99Text Domain: commentpress-core
     
    2323
    2424// set version
    25 define( 'COMMENTPRESS_VERSION', '3.8.1' );
     25define( 'COMMENTPRESS_VERSION', '3.8.2' );
    2626
    2727// store reference to this file
  • commentpress-core/trunk/commentpress-core/assets/includes/theme/theme-functions.php

    r1189714 r1218118  
    34363436
    34373437
     3438if ( ! 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 */
     3445function 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}
     3480endif;
     3481
     3482// add filter for search query modification
     3483add_filter( 'pre_get_posts', 'commentpress_amend_search_query' );
     3484
     3485
     3486
    34383487if ( ! function_exists( 'commentpress_amend_password_form' ) ):
    34393488/**
  • commentpress-core/trunk/commentpress-core/assets/js/jquery.commentpress.js

    r1197799 r1218118  
    12161216            event.preventDefault();
    12171217
     1218            // prevent bubbling
     1219            event.stopPropagation();
     1220
    12181221            // get target
    12191222            target = $(this).prop('href').split('#')[1];
     
    12441247                // override event
    12451248                event.preventDefault();
     1249
     1250                // prevent bubbling
     1251                event.stopPropagation();
    12461252
    12471253                // remove url
     
    12731279            // override event
    12741280            event.preventDefault();
     1281
     1282            // prevent bubbling
     1283            event.stopPropagation();
    12751284
    12761285            // get target
     
    16141623
    16151624            // activate it (this will become a theme method)
    1616             CommentPress.theme.sidebars.activate_sidebar('comments');
     1625            CommentPress.theme.sidebars.activate_sidebar( 'comments' );
    16171626
    16181627        });
  • 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")});
     1var 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  
    522522        // add the column, if not already there
    523523        $result = maybe_add_column(
    524 
    525524            $wpdb->comments,
    526525            'comment_signature',
    527526            "ALTER TABLE `$wpdb->comments` ADD `comment_signature` VARCHAR(255) NULL;"
    528 
    529527        );
    530528
     
    36193617        // init options array
    36203618        $this->commentpress_options = array(
    3621 
    36223619            'cp_show_posts_or_pages_in_toc' => $this->toc_content,
    36233620            'cp_toc_chapter_is_page' => $this->toc_chapter_is_page,
     
    36383635            'cp_featured_images' => $this->featured_images,
    36393636            'cp_textblock_meta' => $this->textblock_meta,
    3640 
    36413637        );
    36423638
  • commentpress-core/trunk/commentpress-core/class_commentpress_display.php

    r1189714 r1218118  
    382382            // add our javascript script and dependencies
    383383            wp_enqueue_script(
    384 
    385384                'commentpress_custom_quicktags',
    386385                plugin_dir_url( COMMENTPRESS_PLUGIN_FILE ) . 'commentpress-core/assets/js/cp_quicktags_3.3.js',
     
    388387                COMMENTPRESS_VERSION, // version
    389388                true // in footer
    390 
    391389            );
    392390
     
    395393            // add our javascript script and dependencies
    396394            wp_enqueue_script(
    397 
    398395                'commentpress_custom_quicktags',
    399396                plugin_dir_url( COMMENTPRESS_PLUGIN_FILE ) . 'commentpress-core/assets/js/cp_quicktags.js',
     
    401398                COMMENTPRESS_VERSION, // version
    402399                false // not in footer (but may need to be in WP 3.3)
    403 
    404400            );
    405401
     
    419415        // add jQuery UI stylesheet -> needed for resizable columns
    420416        wp_enqueue_style(
    421 
    422417            'cp_jquery_ui_base',
    423418            plugins_url( 'commentpress-core/assets/css/jquery.ui.css', COMMENTPRESS_PLUGIN_FILE ),
     
    425420            COMMENTPRESS_VERSION, // version
    426421            'all' // media
    427 
    428422        );
    429423
     
    781775        // set list pages defaults
    782776        $args = array(
    783 
    784777            'sort_column' => 'menu_order, post_title',
    785778            'menu_class' => 'menu',
     
    790783            'link_before' => '',
    791784            'link_after' => ''
    792 
    793785        );
    794786        */
     
    799791            // try and use it
    800792            wp_nav_menu( array(
    801 
    802793                'theme_location' => 'toc',
    803794                'echo' => true,
    804795                'container' => '',
    805796                'items_wrap' => '%3$s',
    806 
    807797            ) );
    808798
     
    857847        // set list pages defaults
    858848        $defaults = array(
    859 
    860849            'depth' => $depth,
    861850            'show_date' => '',
     
    869858            'link_before' => '',
    870859            'link_after' => '',
    871             'exclude_tree' => ''
    872 
     860            'exclude_tree' => '',
    873861        );
    874862
     
    926914
    927915                // 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                );
    944925
    945926                // 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                );
    962936
    963937                break;
     
    969943
    970944                // 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                );
    987954
    988955                // 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                );
    1005965
    1006966                break;
     
    1013973
    1014974                // 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                );
    1031984
    1032985                // 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                );
    1049995
    1050996                break;
     
    10931039
    10941040                // 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                );
    11111050
    11121051                // define paragraph marker
     
    11211060
    11221061                // 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                );
    11391071
    11401072                // define paragraph marker
     
    11501082
    11511083                // 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                );
    11681093
    11691094                // define paragraph marker
     
    14801405            // if there are options
    14811406            if ( $upgrade != '' ) {
    1482 
    14831407                $options_text = __( ' The following options have become available in the new version.', 'commentpress-core' );
    1484 
    14851408            }
    14861409
  • commentpress-core/trunk/languages/commentpress-core.pot

    r1197799 r1218118  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: CommentPress Core 3.8.1\n"
     5"Project-Id-Version: CommentPress Core 3.8.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/commentpress-core\n"
    7 "POT-Creation-Date: 2015-07-13 09:46:52+00:00\n"
     7"POT-Creation-Date: 2015-08-11 12:06:58+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=UTF-8\n"
     
    6868#: commentpress-ajax/cp-ajax-comments.php:181
    6969#: commentpress-core/class_commentpress.php:2576
    70 #: commentpress-core/class_commentpress_display.php:1869
    71 #: commentpress-core/class_commentpress_display.php:2294
     70#: commentpress-core/class_commentpress_display.php:1792
     71#: commentpress-core/class_commentpress_display.php:2217
    7272#: themes/commentpress-modern/activity/index.php:120
    7373#: themes/commentpress-modern/assets/templates/comments_sidebar.php:20
     
    113113#: commentpress-core/assets/includes/bp-compat/ajax.php:564
    114114#: themes/commentpress-modern/activity/entry.php:104
    115 #: themes/commentpress-modern/functions.php:276
     115#: themes/commentpress-modern/functions.php:270
    116116#: themes/commentpress-theme/activity/entry.php:104
    117117msgid "Remove Favorite"
     
    121121#: commentpress-core/assets/includes/bp-compat/ajax.php:562
    122122#: themes/commentpress-modern/activity/entry.php:100
    123 #: themes/commentpress-modern/functions.php:273
     123#: themes/commentpress-modern/functions.php:267
    124124#: themes/commentpress-theme/activity/entry.php:100
    125125msgid "Favorite"
     
    289289
    290290#: commentpress-core/assets/includes/theme/theme-functions.php:1008
    291 #: commentpress-core/class_commentpress_display.php:639
     291#: commentpress-core/class_commentpress_display.php:633
    292292#: commentpress-multisite/class_commentpress_mu_bp.php:783
    293293msgid " &amp; "
     
    296296#: commentpress-core/assets/includes/theme/theme-functions.php:1036
    297297#: commentpress-core/assets/includes/theme/theme-functions.php:1052
    298 #: commentpress-core/class_commentpress_display.php:669
    299 #: commentpress-core/class_commentpress_display.php:689
     298#: commentpress-core/class_commentpress_display.php:663
     299#: commentpress-core/class_commentpress_display.php:683
    300300#: themes/commentpress-modern/image.php:54
    301301#: themes/commentpress-theme/author.php:138
     
    309309
    310310#: commentpress-core/assets/includes/theme/theme-functions.php:1131
    311 #: commentpress-core/class_commentpress_display.php:740
     311#: commentpress-core/class_commentpress_display.php:734
    312312msgid "Posts by %s"
    313313msgstr ""
     
    341341#: commentpress-core/assets/includes/theme/theme-functions.php:1420
    342342#: commentpress-core/class_commentpress.php:1603
    343 #: commentpress-core/class_commentpress_db.php:3327
     343#: commentpress-core/class_commentpress_db.php:3325
    344344msgid "Comments by Commenter"
    345345msgstr ""
     
    460460
    461461#: commentpress-core/assets/includes/theme/theme-functions.php:2826
    462 #: themes/commentpress-modern/functions.php:860
     462#: themes/commentpress-modern/functions.php:850
    463463#: themes/commentpress-theme/functions.php:547
    464464msgid "Next page"
     
    466466
    467467#: commentpress-core/assets/includes/theme/theme-functions.php:2827
    468 #: themes/commentpress-modern/functions.php:890
     468#: themes/commentpress-modern/functions.php:880
    469469#: themes/commentpress-theme/functions.php:575
    470470msgid "Previous page"
     
    475475msgstr ""
    476476
    477 #: commentpress-core/assets/includes/theme/theme-functions.php:3477
     477#: commentpress-core/assets/includes/theme/theme-functions.php:3526
    478478msgid "CommentPress Footer"
    479479msgstr ""
    480480
    481 #: commentpress-core/assets/includes/theme/theme-functions.php:3479
     481#: commentpress-core/assets/includes/theme/theme-functions.php:3528
    482482msgid "An optional widget area in the page footer of the CommentPress theme"
    483483msgstr ""
    484484
    485 #: commentpress-core/assets/includes/theme/theme-functions.php:3639
     485#: commentpress-core/assets/includes/theme/theme-functions.php:3688
    486486msgid "Newer version"
    487487msgstr ""
    488488
    489 #: commentpress-core/assets/includes/theme/theme-functions.php:3676
     489#: commentpress-core/assets/includes/theme/theme-functions.php:3725
    490490msgid "Older version"
    491491msgstr ""
     
    500500
    501501#: commentpress-core/class_commentpress.php:416
    502 #: commentpress-core/class_commentpress_display.php:1525
     502#: commentpress-core/class_commentpress_display.php:1448
    503503#: commentpress-multisite/class_commentpress_mu_admin.php:959
    504504#: commentpress-multisite/class_commentpress_mu_admin.php:1103
     
    537537
    538538#: commentpress-core/class_commentpress.php:991
    539 #: commentpress-core/class_commentpress_display.php:1622
    540 #: commentpress-core/class_commentpress_display.php:1891
     539#: commentpress-core/class_commentpress_display.php:1545
     540#: commentpress-core/class_commentpress_display.php:1814
    541541msgid "Show page meta"
    542542msgstr ""
    543543
    544544#: commentpress-core/class_commentpress.php:992
    545 #: commentpress-core/class_commentpress_display.php:1623
    546 #: commentpress-core/class_commentpress_display.php:1892
     545#: commentpress-core/class_commentpress_display.php:1546
     546#: commentpress-core/class_commentpress_display.php:1815
    547547msgid "Hide page meta"
    548548msgstr ""
     
    598598
    599599#: commentpress-core/class_commentpress.php:1581
    600 #: commentpress-core/class_commentpress_db.php:3159
     600#: commentpress-core/class_commentpress_db.php:3157
    601601#: themes/commentpress-modern/assets/templates/navigation.php:82
    602602#: themes/commentpress-theme/assets/templates/navigation.php:213
     
    605605
    606606#: commentpress-core/class_commentpress.php:1586
    607 #: commentpress-core/class_commentpress_db.php:3276
    608 #: themes/commentpress-modern/functions.php:1121
     607#: commentpress-core/class_commentpress_db.php:3274
     608#: themes/commentpress-modern/functions.php:1111
    609609#: themes/commentpress-theme/functions.php:804
    610610msgid "All Comments"
     
    612612
    613613#: commentpress-core/class_commentpress.php:1590
    614 #: commentpress-core/class_commentpress_db.php:3225
     614#: commentpress-core/class_commentpress_db.php:3223
    615615#: themes/commentpress-modern/comments-general.php:34
    616616#: themes/commentpress-theme/comments-general.php:33
     
    619619
    620620#: commentpress-core/class_commentpress.php:1594
    621 #: commentpress-core/class_commentpress_db.php:3378
     621#: commentpress-core/class_commentpress_db.php:3376
    622622#: themes/commentpress-theme/assets/templates/navigation.php:76
    623623msgid "Blog"
     
    625625
    626626#: commentpress-core/class_commentpress.php:1599
    627 #: commentpress-core/class_commentpress_db.php:3432
     627#: commentpress-core/class_commentpress_db.php:3430
    628628msgid "Blog Archive"
    629629msgstr ""
     
    646646
    647647#: commentpress-core/class_commentpress.php:2574
    648 #: commentpress-core/class_commentpress_display.php:1867
    649 #: commentpress-core/class_commentpress_display.php:2292
     648#: commentpress-core/class_commentpress_display.php:1790
     649#: commentpress-core/class_commentpress_display.php:2215
    650650#: themes/commentpress-modern/assets/templates/toc_sidebar.php:15
    651651#: themes/commentpress-theme/sidebar.php:160
     
    654654
    655655#: commentpress-core/class_commentpress.php:2575
    656 #: commentpress-core/class_commentpress_display.php:1868
    657 #: commentpress-core/class_commentpress_display.php:2293
     656#: commentpress-core/class_commentpress_display.php:1791
     657#: commentpress-core/class_commentpress_display.php:2216
    658658#: themes/commentpress-modern/sidebar.php:122
    659659#: themes/commentpress-theme/sidebar.php:113
     
    665665msgstr ""
    666666
    667 #: commentpress-core/class_commentpress_db.php:957
     667#: commentpress-core/class_commentpress_db.php:955
    668668#: commentpress-multisite/class_commentpress_mu_admin.php:406
    669669msgid "You must supply an option to option_exists()"
    670670msgstr ""
    671671
    672 #: commentpress-core/class_commentpress_db.php:981
     672#: commentpress-core/class_commentpress_db.php:979
    673673#: commentpress-multisite/class_commentpress_mu_admin.php:430
    674674msgid "You must supply an option to option_get()"
    675675msgstr ""
    676676
    677 #: commentpress-core/class_commentpress_db.php:1005
     677#: commentpress-core/class_commentpress_db.php:1003
    678678#: commentpress-multisite/class_commentpress_mu_admin.php:454
    679679msgid "You must supply an option to option_set()"
    680680msgstr ""
    681681
    682 #: commentpress-core/class_commentpress_db.php:1013
     682#: commentpress-core/class_commentpress_db.php:1011
    683683#: commentpress-multisite/class_commentpress_mu_admin.php:462
    684684msgid "You must supply the option as a string to option_set()"
    685685msgstr ""
    686686
    687 #: commentpress-core/class_commentpress_db.php:1036
     687#: commentpress-core/class_commentpress_db.php:1034
    688688#: commentpress-multisite/class_commentpress_mu_admin.php:485
    689689msgid "You must supply an option to option_delete()"
    690690msgstr ""
    691691
    692 #: commentpress-core/class_commentpress_db.php:1059
     692#: commentpress-core/class_commentpress_db.php:1057
    693693msgid "You must supply an option to option_wp_exists()"
    694694msgstr ""
    695695
    696 #: commentpress-core/class_commentpress_db.php:1093
     696#: commentpress-core/class_commentpress_db.php:1091
    697697msgid "You must supply an option to option_wp_get()"
    698698msgstr ""
    699699
    700 #: commentpress-core/class_commentpress_db.php:1117
     700#: commentpress-core/class_commentpress_db.php:1115
    701701msgid "You must supply an option to option_wp_set()"
    702702msgstr ""
    703703
    704 #: commentpress-core/class_commentpress_db.php:3079
     704#: commentpress-core/class_commentpress_db.php:3077
    705705msgid "Copy of "
    706706msgstr ""
    707707
    708 #: commentpress-core/class_commentpress_db.php:3165
     708#: commentpress-core/class_commentpress_db.php:3163
    709709#: commentpress-multisite/class_commentpress_mu_ms.php:780
    710710msgid ""
     
    716716msgstr ""
    717717
    718 #: commentpress-core/class_commentpress_db.php:3231
    719 #: commentpress-core/class_commentpress_db.php:3282
    720 #: commentpress-core/class_commentpress_db.php:3333
    721 #: commentpress-core/class_commentpress_db.php:3384
    722 #: commentpress-core/class_commentpress_db.php:3438
    723 #: commentpress-core/class_commentpress_db.php:3489
     718#: 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
    724724msgid "Do not delete this page. Page content is generated with a custom template."
    725725msgstr ""
    726726
    727 #: commentpress-core/class_commentpress_db.php:3483
    728 #: commentpress-core/class_commentpress_display.php:1582
     727#: commentpress-core/class_commentpress_db.php:3481
     728#: commentpress-core/class_commentpress_display.php:1505
    729729#: themes/commentpress-modern/assets/templates/toc_dropdown.php:9
    730730#: themes/commentpress-modern/assets/templates/toc_sidebar.php:68
    731 #: themes/commentpress-modern/functions.php:125
     731#: themes/commentpress-modern/functions.php:121
    732732#: themes/commentpress-theme/assets/templates/toc_dropdown.php:9
    733733#: themes/commentpress-theme/assets/templates/toc_sidebar.php:9
     
    760760msgstr ""
    761761
    762 #: commentpress-core/class_commentpress_display.php:1331
     762#: commentpress-core/class_commentpress_display.php:1256
    763763msgid "Minimise all Comment Sections"
    764764msgstr ""
    765765
    766 #: commentpress-core/class_commentpress_display.php:1336
     766#: commentpress-core/class_commentpress_display.php:1261
    767767msgid "Minimise all Activity Sections"
    768768msgstr ""
    769769
    770 #: commentpress-core/class_commentpress_display.php:1341
     770#: commentpress-core/class_commentpress_display.php:1266
    771771msgid "Minimise all Contents Sections"
    772772msgstr ""
    773773
    774 #: commentpress-core/class_commentpress_display.php:1361
     774#: commentpress-core/class_commentpress_display.php:1286
    775775msgid "Minimise Header"
    776776msgstr ""
    777777
    778 #: commentpress-core/class_commentpress_display.php:1483
     778#: commentpress-core/class_commentpress_display.php:1407
    779779msgid " The following options have become available in the new version."
    780780msgstr ""
    781781
    782 #: commentpress-core/class_commentpress_display.php:1491
     782#: commentpress-core/class_commentpress_display.php:1414
    783783msgid "CommentPress Core Upgrade"
    784784msgstr ""
    785785
    786 #: commentpress-core/class_commentpress_display.php:1501
     786#: commentpress-core/class_commentpress_display.php:1424
    787787msgid "Please upgrade CommentPress Core"
    788788msgstr ""
    789789
    790 #: commentpress-core/class_commentpress_display.php:1503
     790#: commentpress-core/class_commentpress_display.php:1426
    791791msgid "It looks like you are running an older version of CommentPress Core."
    792792msgstr ""
    793793
    794 #: commentpress-core/class_commentpress_display.php:1514
     794#: commentpress-core/class_commentpress_display.php:1437
    795795#: commentpress-multisite/class_commentpress_mu_admin.php:1095
    796796msgid "Upgrade"
    797797msgstr ""
    798798
    799 #: commentpress-core/class_commentpress_display.php:1560
     799#: commentpress-core/class_commentpress_display.php:1483
    800800msgid "When a supplied CommentPress theme (or a valid CommentPress child theme) is active, the following options modify its behaviour."
    801801msgstr ""
    802802
    803 #: commentpress-core/class_commentpress_display.php:1566
     803#: commentpress-core/class_commentpress_display.php:1489
    804804#: commentpress-multisite/class_commentpress_mu_ms.php:537
    805805msgid "Global Options"
    806806msgstr ""
    807807
    808 #: commentpress-core/class_commentpress_display.php:1584
     808#: commentpress-core/class_commentpress_display.php:1507
    809809msgid ""
    810810"Choose how you want your Table of Contents to appear and function.<br />\n"
     
    812812msgstr ""
    813813
    814 #: commentpress-core/class_commentpress_display.php:1597
     814#: commentpress-core/class_commentpress_display.php:1520
    815815msgid "Page Display Options"
    816816msgstr ""
    817817
    818 #: commentpress-core/class_commentpress_display.php:1602
    819 #: commentpress-core/class_commentpress_display.php:1843
     818#: commentpress-core/class_commentpress_display.php:1525
     819#: commentpress-core/class_commentpress_display.php:1766
    820820msgid "Enable Featured Images (Note: if you have already implemented this in a child theme, you should choose \"No\")"
    821821msgstr ""
    822822
    823 #: commentpress-core/class_commentpress_display.php:1604
    824 #: commentpress-core/class_commentpress_display.php:1844
     823#: commentpress-core/class_commentpress_display.php:1527
     824#: commentpress-core/class_commentpress_display.php:1767
    825825#: themes/commentpress-modern/groups/single/admin.php:26
    826826#: themes/commentpress-modern/registration/register.php:265
     
    830830msgstr ""
    831831
    832 #: commentpress-core/class_commentpress_display.php:1605
    833 #: commentpress-core/class_commentpress_display.php:1845
     832#: commentpress-core/class_commentpress_display.php:1528
     833#: commentpress-core/class_commentpress_display.php:1768
    834834#: themes/commentpress-modern/groups/single/admin.php:27
    835835#: themes/commentpress-modern/registration/register.php:266
     
    839839msgstr ""
    840840
    841 #: commentpress-core/class_commentpress_display.php:1611
     841#: commentpress-core/class_commentpress_display.php:1534
    842842msgid "Default page title visibility (can be overridden on individual pages)"
    843843msgstr ""
    844844
    845 #: commentpress-core/class_commentpress_display.php:1613
    846 #: commentpress-core/class_commentpress_display.php:2053
     845#: commentpress-core/class_commentpress_display.php:1536
     846#: commentpress-core/class_commentpress_display.php:1976
    847847msgid "Show page titles"
    848848msgstr ""
    849849
    850 #: commentpress-core/class_commentpress_display.php:1614
    851 #: commentpress-core/class_commentpress_display.php:2054
     850#: commentpress-core/class_commentpress_display.php:1537
     851#: commentpress-core/class_commentpress_display.php:1977
    852852msgid "Hide page titles"
    853853msgstr ""
    854854
    855 #: commentpress-core/class_commentpress_display.php:1620
     855#: commentpress-core/class_commentpress_display.php:1543
    856856msgid "Default page meta visibility (can be overridden on individual pages)"
    857857msgstr ""
    858858
    859 #: commentpress-core/class_commentpress_display.php:1631
     859#: commentpress-core/class_commentpress_display.php:1554
    860860msgid "Blog excerpt length"
    861861msgstr ""
    862862
    863 #: commentpress-core/class_commentpress_display.php:1632
     863#: commentpress-core/class_commentpress_display.php:1555
    864864msgid "words"
    865865msgstr ""
    866866
    867 #: commentpress-core/class_commentpress_display.php:1641
     867#: commentpress-core/class_commentpress_display.php:1564
    868868msgid "Commenting Options"
    869869msgstr ""
    870870
    871 #: commentpress-core/class_commentpress_display.php:1655
     871#: commentpress-core/class_commentpress_display.php:1578
    872872msgid "Theme Customisation"
    873873msgstr ""
    874874
    875 #: commentpress-core/class_commentpress_display.php:1657
     875#: commentpress-core/class_commentpress_display.php:1580
    876876msgid ""
    877877"You can set a custom background colour in <em>Appearance &#8594; Background</em>.<br />\n"
     
    880880msgstr ""
    881881
    882 #: commentpress-core/class_commentpress_display.php:1664
    883 #: commentpress-core/class_commentpress_display.php:2074
     882#: commentpress-core/class_commentpress_display.php:1587
     883#: commentpress-core/class_commentpress_display.php:1997
    884884msgid "Header Background Colour"
    885885msgstr ""
    886886
    887 #: commentpress-core/class_commentpress_display.php:1665
    888 #: commentpress-core/class_commentpress_display.php:2075
     887#: commentpress-core/class_commentpress_display.php:1588
     888#: commentpress-core/class_commentpress_display.php:1998
    889889msgid "If you want to hide header text, add <strong>#blank</strong> as text colour."
    890890msgstr ""
    891891
    892 #: commentpress-core/class_commentpress_display.php:1665
    893 #: commentpress-core/class_commentpress_display.php:2076
     892#: commentpress-core/class_commentpress_display.php:1588
     893#: commentpress-core/class_commentpress_display.php:1999
    894894msgid "Select a Colour"
    895895msgstr ""
    896896
    897 #: commentpress-core/class_commentpress_display.php:1669
    898 #: commentpress-core/class_commentpress_display.php:2093
     897#: commentpress-core/class_commentpress_display.php:1592
     898#: commentpress-core/class_commentpress_display.php:2016
    899899msgid "Scroll speed"
    900900msgstr ""
    901901
    902 #: commentpress-core/class_commentpress_display.php:1670
    903 #: commentpress-core/class_commentpress_display.php:2094
     902#: commentpress-core/class_commentpress_display.php:1593
     903#: commentpress-core/class_commentpress_display.php:2017
    904904msgid "milliseconds"
    905905msgstr ""
    906906
    907 #: commentpress-core/class_commentpress_display.php:1674
    908 #: commentpress-core/class_commentpress_display.php:2111
     907#: commentpress-core/class_commentpress_display.php:1597
     908#: commentpress-core/class_commentpress_display.php:2034
    909909msgid "Minimum page width"
    910910msgstr ""
    911911
    912 #: commentpress-core/class_commentpress_display.php:1675
    913 #: commentpress-core/class_commentpress_display.php:2112
     912#: commentpress-core/class_commentpress_display.php:1598
     913#: commentpress-core/class_commentpress_display.php:2035
    914914msgid "pixels"
    915915msgstr ""
    916916
    917 #: commentpress-core/class_commentpress_display.php:1718
     917#: commentpress-core/class_commentpress_display.php:1641
    918918#: commentpress-core/class_commentpress_formatter.php:108
    919919msgid "Default Text Format"
    920920msgstr ""
    921921
    922 #: commentpress-core/class_commentpress_display.php:1724
     922#: commentpress-core/class_commentpress_display.php:1647
    923923msgid " (can be overridden on individual pages)"
    924924msgstr ""
    925925
    926 #: commentpress-core/class_commentpress_display.php:1772
    927 #: commentpress-core/class_commentpress_display.php:1966
     926#: commentpress-core/class_commentpress_display.php:1695
     927#: commentpress-core/class_commentpress_display.php:1889
    928928#: commentpress-multisite/class_commentpress_mu_admin.php:734
    929929#: commentpress-multisite/class_commentpress_mu_bp.php:1692
     
    932932msgstr ""
    933933
    934 #: commentpress-core/class_commentpress_display.php:1820
    935 #: commentpress-core/class_commentpress_display.php:2355
     934#: commentpress-core/class_commentpress_display.php:1743
     935#: commentpress-core/class_commentpress_display.php:2278
    936936msgid "Show paragraph meta (Number and Comment Icon)"
    937937msgstr ""
    938938
    939 #: commentpress-core/class_commentpress_display.php:1821
    940 #: commentpress-core/class_commentpress_display.php:2357
     939#: commentpress-core/class_commentpress_display.php:1744
     940#: commentpress-core/class_commentpress_display.php:2280
    941941msgid "Always"
    942942msgstr ""
    943943
    944 #: commentpress-core/class_commentpress_display.php:1822
    945 #: commentpress-core/class_commentpress_display.php:2358
     944#: commentpress-core/class_commentpress_display.php:1745
     945#: commentpress-core/class_commentpress_display.php:2281
    946946msgid "On rollover"
    947947msgstr ""
    948948
    949 #: commentpress-core/class_commentpress_display.php:1866
    950 #: commentpress-core/class_commentpress_display.php:2291
     949#: commentpress-core/class_commentpress_display.php:1789
     950#: commentpress-core/class_commentpress_display.php:2214
    951951msgid "Which sidebar do you want to be active by default? (can be overridden on individual pages)"
    952952msgstr ""
    953953
    954 #: commentpress-core/class_commentpress_display.php:1890
     954#: commentpress-core/class_commentpress_display.php:1813
    955955msgid "Show or hide page meta by default"
    956956msgstr ""
    957957
    958 #: commentpress-core/class_commentpress_display.php:1921
     958#: commentpress-core/class_commentpress_display.php:1844
    959959msgid "Blog Type"
    960960msgstr ""
    961961
    962 #: commentpress-core/class_commentpress_display.php:1987
    963 #: commentpress-core/class_commentpress_display.php:2231
     962#: commentpress-core/class_commentpress_display.php:1910
     963#: commentpress-core/class_commentpress_display.php:2154
    964964msgid "Appearance of TOC for posts"
    965965msgstr ""
    966966
    967 #: commentpress-core/class_commentpress_display.php:1988
    968 #: commentpress-core/class_commentpress_display.php:2232
     967#: commentpress-core/class_commentpress_display.php:1911
     968#: commentpress-core/class_commentpress_display.php:2155
    969969msgid "Extended information"
    970970msgstr ""
    971971
    972 #: commentpress-core/class_commentpress_display.php:1989
    973 #: commentpress-core/class_commentpress_display.php:2233
     972#: commentpress-core/class_commentpress_display.php:1912
     973#: commentpress-core/class_commentpress_display.php:2156
    974974msgid "Just the title"
    975975msgstr ""
    976976
    977 #: commentpress-core/class_commentpress_display.php:2009
    978 #: commentpress-core/class_commentpress_display.php:2179
     977#: commentpress-core/class_commentpress_display.php:1932
     978#: commentpress-core/class_commentpress_display.php:2102
    979979msgid "Comment form editor"
    980980msgstr ""
    981981
    982 #: commentpress-core/class_commentpress_display.php:2010
    983 #: commentpress-core/class_commentpress_display.php:2180
     982#: commentpress-core/class_commentpress_display.php:1933
     983#: commentpress-core/class_commentpress_display.php:2103
    984984msgid "Rich-text Editor"
    985985msgstr ""
    986986
    987 #: commentpress-core/class_commentpress_display.php:2011
    988 #: commentpress-core/class_commentpress_display.php:2181
     987#: commentpress-core/class_commentpress_display.php:1934
     988#: commentpress-core/class_commentpress_display.php:2104
    989989msgid "Plain-text Editor"
    990990msgstr ""
    991991
    992 #: commentpress-core/class_commentpress_display.php:2030
    993 #: commentpress-core/class_commentpress_display.php:2183
     992#: commentpress-core/class_commentpress_display.php:1953
     993#: commentpress-core/class_commentpress_display.php:2106
    994994msgid "Default comment form behaviour"
    995995msgstr ""
    996996
    997 #: commentpress-core/class_commentpress_display.php:2031
    998 #: commentpress-core/class_commentpress_display.php:2184
     997#: commentpress-core/class_commentpress_display.php:1954
     998#: commentpress-core/class_commentpress_display.php:2107
    999999msgid "Promote reading"
    10001000msgstr ""
    10011001
    1002 #: commentpress-core/class_commentpress_display.php:2032
    1003 #: commentpress-core/class_commentpress_display.php:2185
     1002#: commentpress-core/class_commentpress_display.php:1955
     1003#: commentpress-core/class_commentpress_display.php:2108
    10041004msgid "Promote commenting"
    10051005msgstr ""
    10061006
    1007 #: commentpress-core/class_commentpress_display.php:2052
     1007#: commentpress-core/class_commentpress_display.php:1975
    10081008msgid "Show or hide page titles by default"
    10091009msgstr ""
    10101010
    1011 #: commentpress-core/class_commentpress_display.php:2154
     1011#: commentpress-core/class_commentpress_display.php:2077
    10121012msgid "Reset options to plugin defaults"
    10131013msgstr ""
    10141014
    1015 #: commentpress-core/class_commentpress_display.php:2223
     1015#: commentpress-core/class_commentpress_display.php:2146
    10161016msgid "Table of Contents contains"
    10171017msgstr ""
    10181018
    1019 #: commentpress-core/class_commentpress_display.php:2224
     1019#: commentpress-core/class_commentpress_display.php:2147
    10201020#: themes/commentpress-modern/activity/index.php:119
    10211021#: themes/commentpress-modern/forums/forums-loop.php:40
     
    10271027msgstr ""
    10281028
    1029 #: commentpress-core/class_commentpress_display.php:2225
    1030 #: commentpress-core/class_commentpress_display.php:2228
     1029#: commentpress-core/class_commentpress_display.php:2148
     1030#: commentpress-core/class_commentpress_display.php:2151
    10311031msgid "Pages"
    10321032msgstr ""
    10331033
    1034 #: commentpress-core/class_commentpress_display.php:2227
     1034#: commentpress-core/class_commentpress_display.php:2150
    10351035msgid "Chapters are"
    10361036msgstr ""
    10371037
    1038 #: commentpress-core/class_commentpress_display.php:2229
     1038#: commentpress-core/class_commentpress_display.php:2152
    10391039msgid "Headings"
    10401040msgstr ""
    10411041
    1042 #: commentpress-core/class_commentpress_display.php:2328
     1042#: commentpress-core/class_commentpress_display.php:2251
    10431043msgid "Enable \"live\" comment refreshing (Please note: may cause heavy load on your server)"
    10441044msgstr ""
    10451045
    1046 #: commentpress-core/class_commentpress_display.php:2380
     1046#: commentpress-core/class_commentpress_display.php:2303
    10471047#: commentpress-multisite/class_commentpress_mu_admin.php:1088
    10481048#: commentpress-multisite/class_commentpress_mu_ms.php:620
     
    23152315#. translators: header image description
    23162316
    2317 #: themes/commentpress-modern/functions.php:95
     2317#: themes/commentpress-modern/functions.php:91
    23182318#: themes/commentpress-theme/functions.php:87
    23192319msgid "Abstract Green"
     
    23222322#. translators: header image description
    23232323
    2324 #: themes/commentpress-modern/functions.php:101
     2324#: themes/commentpress-modern/functions.php:97
    23252325#: themes/commentpress-theme/functions.php:93
    23262326msgid "Abstract Red"
     
    23292329#. translators: header image description
    23302330
    2331 #: themes/commentpress-modern/functions.php:107
     2331#: themes/commentpress-modern/functions.php:103
    23322332#: themes/commentpress-theme/functions.php:99
    23332333msgid "Abstract Blue"
     
    23362336#. translators: header image description
    23372337
    2338 #: themes/commentpress-modern/functions.php:113
     2338#: themes/commentpress-modern/functions.php:109
    23392339#: themes/commentpress-theme/functions.php:105
    23402340msgid "Abstract Violet"
    23412341msgstr ""
    23422342
    2343 #: themes/commentpress-modern/functions.php:269
     2343#: themes/commentpress-modern/functions.php:263
    23442344msgid "Accepted"
    23452345msgstr ""
    23462346
    2347 #: themes/commentpress-modern/functions.php:270
     2347#: themes/commentpress-modern/functions.php:264
    23482348#: themes/commentpress-modern/members/single/profile/edit.php:45
    23492349#: themes/commentpress-modern/registration/register.php:110
     
    23532353msgstr ""
    23542354
     2355#: themes/commentpress-modern/functions.php:265
     2356msgid "comments"
     2357msgstr ""
     2358
     2359#: themes/commentpress-modern/functions.php:266
     2360msgid "Are you sure you want to leave this group?"
     2361msgstr ""
     2362
     2363#: themes/commentpress-modern/functions.php:268
     2364msgid "My Favorites"
     2365msgstr ""
     2366
     2367#: themes/commentpress-modern/functions.php:269
     2368msgid "Rejected"
     2369msgstr ""
     2370
    23552371#: themes/commentpress-modern/functions.php:271
    2356 msgid "comments"
     2372msgid "Show all"
    23572373msgstr ""
    23582374
    23592375#: themes/commentpress-modern/functions.php:272
    2360 msgid "Are you sure you want to leave this group?"
     2376msgid "Show all comments for this thread"
     2377msgstr ""
     2378
     2379#: themes/commentpress-modern/functions.php:273
     2380msgid "Show all %d comments"
    23612381msgstr ""
    23622382
    23632383#: themes/commentpress-modern/functions.php:274
    2364 msgid "My Favorites"
     2384msgid "Your profile has unsaved changes. If you leave the page, the changes will be lost."
    23652385msgstr ""
    23662386
    23672387#: themes/commentpress-modern/functions.php:275
    2368 msgid "Rejected"
    2369 msgstr ""
    2370 
    2371 #: themes/commentpress-modern/functions.php:277
    2372 msgid "Show all"
    2373 msgstr ""
    2374 
    2375 #: themes/commentpress-modern/functions.php:278
    2376 msgid "Show all comments for this thread"
    2377 msgstr ""
    2378 
    2379 #: themes/commentpress-modern/functions.php:279
    2380 msgid "Show all %d comments"
    2381 msgstr ""
    2382 
    2383 #: themes/commentpress-modern/functions.php:280
    2384 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:281
    23882388msgid "View"
    23892389msgstr ""
    23902390
    2391 #: themes/commentpress-modern/functions.php:866
     2391#: themes/commentpress-modern/functions.php:856
    23922392#: themes/commentpress-theme/functions.php:553
    23932393msgid "Next page with comments"
    23942394msgstr ""
    23952395
    2396 #: themes/commentpress-modern/functions.php:896
     2396#: themes/commentpress-modern/functions.php:886
    23972397#: themes/commentpress-theme/functions.php:581
    23982398msgid "Previous page with comments"
    23992399msgstr ""
    24002400
    2401 #: themes/commentpress-modern/functions.php:1037
     2401#: themes/commentpress-modern/functions.php:1027
    24022402#: themes/commentpress-theme/functions.php:720
    24032403msgid "Password protected"
    24042404msgstr ""
    24052405
    2406 #: themes/commentpress-modern/functions.php:1133
     2406#: themes/commentpress-modern/functions.php:1123
    24072407#: themes/commentpress-theme/functions.php:816
    24082408msgid "Comments on the Blog"
    24092409msgstr ""
    24102410
    2411 #: themes/commentpress-modern/functions.php:1139
     2411#: themes/commentpress-modern/functions.php:1129
    24122412#: themes/commentpress-theme/functions.php:822
    24132413msgid "Comments on the Pages"
  • commentpress-core/trunk/readme.txt

    r1197799 r1218118  
    44Tags: commentpress, buddypress, groups, blogs, groupblogs, comments, commenting, debate, collaboration
    55Requires at least: 3.4
    6 Tested up to: 4.2
    7 Stable tag: 3.8.1
     6Tested up to: 4.3
     7Stable tag: 3.8.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    222222
    223223
     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
    224230<h4>3.8.1</h4>
    225231
  • commentpress-core/trunk/themes/commentpress-modern/assets/js/screen.js

    r1189714 r1218118  
    115115
    116116        // define vars
    117         var styles, cp_header_height, cp_container_top, cp_container_width, cp_book_nav_width;
     117        var styles, cp_header_height;
    118118
    119119        // init styles
  • commentpress-core/trunk/themes/commentpress-modern/functions.php

    r1189714 r1218118  
    4444        // allow custom backgrounds
    4545        add_theme_support( 'custom-background', array(
    46 
    4746            'default-color'          => 'ccc',
    4847            'default-image'          => '',
     
    5049            'admin-head-callback'    => '',
    5150            'admin-preview-callback' => ''
    52 
    5351        ) );
    5452
    5553        // allow custom header
    5654        add_theme_support( 'custom-header', array(
    57 
    5855            'default-text-color' => 'eeeeee',
    5956            'width' => apply_filters( 'cp_header_image_width', 940 ),
     
    6158            'wp-head-callback' => 'commentpress_header',
    6259            'admin-head-callback' => 'commentpress_admin_header'
    63 
    6460        ) );
    6561
     
    184180    // add our own BuddyPress css
    185181    wp_enqueue_style(
    186 
    187182        'cp_buddypress_css',
    188183        get_template_directory_uri() . '/assets/css/bp-overrides' . $dev . '.css',
     
    190185        COMMENTPRESS_VERSION, // version
    191186        'all' // media
    192 
    193187    );
    194188
     
    593587    // add print css
    594588    wp_enqueue_style(
    595 
    596589        'cp_print_css',
    597590        get_template_directory_uri() . '/assets/css/print' . $dev . '.css',
     
    599592        COMMENTPRESS_VERSION, // version
    600593        'print'
    601 
    602594    );
    603595
     
    626618    }
    627619
    628     // enqueue accordion-like js
     620    // enqueue support for WP FEE
    629621    wp_enqueue_script(
    630 
    631622        'cp_wp_fee_js',
    632623        get_template_directory_uri() . '/assets/js/wp_fee' . $dev . '.js',
    633624        array( 'cp_common_js' ), // deps
    634625        COMMENTPRESS_VERSION // version
    635 
    636626    );
    637627
     
    639629endif; // commentpress_enqueue_wp_fee_js
    640630
    641 // add a filter for the above, very late so it (hopefully) is last in the queue
     631// add an action to include WP FEE script if detected
    642632add_action( 'commentpress_editor_include_javascript', 'commentpress_enqueue_wp_fee_js' );
    643633
  • commentpress-core/trunk/themes/commentpress-theme/assets/js/cp_js_common.js

    r1189714 r1218118  
    6666
    6767            // 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' ) ) );
    6969            me.save_container_top_max();
    7070
     
    8080
    8181    // init container top max
    82     this.container_top_min = false;
     82    this.container_top_max = false;
    8383
    8484    /**
     
    185185
    186186    /**
    187      * Setter for container top min
     187     * Setter for Contents tab "on top" flag
    188188     */
    189189    this.set_toc_on_top = function( val ) {
     
    192192
    193193    /**
    194      * Getter for container top min
     194     * Getter for Contents tab "on top" flag
    195195     */
    196196    this.get_toc_on_top = function() {
     
    337337            if ( CommentPress.theme.original.header.is_minimised() ) {
    338338
    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                }
    340351
    341352                // 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
    342374
    343375                // adjust for admin bar
     
    351383                styles += '#container { top: ' + cp_container_top + 'px; } ';
    352384                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 bar
    361                         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 comments
    372                 styles += '#book_header { display: none; } ';
    373 
    374                 // adjust for admin bar
    375                 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 divs
    383                 styles += '#container { top: ' + cp_container_top + 'px; } ';
    384                 styles += '#sidebar { top: ' + CommentPress.theme.settings.get_container_top_min() + 'px; } ';
    385385
    386386                // is the admin bar shown?
     
    825825         * Clicking on the "Contents" sidebar header
    826826         *
    827          * @return false
     827         * @return void
    828828         */
    829829        $('#sidebar').on( 'click', '#toc_header h2 a', function( event ) {
     
    10401040
    10411041        // get "visibility" of the requested sidebar
    1042         ontop = $('#' + sidebar + '_sidebar').css('z-index');
     1042        ontop = $('#' + sidebar + '_sidebar').css( 'z-index' );
    10431043
    10441044        // is it hidden (ie, does it have a lower z-index)
     
    10741074
    10751075            // hide all
    1076             $('.sidebar_container').css('visibility','hidden');
     1076            $('.sidebar_container').css( 'visibility', 'hidden' );
    10771077
    10781078            // show it
    1079             $('#' + sidebar + '_sidebar').css('visibility','visible');
     1079            $('#' + sidebar + '_sidebar').css( 'visibility', 'visible' );
    10801080
    10811081            /*
     
    15421542
    15431543        // activate comments sidebar
    1544         CommentPress.theme.sidebars.activate_sidebar('comments');
     1544        CommentPress.theme.sidebars.activate_sidebar( 'comments' );
    15451545
    15461546        // open the matching block
     
    21132113        // toggle
    21142114        if ( me.is_minimised() ) {
     2115            me.open();
     2116        } else {
    21152117            me.close();
    2116         } else {
    2117             me.open();
    21182118        }
    21192119
     
    21722172            duration: 'fast'
    21732173
    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        );
    21872187
    21882188        // is the sidebar minimised?
     
    21992199                duration: 'fast'
    22002200
    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            );
    22072209
    22082210            // animate inner
     
    22832285        container = $('#container');
    22842286
    2285         // slide header
     2287        // hide header
    22862288        book_header.hide();
    22872289
     
    23202322
    23212323                    // when done
    2322                     target_sidebar.css('height','auto');
     2324                    target_sidebar.css( 'height','auto' );
    23232325
    23242326                }
     
    23322334                duration: 'fast'
    23332335
    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;
    23412348
    23422349                }
    23432350
    2344                 // when done
    2345                 header_animating = false;
    2346 
    2347             });
     2351            );
    23482352
    23492353        } else {
     
    23552359                duration: 'fast'
    23562360
    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                    }
    23672373
    23682374                }
    23692375
    2370             });
     2376            );
    23712377
    23722378        }
     
    24112417
    24122418
     2419
     2420    // the default theme implements custom header actions
     2421    CommentPress.theme.original.header.dom_ready();
    24132422
    24142423    // trigger DOM ready methods
     
    24212430    CommentPress.theme.viewport.dom_ready();
    24222431
    2423     // the default theme implements custom header actions
    2424     CommentPress.theme.original.header.dom_ready();
    2425 
    24262432
    24272433
  • 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_min=!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")});
     1CommentPress.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.