forked from careyrp/Spontanier
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhomescreen.js
More file actions
163 lines (159 loc) · 4.97 KB
/
homescreen.js
File metadata and controls
163 lines (159 loc) · 4.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
/*
* JS for homescreen generated by Exadel Tiggzi
*
* Created on: Saturday, October 06, 2012, 12:51:17 PM (PDT)
*/
/************************************
* JS API provided by Exadel Tiggzi *
************************************/
/* Setting project environment indicator */
Tiggr.env = "bundle";
Tiggr.getProjectGUID = function() {
return '44cece61-1495-4a3f-8b49-14001fd5dd25';
}
Tiggr.getTargetPlatform = function() {
return '0';
}
function navigateTo(outcome, useAjax) {
Tiggr.navigateTo(outcome, useAjax);
}
function adjustContentHeight() {
Tiggr.adjustContentHeight();
}
function adjustContentHeightWithPadding() {
Tiggr.adjustContentHeightWithPadding();
}
function setDetailContent(pageUrl) {
Tiggr.setDetailContent(pageUrl);
}
/**********************
* SECURITY CONTEXTS *
**********************/
/*******************************
* SERVICE SETTINGS *
********************************/
/*************************
* SERVICES *
*************************/
createSpinner("files/resources/lib/jquerymobile/images/ajax-loader.gif");
Tiggr.AppPages = [{
"name": "homescreen",
"location": "homescreen.html"
}, {
"name": "enterscreen",
"location": "enterscreen.html"
}, {
"name": "acceptp",
"location": "acceptp.html"
}];
j_0_js = function(runBeforeShow) { /* Object & array with components "name-to-id" mapping */
var n2id_buf = {
'mobilebutton1': 'j_4',
'mobilespacer1': 'j_5',
'mobilelist1': 'j_6',
'mobilelistitem1': 'j_7',
'mobilelistitem2': 'j_8',
'mobilelistitem3': '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 = [];
/************************
* EVENTS AND HANDLERS *
************************/
j_0_beforeshow = function() {
Tiggr.CurrentScreen = 'j_0';
for (var idx = 0; idx < datasources.length; idx++) {
datasources[idx].__setupDisplay();
}
}
// screen onload
screen_43A2_onLoad = j_0_onLoad = function() {
screen_43A2_elementsExtraJS();
j_0_windowEvents();
screen_43A2_elementsEvents();
}
// screen window events
screen_43A2_windowEvents = j_0_windowEvents = function() {
$('#j_0').bind('pageshow orientationchange', function() {
adjustContentHeightWithPadding();
});
}
// screen elements extra js
screen_43A2_elementsExtraJS = j_0_elementsExtraJS = function() {
// screen (screen-43A2) extra code
listView = $("#j_6");
theme = listView.attr("data-theme");
if (typeof theme !== 'undefined') {
var themeClass = "ui-btn-up-" + theme;
listItem = $("#j_6 .ui-li-static");
$.each(listItem, function(index, value) {
$(this).addClass(themeClass);
});
}
}
// screen elements handler
screen_43A2_elementsEvents = j_0_elementsEvents = function() {
$("a :input,a a,a fieldset label").live({
click: function(event) {
event.stopPropagation();
}
});
$('#j_3 [name="mobilebutton1"]').die().live({
click: function() {
if (!$(this).attr('disabled')) {
Tiggr.navigateTo('enterscreen', {
reverse: false
});
Tiggr.navigateTo('enterscreen', {
transition: 'slide',
reverse: false
});
}
},
});
$('#j_3 [name="mobilelist1"]').die().live({
click: function() {
if (!$(this).attr('disabled')) {
$(this).mobilelist1({
'mode': 'bool',
'prompt': 'Accept invite?',
'useModal': true,
'buttons': {
'OK': {
click: function() {
$('#dialogoutput').text('OK');
}
},
'Cancel': {
click: function() {
$('#dialogoutput').text('Cancel');
},
icon: "delete",
theme: "c"
}
}
});
}
},
});
}
$("#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) {
j_0_js();
});