[Python-checkins] r82362 - tracker/instances/python-dev/html/issue.item.js

ezio.melotti python-checkins at python.org
Tue Jun 29 15:01:15 CEST 2010


Author: ezio.melotti
Date: Tue Jun 29 15:01:15 2010
New Revision: 82362

Log:
Don't try to add the button if the user is already in the nosy or it's not logged in. Also set the type of the input before the value -- this will hopefully fix the missing '+' on Opera.

Modified:
   tracker/instances/python-dev/html/issue.item.js

Modified: tracker/instances/python-dev/html/issue.item.js
==============================================================================
--- tracker/instances/python-dev/html/issue.item.js	(original)
+++ tracker/instances/python-dev/html/issue.item.js	Tue Jun 29 15:01:15 2010
@@ -4,10 +4,14 @@
     // This might eventually be replaced by jquery
     var node_id = 'add_me_to_nosy';
     var add_me_span = document.getElementById(node_id);
+    if (add_me_span == null) {
+        // we are already in the nosy or we are not logged in
+        return;
+    }
     var add_me_button = document.createElement('input');
     var add_me_parent = add_me_span.parentNode;
-    add_me_button.value = '+';
     add_me_button.type = 'button';
+    add_me_button.value = '+';
     add_me_button.title = 'Add me to the nosy list (remember to Submit Changes)';
     add_me_button.onclick = add_me_span.onclick;
     add_me_button.style.display = 'inline';


More information about the Python-checkins mailing list