From: leon Date: Tue, 8 Nov 2022 06:17:31 +0000 (+0800) Subject: fix #7391 -New_Customer_Portal_30_Login X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=b7461d73dfdea1589c032014b34cb8415557af60 fix #7391 -New_Customer_Portal_30_Login --- diff --git a/Roo/bootstrap/Table.js b/Roo/bootstrap/Table.js index e7ad18308d..146a9eebd5 100644 --- a/Roo/bootstrap/Table.js +++ b/Roo/bootstrap/Table.js @@ -88,6 +88,7 @@ Currently the Table uses multiple headers to try and handle XL / Medium etc... * @cfg {Boolean} lazyLoad auto load data while scrolling to the end (default false) * @cfg {Boolean} auto_hide_footer auto hide footer if only one page (default false) * @cfg {Boolean} enableColumnResize default true if columns can be resized = needs scrollBody to be set to work (drag/drop) + * @cfg {Boolean} disableAutoSize disable autoSize() and initCSS() * * * @cfg {Number} minColumnWidth default 50 pixels minimum column width @@ -265,6 +266,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { footerShow : true, headerShow : true, enableColumnResize: true, + disableAutoSize: false, rowSelection : false, cellSelection : false, @@ -426,7 +428,9 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { initCSS : function() { - + if(this.disableAutoSize) { + return; + } var cm = this.cm, styles = []; this.CSS.removeStyleSheet(this.id + '-cssrules'); @@ -1430,6 +1434,9 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { */ autoSize : function() { + if(this.disableAutoSize) { + return; + } //var ctr = Roo.get(this.container.dom.parentElement); var ctr = Roo.get(this.el.dom); diff --git a/Roo/bootstrap/Tooltip.js b/Roo/bootstrap/Tooltip.js index 33afec115f..16e39b7da0 100644 --- a/Roo/bootstrap/Tooltip.js +++ b/Roo/bootstrap/Tooltip.js @@ -245,10 +245,18 @@ Roo.extend(Roo.bootstrap.Tooltip, Roo.bootstrap.Component, { this.el.removeClass(['fade','top','bottom', 'left', 'right','in', 'bs-tooltip-top','bs-tooltip-bottom', 'bs-tooltip-left', 'bs-tooltip-right']); + + if(this.bindEl.attr('tooltip-class')) { + this.el.addClass(this.bindEl.attr('tooltip-class')); + } var placement = typeof this.placement == 'function' ? this.placement.call(this, this.el, on_el) : this.placement; + + if(this.bindEl.attr('tooltip-placement')) { + placement = this.bindEl.attr('tooltip-placement'); + } var autoToken = /\s?auto?\s?/i; var autoPlace = autoToken.test(placement); @@ -338,6 +346,9 @@ Roo.extend(Roo.bootstrap.Tooltip, Roo.bootstrap.Component, { return; } //this.el.setXY([0,0]); + if(this.bindEl.attr('tooltip-class')) { + this.el.removeClass(this.bindEl.attr('tooltip-class')); + } this.el.removeClass(['show', 'in']); //this.el.hide(); diff --git a/Roo/bootstrap/form/Input.js b/Roo/bootstrap/form/Input.js index 7fdabc35f6..3b43fc2b7e 100644 --- a/Roo/bootstrap/form/Input.js +++ b/Roo/bootstrap/form/Input.js @@ -707,12 +707,12 @@ Roo.extend(Roo.bootstrap.form.Input, Roo.bootstrap.Component, { } if(typeof this.validator == "function"){ var msg = this.validator(value); - if(msg !== true){ - return false; - } if (typeof(msg) == 'string') { this.invalidText = msg; } + if(msg !== true){ + return false; + } } if(this.regex && !this.regex.test(value)){ diff --git a/buildSDK/dependancy_bootstrap.txt b/buildSDK/dependancy_bootstrap.txt index 4966679dfd..dc19c70ca4 100644 --- a/buildSDK/dependancy_bootstrap.txt +++ b/buildSDK/dependancy_bootstrap.txt @@ -140,6 +140,9 @@ Roo.htmleditor.FilterWord Roo.htmleditor.FilterStyleToTag Roo.htmleditor.FilterLongBr Roo.htmleditor.FilterBlock +Roo.htmleditor.TidySerializer +Roo.htmleditor.TidyWriter +Roo.htmleditor.TidyEntities Roo.htmleditor.KeyEnter Roo.htmleditor.Block diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 9653688dee..41681fed64 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -9165,6 +9165,7 @@ Currently the Table uses multiple headers to try and handle XL / Medium etc... * @cfg {Boolean} lazyLoad auto load data while scrolling to the end (default false) * @cfg {Boolean} auto_hide_footer auto hide footer if only one page (default false) * @cfg {Boolean} enableColumnResize default true if columns can be resized = needs scrollBody to be set to work (drag/drop) + * @cfg {Boolean} disableAutoSize disable autoSize() and initCSS() * * * @cfg {Number} minColumnWidth default 50 pixels minimum column width @@ -9342,6 +9343,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { footerShow : true, headerShow : true, enableColumnResize: true, + disableAutoSize: false, rowSelection : false, cellSelection : false, @@ -9503,7 +9505,9 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { initCSS : function() { - + if(this.disableAutoSize) { + return; + } var cm = this.cm, styles = []; this.CSS.removeStyleSheet(this.id + '-cssrules'); @@ -10507,6 +10511,9 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { */ autoSize : function() { + if(this.disableAutoSize) { + return; + } //var ctr = Roo.get(this.container.dom.parentElement); var ctr = Roo.get(this.el.dom); @@ -27023,6 +27030,1273 @@ Roo.apply(Roo.htmleditor.FilterBlock.prototype, }); +/*** + * This is based loosely on tinymce + * @class Roo.htmleditor.TidySerializer + * https://github.com/thorn0/tinymce.html/blob/master/tinymce.html.js + * @constructor + * @method Serializer + * @param {Object} settings Name/value settings object. + */ + + +Roo.htmleditor.TidySerializer = function(settings) +{ + Roo.apply(this, settings); + + this.writer = new Roo.htmleditor.TidyWriter(settings); + + + +}; +Roo.htmleditor.TidySerializer.prototype = { + + /** + * @param {boolean} inner do the inner of the node. + */ + inner : false, + + writer : false, + + /** + * Serializes the specified node into a string. + * + * @example + * new tinymce.html.Serializer().serialize(new tinymce.html.DomParser().parse('

text

