MCPcopy Create free account
hub / github.com/apache/cloudstack / JQLitePatchJQueryRemove

Function JQLitePatchJQueryRemove

tools/ngui/static/js/lib/angular.js:1545–1576  ·  view source on GitHub ↗
(name, dispatchThis)

Source from the content-addressed store, hash-verified

1543/////////////////////////////////////////////
1544
1545function JQLitePatchJQueryRemove(name, dispatchThis) {
1546 var originalJqFn = jQuery.fn[name];
1547 originalJqFn = originalJqFn.$original || originalJqFn;
1548 removePatch.$original = originalJqFn;
1549 jQuery.fn[name] = removePatch;
1550
1551 function removePatch() {
1552 var list = [this],
1553 fireEvent = dispatchThis,
1554 set, setIndex, setLength,
1555 element, childIndex, childLength, children,
1556 fns, events;
1557
1558 while(list.length) {
1559 set = list.shift();
1560 for(setIndex = 0, setLength = set.length; setIndex < setLength; setIndex++) {
1561 element = jqLite(set[setIndex]);
1562 if (fireEvent) {
1563 element.triggerHandler('$destroy');
1564 } else {
1565 fireEvent = !fireEvent;
1566 }
1567 for(childIndex = 0, childLength = (children = element.children()).length;
1568 childIndex < childLength;
1569 childIndex++) {
1570 list.push(jQuery(children[childIndex]));
1571 }
1572 }
1573 }
1574 return originalJqFn.apply(this, arguments);
1575 }
1576}
1577
1578/////////////////////////////////////////////
1579function JQLite(element) {

Callers 1

bindJQueryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected