Skip to content

Commit

Permalink
[js:ui,cmd:fullscreen] fix #1563 add ui command "fullscrren"
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Aug 3, 2016
1 parent 7c1f874 commit b747a8c
Show file tree
Hide file tree
Showing 12 changed files with 348 additions and 98 deletions.
2 changes: 2 additions & 0 deletions css/toolbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@
.elfinder-button-icon-opendir { background-position: 0 -32px; }
.elfinder-button-icon-menu { background-position: 0 -752px; }
.elfinder-button-icon-colwidth { background-position: 0 -768px; }
.elfinder-button-icon-fullscreen { background-position: 0 -784px; }
.elfinder-button-icon-unfullscreen{ background-position: 0 -800px; }

/* button with dropdown menu*/
.elfinder .elfinder-menubutton { overflow:visible; }
Expand Down
110 changes: 62 additions & 48 deletions elfinder.playground.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,118 +20,132 @@

<!-- <link rel="stylesheet" href="jquery/ui-themes/smoothness/jquery-ui-1.8.21.custom.css" type="text/css"> -->


<!-- elfinder css -->
<link rel="stylesheet" href="css/commands.css" type="text/css">
<link rel="stylesheet" href="css/common.css" type="text/css">
<link rel="stylesheet" href="css/dialog.css" type="text/css">
<link rel="stylesheet" href="css/toolbar.css" type="text/css">
<link rel="stylesheet" href="css/navbar.css" type="text/css">
<link rel="stylesheet" href="css/statusbar.css" type="text/css">
<link rel="stylesheet" href="css/contextmenu.css" type="text/css">
<link rel="stylesheet" href="css/cwd.css" type="text/css">
<link rel="stylesheet" href="css/quicklook.css" type="text/css">
<link rel="stylesheet" href="css/commands.css" type="text/css">

<link rel="stylesheet" href="css/dialog.css" type="text/css">
<link rel="stylesheet" href="css/fonts.css" type="text/css">
<link rel="stylesheet" href="css/navbar.css" type="text/css">
<link rel="stylesheet" href="css/places.css" type="text/css">
<link rel="stylesheet" href="css/quicklook.css" type="text/css">
<link rel="stylesheet" href="css/statusbar.css" type="text/css">
<link rel="stylesheet" href="css/theme.css" type="text/css">
<link rel="stylesheet" href="css/toolbar.css" type="text/css">

<!-- elfinder core -->
<script src="js/elFinder.js"></script>
<script src="js/elFinder.version.js"></script>
<script src="js/jquery.elfinder.js"></script>
<script src="js/elFinder.resources.js"></script>
<script src="js/elFinder.options.js"></script>
<script src="js/elFinder.history.js"></script>
<script src="js/elFinder.command.js"></script>
<script src="js/elFinder.resources.js"></script>

<!-- elfinder dialog -->
<script src="js/jquery.dialogelfinder.js"></script>

<!-- elfinder default lang -->
<script src="js/i18n/elfinder.en.js"></script>

<!-- elfinder ui -->
<script src="js/ui/overlay.js"></script>
<script src="js/ui/workzone.js"></script>
<script src="js/ui/navbar.js"></script>
<script src="js/ui/dialog.js"></script>
<script src="js/ui/tree.js"></script>
<script src="js/ui/cwd.js"></script>
<script src="js/ui/toolbar.js"></script>
<script src="js/ui/button.js"></script>
<script src="js/ui/uploadButton.js"></script>
<script src="js/ui/viewbutton.js"></script>
<script src="js/ui/searchbutton.js"></script>
<script src="js/ui/sortbutton.js"></script>
<script src="js/ui/panel.js"></script>
<script src="js/ui/contextmenu.js"></script>
<script src="js/ui/cwd.js"></script>
<script src="js/ui/dialog.js"></script>
<script src="js/ui/fullscrrenbutton.js"></script>
<script src="js/ui/mkdirbutton.js"></script>
<script src="js/ui/navbar.js"></script>
<script src="js/ui/overlay.js"></script>
<script src="js/ui/panel.js"></script>
<script src="js/ui/path.js"></script>
<script src="js/ui/stat.js"></script>
<script src="js/ui/places.js"></script>
<script src="js/ui/searchbutton.js"></script>
<script src="js/ui/sortbutton.js"></script>
<script src="js/ui/stat.js"></script>
<script src="js/ui/toolbar.js"></script>
<script src="js/ui/tree.js"></script>
<script src="js/ui/uploadButton.js"></script>
<script src="js/ui/viewbutton.js"></script>
<script src="js/ui/workzone.js"></script>