')); + * @method serialize + * @param {DomElement} node Node instance to serialize. + * @return {String} String with HTML based on DOM tree. + */ + serialize : function(node) { + + // = settings.validate; + var writer = this.writer; + var self = this; + this.handlers = { + // #text + 3: function(node) { + + writer.text(node.nodeValue, node); + }, + // #comment + 8: function(node) { + writer.comment(node.nodeValue); + }, + // Processing instruction + 7: function(node) { + writer.pi(node.name, node.nodeValue); + }, + // Doctype + 10: function(node) { + writer.doctype(node.nodeValue); + }, + // CDATA + 4: function(node) { + writer.cdata(node.nodeValue); + }, + // Document fragment + 11: function(node) { + node = node.firstChild; + if (!node) { + return; + } + while(node) { + self.walk(node); + node = node.nextSibling + } + } + }; + writer.reset(); + 1 != node.nodeType || this.inner ? this.handlers[11](node) : this.walk(node); + return writer.getContent(); + }, + + walk: function(node) + { + var attrName, attrValue, sortedAttrs, i, l, elementRule, + handler = this.handlers[node.nodeType]; + + if (handler) { + handler(node); + return; + } + + var name = node.nodeName; + var isEmpty = node.childNodes.length < 1; + + var writer = this.writer; + var attrs = node.attributes; + // Sort attributes + + writer.start(node.nodeName, attrs, isEmpty, node); + if (isEmpty) { + return; + } + node = node.firstChild; + if (!node) { + writer.end(name); + return; + } + while (node) { + this.walk(node); + node = node.nextSibling; + } + writer.end(name); + + + } + // Serialize element and treat all non elements as fragments + +}; + +/*** + * This is based loosely on tinymce + * @class Roo.htmleditor.TidyWriter + * https://github.com/thorn0/tinymce.html/blob/master/tinymce.html.js + * + * Known issues? + * - not tested much with 'PRE' formated elements. + * + * + * + */ + +Roo.htmleditor.TidyWriter = function(settings) +{ + + // indent, indentBefore, indentAfter, encode, htmlOutput, html = []; + Roo.apply(this, settings); + this.html = []; + this.state = []; + + this.encode = Roo.htmleditor.TidyEntities.getEncodeFunc(settings.entity_encoding || 'raw', settings.entities); + +} +Roo.htmleditor.TidyWriter.prototype = { + + + state : false, + + indent : ' ', + + // part of state... + indentstr : '', + in_pre: false, + in_inline : false, + last_inline : false, + encode : false, + + + /** + * Writes the a start element such as

