-
+
Index: branches/5.2.x/core/install/install_schema.sql
===================================================================
diff -u -r15363 -r15373
--- branches/5.2.x/core/install/install_schema.sql (.../install_schema.sql) (revision 15363)
+++ branches/5.2.x/core/install/install_schema.sql (.../install_schema.sql) (revision 15373)
@@ -1324,17 +1324,26 @@
CREATE TABLE PromoBlocks (
BlockId int(11) NOT NULL AUTO_INCREMENT,
- Title varchar(50) NOT NULL DEFAULT '',
+ l1_Title varchar(50) NOT NULL DEFAULT '',
+ l2_Title varchar(50) NOT NULL DEFAULT '',
+ l3_Title varchar(50) NOT NULL DEFAULT '',
+ l4_Title varchar(50) NOT NULL DEFAULT '',
+ l5_Title varchar(50) NOT NULL DEFAULT '',
+ l1_ButtonText varchar(255) NOT NULL DEFAULT '',
+ l2_ButtonText varchar(255) NOT NULL DEFAULT '',
+ l3_ButtonText varchar(255) NOT NULL DEFAULT '',
+ l4_ButtonText varchar(255) NOT NULL DEFAULT '',
+ l5_ButtonText varchar(255) NOT NULL DEFAULT '',
Priority int(11) NOT NULL DEFAULT '0',
- Status tinyint(1) NOT NULL DEFAULT '1',
+ `Status` tinyint(1) NOT NULL DEFAULT '1',
l1_Image varchar(255) NOT NULL DEFAULT '',
l2_Image varchar(255) NOT NULL DEFAULT '',
l3_Image varchar(255) NOT NULL DEFAULT '',
l4_Image varchar(255) NOT NULL DEFAULT '',
l5_Image varchar(255) NOT NULL DEFAULT '',
CSSClassName varchar(255) NOT NULL DEFAULT '',
LinkType tinyint(1) NOT NULL DEFAULT '1',
- CategoryId INT(11) DEFAULT NULL,
+ CategoryId int(11) DEFAULT NULL,
ExternalLink varchar(255) NOT NULL DEFAULT '',
OpenInNewWindow tinyint(3) unsigned NOT NULL DEFAULT '0',
ScheduleFromDate int(11) DEFAULT NULL,
@@ -1350,7 +1359,17 @@
PromoBlockGroupId int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (BlockId),
KEY OpenInNewWindow (OpenInNewWindow),
- KEY PromoBlockGroupId (PromoBlockGroupId)
+ KEY PromoBlockGroupId (PromoBlockGroupId),
+ KEY l1_Title (l1_Title(5)),
+ KEY l2_Title (l2_Title(5)),
+ KEY l3_Title (l3_Title(5)),
+ KEY l4_Title (l4_Title(5)),
+ KEY l5_Title (l5_Title(5)),
+ KEY l1_ButtonText (l1_ButtonText(5)),
+ KEY l2_ButtonText (l2_ButtonText(5)),
+ KEY l3_ButtonText (l3_ButtonText(5)),
+ KEY l4_ButtonText (l4_ButtonText(5)),
+ KEY l5_ButtonText (l5_ButtonText(5))
);
CREATE TABLE PromoBlockGroups (
Index: branches/5.2.x/core/units/promo_blocks/promo_block_eh.php
===================================================================
diff -u -r15165 -r15373
--- branches/5.2.x/core/units/promo_blocks/promo_block_eh.php (.../promo_block_eh.php) (revision 15165)
+++ branches/5.2.x/core/units/promo_blocks/promo_block_eh.php (.../promo_block_eh.php) (revision 15373)
@@ -1,6 +1,6 @@
'kUploadFormatter', 'upload_dir' => IMAGES_PATH . 'promo_blocks/',
'multiple' => 1, 'thumb_format' => 'resize:100x100',
'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_hint_ImageFiles!',
- 'required' => 1, 'not_null' => 1, 'default' => '',
+ 'not_null' => 1, 'default' => '',
);
// get active languages
$sql = 'SELECT LanguageId
FROM ' . TABLE_PREFIX . 'Languages';
$languages = $this->Conn->GetCol($sql);
- foreach ($languages AS $lang_id) {
+ foreach ($languages as $lang_id) {
$fields['l' . $lang_id . '_Image'] = $a_image;
}
+ $fields['l' . $this->Application->GetDefaultLanguageId() . '_Image']['required'] = 1;
+
$this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
}
}
Index: branches/5.2.x/core/install/upgrades.sql
===================================================================
diff -u -r15363 -r15373
--- branches/5.2.x/core/install/upgrades.sql (.../upgrades.sql) (revision 15363)
+++ branches/5.2.x/core/install/upgrades.sql (.../upgrades.sql) (revision 15373)
@@ -2749,4 +2749,4 @@
# ===== v 5.2.0-RC1 =====
UPDATE LanguageLabels SET l<%PRIMARY_LANGUAGE%>_Translation = '<TITLE> Tag' WHERE PhraseKey = 'LA_FLD_PAGECONTENTTITLE';
ALTER TABLE EmailLog ADD EventType TINYINT(4) NULL AFTER EventName;
-DELETE FROM UserPersistentSessionData WHERE VariableName = 'email-log[Default]columns_.';
+DELETE FROM UserPersistentSessionData WHERE VariableName IN ('email-log[Default]columns_.', 'promo-block[Default]columns_.');
Index: branches/5.2.x/core/units/promo_blocks/promo_blocks_config.php
===================================================================
diff -u -r15177 -r15373
--- branches/5.2.x/core/units/promo_blocks/promo_blocks_config.php (.../promo_blocks_config.php) (revision 15177)
+++ branches/5.2.x/core/units/promo_blocks/promo_blocks_config.php (.../promo_blocks_config.php) (revision 15373)
@@ -23,6 +23,8 @@
'TitleField' => 'Title',
+ 'StatusField' => Array ('Status'),
+
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('promo-block' => '!la_title_AddingPromoBlock!'),
@@ -60,8 +62,12 @@
),
'Title' => Array (
'type' => 'string', 'max_len' => 50,
- 'not_null' => 1, 'required' => 1, 'default' => '',
+ 'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(50)', 'not_null' => 1, 'required' => 1, 'default' => '',
),
+ 'ButtonText' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)', 'not_null' => 1, 'default' => '',
+ ),
'Status' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1,
@@ -77,12 +83,12 @@
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
- 'CSSClassName' => Array(
+ /*'CSSClassName' => Array(
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options' => Array('promo-orange' => 'Orange', 'promo-green' => 'Green', 'promo-blue' => 'Blue'),
'not_null' => 1, 'default' => '',
- ),
+ ),*/
'LinkType' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Internal', 2 => 'la_opt_External'), 'use_phrases' => 1,
@@ -109,7 +115,7 @@
),
'NumberOfClicks' => Array ('type' => 'int', 'default' => 0, 'not_null' => 1),
'NumberOfViews' => Array ('type' => 'int', 'default' => 0, 'not_null' => 1),
- 'Html' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => null),
+ 'Html' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'db_type' => 'text', 'using_fck' => 1, 'default' => null),
),
'VirtualFields' => Array(
@@ -118,21 +124,22 @@
'Grids' => Array (
'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_item.png', 0 => 'icon16_disabled.png'),
'Fields' => Array (
- 'BlockId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'BlockId' => Array ('title' => 'column:la_fld_Id', 'filter_block' => 'grid_range_filter', 'width' => 80),
'Title' => Array ('filter_block' => 'grid_like_filter'),
- 'Status' => Array ('filter_block' => 'grid_options_filter'),
- 'Priority' => Array ('title' => 'column:la_fld_Order', 'filter_block' => 'grid_range_filter'),
- 'Sticky' => Array ('filter_block' => 'grid_options_filter'),
- 'CSSClassName' => Array ('filter_block' => 'grid_options_filter'),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 80),
+ 'Priority' => Array ('title' => 'column:la_fld_Order', 'filter_block' => 'grid_range_filter', 'width' => 80),
+ 'Sticky' => Array ('filter_block' => 'grid_options_filter', 'width' => 80),
+// 'CSSClassName' => Array ('filter_block' => 'grid_options_filter'),
'LinkType' => Array ('filter_block' => 'grid_options_filter'),
- 'CategoryId' => Array ('title' => 'column:la_fld_Category', 'filter_block' => 'grid_options_filter'),
- 'ExternalLink' => Array ('filter_block' => 'grid_like_filter'),
- 'ScheduleFromDate' => Array ('title' => 'la_col_ScheduleFromDate', 'filter_block' => 'grid_date_range_filter'),
- 'ScheduleToDate' => Array ('title' => 'la_col_ScheduleToDate', 'filter_block' => 'grid_date_range_filter'),
+ 'CategoryId' => Array ('title' => 'column:la_fld_Category', 'filter_block' => 'grid_options_filter', 'width' => 200),
+ 'ExternalLink' => Array ('filter_block' => 'grid_like_filter', 'width' => 200),
+ 'ScheduleFromDate' => Array ('title' => 'la_col_ScheduleFromDate', 'filter_block' => 'grid_date_range_filter', 'width' => 120),
+ 'ScheduleToDate' => Array ('title' => 'la_col_ScheduleToDate', 'filter_block' => 'grid_date_range_filter', 'width' => 120),
'NumberOfClicks' => Array ('filter_block' => 'grid_range_filter'),
'NumberOfViews' => Array ('filter_block' => 'grid_range_filter'),
- 'ConversionPercent' => Array ('filter_block' => 'grid_range_filter'),
+ 'ConversionPercent' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
),
),
),
|