Commit d4a99ea7 authored by Sergio Adrian Gongora Euan's avatar Sergio Adrian Gongora Euan
parents 74a8bae7 fde6c900
# Generated by Django 2.1.5 on 2019-02-27 19:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('catalog', '0012_search_process'),
]
operations = [
migrations.AddField(
model_name='purchase',
name='progress',
field=models.IntegerField(default=0),
),
migrations.AddField(
model_name='search',
name='search_name',
field=models.TextField(null=True),
),
]
# Generated by Django 2.1.5 on 2019-02-27 19:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('catalog', '0013_auto_20190227_1926'),
]
operations = [
migrations.AlterField(
model_name='search',
name='search_name',
field=models.TextField(default='Drawn polygon'),
),
]
# Generated by Django 2.1.5 on 2019-02-27 21:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('catalog', '0014_auto_20190227_1943'),
]
operations = [
migrations.AlterField(
model_name='search',
name='search_name',
field=models.TextField(default='Drawn polygon '),
),
]
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<meta charset="utf-8">
<title>Date Range Picker for Bootstrap</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script src="moment.min.js"></script>
<script src="daterangepicker.js"></script>
<link rel="stylesheet" type="text/css" href="daterangepicker.css" />
<link rel="stylesheet" type="text/css" href="daterangepicker.css"/>
<script src="website.js"></script>
<link rel="stylesheet" type="text/css" href="website.css" />
<link rel="stylesheet" type="text/css" href="website.css"/>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
......@@ -21,11 +22,11 @@
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<meta name="google-site-verification" content="1fP-Eo9i1ozV4MUlqZv2vsLv1r7tvYutUb6i38v0_vg" />
</head>
<body>
<meta name="google-site-verification" content="1fP-Eo9i1ozV4MUlqZv2vsLv1r7tvYutUb6i38v0_vg"/>
</head>
<body>
<nav class="navbar navbar-inverse navbar-static-top">
<nav class="navbar navbar-inverse navbar-static-top">
<div class="container">
<ul class="nav navbar-nav">
<li>
......@@ -68,9 +69,9 @@
</li>
</ul>
</div>
</nav>
</nav>
<div id="jumbo">
<div id="jumbo">
<div class="container">
<div class="row">
<div class="col-md-6">
......@@ -78,33 +79,38 @@
<h1 style="margin: 0 0 20px 0">Date Range Picker</h1>
<p style="font-size: 18px; margin-bottom: 0">
A JavaScript component for choosing date ranges.
<br />
<br/>
Designed to work with the Bootstrap CSS framework.
</p>
</div>
<div class="col-md-6" style="text-align: right; padding-right: 0">
<a href="https://github.com/dangrossman/bootstrap-daterangepicker" class="btn btn-lg btn-default">View on GitHub</a>
<a href="https://github.com/dangrossman/bootstrap-daterangepicker" class="btn btn-lg btn-default">View
on GitHub</a>
&nbsp;
<a href="https://github.com/dangrossman/bootstrap-daterangepicker/archive/master.zip" class="btn btn-lg btn-success">Download ZIP</a>
<a href="https://github.com/dangrossman/bootstrap-daterangepicker/archive/master.zip"
class="btn btn-lg btn-success">Download ZIP</a>
<br /><br />
<br/><br/>
<iframe src="https://ghbtns.com/github-btn.html?user=dangrossman&repo=bootstrap-daterangepicker&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=dangrossman&repo=bootstrap-daterangepicker&type=star&count=true&size=large"
frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=dangrossman&repo=bootstrap-daterangepicker&type=watch&count=true&size=large&v=2" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=dangrossman&repo=bootstrap-daterangepicker&type=watch&count=true&size=large&v=2"
frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=dangrossman&repo=bootstrap-daterangepicker&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=dangrossman&repo=bootstrap-daterangepicker&type=fork&count=true&size=large"
frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
</div>
</div>
</div>
</div>
</div>
<div class="container main">
<div class="container main">
<div class="row">
<div id="nav-spy">
......@@ -151,7 +157,8 @@
for selecting dates, times, or from predefined ranges like "Last 30 Days".
</p>
<a style="display: block; height: 300px; background: url('drp.png') top right no-repeat; background-size: cover; border: 1px solid #ccc; margin-bottom: 20px" href="https://awio.iljmp.com/5/drpdemo" title="Click for a Live Demo"></a>
<a style="display: block; height: 300px; background: url('drp.png') top right no-repeat; background-size: cover; border: 1px solid #ccc; margin-bottom: 20px"
href="https://awio.iljmp.com/5/drpdemo" title="Click for a Live Demo"></a>
</div>
......@@ -160,7 +167,8 @@
<h2>Usage</h2>
<p>
Date Range Picker relies on <a href="http://getbootstrap.com/">Bootstrap</a>, <a href="http://www.jquery.com/">jQuery</a> and <a href="http://momentjs.com/">Moment.js</a>.
Date Range Picker relies on <a href="http://getbootstrap.com/">Bootstrap</a>, <a
href="http://www.jquery.com/">jQuery</a> and <a href="http://momentjs.com/">Moment.js</a>.
Include the required scripts and stylesheet in your page:
</p>
......@@ -171,7 +179,7 @@
<script src="https://gist.github.com/dangrossman/c4cc05fff6fe86cdca05.js"></script>
<hr />
<hr/>
<p>
You can customize Date Range Picker with <a href="#options">options</a>, and
......@@ -201,12 +209,12 @@
</div>
<div class="col-md-4 col-xs-12">
<h4>Demo:</h4>
<input class="pull-right" type="text" name="daterange" value="01/15/2017 - 02/15/2017" />
<input class="pull-right" type="text" name="daterange" value="01/15/2017 - 02/15/2017"/>
</div>
</div>
<script type="text/javascript">
$(function() {
$(function () {
$('input[name="daterange"]').daterangepicker();
});
</script>
......@@ -229,12 +237,13 @@
</div>
<div class="col-md-5 col-xs-12">
<h4>Demo:</h4>
<input class="pull-right" type="text" name="daterange2" value="01/01/2017 1:30 PM - 01/01/2017 2:00 PM" />
<input class="pull-right" type="text" name="daterange2"
value="01/01/2017 1:30 PM - 01/01/2017 2:00 PM"/>
</div>
</div>
<script type="text/javascript">
$(function() {
$(function () {
$('input[name="daterange2"]').daterangepicker({
timePicker: true,
timePickerIncrement: 30,
......@@ -263,17 +272,17 @@
</div>
<div class="col-md-3 col-xs-12">
<h4>Demo:</h4>
<input class="pull-right" type="text" name="birthdate" value="10/24/1984" />
<input class="pull-right" type="text" name="birthdate" value="10/24/1984"/>
</div>
</div>
<script type="text/javascript">
$(function() {
$(function () {
$('input[name="birthdate"]').daterangepicker({
singleDatePicker: true,
showDropdowns: true
},
function(start, end, label) {
function (start, end, label) {
var years = moment().diff(start, 'years');
alert("You are " + years + " years old.");
});
......@@ -297,7 +306,8 @@
</div>
<div class="col-md-4 col-xs-12">
<h4>Demo:</h4>
<div id="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<div id="reportrange" class="pull-right"
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>&nbsp;
<span></span> <b class="caret"></b>
</div>
......@@ -305,7 +315,7 @@
</div>
<script type="text/javascript">
$(function() {
$(function () {
var start = moment().subtract(29, 'days');
var end = moment();
......@@ -351,7 +361,7 @@
</div>
<div class="col-md-3 col-xs-12">
<h4>Demo:</h4>
<input class="pull-right" type="text" name="datefilter" value="" />
<input class="pull-right" type="text" name="datefilter" value=""/>
</div>
</div>
......@@ -359,7 +369,7 @@
</div>
<script type="text/javascript">
$(function() {
$(function () {
$('input[name="datefilter"]').daterangepicker({
autoUpdateInput: false,
......@@ -368,11 +378,11 @@
}
});
$('input[name="datefilter"]').on('apply.daterangepicker', function(ev, picker) {
$('input[name="datefilter"]').on('apply.daterangepicker', function (ev, picker) {
$(this).val(picker.startDate.format('MM/DD/YYYY') + ' - ' + picker.endDate.format('MM/DD/YYYY'));
});
$('input[name="datefilter"]').on('cancel.daterangepicker', function(ev, picker) {
$('input[name="datefilter"]').on('cancel.daterangepicker', function (ev, picker) {
$(this).val('');
});
......@@ -382,7 +392,6 @@
</div>
<div id="config" name="config">
<h2>Configuration Generator</h2>
......@@ -411,12 +420,14 @@
<div class="form-group">
<label for="minDate">minDate</label>
<input type="text" class="form-control" id="minDate" value="" placeholder="MM/DD/YYYY">
<input type="text" class="form-control" id="minDate" value=""
placeholder="MM/DD/YYYY">
</div>
<div class="form-group">
<label for="maxDate">maxDate</label>
<input type="text" class="form-control" id="maxDate" value="" placeholder="MM/DD/YYYY">
<input type="text" class="form-control" id="maxDate" value=""
placeholder="MM/DD/YYYY">
</div>
<div class="form-group">
......@@ -548,7 +559,8 @@
<div class="checkbox">
<label>
<input type="checkbox" id="showCustomRangeLabel" checked="checked"> showCustomRangeLabel
<input type="checkbox" id="showCustomRangeLabel" checked="checked">
showCustomRangeLabel
</label>
</div>
......@@ -585,10 +597,12 @@
<ul class="nobullets">
<li>
<code>startDate</code> (Date object, moment object or string) The start of the initially selected date range
<code>startDate</code> (Date object, moment object or string) The start of the initially
selected date range
</li>
<li>
<code>endDate</code>: (Date object, moment object or string) The end of the initially selected date range
<code>endDate</code>: (Date object, moment object or string) The end of the initially selected
date range
</li>
<li>
<code>minDate</code>: (Date object, moment object or string) The earliest date a user may select
......@@ -597,31 +611,39 @@
<code>maxDate</code>: (Date object, moment object or string) The latest date a user may select
</li>
<li>
<code>dateLimit</code>: (object) The maximum span between the selected start and end dates. Can have any property you can add to a moment object (i.e. days, months)
<code>dateLimit</code>: (object) The maximum span between the selected start and end dates. Can
have any property you can add to a moment object (i.e. days, months)
</li>
<li>
<code>showDropdowns</code>: (boolean) Show year and month select boxes above calendars to jump to a specific month and year
<code>showDropdowns</code>: (boolean) Show year and month select boxes above calendars to jump
to a specific month and year
</li>
<li>
<code>showWeekNumbers</code>: (boolean) Show localized week numbers at the start of each week on the calendars
<code>showWeekNumbers</code>: (boolean) Show localized week numbers at the start of each week on
the calendars
</li>
<li>
<code>showISOWeekNumbers</code>: (boolean) Show ISO week numbers at the start of each week on the calendars
<code>showISOWeekNumbers</code>: (boolean) Show ISO week numbers at the start of each week on
the calendars
</li>
<li>
<code>timePicker</code>: (boolean) Allow selection of dates with times, not just dates
</li>
<li>
<code>timePickerIncrement</code>: (number) Increment of the minutes selection list for times (i.e. 30 to allow only selection of times ending in 0 or 30)
<code>timePickerIncrement</code>: (number) Increment of the minutes selection list for times
(i.e. 30 to allow only selection of times ending in 0 or 30)
</li>
<li>
<code>timePicker24Hour</code>: (boolean) Use 24-hour instead of 12-hour times, removing the AM/PM selection
<code>timePicker24Hour</code>: (boolean) Use 24-hour instead of 12-hour times, removing the
AM/PM selection
</li>
<li>
<code>timePickerSeconds</code>: (boolean) Show seconds in the timePicker
</li>
<li>
<code>ranges</code>: (object) Set predefined date ranges the user can select from. Each key is the label for the range, and its value an array with two dates representing the bounds of the range
<code>ranges</code>: (object) Set predefined date ranges the user can select from. Each key is
the label for the range, and its value an array with two dates representing the bounds of the
range
</li>
<li>
<code>showCustomRangeLabel</code>: (boolean) Displays an item labeled "Custom Range" at
......@@ -631,16 +653,21 @@
</li>
<li>
<code>alwaysShowCalendars</code>: (boolean) Normally, if you use the <code>ranges</code>
option to specify pre-defined date ranges, calendars for choosing a custom date range are not shown until the user clicks "Custom Range". When this option is set to true, the calendars for choosing a custom date range are always shown instead.
option to specify pre-defined date ranges, calendars for choosing a custom date range are not
shown until the user clicks "Custom Range". When this option is set to true, the calendars for
choosing a custom date range are always shown instead.
</li>
<li>
<code>opens</code>: (string</code>: 'left'/'right'/'center') Whether the picker appears aligned to the left, to the right, or centered under the HTML element it's attached to
<code>opens</code>: (string</code>: 'left'/'right'/'center') Whether the picker appears aligned
to the left, to the right, or centered under the HTML element it's attached to
</li>
<li>
<code>drops</code>: (string</code>: 'down' or 'up') Whether the picker appears below (default) or above the HTML element it's attached to
<code>drops</code>: (string</code>: 'down' or 'up') Whether the picker appears below (default)
or above the HTML element it's attached to
</li>
<li>
<code>buttonClasses</code>: (array) CSS class names that will be added to all buttons in the picker
<code>buttonClasses</code>: (array) CSS class names that will be added to all buttons in the
picker
</li>
<li>
<code>applyClass</code>: (string) CSS class string that will be added to the apply button
......@@ -649,18 +676,25 @@
<code>cancelClass</code>: (string) CSS class string that will be added to the cancel button
</li>
<li>
<code>locale</code>: (object) Allows you to provide localized strings for buttons and labels, customize the date format, and change the first day of week for the calendars.
<code>locale</code>: (object) Allows you to provide localized strings for buttons and labels,
customize the date format, and change the first day of week for the calendars.
Check off "locale (with example settings)" in the configuration generator to see how
to customize these options.
</li>
<li>
<code>singleDatePicker</code>: (boolean) Show only a single calendar to choose one date, instead of a range picker with two calendars; the start and end dates provided to your callback will be the same single date chosen
<code>singleDatePicker</code>: (boolean) Show only a single calendar to choose one date, instead
of a range picker with two calendars; the start and end dates provided to your callback will be
the same single date chosen
</li>
<li>
<code>autoApply</code>: (boolean) Hide the apply and cancel buttons, and automatically apply a new date range as soon as two dates or a predefined range is selected
<code>autoApply</code>: (boolean) Hide the apply and cancel buttons, and automatically apply a
new date range as soon as two dates or a predefined range is selected
</li>
<li>
<code>linkedCalendars</code>: (boolean) When enabled, the two calendars displayed will always be for two sequential months (i.e. January and February), and both will be advanced when clicking the left or right arrows above the calendars. When disabled, the two calendars can be individually advanced and display any month/year.
<code>linkedCalendars</code>: (boolean) When enabled, the two calendars displayed will always be
for two sequential months (i.e. January and February), and both will be advanced when clicking
the left or right arrows above the calendars. When disabled, the two calendars can be
individually advanced and display any month/year.
</li>
<li>
<code>isInvalidDate</code>: (function) A function that is passed each date in the two
......@@ -678,7 +712,8 @@
at initialization and when the selected dates change.
</li>
<li>
<code>parentEl</code>: (string) jQuery selector of the parent element that the date range picker will be added to, if not provided this will be 'body'
<code>parentEl</code>: (string) jQuery selector of the parent element that the date range picker
will be added to, if not provided this will be 'body'
</li>
</ul>
......@@ -697,14 +732,16 @@
<script src="https://gist.github.com/dangrossman/8ff9b1220c9b5682e8bd.js"></script>
<br />
<br/>
<ul class="nobullets">
<li>
<code>setStartDate(Date/moment/string)</code>: Sets the date range picker's currently selected start date to the provided date
<code>setStartDate(Date/moment/string)</code>: Sets the date range picker's currently selected
start date to the provided date
</li>
<li>
<code>setEndDate(Date/moment/string)</code>: Sets the date range picker's currently selected end date to the provided date
<code>setEndDate(Date/moment/string)</code>: Sets the date range picker's currently selected end
date to the provided date
</li>
</ul>
......@@ -745,15 +782,18 @@
</ul>
<p>
Some applications need a "clear" instead of a "cancel" functionality, which can be achieved by changing the button label and watching for the cancel event:
Some applications need a "clear" instead of a "cancel" functionality, which can be achieved by
changing the button label and watching for the cancel event:
</p>
<script src="https://gist.github.com/dangrossman/1bea78da703f2896564d.js"></script>
<br />
<br/>
<p>
While passing in a callback to the constructor is the easiest way to listen for changes in the selected date range, you can also do something every time the apply button is clicked even if the selection hasn't changed:
While passing in a callback to the constructor is the easiest way to listen for changes in the
selected date range, you can also do something every time the apply button is clicked even if the
selection hasn't changed:
</p>
<script src="https://gist.github.com/dangrossman/0c6c911fea1459b5fd13.js"></script>
......@@ -769,15 +809,24 @@
<p>Copyright (c) 2012-2017 <a href="http://www.dangrossman.info">Dan Grossman</a></p>
<p>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
</p>
<p>
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
</p>
<p>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</p>
</div>
......@@ -796,41 +845,72 @@
var disqus_title = "A Date Range Picker for Bootstrap";
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
(function () {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments
powered by Disqus.</a></noscript>
</div>
</div>
</div>
</div>
</div>
<!-- Begin W3Counter Tracking Code -->
<script type="text/javascript" src="https://www.w3counter.com/tracker.js?id=90840"></script>
<!-- End W3Counter Tracking Code -->
<!-- Begin W3Counter Tracking Code -->
<script type="text/javascript" src="https://www.w3counter.com/tracker.js?id=90840"></script>
<!-- End W3Counter Tracking Code -->
<script type="text/javascript">
<script type="text/javascript">
var im_domain = 'awio';
var im_project_id = 48;
(function(e,t){window._improvely=[];var n=e.getElementsByTagName("script")[0];var r=e.createElement("script");r.type="text/javascript";r.src="https://"+im_domain+".iljmp.com/improvely.js";r.async=true;n.parentNode.insertBefore(r,n);if(typeof t.init=="undefined"){t.init=function(e,t){window._improvely.push(["init",e,t])};t.goal=function(e){window._improvely.push(["goal",e])};t.conversion=function(e){window._improvely.push(["conversion",e])};t.label=function(e){window._improvely.push(["label",e])}}window.improvely=t;t.init(im_domain,im_project_id)})(document,window.improvely||[])
</script>
<script>
!function(e){window._wsg=7;var t=e.getElementsByTagName("script")[0],s=e.createElement("script");s.type="text/javascript",s.src="https://www.websitegoodies.com/js/widgets.js",t.parentNode.insertBefore(s,t)}(document);
</script>
<div id="footer">
(function (e, t) {
window._improvely = [];
var n = e.getElementsByTagName("script")[0];
var r = e.createElement("script");
r.type = "text/javascript";
r.src = "https://" + im_domain + ".iljmp.com/improvely.js";
r.async = true;
n.parentNode.insertBefore(r, n);
if (typeof t.init == "undefined") {
t.init = function (e, t) {
window._improvely.push(["init", e, t])
};
t.goal = function (e) {
window._improvely.push(["goal", e])
};
t.conversion = function (e) {
window._improvely.push(["conversion", e])
};
t.label = function (e) {
window._improvely.push(["label", e])
}
}
window.improvely = t;
t.init(im_domain, im_project_id)
})(document, window.improvely || [])
</script>
<script>
!function (e) {
window._wsg = 7;
var t = e.getElementsByTagName("script")[0], s = e.createElement("script");
s.type = "text/javascript", s.src = "https://www.websitegoodies.com/js/widgets.js", t.parentNode.insertBefore(s, t)
}(document);
</script>
<div id="footer">
Copyright &copy; 2012-2017 <a href="http://www.awio.com">Awio Web Services LLC</a>.
&nbsp;
Developed and maintained by <a href="http://www.dangrossman.info/">Dan Grossman</a>.
&nbsp;
</div>
</div>
</body>
</body>
</html>
......@@ -11,7 +11,7 @@ function refresh() {
success: function (data) {
$.each(data, function (key, val) {
console.log(key+ " purchase_id:"+val.purchase_id+", progress: "+val.progress);
//console.log(key+ " purchase_id:"+val.purchase_id+", progress: "+val.progress);
if (val.progress != 100) {
$('#progress_bar' + val.purchase_id).attr("aria-valuenow", val.progress);
$('#progress_bar' + val.purchase_id).attr('style', 'width:' + val.progress + '%');
......
......@@ -4,6 +4,16 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"/>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" href="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/css/ol.css" type="text/css">
<style>
.map {
height: 400px;
width: 100%;
}
</style>
<script src="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/build/ol.js"></script>
{% endblock %}
{% block messages %}
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
......@@ -123,7 +133,7 @@
{% block content %}
<!-- Content Wrapper. Contains page content -->
<!-- Main content -->
<div id="reportPage" class="wrapper" style="background-color: #ecf0f5; display: none">
<div id="reportPage" class="wrapper" style="background-color: #ecf0f5;">
<!-- Content Wrapper. Contains page content -->
<!-- Main content -->
<section class="content">
......@@ -133,6 +143,7 @@
<table data-toggle="table" id="example" class="table table-striped table-bordered"
style="width:100%">
<thead>
<th>Zone</th>
<th>Process</th>
<th>Purchase date</th>
<th>Start Date</th>
......@@ -144,6 +155,9 @@
<tbody id="table_body">
{% for product in productList %}
<tr>
<td><a href="#"
onclick="showMyModalSetTitle('{{ product.search_name }}', 'Some body txt')"> {{ product.search_name }}</a>
</td>
<td>{{ product.process }}</td>
<td>{{ product.purchase_date }}</td>
<td>{{ product.startDate }}</td>
......@@ -228,9 +242,54 @@
</div>
</div>
<div id="mapmodal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalTitle"></h4>
</div>
<div class="modal-body">
<div id="map" class="map"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- /.modals -->
{% endblock %}
{% block scripts %}
<script src="{% static 'reports/js/Reports_scripts.js' %}">
<script src="{% static 'reports/js/Reports_scripts.js' %}"></script>
<script type="text/javascript">
function showMyModalSetTitle(name,data) {
$('#map').empty();
$('#myModalTitle').val(name);
$("#mapmodal").modal();
setTimeout(function(){ createmap(); }, 1000);
}
function createmap() {
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],
view: new ol.View({
center: ol.proj.fromLonLat([-89.63873079999999,21.0404457]),
zoom: 5
})
});
}
</script>
{% endblock %}
......@@ -120,7 +120,7 @@ def Reports(request):
folders=[]
zip =""
product_list = Purchase.objects.values('id', 'productList', 'aggreg_date', 'search__clouds', 'search__startDate',
'search__endDate', 'search__process_id__name').filter(
'search__endDate', 'search__process_id__name', 'search__search_name').filter(
user_id=request.user.id, purchased=1)
for producto in product_list:
log_info = USERS_PATH + request.user.email + "/" + str(producto['id']) + "/L2ASCL_AreaProcessing.log"
......@@ -163,6 +163,7 @@ def Reports(request):
print("folder out noes not exists")
else:
folders = os.listdir(path=absolute_path)
print(folders)
if len(folders)==0:
initial_folder="../#"
else:
......@@ -179,6 +180,7 @@ def Reports(request):
zip = zip_path+"/"+file
print(zip)
productList.append({
"search_name": producto['search__search_name'],
"process": producto['search__process_id__name'],
"purchase_date": producto['aggreg_date'],
"startDate": producto['search__startDate'],
......
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