/* *id04v1.js *$Revision: 1.3 $ *JS Functions for the Model Series portlets *(c) 1992-2009 Cisco Systems, Inc. All rights reserved. *Terms and Conditions: http://cisco.com/en/US/swassets/sw293/sitewide_important_notices.html */ cdc.util.ensureNamespace('cdc.cl.id04v1'); cdc.cl.id04v1 = { moreResMsg:"", noResMsg :"", locale :"", noofitems :"", sortorder :"", // ascending or descending. alignment :"", // vertical or horizontal nocolumns :"", init: function(obj) { this.moreResMsg =obj.mlp_moreresmsg; this.noResMsg =obj.mlp_noresmsg; this.locale =obj.mlp_locale; this.noofitems =(obj.mlp_max_results != undefined)?(obj.mlp_max_results):60; this.sortorder =(obj.mlp_sort_order != undefined)?(obj.mlp_sort_order):"ascending"; this.alignment =(obj.mlp_list_align != undefined)?(obj.mlp_list_align):"vertical"; this.nocolumns =(obj.mlp_no_columns != undefined)?(obj.mlp_no_columns):3; jQuery('#id04v1').empty().append('

"+cdc.cl.id04v1.moreResMsg+"
"; } if(modellist.length < 1){ var errmsg=true; } // Horizontal Listing if( this.alignment == "horizontal" ) { var j=0; modellength = modellist.length; for( i=0; i"+ this.noResMsg +"
"; } // jQuery('#id04v1').empty().append(listing); }, formatList : function( arr ){ var str = ""+ this.noResMsg +"
"; jQuery('#id04v1').append(listing); } } // end class cdc.cl.object //####################### CALLING THE JS ####################### jQuery(document).ready( function() { jQuery(".id04v1").each( function(i) { if(document.getElementById(this.id)){ var tmpobj = document.getElementById(this.id); var obj = tmpobj.mlpPrefsObj; if(obj===undefined){ obj = jQuery.parseJSON(jQuery(this).attr("data-config")); } if( obj ){ //cdc.cl.id04v1.init(obj.mlp_seriesID,obj.mlp_serviceURL, obj.mlp_locale, obj.mlp_moreresmsg, obj.mlp_noresmsg); cdc.cl.id04v1.init(obj); } } }); // END : FORM.EACH CONDITION });