').attr('id', 'popup').html(html).flayer({
afterStart: function(elm) {
elm.find('input[type="text"]:first').focus();
@@ -1482,6 +1561,31 @@ FM.displayError = function(msg) {
//return alert(msg);
}
+FM.triggerRefreshActionTrick = function() {
+ // reload-in-time
+ $('#reload-in-time').remove();
+ FM.Env.RELOAD_IN_TIME = true;
+ var tpl = Tpl.get('reload_in_time', 'FM');
+ //tpl.set(':TIME_LEFT', FM.RELOAD_IN_TIME_SECONDS + 1);
+
+ $('body').append(tpl.finalize());
+
+ var ref = $('#reload-in-time').find('.reload-in-time-counter');
+
+ var timeleft = FM.RELOAD_IN_TIME_SECONDS;
+ FM.Env.reload_in_time_interval =
+ setInterval(function() {
+ if (timeleft <= 0) {
+ clearInterval(FM.Env.reload_in_time_interval);
+ $('#reload-in-time').remove();
+ FM.Env.RELOAD_IN_TIME = false;
+ }
+ //ref.text(timeleft);
+ timeleft -= 1;
+ }, 1000);
+}
+
+
FM.confirmCreateDir = function() {
var tab = FM.getTabLetter(FM.CURRENT_TAB);
var box = FM['TAB_' + tab];
@@ -1680,7 +1784,7 @@ $(document).ready(function() {
},{
'type': 'keydown',
'propagate': false,
- 'disable_in_input': false,
+ 'disable_in_input': true,
'target': document
});
@@ -1689,35 +1793,40 @@ $(document).ready(function() {
},{
'type': 'keydown',
'propagate': false,
- 'disable_in_input': false,
+ 'disable_in_input': true,
'target': document
});
shortcut.add("Left",function() {
- FM.setTabActive(FM.TAB_A);
+ if (!FM.isPopupOpened()) {
+ FM.setTabActive(FM.TAB_A);
- var tab = FM.getTabLetter(FM.CURRENT_TAB);
- if (FM['CURRENT_' + tab + '_LINE'] == -1) {
- FM.setActive(0, FM.CURRENT_TAB);
- }
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ if (FM['CURRENT_' + tab + '_LINE'] == -1) {
+ FM.setActive(0, FM.CURRENT_TAB);
+ }
+ }
},{
'type': 'keydown',
'propagate': false,
- 'disable_in_input': false,
+ 'disable_in_input': true,
'target': document
});
shortcut.add("Right",function() {
- FM.setTabActive(FM.TAB_B);
+ if (!FM.isPopupOpened()) {
+ FM.setTabActive(FM.TAB_B);
+
+ var tab = FM.getTabLetter(FM.CURRENT_TAB);
+ if (FM['CURRENT_' + tab + '_LINE'] == -1) {
+ FM.setActive(0, FM.CURRENT_TAB);
+ }
+ }
- var tab = FM.getTabLetter(FM.CURRENT_TAB);
- if (FM['CURRENT_' + tab + '_LINE'] == -1) {
- FM.setActive(0, FM.CURRENT_TAB);
- }
},{
'type': 'keydown',
'propagate': false,
- 'disable_in_input': false,
+ 'disable_in_input': true,
'target': document
});
@@ -1726,7 +1835,7 @@ $(document).ready(function() {
},{
'type': 'keydown',
'propagate': false,
- 'disable_in_input': false,
+ 'disable_in_input': true,
'target': document
});
@@ -1735,7 +1844,7 @@ $(document).ready(function() {
},{
'type': 'keydown',
'propagate': false,
- 'disable_in_input': false,
+ 'disable_in_input': true,
'target': document
});
@@ -1744,7 +1853,7 @@ $(document).ready(function() {
},{
'type': 'keydown',
'propagate': false,
- 'disable_in_input': false,
+ 'disable_in_input': true,
'target': document
});
@@ -1753,7 +1862,7 @@ $(document).ready(function() {
},{
'type': 'keydown',
'propagate': false,
- 'disable_in_input': false,
+ 'disable_in_input': true,
'target': document
});
@@ -1762,7 +1871,7 @@ $(document).ready(function() {
},{
'type': 'keydown',
'propagate': false,
- 'disable_in_input': false,
+ 'disable_in_input': true,
'target': document
});
@@ -1772,7 +1881,7 @@ $(document).ready(function() {
},{
'type': 'keydown',
'propagate': false,
- 'disable_in_input': false,
+ 'disable_in_input': true,
'target': document
});
@@ -1800,6 +1909,115 @@ $(document).ready(function() {
'target': document
});
+ shortcut.add("n",function() {
+ FM.createFile();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+ shortcut.add("F7",function() {
+ FM.createDir();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': false,
+ 'target': document
+ });
+ shortcut.add("F8",function() {
+ FM.deleteItems();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': false,
+ 'target': document
+ });
+ shortcut.add("Delete",function() {
+ FM.deleteItems();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+ shortcut.add("shift+F6",function() {
+ FM.renameItems();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': false,
+ 'target': document
+ });
+ shortcut.add("F2",function() {
+ FM.renameItems();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': false,
+ 'target': document
+ });
+ shortcut.add("F5",function() {
+ if (FM.Env.RELOAD_IN_TIME == true) {
+ location.reload();
+ return;
+ }
+ else {
+ FM.copyItems();
+ FM.triggerRefreshActionTrick();
+ }
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': false,
+ 'target': document
+ });
+ shortcut.add("a",function() {
+ FM.packItem();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+
+ shortcut.add("u",function() {
+/// TODO upload file FM.uploadFile();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+
+ shortcut.add("d",function() {
+ FM.downloadFiles();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+ shortcut.add("Backspace",function() {
+ FM.goBackwards();
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });
+ /*shortcut.add("Y",function() {
+ if (FM.Env.RELOAD_IN_TIME == true) {
+ location.reload();
+ }
+ },{
+ 'type': 'keydown',
+ 'propagate': false,
+ 'disable_in_input': true,
+ 'target': document
+ });*/
+
+
diff --git a/web/js/i18n.js.php b/web/js/i18n.js.php
index 500b98f0..0ca35378 100644
--- a/web/js/i18n.js.php
+++ b/web/js/i18n.js.php
@@ -62,7 +62,8 @@ App.Constants.FM_RENAME = '';
App.Constants.FM_DELETE = '';
App.Constants.FM_EXTRACT = '';
App.Constants.FM_CREATE = '';
-App.Constants.FM_PACK = '';
+App.Constants.FM_PACK = '';
+App.Constants.FM_PACK_BUTTON = '';
App.Constants.FM_OK = '';
App.Constants.FM_YOU_ARE_COPYING = '';
App.Constants.FM_YOU_ARE_REMOVING = '';
@@ -70,12 +71,12 @@ App.Constants.FM_YOU_ARE_REMOVING = '';
App.Constants.FM_CONFIRM_DELETE = '';
App.Constants.FM_INTO_KEYWORD = '';
-App.Constants.FM_EXISTING_FILES_WILL_BE_DELETED = '';
+App.Constants.FM_EXISTING_FILES_WILL_BE_REPLACED= '';
App.Constants.FM_ORIGINAL_NAME = '';
App.Constants.FM_FILE = '';
App.Constants.FM_ALREADY_EXISTS = '';
-App.Constants.FM_EXTRACT = '';
App.Constants.FM_CREATE_FILE = '';
+App.Constants.FM_CREATE_DIRECTORY = '';
diff --git a/web/js/jquery.finder.js b/web/js/jquery.finder.js
index fdf6a297..74501370 100644
--- a/web/js/jquery.finder.js
+++ b/web/js/jquery.finder.js
@@ -203,10 +203,10 @@
},
selectAll: function(p,o) {
p.on('mouseover', function(){
- d.on("keydown", turnOff);
+ //d.on("keydown", turnOff);
});
p.on('mouseout', function(){
- d.off("keydown", turnOff);
+ //d.off("keydown", turnOff);
});
function turnOff(e) {
diff --git a/web/js/templates.js b/web/js/templates.js
index dd33f790..df0ad188 100644
--- a/web/js/templates.js
+++ b/web/js/templates.js
@@ -12,6 +12,13 @@ App.Templates.html = {
//
\
FM: {
+ reload_in_time: [
+ //'
If you want to reload, hit key "Y" to reload.
You have ~!:TIME_LEFT~!s. to do this.
Hurry up!
'
+ '
\
+ \
+
Hit F5 to reload the page
\
+
'
+ ],
entry_line: ['
\
\
\
@@ -50,18 +57,18 @@ App.Templates.html = {
\
'],
popup_copy: [''],
popup_rename: ['