Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--appinfo/app.php1
-rw-r--r--css/styles.css2
-rw-r--r--js/bower.json3
-rw-r--r--js/gallery.js2
-rw-r--r--js/galleryinfobox.js20
-rw-r--r--js/galleryview.js20
-rw-r--r--js/slideshow.js11
-rw-r--r--js/vendor/spin.js/spin.min.js2
-rw-r--r--service/searchfolderservice.php2
-rw-r--r--templates/part.content.php5
-rw-r--r--templates/public.php5
-rw-r--r--templates/slideshow.php2
12 files changed, 20 insertions, 55 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index 4400db88..a749c3ee 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -71,7 +71,6 @@ if (isset($request->server['REQUEST_URI'])) {
*/
Util::addScript($appName, 'vendor/bigshot/bigshot-compressed');
Util::addScript($appName, 'vendor/image-scale/image-scale.min');
- Util::addScript($appName, 'vendor/spin.js/spin.min');
Util::addScript($appName, 'galleryfileaction');
Util::addScript($appName, 'slideshow');
Util::addScript($appName, 'slideshowcontrols');
diff --git a/css/styles.css b/css/styles.css
index bb22aa49..58771aba 100644
--- a/css/styles.css
+++ b/css/styles.css
@@ -278,6 +278,4 @@ http://www.bypeople.com/author/comatosed/*/
height: 32px;
width: 100%;
margin-bottom: 50px;
- position: relative;
- mix-blend-mode: difference;
}
diff --git a/js/bower.json b/js/bower.json
index 0d0a4e37..1f67648e 100644
--- a/js/bower.json
+++ b/js/bower.json
@@ -17,7 +17,6 @@
"dependencies": {
"eventsource-polyfill": "~0.*",
"marked": "~0.*",
- "github-markdown-css": "~2.*",
- "spin.js": "~2.3.2"
+ "github-markdown-css": "~2.*"
}
}
diff --git a/js/gallery.js b/js/gallery.js
index 048cb41e..f8a5d244 100644
--- a/js/gallery.js
+++ b/js/gallery.js
@@ -269,6 +269,7 @@
emptyContentElement.html(message);
emptyContentElement.removeClass('hidden');
$('#controls').addClass('hidden');
+ $('#content').removeClass('icon-loading');
},
/**
@@ -280,6 +281,7 @@
"I am sorry, but I could not find any media files at this location.");
emptyContentElement.html(message);
emptyContentElement.removeClass('hidden');
+ $('#content').removeClass('icon-loading');
$('#album-info-button').hide();
$('#share-button').hide();
$('#sort-name-button').hide();
diff --git a/js/galleryinfobox.js b/js/galleryinfobox.js
index 6d4e2e5c..7ca085ad 100644
--- a/js/galleryinfobox.js
+++ b/js/galleryinfobox.js
@@ -1,4 +1,4 @@
-/* global Gallery, marked, Spinner */
+/* global Gallery, marked */
(function ($, t, Gallery) {
"use strict";
/**
@@ -8,19 +8,11 @@
*/
var InfoBox = function () {
this.infoContentElement = $('.album-info-content');
- this.spinnerDiv = this.infoContentElement.get(0);
- var spinnerOptions = {
- color: '#999',
- hwaccel: true
- };
- this.spinner = new Spinner(spinnerOptions).spin(this.spinnerDiv);
};
InfoBox.prototype = {
infoContentElement: null,
albumInfo: null,
- spinnerDiv: 0,
- spinner: null,
/**
* Shows an information box to the user
@@ -32,8 +24,8 @@
this.albumInfo = Gallery.config.albumInfo;
if (!this.albumInfo.infoLoaded) {
+ this.infoContentElement.addClass('icon-loading');
this.infoContentElement.empty();
- this.spinner.spin(this.spinnerDiv);
this.infoContentElement.height(100);
this.infoContentElement.slideDown();
if (!$.isEmptyObject(this.albumInfo.descriptionLink)) {
@@ -45,9 +37,9 @@
thisInfoBox._addContent(data);
}
).fail(function () {
- thisInfoBox._addContent(t('gallery',
- 'Could not load the description'));
- });
+ thisInfoBox._addContent(t('gallery',
+ 'Could not load the description'));
+ });
} else {
this._addContent(this.albumInfo.description);
}
@@ -83,7 +75,7 @@
* @private
*/
_adjustHeight: function () {
- this.spinner.stop(this.spinnerDiv);
+ this.infoContentElement.removeClass('icon-loading');
var newHeight = this.infoContentElement[0].scrollHeight;
this.infoContentElement.animate({
height: newHeight + 40
diff --git a/js/galleryview.js b/js/galleryview.js
index 5216ceb4..7dd4c13c 100644
--- a/js/galleryview.js
+++ b/js/galleryview.js
@@ -1,4 +1,4 @@
-/* global Gallery, Spinner */
+/* global Gallery */
(function ($, _, OC, t, Gallery) {
"use strict";
/**
@@ -9,20 +9,12 @@
var View = function () {
this.element = $('#gallery');
this.loadVisibleRows.loading = false;
- this.spinnerDiv = $('#loading-indicator').get(0);
- var spinnerOptions = {
- color: '#999',
- hwaccel: true
- };
- this.spinner = new Spinner(spinnerOptions).spin(this.spinnerDiv);
};
View.prototype = {
element: null,
breadcrumb: null,
requestId: -1,
- spinnerDiv: 0,
- spinner: null,
/**
* Removes all thumbnails from the view
@@ -43,10 +35,8 @@
this.clear();
if (albumPath === '') {
Gallery.showEmpty();
- this.spinner.stop(this.spinnerDiv);
} else {
Gallery.showEmptyFolder();
- this.spinner.stop(this.spinnerDiv);
Gallery.currentAlbum = albumPath;
this.breadcrumb = new Gallery.Breadcrumb(albumPath);
this.breadcrumb.setMaxWidth($(window).width() - Gallery.buttonsWidth);
@@ -94,7 +84,7 @@
}
this.clear();
- this.spinner.spin(this.spinnerDiv);
+ $('#loading-indicator').show();
if (albumPath !== Gallery.currentAlbum) {
this.loadVisibleRows.loading = false;
@@ -161,7 +151,7 @@
// If we've reached the end of the album, we kill the loader
if (!(album.viewedItems < album.subAlbums.length + album.images.length)) {
view.loadVisibleRows.loading = null;
- view.spinner.stop(view.spinnerDiv);
+ $('#loading-indicator').hide();
return;
}
@@ -197,11 +187,11 @@
// No more rows to load at the moment
view.loadVisibleRows.loading = null;
- view.spinner.stop(view.spinnerDiv);
+ $('#loading-indicator').hide();
}, function () {
// Something went wrong, so kill the loader
view.loadVisibleRows.loading = null;
- view.spinner.stop(view.spinnerDiv);
+ $('#loading-indicator').hide();
});
}
// This is the safest way to do things
diff --git a/js/slideshow.js b/js/slideshow.js
index 0b28d79e..c53a8b1d 100644
--- a/js/slideshow.js
+++ b/js/slideshow.js
@@ -1,4 +1,3 @@
-/* global Spinner */
(function ($, OC, OCA, t) {
"use strict";
/**
@@ -22,8 +21,6 @@
zoomablePreview: null,
active: false,
backgroundToggle: false,
- spinnerDiv: 0,
- spinner: null,
/**
* Initialises the slideshow
@@ -41,12 +38,6 @@
// Move the slideshow outside the content so we can hide the content
$('body').append($tmpl);
this.container = $('#slideshow');
- this.spinnerDiv = this.container.get(0);
- var spinnerOptions = {
- color: '#999',
- hwaccel: true
- };
- this.spinner = new Spinner(spinnerOptions).spin(this.spinnerDiv);
this.zoomablePreviewContainer = this.container.find('.bigshotContainer');
this.zoomablePreview = new SlideShow.ZoomablePreview(this.container);
this.controls =
@@ -107,7 +98,6 @@
this._hideImage();
var currentImageId = index;
return this.loadImage(this.images[index]).then(function (img) {
- this.spinner.stop(this.spinnerDiv);
this.container.css('background-position', '-10000px 0');
this.controls.showActionButtons();
@@ -326,7 +316,6 @@
*/
_hideImage: function () {
this.zoomablePreviewContainer.empty();
- this.spinner.spin(this.spinnerDiv);
this.controls.hideActionButtons();
},
diff --git a/js/vendor/spin.js/spin.min.js b/js/vendor/spin.js/spin.min.js
deleted file mode 100644
index bd3ae4f4..00000000
--- a/js/vendor/spin.js/spin.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// http://spin.js.org/#v2.3.2
-!function(a,b){"object"==typeof module&&module.exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(k.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",k.cssRules.length),m[e]=1),e}function d(a,b){var c,d,e=a.style;if(b=b.charAt(0).toUpperCase()+b.slice(1),void 0!==e[b])return b;for(d=0;d<l.length;d++)if(c=l[d]+b,void 0!==e[c])return c}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}k.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.scale*d.width,left:d.scale*d.radius,top:-d.scale*d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.scale*(d.length+d.width),k=2*d.scale*j,l=-(d.width+d.length)*d.scale*2+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k,l=["webkit","Moz","ms","O"],m={},n={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",opacity:.25,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!1,position:"absolute"};if(h.defaults={},f(h.prototype,{spin:function(b){this.stop();var c=this,d=c.opts,f=c.el=a(null,{className:d.className});if(e(f,{position:d.position,width:0,zIndex:d.zIndex,left:d.left,top:d.top}),b&&b.insertBefore(f,b.firstChild||null),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.scale*(f.length+f.width)+"px",height:f.scale*f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.scale*f.radius+"px,0)",borderRadius:(f.corners*f.scale*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.scale*f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}}),"undefined"!=typeof document){k=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}();var o=e(a("group"),{behavior:"url(#default#VML)"});!d(o,"transform")&&o.adj?i():j=d(o,"animation")}return h}); \ No newline at end of file
diff --git a/service/searchfolderservice.php b/service/searchfolderservice.php
index bf78c547..66125288 100644
--- a/service/searchfolderservice.php
+++ b/service/searchfolderservice.php
@@ -30,7 +30,7 @@ class SearchFolderService extends FilesService {
* @var int
*/
protected $virtualRootLevel = null;
-
+
/**
* This returns what we think is the current folder node based on a given path
*
diff --git a/templates/part.content.php b/templates/part.content.php
index 7e19a847..5fb3a79e 100644
--- a/templates/part.content.php
+++ b/templates/part.content.php
@@ -26,8 +26,7 @@ script(
'slideshow',
'slideshowcontrols',
'slideshowzoomablepreview',
- 'vendor/image-scale/image-scale.min',
- 'vendor/spin.js/spin.min'
+ 'vendor/image-scale/image-scale.min'
]
);
style(
@@ -94,5 +93,5 @@ style(
</div>
<div id="gallery" class="hascontrols"></div>
<div id="emptycontent" class="hidden"></div>
-<div id="loading-indicator"></div>
+<div id="loading-indicator" class="loading"></div>
<input type="hidden" name="allowShareWithLink" id="allowShareWithLink" value="yes"/>
diff --git a/templates/public.php b/templates/public.php
index 6ce935cc..608b00bd 100644
--- a/templates/public.php
+++ b/templates/public.php
@@ -26,8 +26,7 @@ script(
'slideshow',
'slideshowcontrols',
'slideshowzoomablepreview',
- 'vendor/image-scale/image-scale.min',
- 'vendor/spin.js/spin.min'
+ 'vendor/image-scale/image-scale.min'
]
);
style(
@@ -148,7 +147,7 @@ style(
data-token="<?php isset($_['token']) ? p($_['token']) : p(false) ?>">
</div>
<div id="emptycontent" class="hidden"></div>
- <div id="loading-indicator"></div>
+ <div id="loading-indicator" class="loading"></div>
<footer>
<p class="info"><?php print_unescaped($theme->getLongFooter()); ?></p>
</footer>
diff --git a/templates/slideshow.php b/templates/slideshow.php
index 8442d904..52c00a55 100644
--- a/templates/slideshow.php
+++ b/templates/slideshow.php
@@ -1,4 +1,4 @@
-<div id="slideshow">
+<div id="slideshow" class="icon-loading-dark">
<input type="button" class="svg next icon-view-next"/>
<input type="button" class="svg play icon-view-play"/>
<input type="button" class="svg pause icon-view-pause hidden"/>