Skip to content

Commit f4e1501

Browse files
committed
Merge branch 'master' into feature/fixbuilder
2 parents fd8c138 + 9bc89a2 commit f4e1501

40 files changed

+1353
-196
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# miniShop 2
22

33
![Code Quality](https://github.com/modx-pro/miniShop2/actions/workflows/phpcs.yml/badge.svg)
4-
![Test](https://github.com/modx-pro/miniShop2/actions/workflows/eslint.yml/badge.svg)
4+
![Linting](https://github.com/modx-pro/miniShop2/actions/workflows/lint.yml/badge.svg)
55
[![Contributors](https://img.shields.io/github/contributors/modx-pro/miniShop2.svg?style=flat-square)](https://github.com/modx-pro/miniShop2/graphs/contributors)
66
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-2.0)
77

_build/index.php

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
//MODX BUILD ENVIRONMENT GUI v1
3+
4+
const MODX_CORE_PATH = MODX_BASE_PATH . 'core/';
5+
6+
if (!isset($_REQUEST['getpackage']) && empty($_REQUEST['getpackage'])) {
7+
8+
$current_dir = dirname(__FILE__);
9+
10+
$scanned_directory = array_diff(scandir($current_dir), array('..', '.'));
11+
echo "<h1>MODX build environment GUI</h1>";
12+
echo "<b>Available packages for build:</b> (with versions from build.config.php if exists)<br/><br/>";
13+
//echo "<b>Данные о версии берутся из файла конфигурации пакета</b> (build.config.php)<br/><br/>";
14+
foreach ($scanned_directory as $packagename) {
15+
if (is_dir($current_dir.'/'.$packagename)) {
16+
$config = file_get_contents($current_dir.'/'.$packagename.'/'."build.config.php");
17+
/*parse version*/
18+
$version_preg = "#PKG_VERSION['\",=\s]*([0-9\.]+)#";
19+
$release_preg = "#PKG_RELEASE['\",=\s]*([a-z0-9\.]+)['\"]#";
20+
$version = '';
21+
$matches = [];
22+
if (preg_match($version_preg, $config, $matches)) {
23+
$version .= $matches[1];
24+
}
25+
if (preg_match($release_preg, $config, $matches)) {
26+
$version .= '-'.$matches[1];
27+
}
28+
echo "<b>{$packagename}</b>&nbsp;<a target='_blank' href='/_build/{$packagename}/build.transport.php'>[build package]</a> (".$version.")<br/><br/>";
29+
}
30+
}
31+
32+
//echo "<div style='color:#aaa; margin-top: 200px'>Made for MODX RSC by @dimasites and friends</div>";
33+
34+
}else{
35+
// Define paths
36+
if (isset($_SERVER['MODX_BASE_PATH'])) {
37+
define('MODX_BASE_PATH', $_SERVER['MODX_BASE_PATH']);
38+
} elseif (file_exists(dirname(__FILE__, 2) . '/core')) {
39+
define('MODX_BASE_PATH', dirname(__FILE__, 2) . '/');
40+
} else {
41+
define('MODX_BASE_PATH', dirname(__FILE__, 3) . '/');
42+
}
43+
44+
$file = MODX_CORE_PATH.'packages/'.$_REQUEST['getpackage'].'.transport.zip';
45+
if (file_exists($file)) {
46+
header('Content-Description: File Transfer');
47+
header('Content-Type: application/octet-stream');
48+
header('Content-Disposition: attachment; filename="' . basename($file) . '"');
49+
header('Expires: 0');
50+
header('Cache-Control: must-revalidate');
51+
header('Pragma: public');
52+
header('Content-Length: ' . filesize($file));
53+
readfile($file);
54+
exit;
55+
}
56+
}

_build/minishop2/build.config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
const PKG_NAME = 'miniShop2';
55
define('PKG_NAME_LOWER', strtolower(PKG_NAME));
66

7-
const PKG_VERSION = '4.1.4';
7+
const PKG_VERSION = '4.1.5';
88
const PKG_RELEASE = 'pl';
99
const PKG_AUTO_INSTALL = true;
1010

_build/minishop2/data/transport.menu.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
'action' => 'system/settings',
3131
'params' => '&ns=minishop2',
3232
],
33+
'ms2_help' => [
34+
'description' => 'ms2_help_desc',
35+
'parent' => 'minishop2',
36+
'menuindex' => 3,
37+
'action' => 'mgr/help',
38+
],
3339
];
3440

3541
foreach ($tmp as $k => $v) {

assets/components/minishop2/css/mgr/bootstrap.buttons.css

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,27 @@
44
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
55
*/
66
.btn {
7+
cursor: pointer;
8+
-webkit-user-select: none;
9+
-moz-user-select: none;
10+
-ms-user-select: none;
11+
user-select: none;
12+
713
display: inline-block;
14+
815
margin-bottom: 0;
16+
padding: 6px 12px;
17+
18+
font-size: 14px;
919
font-weight: normal;
20+
line-height: 1.4286;
1021
text-align: center;
22+
white-space: nowrap;
1123
vertical-align: middle;
12-
cursor: pointer;
24+
1325
background-image: none;
1426
border: 1px solid transparent;
15-
white-space: nowrap;
16-
padding: 6px 12px;
17-
font-size: 14px;
18-
line-height: 1.42857143;
19-
border-radius: 4px;
20-
-webkit-user-select: none;
21-
-moz-user-select: none;
22-
-ms-user-select: none;
23-
user-select: none
27+
border-radius: 4px
2428
}
2529

2630
.btn:focus, .btn:active:focus, .btn.active:focus {
@@ -35,16 +39,18 @@
3539
}
3640

3741
.btn:active, .btn.active {
38-
outline: 0;
3942
background-image: none;
40-
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
41-
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125)
43+
outline: 0;
44+
-webkit-box-shadow: inset 0 3px 5px rgb(0 0 0 / 12.5%);
45+
box-shadow: inset 0 3px 5px rgb(0 0 0 / 12.5%)
4246
}
4347

4448
.btn.disabled, .btn[disabled], fieldset[disabled] .btn {
45-
cursor: not-allowed;
4649
pointer-events: none;
50+
cursor: not-allowed;
51+
4752
opacity: .65;
53+
/* stylelint-disable-next-line function-no-unknown */
4854
filter: alpha(opacity=65);
4955
-webkit-box-shadow: none;
5056
box-shadow: none
@@ -207,9 +213,9 @@
207213
}
208214

209215
.btn-link {
210-
color: #428bca;
211-
font-weight: normal;
212216
cursor: pointer;
217+
font-weight: normal;
218+
color: #428bca;
213219
border-radius: 0
214220
}
215221

@@ -258,8 +264,8 @@
258264
.btn-block {
259265
display: block;
260266
width: 100%;
261-
padding-left: 0;
262-
padding-right: 0
267+
padding-right: 0;
268+
padding-left: 0
263269
}
264270

265271
.btn-block + .btn-block {
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
#minishop2-help-text {
2+
box-sizing: border-box;
3+
width: 100%;
4+
margin: 24px 0;
5+
padding: 18px;
6+
7+
background: #fff;
8+
border: 1px solid #e4e4e4;
9+
border-radius: 3px;
10+
box-shadow: 0 1px 0 #e4e4e4;
11+
}
12+
13+
14+
#minishop2-help-text .icon {
15+
margin-right: 5px;
16+
}
17+
18+
#minishop2-help-text img {
19+
float: right;
20+
max-height: 100px;
21+
padding-left: 30px;
22+
}
23+
24+
#minishop2-help-text p {
25+
margin-bottom: 20px;
26+
}
27+
28+
#minishop2-help-text p:last-child {
29+
margin-bottom: 0;
30+
}
31+
32+
#minishop2-help-text textarea {
33+
width: calc(100% - 10px);
34+
height: 250px;
35+
}
36+
37+
#minishop2-help-links {
38+
overflow: hidden;
39+
width: 100%;
40+
margin-bottom: 1em;
41+
}
42+
43+
#minishop2-help-links ul {
44+
width: 100%;
45+
margin: 0;
46+
}
47+
48+
#minishop2-help-links ul li {
49+
position: relative;
50+
51+
float: left;
52+
display: table;
53+
54+
box-sizing: border-box;
55+
width: 16.5%;
56+
min-height: 130px;
57+
margin: 0;
58+
padding: 0 1%;
59+
}
60+
61+
@media (width <= 1023px) {
62+
#minishop2-help-links ul li {
63+
width: 33%;
64+
padding: 5px;
65+
}
66+
}
67+
68+
#minishop2-help-links ul li a {
69+
position: relative;
70+
71+
display: table-cell;
72+
73+
padding: 10px;
74+
75+
font-weight: bold;
76+
color: #53595f;
77+
text-align: center;
78+
text-decoration: none;
79+
vertical-align: middle;
80+
81+
background-color: #fff;
82+
border: 1px solid #e4e4e4;
83+
border-radius: 3px;
84+
box-shadow: 0 1px 0 #e4e4e4;
85+
}
86+
87+
#minishop2-help-links ul li a span {
88+
display: block;
89+
line-height: 1.2;
90+
}
91+
92+
#minishop2-help-links ul li a .title {
93+
font-size: 12px;
94+
}
95+
96+
#minishop2-help-links ul li a .text {
97+
font-weight: normal;
98+
}
99+
100+
#minishop2-help-links ul li a .icon {
101+
display: block;
102+
width: auto;
103+
margin: 0 auto;
104+
padding: 0 0 10px;
105+
}
106+
107+
#minishop2-help-links ul li a:hover .icon {
108+
color: #3697cd;
109+
}

0 commit comments

Comments
 (0)