* Fix bug#38081
This commit is contained in:
@@ -10,16 +10,18 @@ $config->space->dtable = new stdclass();
|
||||
$config->space->dtable->fieldList['name']['title'] = $lang->instance->name;
|
||||
$config->space->dtable->fieldList['name']['type'] = 'title';
|
||||
|
||||
$config->space->dtable->fieldList['appName']['title'] = $lang->instance->appName;
|
||||
$config->space->dtable->fieldList['appName']['type'] = 'text';
|
||||
$config->space->dtable->fieldList['appName']['width'] = '90';
|
||||
$config->space->dtable->fieldList['appName']['title'] = $lang->instance->appName;
|
||||
$config->space->dtable->fieldList['appName']['type'] = 'text';
|
||||
$config->space->dtable->fieldList['appName']['width'] = '90';
|
||||
$config->space->dtable->fieldList['appName']['sortType'] = true;
|
||||
|
||||
$config->space->dtable->fieldList['status']['name'] = 'status';
|
||||
$config->space->dtable->fieldList['status']['title'] = $lang->space->status;
|
||||
$config->space->dtable->fieldList['status']['type'] = 'category';
|
||||
$config->space->dtable->fieldList['status']['map'] = $lang->instance->statusList;
|
||||
$config->space->dtable->fieldList['status']['group'] = 'status';
|
||||
$config->space->dtable->fieldList['status']['width'] = '80';
|
||||
$config->space->dtable->fieldList['status']['name'] = 'status';
|
||||
$config->space->dtable->fieldList['status']['title'] = $lang->space->status;
|
||||
$config->space->dtable->fieldList['status']['type'] = 'category';
|
||||
$config->space->dtable->fieldList['status']['map'] = $lang->instance->statusList;
|
||||
$config->space->dtable->fieldList['status']['group'] = 'status';
|
||||
$config->space->dtable->fieldList['status']['width'] = '80';
|
||||
$config->space->dtable->fieldList['status']['sortType'] = true;
|
||||
|
||||
$config->space->dtable->fieldList['appVersion']['title'] = $lang->store->appVersion;
|
||||
$config->space->dtable->fieldList['appVersion']['type'] = 'text';
|
||||
|
||||
@@ -90,12 +90,14 @@ class space extends control
|
||||
$this->view->title = $this->lang->space->common;
|
||||
$this->view->position[] = $this->lang->space->common;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->spaceType = $spaceType;
|
||||
$this->view->instances = (empty($allInstances) or empty($allInstances[$pageID - 1])) ? array() : $allInstances[$pageID - 1];
|
||||
$this->view->currentSpace = $space;
|
||||
$this->view->searchName = $search;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed,noletter');
|
||||
$this->view->sortLink = $this->createLink('space', 'browse', "spaceID=&browseType={$browseType}&orderBy={orderBy}&recTotal={$recTotal}&recPerPage={$recPerPage}");
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -89,3 +89,10 @@ window.editApp = function(externalID, appName)
|
||||
}
|
||||
$('#editLinkContainer').trigger('click');
|
||||
}
|
||||
|
||||
window.createSortLink = function(col)
|
||||
{
|
||||
var sort = col.name + '_asc';
|
||||
if(sort == orderBy) sort = col.name + '_desc';
|
||||
return sortLink.replace('{orderBy}', sort);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,9 @@ declare(strict_types=1);
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
jsVar('orderBy', $orderBy);
|
||||
jsVar('sortLink', $sortLink);
|
||||
|
||||
$statusMap = array();
|
||||
$canInstall = hasPriv('instance', 'install');
|
||||
|
||||
@@ -49,6 +52,7 @@ dtable
|
||||
set::cols($config->space->dtable->fieldList),
|
||||
set::data($instances),
|
||||
set::onRenderCell(jsRaw('window.renderInstanceList')),
|
||||
set::sortLink(jsRaw('createSortLink')),
|
||||
set::footPager(usePager()),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user