1/** 2 * Blocks fabric - main object for whole blocks manipulations 3 */ 4function ptsBlockFabric() { 5 this._blocks = []; 6 this._isSorting = false; 7 this._animationSpeed = g_ptsAnimationSpeed; 8} 9ptsBlockFabric.prototype.addFromHtml = function(blockData, jqueryHtml) { 10 var block = this.add( blockData ); 11 block.setRaw( jqueryHtml ); 12}; 13ptsBlockFabric.prototype.add = function(blockData) { 14 var blockData = jQuery.extend({}, blockData); 15 if(!blockData.original_id) { 16 blockData.original_id = blockData.id; 17 blockData.id = 0; 18 } 19 var blockClass = window[ 'ptsBlock_'+ blockData.cat_code ]; 20 if(blockClass) { 21 var block = new blockClass( blockData ); 22 var blockIter = this._blocks.push( block ); 23 block.setIter( blockIter - 1 ); 24 return block; 25 } else { 26 console.log('Block Class For '+ blockData.cat_code+ ' Not Found!!!'); 27 } 28}; 29ptsBlockFabric.prototype.getByViewId = function(viewId) { 30 if(this._blocks && this._blocks.length) { 31 for(var i = 0; i < this._blocks.length; i++) { 32 if(this._blocks[ i ].get('view_id') == viewId) { 33 return this._blocks[ i ]; 34 } 35 } 36 } 37 return false; 38};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.