From b4012ee07db5a01e6b1a49d85e997e9eaa6bf455 Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Fri, 12 Oct 2012 20:44:51 +0100 Subject: [PATCH] Redid width in login form --- spa/views.py | 3 - static/css/deepsouthsounds.css | 5 + static/js/app/app.js | 189 ++++++++++++++++++--------------- templates/views/LoginView.html | 15 ++- 4 files changed, 115 insertions(+), 97 deletions(-) diff --git a/spa/views.py b/spa/views.py index fbeae10..646e821 100644 --- a/spa/views.py +++ b/spa/views.py @@ -25,6 +25,3 @@ def default(request): def upload(request): return render_to_response("inc/upload.html", context_instance=RequestContext(request)) - - - diff --git a/static/css/deepsouthsounds.css b/static/css/deepsouthsounds.css index 4005a5c..5d953c9 100644 --- a/static/css/deepsouthsounds.css +++ b/static/css/deepsouthsounds.css @@ -574,4 +574,9 @@ div.event-content td { } #embed-insert{ padding: 15px 15px 15px 70px; +} + +#social-login-buttons{ + width: 340px; + height: 32px; } \ No newline at end of file diff --git a/static/js/app/app.js b/static/js/app/app.js index 55613b0..d0ae520 100644 --- a/static/js/app/app.js +++ b/static/js/app/app.js @@ -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); \ No newline at end of file diff --git a/templates/views/LoginView.html b/templates/views/LoginView.html index ea2f7c8..36967e8 100644 --- a/templates/views/LoginView.html +++ b/templates/views/LoginView.html @@ -3,25 +3,24 @@

Login to Deep South Sounds

-
-
+
-
- Please note that using your twitter/facebook account
- to login does not give us access to your private information
+
+ Please note that using your twitter/facebook account
+ to login does not give us access to your private information
-
\ No newline at end of file