summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-07-22 16:52:35 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-07-22 16:52:35 +0200
commitceb711dff4ceb02efd1c96b867df050f15ba4a93 (patch)
tree490b3f409b9b3bbc491c757c8a3182a52bef77eb /files
parentd6bf5cd251e4b3ce8a1bbbe09a029148881eeac9 (diff)
downloadnextcloud-server-ceb711dff4ceb02efd1c96b867df050f15ba4a93.tar.gz
nextcloud-server-ceb711dff4ceb02efd1c96b867df050f15ba4a93.zip
some work on the breadcrumb navigation for files
Diffstat (limited to 'files')
-rw-r--r--files/css/files.css16
-rw-r--r--files/js/files.js22
2 files changed, 36 insertions, 2 deletions
diff --git a/files/css/files.css b/files/css/files.css
index d45d93441de..590c7bac364 100644
--- a/files/css/files.css
+++ b/files/css/files.css
@@ -115,10 +115,13 @@ span.extention{
div.crumb{
float:left;
+ display:block;
background-repeat:no-repeat;
background-position:right 0px;
font-size:20px;
- padding:8px;
+ padding-top:8px;
+ padding-left:8px;
+ height:28px; /*36-8*/
}
table tr.mouseOver td { background-color:#eee; }
@@ -158,4 +161,13 @@ table td.delete { background-image:url('../img/delete.png'); }
float:right;
display:none;
}
-#uploadsize-message{display:none} \ No newline at end of file
+#uploadsize-message{display:none}
+
+/* add breadcrumb divider to the File item in navigation panel */
+#plugins li:first-child{
+ background-position: 15.7em 0px;
+ background-repeat:no-repeat;
+ background-image: url("/owncloud/core/img/breadcrumb-divider-start.png");
+ width:15.7em;
+ padding-right:11px;
+}
diff --git a/files/js/files.js b/files/js/files.js
index dc59dda57e0..49e2f412d49 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -208,6 +208,28 @@ $(document).ready(function() {
if(navigator.userAgent.search(/konqueror/i)==-1){
$('.file_upload_start').attr('multiple','multiple')
}
+
+ //if the breadcrumb is to long, start by replacing foldernames with '...' except for the current folder
+ var crumb=$('div.crumb').first();
+ while($('div.controls').height()>40 && crumb.next('div.crumb').length>0){
+ crumb.children('a').text('...');
+ crumb=crumb.next('div.crumb');
+ }
+ //if that isn't enough, start removing items from the breacrumb except for the current folder and it's parent
+ var crumb=$('div.crumb').first();
+ var next=crumb.next('div.crumb');
+ while($('div.controls').height()>40 && next.next('div.crumb').length>0){
+ crumb.remove();
+ crumb=next;
+ next=crumb.next('div.crumb');
+ }
+ //still not enough, start shorting down the current folder name
+ var crumb=$('div.crumb>a').last();
+ while($('div.controls').height()>40 && crumb.text().length>6){
+ var text=crumb.text()
+ text=text.substr(0,text.length-6)+'...';
+ crumb.text(text);
+ }
});
var adjustNewFolderSize = function() {