Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
  • Loading branch information
k-samuel committed May 14, 2017
2 parents cfcb71b + 8de12a6 commit 4a4908e
Show file tree
Hide file tree
Showing 75 changed files with 1,435 additions and 924 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ master - latest stable version (1.x)

develop - latest development version (1.x)


master_09 - latest stable version 0.9.x

dvelum_2.0 - development of version 2.x



-----

Dvelum 2.0 repository: https://github.com/dvelum/dvelum
3 changes: 3 additions & 0 deletions application/configs/dist/media_library.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
'image' =>
array (
'title' => 'Images',
// 15 mb
'max_file_size'=> 1024*1024*1024*15,
'rewrite'=>false,
'extensions' =>
array (
0 => '.gif',
Expand Down
22 changes: 22 additions & 0 deletions application/configs/dist/objects/medialib.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,19 @@
'db_default' => false,
'db_unsigned' => true,
),
'hash' =>
array (
'type' => '',
'unique' => '',
'db_isNull' => true,
'required' => false,
'validator' => '',
'db_type' => 'varchar',
'db_default' => '',
'db_len' => 255,
'is_search' => true,
'allow_html' => false,
),
),
'indexes' =>
array (
Expand All @@ -185,6 +198,15 @@
0 => 'title',
),
),
'hash' =>
array (
'fulltext' => false,
'unique' => false,
'columns' =>
array (
0 => 'hash',
),
),
),
'connection' => 'default',
'locked' => false,
Expand Down
4 changes: 2 additions & 2 deletions application/configs/dist/versions.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
return array(
'core'=>'1.0.1',
'core'=>'1.0.2',
'designer'=>'1.1',
'medialib'=>'0.5',
'medialib'=>'0.6',
'orm'=>'0.9.9'
);
1 change: 1 addition & 0 deletions application/locales/dist/_index.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,4 +577,5 @@
577 => 'FILTER_OBJECTS',
578 => 'USER_PERMISSIONS',
579 => 'PERMISSIONS',
580 => 'PAGECODE_MATCH'
);
1 change: 1 addition & 0 deletions application/locales/dist/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -578,4 +578,5 @@
'FILTER_OBJECTS' => 'Filter objects',
'USER_PERMISSIONS' => 'User permissions',
'PERMISSIONS' => 'Permissions',
'PAGECODE_MATCH' => 'This field should only contain letters, numbers and _ -'
);
1 change: 1 addition & 0 deletions application/locales/dist/en/objects.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
'modified' => 'Date modified',
'croped' => 'Is Croped',
'category' => 'Category',
'hash'=>'File hash'
),
),
'menu_item' =>
Expand Down
1 change: 1 addition & 0 deletions application/locales/dist/ru.php
Original file line number Diff line number Diff line change
Expand Up @@ -580,4 +580,5 @@
'FILTER_OBJECTS' => 'Выбрать объекты',
'USER_PERMISSIONS' => 'Права пользователей',
'PERMISSIONS' => 'Права доступа',
'PAGECODE_MATCH' => 'Это моле может содержать только цифры, латински буквы и символы _ -'
);
4 changes: 2 additions & 2 deletions application/locales/dist/ru/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
'IMPORT' => 'Импорт',
'IMPORT_COMPLETED' => 'Импорт успешно завершен',
'EXPECTED_COLUMNS' => 'Ожидаемые колонки',
'UNSUPPORTED_FORMAT' => 'Unsupported file type. Please upload .xls or .csv file',
'UNSUPPORTED_FORMAT' => 'Неподдерживаемый формат файла. Загрузите .xls, xlsx или .csv файл',
'FILL_CORRECTLY' => 'Необходимо верно заполнить форму',
'click_column' => 'Кликните по заголовку таблицы, чтобы указать колонку.',
'click_first_row' => 'Кликните 2 раза на строке чтобы указать начало данных.',
'click_first_row' => 'Кликните 2 раза на строке, чтобы указать начало данных.',
'expected_columns' => 'Ожидаемые колонки',
'required_fields' => 'Ввод информации со звездочкой обязателен *',
'import' => 'Импортировать',
Expand Down
1 change: 1 addition & 0 deletions application/locales/dist/ru/objects.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
'modified' => 'Дата модификации',
'croped' => 'Обрезан вручную',
'category' => 'Каталог',
'hash' => 'Хэш файла'
),
),
'menu_item' =>
Expand Down
4 changes: 2 additions & 2 deletions data/gpl-3.0_en.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DVelum 1.0.1 PROFESSIONAL WEB-DEVELOPMENT PLATFORM
Copyright (C) 2011-2016, Kirill A Egorov, Andrew Zamotaev, Sergey Leschenko
DVelum 1.0.2 PROFESSIONAL WEB-DEVELOPMENT PLATFORM
Copyright (C) 2011-2017, Kirill A Egorov, Andrew Zamotaev, Sergey Leschenko
http://dvelum.net/license.html

