[FileManager]update FileManager(tizen_2.1)
authorji.ji <ji.ji@samsung.com>
Thu, 23 May 2013 06:55:00 +0000 (15:55 +0900)
committerji.ji <ji.ji@samsung.com>
Thu, 23 May 2013 06:55:00 +0000 (15:55 +0900)
Change-Id: I3c3480744f1c3246003b736476931651e838063c

css/style.css
icon.png
js/app.helpers.js
js/app.js
js/app.model.js
js/app.ui.js
templates/main.tpl

index 89d984c..ff788d0 100644 (file)
@@ -73,7 +73,6 @@ body {
        text-overflow: ellipsis;
        background-color: #EEE;
        border-top: solid 1px #DDD;
-       direction: rtl;
        text-align: left;
 }
 
index 33fbb63..9765b1b 100644 (file)
Binary files a/icon.png and b/icon.png differ
index f8208d4..2ed23ec 100644 (file)
@@ -1,5 +1,5 @@
 /*jslint devel: true*/
-/*global $ */
+/*global $, jQuery */
 
 /**
  * @class Helpers
@@ -107,7 +107,7 @@ function Helpers() {
                        } else if (ext === '.mp3') {
                                mime = 'audio/mp3';
                        } else if (ext === '.txt' || ext === '.doc' || ext === '.html' || ext === '.ppt' || ext === '.xls' || ext === '.pdf') {
-                               //mime = 'text/*';
+                               mime = ''; //mime = 'text/*';
                        }
 
                        return mime;
@@ -138,17 +138,19 @@ function Helpers() {
                getCopyFileName: function (sourceName, filesList) {
                        var ext = this.getFileExtension(sourceName),
                                fileName = this.getFileName(sourceName),
-                               copyFileName = sourceName, i = 1;
+                               copyFileName = sourceName,
+                               i = 1;
+
                        while ($.inArray(copyFileName, filesList) !== -1) {
-                               i+=1;
-                               copyFileName = fileName+'('+i+')'+ext;
+                               i += 1;
+                               copyFileName = fileName + '(' + i + ')' + ext;
                        }
                        return copyFileName;
                }
        };
 }());
 
-(function($) {
+(function ($) {
        'use strict';
 
        function height(t, el) {
@@ -158,12 +160,11 @@ function Helpers() {
                return t.width() > el.width();
        }
 
-       $.fn.ellipsis = function ()
-       {
+       $.fn.ellipsis = function () {
                return this.each(function () {
                        var el, text, multiline, t, func;
                        el = $(this);
-                       if(el.css("overflow") === "hidden") {
+                       if (el.css("overflow") === "hidden") {
                                text = el.html();
                                multiline = el.hasClass('multiline');
                                t = $(this.cloneNode(true))
@@ -171,8 +172,7 @@ function Helpers() {
                                        .css('position', 'absolute')
                                        .css('overflow', 'visible')
                                        .width(multiline ? el.width() : 'auto')
-                                       .height(multiline ? 'auto' : el.height())
-                                       ;
+                                       .height(multiline ? 'auto' : el.height());
 
                                el.after(t);
 
index 5662cff..9b4c7c4 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -89,7 +89,7 @@ var App = null;
                        var self = this;
                        document.addEventListener('webkitvisibilitychange', function () { self.refreshCurrentPage(); });
                        // workaround: page refresh for on/off keyboard
-                       window.addEventListener('softkeyboardchange',function () {
+                       window.addEventListener('softkeyboardchange', function () {
                                $.mobile.activePage.page('refresh');
                        });
                },
@@ -99,7 +99,9 @@ var App = null;
                 */
                displayStorages: function App_displayStorages() {
                        this.currentPath = '';
-                       this.ui.scrollContentTo(0);
+                       if (!this.ui.editMode) {
+                               this.ui.scrollContentTo(0);
+                       }
                        this.ui.displayStorages(this.model.getInternalStorages());
                },
 
index 31f267c..40f8f72 100644 (file)
@@ -1,5 +1,5 @@
 /*jslint devel: true*/
-/*global tizen, SystemIO, $ */
+/*global tizen, SystemIO, $, app */
 
 /**
  * @class Model
index 7eb60b0..f1ca91b 100644 (file)
@@ -18,6 +18,12 @@ function Ui() {
                root: true,
 
                /**
+                * locked folders
+                * @type {array}
+                */
+               lockedFolders: ['ringtones'],
+
+               /**
                 * UI edit mode
                 * @type {boolean}
                 */
@@ -151,20 +157,24 @@ function Ui() {
                        $('#editActionBtn').on('tap', this.handleEditAction.bind(this));
 
                        // delete action
-                       $('#deleteActionBtn').on('click', this.handleDeleteAction.bind(this));
+                       $('#deleteActionBtn').on('tap', this.handleDeleteAction.bind(this));
 
                        // cancel edit
                        $('#cancelActionBtn').on('tap', this.handleCancelEditAction.bind(this));
 
                        // copy action
-                       $('#copyActionBtn').on('click', this.handleCopyAction.bind(this));
+                       $('#copyActionBtn').on('tap', this.handleCopyAction.bind(this));
 
                        // move action
-                       $('#moveActionBtn').on('click', this.handleMoveAction.bind(this));
+                       $('#moveActionBtn').on('tap', this.handleMoveAction.bind(this));
 
                        // paste action
                        $('a#pasteActionBtn').on('tap', app.pasteClipboard.bind(app));
 
+                       // remove active class
+                       $('[data-role = "tabbar"] li > a').on('click', function () {
+                               $(this).removeClass('ui-focus, ui-btn-active');
+                       });
                        // exit
                        $('.ui-myExit').on('tap', app.exit);
 
@@ -180,7 +190,7 @@ function Ui() {
                                }
                        });
 
-                       $('#saveNewFolder').on('click', function () {
+                       $('#saveNewFolder').on('tap', function () {
                                var folderName = $('#newFolderName').val().trim();
                                if (folderName === '') {
                                        alert("Empty folder name");
@@ -212,7 +222,7 @@ function Ui() {
                 */
                handleNodeClick: function Ui_handleNodeClick(node, toggleCheckbox) {
                        if (this.root) {
-                               app.model.loadInternalStorages(function(){app.displayStorages()});
+                               app.model.loadInternalStorages(function () { app.displayStorages(); });
                                this.root = false;
                        } else if (this.editMode === true) {
                                //if edit mode is on toggle checkbox state
@@ -335,7 +345,11 @@ function Ui() {
 
                        for (i = 0; i < len; i = i + 1) {
                                nodeName = nodes[i].label.trim();
-                               if (nodeName !== '' && (nodes[i].type === 0 || nodes[i].type === 'INTERNAL') && nodeName.indexOf('wgt-') === -1) {
+                               if (nodeName !== ''
+                                               && (nodes[i].type === 0 || nodes[i].type === 'INTERNAL')
+                                               && nodeName.indexOf('wgt-') === -1
+                                               && $.inArray(nodeName, this.lockedFolders) === -1
+                                               ) {
                                        listElements.push(this.templateManager.get('folderRow', {
                                                id: i,
                                                name: nodeName,
@@ -354,11 +368,11 @@ function Ui() {
 
                        // update file list
                        $('#fileList').empty();
+                       if (this.editMode) {
+                               this.scrollContentTo(0);
+                       }
                        listTemplate = listElements.join('');
                        $(listTemplate).appendTo('#fileList');
-                       // reset scrollview position
-                       //$('#main .ui-scrollview-view').css('-webkit-transform', 'none');
-                       $('#fileList').listview("refresh");
 
                        this.resetDefaultCheckBoxLabelEvents();
                        this.hideSelectAllArea();
@@ -455,10 +469,6 @@ function Ui() {
                        $('#fileList').html(listElements.join(''))
                                .trigger('refresh')
                                .trigger('create');
-                       // fixing ellisis for Bengali language
-                       $(".ui-li-text-main.nodename").ellipsis();
-                       $("#mainTitle").ellipsis();
-                       $("#navbar").ellipsis();
 
                        if (this.editMode === true) {
                                $('.selectAll').show();
index f6871ca..85a9e3a 100644 (file)
@@ -19,7 +19,7 @@
                                        <h1>Add new folder<h1>
                                </div>
                                <div class="ui-popup-text">
-                                       <input id="newFolderName" type="text" value="New folder" class="newFolder" />
+                                       <input id="newFolderName" type="text" value="New folder" class="newFolder" maxlength="255" />
                                </div>
                                <div class="ui-popup-button-bg">
                                        <a data-role="button" id="saveNewFolder" data-rel="back" data-inline="true">Save</a>