summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-12-23 16:36:53 +0100
committerGitHub <noreply@github.com>2016-12-23 16:36:53 +0100
commit56c016946d0695a62e418839cf19786a223b4ae7 (patch)
treee62fcaf393a43e653c8bbdec815e88e2fa63d80e /apps/files/js
parent6f96af0fce24bf86b201b8ed5b27c2eff62099fc (diff)
parentcfada468e6a0b277b6c80ddd7f5ebfdad78326f6 (diff)
downloadnextcloud-server-56c016946d0695a62e418839cf19786a223b4ae7.tar.gz
nextcloud-server-56c016946d0695a62e418839cf19786a223b4ae7.zip
Merge pull request #2763 from nextcloud/fix_maindetailsview_favorite_star-patch
[downstream] Fix maindetailsview favorite star patch
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/file-upload.js31
-rw-r--r--apps/files/js/mainfileinfodetailview.js7
2 files changed, 3 insertions, 35 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index d1ceb436720..0fbf3f559fe 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -158,15 +158,6 @@ OC.FileUpload.prototype = {
this._conflictMode = mode;
},
- /**
- * Returns whether the upload is in progress
- *
- * @return {boolean}
- */
- isPending: function() {
- return this.data.state() === 'pending';
- },
-
deleteUpload: function() {
delete this.data.jqXHR;
},
@@ -561,21 +552,6 @@ OC.Uploader.prototype = _.extend({
OC.Notification.showTemporary(t('files', 'Upload cancelled.'), {timeout: 10});
}, 500),
/**
- * Checks the currently known uploads.
- * returns true if any hxr has the state 'pending'
- * @returns {boolean}
- */
- isProcessing:function() {
- var count = 0;
-
- jQuery.each(this._uploads, function(i, upload) {
- if (upload.isPending()) {
- count++;
- }
- });
- return count > 0;
- },
- /**
* callback for the conflicts dialog
*/
onCancel:function() {
@@ -1134,13 +1110,6 @@ OC.Uploader.prototype = _.extend({
}
}
- // warn user not to leave the page while upload is in progress
- $(window).on('beforeunload', function(e) {
- if (self.isProcessing()) {
- return t('files', 'File upload is in progress. Leaving the page now will cancel the upload.');
- }
- });
-
//add multiply file upload attribute to all browsers except konqueror (which crashes when it's used)
if (navigator.userAgent.search(/konqueror/i) === -1) {
this.$uploadEl.attr('multiple', 'multiple');
diff --git a/apps/files/js/mainfileinfodetailview.js b/apps/files/js/mainfileinfodetailview.js
index e9259f75ba1..1a69528fd17 100644
--- a/apps/files/js/mainfileinfodetailview.js
+++ b/apps/files/js/mainfileinfodetailview.js
@@ -20,9 +20,8 @@
'</a>' +
'</div>' +
' <div class="file-details ellipsis">' +
- ' <a href="#" ' +
- ' class="action action-favorite favorite">' +
- ' <img class="svg" alt="{{starAltText}}" src="{{starIcon}}" />' +
+ ' <a href="#" class="action action-favorite favorite permanent">' +
+ ' <span class="icon {{starClass}}" title="{{starAltText}}"></span>' +
' </a>' +
' {{#if hasSize}}<span class="size" title="{{altSize}}">{{size}}</span>, {{/if}}<span class="date live-relative-timestamp" data-timestamp="{{timestamp}}" title="{{altDate}}">{{date}}</span>' +
' </div>' +
@@ -155,7 +154,7 @@
timestamp: this.model.get('mtime'),
date: OC.Util.relativeModifiedDate(this.model.get('mtime')),
starAltText: isFavorite ? t('files', 'Favorited') : t('files', 'Favorite'),
- starIcon: OC.imagePath('core', isFavorite ? 'actions/starred' : 'actions/star'),
+ starClass: isFavorite ? 'icon-starred' : 'icon-star',
permalink: this._makePermalink(this.model.get('id')),
permalinkTitle: t('files', 'Copy local link')
}));