Update the field area to be more user friendly, phase A of gh-258
This commit is contained in:
@ -65,6 +65,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
$this->registerTask('getValidationRulesTable', 'ajax');
|
||||
$this->registerTask('checkRuleName', 'ajax');
|
||||
$this->registerTask('fieldOptions', 'ajax');
|
||||
$this->registerTask('getFieldPropertyDesc', 'ajax');
|
||||
$this->registerTask('snippetDetails', 'ajax');
|
||||
$this->registerTask('setSnippetGithub', 'ajax');
|
||||
$this->registerTask('getSnippets', 'ajax');
|
||||
@ -967,6 +968,45 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'getFieldPropertyDesc':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$fieldtypeValue = $jinput->get('fieldtype', NULL, 'INT');
|
||||
$propertyValue = $jinput->get('property', NULL, 'WORD');
|
||||
if($fieldtypeValue && $propertyValue && $user->id != 0)
|
||||
{
|
||||
$result = $this->getModel('ajax')->getFieldPropertyDesc($fieldtypeValue, $propertyValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'snippetDetails':
|
||||
try
|
||||
{
|
||||
|
Reference in New Issue
Block a user