This version of DVelum is licensed under the terms of the Open Source GPL 3.0 license.
Expand Down
4 changes: 2 additions & 2 deletions data/gpl-3.0_ru.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DVelum 1.0.1 платформа профессиональной web-разработки
Copyright (C) 2011-2016 Кирилл Егоров, Андрей Замотаев, Сергей Лещенко
DVelum 1.0.2 платформа профессиональной web-разработки
Copyright (C) 2011-2017 Кирилл Егоров, Андрей Замотаев, Сергей Лещенко
<http://dvelum.net/license.html>

Данная версия DVelum лицензируется на условиях универсальной общественной лицензии GNU GPL 3.0.
Expand Down
38 changes: 31 additions & 7 deletions dvelum/app/Backend/Controller/Crud.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ abstract class Backend_Controller_Crud extends Backend_Controller
*/
protected $_listLinks = [];

protected $_linkedInfoSeparator = '; ';

public function __construct()
{
parent::__construct();
Expand Down Expand Up @@ -307,7 +309,7 @@ public function updateObject(Db_Object $object)
/**
* Get list of objects which can be linked
*/
public function linkedlistAction()
protected function getRelatedObjectsInfo()
{
$object = Request::post('object', 'string', false);
$filter = Request::post('filter' , 'array' , []);
Expand All @@ -319,7 +321,7 @@ public function linkedlistAction()
Response::jsonError($this->_lang->WRONG_REQUEST);

if(!in_array(strtolower($object), $this->_canViewObjects , true))
Response::jsonError($this->_lang->CANT_VIEW);
Response::jsonError($this->_lang->CANT_VIEW);

$objectCfg = Db_Object_Config::getInstance($object);
$primaryKey = $objectCfg->getPrimaryKey();
Expand Down Expand Up @@ -347,7 +349,7 @@ public function linkedlistAction()
$data = array();
if($count)
{
$data = $model->getList($pager, $filter, $fields , false , $query);
$data = $model->getList($pager, $filter, $fields , false , $query);

if(!empty($data))
{
Expand Down Expand Up @@ -379,12 +381,26 @@ public function linkedlistAction()
}unset($item);
}
}
Response::jsonSuccess($data,array('count'=>$count));
return ['data'=>$data,'count'=>$count];
}

/**
* Get list of objects which can be linked
*/
public function linkedListAction()
{
$result = $this->getRelatedObjectsInfo();

if(empty($result)){
Response::jsonSuccess([]);
}else{
Response::jsonArray($result);
}
}
/**
* Get object title
*/
public function otitleAction()
public function objectTitleAction()
{
$object = Request::post('object','string', false);
$id = Request::post('id', 'string', false);
Expand All @@ -410,9 +426,17 @@ public function otitleAction()
}catch (Exception $e){
Model::factory($object)->logError('Cannot get title for '.$object.':'.$id);
Response::jsonError($this->_lang->get('CANT_EXEC'));
}
};
}

/**
* Get object title
* @deprecated
*/
public function otitleAction()
{
$this->objectTitleAction();
}

