Skip to content

Commit 107e1d0

Browse files
committed
Merge branch 'develop' into 1.1
* develop: (65 commits) Update maximum supported PHP version for 1.1 (#603) Update EditorConfig link (#602) Apply consistent path normalisation to fix Windows test Fix view maker unit test for Windows Outputs time respecting backend preferences (#572) Rebuild Snowboard agian Revert "Rebuild Snowboard" Rebuild Snowboard Allow a string selector for the form in a request Use correct line breaks for Windows tests Backport ViewMaker tests from 1.2 branch farsi spelling correction (#579) Add Winter 1.2 as version option in bug report Adjust early termination of requests from success/error Increase stale check to 6 months Let composer resolve current php process in scripts (#563) Fix track input not keeping timeout Add jQuery AJAX prefilter as early as possible Add additional debugging for errors thrown in events Abstract Snowboard plugin constructors and destructors (#561) ... # Conflicts: # composer.json
2 parents ec46549 + e764d0f commit 107e1d0

File tree

106 files changed

+2354
-507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+2354
-507
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EditorConfig is awesome: http://EditorConfig.org
1+
# EditorConfig is awesome: https://EditorConfig.org
22

33
# top-most EditorConfig file
44
root = true

.github/ISSUE_TEMPLATE/1_BUG_REPORT.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ body:
1515
description: Please select the Winter CMS build that you encountered your issue with. You can find the version in the **Updates & Plugins** section of the Settings page of the Backend, or by running the `php artisan winter:version` command.
1616
options:
1717
- dev-develop
18+
- 1.2
1819
- 1.1
1920
- 1.0 (please try updating first)
2021
- Other (please specify below)

.github/workflows/archive.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ jobs:
1111
- uses: actions/[email protected]
1212
with:
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}
14-
days-before-stale: 60
14+
days-before-stale: 182
1515
days-before-close: 3
1616
stale-issue-message: >
17-
This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days.
17+
This issue will be closed and archived in 3 days, as there has been no activity in this issue for the last 6 months.
1818
19-
If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue.
20-
21-
If this issue is critical to your business, consider joining the [Premium Support Program](https://wintercms.com/premium-support) where a Service Level Agreement is offered.
19+
If this issue is still relevant or you would like to see it actioned, please respond within 3 days.
20+
21+
If this issue is critical for your business, please reach out to us at wintercms@luketowers.ca.
2222
stale-pr-message: >
23-
This pull request will be closed and archived in 3 days, as there has been no activity in the last 60 days.
24-
25-
If this is still being worked on, please respond and we will re-open this pull request.
23+
This pull request will be closed and archived in 3 days, as there has been no activity in this pull request for the last 6 months.
2624
27-
If this pull request is critical to your business, consider joining the [Premium Support Program](https://wintercms.com/premium-support) where a Service Level Agreement is offered.
25+
If you intend to continue working on this pull request, please respond within 3 days.
26+
27+
If this pull request is critical for your business, please reach out to us at [email protected].
2828
stale-issue-label: 'Status: Archived'
2929
stale-pr-label: 'Status: Archived'
3030
exempt-issue-label: 'Status: In Progress'

.github/workflows/code-quality.yaml

+12-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,18 @@ jobs:
5151
with:
5252
node-version: 12
5353

54-
- name: Install Node dependencies
55-
working-directory: ./modules/system/assets/js/snowboard
54+
- name: Install Node dependencies for System Module
55+
working-directory: ./modules/system
5656
run: npm install
5757

58-
- name: Run code quality checks
59-
working-directory: ./modules/system/assets/js/snowboard
58+
- name: Run code quality checks on System Module
59+
working-directory: ./modules/system
60+
run: npx eslint .
61+
62+
- name: Install Node dependencies for Backend Module
63+
working-directory: ./modules/backend
64+
run: npm install
65+
66+
- name: Run code quality checks on Backend Module
67+
working-directory: ./modules/backend
6068
run: npx eslint .

.gitpod/gitpod-hide-config

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ git update-index --skip-worktree config/database.php
88
git update-index --skip-worktree config/mail.php
99
git update-index --skip-worktree config/queue.php
1010
git update-index --skip-worktree config/session.php
11+
git update-index --skip-worktree package.json

.gitpod/gitpod-show-config

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ git update-index --no-skip-worktree config/database.php
88
git update-index --no-skip-worktree config/mail.php
99
git update-index --no-skip-worktree config/queue.php
1010
git update-index --no-skip-worktree config/session.php
11+
git update-index --no-skip-worktree package.json

.vscode/settings.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files.associations": {
33
"**/modules/*/behaviors/*/partials/*.htm": "php",
4-
"**/modules/*/controllers/*.htm": "php",
4+
"**/modules/*/controllers/*/*.htm": "php",
55
"**/modules/*/formwidgets/*/partials/*.htm": "php",
66
"**/modules/*/layouts/*.htm": "php",
77
"**/modules/*/models/*/*.htm": "php",
@@ -11,7 +11,7 @@
1111
"**/modules/*/widgets/*/partials/*.htm": "php",
1212

1313
"**/plugins/*/*/behaviors/*/partials/*.htm": "php",
14-
"**/plugins/*/*/components/*/*.htm": "twig",
14+
"**/plugins/*/*/components/*/*.htm": "wintercms-twig",
1515
"**/plugins/*/*/controllers/*/*.htm": "php",
1616
"**/plugins/*/*/formwidgets/*/partials/*.htm": "php",
1717
"**/plugins/*/*/layouts/*.htm": "php",
@@ -25,5 +25,9 @@
2525
"**/themes/*/layouts/*.htm": "wintercms",
2626
"**/themes/*/pages/**/*.htm": "wintercms",
2727
"**/themes/*/partials/**/*.htm": "wintercms"
28-
}
28+
},
29+
"eslint.validate": [
30+
"javascript",
31+
"vue"
32+
]
2933
}

