[Mediacontent] updated Mediacontent sources
authorPiotr Dabrowski <p.dabrowski2@samsung.com>
Thu, 10 Oct 2013 06:47:52 +0000 (08:47 +0200)
committerPiotr Dabrowski <p.dabrowski2@samsung.com>
Thu, 10 Oct 2013 06:47:52 +0000 (08:47 +0200)
Change-Id: I4cf47390e1993b8b9525301b4a67ed8876ddd653

css/style.css
js/main.js

index 5bb673f..955a5ee 100755 (executable)
@@ -1,3 +1,7 @@
+body {
+       -webkit-user-select: none;
+}
+
 .storagetypeHighlight {
        color: red !important;
 }
@@ -5,3 +9,6 @@
 #items-title {
        display: block;
 }
+#items-list li {
+       min-height: 26px;
+}
\ No newline at end of file
index 4e14c88..95f84b3 100755 (executable)
@@ -114,12 +114,20 @@ function getFolders (storageType) {
                        var id = $(this).data("id");
                        if (id != null) {
                                getFolderItems(Number(id), gMediaType);
+
                        }
                        return false;
                });
 
                gMediaFolders = folders;
                showFolderList(storageType);
+               /*
+                * refresh view when looking at external items
+                * while external storage is detaching
+                */
+               if($.mobile.activePage.attr("id") == "items") {
+                       showItemList();
+               }
        }
 
        function onGetFoldersError(err) {
@@ -137,7 +145,6 @@ function onContentChange() {
 
 function showFolderList(storageType) {
        setLastStorage(storageType);
-
        if(gFlagInit == false){
                getFolders(storageType);
        }
@@ -166,11 +173,11 @@ function showItemList() {
                        str += makeListItem(i, gMediaItems[i].title,
                                        gMediaItems[i].type + "  Rating: " + gMediaItems[i].rating);
                }
-
                $("#items-list > li[data-id]").remove();
                $("#items-list").append(str).trigger("create").listview("refresh");
        } catch (exc) {
                gMediaType = gStorageType = "ALL";
+               getFolders(gStorageType);
                $("#folder-list li").removeClass("storagetypeHighlight");
                $("#folder-type-all").addClass("storagetypeHighlight");
                $.mobile.changePage("#main");