forked from joomla/Component-Builder
Fixed the edit-view for front-end to insure ajax also gets moved to site ajax. Also updated the UIkit notify to target uikit2 convention.
This commit is contained in:
parent
4e740f568e
commit
65e0a19dee
@ -126,7 +126,7 @@ Component Builder is mapped as a component in itself on my local development env
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 28th March, 2018
|
||||
+ *Last Build*: 30th March, 2018
|
||||
+ *Version*: 2.7.1
|
||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
@ -126,7 +126,7 @@ Component Builder is mapped as a component in itself on my local development env
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 28th March, 2018
|
||||
+ *Last Build*: 30th March, 2018
|
||||
+ *Version*: 2.7.1
|
||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
@ -926,17 +926,19 @@ class Get
|
||||
// build the admin_views settings
|
||||
$component->admin_views = array_map(function($array)
|
||||
{
|
||||
$array = array_map(function($value)
|
||||
{
|
||||
$array = array_map(function($value) {
|
||||
if (!ComponentbuilderHelper::checkArray($value) && !ComponentbuilderHelper::checkObject($value) && strval($value) === strval(intval($value)))
|
||||
{
|
||||
return (int) $value;
|
||||
}
|
||||
return $value;
|
||||
}, $array);
|
||||
// has become a lacacy issue, can't remove this
|
||||
$array['view'] = $array['adminview'];
|
||||
$array['settings'] = $this->getAdminViewData($array['view']);
|
||||
// check if we must add to site
|
||||
if (isset($array['edit_create_site_view']) && $array['edit_create_site_view'])
|
||||
{
|
||||
$this->siteEditView[$array['adminview']] = true;
|
||||
$this->lang = 'both';
|
||||
}
|
||||
if (isset($array['port']) && $array['port'] && !$this->addEximport)
|
||||
{
|
||||
$this->addEximport = true;
|
||||
@ -945,14 +947,13 @@ class Get
|
||||
{
|
||||
$this->setTagHistory = true;
|
||||
}
|
||||
if (isset($array['edit_create_site_view']) && $array['edit_create_site_view'])
|
||||
{
|
||||
$this->siteEditView[$array['adminview']] = true;
|
||||
}
|
||||
// has become a lacacy issue, can't remove this
|
||||
$array['view'] = $array['adminview'];
|
||||
// get the admin settings/data
|
||||
$array['settings'] = $this->getAdminViewData($array['view']);
|
||||
return $array;
|
||||
}, array_values($component->addadmin_views));
|
||||
}
|
||||
|
||||
// set the site_view data
|
||||
$component->addsite_views = (isset($component->addsite_views) && ComponentbuilderHelper::checkJson($component->addsite_views)) ? json_decode($component->addsite_views, true) : null;
|
||||
if (ComponentbuilderHelper::checkArray($component->addsite_views))
|
||||
@ -1617,6 +1618,10 @@ class Get
|
||||
unset($view->addlinked_views);
|
||||
// set the lang target
|
||||
$this->lang = 'admin';
|
||||
if (isset($this->siteEditView[$id]))
|
||||
{
|
||||
$this->lang = 'both';
|
||||
}
|
||||
// add_javascript
|
||||
$addArrayJ = array('javascript_view_file', 'javascript_view_footer', 'javascript_views_file', 'javascript_views_footer');
|
||||
foreach ($addArrayJ as $scripter)
|
||||
|
@ -246,7 +246,7 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
$ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'];
|
||||
}
|
||||
// build url (A tag)
|
||||
$startAtag = '<a class="btn btn-success vdm-button-new" onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \'index.php?option=com_componentbuilder&view='.$type.'&layout=edit'.$ref.'\' })" href="javascript:void(0)" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($type, 'W')).'">';
|
||||
$startAtag = '<a class="btn btn-success vdm-button-new" onclick="UIkit2.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \'index.php?option=com_componentbuilder&view='.$type.'&layout=edit'.$ref.'\' })" href="javascript:void(0)" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', ComponentbuilderHelper::safeString($type, 'W')).'">';
|
||||
// build the smaller button
|
||||
if (2 == $size)
|
||||
{
|
||||
@ -317,7 +317,7 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
$button[] = '</div>';
|
||||
$button[] = '<div class="controls">';
|
||||
}
|
||||
$button[] = '<a class="btn btn-success vdm-button-new" onclick="UIkit.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \''.$editThis.$ref.'\' })" href="javascript:void(0)" title="'.$buttonText.'">';
|
||||
$button[] = '<a class="btn btn-success vdm-button-new" onclick="UIkit2.modal.confirm(\''.JText::_('COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE').'\', function(){ window.location.href = \''.$editThis.$ref.'\' })" href="javascript:void(0)" title="'.$buttonText.'">';
|
||||
if (1 == $size)
|
||||
{
|
||||
$button[] = '<span class="'.$icon.' icon-white"></span>';
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>28th March, 2018</creationDate>
|
||||
<creationDate>30th March, 2018</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||
<authorUrl>http://joomlacomponentbuilder.com</authorUrl>
|
||||
|
Loading…
Reference in New Issue
Block a user