diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-04-24 22:18:52 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-04-24 22:18:52 +0200 |
commit | 58cc1251be33b43a5bb9163e1b042970b8e81b4b (patch) | |
tree | eb327fc07a4dbe921c39376cb330cd9a54bff5da /core | |
parent | e0b0115f99d8b93adfb9a9494aa1273f5e2f2200 (diff) | |
download | nextcloud-server-58cc1251be33b43a5bb9163e1b042970b8e81b4b.tar.gz nextcloud-server-58cc1251be33b43a5bb9163e1b042970b8e81b4b.zip |
Use "complete" callback in onPasswordEntered
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/js/sharedialoglinkshareview.js | 3 | ||||
-rw-r--r-- | core/js/tests/specs/sharedialoglinkshareview.js | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js index e7371d98f4a..0e317d8c921 100644 --- a/core/js/sharedialoglinkshareview.js +++ b/core/js/sharedialoglinkshareview.js @@ -307,13 +307,12 @@ this.model.saveLinkShare({ password: password }, { - success: function(model) { + complete: function(model) { $loading.removeClass('inlineblock').addClass('hidden'); }, error: function(model, msg) { // destroy old tooltips $input.tooltip('destroy'); - $loading.removeClass('inlineblock').addClass('hidden'); $input.addClass('error'); $input.attr('title', msg); $input.tooltip({placement: 'bottom', trigger: 'manual'}); diff --git a/core/js/tests/specs/sharedialoglinkshareview.js b/core/js/tests/specs/sharedialoglinkshareview.js index b7144d31942..811919b5603 100644 --- a/core/js/tests/specs/sharedialoglinkshareview.js +++ b/core/js/tests/specs/sharedialoglinkshareview.js @@ -121,7 +121,7 @@ describe('OC.Share.ShareDialogLinkShareView', function () { expect($workingIcon.hasClass('hidden')).toBeFalsy(); expect(shareModel.saveLinkShare.withArgs({ password: 'myPassword' }).calledOnce).toBeTruthy(); - shareModel.saveLinkShare.yieldTo("success", [shareModel]); + shareModel.saveLinkShare.yieldTo("complete", [shareModel]); expect($workingIcon.hasClass('hidden')).toBeTruthy(); }); @@ -132,6 +132,7 @@ describe('OC.Share.ShareDialogLinkShareView', function () { expect($workingIcon.hasClass('hidden')).toBeFalsy(); expect(shareModel.saveLinkShare.withArgs({ password: 'myPassword' }).calledOnce).toBeTruthy(); + shareModel.saveLinkShare.yieldTo("complete", [shareModel]); shareModel.saveLinkShare.yieldTo("error", [shareModel, "The error message"]); expect($workingIcon.hasClass('hidden')).toBeTruthy(); |