Here is my JavaScript file:
Tiggzi.env = "apk";
Tiggzi.getProjectGUID = function() {
return '';
}
Tiggzi.getTargetPlatform = function() {
return 'W';
}
function navigateTo(outcome, useAjax) {
Tiggzi.navigateTo(outcome, useAjax);
}
function adjustContentHeight() {
Tiggzi.adjustContentHeight();
}
function adjustContentHeightWithPadding() {
Tiggzi.adjustContentHeightWithPadding();
}
function setDetailContent(pageUrl) {
Tiggzi.setDetailContent(pageUrl);
}
/**********************
- SECURITY CONTEXTS *
*******************/
/****************************
- SERVICE SETTINGS *
*****************************/
/**********************
- SERVICES *
**********************/
var ParnerGymNyheter = new Tiggr.RestService({
'url': '',
'dataType': 'json',
'type': 'get',
});
createSpinner("res/lib/jquerymobile/images/ajax-loader.gif");
Tiggzi.AppPages = [{
"name": "Screen1",
"location": "#j_0"
}, {
"name": "Partnergym",
"location": "#j_13"
}];
j_13_js = function(runBeforeShow) { / Object & array with components "name-to-id" mapping /
var n2id_buf = {
'mobileimage_2': 'j_17',
'mobilebutton1_39': 'j_18'
};
if ("n2id" in window && window.n2id !== undefined) {
$.extend(n2id, n2id_buf);
} else {
window.n2id = n2id_buf;
}
Tiggr.CurrentScreen = 'j_13';
/**********************
- NONVISUAL COMPONENTS *
**********************/
var datasources = [];
// Tiggzi Push-notification registration service
/*********************
- EVENTS AND HANDLERS *
*********************/
j_13_beforeshow = function() {
Tiggzi.CurrentScreen = 'j_13';
for (var idx = 0; idx < datasources.length; idx++) {
datasources[idx].__setupDisplay();
}
}
// screen onload
screen_3671_onLoad = j_13_onLoad = function() {
screen_3671_elementsExtraJS();
j_13_deviceEvents();
j_13_windowEvents();
screen_3671_elementsEvents();
}
// screen window events
screen_3671_windowEvents = j_13_windowEvents = function() {
$('#j_13').bind('pageshow orientationchange', function() {
adjustContentHeightWithPadding();
});
}
// device events
j_13_deviceEvents = function() {
document.addEventListener("deviceready", function() {});
}
// screen elements extra js
screen_3671_elementsExtraJS = j_13_elementsExtraJS = function() {
// screen (screen-3671) extra code
}
// screen elements handler
screen_3671_elementsEvents = j_13_elementsEvents = function() {
$("a :input,a a,a fieldset label").live({
click: function(event) {
event.stopPropagation();
}
});
$('#j_16 [name="mobilebutton1_39"]').die().live({
click: function() {
if (!$(this).attr('disabled')) {
Tiggr.navigateTo('Screen1', {
transition: 'flip',
reverse: false
});
}
},
});
}
$("#j_13").die("pagebeforeshow").live("pagebeforeshow", function(event, ui) {
j_13_beforeshow();
});
if (runBeforeShow) {
j_13_beforeshow();
} else {
j_13_onLoad();
}
}
$("#j_13").die("pageinit").live("pageinit", function(event, ui) {
Tiggzi.processSelectMenu($(this));
j_13_js();
});
j_0_js = function(runBeforeShow) { / Object & array with components "name-to-id" mapping /
var n2id_buf = {
'mobilegrid_4': 'j_4',
'mobilegridcell_5': 'j_5',
'mobileimage_9': 'j_6',
'mobilegridcell_6': 'j_7',
'lblTitle': 'j_8',
'lblText': 'j_9'
};
if ("n2id" in window && window.n2id !== undefined) {
$.extend(n2id, n2id_buf);
} else {
window.n2id = n2id_buf;
}
Tiggr.CurrentScreen = 'j_0';
/**********************
- NONVISUAL COMPONENTS *
**********************/
var datasources = [];
restservice1 = new Tiggr.DataSource(ParnerGymNyheter, {
'onComplete': function(jqXHR, textStatus) {
$t.refreshScreenFormElements("j_13");
},
'onSuccess': function(data) {
alert('success');
},
'onError': function(jqXHR, textStatus, errorThrown) {
alert('Failed');
},
'responseMapping': [{
'PATH': ['$'],
'ID': 'mobilegrid_4',
'SET': [{
'PATH': ['Title'],
'ID': 'lblTitle',
'ATTR': '@'
}, {
'PATH': ['Text'],
'ID': 'lblText',
'ATTR': '@'
}]
}],
'requestMapping': [{
'PATH': ['X-Tiggzi-Database-Id'],
'HEADER': true,
'ATTR': ''
}]
});
datasources.push(restservice1);
// Tiggzi Push-notification registration service
/*********************
- EVENTS AND HANDLERS *
************************/
j_0_beforeshow = function() {
Tiggzi.CurrentScreen = 'j_0';
for (var idx = 0; idx < datasources.length; idx++) {
datasources[idx].__setupDisplay();
}
}
// screen onload
screen_042F_onLoad = j_0_onLoad = function() {
screen_042F_elementsExtraJS();
try {
restservice1.execute({})
} catch (ex) {
console.log(ex.name + ' ' + ex.message);
hideSpinner();
};
j_0_deviceEvents();
j_0_windowEvents();
screen_042F_elementsEvents();
}
// screen window events
screen_042F_windowEvents = j_0_windowEvents = function() {
$('#j_0').bind('pageshow orientationchange', function() {
adjustContentHeightWithPadding();
});
}
// device events
j_0_deviceEvents = function() {
document.addEventListener("deviceready", function() {});
}
// screen elements extra js
screen_042F_elementsExtraJS = j_0_elementsExtraJS = function() {
// screen (screen-042F) extra code
}
// screen elements handler
screen_042F_elementsEvents = j_0_elementsEvents = function() {
$("a :input,a a,a fieldset label").live({
click: function(event) {
event.stopPropagation();
}
});
}
$("#j_0").die("pagebeforeshow").live("pagebeforeshow", function(event, ui) {
j_0_beforeshow();
});
if (runBeforeShow) {
j_0_beforeshow();
} else {
j_0_onLoad();
}
}
$("#j_0").die("pageinit").live("pageinit", function(event, ui) {
Tiggzi.processSelectMenu($(this));
j_0_js();
});