summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/src/vendor/nohtml/jquery-nohtml.js
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/src/vendor/nohtml/jquery-nohtml.js')
-rw-r--r--sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/src/vendor/nohtml/jquery-nohtml.js111
1 files changed, 0 insertions, 111 deletions
diff --git a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/src/vendor/nohtml/jquery-nohtml.js b/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/src/vendor/nohtml/jquery-nohtml.js
deleted file mode 100644
index fda0b1ca7..000000000
--- a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/src/vendor/nohtml/jquery-nohtml.js
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * Copyright 2010-2013 Ben Birch
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this software except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-(function($, document) {
-
- var create = $.create = (function() {
-
- function addAttrs( el, obj, context ) {
- for( var attr in obj ){
- switch( attr ) {
- case 'tag' :
- break;
- case 'html' :
- el.innerHTML = obj[ attr ];
- break;
- case 'css' :
- for( var style in obj.css ) {
- $.attr( el.style, style, obj.css[ style ] );
- }
- break;
- case 'text' : case 'child' : case 'children' :
- createNode( obj[attr], el, context );
- break;
- case 'cls' :
- el.className = obj[attr];
- break;
- case 'data' :
- for( var data in obj.data ) {
- $.data( el, data, obj.data[data] );
- }
- break;
- default :
- if( attr.indexOf("on") === 0 && $.isFunction(obj[attr]) ) {
- $.event.add( el, attr.substr(2).replace(/^[A-Z]/, function(a) { return a.toLowerCase(); }), obj[attr] );
- } else {
- $.attr( el, attr, obj[attr] );
- }
- }
- }
- }
-
- function createNode(obj, parent, context) {
- if(obj && ($.isArray(obj) || obj instanceof $)) {
- for(var ret = [], i = 0; i < obj.length; i++) {
- var newNode = createNode(obj[i], parent, context);
- if(newNode) {
- ret.push(newNode);
- }
- }
- return ret;
- }
- var el;
- if(typeof(obj) === 'string') {
- el = context.createTextNode( obj );
- } else if(!obj) {
- return undefined;
- } else if(obj.nodeType === 1) {
- el = obj;
- } else if( obj instanceof app.ui.AbstractWidget ) {
- el = obj.el[0];
- } else {
- el = context.createElement( obj.tag || 'DIV' );
- addAttrs(el, obj, context);
- }
- if(parent){ parent.appendChild(el); }
- return el;
- }
-
- return function(elementDef, parentNode) {
- return createNode(elementDef, parentNode, (parentNode && parentNode.ownerDocument) || document);
- };
-
- })();
-
-
- // inject create into jquery internals so object definitions are treated as first class constructors (overrides non-public methods)
- var clean = $.clean,
- init = $.fn.init;
-
- $.clean = function( elems, context, fragment, scripts ) {
- for(var i = 0; i < elems.length; i++) {
- if( elems[i].tag || elems[i] instanceof app.ui.AbstractWidget ) {
- elems[i] = create( elems[i], null, context );
- }
- }
- return clean( elems, context, fragment, scripts );
- };
-
- $.fn.init = function( selector, context, rootjQuery ) {
- if ( selector && ( selector.tag || selector instanceof app.ui.AbstractWidget )) {
- selector = create( selector, null, context );
- }
- return init.call( this, selector, context, rootjQuery );
- };
-
- $.fn.init.prototype = $.fn;
-
-})(jQuery, window.document);
-