Fixed gh-120 that allows export of component with language translations
This commit is contained in:
@ -9,8 +9,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 366 of this MVC
|
||||
@build 7th September, 2017
|
||||
@version @update number 375 of this MVC
|
||||
@build 17th September, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage joomla_component.js
|
||||
|
@ -9,8 +9,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 39 of this MVC
|
||||
@build 7th April, 2017
|
||||
@version @update number 43 of this MVC
|
||||
@build 16th September, 2017
|
||||
@created 3rd April, 2017
|
||||
@package Component Builder
|
||||
@subpackage language_translation.js
|
||||
@ -26,39 +26,9 @@
|
||||
|
||||
jQuery(document).ready(function($)
|
||||
{
|
||||
// build table of translations
|
||||
var translation = encodeURIComponent(jQuery('#jform_translation').val());
|
||||
if (translation) {
|
||||
getBuildTable(translation,'jform_translation');
|
||||
}
|
||||
// set button to add more languages
|
||||
addButton('language','components');
|
||||
});
|
||||
|
||||
function getBuildTable_server(string, idName){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getBuildTable&format=json&vdm="+vastDevMod);
|
||||
if(token.length > 0 && string.length > 0 && idName.length > 0){
|
||||
var request = 'token='+token+'&idName='+idName+'&object='+string;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
function getBuildTable(string, idName){
|
||||
getBuildTable_server(string, idName).done(function(result) {
|
||||
jQuery('#table_'+idName).remove();
|
||||
if(result){
|
||||
addData(result, '#'+idName);
|
||||
}
|
||||
})
|
||||
}
|
||||
function addData(result, where){
|
||||
jQuery(where).closest('.control-group').parent().append(result);
|
||||
}
|
||||
function addButton_server(type){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0){
|
||||
|
@ -104,44 +104,41 @@
|
||||
readonly="true"
|
||||
disabled="true"
|
||||
/>
|
||||
<!-- Translation Field. Type: Repeatable. (joomla) -->
|
||||
<!-- Translation Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="repeatable"
|
||||
type="subform"
|
||||
name="translation"
|
||||
label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
description="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_DESCRIPTION"
|
||||
id="translation"
|
||||
class="translations"
|
||||
select="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_SELECT"
|
||||
icon="list"
|
||||
maximum="50">
|
||||
<fields name="translation_fields" label="">
|
||||
<fieldset hidden="true" name="translation_modal" repeat="true">
|
||||
<!-- Translation Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="translation"
|
||||
label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_LABEL"
|
||||
rows="4"
|
||||
cols="5"
|
||||
class="text_area span12"
|
||||
filter="STRING"
|
||||
hint="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_HINT"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Language Field. Type: Lang. (custom) -->
|
||||
<field
|
||||
type="lang"
|
||||
name="language"
|
||||
label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_LANGUAGE_LABEL"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="false"
|
||||
button="false"
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
maximum="200">
|
||||
<form hidden="true" name="list_translation_modal" repeat="true">
|
||||
<!-- Translation Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="translation"
|
||||
label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_LABEL"
|
||||
rows="4"
|
||||
cols="20"
|
||||
class="text_area translation_text_area"
|
||||
filter="STRING"
|
||||
hint="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_HINT"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Language Field. Type: Lang. (custom) -->
|
||||
<field
|
||||
type="lang"
|
||||
name="language"
|
||||
label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_LANGUAGE_LABEL"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="false"
|
||||
button="false"
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Components Field. Type: Components. (custom) -->
|
||||
<field
|
||||
|
Reference in New Issue
Block a user