Changeset 2211693
- Timestamp:
- 12/13/2019 04:04:02 PM (6 years ago)
- Location:
- editorheadlinejump/trunk
- Files:
-
- 4 edited
-
js/mch_ehj_com.min.js (modified) (1 diff)
-
mch-editor-headline-jump.php (modified) (1 diff)
-
mch_ehj_main.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
editorheadlinejump/trunk/js/mch_ehj_com.min.js
r1985256 r2211693 1 var _mchEdjCom=function( ){function c(b){return"_WP_MCH_EHJ_"+b}function d(b){b?(b=c("FloatFlg"),localStorage.setItem(b,1)):(b=c("FloatFlg"),localStorage.setItem(b,0))}function g(b,a){a=a.replace("px","").replace("%","");b=c("bxStyl_"+b);localStorage.setItem(b,a)}var e=function(){var b=localStorage.getItem(c("FloatFlg")),a=!0;if(null===b||0===b||"0"===b)a=!1;return a};var h=function(){if(!$("#__MCH_HEAD_LINE_LIST_BOX__").length){d(!0);var b=localStorage.getItem(c("bxStyl_top")),a=localStorage.getItem(c("bxStyl_left"));2 b=null===b||-1===b?"10%":b+"px";a=null===a||-1===a?"50%":a+"px";console.log(_mchEhjStr);$("body").append('<div id="__MCH_HEAD_LINE_LIST_BOX__" class="postbox " style="top: '+b+";left: "+a+'; "><h2 class="hndle ui-sortable-handle mhl_floatH2"><span>'+_mchEhjStr.headline+'</span></h2>\t\t<div class="mhl_contents inside "><div class="mhl_closeBtnWrap"><a id="__MHL_BTN_FLOAT_CLOSE__" class="button">'+_mchEhjStr.close+'</a></div><div id="__MCH_HEAD_LINE_LIST_FLOAT__"></div></div></div>');_mchEdjCom.updateFloatView()}}; 3 return{create:void 0,updateFloatView:function(){var b=$("#__MCH_HEAD_LINE_LIST_FLOAT__");if(!b.length)return!1;var a=$("#__MCH_HEAD_LINE_LIST__").html();b.html(a);return!0},editorInit:function(){e()&&h();$(document).on("click","#__MHL_BTN_FLOAT_CLOSE__",function(b){$("#__MCH_HEAD_LINE_LIST_BOX__").remove();d(!1)});var b=!1;$(document).on("click",".mhl_floatH2",function(a){if(!b){a=$(this).data("open");var f=$(".mhl_contents");"hide"===a?(f.show(),$(this).data("open","show")):(f.hide(),$(this).data("open", 4 "hide"))}});$(document).on("mousedown","#__MCH_HEAD_LINE_LIST_BOX__ > h2",function(a){b=!1;$("#__MCH_HEAD_LINE_LIST_BOX__").data("mouseDownStartTop",$("#__MCH_HEAD_LINE_LIST_BOX__").css("top").replace("px","").replace("%","")).data("mouseDownStartLeft",$("#__MCH_HEAD_LINE_LIST_BOX__").css("left").replace("px","").replace("%","")).data("clickPointX",a.clientX-$("#__MCH_HEAD_LINE_LIST_BOX__").offset().left).data("clickPointY",a.pageY-$("#__MCH_HEAD_LINE_LIST_BOX__").offset().top);$(document).mousemove(function(a){b=5 !0; $("#__MCH_HEAD_LINE_LIST_BOX__").data("clickPointY");$("#__MCH_HEAD_LINE_LIST_BOX__").data("clickPointX");$("#__MCH_HEAD_LINE_LIST_BOX__").data("clickPointY");var c=a.clientY-$("#__MCH_HEAD_LINE_LIST_BOX__").data("clickPointY");a=a.clientX-$("#__MCH_HEAD_LINE_LIST_BOX__").data("clickPointX");var f=$(window).height(),d=$(window).width();c>.9*f&&(c=.9*f);a>d-250&&(a=d-250);$("#__MCH_HEAD_LINE_LIST_BOX__").css({top:c+"px",left:a+"px"})})});$(document).on("mouseup","#__MCH_HEAD_LINE_LIST_BOX__ > h2",6 function( a){var c=$("#__MCH_HEAD_LINE_LIST_BOX__").data("mouseDownStartTop");a=$("#__MCH_HEAD_LINE_LIST_BOX__").data("mouseDownStartLeft");var d=$("#__MCH_HEAD_LINE_LIST_BOX__").css("top"),e=$("#__MCH_HEAD_LINE_LIST_BOX__").css("left");g("top",d);g("left",e);$(document).unbind("mousemove");c=Math.abs(parseInt(c)-parseInt(d));a=Math.abs(parseInt(a)-parseInt(e));b=5<=c||5<=a?!0:!1})},isOpenFloatView:e,createFloatList:h}}();1 var _mchEdjCom=function(a){function c(a){return"_WP_MCH_EHJ_"+a}function e(a){a?(a=c("FloatFlg"),localStorage.setItem(a,1)):(a=c("FloatFlg"),localStorage.setItem(a,0))}function h(a,b){b=b.replace("px","").replace("%","");a=c("bxStyl_"+a);localStorage.setItem(a,b)}var f=function(){var a=localStorage.getItem(c("FloatFlg")),b=!0;if(null===a||0===a||"0"===a)b=!1;return b};var k=function(){if(!a("#__MCH_HEAD_LINE_LIST_BOX__").length){e(!0);var d=localStorage.getItem(c("bxStyl_top")),b=localStorage.getItem(c("bxStyl_left")); 2 d=null===d||-1===d?"10%":d+"px";b=null===b||-1===b?"50%":b+"px";a("body").append('<div id="__MCH_HEAD_LINE_LIST_BOX__" class="postbox " style="top: '+d+";left: "+b+'; "><h2 class="hndle ui-sortable-handle mhl_floatH2"><span>'+_mchEhjStr.headline+'</span></h2>\t\t<div class="mhl_contents inside "><div class="mhl_closeBtnWrap"><a id="__MHL_BTN_FLOAT_CLOSE__" class="button">'+_mchEhjStr.close+'</a></div><div id="__MCH_HEAD_LINE_LIST_FLOAT__"></div></div></div>');_mchEdjCom.updateFloatView()}};return{create:void 0, 3 updateFloatView:function(){var d=a("#__MCH_HEAD_LINE_LIST_FLOAT__");if(!d.length)return!1;var b=a("#__MCH_HEAD_LINE_LIST__").html();d.html(b);return!0},editorInit:function(){f()&&k();a(document).on("click","#__MHL_BTN_FLOAT_CLOSE__",function(b){a("#__MCH_HEAD_LINE_LIST_BOX__").remove();e(!1)});var d=!1;a(document).on("click",".mhl_floatH2",function(b){if(!d){b=a(this).data("open");var g=a(".mhl_contents");"hide"===b?(g.show(),a(this).data("open","show")):(g.hide(),a(this).data("open","hide"))}}); 4 a(document).on("mousedown","#__MCH_HEAD_LINE_LIST_BOX__ > h2",function(b){d=!1;a("#__MCH_HEAD_LINE_LIST_BOX__").data("mouseDownStartTop",a("#__MCH_HEAD_LINE_LIST_BOX__").css("top").replace("px","").replace("%","")).data("mouseDownStartLeft",a("#__MCH_HEAD_LINE_LIST_BOX__").css("left").replace("px","").replace("%","")).data("clickPointX",b.clientX-a("#__MCH_HEAD_LINE_LIST_BOX__").offset().left).data("clickPointY",b.pageY-a("#__MCH_HEAD_LINE_LIST_BOX__").offset().top);a(document).mousemove(function(b){d= 5 !0;a("#__MCH_HEAD_LINE_LIST_BOX__").data("clickPointY");a("#__MCH_HEAD_LINE_LIST_BOX__").data("clickPointX");a("#__MCH_HEAD_LINE_LIST_BOX__").data("clickPointY");var c=b.clientY-a("#__MCH_HEAD_LINE_LIST_BOX__").data("clickPointY");b=b.clientX-a("#__MCH_HEAD_LINE_LIST_BOX__").data("clickPointX");var g=a(window).height(),e=a(window).width();c>.9*g&&(c=.9*g);b>e-250&&(b=e-250);a("#__MCH_HEAD_LINE_LIST_BOX__").css({top:c+"px",left:b+"px"})})});a(document).on("mouseup","#__MCH_HEAD_LINE_LIST_BOX__ > h2", 6 function(b){var c=a("#__MCH_HEAD_LINE_LIST_BOX__").data("mouseDownStartTop");b=a("#__MCH_HEAD_LINE_LIST_BOX__").data("mouseDownStartLeft");var e=a("#__MCH_HEAD_LINE_LIST_BOX__").css("top"),f=a("#__MCH_HEAD_LINE_LIST_BOX__").css("left");h("top",e);h("left",f);a(document).unbind("mousemove");c=Math.abs(parseInt(c)-parseInt(e));b=Math.abs(parseInt(b)-parseInt(f));d=5<=c||5<=b?!0:!1})},isOpenFloatView:f,createFloatList:k}}(jQuery); -
editorheadlinejump/trunk/mch-editor-headline-jump.php
r2000796 r2211693 4 4 Description: Add a heading list to the post edit screen. Click on the heading to move to the edit position. 5 5 Author: macha795 6 Version: 0.0. 26 Version: 0.0.3 7 7 */ 8 8 -
editorheadlinejump/trunk/mch_ehj_main.php
r1985256 r2211693 140 140 echo '</script>'; 141 141 142 143 142 wp_enqueue_script( 144 143 'my-admin-script_com', 145 144 plugin_dir_url( __FILE__ ). '/js/mch_ehj_com.min.js' 145 , array( 'jquery') 146 , null 146 147 ); 147 148 wp_enqueue_script( 148 149 'my-admin-script', 149 150 plugin_dir_url( __FILE__ ). '/js/mch_ehj.min.js' 151 , array( 'jquery') 152 , null 150 153 ); 151 154 152 155 153 156 // wp_enqueue_script( 154 // 'my-admin-script_gg', 155 // plugin_dir_url( __FILE__ ). '/js/mch_ehj_gg.js' 157 // 'my-admin-script_com', 158 // plugin_dir_url( __FILE__ ). '/js/mch_ehj_com.js' 159 // , array( 'jquery') 156 160 // ); 161 // wp_enqueue_script( 162 // 'my-admin-script', 163 // plugin_dir_url( __FILE__ ). '/js/mch_ehj.js' 164 // , array( 'jquery') 165 // ); 166 167 168 157 169 } 158 170 -
editorheadlinejump/trunk/readme.txt
r2000796 r2211693 3 3 Tags: editor, headline, ClassicEditor, editor headline, jump 4 4 Requires at least: 4.9 5 Tested up to: 4.9.86 Stable tag: 0.0. 25 Tested up to: 5.3.1 6 Stable tag: 0.0.3 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 49 49 == Changelog == 50 50 51 = 0.0.3 = 52 WP 5.3.1 Bug Fix 53 51 54 = 0.0.2 = 52 55 multi language.
Note: See TracChangeset
for help on using the changeset viewer.