[Mediacontent]update Mediacontent(tizen_2.1)
authorji.ji <ji.ji@samsung.com>
Tue, 4 Jun 2013 07:10:47 +0000 (16:10 +0900)
committerji.ji <ji.ji@samsung.com>
Tue, 4 Jun 2013 07:10:47 +0000 (16:10 +0900)
Change-Id: Ia3d98d97e9a9d54fb5b61e8aba8bd3e2247d817d

index.html
js/main.js

index 9ea1cda..434a246 100755 (executable)
@@ -23,7 +23,7 @@
                        <ul data-role="listview" id="folder-list">
                                <li data-role="list-divider">Storage type</li>
                                <li id="folder-type-all">
-                                       All
+                                       ALL
                                </li>
                                <li id="folder-type-internal">
                                        INTERNAL
@@ -48,7 +48,7 @@
                        <ul data-role="listview" id="items-list">
                                <li data-role="list-divider">Item type</li>
                                <li class="ui-li-has-radio">
-                                       All
+                                       ALL
                                        <input type="radio" name="item-type" id="item-type-all" value="ALL" checked="checked"/>
                                </li>
                                <li class="ui-li-has-radio">
index 759da07..af0db0a 100755 (executable)
@@ -66,21 +66,10 @@ $(document).delegate("#items", "pageinit", function() {
                }
                return false;
        });
-
-       $("#batch-update").bind("vclick", function() {
-               updateLast3Ratings();
-               return false;
-       });
 });
 
 $(document).delegate("#detail", "pageinit", function() {
        $("#detail").bind("pagebeforeshow", showMediaDetail);
-
-       $("#update").bind("vclick", function() {
-               updateRating();
-               window.history.back();
-               return false;
-       });
 });
 
 function makeListItem(id, mainText, subText) {
@@ -221,43 +210,9 @@ function showMediaDetail() {
                        + makeListItem(null, "Track number", item.trackNumber)
                        + makeListItem(null, "Duration", item.duration + " Milliseconds");
        } else {
-               alert("Invalid type");
-               window.history.back();
+               str = makeCommonPropertiesListItems(item);
        }
 
        $("#media-details").html(str).trigger("create").listview("refresh");
 }
 
-function updateRating() {
-       var item = gMediaItems[gItemId];
-
-       item.rating += 1; /* increase by 1 */
-       try {
-               gMediaSource.update(item);
-       } catch (exc) {
-               alert("updateItem exc: " + exc.message);
-       }
-}
-
-function updateLast3Ratings() {
-       function onSuccess() {
-               getFolderItems(gFolderId, gMediaType);
-       }
-
-       function onError(err) {
-               alert("updateItemsBatch failed:" + err.message);
-       }
-
-       var itemArray = [];
-
-       for (var i = gMediaItems.length - 1, j = 0; i >= 0 && j < 3; i--, j++) {
-               gMediaItems[i].rating += 1;
-               itemArray.push(gMediaItems[i]);
-       }
-
-       try {
-               gMediaSource.updateBatch(itemArray, onSuccess, onError);
-       } catch (exc) {
-               alert("updateItemsBatch exc:" + exc.message);
-       }
-}