Skip to content

Commit

Permalink
Use an icon to set the email instead of a button with string
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 committed Jul 15, 2016
1 parent 72fe60e commit cc67547
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions apps/files_sharing/css/sharetabview.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
margin-left: 0;
}
.shareTabView input[type="text"].shareWithField,
.shareTabView input[type="text"].emailField,
.shareTabView input[type="text"].linkText {
width: 80%;
}
Expand Down
4 changes: 4 additions & 0 deletions core/css/icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
8 changes: 4 additions & 4 deletions core/js/sharedialogmailview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}}'
Expand Down Expand Up @@ -48,7 +48,7 @@
showLink: true,

events: {
'submit .emailPrivateLinkForm': '_onEmailPrivateLink'
'click #emailButton': '_onEmailPrivateLink'
},

initialize: function(options) {
Expand Down Expand Up @@ -173,4 +173,4 @@

OC.Share.ShareDialogMailView = ShareDialogMailView;

})();
})();
4 changes: 2 additions & 2 deletions core/js/tests/specs/sharedialogviewSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...');
Expand All @@ -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 ...');
Expand Down

0 comments on commit cc67547

Please sign in to comment.