Merged in marcoAntonioNina/processmaker/PM-520 (pull request #871)
PM-520 Cambios en el Enterprise Plugins Manager
This commit is contained in:
@@ -225,6 +225,8 @@ class Bootstrap
|
|||||||
self::registerClass("cronFile", PATH_CLASSES . "class.plugin.php");
|
self::registerClass("cronFile", PATH_CLASSES . "class.plugin.php");
|
||||||
self::registerClass("pluginDetail", PATH_CLASSES . "class.pluginRegistry.php");
|
self::registerClass("pluginDetail", PATH_CLASSES . "class.pluginRegistry.php");
|
||||||
self::registerClass("PMPluginRegistry", PATH_CLASSES . "class.pluginRegistry.php");
|
self::registerClass("PMPluginRegistry", PATH_CLASSES . "class.pluginRegistry.php");
|
||||||
|
self::registerClass("featuresDetail", PATH_CLASSES . "class.licensedFeatures.php");
|
||||||
|
self::registerClass("PMLicensedFeatures", PATH_CLASSES . "class.licensedFeatures.php");
|
||||||
self::registerClass("PMDashlet", PATH_CLASSES . "class.pmDashlet.php");
|
self::registerClass("PMDashlet", PATH_CLASSES . "class.pmDashlet.php");
|
||||||
self::registerClass("pmGauge", PATH_CLASSES . "class.pmGauge.php");
|
self::registerClass("pmGauge", PATH_CLASSES . "class.pmGauge.php");
|
||||||
self::registerClass("pmPhing", PATH_CLASSES . "class.pmPhing.php");
|
self::registerClass("pmPhing", PATH_CLASSES . "class.pmPhing.php");
|
||||||
|
|||||||
89
workflow/engine/classes/class.licensedFeatures.php
Normal file
89
workflow/engine/classes/class.licensedFeatures.php
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class featuresDetail
|
||||||
|
{
|
||||||
|
public $featureName;
|
||||||
|
public $description = null;
|
||||||
|
public $enabled = false;
|
||||||
|
public $workspaces = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is the constructor of the featuresDetail class
|
||||||
|
*
|
||||||
|
* @param string $featureName
|
||||||
|
* @param string $name
|
||||||
|
* @param string $description
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct ($featureName, $description = '')
|
||||||
|
{
|
||||||
|
$this->featureName = $featureName;
|
||||||
|
$this->description = $description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class PMLicensedFeatures
|
||||||
|
{
|
||||||
|
private $featuresDetails = array ();
|
||||||
|
private $features = array ();
|
||||||
|
|
||||||
|
private static $instancefeature = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is the constructor of the PMLicensedFeatures class
|
||||||
|
* param
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct ()
|
||||||
|
{
|
||||||
|
$criteria = new Criteria();
|
||||||
|
$criteria->addAscendingOrderByColumn(AddonsManagerPeer::ADDON_ID);
|
||||||
|
$criteria->add(AddonsManagerPeer::ADDON_TYPE, 'feature', Criteria::EQUAL);
|
||||||
|
$addons = AddonsManagerPeer::doSelect($criteria);
|
||||||
|
foreach ($addons as $addon) {
|
||||||
|
$this->features[] = $addon->getAddonId();
|
||||||
|
$detail = new featuresDetail($addon->getAddonNick(), $addon->getAddonDescription());
|
||||||
|
$this->featuresDetails[$addon->getAddonId()] = $detail;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is instancing to this class
|
||||||
|
* param
|
||||||
|
*
|
||||||
|
* @return object
|
||||||
|
*/
|
||||||
|
public static function getSingleton ()
|
||||||
|
{
|
||||||
|
if (self::$instancefeature == null) {
|
||||||
|
self::$instancefeature = new PMLicensedFeatures();
|
||||||
|
}
|
||||||
|
return self::$instancefeature;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function verifyfeature ($featureName)
|
||||||
|
{
|
||||||
|
$licenseManager = &pmLicenseManager::getSingleton();
|
||||||
|
$_SESSION['__sw__'] = true;
|
||||||
|
$padl = new padl();
|
||||||
|
|
||||||
|
$enable = in_array($padl->_decrypt($featureName), $licenseManager->features);
|
||||||
|
|
||||||
|
$this->featuresDetails[$padl->_decrypt($featureName)]->enabled = $enable;
|
||||||
|
return $enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function loadSingleton($file)
|
||||||
|
{
|
||||||
|
self::$instancefeature = unserialize(file_get_contents($file));
|
||||||
|
|
||||||
|
if (! is_object(self::$instancefeature) || get_class(self::$instancefeature) != "PMLicensedFeatures") {
|
||||||
|
throw new Exception("Can't load main PMLicensedFeatures object.");
|
||||||
|
}
|
||||||
|
|
||||||
|
return self::$instancefeature;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -53,6 +53,9 @@ class pmLicenseManager
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->result = $results['RESULT'];
|
$this->result = $results['RESULT'];
|
||||||
|
$this->features = array();
|
||||||
|
$this->licensedfeatures = array();
|
||||||
|
$this->licensedfeaturesList = array();
|
||||||
if (in_array($this->result, $validStatus)) {
|
if (in_array($this->result, $validStatus)) {
|
||||||
$this->serial="3ptta7Xko2prrptrZnSd356aqmPXvMrayNPFj6CLdaR1pWtrW6qPw9jV0OHjxrDGu8LVxtmSm9nP5kR23HRpdZWccpeui+bKkK<6B>DoqCt2Kqgpq6Vg37s";
|
$this->serial="3ptta7Xko2prrptrZnSd356aqmPXvMrayNPFj6CLdaR1pWtrW6qPw9jV0OHjxrDGu8LVxtmSm9nP5kR23HRpdZWccpeui+bKkK<6B>DoqCt2Kqgpq6Vg37s";
|
||||||
$info['FIRST_NAME'] = $results['DATA']['FIRST_NAME'];
|
$info['FIRST_NAME'] = $results['DATA']['FIRST_NAME'];
|
||||||
@@ -65,6 +68,8 @@ class pmLicenseManager
|
|||||||
$this->id = $results ['ID'];
|
$this->id = $results ['ID'];
|
||||||
$this->expireIn = $this->getExpireIn ();
|
$this->expireIn = $this->getExpireIn ();
|
||||||
$this->features = $this->result!='TMINUS'?isset($results ['DATA']['CUSTOMER_PLUGIN'])? $results ['DATA']['CUSTOMER_PLUGIN'] : $this->getActiveFeatures() : array();
|
$this->features = $this->result!='TMINUS'?isset($results ['DATA']['CUSTOMER_PLUGIN'])? $results ['DATA']['CUSTOMER_PLUGIN'] : $this->getActiveFeatures() : array();
|
||||||
|
$this->licensedfeatures = $this->result!='TMINUS'?isset($results ['DATA']['CUSTOMER_LICENSED_FEATURES'])? $results ['DATA']['CUSTOMER_LICENSED_FEATURES'] : array() : array();
|
||||||
|
$this->licensedfeaturesList = isset($results ['DATA']['LICENSED_FEATURES_LIST'])? $results ['DATA']['LICENSED_FEATURES_LIST'] : null;
|
||||||
$this->status = $this->getCurrentLicenseStatus ();
|
$this->status = $this->getCurrentLicenseStatus ();
|
||||||
|
|
||||||
if (isset ( $results ['LIC'] )) {
|
if (isset ( $results ['LIC'] )) {
|
||||||
@@ -352,7 +357,9 @@ class pmLicenseManager
|
|||||||
public function installLicense($path, $redirect = true)
|
public function installLicense($path, $redirect = true)
|
||||||
{
|
{
|
||||||
$application = new license_application ( $path, false, true, false, true, true );
|
$application = new license_application ( $path, false, true, false, true, true );
|
||||||
|
|
||||||
$results = $application->validate ( false, false, "", "", "80", true );
|
$results = $application->validate ( false, false, "", "", "80", true );
|
||||||
|
|
||||||
//if the result is ok then it is saved into DB
|
//if the result is ok then it is saved into DB
|
||||||
$res = $results ['RESULT'];
|
$res = $results ['RESULT'];
|
||||||
if (( $res != 'OK') && ($res != 'EXPIRED' ) && ($res != 'TMINUS') ) {
|
if (( $res != 'OK') && ($res != 'EXPIRED' ) && ($res != 'TMINUS') ) {
|
||||||
@@ -496,6 +503,9 @@ class pmLicenseManager
|
|||||||
|
|
||||||
public function getActiveFeatures()
|
public function getActiveFeatures()
|
||||||
{
|
{
|
||||||
|
if (file_exists ( PATH_PLUGINS . 'enterprise/data/default' )) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
return unserialize(G::decrypt($this->serial, file_get_contents(PATH_PLUGINS . 'enterprise/data/default')));
|
return unserialize(G::decrypt($this->serial, file_get_contents(PATH_PLUGINS . 'enterprise/data/default')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1506,6 +1506,13 @@ class workspaceTools
|
|||||||
$versionOld = ( isset($version[0])) ? $version[0] : '';
|
$versionOld = ( isset($version[0])) ? $version[0] : '';
|
||||||
CLI::logging(CLI::info("$versionOld < $versionPresent") . "\n");
|
CLI::logging(CLI::info("$versionOld < $versionPresent") . "\n");
|
||||||
|
|
||||||
|
$start = microtime(true);
|
||||||
|
CLI::logging("> Verify enterprise old...\n");
|
||||||
|
$this->verifyEnterprise($workSpace);
|
||||||
|
$stop = microtime(true);
|
||||||
|
$final = $stop - $start;
|
||||||
|
CLI::logging("<*> Verify took $final seconds.\n");
|
||||||
|
|
||||||
if ( $versionOld < $versionPresent || strpos($versionPresent, "Branch")) {
|
if ( $versionOld < $versionPresent || strpos($versionPresent, "Branch")) {
|
||||||
$start = microtime(true);
|
$start = microtime(true);
|
||||||
CLI::logging("> Updating database...\n");
|
CLI::logging("> Updating database...\n");
|
||||||
|
|||||||
@@ -64,7 +64,115 @@ class AddonsStore extends BaseAddonsStore
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function addonList()
|
public static function addonList($type = 'plugin')
|
||||||
|
{
|
||||||
|
$result = array();
|
||||||
|
|
||||||
|
AddonsStore::checkLicenseStore();
|
||||||
|
|
||||||
|
$licenseManager = &pmLicenseManager::getSingleton(); //Getting the licenseManager
|
||||||
|
|
||||||
|
$result["store_errors"] = array();
|
||||||
|
list($stores, $errors) = AddonsStore::updateAll(false, $type);
|
||||||
|
|
||||||
|
foreach ($errors as $store_id => $store_error) {
|
||||||
|
$result["store_errors"][] = array("id" => $store_id, "msg" => $store_error);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result["addons"] = array();
|
||||||
|
$result["errors"] = array();
|
||||||
|
|
||||||
|
$criteria = new Criteria();
|
||||||
|
$criteria->addAscendingOrderByColumn(AddonsManagerPeer::ADDON_TYPE);
|
||||||
|
$criteria->addAscendingOrderByColumn(AddonsManagerPeer::ADDON_ID);
|
||||||
|
$criteria->add(AddonsManagerPeer::ADDON_TYPE, $type, Criteria::EQUAL);
|
||||||
|
$addons = AddonsManagerPeer::doSelect($criteria);
|
||||||
|
|
||||||
|
foreach ($addons as $addon) {
|
||||||
|
|
||||||
|
$status = $addon->getAddonStatus();
|
||||||
|
$version = $addon->getAddonVersion();
|
||||||
|
$enabled = null;
|
||||||
|
|
||||||
|
if (!$addon->checkState()) {
|
||||||
|
$result["errors"][] = array("addonId" => $addon->getAddonId(), "storeId" => $addon->getStoreId());
|
||||||
|
}
|
||||||
|
|
||||||
|
$sw = 1;
|
||||||
|
$addonInLicense = in_array($addon->getAddonId(), $licenseManager->features);
|
||||||
|
|
||||||
|
if ($sw == 1 && $addon->getAddonId() != "enterprise" && !$addonInLicense) {
|
||||||
|
$sw = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($type == 'plugin') {
|
||||||
|
if ($sw == 1 && $addon->isInstalled()) {
|
||||||
|
if ($addon->isEnabled()) {
|
||||||
|
$status = "installed";
|
||||||
|
} else {
|
||||||
|
$status = "disabled";
|
||||||
|
}
|
||||||
|
|
||||||
|
$version = $addon->getInstalledVersion();
|
||||||
|
|
||||||
|
if (version_compare($version . "", $addon->getAddonVersion() . "", "<")) {
|
||||||
|
$status = "upgrade";
|
||||||
|
}
|
||||||
|
|
||||||
|
$enabled = $addon->isEnabled();
|
||||||
|
$sw = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$status = "available";
|
||||||
|
$enabled = false;
|
||||||
|
if (!$addonInLicense && in_array($addon->getAddonName(), $licenseManager->licensedfeatures) == 1) {
|
||||||
|
$status = "installed";
|
||||||
|
$enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($sw == 1 && $addonInLicense) {
|
||||||
|
$status = "ready";
|
||||||
|
$sw = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$state = $addon->getAddonState();
|
||||||
|
$log = null;
|
||||||
|
|
||||||
|
if ($state != null) {
|
||||||
|
$status = $state;
|
||||||
|
$log = $addon->getInstallLog();
|
||||||
|
}
|
||||||
|
if ($addon->getAddonId() == "enterprise" && $status== 'ready') {
|
||||||
|
$status = 'installed';
|
||||||
|
}
|
||||||
|
if ($status == 'minus-circle' ) {
|
||||||
|
$status = "available";
|
||||||
|
}
|
||||||
|
|
||||||
|
$result["addons"][$addon->getAddonId()] = array(
|
||||||
|
"id" => $addon->getAddonId(),
|
||||||
|
"store" => $addon->getStoreId(),
|
||||||
|
"name" => $addon->getAddonName(),
|
||||||
|
"nick" => $addon->getAddonNick(),
|
||||||
|
"version" => $version,
|
||||||
|
"enabled" => $enabled,
|
||||||
|
"latest_version" => $addon->getAddonVersion(),
|
||||||
|
"type" => $addon->getAddonType(),
|
||||||
|
"release_type" => $addon->getAddonReleaseType(),
|
||||||
|
"url" => $addon->getAddonDownloadUrl(),
|
||||||
|
"publisher" => $addon->getAddonPublisher(),
|
||||||
|
"description" => $addon->getAddonDescription(),
|
||||||
|
"status" => $status,
|
||||||
|
"log" => $log,
|
||||||
|
"progress" => round($addon->getAddonDownloadProgress())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function addonFeatureList()
|
||||||
{
|
{
|
||||||
$result = array();
|
$result = array();
|
||||||
|
|
||||||
@@ -135,6 +243,9 @@ class AddonsStore extends BaseAddonsStore
|
|||||||
if ($addon->getAddonId() == "enterprise" && $status== 'ready') {
|
if ($addon->getAddonId() == "enterprise" && $status== 'ready') {
|
||||||
$status = 'installed';
|
$status = 'installed';
|
||||||
}
|
}
|
||||||
|
if ($status == 'minus-circle' ) {
|
||||||
|
$status = "available";
|
||||||
|
}
|
||||||
|
|
||||||
$result["addons"][$addon->getAddonId()] = array(
|
$result["addons"][$addon->getAddonId()] = array(
|
||||||
"id" => $addon->getAddonId(),
|
"id" => $addon->getAddonId(),
|
||||||
@@ -175,14 +286,14 @@ class AddonsStore extends BaseAddonsStore
|
|||||||
*
|
*
|
||||||
* @return array containing a 'stores' array and a 'errors' array
|
* @return array containing a 'stores' array and a 'errors' array
|
||||||
*/
|
*/
|
||||||
public static function updateAll($force = false)
|
public static function updateAll($force = false, $type = 'plugin')
|
||||||
{
|
{
|
||||||
$stores = array();
|
$stores = array();
|
||||||
$errors = array();
|
$errors = array();
|
||||||
|
|
||||||
foreach (self::listStores() as $store) {
|
foreach (self::listStores() as $store) {
|
||||||
try {
|
try {
|
||||||
$stores[$store->getStoreId()] = $store->update($force);
|
$stores[$store->getStoreId()] = $store->update($force, $type);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$errors[$store->getStoreId()] = $e->getMessage();
|
$errors[$store->getStoreId()] = $e->getMessage();
|
||||||
}
|
}
|
||||||
@@ -196,11 +307,12 @@ class AddonsStore extends BaseAddonsStore
|
|||||||
*
|
*
|
||||||
* @return int number of addons removed
|
* @return int number of addons removed
|
||||||
*/
|
*/
|
||||||
public function clear()
|
public function clear($type = 'plugin')
|
||||||
{
|
{
|
||||||
/* Remove old items from this store */
|
/* Remove old items from this store */
|
||||||
$criteria = new Criteria(AddonsManagerPeer::DATABASE_NAME);
|
$criteria = new Criteria(AddonsManagerPeer::DATABASE_NAME);
|
||||||
$criteria->add(AddonsManagerPeer::STORE_ID, $this->getStoreId(), Criteria::EQUAL);
|
$criteria->add(AddonsManagerPeer::STORE_ID, $this->getStoreId(), Criteria::EQUAL);
|
||||||
|
$criteria->add(AddonsManagerPeer::ADDON_TYPE, $type, Criteria::EQUAL);
|
||||||
|
|
||||||
return AddonsManagerPeer::doDelete($criteria);
|
return AddonsManagerPeer::doDelete($criteria);
|
||||||
}
|
}
|
||||||
@@ -210,7 +322,7 @@ class AddonsStore extends BaseAddonsStore
|
|||||||
*
|
*
|
||||||
* @return bool true if updated, false otherwise
|
* @return bool true if updated, false otherwise
|
||||||
*/
|
*/
|
||||||
public function update($force = false)
|
public function update($force = false, $type = 'plugin')
|
||||||
{
|
{
|
||||||
require_once PATH_CORE . 'classes' . PATH_SEP . 'class.pmLicenseManager.php';
|
require_once PATH_CORE . 'classes' . PATH_SEP . 'class.pmLicenseManager.php';
|
||||||
|
|
||||||
@@ -221,12 +333,13 @@ class AddonsStore extends BaseAddonsStore
|
|||||||
//If we have any addon that is installing or updating, don't update store
|
//If we have any addon that is installing or updating, don't update store
|
||||||
$criteria = new Criteria(AddonsManagerPeer::DATABASE_NAME);
|
$criteria = new Criteria(AddonsManagerPeer::DATABASE_NAME);
|
||||||
$criteria->add(AddonsManagerPeer::ADDON_STATE, '', Criteria::NOT_EQUAL);
|
$criteria->add(AddonsManagerPeer::ADDON_STATE, '', Criteria::NOT_EQUAL);
|
||||||
|
$criteria->add(AddonsManagerPeer::ADDON_TYPE, $type);
|
||||||
|
|
||||||
if (AddonsManagerPeer::doCount($criteria) > 0) {
|
if (AddonsManagerPeer::doCount($criteria) > 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->clear();
|
$this->clear($type);
|
||||||
|
|
||||||
//Fill with local information
|
//Fill with local information
|
||||||
|
|
||||||
@@ -241,6 +354,7 @@ class AddonsStore extends BaseAddonsStore
|
|||||||
$pmLicenseManagerO = &pmLicenseManager::getSingleton();
|
$pmLicenseManagerO = &pmLicenseManager::getSingleton();
|
||||||
$localPlugins = array();
|
$localPlugins = array();
|
||||||
|
|
||||||
|
if ($type == 'plugin') {
|
||||||
foreach ($aPluginsPP as $aPlugin) {
|
foreach ($aPluginsPP as $aPlugin) {
|
||||||
$sClassName = substr($aPlugin['sFilename'], 0, strpos($aPlugin['sFilename'], '-'));
|
$sClassName = substr($aPlugin['sFilename'], 0, strpos($aPlugin['sFilename'], '-'));
|
||||||
|
|
||||||
@@ -310,6 +424,29 @@ class AddonsStore extends BaseAddonsStore
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$list = unserialize($pmLicenseManagerO->licensedfeaturesList);
|
||||||
|
foreach ($list['addons'] as $key => $feature) {
|
||||||
|
$addon = new AddonsManager();
|
||||||
|
$addon->setAddonId($feature['name']);
|
||||||
|
$addon->setStoreId($feature['guid']);
|
||||||
|
$addon->setAddonName($feature['name']);
|
||||||
|
$addon->setAddonDescription($feature['description']);
|
||||||
|
$addon->setAddonNick($feature['nick']);
|
||||||
|
$addon->setAddonVersion("");
|
||||||
|
$addon->setAddonStatus($feature['status']);
|
||||||
|
$addon->setAddonType("features");
|
||||||
|
$addon->setAddonPublisher("Colosa");
|
||||||
|
$addon->setAddonDownloadUrl("");
|
||||||
|
$addon->setAddonDownloadMd5("");
|
||||||
|
$addon->setAddonReleaseDate(null);
|
||||||
|
$addon->setAddonReleaseType('localRegistry');
|
||||||
|
$addon->setAddonReleaseNotes("");
|
||||||
|
$addon->setAddonState("");
|
||||||
|
|
||||||
|
$addon->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->setStoreLastUpdated(time());
|
$this->setStoreLastUpdated(time());
|
||||||
$this->save();
|
$this->save();
|
||||||
@@ -359,6 +496,7 @@ class AddonsStore extends BaseAddonsStore
|
|||||||
$context = stream_context_create($option);
|
$context = stream_context_create($option);
|
||||||
|
|
||||||
//This may block for a while, always use AJAX to call this method
|
//This may block for a while, always use AJAX to call this method
|
||||||
|
$url = $url . '&type=' . strtoupper($type);
|
||||||
$data = file_get_contents($url, false, $context);
|
$data = file_get_contents($url, false, $context);
|
||||||
|
|
||||||
if ($data === false) {
|
if ($data === false) {
|
||||||
@@ -388,7 +526,7 @@ class AddonsStore extends BaseAddonsStore
|
|||||||
throw (new Exception("Addons not found on store data"));
|
throw (new Exception("Addons not found on store data"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->clear();
|
$this->clear($type);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//Add each item to this stores addons
|
//Add each item to this stores addons
|
||||||
@@ -451,7 +589,7 @@ class AddonsStore extends BaseAddonsStore
|
|||||||
$this->save();
|
$this->save();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
//If we had issues, don't keep only a part of the items
|
//If we had issues, don't keep only a part of the items
|
||||||
$this->clear();
|
$this->clear($type);
|
||||||
|
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,11 +44,12 @@ class Main extends Controller
|
|||||||
|
|
||||||
// license notification
|
// license notification
|
||||||
$expireInLabel = '';
|
$expireInLabel = '';
|
||||||
if (class_exists( 'pmLicenseManager' )) {
|
|
||||||
|
require_once ("classes" . PATH_SEP . "class.pmLicenseManager.php");
|
||||||
$pmLicenseManager = &pmLicenseManager::getSingleton();
|
$pmLicenseManager = &pmLicenseManager::getSingleton();
|
||||||
$expireIn = $pmLicenseManager->getExpireIn();
|
$expireIn = $pmLicenseManager->getExpireIn();
|
||||||
$expireInLabel = $pmLicenseManager->getExpireInLabel();
|
$expireInLabel = $pmLicenseManager->getExpireInLabel();
|
||||||
}
|
|
||||||
$this->setVar( 'licenseNotification', $expireInLabel );
|
$this->setVar( 'licenseNotification', $expireInLabel );
|
||||||
|
|
||||||
// setting variables on javascript env.
|
// setting variables on javascript env.
|
||||||
|
|||||||
@@ -347,7 +347,9 @@ try {
|
|||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
case "addonslist":
|
case "addonslist":
|
||||||
$result = AddonsStore::addonList();
|
$type = (isset($_REQUEST['type'])) ? $_REQUEST['type']: 'plugin';
|
||||||
|
$result = AddonsStore::addonList($type);
|
||||||
|
break;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw (new Exception("Action \"$action\" is not valid"));
|
throw (new Exception("Action \"$action\" is not valid"));
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ class enterprisePlugin extends PMPlugin
|
|||||||
$VERSION = System::getVersion();
|
$VERSION = System::getVersion();
|
||||||
|
|
||||||
$res = parent::PMPlugin($sNamespace, $sFilename);
|
$res = parent::PMPlugin($sNamespace, $sFilename);
|
||||||
$this->sFriendlyName = "ProcessMaker Enterprise Edition";
|
$this->sFriendlyName = "ProcessMaker Enterprise Core Edition";
|
||||||
$this->sDescription = "ProcessMaker Enterprise Edition $VERSION";
|
$this->sDescription = "ProcessMaker Enterprise Core Edition $VERSION";
|
||||||
$this->sPluginFolder = "enterprise";
|
$this->sPluginFolder = "enterprise";
|
||||||
$this->sSetupPage = "../enterprise/addonsStore.php";
|
$this->sSetupPage = "../enterprise/addonsStore.php";
|
||||||
$this->iVersion = $VERSION;
|
$this->iVersion = $VERSION;
|
||||||
|
|||||||
@@ -755,15 +755,15 @@ class SkinEngine
|
|||||||
$name = $conf->userNameFormat(isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME']: '', isset($_SESSION['USR_FULLNAME']) ? htmlentities($_SESSION['USR_FULLNAME'] , ENT_QUOTES, 'UTF-8'): '', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
|
$name = $conf->userNameFormat(isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME']: '', isset($_SESSION['USR_FULLNAME']) ? htmlentities($_SESSION['USR_FULLNAME'] , ENT_QUOTES, 'UTF-8'): '', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
|
||||||
$smarty->assign('user',$name);
|
$smarty->assign('user',$name);
|
||||||
}
|
}
|
||||||
if(class_exists('pmLicenseManager')){
|
|
||||||
|
if (defined('SYS_SYS')) {
|
||||||
|
require_once ("classes" . PATH_SEP . "class.pmLicenseManager.php");
|
||||||
$pmLicenseManagerO = &pmLicenseManager::getSingleton();
|
$pmLicenseManagerO = &pmLicenseManager::getSingleton();
|
||||||
$expireIn = $pmLicenseManagerO->getExpireIn();
|
$expireIn = $pmLicenseManagerO->getExpireIn();
|
||||||
$expireInLabel = $pmLicenseManagerO->getExpireInLabel();
|
$expireInLabel = $pmLicenseManagerO->getExpireInLabel();
|
||||||
//if($expireIn<=30){
|
|
||||||
if($expireInLabel != ""){
|
if($expireInLabel != ""){
|
||||||
$smarty->assign('msgVer', '<label class="textBlack">'.$expireInLabel.'</label> ');
|
$smarty->assign('msgVer', '<label class="textBlack">'.$expireInLabel.'</label> ');
|
||||||
}
|
}
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined('SYS_SYS')) {
|
if (defined('SYS_SYS')) {
|
||||||
|
|||||||
@@ -499,6 +499,11 @@ Ext.onReady(function() {
|
|||||||
"force": true
|
"force": true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
addonsFeaturesStore.load({
|
||||||
|
params: {
|
||||||
|
"force": true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Ext.getCmp("refresh-btn").setDisabled(!Ext.getCmp("chkEeInternetConnection").checked);
|
Ext.getCmp("refresh-btn").setDisabled(!Ext.getCmp("chkEeInternetConnection").checked);
|
||||||
|
|
||||||
@@ -518,7 +523,8 @@ Ext.onReady(function() {
|
|||||||
url: "addonsStoreAction",
|
url: "addonsStoreAction",
|
||||||
method: "POST"
|
method: "POST"
|
||||||
}),
|
}),
|
||||||
baseParams: {"action": "addonsList"
|
baseParams: {
|
||||||
|
"action": "addonsList"
|
||||||
},
|
},
|
||||||
|
|
||||||
//url: "addonsStoreAction?action=addonsList",
|
//url: "addonsStoreAction?action=addonsList",
|
||||||
@@ -608,6 +614,79 @@ Ext.onReady(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var addonsFeaturesStore = new Ext.data.JsonStore({
|
||||||
|
proxy: new Ext.data.HttpProxy({
|
||||||
|
url: "addonsStoreAction",
|
||||||
|
method: "POST"
|
||||||
|
}),
|
||||||
|
baseParams: {
|
||||||
|
"action": "addonsList",
|
||||||
|
"type" : "features"
|
||||||
|
},
|
||||||
|
autoDestroy: true,
|
||||||
|
messageProperty: 'error',
|
||||||
|
storeId: 'addonsFeaturesStore',
|
||||||
|
root: 'addons',
|
||||||
|
idProperty: 'id',
|
||||||
|
sortInfo: {
|
||||||
|
field: 'nick',
|
||||||
|
direction: 'ASC' // or 'DESC' (case sensitive for local sorting)
|
||||||
|
},
|
||||||
|
fields: ['id', 'name', 'store', 'nick', 'latest_version', 'version', 'status',
|
||||||
|
'type', 'release_type', 'url', 'enabled', 'publisher', 'description',
|
||||||
|
'log', 'progress'],
|
||||||
|
listeners: {
|
||||||
|
'beforeload': function(store, options) {
|
||||||
|
Ext.ComponentMgr.get('loading-features-indicator').setValue('<img src="/images/documents/_indicator.gif" />');
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
"exception": function(e, type, action, options, response, arg) {
|
||||||
|
Ext.ComponentMgr.get('loading-features-indicator').setValue('<span class="button_menu_ext ss_sprite ss_status_offline"> </span>');
|
||||||
|
},
|
||||||
|
"load": function(store, records, options) {
|
||||||
|
Ext.ComponentMgr.get('loading-features-indicator').setValue("");
|
||||||
|
progressWindow.hide();
|
||||||
|
store.filterBy(function (record, id) {
|
||||||
|
if (record.get('type') == 'core') {
|
||||||
|
coreRecord = record.copy();
|
||||||
|
status = record.get('status');
|
||||||
|
if (status == "download-start" || status == "download" || status == "install" || status == "install-finish") {
|
||||||
|
upgradeStatus(record.get('id'), record.get('store'), record);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (addonsFeatureGrid.disabled) {
|
||||||
|
addonsFeatureGrid.enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
errors = store.reader.jsonData.errors;
|
||||||
|
for (var i = 0, n = errors.length; i<n; i++) {
|
||||||
|
//console.log(errors[i]);
|
||||||
|
error = errors[i];
|
||||||
|
installError(error.addonId, error.storeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
store_errors = store.reader.jsonData.store_errors;
|
||||||
|
error_msg = "";
|
||||||
|
for (var i = 0, n = store_errors.length; i<n; i++) {
|
||||||
|
error_msg += "<p>" + store_errors[i].msg + "</p>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (store_errors.length > 0) {
|
||||||
|
Ext.ComponentMgr.get('loading-features-indicator').setValue('<span class="button_menu_ext ss_sprite ss_status_offline" > </span>');
|
||||||
|
//storeError(error_msg);
|
||||||
|
reloadTask.cancel();
|
||||||
|
} else {
|
||||||
|
Ext.ComponentMgr.get('loading-features-indicator').setValue('<span class="button_menu_ext ss_sprite ss_status_online"> </span>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var upgradeStore = new Ext.data.Store({
|
var upgradeStore = new Ext.data.Store({
|
||||||
recordType: addonsStore.recordType
|
recordType: addonsStore.recordType
|
||||||
});
|
});
|
||||||
@@ -930,8 +1009,8 @@ Ext.onReady(function() {
|
|||||||
var pnlSetup = new Ext.FormPanel({
|
var pnlSetup = new Ext.FormPanel({
|
||||||
frame: true,
|
frame: true,
|
||||||
title: _('ID_SETUP_WEBSERVICES'),
|
title: _('ID_SETUP_WEBSERVICES'),
|
||||||
height: 188,
|
height: 178,
|
||||||
bodyStyle: "padding: 5px 5px 5px 5px;",
|
//bodyStyle: "padding: 5px 5px 5px 5px;",
|
||||||
disabled: !licensed,
|
disabled: !licensed,
|
||||||
|
|
||||||
items: [
|
items: [
|
||||||
@@ -966,7 +1045,7 @@ Ext.onReady(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var pnlSystem = new Ext.Container({
|
var pnlSystem = new Ext.Container({
|
||||||
autoEl: "div",
|
//autoEl: "div",
|
||||||
//width: 550,
|
//width: 550,
|
||||||
anchor: "right 50%",
|
anchor: "right 50%",
|
||||||
//items: [pnlUpgrade, pnlSetup]
|
//items: [pnlUpgrade, pnlSetup]
|
||||||
@@ -976,11 +1055,11 @@ Ext.onReady(function() {
|
|||||||
var licensePanel = new Ext.FormPanel( {
|
var licensePanel = new Ext.FormPanel( {
|
||||||
frame: true,
|
frame: true,
|
||||||
title: _('ID_YOUR_LICENSE'),
|
title: _('ID_YOUR_LICENSE'),
|
||||||
labelWidth: 150,
|
labelWidth: 130,
|
||||||
labelAlign: "right",
|
labelAlign: "right",
|
||||||
//width : '50%',
|
//width : '50%',
|
||||||
anchor: "right 50%",
|
anchor: "right 50%",
|
||||||
bodyStyle: "padding: 5px 5px 5px 5px;",
|
//bodyStyle: "padding: 5px 5px 5px 5px;",
|
||||||
defaultType: "displayfield",
|
defaultType: "displayfield",
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
|
|
||||||
@@ -1183,6 +1262,9 @@ Ext.onReady(function() {
|
|||||||
colspan: 2,
|
colspan: 2,
|
||||||
flex: 1,
|
flex: 1,
|
||||||
padding: 5,
|
padding: 5,
|
||||||
|
//anchor : '100%',
|
||||||
|
//height: 300,
|
||||||
|
autoHeight : true,
|
||||||
disabled: !licensed,
|
disabled: !licensed,
|
||||||
columns: [
|
columns: [
|
||||||
expander,
|
expander,
|
||||||
@@ -1201,7 +1283,7 @@ Ext.onReady(function() {
|
|||||||
{
|
{
|
||||||
id :'nick-column',
|
id :'nick-column',
|
||||||
header : _('ID_NAME'),
|
header : _('ID_NAME'),
|
||||||
//width : 160,
|
width : 160,
|
||||||
//sortable : true,
|
//sortable : true,
|
||||||
menuDisabled: true,
|
menuDisabled: true,
|
||||||
dataIndex: 'nick',
|
dataIndex: 'nick',
|
||||||
@@ -1304,7 +1386,8 @@ Ext.onReady(function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
tbar:[/*{
|
tbar:[
|
||||||
|
/*{
|
||||||
text:'Install',
|
text:'Install',
|
||||||
tooltip:'Install this addon',
|
tooltip:'Install this addon',
|
||||||
//iconCls:'add',
|
//iconCls:'add',
|
||||||
@@ -1369,7 +1452,7 @@ Ext.onReady(function() {
|
|||||||
animCollapse: false,
|
animCollapse: false,
|
||||||
stripeRows: true,
|
stripeRows: true,
|
||||||
autoExpandColumn: 'nick-column',
|
autoExpandColumn: 'nick-column',
|
||||||
title: _('ID_ENTERPRISE_PLUGINS'),
|
//title: _('ID_ENTERPRISE_PLUGINS'),
|
||||||
sm: new Ext.grid.RowSelectionModel({
|
sm: new Ext.grid.RowSelectionModel({
|
||||||
singleSelect:true,
|
singleSelect:true,
|
||||||
listeners: {
|
listeners: {
|
||||||
@@ -1381,7 +1464,6 @@ Ext.onReady(function() {
|
|||||||
btnAdmin.setDisabled(true);
|
btnAdmin.setDisabled(true);
|
||||||
} else {
|
} else {
|
||||||
record = sel.getSelected();
|
record = sel.getSelected();
|
||||||
|
|
||||||
//btnUninstall.setDisabled(!(record.get("status") == "installed" || record.get("status") == "upgrade" || record.get("status") == "disabled"));
|
//btnUninstall.setDisabled(!(record.get("status") == "installed" || record.get("status") == "upgrade" || record.get("status") == "disabled"));
|
||||||
btnEnable.setDisabled(!(record.get("enabled") === false));
|
btnEnable.setDisabled(!(record.get("enabled") === false));
|
||||||
btnDisable.setDisabled(!(record.get("enabled") === true));
|
btnDisable.setDisabled(!(record.get("enabled") === true));
|
||||||
@@ -1430,6 +1512,172 @@ Ext.onReady(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// create the Grid Features
|
||||||
|
var addonsFeatureGrid = new Ext.grid.GridPanel({
|
||||||
|
store: addonsFeaturesStore,
|
||||||
|
colspan: 2,
|
||||||
|
flex: 1,
|
||||||
|
padding: 5,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
id : 'icon-column-feature',
|
||||||
|
header : '',
|
||||||
|
width : 30,
|
||||||
|
hideable : false,
|
||||||
|
dataIndex: 'status',
|
||||||
|
renderer : function (val, metadata, record, rowIndex, colIndex, store) {
|
||||||
|
return "<img src=\"/images/enterprise/" + val + ".png\" />";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id :'nick-column-feature',
|
||||||
|
header : _('ID_NAME'),
|
||||||
|
width : 300,
|
||||||
|
sortable : true,
|
||||||
|
dataIndex: 'nick',
|
||||||
|
renderer: function (val, metadata, record, rowIndex, colIndex, store) {
|
||||||
|
if (record.get('release_type') == 'beta') {
|
||||||
|
return val + " <span style='color:red'> (Beta)</span>";
|
||||||
|
} else if (record.get('release_type') == 'localRegistry') {
|
||||||
|
return val + " <span style='color:gray'> (Local)</span>";
|
||||||
|
} else {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id :'description-column-feature',
|
||||||
|
header : _('ID_DESCRIPTION'),
|
||||||
|
width : 400,
|
||||||
|
dataIndex: 'description'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id : 'enabled-column-feature',
|
||||||
|
header : _('ID_ENABLED'),
|
||||||
|
width : 60,
|
||||||
|
dataIndex: 'enabled',
|
||||||
|
renderer: function (val) {
|
||||||
|
if (val === true) {
|
||||||
|
return "<img src=\"/images/enterprise/tick-white.png\" />";
|
||||||
|
} else if (val === false) {
|
||||||
|
return "<img src=\"/images/enterprise/cross-white.png\" />";
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id : "status-feature",
|
||||||
|
header : _('ID_STATUS'),
|
||||||
|
width : 120,
|
||||||
|
sortable : false,
|
||||||
|
hideable : false,
|
||||||
|
dataIndex: "status",
|
||||||
|
renderer: function (val) {
|
||||||
|
var str = "";
|
||||||
|
var text = "";
|
||||||
|
|
||||||
|
switch (val) {
|
||||||
|
case "available": text = _('ID_BUY_NOW'); break;
|
||||||
|
case "installed": text = _('ID_INSTALLED'); break;
|
||||||
|
case "ready": text = _('ID_INSTALL_NOW'); break;
|
||||||
|
case "upgrade": text = _('ID_UPGRADE_NOW'); break;
|
||||||
|
case "download": text = _('ID_CANCEL'); break;
|
||||||
|
case "install": text = _('ID_INSTALLING'); break;
|
||||||
|
case "cancel": text = _('ID_CANCELLING'); break;
|
||||||
|
case "disabled": text = _('ID_DISABLED'); break;
|
||||||
|
case "download-start": text = "<img src=\"/images/enterprise/loader.gif\" />"; break;
|
||||||
|
default: text = val; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (val) {
|
||||||
|
case "available":
|
||||||
|
case "ready":
|
||||||
|
case "upgrade":
|
||||||
|
case "download":
|
||||||
|
case "install":
|
||||||
|
case "cancel":
|
||||||
|
case "download-start":
|
||||||
|
str = "<div class=\"" + val + " roundedCorners\">" + text + "</div>";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "installed":
|
||||||
|
case "disabled":
|
||||||
|
str = "<div style=\"margin-right: 0.85em; font-weight: bold; text-align: center;\">" + text + "</div>";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
str = "<div class=\"" + val + " roundedCorners\">" + text + "</div>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
stripeRows: true,
|
||||||
|
autoHeight : true,
|
||||||
|
stateId: "grid",
|
||||||
|
tbar:
|
||||||
|
[
|
||||||
|
{
|
||||||
|
id: 'refresh-btn',
|
||||||
|
text:_('ID_REFRESH_LABEL'),
|
||||||
|
iconCls:'button_menu_ext ss_sprite ss_database_refresh',
|
||||||
|
tooltip: _('ID_REFRESH_LABEL_PLUGIN_TIP'),
|
||||||
|
disabled: (INTERNET_CONNECTION == 1)? false : true,
|
||||||
|
handler: function (b, e) {
|
||||||
|
reloadTask.cancel();
|
||||||
|
addonsFeaturesStore.load({
|
||||||
|
params: {
|
||||||
|
"force": true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'->',
|
||||||
|
{
|
||||||
|
xtype:"displayfield",
|
||||||
|
id:'loading-features-indicator'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
listeners: {
|
||||||
|
"cellclick": function (grid, rowIndex, columnIndex, e) {
|
||||||
|
var record = grid.getStore().getAt(rowIndex);
|
||||||
|
var fieldName = grid.getColumnModel().getDataIndex(columnIndex);
|
||||||
|
|
||||||
|
if (fieldName != "status") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (record.get("status")) {
|
||||||
|
case "upgrade":
|
||||||
|
case "ready":
|
||||||
|
if (INTERNET_CONNECTION == 1) {
|
||||||
|
installAddon(record.get("id"), record.get("store"));
|
||||||
|
} else {
|
||||||
|
Ext.MessageBox.alert(_('ID_INFORMATION'), _('ID_NO_INTERNET_CONECTION'));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "download":
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url: "addonsStoreAction",
|
||||||
|
params: {
|
||||||
|
"action": "cancel",
|
||||||
|
"addon": record.get("id"),
|
||||||
|
"store": record.get("store")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "available":
|
||||||
|
addonAvailable(record.get("id"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var topBox = new Ext.Panel({
|
var topBox = new Ext.Panel({
|
||||||
id:'main-panel-hbox',
|
id:'main-panel-hbox',
|
||||||
baseCls:'x-plain',
|
baseCls:'x-plain',
|
||||||
@@ -1444,11 +1692,29 @@ Ext.onReady(function() {
|
|||||||
defaults: {
|
defaults: {
|
||||||
frame:true,
|
frame:true,
|
||||||
flex: 1,
|
flex: 1,
|
||||||
height: 210
|
height: 182
|
||||||
},
|
},
|
||||||
items:[licensePanel, pnlSystem]
|
items:[licensePanel, pnlSystem]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var tabEnterprise = new Ext.TabPanel({
|
||||||
|
activeTab: 0,
|
||||||
|
//width:600,
|
||||||
|
anchor: '100%',
|
||||||
|
height: 370,
|
||||||
|
plain:true,
|
||||||
|
defaults:{autoScroll: true},
|
||||||
|
items:[{
|
||||||
|
title: _('ID_ENTERPRISE_PLUGINS'),
|
||||||
|
items : addonsGrid
|
||||||
|
},{
|
||||||
|
title: _('ID_ENTERPRISE_FIXTURES'),
|
||||||
|
items : addonsFeatureGrid
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
var fullBox = new Ext.Panel({
|
var fullBox = new Ext.Panel({
|
||||||
id:'main-panel-vbox',
|
id:'main-panel-vbox',
|
||||||
baseCls:'x-plain',
|
baseCls:'x-plain',
|
||||||
@@ -1464,7 +1730,8 @@ Ext.onReady(function() {
|
|||||||
defaults: {
|
defaults: {
|
||||||
frame:true
|
frame:true
|
||||||
},
|
},
|
||||||
items:[topBox, addonsGrid]
|
//items:[topBox, addonsGrid]
|
||||||
|
items:[topBox, tabEnterprise]
|
||||||
});
|
});
|
||||||
|
|
||||||
///////
|
///////
|
||||||
@@ -1478,6 +1745,16 @@ Ext.onReady(function() {
|
|||||||
|
|
||||||
addonsGrid.addListener("rowcontextmenu", onMessageMnuContext, this);
|
addonsGrid.addListener("rowcontextmenu", onMessageMnuContext, this);
|
||||||
|
|
||||||
|
addonsFeatureGrid.on("rowcontextmenu",
|
||||||
|
function (grid, rowIndex, evt) {
|
||||||
|
var sm = grid.getSelectionModel();
|
||||||
|
sm.selectRow(rowIndex, sm.isSelected(rowIndex));
|
||||||
|
},
|
||||||
|
this
|
||||||
|
);
|
||||||
|
|
||||||
|
addonsFeatureGrid.addListener("rowcontextmenu", onMessageMnuContext, this);
|
||||||
|
|
||||||
///////
|
///////
|
||||||
var viewport = new Ext.Viewport({
|
var viewport = new Ext.Viewport({
|
||||||
layout: "anchor",
|
layout: "anchor",
|
||||||
@@ -1490,6 +1767,7 @@ Ext.onReady(function() {
|
|||||||
|
|
||||||
if (licensed) {
|
if (licensed) {
|
||||||
addonsStore.load();
|
addonsStore.load();
|
||||||
|
addonsFeaturesStore.load();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user