From 11b7f8cc72d03f1c21dd1fdedc6970f2bb18884c Mon Sep 17 00:00:00 2001 From: Piotr Dabrowski Date: Tue, 27 Aug 2013 10:39:03 +0200 Subject: [PATCH] [Mediacontent] updated Mediacontent sources Change-Id: Ifad5d817d8413e8bda56cd9e151135264fce423f --- js/main.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/js/main.js b/js/main.js index fced601..07fb934 100755 --- a/js/main.js +++ b/js/main.js @@ -14,8 +14,8 @@ * limitations under the License. */ -var gMediaSource, gMediaFolders, gMediaItems, gItemId, gFolderId, gMediaType = "ALL"; -var gStorageType, flagInit; +var gMediaSource, gMediaFolders, gMediaItems, gItemId, gFolderId, +gMediaType = "ALL", gStorageType, gFlagInit, gSpan = $(''); $(document).delegate("#main", "pageinit", function() { var highlightStoragetype = function (storageType) { @@ -27,7 +27,7 @@ $(document).delegate("#main", "pageinit", function() { else if (storageType == "EXTERNAL") $("#folder-type-external").addClass("storagetypeHighlight"); }; - flagInit = false; + gFlagInit = false; gStorageType = gMediaType; @@ -91,12 +91,16 @@ function makeListItem(id, mainText, subText) { return '
  • ' - + mainText + + stripTags(mainText) + '' - + subText + + stripTags(subText) + '
  • '; } +function stripTags(str) { + return gSpan.text(str).html(); +} + function getFolders (storageType) { try { gMediaSource = tizen.content; @@ -122,7 +126,7 @@ function getFolders (storageType) { alert("GetFolders failed:" + err.message); } - flagInit = true; + gFlagInit = true; } function onContentChange() { @@ -134,7 +138,7 @@ function onContentChange() { function showFolderList(storageType) { setLastStorage(storageType); - if(flagInit == false){ + if(gFlagInit == false){ getFolders(storageType); } else{ -- 2.7.4