From 357fbd88bead4aecb5a4f24d5d1087cf96da730f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= <jfd@butonic.de>
Date: Tue, 6 Jan 2015 14:34:35 +0100
Subject: [PATCH] use class for no results div instead of id. the elements are
 not unique.

---
 apps/files/css/files.css                | 8 ++++----
 apps/files/js/filelist.js               | 4 ++--
 apps/files/js/search.js                 | 4 ++--
 apps/files/templates/list.php           | 2 +-
 apps/files/templates/simplelist.php     | 2 +-
 apps/files_sharing/templates/list.php   | 2 +-
 apps/files_trashbin/templates/index.php | 2 +-
 7 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/apps/files/css/files.css b/apps/files/css/files.css
index a6a28b594a..1e7b1d45f7 100644
--- a/apps/files/css/files.css
+++ b/apps/files/css/files.css
@@ -600,7 +600,7 @@ table.dragshadow td.size {
 	opacity: 0;
 }
 
-#nofilterresults {
+.nofilterresults {
 	font-size: 16px;
 	color: #888;
 	position: absolute;
@@ -608,12 +608,12 @@ table.dragshadow td.size {
 	top: 30%;
 	width: 100%;
 }
-#nofilterresults h2 {
+.nofilterresults h2 {
 	font-size: 22px;
 	margin-bottom: 10px;
 }
-#nofilterresults [class^="icon-"],
-#nofilterresults [class*=" icon-"] {
+.nofilterresults [class^="icon-"],
+.nofilterresults [class*=" icon-"] {
 	background-size: 64px;
 	height: 64px;
 	width: 64px;
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 2ab9f2d43b..e680ef4b3e 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1691,13 +1691,13 @@
 				this.$el.find('#filestable thead th').addClass('hidden');
 				this.$el.find('#emptycontent').addClass('hidden');
 				if ( $('#searchresults').length === 0 || $('#searchresults').hasClass('hidden')) {
-					this.$el.find('#nofilterresults').removeClass('hidden').
+					this.$el.find('.nofilterresults').removeClass('hidden').
 						find('p').text(t('files', "No entries in this folder match '{filter}'", {filter:this._filter}));
 				}
 			} else {
 				this.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty);
 				this.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty);
-				this.$el.find('#nofilterresults').addClass('hidden');
+				this.$el.find('.nofilterresults').addClass('hidden');
 			}
 		},
 		/**
diff --git a/apps/files/js/search.js b/apps/files/js/search.js
index 496c210232..394bcb4860 100644
--- a/apps/files/js/search.js
+++ b/apps/files/js/search.js
@@ -48,7 +48,7 @@
 				}
 			}
 			function hideNoFilterResults() {
-				var $nofilterresults = $('#nofilterresults');
+				var $nofilterresults = $('.nofilterresults');
 				if ( ! $nofilterresults.hasClass('hidden') ) {
 					$nofilterresults.addClass('hidden');
 				}
@@ -171,7 +171,7 @@
 					if (query.length > 2) {
 						//search is not started until 500msec have passed
 						window.setTimeout(function() {
-							$('#nofilterresults').addClass('hidden');
+							$('.nofilterresults').addClass('hidden');
 						}, 500);
 					}
 				}
diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php
index 55754fd0c6..aa879002ba 100644
--- a/apps/files/templates/list.php
+++ b/apps/files/templates/list.php
@@ -60,7 +60,7 @@
 	<p><?php p($l->t('Upload some content or sync with your devices!')); ?></p>
 </div>
 
-<div id="nofilterresults" class="hidden">
+<div class="nofilterresults hidden">
 	<div class="icon-search"></div>
 	<h2><?php p($l->t('No entries found in this folder')); ?></h2>
 	<p></p>
diff --git a/apps/files/templates/simplelist.php b/apps/files/templates/simplelist.php
index 15bbfbb292..6b6c018024 100644
--- a/apps/files/templates/simplelist.php
+++ b/apps/files/templates/simplelist.php
@@ -11,7 +11,7 @@
 
 <input type="hidden" name="dir" value="" id="dir">
 
-<div id="nofilterresults" class="hidden">
+<div class="nofilterresults hidden">
 	<div class="icon-search"></div>
 	<h2><?php p($l->t('No entries found in this folder')); ?></h2>
 	<p></p>
diff --git a/apps/files_sharing/templates/list.php b/apps/files_sharing/templates/list.php
index f9a6257dff..55ad55a0a4 100644
--- a/apps/files_sharing/templates/list.php
+++ b/apps/files_sharing/templates/list.php
@@ -8,7 +8,7 @@
 
 <input type="hidden" name="dir" value="" id="dir">
 
-<div id="nofilterresults" class="hidden">
+<div class="nofilterresults hidden">
 	<div class="icon-search"></div>
 	<h2><?php p($l->t('No entries found in this folder')); ?></h2>
 	<p></p>
diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php
index b89ec66b15..0c0f955cf4 100644
--- a/apps/files_trashbin/templates/index.php
+++ b/apps/files_trashbin/templates/index.php
@@ -12,7 +12,7 @@
 
 <input type="hidden" name="dir" value="" id="dir">
 
-<div id="nofilterresults" class="hidden">
+<div class="nofilterresults hidden">
 	<div class="icon-search"></div>
 	<h2><?php p($l->t('No entries found in this folder')); ?></h2>
 	<p></p>
-- 
GitLab