mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-14 01:08:43 +00:00
update
This commit is contained in:
parent
0039e2f677
commit
ff3b15caff
|
|
@ -144,7 +144,7 @@ final class Installer extends InstallerAbstract
|
||||||
|
|
||||||
$module->apiEditorDocTypeCreate($request, $response);
|
$module->apiEditorDocTypeCreate($request, $response);
|
||||||
|
|
||||||
$responseData = $response->get('');
|
$responseData = $response->getData('');
|
||||||
if (!\is_array($responseData)) {
|
if (!\is_array($responseData)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
|
import { jsOMS } from '../../jsOMS/Utils/oLib.js';
|
||||||
import { Autoloader } from '../../jsOMS/Autoloader.js';
|
import { Autoloader } from '../../jsOMS/Autoloader.js';
|
||||||
import { Editor } from './Models/Editor.js';
|
import { Editor } from './Models/Editor.js';
|
||||||
|
|
||||||
Autoloader.defineNamespace('jsOMS.Modules');
|
Autoloader.defineNamespace('omsApp.Modules');
|
||||||
|
|
||||||
jsOMS.Modules.Editor = class {
|
omsApp.Modules.Editor = class {
|
||||||
constructor(app)
|
constructor(app)
|
||||||
{
|
{
|
||||||
this.app = app;
|
this.app = app;
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,7 @@ final class ApiController extends Controller
|
||||||
$internalResponse = new HttpResponse();
|
$internalResponse = new HttpResponse();
|
||||||
$this->app->moduleManager->get('Tag')->apiTagCreate($request, $internalResponse);
|
$this->app->moduleManager->get('Tag')->apiTagCreate($request, $internalResponse);
|
||||||
|
|
||||||
if (!\is_array($data = $internalResponse->get($request->uri->__toString()))) {
|
if (!\is_array($data = $internalResponse->getDataArray($request->uri->__toString()))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'يبدأ',
|
'Start' => 'يبدأ',
|
||||||
'Text' => 'نص',
|
'Text' => 'نص',
|
||||||
'Title' => 'عنوان',
|
'Title' => 'عنوان',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Start',
|
'Start' => 'Start',
|
||||||
'Text' => 'Text',
|
'Text' => 'Text',
|
||||||
'Title' => 'Titul',
|
'Title' => 'Titul',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Start',
|
'Start' => 'Start',
|
||||||
'Text' => 'Tekst',
|
'Text' => 'Tekst',
|
||||||
'Title' => 'Titel',
|
'Title' => 'Titel',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Anfang',
|
'Start' => 'Anfang',
|
||||||
'Text' => 'Text',
|
'Text' => 'Text',
|
||||||
'Title' => 'Titel',
|
'Title' => 'Titel',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Αρχή',
|
'Start' => 'Αρχή',
|
||||||
'Text' => 'Κείμενο',
|
'Text' => 'Κείμενο',
|
||||||
'Title' => 'Τίτλος',
|
'Title' => 'Τίτλος',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Comienzo',
|
'Start' => 'Comienzo',
|
||||||
'Text' => 'Texto',
|
'Text' => 'Texto',
|
||||||
'Title' => 'Título',
|
'Title' => 'Título',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'alkaa',
|
'Start' => 'alkaa',
|
||||||
'Text' => 'Teksti',
|
'Text' => 'Teksti',
|
||||||
'Title' => 'Otsikko',
|
'Title' => 'Otsikko',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Démarrer',
|
'Start' => 'Démarrer',
|
||||||
'Text' => 'Texte',
|
'Text' => 'Texte',
|
||||||
'Title' => 'Titre',
|
'Title' => 'Titre',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Rajt',
|
'Start' => 'Rajt',
|
||||||
'Text' => 'Szöveg',
|
'Text' => 'Szöveg',
|
||||||
'Title' => 'Cím',
|
'Title' => 'Cím',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Inizio',
|
'Start' => 'Inizio',
|
||||||
'Text' => 'Testo',
|
'Text' => 'Testo',
|
||||||
'Title' => 'Titolo',
|
'Title' => 'Titolo',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => '始める',
|
'Start' => '始める',
|
||||||
'Text' => '文章',
|
'Text' => '文章',
|
||||||
'Title' => 'タイトル',
|
'Title' => 'タイトル',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => '시작',
|
'Start' => '시작',
|
||||||
'Text' => '텍스트',
|
'Text' => '텍스트',
|
||||||
'Title' => '제목',
|
'Title' => '제목',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Start',
|
'Start' => 'Start',
|
||||||
'Text' => 'Tekst',
|
'Text' => 'Tekst',
|
||||||
'Title' => 'Tittel',
|
'Title' => 'Tittel',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Początek',
|
'Start' => 'Początek',
|
||||||
'Text' => 'Tekst',
|
'Text' => 'Tekst',
|
||||||
'Title' => 'Tytuł',
|
'Title' => 'Tytuł',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Começar',
|
'Start' => 'Começar',
|
||||||
'Text' => 'Texto',
|
'Text' => 'Texto',
|
||||||
'Title' => 'Título',
|
'Title' => 'Título',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Начинать',
|
'Start' => 'Начинать',
|
||||||
'Text' => 'Текст',
|
'Text' => 'Текст',
|
||||||
'Title' => 'Заголовок',
|
'Title' => 'Заголовок',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Start',
|
'Start' => 'Start',
|
||||||
'Text' => 'Text',
|
'Text' => 'Text',
|
||||||
'Title' => 'Titel',
|
'Title' => 'Titel',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'เริ่ม',
|
'Start' => 'เริ่ม',
|
||||||
'Text' => 'ข้อความ',
|
'Text' => 'ข้อความ',
|
||||||
'Title' => 'ชื่อ',
|
'Title' => 'ชื่อ',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Başlangıç',
|
'Start' => 'Başlangıç',
|
||||||
'Text' => 'Metin',
|
'Text' => 'Metin',
|
||||||
'Title' => 'Başlık',
|
'Title' => 'Başlık',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => 'Почати',
|
'Start' => 'Почати',
|
||||||
'Text' => 'Текст',
|
'Text' => 'Текст',
|
||||||
'Title' => 'Заголовок',
|
'Title' => 'Заголовок',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
||||||
'Start' => '开始',
|
'Start' => '开始',
|
||||||
'Text' => '文本',
|
'Text' => '文本',
|
||||||
'Title' => '标题',
|
'Title' => '标题',
|
||||||
'Type' => '#VALUE!',
|
'Type' => '',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -125,8 +125,8 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
$this->module->apiEditorCreate($request, $response);
|
$this->module->apiEditorCreate($request, $response);
|
||||||
|
|
||||||
self::assertEquals('Controller Test Title', $response->get('')['response']->title);
|
self::assertEquals('Controller Test Title', $response->getDataArray('')['response']->title);
|
||||||
self::assertGreaterThan(0, $response->get('')['response']->id);
|
self::assertGreaterThan(0, $response->getDataArray('')['response']->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -159,7 +159,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
$request->setData('media', \json_encode([1]));
|
$request->setData('media', \json_encode([1]));
|
||||||
|
|
||||||
$this->module->apiFileCreate($request, $response);
|
$this->module->apiFileCreate($request, $response);
|
||||||
self::assertCount(1, $response->get('')['response']);
|
self::assertCount(1, $response->getDataArray('')['response']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -226,9 +226,9 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
$this->module->apiEditorUpdate($request, $response);
|
$this->module->apiEditorUpdate($request, $response);
|
||||||
|
|
||||||
self::assertEquals('Changed Title', $response->get('')['response']->title);
|
self::assertEquals('Changed Title', $response->getDataArray('')['response']->title);
|
||||||
self::assertEquals('Changed Title', EditorDocMapper::get()->where('id', 1)->execute()->title);
|
self::assertEquals('Changed Title', EditorDocMapper::get()->where('id', 1)->execute()->title);
|
||||||
self::assertEquals(1, $response->get('')['response']->id);
|
self::assertEquals(1, $response->getDataArray('')['response']->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -244,7 +244,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
$request->setData('id', '1');
|
$request->setData('id', '1');
|
||||||
|
|
||||||
$this->module->apiEditorGet($request, $response);
|
$this->module->apiEditorGet($request, $response);
|
||||||
self::assertEquals('Changed Title', $response->get('')['response']->title);
|
self::assertEquals('Changed Title', $response->getDataArray('')['response']->title);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -268,7 +268,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
$this->module->apiEditorDelete($request, $response);
|
$this->module->apiEditorDelete($request, $response);
|
||||||
|
|
||||||
self::assertEquals($docId, $response->get('')['response']->id);
|
self::assertEquals($docId, $response->getDataArray('')['response']->id);
|
||||||
self::assertInstanceOf(NullEditorDoc::class, EditorDocMapper::get()->where('id', $docId)->execute());
|
self::assertInstanceOf(NullEditorDoc::class, EditorDocMapper::get()->where('id', $docId)->execute());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user