mirror of
https://github.com/Hopiu/ep_page_view.git
synced 2026-03-16 20:20:24 +00:00
working file menu support too
This commit is contained in:
parent
a56bd91a0f
commit
6b8969ee88
4 changed files with 16 additions and 5 deletions
4
ep.json
4
ep.json
|
|
@ -18,7 +18,9 @@
|
|||
"eejsBlock_styles": "ep_page_view/page_view",
|
||||
"collectContentPre": "ep_page_view/static/js/shared",
|
||||
"collectContentPost": "ep_page_view/static/js/shared",
|
||||
"getLineHTMLForExport": "ep_page_view/index"
|
||||
"getLineHTMLForExport": "ep_page_view/index",
|
||||
"eejsBlock_dd_insert" : "ep_page_view/page_view",
|
||||
"eejsBlock_dd_view" : "ep_page_view/page_view"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
13
page_view.js
13
page_view.js
|
|
@ -8,7 +8,16 @@ exports.eejsBlock_mySettings = function (hook_name, args, cb) {
|
|||
return cb();
|
||||
}
|
||||
|
||||
exports.eejsBlock_styles = function (hook_name, args, cb)
|
||||
{
|
||||
exports.eejsBlock_styles = function (hook_name, args, cb){
|
||||
args.content = args.content + '<link href="../static/plugins/ep_page_view/static/css/page_view.css" rel="stylesheet">';
|
||||
}
|
||||
|
||||
exports.eejsBlock_dd_insert = function (hook_name, args, cb){
|
||||
console.warn("HELLO WORLD!");
|
||||
args.content = args.content + eejs.require('ep_page_view/templates/page_view_menu.ejs', {checked : checked_state});
|
||||
}
|
||||
|
||||
exports.eejsBlock_dd_view = function (hook_name, args, cb){
|
||||
args.content = args.content + "<li>" +eejs.require('ep_page_view/templates/page_view_entry.ejs', {checked : checked_state}) + "</li>";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@ if (!isMobile) {
|
|||
pv.disable();
|
||||
}
|
||||
|
||||
$('.menu_left').append("<span id='insertPageBreak'>Page Break</span>");
|
||||
|
||||
// Bind the event handler to the toolbar buttons
|
||||
$('#insertPageBreak').on('click', function(){
|
||||
context.ace.callWithAce(function(ace){
|
||||
|
|
|
|||
2
templates/page_view_menu.ejs
Normal file
2
templates/page_view_menu.ejs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<li.<span id='insertPageBreak'>Page Break</span></li>
|
||||
|
||||
Loading…
Reference in a new issue