forked from Studio-42/elFinder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ui] fix Studio-42#1609 toast notification on complete of upload/past…
…e into any folder
- Loading branch information
Showing
11 changed files
with
179 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* CSS for Toastr | ||
* Copyright 2012-2015 | ||
* Authors: John Papa, Hans Fjällemark, and Tim Ferrell. | ||
* All Rights Reserved. | ||
* Use, reproduction, distribution, and modification of this code is subject to the terms and | ||
* conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php | ||
* | ||
* ARIA Support: Greta Krafsig | ||
* | ||
* Project: https://github.com/CodeSeven/toastr | ||
*/ | ||
|
||
.elfinder .elfinder-toast { | ||
position: absolute; | ||
top: 12px; | ||
right: 12px; | ||
max-width: 90%; | ||
} | ||
|
||
.elfinder .elfinder-toast > div { | ||
position: relative; | ||
pointer-events: auto; | ||
overflow: hidden; | ||
margin: 0 0 6px; | ||
padding: 8px 8px 8px 50px; | ||
-moz-border-radius: 3px 3px 3px 3px; | ||
-webkit-border-radius: 3px 3px 3px 3px; | ||
border-radius: 3px 3px 3px 3px; | ||
background-position: 15px center; | ||
background-repeat: no-repeat; | ||
-moz-box-shadow: 0 0 12px #999999; | ||
-webkit-box-shadow: 0 0 12px #999999; | ||
box-shadow: 0 0 12px #999999; | ||
color: #FFFFFF; | ||
opacity: 0.9; | ||
filter: alpha(opacity=90); | ||
background-color: #030303; | ||
text-align: center; | ||
} | ||
|
||
.elfinder .elfinder-toast > .toast-info { | ||
background-color: #2F96B4; | ||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important; | ||
} | ||
.elfinder .elfinder-toast > .toast-error { | ||
background-color: #BD362F; | ||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important; | ||
} | ||
.elfinder .elfinder-toast > .toast-success { | ||
background-color: #51A351; | ||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important; | ||
} | ||
.elfinder .elfinder-toast > .toast-warning { | ||
background-color: #F89406; | ||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important; | ||
} | ||
|
||
|
||
.elfinder .elfinder-toast > .toast-success button.ui-button { | ||
background-color: green; | ||
background-image: none; | ||
color: #FFF; | ||
margin-top: 8px; | ||
} | ||
|
||
.elfinder .elfinder-toast > .toast-success button.ui-button.ui-state-hover { | ||
background-color: #add6ad; | ||
color: #254b25; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/** | ||
* English translation | ||
* @author Troex Nevelin <[email protected]> | ||
* @version 2016-08-03 | ||
* @version 2016-08-21 | ||
*/ | ||
if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') { | ||
elFinder.prototype.i18.en = { | ||
|
@@ -135,6 +135,7 @@ if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object' | |
'cmdopendir' : 'Open a folder', // from v2.1 added 13.1.2016 | ||
'cmdcolwidth' : 'Reset column width', // from v2.1.13 added 12.06.2016 | ||
'cmdfullscreen': 'Full Screen', // from v2.1.15 added 03.08.2016 | ||
'cmdmove' : 'Move', // from v2.1.15 added 21.08.2016 | ||
|
||
/*********************************** buttons ***********************************/ | ||
'btnClose' : 'Close', | ||
|
@@ -357,6 +358,7 @@ if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object' | |
'hasClipboard' : 'You have $1 items in the clipboard.', // from v2.1.13 added 6.3.2016 | ||
'incSearchOnly' : 'Incremental search is only from the current view.', // from v2.1.13 added 6.30.2016 | ||
'reinstate' : 'Reinstate', // from v2.1.15 added 3.8.2016 | ||
'complete' : '$1 complete', // from v2.1.15 added 21.8.2016 | ||
|
||
/********************************** mimetypes **********************************/ | ||
'kindUnknown' : 'Unknown', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Japanese translation | ||
* @author Tomoaki Yoshida <[email protected]> | ||
* @author Naoki Sawada <[email protected]> | ||
* @version 2016-08-03 | ||
* @version 2016-08-21 | ||
*/ | ||
if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') { | ||
elFinder.prototype.i18.jp = { | ||
|
@@ -136,6 +136,7 @@ if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object' | |
'cmdopendir' : 'フォルダを開く', // from v2.1 added 13.1.2016 | ||
'cmdcolwidth' : '列幅リセット', // from v2.1.13 added 12.06.2016 | ||
'cmdfullscreen': 'フルスクリーン', // from v2.1.15 added 03.08.2016 | ||
'cmdmove' : '移動', // from v2.1.15 added 21.08.2016 | ||
|
||
/*********************************** buttons ***********************************/ | ||
'btnClose' : '閉じる', | ||
|
@@ -358,6 +359,7 @@ if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object' | |
'hasClipboard' : '$1 個のアイテムがクリップボードに入っています', // from v2.1.13 added 6.3.2016 | ||
'incSearchOnly' : '逐次検索は現在のビューからのみです', // from v2.1.13 added 6.30.2016 | ||
'reinstate' : '元に戻す', // from v2.1.15 added 3.8.2016 | ||
'complete' : '$1 完了', // from v2.1.15 added 21.8.2016 | ||
|
||
/********************************** mimetypes **********************************/ | ||
'kindUnknown' : '不明', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
"use strict"; | ||
/** | ||
* @class elFinder toast | ||
* | ||
* This was created inspired by the toastr. Thanks to developers of toastr. | ||
* CodeSeven/toastr: http://johnpapa.net <https://github.com/CodeSeven/toastr> | ||
* | ||
* @author Naoki Sawada | ||
**/ | ||
$.fn.elfindertoast = function(opts, fm) { | ||
var defOpts = { | ||
mode: 'success', | ||
msg: '', | ||
showMethod: 'fadeIn', //fadeIn, slideDown, and show are built into jQuery | ||
showDuration: 300, | ||
showEasing: 'swing', //swing and linear are built into jQuery | ||
onShown: undefined, | ||
hideMethod: 'fadeOut', | ||
hideDuration: 1000, | ||
hideEasing: 'swing', | ||
onHidden: undefined, | ||
timeOut: 3000, | ||
extNode: undefined | ||
}; | ||
return this.each(function() { | ||
var self = $(this); | ||
opts = $.extend({}, defOpts, opts || {}); | ||
self.on('click', function(e) { | ||
e.stopPropagation(); | ||
e.preventDefault(); | ||
self.remove(); | ||
}).hide().addClass('toast-' + opts.mode).append($('<div class="elfinder-toast-msg"/>').html(opts.msg)); | ||
if (opts.extNode) { | ||
self.append(opts.extNode); | ||
} | ||
self[opts.showMethod]({ | ||
duration: opts.showDuration, | ||
easing: opts.showEasing, | ||
complete: function() { | ||
opts.onShown && opts.onShown(); | ||
if (opts.timeOut) { | ||
setTimeout(function() { | ||
self[opts.hideMethod]({ | ||
duration: opts.hideDuration, | ||
easing: opts.hideEasing, | ||
complete: function() { | ||
opts.onHidden && opts.onHidden(); | ||
self.remove(); | ||
} | ||
}); | ||
}, opts.timeOut); | ||
} | ||
} | ||
}); | ||
}); | ||
}; |