Plugin Directory

Changeset 1197799


Ignore:
Timestamp:
07/13/2015 09:50:31 AM (11 years ago)
Author:
commentpress
Message:

release 3.8.1

Location:
commentpress-core/trunk
Files:
5 edited

Legend:

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

    r1189714 r1197799  
    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
     7Version: 3.8.1
    88Author URI: http://www.futureofthebook.org
    99Text Domain: commentpress-core
     
    2323
    2424// set version
    25 define( 'COMMENTPRESS_VERSION', '3.8' );
     25define( 'COMMENTPRESS_VERSION', '3.8.1' );
    2626
    2727// store reference to this file
  • commentpress-core/trunk/commentpress-core/assets/js/jquery.commentpress.js

    r1189714 r1197799  
    14931493         * @return false
    14941494         */
    1495         $('#container').on( 'click', 'content-tabs li h2 a', function( event ) {
     1495        $('#container').on( 'click', '#content-tabs li h2 a', function( event ) {
    14961496
    14971497            // define vars
  • commentpress-core/trunk/commentpress-core/assets/js/jquery.commentpress.min.js

    r1189714 r1197799  
    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(),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")});
  • commentpress-core/trunk/languages/commentpress-core.pot

    r1189720 r1197799  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: CommentPress Core 3.8\n"
     5"Project-Id-Version: CommentPress Core 3.8.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/commentpress-core\n"
    7 "POT-Creation-Date: 2015-06-29 16:33:00+00:00\n"
     7"POT-Creation-Date: 2015-07-13 09:46:52+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=UTF-8\n"
  • commentpress-core/trunk/readme.txt

    r1189714 r1197799  
    55Requires at least: 3.4
    66Tested up to: 4.2
    7 Stable tag: 3.8
     7Stable tag: 3.8.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    222222
    223223
     224<h4>3.8.1</h4>
     225
     226* Fix workflow content tab switching
     227
    224228<h4>3.8</h4>
    225229
Note: See TracChangeset for help on using the changeset viewer.