Added the option for automatic alias building, resolve gh-246. Made improvements to the buttons all over JCB, and the tweaked the field view a little more.
This commit is contained in:
@ -879,9 +879,9 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -869,9 +869,9 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -132,6 +132,14 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->addtables = $addtables->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->alias_builder))
|
||||
{
|
||||
// Convert the alias_builder field to an array.
|
||||
$alias_builder = new Registry;
|
||||
$alias_builder->loadString($item->alias_builder);
|
||||
$item->alias_builder = $alias_builder->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->custom_button))
|
||||
{
|
||||
// Convert the custom_button field to an array.
|
||||
@ -148,28 +156,28 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->ajax_input = $ajax_input->toArray();
|
||||
}
|
||||
|
||||
if (!empty($item->php_import_save))
|
||||
{
|
||||
// base64 Decode php_import_save.
|
||||
$item->php_import_save = base64_decode($item->php_import_save);
|
||||
}
|
||||
|
||||
if (!empty($item->html_import_view))
|
||||
{
|
||||
// base64 Decode html_import_view.
|
||||
$item->html_import_view = base64_decode($item->html_import_view);
|
||||
}
|
||||
|
||||
if (!empty($item->php_import_save))
|
||||
{
|
||||
// base64 Decode php_import_save.
|
||||
$item->php_import_save = base64_decode($item->php_import_save);
|
||||
}
|
||||
|
||||
if (!empty($item->php_import_headers))
|
||||
{
|
||||
// base64 Decode php_import_headers.
|
||||
$item->php_import_headers = base64_decode($item->php_import_headers);
|
||||
}
|
||||
|
||||
if (!empty($item->css_view))
|
||||
if (!empty($item->php_getitem))
|
||||
{
|
||||
// base64 Decode css_view.
|
||||
$item->css_view = base64_decode($item->css_view);
|
||||
// base64 Decode php_getitem.
|
||||
$item->php_getitem = base64_decode($item->php_getitem);
|
||||
}
|
||||
|
||||
if (!empty($item->php_getitems))
|
||||
@ -184,10 +192,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
|
||||
}
|
||||
|
||||
if (!empty($item->css_views))
|
||||
if (!empty($item->css_view))
|
||||
{
|
||||
// base64 Decode css_views.
|
||||
$item->css_views = base64_decode($item->css_views);
|
||||
// base64 Decode css_view.
|
||||
$item->css_view = base64_decode($item->css_view);
|
||||
}
|
||||
|
||||
if (!empty($item->php_getlistquery))
|
||||
@ -202,10 +210,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->php_before_save = base64_decode($item->php_before_save);
|
||||
}
|
||||
|
||||
if (!empty($item->javascript_view_file))
|
||||
if (!empty($item->css_views))
|
||||
{
|
||||
// base64 Decode javascript_view_file.
|
||||
$item->javascript_view_file = base64_decode($item->javascript_view_file);
|
||||
// base64 Decode css_views.
|
||||
$item->css_views = base64_decode($item->css_views);
|
||||
}
|
||||
|
||||
if (!empty($item->php_save))
|
||||
@ -220,10 +228,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->php_postsavehook = base64_decode($item->php_postsavehook);
|
||||
}
|
||||
|
||||
if (!empty($item->javascript_view_footer))
|
||||
if (!empty($item->javascript_view_file))
|
||||
{
|
||||
// base64 Decode javascript_view_footer.
|
||||
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
|
||||
// base64 Decode javascript_view_file.
|
||||
$item->javascript_view_file = base64_decode($item->javascript_view_file);
|
||||
}
|
||||
|
||||
if (!empty($item->php_allowedit))
|
||||
@ -238,10 +246,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->php_batchcopy = base64_decode($item->php_batchcopy);
|
||||
}
|
||||
|
||||
if (!empty($item->javascript_views_file))
|
||||
if (!empty($item->javascript_view_footer))
|
||||
{
|
||||
// base64 Decode javascript_views_file.
|
||||
$item->javascript_views_file = base64_decode($item->javascript_views_file);
|
||||
// base64 Decode javascript_view_footer.
|
||||
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
|
||||
}
|
||||
|
||||
if (!empty($item->php_batchmove))
|
||||
@ -256,10 +264,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->php_before_publish = base64_decode($item->php_before_publish);
|
||||
}
|
||||
|
||||
if (!empty($item->javascript_views_footer))
|
||||
if (!empty($item->javascript_views_file))
|
||||
{
|
||||
// base64 Decode javascript_views_footer.
|
||||
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
|
||||
// base64 Decode javascript_views_file.
|
||||
$item->javascript_views_file = base64_decode($item->javascript_views_file);
|
||||
}
|
||||
|
||||
if (!empty($item->php_after_publish))
|
||||
@ -274,22 +282,34 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->php_before_delete = base64_decode($item->php_before_delete);
|
||||
}
|
||||
|
||||
if (!empty($item->javascript_views_footer))
|
||||
{
|
||||
// base64 Decode javascript_views_footer.
|
||||
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
|
||||
}
|
||||
|
||||
if (!empty($item->php_after_delete))
|
||||
{
|
||||
// base64 Decode php_after_delete.
|
||||
$item->php_after_delete = base64_decode($item->php_after_delete);
|
||||
}
|
||||
|
||||
if (!empty($item->php_document))
|
||||
{
|
||||
// base64 Decode php_document.
|
||||
$item->php_document = base64_decode($item->php_document);
|
||||
}
|
||||
|
||||
if (!empty($item->php_controller))
|
||||
{
|
||||
// base64 Decode php_controller.
|
||||
$item->php_controller = base64_decode($item->php_controller);
|
||||
}
|
||||
|
||||
if (!empty($item->php_document))
|
||||
if (!empty($item->sql))
|
||||
{
|
||||
// base64 Decode php_document.
|
||||
$item->php_document = base64_decode($item->php_document);
|
||||
// base64 Decode sql.
|
||||
$item->sql = base64_decode($item->sql);
|
||||
}
|
||||
|
||||
if (!empty($item->php_model))
|
||||
@ -304,28 +324,16 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->php_controller_list = base64_decode($item->php_controller_list);
|
||||
}
|
||||
|
||||
if (!empty($item->sql))
|
||||
{
|
||||
// base64 Decode sql.
|
||||
$item->sql = base64_decode($item->sql);
|
||||
}
|
||||
|
||||
if (!empty($item->php_model_list))
|
||||
{
|
||||
// base64 Decode php_model_list.
|
||||
$item->php_model_list = base64_decode($item->php_model_list);
|
||||
}
|
||||
|
||||
if (!empty($item->php_import_display))
|
||||
{
|
||||
// base64 Decode php_import_display.
|
||||
$item->php_import_display = base64_decode($item->php_import_display);
|
||||
}
|
||||
|
||||
if (!empty($item->php_ajaxmethod))
|
||||
if (!empty($item->php_model_list))
|
||||
{
|
||||
// base64 Decode php_ajaxmethod.
|
||||
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
|
||||
// base64 Decode php_model_list.
|
||||
$item->php_model_list = base64_decode($item->php_model_list);
|
||||
}
|
||||
|
||||
if (!empty($item->php_import))
|
||||
@ -340,18 +348,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->php_import_setdata = base64_decode($item->php_import_setdata);
|
||||
}
|
||||
|
||||
if (!empty($item->php_ajaxmethod))
|
||||
{
|
||||
// base64 Decode php_ajaxmethod.
|
||||
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
|
||||
}
|
||||
|
||||
if (!empty($item->php_import_ext))
|
||||
{
|
||||
// base64 Decode php_import_ext.
|
||||
$item->php_import_ext = base64_decode($item->php_import_ext);
|
||||
}
|
||||
|
||||
if (!empty($item->php_getitem))
|
||||
{
|
||||
// base64 Decode php_getitem.
|
||||
$item->php_getitem = base64_decode($item->php_getitem);
|
||||
}
|
||||
|
||||
|
||||
if (empty($item->id))
|
||||
{
|
||||
@ -1236,6 +1244,19 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['addtables'] = '';
|
||||
}
|
||||
|
||||
// Set the alias_builder items to data.
|
||||
if (isset($data['alias_builder']) && is_array($data['alias_builder']))
|
||||
{
|
||||
$alias_builder = new JRegistry;
|
||||
$alias_builder->loadArray($data['alias_builder']);
|
||||
$data['alias_builder'] = (string) $alias_builder;
|
||||
}
|
||||
elseif (!isset($data['alias_builder']))
|
||||
{
|
||||
// Set the empty alias_builder to data
|
||||
$data['alias_builder'] = '';
|
||||
}
|
||||
|
||||
// Set the custom_button items to data.
|
||||
if (isset($data['custom_button']) && is_array($data['custom_button']))
|
||||
{
|
||||
@ -1262,28 +1283,28 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['ajax_input'] = '';
|
||||
}
|
||||
|
||||
// Set the php_import_save string to base64 string.
|
||||
if (isset($data['php_import_save']))
|
||||
{
|
||||
$data['php_import_save'] = base64_encode($data['php_import_save']);
|
||||
}
|
||||
|
||||
// Set the html_import_view string to base64 string.
|
||||
if (isset($data['html_import_view']))
|
||||
{
|
||||
$data['html_import_view'] = base64_encode($data['html_import_view']);
|
||||
}
|
||||
|
||||
// Set the php_import_save string to base64 string.
|
||||
if (isset($data['php_import_save']))
|
||||
{
|
||||
$data['php_import_save'] = base64_encode($data['php_import_save']);
|
||||
}
|
||||
|
||||
// Set the php_import_headers string to base64 string.
|
||||
if (isset($data['php_import_headers']))
|
||||
{
|
||||
$data['php_import_headers'] = base64_encode($data['php_import_headers']);
|
||||
}
|
||||
|
||||
// Set the css_view string to base64 string.
|
||||
if (isset($data['css_view']))
|
||||
// Set the php_getitem string to base64 string.
|
||||
if (isset($data['php_getitem']))
|
||||
{
|
||||
$data['css_view'] = base64_encode($data['css_view']);
|
||||
$data['php_getitem'] = base64_encode($data['php_getitem']);
|
||||
}
|
||||
|
||||
// Set the php_getitems string to base64 string.
|
||||
@ -1298,10 +1319,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['php_getitems_after_all'] = base64_encode($data['php_getitems_after_all']);
|
||||
}
|
||||
|
||||
// Set the css_views string to base64 string.
|
||||
if (isset($data['css_views']))
|
||||
// Set the css_view string to base64 string.
|
||||
if (isset($data['css_view']))
|
||||
{
|
||||
$data['css_views'] = base64_encode($data['css_views']);
|
||||
$data['css_view'] = base64_encode($data['css_view']);
|
||||
}
|
||||
|
||||
// Set the php_getlistquery string to base64 string.
|
||||
@ -1316,10 +1337,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['php_before_save'] = base64_encode($data['php_before_save']);
|
||||
}
|
||||
|
||||
// Set the javascript_view_file string to base64 string.
|
||||
if (isset($data['javascript_view_file']))
|
||||
// Set the css_views string to base64 string.
|
||||
if (isset($data['css_views']))
|
||||
{
|
||||
$data['javascript_view_file'] = base64_encode($data['javascript_view_file']);
|
||||
$data['css_views'] = base64_encode($data['css_views']);
|
||||
}
|
||||
|
||||
// Set the php_save string to base64 string.
|
||||
@ -1334,10 +1355,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['php_postsavehook'] = base64_encode($data['php_postsavehook']);
|
||||
}
|
||||
|
||||
// Set the javascript_view_footer string to base64 string.
|
||||
if (isset($data['javascript_view_footer']))
|
||||
// Set the javascript_view_file string to base64 string.
|
||||
if (isset($data['javascript_view_file']))
|
||||
{
|
||||
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
|
||||
$data['javascript_view_file'] = base64_encode($data['javascript_view_file']);
|
||||
}
|
||||
|
||||
// Set the php_allowedit string to base64 string.
|
||||
@ -1352,10 +1373,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['php_batchcopy'] = base64_encode($data['php_batchcopy']);
|
||||
}
|
||||
|
||||
// Set the javascript_views_file string to base64 string.
|
||||
if (isset($data['javascript_views_file']))
|
||||
// Set the javascript_view_footer string to base64 string.
|
||||
if (isset($data['javascript_view_footer']))
|
||||
{
|
||||
$data['javascript_views_file'] = base64_encode($data['javascript_views_file']);
|
||||
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
|
||||
}
|
||||
|
||||
// Set the php_batchmove string to base64 string.
|
||||
@ -1370,10 +1391,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['php_before_publish'] = base64_encode($data['php_before_publish']);
|
||||
}
|
||||
|
||||
// Set the javascript_views_footer string to base64 string.
|
||||
if (isset($data['javascript_views_footer']))
|
||||
// Set the javascript_views_file string to base64 string.
|
||||
if (isset($data['javascript_views_file']))
|
||||
{
|
||||
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
|
||||
$data['javascript_views_file'] = base64_encode($data['javascript_views_file']);
|
||||
}
|
||||
|
||||
// Set the php_after_publish string to base64 string.
|
||||
@ -1388,22 +1409,34 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['php_before_delete'] = base64_encode($data['php_before_delete']);
|
||||
}
|
||||
|
||||
// Set the javascript_views_footer string to base64 string.
|
||||
if (isset($data['javascript_views_footer']))
|
||||
{
|
||||
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
|
||||
}
|
||||
|
||||
// Set the php_after_delete string to base64 string.
|
||||
if (isset($data['php_after_delete']))
|
||||
{
|
||||
$data['php_after_delete'] = base64_encode($data['php_after_delete']);
|
||||
}
|
||||
|
||||
// Set the php_document string to base64 string.
|
||||
if (isset($data['php_document']))
|
||||
{
|
||||
$data['php_document'] = base64_encode($data['php_document']);
|
||||
}
|
||||
|
||||
// Set the php_controller string to base64 string.
|
||||
if (isset($data['php_controller']))
|
||||
{
|
||||
$data['php_controller'] = base64_encode($data['php_controller']);
|
||||
}
|
||||
|
||||
// Set the php_document string to base64 string.
|
||||
if (isset($data['php_document']))
|
||||
// Set the sql string to base64 string.
|
||||
if (isset($data['sql']))
|
||||
{
|
||||
$data['php_document'] = base64_encode($data['php_document']);
|
||||
$data['sql'] = base64_encode($data['sql']);
|
||||
}
|
||||
|
||||
// Set the php_model string to base64 string.
|
||||
@ -1418,28 +1451,16 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['php_controller_list'] = base64_encode($data['php_controller_list']);
|
||||
}
|
||||
|
||||
// Set the sql string to base64 string.
|
||||
if (isset($data['sql']))
|
||||
{
|
||||
$data['sql'] = base64_encode($data['sql']);
|
||||
}
|
||||
|
||||
// Set the php_model_list string to base64 string.
|
||||
if (isset($data['php_model_list']))
|
||||
{
|
||||
$data['php_model_list'] = base64_encode($data['php_model_list']);
|
||||
}
|
||||
|
||||
// Set the php_import_display string to base64 string.
|
||||
if (isset($data['php_import_display']))
|
||||
{
|
||||
$data['php_import_display'] = base64_encode($data['php_import_display']);
|
||||
}
|
||||
|
||||
// Set the php_ajaxmethod string to base64 string.
|
||||
if (isset($data['php_ajaxmethod']))
|
||||
// Set the php_model_list string to base64 string.
|
||||
if (isset($data['php_model_list']))
|
||||
{
|
||||
$data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']);
|
||||
$data['php_model_list'] = base64_encode($data['php_model_list']);
|
||||
}
|
||||
|
||||
// Set the php_import string to base64 string.
|
||||
@ -1454,16 +1475,16 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$data['php_import_setdata'] = base64_encode($data['php_import_setdata']);
|
||||
}
|
||||
|
||||
// Set the php_ajaxmethod string to base64 string.
|
||||
if (isset($data['php_ajaxmethod']))
|
||||
{
|
||||
$data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']);
|
||||
}
|
||||
|
||||
// Set the php_import_ext string to base64 string.
|
||||
if (isset($data['php_import_ext']))
|
||||
{
|
||||
$data['php_import_ext'] = base64_encode($data['php_import_ext']);
|
||||
}
|
||||
|
||||
// Set the php_getitem string to base64 string.
|
||||
if (isset($data['php_getitem']))
|
||||
{
|
||||
$data['php_getitem'] = base64_encode($data['php_getitem']);
|
||||
}
|
||||
|
||||
// Set the Params Items to data
|
||||
|
@ -262,74 +262,74 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
continue;
|
||||
}
|
||||
|
||||
// decode php_import_save
|
||||
$item->php_import_save = base64_decode($item->php_import_save);
|
||||
// decode html_import_view
|
||||
$item->html_import_view = base64_decode($item->html_import_view);
|
||||
// decode php_import_save
|
||||
$item->php_import_save = base64_decode($item->php_import_save);
|
||||
// decode php_import_headers
|
||||
$item->php_import_headers = base64_decode($item->php_import_headers);
|
||||
// decode css_view
|
||||
$item->css_view = base64_decode($item->css_view);
|
||||
// decode php_getitem
|
||||
$item->php_getitem = base64_decode($item->php_getitem);
|
||||
// decode php_getitems
|
||||
$item->php_getitems = base64_decode($item->php_getitems);
|
||||
// decode php_getitems_after_all
|
||||
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
|
||||
// decode css_views
|
||||
$item->css_views = base64_decode($item->css_views);
|
||||
// decode css_view
|
||||
$item->css_view = base64_decode($item->css_view);
|
||||
// decode php_getlistquery
|
||||
$item->php_getlistquery = base64_decode($item->php_getlistquery);
|
||||
// decode php_before_save
|
||||
$item->php_before_save = base64_decode($item->php_before_save);
|
||||
// decode javascript_view_file
|
||||
$item->javascript_view_file = base64_decode($item->javascript_view_file);
|
||||
// decode css_views
|
||||
$item->css_views = base64_decode($item->css_views);
|
||||
// decode php_save
|
||||
$item->php_save = base64_decode($item->php_save);
|
||||
// decode php_postsavehook
|
||||
$item->php_postsavehook = base64_decode($item->php_postsavehook);
|
||||
// decode javascript_view_footer
|
||||
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
|
||||
// decode javascript_view_file
|
||||
$item->javascript_view_file = base64_decode($item->javascript_view_file);
|
||||
// decode php_allowedit
|
||||
$item->php_allowedit = base64_decode($item->php_allowedit);
|
||||
// decode php_batchcopy
|
||||
$item->php_batchcopy = base64_decode($item->php_batchcopy);
|
||||
// decode javascript_views_file
|
||||
$item->javascript_views_file = base64_decode($item->javascript_views_file);
|
||||
// decode javascript_view_footer
|
||||
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
|
||||
// decode php_batchmove
|
||||
$item->php_batchmove = base64_decode($item->php_batchmove);
|
||||
// decode php_before_publish
|
||||
$item->php_before_publish = base64_decode($item->php_before_publish);
|
||||
// decode javascript_views_footer
|
||||
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
|
||||
// decode javascript_views_file
|
||||
$item->javascript_views_file = base64_decode($item->javascript_views_file);
|
||||
// decode php_after_publish
|
||||
$item->php_after_publish = base64_decode($item->php_after_publish);
|
||||
// decode php_before_delete
|
||||
$item->php_before_delete = base64_decode($item->php_before_delete);
|
||||
// decode javascript_views_footer
|
||||
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
|
||||
// decode php_after_delete
|
||||
$item->php_after_delete = base64_decode($item->php_after_delete);
|
||||
// decode php_controller
|
||||
$item->php_controller = base64_decode($item->php_controller);
|
||||
// decode php_document
|
||||
$item->php_document = base64_decode($item->php_document);
|
||||
// decode php_controller
|
||||
$item->php_controller = base64_decode($item->php_controller);
|
||||
// decode sql
|
||||
$item->sql = base64_decode($item->sql);
|
||||
// decode php_model
|
||||
$item->php_model = base64_decode($item->php_model);
|
||||
// decode php_controller_list
|
||||
$item->php_controller_list = base64_decode($item->php_controller_list);
|
||||
// decode sql
|
||||
$item->sql = base64_decode($item->sql);
|
||||
// decode php_model_list
|
||||
$item->php_model_list = base64_decode($item->php_model_list);
|
||||
// decode php_import_display
|
||||
$item->php_import_display = base64_decode($item->php_import_display);
|
||||
// decode php_ajaxmethod
|
||||
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
|
||||
// decode php_model_list
|
||||
$item->php_model_list = base64_decode($item->php_model_list);
|
||||
// decode php_import
|
||||
$item->php_import = base64_decode($item->php_import);
|
||||
// decode php_import_setdata
|
||||
$item->php_import_setdata = base64_decode($item->php_import_setdata);
|
||||
// decode php_ajaxmethod
|
||||
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
|
||||
// decode php_import_ext
|
||||
$item->php_import_ext = base64_decode($item->php_import_ext);
|
||||
// decode php_getitem
|
||||
$item->php_getitem = base64_decode($item->php_getitem);
|
||||
// unset the values we don't want exported.
|
||||
unset($item->asset_id);
|
||||
unset($item->checked_out);
|
||||
|
@ -215,6 +215,7 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
'library_files_folders_urls' => 'libraries_files_folders_urls',
|
||||
'admin_fields' => 'admins_fields',
|
||||
'admin_fields_conditions' => 'admins_fields_conditions',
|
||||
'validation_rule' => 'validation_rules',
|
||||
'field' => 'fields',
|
||||
'component_admin_views' => 'components_admin_views' ,
|
||||
'component_site_views' => 'components_site_views',
|
||||
@ -227,7 +228,7 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
'component_files_folders' => 'components_files_folders',
|
||||
'language' => true);
|
||||
|
||||
public function getButton($type)
|
||||
public function getButton($type, $size)
|
||||
{
|
||||
if (isset($this->buttonArray[$type]))
|
||||
{
|
||||
@ -244,18 +245,27 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
// only load referal if not new item.
|
||||
$ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id'];
|
||||
}
|
||||
// build the button
|
||||
$button = '<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label>' . ucwords($type) . '</label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<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)" >
|
||||
<span class="icon-new icon-white"></span>
|
||||
' . JText::_('COM_COMPONENTBUILDER_NEW') . '
|
||||
</a>
|
||||
</div>
|
||||
</div>';
|
||||
// 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')).'">';
|
||||
// build the smaller button
|
||||
if (2 == $size)
|
||||
{
|
||||
$button = $startAtag.'<span class="icon-new icon-white"></span> ' . JText::_('COM_COMPONENTBUILDER_CREATE') . '</a>';
|
||||
}
|
||||
else
|
||||
// build the big button
|
||||
{
|
||||
$button = '<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label>' . ucwords($type) . '</label>
|
||||
</div>
|
||||
<div class="controls"> '.$startAtag.'
|
||||
<span class="icon-new icon-white"></span>
|
||||
' . JText::_('COM_COMPONENTBUILDER_NEW') . '
|
||||
</a>
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
// return the button attached to input field
|
||||
return $button;
|
||||
}
|
||||
@ -307,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)" >';
|
||||
$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.'">';
|
||||
if (1 == $size)
|
||||
{
|
||||
$button[] = '<span class="'.$icon.' icon-white"></span>';
|
||||
@ -335,7 +345,36 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
return '';
|
||||
}
|
||||
|
||||
public static function getDynamicScripts($type)
|
||||
public function checkAliasField($type)
|
||||
{
|
||||
// get the view name & id
|
||||
$values = $this->getViewID();
|
||||
if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']) && in_array($values['a_view'], $this->allowedViewsArray))
|
||||
{
|
||||
// get the fields
|
||||
if ($fields = ComponentbuilderHelper::getVar('admin_fields', $values['a_id'], 'admin_view', 'addfields'))
|
||||
{
|
||||
// open the fields
|
||||
if (ComponentbuilderHelper::checkJson($fields))
|
||||
{
|
||||
$fields = json_decode($fields, true);
|
||||
if (ComponentbuilderHelper::checkArray($fields))
|
||||
{
|
||||
foreach($fields as $field)
|
||||
{
|
||||
if (isset($field['alias']) && $field['alias'] == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getDynamicScripts($type)
|
||||
{
|
||||
// get from global helper
|
||||
return ComponentbuilderHelper::getDynamicScripts($type);
|
||||
@ -831,7 +870,8 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
if ($this->canEdit($id, $view))
|
||||
{
|
||||
$edit = "index.php?option=com_componentbuilder&view=".$views."&task=".$view.".edit&id=".$id.$this->ref;
|
||||
return ' <a 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 = \''.$edit.'\' })" href="javascript:void(0)" class="uk-icon-pencil"></a>';
|
||||
$title = ComponentbuilderHelper::safeString(JText::_('COM_COMPONENTBUILDER_EDIT').' '.$view, 'W');
|
||||
return ' <a 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 = \''.$edit.'\' })" href="javascript:void(0)" class="uk-icon-pencil" title="'.$title.'"></a>';
|
||||
|
||||
}
|
||||
return '';
|
||||
@ -2133,10 +2173,10 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
$exitingNames["boolean"] = JText::_("COM_COMPONENTBUILDER_ACCEPTS_ONLY_THE_VALUES_ZERO_ONE_TRUE_OR_FALSE_CASEINSENSITIVE");
|
||||
$exitingNames["color"] = JText::_("COM_COMPONENTBUILDER_ACCEPTS_ONLY_EMPTY_VALUES_CONVERTED_TO_ZERO_AND_STRINGS_IN_THE_FORM_RGB_OR_RRGGBB_WHERE_R_G_AND_B_ARE_HEX_VALUES");
|
||||
$exitingNames["email"] = JText::_("COM_COMPONENTBUILDER_ACCEPTS_AN_EMAIL_ADDRESS_SATISFIES_A_BASIC_SYNTAX_CHECK_IN_THE_PATTERN_OF_QUOTXYZZQUOT_WITH_NO_INVALID_CHARACTERS");
|
||||
$exitingNames["equals"] = JText::sprintf("COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_THE_SAME_AS_THAT_HELD_IN_THE_FIELD_NAMED_QUOTFIELDQUOT_EGS", '<br /><code><input type="text" name="email_check" validate="equals" field="email" /></code>');
|
||||
$exitingNames["equals"] = JText::sprintf("COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_THE_SAME_AS_THAT_HELD_IN_THE_FIELD_NAMED_QUOTFIELDQUOT_EGS", '<br /><code><input<br /> type="text"<br /> name="email_check"<br /> validate="equals"<br /> field="email"<br />/></code>');
|
||||
$exitingNames["options"] = JText::_("COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_ENTERED_BE_ONE_OF_THE_OPTIONS_IN_AN_ELEMENT_OF_TYPEQUOTLISTQUOT_THAT_IS_THAT_THE_ELEMENT_IS_A_SELECT_LIST");
|
||||
$exitingNames["tel"] = JText::_("COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_A_TELEPHONE_NUMBER_COMPLYING_WITH_THE_STANDARDS_OF_NANPA_ITUT_TRECEONE_HUNDRED_AND_SIXTY_FOUR_OR_IETF_RFCFOUR_THOUSAND_NINE_HUNDRED_AND_THIRTY_THREE");
|
||||
$exitingNames["url"] = JText::sprintf("COM_COMPONENTBUILDER_VALIDATES_THAT_THE_VALUE_IS_A_URL_WITH_A_VALID_SCHEME_WHICH_CAN_BE_RESTRICTED_BY_THE_OPTIONAL_COMMASEPARATED_FIELD_SCHEME_AND_PASSES_A_BASIC_SYNTAX_CHECK_EGS", '<br /><code><input type="text" name="link" validate="url" scheme="http,https,mailto" /></code>');
|
||||
$exitingNames["url"] = JText::sprintf("COM_COMPONENTBUILDER_VALIDATES_THAT_THE_VALUE_IS_A_URL_WITH_A_VALID_SCHEME_WHICH_CAN_BE_RESTRICTED_BY_THE_OPTIONAL_COMMASEPARATED_FIELD_SCHEME_AND_PASSES_A_BASIC_SYNTAX_CHECK_EGS", '<br /><code><input<br /> type="text"<br /> name="link"<br /> validate="url"<br /> scheme="http,https,mailto"<br />/></code>');
|
||||
$exitingNames["username"] = JText::_("COM_COMPONENTBUILDER_VALIDATES_THAT_THE_VALUE_DOES_NOT_APPEAR_AS_A_USERNAME_ON_THE_SYSTEM_THAT_IS_THAT_IT_IS_A_VALID_NEW_USERNAME_DOES_NOT_SYNTAX_CHECK_IT_AS_A_VALID_NAME");
|
||||
// now get the custom created rules
|
||||
$db = JFactory::getDbo();
|
||||
|
@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_config extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -892,9 +892,9 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -944,9 +944,9 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -880,9 +880,9 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -1140,9 +1140,9 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -876,9 +876,9 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -1146,9 +1146,9 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -973,9 +973,9 @@ class ComponentbuilderModelField extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
205
admin/models/fields/aliasbuilder.php
Normal file
205
admin/models/fields/aliasbuilder.php
Normal file
@ -0,0 +1,205 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.7.x
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage aliasbuilder.php
|
||||
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
|
||||
@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 the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Aliasbuilder Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldAliasbuilder extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The aliasbuilder field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'aliasbuilder';
|
||||
/**
|
||||
* Override to add new button
|
||||
*
|
||||
* @return string The field input markup.
|
||||
*
|
||||
* @since 3.2
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
// see if we should add buttons
|
||||
$setButton = $this->getAttribute('button');
|
||||
// get html
|
||||
$html = parent::getInput();
|
||||
// if true set button
|
||||
if ($setButton === 'true')
|
||||
{
|
||||
$button = array();
|
||||
$script = array();
|
||||
$buttonName = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
'id' => 'int',
|
||||
'view' => 'word'
|
||||
));
|
||||
// check if new item
|
||||
$ref = '';
|
||||
$refJ = '';
|
||||
if (!is_null($values['id']) && strlen($values['view']))
|
||||
{
|
||||
// only load referal if not new item.
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
}
|
||||
$user = JFactory::getUser();
|
||||
// only add if user allowed to create field
|
||||
if ($user->authorise('field.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$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>';
|
||||
}
|
||||
// only add if user allowed to edit field
|
||||
if (($buttonName === 'field' || $buttonName === 'fields') && $user->authorise('field.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$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[] = "
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
|
||||
e.preventDefault();
|
||||
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
|
||||
".$buttonName."Button(".$buttonName."Value);
|
||||
});
|
||||
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
|
||||
".$buttonName."Button(".$buttonName."Value);
|
||||
});
|
||||
function ".$buttonName."Button(value) {
|
||||
if (value > 0) {
|
||||
// hide the create button
|
||||
jQuery('#".$buttonName."Create').hide();
|
||||
// show edit button
|
||||
jQuery('#".$buttonName."Edit').show();
|
||||
var url = 'index.php?option=com_componentbuilder&view=fields&task=field.edit&id='+value+'".$refJ."';
|
||||
jQuery('#".$buttonName."Edit').attr('href', url);
|
||||
} else {
|
||||
// show the create button
|
||||
jQuery('#".$buttonName."Create').show();
|
||||
// hide edit button
|
||||
jQuery('#".$buttonName."Edit').hide();
|
||||
}
|
||||
}";
|
||||
}
|
||||
// check if button was created for field field.
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
// load the db opbject
|
||||
$db = JFactory::getDBO();
|
||||
// get the input from url
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
// get the id
|
||||
$adminView = $jinput->getInt('id', 0);
|
||||
// rest the fields ids
|
||||
$fieldIds = array();
|
||||
if (is_numeric($adminView) && $adminView >= 1)
|
||||
{
|
||||
// get all the fields linked to the admin view
|
||||
if ($addFields = ComponentbuilderHelper::getVar('admin_fields', (int) $adminView, 'admin_view', 'addfields'))
|
||||
{
|
||||
if (ComponentbuilderHelper::checkJson($addFields))
|
||||
{
|
||||
$addFields = json_decode($addFields, true);
|
||||
if (ComponentbuilderHelper::checkArray($addFields))
|
||||
{
|
||||
foreach($addFields as $addField)
|
||||
{
|
||||
if (isset($addField['field']) && (!isset($addField['alias']) || 1 != $addField['alias']))
|
||||
{
|
||||
$fieldIds[] = (int) $addField['field'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.name','b.name'),array('id','name','type')));
|
||||
$query->from($db->quoteName('#__componentbuilder_field', 'a'));
|
||||
$query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 'b') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('b.id') . ')');
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
// filter by fields linked
|
||||
if (ComponentbuilderHelper::checkArray($fieldIds))
|
||||
{
|
||||
// only load these fields
|
||||
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')');
|
||||
}
|
||||
$query->order('a.name ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$items = $db->loadObjectList();
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [' . $item->type . ']');
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
}
|
@ -1140,9 +1140,9 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -1199,6 +1199,8 @@ function isSet(val)
|
||||
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
// check if this view has alias field
|
||||
checkAliasField();
|
||||
// get the linked details
|
||||
getLinked();
|
||||
// set button
|
||||
@ -1214,6 +1216,35 @@ jQuery(document).ready(function()
|
||||
addButton('field','create_edit_buttons'); // <-- third
|
||||
});
|
||||
|
||||
function checkAliasField() {
|
||||
checkAliasField_server(1).done(function(result) {
|
||||
if(result){
|
||||
// remove the notice
|
||||
jQuery('.note_create_edit_notice_p').remove();
|
||||
} else {
|
||||
// hide everything about alias management
|
||||
jQuery('#jform_alias_builder_type').closest('.control-group').remove();
|
||||
jQuery('#jform_alias_builder').closest('.control-group').remove();
|
||||
jQuery('.note_alias_builder_default').closest('.control-group').remove();
|
||||
jQuery('.note_alias_builder_custom').closest('.control-group').remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function checkAliasField_server(type){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.checkAliasField&format=json&vdm="+vastDevMod;
|
||||
if(token.length > 0 && type > 0){
|
||||
var request = 'token='+token+'&type=' + type;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
|
||||
function getAjaxDisplay(type){
|
||||
getAjaxDisplay_server(type).done(function(result) {
|
||||
if(result){
|
||||
@ -1267,10 +1298,10 @@ function addButtonID(type, where, size){
|
||||
});
|
||||
}
|
||||
|
||||
function addButton_server(type){
|
||||
function addButton_server(type, size){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0){
|
||||
var request = 'token='+token+'&type='+type;
|
||||
var request = 'token='+token+'&type='+type+'&size='+size;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
@ -1280,10 +1311,16 @@ function addButton_server(type){
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
function addButton(type,where){
|
||||
addButton_server(type).done(function(result) {
|
||||
function addButton(type, where, size){
|
||||
// just to insure that default behaviour still works
|
||||
size = typeof size !== 'undefined' ? size : 1;
|
||||
addButton_server(type, size).done(function(result) {
|
||||
if(result){
|
||||
addData(result,'#jform_'+where);
|
||||
if (2 == size) {
|
||||
jQuery('#'+where).html(result);
|
||||
} else {
|
||||
addData(result, '#jform_'+where);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -144,20 +144,6 @@
|
||||
message="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_HINT"
|
||||
/>
|
||||
<!-- Add_php_after_publish Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_after_publish"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Add_php_batchmove Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -214,21 +200,41 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_import_save Field. Type: Textarea. (joomla) -->
|
||||
<!-- Icon_add Field. Type: Media. (joomla) -->
|
||||
<field
|
||||
type="media"
|
||||
name="icon_add"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_DESCRIPTION"
|
||||
directory=""
|
||||
/>
|
||||
<!-- Html_import_view Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_LABEL"
|
||||
name="html_import_view"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_DESCRIPTION"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_HINT"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_beginner_import Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_beginner_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION" heading="h4" class="alert alert-info note_beginner_import" />
|
||||
<!-- Add_sql Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_sql"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_SQL_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Type Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
@ -280,11 +286,11 @@
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_CATEGORY_DESCRIPTION"
|
||||
directory=""
|
||||
/>
|
||||
<!-- Add_php_after_delete Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_after_publish Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_after_delete"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL"
|
||||
name="add_php_after_publish"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -300,11 +306,11 @@
|
||||
name="not_required"
|
||||
default="[]"
|
||||
/>
|
||||
<!-- Add_sql Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_after_delete Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_sql"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_SQL_LABEL"
|
||||
name="add_php_after_delete"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -316,19 +322,8 @@
|
||||
</field>
|
||||
<!-- Note_on_permissions Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_on_permissions" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_DESCRIPTION" heading="h4" class="alert alert-info note_on_permissions" />
|
||||
<!-- Html_import_view Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="html_import_view"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_beginner_import Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_beginner_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION" heading="h4" class="alert alert-info note_beginner_import" />
|
||||
<!-- Addpermissions Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
@ -403,21 +398,26 @@
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Icon_add Field. Type: Media. (joomla) -->
|
||||
<!-- Php_import_save Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="media"
|
||||
name="icon_add"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_DESCRIPTION"
|
||||
directory=""
|
||||
type="textarea"
|
||||
name="php_import_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_on_tabs Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_on_tabs" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_DESCRIPTION" heading="h4" class="alert alert-info note_on_tabs" />
|
||||
<!-- Add_php_before_save Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_getitems_after_all Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_before_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE_LABEL"
|
||||
name="add_php_getitems_after_all"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -456,11 +456,11 @@
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Add_php_postsavehook Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_before_save Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_postsavehook"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_POSTSAVEHOOK_LABEL"
|
||||
name="add_php_before_save"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -472,11 +472,11 @@
|
||||
</field>
|
||||
<!-- Note_on_linked_views Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_on_linked_views" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_DESCRIPTION" heading="h4" class="alert alert-info note_on_linked_views" />
|
||||
<!-- Add_php_batchcopy Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_postsavehook Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_batchcopy"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL"
|
||||
name="add_php_postsavehook"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_POSTSAVEHOOK_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -576,6 +576,22 @@
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Add_php_batchcopy Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_batchcopy"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Note_create_edit_notice Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_create_edit_notice" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION" heading="h4" class="alert alert-info note_create_edit_notice" />
|
||||
<!-- Add_php_before_publish Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -590,8 +606,20 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Note_create_edit_notice Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_create_edit_notice" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION" heading="h4" class="alert alert-info note_create_edit_notice" />
|
||||
<!-- Alias_builder_type Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="alias_builder_type"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_DEFAULT</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM</option>
|
||||
</field>
|
||||
<!-- Add_php_before_delete Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -606,8 +634,8 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Note_create_edit_buttons Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_create_edit_buttons" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION" class="note_create_edit_buttons" />
|
||||
<!-- Note_alias_builder_custom Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_alias_builder_custom" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_CUSTOM_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_CUSTOM_DESCRIPTION" heading="h4" class="alert alert-info note_alias_builder_custom" showon="alias_builder_type:2" />
|
||||
<!-- Add_php_document Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -622,8 +650,8 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Note_create_edit_display Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_create_edit_display" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION" class="note_create_edit_display" />
|
||||
<!-- Note_alias_builder_default Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_alias_builder_default" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_DESCRIPTION" heading="h4" class="alert alert-info note_alias_builder_default" showon="alias_builder_type:1" />
|
||||
<!-- Addtables Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
@ -660,20 +688,16 @@
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Add_css_view Field. Type: Radio. (joomla) -->
|
||||
<!-- Alias_builder Field. Type: Aliasbuilder. (custom) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_css_view"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CSS_VIEW_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
type="aliasbuilder"
|
||||
name="alias_builder"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_LABEL"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_DESCRIPTION"
|
||||
class="list_class fieldFull"
|
||||
multiple="true"
|
||||
showon="alias_builder_type:2"
|
||||
/>
|
||||
<!-- Add_custom_import Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -689,11 +713,11 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Add_php_getitems Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_getitem Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_getitems"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL"
|
||||
name="add_php_getitem"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEM_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -716,11 +740,11 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_php_getitems_after_all Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_php_getitems Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_getitems_after_all"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL"
|
||||
name="add_php_getitems"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -730,19 +754,8 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Css_view Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="css_view"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_create_edit_buttons Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_create_edit_buttons" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION" class="note_create_edit_buttons" />
|
||||
<!-- Icon Field. Type: Media. (joomla) -->
|
||||
<field
|
||||
type="media"
|
||||
@ -751,6 +764,21 @@
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_DESCRIPTION"
|
||||
directory=""
|
||||
/>
|
||||
<!-- Php_getitem Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_getitem"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Note_create_edit_display Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_create_edit_display" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION" class="note_create_edit_display" />
|
||||
<!-- Php_getitems Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
@ -764,11 +792,11 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_css_views Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_css_view Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_css_views"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CSS_VIEWS_LABEL"
|
||||
name="add_css_view"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CSS_VIEW_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -791,17 +819,17 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Css_views Field. Type: Textarea. (joomla) -->
|
||||
<!-- Css_view Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="css_views"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEWS_LABEL"
|
||||
name="css_view"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEWS_DESCRIPTION"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEWS_HINT"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEW_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_getlistquery Field. Type: Textarea. (joomla) -->
|
||||
@ -817,11 +845,11 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_javascript_view_file Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_css_views Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_javascript_view_file"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEW_FILE_LABEL"
|
||||
name="add_css_views"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CSS_VIEWS_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -844,17 +872,17 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_SAVE_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Javascript_view_file Field. Type: Textarea. (joomla) -->
|
||||
<!-- Css_views Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="javascript_view_file"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FILE_LABEL"
|
||||
name="css_views"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEWS_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FILE_DESCRIPTION"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEWS_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FILE_HINT"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_CSS_VIEWS_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_save Field. Type: Textarea. (joomla) -->
|
||||
@ -870,11 +898,11 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_javascript_view_footer Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_javascript_view_file Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_javascript_view_footer"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL"
|
||||
name="add_javascript_view_file"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEW_FILE_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -897,17 +925,17 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Javascript_view_footer Field. Type: Textarea. (joomla) -->
|
||||
<!-- Javascript_view_file Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="javascript_view_footer"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FOOTER_LABEL"
|
||||
name="javascript_view_file"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FILE_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FILE_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FOOTER_HINT"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FILE_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_allowedit Field. Type: Textarea. (joomla) -->
|
||||
@ -923,11 +951,11 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_javascript_views_file Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_javascript_view_footer Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_javascript_views_file"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEWS_FILE_LABEL"
|
||||
name="add_javascript_view_footer"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -950,17 +978,17 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Javascript_views_file Field. Type: Textarea. (joomla) -->
|
||||
<!-- Javascript_view_footer Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="javascript_views_file"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE_LABEL"
|
||||
name="javascript_view_footer"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FOOTER_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE_DESCRIPTION"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE_HINT"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEW_FOOTER_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_batchmove Field. Type: Textarea. (joomla) -->
|
||||
@ -976,11 +1004,11 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_javascript_views_footer Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_javascript_views_file Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_javascript_views_footer"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
|
||||
name="add_javascript_views_file"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEWS_FILE_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -1003,17 +1031,17 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Javascript_views_footer Field. Type: Textarea. (joomla) -->
|
||||
<!-- Javascript_views_file Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="javascript_views_footer"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FOOTER_LABEL"
|
||||
name="javascript_views_file"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FOOTER_DESCRIPTION"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FOOTER_HINT"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_after_publish Field. Type: Textarea. (joomla) -->
|
||||
@ -1029,11 +1057,11 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_custom_button Field. Type: Radio. (joomla) -->
|
||||
<!-- Add_javascript_views_footer Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_custom_button"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL"
|
||||
name="add_javascript_views_footer"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
@ -1056,6 +1084,59 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Javascript_views_footer Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="javascript_views_footer"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FOOTER_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FOOTER_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FOOTER_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_after_delete Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_after_delete"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_custom_button Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_custom_button"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_document Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_document"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Custom_button Field. Type: Subform. (joomla) -->
|
||||
<field
|
||||
type="subform"
|
||||
@ -1565,58 +1646,6 @@
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Php_after_delete Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_after_delete"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_controller Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_controller"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_HINT"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Php_document Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_document"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_LABEL"
|
||||
rows="17"
|
||||
cols="5"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_model Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_model"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_HINT"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Source Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -1630,17 +1659,17 @@
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_DUMP</option>
|
||||
</field>
|
||||
<!-- Php_controller_list Field. Type: Textarea. (joomla) -->
|
||||
<!-- Php_controller Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_controller_list"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_LABEL"
|
||||
name="php_controller"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_DESCRIPTION"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_HINT"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_HINT"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Sql Field. Type: Textarea. (joomla) -->
|
||||
@ -1656,6 +1685,47 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SQL_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_model Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_model"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_HINT"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Note_advanced_import Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_advanced_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_DESCRIPTION" heading="h4" class="alert alert-success note_advanced_import" />
|
||||
<!-- Php_controller_list Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_controller_list"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_HINT"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Php_import_display Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_display"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_model_list Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
@ -1669,8 +1739,19 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_LIST_HINT"
|
||||
required="false"
|
||||
/>
|
||||
<!-- Note_advanced_import Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_advanced_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_DESCRIPTION" heading="h4" class="alert alert-success note_advanced_import" />
|
||||
<!-- Php_import Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_php_ajax Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -1685,17 +1766,17 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_import_display Field. Type: Textarea. (joomla) -->
|
||||
<!-- Php_import_setdata Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_display"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_LABEL"
|
||||
name="php_import_setdata"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_DESCRIPTION"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_HINT"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_ajaxmethod Field. Type: Textarea. (joomla) -->
|
||||
@ -1711,17 +1792,17 @@
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AJAXMETHOD_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_import Field. Type: Textarea. (joomla) -->
|
||||
<!-- Php_import_ext Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_LABEL"
|
||||
name="php_import_ext"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DESCRIPTION"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HINT"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Ajax_input Field. Type: Subform. (joomla) -->
|
||||
@ -1856,59 +1937,6 @@
|
||||
/>
|
||||
</form>
|
||||
</field>
|
||||
<!-- Php_import_setdata Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_setdata"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Add_php_getitem Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_php_getitem"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEM_LABEL"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
required="true">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
|
||||
</field>
|
||||
<!-- Php_import_ext Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_import_ext"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_HINT"
|
||||
required="true"
|
||||
/>
|
||||
<!-- Php_getitem Field. Type: Textarea. (joomla) -->
|
||||
<field
|
||||
type="textarea"
|
||||
name="php_getitem"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_DESCRIPTION"
|
||||
class="text_area span12"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_HINT"
|
||||
required="true"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<!-- Access Control Fields. -->
|
||||
|
@ -516,6 +516,8 @@ jQuery(document).ready(function()
|
||||
getLinked();
|
||||
// get the validation rules
|
||||
getValidationRulesTable();
|
||||
// set button to create more fields
|
||||
addButton('validation_rule', 'validation_rules_header', 2);
|
||||
});
|
||||
|
||||
function getLinked_server(type){
|
||||
@ -539,6 +541,33 @@ function getLinked(){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addButton_server(type, size){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0){
|
||||
var request = 'token='+token+'&type='+type+'&size='+size;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
function addButton(type, where, size){
|
||||
// just to insure that default behaviour still works
|
||||
size = typeof size !== 'undefined' ? size : 1;
|
||||
addButton_server(type, size).done(function(result) {
|
||||
if(result){
|
||||
if (2 == size) {
|
||||
jQuery('#'+where).html(result);
|
||||
} else {
|
||||
addData(result, '#jform_'+where);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function getFieldOptions_server(fieldId){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldOptions&format=json";
|
||||
@ -561,7 +590,7 @@ function getFieldOptions(id,setValue){
|
||||
jQuery('textarea#jform_xml').val(result.values);
|
||||
}
|
||||
jQuery('#help').remove();
|
||||
jQuery('.helpNote').append('<div id="help" style="margin: 10px;">'+result.description+'<br />'+result.values_description+'</div>');
|
||||
jQuery('.helpNote').append('<div id="help" class="uk-scrollable-box">'+result.description+'<br />'+result.values_description+'</div>');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -994,10 +994,10 @@ function addButtonID(type, where, size){
|
||||
});
|
||||
}
|
||||
|
||||
function addButton_server(type){
|
||||
function addButton_server(type, size){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0){
|
||||
var request = 'token='+token+'&type='+type;
|
||||
var request = 'token='+token+'&type='+type+'&size='+size;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
@ -1007,10 +1007,16 @@ function addButton_server(type){
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
function addButton(type,where){
|
||||
addButton_server(type).done(function(result) {
|
||||
function addButton(type, where, size){
|
||||
// just to insure that default behaviour still works
|
||||
size = typeof size !== 'undefined' ? size : 1;
|
||||
addButton_server(type, size).done(function(result) {
|
||||
if(result){
|
||||
addData(result,'#jform_'+where);
|
||||
if (2 == size) {
|
||||
jQuery('#'+where).html(result);
|
||||
} else {
|
||||
addData(result, '#jform_'+where);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -34,10 +34,10 @@ function addData(result,where){
|
||||
jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
|
||||
}
|
||||
|
||||
function addButton_server(type){
|
||||
function addButton_server(type, size){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0){
|
||||
var request = 'token='+token+'&type='+type;
|
||||
var request = 'token='+token+'&type='+type+'&size='+size;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
@ -47,10 +47,16 @@ function addButton_server(type){
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
function addButton(type,where){
|
||||
addButton_server(type).done(function(result) {
|
||||
function addButton(type, where, size){
|
||||
// just to insure that default behaviour still works
|
||||
size = typeof size !== 'undefined' ? size : 1;
|
||||
addButton_server(type, size).done(function(result) {
|
||||
if(result){
|
||||
addData(result,'#jform_'+where);
|
||||
if (2 == size) {
|
||||
jQuery('#'+where).html(result);
|
||||
} else {
|
||||
addData(result, '#jform_'+where);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -453,10 +453,10 @@ function addButtonID(type, where, size){
|
||||
});
|
||||
}
|
||||
|
||||
function addButton_server(type){
|
||||
function addButton_server(type, size){
|
||||
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
|
||||
if(token.length > 0 && type.length > 0){
|
||||
var request = 'token='+token+'&type='+type;
|
||||
var request = 'token='+token+'&type='+type+'&size='+size;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
@ -466,10 +466,16 @@ function addButton_server(type){
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
function addButton(type,where){
|
||||
addButton_server(type).done(function(result) {
|
||||
function addButton(type, where, size){
|
||||
// just to insure that default behaviour still works
|
||||
size = typeof size !== 'undefined' ? size : 1;
|
||||
addButton_server(type, size).done(function(result) {
|
||||
if(result){
|
||||
addData(result,'#jform_'+where);
|
||||
if (2 == size) {
|
||||
jQuery('#'+where).html(result);
|
||||
} else {
|
||||
addData(result, '#jform_'+where);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -849,7 +849,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
|
||||
// Automatic handling of alias for empty fields
|
||||
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
|
||||
{
|
||||
if ($data['alias'] == null)
|
||||
if ($data['alias'] == null || empty($data['alias']))
|
||||
{
|
||||
if (JFactory::getConfig()->get('unicodeslugs') == 1)
|
||||
{
|
||||
@ -867,8 +867,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
|
||||
$msg = JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_SAVE_WARNING');
|
||||
}
|
||||
|
||||
list($title, $alias) = $this->_generateNewTitle($data['alias'], $data['title']);
|
||||
$data['alias'] = $alias;
|
||||
$data['alias'] = $this->_generateNewTitle($data['alias']);
|
||||
|
||||
if (isset($msg))
|
||||
{
|
||||
@ -923,26 +922,49 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title/s & alias.
|
||||
*
|
||||
* @param string $alias The alias.
|
||||
* @param string $title The title.
|
||||
* @param string $alias The alias.
|
||||
* @param string/array $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
* @return array/string Contains the modified title/s and/or alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($alias, $title)
|
||||
protected function _generateNewTitle($alias, $title = null)
|
||||
{
|
||||
|
||||
// Alter the title & alias
|
||||
// Alter the title/s & alias
|
||||
$table = $this->getTable();
|
||||
|
||||
while ($table->load(array('alias' => $alias)))
|
||||
{
|
||||
$title = JString::increment($title);
|
||||
// Check if this is an array of titles
|
||||
if (ComponentbuilderHelper::checkArray($title))
|
||||
{
|
||||
foreach($title as $nr => &$_title)
|
||||
{
|
||||
$_title = JString::increment($_title);
|
||||
}
|
||||
}
|
||||
// Make sure we have a title
|
||||
elseif ($title)
|
||||
{
|
||||
$title = JString::increment($title);
|
||||
}
|
||||
$alias = JString::increment($alias, 'dash');
|
||||
}
|
||||
|
||||
return array($title, $alias);
|
||||
// Check if this is an array of titles
|
||||
if (ComponentbuilderHelper::checkArray($title))
|
||||
{
|
||||
$title[] = $alias;
|
||||
return $title;
|
||||
}
|
||||
// Make sure we have a title
|
||||
elseif ($title)
|
||||
{
|
||||
return array($title, $alias);
|
||||
}
|
||||
// We only had an alias
|
||||
return $alias;
|
||||
}
|
||||
}
|
||||
|
@ -1233,9 +1233,9 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -826,9 +826,9 @@ class ComponentbuilderModelLanguage extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -885,9 +885,9 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -885,7 +885,7 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
// Automatic handling of alias for empty fields
|
||||
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
|
||||
{
|
||||
if ($data['alias'] == null)
|
||||
if ($data['alias'] == null || empty($data['alias']))
|
||||
{
|
||||
if (JFactory::getConfig()->get('unicodeslugs') == 1)
|
||||
{
|
||||
@ -903,8 +903,7 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
$msg = JText::_('COM_COMPONENTBUILDER_LAYOUT_SAVE_WARNING');
|
||||
}
|
||||
|
||||
list($name, $alias) = $this->_generateNewTitle($data['alias'], $data['name']);
|
||||
$data['alias'] = $alias;
|
||||
$data['alias'] = $this->_generateNewTitle($data['alias']);
|
||||
|
||||
if (isset($msg))
|
||||
{
|
||||
@ -959,26 +958,49 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title/s & alias.
|
||||
*
|
||||
* @param string $alias The alias.
|
||||
* @param string $title The title.
|
||||
* @param string $alias The alias.
|
||||
* @param string/array $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
* @return array/string Contains the modified title/s and/or alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($alias, $title)
|
||||
protected function _generateNewTitle($alias, $title = null)
|
||||
{
|
||||
|
||||
// Alter the title & alias
|
||||
// Alter the title/s & alias
|
||||
$table = $this->getTable();
|
||||
|
||||
while ($table->load(array('alias' => $alias)))
|
||||
{
|
||||
$title = JString::increment($title);
|
||||
// Check if this is an array of titles
|
||||
if (ComponentbuilderHelper::checkArray($title))
|
||||
{
|
||||
foreach($title as $nr => &$_title)
|
||||
{
|
||||
$_title = JString::increment($_title);
|
||||
}
|
||||
}
|
||||
// Make sure we have a title
|
||||
elseif ($title)
|
||||
{
|
||||
$title = JString::increment($title);
|
||||
}
|
||||
$alias = JString::increment($alias, 'dash');
|
||||
}
|
||||
|
||||
return array($title, $alias);
|
||||
// Check if this is an array of titles
|
||||
if (ComponentbuilderHelper::checkArray($title))
|
||||
{
|
||||
$title[] = $alias;
|
||||
return $title;
|
||||
}
|
||||
// Make sure we have a title
|
||||
elseif ($title)
|
||||
{
|
||||
return array($title, $alias);
|
||||
}
|
||||
// We only had an alias
|
||||
return $alias;
|
||||
}
|
||||
}
|
||||
|
@ -1026,9 +1026,9 @@ class ComponentbuilderModelLibrary extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -849,9 +849,9 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -933,9 +933,9 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -1064,9 +1064,9 @@ class ComponentbuilderModelServer extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -1163,9 +1163,9 @@ class ComponentbuilderModelSite_view extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -856,9 +856,9 @@ class ComponentbuilderModelSnippet extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -826,9 +826,9 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
@ -885,7 +885,7 @@ class ComponentbuilderModelTemplate extends JModelAdmin
|
||||
// Automatic handling of alias for empty fields
|
||||
if (in_array($input->get('task'), array('apply', 'save', 'save2new')) && (int) $input->get('id') == 0)
|
||||
{
|
||||
if ($data['alias'] == null)
|
||||
if ($data['alias'] == null || empty($data['alias']))
|
||||
{
|
||||
if (JFactory::getConfig()->get('unicodeslugs') == 1)
|
||||
{
|
||||
@ -903,8 +903,7 @@ class ComponentbuilderModelTemplate extends JModelAdmin
|
||||
$msg = JText::_('COM_COMPONENTBUILDER_TEMPLATE_SAVE_WARNING');
|
||||
}
|
||||
|
||||
list($name, $alias) = $this->_generateNewTitle($data['alias'], $data['name']);
|
||||
$data['alias'] = $alias;
|
||||
$data['alias'] = $this->_generateNewTitle($data['alias']);
|
||||
|
||||
if (isset($msg))
|
||||
{
|
||||
@ -959,26 +958,49 @@ class ComponentbuilderModelTemplate extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title/s & alias.
|
||||
*
|
||||
* @param string $alias The alias.
|
||||
* @param string $title The title.
|
||||
* @param string $alias The alias.
|
||||
* @param string/array $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
* @return array/string Contains the modified title/s and/or alias.
|
||||
*
|
||||
*/
|
||||
protected function _generateNewTitle($alias, $title)
|
||||
protected function _generateNewTitle($alias, $title = null)
|
||||
{
|
||||
|
||||
// Alter the title & alias
|
||||
// Alter the title/s & alias
|
||||
$table = $this->getTable();
|
||||
|
||||
while ($table->load(array('alias' => $alias)))
|
||||
{
|
||||
$title = JString::increment($title);
|
||||
// Check if this is an array of titles
|
||||
if (ComponentbuilderHelper::checkArray($title))
|
||||
{
|
||||
foreach($title as $nr => &$_title)
|
||||
{
|
||||
$_title = JString::increment($_title);
|
||||
}
|
||||
}
|
||||
// Make sure we have a title
|
||||
elseif ($title)
|
||||
{
|
||||
$title = JString::increment($title);
|
||||
}
|
||||
$alias = JString::increment($alias, 'dash');
|
||||
}
|
||||
|
||||
return array($title, $alias);
|
||||
// Check if this is an array of titles
|
||||
if (ComponentbuilderHelper::checkArray($title))
|
||||
{
|
||||
$title[] = $alias;
|
||||
return $title;
|
||||
}
|
||||
// Make sure we have a title
|
||||
elseif ($title)
|
||||
{
|
||||
return array($title, $alias);
|
||||
}
|
||||
// We only had an alias
|
||||
return $alias;
|
||||
}
|
||||
}
|
||||
|
@ -864,9 +864,9 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the title & alias.
|
||||
* Method to change the title
|
||||
*
|
||||
* @param string $title The title.
|
||||
* @param string $title The title.
|
||||
*
|
||||
* @return array Contains the modified title and alias.
|
||||
*
|
||||
|
Reference in New Issue
Block a user