aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-09-30 22:17:18 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-09-30 22:17:18 +0200
commitd6e3195b38d8285c12a1fa4a23f8498e5122f4fe (patch)
treedf71420ec67fbd18e046c2d94013431c810e19c6 /apps
parentff75652cb7f19da633d1c17c8805a3d3200dd828 (diff)
parent2d1214d21d32c18d9aa6cada30f92a32bd809cdf (diff)
downloadnextcloud-server-d6e3195b38d8285c12a1fa4a23f8498e5122f4fe.tar.gz
nextcloud-server-d6e3195b38d8285c12a1fa4a23f8498e5122f4fe.zip
Merge pull request #19421 from owncloud/fix_19382
Do noy allow empty urls to be submitted in "add to your owncloud"
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/css/public.css10
-rw-r--r--apps/files_sharing/js/public.js8
-rw-r--r--apps/files_sharing/templates/public.php2
3 files changed, 19 insertions, 1 deletions
diff --git a/apps/files_sharing/css/public.css b/apps/files_sharing/css/public.css
index a5cf57d0ac5..2b7e84c987d 100644
--- a/apps/files_sharing/css/public.css
+++ b/apps/files_sharing/css/public.css
@@ -134,9 +134,19 @@ thead {
margin: 2px 0 !important;
}
+#save-button-confirm:disabled,
+#save-button-confirm:disabled:hover,
+#save-button-confirm:disabled:focus {
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
+ filter: alpha(opacity=20);
+ opacity: .2;
+ cursor: default;
+}
+
#save-button-confirm:hover,
#save-button-confirm:focus {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
opacity: 1;
+ cursor: pointer;
}
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 1c3d4b9ac32..16b4f1589b1 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -228,6 +228,14 @@ OCA.Sharing.PublicApp = {
OCA.Sharing.PublicApp._saveToOwnCloud(remote, token, owner, name, isProtected);
});
+ $('#remote_address').on("keyup paste", function() {
+ if ($(this).val() === '') {
+ $('#save-button-confirm').prop('disabled', true);
+ } else {
+ $('#save-button-confirm').prop('disabled', false);
+ }
+ });
+
$('#save #save-button').click(function () {
$(this).hide();
$('.save-form').css('display', 'inline');
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index cde28c80fc4..06d797c3c6f 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -76,7 +76,7 @@ $thumbSize = 1024;
<button id="save-button"><?php p($l->t('Add to your ownCloud')) ?></button>
<form class="save-form hidden" action="#">
<input type="text" id="remote_address" placeholder="example.com/owncloud"/>
- <button id="save-button-confirm" class="icon-confirm svg"></button>
+ <button id="save-button-confirm" class="icon-confirm svg" disabled></button>
</form>
</span>
<?php } ?>