summaryrefslogtreecommitdiffstats
path: root/core/js/share.js
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-07-31 21:21:02 +0200
committerkondou <kondou@ts.unde.re>2013-07-31 21:21:02 +0200
commitaaf0fec9f54bc6f9eef5df00441d593e053ee74b (patch)
treeca65f4c20b8d1e698d815a3b5970926023093478 /core/js/share.js
parent50101a85a63f29c47abe325aecb3af26bc8a96d1 (diff)
downloadnextcloud-server-aaf0fec9f54bc6f9eef5df00441d593e053ee74b.tar.gz
nextcloud-server-aaf0fec9f54bc6f9eef5df00441d593e053ee74b.zip
Fix some JSLint warnings
Diffstat (limited to 'core/js/share.js')
-rw-r--r--core/js/share.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/core/js/share.js b/core/js/share.js
index b4b5159b0b5..b220e4a1eb6 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -103,9 +103,9 @@ OC.Share={
var checkReshare = true;
if (typeof OC.Share.statuses[itemSource] === 'undefined') {
// NOTE: Check does not always work and misses some shares, fix later
- checkShares = true;
+ var checkShares = true;
} else {
- checkShares = true;
+ var checkShares = true;
}
$.ajax({type: 'GET', url: OC.filePath('core', 'ajax', 'share.php'), data: { fetch: 'getItem', itemType: itemType, itemSource: itemSource, checkReshare: checkReshare, checkShares: checkShares }, async: false, success: function(result) {
if (result && result.status === 'success') {
@@ -228,23 +228,23 @@ OC.Share={
});
}
$('#shareWith').autocomplete({minLength: 1, source: function(search, response) {
- // if (cache[search.term]) {
- // response(cache[search.term]);
- // } else {
+ // if (cache[search.term]) {
+ // response(cache[search.term]);
+ // } else {
$.get(OC.filePath('core', 'ajax', 'share.php'), { fetch: 'getShareWith', search: search.term, itemShares: OC.Share.itemShares }, function(result) {
if (result.status == 'success' && result.data.length > 0) {
response(result.data);
} else {
// Suggest sharing via email if valid email address
-// var pattern = new RegExp(/^[+a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/i);
-// if (pattern.test(search.term)) {
-// response([{label: t('core', 'Share via email:')+' '+search.term, value: {shareType: OC.Share.SHARE_TYPE_EMAIL, shareWith: search.term}}]);
-// } else {
+// var pattern = new RegExp(/^[+a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/i);
+// if (pattern.test(search.term)) {
+// response([{label: t('core', 'Share via email:')+' '+search.term, value: {shareType: OC.Share.SHARE_TYPE_EMAIL, shareWith: search.term}}]);
+// } else {
response([t('core', 'No people found')]);
-// }
+// }
}
});
- // }
+ // }
},
focus: function(event, focused) {
event.preventDefault();