diff options
author | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2012-02-08 15:23:37 -0300 |
---|---|---|
committer | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2012-02-08 15:23:37 -0300 |
commit | 7d881ac027e054610c581b7ccb119cf6ebec453c (patch) | |
tree | fd7f99098a1e62e9d18f64b43155166b3c39fdc5 | |
parent | 1496bc48f3c4bc717fdb08addc94fcdacbd07936 (diff) | |
parent | 8cf0dca200b2a2c1706fab590f617d53c778581c (diff) | |
download | askbot-7d881ac027e054610c581b7ccb119cf6ebec453c.tar.gz askbot-7d881ac027e054610c581b7ccb119cf6ebec453c.tar.bz2 askbot-7d881ac027e054610c581b7ccb119cf6ebec453c.zip |
Merge branch 'master' of github.com:ASKBOT/askbot-devel
-rw-r--r-- | askbot/doc/source/changelog.rst | 2 | ||||
-rw-r--r-- | askbot/skins/common/media/jquery-openid/jquery.openid.js | 12 | ||||
-rw-r--r-- | askbot/skins/common/templates/authopenid/signin.html | 4 | ||||
-rw-r--r-- | askbot/views/writers.py | 10 |
4 files changed, 24 insertions, 4 deletions
diff --git a/askbot/doc/source/changelog.rst b/askbot/doc/source/changelog.rst index e2056b61..19ecfb2d 100644 --- a/askbot/doc/source/changelog.rst +++ b/askbot/doc/source/changelog.rst @@ -10,6 +10,8 @@ Development version (not released yet) * Fixed the url translation bug (Evgeny) * Added left sidebar option (Evgeny) * Added "help" page and links to in the header and the footer (Evgeny) +* Removed url parameters and the hash fragment from uploaded files - + amazon S3 for some reason adds weird expiration parameters 0.7.39 (Jan 11, 2012) --------------------- diff --git a/askbot/skins/common/media/jquery-openid/jquery.openid.js b/askbot/skins/common/media/jquery-openid/jquery.openid.js index 29b31b34..249413b9 100644 --- a/askbot/skins/common/media/jquery-openid/jquery.openid.js +++ b/askbot/skins/common/media/jquery-openid/jquery.openid.js @@ -193,7 +193,6 @@ $.fn.authenticator = function() { password_input_fields.hide(); } reset_password_input_fields(); - $('.error').remove(); if (userIsAuthenticated === false){ email_input_fields.hide(); account_recovery_heading.hide(); @@ -210,13 +209,18 @@ $.fn.authenticator = function() { } }; + var reset_form_and_errors = function(){ + reset_form(); + $('.error').remove(); + } + var set_provider_name = function(element){ var provider_name = element.attr('name'); provider_name_input.val(provider_name); }; var show_openid_input_fields = function(provider_name){ - reset_form(); + reset_form_and_errors(); var token_name = extra_token_name[provider_name] if (userIsAuthenticated){ $('#openid-heading').html( @@ -290,7 +294,7 @@ $.fn.authenticator = function() { var start_password_login_or_change = function(){ //called upon clicking on one of the password login buttons - reset_form(); + reset_form_and_errors(); set_provider_name($(this)); var provider_name = $(this).attr('name'); return setup_password_login_or_change(provider_name); @@ -370,7 +374,7 @@ $.fn.authenticator = function() { }; var start_account_recovery = function(){ - reset_form(); + reset_form_and_errors(); account_recovery_hint.hide(); account_recovery_heading.css('margin-bottom', '0px'); account_recovery_heading.html(account_recovery_prompt_text).show(); diff --git a/askbot/skins/common/templates/authopenid/signin.html b/askbot/skins/common/templates/authopenid/signin.html index 7fdbe203..30a576cc 100644 --- a/askbot/skins/common/templates/authopenid/signin.html +++ b/askbot/skins/common/templates/authopenid/signin.html @@ -117,6 +117,8 @@ <td><label for="id_new_password">{% trans %}New password{% endtrans %}</label></td>
<td>
{{login_form.new_password}}
+ </td>
+ <td>
<span class="error">{{login_form.new_password.errors[0]}}</span>
</td>
</tr>
@@ -124,6 +126,8 @@ <td><label for="id_new_password_retyped">{% trans %}Please, retype{% endtrans %}</label></td>
<td>
{{login_form.new_password_retyped}}
+ </td>
+ <td>
<span class="error">{{login_form.new_password_retyped.errors[0]}}</span>
</td>
</tr>
diff --git a/askbot/views/writers.py b/askbot/views/writers.py index 9de14517..855f2977 100644 --- a/askbot/views/writers.py +++ b/askbot/views/writers.py @@ -12,6 +12,7 @@ import random import sys import tempfile import time +import urlparse from django.core.files.storage import get_storage_class from django.shortcuts import get_object_or_404 from django.contrib.auth.decorators import login_required @@ -99,6 +100,15 @@ def upload(request):#ajax upload file to a question or answer if error == '': result = 'Good' file_url = file_storage.url(new_file_name) + parsed_url = urlparse.urlparse(file_url) + file_url = urlparse.urlunparse( + urlparse.ParseResult( + parsed_url.scheme, + parsed_url.netloc, + parsed_url.path, + '', '', '' + ) + ) else: result = '' file_url = '' |