summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-05-16 16:34:04 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-05-16 16:34:04 +0200
commite6b90a60afc9126a584001562c33d80480103601 (patch)
tree67b7c4cb932a2822ac9c146fec79fcbc30542963
parent915073f8eaeffeb40237a531b3e161ac2f3f0caf (diff)
downloadnextcloud-server-e6b90a60afc9126a584001562c33d80480103601.tar.gz
nextcloud-server-e6b90a60afc9126a584001562c33d80480103601.zip
fix the drop down arrow in file browser
-rw-r--r--css/styles.css1
-rw-r--r--files/templates/part.list.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/css/styles.css b/css/styles.css
index b53343b0f23..0f4d8c5df80 100644
--- a/css/styles.css
+++ b/css/styles.css
@@ -95,6 +95,7 @@ table td.delete { background-image:url('../img/delete.png'); }
#fileList tr input[type=checkbox] { display:none; }
#fileList tr input[type=checkbox]:checked { display:inline; }
#fileList tr:hover input[type=checkbox] { display:inline; }
+a.dropArrow{ background-image:url('../img/drop-arrow.png'); width:16px; height:16px; display:block}
/* NAVIGATION BAR */
p.nav { margin:1em 0 0 2em; padding:0.8em; line-height:16px; font-weight:bold; }
diff --git a/files/templates/part.list.php b/files/templates/part.list.php
index 0d4fcc75489..19143807c28 100644
--- a/files/templates/part.list.php
+++ b/files/templates/part.list.php
@@ -4,6 +4,6 @@
<td class="filename"><a style="background-image:url(<?php if($file["type"] == "dir") echo mimetype_icon("dir"); else echo mimetype_icon($file["mime"]); ?>)" href="<?php if($file["type"] == "dir") echo link_to("files", "index.php?dir=".$file["directory"]."/".$file["name"]); else echo link_to("files", "download.php?file=".$file["directory"]."/".$file["name"]); ?>" title=""><?php echo htmlspecialchars($file["name"]); ?></a></td>
<td class="filesize"><?php echo human_file_size($file["size"]); ?></td>
<td class="date"><?php echo $file["date"]; ?></td>
- <td class="fileaction"><a href="" title=""><img src="images/drop-arrow.png" alt="+" /></a></td>
+ <td class="fileaction"><a href="" title="+" class='dropArrow'/></td>
</tr>
<?php endforeach; ?> \ No newline at end of file
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<?php
/**
 * @author Björn Schießle <schiessle@owncloud.com>
 *
 * @copyright Copyright (c) 2016, ownCloud, Inc.
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */

namespace Test\Encryption;

use OC\Encryption\EncryptionWrapper;
use OC\Encryption\Manager;
use OC\Memcache\ArrayCache;
use OCP\Files\Storage;
use Psr\Log\LoggerInterface;
use Test\TestCase;

class EncryptionWrapperTest extends TestCase {
	/** @var  EncryptionWrapper */
	private $instance;

	/** @var  \PHPUnit\Framework\MockObject\MockObject | LoggerInterface */
	private $logger;

	/** @var  \PHPUnit\Framework\MockObject\MockObject | \OC\Encryption\Manager */
	private $manager;

	/** @var  \PHPUnit\Framework\MockObject\MockObject | \OC\Memcache\ArrayCache */
	private $arrayCache;

	protected function setUp(): void {
		parent::setUp();

		$this->arrayCache = $this->createMock(ArrayCache::class);
		$this->manager = $this->createMock(Manager::class);
		$this->logger = $this->createMock(LoggerInterface::class);

		$this->instance = new EncryptionWrapper($this->arrayCache, $this->manager, $this->logger);
	}


	/**
	 * @dataProvider provideWrapStorage
	 */
	public function testWrapStorage($expectedWrapped, $wrappedStorages) {
		$storage = $this->getMockBuilder(Storage::class)
			->disableOriginalConstructor()
			->getMock();

		foreach ($wrappedStorages as $wrapper) {
			$storage->expects($this->any())
				->method('instanceOfStorage')
				->willReturnMap([
					[$wrapper, true],
				]);
		}

		$mount = $this->getMockBuilder('OCP\Files\Mount\IMountPoint')
			->disableOriginalConstructor()
			->getMock();

		$returnedStorage = $this->instance->wrapStorage('mountPoint', $storage, $mount);

		$this->assertEquals(
			$expectedWrapped,
			$returnedStorage->instanceOfStorage('OC\Files\Storage\Wrapper\Encryption'),
			'Asserted that the storage is (not) wrapped with encryption'
		);
	}

	public function provideWrapStorage() {
		return [
			// Wrap when not wrapped or not wrapped with storage
			[true, []],
			[true, ['OCA\Files_Trashbin\Storage']],

			// Do not wrap shared storages
			[false, [Storage\IDisableEncryptionStorage::class]],
		];
	}
}