Commit graph

871 commits

Author SHA1 Message Date
Bradley M. Kuhn
1d1e0a1ed9 Add Wolfram Sang's statement of support. 2015-03-09 16:31:34 -07:00
Bradley M. Kuhn
bcf89f1953 Make use of new animations on supporter page. 2015-03-09 08:50:47 -07:00
Bradley M. Kuhn
efe90bd2d0 Better animation effects when donate link clicked.
The banner always faded in/out, but now other texts can be designated
with the class 'donate-box-highlight' and those will fade out and fade
back in with bold and slightly larger font.
2015-03-09 08:46:16 -07:00
Bradley M. Kuhn
b571c7fdeb Grammar fix. 2015-03-09 08:44:35 -07:00
Bradley M. Kuhn
6e3b2a22be Animate the progress bar at page load.
This is perhaps too flashy, but it does successfully animate the
progress bar up to the target amount, and also changes the amount until
it reaches the total raised so far.
2015-03-09 00:28:05 -07:00
Bradley M. Kuhn
2678369b5a text-align should inherit when in progressbar. 2015-03-08 23:51:32 -07:00
Bradley M. Kuhn
3be224c69a Diff CSS for fundraiser-percentage w/ progressbar.
If Javascript is present to generate the pogressbar, then the CSS really
should be radically different.

Graceful degradation.
2015-03-08 23:48:57 -07:00
Bradley M. Kuhn
a1fa72ac8d vertical-align was not actually doing anything. 2015-03-08 23:43:02 -07:00
Bradley M. Kuhn
ab2239009a Rework again to see if I can get this corrected. 2015-03-08 23:40:47 -07:00
Bradley M. Kuhn
f64ff43450 Rework to simply call with new kwargs.
Redo call so that I just get my own at call time.
2015-03-08 23:36:38 -07:00
Bradley M. Kuhn
f8f37dd39c Must move import as well. 2015-03-08 23:31:44 -07:00
Bradley M. Kuhn
b3f019265b Rework fundgoal lookup urls data.
The urls.py is of course only evaluated once: at Apache load time, which
means the data in the template became stale and is not dynamic.

This change should cause the lookup to happen at each page view.
2015-03-08 23:28:42 -07:00
Bradley M. Kuhn
60d016134f Use caching to, ironically, prevent caching.
Now that I'm updating the database out of band with information about
the fundraiser, I've found that the page does not properly update.

This change will hopefully fix the issue.
2015-03-08 23:19:07 -07:00
Bradley M. Kuhn
db4a82f432 Correct goal amount for admin display. 2015-03-08 23:00:32 -07:00
Bradley M. Kuhn
902999b657 Update to match when we are right now. 2015-03-08 22:34:38 -07:00
Bradley M. Kuhn
a8bd5a2129 Leave text w/ percentage when no progressbar
The progressbar is generated by Javascript.  As such, the text here
won't have a progressbar formatted around it when the browser doesn't
support Javascript.

However, since the Javascript does update the text, we can format the
Django template to put in place text that we wish will appear when no
Javascript is turned on, and then allow the Javascript to make it right
when it's available.

