1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-06 14:16:46 +02:00

Version 1.0.4 optimized author panel and refactoring

This commit is contained in:
Sebastian
2018-04-30 16:05:04 +02:00
parent ef704daa6e
commit 7bf12c6fa0
59 changed files with 900 additions and 653 deletions

View File

@@ -192,6 +192,11 @@ class Field
$this->attributes[$key] = $value;
}
public function unsetAttribute($key)
{
unset($this->attributes[$key]);
}
/* get a single attribute, if it is defined. For usage in templates like getAttribute('required') */
public function getAttribute($key)
{
@@ -238,7 +243,7 @@ class Field
$this->attributeValues[$key] = $value;
}
private function getAttributeValue($key)
public function getAttributeValue($key)
{
if(isset($this->attributeValues[$key]))
{

View File

@@ -119,7 +119,7 @@ class Folder
}
}
return $result;
}
}
public static function getPagingForItem($content, $item)
{

View File

@@ -173,7 +173,7 @@ class Validation
return $this->validationResult($v, $name);
}
public function pluginField($fieldName, $fieldValue, $pluginName, $fieldDefinitions)
public function objectField($fieldName, $fieldValue, $pluginName, $fieldDefinitions)
{
$v = new Validator(array($fieldName => $fieldValue));
@@ -186,6 +186,11 @@ class Validation
switch($fieldDefinitions['type'])
{
case "select":
/* create array with option keys as value */
$options = array();
foreach($fieldDefinitions['options'] as $key => $value){ $options[] = $key; }
$v->rule('in', $fieldName, $options);
break;
case "radio":
case "checkboxlist":
$v->rule('in', $fieldName, $fieldDefinitions['options']);

View File

@@ -20,6 +20,6 @@ class VersionCheck
return false;
}
$version = json_decode($version);
return $version->version;
return $version->system->typemill;
}
}