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
--- | |
Name: fast-db | |
After: '#databaseconnectors' | |
--- | |
SilverStripe\ORM\Connect\DBSchemaManager: | |
fix_table_case_on_build: false | |
check_and_repair_on_build: false | |
SilverStripe\ORM\DatabaseAdmin: | |
show_record_counts: false |
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
<?php | |
trait ImprovedController | |
{ | |
/** | |
* Override default mechanisms for ease of use | |
* | |
* @link https://docs.silverstripe.org/en/5/developer_guides/controllers/access_control/ | |
* @param string $action | |
* @return boolean |
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
import styles from "./node_modules/@melloware/coloris/dist/coloris.min.css"; | |
import Coloris from "./node_modules/@melloware/coloris/dist/esm/coloris.js"; | |
// Example | |
/* <label for="primary_color-input" class="form-label">Primary color</label> | |
<coloris-input data-config='{"swatches": ["#fff", "#000"] }'> | |
<input type="text" class="form-control" id="primary_color-input" name="primary_color"> | |
</coloris-input> */ | |
const themeMode = document.documentElement.dataset.bsTheme ? document.documentElement.dataset.bsTheme : "auto"; |
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
/** | |
* Entwine is inspired by a js lib (https://github.com/hafriedlander/jquery.entwine) | |
* that allows binding behaviour to a give selector | |
* | |
* This library is a modern take on the same subject | |
* | |
* All elements get their own event listeners attached. This is an alternative approach | |
* to have one big delegator that deals with everything (see listen.js if that's what you want) | |
* I'm actually not sure what's the course of action ? :-) | |
* |
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
/** | |
* Delegate listener to any events on any elements | |
* Set passive elements by default | |
* Avoid listening multiple times to the same event for the same handler | |
*/ | |
const supportedPassiveTypes = [ | |
"scroll", | |
"wheel", | |
"touchstart", |
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
/** | |
* Listen to any events on any elements | |
* Set passive elements by default | |
* Avoid listening multiple times to the same event for the same handler | |
* Support a virtual "connected" event that allows triggering code only once | |
*/ | |
const CONNECTED = "connected"; | |
const supportedPassiveTypes = [ | |
"scroll", |
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
/** | |
* @callback ElementCallback | |
* @param {HTMLElement} el | |
* @returns {void} | |
*/ | |
const set = new WeakSet(); | |
/** | |
* Initialize an element exactly once |
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
// Split bootstrap media queries by stylesheet | |
// @link https://alistapart.com/article/mobile-first-css-is-it-time-for-a-rethink/ | |
// Sample usage: | |
// <link href="/css/default.min.css" rel="stylesheet" /> | |
// <link href="/css/mobile.min.css" media="screen and (max-width: 767.98px)" rel="stylesheet" /> | |
// <link href="/css/tablet.min.css" media="screen and (min-width: 768px) and (max-width: 991.98px)" rel="stylesheet" /> | |
// <link href="/css/desktop.min.css" media="screen and (min-width: 992px)" rel="stylesheet" /> | |
// <link href="/css/print.min.css" media="print" rel="stylesheet" /> |
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
@import "../bootstrap/bootstrap-common"; | |
// Print styles | |
@media print { | |
// Our custom styles | |
*, | |
*::before, | |
*::after { | |
text-shadow: none !important; | |
box-shadow: none !important; |
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
"use strict"; | |
/** | |
* Create a toast object | |
* | |
* @param {string} attr.body Body content. Can also be filled with html tags (eg: Hello <b>World</b>) | |
* @param {string} attr.header (none) Header content. Can also be filled with html tags (eg : <h6 class="mb-0">Success</h6>) | |
* @param {string} attr.className (none) Additional classes for toast element (eg: 'border-0 bg-danger text-white') | |
* @param {boolean} attr.animation (true) Apply transition to the toast | |
* @param {boolean} attr.autohide (true) Auto hide the toast |
NewerOlder