many jquery methods work
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
build/browser/Frameworks/XmlFramework.min.js
vendored
4
build/browser/Frameworks/XmlFramework.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -168,6 +168,10 @@
|
||||
throw new Error("You must not overwrite operations!");
|
||||
}
|
||||
this.buffer[o.creator][o.op_number] = o;
|
||||
if (this.number_of_operations_added_to_HB == null) {
|
||||
this.number_of_operations_added_to_HB = 0;
|
||||
}
|
||||
this.number_of_operations_added_to_HB++;
|
||||
return o;
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -47,6 +47,9 @@
|
||||
};
|
||||
|
||||
TextInsert.prototype.applyDelete = function() {
|
||||
if (this.content instanceof types.Operation) {
|
||||
this.content.applyDelete();
|
||||
}
|
||||
this.content = null;
|
||||
return TextInsert.__super__.applyDelete.apply(this, arguments);
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -101,7 +101,7 @@
|
||||
};
|
||||
|
||||
XmlType.prototype.setXmlProxy = function() {
|
||||
var insertBefore, that;
|
||||
var insertBefore, removeChild, that;
|
||||
this.xml._yatta = this;
|
||||
that = this;
|
||||
insertBefore = function(insertedNode, adjacentNode) {
|
||||
@@ -122,7 +122,23 @@
|
||||
this.xml._proxy('removeAttribute', function(name) {
|
||||
return that.attributes.val(name, void 0);
|
||||
});
|
||||
return this.xml._proxy('removeChild', function(node) {});
|
||||
removeChild = function(node) {
|
||||
var d, elem;
|
||||
elem = that.elements.beginning.next_cl;
|
||||
while (elem.type !== 'Delimiter' && elem.content !== node._yatta) {
|
||||
elem = elem.next_cl;
|
||||
}
|
||||
if (elem.type === 'Delimiter') {
|
||||
throw new Error("You are only allowed to delete existing (direct) child elements!");
|
||||
}
|
||||
d = new types.Delete(void 0, elem);
|
||||
return HB.addOperation(d).execute();
|
||||
};
|
||||
this.xml._proxy('removeChild', removeChild);
|
||||
return this.xml._proxy('replaceChild', function(insertedNode, replacedNode) {
|
||||
insertBefore.call(this, replacedNode, insertedNode);
|
||||
return removeChild.call(this, replacedNode);
|
||||
});
|
||||
};
|
||||
|
||||
XmlType.prototype.val = function(enforce) {
|
||||
@@ -145,7 +161,7 @@
|
||||
e = this.elements.beginning.next_cl;
|
||||
while (e.type !== "Delimiter") {
|
||||
n = e.content;
|
||||
if (!n.isDeleted()) {
|
||||
if (!e.isDeleted()) {
|
||||
if (n.type === "XmlType") {
|
||||
this.xml.appendChild(n.val(enforce));
|
||||
} else if (n.type === "WordType") {
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
<div id="test_dom" test_attribute="the test"><p id="removeme">remove me</p><p>This is a test object for <b>XmlFramework</b></p></div>
|
||||
<div id="test_dom" test_attribute="the test" class="stuffy" style="color: blue"><p id="replaceme">replace me</p><p id="removeme">remove me</p><p>This is a test object for <b>XmlFramework</b></p><span class="span_element"><p>span</p></span></div>
|
||||
<script src="../../node_modules/mocha/mocha.js" class="awesome"></script>
|
||||
<script>
|
||||
mocha.setup('bdd');
|
||||
|
||||
Reference in New Issue
Block a user