Skip to content

Commit

Permalink
Merge branch '3.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoyigi committed Jun 19, 2023
2 parents 291c78a + 9167041 commit bc5706a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
1 change: 0 additions & 1 deletion app/admin/dashboardwidgets/charts/assets/js/charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
this.chartJs = null

// Init
console.log('initChartJs')
this.initChartJs();
}

Expand Down
2 changes: 1 addition & 1 deletion app/admin/traits/LocationAwareWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function isLocationAware($config)
*/
protected function locationApplyScope($query)
{
if (is_null($ids = AdminLocation::getAll()))
if (is_null($ids = AdminLocation::getIdOrAll()))
return;

$model = $query->getModel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
startDate: moment().subtract(29, 'days'),
endDate: moment(),
timePicker: true,
locale: {
format: 'MM/DD/YYYY'
},
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
Expand All @@ -61,7 +64,7 @@
return false;

$.ti.loadingIndicator.show()
self.$form.request(self.options.alias+'::onRemoveWidget', {
self.$form.request(self.options.alias + '::onRemoveWidget', {
data: {
'alias': $('[data-widget-alias]', $btn.closest('div.widget-item')).val()
}
Expand Down Expand Up @@ -106,7 +109,7 @@
sortOrders.push($(this).val())
})

this.$form.request(self.options.alias+'::onSetWidgetPriorities', {
this.$form.request(self.options.alias + '::onSetWidgetPriorities', {
data: {
'aliases': aliases,
'priorities': sortOrders
Expand All @@ -116,19 +119,19 @@

DashboardContainer.prototype.onDateRangeSelected = function (start, end, label) {
$('span', this.$dateRangeEl).html(start.format(this.options.dateRangeFormat)
+' - '+end.format(this.options.dateRangeFormat));
+ ' - ' + end.format(this.options.dateRangeFormat));

$('.dashboard-widgets .progress-indicator').show()

this.$dateRangeEl.request(this.options.alias+'::onSetDateRange', {
this.$dateRangeEl.request(this.options.alias + '::onSetDateRange', {
data: {start: start.toISOString(), end: end.toISOString()}
}).always(function () {
$('.dashboard-widgets .progress-indicator').attr('style', 'display: none !important;');
})
}

DashboardContainer.prototype.fetchWidgets = function () {
$.request(this.options.alias+'::onRenderWidgets').always(function () {
$.request(this.options.alias + '::onRenderWidgets').always(function () {
$('.dashboard-widgets .progress-indicator').attr('style', 'display: none !important;');
})
}
Expand Down
4 changes: 2 additions & 2 deletions app/admin/widgets/dashboardcontainer/widget_toolbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ class="btn btn-outline-default"
id="{{ $this->alias }}-daterange"
class="btn btn-outline-default pull-right"
data-control="daterange"
data-start-date="{{ $startDate }}"
data-end-date="{{ $endDate }}"
data-start-date="{{ $startDate->format('m/d/Y') }}"
data-end-date="{{ $endDate->format('m/d/Y') }}"
>
<i class="fa fa-calendar"></i>&nbsp;&nbsp;
<span>{{$startDate->isoFormat($dateRangeFormat).' - '.$endDate->isoFormat($dateRangeFormat)}}</span>&nbsp;&nbsp;
Expand Down

0 comments on commit bc5706a

Please sign in to comment.