From: Charles Connell Date: Fri, 24 Jan 2014 14:58:51 +0000 (-0500) Subject: Improved thank you message #304 X-Git-Tag: release-20150131~204 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=497aab5d45513b0d8d39b928a28a6f69d3d9a8b6;p=oweals%2Fkarmaworld.git Improved thank you message #304 --- diff --git a/karmaworld/templates/partial/filepicker.html b/karmaworld/templates/partial/filepicker.html index 61ca95f..6edf249 100644 --- a/karmaworld/templates/partial/filepicker.html +++ b/karmaworld/templates/partial/filepicker.html @@ -30,14 +30,21 @@ {% if not request.user.is_authenticated %} -

We'd love to have you sign up so you can claim the notes you just uploaded, and - build a reputation for uploading great notes.

+

It will take a minute for your notes to appear. + We'd love to have you sign up so you can claim the karma points + you just got. With a KarmaNotes account, + you can build a reputation by continuing to upload great notes. + Want to share again?

Sign up for a traditional account
+ {% else %} +

It will take a minute for your notes to appear. + You'll be awarded karma points. + Want to share again?

{% endif %} @@ -73,7 +80,7 @@
- Save + Save
@@ -97,7 +104,6 @@ _form.id = null; // clear the unique id // save the FP url to the form $(_form.children[0].children[3].children[0]).val(upFile.url); - console.log(upFile); // save the mimetype to the form $(_form.children[0].children[3].children[1]).val(upFile.mimetype); @@ -110,7 +116,6 @@ $('.remove').on('click', function(e){ e.stopPropagation(); - console.log($(this).parent().parent()); $(this).parent().parent().remove(); }); @@ -119,8 +124,14 @@ $('#save-btn').on('click', function(e){ e.stopPropagation(); + $(this).unbind('click'); + $(this).addClass('disabled'); + + var saveIcon = $('#save-btn-icon'); + saveIcon.removeClass('fa-save'); + saveIcon.addClass('fa-spinner fa-spin'); + $('#forms_container .inline-form').each(function(i,el){ - console.log("inline form " + i + "el: " + el); var name, tags, fpurl, course; name = $(el).find('.intext').val(); fp_file = $(el).find('.fpurl').val(); @@ -147,10 +158,12 @@ for (var i=0; i < uploaded_files.length; i++) { $('#uploaded_files').append($('
  • ', {text: uploaded_files[i]})); } + $('#thank-points').html(uploaded_files.length*5); $('#success').show(); $('#save-btn').hide(); $('#filepicker_row').hide(); $('#forms_container .inline-form').remove(); + $('#forms_container').hide(); if (document.location.host === 'www.karmanotes.org' || document.location.host === 'karmanotes.org') { _gat._getTracker()._trackEvent('upload', 'upload form submitted');