author | hgs |
Fri, 15 Oct 2010 17:30:59 -0400 | |
changeset 16 | 3c88a81ff781 |
parent 12 | afcd8e6d025b |
permissions | -rw-r--r-- |
16 | 1 |
var BOOKMARKVIEW_PAGE = ":/bookmarkview/BookmarkView.html"; |
2 |
var SETTINGSVIEW_PAGE = ":/settingsview/SettingsView.html"; |
|
3 |
var HISTORYVIEW_PAGE = ":/historyview/historyView.html"; |
|
4 |
var SUGGESTS_PAGE = "qrc:///suggests/suggests.html"; |
|
5 |
||
3 | 6 |
var preLoadBookmarksDone=0; |
16 | 7 |
|
8 |
document.getElementsByClassName = function(class_name) { |
|
9 |
var docList = this.all || this.getElementsByTagName('*'); |
|
10 |
var matchArray = new Array(); |
|
11 |
||
12 |
/*Create a regular expression object for class*/ |
|
13 |
var re = new RegExp("(?:^|\\s)"+class_name+"(?:\\s|$)"); |
|
14 |
for (var i = 0; i < docList.length; i++) { |
|
15 |
if (re.test(docList[i].className) ) { |
|
16 |
matchArray[matchArray.length] = docList[i]; |
|
17 |
} |
|
18 |
} |
|
19 |
||
20 |
return matchArray; |
|
21 |
} |
|
22 |
||
0
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
function calcToolbarPopAnchorOffset(anchoredSnippet, |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
anchorToSnippet, |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
xCenterOffset, |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
yBotGap) |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
{ |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
// |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
// For popup-chrome (menu, zoomBtn) they are aligned by default |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
// to the upper left-hand corners. |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
// |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
// This will calculate the offset needed to center the popup above the |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
// button, or make it slightly off-center |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
// |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
// xCenterOffset = make x param this much off center |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
// yBotGap = how much gap should there be between top of anchorTo, |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
37 |
// and bottom of anchored |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
// |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
anchorToGeom = anchorToSnippet.getGeometry(); |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
anchoredGeom = anchoredSnippet.getGeometry(); |
3 | 41 |
xOffset = -(0.5 * anchoredGeom.width) + |
0
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
(0.5 * anchorToGeom.width) + |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
xCenterOffset; |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
yOffset = -anchoredGeom.height - yBotGap; |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
return([xOffset,yOffset]); |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
} |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
47 |
|
16 | 48 |
function hidePopups(){ |
49 |
||
50 |
if (window.snippets.MostVisitedViewId.isVisible()) |
|
51 |
window.snippets.MostVisitedViewId.hide(); |
|
52 |
||
53 |
if (window.snippets.SuggestsChromeId.isVisible()) { |
|
54 |
window.snippets.SuggestsChromeId.hide(false); |
|
55 |
views.WebView.enabled = true; |
|
56 |
views.WebView.unfreeze(); |
|
57 |
} |
|
58 |
||
59 |
if(app.ui() != "maemo5_ui") |
|
60 |
return; |
|
61 |
||
62 |
snippets.BookmarkDialogId.hide(); |
|
63 |
} |
|
64 |
||
3 | 65 |
// Display the super-page with the given name and path. |
66 |
function showSuperPage(pageName, path) { |
|
67 |
||
68 |
if (window.views.WebView[pageName] == undefined) { |
|
69 |
window.views.WebView.createSuperPage(pageName, true); |
|
16 | 70 |
window.views.WebView[pageName].load(/*chrome.baseDirectory +*/ path); |
3 | 71 |
} |
16 | 72 |
else { |
73 |
// FIXME: this is a workaround temporary solution |
|
74 |
// this is used to render CSS styles for super pages |
|
75 |
// instead of just popping them up from ViewStack which somehow prevent proper CSS styling on page display |
|
76 |
window.views.WebView[pageName].load(path); |
|
77 |
} |
|
78 |
||
12 | 79 |
if (!window.views.WebView.bedrockTiledBackingStoreEnabled()){ |
80 |
window.views.WebView.setSavedZoomValueInView(window.views.WebView.zoomFactor); |
|
81 |
window.views.WebView.zoomFactor = 1.0; |
|
82 |
} |
|
3 | 83 |
//window.views.WebView.showSuperPage(pageName); |
84 |
window.ViewStack.switchView(pageName, "WebView"); |
|
16 | 85 |
|
3 | 86 |
if (!window.views.WebView.bedrockTiledBackingStoreEnabled()) |
87 |
window.views.WebView.touchNav.doubleClickEnabled = false; |
|
16 | 88 |
|
89 |
hidePopups(); |
|
3 | 90 |
} |
91 |
||
92 |
function chrome_showBookmarksView() { |
|
16 | 93 |
showSuperPage("BookmarkTreeView", BOOKMARKVIEW_PAGE); |
3 | 94 |
} |
95 |
||
96 |
function chrome_showHistoryView() { |
|
16 | 97 |
showSuperPage("BookmarkHistoryView", HISTORYVIEW_PAGE); |
3 | 98 |
} |
99 |
||
100 |
function chrome_showWindowsView() { |
|
16 | 101 |
if(app.ui() != "maemo5_ui") |
102 |
window.snippets.ZoomBarId.hide(); // hide Zoom Bar while showing windows view |
|
3 | 103 |
window.snippets.MostVisitedViewId.hide(); |
104 |
window.ViewStack.switchView("WindowView", "WebView"); |
|
105 |
} |
|
106 |
||
107 |
function chrome_showSettingsView() { |
|
16 | 108 |
showSuperPage("SettingsView", SETTINGSVIEW_PAGE); |
3 | 109 |
} |
110 |
||
111 |
function chrome_showBasicMenu() { |
|
112 |
||
113 |
cm_TheContextMenu.show(viewMenu_getWebViewContextMenuData()); |
|
114 |
||
115 |
} |
|
116 |
||
117 |
function chrome_addBookmark() { |
|
12 | 118 |
launchBookmarkDialog(window.pageController.currentDocTitle,window.pageController.currentDocUrl,-1,0); |
3 | 119 |
} |
120 |
||
121 |
function chrome_cancelMenu() { |
|
122 |
||
123 |
cm_TheContextMenu.cancel(); |
|
124 |
} |
|
125 |
||
126 |
// Center the given snippet on-screen. |
|
127 |
function centerSnippet(snippet) { |
|
128 |
var x = (chrome.displaySize.width - snippet.geometry.width) / 2; |
|
129 |
var y = (chrome.displaySize.height - snippet.geometry.height) / 2; |
|
130 |
snippet.setPosition(x, y); |
|
131 |
} |
|
132 |
||
133 |
function getChildById(el, childId) { |
|
134 |
var children = el.getElementsByTagName("*"); |
|
135 |
for (var i = 0; i < children.length; i++) { |
|
136 |
var child = children[i]; |
|
137 |
if (child.id == childId) |
|
138 |
return child; |
|
139 |
} |
|
140 |
return undefined; |
|
141 |
} |
|
142 |
||
143 |
function onActivateBookmarkView() { |
|
16 | 144 |
snippets.BookmarkViewToolbarId.enabled = true; |
145 |
try { |
|
12 | 146 |
window.bookmarksController.launchBookmarkEditDailog.connect(showBookmarkEditDialog); |
16 | 147 |
} |
148 |
catch (e){;} // just in case bookmarksHistoryManager is not ready yet |
|
149 |
||
3 | 150 |
} |
151 |
function preLoad() |
|
152 |
{ |
|
16 | 153 |
preloadSuperPage("BookmarkTreeView", BOOKMARKVIEW_PAGE); |
154 |
preloadSuperPage("SettingsView", SETTINGSVIEW_PAGE); |
|
3 | 155 |
preLoadBookmarksDone=1; |
156 |
} |
|
157 |
function _updateHistory() |
|
158 |
{ |
|
16 | 159 |
preloadSuperPage("BookmarkHistoryView", HISTORYVIEW_PAGE); |
3 | 160 |
} |
161 |
||
162 |
function _updateBookmarks() |
|
163 |
{ |
|
16 | 164 |
preloadSuperPage("BookmarkTreeView", BOOKMARKVIEW_PAGE); |
3 | 165 |
} |
166 |
||
167 |
// chrome_popupShownCount keeps a count of how many popups are currently being shown so that |
|
168 |
// we can re-enable the appropriate UI elements only when the last one is hidden. |
|
169 |
var chrome_popupShownCount = 0; |
|
170 |
||
171 |
// Called when a PopupChromeItem is displayed. |
|
172 |
function onPopupShown(id) { |
|
173 |
if(chrome_popupShownCount == 0) { |
|
174 |
// Disable snippets etc. that should be greyed-out while the popup is shown. |
|
12 | 175 |
if (app.layoutType() == "tenone") { |
176 |
snippets.TitleUrlId.enabled = false; |
|
177 |
} |
|
178 |
else { |
|
179 |
snippets.UrlSearchChromeId.enabled = false; |
|
180 |
} |
|
3 | 181 |
views.WebView.enabled = false; |
182 |
views.WebView.freeze(); |
|
183 |
||
184 |
// Note: this can be expanded as needed. We may want to disable all snippets except |
|
185 |
// for the status bar and the one who's id was passed in. |
|
186 |
} |
|
187 |
chrome_popupShownCount++; |
|
0
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
188 |
|
3 | 189 |
if(preLoadBookmarksDone==0) |
190 |
{ |
|
191 |
preLoad(); |
|
192 |
} |
|
193 |
} |
|
194 |
||
195 |
// Called when a PopupChromeItem is hidden. |
|
196 |
function onPopupHidden(id) { |
|
197 |
chrome_popupShownCount--; |
|
198 |
if(chrome_popupShownCount == 0) { |
|
199 |
// Re-enable snippets etc. that were greyed-out while popups were being shown. |
|
12 | 200 |
if (app.layoutType() == "tenone") { |
201 |
snippets.TitleUrlId.enabled = true; |
|
202 |
} |
|
203 |
else { |
|
204 |
snippets.UrlSearchChromeId.enabled = true; |
|
205 |
} |
|
3 | 206 |
views.WebView.enabled = true; |
207 |
views.WebView.unfreeze(); |
|
208 |
} |
|
209 |
if(chrome_popupShownCount < 0) app.debug("onPopupHidden: error, chrome_popupShownCount invalid"); |
|
210 |
} |
|
211 |
||
212 |
function preloadSuperPage(pageName, path) { |
|
213 |
if (window.views.WebView[pageName] == undefined) { |
|
214 |
window.views.WebView.createSuperPage(pageName, true); |
|
215 |
} |
|
16 | 216 |
window.views.WebView[pageName].load(/*chrome.baseDirectory +*/ path); |
217 |
} |
|
218 |
||
219 |
//var chrome_blockPopupsAction; |
|
220 |
||
221 |
// Handle Block/Allow Popups action. |
|
222 |
function chrome_toggleBlockPopups() { |
|
223 |
hidePopups(); |
|
224 |
pageController.savePopupSettings(!pageController.getPopupSettings()); |
|
225 |
chrome_blockPopupsAction.text = chrome_getBlockPopupsActionText(); |
|
226 |
} |
|
227 |
||
228 |
// Returns the text for the Block/Allow Popups action based on the the current setting in the page controller. |
|
229 |
function chrome_getBlockPopupsActionText() { |
|
230 |
return window.localeDelegate.translateText(pageController.getPopupSettings() |
|
231 |
? "txt_browser_content_view_menu_page_allow_popups" |
|
232 |
: "txt_browser_content_view_menu_page_block_popups"); |
|
233 |
} |
|
234 |
||
235 |
function chrome_setZoomButtonActions() { |
|
236 |
snippets.ZoomInButtonSnippet.connectAction("zoomIn", "WebView", true, true); |
|
237 |
snippets.ZoomOutButtonSnippet.connectAction("zoomOut", "WebView", true, true); |
|
3 | 238 |
} |
239 |
||
16 | 240 |
// Create an action and add it to the Maemo menu bar. |
241 |
function chrome_addMaemoMenuBarAction(text, callback) { |
|
242 |
var action = app.createAction(text); |
|
243 |
action.triggered.connect(callback); |
|
244 |
app.addMenuBarAction(action); |
|
245 |
return action; |
|
246 |
} |
|
247 |
function chrome_updateMaemoMenuBarItems() { |
|
248 |
app.setMenuBarEnabled(!views.WebView.currentPageIsSuperPage()); |
|
249 |
} |
|
250 |
||
251 |
// Create actions that appear in the Maemo system menu at the top of the screen. |
|
252 |
function chrome_createMaemoMenuBarItems() { |
|
253 |
// Global menu items. |
|
254 |
chrome_addMaemoMenuBarAction(window.localeDelegate.translateText("txt_browser_content_view_menu_nav_bookmarks"), |
|
255 |
chrome_showBookmarksView); |
|
256 |
chrome_addMaemoMenuBarAction(window.localeDelegate.translateText("txt_browser_content_view_menu_page_add_bookmark"), |
|
257 |
function() { hidePopups(); launchBookmarkDialog(pageController.currentDocTitle, pageController.currentDocUrl,-1,0); } ); |
|
258 |
chrome_addMaemoMenuBarAction(window.localeDelegate.translateText("txt_browser_content_view_menu_nav_history"), |
|
259 |
chrome_showHistoryView); |
|
260 |
chrome_blockPopupsAction = chrome_addMaemoMenuBarAction(chrome_getBlockPopupsActionText(), |
|
261 |
chrome_toggleBlockPopups); |
|
262 |
chrome_addMaemoMenuBarAction(window.localeDelegate.translateText("txt_browser_content_view_menu_page_share"), |
|
263 |
function() { hidePopups(); pageController.share(pageController.currentDocUrl); } ); |
|
264 |
chrome_addMaemoMenuBarAction(window.localeDelegate.translateText("txt_browser_content_view_menu_nav_settings"), |
|
265 |
chrome_showSettingsView); |
|
266 |
} |
|
267 |
function onChromeActivated() { |
|
268 |
||
269 |
snippets.SuggestsChromeId.hide(false); |
|
270 |
||
271 |
if(!views.WebView.currentPageIsSuperPage()) { |
|
272 |
views.WebView.enabled = true; |
|
273 |
views.WebView.unfreeze(); |
|
274 |
} |
|
275 |
snippets.MostVisitedViewId.hide(); |
|
276 |
||
277 |
if(app.ui() == "maemo5_ui") { |
|
278 |
snippets.UrlSearchChromeId.grabFocus(); |
|
279 |
} |
|
280 |
} |
|
281 |
||
282 |
function onChromeComplete() { |
|
283 |
||
3 | 284 |
if (app.ui() == "orbit_ui") { |
285 |
snippets.StatusBarChromeId.hide(); |
|
286 |
} |
|
12 | 287 |
if (app.layoutType() == "tenone") { |
288 |
window.snippets.TitleUrlId.anchorToView("top"); |
|
16 | 289 |
|
290 |
// Disable content view while Most Visited view is shown. |
|
291 |
snippets.MostVisitedViewId.shown.connect( |
|
292 |
function() { |
|
293 |
views.WebView.enabled = false; |
|
294 |
views.WebView.unfreeze(); |
|
295 |
} |
|
296 |
); |
|
12 | 297 |
|
16 | 298 |
// Enable content view when Most Visited view is hidden. |
299 |
snippets.MostVisitedViewId.hidden.connect( |
|
300 |
function() { |
|
301 |
views.WebView.enabled = true; |
|
302 |
} |
|
303 |
); |
|
304 |
||
305 |
} |
|
306 |
else if(app.ui() == "maemo5_ui") { |
|
307 |
||
308 |
chrome_createMaemoMenuBarItems(); |
|
309 |
||
310 |
// Update the menu items when the page type changes. |
|
311 |
views.WebView.normalPageShown.connect(chrome_updateMaemoMenuBarItems); |
|
312 |
views.WebView.superPageShown.connect(chrome_updateMaemoMenuBarItems); |
|
313 |
window.snippets.UrlSearchChromeId.anchorToView("top"); |
|
314 |
chrome_setZoomButtonActions(); |
|
315 |
||
316 |
// Disable content view while Most Visited view is shown. |
|
317 |
snippets.MostVisitedViewId.shown.connect( |
|
318 |
function() { |
|
319 |
views.WebView.enabled = false; |
|
320 |
snippets.UrlSearchChromeId.enabled = false; |
|
321 |
} |
|
322 |
); |
|
323 |
||
324 |
// Enable content view when Most Visited view is hidden. |
|
325 |
snippets.MostVisitedViewId.hidden.connect( |
|
326 |
function() { |
|
327 |
views.WebView.enabled = true; |
|
328 |
snippets.UrlSearchChromeId.enabled = true; |
|
329 |
} |
|
330 |
); |
|
331 |
||
12 | 332 |
} |
333 |
else { |
|
334 |
window.snippets.UrlSearchChromeId.anchorToView("top"); |
|
335 |
} |
|
3 | 336 |
|
337 |
window.snippets.WebViewToolbarId.menuButtonSelected.connect(chrome_showBasicMenu); |
|
338 |
window.snippets.BookmarkViewToolbarId.addBookmarkSelected.connect(chrome_addBookmark); |
|
339 |
window.snippets.WebViewToolbarId.menuButtonCanceled.connect(chrome_cancelMenu); |
|
340 |
||
16 | 341 |
// Dismiss Most Visited view when it gets an external click event. |
342 |
snippets.MostVisitedViewId.externalMouseEvent.connect( |
|
343 |
function(type, name, description) { |
|
344 |
if(name == "MouseClick") { |
|
345 |
// Use timer here to hide the view even when the Most Visited page button is clicked, |
|
346 |
// otherwise the button re-displays the view. |
|
347 |
setTimeout('snippets.MostVisitedViewId.hide()', 100); |
|
348 |
} |
|
349 |
}); |
|
350 |
||
0
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
351 |
//window.snippets.ButtonContainer.setVisibilityAnimator("G_VISIBILITY_FADE_ANIMATOR"); |
16 | 352 |
if(app.ui() != "maemo5_ui"){ |
0
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
353 |
result = new Array; |
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
354 |
result = calcToolbarPopAnchorOffset(window.snippets.ZoomBarId, |
3 | 355 |
window.snippets.ZoomButtonSnippet, |
356 |
0,10); |
|
357 |
window.snippets.ZoomBarId.anchorTo("ZoomButtonSnippet",result[0],result[1]); |
|
16 | 358 |
} |
3 | 359 |
|
16 | 360 |
snippets.SuggestsChromeId.url = /*chrome.baseDirectory +*/ SUGGESTS_PAGE; |
0
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
361 |
|
3 | 362 |
window.ViewStack.activateBookmark.connect(onActivateBookmarkView); |
363 |
||
364 |
chrome.popupShown.connect(onPopupShown); |
|
365 |
chrome.popupHidden.connect(onPopupHidden); |
|
16 | 366 |
|
367 |
if(app.ui() == "maemo5_ui") |
|
368 |
chrome.chromeActivated.connect(onChromeActivated); |
|
369 |
||
3 | 370 |
window.pageController.loadFinished.connect(_updateHistory); |
9 | 371 |
window.pageController.loadFinishedForBackgroundWindow.connect(_updateHistory); |
12 | 372 |
window.bookmarksController.bookmarksCleared.connect(_updateBookmarks); |
373 |
window.historyManager.historyCleared.connect(_updateHistory); |
|
16 | 374 |
|
0
1450b09d0cfd
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
375 |
} |
3 | 376 |
|
377 |
// For debugging: prints all properties and functions attached to a given object. |
|
378 |
function printProp(x) { |
|
379 |
var str = "-------------\n" + x + " properties:\n"; |
|
380 |
for (property in x) { |
|
381 |
str += ("\t" + property + ": " + x[property] + "\n"); |
|
382 |
} |
|
383 |
app.debug(str); |
|
384 |
} |
|
16 | 385 |