X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-debug.js;h=c60ac8583da100034796de59a360ae939b9986bc;hb=e28295d9bf2622b5292557e0935b71b03f537647;hp=a5e751f0cdf0ac9c005a7a248d19cf0fcde98dc4;hpb=f88cf3bdd5f9e788a2c376c5102a2cae13683b12;p=roojs1
diff --git a/roojs-debug.js b/roojs-debug.js
index a5e751f0cd..c60ac8583d 100644
--- a/roojs-debug.js
+++ b/roojs-debug.js
@@ -691,7 +691,7 @@ Roo.factory(conf, Roo.data);
return 'xs'
}
- }
+ }
});
@@ -34881,6 +34881,7 @@ Roo.MessageBox = function(){
}
}
});
+
dlg.on("hide", handleHide);
mask = dlg.mask;
dlg.addKeyListener(27, handleEsc);
@@ -35124,6 +35125,7 @@ Roo.Msg.show({
d.animateTarget = null;
d.show(options.animEl);
}
+ dlg.toFront();
return this;
},
@@ -45590,7 +45592,7 @@ Roo.htmleditor.Filter.prototype = {
Roo.each( Array.from(dom.childNodes), function( e ) {
switch(true) {
- case e.nodeType == 8 && typeof(this.replaceComment) != 'undefined': // comment
+ case e.nodeType == 8 && this.replaceComment !== false: // comment
this.replaceComment(e);
return;
@@ -45790,7 +45792,7 @@ Roo.extend(Roo.htmleditor.FilterBlack, Roo.htmleditor.Filter,
{
tag : true, // all elements.
- replace : function(n)
+ replaceTag : function(n)
{
n.parentNode.removeChild(n);
}
@@ -46313,7 +46315,6 @@ Roo.apply(Roo.htmleditor.FilterBlock.prototype,
* @constructor
* @method Serializer
* @param {Object} settings Name/value settings object.
- * @param {tinymce.html.Schema} schema Schema instance to use.
*/
@@ -46323,8 +46324,7 @@ Roo.htmleditor.TidySerializer = function(settings)
this.writer = new Roo.htmleditor.TidyWriter(settings);
- //settings.validate = !('validate' in settings) || settings.validate;
- // self.schema = schema = schema || new Schema();
+
};
Roo.htmleditor.TidySerializer.prototype = {
@@ -46405,38 +46405,7 @@ Roo.htmleditor.TidySerializer.prototype = {
var writer = this.writer;
var attrs = node.attributes;
// Sort attributes
- /*
- if (validate && attrs && attrs.length > 1) {
- sortedAttrs = [];
- sortedAttrs.map = {};
- elementRule = schema.getElementRule(node.name);
- if (elementRule) {
- for (i = 0, l = elementRule.attributesOrder.length; i < l; i++) {
- attrName = elementRule.attributesOrder[i];
- if (attrName in attrs.map) {
- attrValue = attrs.map[attrName];
- sortedAttrs.map[attrName] = attrValue;
- sortedAttrs.push({
- name: attrName,
- value: attrValue
- });
- }
- }
- for (i = 0, l = attrs.length; i < l; i++) {
- attrName = attrs[i].name;
- if (!(attrName in sortedAttrs.map)) {
- attrValue = attrs.map[attrName];
- sortedAttrs.map[attrName] = attrValue;
- sortedAttrs.push({
- name: attrName,
- value: attrValue
- });
- }
- }
- attrs = sortedAttrs;
- }
- }
- */
+
writer.start(node.nodeName, attrs, isEmpty, node);
if (isEmpty) {
return;
@@ -47899,24 +47868,86 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
xns : rooui.Toolbar //Boostrap?
},
{
- xtype : 'TextField',
- allowBlank : false,
- width : 150,
- name : 'image_src',
+ xtype : 'Button',
+ text: 'Change Image URL',
+
listeners : {
- keyup : function (combo, e)
- {
- toolbar.editorcore.selectNode(toolbar.tb.selectedNode);
+ click: function (btn, state)
+ {
var b = block();
- b.image_src = this.getValue();
- b.updateElement();
- syncValue();
- toolbar.editorcore.onEditorEvent();
+
+ Roo.MessageBox.show({
+ title : "Image Source URL",
+ msg : "Enter the url for the image",
+ buttons: Roo.MessageBox.OKCANCEL,
+ fn: function(btn, val){
+ if (btn != 'ok') {
+ return;
+ }
+ b.image_src = val;
+ b.updateElement();
+ syncValue();
+ toolbar.editorcore.onEditorEvent();
+ },
+ minWidth:250,
+ prompt:true,
+ //multiline: multiline,
+ modal : true,
+ value : b.image_src
+ });
}
},
- xns : rooui.form
-
+ xns : rooui.Toolbar
+ },
+
+ {
+ xtype : 'Button',
+ text: 'Change Link URL',
+
+ listeners : {
+ click: function (btn, state)
+ {
+ var b = block();
+
+ Roo.MessageBox.show({
+ title : "Link URL",
+ msg : "Enter the url for the link - leave blank to have no link",
+ buttons: Roo.MessageBox.OKCANCEL,
+ fn: function(btn, val){
+ if (btn != 'ok') {
+ return;
+ }
+ b.href = val;
+ b.updateElement();
+ syncValue();
+ toolbar.editorcore.onEditorEvent();
+ },
+ minWidth:250,
+ prompt:true,
+ //multiline: multiline,
+ modal : true,
+ value : b.href
+ });
+ }
+ },
+ xns : rooui.Toolbar
},
+ {
+ xtype : 'Button',
+ text: 'Show Video URL',
+
+ listeners : {
+ click: function (btn, state)
+ {
+ Roo.MessageBox.alert("Video URL",
+ block().video_url == '' ? 'This image is not linked ot a video' :
+ 'The image is linked to: ' + block().video_url + '');
+ }
+ },
+ xns : rooui.Toolbar
+ },
+
+
{
xtype : 'TextItem',
text : "Width: ",
@@ -48103,17 +48134,23 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
{
tag: 'figcaption',
- contenteditable : true,
+
style : {
'text-align': 'left',
'margin-top' : '16px',
'font-size' : '16px',
'line-height' : '24px',
- 'font-style': 'italic',
- display : this.caption_display
+ display : this.caption_display
},
cls : this.cls.length > 0 ? (this.cls + '-thumbnail' ) : '',
- html : this.caption
+ cn : [
+ {
+ // we can not rely on yahoo syndication to use CSS elements - so have to use '' to encase stuff.
+ tag : 'i',
+ contenteditable : true,
+ html : this.caption
+ }
+ ]
}
]
@@ -48132,6 +48169,10 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
this.align = this.getVal(node, 'figure', 'align');
this.caption = this.getVal(node, 'figcaption', 'html');
+ // remove '
+ if (this.caption.trim().match(/^]*>/i)) {
+ this.caption = this.caption.trim().replace(/^]*>/i, '').replace(/^<\/i>$/i, '');
+ }
//this.text_align = this.getVal(node, 'figcaption', 'style','text-align');
this.width = this.getVal(node, 'figure', 'style', 'max-width');
//this.margin = this.getVal(node, 'figure', 'style', 'margin');
@@ -50008,7 +50049,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' ]} );
+ new Roo.htmleditor.FilterKeepChildren({node : d, tag : [ 'FONT', 'O:P' ]} );
new Roo.htmleditor.FilterParagraph({ node : d });
new Roo.htmleditor.FilterSpan({ node : d });
new Roo.htmleditor.FilterLongBr({ node : d });
@@ -50937,7 +50978,8 @@ Roo.HtmlEditorCore.black = [
'IFRAME', 'LAYER', 'LINK', 'META', 'OBJECT',
'SCRIPT', 'STYLE' ,'TITLE', 'XML',
//'FONT' // CLEAN LATER..
- 'COLGROUP', 'COL' // messy tables.
+ 'COLGROUP', 'COL' // messy tables.
+
];
Roo.HtmlEditorCore.clean = [ // ?? needed???
@@ -51648,8 +51690,7 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, {
*/
});
- //