<!-- elfinder commands -->
<script src="js/commands/archive.js"></script>
<script src="js/commands/back.js"></script>
<script src="js/commands/forward.js"></script>
<script src="js/commands/reload.js"></script>
<script src="js/commands/up.js"></script>
<script src="js/commands/home.js"></script>
<script src="js/commands/copy.js"></script>
<script src="js/commands/cut.js"></script>
<script src="js/commands/paste.js"></script>
<script src="js/commands/open.js"></script>
<script src="js/commands/rm.js"></script>
<script src="js/commands/info.js"></script>
<script src="js/commands/chmod.js"></script>
<script src="js/commands/colwidth.js"></script>
<script src="js/commands/download.js"></script>
<script src="js/commands/duplicate.js"></script>
<script src="js/commands/rename.js"></script>
<script src="js/commands/help.js"></script>
<script src="js/commands/edit.js"></script>
<script src="js/commands/extract.js"></script>
<script src="js/commands/fullscrren.js"></script>
<script src="js/commands/forward.js"></script>
<script src="js/commands/getfile.js"></script>
<script src="js/commands/help.js"></script>
<script src="js/commands/home.js"></script>
<script src="js/commands/info.js"></script>
<script src="js/commands/mkdir.js"></script>
<script src="js/commands/mkfile.js"></script>
<script src="js/commands/upload.js"></script>
<script src="js/commands/download.js"></script>
<script src="js/commands/edit.js"></script>
<script src="js/commands/netmount.js"></script>
<script src="js/commands/open.js"></script>
<script src="js/commands/opendir.js"></script>
<script src="js/commands/paste.js"></script>
<script src="js/commands/places.js"></script>
<script src="js/commands/quicklook.js"></script>
<script src="js/commands/quicklook.plugins.js"></script>
<script src="js/commands/extract.js"></script>
<script src="js/commands/archive.js"></script>
<script src="js/commands/search.js"></script>
<script src="js/commands/view.js"></script>
<script src="js/commands/reload.js"></script>
<script src="js/commands/rename.js"></script>
<script src="js/commands/resize.js"></script>
<script src="js/commands/rm.js"></script>
<script src="js/commands/search.js"></script>
<script src="js/commands/sort.js"></script>
<script src="js/commands/netmount.js"></script>
<script src="js/commands/up.js"></script>
<script src="js/commands/upload.js"></script>
<script src="js/commands/view.js"></script>

<!-- elfinder languages -->
<script src="js/i18n/elfinder.ar.js"></script>
<script src="js/i18n/elfinder.bg.js"></script>
<script src="js/i18n/elfinder.ca.js"></script>
<script src="js/i18n/elfinder.cs.js"></script>
<script src="js/i18n/elfinder.da.js"></script>
<script src="js/i18n/elfinder.de.js"></script>
<script src="js/i18n/elfinder.el.js"></script>
<script src="js/i18n/elfinder.en.js"></script>
<script src="js/i18n/elfinder.es.js"></script>
<script src="js/i18n/elfinder.fa.js"></script>
<script src="js/i18n/elfinder.fo.js"></script>
<script src="js/i18n/elfinder.fr.js"></script>
<script src="js/i18n/elfinder.he.js"></script>
<script src="js/i18n/elfinder.hu.js"></script>
<script src="js/i18n/elfinder.id.js"></script>
<script src="js/i18n/elfinder.it.js"></script>
<script src="js/i18n/elfinder.jp.js"></script>
<script src="js/i18n/elfinder.ko.js"></script>
<script src="js/i18n/elfinder.nl.js"></script>
<script src="js/i18n/elfinder.no.js"></script>
<script src="js/i18n/elfinder.pl.js"></script>
<script src="js/i18n/elfinder.pt_BR.js"></script>
<script src="js/i18n/elfinder.ro.js"></script>
<script src="js/i18n/elfinder.ru.js"></script>
<script src="js/i18n/elfinder.sk.js"></script>
<script src="js/i18n/elfinder.sl.js"></script>
<script src="js/i18n/elfinder.sr.js"></script>
<script src="js/i18n/elfinder.sv.js"></script>
<script src="js/i18n/elfinder.tr.js"></script>
<script src="js/i18n/elfinder.uk.js"></script>
<script src="js/i18n/elfinder.vi.js"></script>
<script src="js/i18n/elfinder.zh_CN.js"></script>
<script src="js/i18n/elfinder.zh_TW.js"></script>
<script src="js/i18n/elfinder.vi.js"></script>

<!-- elfinder dialog -->
<script src="js/jquery.dialogelfinder.js"></script>

<!-- elfinder 1.x connector API support -->
<script src="js/proxy/elFinderSupportVer1.js"></script>

<!-- GoogleDocs Quicklook plugin for GoogleDrive Volume -->
<script src="js/extras/quicklook.googledocs.js"></script>

<!-- elfinder custom extenstions -->
<script src="extensions/jplayer/elfinder.quicklook.jplayer.js"></script>

<style type="text/css">
body { font-family:arial, verdana, sans-serif;}
.button {
Expand Down
2 changes: 2 additions & 0 deletions elfinder.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<script src="js/ui/contextmenu.js"></script>
<script src="js/ui/cwd.js"></script>
<script src="js/ui/dialog.js"></script>
<script src="js/ui/ffullscreenbutton.js"></script>
<script src="js/ui/mkdirbutton.js"></script>
<script src="js/ui/navbar.js"></script>
<script src="js/ui/overlay.js"></script>
Expand All @@ -68,6 +69,7 @@
<script src="js/commands/duplicate.js"></script>
<script src="js/commands/edit.js"></script>
<script src="js/commands/extract.js"></script>
<script src="js/commands/fullscreen.js"></script>
<script src="js/commands/forward.js"></script>
<script src="js/commands/getfile.js"></script>
<script src="js/commands/help.js"></script>
Expand Down
Binary file modified img/toolbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions js/commands/fullscreen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"use strict";
/**
* @class elFinder command "fullscreen"
* elFinder node to full scrren mode
*
* @author Naoki Sawada
**/

elFinder.prototype.commands.fullscreen = function() {
var self = this,
fm = this.fm,
update = function(e, data) {
if (data && data.fullscreen) {
self.update(void(0), (data.fullscreen === 'on'));
}
};

this.alwaysEnabled = true;
this.updateOnSelect = false;
this.value = false;

this.options = {
ui : 'fullscreenbutton',
};

this.getstate = function() {
return 0;
}

this.exec = function() {
var node = fm.getUI().get(0),
fullNode = fm.toggleFullscreen(node);
self.update(void(0), (fullNode === node));
};

fm.bind('init', function() {
fm.getUI().off('resize.' + fm.namespace, update).on('resize.' + fm.namespace, update);
});
};
Loading

0 comments on commit b747a8c

Please sign in to comment.