Added fade-in option for admin views, added pdf lib to custom folder for use in projects.
This commit is contained in:
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.9
|
||||
@build 20th May, 2016
|
||||
@version 2.1.10
|
||||
@build 31st May, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage adminviews.php
|
||||
@ -82,7 +82,12 @@ class JFormFieldAdminviews extends JFormFieldList
|
||||
if ($user->authorise('core.create', 'com_componentbuilder'))
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=admin_view&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
@ -90,7 +95,12 @@ class JFormFieldAdminviews extends JFormFieldList
|
||||
if (($buttonName == 'admin_view' || $buttonName == 'admin_views') && $user->authorise('core.edit', 'com_componentbuilder'))
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -120,7 +130,7 @@ class JFormFieldAdminviews extends JFormFieldList
|
||||
}";
|
||||
}
|
||||
// check if button was created for admin_view field.
|
||||
if (ComponentbuilderHelper::checkArray($button))
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Add some final script
|
||||
$script[] = "
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.9
|
||||
@build 20th May, 2016
|
||||
@version 2.1.10
|
||||
@build 31st May, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage articles.php
|
||||
@ -82,7 +82,12 @@ class JFormFieldArticles extends JFormFieldList
|
||||
if ($user->authorise('core.create', 'com_componentbuilder'))
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=article&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
@ -90,7 +95,12 @@ class JFormFieldArticles extends JFormFieldList
|
||||
if (($buttonName == 'article' || $buttonName == 'articles') && $user->authorise('core.edit', 'com_componentbuilder'))
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -120,7 +130,7 @@ class JFormFieldArticles extends JFormFieldList
|
||||
}";
|
||||
}
|
||||
// check if button was created for article field.
|
||||
if (ComponentbuilderHelper::checkArray($button))
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Add some final script
|
||||
$script[] = "
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.9
|
||||
@build 20th May, 2016
|
||||
@version 2.1.10
|
||||
@build 31st May, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage customadminviews.php
|
||||
@ -82,7 +82,12 @@ class JFormFieldCustomadminviews extends JFormFieldList
|
||||
if ($user->authorise('core.create', 'com_componentbuilder'))
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=custom_admin_view&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
@ -90,7 +95,12 @@ class JFormFieldCustomadminviews extends JFormFieldList
|
||||
if (($buttonName == 'custom_admin_view' || $buttonName == 'custom_admin_views') && $user->authorise('core.edit', 'com_componentbuilder'))
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -120,7 +130,7 @@ class JFormFieldCustomadminviews extends JFormFieldList
|
||||
}";
|
||||
}
|
||||
// check if button was created for custom_admin_view field.
|
||||
if (ComponentbuilderHelper::checkArray($button))
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Add some final script
|
||||
$script[] = "
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.9
|
||||
@build 20th May, 2016
|
||||
@version 2.1.10
|
||||
@build 31st May, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage customfilelist.php
|
||||
@ -82,7 +82,12 @@ class JFormFieldCustomfilelist extends JFormFieldList
|
||||
if ($user->authorise('core.create', 'com_componentbuilder'))
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
@ -90,7 +95,12 @@ class JFormFieldCustomfilelist extends JFormFieldList
|
||||
if (($buttonName == '' || $buttonName == '') && $user->authorise('core.edit', 'com_componentbuilder'))
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -120,7 +130,7 @@ class JFormFieldCustomfilelist extends JFormFieldList
|
||||
}";
|
||||
}
|
||||
// check if button was created for field.
|
||||
if (ComponentbuilderHelper::checkArray($button))
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Add some final script
|
||||
$script[] = "
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.9
|
||||
@build 20th May, 2016
|
||||
@version 2.1.10
|
||||
@build 31st May, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage customfolderlist.php
|
||||
@ -82,7 +82,12 @@ class JFormFieldCustomfolderlist extends JFormFieldList
|
||||
if ($user->authorise('core.create', 'com_componentbuilder'))
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
@ -90,7 +95,12 @@ class JFormFieldCustomfolderlist extends JFormFieldList
|
||||
if (($buttonName == '' || $buttonName == '') && $user->authorise('core.edit', 'com_componentbuilder'))
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -120,7 +130,7 @@ class JFormFieldCustomfolderlist extends JFormFieldList
|
||||
}";
|
||||
}
|
||||
// check if button was created for field.
|
||||
if (ComponentbuilderHelper::checkArray($button))
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Add some final script
|
||||
$script[] = "
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.9
|
||||
@build 20th May, 2016
|
||||
@version 2.1.10
|
||||
@build 31st May, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage customgets.php
|
||||
@ -82,7 +82,12 @@ class JFormFieldCustomgets extends JFormFieldList
|
||||
if ($user->authorise('dynamic_get.create', 'com_componentbuilder'))
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=dynamic_get&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
@ -90,7 +95,12 @@ class JFormFieldCustomgets extends JFormFieldList
|
||||
if (($buttonName == 'dynamic_get' || $buttonName == 'dynamic_gets') && $user->authorise('dynamic_get.edit', 'com_componentbuilder'))
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -120,7 +130,7 @@ class JFormFieldCustomgets extends JFormFieldList
|
||||
}";
|
||||
}
|
||||
// check if button was created for dynamic_get field.
|
||||
if (ComponentbuilderHelper::checkArray($button))
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Add some final script
|
||||
$script[] = "
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.9
|
||||
@build 20th May, 2016
|
||||
@version 2.1.10
|
||||
@build 31st May, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage dbtables.php
|
||||
@ -82,7 +82,12 @@ class JFormFieldDbtables extends JFormFieldList
|
||||
if ($user->authorise('core.create', 'com_componentbuilder'))
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
@ -90,7 +95,12 @@ class JFormFieldDbtables extends JFormFieldList
|
||||
if (($buttonName == '' || $buttonName == '') && $user->authorise('core.edit', 'com_componentbuilder'))
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -120,7 +130,7 @@ class JFormFieldDbtables extends JFormFieldList
|
||||
}";
|
||||
}
|
||||
// check if button was created for field.
|
||||
if (ComponentbuilderHelper::checkArray($button))
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Add some final script
|
||||
$script[] = "
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.9
|
||||
@build 20th May, 2016
|
||||
@version 2.1.10
|
||||
@build 31st May, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage dynamicgets.php
|
||||
@ -82,7 +82,12 @@ class JFormFieldDynamicgets extends JFormFieldList
|
||||
if ($user->authorise('dynamic_get.create', 'com_componentbuilder'))
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=dynamic_get&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
@ -90,7 +95,12 @@ class JFormFieldDynamicgets extends JFormFieldList
|
||||
if (($buttonName == 'dynamic_get' || $buttonName == 'dynamic_gets') && $user->authorise('dynamic_get.edit', 'com_componentbuilder'))
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -120,7 +130,7 @@ class JFormFieldDynamicgets extends JFormFieldList
|
||||
}";
|
||||
}
|
||||
// check if button was created for dynamic_get field.
|
||||
if (ComponentbuilderHelper::checkArray($button))
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Add some final script
|
||||
$script[] = "
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.9
|
||||
@build 20th May, 2016
|
||||
@version 2.1.10
|
||||
@build 31st May, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage fields.php
|
||||
@ -82,7 +82,12 @@ class JFormFieldFields extends JFormFieldList
|
||||
if ($user->authorise('field.create', 'com_componentbuilder'))
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=field&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
@ -90,7 +95,12 @@ class JFormFieldFields extends JFormFieldList
|
||||
if (($buttonName == 'field' || $buttonName == 'fields') && $user->authorise('field.edit', 'com_componentbuilder'))
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -120,7 +130,7 @@ class JFormFieldFields extends JFormFieldList
|
||||
}";
|
||||
}
|
||||
// check if button was created for field field.
|
||||
if (ComponentbuilderHelper::checkArray($button))
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Add some final script
|
||||
$script[] = "
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.9
|
||||
@build 20th May, 2016
|
||||
@version 2.1.10
|
||||
@build 31st May, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage fieldsmulti.php
|
||||
@ -82,7 +82,12 @@ class JFormFieldFieldsmulti extends JFormFieldList
|
||||
if ($user->authorise('field.create', 'com_componentbuilder'))
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=field&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
@ -90,7 +95,12 @@ class JFormFieldFieldsmulti extends JFormFieldList
|
||||
if (($buttonName == 'field' || $buttonName == 'fields') && $user->authorise('field.edit', 'com_componentbuilder'))
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -120,7 +130,7 @@ class JFormFieldFieldsmulti extends JFormFieldList
|
||||
}";
|
||||
}
|
||||
// check if button was created for field field.
|
||||
if (ComponentbuilderHelper::checkArray($button))
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Add some final script
|
||||
$script[] = "
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.9
|
||||
@build 20th May, 2016
|
||||
@version 2.1.10
|
||||
@build 31st May, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage fieldtypes.php
|
||||
@ -82,7 +82,12 @@ class JFormFieldFieldtypes extends JFormFieldList
|
||||
if ($user->authorise('fieldtype.create', 'com_componentbuilder'))
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=fieldtype&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
@ -90,7 +95,12 @@ class JFormFieldFieldtypes extends JFormFieldList
|
||||
if (($buttonName == 'fieldtype' || $buttonName == 'fieldtypes') && $user->authorise('fieldtype.edit', 'com_componentbuilder'))
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -120,7 +130,7 @@ class JFormFieldFieldtypes extends JFormFieldList
|
||||
}";
|
||||
}
|
||||
// check if button was created for fieldtype field.
|
||||
if (ComponentbuilderHelper::checkArray($button))
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Add some final script
|
||||
$script[] = "
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.9
|
||||
@build 20th May, 2016
|
||||
@version 2.1.10
|
||||
@build 31st May, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage maingets.php
|
||||
@ -82,7 +82,12 @@ class JFormFieldMaingets extends JFormFieldList
|
||||
if ($user->authorise('dynamic_get.create', 'com_componentbuilder'))
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=dynamic_get&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
@ -90,7 +95,12 @@ class JFormFieldMaingets extends JFormFieldList
|
||||
if (($buttonName == 'dynamic_get' || $buttonName == 'dynamic_gets') && $user->authorise('dynamic_get.edit', 'com_componentbuilder'))
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -120,7 +130,7 @@ class JFormFieldMaingets extends JFormFieldList
|
||||
}";
|
||||
}
|
||||
// check if button was created for dynamic_get field.
|
||||
if (ComponentbuilderHelper::checkArray($button))
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Add some final script
|
||||
$script[] = "
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.9
|
||||
@build 20th May, 2016
|
||||
@version 2.1.10
|
||||
@build 31st May, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage siteviews.php
|
||||
@ -82,7 +82,12 @@ class JFormFieldSiteviews extends JFormFieldList
|
||||
if ($user->authorise('core.create', 'com_componentbuilder'))
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=site_view&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
@ -90,7 +95,12 @@ class JFormFieldSiteviews extends JFormFieldList
|
||||
if (($buttonName == 'site_view' || $buttonName == 'site_views') && $user->authorise('core.edit', 'com_componentbuilder'))
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -120,7 +130,7 @@ class JFormFieldSiteviews extends JFormFieldList
|
||||
}";
|
||||
}
|
||||
// check if button was created for site_view field.
|
||||
if (ComponentbuilderHelper::checkArray($button))
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Add some final script
|
||||
$script[] = "
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.9
|
||||
@build 20th May, 2016
|
||||
@version 2.1.10
|
||||
@build 31st May, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage snippets.php
|
||||
@ -82,7 +82,12 @@ class JFormFieldSnippets extends JFormFieldList
|
||||
if ($user->authorise('core.create', 'com_componentbuilder'))
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=snippet&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
@ -90,7 +95,12 @@ class JFormFieldSnippets extends JFormFieldList
|
||||
if (($buttonName == 'snippet' || $buttonName == 'snippets') && $user->authorise('core.edit', 'com_componentbuilder'))
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', ComponentbuilderHelper::safeString($buttonName, 'W')).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$buttonNamee = trim($buttonName);
|
||||
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
|
||||
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
|
||||
$buttonNamee = ucfirst(strtolower($buttonNamee));
|
||||
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -120,7 +130,7 @@ class JFormFieldSnippets extends JFormFieldList
|
||||
}";
|
||||
}
|
||||
// check if button was created for snippet field.
|
||||
if (ComponentbuilderHelper::checkArray($button))
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Add some final script
|
||||
$script[] = "
|
||||
|
Reference in New Issue
Block a user