API Moved CMS-specific JavaScript to admin/thirdparty
The 'admin' module will be split off from 'framework', where 'framework' only provides (mostly) frontend-agnostic PHP classes. For example, HTMLEditorField.php has a TinyMCEConfig.php driver, but doesn't come with its own JS includes.
@ -225,6 +225,9 @@ define('SAPPHIRE_ADMIN_PATH', FRAMEWORK_ADMIN_PATH);
|
|||||||
define('THIRDPARTY_DIR', FRAMEWORK_DIR . '/thirdparty');
|
define('THIRDPARTY_DIR', FRAMEWORK_DIR . '/thirdparty');
|
||||||
define('THIRDPARTY_PATH', BASE_PATH . '/' . THIRDPARTY_DIR);
|
define('THIRDPARTY_PATH', BASE_PATH . '/' . THIRDPARTY_DIR);
|
||||||
|
|
||||||
|
define('ADMIN_THIRDPARTY_DIR', FRAMEWORK_ADMIN_DIR . '/thirdparty');
|
||||||
|
define('ADMIN_THIRDPARTY_PATH', BASE_PATH . '/' . ADMIN_THIRDPARTY_DIR);
|
||||||
|
|
||||||
if(!defined('ASSETS_DIR')) {
|
if(!defined('ASSETS_DIR')) {
|
||||||
define('ASSETS_DIR', 'assets');
|
define('ASSETS_DIR', 'assets');
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,9 @@ use SilverStripe\View\Requirements;
|
|||||||
*
|
*
|
||||||
* Optionally hides the fields by default and shows a link to toggle their
|
* Optionally hides the fields by default and shows a link to toggle their
|
||||||
* visibility.
|
* visibility.
|
||||||
|
*
|
||||||
|
* Caution: The form field does not include any JavaScript or CSS when used outside of the CMS context,
|
||||||
|
* since the required frontend dependencies are included through CMS bundling.
|
||||||
*/
|
*/
|
||||||
class ConfirmedPasswordField extends FormField {
|
class ConfirmedPasswordField extends FormField {
|
||||||
|
|
||||||
@ -54,6 +57,9 @@ class ConfirmedPasswordField extends FormField {
|
|||||||
* This behaviour works unobtrusively, without JavaScript enabled
|
* This behaviour works unobtrusively, without JavaScript enabled
|
||||||
* the fields show, validate and save by default.
|
* the fields show, validate and save by default.
|
||||||
*
|
*
|
||||||
|
* Caution: The form field does not include any JavaScript or CSS when used outside of the CMS context,
|
||||||
|
* since the required frontend dependencies are included through CMS bundling.
|
||||||
|
*
|
||||||
* @param boolean $showOnClick
|
* @param boolean $showOnClick
|
||||||
*/
|
*/
|
||||||
protected $showOnClick = false;
|
protected $showOnClick = false;
|
||||||
|
@ -41,6 +41,9 @@ require_once 'Zend/Date.php';
|
|||||||
* Example: <code>$myDateField->setConfig('jQueryUI.showWeek', true);</code>
|
* Example: <code>$myDateField->setConfig('jQueryUI.showWeek', true);</code>
|
||||||
* See http://docs.jquery.com/UI/Datepicker for details.
|
* See http://docs.jquery.com/UI/Datepicker for details.
|
||||||
*
|
*
|
||||||
|
* Caution: The form field does not include any JavaScript or CSS when used outside of the CMS context,
|
||||||
|
* since the required frontend dependencies are included through CMS bundling.
|
||||||
|
*
|
||||||
* # Localization
|
* # Localization
|
||||||
*
|
*
|
||||||
* The field will get its default locale from {@link i18n::get_locale()}, and set the `dateformat`
|
* The field will get its default locale from {@link i18n::get_locale()}, and set the `dateformat`
|
||||||
|
@ -33,6 +33,9 @@ use SilverStripe\View\Requirements;
|
|||||||
* $gridField = new GridField('ExampleGrid', 'Example grid', new DataList('Page'));
|
* $gridField = new GridField('ExampleGrid', 'Example grid', new DataList('Page'));
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
|
* Caution: The form field does not include any JavaScript or CSS when used outside of the CMS context,
|
||||||
|
* since the required frontend dependencies are included through CMS bundling.
|
||||||
|
*
|
||||||
* @see SS_List
|
* @see SS_List
|
||||||
*
|
*
|
||||||
* @property GridState_Data $State The gridstate of this object
|
* @property GridState_Data $State The gridstate of this object
|
||||||
|
@ -12,6 +12,9 @@ use Exception;
|
|||||||
/**
|
/**
|
||||||
* A TinyMCE-powered WYSIWYG HTML editor field with image and link insertion and tracking capabilities. Editor fields
|
* A TinyMCE-powered WYSIWYG HTML editor field with image and link insertion and tracking capabilities. Editor fields
|
||||||
* are created from <textarea> tags, which are then converted with JavaScript.
|
* are created from <textarea> tags, which are then converted with JavaScript.
|
||||||
|
*
|
||||||
|
* Caution: The form field does not include any JavaScript or CSS when used outside of the CMS context,
|
||||||
|
* since the required frontend dependencies are included through CMS bundling.
|
||||||
*/
|
*/
|
||||||
class HTMLEditorField extends TextareaField {
|
class HTMLEditorField extends TextareaField {
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ class HTMLEditorField_Toolbar extends RequestHandler
|
|||||||
$remoteURL->addExtraClass('remoteurl');
|
$remoteURL->addExtraClass('remoteurl');
|
||||||
$fromWeb->addExtraClass('content ss-uploadfield htmleditorfield-from-web');
|
$fromWeb->addExtraClass('content ss-uploadfield htmleditorfield-from-web');
|
||||||
|
|
||||||
Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/AssetUploadField.css');
|
Requirements::css(FRAMEWORK_ADMIN_DIR . '/client/dist/styles/AssetUploadField.css');
|
||||||
$computerUploadField = UploadField::create('AssetUploadField', '');
|
$computerUploadField = UploadField::create('AssetUploadField', '');
|
||||||
$computerUploadField->setConfig('previewMaxWidth', 40);
|
$computerUploadField->setConfig('previewMaxWidth', 40);
|
||||||
$computerUploadField->setConfig('previewMaxHeight', 30);
|
$computerUploadField->setConfig('previewMaxHeight', 30);
|
||||||
|
@ -24,7 +24,7 @@ class TinyMCEConfig extends HTMLEditorConfig {
|
|||||||
* @config
|
* @config
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private static $base_dir = 'framework/thirdparty/tinymce';
|
private static $base_dir = 'framework/admin/thirdparty/tinymce';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TinyMCE JS settings
|
* TinyMCE JS settings
|
||||||
@ -448,13 +448,13 @@ class TinyMCEConfig extends HTMLEditorConfig {
|
|||||||
// If gzip is disabled just return core script url
|
// If gzip is disabled just return core script url
|
||||||
$useGzip = HTMLEditorField::config()->get('use_gzip');
|
$useGzip = HTMLEditorField::config()->get('use_gzip');
|
||||||
if(!$useGzip) {
|
if(!$useGzip) {
|
||||||
return THIRDPARTY_DIR . '/tinymce/tinymce.min.js';
|
return ADMIN_THIRDPARTY_DIR . '/tinymce/tinymce.min.js';
|
||||||
}
|
}
|
||||||
|
|
||||||
// tinyMCE JS requirement
|
// tinyMCE JS requirement
|
||||||
require_once THIRDPARTY_PATH . '/tinymce/tiny_mce_gzip.php';
|
require_once ADMIN_THIRDPARTY_PATH . '/tinymce/tiny_mce_gzip.php';
|
||||||
$tag = TinyMCE_Compressor::renderTag(array(
|
$tag = TinyMCE_Compressor::renderTag(array(
|
||||||
'url' => THIRDPARTY_DIR . '/tinymce/tiny_mce_gzip.php',
|
'url' => ADMIN_THIRDPARTY_DIR . '/tinymce/tiny_mce_gzip.php',
|
||||||
'plugins' => implode(',', $this->getInternalPlugins()),
|
'plugins' => implode(',', $this->getInternalPlugins()),
|
||||||
'themes' => $this->getTheme(),
|
'themes' => $this->getTheme(),
|
||||||
'languages' => $this->getOption('language')
|
'languages' => $this->getOption('language')
|
||||||
|
@ -7,6 +7,9 @@ use SilverStripe\View\Requirements;
|
|||||||
/**
|
/**
|
||||||
* Render a button that will submit the form its contained in through ajax.
|
* Render a button that will submit the form its contained in through ajax.
|
||||||
*
|
*
|
||||||
|
* Caution: The form field does not include any JavaScript or CSS when used outside of the CMS context,
|
||||||
|
* since the required frontend dependencies are included through CMS bundling.
|
||||||
|
*
|
||||||
* @see framework/client/dist/js/InlineFormAction.js
|
* @see framework/client/dist/js/InlineFormAction.js
|
||||||
*/
|
*/
|
||||||
class InlineFormAction extends FormField {
|
class InlineFormAction extends FormField {
|
||||||
|
@ -27,6 +27,9 @@ use SilverStripe\View\Requirements;
|
|||||||
* );
|
* );
|
||||||
* $field = new SelectionGroup('MyGroup', $items);
|
* $field = new SelectionGroup('MyGroup', $items);
|
||||||
* </code>
|
* </code>
|
||||||
|
*
|
||||||
|
* Caution: The form field does not include any JavaScript or CSS when used outside of the CMS context,
|
||||||
|
* since the required frontend dependencies are included through CMS bundling.
|
||||||
*/
|
*/
|
||||||
class SelectionGroup extends CompositeField {
|
class SelectionGroup extends CompositeField {
|
||||||
|
|
||||||
|
@ -29,6 +29,9 @@ use InvalidArgumentException;
|
|||||||
* )
|
* )
|
||||||
* )
|
* )
|
||||||
* </code>
|
* </code>
|
||||||
|
*
|
||||||
|
* Caution: The form field does not include any JavaScript or CSS when used outside of the CMS context,
|
||||||
|
* since the required frontend dependencies are included through CMS bundling.
|
||||||
*/
|
*/
|
||||||
class TabSet extends CompositeField {
|
class TabSet extends CompositeField {
|
||||||
|
|
||||||
|
@ -6,6 +6,9 @@ use SilverStripe\View\Requirements;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows visibility of a group of fields to be toggled.
|
* Allows visibility of a group of fields to be toggled.
|
||||||
|
*
|
||||||
|
* Caution: The form field does not include any JavaScript or CSS when used outside of the CMS context,
|
||||||
|
* since the required frontend dependencies are included through CMS bundling.
|
||||||
*/
|
*/
|
||||||
class ToggleCompositeField extends CompositeField {
|
class ToggleCompositeField extends CompositeField {
|
||||||
/**
|
/**
|
||||||
|
@ -44,6 +44,9 @@ use InvalidArgumentException;
|
|||||||
* This will generate a tree allowing the user to expand and contract subsections
|
* This will generate a tree allowing the user to expand and contract subsections
|
||||||
* to find the appropriate page to save to the field.
|
* to find the appropriate page to save to the field.
|
||||||
*
|
*
|
||||||
|
* Caution: The form field does not include any JavaScript or CSS when used outside of the CMS context,
|
||||||
|
* since the required frontend dependencies are included through CMS bundling.
|
||||||
|
*
|
||||||
* @see TreeMultiselectField for the same implementation allowing multiple selections
|
* @see TreeMultiselectField for the same implementation allowing multiple selections
|
||||||
* @see DropdownField for a simple dropdown field.
|
* @see DropdownField for a simple dropdown field.
|
||||||
* @see CheckboxSetField for multiple selections through checkboxes.
|
* @see CheckboxSetField for multiple selections through checkboxes.
|
||||||
|
@ -46,7 +46,8 @@ use Exception;
|
|||||||
* $UploadField->setAllowedMaxFileNumber(5);
|
* $UploadField->setAllowedMaxFileNumber(5);
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @author Zauberfisch
|
* Caution: The form field does not include any JavaScript or CSS when used outside of the CMS context,
|
||||||
|
* since the required frontend dependencies are included through CMS bundling.
|
||||||
*/
|
*/
|
||||||
class UploadField extends FileField {
|
class UploadField extends FileField {
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ class UploadField_ItemHandler extends RequestHandler
|
|||||||
return $this->httpError(403);
|
return $this->httpError(403);
|
||||||
}
|
}
|
||||||
|
|
||||||
Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/UploadField.css');
|
Requirements::css(FRAMEWORK_ADMIN_DIR . '/client/dist/styles/UploadField.css');
|
||||||
|
|
||||||
return $this->customise(array(
|
return $this->customise(array(
|
||||||
'Form' => $this->EditForm()
|
'Form' => $this->EditForm()
|
||||||
|
@ -12,7 +12,7 @@ require('expose?ReactRouterRedux!react-router-redux');
|
|||||||
|
|
||||||
// jQuery plugins require that the jQuery object is exposed as a global
|
// jQuery plugins require that the jQuery object is exposed as a global
|
||||||
// webpack.ProvidePlugin is used to ensure that jQuery and $ are provided to all includes
|
// webpack.ProvidePlugin is used to ensure that jQuery and $ are provided to all includes
|
||||||
require('script!../../../../thirdparty/jquery/jquery.js');
|
require('script!../../../thirdparty/jquery/jquery.js');
|
||||||
require('expose?jQuery!jQuery');
|
require('expose?jQuery!jQuery');
|
||||||
|
|
||||||
require('expose?ReactBootstrap!react-bootstrap-ss');
|
require('expose?ReactBootstrap!react-bootstrap-ss');
|
||||||
@ -23,17 +23,17 @@ require('expose?BootstrapCollapse!bootstrap/dist/js/umd/collapse.js');
|
|||||||
require('i18n.js');
|
require('i18n.js');
|
||||||
|
|
||||||
require('babel-polyfill');
|
require('babel-polyfill');
|
||||||
require('../../../../thirdparty/jquery-ondemand/jquery.ondemand.js');
|
require('../../../thirdparty/jquery-ondemand/jquery.ondemand.js');
|
||||||
require('../../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
|
require('../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
|
||||||
require('../legacy/sspath.js');
|
require('../legacy/sspath.js');
|
||||||
|
|
||||||
require('../../../../thirdparty/jquery-ui/jquery-ui.js');
|
require('../../../thirdparty/jquery-ui/jquery-ui.js');
|
||||||
// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
|
// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
|
||||||
// require('../../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
|
// require('../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
|
||||||
|
|
||||||
require('../../../../thirdparty/jquery-cookie/jquery.cookie.js');
|
require('../../../thirdparty/jquery-cookie/jquery.cookie.js');
|
||||||
require('../../../../thirdparty/jquery-query/jquery.query.js');
|
require('../../../thirdparty/jquery-query/jquery.query.js');
|
||||||
require('../../../../thirdparty/jquery-form/jquery.form.js');
|
require('../../../thirdparty/jquery-form/jquery.form.js');
|
||||||
|
|
||||||
require('../../../thirdparty/jquery-notice/jquery.notice.js');
|
require('../../../thirdparty/jquery-notice/jquery.notice.js');
|
||||||
// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
|
// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
|
||||||
@ -43,19 +43,19 @@ require('jquery-sizes/lib/jquery.sizes.js');
|
|||||||
require('../../../thirdparty/jlayout/lib/jlayout.border.js');
|
require('../../../thirdparty/jlayout/lib/jlayout.border.js');
|
||||||
require('../../../thirdparty/jlayout/lib/jquery.jlayout.js');
|
require('../../../thirdparty/jlayout/lib/jquery.jlayout.js');
|
||||||
|
|
||||||
require('../../../../thirdparty/jstree/jquery.jstree.js');
|
require('../../../thirdparty/jstree/jquery.jstree.js');
|
||||||
// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
|
// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
|
||||||
// require('../../../../thirdparty//jstree/themes/apple/style.css');
|
// require('../../../thirdparty//jstree/themes/apple/style.css');
|
||||||
|
|
||||||
require('../../../thirdparty/jquery-hoverIntent/jquery.hoverIntent.js');
|
require('../../../thirdparty/jquery-hoverIntent/jquery.hoverIntent.js');
|
||||||
require('../../../../thirdparty/jquery-changetracker/lib/jquery.changetracker.js');
|
require('../../../thirdparty/jquery-changetracker/lib/jquery.changetracker.js');
|
||||||
require('../legacy/TreeDropdownField.js');
|
require('../legacy/TreeDropdownField.js');
|
||||||
|
|
||||||
require('../legacy/DateField.js');
|
require('../legacy/DateField.js');
|
||||||
|
|
||||||
|
|
||||||
// TODO Move UploadField.js deps into the file once figuring out why uploads fail then
|
// TODO Move UploadField.js deps into the file once figuring out why uploads fail then
|
||||||
require('../../../../thirdparty/jquery-ui/jquery-ui.js');
|
require('../../../thirdparty/jquery-ui/jquery-ui.js');
|
||||||
require('../legacy/ssui.core.js');
|
require('../legacy/ssui.core.js');
|
||||||
require('imports?define=>false&this=>window!blueimp-load-image/load-image.js');
|
require('imports?define=>false&this=>window!blueimp-load-image/load-image.js');
|
||||||
require('blueimp-file-upload/jquery.iframe-transport.js');
|
require('blueimp-file-upload/jquery.iframe-transport.js');
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import $ from 'jQuery';
|
import $ from 'jQuery';
|
||||||
|
|
||||||
// entwine also required, but can't be included more than once without error
|
// entwine also required, but can't be included more than once without error
|
||||||
require('../../../../thirdparty/jquery-ui/jquery-ui.js');
|
require('../../../thirdparty/jquery-ui/jquery-ui.js');
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
ssDatepicker: function(opts) {
|
ssDatepicker: function(opts) {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import $ from 'jQuery';
|
import $ from 'jQuery';
|
||||||
import i18n from 'i18n';
|
import i18n from 'i18n';
|
||||||
|
|
||||||
require('../../../../thirdparty/jquery-ui/jquery-ui.js');
|
require('../../../thirdparty/jquery-ui/jquery-ui.js');
|
||||||
require('../../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
|
require('../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
|
||||||
|
|
||||||
// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
|
// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
|
||||||
// require('../styles/legacy/GridField.scss');
|
// require('../styles/legacy/GridField.scss');
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import $ from 'jQuery';
|
import $ from 'jQuery';
|
||||||
|
|
||||||
require('../../../../thirdparty/jquery-ui/jquery-ui.js');
|
require('../../../thirdparty/jquery-ui/jquery-ui.js');
|
||||||
require('../../../../thirdparty/jquery-cookie/jquery.cookie.js');
|
require('../../../thirdparty/jquery-cookie/jquery.cookie.js');
|
||||||
require('../../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
|
require('../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
|
||||||
|
|
||||||
// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
|
// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
|
||||||
// require('../../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
|
// require('../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
|
||||||
|
|
||||||
$.entwine('ss', function($){
|
$.entwine('ss', function($){
|
||||||
/**
|
/**
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import $ from 'jQuery';
|
import $ from 'jQuery';
|
||||||
|
|
||||||
// entwine also required, but can't be included more than once without error
|
// entwine also required, but can't be included more than once without error
|
||||||
require('../../../../thirdparty/jquery-ui/jquery-ui.js');
|
require('../../../thirdparty/jquery-ui/jquery-ui.js');
|
||||||
|
|
||||||
// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
|
// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
|
||||||
// require('../../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
|
// require('../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
|
||||||
|
|
||||||
$.entwine('ss', function($){
|
$.entwine('ss', function($){
|
||||||
$('.ss-toggle').entwine({
|
$('.ss-toggle').entwine({
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import $ from 'jQuery';
|
import $ from 'jQuery';
|
||||||
import i18n from 'i18n';
|
import i18n from 'i18n';
|
||||||
|
|
||||||
require('../../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
|
require('../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
|
||||||
require('../../../../thirdparty/jstree/jquery.jstree.js');
|
require('../../../thirdparty/jstree/jquery.jstree.js');
|
||||||
|
|
||||||
// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
|
// TODO Enable once https://github.com/webpack/extract-text-webpack-plugin/issues/179 is resolved. Included in bundle.scss for now.
|
||||||
// require('../../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
|
// require('../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
|
||||||
// require('../styles/legacy/TreeDropdownField.scss');
|
// require('../styles/legacy/TreeDropdownField.scss');
|
||||||
|
|
||||||
$.entwine('ss', function($){
|
$.entwine('ss', function($){
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import $ from 'jQuery';
|
import $ from 'jQuery';
|
||||||
|
|
||||||
require('../../../../thirdparty/jquery-ui/jquery-ui.js');
|
require('../../../thirdparty/jquery-ui/jquery-ui.js');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows icon definition via HTML5 data attrs for easier handling in PHP.
|
* Allows icon definition via HTML5 data attrs for easier handling in PHP.
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
// Thirdparty
|
// Thirdparty
|
||||||
@import "chosen";
|
@import "chosen";
|
||||||
@import "../../../../node_modules/bootstrap/scss/bootstrap.scss";
|
@import "../../../../node_modules/bootstrap/scss/bootstrap.scss";
|
||||||
@import "../../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css";
|
@import "../../../thirdparty/jquery-ui-themes/smoothness/jquery-ui.css";
|
||||||
@import "../../../../thirdparty/jstree/themes/apple/style.css";
|
@import "../../../thirdparty/jstree/themes/apple/style.css";
|
||||||
@import "../../../thirdparty/jquery-notice/jquery.notice.css";
|
@import "../../../thirdparty/jquery-notice/jquery.notice.css";
|
||||||
|
|
||||||
// Base
|
// Base
|
||||||
|
@ -1583,7 +1583,7 @@ form.member-profile-form {
|
|||||||
|
|
||||||
// overlay for switching between CMS panes
|
// overlay for switching between CMS panes
|
||||||
.cms .ui-widget-overlay-light {
|
.cms .ui-widget-overlay-light {
|
||||||
background: #aaaaaa url(../../../../thirdparty/jquery-ui-themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
|
background: #aaaaaa url(../../../thirdparty/jquery-ui-themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -550,7 +550,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
|||||||
|
|
||||||
if (Director::isDev()) {
|
if (Director::isDev()) {
|
||||||
// TODO Confuses jQuery.ondemand through document.write()
|
// TODO Confuses jQuery.ondemand through document.write()
|
||||||
Requirements::javascript(THIRDPARTY_DIR . '/jquery-entwine/src/jquery.entwine.inspector.js');
|
Requirements::javascript(ADMIN_THIRDPARTY_DIR . '/jquery-entwine/src/jquery.entwine.inspector.js');
|
||||||
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/leaktools.js');
|
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/leaktools.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
0
thirdparty/jquery-changetracker/spec/unit/spec.helper.js → admin/thirdparty/_manifest_exclude
vendored
Executable file → Normal file
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 321 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 145 B After Width: | Height: | Size: 145 B |
0
thirdparty/jquery-cookie/README → admin/thirdparty/jquery-changetracker/spec/unit/spec.helper.js
vendored
Normal file → Executable file
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 120 B After Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 105 B |
Before Width: | Height: | Size: 111 B After Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 110 B After Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 119 B After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 101 B After Width: | Height: | Size: 101 B |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
admin/thirdparty/jstree/_demo/_inc/__mysql_errors.log
vendored
Normal file
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 392 B |
Before Width: | Height: | Size: 583 B After Width: | Height: | Size: 583 B |
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 628 B |
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 628 B |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 786 B After Width: | Height: | Size: 786 B |
Before Width: | Height: | Size: 615 B After Width: | Height: | Size: 615 B |
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 603 B |
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 731 B After Width: | Height: | Size: 731 B |
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 631 B |
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 132 B After Width: | Height: | Size: 132 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 329 B |
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 342 B |
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 340 B |
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 321 B |
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 323 B |
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 344 B |
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 328 B |
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 337 B |
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 350 B |
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 53 B After Width: | Height: | Size: 53 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
@ -9,7 +9,7 @@
|
|||||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$frameworkPath = rtrim(dirname(dirname(dirname(__FILE__))), DIRECTORY_SEPARATOR);
|
$frameworkPath = rtrim(dirname(dirname(dirname(dirname(__FILE__)))), DIRECTORY_SEPARATOR);
|
||||||
$basePath = rtrim(dirname($frameworkPath), DIRECTORY_SEPARATOR);
|
$basePath = rtrim(dirname($frameworkPath), DIRECTORY_SEPARATOR);
|
||||||
|
|
||||||
// require composers autoloader
|
// require composers autoloader
|
@ -265,7 +265,7 @@ One common example is to block the core `jquery.js` added by various form fields
|
|||||||
version in a custom location. This assumes you have tested your application with the newer version.
|
version in a custom location. This assumes you have tested your application with the newer version.
|
||||||
|
|
||||||
:::php
|
:::php
|
||||||
Requirements::block(THIRDPARTY_DIR . '/jquery/jquery.js');
|
Requirements::block(ADMIN_THIRDPARTY_DIR . '/jquery/jquery.js');
|
||||||
|
|
||||||
<div class="alert" markdown="1">
|
<div class="alert" markdown="1">
|
||||||
The CMS also uses the `Requirements` system, and its operation can be affected by `block()` calls. Avoid this by
|
The CMS also uses the `Requirements` system, and its operation can be affected by `block()` calls. Avoid this by
|
||||||
|
@ -150,6 +150,18 @@ configuration option used in `Requirements::add_i18n_javascript()`.
|
|||||||
SilverStripe core is moving away from `Requirements::combine_files` in favour of Webpack as of
|
SilverStripe core is moving away from `Requirements::combine_files` in favour of Webpack as of
|
||||||
4.0. `Requirements::combine_files` is being considered for deprecation in future versions.
|
4.0. `Requirements::combine_files` is being considered for deprecation in future versions.
|
||||||
|
|
||||||
|
All JavaScript thirdparty dependencies have either been moved to NPM (see `package.json`),
|
||||||
|
or moved into the `framework/admin/thirdparty` folder. If you are hotlinking to any
|
||||||
|
of these files, please consider packaging your own versions in your projects and modules.
|
||||||
|
For CMS modules, you can also use many library globals which the core bundles already expose
|
||||||
|
(see [Build Tooling](/contributing/build_tooling)).
|
||||||
|
|
||||||
|
One commonly linked thirdparty dependency is `jquery.js` bundled with SilverStripe:
|
||||||
|
|
||||||
|
```
|
||||||
|
framework/thirdparty/jquery/jquery.js => framework/admin/thirdparty/jquery/jquery.js
|
||||||
|
```
|
||||||
|
|
||||||
#### Explicit text casting is now enforced on all template variables
|
#### Explicit text casting is now enforced on all template variables
|
||||||
|
|
||||||
Now whenever a `$Variable` is used in a template, regardless of whether any casts or methods are
|
Now whenever a `$Variable` is used in a template, regardless of whether any casts or methods are
|
||||||
|
@ -76,7 +76,7 @@ class HTMLEditorConfigTest extends SapphireTest {
|
|||||||
// Plugin specified with standard location
|
// Plugin specified with standard location
|
||||||
$this->assertContains('plugin4', array_keys($plugins));
|
$this->assertContains('plugin4', array_keys($plugins));
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
'http://mysite.com/subdir/framework/thirdparty/tinymce/plugins/plugin4/plugin.min.js',
|
'http://mysite.com/subdir/framework/admin/thirdparty/tinymce/plugins/plugin4/plugin.min.js',
|
||||||
$plugins['plugin4']
|
$plugins['plugin4']
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -86,14 +86,14 @@ class HTMLEditorConfigTest extends SapphireTest {
|
|||||||
// Test plugins included via gzip compresser
|
// Test plugins included via gzip compresser
|
||||||
HTMLEditorField::config()->update('use_gzip', true);
|
HTMLEditorField::config()->update('use_gzip', true);
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
'framework/thirdparty/tinymce/tiny_mce_gzip.php?js=1&plugins=plugin4,plugin5&themes=modern&languages=es&diskcache=true&src=true',
|
'framework/admin/thirdparty/tinymce/tiny_mce_gzip.php?js=1&plugins=plugin4,plugin5&themes=modern&languages=es&diskcache=true&src=true',
|
||||||
$c->getScriptURL()
|
$c->getScriptURL()
|
||||||
);
|
);
|
||||||
|
|
||||||
// If gzip is disabled only the core plugin is loaded
|
// If gzip is disabled only the core plugin is loaded
|
||||||
HTMLEditorField::config()->remove('use_gzip');
|
HTMLEditorField::config()->remove('use_gzip');
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
'framework/thirdparty/tinymce/tinymce.min.js',
|
'framework/admin/thirdparty/tinymce/tinymce.min.js',
|
||||||
$c->getScriptURL()
|
$c->getScriptURL()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|