Fix the old ui for consistency.

This commit is contained in:
Gustavo Adolfo Cruz Laura
2016-03-30 17:27:51 -04:00
parent d4d437c837
commit 34cdc338d1
3 changed files with 30 additions and 7 deletions

View File

@@ -23,6 +23,22 @@ class ExportObjects
'Supervisors Objects'
);
/**
* @return array
*/
public function getObjectsList()
{
return $this->objectsList;
}
/**
* @param array $objectsList
*/
public function setObjectsList($objectsList)
{
$this->objectsList = $objectsList;
}
/**
* @param string $objectsEnable
* @return mixed|string

View File

@@ -20,6 +20,7 @@ class GranularImporter
{
$this->factory = new MigratorFactory();
$this->bpmn = new Adapter\BpmnWorkflow();
$this->exportObjects = new ExportObjects();
}
/**
@@ -31,10 +32,10 @@ class GranularImporter
public function loadObjectsListSelected($data, $aGranular)
{
$listObjectGranular = array();
$exportObjects = new ExportObjects();
$this->exportObjects = new ExportObjects();
//create structure
foreach ($aGranular as $key => $rowObject) {
array_push($listObjectGranular, array("name" => strtoupper($exportObjects->getObjectName
array_push($listObjectGranular, array("name" => strtoupper($this->exportObjects->getObjectName
($rowObject->id)), "data" => "", "value" => $rowObject->action));
}
//add data
@@ -181,10 +182,11 @@ class GranularImporter
public function validateImportData($objectList, $generateUid = false)
{
try {
if ($generateUid) {
if(count($objectList) !== 14){
if (count($objectList) !== count($this->exportObjects->getObjectsList())) {
$exception = new ImportException();
$exception->setNameException('To create a new process needs PROCESSDEFINITION');
$exception->setNameException(\G::LoadTranslation('ID_PROCESS_DEFINITION_NON_EXISTENT'));
throw($exception);
}
}

View File

@@ -362,11 +362,16 @@ Ext.onReady(function(){
text: _("ID_EXPORT"),
iconCls: "silk-add",
icon: "/images/export.png",
handler: function () {
exportProcess();
},
menu: [
{
text: _("ID_NORMAL_EXPORT"),
iconCls: "silk-add",
icon: "",
handler: function ()
{
exportProcess();
}
}, {
text: _("ID_GRANULAR_EXPORT"),
iconCls: "silk-add",
icon: "",