Skip to content

Commit 7920856

Browse files
authored
Merge pull request #55 from Coderberg/develop
Develop
2 parents 7a9990b + 1e01959 commit 7920856

79 files changed

Lines changed: 4689 additions & 2299 deletions

Some content is hidden

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

.env.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ KERNEL_CLASS='App\Kernel'
33
APP_SECRET='$ecretf0rt3st'
44
SYMFONY_DEPRECATIONS_HELPER=999999
55
PANTHER_APP_ENV=panther
6+
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
67
DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name

.eslintrc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"parser": "@babel/eslint-parser",
3+
"env": {
4+
"node": true
5+
},
6+
"parserOptions": {
7+
"ecmaVersion": 2019,
8+
"sourceType": "module"
9+
},
10+
"rules": {
11+
"linebreak-style": ["off", "unix"],
12+
"no-console": "error",
13+
"quotes": ["error", "single"],
14+
"semi": ["error", "always"],
15+
"no-var": "error",
16+
"eqeqeq": ["error", "always"],
17+
"object-curly-spacing": "off",
18+
"no-const-assign": "error",
19+
"newline-before-return": "error",
20+
"no-unreachable": "error",
21+
"no-extra-semi": "error",
22+
"no-unexpected-multiline": "error",
23+
"comma-dangle": [
24+
"error",
25+
{
26+
"arrays": "never",
27+
"objects": "never",
28+
"imports": "never",
29+
"exports": "never",
30+
"functions": "never"
31+
}
32+
]
33+
}
34+
}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,8 @@ yarn-error.log
2727
/.php_cs
2828
/.php_cs.cache
2929
###< friendsofphp/php-cs-fixer ###
30+
31+
###> phpunit/phpunit ###
32+
/phpunit.xml
33+
.phpunit.result.cache
34+
###< phpunit/phpunit ###

.php_cs.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
$finder = PhpCsFixer\Finder::create()
44
->in(__DIR__)
5+
->exclude('node_modules')
56
->exclude('config')
67
->exclude('var')
78
->exclude('public/bundles')

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"printWidth": 70,
3+
"semi": true,
4+
"singleQuote": true,
5+
"tabWidth": 4,
6+
"trailingComma": "none"
7+
}

assets/js/admin.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,44 @@
33
import Cookies from 'js-cookie/src/js.cookie';
44

