Fixing up OPML exporter for anonymous users (just use the default account), and fixing the add dialog's focus on the add url, just in case it's slow to load.

This commit is contained in:
Samuel Clay 2011-03-12 18:13:24 -05:00
parent 48f2ed5860
commit 3ee5d43c56
2 changed files with 6 additions and 4 deletions

View file

@ -14,7 +14,7 @@ from apps.reader.forms import SignupForm
from apps.reader.models import UserSubscription
from apps.feed_import.models import OAuthToken, OPMLImporter, OPMLExporter, GoogleReaderImporter
from utils import json_functions as json
from utils.user_functions import ajax_login_required
from utils.user_functions import ajax_login_required, get_user
@ajax_login_required
@ -44,9 +44,9 @@ def opml_upload(request):
data = json.encode(dict(message=message, code=code, payload=payload))
return HttpResponse(data, mimetype='text/plain')
@ajax_login_required
def opml_export(request):
exporter = OPMLExporter(request.user)
user = get_user(request)
exporter = OPMLExporter(user)
opml = exporter.process()
now = datetime.datetime.now()

View file

@ -144,7 +144,9 @@ NEWSBLUR.ReaderAddFeed.prototype = {
'onOpen': function (dialog) {
dialog.overlay.fadeIn(200, function () {
dialog.container.fadeIn(200);
dialog.data.fadeIn(200);
dialog.data.fadeIn(200, function() {
self.focus_add_feed();
});
});
},
'onShow': function(dialog) {