Fix some jshint issues in core/js/share*

pull/989/head
Roeland Jago Douma 9 years ago
parent 8007ea60fb
commit 555ea93b1c
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
  1. 2
      core/js/shareconfigmodel.js
  2. 4
      core/js/sharedialogexpirationview.js
  3. 8
      core/js/sharedialoglinkshareview.js
  4. 4
      core/js/sharedialogmailview.js
  5. 2
      core/js/sharedialogresharerinfoview.js
  6. 4
      core/js/sharedialogshareelistview.js
  7. 6
      core/js/sharedialogview.js

@ -8,7 +8,7 @@
*
*/
/* global moment */
/* global moment, oc_appconfig, oc_config */
(function() {
if (!OC.Share) {

@ -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

@ -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();
}
},

@ -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);
}
});

@ -8,6 +8,8 @@
*
*/
/* globals Handlebars */
(function() {
if (!OC.Share) {
OC.Share = {};

@ -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"]');

@ -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…');

Loading…
Cancel
Save