Skip to content
Extraits de code Groupes Projets
Valider b49ca563 rédigé par Yohan Boniface's avatar Yohan Boniface
Parcourir les fichiers

Remove remaining Darline calls

parent cf2f5a48
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -23,38 +23,46 @@ ...@@ -23,38 +23,46 @@
{% block bottom_js %} {% block bottom_js %}
{{ block.super }} {{ block.super }}
<script type="text/javascript"> <script type="text/javascript">
D.Event.on('a.login', 'click', function (e) { var login = document.querySelector('a.login');
D.Event.stop(e); if (login) {
L.DomEvent.on(login, 'click', function (e) {
L.DomEvent.stop(e);
L.Storage.Xhr.login({ L.Storage.Xhr.login({
"login_required": this.getAttribute('href'), "login_required": this.getAttribute('href'),
"redirect": "/" "redirect": "/"
}); });
});
D.Event.on('a.logout', 'click', function (e) {
D.Event.stop(e);
L.Storage.Xhr.logout(this.getAttribute('href'));
});
D.Event.on('a.create-map', 'click', function (e) {
D.Event.stop(e);
L.Storage.Xhr.get(this.getAttribute('href'), {
listen_form: {id: "map_edit"}
}); });
}); }
var logout = document.querySelector('a.logout');
if (logout) {
L.DomEvent.on(logout, 'click', function (e) {
L.DomEvent.stop(e);
L.Storage.Xhr.logout(this.getAttribute('href'));
});
}
var getMore = function (e) { var getMore = function (e) {
D.Event.stop(e); L.DomEvent.stop(e);
D.Xhr.get(this.href, { L.S.Xhr._ajax({
callback: function (data) { uri: this.href,
var container = this.parentNode; verb: 'GET',
container.innerHTML = data; callback: function (data) {
D.DOM.forEach(D.DOM.get('script', container), function (item) { var container = this.parentNode;
eval(item.firstChild.textContent); container.innerHTML = data;
}); Array.prototype.forEach.call(container.querySelectorAll('script'), function (item) {
D.Event.on('.more_button', 'click', getMore); eval(item.firstChild.textContent);
}, });
thisobj: this var more = document.querySelector('.more_button');
}); if (more) {
L.DomEvent.on(more, 'click', getMore, more);
}
},
context: this
});
};
var more = document.querySelector('.more_button');
if (more) {
L.DomEvent.on(more, 'click', getMore, more);
} }
D.Event.on('.more_button', 'click', getMore);
</script> </script>
{% endblock bottom_js %} {% endblock bottom_js %}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter