Change-Id: I3c3480744f1c3246003b736476931651e838063c
text-overflow: ellipsis;
background-color: #EEE;
border-top: solid 1px #DDD;
text-overflow: ellipsis;
background-color: #EEE;
border-top: solid 1px #DDD;
} else if (ext === '.mp3') {
mime = 'audio/mp3';
} else if (ext === '.txt' || ext === '.doc' || ext === '.html' || ext === '.ppt' || ext === '.xls' || ext === '.pdf') {
} else if (ext === '.mp3') {
mime = 'audio/mp3';
} else if (ext === '.txt' || ext === '.doc' || ext === '.html' || ext === '.ppt' || ext === '.xls' || ext === '.pdf') {
+ mime = ''; //mime = 'text/*';
getCopyFileName: function (sourceName, filesList) {
var ext = this.getFileExtension(sourceName),
fileName = this.getFileName(sourceName),
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) {
while ($.inArray(copyFileName, filesList) !== -1) {
- i+=1;
- copyFileName = fileName+'('+i+')'+ext;
+ i += 1;
+ copyFileName = fileName + '(' + i + ')' + ext;
}
return copyFileName;
}
};
}());
}
return copyFileName;
}
};
}());
'use strict';
function height(t, el) {
'use strict';
function height(t, el) {
return t.width() > el.width();
}
return t.width() > el.width();
}
- $.fn.ellipsis = function ()
- {
+ $.fn.ellipsis = function () {
return this.each(function () {
var el, text, multiline, t, func;
el = $(this);
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))
text = el.html();
multiline = el.hasClass('multiline');
t = $(this.cloneNode(true))
.css('position', 'absolute')
.css('overflow', 'visible')
.width(multiline ? el.width() : 'auto')
.css('position', 'absolute')
.css('overflow', 'visible')
.width(multiline ? el.width() : 'auto')
- .height(multiline ? 'auto' : el.height())
- ;
+ .height(multiline ? 'auto' : el.height());
var self = this;
document.addEventListener('webkitvisibilitychange', function () { self.refreshCurrentPage(); });
// workaround: page refresh for on/off keyboard
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');
});
},
$.mobile.activePage.page('refresh');
});
},
*/
displayStorages: function App_displayStorages() {
this.currentPath = '';
*/
displayStorages: function App_displayStorages() {
this.currentPath = '';
- this.ui.scrollContentTo(0);
+ if (!this.ui.editMode) {
+ this.ui.scrollContentTo(0);
+ }
this.ui.displayStorages(this.model.getInternalStorages());
},
this.ui.displayStorages(this.model.getInternalStorages());
},
-/*global tizen, SystemIO, $ */
+/*global tizen, SystemIO, $, app */
+ * locked folders
+ * @type {array}
+ */
+ lockedFolders: ['ringtones'],
+
+ /**
* UI edit mode
* @type {boolean}
*/
* UI edit mode
* @type {boolean}
*/
$('#editActionBtn').on('tap', this.handleEditAction.bind(this));
// delete action
$('#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
// 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));
- $('#moveActionBtn').on('click', this.handleMoveAction.bind(this));
+ $('#moveActionBtn').on('tap', this.handleMoveAction.bind(this));
// paste action
$('a#pasteActionBtn').on('tap', app.pasteClipboard.bind(app));
// 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);
// exit
$('.ui-myExit').on('tap', app.exit);
- $('#saveNewFolder').on('click', function () {
+ $('#saveNewFolder').on('tap', function () {
var folderName = $('#newFolderName').val().trim();
if (folderName === '') {
alert("Empty folder name");
var folderName = $('#newFolderName').val().trim();
if (folderName === '') {
alert("Empty folder name");
*/
handleNodeClick: function Ui_handleNodeClick(node, toggleCheckbox) {
if (this.root) {
*/
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
this.root = false;
} else if (this.editMode === true) {
//if edit mode is on toggle checkbox state
for (i = 0; i < len; i = i + 1) {
nodeName = nodes[i].label.trim();
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,
listElements.push(this.templateManager.get('folderRow', {
id: i,
name: nodeName,
// update file list
$('#fileList').empty();
// update file list
$('#fileList').empty();
+ if (this.editMode) {
+ this.scrollContentTo(0);
+ }
listTemplate = listElements.join('');
$(listTemplate).appendTo('#fileList');
listTemplate = listElements.join('');
$(listTemplate).appendTo('#fileList');
- // reset scrollview position
- //$('#main .ui-scrollview-view').css('-webkit-transform', 'none');
- $('#fileList').listview("refresh");
this.resetDefaultCheckBoxLabelEvents();
this.hideSelectAllArea();
this.resetDefaultCheckBoxLabelEvents();
this.hideSelectAllArea();
$('#fileList').html(listElements.join(''))
.trigger('refresh')
.trigger('create');
$('#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();
if (this.editMode === true) {
$('.selectAll').show();
<h1>Add new folder<h1>
</div>
<div class="ui-popup-text">
<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>
</div>
<div class="ui-popup-button-bg">
<a data-role="button" id="saveNewFolder" data-rel="back" data-inline="true">Save</a>