Use an icon to set the email instead of a button with string

This commit is contained in:
Thomas Müller 2016-07-08 15:23:38 +02:00 committed by Lukas Reschke
parent daaa3ded8d
commit 4d67429cf0
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
4 changed files with 11 additions and 6 deletions

View File

@ -30,6 +30,7 @@
margin-left: 0;
}
.shareTabView input[type="text"].shareWithField,
.shareTabView input[type="text"].emailField,
.shareTabView input[type="text"].linkText {
width: 80%;
}

View File

@ -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');
}

View File

@ -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;
})();
})();

View File

@ -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 ...');