X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-ui-debug.js;h=7e0ad8e2d212cd383b1f22c19c3d096d3088fd0c;hb=3a4dcb78b070570479456100b482307af0bf77a3;hp=a25511bd648320e29a13e7909af49f983dee7ff9;hpb=a26a1ebe59567f87f8e12170f62b428a91862f0c;p=roojs1 diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index a25511bd64..7e0ad8e2d2 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -21160,6 +21160,8 @@ Roo.htmleditor.Filter.prototype = { return; case this.tag === true: // everything + case e.tagName.indexOf(":") > -1 && typeof(this.tag) == 'object' && this.tag.indexOf(":") > -1: + case e.tagName.indexOf(":") > -1 && typeof(this.tag) == 'string' && this.tag == ":": case typeof(this.tag) == 'object' && this.tag.indexOf(e.tagName) > -1: // array and it matches. case typeof(this.tag) == 'string' && this.tag == e.tagName: // array and it matches. if (this.replaceTag && false === this.replaceTag(e)) { @@ -21587,6 +21589,7 @@ Roo.htmleditor.FilterWord = function(cfg) // no need to apply config. this.replaceDocBullets(cfg.node); + // this is disabled as the removal is done by other filters; // this.walk(cfg.node); @@ -21716,16 +21719,29 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, replaceDocBullets : function(doc) { // this is a bit odd - but it appears some indents use ql-indent-1 + //Roo.log(doc.innerHTML); - var listpara = doc.getElementsByClassName('ql-indent-1'); + var listpara = doc.getElementsByClassName('MsoListParagraphCxSpFirst'); + for( var i = 0; i < listpara.length; i ++) { + listpara.item(i).className = "MsoListParagraph"; + } + // this is a bit hacky - we had one word document where h2 had a miso-list attribute. + var htwo = doc.getElementsByTagName('h2'); + for( var i = 0; i < htwo.length; i ++) { + if (htwo.item(i).getAttribute('style').match(/mso-list:/)) { + htwo.item(i).className = "MsoListParagraph"; + } + } + + listpara = doc.getElementsByClassName('ql-indent-1'); while(listpara.length) { this.replaceDocBullet(listpara.item(0)); } - - var listpara = doc.getElementsByClassName('MsoListParagraph'); + listpara = doc.getElementsByClassName('MsoListParagraph'); while(listpara.length) { this.replaceDocBullet(listpara.item(0)); } + }, replaceDocBullet : function(p) @@ -21795,6 +21811,10 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, if (nlvl > lvl) { //new indent var nul = doc.createElement('ul'); // what about number lists... + if (!last_li) { + last_li = doc.createElement('li'); + stack[lvl].appendChild(last_li); + } last_li.appendChild(nul); stack[nlvl] = nul; @@ -23316,7 +23336,17 @@ Roo.htmleditor.KeyEnter.prototype = { var pc = range.closest([ 'ol', 'ul']); var pli = range.closest('li'); if (!pc || e.ctrlKey) { - sel.insertNode('br', 'after'); + // on it list, or ctrl pressed. + if (!e.ctrlKey) { + sel.insertNode('br', 'after'); + } else { + // only do this if we have ctrl key.. + var br = doc.createElement('br'); + br.className = 'clear'; + br.setAttribute('style', 'clear: both'); + sel.insertNode(br, 'after'); + } + this.core.undoManager.addEvent(); this.core.fireEditorEvent(e); @@ -23680,9 +23710,11 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { store : { xtype : 'SimpleStore', data : [ - ['50%'], + ['100%'], ['80%'], - ['100%'] + ['50%'], + ['20%'], + ['10%'] ], fields : [ 'val'], xns : Roo.data @@ -24470,6 +24502,8 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { contextMenu : function(toolbar) { + console.log("htmleditor.BlockTd contextMenu"); + console.log(toolbar); var cell = function() { return Roo.htmleditor.Block.factory(toolbar.tb.selectedNode); @@ -24752,7 +24786,7 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { */ toObject : function() { - + console.log("htmleditor.BlockTd toObject"); var ret = { tag : 'td', contenteditable : 'true', // this stops cell selection from picking the table. @@ -24788,6 +24822,8 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { readElement : function(node) { + console.log("htmleditor.BlockTd readElement"); + console.log(node); node = node ? node : this.node ; this.width = node.style.width; this.colspan = Math.max(1,1*node.getAttribute('colspan')); @@ -24820,6 +24856,7 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { toTableArray : function() { + console.log("htmleditor.BlockTd toTableArray"); var ret = []; var tab = this.node.closest('tr').closest('table'); Array.from(tab.rows).forEach(function(r, ri){ @@ -25075,7 +25112,9 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { shrinkColumn : function() { + console.log("htmleditor.BlockTd shrinkColumn"); var table = this.toTableArray(); + console.log(table); this.normalizeWidths(table); var col = this.cellData.col; var nw = this.colWidths[col] * 0.8; @@ -25791,7 +25830,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { }); new Roo.htmleditor.FilterBlack({ node : d, tag : this.black}); // should be fonts.. - new Roo.htmleditor.FilterKeepChildren({node : d, tag : [ 'FONT', 'O:P' ]} ); + new Roo.htmleditor.FilterKeepChildren({node : d, tag : [ 'FONT', ':' ]} ); new Roo.htmleditor.FilterParagraph({ node : d }); new Roo.htmleditor.FilterSpan({ node : d }); new Roo.htmleditor.FilterLongBr({ node : d }); @@ -26481,6 +26520,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { cleanWord : function(node) { new Roo.htmleditor.FilterWord({ node : node ? node : this.doc.body }); + new Roo.htmleditor.FilterKeepChildren({node : node ? node : this.doc.body, tag : [ 'FONT', ':' ]} ); }, @@ -30809,7 +30849,7 @@ Roo.extend(Roo.form.Layout, Roo.Component, { * a function which returns such a specification. */ /** - * @cfg {String} labelAlign + * @cfg {String} labelAlign (left|top|right) * Valid values are "left," "top" and "right" (defaults to "left") */ /** @@ -30929,6 +30969,7 @@ Roo.extend(Roo.form.Layout, Roo.Component, { } }); + /** * @class Roo.form.Column * @extends Roo.form.Layout @@ -30963,7 +31004,6 @@ Roo.extend(Roo.form.Column, Roo.form.Layout, { } }); - /** * @class Roo.form.Row * @extends Roo.form.Layout