Redid width in login form

This commit is contained in:
Fergal Moran
2012-10-12 20:44:51 +01:00
parent f8712139b8
commit b4012ee07d
4 changed files with 115 additions and 97 deletions

View File

@@ -25,6 +25,3 @@ def default(request):
def upload(request):
return render_to_response("inc/upload.html", context_instance=RequestContext(request))

View File

@@ -574,4 +574,9 @@ div.event-content td {
}
#embed-insert{
padding: 15px 15px 15px 70px;
}
#social-login-buttons{
width: 340px;
height: 32px;
}

View File

@@ -6,221 +6,238 @@
Code provided under the BSD License:
*/
var AppRouter = Backbone.Router.extend({
routes: {
"mixes": "mixList",
"mixes/:type": "mixList",
"mix/upload": "mixUpload",
"mix/:id": "mixDetails",
"mix/edit/:id": "mixEdit",
"releases": "releaseList",
"release/add": "releaseAdd",
"release/edit/:id": "releaseEdit",
"release/:id": "releaseDetails",
"events": "eventList",
"event/add": "eventAdd",
"event/:id": "eventDetails",
"accounts/social/connections/": "connectAccounts",
"accounts/facebook/login": "loginRedirect",
"accounts/login/": "login",
"accounts/logout/": "logout",
"upload/": "defaultRoute",
"me": "userDetails",
"*path": "defaultRoute"
var AppRouter = Backbone.Router.extend({
routes:{
"mixes":"mixList",
"mixes/:type":"mixList",
"mix/upload":"mixUpload",
"mix/:id":"mixDetails",
"mix/edit/:id":"mixEdit",
"releases":"releaseList",
"release/add":"releaseAdd",
"release/edit/:id":"releaseEdit",
"release/:id":"releaseDetails",
"events":"eventList",
"event/add":"eventAdd",
"event/:id":"eventDetails",
"accounts/social/connections/":"connectAccounts",
"accounts/facebook/login":"loginRedirect",
"accounts/login/":"login",
"accounts/logout/":"logout",
"user/:id":"user",
"upload/":"defaultRoute",
"me":"userDetails",
"*path":"defaultRoute"
},
initialize: function() {
initialize:function () {
this.headerView = new HeaderView();
$('#header').html(this.headerView.el);
$('#site-content-fill').html('');
this.bind('all', this.trackPageView);
},
trackPageView: function() {
trackPageView:function () {
var url;
url = Backbone.history.getFragment();
return com.podnoms.utils.trackPageView(url);
},
defaultRoute: function(path) {
if(path == undefined || path == "" || path == "/") this.mixList('latest');
defaultRoute:function (path) {
if (path == undefined || path == "" || path == "/") this.mixList('latest');
},
mixList: function(type) {
user:function (user) {
var mixList = new MixCollection();
mixList.fetch({
data:{ "user":user },
success:function () {
var mixes = new MixListView({
collection:mixList
});
var content = mixes.el;
$('#content').html(content);
if (mixes.itemPlaying != null) {
com.podnoms.settings.setupPlayer(mixes.itemPlaying.toJSON(), mixes.itemPlaying.get('id'));
}
}
})
},
mixList:function (type) {
var mixList = new MixCollection();
mixList.type = type || 'latest';
$('#site-content-fill').html('');
this.sidebarView = new SidebarView();
$('#sidebar').html(this.sidebarView.el);
startChat(
$('#chat-messages-body', this.sidebarView.el),
$('#input', this.sidebarView.el),
$('#status', this.sidebarView.el),
$('#chat-messages-body', this.sidebarView.el),
$('#input', this.sidebarView.el),
$('#status', this.sidebarView.el),
$('#header-profile-edit').text());
var data = type != undefined ? $.param({
sort: type
sort:type
}) : null;
mixList.fetch({
data: data,
success: function() {
data:data,
success:function () {
var mixes = new MixListView({
collection: mixList
collection:mixList
});
var content = mixes.el;
$('#content').html(content);
if(mixes.itemPlaying != null) {
if (mixes.itemPlaying != null) {
com.podnoms.settings.setupPlayer(mixes.itemPlaying.toJSON(), mixes.itemPlaying.get('id'));
}
}
});
},
mixDetails: function(id) {
mixDetails:function (id) {
var mix = new Mix({
id: id
id:id
});
mix.fetch({
success: function() {
success:function () {
var html = new MixView({
model: mix
model:mix
});
$('#content').html(html.el);
$('#site-content-fill').html('');
if(com.podnoms.player.isPlayingId(mix.get('id'))) {
if (com.podnoms.player.isPlayingId(mix.get('id'))) {
com.podnoms.settings.setupPlayer(mix.toJSON(), mix.get('id'));
}
}
});
},
mixUpload: function() {
mixUpload:function () {
var html = new MixCreateView({
model: new Mix()
model:new Mix()
});
$('#content').html(html.el);
$('#site-content-fill').html('');
},
mixEdit: function(id) {
mixEdit:function (id) {
var mix = new Mix({
id: id
id:id
});
mix.fetch({
success: function() {
success:function () {
var html = new MixCreateView({
model: mix
model:mix
});
$('#content').html(html.el);
$('#site-content-fill').html('');
}
});
},
releaseList: function(page) {
releaseList:function (page) {
var releaseList = new ReleaseCollection();
releaseList.fetch({
success: function() {
success:function () {
var content = new ReleaseListView({
collection: releaseList
collection:releaseList
}).el;
$('#content').html(content);
}
});
},
releaseDetails: function(id) {
releaseDetails:function (id) {
var release = new Release({
id: id
id:id
});
$('#site-content-fill').html('');
release.fetch({
success: function() {
success:function () {
var content = new ReleaseView({
model: release
model:release
}).el;
$('#content').html(content);
}
});
},
releaseAdd: function() {
releaseAdd:function () {
var html = new ReleaseCreateView({
model: new Release({
release_date: com.podnoms.utils.getDateAsToday()
model:new Release({
release_date:com.podnoms.utils.getDateAsToday()
})
});
$('#content').html(html.el);
$('#site-content-fill').html('');
},
releaseEdit: function(id) {
releaseEdit:function (id) {
var release = new Release({
id: id
id:id
});
release.fetch({
success: function() {
success:function () {
var html = new ReleaseCreateView({
model: release
model:release
});
$('#content').html(html.el);
$('#site-content-fill').html('');
}
});
},
eventList: function(page) {
eventList:function (page) {
var eventList = new EventCollection();
eventList.fetch({
success: function() {
success:function () {
var content = new EventListView({
collection: eventList
collection:eventList
}).el;
$('#content').html(content);
}
});
},
eventDetails: function(id) {
eventDetails:function (id) {
var event = new Event({
id: id
id:id
});
$('#site-content-fill').html('');
event.fetch({
success: function() {
success:function () {
var content = new EventView({
model: event
model:event
}).el;
$('#content').html(content);
}
});
},
eventAdd: function() {
eventAdd:function () {
var html = new EventCreateView({
model: new Event({
event_date: com.podnoms.utils.getDateAsToday()
model:new Event({
event_date:com.podnoms.utils.getDateAsToday()
})
});
$('#content').html(html.el);
$('#site-content-fill').html('');
},
loginRedirect: function() {
loginRedirect:function () {
com.podnoms.utils.showAlert("Success", "Thank you for logging in.", "alert-success", true);
this.defaultRoute();
},
login: function() {
login:function () {
$.colorbox({
href: "/tpl/LoginView/",
onClosed: function() {
href:"/tpl/LoginView/",
onClosed:function () {
Backbone.history.navigate('/', {
trigger: true
trigger:true
});
}
})
},
logout: function() {
logout:function () {
com.podnoms.utils.showAlert("Success", "You are now logged out", "alert-success", true);
},
connectAccounts: function() {
connectAccounts:function () {
alert("Connecting accounts");
},
userDetails: function() {
userDetails:function () {
var user = new User();
$('#site-content-fill').html('');
user.fetch({
success: function() {
success:function () {
var content = new UserView({
model: user
model:user
}).el;
$('#content').html(content);
}
@@ -228,17 +245,17 @@
}
});
com.podnoms.utils.loadTemplate(['HeaderView', 'SidebarView', 'UserView', 'MixListView', 'MixListItemView', 'MixView', 'MixCreateView', 'CommentListView', 'CommentListItemView', 'ReleaseListView', 'ReleaseListItemView', 'ReleaseItemView', 'ReleaseView', 'ReleaseCreateView', 'ReleaseAudioListView', 'ReleaseAudioItemView', 'EventCreateView', 'EventListView', 'EventListItemView', 'EventView', 'EventItemView'], function() {
com.podnoms.utils.loadTemplate(['HeaderView', 'SidebarView', 'UserView', 'MixListView', 'MixListItemView', 'MixView', 'MixCreateView', 'CommentListView', 'CommentListItemView', 'ReleaseListView', 'ReleaseListItemView', 'ReleaseItemView', 'ReleaseView', 'ReleaseCreateView', 'ReleaseAudioListView', 'ReleaseAudioItemView', 'EventCreateView', 'EventListView', 'EventListItemView', 'EventView', 'EventItemView'], function () {
window.app = new AppRouter();
$(document).on('click', 'a:internal:not(.no-click)', function(event) {
$(document).on('click', 'a:internal:not(.no-click)', function (event) {
Backbone.history.navigate($(this).attr('href'), {
trigger: true
trigger:true
});
return false;
});
Backbone.history = Backbone.history || new Backbone.History({});
Backbone.history.start({
pushState: true
});
Backbone.history = Backbone.history || new Backbone.History({});
Backbone.history.start({
pushState:true
});
});
var _eventAggregator = _.extend({}, Backbone.Events);

View File

@@ -3,25 +3,24 @@
<div class="well">
<h2>Login to Deep South Sounds</h2>
<div>
<div>
<div id="social-login-buttons">
<ul class="social_login_providers">
<li>
<a class='o-click signin_button' href='{% provider_login_url "twitter" %}' id='twitter_button'>
<a class='o-click signin_button' href='{% provider_login_url "twitter" %}' id='twitter_button'>Twitter
</a>
</li>
<li>
<a class='no-click signin_button' id='facebook_button' href="{% provider_login_url "facebook" method="oauth2" %}">
<a class='no-click signin_button' id='facebook_button'
href="{% provider_login_url "facebook" method="oauth2" %}">Facebook
</a>
</li>
</ul>
</div>
<br />
<div>
<span>Please note that using your twitter/facebook account<br/>
to login does not give us access to your private information</span>
<div id="social-login-disclaimer">
Please note that using your twitter/facebook account<br/>
to login does not give us access to your private information
</div>
</div>
<br/>
</div>