]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix some jshint issues in core/js/share* 989/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Fri, 19 Aug 2016 19:03:25 +0000 (21:03 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Fri, 19 Aug 2016 19:03:25 +0000 (21:03 +0200)
core/js/shareconfigmodel.js
core/js/sharedialogexpirationview.js
core/js/sharedialoglinkshareview.js
core/js/sharedialogmailview.js
core/js/sharedialogresharerinfoview.js
core/js/sharedialogshareelistview.js
core/js/sharedialogview.js

index b1bbde7a69579afe5e6961878922b4379023b671..b04c2acae16b69f665816cd85307b2f0ce52113f 100644 (file)
@@ -8,7 +8,7 @@
  *
  */
 
-/* global moment */
+/* global moment, oc_appconfig, oc_config */
 
 (function() {
        if (!OC.Share) {
index d1b326a56bcab89d90d00c59c93ef25a78f778cd..a9849ef91618270e54e592072b4961e2fc28ac7a 100644 (file)
@@ -8,7 +8,7 @@
  *
  */
 
-/* global moment */
+/* global moment, Handlebars */
 
 (function() {
        if (!OC.Share) {
                        $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
index 8ad2e270099bd39f46ce666de3f378f3a25a49d5..83bf7979000313c4c0ca76ba93258febe25effbd 100644 (file)
@@ -8,6 +8,8 @@
  *
  */
 
+/* globals Clipboard, Handlebars */
+
 (function() {
        if (!OC.Share) {
                OC.Share = {};
 
                        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() {
                                }, 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!');
                },
 
                onPasswordKeyUp: function(event) {
-                       if(event.keyCode == 13) {
+                       if(event.keyCode === 13) {
                                this.onPasswordEntered();
                        }
                },
index 79741e92ac55388b002483091277869878cb28a1..b62936b11527bbf8c9b33c62ca92af62dadcda4e 100644 (file)
@@ -8,6 +8,8 @@
  *
  */
 
+/* globals escapeHTML, Handlebars */
+
 (function() {
        if (!OC.Share) {
                OC.Share = {};
                                                                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);
                                                                }
                                                        });
index 600e2ecbf56d9232acb3f6fc1f04be0a74c17064..654eebf49976017eaf1fd5f940175076abbfb934 100644 (file)
@@ -8,6 +8,8 @@
  *
  */
 
+/* globals Handlebars */
+
 (function() {
        if (!OC.Share) {
                OC.Share = {};
index d156d30cecd099246514a08b1665c3c61a6be3c0..540bafa5c1c09d02537491395c19b9b02b65cfd9 100644 (file)
@@ -8,6 +8,8 @@
  *
  */
 
+/* globals Handlebars */
+
 (function() {
        if (!OC.Share) {
                OC.Share = {};
                        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"]');
index 5637ffc3a0a8d26100b047e89f8b22e31859330f..2c60f216ef948c5fc01dd684d2af5bdcec6b82a4 100644 (file)
@@ -8,6 +8,8 @@
  *
  */
 
+/* globals Handlebars */
+
 (function() {
        if(!OC.Share) {
                OC.Share = {};
                                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);
                                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…');