first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,134 @@
YUI.add('editor-para-ie', function (Y, NAME) {
/**
* Extends EditorParaBase with IE support
* @class Plugin.EditorParaIE
* @extends Plugin.EditorParaBase
* @constructor
* @module editor
* @submodule editor-para-ie
*/
var EditorParaIE = function() {
EditorParaIE.superclass.constructor.apply(this, arguments);
}, HOST = 'host', NODE_CHANGE = 'nodeChange',
P = 'p';
Y.extend(EditorParaIE, Y.Plugin.EditorParaBase, {
/**
* Resolves the ROOT editor element.
* @method _getRoot
* @private
*/
_getRoot: function() {
return this.get(HOST).getInstance().EditorSelection.ROOT;
},
/**
* nodeChange handler to handle fixing an empty document.
* @private
* @method _onNodeChange
*/
_onNodeChange: function(e) {
var host = this.get(HOST), inst = host.getInstance(),
btag = inst.EditorSelection.DEFAULT_BLOCK_TAG,
prev, LAST_CHILD = ':last-child', para, b, para2,
lc, lc2, found = false;
switch (e.changedType) {
case 'enter-up':
para = ((this._lastPara) ? this._lastPara : e.changedNode);
b = para.one('br.yui-cursor');
if (this._lastPara) {
delete this._lastPara;
}
if (b) {
if (b.previous() || b.next()) {
if (b.ancestor(P)) {
b.remove();
}
}
}
if (!para.test(btag)) {
para2 = para.ancestor(btag);
if (para2) {
para = para2;
para2 = null;
}
}
if (para.test(btag)) {
prev = para.previous();
if (prev) {
lc = prev.one(LAST_CHILD);
while (!found) {
if (lc) {
lc2 = lc.one(LAST_CHILD);
if (lc2) {
lc = lc2;
} else {
found = true;
}
} else {
found = true;
}
}
if (lc) {
host.copyStyles(lc, para);
}
}
}
break;
case 'enter':
if (e.changedNode.test('br')) {
e.changedNode.remove();
} else if (e.changedNode.test('p, span')) {
b = e.changedNode.one('br.yui-cursor');
if (b) {
b.remove();
}
}
break;
}
},
initializer: function() {
var host = this.get(HOST);
if (host.editorBR) {
Y.error('Can not plug EditorPara and EditorBR at the same time.');
return;
}
host.on(NODE_CHANGE, Y.bind(this._onNodeChange, this));
}
}, {
/**
* editorPara
* @static
* @property NAME
*/
NAME: 'editorPara',
/**
* editorPara
* @static
* @property NS
*/
NS: 'editorPara',
ATTRS: {
host: {
value: false
}
}
});
Y.namespace('Plugin');
Y.Plugin.EditorPara = EditorParaIE;
}, '3.18.1', {"requires": ["editor-para-base"]});
@@ -0,0 +1 @@
YUI.add("editor-para-ie",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)},r="host",i="nodeChange",s="p";e.extend(n,e.Plugin.EditorParaBase,{_getRoot:function(){return this.get(r).getInstance().EditorSelection.ROOT},_onNodeChange:function(e){var t=this.get(r),n=t.getInstance(),i=n.EditorSelection.DEFAULT_BLOCK_TAG,o,u=":last-child",a,f,l,c,h,p=!1;switch(e.changedType){case"enter-up":a=this._lastPara?this._lastPara:e.changedNode,f=a.one("br.yui-cursor"),this._lastPara&&delete this._lastPara,f&&(f.previous()||f.next())&&f.ancestor(s)&&f.remove(),a.test(i)||(l=a.ancestor(i),l&&(a=l,l=null));if(a.test(i)){o=a.previous();if(o){c=o.one(u);while(!p)c?(h=c.one(u),h?c=h:p=!0):p=!0;c&&t.copyStyles(c,a)}}break;case"enter":e.changedNode.test("br")?e.changedNode.remove():e.changedNode.test("p, span")&&(f=e.changedNode.one("br.yui-cursor"),f&&f.remove())}},initializer:function(){var t=this.get(r);if(t.editorBR){e.error("Can not plug EditorPara and EditorBR at the same time.");return}t.on(i,e.bind(this._onNodeChange,this))}},{NAME:"editorPara",NS:"editorPara",ATTRS:{host:{value:!1}}}),e.namespace("Plugin"),e.Plugin.EditorPara=n},"3.18.1",{requires:["editor-para-base"]});
@@ -0,0 +1,134 @@
YUI.add('editor-para-ie', function (Y, NAME) {
/**
* Extends EditorParaBase with IE support
* @class Plugin.EditorParaIE
* @extends Plugin.EditorParaBase
* @constructor
* @module editor
* @submodule editor-para-ie
*/
var EditorParaIE = function() {
EditorParaIE.superclass.constructor.apply(this, arguments);
}, HOST = 'host', NODE_CHANGE = 'nodeChange',
P = 'p';
Y.extend(EditorParaIE, Y.Plugin.EditorParaBase, {
/**
* Resolves the ROOT editor element.
* @method _getRoot
* @private
*/
_getRoot: function() {
return this.get(HOST).getInstance().EditorSelection.ROOT;
},
/**
* nodeChange handler to handle fixing an empty document.
* @private
* @method _onNodeChange
*/
_onNodeChange: function(e) {
var host = this.get(HOST), inst = host.getInstance(),
btag = inst.EditorSelection.DEFAULT_BLOCK_TAG,
prev, LAST_CHILD = ':last-child', para, b, para2,
lc, lc2, found = false;
switch (e.changedType) {
case 'enter-up':
para = ((this._lastPara) ? this._lastPara : e.changedNode);
b = para.one('br.yui-cursor');
if (this._lastPara) {
delete this._lastPara;
}
if (b) {
if (b.previous() || b.next()) {
if (b.ancestor(P)) {
b.remove();
}
}
}
if (!para.test(btag)) {
para2 = para.ancestor(btag);
if (para2) {
para = para2;
para2 = null;
}
}
if (para.test(btag)) {
prev = para.previous();
if (prev) {
lc = prev.one(LAST_CHILD);
while (!found) {
if (lc) {
lc2 = lc.one(LAST_CHILD);
if (lc2) {
lc = lc2;
} else {
found = true;
}
} else {
found = true;
}
}
if (lc) {
host.copyStyles(lc, para);
}
}
}
break;
case 'enter':
if (e.changedNode.test('br')) {
e.changedNode.remove();
} else if (e.changedNode.test('p, span')) {
b = e.changedNode.one('br.yui-cursor');
if (b) {
b.remove();
}
}
break;
}
},
initializer: function() {
var host = this.get(HOST);
if (host.editorBR) {
Y.error('Can not plug EditorPara and EditorBR at the same time.');
return;
}
host.on(NODE_CHANGE, Y.bind(this._onNodeChange, this));
}
}, {
/**
* editorPara
* @static
* @property NAME
*/
NAME: 'editorPara',
/**
* editorPara
* @static
* @property NS
*/
NS: 'editorPara',
ATTRS: {
host: {
value: false
}
}
});
Y.namespace('Plugin');
Y.Plugin.EditorPara = EditorParaIE;
}, '3.18.1', {"requires": ["editor-para-base"]});