Skip to content
Permalink
Browse files

Branch contrexx_3_2: merged all missing changes from trunk to branch

git-svn-id: http://svn.contrexxlabs.com/contrexx/branches/contrexx_3_2@30918 5ce06e5d-2b28-0410-aa6a-b3cd9cf52d8a
  • Loading branch information...
Ueli Kramer
Ueli Kramer committed Jun 6, 2014
1 parent be9c603 commit e6a5439c0deb6ce574304e1998fee7226b1efdc2
Showing 427 changed files with 58,215 additions and 4,028 deletions.
@@ -7,10 +7,10 @@
location.href = "index.php?cmd=logout&{CSRF_PARAM}";
}
}
jQuery(document).ready(function() {
if ((jQuery('#subnavbar_level2').length > 0) && (jQuery('#subnavbar_level2').is(':visible'))) {
if (jQuery('#subnavbar_level2').prevAll('#okbox, .okbox, #warningbox, .warningbox, #alertbox, .alertbox').length == 0) {
jQuery('#subnavbar_level1').addClass('no_margin');
cx.jQuery(document).ready(function() {
if ((cx.jQuery('#subnavbar_level2').length > 0) && (cx.jQuery('#subnavbar_level2').is(':visible'))) {
if (cx.jQuery('#subnavbar_level2').prevAll('#okbox, .okbox, #warningbox, .warningbox, #alertbox, .alertbox').length == 0) {
cx.jQuery('#subnavbar_level1').addClass('no_margin');
}
}
});
@@ -10,21 +10,21 @@
}
}
jQuery(function() {
cx.jQuery(function() {
updateCurrent(true);
});
function updateCurrent(init) {
jQuery(".langrow").each(function(index, el) {
var lang = jQuery(el);
cx.jQuery(".langrow").each(function(index, el) {
var lang = cx.jQuery(el);
var langId = lang.children(".langId").text();
var defField = lang.children(".langDefault").children("input");
var fallbackField = lang.children(".langFallback").children("select");
var frontendField = lang.children(".langActiveFrontend").children("input");
var backendField = lang.children(".langActiveBackend").children("input");
var functionsField = lang.children(".langFunctions").children("div");
//small language
if (jQuery(".langrow .langFallback").length == 0) {
if (cx.jQuery(".langrow .langFallback").length == 0) {
if (defField.is(":checked")) {
defField.after("<input type=\"hidden\" name=\"langActiveStatus[" + langId + "]\" value=\"1\" />");
defField.after("<input type=\"hidden\" name=\"langAdminStatus[" + langId + "]\" value=\"1\" />");
@@ -75,30 +75,30 @@
}
function performLanguageAction(actionName, toLangId, action) {
var defaultLangId = jQuery(".langrow .langDefault input:checked").closest(".langrow").attr("id");
var fromLangId = jQuery(".langrow#" + toLangId).children(".langFallback").children("select").val();
var defaultLangId = cx.jQuery(".langrow .langDefault input:checked").closest(".langrow").attr("id");
var fromLangId = cx.jQuery(".langrow#" + toLangId).children(".langFallback").children("select").val();
if (fromLangId === "") {
return;
} else if (fromLangId == 0) {
fromLangId = defaultLangId;
}
var fromLangName = jQuery(".langrow#" + fromLangId).children(".langShortName").text();
var toLangName = jQuery(".langrow#" + toLangId).children(".langShortName").text();
var fromLangName = cx.jQuery(".langrow#" + fromLangId).children(".langShortName").text();
var toLangName = cx.jQuery(".langrow#" + toLangId).children(".langShortName").text();
showActionDialog(actionName, fromLangName, toLangName, function() {
var waitDialog = cx.ui.dialog({
title: cx.variables.get("waitTitle", "language/lang"),
content: cx.variables.get("waitText", "language/lang"),
modal: true,
autoOpen: true,
open: function(event, ui) {
jQuery(".ui-dialog-titlebar-close").hide();
cx.jQuery(".ui-dialog-titlebar-close").hide();
}
});
var offset = 0;
var count = 0;
while ((offset < count) || offset == 0) {
var url = "index.php?cmd=jsondata&object=cm&act=" + actionName + "&to=" + toLangId + "&offset=" + offset + "&limit=1";
jQuery.ajax({
cx.jQuery.ajax({
async: false,
url: url,
dataType: "json",
@@ -139,15 +139,15 @@
var noOption = cx.variables.get("noOption", "language/lang");
var buttons = new Object();
buttons[yesOption] = function() {
jQuery(this).dialog("close");
cx.jQuery(this).dialog("close");
if (checkboxText) {
if (!dialog.getElement().children().children("#really").is(":checked")) {
return;
}
}
yesAction();
};
buttons[noOption] = function() {jQuery(this).dialog("close");}
buttons[noOption] = function() {cx.jQuery(this).dialog("close");}
var content = "<p>" + cx.variables.get(action + "Text", "language/lang");
if (action == 'link') {
content = content.replace("%1", toLang).replace("%2", fromLang);
@@ -168,8 +168,8 @@
});
var yesButton = dialog.getElement().siblings(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children("button").first();
yesButton.hide();
jQuery("#really").change(function() {
yesButton.toggle(jQuery("#really").is(":checked"));
cx.jQuery("#really").change(function() {
yesButton.toggle(cx.jQuery("#really").is(":checked"));
});
dialog.open();
return dialog;
@@ -107,6 +107,9 @@
define('ASCMS_MODEL_FOLDER', '/model');
define('ASCMS_MODEL_PATH', ASCMS_DOCUMENT_ROOT.ASCMS_MODEL_FOLDER);
define('ASCMS_MODEL_PROXIES_PATH', ASCMS_MODEL_PATH.'/proxies');
define('ASCMS_TESTING_FOLDER', '/Testing');
define('ASCMS_APP_CACHE_FOLDER', ASCMS_TEMP_PATH.'/appcache');
define('ASCMS_APP_CACHE_FOLDER_WEB_PATH', ASCMS_TEMP_WEB_PATH.'/appcache');
// This is like the usual *_WEB_PATH, relative to ASCMS_PATH.
// Like this, only one path needs to be defined for each purpose,
@@ -19,30 +19,78 @@
*/
class BackendTable extends HTML_Table {
public function __construct($attrs = array()) {
if ($attrs instanceof \Cx\Core_Modules\Listing\Model\Entity\DataSet) {
$first = true;
$row = 1;
foreach ($attrs as $colname=>$rows) {
$col = 0;
foreach ($rows as $header=>$data) {
if ($first) {
$this->setCellContents(0, $col, $header, 'th');
}
$this->setCellContents($row, $col, $data);
$col++;
}
$first = false;
$row++;
}
$attrs = array();
}
public function __construct($attrs = array(), $options = array()) {
global $_ARRAYLANG;
if ($attrs instanceof \Cx\Core_Modules\Listing\Model\Entity\DataSet) {
$first = true;
$row = 1;
foreach ($attrs as $rowname=>$rows) {
$col = 0;
foreach ($rows as $header=>$data) {
if (
isset($options['fields']) &&
isset($options['fields'][$header]) &&
isset($options['fields'][$header]['showOverview']) &&
!$options['fields'][$header]['showOverview']
) {
continue;
}
if ($first) {
if (isset($_ARRAYLANG[$header])) {
$header = $_ARRAYLANG[$header];
}
$this->setCellContents(0, $col, $header, 'th');
}
if (is_object($data) && get_class($data) == 'DateTime') {
$data = $data->format(ASCMS_DATE_FORMAT);
} else if (gettype($data) == 'boolean') {
$data = '<i>' . ($data ? 'Yes' : 'No') . '</i>';
} else if ($data === null) {
$data = '<i>NULL</i>';
} else if (empty($data)) {
$data = '<i>(empty)</i>';
}
$this->setCellContents($row, $col, $data);
$col++;
}
if (is_array($options['functions'])) {
if ($first) {
$header = 'FUNCTIONS';
if (isset($_ARRAYLANG['FUNCTIONS'])) {
$header = $_ARRAYLANG['FUNCTIONS'];
}
$this->setCellContents(0, $col, $header, 'th');
}
if (!isset($options['functions']['baseUrl'])) {
$options['functions']['baseUrl'] = clone \Env::get('cx')->getRequest();
}
$this->setCellContents($row, $col, $this->getFunctionsCode($rowname, $options['functions']));
}
$first = false;
$row++;
}
$attrs = array();
}
parent::__construct(array_merge($attrs, array('class' => 'adminlist')));
}
protected function getFunctionsCode($rowname, $functions) {
$baseUrl = $functions['baseUrl'];
$code = '<span class="functions">';
if (isset($functions['edit']) && $functions['edit']) {
$editUrl = clone $baseUrl;
$editUrl->setParam('editid', $rowname);
$code .= '<a href="' . $editUrl . '" class="edit"></a>';
}
if (isset($functions['delete']) && $functions['delete']) {
$code .= '<a href="#" class="delete"></a>';
}
return $code . '</span>';
}
public function toHtml() {
$this->altRowAttributes(1, array('class' => 'row1'), array('class' => 'row2'), true);
return parent::toHtml();
}
}
@@ -154,7 +154,7 @@ protected function actRenderCM()
//access tab
'TXT_CORE_CM_ACCESS_PROTECTION_FRONTEND', 'TXT_CORE_CM_ACCESS_PROTECTION_BACKEND', 'TXT_CORE_CM_ACCESS_PROTECTION_AVAILABLE_GROUPS', 'TXT_CORE_CM_ACCESS_PROTECTION_ASSIGNED_GROUPS',
//advanced tab
'TXT_CORE_CM_THEMES', 'TXT_CORE_CM_THEMES_INFO', 'TXT_CORE_CM_CUSTOM_CONTENT', 'TXT_CORE_CM_CUSTOM_CONTENT_INFO', 'TXT_CORE_CM_CSS_CLASS', 'TXT_CORE_CM_CSS_CLASS_INFO', 'TXT_CORE_CM_CACHE', 'TXT_CORE_CM_NAVIGATION', 'TXT_CORE_CM_LINK_TARGET', 'TXT_CORE_CM_LINK_TARGET_INO', 'TXT_CORE_CM_SLUG', 'TXT_CORE_CM_SLUG_INFO', 'TXT_CORE_CM_ALIAS', 'TXT_CORE_CM_ALIAS_INFO', 'TXT_CORE_CM_CSS_NAV_CLASS', 'TXT_CORE_CM_CSS_NAV_CLASS_INFO', 'TXT_CORE_CM_SOURCE_MODE', 'TXT_RECURSIVE_CHANGE',
'TXT_CORE_CM_THEMES', 'TXT_CORE_CM_THEMES_INFO', 'TXT_CORE_CM_CUSTOM_CONTENT', 'TXT_CORE_CM_CUSTOM_CONTENT_INFO', 'TXT_CORE_CM_CSS_CLASS', 'TXT_CORE_CM_CSS_CLASS_INFO', 'TXT_CORE_CM_CACHE', 'TXT_CORE_CM_NAVIGATION', 'TXT_CORE_CM_LINK_TARGET', 'TXT_CORE_CM_LINK_TARGET_INO', 'TXT_CORE_CM_SLUG', 'TXT_CORE_CM_SLUG_INFO', 'TXT_CORE_CM_ALIAS', 'TXT_CORE_CM_ALIAS_INFO', 'TXT_CORE_CM_CSS_NAV_CLASS', 'TXT_CORE_CM_CSS_NAV_CLASS_INFO', 'TXT_CORE_CM_SOURCE_MODE', 'TXT_RECURSIVE_CHANGE', 'TXT_CORE_CM_USE_ALL_CHANNELS', 'TXT_CORE_CM_USE_SKIN_ALL_CHANNELS_INFO', 'TXT_CORE_CM_USE_CUSTOM_CONTENT_ALL_CHANNELS_INFO',
//blocks tab
'TXT_CORE_CM_BLOCKS', 'TXT_CORE_CM_BLOCKS_AVAILABLE', 'TXT_CORE_CM_BLOCKS_ASSIGNED',
//settings tab
@@ -320,6 +320,12 @@ protected function actRenderCM()
$this->template->setVariable('FALLBACK_ARRAY', json_encode($this->getFallbackArray()));
$this->template->setVariable('LANGUAGE_LABELS', json_encode($this->getLangLabels()));
$this->template->setVariable('EDIT_VIEW_CSS_CLASS', $editViewCssClass);
if (count(\FWLanguage::getActiveFrontendLanguages()) < 2) {
$this->template->hideBlock('content_manager_language_selection');
} else {
$this->template->touchBlock('content_manager_language_selection');
}
$editmodeTemplate = new \Cx\Core\Html\Sigma(ASCMS_ADMIN_TEMPLATE_PATH);
$editmodeTemplate->loadTemplateFile('content_editmode.html');
@@ -763,7 +763,9 @@ private function validatePageArray($page) {
'slug' => array('type' => 'String'),
'caching' => array('type' => 'boolean'),
'skin' => array('type' => 'integer'),
'useSkinForAllChannels' => array('type' => 'integer'),
'customContent' => array('type' => 'String'),
'useCustomContentForAllChannels' => array('type' => 'integer'),
'cssName' => array('type' => 'String'),
'cssNavName' => array('type' => 'String'),
);
@@ -1082,7 +1084,9 @@ private function getPageArray($page) {
'accessData' => $accessData,
// Advanced Settings
'skin' => $page->getSkin(),
'useSkinForAllChannels' => $page->getUseSkinForAllChannels(),
'customContent' => $page->getCustomContent(),
'useCustomContentForAllChannels' => $page->getUseCustomContentForAllChannels(),
'cssName' => $page->getCssName(),
'cssNavName' => $page->getCssNavName(),
'caching' => $page->getCaching(),
@@ -137,6 +137,11 @@ class Page extends \Cx\Model\Base\EntityBase implements \Serializable
*/
protected $customContent;
/**
* @var integer $useCustomContentForAllChannels
*/
protected $useCustomContentForAllChannels;
/**
* @var string $cssName
*/
@@ -222,6 +227,11 @@ class Page extends \Cx\Model\Base\EntityBase implements \Serializable
*/
protected $skin;
/**
* @var integer $useSkinForAllChannels
*/
protected $useSkinForAllChannels;
/**
* @var string $type
*/
@@ -495,6 +505,26 @@ public function getCustomContent()
return $this->customContent;
}
/**
* Get useCustomContentForAllChannels
*
* @return integer $useCustomContentForAllChannels
*/
public function setUseCustomContentForAllChannels($useCustomContentForAllChannels)
{
$this->useCustomContentForAllChannels = $useCustomContentForAllChannels;
}
/**
* Get useCustomContentForAllChannels
*
* @return integer $useCustomContentForAllChannels
*/
public function getUseCustomContentForAllChannels()
{
return $this->useCustomContentForAllChannels;
}
/**
* Set cssName
*
@@ -999,6 +1029,27 @@ public function getSkin()
{
return $this->skin;
}
/**
* Set useSkinForAllChannels
*
* @return integer $useSkinForAllChannels
*/
public function setUseSkinForAllChannels($useSkinForAllChannels)
{
$this->useSkinForAllChannels = $useSkinForAllChannels;
}
/**
* Get useSkinForAllChannels
*
* @return integer $useSkinForAllChannels
*/
public function getUseSkinForAllChannels()
{
return $this->useSkinForAllChannels;
}
/**
* @var boolean $caching
*/
@@ -130,7 +130,7 @@ public function onFlush($eventArgs) {
$objCache->clearCache();
foreach ($uow->getScheduledEntityUpdates() AS $entity) {
\cacheLib::deleteCacheFileByPageId($entity->getId());
// \cacheLib::deleteCacheFileByPageId($entity->getId());
$this->checkValidPersistingOperation($pageRepo, $entity);
}
}
@@ -87,6 +87,11 @@ Cx\Core\ContentManager\Model\Entity\Page:
gedmo:
- versioned

useCustomContentForAllChannels:
type: integer
gedmo:
- versioned

cssName:
nullable: true
type: string
@@ -106,6 +111,11 @@ Cx\Core\ContentManager\Model\Entity\Page:
nullable: true
gedmo:
- versioned

useSkinForAllChannels:
type: integer
gedmo:
- versioned

#meta
metatitle:

0 comments on commit e6a5439

Please sign in to comment.
You can’t perform that action at this time.