mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-01-26 00:08:42 +00:00
Remove space from end of line
This commit is contained in:
parent
6e543913f5
commit
f6286759f3
|
|
@ -185,7 +185,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
|
||||
$doc = EditorDocMapper::get((int) $request->getData('id'));
|
||||
$accountId = $request->getHeader()->getAccount();
|
||||
|
||||
|
||||
if ($doc->getCreatedBy()->getId() !== $accountId
|
||||
&& !$this->app->accountManager->get($accountId)->hasPermission(
|
||||
PermissionType::READ, $this->app->orgId, $this->app->appName, self::MODULE_ID, PermissionState::DOC, $doc->getId())
|
||||
|
|
@ -243,7 +243,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
$doc->setPlain((string) ($request->getData('plain') ?? ''));
|
||||
$doc->setContent((string) ($request->getData('plain') ?? ''));
|
||||
$doc->setCreatedBy($request->getHeader()->getAccount());
|
||||
|
||||
|
||||
EditorDocMapper::create($doc);
|
||||
|
||||
$response->set('editor', $doc->jsonSerialize());
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@
|
|||
const activeEl = document.activeElement;
|
||||
const activeElTagName = activeEl ? activeEl.tagName.toLowerCase() : null;
|
||||
|
||||
if ((activeElTagName === 'textarea' || activeElTagName === 'input')
|
||||
&& /^(?:text|search|password|tel|url)$/i.test(activeEl.type)
|
||||
if ((activeElTagName === 'textarea' || activeElTagName === 'input')
|
||||
&& /^(?:text|search|password|tel|url)$/i.test(activeEl.type)
|
||||
&& (typeof activeEl.selectionStart === 'number')
|
||||
) {
|
||||
text = activeEl.value.slice(activeEl.selectionStart, activeEl.selectionEnd);
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ class EditorDoc implements ArrayableInterface, \JsonSerializable
|
|||
$this->path = $path;
|
||||
}
|
||||
|
||||
public function toArray() : array
|
||||
public function toArray() : array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
|
|
@ -233,12 +233,12 @@ class EditorDoc implements ArrayableInterface, \JsonSerializable
|
|||
];
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode($this->toArray());
|
||||
}
|
||||
|
||||
public function jsonSerialize()
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return $this->toArray();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user