Graceful degradation: I may be its last proponent.
2015-03-08 22:08:14 -07:00
Bradley M. Kuhn
b88b6bd211 Forgot to load humanize, needed for formatting. 2015-03-08 22:04:24 -07:00
Bradley M. Kuhn
51ebbc9cb8 Convert VMware fundraiser to new dynamic content.
Use the new dynamic content fundgoal stuff for VMware fundraiser.
2015-03-08 21:54:34 -07:00
Bradley M. Kuhn
732bf3b4c8 Not so high. 2015-03-08 21:51:37 -07:00
Bradley M. Kuhn
e631dd41ef Top and bottom margin might help. 2015-03-08 21:51:06 -07:00
Bradley M. Kuhn
d17dcf145e Go back to float right. 2015-03-08 21:50:19 -07:00
Bradley M. Kuhn
cd6ba9e352 Go back to this version, it seems better. 2015-03-08 21:49:26 -07:00
Bradley M. Kuhn
e664a104a7 See if this places the percentage better. 2015-03-08 21:48:29 -07:00
Bradley M. Kuhn
df9976598c Better formatting on fundraising-percentage. 2015-03-08 21:46:48 -07:00
Bradley M. Kuhn
ad787ca5a9 fundraising percentage goes with progressbar. 2015-03-08 21:43:49 -07:00
Bradley M. Kuhn
54118f965d fundraiser-percentage should be in bold. 2015-03-08 21:42:53 -07:00
Bradley M. Kuhn
51ab3f365c Possibly need a span# here. 2015-03-08 21:41:53 -07:00
Bradley M. Kuhn
157c438899 CSS for the fundraising percentage text. 2015-03-08 21:38:38 -07:00
Bradley M. Kuhn
c438b40621 Add heading. 2015-03-08 21:35:16 -07:00
Bradley M. Kuhn
1327b684d6 Use supporter-page.js & its formatting conventions
The npoacct campaign was launched before the Supporter program, and
parts of its functionality were incorporated into supporter-page.js
ultimately.  This commit hopefully now backports that functionality to
npoacct campaign.
2015-03-08 21:31:42 -07:00
Bradley M. Kuhn
8888a12699 Import decimal needed. 2015-03-08 21:28:44 -07:00
Bradley M. Kuhn
65142c984a Convert 100.00 to Decimal for operation. 2015-03-08 21:27:13 -07:00
Bradley M. Kuhn
637dd98a68 self. was needed here. 2015-03-08 21:24:09 -07:00
Bradley M. Kuhn
027964192a Function to compute how far to the goal we are.
This is also inserted by the Javascript code as well, but no reason we
can't compute it server side, too.
2015-03-08 21:21:58 -07:00
Bradley M. Kuhn
eb18c15f66 I didn't realize extend is first 2015-03-08 21:17:06 -07:00
Bradley M. Kuhn
4a5af8324a Use humanize to format dollar amounts 2015-03-08 21:12:36 -07:00
Bradley M. Kuhn
3442c1bd1d Variables don't go in {% in Django templates. 2015-03-08 21:03:36 -07:00
Bradley M. Kuhn
e0cb1621b1 Convert npoacct fundraiser to use dynamic content
If this new model works, we should be able to update the fundraiser
amounts in the Django database instead of the HTML.
2015-03-08 20:57:22 -07:00
Bradley M. Kuhn
3b0e6778e1 Correct get call to use arg properly.
This was just a typo in from previous commit, more or less.
2015-03-08 20:50:42 -07:00
Bradley M. Kuhn
09654a5eac Fundraising goal lookup for template: 1st attempt
This seems to be the best approach to pass a fundraising goal record to
a template.  While the static hack that tmarble implemented probably
needs work anyway, this is probably the best way currently to interface
certain general data that we seek to place on many different pages
through the templates.

I looked into a templatetags solution, but this seemed more
straightforward and more fitting with Django principles (I think :).
2015-03-08 20:46:37 -07:00
Bradley M. Kuhn
0d2908ef30 Add empty __init__.py for fundgoal. 2015-03-08 18:18:46 -07:00
Bradley M. Kuhn
71834b60ec Fix another typo in import correction. 2015-03-08 18:16:33 -07:00
Bradley M. Kuhn
a5cd6ab63b Make defaults for BooleanFields.
According to django-admin check,

   (1_6.W002) BooleanField does not have a default value.
    HINT: Django 1.6 changed the default value of BooleanField from False to None. See https://docs.djangoproject.com/en/1.6/ref/models/fields/#booleanfield for more information.
2015-03-08 18:00:50 -07:00
Bradley M. Kuhn
bef4637016 Fix typos in module path names from last commit. 2015-03-08 17:56:56 -07:00
Bradley M. Kuhn
f6bbcc7ee3 Just quit it with this relative import stuff.
While I think these relative imports seem to be valid for the running
application, I am having trouble with the django-admin applications
regarding them.  I don't see this syntactic sugar as absolutely
essential, so I'm just going to change it now.
2015-03-08 17:54:05 -07:00
Bradley M. Kuhn
d73018440a Initial hack at a fundraising goal application.
This simple application will simply store the code name and the to goal
of each fundraiser.  The so_far number will likely just be updated by
some external script, modifying the appropriate entry in the SQL
database.
2015-03-08 17:40:24 -07:00
Bradley M. Kuhn
663a7b9491 Additional donations. 2015-03-08 17:30:21 -07:00
Bradley M. Kuhn
b412f8c619 According to kfogel, any id= works, even in ul 2015-03-08 13:12:21 -07:00
Bradley M. Kuhn
a26af07ea5 Tie sentence in better. 2015-03-08 11:57:15 -07:00
Bradley M. Kuhn
7212a3fef8 Better grammar. 2015-03-08 11:50:39 -07:00