[Pkg-owncloud-commits] [owncloud] 143/172: Added app navigation for files app

David Prévot taffit at moszumanska.debian.org
Sun May 18 20:09:50 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 9ccb3279dd09b7042ab07c936a4c04127282476f
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Mon Dec 9 13:32:28 2013 +0100

    Added app navigation for files app
    
    - Added links to trashbin and shared dir
    - Moved "WebDAV" settings block to the app nav's settings section
    - Added sidebar support in trashbin app as well
---
 apps/files/css/files.css                |  7 +++++++
 apps/files/index.php                    |  6 ++++++
 apps/files/js/files.js                  |  8 ++++++++
 apps/files/templates/appnavigation.php  | 19 +++++++++++++++++++
 apps/files/templates/index.php          |  7 ++++---
 apps/files_trashbin/index.php           |  5 +++++
 apps/files_trashbin/templates/index.php |  3 +++
 core/css/apps.css                       |  3 +++
 core/css/styles.css                     |  5 -----
 settings/templates/personal.php         |  6 ------
 10 files changed, 55 insertions(+), 14 deletions(-)

diff --git a/apps/files/css/files.css b/apps/files/css/files.css
index 3dc5ef5..db23f54 100644
--- a/apps/files/css/files.css
+++ b/apps/files/css/files.css
@@ -84,6 +84,9 @@
 }
 
 #filestable tbody tr { background-color:#fff; height:51px; }
+.app-files #controls {
+	left: 300px;
+}
 #filestable tbody tr:hover, tbody tr:active {
 	background-color: rgb(240,240,240);
 }
@@ -431,3 +434,7 @@ table.dragshadow td.size {
 .mask.transparent{
 	opacity: 0;
 }
+
+.app-files #app-settings input {
+	width: 90%;
+}
diff --git a/apps/files/index.php b/apps/files/index.php
index a4e9a93..df20758 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -89,6 +89,11 @@ if ($trashEnabled) {
     $trashEmpty = \OCA\Files_Trashbin\Trashbin::isEmpty($user);
 }
 
+$nav = new OCP\Template('files', 'appnavigation', '');
+
+$nav->assign('trash', $trashEnabled);
+$nav->assign('trashEmpty', $trashEmpty);
+
 OCP\Util::addscript('files', 'fileactions');
 OCP\Util::addscript('files', 'files');
 OCP\Util::addscript('files', 'keyboardshortcuts');
