summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-01-30 14:49:38 +0100
committerVincent Petry <pvince81@owncloud.com>2014-02-20 18:24:42 +0100
commit2b84f5e0b91dc41c3bffe0149bfcd19fe39d1377 (patch)
tree8a866a29a391bb545dffd79df85ace903ce000bc /apps
parent271684dcfec16122b88e03780b41af7120f27e45 (diff)
downloadnextcloud-server-2b84f5e0b91dc41c3bffe0149bfcd19fe39d1377.tar.gz
nextcloud-server-2b84f5e0b91dc41c3bffe0149bfcd19fe39d1377.zip
remove duplicate selectors and declaration
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/js/share.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index b795b921903..7df8a05f607 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -25,16 +25,15 @@ $(document).ready(function() {
});
FileActions.register('all', 'Share', OC.PERMISSION_READ, OC.imagePath('core', 'actions/share'), function(filename) {
- if ($('#dir').val() == '/') {
- var item = $('#dir').val() + filename;
- } else {
- var item = $('#dir').val() + '/' + filename;
+ var dir = $('#dir').val();
+ var item = $dir + '/' + filename;
+ if ($dir == '/') {
+ item = $dir + filename;
}
var tr = FileList.findFileEl(filename);
+ var itemType = 'file';
if ($(tr).data('type') == 'dir') {
- var itemType = 'folder';
- } else {
- var itemType = 'file';
+ itemType = 'folder';
}
var possiblePermissions = $(tr).data('permissions');
var appendTo = $(tr).find('td.filename');