[bug 893031] Fixing Login on events page
This commit is contained in:
Родитель
f7e8afd181
Коммит
681dc113d5
|
@ -130,30 +130,27 @@ function ($, EventModel, forms) { return function (mapMaker) {
|
|||
ev.preventDefault();
|
||||
toggleCreateForm();
|
||||
});
|
||||
navigator.idSSO.watch( {
|
||||
onlogin: function( assert ){
|
||||
var $button = $('.loggedout-expand-form-button')
|
||||
.removeClass('loggedout-expand-form-button')
|
||||
.addClass('expand-form-button')
|
||||
.click(function(ev) {
|
||||
ev.preventDefault();
|
||||
toggleCreateForm();
|
||||
});
|
||||
$('.event-button-text', $button).text('Add an Event');
|
||||
if( document.referrer.indexOf( 'login' ) !== -1 ){
|
||||
toggleCreateForm();
|
||||
$( '#event_title' ).focus();
|
||||
}
|
||||
},
|
||||
onlogout: function(){
|
||||
var $button = $('.expand-form-button')
|
||||
.addClass('loggedout-expand-form-button')
|
||||
.removeClass('expand-form-button')
|
||||
.unbind('click');
|
||||
$('.event-button-text', $button).text('Log in to add an Event');
|
||||
navigator.idSSO.app.onlogin = function( assert ){
|
||||
var $button = $('.loggedout-expand-form-button')
|
||||
.removeClass('loggedout-expand-form-button')
|
||||
.addClass('expand-form-button')
|
||||
.click(function(ev) {
|
||||
ev.preventDefault();
|
||||
toggleCreateForm();
|
||||
});
|
||||
$('.event-button-text', $button).text('Add an Event');
|
||||
if( document.referrer.indexOf( 'login' ) !== -1 ){
|
||||
toggleCreateForm();
|
||||
$( '#event_title' ).focus();
|
||||
}
|
||||
} );
|
||||
|
||||
};
|
||||
navigator.idSSO.app.onlogout = function(){
|
||||
var $button = $('.expand-form-button')
|
||||
.addClass('loggedout-expand-form-button')
|
||||
.removeClass('expand-form-button')
|
||||
.unbind('click');
|
||||
$('.event-button-text', $button).text('Log in to add an Event');
|
||||
};
|
||||
|
||||
EventModel.all(function (events) { mapMaker.dropPins(events) });
|
||||
}});
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{% extends "layout.html" %}
|
||||
{% include 'macros.html' %}
|
||||
|
||||
{% block title %}{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ super() }}
|
||||
<link rel="stylesheet" href="/ext/css/jquery-ui.custom/jquery-ui-1.10.3.custom.css" />
|
||||
|
@ -11,44 +9,7 @@
|
|||
<link rel="stylesheet" href="/css/events.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block midbar %}
|
||||
{% endblock %}
|
||||
|
||||
{% block CTA %}
|
||||
[
|
||||
{
|
||||
title: "Event Guides",
|
||||
url: "/guides",
|
||||
image: "http://lorempixel.com/75/75/",
|
||||
desc: "Step-by-step guides for event planning."
|
||||
},
|
||||
{
|
||||
title: "Maker Party",
|
||||
url: "/party",
|
||||
image: "http://lorempixel.com/75/75/",
|
||||
desc: "From now to September 15, join other webmakers in a global Maker Party."
|
||||
},
|
||||
{
|
||||
title: "Teach",
|
||||
url: "/teach",
|
||||
image: "http://lorempixel.com/75/75/",
|
||||
desc: "Resources for teaching digital literacy and webmaking."
|
||||
},
|
||||
{
|
||||
title: "Get Involved",
|
||||
url: "/getinvolved",
|
||||
image: "http://lorempixel.com/75/75/",
|
||||
desc: "Need help? Access support and connect with the Webmaker community."
|
||||
},
|
||||
]
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
|
||||
{% block require_main %}/js/events/index{% endblock %}
|
||||
{% block scripts %}
|
||||
{% endblock %}
|
||||
|
||||
{% set j=0 %}
|
||||
{% macro tabIndex() %}tabIndex="{{ ++j }}"{% endmacro %}
|
||||
|
|
Загрузка…
Ссылка в новой задаче