/**
* Add related objects info into getList results
Expand Down Expand Up @@ -522,7 +546,7 @@ protected function addLinkedInfo(Db_Object_Config $cfg, array $fieldsToShow, arr
}
}
}
$row[$fieldsToKeys[$field]] = implode(', ', $list);
$row[$fieldsToKeys[$field]] = implode($this->_linkedInfoSeparator, $list);
}
}unset($row);
}
Expand Down
100 changes: 50 additions & 50 deletions dvelum/app/Backend/Designer/Sub/Code.php
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
<?php
class Backend_Designer_Sub_Code extends Backend_Designer_Sub
{
/**
* Get JS code for object
*/
public function objectcodeAction()
{
$object = Request::post('object' , 'string' , '');
$project = $this->_getProject();
/**
* Get JS code for object
*/
public function objectcodeAction()
{
$object = Request::post('object' , 'string' , '');
$project = $this->_getProject();

if(! $project->objectExists($object))
Response::jsonError($this->_lang->WRONG_REQUEST);
if(! $project->objectExists($object))
Response::jsonError($this->_lang->WRONG_REQUEST);

$projectCfg = $project->getConfig();
Ext_Code::setRunNamespace($projectCfg['runnamespace']);
Ext_Code::setNamespace($projectCfg['namespace']);
$projectCfg = $project->getConfig();
Ext_Code::setRunNamespace($projectCfg['runnamespace']);
Ext_Code::setNamespace($projectCfg['namespace']);

$templates = $this->_config->get('templates');
$replaces = array(
array(
'tpl' => $templates['wwwroot'] ,
'value' => $this->_configMain->get('wwwroot')
) ,
array(
'tpl' => $templates['adminpath'] ,
'value' => $this->_configMain->get('adminPath')
) ,
array(
'tpl' => $templates['urldelimiter'] ,
'value' => $this->_configMain->get('urlDelimiter')
)
);
$templates = $this->_config->get('templates');
$replaces = array(
array(
'tpl' => $templates['wwwroot'] ,
'value' => $this->_configMain->get('wwwroot')
) ,
array(
'tpl' => $templates['adminpath'] ,
'value' => $this->_configMain->get('adminPath')
) ,
array(
'tpl' => $templates['urldelimiter'] ,
'value' => $this->_configMain->get('urlDelimiter')
)
);

$code = $project->getObjectCode($object , $replaces);
Response::jsonSuccess($code);
}
$code = $project->getObjectCode($object , $replaces);
Response::jsonSuccess($code);
}

/**
* Get JS code for project
*/
public function projectcodeAction()
{
$project = $this->_getProject();
$projectCfg = $project->getConfig();
$templates = $this->_config->get('templates');
$replaces = array(
/**
* Get JS code for project
*/
public function projectcodeAction()
{
$project = $this->_getProject();
$projectCfg = $project->getConfig();
$templates = $this->_config->get('templates');
$replaces = array(
array(
'tpl' => $templates['wwwroot'] ,
'value' => $this->_configMain->get('wwwroot')
'tpl' => $templates['wwwroot'] ,
'value' => $this->_configMain->get('wwwroot')
) ,
array(
'tpl' => $templates['adminpath'] ,
'value' => $this->_configMain->get('adminPath')
'tpl' => $templates['adminpath'] ,
'value' => $this->_configMain->get('adminPath')
) ,
array(
'tpl' => $templates['urldelimiter'] ,
'value' => $this->_configMain->get('urlDelimiter')
'tpl' => $templates['urldelimiter'] ,
'value' => $this->_configMain->get('urlDelimiter')
)
);
Ext_Code::setRunNamespace($projectCfg['runnamespace']);
Ext_Code::setNamespace($projectCfg['namespace']);
Response::jsonSuccess($project->getCode($replaces));
}
);
Ext_Code::setRunNamespace($projectCfg['runnamespace']);
Ext_Code::setNamespace($projectCfg['namespace']);
Response::jsonSuccess($project->getCode($replaces));
}
}
Loading

0 comments on commit 4a4908e

Please sign in to comment.