Commit 0fde2a7a authored by Annie's avatar Annie

homeview w/ latestupadted modified -is_featured filter

parent 889b6492
......@@ -1427,19 +1427,19 @@ window.W = window.W || {};
var myPaginationView = new Backgrid.Extension.Paginator({
controls : {
rewind: {
label: "",
label: "",
title: "First"
},
},
back: {
label: "",
label: "",
title: "Previous"
},
},
forward: {
label: "",
label: "",
title: "Next"
},
},
fastForward: {
label: "",
label: "",
title: "Last"
}
},
......@@ -1511,18 +1511,18 @@ window.W = window.W || {};
var form = this.$el.find("form");
var data = form.serialize();
$.ajax({
type: "POST",
url: form.attr('action'),
data: form.serialize(),
success: function(data, textStatus, jqXHR) {
$.ajax({
type: "POST",
url: form.attr('action'),
data: form.serialize(),
success: function(data, textStatus, jqXHR) {
model.fetch();
that.trigger('hide:modal');
},
},
error: function(xhr, ajaxOptions, thrownError){
alert('login failed - please try again');
},
});
alert('login failed - please try again');
},
});
}
});
......@@ -1547,20 +1547,20 @@ window.W = window.W || {};
var model = this.model;
var form = this.$el.find("form");
$.ajax({
type: "POST",
url: form.attr('action'),
success: function(data, textStatus, jqXHR){
$.ajax({
type: "POST",
url: form.attr('action'),
success: function(data, textStatus, jqXHR){
that.trigger('hide:modal');
alert("ok");
model.set(model.defaults);
},
},
error: function(xhr, ajaxOptions, thrownError){
alert('logout failed - please try again');
alert('logout failed - please try again');
// that.trigger('hide:modal');
// model.clear();
},
});
},
});
}
});
......@@ -1603,15 +1603,18 @@ window.W = window.W || {};
document.title = 'Notation W';
var scoreCollection = new W.ScoreCollection([], {
url: '/test',
state: {
pageSize: 10,
firstPage: 1,
currentPage: 1,
// pageSize: 10,
// firstPage: 1,
// currentPage: 1,
sortKey: "updated_at",
order: 1
order: 1,
}
});
scoreCollection.queryParams.is_featured=true;
var myListView = new Backgrid.Grid({
columns: columns,
collection: scoreCollection
......
......@@ -127,7 +127,7 @@
<script src="{% static 'playground/vendors/jquery-ui.min.js' %}"></script>
<script src="{% static 'playground/vendors/jquery.mjs.nestedSortable.js' %}"></script>
{% compress js %}
<script src="{% static 'playground/js/models.js' %}"></script>
<script src="{% static 'playground/js/collections.js' %}"></script>
<script src="{% static 'playground/js/views.js' %}"></script>
......@@ -135,7 +135,7 @@
<script src="{% static 'playground/js/routers.js' %}"></script>
<script src="{% static 'playground/js/apps.js' %}"></script>
<script src="{% static 'playground/js/main.js' %}"></script>
{% endcompress %}
</body>
</html>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment