Reverse test condition to avoid redirects with change details
This commit is contained in:
parent
d4255be077
commit
45e97ea278
1 changed files with 7 additions and 3 deletions
|
@ -202,12 +202,16 @@
|
||||||
function setPreferredSnapshotView(view){
|
function setPreferredSnapshotView(view){
|
||||||
urlPath = window.location.pathname;
|
urlPath = window.location.pathname;
|
||||||
|
|
||||||
if((view==="Grid") && urlPath != "{% url 'admin:grid' %}"){
|
if((view==="Grid") && urlPath == "{% url 'admin:core_snapshot_changelist' %}"){
|
||||||
selectSnapshotGridView();
|
selectSnapshotGridView();
|
||||||
}
|
}
|
||||||
else if((view==="List") && urlPath != "{% url 'admin:core_snapshot_changelist' %}"){
|
|
||||||
|
{% comment %}
|
||||||
|
else if((view==="List") && urlPath == "{% url 'admin:grid' %}"){
|
||||||
selectSnapshotListView();
|
selectSnapshotListView();
|
||||||
}
|
|
||||||
|
}
|
||||||
|
{% endcomment %}
|
||||||
};
|
};
|
||||||
|
|
||||||
function setupSnapshotViews() {
|
function setupSnapshotViews() {
|
||||||
|
|
Loading…
Reference in a new issue