From: ji.ji Date: Fri, 10 May 2013 07:44:02 +0000 (+0900) Subject: [FileManager]update FileManager(tizen_2.1) X-Git-Tag: 2.2_release~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=273954cfc0aa54086e95409c03d806b0aa016feb;p=samples%2Fweb%2FFileManager.git [FileManager]update FileManager(tizen_2.1) Change-Id: I73d3bc348e15bba8460e70acfb361124e0409262 --- diff --git a/config.xml b/config.xml index 110dad0..e866411 100644 --- a/config.xml +++ b/config.xml @@ -8,9 +8,7 @@ FileManager - - 0) { this.clipboard.setMode(mode); alert('Data saved in clipboard'); + this.ui.clearTabbars(); } else { alert('Error occured. Data has not been saved in clipboard'); } diff --git a/js/app.ui.js b/js/app.ui.js index cb7ced7..7eb60b0 100644 --- a/js/app.ui.js +++ b/js/app.ui.js @@ -151,16 +151,16 @@ function Ui() { $('#editActionBtn').on('tap', this.handleEditAction.bind(this)); // delete action - $('#deleteActionBtn').on('tap', this.handleDeleteAction.bind(this)); + $('#deleteActionBtn').on('click', this.handleDeleteAction.bind(this)); // cancel edit $('#cancelActionBtn').on('tap', this.handleCancelEditAction.bind(this)); // copy action - $('#copyActionBtn').on('tap', this.handleCopyAction.bind(this)); + $('#copyActionBtn').on('click', this.handleCopyAction.bind(this)); // move action - $('#moveActionBtn').on('tap', this.handleMoveAction.bind(this)); + $('#moveActionBtn').on('click', this.handleMoveAction.bind(this)); // paste action $('a#pasteActionBtn').on('tap', app.pasteClipboard.bind(app)); @@ -201,6 +201,10 @@ function Ui() { //$('.ui-page').css('min-height', 0); }, + clearTabbars: function Ui_clearTabbars() { + $('[data-role = "tabbar"] li > a').removeClass('ui-focus, ui-btn-active'); + }, + /** * Handler for node click * @param {File} node @@ -232,6 +236,7 @@ function Ui() { */ handleEditAction: function Ui_handleEditAction() { this.editMode = true; + this.clearTabbars(); $('.standardTabbar').hide(); $('div.editTabbar').show(); this.disableControlBarButtons($('div.editTabbar'), [this.EDIT_TABBAR_DELETE_ACTION, this.EDIT_TABBAR_COPY_ACTION, this.EDIT_TABBAR_MOVE_ACTION]); @@ -243,6 +248,7 @@ function Ui() { */ handleCancelEditAction: function Ui_handleCancelEditAction() { this.editMode = false; + this.clearTabbars(); $('div.editTabbar').hide(); $('.standardTabbar').show(); this.hideEditCheckBoxes(); @@ -253,7 +259,8 @@ function Ui() { */ handleDeleteAction: function Ui_handleDeleteAction() { var nodesToDelete = [], - $rowElement; + $rowElement, + conf; $('ul#fileList input:checkbox:checked').each(function (index) { $rowElement = $(this).closest('li'); @@ -265,7 +272,10 @@ function Ui() { }); }); - if (nodesToDelete.length > 0 && confirm('Selected nodes will be deleted. Are you sure?')) { + conf = confirm('Selected nodes will be deleted. Are you sure?'); + this.clearTabbars(); + + if (nodesToDelete.length > 0 && conf) { app.deleteNodes(nodesToDelete); this.scrollContentTo(0); $('ul#fileList input:checkbox:checked').remove(); @@ -357,7 +367,7 @@ function Ui() { /** * File comparison function using their names (case insensitive) - * + * * @param {File} x * @param {File} y * @returns {Number}