composer.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"source": "https://github.com/wintercms/winter"
3030
},
3131
"require": {
32-
"php": "^7.2.9|^8.0",
32+
"php": "^7.2.9|~8.0.0",
3333
"winter/storm": "~1.1.2",
3434
"winter/wn-system-module": "~1.1.2",
3535
"winter/wn-backend-module": "~1.1.2",
@@ -55,12 +55,12 @@
5555
},
5656
"scripts": {
5757
"post-create-project-cmd": [
58-
"php artisan key:generate",
59-
"php artisan package:discover"
58+
"@php artisan key:generate",
59+
"@php artisan package:discover"
6060
],
6161
"post-update-cmd": [
62-
"php artisan winter:version",
63-
"php artisan package:discover"
62+
"@php artisan winter:version",
63+
"@php artisan package:discover"
6464
],
6565
"test": [
6666
"phpunit --stop-on-failure"

modules/backend/.eslintignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Ignore build files
2+
**/node_modules/**
3+
build/*.js
4+
**/build/*.js
5+
**/mix.webpack.js
6+
7+
# Ignore all JS except for Mix-based assets
8+
assets/js
9+
assets/vendor
10+
behaviors/**/*.js
11+
controllers/**/*.js
12+
formwidgets/**/*.js
13+
reportwidgets/**/*.js
14+
widgets/**/*.js

modules/backend/.eslintrc.json

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"env": {
3+
"es6": true,
4+
"browser": true
5+
},
6+
"globals": {
7+
"Snowboard": "writable"
8+
},
9+
"extends": [
10+
"airbnb-base",
11+
"plugin:vue/vue3-recommended"
12+
],
13+
"rules": {
14+
"class-methods-use-this": ["off"],
15+
"indent": ["error", 4, {
16+
"SwitchCase": 1
17+
}],
18+
"max-len": ["off"],
19+
"new-cap": ["error", { "properties": false }],
20+
"no-alert": ["off"],
21+
"no-param-reassign": ["error", {
22+
"props": false
23+
}],
24+
"vue/html-indent": ["error", 4],
25+
"vue/html-self-closing": ["error", {
26+
"html": {
27+
"void": "never",
28+
"normal": "any",
29+
"component": "always"
30+
},
31+
"svg": "always",
32+
"math": "always"
33+
}],
34+
"vue/multi-word-component-names": ["off"]
35+
}
36+
}

modules/backend/.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Backend module ignores
2+
3+
# Ignore Mix files
4+
node_modules
5+
package-lock.json
6+
mix.webpack.js

modules/backend/assets/js/backend.js

-140
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,6 @@
22
* Winter General Utilities
33
*/
44

5-
/*
6-
* Ensure the CSRF token is added to all AJAX requests.
7-
*/
8-
9-
$.ajaxPrefilter(function(options) {
10-
var token = $('meta[name="csrf-token"]').attr('content')
11-
12-
if (token) {
13-
if (!options.headers) options.headers = {}
14-
options.headers['X-CSRF-TOKEN'] = token
15-
}
16-
})
17-
185
/*
196
* Path helpers
207
*/
@@ -36,133 +23,6 @@ $.wn.backendUrl = function(url) {
3623
return backendBasePath + '/' + url
3724
}
3825

39-
/*
40-
* Asset Manager
41-
*
42-
* Usage: assetManager.load({ css:[], js:[], img:[] }, onLoadedCallback)
43-
*/
44-
45-
AssetManager = function() {
46-
47-
var o = {
48-
49-
load: function(collection, callback) {
50-
var jsList = (collection.js) ? collection.js : [],
51-
cssList = (collection.css) ? collection.css : [],
52-
imgList = (collection.img) ? collection.img : []
53-
54-
jsList = $.grep(jsList, function(item){
55-
return $('head script[src="'+item+'"]').length == 0
56-
})
57-
58-
cssList = $.grep(cssList, function(item){
59-
return $('head link[href="'+item+'"]').length == 0
60-
})
61-
62-
var cssCounter = 0,
63-
jsLoaded = false,
64-
imgLoaded = false
65-
66-
if (jsList.length === 0 && cssList.length === 0 && imgList.length === 0) {
67-
callback && callback()
68-
return
69-
}
70-
71-
o.loadJavaScript(jsList, function(){
72-
jsLoaded = true
73-
checkLoaded()
74-
})
75-
76-
$.each(cssList, function(index, source){
77-
o.loadStyleSheet(source, function(){
78-
cssCounter++
79-
checkLoaded()
80-
})
81-
})
82-
83-
o.loadImage(imgList, function(){
84-
imgLoaded = true
85-
checkLoaded()
86-
})
87-
88-
function checkLoaded() {
89-
if (!imgLoaded)
90-
return false
91-
92-
if (!jsLoaded)
93-
return false
94-
95-
if (cssCounter < cssList.length)
96-
return false
97-
98-
callback && callback()
99-
}
100-
},
101-
102-
/*
103-
* Loads StyleSheet files
104-
*/
105-
loadStyleSheet: function(source, callback) {
106-
var cssElement = document.createElement('link')
107-
108-
cssElement.setAttribute('rel', 'stylesheet')
109-
cssElement.setAttribute('type', 'text/css')
110-
cssElement.setAttribute('href', source)
111-
cssElement.addEventListener('load', callback, false)
112-
113-
if (typeof cssElement != 'undefined') {
114-
document.getElementsByTagName('head')[0].appendChild(cssElement)
115-
}
116-
117-
return cssElement
118-
},
119-
120-
/*
121-
* Loads JavaScript files in sequence
122-
*/
123-
loadJavaScript: function(sources, callback) {
124-
if (sources.length <= 0)
125-
return callback()
126-
127-
var source = sources.shift(),
128-
jsElement = document.createElement('script');
129-
130-
jsElement.setAttribute('type', 'text/javascript')
131-
jsElement.setAttribute('src', source)
132-
jsElement.addEventListener('load', function() {
133-
o.loadJavaScript(sources, callback)
134-
}, false)
135-
136-
if (typeof jsElement != 'undefined') {
137-
document.getElementsByTagName('head')[0].appendChild(jsElement)
138-
}
139-
},
140-
141-
/*
142-
* Loads Image files
143-
*/
144-
loadImage: function(sources, callback) {
145-
if (sources.length <= 0)
146-
return callback()
147-
148-
var loaded = 0
149-
$.each(sources, function(index, source){
150-
var img = new Image()
151-
img.onload = function() {
152-
if (++loaded == sources.length && callback)
153-
callback()
154-
}
155-
img.src = source
156-
})
157-
}
158-
159-
};
160-
161-
return o;
162-
};
163-
164-
assetManager = new AssetManager();
165-
16626
/*
16727
* String escape
16828
*/

0 commit comments

Comments
 (0)