| |
Greetings
|
|
|
|
try
{
GupShup.html.util.showElement("adModule1",false);
GupShup.html.util.overlay(document.getElementById("adModuleholder1_RIGHT"),document.getElementById("adModule1"),"left", 0, 0);
}
catch(error)
{
if (GupShup.conf.jsDebug)
alert('Could not process ad module 1 : error-' + error);
}
/* To create a template pplaceholder map.
* 1. Create a top level object template.
* 2. This top level object contains an array with one entry for each placeholder in the template
* 3. Each entry for a placeholder has two members:
* - tmplKey: Identifies the regular expression used in the template
* - tmplMap: Identifies the member object in the JSON object which should replace the template placeholder.
*/
function getTmplPlaceHolderMap()
{
var placeHolderMap = new Array();
placeHolderMap[0] = new Object();
placeHolderMap[0].key = "http://resource.smsgupshup.com/webimages/$PIC_POST_URL$.jpg";
placeHolderMap[0].dataMember = "picHREF";
placeHolderMap[1] = new Object();
placeHolderMap[1].key = "http://resource.smsgupshup.com/webimages/$PIC_IMAGE_URL$.jpg";
placeHolderMap[1].dataMember = "picSrc";
placeHolderMap[2] = new Object();
placeHolderMap[2].key = "$PICID$";
placeHolderMap[2].dataMember = "id";
return placeHolderMap;
}
function getLeftTmplDataObjects(picListJson)
{
var picList = picListJson.featuredPics;
/* We show first half of the categories in the left list. */
var limit = ((picList.length < 6)? picList.length : 6);
limit = Math.floor((limit + 1) / 2);
var picLeftArr = new Array();
for(var i=0; i < limit; i++)
{
var entry = new Object();
entry.picHREF = picList[i].url;
entry.picSrc = picList[i].url;
entry.id = picList[i].id;
picLeftArr[i] = entry;
}
return picLeftArr;
}
function getRightTmplDataObjects(picListJson)
{
var picList = picListJson.featuredPics;
/* We show second half of the categories in the right list. */
var limit = ((picList.length < 6)? picList.length : 6);
start = Math.floor((limit + 1) / 2);
var picRightArr = new Array();
var j=0;
for(var i = start; i < limit; i++)
{
var entry = new Object();
entry.picHREF = picList[i].url;
entry.picSrc = picList[i].url;
entry.id = picList[i].id;
picRightArr[j++] = entry;
}
return picRightArr;
}
function picSmsPromotionJsp_process()
{
var picListJson = '{"params":{"limit":6,"start":0,"catId":"-1","type":"FEATURED_PICTURES","needTotalForPg":false},"message":"","status":"SUCCESS","errorCode":"NO_ERROR","featuredPics":[{"text":"Sorry&#44;galti se mistake ho gaya","title":"sorry","description":"cute sorry","url":"http://resource2.smsgupshup.com/webimages/picimages/WEB223.png","cost":"7.00","contentType":"IMAGE","id":223},{"text":"Miss&#44;call ya missed call karo","title":"call","description":"call me","url":"http://resource.smsgupshup.com/webimages/picimages/WEB226.png","cost":"5.00","contentType":"IMAGE","id":226},{"text":"Taj nahin&#44; par chaahat to hai","title":"Taj","description":"Taj Mahal","url":"http://resource2.smsgupshup.com/webimages/picimages/WEB230.png","cost":"7.00","contentType":"IMAGE","id":230},{"text":"","title":"awesome","description":"U R awesome","url":"http://resource.smsgupshup.com/webimages/picimages/WEB242.png","cost":"3.00","contentType":"IMAGE","id":242}]}';
if (GupShup.util.isInitialized(GupShup.conf.currentModule))
{
if (GupShup.util.trim(GupShup.conf.currentModule.refreshUrl) == '')
{
GupShup.conf.currentModule.refreshUrl
= GupShup.conf.readUrl + "&type=" + 'FEATURED_PICTURES'
+ '&catId=' + '-1'
+ '&start=0' + '&limit=' + '6' + '&needTotalForPg=false';
}
else
{
picListJson = GupShup.conf.currentModule.refreshArgs;
}
}
var picList = GupShup.util.getJsonFromResponse(picListJson);
if((typeof(picList.status) != 'undefined') && (picList.status == 'SUCCESS') && (picList.featuredPics.length > 0))
{
var tmplPlaceHolderMap = getTmplPlaceHolderMap();
var tmplDataObjArr = getLeftTmplDataObjects(picList);
GupShup.util.expandTemplateInDiv("featuredPicJspPicListLeftTableRIGHT", "featuredPicJspPicListRowTemplateRIGHT", tmplPlaceHolderMap, tmplDataObjArr);
tmplDataObjArr = getRightTmplDataObjects(picList);
GupShup.util.expandTemplateInDiv("featuredPicJspPicListRightTableRIGHT", "featuredPicJspPicListRowTemplateRIGHT", tmplPlaceHolderMap, tmplDataObjArr);
}
}
try
{
picSmsPromotionJsp_process();
}
catch(error)
{
if (GupShup.conf.jsDebug)
alert('Could not process featuredPicsJsp module : error-' + error);
}
/* To create a template placeholder map.
* 1. Create a top level object template.
* 2. This top level object contains an array with one entry for each placeholder in the template
* 3. Each entry for a placeholder has two members:
* - tmplKey: Identifies the regular expression used in the template
* - tmplMap: Identifies the member object in the JSON object which should replace the template placeholder.
*/
function getTmplPlaceHolderMap()
{
var placeHolderMap = new Array();
placeHolderMap[0] = new Object();
placeHolderMap[0].key = "http://resource2.smsgupshup.com/webimages/$PIC_POST_URL$.jpg";
placeHolderMap[0].dataMember = "picHREF";
placeHolderMap[1] = new Object();
placeHolderMap[1].key = "http://resource2.smsgupshup.com/webimages/$PIC_IMAGE_URL$.jpg";
placeHolderMap[1].dataMember = "picSrc";
placeHolderMap[2] = new Object();
placeHolderMap[2].key = "$PICID$";
placeHolderMap[2].dataMember = "id";
return placeHolderMap;
}
function getLeftTmplDataObjects(picListJson)
{
var picList = picListJson.popularPics;
/* We show first half of the categories in the left list. */
var limit = ((picList.length < 4)? picList.length : 4);
limit = Math.floor((limit + 1) / 2);
var picLeftArr = new Array();
for(var i=0; i < limit; i++)
{
var entry = new Object();
entry.picHREF = picList[i].url;
entry.picSrc = picList[i].url;
entry.id = picList[i].id;
picLeftArr[i] = entry;
}
return picLeftArr;
}
function getRightTmplDataObjects(picListJson)
{
var picList = picListJson.popularPics;
/* We show second half of the categories in the right list. */
var limit = ((picList.length < 4)? picList.length : 4);
start = Math.floor((limit + 1) / 2);
var picRightArr = new Array();
var j=0;
for(var i = start; i < limit; i++)
{
var entry = new Object();
entry.picHREF = picList[i].url;
entry.picSrc = picList[i].url;
entry.id = picList[i].id;
picRightArr[j++] = entry;
}
return picRightArr;
}
function picSmsPromotionJsp_process()
{
var picListJson = '{"popularPics":[{"text":"","title":"cow","description":"Govardhan cow","url":"http://resource.smsgupshup.com/webimages/picimages/WEB213.png","cost":"3.00","contentType":"IMAGE","id":213},{"text":"","title":"chotiDiwali","description":"","url":"http://resource2.smsgupshup.com/webimages/picimages/WEB199.png","cost":"3.00","contentType":"IMAGE","id":199},{"text":"","title":"shopping","description":"Go Shopping","url":"http://resource.smsgupshup.com/webimages/picimages/WEB260.png","cost":"3.00","contentType":"IMAGE","id":260},{"text":"","title":"allDance","description":"jhingalala dance","url":"http://resource2.smsgupshup.com/webimages/picimages/WEB270.png","cost":"3.00","contentType":"IMAGE","id":270}],"params":{"limit":4,"catId":"-1","start":0,"type":"POPULAR_PICTURES","fromDays":15,"needTotalForPg":false},"message":"","status":"SUCCESS","errorCode":"NO_ERROR"}';
if (GupShup.util.isInitialized(GupShup.conf.currentModule))
{
if (GupShup.util.trim(GupShup.conf.currentModule.refreshUrl) == '')
{
GupShup.conf.currentModule.refreshUrl
= GupShup.conf.readUrl + "&type=" + 'SMS_RICH_CONTENT_LIST'
+ '&catId=' + '-1'
+ '&start=0' + '&limit=' + '4' + '&needTotalForPg=false';
}
else
{
picListJson = GupShup.conf.currentModule.refreshArgs;
}
}
var picList = GupShup.util.getJsonFromResponse(picListJson);
if((typeof(picList.status) != 'undefined') && (picList.status == 'SUCCESS') && (picList.popularPics.length > 0))
{
var tmplPlaceHolderMap = getTmplPlaceHolderMap();
var tmplDataObjArr = getLeftTmplDataObjects(picList);
GupShup.util.expandTemplateInDiv("popularThisWeekJspPicListLeftTableRIGHT", "popularThisWeekJspPicListRowTemplateRIGHT", tmplPlaceHolderMap, tmplDataObjArr);
tmplDataObjArr = getRightTmplDataObjects(picList);
GupShup.util.expandTemplateInDiv("popularThisWeekJspPicListRightTableRIGHT", "popularThisWeekJspPicListRowTemplateRIGHT", tmplPlaceHolderMap, tmplDataObjArr);
}
}
try
{
picSmsPromotionJsp_process();
}
catch(error)
{
if (GupShup.conf.jsDebug)
alert('Could not process popularThisWeekPicsJsp module : error-' + error);
}
var innerScriptDiv = "";
var innerScriptText = "";
var orientation = "RIGHT";
var modules = GupShup.conf[orientation + '_Modules'] = new Array();
GupShup.conf.currentModule = modules[0] = {name : 'errorMsg.jsp', rank : 0,
orientation : 'right', refreshUrl : '', refreshArgs : ''};
GupShup.html.dynamicBar.executeJavaScript('errorMsg.jsp_RIGHT_javaScript');
GupShup.conf.currentModule = modules[1] = {name : 'adModule1.jsp', rank : 1,
orientation : 'right', refreshUrl : '', refreshArgs : ''};
GupShup.html.dynamicBar.executeJavaScript('adModule1.jsp_RIGHT_javaScript');
GupShup.conf.currentModule = modules[2] = {name : 'featuredPics.jsp', rank : 2,
orientation : 'right', refreshUrl : '', refreshArgs : ''};
GupShup.html.dynamicBar.executeJavaScript('featuredPics.jsp_RIGHT_javaScript');
GupShup.conf.currentModule = modules[3] = {name : 'popularThisWeekPics.jsp', rank : 3,
orientation : 'right', refreshUrl : '', refreshArgs : ''};
GupShup.html.dynamicBar.executeJavaScript('popularThisWeekPics.jsp_RIGHT_javaScript');
GupShup.conf.currentModule = null;
|
|