Commits

ben...@pollen  committed f1dfa34

put focus on password field when you delete or lock a paste.

  • Participants
  • Parent commits 1f5516e

Comments (0)

Files changed (1)

File static/js/src/friendpaste.js

         // init minimal editor
         new Editor("#paste_snippet");
 
-        //if (!base2.detect('MSIE'))
-            new Review();
+        new Review();
 
         this.setSettings();
         
     deletePaste: function() {
         var self = this;
         var form = this.formPassword("delete", "Delete paste");
-            
+        
         var parent_ = base2.DOM.bind(this.adelete.parentNode);
         this.adelete.style.display = "none";
         parent_.appendChild(form);
+        parent_.querySelector('.password').focus();
         parent_.querySelector("input.ano").addEventListener('click', function(e) {
             e.preventDefault();
             this.removeEventListener('click', arguments.callee, false);
             
         var parent_ = base2.DOM.bind(this.alock.parentNode);
         parent_.appendChild(form);
+        parent_.querySelector('.password').focus();
         this.alock.style.display = "none";
         
         parent_.querySelector("input.ano").addEventListener('click', function(e) {
         cancel.value = "Cancel";
         cancel.className = "ano";
         form.appendChild(cancel);
-        
         return form;
     },