mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-01-10 16:48:39 +00:00
more tests and some fixes
This commit is contained in:
parent
ebe4b85299
commit
49269de22f
9
.github/workflows/main.yml
vendored
9
.github/workflows/main.yml
vendored
|
|
@ -13,10 +13,15 @@ on:
|
|||
- cron: '0 0 1,15 * *'
|
||||
|
||||
jobs:
|
||||
general_module_workflow:
|
||||
general_module_workflow_php:
|
||||
uses: Karaka-Management/Karaka/.github/workflows/php_template.yml@develop
|
||||
secrets:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_PAT: ${{ secrets.GH_PAT }}
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
general_module_workflow_js:
|
||||
uses: Karaka-Management/Karaka/.github/workflows/js_template.yml@develop
|
||||
secrets:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_PAT: ${{ secrets.GH_PAT }}
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
|
@ -10,6 +10,7 @@ Autoloader.defineNamespace('omsApp.Modules');
|
|||
* @todo Create immediate text preview similar to a rich text editor or Typora.
|
||||
* https://github.com/Karaka-Management/oms-Editor/issues/4
|
||||
*/
|
||||
/* global omsApp */
|
||||
omsApp.Modules.Media = class {
|
||||
/**
|
||||
* @constructor
|
||||
|
|
@ -23,11 +24,14 @@ omsApp.Modules.Media = class {
|
|||
|
||||
bind (id)
|
||||
{
|
||||
const e = typeof id === 'undefined' ? document.getElementsByTagName('form') : [document.getElementById(id)],
|
||||
length = e.length;
|
||||
const e = typeof id === 'undefined'
|
||||
? document.getElementsByTagName('form')
|
||||
: [document.getElementById(id)];
|
||||
|
||||
const length = e.length;
|
||||
|
||||
for (let i = 0; i < length; ++i) {
|
||||
//this.bindElement(e[i]);
|
||||
// this.bindElement(e[i]);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ final class CollectionMapper extends MediaMapper
|
|||
*
|
||||
* As a result media files are structured by virutal path in the app, by file path on the file system
|
||||
* and by Collections which can have sub-collections as well. Collections allow to reference files
|
||||
* in a different virtual path and are therfore similar to "symlinks", except that they don't reference
|
||||
* in a different virtual path and are therefore similar to "symlinks", except that they don't reference
|
||||
* a file but create a new virtual media model which groups other media models together in a new virtual
|
||||
* path if so desired without deleting or moving the orginal media files.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Logger } from '../../../jsOMS/Log/Logger.js';
|
||||
import { Request } from '../../../jsOMS/Message/Request/Request.js';
|
||||
import { HttpRequest } from '../../../jsOMS/Message/Request/Request.js';
|
||||
import { RequestMethod } from '../../../jsOMS/Message/Request/RequestMethod.js';
|
||||
import { RequestType } from '../../../jsOMS/Message/Request/RequestType.js';
|
||||
|
||||
|
|
@ -154,9 +154,9 @@ export class Upload {
|
|||
* @todo Karaka/oms-Media#5
|
||||
* Validate file type and file size on the frontend before uploading
|
||||
*/
|
||||
const request = new HttpRequest(),
|
||||
formData = new FormData(),
|
||||
self = this;
|
||||
const request = new HttpRequest();
|
||||
const formData = new FormData();
|
||||
const self = this;
|
||||
|
||||
this.files.forEach(function (element, index)
|
||||
{
|
||||
|
|
@ -187,4 +187,4 @@ export class Upload {
|
|||
|
||||
request.send();
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user