public/libs/jquery.tmpl.js
File jquery.tmpl.js
has 365 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery Templates Plugin
* http://github.com/jquery/jquery-tmpl
*
* Copyright Software Freedom Conservancy, Inc.
Function storeTmplItems
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function storeTmplItems( content ) {
var keySuffix = "_" + cloneIndex, elem, elems, newClonedItems = {}, i, l, m;
for ( i = 0, l = content.length; i < l; i++ ) {
if ( (elem = content[i]).nodeType !== 1 ) {
continue;
Function buildTmplFn
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildTmplFn( markup ) {
return new Function("jQuery","$item",
"var $=jQuery,call,_=[],$data=$item.data;" +
// Introduce the data as local variables using with(){}
Function processItemKey
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function processItemKey( el ) {
var pntKey, pntNode = el, pntItem, tmplItem, key;
// Ensure that each rendered template inserted into the DOM has its own template item,
if ( (key = el.getAttribute( tmplItmAtt ))) {
while ( pntNode.parentNode && (pntNode = pntNode.parentNode).nodeType === 1 && !(pntKey = pntNode.getAttribute( tmplItmAtt ))) { }
Function tmpl
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
tmpl: function( tmpl, data, options, parentItem ) {
var ret, topLevel = !parentItem;
if ( topLevel ) {
// This is a top-level tmpl call (not from a nested template using {{tmpl}})
parentItem = topTmplItem;