aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-08-19 21:03:25 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-08-19 21:03:25 +0200
commit555ea93b1cfc19ead7e382297e4c8d5698652bc8 (patch)
tree8571016eb10f0074c9d0239634d075773596b4d3 /core
parent8007ea60fbfa5de663753813a03041ca4c53384f (diff)
downloadnextcloud-server-555ea93b1cfc19ead7e382297e4c8d5698652bc8.tar.gz
nextcloud-server-555ea93b1cfc19ead7e382297e4c8d5698652bc8.zip
Fix some jshint issues in core/js/share*
Diffstat (limited to 'core')
-rw-r--r--core/js/shareconfigmodel.js2
-rw-r--r--core/js/sharedialogexpirationview.js4
-rw-r--r--core/js/sharedialoglinkshareview.js8
-rw-r--r--core/js/sharedialogmailview.js4
-rw-r--r--core/js/sharedialogresharerinfoview.js2
-rw-r--r--core/js/sharedialogshareelistview.js4
-rw-r--r--core/js/sharedialogview.js6
7 files changed, 19 insertions, 11 deletions
diff --git a/core/js/shareconfigmodel.js b/core/js/shareconfigmodel.js
index b1bbde7a695..b04c2acae16 100644
--- a/core/js/shareconfigmodel.js
+++ b/core/js/shareconfigmodel.js
@@ -8,7 +8,7 @@
*
*/
-/* global moment */
+/* global moment, oc_appconfig, oc_config */
(function() {
if (!OC.Share) {
diff --git a/core/js/sharedialogexpirationview.js b/core/js/sharedialogexpirationview.js
index d1b326a56bc..a9849ef9161 100644
--- a/core/js/sharedialogexpirationview.js
+++ b/core/js/sharedialogexpirationview.js
@@ -8,7 +8,7 @@
*
*/
-/* global moment */
+/* global moment, Handlebars */
(function() {
if (!OC.Share) {
@@ -107,7 +107,7 @@
$target.tooltip('hide');
$target.removeClass('error');
- expiration = moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD');
+ var expiration = moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD');
this.model.get('linkShare').expiration = expiration;
this.model.saveLinkShare({
expiration: expiration
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js
index 8ad2e270099..83bf7979000 100644
--- a/core/js/sharedialoglinkshareview.js
+++ b/core/js/sharedialoglinkshareview.js
@@ -8,6 +8,8 @@
*
*/
+/* globals Clipboard, Handlebars */
+
(function() {
if (!OC.Share) {
OC.Share = {};
@@ -131,7 +133,7 @@
var clipboard = new Clipboard('.clipboardButton');
clipboard.on('success', function(e) {
- $input = $(e.trigger);
+ var $input = $(e.trigger);
$input.tooltip({placement: 'bottom', trigger: 'manual', title: t('core', 'Copied!')});
$input.tooltip('show');
_.delay(function() {
@@ -139,7 +141,7 @@
}, 3000);
});
clipboard.on('error', function (e) {
- $input = $(e.trigger);
+ var $input = $(e.trigger);
var actionMsg = '';
if (/iPhone|iPad/i.test(navigator.userAgent)) {
actionMsg = t('core', 'Not supported!');
@@ -206,7 +208,7 @@
},
onPasswordKeyUp: function(event) {
- if(event.keyCode == 13) {
+ if(event.keyCode === 13) {
this.onPasswordEntered();
}
},
diff --git a/core/js/sharedialogmailview.js b/core/js/sharedialogmailview.js
index 79741e92ac5..b62936b1152 100644
--- a/core/js/sharedialogmailview.js
+++ b/core/js/sharedialogmailview.js
@@ -8,6 +8,8 @@
*
*/
+/* globals escapeHTML, Handlebars */
+
(function() {
if (!OC.Share) {
OC.Share = {};
@@ -137,7 +139,7 @@
fetch: 'getShareWithEmail',
search: search.term
}, function(result) {
- if (result.status == 'success' && result.data.length > 0) {
+ if (result.status === 'success' && result.data.length > 0) {
response(result.data);
}
});
diff --git a/core/js/sharedialogresharerinfoview.js b/core/js/sharedialogresharerinfoview.js
index 600e2ecbf56..654eebf4997 100644
--- a/core/js/sharedialogresharerinfoview.js
+++ b/core/js/sharedialogresharerinfoview.js
@@ -8,6 +8,8 @@
*
*/
+/* globals Handlebars */
+
(function() {
if (!OC.Share) {
OC.Share = {};
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js
index d156d30cecd..540bafa5c1c 100644
--- a/core/js/sharedialogshareelistview.js
+++ b/core/js/sharedialogshareelistview.js
@@ -8,6 +8,8 @@
*
*/
+/* globals Handlebars */
+
(function() {
if (!OC.Share) {
OC.Share = {};
@@ -254,8 +256,6 @@
var $element = $(event.target);
var $li = $element.closest('li');
var shareId = $li.data('share-id');
- var shareType = $li.data('share-type');
- var shareWith = $li.attr('data-share-with');
// adjust checkbox states
var $checkboxes = $('.permissions', $li).not('input[name="edit"]').not('input[name="share"]');
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js
index 5637ffc3a0a..2c60f216ef9 100644
--- a/core/js/sharedialogview.js
+++ b/core/js/sharedialogview.js
@@ -8,6 +8,8 @@
*
*/
+/* globals Handlebars */
+
(function() {
if(!OC.Share) {
OC.Share = {};
@@ -148,7 +150,7 @@
function (result) {
$loading.addClass('hidden');
$loading.removeClass('inlineblock');
- if (result.ocs.meta.statuscode == 100) {
+ if (result.ocs.meta.statuscode === 100) {
var users = result.ocs.data.exact.users.concat(result.ocs.data.users);
var groups = result.ocs.data.exact.groups.concat(result.ocs.data.groups);
var remotes = result.ocs.data.exact.remotes.concat(result.ocs.data.remotes);
@@ -404,7 +406,7 @@
if (this.configModel.get('isRemoteShareAllowed')) {
sharePlaceholder = t('core', 'Share with users, groups or remote users…');
} else {
- sharePlaceholder = t('core', 'Share with users or groups…')
+ sharePlaceholder = t('core', 'Share with users or groups…');
}
} else if (this.configModel.get('isRemoteShareAllowed')) {
sharePlaceholder = t('core', 'Share with users or remote users…');