-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
7,206 additions
and
2,497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import {Controller} from "@hotwired/stimulus"; | ||
import { Controller } from '@hotwired/stimulus' | ||
|
||
export default class ControllerConnectedEvent extends CustomEvent | ||
{ | ||
constructor(controller) { | ||
if (!(controller instanceof Controller)) { | ||
throw new Error('Controller must be instance of stimulus controller.'); | ||
} | ||
|
||
super(controller.identifier + ':connected', { | ||
controller: controller, | ||
bubbles: true | ||
}); | ||
export default class ControllerConnectedEvent extends CustomEvent { | ||
constructor (controller) { | ||
if (!(controller instanceof Controller)) { | ||
throw new Error('Controller must be instance of stimulus controller.') | ||
} | ||
} | ||
|
||
super(controller.identifier + ':connected', { | ||
controller, | ||
bubbles: true | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
import 'bootstrap'; | ||
import './bootstrap.js'; | ||
import './styles/app.css'; | ||
import $ from "jquery"; | ||
import "tablesorter" | ||
import 'bootstrap' | ||
import './bootstrap.js' | ||
import './styles/app.css' | ||
import $ from 'jquery' | ||
import 'tablesorter' | ||
|
||
export const ajaxDelay = 300; | ||
export function executeAfter(executable, stamp) { | ||
if (stamp === undefined) { | ||
stamp = Date.now() + ajaxDelay; | ||
} | ||
setTimeout( | ||
executable, | ||
(stamp - Date.now()) > 0 ? (stamp - Date.now()) : 0 | ||
); | ||
export const ajaxDelay = 300 | ||
export function executeAfter (executable, stamp) { | ||
if (stamp === undefined) { | ||
stamp = Date.now() + ajaxDelay | ||
} | ||
setTimeout( | ||
executable, | ||
(stamp - Date.now()) > 0 ? (stamp - Date.now()) : 0 | ||
) | ||
} | ||
|
||
$.tablesorter.defaults.dateFormat = 'ddmmyyyy'; | ||
$.tablesorter.defaults.dateFormat = 'ddmmyyyy' | ||
|
||
let sidebar = $("#sidebar"); | ||
const sidebar = $('#sidebar') | ||
sidebar.mouseover(function () { | ||
sidebar.toggleClass("active", false); | ||
}); | ||
sidebar.toggleClass('active', false) | ||
}) | ||
sidebar.mouseout(function () { | ||
sidebar.toggleClass("active", true); | ||
|
||
}); | ||
sidebar.toggleClass('active', true) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { startStimulusApp } from '@symfony/stimulus-bridge'; | ||
import { startStimulusApp } from '@symfony/stimulus-bridge' | ||
|
||
// Registers Stimulus controllers from controllers.json and in the controllers/ directory | ||
export const app = startStimulusApp(require.context( | ||
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers', | ||
true, | ||
/\.[jt]sx?$/ | ||
)); | ||
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers', | ||
true, | ||
/\.[jt]sx?$/ | ||
)) | ||
// register any custom, 3rd party controllers here | ||
// app.register('some_controller_name', SomeImportedController); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,78 @@ | ||
import $ from "jquery"; | ||
import $ from 'jquery' | ||
|
||
$(".filters-form select").each(function () { | ||
if ($(this).hasClass("js-no-transformation")) { | ||
return; | ||
} | ||
$('.filters-form select').each(function () { | ||
if ($(this).hasClass('js-no-transformation')) { | ||
return | ||
} | ||
|
||
let self = this; | ||
let boundListener = scrollToElement.bind(self); | ||
$.extend(self, { | ||
removeListener: function () { | ||
document.body.removeEventListener("keypress", boundListener); | ||
} | ||
}); | ||
const self = this | ||
const boundListener = scrollToElement.bind(self) | ||
$.extend(self, { | ||
removeListener: function () { | ||
document.body.removeEventListener('keypress', boundListener) | ||
} | ||
}) | ||
|
||
let $this = $(this); | ||
let numberOfOptions = $(this).children("option").length; | ||
let currentText = $(this).find(":selected").text(); | ||
const $this = $(this) | ||
const numberOfOptions = $(this).children('option').length | ||
const currentText = $(this).find(':selected').text() | ||
|
||
$this.addClass("hidden"); | ||
$this.wrap("<div class=\"select\"></div>"); | ||
$this.after("<div class=\"select-styled\"></div>"); | ||
$this.addClass('hidden') | ||
$this.wrap('<div class="select"></div>') | ||
$this.after('<div class="select-styled"></div>') | ||
|
||
let $styledSelect = $this.next("div.select-styled"); | ||
$styledSelect.text($this.children("option").eq(0).text()); | ||
const $styledSelect = $this.next('div.select-styled') | ||
$styledSelect.text($this.children('option').eq(0).text()) | ||
|
||
let $list = $("<ul />", { | ||
"class": "select-options" | ||
}).insertAfter($styledSelect); | ||
const $list = $('<ul />', { | ||
class: 'select-options' | ||
}).insertAfter($styledSelect) | ||
|
||
for (let i = 0; i < numberOfOptions; i++) { | ||
$("<li />", { | ||
text: $this.children("option").eq(i).text(), | ||
rel: $this.children("option").eq(i).val() | ||
}).appendTo($list); | ||
} | ||
for (let i = 0; i < numberOfOptions; i++) { | ||
$('<li />', { | ||
text: $this.children('option').eq(i).text(), | ||
rel: $this.children('option').eq(i).val() | ||
}).appendTo($list) | ||
} | ||
|
||
let $listItems = $list.children("li"); | ||
const $listItems = $list.children('li') | ||
|
||
$styledSelect.click(function (e) { | ||
e.stopPropagation(); | ||
document.body.addEventListener("keypress", boundListener); | ||
$("div.select-styled.active").not(this).each(function () { | ||
$(this).removeClass("active").next("ul.select-options").hide(); | ||
let listenerHolder = $(this).prev("select")[0]; | ||
listenerHolder.removeListener(); | ||
}); | ||
$(this).toggleClass("active").next("ul.select-options").toggle(); | ||
}); | ||
$styledSelect.click(function (e) { | ||
e.stopPropagation() | ||
document.body.addEventListener('keypress', boundListener) | ||
$('div.select-styled.active').not(this).each(function () { | ||
$(this).removeClass('active').next('ul.select-options').hide() | ||
const listenerHolder = $(this).prev('select')[0] | ||
listenerHolder.removeListener() | ||
}) | ||
$(this).toggleClass('active').next('ul.select-options').toggle() | ||
}) | ||
|
||
$listItems.click(function (e) { | ||
e.stopPropagation(); | ||
$styledSelect.text($(this).text()).removeClass("active"); | ||
$this.val($(this).attr("rel")); | ||
$list.hide(); | ||
$this.trigger("change"); | ||
}); | ||
$listItems.click(function (e) { | ||
e.stopPropagation() | ||
$styledSelect.text($(this).text()).removeClass('active') | ||
$this.val($(this).attr('rel')) | ||
$list.hide() | ||
$this.trigger('change') | ||
}) | ||
|
||
$(document).click(function () { | ||
document.body.removeEventListener("keypress", boundListener); | ||
$styledSelect.removeClass("active"); | ||
$list.hide(); | ||
}); | ||
$styledSelect.text(currentText); | ||
}); | ||
$(document).click(function () { | ||
document.body.removeEventListener('keypress', boundListener) | ||
$styledSelect.removeClass('active') | ||
$list.hide() | ||
}) | ||
$styledSelect.text(currentText) | ||
}) | ||
|
||
function scrollToElement(e) { | ||
let letter = e.key.toUpperCase(); | ||
let $div = $(this).next().next(); | ||
let $children = $div.children(); | ||
for (let i = 0; i < $children.length; i++) { | ||
let currentFirstLetter = Array.from($children[i].innerHTML)[0].toUpperCase(); | ||
if (currentFirstLetter === letter) { | ||
$div[0].scrollTop = $children[i].offsetTop - 20; | ||
return; | ||
} | ||
function scrollToElement (e) { | ||
const letter = e.key.toUpperCase() | ||
const $div = $(this).next().next() | ||
const $children = $div.children() | ||
for (let i = 0; i < $children.length; i++) { | ||
const currentFirstLetter = Array.from($children[i].innerHTML)[0].toUpperCase() | ||
if (currentFirstLetter === letter) { | ||
$div[0].scrollTop = $children[i].offsetTop - 20 | ||
return | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.