diff options
-rw-r--r-- | apps/dav/lib/Upload/AssemblyStream.php | 9 | ||||
-rw-r--r-- | apps/files/js/filemultiselectmenu.js | 19 | ||||
-rw-r--r-- | apps/files/js/filesummary.js | 2 | ||||
-rw-r--r-- | apps/files/js/filesummary_template.js | 10 | ||||
-rw-r--r-- | apps/files/js/merged-index.json | 2 | ||||
-rw-r--r-- | apps/files/js/templates.js | 39 | ||||
-rw-r--r-- | apps/files/js/templates/detailsview.handlebars.js | 28 | ||||
-rw-r--r-- | apps/files/js/templates/filemultiselectmenu.handlebars | 14 | ||||
-rw-r--r-- | apps/files/js/templates/filesummary.handlebars (renamed from apps/files/js/filesummary.handlebars) | 0 | ||||
-rw-r--r-- | apps/files_sharing/css/public.scss | 4 | ||||
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareController.php | 2 | ||||
-rwxr-xr-x | build/compile-handlebars-templates.sh | 2 | ||||
-rw-r--r-- | core/css/header.scss | 23 | ||||
-rw-r--r-- | core/css/public.scss | 2 | ||||
-rw-r--r-- | tests/phpunit-autotest.xml | 1 |
15 files changed, 90 insertions, 67 deletions
diff --git a/apps/dav/lib/Upload/AssemblyStream.php b/apps/dav/lib/Upload/AssemblyStream.php index 3ba24bf60fd..24417851f2f 100644 --- a/apps/dav/lib/Upload/AssemblyStream.php +++ b/apps/dav/lib/Upload/AssemblyStream.php @@ -57,6 +57,9 @@ class AssemblyStream implements \Icewind\Streams\File { /** @var int */ private $currentNode = 0; + /** @var int */ + private $currentNodeRead = 0; + /** * @param string $path * @param string $mode @@ -110,10 +113,16 @@ class AssemblyStream implements \Icewind\Streams\File { do { $data = fread($this->currentStream, $count); $read = strlen($data); + $this->currentNodeRead += $read; if (feof($this->currentStream)) { fclose($this->currentStream); + $currentNodeSize = $this->nodes[$this->currentNode]->getSize(); + if ($this->currentNodeRead < $currentNodeSize) { + throw new \Exception('Stream from assembly node shorter than expected, got ' . $this->currentNodeRead . ' bytes, expected ' . $currentNodeSize); + } $this->currentNode++; + $this->currentNodeRead = 0; if ($this->currentNode < count($this->nodes)) { $this->currentStream = $this->getStream($this->nodes[$this->currentNode]); } else { diff --git a/apps/files/js/filemultiselectmenu.js b/apps/files/js/filemultiselectmenu.js index d587d1fbdb2..d50fe28eace 100644 --- a/apps/files/js/filemultiselectmenu.js +++ b/apps/files/js/filemultiselectmenu.js @@ -9,21 +9,6 @@ */ (function() { - var TEMPLATE_MENU = - '<ul>' + - '{{#each items}}' + - '<li class="item-{{name}}">' + - '<a href="#" class="menuitem action {{name}} permanent" data-action="{{name}}">' + - '{{#if iconClass}}' + - '<span class="icon {{iconClass}}"></span>' + - '{{else}}' + - '<span class="no-icon"></span>' + - '{{/if}}' + - '<span class="label">{{displayName}}</span>' + - '</a></li>' + - '{{/each}}' + - '</ul>'; - var FileMultiSelectMenu = OC.Backbone.View.extend({ tagName: 'div', className: 'filesSelectMenu popovermenu bubble menu-center', @@ -34,12 +19,12 @@ events: { 'click a.action': '_onClickAction' }, - template: Handlebars.compile(TEMPLATE_MENU), + /** * Renders the menu with the currently set items */ render: function() { - this.$el.html(this.template({ + this.$el.html(OCA.Files.Templates['filemultiselectmenu']({ items: this._scopes })); }, diff --git a/apps/files/js/filesummary.js b/apps/files/js/filesummary.js index ed369ff0723..c866ccb4ff5 100644 --- a/apps/files/js/filesummary.js +++ b/apps/files/js/filesummary.js @@ -196,7 +196,7 @@ * * handlebars -n OCA.Files.FileSummary.Templates filesummary.handlebars -f filesummary_template.js */ - return OCA.Files.FileSummary.Templates['filesummary'](_.extend({ + return OCA.Files.Templates['filesummary'](_.extend({ connectorLabel: t('files', '{dirs} and {files}', {dirs: '', files: ''}) }, data)); }, diff --git a/apps/files/js/filesummary_template.js b/apps/files/js/filesummary_template.js deleted file mode 100644 index 67a4d6b4e86..00000000000 --- a/apps/files/js/filesummary_template.js +++ /dev/null @@ -1,10 +0,0 @@ -(function() { - var template = Handlebars.template, templates = OCA.Files.FileSummary.Templates = OCA.Files.FileSummary.Templates || {}; -templates['filesummary'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var helper; - - return "<span class=\"info\">\n <span class=\"dirinfo\"></span>\n <span class=\"connector\">" - + container.escapeExpression(((helper = (helper = helpers.connectorLabel || (depth0 != null ? depth0.connectorLabel : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"connectorLabel","hash":{},"data":data}) : helper))) - + "</span>\n <span class=\"fileinfo\"></span>\n <span class=\"hiddeninfo\"></span>\n <span class=\"filter\"></span>\n</span>\n"; -},"useData":true}); -})();
\ No newline at end of file diff --git a/apps/files/js/merged-index.json b/apps/files/js/merged-index.json index 5b2227b1d3a..e891d10bdae 100644 --- a/apps/files/js/merged-index.json +++ b/apps/files/js/merged-index.json @@ -1,12 +1,12 @@ [ "app.js", + "templates.js", "file-upload.js", "newfilemenu.js", "jquery.fileupload.js", "jquery-visibility.js", "fileinfomodel.js", "filesummary.js", - "filesummary_template.js", "filemultiselectmenu.js", "breadcrumb.js", "filelist.js", diff --git a/apps/files/js/templates.js b/apps/files/js/templates.js new file mode 100644 index 00000000000..8ada62b6d60 --- /dev/null +++ b/apps/files/js/templates.js @@ -0,0 +1,39 @@ +(function() { + var template = Handlebars.template, templates = OCA.Files.Templates = OCA.Files.Templates || {}; +templates['filemultiselectmenu'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return " <li class=\"item-" + + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper))) + + "\">\n <a href=\"#\" class=\"menuitem action " + + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper))) + + " permanent\" data-action=\"" + + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper))) + + "\">\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.iconClass : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") + + " <span class=\"label\">" + + alias4(((helper = (helper = helpers.displayName || (depth0 != null ? depth0.displayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"displayName","hash":{},"data":data}) : helper))) + + "</span>\n </a>\n </li>\n"; +},"2":function(container,depth0,helpers,partials,data) { + var helper; + + return " <span class=\"icon " + + container.escapeExpression(((helper = (helper = helpers.iconClass || (depth0 != null ? depth0.iconClass : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"iconClass","hash":{},"data":data}) : helper))) + + "\"></span>\n"; +},"4":function(container,depth0,helpers,partials,data) { + return " <span class=\"no-icon\"></span>\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1; + + return "<ul>\n" + + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.items : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "</ul>\n"; +},"useData":true}); +templates['filesummary'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper; + + return "<span class=\"info\">\n <span class=\"dirinfo\"></span>\n <span class=\"connector\">" + + container.escapeExpression(((helper = (helper = helpers.connectorLabel || (depth0 != null ? depth0.connectorLabel : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"connectorLabel","hash":{},"data":data}) : helper))) + + "</span>\n <span class=\"fileinfo\"></span>\n <span class=\"hiddeninfo\"></span>\n <span class=\"filter\"></span>\n</span>\n"; +},"useData":true}); +})();
\ No newline at end of file diff --git a/apps/files/js/templates/detailsview.handlebars.js b/apps/files/js/templates/detailsview.handlebars.js deleted file mode 100644 index c109da77a63..00000000000 --- a/apps/files/js/templates/detailsview.handlebars.js +++ /dev/null @@ -1,28 +0,0 @@ -(function() { - var template = Handlebars.template, templates = OCA.Files.Templates = OCA.Files.Templates || {}; -templates['detailsview'] = template({"1":function(container,depth0,helpers,partials,data) { - var stack1; - - return "<ul class=\"tabHeaders\">\n" - + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.tabHeaders : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "</ul>\n"; -},"2":function(container,depth0,helpers,partials,data) { - var helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; - - return " <li class=\"tabHeader\" data-tabid=\"" - + alias4(((helper = (helper = helpers.tabId || (depth0 != null ? depth0.tabId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"tabId","hash":{},"data":data}) : helper))) - + "\" data-tabindex=\"" - + alias4(((helper = (helper = helpers.tabIndex || (depth0 != null ? depth0.tabIndex : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"tabIndex","hash":{},"data":data}) : helper))) - + "\">\n <a href=\"#\">" - + alias4(((helper = (helper = helpers.label || (depth0 != null ? depth0.label : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"label","hash":{},"data":data}) : helper))) - + "</a>\n </li>\n"; -},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - var stack1, helper, alias1=depth0 != null ? depth0 : {}; - - return "<div class=\"detailFileInfoContainer\"></div>\n" - + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.tabHeaders : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "<div class=\"tabsContainer\">\n</div>\n<a class=\"close icon-close\" href=\"#\" alt=\"" - + container.escapeExpression(((helper = (helper = helpers.closeLabel || (depth0 != null ? depth0.closeLabel : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"closeLabel","hash":{},"data":data}) : helper))) - + "\"></a>\n"; -},"useData":true}); -})(); diff --git a/apps/files/js/templates/filemultiselectmenu.handlebars b/apps/files/js/templates/filemultiselectmenu.handlebars new file mode 100644 index 00000000000..9a723920db9 --- /dev/null +++ b/apps/files/js/templates/filemultiselectmenu.handlebars @@ -0,0 +1,14 @@ +<ul> + {{#each items}} + <li class="item-{{name}}"> + <a href="#" class="menuitem action {{name}} permanent" data-action="{{name}}"> + {{#if iconClass}} + <span class="icon {{iconClass}}"></span> + {{else}} + <span class="no-icon"></span> + {{/if}} + <span class="label">{{displayName}}</span> + </a> + </li> + {{/each}} +</ul> diff --git a/apps/files/js/filesummary.handlebars b/apps/files/js/templates/filesummary.handlebars index f975a2a7737..f975a2a7737 100644 --- a/apps/files/js/filesummary.handlebars +++ b/apps/files/js/templates/filesummary.handlebars diff --git a/apps/files_sharing/css/public.scss b/apps/files_sharing/css/public.scss index 708fe1f2182..50dfa3e9c57 100644 --- a/apps/files_sharing/css/public.scss +++ b/apps/files_sharing/css/public.scss @@ -165,6 +165,8 @@ thead { font-weight: 300; font-size: 11px; opacity: .57; + overflow: hidden; + text-overflow: ellipsis; } #note-content { @@ -186,4 +188,4 @@ thead { } } } -}
\ No newline at end of file +} diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index 9057f7abaed..2cc34dde8bb 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -397,7 +397,7 @@ class ShareController extends AuthPublicShareController { // JS required for folders \OCP\Util::addStyle('files', 'merged'); \OCP\Util::addScript('files', 'filesummary'); - \OCP\Util::addScript('files', 'filesummary_template'); + \OCP\Util::addScript('files', 'templates'); \OCP\Util::addScript('files', 'breadcrumb'); \OCP\Util::addScript('files', 'fileinfomodel'); \OCP\Util::addScript('files', 'newfilemenu'); diff --git a/build/compile-handlebars-templates.sh b/build/compile-handlebars-templates.sh index 80e2e661f4d..585406c4e8f 100755 --- a/build/compile-handlebars-templates.sh +++ b/build/compile-handlebars-templates.sh @@ -11,7 +11,7 @@ handlebars -n OC.Settings.Templates settings/js/authtoken.handlebars -f setting handlebars -n OC.ContactsMenu.Templates core/js/contactsmenu -f core/js/contactsmenu_templates.js # Files app -handlebars -n OCA.Files.FileSummary.Templates apps/files/js/filesummary.handlebars -f apps/files/js/filesummary_template.js +handlebars -n OCA.Files.Templates apps/files/js/templates -f apps/files/js/templates.js if [[ $(git diff --name-only) ]]; then echo "Please submit your compiled handlebars templates" diff --git a/core/css/header.scss b/core/css/header.scss index 93c21117114..4c0f05f9cc6 100644 --- a/core/css/header.scss +++ b/core/css/header.scss @@ -65,6 +65,8 @@ display: flex; align-items: center; flex-wrap: wrap; + overflow: hidden; + &:focus { opacity: .75; } @@ -151,6 +153,7 @@ flex: 0 0; flex-grow: 1; white-space: nowrap; + overflow: hidden; } #header-right, .header-right { @@ -206,7 +209,7 @@ } } -/* show appname next to logo */ +/* only used for public share pages now as we have the app icons when logged in */ .header-appname { color: var(--color-primary-text); font-size: 16px; @@ -214,6 +217,8 @@ margin: 0; padding: 0; padding-right: 5px; + overflow: hidden; + text-overflow: ellipsis; } /* do not show menu toggle on public share links as there is no menu */ @@ -352,10 +357,17 @@ nav[role='navigation'] { &:active { color: var(--color-primary-text); - img, #expandDisplayName { - border: 2px solid $color-primary-text; - margin-top: -2px; - margin-left: -2px; + #expandDisplayName, + .avatardiv{ + border-radius: 50%; + border: 2px solid var(--color-primary-text); + margin: -2px; + } + .avatardiv{ + background-color: var(--color-primary-text); + } + #expandDisplayName { + opacity: 1; } } @@ -378,6 +390,7 @@ nav[role='navigation'] { #expandDisplayName { padding: 8px; opacity: .6; + cursor: pointer; /* full opacity for gear icon if active */ #body-settings & { diff --git a/core/css/public.scss b/core/css/public.scss index 052c98e29ea..0edf391fa49 100644 --- a/core/css/public.scss +++ b/core/css/public.scss @@ -8,8 +8,6 @@ $footer-height: 65px; } #header-secondary-action { - margin-right: 13px; - ul li { min-width: 270px; } diff --git a/tests/phpunit-autotest.xml b/tests/phpunit-autotest.xml index 5712838f6bd..05258ee6eff 100644 --- a/tests/phpunit-autotest.xml +++ b/tests/phpunit-autotest.xml @@ -42,6 +42,7 @@ <directory suffix=".php">../tests</directory> <directory suffix=".php">../build</directory> <directory suffix=".php">../lib/composer</directory> + <directory suffix=".php">../apps/*/composer</directory> </exclude> </whitelist> </filter> |