@@ -110,5 +115,6 @@ $tmpl->assign("mailNotificationEnabled", $config->getAppValue('core', 'shareapi_
 $tmpl->assign("allowShareWithLink", $config->getAppValue('core', 'shareapi_allow_links', 'yes'));
 $tmpl->assign("encryptionInitStatus", $encryptionInitStatus);
 $tmpl->assign('disableSharing', false);
+$tmpl->assign('appNavigation', $nav);
 
 $tmpl->printPage();
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 6d16785..60e20a6 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -254,6 +254,14 @@ $(document).ready(function() {
 		}
 	}
 
+	$('#app-settings-header').on('click', function() {
+		var $settings = $('#app-settings');
+		$settings.toggleClass('opened');
+		if ($settings.hasClass('opened')) {
+			$settings.find('input').focus();
+		}
+	});
+
 	//scroll to and highlight preselected file
 	if (getURLParameter('scrollto')) {
 		FileList.scrollTo(getURLParameter('scrollto'));
diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php
new file mode 100644
index 0000000..22987ec
--- /dev/null
+++ b/apps/files/templates/appnavigation.php
@@ -0,0 +1,19 @@
+<div id="app-navigation">
+	<ul>
+		<li class="allfiles"><a href="<?php p(OC_Helper::linkTo('files', '')) ?>"><?php p($l->t('All Files'));?></a></li>
+		<li class="sep"></li>
+		<?php if ($_['trash'] ): ?>
+		<li class="trash"><a href="<?php p(OC_Helper::linkTo('files_trashbin', 'index.php')) ?>"><?php p($l->t('Deleted files'));?></a></li>
+		<?php endif; ?>
+	</ul>
+	<div id="app-settings">
+		<div id="app-settings-header">
+			<button class="settings-button"></button>
+		</div>
+		<div id="app-settings-content">
+				<h2><?php p($l->t('WebDAV'));?></h2>
+				<div><input id="webdavurl" type="text" readonly="readonly" value="<?php p(OC_Helper::linkToRemote('webdav')); ?>"></input></div>
+				<em><?php print_unescaped($l->t('Use this address to <a href="%s" target="_blank">access your Files via WebDAV</a>', array(link_to_docs('user-webdav'))));?></em>
+		</div>
+	</div>
+</div>
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index 9c593a9..9ed294e 100644
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -1,4 +1,6 @@
 <?php /** @var $l OC_L10N */ ?>
+<?php $_['appNavigation']->printPage(); ?>
+<div id="app-content">
 <div id="controls">
 		<div class="actions creatable hidden">
 			<?php if(!isset($_['dirToken'])):?>
@@ -37,9 +39,6 @@
 						   data-url="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" />
 					<a href="#" class="svg icon-upload"></a>
 			</div>
-			<?php if ($_['trash']): ?>
-			<input id="trash" type="button" value="<?php p($l->t('Deleted files'));?>" class="button" <?php $_['trashEmpty'] ? p('disabled') : '' ?> />
-			<?php endif; ?>
 			<div id="uploadprogresswrapper">
 				<div id="uploadprogressbar"></div>
 				<input type="button" class="stop" style="display:none"
@@ -112,6 +111,8 @@
 	</p>
 </div>
 
+</div><!-- closing app-content -->
+
 <!-- config hints for javascript -->
 <input type="hidden" name="filesApp" id="filesApp" value="1" />
 <input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php p($_['allowZipDownload']); ?>" />
diff --git a/apps/files_trashbin/index.php b/apps/files_trashbin/index.php
index 6e6a8a3..16cd5ec 100644
--- a/apps/files_trashbin/index.php
+++ b/apps/files_trashbin/index.php
@@ -39,4 +39,9 @@ if ($isIE8 && isset($_GET['dir'])){
 $tmpl->assign('dir', $dir);
 $tmpl->assign('disableSharing', true);
 
+$nav = new OCP\Template('files', 'appnavigation', '');
+$nav->assign('trash', true);
+
+$tmpl->assign('appNavigation', $nav);
+
 $tmpl->printPage();
diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php
index 7c673c3..0206738 100644
--- a/apps/files_trashbin/templates/index.php
+++ b/apps/files_trashbin/templates/index.php
@@ -1,4 +1,6 @@
 <?php /** @var $l OC_L10N */ ?>
+<?php $_['appNavigation']->printPage(); ?>
+<div id="app-content">
 <div id="controls">
 	<div id="file_action_panel"></div>
 </div>
@@ -44,3 +46,4 @@
 	<tfoot>
 	</tfoot>
 </table>
+</div>
diff --git a/core/css/apps.css b/core/css/apps.css
index a0bb262..3778784 100644
--- a/core/css/apps.css
+++ b/core/css/apps.css
@@ -178,6 +178,9 @@
 	bottom: 0;
 	border-top: 1px solid #ccc;
 }
+#app-settings.opened #app-settings-content {
+	display: block;
+}
 #app-settings-header {
 	background-color: #eee;
 }
diff --git a/core/css/styles.css b/core/css/styles.css
index d21e6bc..b99af47 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -302,11 +302,6 @@ input[type="submit"].enabled {
 	border-bottom: 1px solid #e7e7e7;
 	z-index: 50;
 }
-/* account for shift of controls bar due to app navigation */
-#body-user #controls,
-#body-settings #controls {
-	padding-left: 80px;
-}
 #controls .button,
 #controls button,
 #controls input[type='submit'],
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index afa3f5d..1d15007 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -133,12 +133,6 @@ if($_['passwordChangeSupported']) {
 	<?php endif; ?>
 </form>
 
-<div class="section">
-	<h2><?php p($l->t('WebDAV'));?></h2>
-	<code><?php print_unescaped(OC_Helper::linkToRemote('webdav')); ?></code><br />
-	<em><?php print_unescaped($l->t('Use this address to <a href="%s" target="_blank">access your Files via WebDAV</a>', array(link_to_docs('user-webdav'))));?></em>
-</div>
-
 <?php foreach($_['forms'] as $form) {
 	print_unescaped($form);
 };?>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list