Merge pull request #935 from nextcloud/stable10-add-cachebusters

[Stable10] add cachebusters
This commit is contained in:
Morris Jobke 2016-08-18 15:49:44 +02:00 committed by GitHub
commit f68d5d1071
6 changed files with 25 additions and 24 deletions

View File

@ -87,26 +87,26 @@
/* icons for sidebar */
.nav-icon-files {
background-image: url('../img/folder.svg');
background-image: url('../img/folder.svg?v=1');
}
.nav-icon-recent {
background-image: url('../img/recent.svg');
background-image: url('../img/recent.svg?v=1');
}
.nav-icon-favorites {
background-image: url('../img/star.svg');
background-image: url('../img/star.svg?v=1');
}
.nav-icon-sharingin,
.nav-icon-sharingout {
background-image: url('../img/share.svg');
background-image: url('../img/share.svg?v=1');
}
.nav-icon-sharinglinks {
background-image: url('../img/public.svg');
background-image: url('../img/public.svg?v=1');
}
.nav-icon-extstoragemounts {
background-image: url('../img/external.svg');
background-image: url('../img/external.svg?v=1');
}
.nav-icon-trashbin {
background-image: url('../img/delete.svg');
background-image: url('../img/delete.svg?v=1');
}
#app-navigation .nav-files a.nav-icon-files {

View File

@ -92,7 +92,7 @@
width: 44px;
margin: 0;
padding: 0;
background: none; background-image: url('../img/actions/triangle-s.svg');
background: none; background-image: url('../img/actions/triangle-s.svg?v=1');
background-size: 16px; background-repeat: no-repeat; background-position: center;
border: none;
border-radius: 0;
@ -256,7 +256,7 @@
background-color: transparent;
background-repeat: no-repeat;
background-position: center;
background-image: url('../img/actions/more.svg');
background-image: url('../img/actions/more.svg?v=1');
}
#app-navigation .app-navigation-entry-utils-menu-button:hover button,
@ -497,7 +497,7 @@
padding: 0;
margin: 0;
background-color: #fff;
background-image: url('../img/actions/settings.svg');
background-image: url('../img/actions/settings.svg?v=1');
background-position: 14px center;
background-repeat: no-repeat;
box-shadow: none;

View File

@ -68,7 +68,7 @@
}
#header .logo {
background-image: url('../img/logo-icon.svg');
background-image: url('../img/logo-icon.svg?v=1');
background-repeat: no-repeat;
background-size: 175px;
background-position: center;
@ -80,7 +80,7 @@
#header .logo-icon {
/* display logo so appname can be shown next to it */
display: inline-block;
background-image: url('../img/logo-icon.svg');
background-image: url('../img/logo-icon.svg?v=1');
background-repeat: no-repeat;
background-position: center center;
width: 62px;

View File

