much better but still work to do

This commit is contained in:
John McLear 2013-12-02 11:40:50 +00:00
parent aa7a6a5bd1
commit 3f1ec6a6cd
2 changed files with 31 additions and 8 deletions

View file

@ -2,19 +2,26 @@
page-break-after: always;
-webkit-region-break-inside: avoid;
border-bottom: 1px dotted #AAA;
width:100%;
height:1px;
margin-left:-50px;
width:850px;
height:40px;
margin-left:-102px;
border-top: 1px dotted #aaa;
background-color:#f7f7f7;
margin-top:100px;
margin-bottom:100px;
}
.pageBreakComputed{
page-break-after: always;
-webkit-region-break-inside: avoid;
border-bottom: 1px dotted #AAA;
margin:0px !important;
height:50px;
border-top:1px dotted #aaa;
margin-left:-2px !important;
width:850px;
height:40px;
border-top: 1px dotted #aaa;
background-color:#f7f7f7;
margin-top:100px;
margin-bottom:100px;
}
.outerPV{
@ -36,12 +43,19 @@
position: relative;
box-shadow: 10px 20px 40px 20px #ddd;
padding-right:0px !important;
padding-top:100px !important;
}
.innerPVDiv{
margin-left:100px;
margin-right:100px;
}
#innerdocbody {
min-height:1200px;
}
#innerdocbody > div{
margin-left:100px;
margin-right:100px;
}

View file

@ -11,14 +11,23 @@ if (!isMobile) {
$('#editorcontainer, iframe').addClass('page_view');
$('iframe[name="ace_outer"]').contents().find('iframe').contents().find("#innerdocbody").addClass('innerPV');
$('iframe[name="ace_outer"]').contents().find("iframe").addClass('outerPV');
// $('iframe[name="ace_outer"]').contents().find('iframe').contents().find("#innerdocbody").contents().each(function(){
// $(this).addClass("innerPVDiv");
// });
$('iframe[name="ace_outer"]').contents().find('#outerdocbody').addClass("outerBackground");
$('iframe[name="ace_outer"]').contents().find('iframe').contents().find("#innerdocbody").contents().find('.pageBreak').click(function(e){
top.console.log("Can't edit pagebreak Line");
e.preventDefault();
return false;
});
$('#ep_page_ruler').show();
},
disable: function() {
$('#editorcontainer, iframe').removeClass('page_view');
$('iframe[name="ace_outer"]').contents().find('iframe').contents().find("#innerdocbody").removeClass('innerPV');
$('iframe[name="ace_outer"]').contents().find("iframe").removeClass('outerPV');
// $('iframe[name="ace_outer"]').contents().find('iframe').contents().find("#innerdocbody").contents().find("div").css("margin-left","40px");
// $('iframe[name="ace_outer"]').contents().find('iframe').contents().find("#innerdocbody").contents().find("div").removeClass("innerPVDiv");
$('iframe[name="ace_outer"]').contents().find('#outerdocbody').removeClass("outerBackground");
$('#ep_page_ruler').hide();
}
@ -166,7 +175,7 @@ exports.aceEditEvent = function(hook, callstack, editorInfo, rep, documentAttrib
if(!callstack.callstack.docTextChanged) return;
var lines = {};
var yHeight = 1122.5; // This is dirty and I feel bad for it..
var yHeight = 922.5; // This is dirty and I feel bad for it..
var lineNumber = 0;
var HTMLLines = $('iframe[name="ace_outer"]').contents().find('iframe').contents().find("#innerdocbody").children("div");