Merge branch 'develop' into wip/laravel-6
This commit is contained in:
commit
9c6c6b5a12
|
|
@ -1,363 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# git-subsplit.sh: Automate and simplify the process of managing one-way
|
||||
# read-only subtree splits.
|
||||
#
|
||||
# Copyright (C) 2012 Dragonfly Development Inc.
|
||||
#
|
||||
# 2020-06-11: Modified by Ben Thomson for October CMS maintenance through GitHub Actions.
|
||||
#
|
||||
if [ $# -eq 0 ]; then
|
||||
set -- -h
|
||||
fi
|
||||
OPTS_SPEC="\
|
||||
git subsplit init url
|
||||
git subsplit publish splits --heads=<heads> --tags=<tags> --splits=<splits>
|
||||
git subsplit update
|
||||
--
|
||||
h,help show the help
|
||||
q quiet
|
||||
debug show plenty of debug output
|
||||
n,dry-run do everything except actually send the updates
|
||||
work-dir directory that contains the subsplit working directory
|
||||
|
||||
options for 'publish'
|
||||
heads= only publish for listed heads instead of all heads
|
||||
no-heads do not publish any heads
|
||||
tags= only publish for listed tags instead of all tags
|
||||
no-tags do not publish any tags
|
||||
update fetch updates from repository before publishing
|
||||
rebuild-tags rebuild all tags (as opposed to skipping tags that are already synced)
|
||||
path= path of the repository
|
||||
"
|
||||
eval "$(echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?)"
|
||||
|
||||
# We can run this from anywhere.
|
||||
NONGIT_OK=1
|
||||
DEBUG=" :DEBUG >"
|
||||
|
||||
PATH=$PATH:$(git --exec-path)
|
||||
|
||||
. git-sh-setup
|
||||
|
||||
if [ "$(hash git-subtree &>/dev/null && echo OK)" = "" ]
|
||||
then
|
||||
die "Git subsplit needs git subtree; install git subtree or upgrade git to >=1.7.11"
|
||||
fi
|
||||
|
||||
ANNOTATE=
|
||||
QUIET=
|
||||
COMMAND=
|
||||
SPLITS=
|
||||
REPO_URL=
|
||||
WORK_DIR="${PWD}/.subsplit"
|
||||
HEADS=
|
||||
NO_HEADS=
|
||||
TAGS=
|
||||
NO_TAGS=
|
||||
REBUILD_TAGS=
|
||||
DRY_RUN=
|
||||
VERBOSE=
|
||||
|
||||
subsplit_main()
|
||||
{
|
||||
while [ $# -gt 0 ]; do
|
||||
opt="$1"
|
||||
shift
|
||||
case "$opt" in
|
||||
-q) QUIET=1 ;;
|
||||
--debug) VERBOSE=1 ;;
|
||||
--heads) HEADS="$1"; shift ;;
|
||||
--no-heads) NO_HEADS=1 ;;
|
||||
--tags) TAGS="$1"; shift ;;
|
||||
--no-tags) NO_TAGS=1 ;;
|
||||
--update) UPDATE=1 ;;
|
||||
-n) DRY_RUN="--dry-run" ;;
|
||||
--dry-run) DRY_RUN="--dry-run" ;;
|
||||
--rebuild-tags) REBUILD_TAGS=1 ;;
|
||||
--path) WORK_DIR="$1"; shift ;;
|
||||
--) break ;;
|
||||
*) die "Unexpected option: $opt" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
COMMAND="$1"
|
||||
shift
|
||||
|
||||
case "$COMMAND" in
|
||||
init)
|
||||
if [ $# -lt 1 ]; then die "init command requires url to be passed as first argument"; fi
|
||||
REPO_URL="$1"
|
||||
shift
|
||||
subsplit_init
|
||||
;;
|
||||
publish)
|
||||
if [ $# -lt 1 ]; then die "publish command requires splits to be passed as first argument"; fi
|
||||
SPLITS="$1"
|
||||
shift
|
||||
subsplit_publish
|
||||
;;
|
||||
update)
|
||||
subsplit_update
|
||||
;;
|
||||
*) die "Unknown command '$COMMAND'" ;;
|
||||
esac
|
||||
}
|
||||
say()
|
||||
{
|
||||
if [ -z "$QUIET" ];
|
||||
then
|
||||
echo "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
subsplit_require_work_dir()
|
||||
{
|
||||
if [ ! -e "$WORK_DIR" ]
|
||||
then
|
||||
die "Working directory not found at ${WORK_DIR}; please run init first"
|
||||
fi
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} pushd \"${WORK_DIR}\" >/dev/null"
|
||||
fi
|
||||
|
||||
pushd "$WORK_DIR" >/dev/null
|
||||
}
|
||||
|
||||
subsplit_init()
|
||||
{
|
||||
if [ -e "$WORK_DIR" ]
|
||||
then
|
||||
die "Working directory already found at ${WORK_DIR}; please remove or run update"
|
||||
fi
|
||||
|
||||
say "Initializing subsplit from origin (${REPO_URL})"
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} git clone -q \"${REPO_URL}\" \"${WORK_DIR}\""
|
||||
fi
|
||||
|
||||
git clone -q "$REPO_URL" "$WORK_DIR" || die "Could not clone repository"
|
||||
}
|
||||
|
||||
subsplit_publish()
|
||||
{
|
||||
subsplit_require_work_dir
|
||||
|
||||
if [ -n "$UPDATE" ];
|
||||
then
|
||||
subsplit_update
|
||||
fi
|
||||
|
||||
if [ -z "$HEADS" ] && [ -z "$NO_HEADS" ]
|
||||
then
|
||||
# If heads are not specified and we want heads, discover them.
|
||||
HEADS="$(git ls-remote origin 2>/dev/null | grep "refs/heads/" | cut -f3- -d/)"
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} HEADS=\"${HEADS}\""
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$TAGS" ] && [ -z "$NO_TAGS" ]
|
||||
then
|
||||
# If tags are not specified and we want tags, discover them.
|
||||
TAGS="$(git ls-remote origin 2>/dev/null | grep -v "\^{}" | grep "refs/tags/" | cut -f3 -d/)"
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} TAGS=\"${TAGS}\""
|
||||
fi
|
||||
fi
|
||||
|
||||
for SPLIT in $SPLITS
|
||||
do
|
||||
SUBPATH=$(echo "$SPLIT" | cut -f1 -d:)
|
||||
REMOTE_URL=$(echo "$SPLIT" | cut -f2- -d:)
|
||||
REMOTE_NAME=$(echo "$SPLIT" | git hash-object --stdin)
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} SUBPATH=${SUBPATH}"
|
||||
echo "${DEBUG} REMOTE_URL=${REMOTE_URL}"
|
||||
echo "${DEBUG} REMOTE_NAME=${REMOTE_NAME}"
|
||||
fi
|
||||
|
||||
if ! git remote | grep "^${REMOTE_NAME}$" >/dev/null
|
||||
then
|
||||
git remote add "$REMOTE_NAME" "$REMOTE_URL"
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} git remote add \"${REMOTE_NAME}\" \"${REMOTE_URL}\""
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
say "Syncing ${SUBPATH} -> ${REMOTE_URL}"
|
||||
|
||||
for HEAD in $HEADS
|
||||
do
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} git show-ref --quiet --verify -- \"refs/remotes/origin/${HEAD}\""
|
||||
fi
|
||||
|
||||
if ! git show-ref --quiet --verify -- "refs/remotes/origin/${HEAD}"
|
||||
then
|
||||
say " - skipping head '${HEAD}' (does not exist)"
|
||||
continue
|
||||
fi
|
||||
LOCAL_BRANCH="${REMOTE_NAME}-branch-${HEAD}"
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} LOCAL_BRANCH=\"${LOCAL_BRANCH}\""
|
||||
fi
|
||||
|
||||
say " - syncing branch '${HEAD}'"
|
||||
|
||||
git checkout master >/dev/null 2>&1
|
||||
git branch -D "$LOCAL_BRANCH" >/dev/null 2>&1
|
||||
git branch -D "${LOCAL_BRANCH}-checkout" >/dev/null 2>&1
|
||||
git checkout -b "${LOCAL_BRANCH}-checkout" "origin/${HEAD}" >/dev/null 2>&1
|
||||
git subtree split -q --prefix="$SUBPATH" --branch="$LOCAL_BRANCH" "origin/${HEAD}" >/dev/null 2>&1
|
||||
RETURNCODE=$?
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} git checkout master >/dev/null 2>&1"
|
||||
echo "${DEBUG} git branch -D \"$LOCAL_BRANCH\" >/dev/null 2>&1"
|
||||
echo "${DEBUG} git branch -D \"${LOCAL_BRANCH}-checkout\" >/dev/null 2>&1"
|
||||
echo "${DEBUG} git checkout -b \"${LOCAL_BRANCH}-checkout\" \"origin/${HEAD}\" >/dev/null 2>&1"
|
||||
echo "${DEBUG} git subtree split -q --prefix=\"$SUBPATH\" --branch=\"$LOCAL_BRANCH\" \"origin/${HEAD}\" >/dev/null 2>&1"
|
||||
fi
|
||||
|
||||
if [ $RETURNCODE -eq 0 ]
|
||||
then
|
||||
PUSH_CMD="git push -q ${DRY_RUN} --force $REMOTE_NAME ${LOCAL_BRANCH}:${HEAD}"
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} $PUSH_CMD"
|
||||
fi
|
||||
|
||||
if [ -n "$DRY_RUN" ]
|
||||
then
|
||||
echo \# $PUSH_CMD
|
||||
$PUSH_CMD
|
||||
else
|
||||
$PUSH_CMD
|
||||
fi
|
||||
|
||||
PUSHRETURNCODE=$?
|
||||
if [ $PUSHRETURNCODE -eq 0 ]
|
||||
then
|
||||
say " - completed"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
for TAG in $TAGS
|
||||
do
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} git show-ref --quiet --verify -- \"refs/tags/${TAG}\""
|
||||
fi
|
||||
|
||||
if ! git show-ref --quiet --verify -- "refs/tags/${TAG}"
|
||||
then
|
||||
say " - skipping tag '${TAG}' (does not exist)"
|
||||
continue
|
||||
fi
|
||||
LOCAL_TAG="${REMOTE_NAME}-tag-${TAG}"
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} LOCAL_TAG="${LOCAL_TAG}""
|
||||
fi
|
||||
|
||||
if git branch | grep "${LOCAL_TAG}$" >/dev/null && [ -z "$REBUILD_TAGS" ]
|
||||
then
|
||||
say " - skipping tag '${TAG}' (already synced)"
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} git branch | grep \"${LOCAL_TAG}$\" >/dev/null && [ -z \"${REBUILD_TAGS}\" ]"
|
||||
fi
|
||||
|
||||
say " - syncing tag '${TAG}'"
|
||||
say " - deleting '${LOCAL_TAG}'"
|
||||
git branch -D "$LOCAL_TAG" >/dev/null 2>&1
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} git branch -D \"${LOCAL_TAG}\" >/dev/null 2>&1"
|
||||
fi
|
||||
|
||||
say " - subtree split for '${TAG}'"
|
||||
git subtree split -q --annotate="${ANNOTATE}" --prefix="$SUBPATH" --branch="$LOCAL_TAG" "$TAG" >/dev/null 2>&1
|
||||
RETURNCODE=$?
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} git subtree split -q --annotate=\"${ANNOTATE}\" --prefix=\"$SUBPATH\" --branch=\"$LOCAL_TAG\" \"$TAG\" >/dev/null"
|
||||
fi
|
||||
|
||||
say " - subtree split for '${TAG}' [DONE]"
|
||||
if [ $RETURNCODE -eq 0 ]
|
||||
then
|
||||
PUSH_CMD="git push -q ${DRY_RUN} --force ${REMOTE_NAME} ${LOCAL_TAG}:refs/tags/${TAG}"
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} PUSH_CMD=\"${PUSH_CMD}\""
|
||||
fi
|
||||
|
||||
if [ -n "$DRY_RUN" ]
|
||||
then
|
||||
echo \# $PUSH_CMD
|
||||
$PUSH_CMD
|
||||
else
|
||||
$PUSH_CMD
|
||||
fi
|
||||
|
||||
PUSHRETURNCODE=$?
|
||||
if [ $PUSHRETURNCODE -eq 0 ]
|
||||
then
|
||||
say " - completed"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
subsplit_update()
|
||||
{
|
||||
subsplit_require_work_dir
|
||||
|
||||
say "Updating subsplit from origin"
|
||||
|
||||
git fetch -q -t origin
|
||||
git checkout master
|
||||
git reset --hard origin/master
|
||||
|
||||
if [ -n "$VERBOSE" ];
|
||||
then
|
||||
echo "${DEBUG} git fetch -q -t origin"
|
||||
echo "${DEBUG} git checkout master"
|
||||
echo "${DEBUG} git reset --hard origin/master"
|
||||
fi
|
||||
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
subsplit_main "$@"
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
name: Subsplit
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
subsplit:
|
||||
runs-on: ubuntu-latest
|
||||
name: Split repositories
|
||||
steps:
|
||||
- name: Checkout history
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Split system module
|
||||
run: ${GITHUB_WORKSPACE}/.github/workflows/scripts/subsplit/git-subsplit.sh publish --debug --path="${GITHUB_WORKSPACE}" --heads="${GITHUB_REF/refs\/heads\//}" --no-tags modules/system:https://bennothommo:${{ secrets.MAINTENANCE_TOKEN }}@github.com/octoberrain/system.git
|
||||
- name: Split backend module
|
||||
run: ${GITHUB_WORKSPACE}/.github/workflows/scripts/subsplit/git-subsplit.sh publish --debug --path="${GITHUB_WORKSPACE}" --heads="${GITHUB_REF/refs\/heads\//}" --no-tags modules/backend:https://bennothommo:${{ secrets.MAINTENANCE_TOKEN }}@github.com/octoberrain/backend.git
|
||||
- name: Split CMS module
|
||||
run: ${GITHUB_WORKSPACE}/.github/workflows/scripts/subsplit/git-subsplit.sh publish --debug --path="${GITHUB_WORKSPACE}" --heads="${GITHUB_REF/refs\/heads\//}" --no-tags modules/cms:https://bennothommo:${{ secrets.MAINTENANCE_TOKEN }}@github.com/octoberrain/cms.git
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
name: Subsplit
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
subsplit:
|
||||
runs-on: ubuntu-latest
|
||||
name: Split repositories
|
||||
steps:
|
||||
- name: Checkout history
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Split system module
|
||||
run: ${GITHUB_WORKSPACE}/.github/workflows/scripts/subsplit/git-subsplit.sh publish --debug --path="${GITHUB_WORKSPACE}" --tags="${GITHUB_REF/refs\/tags\//}" --no-heads modules/system:https://bennothommo:${{ secrets.MAINTENANCE_TOKEN }}@github.com/octoberrain/system.git
|
||||
- name: Split backend module
|
||||
run: ${GITHUB_WORKSPACE}/.github/workflows/scripts/subsplit/git-subsplit.sh publish --debug --path="${GITHUB_WORKSPACE}" --tags="${GITHUB_REF/refs\/tags\//}" --no-heads modules/backend:https://bennothommo:${{ secrets.MAINTENANCE_TOKEN }}@github.com/octoberrain/backend.git
|
||||
- name: Split CMS module
|
||||
run: ${GITHUB_WORKSPACE}/.github/workflows/scripts/subsplit/git-subsplit.sh publish --debug --path="${GITHUB_WORKSPACE}" --tags="${GITHUB_REF/refs\/tags\//}" --no-heads modules/cms:https://bennothommo:${{ secrets.MAINTENANCE_TOKEN }}@github.com/octoberrain/cms.git
|
||||
|
|
@ -856,8 +856,11 @@ class RelationController extends ControllerBehavior
|
|||
});
|
||||
}
|
||||
else {
|
||||
$widget->bindEvent('list.extendQueryBefore', function ($query) {
|
||||
$widget->bindEvent('list.extendQueryBefore', function ($query) use ($widget) {
|
||||
$this->relationObject->addDefinedConstraintsToQuery($query);
|
||||
if ($widget->getSortColumn()) {
|
||||
$query->getQuery()->orders = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -172,10 +172,11 @@ froalaOptions.tableCellStyles=this.options.tableCellStyles?this.options.tableCel
|
|||
froalaOptions.toolbarButtonsMD=froalaOptions.toolbarButtons
|
||||
froalaOptions.toolbarButtonsSM=froalaOptions.toolbarButtons
|
||||
froalaOptions.toolbarButtonsXS=froalaOptions.toolbarButtons
|
||||
if(this.options.htmlAllowedEmptyTags){froalaOptions.allowEmptyTags=this.options.htmlAllowedEmptyTags.split(/[\s,]+/)}
|
||||
if(this.options.allowTags){froalaOptions.htmlAllowedTags=this.options.allowTags.split(/[\s,]+/)}
|
||||
if(this.options.allowEmptyTags){froalaOptions.htmlAllowedEmptyTags=[];this.options.allowEmptyTags.split(/[\s,]+/).forEach(function(selector){var tag=selector.split('.',2)
|
||||
if(froalaOptions.htmlAllowedEmptyTags.indexOf(tag[0])===-1){froalaOptions.htmlAllowedEmptyTags.push(selector)}})}else{froalaOptions.htmlAllowedEmptyTags=['textarea','a','iframe','object','video','style','script','.fa','.fr-emoticon','.fr-inner','path','line','hr','i']}
|
||||
froalaOptions.htmlAllowedTags=this.options.allowTags?this.options.allowTags.split(/[\s,]+/):['a','abbr','address','area','article','aside','audio','b','bdi','bdo','blockquote','br','button','canvas','caption','cite','code','col','colgroup','datalist','dd','del','details','dfn','dialog','div','dl','dt','em','embed','fieldset','figcaption','figure','footer','form','h1','h2','h3','h4','h5','h6','header','hgroup','hr','i','iframe','img','input','ins','kbd','keygen','label','legend','li','link','main','map','mark','menu','menuitem','meter','nav','noscript','object','ol','optgroup','option','output','p','param','pre','progress','queue','rp','rt','ruby','s','samp','script','style','section','select','small','source','span','strike','strong','sub','summary','sup','table','tbody','td','textarea','tfoot','th','thead','time','title','tr','track','u','ul','var','video','wbr']
|
||||
froalaOptions.htmlDoNotWrapTags=this.options.noWrapTags?this.options.noWrapTags.split(/[\s,]+/):['figure','script','style']
|
||||
if(this.options.removeTags){froalaOptions.htmlRemoveTags=this.options.removeTags.split(/[\s,]+/)}
|
||||
froalaOptions.htmlRemoveTags=this.options.removeTags?this.options.removeTags.split(/[\s,]+/):['script','style','base']
|
||||
froalaOptions.lineBreakerTags=this.options.lineBreakerTags?this.options.lineBreakerTags.split(/[\s,]+/):['figure, table, hr, iframe, form, dl']
|
||||
froalaOptions.shortcutsEnabled=['show','bold','italic','underline','indent','outdent','undo','redo']
|
||||
froalaOptions.requestHeaders={'X-CSRF-TOKEN':$('meta[name="csrf-token"]').attr('content'),'X-Requested-With':'XMLHttpRequest'}
|
||||
|
|
|
|||
|
|
@ -95,59 +95,70 @@
|
|||
froalaOptions.imageStyles = this.options.imageStyles
|
||||
? this.options.imageStyles
|
||||
: {
|
||||
'oc-img-rounded': 'Rounded',
|
||||
'oc-img-bordered': 'Bordered'
|
||||
'oc-img-rounded': 'Rounded',
|
||||
'oc-img-bordered': 'Bordered'
|
||||
}
|
||||
|
||||
froalaOptions.linkStyles = this.options.linkStyles
|
||||
? this.options.linkStyles
|
||||
: {
|
||||
'oc-link-green': 'Green',
|
||||
'oc-link-strong': 'Thick'
|
||||
'oc-link-green': 'Green',
|
||||
'oc-link-strong': 'Thick'
|
||||
}
|
||||
|
||||
froalaOptions.paragraphStyles = this.options.paragraphStyles
|
||||
? this.options.paragraphStyles
|
||||
: {
|
||||
'oc-text-gray': 'Gray',
|
||||
'oc-text-bordered': 'Bordered',
|
||||
'oc-text-spaced': 'Spaced',
|
||||
'oc-text-uppercase': 'Uppercase'
|
||||
'oc-text-gray': 'Gray',
|
||||
'oc-text-bordered': 'Bordered',
|
||||
'oc-text-spaced': 'Spaced',
|
||||
'oc-text-uppercase': 'Uppercase'
|
||||
}
|
||||
|
||||
froalaOptions.tableStyles = this.options.tableStyles
|
||||
? this.options.tableStyles
|
||||
: {
|
||||
'oc-dashed-borders': 'Dashed Borders',
|
||||
'oc-alternate-rows': 'Alternate Rows'
|
||||
'oc-dashed-borders': 'Dashed Borders',
|
||||
'oc-alternate-rows': 'Alternate Rows'
|
||||
}
|
||||
|
||||
froalaOptions.tableCellStyles = this.options.tableCellStyles
|
||||
? this.options.tableCellStyles
|
||||
: {
|
||||
'oc-cell-highlighted': 'Highlighted',
|
||||
'oc-cell-thick-border': 'Thick'
|
||||
'oc-cell-highlighted': 'Highlighted',
|
||||
'oc-cell-thick-border': 'Thick'
|
||||
}
|
||||
|
||||
froalaOptions.toolbarButtonsMD = froalaOptions.toolbarButtons
|
||||
froalaOptions.toolbarButtonsSM = froalaOptions.toolbarButtons
|
||||
froalaOptions.toolbarButtonsXS = froalaOptions.toolbarButtons
|
||||
|
||||
if (this.options.htmlAllowedEmptyTags) {
|
||||
froalaOptions.allowEmptyTags = this.options.htmlAllowedEmptyTags.split(/[\s,]+/)
|
||||
if (this.options.allowEmptyTags) {
|
||||
froalaOptions.htmlAllowedEmptyTags = [];
|
||||
|
||||
this.options.allowEmptyTags.split(/[\s,]+/).forEach(
|
||||
function (selector) {
|
||||
var tag = selector.split('.', 2)
|
||||
if (froalaOptions.htmlAllowedEmptyTags.indexOf(tag[0]) === -1) {
|
||||
froalaOptions.htmlAllowedEmptyTags.push(selector)
|
||||
}
|
||||
}
|
||||
)
|
||||
} else {
|
||||
froalaOptions.htmlAllowedEmptyTags = ['textarea', 'a', 'iframe', 'object', 'video', 'style', 'script', '.fa', '.fr-emoticon', '.fr-inner', 'path', 'line', 'hr', 'i']
|
||||
}
|
||||
|
||||
if (this.options.allowTags) {
|
||||
froalaOptions.htmlAllowedTags = this.options.allowTags.split(/[\s,]+/)
|
||||
}
|
||||
froalaOptions.htmlAllowedTags = this.options.allowTags
|
||||
? this.options.allowTags.split(/[\s,]+/)
|
||||
: ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'blockquote', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'pre', 'progress', 'queue', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'style', 'section', 'select', 'small', 'source', 'span', 'strike', 'strong', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr']
|
||||
|
||||
froalaOptions.htmlDoNotWrapTags = this.options.noWrapTags
|
||||
? this.options.noWrapTags.split(/[\s,]+/)
|
||||
: ['figure', 'script', 'style']
|
||||
|
||||
if (this.options.removeTags) {
|
||||
froalaOptions.htmlRemoveTags = this.options.removeTags.split(/[\s,]+/)
|
||||
}
|
||||
froalaOptions.htmlRemoveTags = this.options.removeTags
|
||||
? this.options.removeTags.split(/[\s,]+/)
|
||||
: ['script', 'style', 'base']
|
||||
|
||||
froalaOptions.lineBreakerTags = this.options.lineBreakerTags
|
||||
? this.options.lineBreakerTags.split(/[\s,]+/)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -39,13 +39,13 @@ class EditorSetting extends Model
|
|||
*/
|
||||
public $cacheKey = 'backend::editor.custom_css';
|
||||
|
||||
protected $defaultHtmlAllowEmptyTags = 'textarea, a, iframe, object, video, style, script';
|
||||
protected $defaultHtmlAllowEmptyTags = 'textarea, a, iframe, object, video, style, script, .fa, .fr-emoticon, .fr-inner, path, line, hr, i';
|
||||
|
||||
protected $defaultHtmlAllowTags = 'a, abbr, address, area, article, aside, audio, b, base, bdi, bdo, blockquote, br, button, canvas, caption, cite, code, col, colgroup, datalist, dd, del, details, dfn, dialog, div, dl, dt, em, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, hr, i, iframe, img, input, ins, kbd, keygen, label, legend, li, link, main, map, mark, menu, menuitem, meter, nav, noscript, object, ol, optgroup, option, output, p, param, pre, progress, queue, rp, rt, ruby, s, samp, script, style, section, select, small, source, span, strike, strong, sub, summary, sup, table, tbody, td, textarea, tfoot, th, thead, time, title, tr, track, u, ul, var, video, wbr';
|
||||
protected $defaultHtmlAllowTags = 'a, abbr, address, area, article, aside, audio, b, bdi, bdo, blockquote, br, button, canvas, caption, cite, code, col, colgroup, datalist, dd, del, details, dfn, dialog, div, dl, dt, em, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, hr, i, iframe, img, input, ins, kbd, keygen, label, legend, li, link, main, map, mark, menu, menuitem, meter, nav, noscript, object, ol, optgroup, option, output, p, param, pre, progress, queue, rp, rt, ruby, s, samp, script, style, section, select, small, source, span, strike, strong, sub, summary, sup, table, tbody, td, textarea, tfoot, th, thead, time, title, tr, track, u, ul, var, video, wbr';
|
||||
|
||||
protected $defaultHtmlNoWrapTags = 'figure, script, style';
|
||||
|
||||
protected $defaultHtmlRemoveTags = 'script, style';
|
||||
protected $defaultHtmlRemoveTags = 'script, style, base';
|
||||
|
||||
protected $defaultHtmlLineBreakerTags = 'figure, table, hr, iframe, form, dl';
|
||||
|
||||
|
|
@ -80,13 +80,13 @@ class EditorSetting extends Model
|
|||
* Editor toolbar presets for Froala.
|
||||
*/
|
||||
protected $editorToolbarPresets = [
|
||||
'default' => 'paragraphFormat, paragraphStyle, quote, bold, italic, align, formatOL, formatUL, insertTable,
|
||||
'default' => 'paragraphFormat, paragraphStyle, quote, bold, italic, align, formatOL, formatUL, insertTable,
|
||||
insertLink, insertImage, insertVideo, insertAudio, insertFile, insertHR, html',
|
||||
'minimal' => 'paragraphFormat, bold, italic, underline, |, insertLink, insertImage, |, html',
|
||||
'full' => 'undo, redo, |, bold, italic, underline, |, paragraphFormat, paragraphStyle, inlineStyle, |,
|
||||
strikeThrough, subscript, superscript, clearFormatting, |, fontFamily, fontSize, |, color,
|
||||
emoticons, -, selectAll, |, align, formatOL, formatUL, outdent, indent, quote, |, insertHR,
|
||||
insertLink, insertImage, insertVideo, insertAudio, insertFile, insertTable, |, selectAll,
|
||||
'full' => 'undo, redo, |, bold, italic, underline, |, paragraphFormat, paragraphStyle, inlineStyle, |,
|
||||
strikeThrough, subscript, superscript, clearFormatting, |, fontFamily, fontSize, |, color,
|
||||
emoticons, -, selectAll, |, align, formatOL, formatUL, outdent, indent, quote, |, insertHR,
|
||||
insertLink, insertImage, insertVideo, insertAudio, insertFile, insertTable, |, selectAll,
|
||||
html, fullscreen',
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -737,7 +737,7 @@ class Form extends WidgetBase
|
|||
$this->model->setValidationAttributeName($attrName, $fieldObj->label);
|
||||
}
|
||||
|
||||
$this->allFields[$name] = $fieldObj;
|
||||
$this->allFields[$fieldObj->fieldName] = $fieldObj;
|
||||
|
||||
switch (strtolower($addToArea)) {
|
||||
case FormTabs::SECTION_PRIMARY:
|
||||
|
|
|
|||
Loading…
Reference in New Issue