NPM Resource Changed ? ? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
25 Oct 2020

Pull Request for Issue #31229

Summary of Changes

Use the Component options for the images

Testing Instructions

Follow the tasing instructions on the issue #31229

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Documentation Changes Required

avatar dgrammatiko dgrammatiko - open - 25 Oct 2020
avatar dgrammatiko dgrammatiko - change - 25 Oct 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Oct 2020
Category JavaScript Administration com_media NPM Change
avatar dgrammatiko dgrammatiko - change - 25 Oct 2020
Labels Added: NPM Resource Changed ?
avatar Quy Quy - change - 25 Oct 2020
The description was changed
avatar Quy Quy - edited - 25 Oct 2020
avatar Quy
Quy - comment - 25 Oct 2020

How to fix with the untranslated string when not one of the image extensions such as PDF?

avatar dgrammatiko
dgrammatiko - comment - 25 Oct 2020

How to fix with the untranslated string when not one of the image extensions such as PDF?

Well what I did here needs to be repeated for all the types, eg video, audio, documents

const imageExtensions = api.imagesExtensions;
const videoExtensions = api.videoExtensions;
const audioExtensions = api. audioExtensions;
const docExtensions = api. docExtensions;

Of course this requires the appropriate changes in the Api.js and some fields in the com_media options to handle video, audio and docs...
And then some more changes in the vue files to handle properly all these files (eg the fix in this PR is not fixing the missing thumb for the svg)

avatar Quy Quy - test_item - 25 Oct 2020 - Tested successfully
avatar Quy
Quy - comment - 25 Oct 2020

I have tested this item successfully on 5eec638


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31233.

avatar infograf768 infograf768 - test_item - 26 Oct 2020 - Tested successfully
avatar infograf768
infograf768 - comment - 26 Oct 2020

I have tested this item successfully on 5eec638


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31233.

avatar infograf768 infograf768 - change - 26 Oct 2020
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 26 Oct 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31233.

avatar infograf768
infograf768 - comment - 26 Oct 2020

@dgrammatiko
api question for ignorant people:
Where are the options.imagesExtensions (and similar for video which is for now limited to mp4, etc.) fetched from in Api.es6 ? Link to the code please.

avatar dgrammatiko
dgrammatiko - comment - 26 Oct 2020

@infograf768 follow the files touched here, eg
Api: line 26 in administrator/components/com_media/resources/scripts/app/Api.es6.js
which is the data that is passed in the template: line 47 in administrator/components/com_media/tmpl/media/default.php
which is the options from

<field
name="image_extensions"
type="text"
label="COM_MEDIA_FIELD_LEGAL_IMAGE_EXTENSIONS_LABEL"
description="COM_MEDIA_FIELD_LEGAL_IMAGE_EXTENSIONS_DESC"
size="50"
default="bmp,gif,jpg,png"
showon="restrict_uploads:1"
/>

Obviously video, audio and docs doesn't exist in the config.xml neither in the template neither in the Api (in the Api everything was hardcoded before this PR, but still there is work to be done for video, audio and docs)

avatar infograf768
infograf768 - comment - 27 Oct 2020

Got it. Thanks.

Merging this and hopefully you get some time to follow up. ;)

avatar infograf768 infograf768 - close - 27 Oct 2020
avatar infograf768 infograf768 - merge - 27 Oct 2020
avatar infograf768 infograf768 - change - 27 Oct 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-10-27 06:07:56
Closed_By infograf768
Labels Added: ?
avatar infograf768
infograf768 - comment - 27 Oct 2020

Tks.

Add a Comment

Login with GitHub to post a comment