55
$(document).ready(() => {
6-
76
let currentUrl = window.location.href;
87

98
$('.sidebar .nav-item').each(function () {
109
let sidebarLink = $('a', this).attr('href');
1110
if (currentUrl.includes(sidebarLink)) {
1211
$(this).addClass('active');
13-
} else if (sidebarLink.includes('locations') && currentUrl.includes('locations')) {
12+
} else if (
13+
sidebarLink.includes('locations') &&
14+
currentUrl.includes('locations')
15+
) {
1416
$(this).addClass('active');
1517
}
1618
});
1719

1820
// Toggle the side navigation
19-
$("#sidebarToggle").on('click', (e) => {
20-
21+
$('#sidebarToggle').on('click', (e) => {
2122
let $body = $('body');
2223
e.preventDefault();
2324

24-
if ($($body).is(".sidebar-toggled")) {
25+
if ($($body).is('.sidebar-toggled')) {
2526
Cookies.set('sidebar-toggled', false);
2627
} else {
2728
Cookies.set('sidebar-toggled', true);
2829
}
2930

30-
$("body").toggleClass("sidebar-toggled");
31-
$(".sidebar").toggleClass("toggled");
31+
$body.toggleClass('sidebar-toggled');
32+
$('.sidebar').toggleClass('toggled');
3233
});
3334

3435
// Sorting
3536
$('#sort_by, #state').on('change', () => {
3637
let value = $('#sort_by').val();
3738
let state = $('#state').val();
38-
window.location.href = window.location.pathname + '?sort_by=' + value + '&state=' + state;
39+
window.location.href =
40+
window.location.pathname +
41+
'?sort_by=' +
42+
value +
43+
'&state=' +
44+
state;
3945
});
40-
4146
});

assets/js/city.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

33
$(document).ready(function () {
4-
54
let $city = $('#property_city');
65
let $title = $('#property_title');
76
let $description = $('#property_meta_description');
@@ -10,7 +9,6 @@ $(document).ready(function () {
109
let $state = $('#property_state');
1110

1211
$city.change(function () {
13-
1412
let $form = $(this).closest('form');
1513
let data = getPropertyData();
1614

assets/js/map.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,29 @@ const longitude = $map.attr('data-longitude');
77
const hintContent = $map.attr('data-hintContent');
88
const balloonContent = $map.attr('data-balloonContent');
99

10-
function init(){
10+
function init() {
1111
// Creating the map.
12-
let myMap = new ymaps.Map("map", {
12+
let myMap = new ymaps.Map('map', {
1313
center: [latitude, longitude],
1414
zoom: 13
1515
});
1616

17-
let currentApartment = new ymaps.Placemark([latitude, longitude], {
18-
hintContent: hintContent,
19-
balloonContent: balloonContent
20-
}, {
21-
preset: "islands#blueHomeIcon"
22-
});
17+
let currentApartment = new ymaps.Placemark(
18+
[latitude, longitude],
19+
{
20+
hintContent: hintContent,
21+
balloonContent: balloonContent
22+
},
23+
{
24+
preset: 'islands#blueHomeIcon'
25+
}
26+
);
2327

24-
myMap.geoObjects.add(currentApartment)
28+
myMap.geoObjects.add(currentApartment);
2529
}
2630

27-
$("#map").css({
28-
width: "100%",
29-
height: "280px", "padding-top": "20px"
31+
$map.css({
32+
width: '100%',
33+
height: '280px',
34+
'padding-top': '20px'
3035
});

assets/js/menu-sorting.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,35 @@ function changeButtons() {
66
.addClass('js-up-one')
77
.html('<i class="fas fa-arrow-up"></i> Up one');
88

9-
$(".js-move:first")
9+
$('.js-move:first')
1010
.removeClass('js-up-one')
1111
.addClass('js-down-one')
1212
.html('<i class="fas fa-arrow-down"></i> Down one');
1313
}
1414

1515
function sendRequest() {
16-
1716
let item = $('.js-move');
1817

1918
if (item.length > 1) {
20-
2119
let items = [];
2220

2321
item.each(function () {
2422
items.push(parseInt($(this).attr('id'), 10));
2523
});
2624

2725
$.ajax({
28-
method: "POST",
29-
url: "/admin/menu/sort",
26+
method: 'POST',
27+
url: '/en/admin/menu/sort',
3028
data: { items: items }
3129
});
3230
}
3331
}
3432

3533
$(document).ready(function () {
34+
$('body').on('click', '.js-move', function () {
35+
let row = $(this).parents('tr:first');
3636

37-
$('body').on('click', ".js-move", function () {
38-
39-
let row = $(this).parents("tr:first");
40-
41-
if ($(this).is(".js-up-one")) {
37+
if ($(this).is('.js-up-one')) {
4238
row.insertBefore(row.prev());
4339
} else {
4440
row.insertAfter(row.next());

assets/js/page.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
11
'use strict';
22

33
$(document).ready(function () {
4-
54
let $checkbox = $('#page_add_contact_form');
65
let $emailContainer = $('#email-address');
76
let $emailField = $('#page_contact_email_address');
87

9-
10-
if ($checkbox.attr("checked") === 'checked') {
8+
if ($checkbox.attr('checked') === 'checked') {
119
$emailContainer.slideDown();
1210
$emailField.prop('required', true);
1311
}
1412

1513
// Event Handler
1614
$checkbox.on('change', function () {
17-
1815
updateDisplay();
1916
});
2017

2118
// Action
2219

2320
function updateDisplay() {
24-
2521
let isChecked = $checkbox.is(':checked');
2622

2723
if (isChecked) {
@@ -32,5 +28,4 @@ $(document).ready(function () {
3228
$emailField.prop('required', false);
3329
}
3430
}
35-
3631
});

0 commit comments

Comments
 (0)