should be clean enough to push

This commit is contained in:
John McLear 2015-12-23 14:35:52 +00:00
parent b519f9f156
commit 34a46d6318
4 changed files with 16 additions and 4 deletions

View file

@ -286,6 +286,7 @@ window.onload = function () {\n\
iframe.name = "ace_inner";\n\
iframe.title = "pad";\n\
iframe.scrolling = "no";\n\
iframe.setAttribute("sandbox", "allow-same-origin allow-scripts allow-popups allow-forms allow-modals");\n\
var outerdocbody = document.getElementById("outerdocbody");\n\
iframe.frameBorder = 0;\n\
iframe.allowTransparency = true; // for IE\n\
@ -325,10 +326,13 @@ window.onload = function () {\n\
// bizarrely, in FF2, a file with no "external" dependencies won't finish loading properly
// (throbs busy while typing)
outerHTML.push('<style type="text/css" title="dynamicsyntax"></style>', '<link rel="stylesheet" type="text/css" href="data:text/css,"/>', scriptTag(outerScript), '</head><body id="outerdocbody" class="outerdocbody"><div id="sidediv" class="sidediv"><!-- --></div><div id="linemetricsdiv">x</div></body></html>');
var testHTML = '<span>WONT WORK in Chrome</span><iframe src="/editable2.html" style="position:fixed;left:200px;right:0;top:250px;bottom:0;width:400px;height:200px;z-index:90999" sandbox="allow-same-origin allow-scripts allow-popups allow-forms allow-modals"></iframe>';
outerHTML.push('<style type="text/css" title="dynamicsyntax"></style>', '<link rel="stylesheet" type="text/css" href="data:text/css,"/>', scriptTag(outerScript), '</head><body id="outerdocbody" class="outerdocbody"><div id="sidediv" class="sidediv"><!-- --></div><div id="linemetricsdiv">x</div>'+testHTML+'</body></html>');
var outerFrame = document.createElement("IFRAME");
outerFrame.name = "ace_outer";
outerFrame.setAttribute("sandbox", "allow-same-origin allow-scripts allow-popups allow-forms allow-modals");
outerFrame.frameBorder = 0; // for IE
outerFrame.title = "Ether";
info.frame = outerFrame;

View file

@ -5006,8 +5006,14 @@ function Ace2Inner(){
});
})
/*
$(root).on("dragend", function(e){
top.console.log("dragend");
});
$(root).on("drop", function(e){
top.console.log("DROP");
if(e.target.a || e.target.localName === "a"){
e.preventDefault();
}
@ -5020,7 +5026,7 @@ function Ace2Inner(){
e: e
});
});
*/
// CompositionEvent is not implemented below IE version 8
if ( !(browser.msie && parseInt(browser.version <= 9)) && document.documentElement)
@ -5444,6 +5450,7 @@ function Ace2Inner(){
lineNumbersShown++;
var n = lineNumbersShown;
var div = odoc.createElement("DIV");
//calculate height for new line number
if(b){
var h = (b.clientHeight || b.offsetHeight);

View file

@ -70,6 +70,7 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
if (document)
{
result.node = document.createElement("div");
result.node.setAttribute("contentEditable", true); // Works but doesn't allow drag n drop ;(
}
else
{
@ -80,7 +81,7 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
}
var html = [];
var preHtml = '',
var preHtml = '',
postHtml = '';
var curHTML = null;

View file

@ -513,7 +513,7 @@ var pad = {
_afterHandshake: function()
{
pad.clientTimeOffset = new Date().getTime() - clientVars.serverTimestamp;
//initialize the chat
chat.init(this);
getParams();