added interface of the new decoupled libraries concept gh-92
This commit is contained in:
@ -126,7 +126,7 @@ jQuery(document).ready(function(){
|
||||
<?php foreach($numberAddconditions as $fieldNr): ?>
|
||||
jQuery('#adminForm').on('change', '#jform_addconditions__addconditions<?php echo $fieldNr ?>__match_field',function (e) {
|
||||
e.preventDefault();
|
||||
getFieldSelectOptions(<?php echo $fieldNr ?>, "_", "_");
|
||||
getFieldSelectOptions(<?php echo $fieldNr ?>);
|
||||
});
|
||||
<?php endforeach; ?>
|
||||
jQuery(document).on('subform-row-add', function(event, row){
|
||||
@ -134,9 +134,9 @@ jQuery(document).ready(function(){
|
||||
var fieldName = groupName.replace(/([0-9])/g, '');
|
||||
var fieldNr = groupName.replace(/([A-z_])/g, '');
|
||||
if ('addconditions' === fieldName) {
|
||||
jQuery('#adminForm').on('change', '#jform_addconditions_addconditions'+fieldNr+'_match_field',function (e) {
|
||||
jQuery('#adminForm').on('change', '#jform_addconditions__addconditions'+fieldNr+'__match_field',function (e) {
|
||||
e.preventDefault();
|
||||
getFieldSelectOptions(fieldNr, "", "");
|
||||
getFieldSelectOptions(fieldNr);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -725,7 +725,6 @@ jQuery(document).ready(function(){
|
||||
jQuery('#jform_add_custom_import').on('change',function() {
|
||||
var valueSwitch = jQuery("#jform_add_custom_import input[type='radio']:checked").val();
|
||||
getImportScripts(valueSwitch);
|
||||
|
||||
});
|
||||
|
||||
<?php
|
||||
|
@ -275,6 +275,12 @@ jQuery('#adminForm').on('change', '#jform_add_css',function (e)
|
||||
|
||||
|
||||
|
||||
jQuery(function() {
|
||||
jQuery('#open-libraries').html('<a href="index.php?option=com_componentbuilder&view=libraries"><?php echo JText::_('COM_COMPONENTBUILDER_LIBRARIES'); ?></a>');
|
||||
});
|
||||
jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width');
|
||||
jQuery('#jform_main_get').closest('.input-append').addClass('jform_main_get_input_width');
|
||||
jQuery('#jform_dynamic_get').closest('.input-append').addClass('jform_dynamic_get_input_width');
|
||||
<?php $fieldNrs = range(1,7,1); ?>
|
||||
<?php foreach($fieldNrs as $nr): ?>jQuery('#jform_custom_button_modal').on('change', 'select[name="icomoon-<?php echo $nr; ?>"]',function (e) {
|
||||
// update the icon if changed
|
||||
@ -304,6 +310,10 @@ jQuery('input.form-field-repeatable').on('row-add', function (e) {
|
||||
jQuery(this).selText().addClass("selected");
|
||||
});
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_libraries',function (e) {
|
||||
e.preventDefault();
|
||||
getSnippets();
|
||||
});
|
||||
|
||||
jQuery.fn.selText = function() {
|
||||
var obj = this[0];
|
||||
@ -354,5 +364,8 @@ jQuery(document).ready(function() {
|
||||
// get type value
|
||||
getLayoutDetails(9999);
|
||||
getTemplateDetails(9999);
|
||||
});
|
||||
});
|
||||
// some lang strings
|
||||
var select_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_SELECT_A_SNIPPET'); ?>';
|
||||
var create_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_CREATE_A_SNIPPET'); ?>';
|
||||
</script>
|
||||
|
@ -137,157 +137,157 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_datalenght listeners for datalenght_vvvvvzu function
|
||||
// #jform_datalenght listeners for datalenght_vvvvwaa function
|
||||
jQuery('#jform_datalenght').on('keyup',function()
|
||||
{
|
||||
var datalenght_vvvvvzu = jQuery("#jform_datalenght").val();
|
||||
vvvvvzu(datalenght_vvvvvzu);
|
||||
var datalenght_vvvvwaa = jQuery("#jform_datalenght").val();
|
||||
vvvvwaa(datalenght_vvvvwaa);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datalenght',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var datalenght_vvvvvzu = jQuery("#jform_datalenght").val();
|
||||
vvvvvzu(datalenght_vvvvvzu);
|
||||
var datalenght_vvvvwaa = jQuery("#jform_datalenght").val();
|
||||
vvvvwaa(datalenght_vvvvwaa);
|
||||
|
||||
});
|
||||
|
||||
// #jform_datadefault listeners for datadefault_vvvvvzv function
|
||||
// #jform_datadefault listeners for datadefault_vvvvwab function
|
||||
jQuery('#jform_datadefault').on('keyup',function()
|
||||
{
|
||||
var datadefault_vvvvvzv = jQuery("#jform_datadefault").val();
|
||||
vvvvvzv(datadefault_vvvvvzv);
|
||||
var datadefault_vvvvwab = jQuery("#jform_datadefault").val();
|
||||
vvvvwab(datadefault_vvvvwab);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datadefault',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var datadefault_vvvvvzv = jQuery("#jform_datadefault").val();
|
||||
vvvvvzv(datadefault_vvvvvzv);
|
||||
var datadefault_vvvvwab = jQuery("#jform_datadefault").val();
|
||||
vvvvwab(datadefault_vvvvwab);
|
||||
|
||||
});
|
||||
|
||||
// #jform_datatype listeners for datatype_vvvvvzw function
|
||||
// #jform_datatype listeners for datatype_vvvvwac function
|
||||
jQuery('#jform_datatype').on('keyup',function()
|
||||
{
|
||||
var datatype_vvvvvzw = jQuery("#jform_datatype").val();
|
||||
vvvvvzw(datatype_vvvvvzw);
|
||||
var datatype_vvvvwac = jQuery("#jform_datatype").val();
|
||||
vvvvwac(datatype_vvvvwac);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var datatype_vvvvvzw = jQuery("#jform_datatype").val();
|
||||
vvvvvzw(datatype_vvvvvzw);
|
||||
var datatype_vvvvwac = jQuery("#jform_datatype").val();
|
||||
vvvvwac(datatype_vvvvwac);
|
||||
|
||||
});
|
||||
|
||||
// #jform_datatype listeners for datatype_vvvvvzx function
|
||||
// #jform_datatype listeners for datatype_vvvvwad function
|
||||
jQuery('#jform_datatype').on('keyup',function()
|
||||
{
|
||||
var datatype_vvvvvzx = jQuery("#jform_datatype").val();
|
||||
vvvvvzx(datatype_vvvvvzx);
|
||||
var datatype_vvvvwad = jQuery("#jform_datatype").val();
|
||||
vvvvwad(datatype_vvvvwad);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var datatype_vvvvvzx = jQuery("#jform_datatype").val();
|
||||
vvvvvzx(datatype_vvvvvzx);
|
||||
var datatype_vvvvwad = jQuery("#jform_datatype").val();
|
||||
vvvvwad(datatype_vvvvwad);
|
||||
|
||||
});
|
||||
|
||||
// #jform_store listeners for store_vvvvvzy function
|
||||
// #jform_store listeners for store_vvvvwae function
|
||||
jQuery('#jform_store').on('keyup',function()
|
||||
{
|
||||
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);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_store',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
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);
|
||||
|
||||
});
|
||||
|
||||
// #jform_datatype listeners for datatype_vvvvvzy function
|
||||
// #jform_datatype listeners for datatype_vvvvwae function
|
||||
jQuery('#jform_datatype').on('keyup',function()
|
||||
{
|
||||
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);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
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);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_css_view listeners for add_css_view_vvvvwaa function
|
||||
// #jform_add_css_view listeners for add_css_view_vvvvwag function
|
||||
jQuery('#jform_add_css_view').on('keyup',function()
|
||||
{
|
||||
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);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_css_view',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
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);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_css_views listeners for add_css_views_vvvvwab function
|
||||
// #jform_add_css_views listeners for add_css_views_vvvvwah function
|
||||
jQuery('#jform_add_css_views').on('keyup',function()
|
||||
{
|
||||
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);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_css_views',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
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);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_javascript_view_footer listeners for add_javascript_view_footer_vvvvwac function
|
||||
// #jform_add_javascript_view_footer listeners for add_javascript_view_footer_vvvvwai function
|
||||
jQuery('#jform_add_javascript_view_footer').on('keyup',function()
|
||||
{
|
||||
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);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_javascript_view_footer',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
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);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_javascript_views_footer listeners for add_javascript_views_footer_vvvvwad function
|
||||
// #jform_add_javascript_views_footer listeners for add_javascript_views_footer_vvvvwaj function
|
||||
jQuery('#jform_add_javascript_views_footer').on('keyup',function()
|
||||
{
|
||||
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);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_javascript_views_footer',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
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);
|
||||
|
||||
});
|
||||
|
||||
|
@ -64,7 +64,7 @@ class ComponentbuilderViewFieldtype extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->vzufields = $this->get('Vzufields');
|
||||
$this->vzwfields = $this->get('Vzwfields');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -64,7 +64,7 @@ class ComponentbuilderViewFtp extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->vzvlinked_components = $this->get('Vzvlinked_components');
|
||||
$this->vzxlinked_components = $this->get('Vzxlinked_components');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -51,7 +51,7 @@ JHtml::_('behavior.keepalive');
|
||||
</form>
|
||||
<div id="snippets-github" class="bulk-updater-toggler">
|
||||
<br /><br /><br />
|
||||
<center><h1> <?php echo JText::_('COM_COMPONENTBUILDER_THE_SNIPPETS_IS'); ?> <br /><?php echo JText::_('COM_COMPONENTBUILDER_LOADING'); ?>.<span class="loading-dots">.</span></h1></center>
|
||||
<center><h1> <?php echo JText::_('COM_COMPONENTBUILDER_THE_SNIPPETS_ARE'); ?> <br /><?php echo JText::_('COM_COMPONENTBUILDER_LOADING'); ?>.<span class="loading-dots">.</span></h1></center>
|
||||
</div>
|
||||
<div class="bulk-updater-toggler uk-hidden">
|
||||
<h1><?php echo JText::_('COM_COMPONENTBUILDER_BULK_TOOLS'); ?></h1>
|
||||
|
@ -127,93 +127,93 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_location listeners for location_vvvvwae function
|
||||
// #jform_location listeners for location_vvvvwak function
|
||||
jQuery('#jform_location').on('keyup',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);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_location',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
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);
|
||||
|
||||
});
|
||||
|
||||
// #jform_location listeners for location_vvvvwaf function
|
||||
// #jform_location listeners for location_vvvvwal function
|
||||
jQuery('#jform_location').on('keyup',function()
|
||||
{
|
||||
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);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_location',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
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);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwag function
|
||||
// #jform_type listeners for type_vvvvwam function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwag = jQuery("#jform_type").val();
|
||||
vvvvwag(type_vvvvwag);
|
||||
var type_vvvvwam = jQuery("#jform_type").val();
|
||||
vvvvwam(type_vvvvwam);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwag = jQuery("#jform_type").val();
|
||||
vvvvwag(type_vvvvwag);
|
||||
var type_vvvvwam = jQuery("#jform_type").val();
|
||||
vvvvwam(type_vvvvwam);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwah function
|
||||
// #jform_type listeners for type_vvvvwan function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwah = jQuery("#jform_type").val();
|
||||
vvvvwah(type_vvvvwah);
|
||||
var type_vvvvwan = jQuery("#jform_type").val();
|
||||
vvvvwan(type_vvvvwan);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwah = jQuery("#jform_type").val();
|
||||
vvvvwah(type_vvvvwah);
|
||||
var type_vvvvwan = jQuery("#jform_type").val();
|
||||
vvvvwan(type_vvvvwan);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwai function
|
||||
// #jform_type listeners for type_vvvvwao function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwai = jQuery("#jform_type").val();
|
||||
vvvvwai(type_vvvvwai);
|
||||
var type_vvvvwao = jQuery("#jform_type").val();
|
||||
vvvvwao(type_vvvvwao);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwai = jQuery("#jform_type").val();
|
||||
vvvvwai(type_vvvvwai);
|
||||
var type_vvvvwao = jQuery("#jform_type").val();
|
||||
vvvvwao(type_vvvvwao);
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_vvvvwaj function
|
||||
// #jform_target listeners for target_vvvvwap function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
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);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
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);
|
||||
|
||||
});
|
||||
|
||||
|
@ -155,11 +155,20 @@ jQuery('#adminForm').on('change', '#jform_add_php_view',function (e)
|
||||
});
|
||||
|
||||
|
||||
|
||||
jQuery(function() {
|
||||
jQuery('#open-libraries').html('<a href="index.php?option=com_componentbuilder&view=libraries"><?php echo JText::_('COM_COMPONENTBUILDER_LIBRARIES'); ?></a>');
|
||||
});
|
||||
jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width');
|
||||
jQuery('#jform_dynamic_get').closest('.input-append').addClass('jform_dynamic_get_input_width');jQuery(function() {
|
||||
jQuery("code").click(function() {
|
||||
jQuery(this).selText().addClass("selected");
|
||||
});
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_libraries',function (e) {
|
||||
e.preventDefault();
|
||||
getSnippets();
|
||||
});
|
||||
|
||||
jQuery.fn.selText = function() {
|
||||
var obj = this[0];
|
||||
@ -209,5 +218,8 @@ jQuery(document).ready(function() {
|
||||
jQuery(document).ready(function() {
|
||||
// get type value
|
||||
getLayoutDetails(<?php echo ($this->item->id) ? $this->item->id:9999; ?>);
|
||||
});
|
||||
});
|
||||
// some lang strings
|
||||
var select_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_SELECT_A_SNIPPET'); ?>';
|
||||
var create_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_CREATE_A_SNIPPET'); ?>';
|
||||
</script>
|
||||
|
@ -89,6 +89,9 @@ $edit = "index.php?option=com_componentbuilder&view=libraries&task=library.edit"
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->description); ?>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo JText::_($item->how); ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($canDo->get('library.edit.state')) : ?>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
|
@ -28,5 +28,5 @@ defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="6"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
<td colspan="7"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
</tr>
|
@ -49,6 +49,9 @@ defined('_JEXEC') or die('Restricted access');
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_LABEL', 'description', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_LIBRARY_HOW_LABEL'); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LIBRARY_STATUS', 'published', $this->listDirn, $this->listOrder); ?>
|
||||
|
@ -92,7 +92,7 @@ class ComponentbuilderViewLibraries extends JViewLegacy
|
||||
*/
|
||||
protected function addToolBar()
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LIBRARIES'), 'joomla');
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LIBRARIES'), 'puzzle');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=libraries');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
|
1
admin/views/libraries_config/index.html
Normal file
1
admin/views/libraries_config/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
99
admin/views/libraries_config/tmpl/default.php
Normal file
99
admin/views/libraries_config/tmpl/default.php
Normal file
@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// load tooltip behavior
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.multiselect');
|
||||
JHtml::_('dropdown.init');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
if ($this->saveOrder)
|
||||
{
|
||||
$saveOrderingUrl = 'index.php?option=com_componentbuilder&task=libraries_config.saveOrderAjax&tmpl=component';
|
||||
JHtml::_('sortablelist.sortable', 'library_configList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.orderTable = function()
|
||||
{
|
||||
table = document.getElementById("sortTable");
|
||||
direction = document.getElementById("directionTable");
|
||||
order = table.options[table.selectedIndex].value;
|
||||
if (order != '<?php echo $this->listOrder; ?>')
|
||||
{
|
||||
dirn = 'asc';
|
||||
}
|
||||
else
|
||||
{
|
||||
dirn = direction.options[direction.selectedIndex].value;
|
||||
}
|
||||
Joomla.tableOrdering(order, dirn, '');
|
||||
}
|
||||
</script>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&view=libraries_config'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if(!empty( $this->sidebar)): ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif; ?>
|
||||
<?php if (empty($this->items)): ?>
|
||||
<?php echo $this->loadTemplate('toolbar');?>
|
||||
<div class="alert alert-no-items">
|
||||
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php echo $this->loadTemplate('toolbar');?>
|
||||
<table class="table table-striped" id="library_configList">
|
||||
<thead><?php echo $this->loadTemplate('head');?></thead>
|
||||
<tfoot><?php echo $this->loadTemplate('foot');?></tfoot>
|
||||
<tbody><?php echo $this->loadTemplate('body');?></tbody>
|
||||
</table>
|
||||
<?php //Load the batch processing form. ?>
|
||||
<?php if ($this->canCreate && $this->canEdit) : ?>
|
||||
<?php echo JHtml::_(
|
||||
'bootstrap.renderModal',
|
||||
'collapseModal',
|
||||
array(
|
||||
'title' => JText::_('COM_COMPONENTBUILDER_LIBRARIES_CONFIG_BATCH_OPTIONS'),
|
||||
'footer' => $this->loadTemplate('batch_footer')
|
||||
),
|
||||
$this->loadTemplate('batch_body')
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="filter_order" value="" />
|
||||
<input type="hidden" name="filter_order_Dir" value="" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
32
admin/views/libraries_config/tmpl/default_batch_body.php
Normal file
32
admin/views/libraries_config/tmpl/default_batch_body.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_batch_body.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
|
||||
<p><?php echo JText::_('COM_COMPONENTBUILDER_LIBRARIES_CONFIG_BATCH_TIP'); ?></p>
|
||||
<?php echo $this->batchDisplay; ?>
|
37
admin/views/libraries_config/tmpl/default_batch_footer.php
Normal file
37
admin/views/libraries_config/tmpl/default_batch_footer.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_batch_footer.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<!-- clear the batch values if cancel -->
|
||||
<button class="btn" type="button" onclick="" data-dismiss="modal">
|
||||
<?php echo JText::_('JCANCEL'); ?>
|
||||
</button>
|
||||
<!-- post the batch values if process -->
|
||||
<button class="btn btn-success" type="submit" onclick="Joomla.submitbutton('library_config.batch');">
|
||||
<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
|
||||
</button>
|
108
admin/views/libraries_config/tmpl/default_body.php
Normal file
108
admin/views/libraries_config/tmpl/default_body.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_body.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
$edit = "index.php?option=com_componentbuilder&view=libraries_config&task=library_config.edit";
|
||||
|
||||
?>
|
||||
<?php foreach ($this->items as $i => $item): ?>
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = JFactory::getUser($item->checked_out);
|
||||
$canDo = ComponentbuilderHelper::getActions('library_config',$item,'libraries_config');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td class="order nowrap center hidden-phone">
|
||||
<?php if ($canDo->get('library_config.edit.state')): ?>
|
||||
<?php
|
||||
if ($this->saveOrder)
|
||||
{
|
||||
$iconClass = ' inactive';
|
||||
}
|
||||
else
|
||||
{
|
||||
$iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED');
|
||||
}
|
||||
?>
|
||||
<span class="sortable-handler<?php echo $iconClass; ?>">
|
||||
<i class="icon-menu"></i>
|
||||
</span>
|
||||
<?php if ($this->saveOrder) : ?>
|
||||
<input type="text" style="display:none" name="order[]" size="5"
|
||||
value="<?php echo $item->ordering; ?>" class="width-20 text-area-order " />
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
⋮
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="nowrap center">
|
||||
<?php if ($canDo->get('library_config.edit')): ?>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
<?php if ($canCheckin) : ?>
|
||||
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
|
||||
<?php else: ?>
|
||||
□
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
□
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="nowrap">
|
||||
<?php if ($canDo->get('library_config.edit')): ?>
|
||||
<div class="name">
|
||||
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->library_name); ?></a>
|
||||
<?php if ($item->checked_out): ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'libraries_config.', $canCheckin); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="name"><?php echo $this->escape($item->library_name); ?></div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($canDo->get('library_config.edit.state')) : ?>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
<?php if ($canCheckin) : ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'libraries_config.', true, 'cb'); ?>
|
||||
<?php else: ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'libraries_config.', false, 'cb'); ?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'libraries_config.', true, 'cb'); ?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'libraries_config.', false, 'cb'); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="nowrap center hidden-phone">
|
||||
<?php echo $item->id; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
32
admin/views/libraries_config/tmpl/default_foot.php
Normal file
32
admin/views/libraries_config/tmpl/default_foot.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_foot.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="5"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
</tr>
|
61
admin/views/libraries_config/tmpl/default_head.php
Normal file
61
admin/views/libraries_config/tmpl/default_head.php
Normal file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_head.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<?php if ($this->canEdit&& $this->canState): ?>
|
||||
<th width="1%" class="nowrap center hidden-phone">
|
||||
<?php echo JHtml::_('grid.sort', '<i class="icon-menu-2"></i>', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
|
||||
</th>
|
||||
<th width="20" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.checkall'); ?>
|
||||
</th>
|
||||
<?php else: ?>
|
||||
<th width="20" class="nowrap center hidden-phone">
|
||||
▾
|
||||
</th>
|
||||
<th width="20" class="nowrap center">
|
||||
■
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<th class="nowrap" >
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_LIBRARY_CONFIG_LIBRARY_LABEL'); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LIBRARY_CONFIG_STATUS', 'published', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php else: ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_LIBRARY_CONFIG_STATUS'); ?>
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<th width="5" class="nowrap center hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LIBRARY_CONFIG_ID', 'id', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
59
admin/views/libraries_config/tmpl/default_toolbar.php
Normal file
59
admin/views/libraries_config/tmpl/default_toolbar.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_toolbar.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<div id="filter-bar" class="btn-toolbar">
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<label for="filter_search" class="element-invisible"><?php echo JText::_('Search');?></label>
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('Search Libraries_config'); ?>" />
|
||||
</div>
|
||||
<div class="btn-group pull-left">
|
||||
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
|
||||
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
|
||||
</div>
|
||||
<div class="btn-group pull-right hidden-phone">
|
||||
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
<div class="btn-group pull-right hidden-phone">
|
||||
<label for="directionTable" class="element-invisible"><?php echo JText::_('JFIELD_ORDERING_DESC');?></label>
|
||||
<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()">
|
||||
<option value=""><?php echo JText::_('JFIELD_ORDERING_DESC');?></option>
|
||||
<option value="asc" <?php if ($this->listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
|
||||
<option value="desc" <?php if ($this->listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="btn-group pull-right">
|
||||
<label for="sortTable" class="element-invisible"><?php echo JText::_('JGLOBAL_SORT_BY');?></label>
|
||||
<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()">
|
||||
<option value=""><?php echo JText::_('JGLOBAL_SORT_BY');?></option>
|
||||
<?php echo JHtml::_('select.options', $this->getSortFields(), 'value', 'text', $this->listOrder);?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
1
admin/views/libraries_config/tmpl/index.html
Normal file
1
admin/views/libraries_config/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
238
admin/views/libraries_config/view.html.php
Normal file
238
admin/views/libraries_config/view.html.php
Normal file
@ -0,0 +1,238 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla view library
|
||||
jimport('joomla.application.component.view');
|
||||
|
||||
/**
|
||||
* Componentbuilder View class for the Libraries_config
|
||||
*/
|
||||
class ComponentbuilderViewLibraries_config extends JViewLegacy
|
||||
{
|
||||
/**
|
||||
* Libraries_config view display method
|
||||
* @return void
|
||||
*/
|
||||
function display($tpl = null)
|
||||
{
|
||||
if ($this->getLayout() !== 'modal')
|
||||
{
|
||||
// Include helper submenu
|
||||
ComponentbuilderHelper::addSubmenu('libraries_config');
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_config');
|
||||
$this->canEdit = $this->canDo->get('library_config.edit');
|
||||
$this->canState = $this->canDo->get('library_config.edit.state');
|
||||
$this->canCreate = $this->canDo->get('library_config.create');
|
||||
$this->canDelete = $this->canDo->get('library_config.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
|
||||
// Set the document
|
||||
$this->setDocument();
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting the toolbar
|
||||
*/
|
||||
protected function addToolBar()
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LIBRARIES_CONFIG'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=libraries_config');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
JToolBarHelper::addNew('library_config.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('library_config.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('libraries_config.publish');
|
||||
JToolBarHelper::unpublishList('libraries_config.unpublish');
|
||||
JToolBarHelper::archiveList('libraries_config.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('libraries_config.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'libraries_config.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('libraries_config.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('libraries_config');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_PUBLISHED'),
|
||||
'filter_published',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
|
||||
);
|
||||
// only load if batch allowed
|
||||
if ($this->canBatch)
|
||||
{
|
||||
JHtmlBatch_::addListSelection(
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE'),
|
||||
'batch[published]',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_ACCESS'),
|
||||
'filter_access',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
JHtmlBatch_::addListSelection(
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to set up the document properties
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setDocument()
|
||||
{
|
||||
$document = JFactory::getDocument();
|
||||
$document->setTitle(JText::_('COM_COMPONENTBUILDER_LIBRARIES_CONFIG'));
|
||||
$document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries_config.css");
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
*
|
||||
* @return mixed The escaped value.
|
||||
*/
|
||||
public function escape($var)
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of fields the table can be sorted by
|
||||
*
|
||||
* @return array Array containing the field name to sort by as the key and display text as value
|
||||
*/
|
||||
protected function getSortFields()
|
||||
{
|
||||
return array(
|
||||
'a.sorting' => JText::_('JGRID_HEADING_ORDERING'),
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
1
admin/views/libraries_files_folders_urls/index.html
Normal file
1
admin/views/libraries_files_folders_urls/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
99
admin/views/libraries_files_folders_urls/tmpl/default.php
Normal file
99
admin/views/libraries_files_folders_urls/tmpl/default.php
Normal file
@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// load tooltip behavior
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.multiselect');
|
||||
JHtml::_('dropdown.init');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
if ($this->saveOrder)
|
||||
{
|
||||
$saveOrderingUrl = 'index.php?option=com_componentbuilder&task=libraries_files_folders_urls.saveOrderAjax&tmpl=component';
|
||||
JHtml::_('sortablelist.sortable', 'library_files_folders_urlsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.orderTable = function()
|
||||
{
|
||||
table = document.getElementById("sortTable");
|
||||
direction = document.getElementById("directionTable");
|
||||
order = table.options[table.selectedIndex].value;
|
||||
if (order != '<?php echo $this->listOrder; ?>')
|
||||
{
|
||||
dirn = 'asc';
|
||||
}
|
||||
else
|
||||
{
|
||||
dirn = direction.options[direction.selectedIndex].value;
|
||||
}
|
||||
Joomla.tableOrdering(order, dirn, '');
|
||||
}
|
||||
</script>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&view=libraries_files_folders_urls'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if(!empty( $this->sidebar)): ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif; ?>
|
||||
<?php if (empty($this->items)): ?>
|
||||
<?php echo $this->loadTemplate('toolbar');?>
|
||||
<div class="alert alert-no-items">
|
||||
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php echo $this->loadTemplate('toolbar');?>
|
||||
<table class="table table-striped" id="library_files_folders_urlsList">
|
||||
<thead><?php echo $this->loadTemplate('head');?></thead>
|
||||
<tfoot><?php echo $this->loadTemplate('foot');?></tfoot>
|
||||
<tbody><?php echo $this->loadTemplate('body');?></tbody>
|
||||
</table>
|
||||
<?php //Load the batch processing form. ?>
|
||||
<?php if ($this->canCreate && $this->canEdit) : ?>
|
||||
<?php echo JHtml::_(
|
||||
'bootstrap.renderModal',
|
||||
'collapseModal',
|
||||
array(
|
||||
'title' => JText::_('COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_BATCH_OPTIONS'),
|
||||
'footer' => $this->loadTemplate('batch_footer')
|
||||
),
|
||||
$this->loadTemplate('batch_body')
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="filter_order" value="" />
|
||||
<input type="hidden" name="filter_order_Dir" value="" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_batch_body.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
|
||||
<p><?php echo JText::_('COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS_BATCH_TIP'); ?></p>
|
||||
<?php echo $this->batchDisplay; ?>
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_batch_footer.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<!-- clear the batch values if cancel -->
|
||||
<button class="btn" type="button" onclick="" data-dismiss="modal">
|
||||
<?php echo JText::_('JCANCEL'); ?>
|
||||
</button>
|
||||
<!-- post the batch values if process -->
|
||||
<button class="btn btn-success" type="submit" onclick="Joomla.submitbutton('library_files_folders_urls.batch');">
|
||||
<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
|
||||
</button>
|
108
admin/views/libraries_files_folders_urls/tmpl/default_body.php
Normal file
108
admin/views/libraries_files_folders_urls/tmpl/default_body.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_body.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
$edit = "index.php?option=com_componentbuilder&view=libraries_files_folders_urls&task=library_files_folders_urls.edit";
|
||||
|
||||
?>
|
||||
<?php foreach ($this->items as $i => $item): ?>
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = JFactory::getUser($item->checked_out);
|
||||
$canDo = ComponentbuilderHelper::getActions('library_files_folders_urls',$item,'libraries_files_folders_urls');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td class="order nowrap center hidden-phone">
|
||||
<?php if ($canDo->get('library_files_folders_urls.edit.state')): ?>
|
||||
<?php
|
||||
if ($this->saveOrder)
|
||||
{
|
||||
$iconClass = ' inactive';
|
||||
}
|
||||
else
|
||||
{
|
||||
$iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED');
|
||||
}
|
||||
?>
|
||||
<span class="sortable-handler<?php echo $iconClass; ?>">
|
||||
<i class="icon-menu"></i>
|
||||
</span>
|
||||
<?php if ($this->saveOrder) : ?>
|
||||
<input type="text" style="display:none" name="order[]" size="5"
|
||||
value="<?php echo $item->ordering; ?>" class="width-20 text-area-order " />
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
⋮
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="nowrap center">
|
||||
<?php if ($canDo->get('library_files_folders_urls.edit')): ?>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
<?php if ($canCheckin) : ?>
|
||||
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
|
||||
<?php else: ?>
|
||||
□
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
□
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="nowrap">
|
||||
<?php if ($canDo->get('library_files_folders_urls.edit')): ?>
|
||||
<div class="name">
|
||||
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->library_name); ?></a>
|
||||
<?php if ($item->checked_out): ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'libraries_files_folders_urls.', $canCheckin); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="name"><?php echo $this->escape($item->library_name); ?></div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($canDo->get('library_files_folders_urls.edit.state')) : ?>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
<?php if ($canCheckin) : ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'libraries_files_folders_urls.', true, 'cb'); ?>
|
||||
<?php else: ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'libraries_files_folders_urls.', false, 'cb'); ?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'libraries_files_folders_urls.', true, 'cb'); ?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'libraries_files_folders_urls.', false, 'cb'); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="nowrap center hidden-phone">
|
||||
<?php echo $item->id; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_foot.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="5"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
</tr>
|
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_head.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<?php if ($this->canEdit&& $this->canState): ?>
|
||||
<th width="1%" class="nowrap center hidden-phone">
|
||||
<?php echo JHtml::_('grid.sort', '<i class="icon-menu-2"></i>', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
|
||||
</th>
|
||||
<th width="20" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.checkall'); ?>
|
||||
</th>
|
||||
<?php else: ?>
|
||||
<th width="20" class="nowrap center hidden-phone">
|
||||
▾
|
||||
</th>
|
||||
<th width="20" class="nowrap center">
|
||||
■
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<th class="nowrap" >
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_LIBRARY_LABEL'); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_STATUS', 'published', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php else: ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_STATUS'); ?>
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<th width="5" class="nowrap center hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ID', 'id', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_toolbar.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<div id="filter-bar" class="btn-toolbar">
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<label for="filter_search" class="element-invisible"><?php echo JText::_('Search');?></label>
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('Search Libraries_files_folders_urls'); ?>" />
|
||||
</div>
|
||||
<div class="btn-group pull-left">
|
||||
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
|
||||
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
|
||||
</div>
|
||||
<div class="btn-group pull-right hidden-phone">
|
||||
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
<div class="btn-group pull-right hidden-phone">
|
||||
<label for="directionTable" class="element-invisible"><?php echo JText::_('JFIELD_ORDERING_DESC');?></label>
|
||||
<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()">
|
||||
<option value=""><?php echo JText::_('JFIELD_ORDERING_DESC');?></option>
|
||||
<option value="asc" <?php if ($this->listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
|
||||
<option value="desc" <?php if ($this->listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="btn-group pull-right">
|
||||
<label for="sortTable" class="element-invisible"><?php echo JText::_('JGLOBAL_SORT_BY');?></label>
|
||||
<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()">
|
||||
<option value=""><?php echo JText::_('JGLOBAL_SORT_BY');?></option>
|
||||
<?php echo JHtml::_('select.options', $this->getSortFields(), 'value', 'text', $this->listOrder);?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
1
admin/views/libraries_files_folders_urls/tmpl/index.html
Normal file
1
admin/views/libraries_files_folders_urls/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
238
admin/views/libraries_files_folders_urls/view.html.php
Normal file
238
admin/views/libraries_files_folders_urls/view.html.php
Normal file
@ -0,0 +1,238 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla view library
|
||||
jimport('joomla.application.component.view');
|
||||
|
||||
/**
|
||||
* Componentbuilder View class for the Libraries_files_folders_urls
|
||||
*/
|
||||
class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy
|
||||
{
|
||||
/**
|
||||
* Libraries_files_folders_urls view display method
|
||||
* @return void
|
||||
*/
|
||||
function display($tpl = null)
|
||||
{
|
||||
if ($this->getLayout() !== 'modal')
|
||||
{
|
||||
// Include helper submenu
|
||||
ComponentbuilderHelper::addSubmenu('libraries_files_folders_urls');
|
||||
}
|
||||
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls');
|
||||
$this->canEdit = $this->canDo->get('library_files_folders_urls.edit');
|
||||
$this->canState = $this->canDo->get('library_files_folders_urls.edit.state');
|
||||
$this->canCreate = $this->canDo->get('library_files_folders_urls.create');
|
||||
$this->canDelete = $this->canDo->get('library_files_folders_urls.delete');
|
||||
$this->canBatch = $this->canDo->get('core.batch');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
|
||||
// Set the document
|
||||
$this->setDocument();
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting the toolbar
|
||||
*/
|
||||
protected function addToolBar()
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=libraries_files_folders_urls');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
JToolBarHelper::addNew('library_files_folders_urls.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('library_files_folders_urls.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('libraries_files_folders_urls.publish');
|
||||
JToolBarHelper::unpublishList('libraries_files_folders_urls.unpublish');
|
||||
JToolBarHelper::archiveList('libraries_files_folders_urls.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('libraries_files_folders_urls.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'libraries_files_folders_urls.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('libraries_files_folders_urls.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('libraries_files_folders_urls');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_PUBLISHED'),
|
||||
'filter_published',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
|
||||
);
|
||||
// only load if batch allowed
|
||||
if ($this->canBatch)
|
||||
{
|
||||
JHtmlBatch_::addListSelection(
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE'),
|
||||
'batch[published]',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_ACCESS'),
|
||||
'filter_access',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
JHtmlBatch_::addListSelection(
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to set up the document properties
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setDocument()
|
||||
{
|
||||
$document = JFactory::getDocument();
|
||||
$document->setTitle(JText::_('COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS'));
|
||||
$document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries_files_folders_urls.css");
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
*
|
||||
* @return mixed The escaped value.
|
||||
*/
|
||||
public function escape($var)
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of fields the table can be sorted by
|
||||
*
|
||||
* @return array Array containing the field name to sort by as the key and display text as value
|
||||
*/
|
||||
protected function getSortFields()
|
||||
{
|
||||
return array(
|
||||
'a.sorting' => JText::_('JGRID_HEADING_ORDERING'),
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
@ -58,17 +58,40 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
<div id="componentbuilder_loader" style="display: none;">
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&layout=edit&id='.(int) $this->item->id.$this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
|
||||
<?php echo JLayoutHelper::render('library.behaviour_above', $this); ?>
|
||||
<div class="form-horizontal">
|
||||
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'libraryTab', array('active' => 'details')); ?>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'libraryTab', array('active' => 'behaviour')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'libraryTab', 'details', JText::_('COM_COMPONENTBUILDER_LIBRARY_DETAILS', true)); ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'libraryTab', 'behaviour', JText::_('COM_COMPONENTBUILDER_LIBRARY_BEHAVIOUR', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span6">
|
||||
<?php echo JLayoutHelper::render('library.details_left', $this); ?>
|
||||
<div class="span12">
|
||||
<?php echo JLayoutHelper::render('library.behaviour_right', $this); ?>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<?php echo JLayoutHelper::render('library.details_right', $this); ?>
|
||||
</div>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<?php echo JLayoutHelper::render('library.behaviour_fullwidth', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'libraryTab', 'files_folders_urls', JText::_('COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
</div>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<?php echo JLayoutHelper::render('library.files_folders_urls_fullwidth', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'libraryTab', 'config', JText::_('COM_COMPONENTBUILDER_LIBRARY_CONFIG', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
</div>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<?php echo JLayoutHelper::render('library.config_fullwidth', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
@ -112,6 +135,156 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<?php echo JLayoutHelper::render('library.behaviour_under', $this); ?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_how listeners for how_vvvvvzu function
|
||||
jQuery('#jform_how').on('keyup',function()
|
||||
{
|
||||
var how_vvvvvzu = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzu(how_vvvvvzu);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_how',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var how_vvvvvzu = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzu(how_vvvvvzu);
|
||||
|
||||
});
|
||||
|
||||
// #jform_how listeners for how_vvvvvzv function
|
||||
jQuery('#jform_how').on('keyup',function()
|
||||
{
|
||||
var how_vvvvvzv = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzv(how_vvvvvzv);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_how',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var how_vvvvvzv = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzv(how_vvvvvzv);
|
||||
|
||||
});
|
||||
|
||||
// #jform_how listeners for how_vvvvvzw function
|
||||
jQuery('#jform_how').on('keyup',function()
|
||||
{
|
||||
var how_vvvvvzw = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzw(how_vvvvvzw);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_how',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var how_vvvvvzw = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzw(how_vvvvvzw);
|
||||
|
||||
});
|
||||
|
||||
// #jform_how listeners for how_vvvvvzx function
|
||||
jQuery('#jform_how').on('keyup',function()
|
||||
{
|
||||
var how_vvvvvzx = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzx(how_vvvvvzx);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_how',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var how_vvvvvzx = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzx(how_vvvvvzx);
|
||||
|
||||
});
|
||||
|
||||
// #jform_how listeners for how_vvvvvzy function
|
||||
jQuery('#jform_how').on('keyup',function()
|
||||
{
|
||||
var how_vvvvvzy = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzy(how_vvvvvzy);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_how',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var how_vvvvvzy = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzy(how_vvvvvzy);
|
||||
|
||||
});
|
||||
|
||||
// #jform_how listeners for how_vvvvvzz function
|
||||
jQuery('#jform_how').on('keyup',function()
|
||||
{
|
||||
var how_vvvvvzz = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzz(how_vvvvvzz);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_how',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var how_vvvvvzz = jQuery("#jform_how input[type='radio']:checked").val();
|
||||
vvvvvzz(how_vvvvvzz);
|
||||
|
||||
});
|
||||
|
||||
|
||||
<?php $numberAddconditions = range(0, count($this->item->addconditions) + 3, 1);?>
|
||||
|
||||
// for the values already set
|
||||
jQuery(document).ready(function(){
|
||||
<?php foreach($numberAddconditions as $fieldNr): ?>
|
||||
jQuery('#adminForm').on('change', '#jform_addconditions__addconditions<?php echo $fieldNr ?>__option_field',function (e) {
|
||||
e.preventDefault();
|
||||
getFieldSelectOptions(<?php echo $fieldNr ?>);
|
||||
});
|
||||
<?php endforeach; ?>
|
||||
jQuery(document).on('subform-row-add', function(event, row){
|
||||
var groupName = jQuery(row).data('group');
|
||||
var fieldName = groupName.replace(/([0-9])/g, '');
|
||||
var fieldNr = groupName.replace(/([A-z_])/g, '');
|
||||
if ('addconditions' === fieldName) {
|
||||
jQuery('#adminForm').on('change', '#jform_addconditions__addconditions'+fieldNr+'__option_field',function (e) {
|
||||
e.preventDefault();
|
||||
getFieldSelectOptions(fieldNr);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
<?php
|
||||
$app = JFactory::getApplication();
|
||||
?>
|
||||
function JRouter(link) {
|
||||
<?php
|
||||
if ($app->isSite())
|
||||
{
|
||||
echo 'var url = "'.JURI::root().'";';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'var url = "";';
|
||||
}
|
||||
?>
|
||||
return url+link;
|
||||
}
|
||||
|
||||
// nice little dot trick :)
|
||||
jQuery(document).ready( function($) {
|
||||
var x=0;
|
||||
setInterval(function() {
|
||||
var dots = "";
|
||||
x++;
|
||||
for (var y=0; y < x%8; y++) {
|
||||
dots+=".";
|
||||
}
|
||||
$(".loading-dots").text(dots);
|
||||
} , 500);
|
||||
});
|
||||
</script>
|
||||
|
@ -191,9 +191,20 @@ class ComponentbuilderViewLibrary extends JViewLegacy
|
||||
$isNew = ($this->item->id < 1);
|
||||
$document = JFactory::getDocument();
|
||||
$document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_LIBRARY_NEW' : 'COM_COMPONENTBUILDER_LIBRARY_EDIT'));
|
||||
$document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/library.css");
|
||||
$document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/library.css");
|
||||
// Add Ajax Token
|
||||
$document->addScriptDeclaration("var token = '".JSession::getFormToken()."';");
|
||||
$document->addScript(JURI::root() . $this->script);
|
||||
$document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/library/submitbutton.js");
|
||||
$document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/library/submitbutton.js");
|
||||
// add JavaScripts
|
||||
$document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit/js/uikit.min.js' );
|
||||
$document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit/js/components/lightbox.min.js', 'text/javascript', true);
|
||||
$document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit/js/components/notify.min.js', 'text/javascript', true);
|
||||
// add the style sheets
|
||||
$document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit/css/uikit.gradient.min.css' );
|
||||
$document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit/css/components/notify.gradient.min.css' );
|
||||
// add var key
|
||||
$document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';");
|
||||
JText::script('view not acceptable. Error');
|
||||
}
|
||||
}
|
||||
|
49
admin/views/library_config/submitbutton.js
Normal file
49
admin/views/library_config/submitbutton.js
Normal file
@ -0,0 +1,49 @@
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage submitbutton.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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == ''){
|
||||
return false;
|
||||
} else {
|
||||
var isValid=true;
|
||||
var action = task.split('.');
|
||||
if (action[1] != 'cancel' && action[1] != 'close'){
|
||||
var forms = $$('form.form-validate');
|
||||
for (var i=0;i<forms.length;i++){
|
||||
if (!document.formvalidator.isValid(forms[i])){
|
||||
isValid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isValid){
|
||||
Joomla.submitform(task);
|
||||
return true;
|
||||
} else {
|
||||
alert(Joomla.JText._('library_config, some values are not acceptable.','Some values are unacceptable'));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
117
admin/views/library_config/tmpl/edit.php
Normal file
117
admin/views/library_config/tmpl/edit.php
Normal file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage edit.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
var outerDiv = jQuery('body');
|
||||
jQuery('<div id="loading"></div>')
|
||||
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
|
||||
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
|
||||
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
|
||||
.css("width", outerDiv.width())
|
||||
.css("height", outerDiv.height())
|
||||
.css("position", "fixed")
|
||||
.css("opacity", "0.80")
|
||||
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
|
||||
.css("filter", "alpha(opacity = 80)")
|
||||
.css("display", "none")
|
||||
.appendTo(outerDiv);
|
||||
jQuery('#loading').show();
|
||||
// when page is ready remove and show
|
||||
jQuery(window).load(function() {
|
||||
jQuery('#componentbuilder_loader').fadeIn('fast');
|
||||
jQuery('#loading').hide();
|
||||
});
|
||||
</script>
|
||||
<div id="componentbuilder_loader" style="display: none;">
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&layout=edit&id='.(int) $this->item->id.$this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
|
||||
<?php echo JLayoutHelper::render('library_config.tweaks_above', $this); ?>
|
||||
<div class="form-horizontal">
|
||||
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'library_configTab', array('active' => 'tweaks')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'library_configTab', 'tweaks', JText::_('COM_COMPONENTBUILDER_LIBRARY_CONFIG_TWEAKS', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
</div>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<?php echo JLayoutHelper::render('library_config.tweaks_fullwidth', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php if ($this->canDo->get('library_config.delete') || $this->canDo->get('library_config.edit.created_by') || $this->canDo->get('library_config.edit.state') || $this->canDo->get('library_config.edit.created')) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'library_configTab', 'publishing', JText::_('COM_COMPONENTBUILDER_LIBRARY_CONFIG_PUBLISHING', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span6">
|
||||
<?php echo JLayoutHelper::render('library_config.publishing', $this); ?>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<?php echo JLayoutHelper::render('library_config.publlshing', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->canDo->get('core.admin')) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'library_configTab', 'permissions', JText::_('COM_COMPONENTBUILDER_LIBRARY_CONFIG_PERMISSION', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<fieldset class="adminform">
|
||||
<div class="adminformlist">
|
||||
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
|
||||
<div>
|
||||
<?php echo $field->label; echo $field->input;?>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
|
||||
<div>
|
||||
<input type="hidden" name="task" value="library_config.edit" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
1
admin/views/library_config/tmpl/index.html
Normal file
1
admin/views/library_config/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
199
admin/views/library_config/view.html.php
Normal file
199
admin/views/library_config/view.html.php
Normal file
@ -0,0 +1,199 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla view library
|
||||
jimport('joomla.application.component.view');
|
||||
|
||||
/**
|
||||
* Library_config View class
|
||||
*/
|
||||
class ComponentbuilderViewLibrary_config extends JViewLegacy
|
||||
{
|
||||
/**
|
||||
* display method of View
|
||||
* @return void
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_config',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
|
||||
// Set the document
|
||||
$this->setDocument();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Setting the toolbar
|
||||
*/
|
||||
protected function addToolBar()
|
||||
{
|
||||
JFactory::getApplication()->input->set('hidemainmenu', true);
|
||||
$user = JFactory::getUser();
|
||||
$userId = $user->id;
|
||||
$isNew = $this->item->id == 0;
|
||||
|
||||
JToolbarHelper::title( JText::_($isNew ? 'COM_COMPONENTBUILDER_LIBRARY_CONFIG_NEW' : 'COM_COMPONENTBUILDER_LIBRARY_CONFIG_EDIT'), 'pencil-2 article-add');
|
||||
// Built the actions for new and existing records.
|
||||
if ($this->refid || $this->ref)
|
||||
{
|
||||
if ($this->canDo->get('library_config.create') && $isNew)
|
||||
{
|
||||
// We can create the record.
|
||||
JToolBarHelper::save('library_config.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
elseif ($this->canDo->get('library_config.edit'))
|
||||
{
|
||||
// We can save the record.
|
||||
JToolBarHelper::save('library_config.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
if ($isNew)
|
||||
{
|
||||
// Do not creat but cancel.
|
||||
JToolBarHelper::cancel('library_config.cancel', 'JTOOLBAR_CANCEL');
|
||||
}
|
||||
else
|
||||
{
|
||||
// We can close it.
|
||||
JToolBarHelper::cancel('library_config.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($isNew)
|
||||
{
|
||||
// For new records, check the create permission.
|
||||
if ($this->canDo->get('library_config.create'))
|
||||
{
|
||||
JToolBarHelper::apply('library_config.apply', 'JTOOLBAR_APPLY');
|
||||
JToolBarHelper::save('library_config.save', 'JTOOLBAR_SAVE');
|
||||
JToolBarHelper::custom('library_config.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
|
||||
};
|
||||
JToolBarHelper::cancel('library_config.cancel', 'JTOOLBAR_CANCEL');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->canDo->get('library_config.edit'))
|
||||
{
|
||||
// We can save the new record
|
||||
JToolBarHelper::apply('library_config.apply', 'JTOOLBAR_APPLY');
|
||||
JToolBarHelper::save('library_config.save', 'JTOOLBAR_SAVE');
|
||||
// We can save this record, but check the create permission to see
|
||||
// if we can return to make a new one.
|
||||
if ($this->canDo->get('library_config.create'))
|
||||
{
|
||||
JToolBarHelper::custom('library_config.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
|
||||
}
|
||||
}
|
||||
$canVersion = ($this->canDo->get('core.version') && $this->canDo->get('library_config.version'));
|
||||
if ($this->state->params->get('save_history', 1) && $this->canDo->get('library_config.edit') && $canVersion)
|
||||
{
|
||||
JToolbarHelper::versions('com_componentbuilder.library_config', $this->item->id);
|
||||
}
|
||||
if ($this->canDo->get('library_config.create'))
|
||||
{
|
||||
JToolBarHelper::custom('library_config.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
|
||||
}
|
||||
JToolBarHelper::cancel('library_config.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
}
|
||||
JToolbarHelper::divider();
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('library_config');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
*
|
||||
* @return mixed The escaped value.
|
||||
*/
|
||||
public function escape($var)
|
||||
{
|
||||
if(strlen($var) > 30)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to set up the document properties
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setDocument()
|
||||
{
|
||||
$isNew = ($this->item->id < 1);
|
||||
$document = JFactory::getDocument();
|
||||
$document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_LIBRARY_CONFIG_NEW' : 'COM_COMPONENTBUILDER_LIBRARY_CONFIG_EDIT'));
|
||||
$document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/library_config.css");
|
||||
$document->addScript(JURI::root() . $this->script);
|
||||
$document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/library_config/submitbutton.js");
|
||||
JText::script('view not acceptable. Error');
|
||||
}
|
||||
}
|
49
admin/views/library_files_folders_urls/submitbutton.js
Normal file
49
admin/views/library_files_folders_urls/submitbutton.js
Normal file
@ -0,0 +1,49 @@
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage submitbutton.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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == ''){
|
||||
return false;
|
||||
} else {
|
||||
var isValid=true;
|
||||
var action = task.split('.');
|
||||
if (action[1] != 'cancel' && action[1] != 'close'){
|
||||
var forms = $$('form.form-validate');
|
||||
for (var i=0;i<forms.length;i++){
|
||||
if (!document.formvalidator.isValid(forms[i])){
|
||||
isValid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isValid){
|
||||
Joomla.submitform(task);
|
||||
return true;
|
||||
} else {
|
||||
alert(Joomla.JText._('library_files_folders_urls, some values are not acceptable.','Some values are unacceptable'));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
117
admin/views/library_files_folders_urls/tmpl/edit.php
Normal file
117
admin/views/library_files_folders_urls/tmpl/edit.php
Normal file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage edit.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// waiting spinner
|
||||
var outerDiv = jQuery('body');
|
||||
jQuery('<div id="loading"></div>')
|
||||
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
|
||||
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
|
||||
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
|
||||
.css("width", outerDiv.width())
|
||||
.css("height", outerDiv.height())
|
||||
.css("position", "fixed")
|
||||
.css("opacity", "0.80")
|
||||
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
|
||||
.css("filter", "alpha(opacity = 80)")
|
||||
.css("display", "none")
|
||||
.appendTo(outerDiv);
|
||||
jQuery('#loading').show();
|
||||
// when page is ready remove and show
|
||||
jQuery(window).load(function() {
|
||||
jQuery('#componentbuilder_loader').fadeIn('fast');
|
||||
jQuery('#loading').hide();
|
||||
});
|
||||
</script>
|
||||
<div id="componentbuilder_loader" style="display: none;">
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&layout=edit&id='.(int) $this->item->id.$this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
|
||||
<?php echo JLayoutHelper::render('library_files_folders_urls.settings_above', $this); ?>
|
||||
<div class="form-horizontal">
|
||||
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'library_files_folders_urlsTab', array('active' => 'settings')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'library_files_folders_urlsTab', 'settings', JText::_('COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_SETTINGS', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
</div>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<?php echo JLayoutHelper::render('library_files_folders_urls.settings_fullwidth', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php if ($this->canDo->get('library_files_folders_urls.delete') || $this->canDo->get('library_files_folders_urls.edit.created_by') || $this->canDo->get('library_files_folders_urls.edit.state') || $this->canDo->get('library_files_folders_urls.edit.created')) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'library_files_folders_urlsTab', 'publishing', JText::_('COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PUBLISHING', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span6">
|
||||
<?php echo JLayoutHelper::render('library_files_folders_urls.publishing', $this); ?>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<?php echo JLayoutHelper::render('library_files_folders_urls.publlshing', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->canDo->get('core.admin')) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'library_files_folders_urlsTab', 'permissions', JText::_('COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_PERMISSION', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<fieldset class="adminform">
|
||||
<div class="adminformlist">
|
||||
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
|
||||
<div>
|
||||
<?php echo $field->label; echo $field->input;?>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
|
||||
<div>
|
||||
<input type="hidden" name="task" value="library_files_folders_urls.edit" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
1
admin/views/library_files_folders_urls/tmpl/index.html
Normal file
1
admin/views/library_files_folders_urls/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
199
admin/views/library_files_folders_urls/view.html.php
Normal file
199
admin/views/library_files_folders_urls/view.html.php
Normal file
@ -0,0 +1,199 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.6.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla view library
|
||||
jimport('joomla.application.component.view');
|
||||
|
||||
/**
|
||||
* Library_files_folders_urls View class
|
||||
*/
|
||||
class ComponentbuilderViewLibrary_files_folders_urls extends JViewLegacy
|
||||
{
|
||||
/**
|
||||
* display method of View
|
||||
* @return void
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->script = $this->get('Script');
|
||||
$this->state = $this->get('State');
|
||||
// get action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls',$this->item);
|
||||
// get input
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
|
||||
// Set the document
|
||||
$this->setDocument();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Setting the toolbar
|
||||
*/
|
||||
protected function addToolBar()
|
||||
{
|
||||
JFactory::getApplication()->input->set('hidemainmenu', true);
|
||||
$user = JFactory::getUser();
|
||||
$userId = $user->id;
|
||||
$isNew = $this->item->id == 0;
|
||||
|
||||
JToolbarHelper::title( JText::_($isNew ? 'COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NEW' : 'COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_EDIT'), 'pencil-2 article-add');
|
||||
// Built the actions for new and existing records.
|
||||
if ($this->refid || $this->ref)
|
||||
{
|
||||
if ($this->canDo->get('library_files_folders_urls.create') && $isNew)
|
||||
{
|
||||
// We can create the record.
|
||||
JToolBarHelper::save('library_files_folders_urls.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
elseif ($this->canDo->get('library_files_folders_urls.edit'))
|
||||
{
|
||||
// We can save the record.
|
||||
JToolBarHelper::save('library_files_folders_urls.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
if ($isNew)
|
||||
{
|
||||
// Do not creat but cancel.
|
||||
JToolBarHelper::cancel('library_files_folders_urls.cancel', 'JTOOLBAR_CANCEL');
|
||||
}
|
||||
else
|
||||
{
|
||||
// We can close it.
|
||||
JToolBarHelper::cancel('library_files_folders_urls.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($isNew)
|
||||
{
|
||||
// For new records, check the create permission.
|
||||
if ($this->canDo->get('library_files_folders_urls.create'))
|
||||
{
|
||||
JToolBarHelper::apply('library_files_folders_urls.apply', 'JTOOLBAR_APPLY');
|
||||
JToolBarHelper::save('library_files_folders_urls.save', 'JTOOLBAR_SAVE');
|
||||
JToolBarHelper::custom('library_files_folders_urls.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
|
||||
};
|
||||
JToolBarHelper::cancel('library_files_folders_urls.cancel', 'JTOOLBAR_CANCEL');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->canDo->get('library_files_folders_urls.edit'))
|
||||
{
|
||||
// We can save the new record
|
||||
JToolBarHelper::apply('library_files_folders_urls.apply', 'JTOOLBAR_APPLY');
|
||||
JToolBarHelper::save('library_files_folders_urls.save', 'JTOOLBAR_SAVE');
|
||||
// We can save this record, but check the create permission to see
|
||||
// if we can return to make a new one.
|
||||
if ($this->canDo->get('library_files_folders_urls.create'))
|
||||
{
|
||||
JToolBarHelper::custom('library_files_folders_urls.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
|
||||
}
|
||||
}
|
||||
$canVersion = ($this->canDo->get('core.version') && $this->canDo->get('library_files_folders_urls.version'));
|
||||
if ($this->state->params->get('save_history', 1) && $this->canDo->get('library_files_folders_urls.edit') && $canVersion)
|
||||
{
|
||||
JToolbarHelper::versions('com_componentbuilder.library_files_folders_urls', $this->item->id);
|
||||
}
|
||||
if ($this->canDo->get('library_files_folders_urls.create'))
|
||||
{
|
||||
JToolBarHelper::custom('library_files_folders_urls.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
|
||||
}
|
||||
JToolBarHelper::cancel('library_files_folders_urls.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
}
|
||||
JToolbarHelper::divider();
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('library_files_folders_urls');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
*
|
||||
* @return mixed The escaped value.
|
||||
*/
|
||||
public function escape($var)
|
||||
{
|
||||
if(strlen($var) > 30)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to set up the document properties
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setDocument()
|
||||
{
|
||||
$isNew = ($this->item->id < 1);
|
||||
$document = JFactory::getDocument();
|
||||
$document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_NEW' : 'COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_EDIT'));
|
||||
$document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/library_files_folders_urls.css");
|
||||
$document->addScript(JURI::root() . $this->script);
|
||||
$document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/library_files_folders_urls/submitbutton.js");
|
||||
JText::script('view not acceptable. Error');
|
||||
}
|
||||
}
|
@ -318,6 +318,12 @@ jQuery('#adminForm').on('change', '#jform_button_position',function (e)
|
||||
|
||||
|
||||
|
||||
jQuery(function() {
|
||||
jQuery('#open-libraries').html('<a href="index.php?option=com_componentbuilder&view=libraries"><?php echo JText::_('COM_COMPONENTBUILDER_LIBRARIES'); ?></a>');
|
||||
});
|
||||
jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width');
|
||||
jQuery('#jform_main_get').closest('.input-append').addClass('jform_main_get_input_width');
|
||||
jQuery('#jform_dynamic_get').closest('.input-append').addClass('jform_dynamic_get_input_width');
|
||||
<?php $fieldNrs = range(1,7,1); ?>
|
||||
<?php foreach($fieldNrs as $nr): ?>jQuery('#jform_custom_button_modal').on('change', 'select[name="icomoon-<?php echo $nr; ?>"]',function (e) {
|
||||
// update the icon if changed
|
||||
@ -347,6 +353,10 @@ jQuery('input.form-field-repeatable').on('row-add', function (e) {
|
||||
jQuery(this).selText().addClass("selected");
|
||||
});
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_libraries',function (e) {
|
||||
e.preventDefault();
|
||||
getSnippets();
|
||||
});
|
||||
|
||||
jQuery.fn.selText = function() {
|
||||
var obj = this[0];
|
||||
@ -397,5 +407,8 @@ jQuery(document).ready(function() {
|
||||
// get type value
|
||||
getLayoutDetails(9999);
|
||||
getTemplateDetails(9999);
|
||||
});
|
||||
});
|
||||
// some lang strings
|
||||
var select_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_SELECT_A_SNIPPET'); ?>';
|
||||
var create_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_CREATE_A_SNIPPET'); ?>';
|
||||
</script>
|
||||
|
@ -95,8 +95,14 @@ $edit = "index.php?option=com_componentbuilder&view=snippets&task=snippet.edit";
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->heading); ?>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->library_name); ?>
|
||||
<td class="nowrap">
|
||||
<?php if ($this->user->authorise('library.edit', 'com_componentbuilder.library.' . (int)$item->library)): ?>
|
||||
<div class="name">
|
||||
<a href="index.php?option=com_componentbuilder&view=libraries&task=library.edit&id=<?php echo $item->library; ?>&ref=snippets"><?php echo $this->escape($item->library_name); ?></a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="name"><?php echo $this->escape($item->library_name); ?></div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($canDo->get('core.edit.state')) : ?>
|
||||
|
@ -55,7 +55,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_SNIPPET_HEADING_LABEL', 'heading', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_SNIPPET_LIBRARY_LABEL', 'library_name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
|
@ -155,11 +155,20 @@ jQuery('#adminForm').on('change', '#jform_add_php_view',function (e)
|
||||
});
|
||||
|
||||
|
||||
|
||||
jQuery(function() {
|
||||
jQuery('#open-libraries').html('<a href="index.php?option=com_componentbuilder&view=libraries"><?php echo JText::_('COM_COMPONENTBUILDER_LIBRARIES'); ?></a>');
|
||||
});
|
||||
jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width');
|
||||
jQuery('#jform_dynamic_get').closest('.input-append').addClass('jform_dynamic_get_input_width');jQuery(function() {
|
||||
jQuery("code").click(function() {
|
||||
jQuery(this).selText().addClass("selected");
|
||||
});
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_libraries',function (e) {
|
||||
e.preventDefault();
|
||||
getSnippets();
|
||||
});
|
||||
|
||||
jQuery.fn.selText = function() {
|
||||
var obj = this[0];
|
||||
@ -210,5 +219,8 @@ jQuery(document).ready(function() {
|
||||
// get type value
|
||||
getLayoutDetails(9999);
|
||||
getTemplateDetails(<?php echo ($this->item->id) ? $this->item->id:9999; ?>);
|
||||
});
|
||||
});
|
||||
// some lang strings
|
||||
var select_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_SELECT_A_SNIPPET'); ?>';
|
||||
var create_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_CREATE_A_SNIPPET'); ?>';
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user