Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-01-03 11:17:14 +0300
committerJulius Härtl <jus@bitgrid.net>2018-01-03 16:42:07 +0300
commit8a226811dc86547ca5f79ffa35965c0f72e8fbb4 (patch)
tree80790a3013c6295a53fa5be49870b8dfbb303273 /settings
parentee0653d68b117ac586841465840e629a7c1a487f (diff)
Invert app icons on IE11 as well
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'settings')
-rw-r--r--settings/js/apps.js41
1 files changed, 23 insertions, 18 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js
index 0a6e86ed701..7ec7309db13 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -652,24 +652,29 @@ OC.Settings.Apps = OC.Settings.Apps || {
}
if ($('#appmenu').children('li[data-id="' + entry.id + '"]').length === 0) {
- var li = $('<li></li>');
- li.attr('data-id', entry.id);
- var img = '<img src="' + entry.icon + '" class="app-icon">';
- var a = $('<a></a>').attr('href', entry.href);
- var filename = $('<span></span>');
- var loading = $('<div class="icon-loading-dark"></div>').css('display', 'none');
- filename.text(entry.name);
- a.prepend(filename);
- a.prepend(loading);
- a.prepend(img);
- li.append(a);
- $('#appmenu li[data-id='+ previousEntry.id+']').after(li);
- if(addedApps[entry.id]) {
- li.animate({opacity: 0.5})
- .animate({opacity: 1})
- .animate({opacity: 0.5})
- .animate({opacity: 1});
- }
+ var li = $('<li></li>');
+ li.attr('data-id', entry.id);
+ var img = '<img src="' + entry.icon + '" class="app-icon">';
+ if (OCA.Theming && OCA.Theming.inverted) {
+ img = '<svg width="20" height="20" viewBox="0 0 20 20">';
+ img += '<defs><filter id="invert"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" /></filter></defs>';
+ img += '<image x="0" y="0" width="20" height="20" preserveAspectRatio="xMinYMin meet" filter="url(#invert)" xlink:href="' + entry.icon + '" class="app-icon" /></svg>';
+ }
+ var a = $('<a></a>').attr('href', entry.href);
+ var filename = $('<span></span>');
+ var loading = $('<div class="icon-loading-dark"></div>').css('display', 'none');
+ filename.text(entry.name);
+ a.prepend(filename);
+ a.prepend(loading);
+ a.prepend(img);
+ li.append(a);
+ $('#appmenu li[data-id='+ previousEntry.id+']').after(li);
+ if(addedApps[entry.id]) {
+ li.animate({opacity: 0.5})
+ .animate({opacity: 1})
+ .animate({opacity: 0.5})
+ .animate({opacity: 1});
+ }
}
previousEntry = entry;
}