|
93 | 93 | ' </span></li>' + |
94 | 94 | ' <li class="{{#unless isPasswordSet}}hidden{{/unless}} linkPassMenu"><span class="shareOption menuitem icon-share-pass">' + |
95 | 95 | ' <input id="linkPassText-{{cid}}" class="linkPassText" type="password" placeholder="{{passwordPlaceholder}}" autocomplete="new-password" />' + |
| 96 | + ' <input type="submit" class="icon-confirm share-pass-submit" value="" />' + |
96 | 97 | ' <span class="icon icon-loading-small hidden"></span>' + |
97 | 98 | ' </span></li>' + |
98 | 99 | '{{/if}}' + |
|
189 | 190 | // open menu |
190 | 191 | 'click .share-menu .icon-more': 'onToggleMenu', |
191 | 192 | // password |
192 | | - 'focusout input.linkPassText': 'onPasswordEntered', |
193 | | - 'keyup input.linkPassText': 'onPasswordKeyUp', |
| 193 | + 'click input.share-pass-submit': 'onPasswordEntered', |
| 194 | + 'keyup input.linkPassText': 'onPasswordKeyUp', // check for the enter key |
194 | 195 | 'change .showPasswordCheckbox': 'onShowPasswordClick', |
195 | 196 | 'change .publicEditingCheckbox': 'onAllowPublicEditingChange', |
196 | 197 | // copy link url |
|
374 | 375 | }, |
375 | 376 | error: function(model, msg) { |
376 | 377 | // destroy old tooltips |
377 | | - $input.tooltip('destroy'); |
| 378 | + var $container = $input.parent(); |
| 379 | + $container.tooltip('destroy'); |
378 | 380 | $input.addClass('error'); |
379 | | - $input.attr('title', msg); |
380 | | - $input.tooltip({placement: 'bottom', trigger: 'manual'}); |
381 | | - $input.tooltip('show'); |
| 381 | + $container.attr('title', msg); |
| 382 | + $container.tooltip({placement: 'bottom', trigger: 'manual'}); |
| 383 | + $container.tooltip('show'); |
382 | 384 | } |
383 | 385 | }); |
384 | 386 | }, |
|
0 commit comments