diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-07-08 15:23:38 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-07-20 15:07:46 +0200 |
commit | 4d67429cf034ef4912bd78fb9dac91155ff0fec1 (patch) | |
tree | 7fb38e05b2985681594bd41a2a8f6eab62a68ae1 /core | |
parent | daaa3ded8d73fe3e9eb483cbf1174ed245e6250b (diff) | |
download | nextcloud-server-4d67429cf034ef4912bd78fb9dac91155ff0fec1.tar.gz nextcloud-server-4d67429cf034ef4912bd78fb9dac91155ff0fec1.zip |
Use an icon to set the email instead of a button with string
Diffstat (limited to 'core')
-rw-r--r-- | core/css/icons.css | 4 | ||||
-rw-r--r-- | core/js/sharedialogmailview.js | 8 | ||||
-rw-r--r-- | core/js/tests/specs/sharedialogviewSpec.js | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/core/css/icons.css b/core/css/icons.css index 6d78363d3d5..1a632fdd58b 100644 --- a/core/css/icons.css +++ b/core/css/icons.css @@ -204,6 +204,10 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- background-image: url('../img/actions/mail.svg'); } +.icon-mail-grey { + background-image: url('../img/actions/mail-grey.svg'); +} + .icon-menu { background-image: url('../img/actions/menu.svg'); } diff --git a/core/js/sharedialogmailview.js b/core/js/sharedialogmailview.js index 84e3f3242ad..79741e92ac5 100644 --- a/core/js/sharedialogmailview.js +++ b/core/js/sharedialogmailview.js @@ -16,9 +16,9 @@ var TEMPLATE = '{{#if shareAllowed}}' + ' {{#if mailPublicNotificationEnabled}}' + - '<form id="emailPrivateLink" class="emailPrivateLinkForm">' + + '<form id="emailPrivateLink" class="emailPrivateLinkForm oneline">' + ' <input id="email" class="emailField" value="{{email}}" placeholder="{{mailPrivatePlaceholder}}" type="text" />' + - ' <input id="emailButton" class="emailButton" type="submit" value="{{mailButtonText}}" />' + + ' <a id="emailButton" class="icon icon-mail-grey" />' + '</form>' + ' {{/if}}' + '{{/if}}' @@ -48,7 +48,7 @@ showLink: true, events: { - 'submit .emailPrivateLinkForm': '_onEmailPrivateLink' + 'click #emailButton': '_onEmailPrivateLink' }, initialize: function(options) { @@ -173,4 +173,4 @@ OC.Share.ShareDialogMailView = ShareDialogMailView; -})();
\ No newline at end of file +})(); diff --git a/core/js/tests/specs/sharedialogviewSpec.js b/core/js/tests/specs/sharedialogviewSpec.js index 23214a7fe86..f0e027d9fb9 100644 --- a/core/js/tests/specs/sharedialogviewSpec.js +++ b/core/js/tests/specs/sharedialogviewSpec.js @@ -444,7 +444,7 @@ describe('OC.Share.ShareDialogView', function() { dialog.render(); dialog.$el.find('.emailPrivateLinkForm .emailField').val('a@b.c'); - dialog.$el.find('.emailPrivateLinkForm').trigger('submit'); + dialog.$el.find('#emailButton').trigger('click'); expect(sendEmailPrivateLinkStub.callCount).toEqual(1); expect(dialog.$el.find('.emailPrivateLinkForm .emailField').val()).toEqual('Sending ...'); @@ -463,7 +463,7 @@ describe('OC.Share.ShareDialogView', function() { dialog.render(); dialog.$el.find('.emailPrivateLinkForm .emailField').val('a@b.c'); - dialog.$el.find('.emailPrivateLinkForm').trigger('submit'); + dialog.$el.find('#emailButton').trigger('click'); expect(sendEmailPrivateLinkStub.callCount).toEqual(1); expect(dialog.$el.find('.emailPrivateLinkForm .emailField').val()).toEqual('Sending ...'); |