. + * + * @method start + * @param {String} name Name of the element. + * @param {Array} attrs Optional attribute array or undefined if it hasn't any. + * @param {Boolean} empty Optional empty state if the tag should end like
. + */ + start: function(name, attrs, empty, node) + { + var i, l, attr, value; + + // there are some situations where adding line break && indentation will not work. will not work. + // -1; + var in_pre = this.in_pre || Roo.htmleditor.TidyWriter.whitespace_elements.indexOf(name) > -1; + + var is_short = empty ? Roo.htmleditor.TidyWriter.shortend_elements.indexOf(name) > -1 : false; + + var add_lb = name == 'BR' ? false : in_inline; + + if (!add_lb && !this.in_pre && this.lastElementEndsWS()) { + i_inline = false; + } + + var indentstr = this.indentstr; + + // e_inline = elements that can be inline, but still allow \n before and after? + // only 'BR' ??? any others? + + // ADD LINE BEFORE tage + if (!this.in_pre) { + if (in_inline) { + //code + if (name == 'BR') { + this.addLine(); + } else if (this.lastElementEndsWS()) { + this.addLine(); + } else{ + // otherwise - no new line. (and dont indent.) + indentstr = ''; + } + + } else { + this.addLine(); + } + } else { + indentstr = ''; + } + + this.html.push(indentstr + '<', name.toLowerCase()); + + if (attrs) { + for (i = 0, l = attrs.length; i < l; i++) { + attr = attrs[i]; + this.html.push(' ', attr.name, '="', this.encode(attr.value, true), '"'); + } + } + + if (empty) { + if (is_short) { + this.html[this.html.length] = '/>'; + } else { + this.html[this.html.length] = '>'; + } + var e_inline = name == 'BR' ? false : this.in_inline; + + if (!e_inline && !this.in_pre) { + this.addLine(); + } + return; + + } + // not empty.. + this.html[this.html.length] = '>'; + + // there is a special situation, where we need to turn on in_inline - if any of the imediate chidlren are one of these. + /* + if (!in_inline && !in_pre) { + var cn = node.firstChild; + while(cn) { + if (Roo.htmleditor.TidyWriter.inline_elements.indexOf(cn.nodeName) > -1) { + in_inline = true + break; + } + cn = cn.nextSibling; + } + + } + */ + + + this.pushState({ + indentstr : in_pre ? '' : (this.indentstr + this.indent), + in_pre : in_pre, + in_inline : in_inline + }); + // add a line after if we are not in a + + if (!in_inline && !in_pre) { + this.addLine(); + } + + + + + }, + + lastElementEndsWS : function() + { + var value = this.html.length > 0 ? this.html[this.html.length-1] : false; + if (value === false) { + return true; + } + return value.match(/\s+$/); + + }, + + /** + * Writes the a end element such as

. + * + * @method end + * @param {String} name Name of the element. + */ + end: function(name) { + var value; + this.popState(); + var indentstr = ''; + var in_inline = this.in_inline || Roo.htmleditor.TidyWriter.inline_elements.indexOf(name) > -1; + + if (!this.in_pre && !in_inline) { + this.addLine(); + indentstr = this.indentstr; + } + this.html.push(indentstr + ''); + this.last_inline = in_inline; + + // pop the indent state.. + }, + /** + * Writes a text node. + * + * In pre - we should not mess with the contents. + * + * + * @method text + * @param {String} text String to write out. + * @param {Boolean} raw Optional raw state if true the contents wont get encoded. + */ + text: function(in_text, node) + { + // if not in whitespace critical + if (in_text.length < 1) { + return; + } + var text = new XMLSerializer().serializeToString(document.createTextNode(in_text)); // escape it properly? + + if (this.in_pre) { + this.html[this.html.length] = text; + return; + } + + if (this.in_inline) { + text = text.replace(/\s+/g,' '); // all white space inc line breaks to a slingle' ' + if (text != ' ') { + text = text.replace(/\s+/,' '); // all white space to single white space + + + // if next tag is '
', then we can trim right.. + if (node.nextSibling && + node.nextSibling.nodeType == 1 && + node.nextSibling.nodeName == 'BR' ) + { + text = text.replace(/\s+$/g,''); + } + // if previous tag was a BR, we can also trim.. + if (node.previousSibling && + node.previousSibling.nodeType == 1 && + node.previousSibling.nodeName == 'BR' ) + { + text = this.indentstr + text.replace(/^\s+/g,''); + } + if (text.match(/\n/)) { + text = text.replace( + /(?![^\n]{1,64}$)([^\n]{1,64})\s/g, '$1\n' + this.indentstr + ); + // remoeve the last whitespace / line break. + text = text.replace(/\n\s+$/,''); + } + // repace long lines + + } + + this.html[this.html.length] = text; + return; + } + // see if previous element was a inline element. + var indentstr = this.indentstr; + + text = text.replace(/\s+/g," "); // all whitespace into single white space. + + // should trim left? + if (node.previousSibling && + node.previousSibling.nodeType == 1 && + Roo.htmleditor.TidyWriter.inline_elements.indexOf(node.previousSibling.nodeName) > -1) + { + indentstr = ''; + + } else { + this.addLine(); + text = text.replace(/^\s+/,''); // trim left + + } + // should trim right? + if (node.nextSibling && + node.nextSibling.nodeType == 1 && + Roo.htmleditor.TidyWriter.inline_elements.indexOf(node.nextSibling.nodeName) > -1) + { + // noop + + } else { + text = text.replace(/\s+$/,''); // trim right + } + + + + + + if (text.length < 1) { + return; + } + if (!text.match(/\n/)) { + this.html.push(indentstr + text); + return; + } + + text = this.indentstr + text.replace( + /(?![^\n]{1,64}$)([^\n]{1,64})\s/g, '$1\n' + this.indentstr + ); + // remoeve the last whitespace / line break. + text = text.replace(/\s+$/,''); + + this.html.push(text); + + // split and indent.. + + + }, + /** + * Writes a cdata node such as . + * + * @method cdata + * @param {String} text String to write out inside the cdata. + */ + cdata: function(text) { + this.html.push(''); + }, + /** + * Writes a comment node such as . + * + * @method cdata + * @param {String} text String to write out inside the comment. + */ + comment: function(text) { + this.html.push(''); + }, + /** + * Writes a PI node such as . + * + * @method pi + * @param {String} name Name of the pi. + * @param {String} text String to write out inside the pi. + */ + pi: function(name, text) { + text ? this.html.push('') : this.html.push(''); + this.indent != '' && this.html.push('\n'); + }, + /** + * Writes a doctype node such as . + * + * @method doctype + * @param {String} text String to write out inside the doctype. + */ + doctype: function(text) { + this.html.push('', this.indent != '' ? '\n' : ''); + }, + /** + * Resets the internal buffer if one wants to reuse the writer. + * + * @method reset + */ + reset: function() { + this.html.length = 0; + this.state = []; + this.pushState({ + indentstr : '', + in_pre : false, + in_inline : false + }) + }, + /** + * Returns the contents that got serialized. + * + * @method getContent + * @return {String} HTML contents that got written down. + */ + getContent: function() { + return this.html.join('').replace(/\n$/, ''); + }, + + pushState : function(cfg) + { + this.state.push(cfg); + Roo.apply(this, cfg); + }, + + popState : function() + { + if (this.state.length < 1) { + return; // nothing to push + } + var cfg = { + in_pre: false, + indentstr : '' + }; + this.state.pop(); + if (this.state.length > 0) { + cfg = this.state[this.state.length-1]; + } + Roo.apply(this, cfg); + }, + + addLine: function() + { + if (this.html.length < 1) { + return; + } + + + var value = this.html[this.html.length - 1]; + if (value.length > 0 && '\n' !== value) { + this.html.push('\n'); + } + } + + +//'pre script noscript style textarea video audio iframe object code' +// shortended... 'area base basefont br col frame hr img input isindex link meta param embed source wbr track'); +// inline +}; + +Roo.htmleditor.TidyWriter.inline_elements = [ + 'SPAN','STRONG','B','EM','I','FONT','STRIKE','U','VAR', + 'CITE','DFN','CODE','MARK','Q','SUP','SUB','SAMP', 'A' +]; +Roo.htmleditor.TidyWriter.shortend_elements = [ + 'AREA','BASE','BASEFONT','BR','COL','FRAME','HR','IMG','INPUT', + 'ISINDEX','LINK','','META','PARAM','EMBED','SOURCE','WBR','TRACK' +]; + +Roo.htmleditor.TidyWriter.whitespace_elements = [ + 'PRE','SCRIPT','NOSCRIPT','STYLE','TEXTAREA','VIDEO','AUDIO','IFRAME','OBJECT','CODE' +];/*** + * This is based loosely on tinymce + * @class Roo.htmleditor.TidyEntities + * @static + * https://github.com/thorn0/tinymce.html/blob/master/tinymce.html.js + * + * Not 100% sure this is actually used or needed. + */ + +Roo.htmleditor.TidyEntities = { + + /** + * initialize data.. + */ + init : function (){ + + this.namedEntities = this.buildEntitiesLookup(this.namedEntitiesData, 32); + + }, + + + buildEntitiesLookup: function(items, radix) { + var i, chr, entity, lookup = {}; + if (!items) { + return {}; + } + items = typeof(items) == 'string' ? items.split(',') : items; + radix = radix || 10; + // Build entities lookup table + for (i = 0; i < items.length; i += 2) { + chr = String.fromCharCode(parseInt(items[i], radix)); + // Only add non base entities + if (!this.baseEntities[chr]) { + entity = '&' + items[i + 1] + ';'; + lookup[chr] = entity; + lookup[entity] = chr; + } + } + return lookup; + + }, + + asciiMap : { + 128: '€', + 130: '‚', + 131: 'ƒ', + 132: '„', + 133: '…', + 134: '†', + 135: '‡', + 136: 'ˆ', + 137: '‰', + 138: 'Å ', + 139: '‹', + 140: 'Œ', + 142: 'Ž', + 145: '‘', + 146: '’', + 147: '“', + 148: '”', + 149: '•', + 150: '–', + 151: '—', + 152: '˜', + 153: '™', + 154: 'Å¡', + 155: '›', + 156: 'œ', + 158: 'ž', + 159: 'Ÿ' + }, + // Raw entities + baseEntities : { + '"': '"', + // Needs to be escaped since the YUI compressor would otherwise break the code + '\'': ''', + '<': '<', + '>': '>', + '&': '&', + '`': '`' + }, + // Reverse lookup table for raw entities + reverseEntities : { + '<': '<', + '>': '>', + '&': '&', + '"': '"', + ''': '\'' + }, + + attrsCharsRegExp : /[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + textCharsRegExp : /[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + rawCharsRegExp : /[<>&\"\']/g, + entityRegExp : /&#([a-z0-9]+);?|&([a-z0-9]+);/gi, + namedEntities : false, + namedEntitiesData : [ + '50', + 'nbsp', + '51', + 'iexcl', + '52', + 'cent', + '53', + 'pound', + '54', + 'curren', + '55', + 'yen', + '56', + 'brvbar', + '57', + 'sect', + '58', + 'uml', + '59', + 'copy', + '5a', + 'ordf', + '5b', + 'laquo', + '5c', + 'not', + '5d', + 'shy', + '5e', + 'reg', + '5f', + 'macr', + '5g', + 'deg', + '5h', + 'plusmn', + '5i', + 'sup2', + '5j', + 'sup3', + '5k', + 'acute', + '5l', + 'micro', + '5m', + 'para', + '5n', + 'middot', + '5o', + 'cedil', + '5p', + 'sup1', + '5q', + 'ordm', + '5r', + 'raquo', + '5s', + 'frac14', + '5t', + 'frac12', + '5u', + 'frac34', + '5v', + 'iquest', + '60', + 'Agrave', + '61', + 'Aacute', + '62', + 'Acirc', + '63', + 'Atilde', + '64', + 'Auml', + '65', + 'Aring', + '66', + 'AElig', + '67', + 'Ccedil', + '68', + 'Egrave', + '69', + 'Eacute', + '6a', + 'Ecirc', + '6b', + 'Euml', + '6c', + 'Igrave', + '6d', + 'Iacute', + '6e', + 'Icirc', + '6f', + 'Iuml', + '6g', + 'ETH', + '6h', + 'Ntilde', + '6i', + 'Ograve', + '6j', + 'Oacute', + '6k', + 'Ocirc', + '6l', + 'Otilde', + '6m', + 'Ouml', + '6n', + 'times', + '6o', + 'Oslash', + '6p', + 'Ugrave', + '6q', + 'Uacute', + '6r', + 'Ucirc', + '6s', + 'Uuml', + '6t', + 'Yacute', + '6u', + 'THORN', + '6v', + 'szlig', + '70', + 'agrave', + '71', + 'aacute', + '72', + 'acirc', + '73', + 'atilde', + '74', + 'auml', + '75', + 'aring', + '76', + 'aelig', + '77', + 'ccedil', + '78', + 'egrave', + '79', + 'eacute', + '7a', + 'ecirc', + '7b', + 'euml', + '7c', + 'igrave', + '7d', + 'iacute', + '7e', + 'icirc', + '7f', + 'iuml', + '7g', + 'eth', + '7h', + 'ntilde', + '7i', + 'ograve', + '7j', + 'oacute', + '7k', + 'ocirc', + '7l', + 'otilde', + '7m', + 'ouml', + '7n', + 'divide', + '7o', + 'oslash', + '7p', + 'ugrave', + '7q', + 'uacute', + '7r', + 'ucirc', + '7s', + 'uuml', + '7t', + 'yacute', + '7u', + 'thorn', + '7v', + 'yuml', + 'ci', + 'fnof', + 'sh', + 'Alpha', + 'si', + 'Beta', + 'sj', + 'Gamma', + 'sk', + 'Delta', + 'sl', + 'Epsilon', + 'sm', + 'Zeta', + 'sn', + 'Eta', + 'so', + 'Theta', + 'sp', + 'Iota', + 'sq', + 'Kappa', + 'sr', + 'Lambda', + 'ss', + 'Mu', + 'st', + 'Nu', + 'su', + 'Xi', + 'sv', + 'Omicron', + 't0', + 'Pi', + 't1', + 'Rho', + 't3', + 'Sigma', + 't4', + 'Tau', + 't5', + 'Upsilon', + 't6', + 'Phi', + 't7', + 'Chi', + 't8', + 'Psi', + 't9', + 'Omega', + 'th', + 'alpha', + 'ti', + 'beta', + 'tj', + 'gamma', + 'tk', + 'delta', + 'tl', + 'epsilon', + 'tm', + 'zeta', + 'tn', + 'eta', + 'to', + 'theta', + 'tp', + 'iota', + 'tq', + 'kappa', + 'tr', + 'lambda', + 'ts', + 'mu', + 'tt', + 'nu', + 'tu', + 'xi', + 'tv', + 'omicron', + 'u0', + 'pi', + 'u1', + 'rho', + 'u2', + 'sigmaf', + 'u3', + 'sigma', + 'u4', + 'tau', + 'u5', + 'upsilon', + 'u6', + 'phi', + 'u7', + 'chi', + 'u8', + 'psi', + 'u9', + 'omega', + 'uh', + 'thetasym', + 'ui', + 'upsih', + 'um', + 'piv', + '812', + 'bull', + '816', + 'hellip', + '81i', + 'prime', + '81j', + 'Prime', + '81u', + 'oline', + '824', + 'frasl', + '88o', + 'weierp', + '88h', + 'image', + '88s', + 'real', + '892', + 'trade', + '89l', + 'alefsym', + '8cg', + 'larr', + '8ch', + 'uarr', + '8ci', + 'rarr', + '8cj', + 'darr', + '8ck', + 'harr', + '8dl', + 'crarr', + '8eg', + 'lArr', + '8eh', + 'uArr', + '8ei', + 'rArr', + '8ej', + 'dArr', + '8ek', + 'hArr', + '8g0', + 'forall', + '8g2', + 'part', + '8g3', + 'exist', + '8g5', + 'empty', + '8g7', + 'nabla', + '8g8', + 'isin', + '8g9', + 'notin', + '8gb', + 'ni', + '8gf', + 'prod', + '8gh', + 'sum', + '8gi', + 'minus', + '8gn', + 'lowast', + '8gq', + 'radic', + '8gt', + 'prop', + '8gu', + 'infin', + '8h0', + 'ang', + '8h7', + 'and', + '8h8', + 'or', + '8h9', + 'cap', + '8ha', + 'cup', + '8hb', + 'int', + '8hk', + 'there4', + '8hs', + 'sim', + '8i5', + 'cong', + '8i8', + 'asymp', + '8j0', + 'ne', + '8j1', + 'equiv', + '8j4', + 'le', + '8j5', + 'ge', + '8k2', + 'sub', + '8k3', + 'sup', + '8k4', + 'nsub', + '8k6', + 'sube', + '8k7', + 'supe', + '8kl', + 'oplus', + '8kn', + 'otimes', + '8l5', + 'perp', + '8m5', + 'sdot', + '8o8', + 'lceil', + '8o9', + 'rceil', + '8oa', + 'lfloor', + '8ob', + 'rfloor', + '8p9', + 'lang', + '8pa', + 'rang', + '9ea', + 'loz', + '9j0', + 'spades', + '9j3', + 'clubs', + '9j5', + 'hearts', + '9j6', + 'diams', + 'ai', + 'OElig', + 'aj', + 'oelig', + 'b0', + 'Scaron', + 'b1', + 'scaron', + 'bo', + 'Yuml', + 'm6', + 'circ', + 'ms', + 'tilde', + '802', + 'ensp', + '803', + 'emsp', + '809', + 'thinsp', + '80c', + 'zwnj', + '80d', + 'zwj', + '80e', + 'lrm', + '80f', + 'rlm', + '80j', + 'ndash', + '80k', + 'mdash', + '80o', + 'lsquo', + '80p', + 'rsquo', + '80q', + 'sbquo', + '80s', + 'ldquo', + '80t', + 'rdquo', + '80u', + 'bdquo', + '810', + 'dagger', + '811', + 'Dagger', + '81g', + 'permil', + '81p', + 'lsaquo', + '81q', + 'rsaquo', + '85c', + 'euro' + ], + + + /** + * Encodes the specified string using raw entities. This means only the required XML base entities will be encoded. + * + * @method encodeRaw + * @param {String} text Text to encode. + * @param {Boolean} attr Optional flag to specify if the text is attribute contents. + * @return {String} Entity encoded text. + */ + encodeRaw: function(text, attr) + { + var t = this; + return text.replace(attr ? this.attrsCharsRegExp : this.textCharsRegExp, function(chr) { + return t.baseEntities[chr] || chr; + }); + }, + /** + * Encoded the specified text with both the attributes and text entities. This function will produce larger text contents + * since it doesn't know if the context is within a attribute or text node. This was added for compatibility + * and is exposed as the DOMUtils.encode function. + * + * @method encodeAllRaw + * @param {String} text Text to encode. + * @return {String} Entity encoded text. + */ + encodeAllRaw: function(text) { + var t = this; + return ('' + text).replace(this.rawCharsRegExp, function(chr) { + return t.baseEntities[chr] || chr; + }); + }, + /** + * Encodes the specified string using numeric entities. The core entities will be + * encoded as named ones but all non lower ascii characters will be encoded into numeric entities. + * + * @method encodeNumeric + * @param {String} text Text to encode. + * @param {Boolean} attr Optional flag to specify if the text is attribute contents. + * @return {String} Entity encoded text. + */ + encodeNumeric: function(text, attr) { + var t = this; + return text.replace(attr ? this.attrsCharsRegExp : this.textCharsRegExp, function(chr) { + // Multi byte sequence convert it to a single entity + if (chr.length > 1) { + return '&#' + (1024 * (chr.charCodeAt(0) - 55296) + (chr.charCodeAt(1) - 56320) + 65536) + ';'; + } + return t.baseEntities[chr] || '&#' + chr.charCodeAt(0) + ';'; + }); + }, + /** + * Encodes the specified string using named entities. The core entities will be encoded + * as named ones but all non lower ascii characters will be encoded into named entities. + * + * @method encodeNamed + * @param {String} text Text to encode. + * @param {Boolean} attr Optional flag to specify if the text is attribute contents. + * @param {Object} entities Optional parameter with entities to use. + * @return {String} Entity encoded text. + */ + encodeNamed: function(text, attr, entities) { + var t = this; + entities = entities || this.namedEntities; + return text.replace(attr ? this.attrsCharsRegExp : this.textCharsRegExp, function(chr) { + return t.baseEntities[chr] || entities[chr] || chr; + }); + }, + /** + * Returns an encode function based on the name(s) and it's optional entities. + * + * @method getEncodeFunc + * @param {String} name Comma separated list of encoders for example named,numeric. + * @param {String} entities Optional parameter with entities to use instead of the built in set. + * @return {function} Encode function to be used. + */ + getEncodeFunc: function(name, entities) { + entities = this.buildEntitiesLookup(entities) || this.namedEntities; + var t = this; + function encodeNamedAndNumeric(text, attr) { + return text.replace(attr ? t.attrsCharsRegExp : t.textCharsRegExp, function(chr) { + return t.baseEntities[chr] || entities[chr] || '&#' + chr.charCodeAt(0) + ';' || chr; + }); + } + + function encodeCustomNamed(text, attr) { + return t.encodeNamed(text, attr, entities); + } + // Replace + with , to be compatible with previous TinyMCE versions + name = this.makeMap(name.replace(/\+/g, ',')); + // Named and numeric encoder + if (name.named && name.numeric) { + return this.encodeNamedAndNumeric; + } + // Named encoder + if (name.named) { + // Custom names + if (entities) { + return encodeCustomNamed; + } + return this.encodeNamed; + } + // Numeric + if (name.numeric) { + return this.encodeNumeric; + } + // Raw encoder + return this.encodeRaw; + }, + /** + * Decodes the specified string, this will replace entities with raw UTF characters. + * + * @method decode + * @param {String} text Text to entity decode. + * @return {String} Entity decoded string. + */ + decode: function(text) + { + var t = this; + return text.replace(this.entityRegExp, function(all, numeric) { + if (numeric) { + numeric = 'x' === numeric.charAt(0).toLowerCase() ? parseInt(numeric.substr(1), 16) : parseInt(numeric, 10); + // Support upper UTF + if (numeric > 65535) { + numeric -= 65536; + return String.fromCharCode(55296 + (numeric >> 10), 56320 + (1023 & numeric)); + } + return t.asciiMap[numeric] || String.fromCharCode(numeric); + } + return t.reverseEntities[all] || t.namedEntities[all] || t.nativeDecode(all); + }); + }, + nativeDecode : function (text) { + return text; + }, + makeMap : function (items, delim, map) { + var i; + items = items || []; + delim = delim || ','; + if (typeof items == "string") { + items = items.split(delim); + } + map = map || {}; + i = items.length; + while (i--) { + map[items[i]] = {}; + } + return map; + } +}; + + + +Roo.htmleditor.TidyEntities.init(); /** * @class Roo.htmleditor.KeyEnter * Handle Enter press.. @@ -32769,10 +34043,18 @@ Roo.extend(Roo.bootstrap.Tooltip, Roo.bootstrap.Component, { this.el.removeClass(['fade','top','bottom', 'left', 'right','in', 'bs-tooltip-top','bs-tooltip-bottom', 'bs-tooltip-left', 'bs-tooltip-right']); + + if(this.bindEl.attr('tooltip-class')) { + this.el.addClass(this.bindEl.attr('tooltip-class')); + } var placement = typeof this.placement == 'function' ? this.placement.call(this, this.el, on_el) : this.placement; + + if(this.bindEl.attr('tooltip-placement')) { + placement = this.bindEl.attr('tooltip-placement'); + } var autoToken = /\s?auto?\s?/i; var autoPlace = autoToken.test(placement); @@ -32862,6 +34144,9 @@ Roo.extend(Roo.bootstrap.Tooltip, Roo.bootstrap.Component, { return; } //this.el.setXY([0,0]); + if(this.bindEl.attr('tooltip-class')) { + this.el.removeClass(this.bindEl.attr('tooltip-class')); + } this.el.removeClass(['show', 'in']); //this.el.hide(); diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 775dbda596..ebdebbe997 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -395,7 +395,7 @@ Roo.bootstrap.Table=function(A){Roo.bootstrap.Table.superclass.constructor.call( this.headerShow=(typeof(A.thead)!='undefined')?A.thead:this.headerShow;this.footerShow=(typeof(A.tfoot)!='undefined')?A.tfoot:this.footerShow;this.view=this;this.sm=this.sm||{xtype:'RowSelectionModel'};if(this.sm){this.sm.grid=this;this.selModel=Roo.factory(this.sm,Roo.grid); this.sm=this.selModel;this.sm.xmodule=this.xmodule||false;}if(this.cm&&typeof(this.cm.config)=='undefined'){this.colModel=new Roo.grid.ColumnModel(this.cm);this.cm=this.colModel;this.cm.xmodule=this.xmodule||false;}if(this.store){this.store=Roo.factory(this.store,Roo.data); this.ds=this.store;this.ds.xmodule=this.xmodule||false;}if(this.footer&&this.store){this.footer.dataSource=this.ds;this.footer=Roo.factory(this.footer);}this.addEvents({"cellclick":true,"celldblclick":true,"rowclick":true,"rowdblclick":true,"mouseover":true,"mouseout":true,'rowclass':true,'rowsrendered':true,"contextmenu":true,"rowcontextmenu":true,"cellcontextmenu":true,"headercontextmenu":true,"mousedown":true} -);};Roo.extend(Roo.bootstrap.Table,Roo.bootstrap.Component,{cls:false,empty_results:'',striped:false,scrollBody:false,bordered:false,hover:false,condensed:false,responsive:false,sm:false,cm:false,store:false,loadMask:false,footerShow:true,headerShow:true,enableColumnResize:true,rowSelection:false,cellSelection:false,layout:false,minColumnWidth:50,bodyEl:false,headEl:false,resizeProxy:false,container:false,lazyLoad:false,CSS:Roo.util.CSS,auto_hide_footer:false,view:false,getAutoCreate:function(){var A=Roo.apply({} +);};Roo.extend(Roo.bootstrap.Table,Roo.bootstrap.Component,{cls:false,empty_results:'',striped:false,scrollBody:false,bordered:false,hover:false,condensed:false,responsive:false,sm:false,cm:false,store:false,loadMask:false,footerShow:true,headerShow:true,enableColumnResize:true,disableAutoSize:false,rowSelection:false,cellSelection:false,layout:false,minColumnWidth:50,bodyEl:false,headEl:false,resizeProxy:false,container:false,lazyLoad:false,CSS:Roo.util.CSS,auto_hide_footer:false,view:false,getAutoCreate:function(){var A=Roo.apply({} ,Roo.bootstrap.Table.superclass.getAutoCreate.call(this));A={tag:'table',cls:'table',cn:[]};if(this.scrollBody){A.cls+=' table-body-fixed';}if(this.striped){A.cls+=' table-striped';}if(this.hover){A.cls+=' table-hover';}if(this.bordered){A.cls+=' table-bordered'; }if(this.condensed){A.cls+=' table-condensed';}if(this.responsive){A.cls+=' table-responsive';}if(this.cls){A.cls+=' '+this.cls;}if(this.layout){A.style=(typeof(A.style)=='undefined')?('table-layout:'+this.layout+';'):(A.style+('table-layout:'+this.layout+';')); }if(this.store||this.cm){if(this.headerShow){A.cn.push(this.renderHeader());}A.cn.push(this.renderBody());if(this.footerShow){A.cn.push(this.renderFooter());}}return {cn:[A]};},initEvents:function(){if(!this.store||!this.cm){return;}if(this.selModel){this.selModel.initEvents(); @@ -404,10 +404,10 @@ if(this.footer){this.footer.parentId=this.id;this.footer.onRender(this.el.select );}this.store.on('load',this.onLoad,this);this.store.on('beforeload',this.onBeforeLoad,this);this.store.on('update',this.onUpdate,this);this.store.on('add',this.onAdd,this);this.store.on("clear",this.clear,this);this.el.on("contextmenu",this.onContextMenu,this); this.cm.on("headerchange",this.onHeaderChange,this);this.cm.on("hiddenchange",this.onHiddenChange,this,arguments);this.bodyEl.on("click",this.onClick,this);this.bodyEl.on("dblclick",this.onDblClick,this);this.bodyEl.on('scroll',this.onBodyScroll,this);this.relayEvents(this.bodyEl,["mousedown","mouseup","mouseover","mouseout","keypress"]); this.resizeProxy=Roo.get(document.body).createChild({cls:"x-grid-resize-proxy",html:' '});if(this.headEl&&this.enableColumnResize!==false&&Roo.grid.SplitDragZone){new Roo.grid.SplitDragZone(this,this.headEl.dom,false);}this.initCSS();},getView:function(){return this; -},initCSS:function(){var cm=this.cm,A=[];this.CSS.removeStyleSheet(this.id+'-cssrules');var B=this.headEl?this.headEl.dom.clientHeight:0;var sz=Roo.getGridSize();var C=0;var D=-1;var E=[];var F=0;for(var i=0,G=cm.getColumnCount();i0){D=i}C+=w;E.push({rel:w,abs:false});}var H=this.bodyEl.dom.clientWidth-F;var I=Math.floor(H/C);var J=H-(I*C); -var K,L,M=0,N,O;for(var i=0,G=cm.getColumnCount();i0){D=i}C+=w;E.push({rel:w,abs:false});}var H=this.bodyEl.dom.clientWidth-F; +var I=Math.floor(H/C);var J=H-(I*C);var K,L,M=0,N,O;for(var i=0,G=cm.getColumnCount();i tr',true).elements,function(el,C){if(el!=A){return;}B=C;});return B;},getHeaderIndex:function(A){var B=this.headEl.select('th',true).elements;return B[A];},getCellIndex:function(A){var id=String(A.className).match(Roo.bootstrap.Table.cellRE); -if(id){return parseInt(id[1],10);}return 0;},getGridEl:function(){return this.el;},autoSize:function(){var A=Roo.get(this.el.dom);var B=this.getGridEl().select('thead',true).first();var C=this.getGridEl().select('tbody',true).first();var D=this.getGridEl().select('tfoot',true).first(); -var cw=A.getWidth();this.getGridEl().select('tfoot tr, tfoot td',true).setWidth(cw);if(C){C.setWidth(A.getWidth());var E=(C.dom.offsetWidth-C.dom.clientWidth);cw-=E;}cw=Math.max(cw,this.totalWidth);this.getGridEl().select('tbody tr',true).setWidth(cw);this.initCSS(); -return;},onBodyScroll:function(){if(this.headEl){this.headEl.setStyle({'position':'relative','left':(-1*this.bodyEl.dom.scrollLeft)+'px'});}if(this.lazyLoad){var A=this.bodyEl.dom.scrollHeight;var B=Math.ceil(this.bodyEl.getScroll().top);var C=this.bodyEl.getHeight(); +if(id){return parseInt(id[1],10);}return 0;},getGridEl:function(){return this.el;},autoSize:function(){if(this.disableAutoSize){return;}var A=Roo.get(this.el.dom);var B=this.getGridEl().select('thead',true).first();var C=this.getGridEl().select('tbody',true).first(); +var D=this.getGridEl().select('tfoot',true).first();var cw=A.getWidth();this.getGridEl().select('tfoot tr, tfoot td',true).setWidth(cw);if(C){C.setWidth(A.getWidth());var E=(C.dom.offsetWidth-C.dom.clientWidth);cw-=E;}cw=Math.max(cw,this.totalWidth);this.getGridEl().select('tbody tr',true).setWidth(cw); +this.initCSS();return;},onBodyScroll:function(){if(this.headEl){this.headEl.setStyle({'position':'relative','left':(-1*this.bodyEl.dom.scrollLeft)+'px'});}if(this.lazyLoad){var A=this.bodyEl.dom.scrollHeight;var B=Math.ceil(this.bodyEl.getScroll().top);var C=this.bodyEl.getHeight(); if(A-C==B){var D=this.ds.getTotalCount();if(this.footer.cursor+this.footer.pageSize-1;var H=this.in_pre||Roo.htmleditor.TidyWriter.whitespace_elements.indexOf(A)>-1;var I=C?Roo.htmleditor.TidyWriter.shortend_elements.indexOf(A)>-1:false;var J=A=='BR'?false:G;if(!J&&!this.in_pre&&this.lastElementEndsWS()){i_inline=false; +}var K=this.indentstr;if(!this.in_pre){if(G){if(A=='BR'){this.addLine();}else if(this.lastElementEndsWS()){this.addLine();}else{K='';}}else{this.addLine();}}else{K='';}this.html.push(K+'<',A.toLowerCase());if(B){for(i=0,l=B.length;i';}var L=A=='BR'?false:this.in_inline;if(!L&&!this.in_pre){this.addLine();}return;}this.html[this.html.length]='>';this.pushState({indentstr:H?'':(this.indentstr+this.indent),in_pre:H,in_inline:G} +);if(!G&&!H){this.addLine();}},lastElementEndsWS:function(){var A=this.html.length>0?this.html[this.html.length-1]:false;if(A===false){return true;}return A.match(/\s+$/);},end:function(A){var B;this.popState();var C='';var D=this.in_inline||Roo.htmleditor.TidyWriter.inline_elements.indexOf(A)>-1; +if(!this.in_pre&&!D){this.addLine();C=this.indentstr;}this.html.push(C+'');this.last_inline=D;},text:function(A,B){if(A.length<1){return;}var C=new XMLSerializer().serializeToString(document.createTextNode(A));if(this.in_pre){this.html[this.html.length]=C; +return;}if(this.in_inline){C=C.replace(/\s+/g,' ');if(C!=' '){C=C.replace(/\s+/,' ');if(B.nextSibling&&B.nextSibling.nodeType==1&&B.nextSibling.nodeName=='BR'){C=C.replace(/\s+$/g,'');}if(B.previousSibling&&B.previousSibling.nodeType==1&&B.previousSibling.nodeName=='BR'){C=this.indentstr+C.replace(/^\s+/g,''); +}if(C.match(/\n/)){C=C.replace(/(?![^\n]{1,64}$)([^\n]{1,64})\s/g,'$1\n'+this.indentstr);C=C.replace(/\n\s+$/,'');}}this.html[this.html.length]=C;return;}var D=this.indentstr;C=C.replace(/\s+/g," ");if(B.previousSibling&&B.previousSibling.nodeType==1&&Roo.htmleditor.TidyWriter.inline_elements.indexOf(B.previousSibling.nodeName)>-1){D=''; +}else{this.addLine();C=C.replace(/^\s+/,'');}if(B.nextSibling&&B.nextSibling.nodeType==1&&Roo.htmleditor.TidyWriter.inline_elements.indexOf(B.nextSibling.nodeName)>-1){}else{C=C.replace(/\s+$/,'');}if(C.length<1){return;}if(!C.match(/\n/)){this.html.push(D+C); +return;}C=this.indentstr+C.replace(/(?![^\n]{1,64}$)([^\n]{1,64})\s/g,'$1\n'+this.indentstr);C=C.replace(/\s+$/,'');this.html.push(C);},cdata:function(A){this.html.push('');},comment:function(A){this.html.push('');},pi:function(A,B){B?this.html.push(''):this.html.push(''); +this.indent!=''&&this.html.push('\n');},doctype:function(A){this.html.push('',this.indent!=''?'\n':'');},reset:function(){this.html.length=0;this.state=[];this.pushState({indentstr:'',in_pre:false,in_inline:false})},getContent:function(){return this.html.join('').replace(/\n$/,''); +},pushState:function(A){this.state.push(A);Roo.apply(this,A);},popState:function(){if(this.state.length<1){return;}var A={in_pre:false,indentstr:''};this.state.pop();if(this.state.length>0){A=this.state[this.state.length-1];}Roo.apply(this,A);},addLine:function(){if(this.html.length<1){return; +}var A=this.html[this.html.length-1];if(A.length>0&&'\n'!==A){this.html.push('\n');}}};Roo.htmleditor.TidyWriter.inline_elements=['SPAN','STRONG','B','EM','I','FONT','STRIKE','U','VAR','CITE','DFN','CODE','MARK','Q','SUP','SUB','SAMP','A'];Roo.htmleditor.TidyWriter.shortend_elements=['AREA','BASE','BASEFONT','BR','COL','FRAME','HR','IMG','INPUT','ISINDEX','LINK','','META','PARAM','EMBED','SOURCE','WBR','TRACK']; +Roo.htmleditor.TidyWriter.whitespace_elements=['PRE','SCRIPT','NOSCRIPT','STYLE','TEXTAREA','VIDEO','AUDIO','IFRAME','OBJECT','CODE']; +// Roo/htmleditor/TidyEntities.js +Roo.htmleditor.TidyEntities={init:function(){this.namedEntities=this.buildEntitiesLookup(this.namedEntitiesData,32);},buildEntitiesLookup:function(A,B){var i,C,D,E={};if(!A){return {};}A=typeof(A)=='string'?A.split(','):A;B=B||10;for(i=0;i':'>','&':'&','`':'`'},reverseEntities:{'<':'<','>':'>','&':'&','"':'"',''':'\''},attrsCharsRegExp:/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,textCharsRegExp:/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rawCharsRegExp:/[<>&\"\']/g,entityRegExp:/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,namedEntities:false,namedEntitiesData:['50','nbsp','51','iexcl','52','cent','53','pound','54','curren','55','yen','56','brvbar','57','sect','58','uml','59','copy','5a','ordf','5b','laquo','5c','not','5d','shy','5e','reg','5f','macr','5g','deg','5h','plusmn','5i','sup2','5j','sup3','5k','acute','5l','micro','5m','para','5n','middot','5o','cedil','5p','sup1','5q','ordm','5r','raquo','5s','frac14','5t','frac12','5u','frac34','5v','iquest','60','Agrave','61','Aacute','62','Acirc','63','Atilde','64','Auml','65','Aring','66','AElig','67','Ccedil','68','Egrave','69','Eacute','6a','Ecirc','6b','Euml','6c','Igrave','6d','Iacute','6e','Icirc','6f','Iuml','6g','ETH','6h','Ntilde','6i','Ograve','6j','Oacute','6k','Ocirc','6l','Otilde','6m','Ouml','6n','times','6o','Oslash','6p','Ugrave','6q','Uacute','6r','Ucirc','6s','Uuml','6t','Yacute','6u','THORN','6v','szlig','70','agrave','71','aacute','72','acirc','73','atilde','74','auml','75','aring','76','aelig','77','ccedil','78','egrave','79','eacute','7a','ecirc','7b','euml','7c','igrave','7d','iacute','7e','icirc','7f','iuml','7g','eth','7h','ntilde','7i','ograve','7j','oacute','7k','ocirc','7l','otilde','7m','ouml','7n','divide','7o','oslash','7p','ugrave','7q','uacute','7r','ucirc','7s','uuml','7t','yacute','7u','thorn','7v','yuml','ci','fnof','sh','Alpha','si','Beta','sj','Gamma','sk','Delta','sl','Epsilon','sm','Zeta','sn','Eta','so','Theta','sp','Iota','sq','Kappa','sr','Lambda','ss','Mu','st','Nu','su','Xi','sv','Omicron','t0','Pi','t1','Rho','t3','Sigma','t4','Tau','t5','Upsilon','t6','Phi','t7','Chi','t8','Psi','t9','Omega','th','alpha','ti','beta','tj','gamma','tk','delta','tl','epsilon','tm','zeta','tn','eta','to','theta','tp','iota','tq','kappa','tr','lambda','ts','mu','tt','nu','tu','xi','tv','omicron','u0','pi','u1','rho','u2','sigmaf','u3','sigma','u4','tau','u5','upsilon','u6','phi','u7','chi','u8','psi','u9','omega','uh','thetasym','ui','upsih','um','piv','812','bull','816','hellip','81i','prime','81j','Prime','81u','oline','824','frasl','88o','weierp','88h','image','88s','real','892','trade','89l','alefsym','8cg','larr','8ch','uarr','8ci','rarr','8cj','darr','8ck','harr','8dl','crarr','8eg','lArr','8eh','uArr','8ei','rArr','8ej','dArr','8ek','hArr','8g0','forall','8g2','part','8g3','exist','8g5','empty','8g7','nabla','8g8','isin','8g9','notin','8gb','ni','8gf','prod','8gh','sum','8gi','minus','8gn','lowast','8gq','radic','8gt','prop','8gu','infin','8h0','ang','8h7','and','8h8','or','8h9','cap','8ha','cup','8hb','int','8hk','there4','8hs','sim','8i5','cong','8i8','asymp','8j0','ne','8j1','equiv','8j4','le','8j5','ge','8k2','sub','8k3','sup','8k4','nsub','8k6','sube','8k7','supe','8kl','oplus','8kn','otimes','8l5','perp','8m5','sdot','8o8','lceil','8o9','rceil','8oa','lfloor','8ob','rfloor','8p9','lang','8pa','rang','9ea','loz','9j0','spades','9j3','clubs','9j5','hearts','9j6','diams','ai','OElig','aj','oelig','b0','Scaron','b1','scaron','bo','Yuml','m6','circ','ms','tilde','802','ensp','803','emsp','809','thinsp','80c','zwnj','80d','zwj','80e','lrm','80f','rlm','80j','ndash','80k','mdash','80o','lsquo','80p','rsquo','80q','sbquo','80s','ldquo','80t','rdquo','80u','bdquo','810','dagger','811','Dagger','81g','permil','81p','lsaquo','81q','rsaquo','85c','euro'],encodeRaw:function(A,B){var t=this; +return A.replace(B?this.attrsCharsRegExp:this.textCharsRegExp,function(C){return t.baseEntities[C]||C;});},encodeAllRaw:function(A){var t=this;return (''+A).replace(this.rawCharsRegExp,function(B){return t.baseEntities[B]||B;});},encodeNumeric:function(A,B){var t=this; +return A.replace(B?this.attrsCharsRegExp:this.textCharsRegExp,function(C){if(C.length>1){return '&#'+(1024*(C.charCodeAt(0)-55296)+(C.charCodeAt(1)-56320)+65536)+';';}return t.baseEntities[C]||'&#'+C.charCodeAt(0)+';';});},encodeNamed:function(A,B,C){var t=this; +C=C||this.namedEntities;return A.replace(B?this.attrsCharsRegExp:this.textCharsRegExp,function(D){return t.baseEntities[D]||C[D]||D;});},getEncodeFunc:function(A,B){B=this.buildEntitiesLookup(B)||this.namedEntities;var t=this;function encodeNamedAndNumeric(C,D){return C.replace(D?t.attrsCharsRegExp:t.textCharsRegExp,function(E){return t.baseEntities[E]||B[E]||'&#'+E.charCodeAt(0)+';'||E; +});}function encodeCustomNamed(C,D){return t.encodeNamed(C,D,B);}A=this.makeMap(A.replace(/\+/g,','));if(A.named&&A.numeric){return this.encodeNamedAndNumeric;}if(A.named){if(B){return encodeCustomNamed;}return this.encodeNamed;}if(A.numeric){return this.encodeNumeric; +}return this.encodeRaw;},decode:function(A){var t=this;return A.replace(this.entityRegExp,function(B,C){if(C){C='x'===C.charAt(0).toLowerCase()?parseInt(C.substr(1),16):parseInt(C,10);if(C>65535){C-=65536;return String.fromCharCode(55296+(C>>10),56320+(1023&C)); +}return t.asciiMap[C]||String.fromCharCode(C);}return t.reverseEntities[B]||t.namedEntities[B]||t.nativeDecode(B);});},nativeDecode:function(A){return A;},makeMap:function(A,B,C){var i;A=A||[];B=B||',';if(typeof A=="string"){A=A.split(B);}C=C||{};i=A.length; +while(i--){C[A[i]]={};}return C;}};Roo.htmleditor.TidyEntities.init(); // Roo/htmleditor/KeyEnter.js Roo.htmleditor.KeyEnter=function(A){Roo.apply(this,A);Roo.get(this.core.doc.body).on('keypress',this.keypress,this);};Roo.htmleditor.KeyEnter.prototype={core:false,keypress:function(e){if(e.charCode!=13&&e.charCode!=10){Roo.log([e.charCode,e]);return true; }e.preventDefault();var A=this.core.doc;var B=this.core.getSelection();var C=B.getRangeAt(0);var n=C.commonAncestorContainer;var pc=C.closest(['ol','ul']);var D=C.closest('li');if(!pc||e.ctrlKey){if(!e.ctrlKey){B.insertNode('br','after');}else{var br=A.createElement('br'); @@ -1418,12 +1449,12 @@ if(!this.currentEl){return;}if(A!=this.currentEl.dom){return;}var xy=ev.getXY(); ]};return A;},bind:function(el){this.bindEl=el;},initEvents:function(){this.arrowEl=this.el.select('.arrow',true).first();this.innerEl=this.el.select('.tooltip-inner',true).first();},enter:function(){if(this.timeout!=null){clearTimeout(this.timeout);}this.hoverState='in'; if(!this.delay||!this.delay.show){this.show();return;}var _t=this;this.timeout=setTimeout(function(){if(_t.hoverState=='in'){_t.show();}},this.delay.show);},leave:function(){clearTimeout(this.timeout);this.hoverState='out';if(!this.delay||!this.delay.hide){this.hide(); return;}var _t=this;this.timeout=setTimeout(function(){if(_t.hoverState=='out'){_t.hide();Roo.bootstrap.Tooltip.currentEl=false;}},delay);},show:function(A){if(!this.el){this.render(document.body);}var B=A||this.bindEl.attr('tooltip')||this.bindEl.select("[tooltip]").first().attr('tooltip'); -this.el.select('.tooltip-inner',true).first().dom.innerHTML=B;this.el.removeClass(['fade','top','bottom','left','right','in','bs-tooltip-top','bs-tooltip-bottom','bs-tooltip-left','bs-tooltip-right']);var C=typeof this.placement=='function'?this.placement.call(this,this.el,on_el):this.placement; -var D=/\s?auto?\s?/i;var E=D.test(C);if(E){C=C.replace(D,'')||'top';}this.el.show();var p=this.getPosition();var F=this.el.getBox();if(E){}var G=this.alignment[C];var xy=this.el.getAlignToXY(this.bindEl,G[0],G[1]);if(C=='top'||C=='bottom'){if(xy[0]<0){C='right'; -}if(xy[0]+this.el.getWidth()>Roo.lib.Dom.getViewWidth()){C='left';}var H=Roo.select('body',true).first().getScroll();if(xy[1]>Roo.lib.Dom.getViewHeight()+H.top-this.el.getHeight()){C='top';}G=this.alignment[C];this.arrowEl.setLeft((this.innerEl.getWidth()/2)-5); -}var I=document.getElementsByTagName('div');var J=Number.MIN_SAFE_INTEGER||-(Math.pow(2,53)-1);for(var i=0;iJ){J=K;}}this.el.dom.style.zIndex=J; -this.el.alignTo(this.bindEl,G[0],G[1]);this.el.addClass(C);this.el.addClass("bs-tooltip-"+C);this.el.addClass('in fade show');this.hoverState=null;if(this.el.hasClass('fade')){}},hide:function(){if(!this.el){return;}this.el.removeClass(['show','in']);}}); - +this.el.select('.tooltip-inner',true).first().dom.innerHTML=B;this.el.removeClass(['fade','top','bottom','left','right','in','bs-tooltip-top','bs-tooltip-bottom','bs-tooltip-left','bs-tooltip-right']);if(this.bindEl.attr('tooltip-class')){this.el.addClass(this.bindEl.attr('tooltip-class')); +}var C=typeof this.placement=='function'?this.placement.call(this,this.el,on_el):this.placement;if(this.bindEl.attr('tooltip-placement')){C=this.bindEl.attr('tooltip-placement');}var D=/\s?auto?\s?/i;var E=D.test(C);if(E){C=C.replace(D,'')||'top';}this.el.show(); +var p=this.getPosition();var F=this.el.getBox();if(E){}var G=this.alignment[C];var xy=this.el.getAlignToXY(this.bindEl,G[0],G[1]);if(C=='top'||C=='bottom'){if(xy[0]<0){C='right';}if(xy[0]+this.el.getWidth()>Roo.lib.Dom.getViewWidth()){C='left';}var H=Roo.select('body',true).first().getScroll(); +if(xy[1]>Roo.lib.Dom.getViewHeight()+H.top-this.el.getHeight()){C='top';}G=this.alignment[C];this.arrowEl.setLeft((this.innerEl.getWidth()/2)-5);}var I=document.getElementsByTagName('div');var J=Number.MIN_SAFE_INTEGER||-(Math.pow(2,53)-1);for(var i=0;iJ){J=K;}}this.el.dom.style.zIndex=J;this.el.alignTo(this.bindEl,G[0],G[1]);this.el.addClass(C);this.el.addClass("bs-tooltip-"+C);this.el.addClass('in fade show'); +this.hoverState=null;if(this.el.hasClass('fade')){}},hide:function(){if(!this.el){return;}if(this.bindEl.attr('tooltip-class')){this.el.removeClass(this.bindEl.attr('tooltip-class'));}this.el.removeClass(['show','in']);}}); // Roo/bootstrap/LocationPicker.js Roo.bootstrap.LocationPicker=function(A){Roo.bootstrap.LocationPicker.superclass.constructor.call(this,A);this.addEvents({initial:true,positionchanged:true,resize:true,show:true,hide:true,mapClick:true,mapRightClick:true,markerClick:true,markerRightClick:true,OverlayViewDraw:true,OverlayViewOnAdd:true,OverlayViewOnRemove:true,OverlayViewShow:true,OverlayViewHide:true,loadexception:true} );};Roo.extend(Roo.bootstrap.LocationPicker,Roo.bootstrap.Component,{gMapContext:false,latitude:0,longitude:0,zoom:15,mapTypeId:false,mapTypeControl:false,disableDoubleClickZoom:false,scrollwheel:true,streetViewControl:false,radius:0,locationName:'',draggable:true,enableAutocomplete:false,enableReverseGeocode:true,markerTitle:'',getAutoCreate:function(){var A={tag:'div',cls:'roo-location-picker'}