@ -26,7 +26,7 @@ body {
#body-login {
text-align: center;
background-color: #0082c9;
background-image: url('../img/background.jpg');
background-image: url('../img/background.jpg?v=1');
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: cover;
@ -98,7 +98,7 @@ a.two-factor-cancel {
font-size: 1.2em;
padding: 3px;
padding-left: 25px;
background: transparent url('../img/actions/search-white.svg') no-repeat 6px center;
background: transparent url('../img/actions/search-white.svg?v=1') no-repeat 6px center;
color: #fff;
border: 0;
border-radius: 3px;
@ -465,7 +465,7 @@ label.infield {
position: absolute !important;
height: 20px;
width: 24px;
background-image: url('../img/actions/toggle.svg');
background-image: url('../img/actions/toggle.svg?v=1');
background-repeat: no-repeat;
background-position: center;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
@ -757,15 +757,15 @@ a.bookmarklet { background-color:#ddd; border:1px solid #ccc; padding:5px;paddin
.exception{color:#000;}
.exception textarea{width:95%;height:200px;background:#ffe;border:0;}
.ui-icon-circle-triangle-e{ background-image:url('../img/actions/play-next.svg'); }
.ui-icon-circle-triangle-w{ background-image:url('../img/actions/play-previous.svg'); }
.ui-icon-circle-triangle-e{ background-image:url('../img/actions/play-next.svg?v=1'); }
.ui-icon-circle-triangle-w{ background-image:url('../img/actions/play-previous.svg?v=1'); }
.ui-datepicker-prev,.ui-datepicker-next{ border:1px solid #ddd; background:#fff; }
/* ---- DIALOGS ---- */
#oc-dialog-filepicker-content .dirtree {width:92%; overflow:hidden; }
#oc-dialog-filepicker-content .dirtree .home {
background-image:url('../img/places/home.svg');
background-image:url('../img/places/home.svg?v=1');
background-repeat:no-repeat;
background-position: left center;
width: 30px;
@ -848,7 +848,7 @@ span.ui-icon {float: left; margin: 3px 7px 30px 0;}
}
.popup.topright { top:7em; right:1em; }
.popup.bottomleft { bottom:1em; left:33em; }
.popup .close { position:absolute; top:0.2em; right:0.2em; height:20px; width:20px; background:url('../img/actions/close.svg') no-repeat center; }
.popup .close { position:absolute; top:0.2em; right:0.2em; height:20px; width:20px; background:url('../img/actions/close.svg?v=1') no-repeat center; }
.popup h2 { font-size:20px; }
.arrow { border-bottom:10px solid white; border-left:10px solid transparent; border-right:10px solid transparent; display:block; height:0; position:absolute; width:0; z-index:201; }
.arrow.left { left:-13px; bottom:1.2em; -webkit-transform:rotate(270deg); -ms-transform:rotate(270deg); transform:rotate(270deg); }
@ -860,7 +860,7 @@ span.ui-icon {float: left; margin: 3px 7px 30px 0;}
div.crumb {
float: left;
display: block;
background-image: url('../img/breadcrumb.svg');
background-image: url('../img/breadcrumb.svg?v=1');
background-repeat: no-repeat;
background-position: right center;
height: 44px;

View File

@ -81,14 +81,14 @@
<li>
<a href="<?php print_unescaped($entry['href']); ?>"
<?php if( $entry["active"] ): ?> class="active"<?php endif; ?>>
<img alt="" src="<?php print_unescaped($entry['icon']); ?>">
<img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>">
<?php p($entry['name']) ?>
</a>
</li>
<?php endforeach; ?>
<li>
<a id="logout" <?php print_unescaped(OC_User::getLogoutAttribute()); ?>>
<img alt="" src="<?php print_unescaped(image_path('', 'actions/logout.svg')); ?>">
<img alt="" src="<?php print_unescaped(image_path('', 'actions/logout.svg') . '?v=' . $_['versionHash']); ?>">
<?php p($l->t('Log out'));?>
</a>
</li>
@ -115,7 +115,7 @@
<?php if( $entry['active'] ): ?> class="active"<?php endif; ?>>
<svg width="32" height="32" viewBox="0 0 32 32">
<defs><filter id="invert"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs>
<image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert)" xlink:href="<?php print_unescaped($entry['icon']); ?>" class="app-icon"></image>
<image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert)" xlink:href="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon"></image>
</svg>
<div class="icon-loading-dark" style="display:none;"></div>
<span>
@ -133,7 +133,7 @@
<?php if( $_['appsmanagement_active'] ): ?> class="active"<?php endif; ?>>
<svg width="32" height="32" viewBox="0 0 32 32" class="app-icon">
<defs><filter id="invert"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs>
<image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert)" xlink:href="<?php print_unescaped(image_path('settings', 'apps.svg')); ?>"></image>
<image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert)" xlink:href="<?php print_unescaped(image_path('settings', 'apps.svg') . '?v=' . $_['versionHash']); ?>"></image>
</svg>
<div class="icon-loading-dark" style="display:none;"></div>
<span>

View File

@ -153,6 +153,7 @@ class TemplateLayout extends \OC_Template {
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles);
$this->assign('cssfiles', array());
$this->assign('printcssfiles', []);
$this->assign('versionHash', self::$versionHash);
foreach($cssFiles as $info) {
$web = $info[1];
$file = $info[2];