set OPT values in jscript in files.html, added functions to draw figures on a page based on pageList (subset of entryList) & json data, and tweaked just grouping select as well to also use the draw figures func() in jscript. Needed to move out .figure click handler into the draw figures too. This is now semi-functional, images load, pages next/prev works, grouping works -- BUT only for files_ip -- folders wont work, search wont work, files_sp wont work, viewing a file wont work
This commit is contained in:
@@ -17,15 +17,24 @@
|
||||
{% endfor %}
|
||||
|
||||
// GLOBALS
|
||||
// how many on this page, we can change this and redraw the page to suit (also used heavily in pagination code related to entry and page list)
|
||||
var howMany = {{OPT.how_many}}
|
||||
// OPTions set via GUI, will change if we alter drop-downs, etc. in GUI
|
||||
// TODO: reference these from GUI, so we can finally ditch the form to submit/change them.
|
||||
// BUT -- must handle noo changing with a form/post as it requires a new ordering
|
||||
|
||||
var OPT={}
|
||||
OPT.grouping='{{OPT.grouping}}'
|
||||
OPT.cwd='{{OPT.cwd}}'
|
||||
OPT.search_term='{{OPT.orig_search_term}}'
|
||||
OPT.folders="{{OPT.folders}}" === "True"
|
||||
OPT.howMany={{OPT.how_many}}
|
||||
OPT.size={{OPT.size}}
|
||||
|
||||
// this is the list of entry ids for the images for ALL matches for this query
|
||||
var entryList={{query_data.entry_list}}
|
||||
|
||||
// pageList is just those entries shown on this page from the full entryList
|
||||
var pageList=[]
|
||||
// force pageList to the first page
|
||||
// force pageList to set pageList for & render the first page
|
||||
getPage(1)
|
||||
</script>
|
||||
|
||||
@@ -61,7 +70,7 @@
|
||||
{% else %}
|
||||
{{CreateFoldersSelect( OPT.folders )|safe }}
|
||||
<span class="sm-txt my-auto btn btn-outline-info disabled border-top border-bottom">grouped by:</span>
|
||||
{{CreateSelect( "grouping", OPT.grouping, ["None", "Day", "Week", "Month"], "", "rounded-end")|safe }}
|
||||
{{CreateSelect( "grouping", OPT.grouping, ["None", "Day", "Week", "Month"], "OPT.grouping=$('#grouping').val();drawPageOfFigures();return false", "rounded-end")|safe }}
|
||||
{% endif %}
|
||||
</div class="input-group">
|
||||
</div class="col">
|
||||
@@ -287,7 +296,6 @@
|
||||
|
||||
<script>
|
||||
|
||||
$('.figure').click( function(e) { DoSel(e, this ); SetButtonState(); return false; });
|
||||
$(document).on('click', function(e) { $('.highlight').removeClass('highlight') ; SetButtonState() });
|
||||
|
||||
function CallViewRouteWrapper()
|
||||
|
||||
Reference in New Issue
Block a user