added interface of the new decoupled libraries concept gh-92
This commit is contained in:
@ -90,9 +90,9 @@
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Dynamic Fields. -->
|
||||
<!-- Admin_view Field. Type: Adminviews. (custom) -->
|
||||
<!-- Admin_view Field. Type: Adminviewsreadonly. (custom) -->
|
||||
<field
|
||||
type="adminviews"
|
||||
type="adminviewsreadonly"
|
||||
name="admin_view"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADMIN_VIEW_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADMIN_VIEW_DESCRIPTION"
|
||||
|
@ -38,17 +38,17 @@ function getFieldSelectOptions_server(fieldId){
|
||||
});
|
||||
}
|
||||
|
||||
function getFieldSelectOptions(fieldKey, table_, nr_){
|
||||
function getFieldSelectOptions(fieldKey){
|
||||
// first check if the field is set
|
||||
if(jQuery("#jform_addconditions"+table_+"_addconditions"+fieldKey+nr_+"_match_field").length) {
|
||||
var fieldId = jQuery("#jform_addconditions"+table_+"_addconditions"+fieldKey+nr_+"_match_field option:selected").val();
|
||||
if(jQuery("#jform_addconditions__addconditions"+fieldKey+"__match_field").length) {
|
||||
var fieldId = jQuery("#jform_addconditions__addconditions"+fieldKey+"__match_field option:selected").val();
|
||||
getFieldSelectOptions_server(fieldId).done(function(result) {
|
||||
if(result){
|
||||
jQuery('textarea#jform_addconditions'+table_+'_addconditions'+fieldKey+nr_+'_match_options').val(result);
|
||||
jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__match_options').val(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('textarea#jform_addconditions'+table_+'_addconditions'+fieldKey+nr_+'_match_options').val('');
|
||||
jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__match_options').val('');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -90,9 +90,9 @@
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Dynamic Fields. -->
|
||||
<!-- Admin_view Field. Type: Adminviews. (custom) -->
|
||||
<!-- Admin_view Field. Type: Adminviewsreadonly. (custom) -->
|
||||
<field
|
||||
type="adminviews"
|
||||
type="adminviewsreadonly"
|
||||
name="admin_view"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADMIN_VIEW_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADMIN_VIEW_DESCRIPTION"
|
||||
|
@ -146,7 +146,7 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_CONFIG_TABNAME_LABEL"
|
||||
size="40"
|
||||
maxlength="150"
|
||||
default="Global"
|
||||
default="Library"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_CONFIG_TABNAME_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="false"
|
||||
|
@ -103,9 +103,9 @@
|
||||
button="false"
|
||||
/>
|
||||
<!-- Note_add_folders Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_add_folders" label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_ADD_FOLDERS_LABEL" description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_ADD_FOLDERS_DESCRIPTION" heading="h4" class="alert alert-info note_add_folders" close="false" />
|
||||
<field type="note" name="note_add_folders" label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_ADD_FOLDERS_LABEL" description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_ADD_FOLDERS_DESCRIPTION" heading="h4" class="alert alert-info note_add_folders" />
|
||||
<!-- Note_add_files Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_add_files" label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_ADD_FILES_LABEL" description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_ADD_FILES_DESCRIPTION" heading="h4" class="alert alert-info note_add_files" close="false" />
|
||||
<field type="note" name="note_add_files" label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_ADD_FILES_LABEL" description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_ADD_FILES_DESCRIPTION" heading="h4" class="alert alert-info note_add_files" />
|
||||
<!-- Addfiles Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
|
@ -493,4 +493,76 @@ function getTemplateDetails(id){
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// set snippets that are on the page
|
||||
var snippetIds = [];
|
||||
var snippets = {};
|
||||
var snippet = 0;
|
||||
jQuery(document).ready(function($)
|
||||
{
|
||||
jQuery("#jform_snippet option").each(function()
|
||||
{
|
||||
var key = jQuery(this).val();
|
||||
var text = jQuery(this).text();
|
||||
snippets[key] = text;
|
||||
snippetIds.push(key);
|
||||
});
|
||||
snippet = jQuery("#jform_snippet").val();
|
||||
getSnippets();
|
||||
});
|
||||
|
||||
function getSnippets_server(libraries){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&format=json";
|
||||
if(token.length > 0 && libraries.length > 0){
|
||||
var request = 'token='+token+'&libraries='+JSON.stringify(libraries);
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
function getSnippets(){
|
||||
jQuery("#loading").show();
|
||||
// clear the selection
|
||||
jQuery('#jform_snippet').find('option').remove().end();
|
||||
jQuery('#jform_snippet').trigger('liszt:updated');
|
||||
// get country value if set
|
||||
var libraries = jQuery("#jform_libraries").val();
|
||||
if (libraries) {
|
||||
getSnippets_server(libraries).done(function(result) {
|
||||
setSnippets(result);
|
||||
jQuery("#loading").hide();
|
||||
if (typeof snippetButton !== 'undefined') {
|
||||
// ensure button is correct
|
||||
var snippet = jQuery('#jform_snippet').val();
|
||||
snippetButton(snippet);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// load all snippets in none is selected
|
||||
setSnippets(snippetIds);
|
||||
jQuery("#loading").hide();
|
||||
}
|
||||
}
|
||||
function setSnippets(array){
|
||||
if (array) {
|
||||
jQuery('#jform_snippet').append('<option value="">'+select_a_snippet+'</option>');
|
||||
jQuery.each( array, function( i, id ) {
|
||||
if (id in snippets) {
|
||||
jQuery('#jform_snippet').append('<option value="'+id+'">'+snippets[id]+'</option>');
|
||||
}
|
||||
if (id == snippet) {
|
||||
jQuery('#jform_snippet').val(id);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
jQuery('#jform_snippet').append('<option value="">'+create_a_snippet+'</option>');
|
||||
}
|
||||
jQuery('#jform_snippet').trigger('liszt:updated');
|
||||
}
|
||||
|
@ -153,11 +153,24 @@
|
||||
type="snippets"
|
||||
name="snippet"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
required="false"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Note_libraries_selection Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_libraries_selection" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_LABEL" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION" heading="h4" class="alert alert-info note_libraries_selection" />
|
||||
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
|
||||
<!-- Icon Field. Type: Media. (joomla) -->
|
||||
<field
|
||||
type="media"
|
||||
name="icon"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON_DESCRIPTION"
|
||||
directory=""
|
||||
/>
|
||||
<!-- Add_php_jview Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -172,20 +185,6 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Add_php_view Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_view"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_VIEW_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Add_css_document Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -200,23 +199,11 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
|
||||
<!-- Icon Field. Type: Media. (joomla) -->
|
||||
<field
|
||||
type="media"
|
||||
name="icon"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ICON_DESCRIPTION"
|
||||
directory=""
|
||||
/>
|
||||
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
|
||||
<!-- Add_php_jview_display Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_document Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_jview_display"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_JVIEW_DISPLAY_LABEL"
|
||||
name="add_php_document"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_DOCUMENT_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -226,13 +213,23 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
|
||||
<!-- Add_js_document Field. Type: Radio. (joomla) -->
|
||||
<!-- Libraries Field. Type: Libraries. (custom) -->
|
||||
<field
|
||||
type="libraries"
|
||||
name="libraries"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_LIBRARIES_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="true"
|
||||
default="0"
|
||||
required="false"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Add_php_jview_display Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_js_document"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_JS_DOCUMENT_LABEL"
|
||||
name="add_php_jview_display"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_JVIEW_DISPLAY_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -255,6 +252,22 @@
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_CONTROLLER_HINT"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Add_js_document Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_js_document"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_JS_DOCUMENT_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
|
||||
<!-- Add_css Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -269,172 +282,8 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Default Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="default"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DEFAULT_LABEL"
|
||||
rows="20"
|
||||
cols="15"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DEFAULT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_php_document Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_document"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_DOCUMENT_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_model Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_model"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_MODEL_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_MODEL_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_MODEL_HINT"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Not_required Field. Type: Hidden. (joomla) -->
|
||||
<field
|
||||
type="hidden"
|
||||
name="not_required"
|
||||
default="[]"
|
||||
/>
|
||||
<!-- Php_document Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_document"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_DOCUMENT_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_DOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_DOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Custom_get Field. Type: Customgets. (custom) -->
|
||||
<field
|
||||
type="customgets"
|
||||
name="custom_get"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CUSTOM_GET_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CUSTOM_GET_DESCRIPTION"
|
||||
multiple="true"
|
||||
/>
|
||||
<!-- Php_view Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_view"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_VIEW_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_VIEW_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_VIEW_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Main_get Field. Type: Maingets. (custom) -->
|
||||
<field
|
||||
type="maingets"
|
||||
name="main_get"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_DESCRIPTION"
|
||||
multiple="false"
|
||||
required="true"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Php_jview_display Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_jview_display"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_DISPLAY_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_DISPLAY_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_DISPLAY_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Dynamic_get Field. Type: Dynamicgets. (custom) -->
|
||||
<field
|
||||
type="dynamicgets"
|
||||
name="dynamic_get"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DYNAMIC_GET_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DYNAMIC_GET_DESCRIPTION"
|
||||
multiple="false"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Php_jview Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_jview"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Dynamic_values Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="dynamic_values" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DYNAMIC_VALUES_LABEL" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DYNAMIC_VALUES_DESCRIPTION" heading="h4" class="dynamic_values" />
|
||||
<!-- Js_document Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="js_document"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JS_DOCUMENT_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JS_DOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JS_DOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_custom_button Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_custom_button"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Css_document Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="css_document"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CSS_DOCUMENT_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CSS_DOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CSS_DOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
|
||||
<!-- Custom_button Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
@ -944,6 +793,172 @@
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Default Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="default"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DEFAULT_LABEL"
|
||||
rows="20"
|
||||
cols="15"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DEFAULT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_model Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_model"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_MODEL_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_MODEL_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_MODEL_HINT"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Add_php_view Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_view"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_VIEW_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_document Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_document"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_DOCUMENT_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_DOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_DOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Not_required Field. Type: Hidden. (joomla) -->
|
||||
<field
|
||||
type="hidden"
|
||||
name="not_required"
|
||||
default="[]"
|
||||
/>
|
||||
<!-- Php_view Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_view"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_VIEW_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_VIEW_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_VIEW_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Custom_get Field. Type: Customgets. (custom) -->
|
||||
<field
|
||||
type="customgets"
|
||||
name="custom_get"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CUSTOM_GET_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CUSTOM_GET_DESCRIPTION"
|
||||
multiple="true"
|
||||
/>
|
||||
<!-- Php_jview_display Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_jview_display"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_DISPLAY_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_DISPLAY_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_DISPLAY_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Main_get Field. Type: Maingets. (custom) -->
|
||||
<field
|
||||
type="maingets"
|
||||
name="main_get"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_DESCRIPTION"
|
||||
multiple="false"
|
||||
required="true"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Php_jview Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_jview"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP_JVIEW_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Dynamic_get Field. Type: Dynamicgets. (custom) -->
|
||||
<field
|
||||
type="dynamicgets"
|
||||
name="dynamic_get"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DYNAMIC_GET_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DYNAMIC_GET_DESCRIPTION"
|
||||
multiple="false"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Js_document Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="js_document"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JS_DOCUMENT_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JS_DOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JS_DOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Dynamic_values Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="dynamic_values" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DYNAMIC_VALUES_LABEL" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DYNAMIC_VALUES_DESCRIPTION" heading="h4" class="dynamic_values" />
|
||||
<!-- Css_document Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="css_document"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CSS_DOCUMENT_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CSS_DOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CSS_DOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_custom_button Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_custom_button"
|
||||
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Css Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
|
@ -23,171 +23,171 @@
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_vvvvvzuvzm_required = false;
|
||||
jform_vvvvvzvvzn_required = false;
|
||||
jform_vvvvvzwvzo_required = false;
|
||||
jform_vvvvvzxvzp_required = false;
|
||||
jform_vvvvwaavzq_required = false;
|
||||
jform_vvvvwabvzr_required = false;
|
||||
jform_vvvvwacvzs_required = false;
|
||||
jform_vvvvwadvzt_required = false;
|
||||
jform_vvvvwaavzo_required = false;
|
||||
jform_vvvvwabvzp_required = false;
|
||||
jform_vvvvwacvzq_required = false;
|
||||
jform_vvvvwadvzr_required = false;
|
||||
jform_vvvvwagvzs_required = false;
|
||||
jform_vvvvwahvzt_required = false;
|
||||
jform_vvvvwaivzu_required = false;
|
||||
jform_vvvvwajvzv_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var datalenght_vvvvvzu = jQuery("#jform_datalenght").val();
|
||||
vvvvvzu(datalenght_vvvvvzu);
|
||||
var datalenght_vvvvwaa = jQuery("#jform_datalenght").val();
|
||||
vvvvwaa(datalenght_vvvvwaa);
|
||||
|
||||
var datadefault_vvvvvzv = jQuery("#jform_datadefault").val();
|
||||
vvvvvzv(datadefault_vvvvvzv);
|
||||
var datadefault_vvvvwab = jQuery("#jform_datadefault").val();
|
||||
vvvvwab(datadefault_vvvvwab);
|
||||
|
||||
var datatype_vvvvvzw = jQuery("#jform_datatype").val();
|
||||
vvvvvzw(datatype_vvvvvzw);
|
||||
var datatype_vvvvwac = jQuery("#jform_datatype").val();
|
||||
vvvvwac(datatype_vvvvwac);
|
||||
|
||||
var datatype_vvvvvzx = jQuery("#jform_datatype").val();
|
||||
vvvvvzx(datatype_vvvvvzx);
|
||||
var datatype_vvvvwad = jQuery("#jform_datatype").val();
|
||||
vvvvwad(datatype_vvvvwad);
|
||||
|
||||
var store_vvvvvzy = jQuery("#jform_store").val();
|
||||
var datatype_vvvvvzy = jQuery("#jform_datatype").val();
|
||||
vvvvvzy(store_vvvvvzy,datatype_vvvvvzy);
|
||||
var store_vvvvwae = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwae = jQuery("#jform_datatype").val();
|
||||
vvvvwae(store_vvvvwae,datatype_vvvvwae);
|
||||
|
||||
var add_css_view_vvvvwaa = jQuery("#jform_add_css_view input[type='radio']:checked").val();
|
||||
vvvvwaa(add_css_view_vvvvwaa);
|
||||
var add_css_view_vvvvwag = jQuery("#jform_add_css_view input[type='radio']:checked").val();
|
||||
vvvvwag(add_css_view_vvvvwag);
|
||||
|
||||
var add_css_views_vvvvwab = jQuery("#jform_add_css_views input[type='radio']:checked").val();
|
||||
vvvvwab(add_css_views_vvvvwab);
|
||||
var add_css_views_vvvvwah = jQuery("#jform_add_css_views input[type='radio']:checked").val();
|
||||
vvvvwah(add_css_views_vvvvwah);
|
||||
|
||||
var add_javascript_view_footer_vvvvwac = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
|
||||
vvvvwac(add_javascript_view_footer_vvvvwac);
|
||||
var add_javascript_view_footer_vvvvwai = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
|
||||
vvvvwai(add_javascript_view_footer_vvvvwai);
|
||||
|
||||
var add_javascript_views_footer_vvvvwad = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
|
||||
vvvvwad(add_javascript_views_footer_vvvvwad);
|
||||
var add_javascript_views_footer_vvvvwaj = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
|
||||
vvvvwaj(add_javascript_views_footer_vvvvwaj);
|
||||
});
|
||||
|
||||
// the vvvvvzu function
|
||||
function vvvvvzu(datalenght_vvvvvzu)
|
||||
// the vvvvwaa function
|
||||
function vvvvwaa(datalenght_vvvvwaa)
|
||||
{
|
||||
if (isSet(datalenght_vvvvvzu) && datalenght_vvvvvzu.constructor !== Array)
|
||||
if (isSet(datalenght_vvvvwaa) && datalenght_vvvvwaa.constructor !== Array)
|
||||
{
|
||||
var temp_vvvvvzu = datalenght_vvvvvzu;
|
||||
var datalenght_vvvvvzu = [];
|
||||
datalenght_vvvvvzu.push(temp_vvvvvzu);
|
||||
var temp_vvvvwaa = datalenght_vvvvwaa;
|
||||
var datalenght_vvvvwaa = [];
|
||||
datalenght_vvvvwaa.push(temp_vvvvwaa);
|
||||
}
|
||||
else if (!isSet(datalenght_vvvvvzu))
|
||||
else if (!isSet(datalenght_vvvvwaa))
|
||||
{
|
||||
var datalenght_vvvvvzu = [];
|
||||
var datalenght_vvvvwaa = [];
|
||||
}
|
||||
var datalenght = datalenght_vvvvvzu.some(datalenght_vvvvvzu_SomeFunc);
|
||||
var datalenght = datalenght_vvvvwaa.some(datalenght_vvvvwaa_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (datalenght)
|
||||
{
|
||||
jQuery('#jform_datalenght_other').closest('.control-group').show();
|
||||
if (jform_vvvvvzuvzm_required)
|
||||
if (jform_vvvvwaavzo_required)
|
||||
{
|
||||
updateFieldRequired('datalenght_other',0);
|
||||
jQuery('#jform_datalenght_other').prop('required','required');
|
||||
jQuery('#jform_datalenght_other').attr('aria-required',true);
|
||||
jQuery('#jform_datalenght_other').addClass('required');
|
||||
jform_vvvvvzuvzm_required = false;
|
||||
jform_vvvvwaavzo_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_datalenght_other').closest('.control-group').hide();
|
||||
if (!jform_vvvvvzuvzm_required)
|
||||
if (!jform_vvvvwaavzo_required)
|
||||
{
|
||||
updateFieldRequired('datalenght_other',1);
|
||||
jQuery('#jform_datalenght_other').removeAttr('required');
|
||||
jQuery('#jform_datalenght_other').removeAttr('aria-required');
|
||||
jQuery('#jform_datalenght_other').removeClass('required');
|
||||
jform_vvvvvzuvzm_required = true;
|
||||
jform_vvvvwaavzo_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvvzu Some function
|
||||
function datalenght_vvvvvzu_SomeFunc(datalenght_vvvvvzu)
|
||||
// the vvvvwaa Some function
|
||||
function datalenght_vvvvwaa_SomeFunc(datalenght_vvvvwaa)
|
||||
{
|
||||
// set the function logic
|
||||
if (datalenght_vvvvvzu == 'Other')
|
||||
if (datalenght_vvvvwaa == 'Other')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the vvvvvzv function
|
||||
function vvvvvzv(datadefault_vvvvvzv)
|
||||
// the vvvvwab function
|
||||
function vvvvwab(datadefault_vvvvwab)
|
||||
{
|
||||
if (isSet(datadefault_vvvvvzv) && datadefault_vvvvvzv.constructor !== Array)
|
||||
if (isSet(datadefault_vvvvwab) && datadefault_vvvvwab.constructor !== Array)
|
||||
{
|
||||
var temp_vvvvvzv = datadefault_vvvvvzv;
|
||||
var datadefault_vvvvvzv = [];
|
||||
datadefault_vvvvvzv.push(temp_vvvvvzv);
|
||||
var temp_vvvvwab = datadefault_vvvvwab;
|
||||
var datadefault_vvvvwab = [];
|
||||
datadefault_vvvvwab.push(temp_vvvvwab);
|
||||
}
|
||||
else if (!isSet(datadefault_vvvvvzv))
|
||||
else if (!isSet(datadefault_vvvvwab))
|
||||
{
|
||||
var datadefault_vvvvvzv = [];
|
||||
var datadefault_vvvvwab = [];
|
||||
}
|
||||
var datadefault = datadefault_vvvvvzv.some(datadefault_vvvvvzv_SomeFunc);
|
||||
var datadefault = datadefault_vvvvwab.some(datadefault_vvvvwab_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (datadefault)
|
||||
{
|
||||
jQuery('#jform_datadefault_other').closest('.control-group').show();
|
||||
if (jform_vvvvvzvvzn_required)
|
||||
if (jform_vvvvwabvzp_required)
|
||||
{
|
||||
updateFieldRequired('datadefault_other',0);
|
||||
jQuery('#jform_datadefault_other').prop('required','required');
|
||||
jQuery('#jform_datadefault_other').attr('aria-required',true);
|
||||
jQuery('#jform_datadefault_other').addClass('required');
|
||||
jform_vvvvvzvvzn_required = false;
|
||||
jform_vvvvwabvzp_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_datadefault_other').closest('.control-group').hide();
|
||||
if (!jform_vvvvvzvvzn_required)
|
||||
if (!jform_vvvvwabvzp_required)
|
||||
{
|
||||
updateFieldRequired('datadefault_other',1);
|
||||
jQuery('#jform_datadefault_other').removeAttr('required');
|
||||
jQuery('#jform_datadefault_other').removeAttr('aria-required');
|
||||
jQuery('#jform_datadefault_other').removeClass('required');
|
||||
jform_vvvvvzvvzn_required = true;
|
||||
jform_vvvvwabvzp_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvvzv Some function
|
||||
function datadefault_vvvvvzv_SomeFunc(datadefault_vvvvvzv)
|
||||
// the vvvvwab Some function
|
||||
function datadefault_vvvvwab_SomeFunc(datadefault_vvvvwab)
|
||||
{
|
||||
// set the function logic
|
||||
if (datadefault_vvvvvzv == 'Other')
|
||||
if (datadefault_vvvvwab == 'Other')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the vvvvvzw function
|
||||
function vvvvvzw(datatype_vvvvvzw)
|
||||
// the vvvvwac function
|
||||
function vvvvwac(datatype_vvvvwac)
|
||||
{
|
||||
if (isSet(datatype_vvvvvzw) && datatype_vvvvvzw.constructor !== Array)
|
||||
if (isSet(datatype_vvvvwac) && datatype_vvvvwac.constructor !== Array)
|
||||
{
|
||||
var temp_vvvvvzw = datatype_vvvvvzw;
|
||||
var datatype_vvvvvzw = [];
|
||||
datatype_vvvvvzw.push(temp_vvvvvzw);
|
||||
var temp_vvvvwac = datatype_vvvvwac;
|
||||
var datatype_vvvvwac = [];
|
||||
datatype_vvvvwac.push(temp_vvvvwac);
|
||||
}
|
||||
else if (!isSet(datatype_vvvvvzw))
|
||||
else if (!isSet(datatype_vvvvwac))
|
||||
{
|
||||
var datatype_vvvvvzw = [];
|
||||
var datatype_vvvvwac = [];
|
||||
}
|
||||
var datatype = datatype_vvvvvzw.some(datatype_vvvvvzw_SomeFunc);
|
||||
var datatype = datatype_vvvvwac.some(datatype_vvvvwac_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
@ -196,13 +196,13 @@ function vvvvvzw(datatype_vvvvvzw)
|
||||
jQuery('#jform_datadefault').closest('.control-group').show();
|
||||
jQuery('#jform_datalenght').closest('.control-group').show();
|
||||
jQuery('#jform_indexes').closest('.control-group').show();
|
||||
if (jform_vvvvvzwvzo_required)
|
||||
if (jform_vvvvwacvzq_required)
|
||||
{
|
||||
updateFieldRequired('indexes',0);
|
||||
jQuery('#jform_indexes').prop('required','required');
|
||||
jQuery('#jform_indexes').attr('aria-required',true);
|
||||
jQuery('#jform_indexes').addClass('required');
|
||||
jform_vvvvvzwvzo_required = false;
|
||||
jform_vvvvwacvzq_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
@ -211,109 +211,109 @@ function vvvvvzw(datatype_vvvvvzw)
|
||||
jQuery('#jform_datadefault').closest('.control-group').hide();
|
||||
jQuery('#jform_datalenght').closest('.control-group').hide();
|
||||
jQuery('#jform_indexes').closest('.control-group').hide();
|
||||
if (!jform_vvvvvzwvzo_required)
|
||||
if (!jform_vvvvwacvzq_required)
|
||||
{
|
||||
updateFieldRequired('indexes',1);
|
||||
jQuery('#jform_indexes').removeAttr('required');
|
||||
jQuery('#jform_indexes').removeAttr('aria-required');
|
||||
jQuery('#jform_indexes').removeClass('required');
|
||||
jform_vvvvvzwvzo_required = true;
|
||||
jform_vvvvwacvzq_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvvzw Some function
|
||||
function datatype_vvvvvzw_SomeFunc(datatype_vvvvvzw)
|
||||
// the vvvvwac Some function
|
||||
function datatype_vvvvwac_SomeFunc(datatype_vvvvwac)
|
||||
{
|
||||
// set the function logic
|
||||
if (datatype_vvvvvzw == 'CHAR' || datatype_vvvvvzw == 'VARCHAR' || datatype_vvvvvzw == 'DATETIME' || datatype_vvvvvzw == 'DATE' || datatype_vvvvvzw == 'TIME' || datatype_vvvvvzw == 'INT' || datatype_vvvvvzw == 'TINYINT' || datatype_vvvvvzw == 'BIGINT' || datatype_vvvvvzw == 'FLOAT' || datatype_vvvvvzw == 'DECIMAL' || datatype_vvvvvzw == 'DOUBLE')
|
||||
if (datatype_vvvvwac == 'CHAR' || datatype_vvvvwac == 'VARCHAR' || datatype_vvvvwac == 'DATETIME' || datatype_vvvvwac == 'DATE' || datatype_vvvvwac == 'TIME' || datatype_vvvvwac == 'INT' || datatype_vvvvwac == 'TINYINT' || datatype_vvvvwac == 'BIGINT' || datatype_vvvvwac == 'FLOAT' || datatype_vvvvwac == 'DECIMAL' || datatype_vvvvwac == 'DOUBLE')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the vvvvvzx function
|
||||
function vvvvvzx(datatype_vvvvvzx)
|
||||
// the vvvvwad function
|
||||
function vvvvwad(datatype_vvvvwad)
|
||||
{
|
||||
if (isSet(datatype_vvvvvzx) && datatype_vvvvvzx.constructor !== Array)
|
||||
if (isSet(datatype_vvvvwad) && datatype_vvvvwad.constructor !== Array)
|
||||
{
|
||||
var temp_vvvvvzx = datatype_vvvvvzx;
|
||||
var datatype_vvvvvzx = [];
|
||||
datatype_vvvvvzx.push(temp_vvvvvzx);
|
||||
var temp_vvvvwad = datatype_vvvvwad;
|
||||
var datatype_vvvvwad = [];
|
||||
datatype_vvvvwad.push(temp_vvvvwad);
|
||||
}
|
||||
else if (!isSet(datatype_vvvvvzx))
|
||||
else if (!isSet(datatype_vvvvwad))
|
||||
{
|
||||
var datatype_vvvvvzx = [];
|
||||
var datatype_vvvvwad = [];
|
||||
}
|
||||
var datatype = datatype_vvvvvzx.some(datatype_vvvvvzx_SomeFunc);
|
||||
var datatype = datatype_vvvvwad.some(datatype_vvvvwad_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (datatype)
|
||||
{
|
||||
jQuery('#jform_store').closest('.control-group').show();
|
||||
if (jform_vvvvvzxvzp_required)
|
||||
if (jform_vvvvwadvzr_required)
|
||||
{
|
||||
updateFieldRequired('store',0);
|
||||
jQuery('#jform_store').prop('required','required');
|
||||
jQuery('#jform_store').attr('aria-required',true);
|
||||
jQuery('#jform_store').addClass('required');
|
||||
jform_vvvvvzxvzp_required = false;
|
||||
jform_vvvvwadvzr_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_store').closest('.control-group').hide();
|
||||
if (!jform_vvvvvzxvzp_required)
|
||||
if (!jform_vvvvwadvzr_required)
|
||||
{
|
||||
updateFieldRequired('store',1);
|
||||
jQuery('#jform_store').removeAttr('required');
|
||||
jQuery('#jform_store').removeAttr('aria-required');
|
||||
jQuery('#jform_store').removeClass('required');
|
||||
jform_vvvvvzxvzp_required = true;
|
||||
jform_vvvvwadvzr_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvvzx Some function
|
||||
function datatype_vvvvvzx_SomeFunc(datatype_vvvvvzx)
|
||||
// the vvvvwad Some function
|
||||
function datatype_vvvvwad_SomeFunc(datatype_vvvvwad)
|
||||
{
|
||||
// set the function logic
|
||||
if (datatype_vvvvvzx == 'CHAR' || datatype_vvvvvzx == 'VARCHAR' || datatype_vvvvvzx == 'TEXT' || datatype_vvvvvzx == 'MEDIUMTEXT' || datatype_vvvvvzx == 'LONGTEXT')
|
||||
if (datatype_vvvvwad == 'CHAR' || datatype_vvvvwad == 'VARCHAR' || datatype_vvvvwad == 'TEXT' || datatype_vvvvwad == 'MEDIUMTEXT' || datatype_vvvvwad == 'LONGTEXT')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the vvvvvzy function
|
||||
function vvvvvzy(store_vvvvvzy,datatype_vvvvvzy)
|
||||
// the vvvvwae function
|
||||
function vvvvwae(store_vvvvwae,datatype_vvvvwae)
|
||||
{
|
||||
if (isSet(store_vvvvvzy) && store_vvvvvzy.constructor !== Array)
|
||||
if (isSet(store_vvvvwae) && store_vvvvwae.constructor !== Array)
|
||||
{
|
||||
var temp_vvvvvzy = store_vvvvvzy;
|
||||
var store_vvvvvzy = [];
|
||||
store_vvvvvzy.push(temp_vvvvvzy);
|
||||
var temp_vvvvwae = store_vvvvwae;
|
||||
var store_vvvvwae = [];
|
||||
store_vvvvwae.push(temp_vvvvwae);
|
||||
}
|
||||
else if (!isSet(store_vvvvvzy))
|
||||
else if (!isSet(store_vvvvwae))
|
||||
{
|
||||
var store_vvvvvzy = [];
|
||||
var store_vvvvwae = [];
|
||||
}
|
||||
var store = store_vvvvvzy.some(store_vvvvvzy_SomeFunc);
|
||||
var store = store_vvvvwae.some(store_vvvvwae_SomeFunc);
|
||||
|
||||
if (isSet(datatype_vvvvvzy) && datatype_vvvvvzy.constructor !== Array)
|
||||
if (isSet(datatype_vvvvwae) && datatype_vvvvwae.constructor !== Array)
|
||||
{
|
||||
var temp_vvvvvzy = datatype_vvvvvzy;
|
||||
var datatype_vvvvvzy = [];
|
||||
datatype_vvvvvzy.push(temp_vvvvvzy);
|
||||
var temp_vvvvwae = datatype_vvvvwae;
|
||||
var datatype_vvvvwae = [];
|
||||
datatype_vvvvwae.push(temp_vvvvwae);
|
||||
}
|
||||
else if (!isSet(datatype_vvvvvzy))
|
||||
else if (!isSet(datatype_vvvvwae))
|
||||
{
|
||||
var datatype_vvvvvzy = [];
|
||||
var datatype_vvvvwae = [];
|
||||
}
|
||||
var datatype = datatype_vvvvvzy.some(datatype_vvvvvzy_SomeFunc);
|
||||
var datatype = datatype_vvvvwae.some(datatype_vvvvwae_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
@ -327,148 +327,148 @@ function vvvvvzy(store_vvvvvzy,datatype_vvvvvzy)
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvvzy Some function
|
||||
function store_vvvvvzy_SomeFunc(store_vvvvvzy)
|
||||
// the vvvvwae Some function
|
||||
function store_vvvvwae_SomeFunc(store_vvvvwae)
|
||||
{
|
||||
// set the function logic
|
||||
if (store_vvvvvzy == 4)
|
||||
if (store_vvvvwae == 4)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the vvvvvzy Some function
|
||||
function datatype_vvvvvzy_SomeFunc(datatype_vvvvvzy)
|
||||
// the vvvvwae Some function
|
||||
function datatype_vvvvwae_SomeFunc(datatype_vvvvwae)
|
||||
{
|
||||
// set the function logic
|
||||
if (datatype_vvvvvzy == 'CHAR' || datatype_vvvvvzy == 'VARCHAR' || datatype_vvvvvzy == 'TEXT' || datatype_vvvvvzy == 'MEDIUMTEXT' || datatype_vvvvvzy == 'LONGTEXT')
|
||||
if (datatype_vvvvwae == 'CHAR' || datatype_vvvvwae == 'VARCHAR' || datatype_vvvvwae == 'TEXT' || datatype_vvvvwae == 'MEDIUMTEXT' || datatype_vvvvwae == 'LONGTEXT')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the vvvvwaa function
|
||||
function vvvvwaa(add_css_view_vvvvwaa)
|
||||
// the vvvvwag function
|
||||
function vvvvwag(add_css_view_vvvvwag)
|
||||
{
|
||||
// set the function logic
|
||||
if (add_css_view_vvvvwaa == 1)
|
||||
if (add_css_view_vvvvwag == 1)
|
||||
{
|
||||
jQuery('#jform_css_view').closest('.control-group').show();
|
||||
if (jform_vvvvwaavzq_required)
|
||||
if (jform_vvvvwagvzs_required)
|
||||
{
|
||||
updateFieldRequired('css_view',0);
|
||||
jQuery('#jform_css_view').prop('required','required');
|
||||
jQuery('#jform_css_view').attr('aria-required',true);
|
||||
jQuery('#jform_css_view').addClass('required');
|
||||
jform_vvvvwaavzq_required = false;
|
||||
jform_vvvvwagvzs_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_css_view').closest('.control-group').hide();
|
||||
if (!jform_vvvvwaavzq_required)
|
||||
if (!jform_vvvvwagvzs_required)
|
||||
{
|
||||
updateFieldRequired('css_view',1);
|
||||
jQuery('#jform_css_view').removeAttr('required');
|
||||
jQuery('#jform_css_view').removeAttr('aria-required');
|
||||
jQuery('#jform_css_view').removeClass('required');
|
||||
jform_vvvvwaavzq_required = true;
|
||||
jform_vvvvwagvzs_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvwab function
|
||||
function vvvvwab(add_css_views_vvvvwab)
|
||||
// the vvvvwah function
|
||||
function vvvvwah(add_css_views_vvvvwah)
|
||||
{
|
||||
// set the function logic
|
||||
if (add_css_views_vvvvwab == 1)
|
||||
if (add_css_views_vvvvwah == 1)
|
||||
{
|
||||
jQuery('#jform_css_views').closest('.control-group').show();
|
||||
if (jform_vvvvwabvzr_required)
|
||||
if (jform_vvvvwahvzt_required)
|
||||
{
|
||||
updateFieldRequired('css_views',0);
|
||||
jQuery('#jform_css_views').prop('required','required');
|
||||
jQuery('#jform_css_views').attr('aria-required',true);
|
||||
jQuery('#jform_css_views').addClass('required');
|
||||
jform_vvvvwabvzr_required = false;
|
||||
jform_vvvvwahvzt_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_css_views').closest('.control-group').hide();
|
||||
if (!jform_vvvvwabvzr_required)
|
||||
if (!jform_vvvvwahvzt_required)
|
||||
{
|
||||
updateFieldRequired('css_views',1);
|
||||
jQuery('#jform_css_views').removeAttr('required');
|
||||
jQuery('#jform_css_views').removeAttr('aria-required');
|
||||
jQuery('#jform_css_views').removeClass('required');
|
||||
jform_vvvvwabvzr_required = true;
|
||||
jform_vvvvwahvzt_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvwac function
|
||||
function vvvvwac(add_javascript_view_footer_vvvvwac)
|
||||
// the vvvvwai function
|
||||
function vvvvwai(add_javascript_view_footer_vvvvwai)
|
||||
{
|
||||
// set the function logic
|
||||
if (add_javascript_view_footer_vvvvwac == 1)
|
||||
if (add_javascript_view_footer_vvvvwai == 1)
|
||||
{
|
||||
jQuery('#jform_javascript_view_footer').closest('.control-group').show();
|
||||
if (jform_vvvvwacvzs_required)
|
||||
if (jform_vvvvwaivzu_required)
|
||||
{
|
||||
updateFieldRequired('javascript_view_footer',0);
|
||||
jQuery('#jform_javascript_view_footer').prop('required','required');
|
||||
jQuery('#jform_javascript_view_footer').attr('aria-required',true);
|
||||
jQuery('#jform_javascript_view_footer').addClass('required');
|
||||
jform_vvvvwacvzs_required = false;
|
||||
jform_vvvvwaivzu_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_javascript_view_footer').closest('.control-group').hide();
|
||||
if (!jform_vvvvwacvzs_required)
|
||||
if (!jform_vvvvwaivzu_required)
|
||||
{
|
||||
updateFieldRequired('javascript_view_footer',1);
|
||||
jQuery('#jform_javascript_view_footer').removeAttr('required');
|
||||
jQuery('#jform_javascript_view_footer').removeAttr('aria-required');
|
||||
jQuery('#jform_javascript_view_footer').removeClass('required');
|
||||
jform_vvvvwacvzs_required = true;
|
||||
jform_vvvvwaivzu_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvwad function
|
||||
function vvvvwad(add_javascript_views_footer_vvvvwad)
|
||||
// the vvvvwaj function
|
||||
function vvvvwaj(add_javascript_views_footer_vvvvwaj)
|
||||
{
|
||||
// set the function logic
|
||||
if (add_javascript_views_footer_vvvvwad == 1)
|
||||
if (add_javascript_views_footer_vvvvwaj == 1)
|
||||
{
|
||||
jQuery('#jform_javascript_views_footer').closest('.control-group').show();
|
||||
if (jform_vvvvwadvzt_required)
|
||||
if (jform_vvvvwajvzv_required)
|
||||
{
|
||||
updateFieldRequired('javascript_views_footer',0);
|
||||
jQuery('#jform_javascript_views_footer').prop('required','required');
|
||||
jQuery('#jform_javascript_views_footer').attr('aria-required',true);
|
||||
jQuery('#jform_javascript_views_footer').addClass('required');
|
||||
jform_vvvvwadvzt_required = false;
|
||||
jform_vvvvwajvzv_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_javascript_views_footer').closest('.control-group').hide();
|
||||
if (!jform_vvvvwadvzt_required)
|
||||
if (!jform_vvvvwajvzv_required)
|
||||
{
|
||||
updateFieldRequired('javascript_views_footer',1);
|
||||
jQuery('#jform_javascript_views_footer').removeAttr('required');
|
||||
jQuery('#jform_javascript_views_footer').removeAttr('aria-required');
|
||||
jQuery('#jform_javascript_views_footer').removeClass('required');
|
||||
jform_vvvvwadvzt_required = true;
|
||||
jform_vvvvwajvzv_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,289 +23,289 @@
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_vvvvwaevzw_required = false;
|
||||
jform_vvvvwafvzx_required = false;
|
||||
jform_vvvvwagvzy_required = false;
|
||||
jform_vvvvwahvzz_required = false;
|
||||
jform_vvvvwaiwaa_required = false;
|
||||
jform_vvvvwajwab_required = false;
|
||||
jform_vvvvwakvzy_required = false;
|
||||
jform_vvvvwalvzz_required = false;
|
||||
jform_vvvvwamwaa_required = false;
|
||||
jform_vvvvwanwab_required = false;
|
||||
jform_vvvvwaowac_required = false;
|
||||
jform_vvvvwapwad_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var location_vvvvwae = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwae(location_vvvvwae);
|
||||
var location_vvvvwak = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwak(location_vvvvwak);
|
||||
|
||||
var location_vvvvwaf = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwaf(location_vvvvwaf);
|
||||
var location_vvvvwal = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwal(location_vvvvwal);
|
||||
|
||||
var type_vvvvwag = jQuery("#jform_type").val();
|
||||
vvvvwag(type_vvvvwag);
|
||||
var type_vvvvwam = jQuery("#jform_type").val();
|
||||
vvvvwam(type_vvvvwam);
|
||||
|
||||
var type_vvvvwah = jQuery("#jform_type").val();
|
||||
vvvvwah(type_vvvvwah);
|
||||
var type_vvvvwan = jQuery("#jform_type").val();
|
||||
vvvvwan(type_vvvvwan);
|
||||
|
||||
var type_vvvvwai = jQuery("#jform_type").val();
|
||||
vvvvwai(type_vvvvwai);
|
||||
var type_vvvvwao = jQuery("#jform_type").val();
|
||||
vvvvwao(type_vvvvwao);
|
||||
|
||||
var target_vvvvwaj = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwaj(target_vvvvwaj);
|
||||
var target_vvvvwap = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwap(target_vvvvwap);
|
||||
});
|
||||
|
||||
// the vvvvwae function
|
||||
function vvvvwae(location_vvvvwae)
|
||||
// the vvvvwak function
|
||||
function vvvvwak(location_vvvvwak)
|
||||
{
|
||||
// set the function logic
|
||||
if (location_vvvvwae == 1)
|
||||
if (location_vvvvwak == 1)
|
||||
{
|
||||
jQuery('#jform_admin_view').closest('.control-group').show();
|
||||
if (jform_vvvvwaevzw_required)
|
||||
if (jform_vvvvwakvzy_required)
|
||||
{
|
||||
updateFieldRequired('admin_view',0);
|
||||
jQuery('#jform_admin_view').prop('required','required');
|
||||
jQuery('#jform_admin_view').attr('aria-required',true);
|
||||
jQuery('#jform_admin_view').addClass('required');
|
||||
jform_vvvvwaevzw_required = false;
|
||||
jform_vvvvwakvzy_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_admin_view').closest('.control-group').hide();
|
||||
if (!jform_vvvvwaevzw_required)
|
||||
if (!jform_vvvvwakvzy_required)
|
||||
{
|
||||
updateFieldRequired('admin_view',1);
|
||||
jQuery('#jform_admin_view').removeAttr('required');
|
||||
jQuery('#jform_admin_view').removeAttr('aria-required');
|
||||
jQuery('#jform_admin_view').removeClass('required');
|
||||
jform_vvvvwaevzw_required = true;
|
||||
jform_vvvvwakvzy_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvwaf function
|
||||
function vvvvwaf(location_vvvvwaf)
|
||||
// the vvvvwal function
|
||||
function vvvvwal(location_vvvvwal)
|
||||
{
|
||||
// set the function logic
|
||||
if (location_vvvvwaf == 2)
|
||||
if (location_vvvvwal == 2)
|
||||
{
|
||||
jQuery('#jform_site_view').closest('.control-group').show();
|
||||
if (jform_vvvvwafvzx_required)
|
||||
if (jform_vvvvwalvzz_required)
|
||||
{
|
||||
updateFieldRequired('site_view',0);
|
||||
jQuery('#jform_site_view').prop('required','required');
|
||||
jQuery('#jform_site_view').attr('aria-required',true);
|
||||
jQuery('#jform_site_view').addClass('required');
|
||||
jform_vvvvwafvzx_required = false;
|
||||
jform_vvvvwalvzz_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_site_view').closest('.control-group').hide();
|
||||
if (!jform_vvvvwafvzx_required)
|
||||
if (!jform_vvvvwalvzz_required)
|
||||
{
|
||||
updateFieldRequired('site_view',1);
|
||||
jQuery('#jform_site_view').removeAttr('required');
|
||||
jQuery('#jform_site_view').removeAttr('aria-required');
|
||||
jQuery('#jform_site_view').removeClass('required');
|
||||
jform_vvvvwafvzx_required = true;
|
||||
jform_vvvvwalvzz_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvwag function
|
||||
function vvvvwag(type_vvvvwag)
|
||||
// the vvvvwam function
|
||||
function vvvvwam(type_vvvvwam)
|
||||
{
|
||||
if (isSet(type_vvvvwag) && type_vvvvwag.constructor !== Array)
|
||||
if (isSet(type_vvvvwam) && type_vvvvwam.constructor !== Array)
|
||||
{
|
||||
var temp_vvvvwag = type_vvvvwag;
|
||||
var type_vvvvwag = [];
|
||||
type_vvvvwag.push(temp_vvvvwag);
|
||||
var temp_vvvvwam = type_vvvvwam;
|
||||
var type_vvvvwam = [];
|
||||
type_vvvvwam.push(temp_vvvvwam);
|
||||
}
|
||||
else if (!isSet(type_vvvvwag))
|
||||
else if (!isSet(type_vvvvwam))
|
||||
{
|
||||
var type_vvvvwag = [];
|
||||
var type_vvvvwam = [];
|
||||
}
|
||||
var type = type_vvvvwag.some(type_vvvvwag_SomeFunc);
|
||||
var type = type_vvvvwam.some(type_vvvvwam_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').show();
|
||||
if (jform_vvvvwagvzy_required)
|
||||
if (jform_vvvvwamwaa_required)
|
||||
{
|
||||
updateFieldRequired('url',0);
|
||||
jQuery('#jform_url').prop('required','required');
|
||||
jQuery('#jform_url').attr('aria-required',true);
|
||||
jQuery('#jform_url').addClass('required');
|
||||
jform_vvvvwagvzy_required = false;
|
||||
jform_vvvvwamwaa_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').hide();
|
||||
if (!jform_vvvvwagvzy_required)
|
||||
if (!jform_vvvvwamwaa_required)
|
||||
{
|
||||
updateFieldRequired('url',1);
|
||||
jQuery('#jform_url').removeAttr('required');
|
||||
jQuery('#jform_url').removeAttr('aria-required');
|
||||
jQuery('#jform_url').removeClass('required');
|
||||
jform_vvvvwagvzy_required = true;
|
||||
jform_vvvvwamwaa_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvwag Some function
|
||||
function type_vvvvwag_SomeFunc(type_vvvvwag)
|
||||
// the vvvvwam Some function
|
||||
function type_vvvvwam_SomeFunc(type_vvvvwam)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_vvvvwag == 3)
|
||||
if (type_vvvvwam == 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the vvvvwah function
|
||||
function vvvvwah(type_vvvvwah)
|
||||
// the vvvvwan function
|
||||
function vvvvwan(type_vvvvwan)
|
||||
{
|
||||
if (isSet(type_vvvvwah) && type_vvvvwah.constructor !== Array)
|
||||
if (isSet(type_vvvvwan) && type_vvvvwan.constructor !== Array)
|
||||
{
|
||||
var temp_vvvvwah = type_vvvvwah;
|
||||
var type_vvvvwah = [];
|
||||
type_vvvvwah.push(temp_vvvvwah);
|
||||
var temp_vvvvwan = type_vvvvwan;
|
||||
var type_vvvvwan = [];
|
||||
type_vvvvwan.push(temp_vvvvwan);
|
||||
}
|
||||
else if (!isSet(type_vvvvwah))
|
||||
else if (!isSet(type_vvvvwan))
|
||||
{
|
||||
var type_vvvvwah = [];
|
||||
var type_vvvvwan = [];
|
||||
}
|
||||
var type = type_vvvvwah.some(type_vvvvwah_SomeFunc);
|
||||
var type = type_vvvvwan.some(type_vvvvwan_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_article').closest('.control-group').show();
|
||||
if (jform_vvvvwahvzz_required)
|
||||
if (jform_vvvvwanwab_required)
|
||||
{
|
||||
updateFieldRequired('article',0);
|
||||
jQuery('#jform_article').prop('required','required');
|
||||
jQuery('#jform_article').attr('aria-required',true);
|
||||
jQuery('#jform_article').addClass('required');
|
||||
jform_vvvvwahvzz_required = false;
|
||||
jform_vvvvwanwab_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_article').closest('.control-group').hide();
|
||||
if (!jform_vvvvwahvzz_required)
|
||||
if (!jform_vvvvwanwab_required)
|
||||
{
|
||||
updateFieldRequired('article',1);
|
||||
jQuery('#jform_article').removeAttr('required');
|
||||
jQuery('#jform_article').removeAttr('aria-required');
|
||||
jQuery('#jform_article').removeClass('required');
|
||||
jform_vvvvwahvzz_required = true;
|
||||
jform_vvvvwanwab_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvwah Some function
|
||||
function type_vvvvwah_SomeFunc(type_vvvvwah)
|
||||
// the vvvvwan Some function
|
||||
function type_vvvvwan_SomeFunc(type_vvvvwan)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_vvvvwah == 1)
|
||||
if (type_vvvvwan == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the vvvvwai function
|
||||
function vvvvwai(type_vvvvwai)
|
||||
// the vvvvwao function
|
||||
function vvvvwao(type_vvvvwao)
|
||||
{
|
||||
if (isSet(type_vvvvwai) && type_vvvvwai.constructor !== Array)
|
||||
if (isSet(type_vvvvwao) && type_vvvvwao.constructor !== Array)
|
||||
{
|
||||
var temp_vvvvwai = type_vvvvwai;
|
||||
var type_vvvvwai = [];
|
||||
type_vvvvwai.push(temp_vvvvwai);
|
||||
var temp_vvvvwao = type_vvvvwao;
|
||||
var type_vvvvwao = [];
|
||||
type_vvvvwao.push(temp_vvvvwao);
|
||||
}
|
||||
else if (!isSet(type_vvvvwai))
|
||||
else if (!isSet(type_vvvvwao))
|
||||
{
|
||||
var type_vvvvwai = [];
|
||||
var type_vvvvwao = [];
|
||||
}
|
||||
var type = type_vvvvwai.some(type_vvvvwai_SomeFunc);
|
||||
var type = type_vvvvwao.some(type_vvvvwao_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (type)
|
||||
{
|
||||
jQuery('#jform_content-lbl').closest('.control-group').show();
|
||||
if (jform_vvvvwaiwaa_required)
|
||||
if (jform_vvvvwaowac_required)
|
||||
{
|
||||
updateFieldRequired('content',0);
|
||||
jQuery('#jform_content').prop('required','required');
|
||||
jQuery('#jform_content').attr('aria-required',true);
|
||||
jQuery('#jform_content').addClass('required');
|
||||
jform_vvvvwaiwaa_required = false;
|
||||
jform_vvvvwaowac_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_content-lbl').closest('.control-group').hide();
|
||||
if (!jform_vvvvwaiwaa_required)
|
||||
if (!jform_vvvvwaowac_required)
|
||||
{
|
||||
updateFieldRequired('content',1);
|
||||
jQuery('#jform_content').removeAttr('required');
|
||||
jQuery('#jform_content').removeAttr('aria-required');
|
||||
jQuery('#jform_content').removeClass('required');
|
||||
jform_vvvvwaiwaa_required = true;
|
||||
jform_vvvvwaowac_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvwai Some function
|
||||
function type_vvvvwai_SomeFunc(type_vvvvwai)
|
||||
// the vvvvwao Some function
|
||||
function type_vvvvwao_SomeFunc(type_vvvvwao)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_vvvvwai == 2)
|
||||
if (type_vvvvwao == 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the vvvvwaj function
|
||||
function vvvvwaj(target_vvvvwaj)
|
||||
// the vvvvwap function
|
||||
function vvvvwap(target_vvvvwap)
|
||||
{
|
||||
// set the function logic
|
||||
if (target_vvvvwaj == 1)
|
||||
if (target_vvvvwap == 1)
|
||||
{
|
||||
jQuery('#jform_groups').closest('.control-group').show();
|
||||
if (jform_vvvvwajwab_required)
|
||||
if (jform_vvvvwapwad_required)
|
||||
{
|
||||
updateFieldRequired('groups',0);
|
||||
jQuery('#jform_groups').prop('required','required');
|
||||
jQuery('#jform_groups').attr('aria-required',true);
|
||||
jQuery('#jform_groups').addClass('required');
|
||||
jform_vvvvwajwab_required = false;
|
||||
jform_vvvvwapwad_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_groups').closest('.control-group').hide();
|
||||
if (!jform_vvvvwajwab_required)
|
||||
if (!jform_vvvvwapwad_required)
|
||||
{
|
||||
updateFieldRequired('groups',1);
|
||||
jQuery('#jform_groups').removeAttr('required');
|
||||
jQuery('#jform_groups').removeAttr('aria-required');
|
||||
jQuery('#jform_groups').removeClass('required');
|
||||
jform_vvvvwajwab_required = true;
|
||||
jform_vvvvwapwad_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -200,4 +200,76 @@ function getLayoutDetails(id){
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// set snippets that are on the page
|
||||
var snippetIds = [];
|
||||
var snippets = {};
|
||||
var snippet = 0;
|
||||
jQuery(document).ready(function($)
|
||||
{
|
||||
jQuery("#jform_snippet option").each(function()
|
||||
{
|
||||
var key = jQuery(this).val();
|
||||
var text = jQuery(this).text();
|
||||
snippets[key] = text;
|
||||
snippetIds.push(key);
|
||||
});
|
||||
snippet = jQuery("#jform_snippet").val();
|
||||
getSnippets();
|
||||
});
|
||||
|
||||
function getSnippets_server(libraries){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&format=json";
|
||||
if(token.length > 0 && libraries.length > 0){
|
||||
var request = 'token='+token+'&libraries='+JSON.stringify(libraries);
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
function getSnippets(){
|
||||
jQuery("#loading").show();
|
||||
// clear the selection
|
||||
jQuery('#jform_snippet').find('option').remove().end();
|
||||
jQuery('#jform_snippet').trigger('liszt:updated');
|
||||
// get country value if set
|
||||
var libraries = jQuery("#jform_libraries").val();
|
||||
if (libraries) {
|
||||
getSnippets_server(libraries).done(function(result) {
|
||||
setSnippets(result);
|
||||
jQuery("#loading").hide();
|
||||
if (typeof snippetButton !== 'undefined') {
|
||||
// ensure button is correct
|
||||
var snippet = jQuery('#jform_snippet').val();
|
||||
snippetButton(snippet);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// load all snippets in none is selected
|
||||
setSnippets(snippetIds);
|
||||
jQuery("#loading").hide();
|
||||
}
|
||||
}
|
||||
function setSnippets(array){
|
||||
if (array) {
|
||||
jQuery('#jform_snippet').append('<option value="">'+select_a_snippet+'</option>');
|
||||
jQuery.each( array, function( i, id ) {
|
||||
if (id in snippets) {
|
||||
jQuery('#jform_snippet').append('<option value="'+id+'">'+snippets[id]+'</option>');
|
||||
}
|
||||
if (id == snippet) {
|
||||
jQuery('#jform_snippet').val(id);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
jQuery('#jform_snippet').append('<option value="">'+create_a_snippet+'</option>');
|
||||
}
|
||||
jQuery('#jform_snippet').trigger('liszt:updated');
|
||||
}
|
||||
|
@ -150,11 +150,26 @@
|
||||
type="snippets"
|
||||
name="snippet"
|
||||
label="COM_COMPONENTBUILDER_LAYOUT_SNIPPET_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LAYOUT_SNIPPET_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
required="false"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Note_libraries_selection Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_libraries_selection" label="COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_LABEL" description="COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_DESCRIPTION" heading="h4" class="alert alert-info note_libraries_selection" />
|
||||
<!-- Layout Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="layout"
|
||||
label="COM_COMPONENTBUILDER_LAYOUT_LAYOUT_LABEL"
|
||||
rows="20"
|
||||
cols="15"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_LAYOUT_LAYOUT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_php_view Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -169,32 +184,32 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_LAYOUT_NO</option>
|
||||
</field>
|
||||
<!-- Layout Field. Type: Textarea. (joomla) -->
|
||||
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
|
||||
<!-- Libraries Field. Type: Libraries. (custom) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="layout"
|
||||
label="COM_COMPONENTBUILDER_LAYOUT_LAYOUT_LABEL"
|
||||
rows="20"
|
||||
cols="15"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_LAYOUT_LAYOUT_HINT"
|
||||
required="true"
|
||||
type="libraries"
|
||||
name="libraries"
|
||||
label="COM_COMPONENTBUILDER_LAYOUT_LIBRARIES_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LAYOUT_LIBRARIES_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="true"
|
||||
default="0"
|
||||
required="false"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_LAYOUT_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
|
||||
<!-- Not_required Field. Type: Hidden. (joomla) -->
|
||||
<field
|
||||
type="hidden"
|
||||
name="not_required"
|
||||
default="[]"
|
||||
/>
|
||||
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_LAYOUT_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
|
||||
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_LAYOUT_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
|
||||
<!-- Dynamic_values Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="dynamic_values" label="COM_COMPONENTBUILDER_LAYOUT_DYNAMIC_VALUES_LABEL" description="COM_COMPONENTBUILDER_LAYOUT_DYNAMIC_VALUES_DESCRIPTION" heading="h4" class="dynamic_values" />
|
||||
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
|
||||
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_LAYOUT_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
|
||||
<!-- Php_view Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
|
@ -22,4 +22,301 @@
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
// Some Global Values
|
||||
jform_vvvvvzvvzm_required = false;
|
||||
jform_vvvvvzvvzn_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var how_vvvvvzu = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzu(how_vvvvvzu);
|
||||
|
||||
var how_vvvvvzv = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzv(how_vvvvvzv);
|
||||
|
||||
var how_vvvvvzw = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzw(how_vvvvvzw);
|
||||
|
||||
var how_vvvvvzx = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzx(how_vvvvvzx);
|
||||
|
||||
var how_vvvvvzy = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzy(how_vvvvvzy);
|
||||
|
||||
var how_vvvvvzz = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzz(how_vvvvvzz);
|
||||
});
|
||||
|
||||
// the vvvvvzu function
|
||||
function vvvvvzu(how_vvvvvzu)
|
||||
{
|
||||
// set the function logic
|
||||
if (how_vvvvvzu == 2)
|
||||
{
|
||||
jQuery('#jform_addconditions-lbl').closest('.control-group').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_addconditions-lbl').closest('.control-group').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvvzv function
|
||||
function vvvvvzv(how_vvvvvzv)
|
||||
{
|
||||
// set the function logic
|
||||
if (how_vvvvvzv == 3)
|
||||
{
|
||||
jQuery('#jform_php_setdocument').closest('.control-group').show();
|
||||
if (jform_vvvvvzvvzm_required)
|
||||
{
|
||||
updateFieldRequired('php_setdocument',0);
|
||||
jQuery('#jform_php_setdocument').prop('required','required');
|
||||
jQuery('#jform_php_setdocument').attr('aria-required',true);
|
||||
jQuery('#jform_php_setdocument').addClass('required');
|
||||
jform_vvvvvzvvzm_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_php_preparedocument').closest('.control-group').show();
|
||||
if (jform_vvvvvzvvzn_required)
|
||||
{
|
||||
updateFieldRequired('php_preparedocument',0);
|
||||
jQuery('#jform_php_preparedocument').prop('required','required');
|
||||
jQuery('#jform_php_preparedocument').attr('aria-required',true);
|
||||
jQuery('#jform_php_preparedocument').addClass('required');
|
||||
jform_vvvvvzvvzn_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_php_setdocument').closest('.control-group').hide();
|
||||
if (!jform_vvvvvzvvzm_required)
|
||||
{
|
||||
updateFieldRequired('php_setdocument',1);
|
||||
jQuery('#jform_php_setdocument').removeAttr('required');
|
||||
jQuery('#jform_php_setdocument').removeAttr('aria-required');
|
||||
jQuery('#jform_php_setdocument').removeClass('required');
|
||||
jform_vvvvvzvvzm_required = true;
|
||||
}
|
||||
jQuery('#jform_php_preparedocument').closest('.control-group').hide();
|
||||
if (!jform_vvvvvzvvzn_required)
|
||||
{
|
||||
updateFieldRequired('php_preparedocument',1);
|
||||
jQuery('#jform_php_preparedocument').removeAttr('required');
|
||||
jQuery('#jform_php_preparedocument').removeAttr('aria-required');
|
||||
jQuery('#jform_php_preparedocument').removeClass('required');
|
||||
jform_vvvvvzvvzn_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvvzw function
|
||||
function vvvvvzw(how_vvvvvzw)
|
||||
{
|
||||
// set the function logic
|
||||
if (how_vvvvvzw == 2 || how_vvvvvzw == 3)
|
||||
{
|
||||
jQuery('.note_display_library_config').closest('.control-group').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('.note_display_library_config').closest('.control-group').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvvzx function
|
||||
function vvvvvzx(how_vvvvvzx)
|
||||
{
|
||||
// set the function logic
|
||||
if (how_vvvvvzx == 1 || how_vvvvvzx == 2 || how_vvvvvzx == 3)
|
||||
{
|
||||
jQuery('.note_display_library_files_folders_urls').closest('.control-group').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvvzy function
|
||||
function vvvvvzy(how_vvvvvzy)
|
||||
{
|
||||
// set the function logic
|
||||
if (how_vvvvvzy == 0)
|
||||
{
|
||||
jQuery('.note_no_behaviour_one').closest('.control-group').show();
|
||||
jQuery('.note_no_behaviour_three').closest('.control-group').show();
|
||||
jQuery('.note_no_behaviour_two').closest('.control-group').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('.note_no_behaviour_one').closest('.control-group').hide();
|
||||
jQuery('.note_no_behaviour_three').closest('.control-group').hide();
|
||||
jQuery('.note_no_behaviour_two').closest('.control-group').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvvzz function
|
||||
function vvvvvzz(how_vvvvvzz)
|
||||
{
|
||||
// set the function logic
|
||||
if (how_vvvvvzz == 1)
|
||||
{
|
||||
jQuery('.note_yes_behaviour_one').closest('.control-group').show();
|
||||
jQuery('.note_yes_behaviour_two').closest('.control-group').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('.note_yes_behaviour_one').closest('.control-group').hide();
|
||||
jQuery('.note_yes_behaviour_two').closest('.control-group').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// update required fields
|
||||
function updateFieldRequired(name,status)
|
||||
{
|
||||
var not_required = jQuery('#jform_not_required').val();
|
||||
|
||||
if(status == 1)
|
||||
{
|
||||
if (isSet(not_required) && not_required != 0)
|
||||
{
|
||||
not_required = not_required+','+name;
|
||||
}
|
||||
else
|
||||
{
|
||||
not_required = ','+name;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isSet(not_required) && not_required != 0)
|
||||
{
|
||||
not_required = not_required.replace(','+name,'');
|
||||
}
|
||||
}
|
||||
|
||||
jQuery('#jform_not_required').val(not_required);
|
||||
}
|
||||
|
||||
// the isSet function
|
||||
function isSet(val)
|
||||
{
|
||||
if ((val != undefined) && (val != null) && 0 !== val.length){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
// now load the displays
|
||||
getAjaxDisplay('library_config');
|
||||
getAjaxDisplay('library_files_folders_urls');
|
||||
});
|
||||
|
||||
function addData(result,where){
|
||||
jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
|
||||
}
|
||||
|
||||
function addButtonID_server(type, size){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0 && size > 0){
|
||||
var request = 'token='+token+'&type='+type+'&size='+size;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
function addButtonID(type, where, size){
|
||||
addButtonID_server(type, size).done(function(result) {
|
||||
if(result){
|
||||
if (2 == size) {
|
||||
jQuery('#'+where).html(result);
|
||||
} else {
|
||||
addData(result, '#jform_'+where);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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){
|
||||
var request = 'token='+token+'&type='+type;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
function addButton(type,where){
|
||||
addButton_server(type).done(function(result) {
|
||||
if(result){
|
||||
addData(result,'#jform_'+where);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function getAjaxDisplay(type){
|
||||
getAjaxDisplay_server(type).done(function(result) {
|
||||
if(result){
|
||||
jQuery('#display_'+type).html(result);
|
||||
}
|
||||
// set button
|
||||
addButtonID(type,'header_'+type+'_buttons', 2); // <-- little edit button
|
||||
});
|
||||
}
|
||||
|
||||
function getAjaxDisplay_server(type){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&vdm="+vastDevMod;
|
||||
if(token.length > 0 && type.length > 0){
|
||||
var request = 'token='+token+'&type=' + type;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
|
||||
function getFieldSelectOptions_server(fieldId){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json";
|
||||
if(token.length > 0 && fieldId > 0){
|
||||
var request = 'token='+token+'&id='+fieldId;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
|
||||
function getFieldSelectOptions(fieldKey){
|
||||
// first check if the field is set
|
||||
if(jQuery("#jform_addconditions__addconditions"+fieldKey+"__option_field").length) {
|
||||
var fieldId = jQuery("#jform_addconditions__addconditions"+fieldKey+"__option_field option:selected").val();
|
||||
getFieldSelectOptions_server(fieldId).done(function(result) {
|
||||
if(result){
|
||||
jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__field_options').val(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__field_options').val('');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -122,6 +122,189 @@
|
||||
message="COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_HINT"
|
||||
/>
|
||||
<!-- How Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="how"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_HOW_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_HOW_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="2"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_LIBRARY_ALWAYS_ADD</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_LIBRARY_CONDITIONS</option>
|
||||
<option value="3">
|
||||
COM_COMPONENTBUILDER_LIBRARY_CUSTOM_SCRIPT</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_LIBRARY_DO_NOT_ADD</option>
|
||||
</field>
|
||||
<!-- Note_display_library_files_folders_urls Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_display_library_files_folders_urls" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_DISPLAY_LIBRARY_FILES_FOLDERS_URLS_DESCRIPTION" class="note_display_library_files_folders_urls" />
|
||||
<!-- Php_setdocument Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_setdocument"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_PHP_SETDOCUMENT_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_PHP_SETDOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_LIBRARY_PHP_SETDOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Addconditions Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
name="addconditions"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_ADDCONDITIONS_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_ADDCONDITIONS_DESCRIPTION"
|
||||
icon="list"
|
||||
maximum="500">
|
||||
<form hidden="true" name="list_addconditions_modal" repeat="true">
|
||||
<!-- File Field. Type: Libraryfiles. (custom) -->
|
||||
<field
|
||||
type="libraryfiles"
|
||||
name="file"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILE_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="true"
|
||||
default="0"
|
||||
required="false"
|
||||
button="false"
|
||||
/>
|
||||
<!-- Target_behavior Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="target_behavior"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_TARGET_BEHAVIOR_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_TARGET_BEHAVIOR_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
filter="INT"
|
||||
required="false"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_LIBRARY_INCLUDE</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_LIBRARY_EXCLUDE</option>
|
||||
</field>
|
||||
<!-- Target_relation Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="target_relation"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_TARGET_RELATION_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_TARGET_RELATION_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
filter="INT"
|
||||
required="false"
|
||||
default="0">
|
||||
<!-- Option Set. -->
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_LIBRARY_ISOLATE</option>
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_LIBRARY_CHAIN</option>
|
||||
</field>
|
||||
<!-- Option_field Field. Type: Libconfigfield. (custom) -->
|
||||
<field
|
||||
type="libconfigfield"
|
||||
name="option_field"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_OPTION_FIELD_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_OPTION_FIELD_DESCRIPTION"
|
||||
multiple="false"
|
||||
required="false"
|
||||
button="false"
|
||||
/>
|
||||
<!-- Option_behaviour Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="option_behaviour"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_OPTION_BEHAVIOUR_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_OPTION_BEHAVIOUR_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
filter="INT"
|
||||
required="false"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_LIBRARY_IS_ONLY_FOUR_LISTRADIOCHECKBOXES</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_LIBRARY_IS_NOT_ONLY_FOUR_LISTRADIOCHECKBOXES</option>
|
||||
<option value="3">
|
||||
COM_COMPONENTBUILDER_LIBRARY_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_LIST</option>
|
||||
<option value="4">
|
||||
COM_COMPONENTBUILDER_LIBRARY_ACTIVE_ONLY_FOUR_TEXT_FIELD</option>
|
||||
<option value="5">
|
||||
COM_COMPONENTBUILDER_LIBRARY_UNACTIVE_ONLY_FOUR_TEXT_FIELD</option>
|
||||
<option value="6">
|
||||
COM_COMPONENTBUILDER_LIBRARY_KEY_WORD_ALL_CASESENSITIVE_ONLY_FOUR_TEXT_FIELD</option>
|
||||
<option value="7">
|
||||
COM_COMPONENTBUILDER_LIBRARY_KEY_WORD_ANY_CASESENSITIVE_ONLY_FOUR_TEXT_FIELD</option>
|
||||
<option value="8">
|
||||
COM_COMPONENTBUILDER_LIBRARY_KEY_WORD_ALL_CASEINSENSITIVE_ONLY_FOUR_TEXT_FIELD</option>
|
||||
<option value="9">
|
||||
COM_COMPONENTBUILDER_LIBRARY_KEY_WORD_ANY_CASEINSENSITIVE_ONLY_FOUR_TEXT_FIELD</option>
|
||||
<option value="10">
|
||||
COM_COMPONENTBUILDER_LIBRARY_MIN_LENGTH_ONLY_FOUR_TEXT_FIELD</option>
|
||||
<option value="11">
|
||||
COM_COMPONENTBUILDER_LIBRARY_MAX_LENGTH_ONLY_FOUR_TEXT_FIELD</option>
|
||||
<option value="12">
|
||||
COM_COMPONENTBUILDER_LIBRARY_EXACT_LENGTH_ONLY_FOUR_TEXT_FIELD</option>
|
||||
</field>
|
||||
<!-- Field_options Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="field_options"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FIELD_OPTIONS_LABEL"
|
||||
rows="10"
|
||||
cols="5"
|
||||
class="text_area"
|
||||
filter="STRING"
|
||||
hint="COM_COMPONENTBUILDER_LIBRARY_FIELD_OPTIONS_HINT"
|
||||
required="false"
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Php_preparedocument Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_preparedocument"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_PHP_PREPAREDOCUMENT_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_PHP_PREPAREDOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_LIBRARY_PHP_PREPAREDOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_yes_behaviour_two Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_yes_behaviour_two" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_TWO_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_TWO_DESCRIPTION" heading="h4" class="alert alert-success note_yes_behaviour_two" />
|
||||
<!-- Note_yes_behaviour_one Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_yes_behaviour_one" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_ONE_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_ONE_DESCRIPTION" heading="h4" class="alert alert-success note_yes_behaviour_one" />
|
||||
<!-- Note_no_behaviour_three Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_no_behaviour_three" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_THREE_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_THREE_DESCRIPTION" heading="h4" class="alert alert-error note_no_behaviour_three" />
|
||||
<!-- Note_no_behaviour_one Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_no_behaviour_one" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_ONE_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_ONE_DESCRIPTION" heading="h4" class="alert alert-error note_no_behaviour_one" />
|
||||
<!-- Note_no_behaviour_two Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_no_behaviour_two" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_TWO_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_TWO_DESCRIPTION" heading="h4" class="alert alert-error note_no_behaviour_two" />
|
||||
<!-- Not_required Field. Type: Hidden. (joomla) -->
|
||||
<field
|
||||
type="hidden"
|
||||
name="not_required"
|
||||
default="[]"
|
||||
/>
|
||||
<!-- Note_display_library_config Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_display_library_config" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_DISPLAY_LIBRARY_CONFIG_DESCRIPTION" class="note_display_library_config" />
|
||||
</fieldset>
|
||||
|
||||
<!-- Access Control Fields. -->
|
||||
|
25
admin/models/forms/library_config.js
Normal file
25
admin/models/forms/library_config.js
Normal file
@ -0,0 +1,25 @@
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage library_config.js
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Builds Complex Joomla Components
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
184
admin/models/forms/library_config.xml
Normal file
184
admin/models/forms/library_config.xml
Normal file
@ -0,0 +1,184 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form
|
||||
addrulepath="/administrator/components/com_componentbuilder/models/rules"
|
||||
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
|
||||
>
|
||||
<fieldset name="details">
|
||||
<!-- Default Fields. -->
|
||||
<!-- Id Field. Type: Text (joomla) -->
|
||||
<field
|
||||
name="id"
|
||||
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
|
||||
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
|
||||
readonly="true"
|
||||
/>
|
||||
<!-- Date Created Field. Type: Calendar (joomla) -->
|
||||
<field
|
||||
name="created"
|
||||
type="calendar"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_CONFIG_CREATED_DATE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_CONFIG_CREATED_DATE_DESC"
|
||||
size="22"
|
||||
|
||||
format="%Y-%m-%d %H:%M:%S"
|
||||
filter="user_utc"
|
||||
/>
|
||||
<!-- User Created Field. Type: User (joomla) -->
|
||||
<field
|
||||
name="created_by"
|
||||
type="user"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_CONFIG_CREATED_BY_LABEL"
|
||||
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_CONFIG_CREATED_BY_DESC"
|
||||
/>
|
||||
<!-- Published Field. Type: List (joomla) -->
|
||||
<field name="published" type="list" label="JSTATUS"
|
||||
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
|
||||
|
||||
filter="intval" size="1" default="1" >
|
||||
<option value="1">
|
||||
JPUBLISHED</option>
|
||||
<option value="0">
|
||||
JUNPUBLISHED</option>
|
||||
<option value="2">
|
||||
JARCHIVED</option>
|
||||
<option value="-2">
|
||||
JTRASHED</option>
|
||||
</field>
|
||||
<!-- Date Modified Field. Type: Calendar (joomla) -->
|
||||
<field name="modified" type="calendar" class="readonly"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_CONFIG_MODIFIED_DATE_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_CONFIG_MODIFIED_DATE_DESC"
|
||||
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
|
||||
<!-- User Modified Field. Type: User (joomla) -->
|
||||
<field name="modified_by" type="user"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_CONFIG_MODIFIED_BY_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_CONFIG_MODIFIED_BY_DESC"
|
||||
class="readonly"
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Access Field. Type: Accesslevel (joomla) -->
|
||||
<field name="access"
|
||||
type="accesslevel"
|
||||
label="JFIELD_ACCESS_LABEL"
|
||||
description="JFIELD_ACCESS_DESC"
|
||||
default="1"
|
||||
|
||||
required="false"
|
||||
/>
|
||||
<!-- Ordering Field. Type: Numbers (joomla) -->
|
||||
<field
|
||||
name="ordering"
|
||||
type="number"
|
||||
class="inputbox validate-ordering"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_CONFIG_ORDERING_LABEL"
|
||||
description=""
|
||||
default="0"
|
||||
size="6"
|
||||
|
||||
required="false"
|
||||
/>
|
||||
<!-- Version Field. Type: Text (joomla) -->
|
||||
<field
|
||||
name="version"
|
||||
type="text"
|
||||
class="readonly"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_CONFIG_VERSION_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_CONFIG_VERSION_DESC"
|
||||
size="6"
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Dynamic Fields. -->
|
||||
<!-- Library Field. Type: Libraryreadonly. (custom) -->
|
||||
<field
|
||||
type="libraryreadonly"
|
||||
name="library"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_CONFIG_LIBRARY_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_CONFIG_LIBRARY_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="true"
|
||||
readonly="true"
|
||||
/>
|
||||
<!-- Addconfig Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
name="addconfig"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG_DESCRIPTION"
|
||||
icon="list"
|
||||
maximum="500"
|
||||
filter="ARRAY">
|
||||
<form hidden="true" name="list_addconfig_modal" repeat="true">
|
||||
<!-- Field Field. Type: Fields. (custom) -->
|
||||
<field
|
||||
type="fields"
|
||||
name="field"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_CONFIG_FIELD_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_CONFIG_FIELD_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
required="false"
|
||||
button="false"
|
||||
/>
|
||||
<!-- Custom_value Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="custom_value"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_CONFIG_CUSTOM_VALUE_LABEL"
|
||||
rows="2"
|
||||
cols="4"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_CONFIG_CUSTOM_VALUE_DESCRIPTION"
|
||||
class="text_area"
|
||||
hint="COM_COMPONENTBUILDER_LIBRARY_CONFIG_CUSTOM_VALUE_HINT"
|
||||
required="false"
|
||||
readonly="false"
|
||||
disabled="false"
|
||||
/>
|
||||
<!-- Tabname Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="tabname"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_CONFIG_TABNAME_LABEL"
|
||||
size="40"
|
||||
maxlength="150"
|
||||
default="Library"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_CONFIG_TABNAME_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="false"
|
||||
disabled="false"
|
||||
required="false"
|
||||
filter="STRING"
|
||||
message="COM_COMPONENTBUILDER_LIBRARY_CONFIG_TABNAME_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_LIBRARY_CONFIG_TABNAME_HINT"
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
</fieldset>
|
||||
|
||||
<!-- Access Control Fields. -->
|
||||
<fieldset name="accesscontrol">
|
||||
<!-- Asset Id Field. Type: Hidden (joomla) -->
|
||||
<field
|
||||
name="asset_id"
|
||||
type="hidden"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Rules Field. Type: Rules (joomla) -->
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
label="Permissions in relation to this library_config"
|
||||
translate_label="false"
|
||||
filter="rules"
|
||||
validate="rules"
|
||||
class="inputbox"
|
||||
component="com_componentbuilder"
|
||||
section="library_config"
|
||||
/>
|
||||
</fieldset>
|
||||
</form>
|
25
admin/models/forms/library_files_folders_urls.js
Normal file
25
admin/models/forms/library_files_folders_urls.js
Normal file
@ -0,0 +1,25 @@
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage library_files_folders_urls.js
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Builds Complex Joomla Components
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
282
admin/models/forms/library_files_folders_urls.xml
Normal file
282
admin/models/forms/library_files_folders_urls.xml
Normal file
@ -0,0 +1,282 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form
|
||||
addrulepath="/administrator/components/com_componentbuilder/models/rules"
|
||||
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
|
||||
>
|
||||
<fieldset name="details">
|
||||
<!-- Default Fields. -->
|
||||
<!-- Id Field. Type: Text (joomla) -->
|
||||
<field
|
||||
name="id"
|
||||
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
|
||||
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
|
||||
readonly="true"
|
||||
/>
|
||||
<!-- Date Created Field. Type: Calendar (joomla) -->
|
||||
<field
|
||||
name="created"
|
||||
type="calendar"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_CREATED_DATE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_CREATED_DATE_DESC"
|
||||
size="22"
|
||||
|
||||
format="%Y-%m-%d %H:%M:%S"
|
||||
filter="user_utc"
|
||||
/>
|
||||
<!-- User Created Field. Type: User (joomla) -->
|
||||
<field
|
||||
name="created_by"
|
||||
type="user"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_CREATED_BY_LABEL"
|
||||
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_CREATED_BY_DESC"
|
||||
/>
|
||||
<!-- Published Field. Type: List (joomla) -->
|
||||
<field name="published" type="list" label="JSTATUS"
|
||||
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
|
||||
|
||||
filter="intval" size="1" default="1" >
|
||||
<option value="1">
|
||||
JPUBLISHED</option>
|
||||
<option value="0">
|
||||
JUNPUBLISHED</option>
|
||||
<option value="2">
|
||||
JARCHIVED</option>
|
||||
<option value="-2">
|
||||
JTRASHED</option>
|
||||
</field>
|
||||
<!-- Date Modified Field. Type: Calendar (joomla) -->
|
||||
<field name="modified" type="calendar" class="readonly"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_MODIFIED_DATE_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_MODIFIED_DATE_DESC"
|
||||
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
|
||||
<!-- User Modified Field. Type: User (joomla) -->
|
||||
<field name="modified_by" type="user"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_MODIFIED_BY_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_MODIFIED_BY_DESC"
|
||||
class="readonly"
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Access Field. Type: Accesslevel (joomla) -->
|
||||
<field name="access"
|
||||
type="accesslevel"
|
||||
label="JFIELD_ACCESS_LABEL"
|
||||
description="JFIELD_ACCESS_DESC"
|
||||
default="1"
|
||||
|
||||
required="false"
|
||||
/>
|
||||
<!-- Ordering Field. Type: Numbers (joomla) -->
|
||||
<field
|
||||
name="ordering"
|
||||
type="number"
|
||||
class="inputbox validate-ordering"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ORDERING_LABEL"
|
||||
description=""
|
||||
default="0"
|
||||
size="6"
|
||||
|
||||
required="false"
|
||||
/>
|
||||
<!-- Version Field. Type: Text (joomla) -->
|
||||
<field
|
||||
name="version"
|
||||
type="text"
|
||||
class="readonly"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_VERSION_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_VERSION_DESC"
|
||||
size="6"
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Dynamic Fields. -->
|
||||
<!-- Library Field. Type: Libraryreadonly. (custom) -->
|
||||
<field
|
||||
type="libraryreadonly"
|
||||
name="library"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_LIBRARY_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_LIBRARY_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="true"
|
||||
readonly="true"
|
||||
/>
|
||||
<!-- Note_add_folders Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_add_folders" label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_ADD_FOLDERS_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_ADD_FOLDERS_DESCRIPTION" heading="h4" class="alert alert-info note_add_folders" />
|
||||
<!-- Addurls Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
name="addurls"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDURLS_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDURLS_DESCRIPTION"
|
||||
icon="list"
|
||||
maximum="500">
|
||||
<form hidden="true" name="list_addurls_modal" repeat="true">
|
||||
<!-- Url Field. Type: Url. (joomla) -->
|
||||
<field
|
||||
type="url"
|
||||
name="url"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_URL_LABEL"
|
||||
size="150"
|
||||
maxlength="250"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_URL_DESCRIPTION"
|
||||
class="text_area"
|
||||
required="false"
|
||||
filter="url"
|
||||
validated="url"
|
||||
message="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_URL_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_URL_HINT"
|
||||
/>
|
||||
<!-- Type Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="type"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_TYPE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_TYPE_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
filter="INT"
|
||||
required="false"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_DEFAULT_LINK</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_LOCAL_GET</option>
|
||||
<option value="3">
|
||||
COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_LINK_LOCAL_DYNAMIC</option>
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Note_add_urls Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_add_urls" label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_ADD_URLS_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_ADD_URLS_DESCRIPTION" heading="h4" class="alert alert-info note_add_urls" />
|
||||
<!-- Note_add_files Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_add_files" label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_ADD_FILES_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTE_ADD_FILES_DESCRIPTION" heading="h4" class="alert alert-info note_add_files" />
|
||||
<!-- Addfolders Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
name="addfolders"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFOLDERS_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFOLDERS_DESCRIPTION"
|
||||
icon="list"
|
||||
maximum="500">
|
||||
<form hidden="true" name="list_addfolders_modal" repeat="true">
|
||||
<!-- Folder Field. Type: Customfolderlist. (custom) -->
|
||||
<field
|
||||
type="customfolderlist"
|
||||
name="folder"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_FOLDER_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_FOLDER_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="false"
|
||||
button="false"
|
||||
/>
|
||||
<!-- Path Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="path"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_LABEL"
|
||||
size="40"
|
||||
maxlength="150"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="false"
|
||||
disabled="false"
|
||||
required="false"
|
||||
filter="PATH"
|
||||
message="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_HINT"
|
||||
/>
|
||||
<!-- Rename Field. Type: Checkbox. (joomla) -->
|
||||
<field
|
||||
type="checkbox"
|
||||
name="rename"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_RENAME_LABEL"
|
||||
value="1"
|
||||
required="false"
|
||||
class="inputbox"
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Addfiles Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
name="addfiles"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILES_LABEL"
|
||||
layout="joomla.form.field.subform.repeatable-table"
|
||||
multiple="true"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILES_DESCRIPTION"
|
||||
icon="list"
|
||||
maximum="500">
|
||||
<form hidden="true" name="list_addfiles_modal" repeat="true">
|
||||
<!-- File Field. Type: Customfilelist. (custom) -->
|
||||
<field
|
||||
type="customfilelist"
|
||||
name="file"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_FILE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_FILE_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="0"
|
||||
required="false"
|
||||
button="false"
|
||||
/>
|
||||
<!-- Path Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="path"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_LABEL"
|
||||
size="40"
|
||||
maxlength="150"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="false"
|
||||
disabled="false"
|
||||
required="false"
|
||||
filter="PATH"
|
||||
message="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PATH_HINT"
|
||||
/>
|
||||
<!-- Notnew Field. Type: Checkbox. (joomla) -->
|
||||
<field
|
||||
type="checkbox"
|
||||
name="notnew"
|
||||
label="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTNEW_LABEL"
|
||||
value="1"
|
||||
required="false"
|
||||
description="COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NOTNEW_DESCRIPTION"
|
||||
class="inputbox"
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
</fieldset>
|
||||
|
||||
<!-- Access Control Fields. -->
|
||||
<fieldset name="accesscontrol">
|
||||
<!-- Asset Id Field. Type: Hidden (joomla) -->
|
||||
<field
|
||||
name="asset_id"
|
||||
type="hidden"
|
||||
filter="unset"
|
||||
/>
|
||||
<!-- Rules Field. Type: Rules (joomla) -->
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
label="Permissions in relation to this library_files_folders_urls"
|
||||
translate_label="false"
|
||||
filter="rules"
|
||||
validate="rules"
|
||||
class="inputbox"
|
||||
component="com_componentbuilder"
|
||||
section="library_files_folders_urls"
|
||||
/>
|
||||
</fieldset>
|
||||
</form>
|
@ -571,4 +571,76 @@ function getTemplateDetails(id){
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// set snippets that are on the page
|
||||
var snippetIds = [];
|
||||
var snippets = {};
|
||||
var snippet = 0;
|
||||
jQuery(document).ready(function($)
|
||||
{
|
||||
jQuery("#jform_snippet option").each(function()
|
||||
{
|
||||
var key = jQuery(this).val();
|
||||
var text = jQuery(this).text();
|
||||
snippets[key] = text;
|
||||
snippetIds.push(key);
|
||||
});
|
||||
snippet = jQuery("#jform_snippet").val();
|
||||
getSnippets();
|
||||
});
|
||||
|
||||
function getSnippets_server(libraries){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&format=json";
|
||||
if(token.length > 0 && libraries.length > 0){
|
||||
var request = 'token='+token+'&libraries='+JSON.stringify(libraries);
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
function getSnippets(){
|
||||
jQuery("#loading").show();
|
||||
// clear the selection
|
||||
jQuery('#jform_snippet').find('option').remove().end();
|
||||
jQuery('#jform_snippet').trigger('liszt:updated');
|
||||
// get country value if set
|
||||
var libraries = jQuery("#jform_libraries").val();
|
||||
if (libraries) {
|
||||
getSnippets_server(libraries).done(function(result) {
|
||||
setSnippets(result);
|
||||
jQuery("#loading").hide();
|
||||
if (typeof snippetButton !== 'undefined') {
|
||||
// ensure button is correct
|
||||
var snippet = jQuery('#jform_snippet').val();
|
||||
snippetButton(snippet);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// load all snippets in none is selected
|
||||
setSnippets(snippetIds);
|
||||
jQuery("#loading").hide();
|
||||
}
|
||||
}
|
||||
function setSnippets(array){
|
||||
if (array) {
|
||||
jQuery('#jform_snippet').append('<option value="">'+select_a_snippet+'</option>');
|
||||
jQuery.each( array, function( i, id ) {
|
||||
if (id in snippets) {
|
||||
jQuery('#jform_snippet').append('<option value="'+id+'">'+snippets[id]+'</option>');
|
||||
}
|
||||
if (id == snippet) {
|
||||
jQuery('#jform_snippet').val(id);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
jQuery('#jform_snippet').append('<option value="">'+create_a_snippet+'</option>');
|
||||
}
|
||||
jQuery('#jform_snippet').trigger('liszt:updated');
|
||||
}
|
||||
|
@ -153,11 +153,37 @@
|
||||
type="snippets"
|
||||
name="snippet"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_SNIPPET_LABEL"
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_SNIPPET_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
required="false"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Js_document Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="js_document"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_JS_DOCUMENT_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_JS_DOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_JS_DOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Libraries Field. Type: Libraries. (custom) -->
|
||||
<field
|
||||
type="libraries"
|
||||
name="libraries"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_LIBRARIES_LABEL"
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_LIBRARIES_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="true"
|
||||
default="0"
|
||||
required="false"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Css Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
@ -171,8 +197,8 @@
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_CSS_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
|
||||
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
|
||||
<!-- Add_php_document Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -187,61 +213,8 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Js_document Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="js_document"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_JS_DOCUMENT_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_JS_DOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_JS_DOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
|
||||
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
|
||||
<!-- Css_document Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="css_document"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_CSS_DOCUMENT_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_CSS_DOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_CSS_DOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Default Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="default"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_DEFAULT_LABEL"
|
||||
rows="20"
|
||||
cols="15"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_DEFAULT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_ajaxmethod Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_ajaxmethod"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_AJAXMETHOD_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_PHP_AJAXMETHOD_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_PHP_AJAXMETHOD_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_libraries_selection Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_libraries_selection" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION" heading="h4" class="alert alert-info note_libraries_selection" />
|
||||
<!-- Add_php_jview_display Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -256,6 +229,36 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Css_document Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="css_document"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_CSS_DOCUMENT_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_CSS_DOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_CSS_DOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
|
||||
<!-- Php_ajaxmethod Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_ajaxmethod"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_AJAXMETHOD_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_PHP_AJAXMETHOD_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_PHP_AJAXMETHOD_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
|
||||
<!-- Add_php_view Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -270,6 +273,32 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Default Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="default"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_DEFAULT_LABEL"
|
||||
rows="20"
|
||||
cols="15"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_DEFAULT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_php_jview Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_jview"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_JVIEW_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_model Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
@ -283,11 +312,30 @@
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_PHP_MODEL_HINT"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Add_php_jview Field. Type: Radio. (joomla) -->
|
||||
<!-- Php_controller Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_controller"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_CONTROLLER_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_PHP_CONTROLLER_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_PHP_CONTROLLER_HINT"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Not_required Field. Type: Hidden. (joomla) -->
|
||||
<field
|
||||
type="hidden"
|
||||
name="not_required"
|
||||
default="[]"
|
||||
/>
|
||||
<!-- Add_js_document Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_jview"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_JVIEW_LABEL"
|
||||
name="add_js_document"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_JS_DOCUMENT_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -297,12 +345,6 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Not_required Field. Type: Hidden. (joomla) -->
|
||||
<field
|
||||
type="hidden"
|
||||
name="not_required"
|
||||
default="[]"
|
||||
/>
|
||||
<!-- Custom_get Field. Type: Customgets. (custom) -->
|
||||
<field
|
||||
type="customgets"
|
||||
@ -311,11 +353,11 @@
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_CUSTOM_GET_DESCRIPTION"
|
||||
multiple="true"
|
||||
/>
|
||||
<!-- Add_js_document Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_css_document Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_js_document"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_JS_DOCUMENT_LABEL"
|
||||
name="add_css_document"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_CSS_DOCUMENT_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -335,11 +377,11 @@
|
||||
required="true"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Add_css_document Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_css Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_css_document"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_CSS_DOCUMENT_LABEL"
|
||||
name="add_css"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_CSS_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -358,22 +400,6 @@
|
||||
multiple="false"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Add_css Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_css"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_CSS_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Dynamic_values Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="dynamic_values" label="COM_COMPONENTBUILDER_SITE_VIEW_DYNAMIC_VALUES_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_DYNAMIC_VALUES_DESCRIPTION" heading="h4" class="dynamic_values" />
|
||||
<!-- Add_php_ajax Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -388,20 +414,8 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Add_custom_button Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_custom_button"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_CUSTOM_BUTTON_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Dynamic_values Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="dynamic_values" label="COM_COMPONENTBUILDER_SITE_VIEW_DYNAMIC_VALUES_LABEL" description="COM_COMPONENTBUILDER_SITE_VIEW_DYNAMIC_VALUES_DESCRIPTION" heading="h4" class="dynamic_values" />
|
||||
<!-- Ajax_input Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
@ -534,6 +548,33 @@
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Add_custom_button Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_custom_button"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_ADD_CUSTOM_BUTTON_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_document Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_document"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_DOCUMENT_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_PHP_DOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_PHP_DOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Button_position Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
@ -559,21 +600,6 @@
|
||||
<option value="5">
|
||||
COM_COMPONENTBUILDER_SITE_VIEW_CUSTOM</option>
|
||||
</field>
|
||||
<!-- Php_document Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_document"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_DOCUMENT_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_PHP_DOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_PHP_DOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_custom_toolbar_placeholder Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_custom_toolbar_placeholder" description="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_CUSTOM_TOOLBAR_PLACEHOLDER_DESCRIPTION" heading="h4" class="note_custom_toolbar_placeholder" showon="button_position:5" />
|
||||
<!-- Php_view Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
@ -587,6 +613,21 @@
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_PHP_VIEW_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_custom_toolbar_placeholder Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_custom_toolbar_placeholder" description="COM_COMPONENTBUILDER_SITE_VIEW_NOTE_CUSTOM_TOOLBAR_PLACEHOLDER_DESCRIPTION" heading="h4" class="note_custom_toolbar_placeholder" showon="button_position:5" />
|
||||
<!-- Php_jview_display Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_jview_display"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_JVIEW_DISPLAY_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_PHP_JVIEW_DISPLAY_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_PHP_JVIEW_DISPLAY_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Custom_button Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
@ -1096,32 +1137,6 @@
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Php_jview_display Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_jview_display"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_JVIEW_DISPLAY_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_PHP_JVIEW_DISPLAY_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_PHP_JVIEW_DISPLAY_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_controller Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_controller"
|
||||
label="COM_COMPONENTBUILDER_SITE_VIEW_PHP_CONTROLLER_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_SITE_VIEW_PHP_CONTROLLER_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_SITE_VIEW_PHP_CONTROLLER_HINT"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Php_jview Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
|
@ -226,4 +226,76 @@ function getTemplateDetails(id){
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// set snippets that are on the page
|
||||
var snippetIds = [];
|
||||
var snippets = {};
|
||||
var snippet = 0;
|
||||
jQuery(document).ready(function($)
|
||||
{
|
||||
jQuery("#jform_snippet option").each(function()
|
||||
{
|
||||
var key = jQuery(this).val();
|
||||
var text = jQuery(this).text();
|
||||
snippets[key] = text;
|
||||
snippetIds.push(key);
|
||||
});
|
||||
snippet = jQuery("#jform_snippet").val();
|
||||
getSnippets();
|
||||
});
|
||||
|
||||
function getSnippets_server(libraries){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getSnippets&format=json";
|
||||
if(token.length > 0 && libraries.length > 0){
|
||||
var request = 'token='+token+'&libraries='+JSON.stringify(libraries);
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
function getSnippets(){
|
||||
jQuery("#loading").show();
|
||||
// clear the selection
|
||||
jQuery('#jform_snippet').find('option').remove().end();
|
||||
jQuery('#jform_snippet').trigger('liszt:updated');
|
||||
// get country value if set
|
||||
var libraries = jQuery("#jform_libraries").val();
|
||||
if (libraries) {
|
||||
getSnippets_server(libraries).done(function(result) {
|
||||
setSnippets(result);
|
||||
jQuery("#loading").hide();
|
||||
if (typeof snippetButton !== 'undefined') {
|
||||
// ensure button is correct
|
||||
var snippet = jQuery('#jform_snippet').val();
|
||||
snippetButton(snippet);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// load all snippets in none is selected
|
||||
setSnippets(snippetIds);
|
||||
jQuery("#loading").hide();
|
||||
}
|
||||
}
|
||||
function setSnippets(array){
|
||||
if (array) {
|
||||
jQuery('#jform_snippet').append('<option value="">'+select_a_snippet+'</option>');
|
||||
jQuery.each( array, function( i, id ) {
|
||||
if (id in snippets) {
|
||||
jQuery('#jform_snippet').append('<option value="'+id+'">'+snippets[id]+'</option>');
|
||||
}
|
||||
if (id == snippet) {
|
||||
jQuery('#jform_snippet').val(id);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
jQuery('#jform_snippet').append('<option value="">'+create_a_snippet+'</option>');
|
||||
}
|
||||
jQuery('#jform_snippet').trigger('liszt:updated');
|
||||
}
|
||||
|
@ -140,6 +140,7 @@
|
||||
type="snippets"
|
||||
name="snippet"
|
||||
label="COM_COMPONENTBUILDER_TEMPLATE_SNIPPET_LABEL"
|
||||
description="COM_COMPONENTBUILDER_TEMPLATE_SNIPPET_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
required="false"
|
||||
@ -155,6 +156,22 @@
|
||||
required="false"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
|
||||
<!-- Libraries Field. Type: Libraries. (custom) -->
|
||||
<field
|
||||
type="libraries"
|
||||
name="libraries"
|
||||
label="COM_COMPONENTBUILDER_TEMPLATE_LIBRARIES_LABEL"
|
||||
description="COM_COMPONENTBUILDER_TEMPLATE_LIBRARIES_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="true"
|
||||
default="0"
|
||||
required="false"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_TEMPLATE_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
|
||||
<!-- Add_php_view Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -169,6 +186,18 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_TEMPLATE_NO</option>
|
||||
</field>
|
||||
<!-- Note_libraries_selection Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_libraries_selection" label="COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_LABEL" description="COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_DESCRIPTION" heading="h4" class="alert alert-info note_libraries_selection" />
|
||||
<!-- Not_required Field. Type: Hidden. (joomla) -->
|
||||
<field
|
||||
type="hidden"
|
||||
name="not_required"
|
||||
default="[]"
|
||||
/>
|
||||
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_TEMPLATE_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
|
||||
<!-- Dynamic_values Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="dynamic_values" label="COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_VALUES_LABEL" description="COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_VALUES_DESCRIPTION" heading="h4" class="dynamic_values" />
|
||||
<!-- Template Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
@ -181,20 +210,6 @@
|
||||
hint="COM_COMPONENTBUILDER_TEMPLATE_TEMPLATE_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_snippet_usage Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_snippet_usage" label="COM_COMPONENTBUILDER_TEMPLATE_NOTE_SNIPPET_USAGE_LABEL" heading="h4" class="snippet-usage note_snippet_usage" />
|
||||
<!-- Not_required Field. Type: Hidden. (joomla) -->
|
||||
<field
|
||||
type="hidden"
|
||||
name="not_required"
|
||||
default="[]"
|
||||
/>
|
||||
<!-- Note_uikit_snippet Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_uikit_snippet" label="COM_COMPONENTBUILDER_TEMPLATE_NOTE_UIKIT_SNIPPET_LABEL" heading="h4" class="snippet-code note_uikit_snippet" />
|
||||
<!-- Dynamic_values Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="dynamic_values" label="COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_VALUES_LABEL" description="COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_VALUES_DESCRIPTION" heading="h4" class="dynamic_values" />
|
||||
<!-- Note_add_language_string Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_add_language_string" label="COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_LANGUAGE_STRING_LABEL" description="COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_LANGUAGE_STRING_DESCRIPTION" heading="h4" class="note_add_language_string" />
|
||||
<!-- Php_view Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
|
Reference in New Issue
Block a user