lint compliance

pull/1/head
ansuz 7 years ago
parent 0dc1500784
commit fb9cf2c81e

@ -168,7 +168,7 @@ define([
inner.innerHTML.replace(/<img[^>]*class="cke_anchor"[^>]*data-cke-realelement="([^"]*)"[^>]*>/g, inner.innerHTML.replace(/<img[^>]*class="cke_anchor"[^>]*data-cke-realelement="([^"]*)"[^>]*>/g,
function(match,realElt){ function(match,realElt){
//console.log("returning realElt \"" + unescape(realElt)+ "\"."); //console.log("returning realElt \"" + unescape(realElt)+ "\".");
return unescape(realElt); }) + return decodeURIComponent(realElt); }) +
' </body>\n</html>' ' </body>\n</html>'
); );
}; };
@ -772,7 +772,7 @@ define([
console.log("Anchor dialog detected."); console.log("Anchor dialog detected.");
var dialog = evt.data; var dialog = evt.data;
$(dialog.parts.contents.$).find("input").val('xx-' + Math.round(Math.random()*1000)); $(dialog.parts.contents.$).find("input").val('xx-' + Math.round(Math.random()*1000));
dialog.click(CKEDITOR.dialog.okButton(editor).id); dialog.click(window.CKEDITOR.dialog.okButton(editor).id);
} ); } );
var existingText = editor.getData(); var existingText = editor.getData();
editor.insertText("A bit of text"); editor.insertText("A bit of text");
@ -782,12 +782,12 @@ define([
var waitH = window.setInterval(function() { var waitH = window.setInterval(function() {
console.log("Waited 2s for the dialog to appear"); console.log("Waited 2s for the dialog to appear");
var anchors = CKEDITOR.plugins["link"].getEditorAnchors(editor); var anchors = window.CKEDITOR.plugins["link"].getEditorAnchors(editor);
if(!anchors || anchors.length===0) { if(!anchors || anchors.length===0) {
test.fail("No anchors found. Please adjust document"); test.fail("No anchors found. Please adjust document");
} else { } else {
console.log(anchors.length + " anchors found."); console.log(anchors.length + " anchors found.");
var exported = getHTML(inner); var exported = getHTML(window.inner);
console.log("Obtained exported: " + exported); console.log("Obtained exported: " + exported);
var allFound = true; var allFound = true;
for(var i=0; i<anchors.length; i++) { for(var i=0; i<anchors.length; i++) {
@ -805,7 +805,7 @@ define([
editor.execCommand('undo'); editor.execCommand('undo');
editor.execCommand('undo'); editor.execCommand('undo');
var nint = window.setInterval(function(){ var nint = window.setInterval(function(){
console.log("Waiting for undo to yield same result.") console.log("Waiting for undo to yield same result.");
if(existingText === editor.getData()) { if(existingText === editor.getData()) {
window.clearInterval(nint); window.clearInterval(nint);
test.pass(); test.pass();

Loading…
Cancel
Save