Refresh after note upload for authenticated users #304
authorCharles Connell <charles@connells.org>
Sun, 26 Jan 2014 21:23:42 +0000 (16:23 -0500)
committerCharles Connell <charles@connells.org>
Sun, 26 Jan 2014 21:23:50 +0000 (16:23 -0500)
karmaworld/templates/partial/filepicker.html

index 6edf2494ed0c633373d632e7920fa6c9161eede8..cc91315201ac2526b5518c44c3448f5e38090fb9 100644 (file)
@@ -30,7 +30,7 @@
         <ul id="uploaded_files">
         </ul>
         {% if not request.user.is_authenticated %}
-          <p>It will take a minute for your notes to appear.
+          <p>It will take a minute for your notes to appear here.
             We'd love to have you sign up so you can <strong>claim the <span id="thank-points"></span> karma points
             you just got.</strong> With a KarmaNotes account,
             you can build a reputation by continuing to upload great notes.
@@ -42,7 +42,8 @@
             <a href="{{ signup_url }}">Sign up for a traditional account</a>
           </div>
         {% else %}
-          <p>It will take a minute for your notes to appear.
+          <p>It will take a minute for your notes to appear. This page will refresh soon so you
+            can see your new notes.
             You'll be awarded <strong><span id="thank-points"></span> karma points.</strong>
             <a href="">Want to share again?</a></p>
         {% endif %}
                   document.location.host === 'karmanotes.org') {
                   _gat._getTracker()._trackEvent('upload', 'upload form submitted');
                 }
+                {% if user.is_authenticated %}
+                  setTimeout(function(){
+                    location.reload(true);
+                  }, 20000);
+                {% endif %}
               }
             });
             // Add the name we've just uploaded to the list