Skip to content

Commit

Permalink
Merge pull request octobercms#3965 from ayumihamsaki2/master
Browse files Browse the repository at this point in the history
Update Dashboard Columns from 10 to 12
  • Loading branch information
daftspunk authored Mar 28, 2019
2 parents adc74ac + dcec14b commit 334ad94
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 25 deletions.
12 changes: 7 additions & 5 deletions modules/backend/widgets/ReportContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ReportContainer extends WidgetBase
* sortOrder: 1
* configuration:
* title: 'Traffic overview'
* ocWidgetWidth: 10
* ocWidgetWidth: 12
*/
public $defaultWidgets = [];

Expand Down Expand Up @@ -182,8 +182,8 @@ public function onRemoveWidget()
public function onLoadAddPopup()
{
$sizes = [];
for ($i = 1; $i <= 10; $i++) {
$sizes[$i] = $i < 10 ? $i : $i.' (' . Lang::get('backend::lang.dashboard.full_width') . ')';
for ($i = 1; $i <= 12; $i++) {
$sizes[$i] = $i < 12 ? $i : $i.' (' . Lang::get('backend::lang.dashboard.full_width') . ')';
}

$this->vars['sizes'] = $sizes;
Expand Down Expand Up @@ -392,7 +392,7 @@ protected function getWidgetPropertyConfig($widget)

$property = [
'property' => 'ocWidgetWidth',
'title' => Lang::get('backend::lang.dashboard.widget_columns_label', ['columns' => '(1-10)']),
'title' => Lang::get('backend::lang.dashboard.widget_columns_label', ['columns' => '(1-12)']),
'description' => Lang::get('backend::lang.dashboard.widget_columns_description'),
'type' => 'dropdown',
'validationPattern' => '^[0-9]+$',
Expand All @@ -407,7 +407,9 @@ protected function getWidgetPropertyConfig($widget)
7 => '7 ' . Lang::choice('backend::lang.dashboard.columns', 7),
8 => '8 ' . Lang::choice('backend::lang.dashboard.columns', 8),
9 => '9 ' . Lang::choice('backend::lang.dashboard.columns', 9),
10 => '10 ' . Lang::choice('backend::lang.dashboard.columns', 10)
10 => '10 ' . Lang::choice('backend::lang.dashboard.columns', 10),
11 => '11 ' . Lang::choice('backend::lang.dashboard.columns', 11),
12 => '12 ' . Lang::choice('backend::lang.dashboard.columns', 12)
]
];
$result[] = $property;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,33 +93,39 @@
filter: alpha(opacity=100);
}
.report-container > ul .item.width-1 {
width: 9.95%;
width: 8.33%;
}
.report-container > ul .item.width-2 {
width: 19.95%;
width: 16.66%;
}
.report-container > ul .item.width-3 {
width: 29.95%;
width: 24.99%;
}
.report-container > ul .item.width-4 {
width: 39.95%;
width: 33.32%;
}
.report-container > ul .item.width-5 {
width: 49.95%;
width: 41.65%;
}
.report-container > ul .item.width-6 {
width: 59.95%;
width: 49.98%;
}
.report-container > ul .item.width-7 {
width: 69.95%;
width: 58.31%;
}
.report-container > ul .item.width-8 {
width: 79.95%;
width: 66.64%;
}
.report-container > ul .item.width-9 {
width: 89.95%;
width: 74.97%;
}
.report-container > ul .item.width-10 {
width: 83.3%;
}
.report-container > ul .item.width-11 {
width: 91.63%;
}
.report-container > ul .item.width-12 {
width: 100%;
}
.report-container > ul .item.dragged {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

ReportContainer.DEFAULTS = {
breakpoint: 768,
columns: 10
columns: 12
}

ReportContainer.prototype.init = function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,18 @@
}
}

&.width-1 {width: 9.95%;}
&.width-2 {width: 19.95%;}
&.width-3 {width: 29.95%;}
&.width-4 {width: 39.95%;}
&.width-5 {width: 49.95%;}
&.width-6 {width: 59.95%;}
&.width-7 {width: 69.95%;}
&.width-8 {width: 79.95%;}
&.width-9 {width: 89.95%;}
&.width-10 {width: 100%;}
&.width-1 {width: 8.33%;}
&.width-2 {width: 16.66%;}
&.width-3 {width: 24.99%;}
&.width-4 {width: 33.32%;}
&.width-5 {width: 41.65%;}
&.width-6 {width: 49.98%;}
&.width-7 {width: 58.31%;}
&.width-8 {width: 66.64%;}
&.width-9 {width: 74.97%;}
&.width-10 {width: 83.3%;}
&.width-11 {width: 91.63%;}
&.width-12 {width: 100%;}

&.dragged {
.transition-duration(0s) !important;
Expand Down

0 comments on commit 334ad94

Please sign in to comment.