Index: core/install/english.lang
===================================================================
--- core/install/english.lang (revision 14902)
+++ core/install/english.lang (working copy)
@@ -149,6 +149,7 @@
RGVmYXVsdCBDU1YgRXhwb3J0IEVuY29kaW5n
RGVmYXVsdCBDU1YgRXhwb3J0IE5ldyBMaW5lIFNlcGFyYXRvcg==
U2hvdyAiRm9ybXMgRWRpdG9yIiBpbiBERUJVRyBtb2RlIG9ubHk=
+ U2hvdyAiUHJvbW8gQmxvY2sgR3JvdXBzIEVkaXRvciIgaW4gREVCVUcgbW9kZSBvbmx5
RGVmYXVsdCBEZXNpZ24gVGVtcGxhdGU=
RGVmYXVsdCBSZWdpc3RyYXRpb24gQ291bnRyeQ==
RGVmYXVsdCBBbmFseXRpY3MgVHJhY2tpbmcgQ29kZQ==
@@ -306,6 +307,7 @@
QWxsb3cgQ2hhbmdpbmcgU2VuZGVy
QWx0IFZhbHVl
QW5zd2Vy
+ QXNzaWduZWQgdG8gU2VjdGlvbnM=
QXR0YWNobWVudA==
QXV0byBDcmVhdGUgRmlsZSBOYW1l
QXV0b21hdGljIEZpbGVuYW1l
@@ -540,6 +542,7 @@
UHJpbWFyeSBMYW5ndWFnZSBQaHJhc2U=
T3JkZXI=
Q29udmVydCB1bm1hdGNoZWQgZS1tYWlscyBpbnRvIG5ldyBzdWJtaXNzaW9ucw==
+ UHJvbW8gQmxvY2sgR3JvdXA=
UHJvdGVjdGVk
UXVhbnRpdHk=
UmF0aW5n
@@ -568,6 +571,7 @@
UmVxdWlyZWQ=
UmVxdWlyZSBMb2dpbg==
Q29tbWVudA==
+ UHJvbW8gUm90YXRpb24gRGVsYXkgKHNlY29uZHMp
UnVsZSBUeXBl
UnVuIEludGVydmFs
UnVuIE1vZGU=
@@ -621,6 +625,9 @@
VG8gRS1tYWls
VG9w
QW5hbHl0aWNzIFRyYWNraW5nIENvZGU=
+ UHJvbW8gVHJhbnNpdGlvbiBDb250cm9scw==
+ UHJvbW8gVHJhbnNpdGlvbiBFZmZlY3Q=
+ VHJhbnNpdGlvbiBEZWxheSAoc2Vjb25kcyk=
UGhyYXNl
VHlwZQ==
TWVhc3VyZXMgU3lzdGVt
@@ -749,6 +756,7 @@
QWRkcmVzcw==
QWZ0ZXI=
QWxsb3c=
+ Q3VzdG9t
RmFkZQ==
U2xpZGU=
QXV0by1EZXRlY3Q=
@@ -1254,6 +1262,7 @@
QWRkaW5nIENvbW1lbnQ=
QWRkaW5nIFRoZW1l
QWRkaW5nIFVzZXI=
+ QWRkaW5nIFByb21vIEJsb2NrIEdyb3Vw
QWRkaXRpb25hbCBQZXJtaXNzaW9ucw==
QWRtaW5pc3RyYXRvcnM=
QWR2YW5jZWQ=
@@ -1308,6 +1317,7 @@
RWRpdGluZyBDb21tZW50
RWRpdGluZyBUaGVtZQ==
RWRpdGluZyBVc2Vy
+ RWRpdGluZyBQcm9tbyBCbG9jayBHcm91cA==
RS1tYWlsIENvbW11bmljYXRpb24=
RS1tYWlsIEV2ZW50cw==
RS1tYWlscw==
@@ -1489,6 +1499,7 @@
U2V0IFByaW1hcnkgU2VjdGlvbg==
U2V0IFByaW1hcnkgTGFuZ3VhZ2U=
U2V0IFN0aWNreQ==
+ U2V0dGluZ3M=
U2hvdyBNZW51
U3luY2hyb25pemUgTGFuZ3VhZ2Vz
VG9vbHM=
@@ -1531,9 +1542,11 @@
RS1tYWlsIGFkZHJlc3M=
VmFsdWU=
RGlyZWN0IGFjY2VzcyBvciBib29rbWFyaw==
+ Q2FuJ3QgRGVsZXRlIFByb21vIEJsb2NrIEdyb3Vw
V2FybmluZzogRW5hYmxpbmcgSFRNTCBpcyBhIHNlY3VyaXR5IHJpc2sgYW5kIGNvdWxkIGRhbWFnZSB0aGUgc3lzdGVtIGlmIHVzZWQgaW1wcm9wZXJseSE=
QSBzZWFyY2ggb3IgYSBmaWx0ZXIgaXMgaW4gZWZmZWN0LiBZb3UgbWF5IG5vdCBiZSBzZWVpbmcgYWxsIG9mIHRoZSBkYXRhLg==
T25lIG9yIG1vcmUgZmllbGRzIG9uIHRoaXMgZm9ybSBoYXMgYW4gZXJyb3IuPGJyLz4NCjxzbWFsbD5QbGVhc2UgbW92ZSB5b3VyIG1vdXNlIG92ZXIgdGhlIGZpZWxkcyBtYXJrZWQgd2l0aCByZWQgdG8gc2VlIHRoZSBlcnJvciBkZXRhaWxzLjwvc21hbGw+
+ UHJvbW8gQmxvY2sgR3JvdXAgSGFzIEJsb2Nr
TW9kaWZpY2F0aW9ucyB3aWxsIG5vdCB0YWtlIGVmZmVjdCB1bnRpbCB5b3UgY2xpY2sgdGhlIFNhdmUgYnV0dG9uIQ==
d2Vlaw==
V2luZG93cw==
Index: core/install/install_data.sql
===================================================================
--- core/install/install_data.sql (revision 14902)
+++ core/install/install_data.sql (working copy)
@@ -67,11 +67,12 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ResizableFrames', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_ResizableFrames', 'checkbox', '', '', 40.10, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AutoRefreshIntervals', '1,5,15,30,60,120,240', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_AutoRefreshIntervals', 'text', '', '', 40.11, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'DebugOnlyFormConfigurator', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_DebugOnlyFormConfigurator', 'checkbox', '', '', 40.12, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RememberLastAdminTemplate', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_RememberLastAdminTemplate', 'checkbox', '', '', 40.13, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseHTTPAuth', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseHTTPAuth', 'checkbox', '', '', 40.14, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'HTTPAuthUsername', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_HTTPAuthUsername', 'text', '', '', 40.15, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'HTTPAuthPassword', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_HTTPAuthPassword', 'password', NULL, NULL, 40.16, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'HTTPAuthBypassIPs', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_HTTPAuthBypassIPs', 'text', '', '', 40.17, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'DebugOnlyPromoBlockGroupConfigurator', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_DebugOnlyPromoBlockGroupConfigurator', 'checkbox', '', '', 40.13, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RememberLastAdminTemplate', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_RememberLastAdminTemplate', 'checkbox', '', '', 40.14, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseHTTPAuth', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseHTTPAuth', 'checkbox', '', '', 40.15, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'HTTPAuthUsername', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_HTTPAuthUsername', 'text', '', '', 40.16, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'HTTPAuthPassword', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_HTTPAuthPassword', 'password', NULL, NULL, 40.17, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'HTTPAuthBypassIPs', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_HTTPAuthBypassIPs', 'text', '', '', 40.18, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_Server', NULL, 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_mailserver', 'text', NULL, NULL, 50.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_Port', NULL, 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_mailport', 'text', NULL, NULL, 50.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_Authenticate', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_mailauthenticate', 'checkbox', NULL, NULL, 50.03, 0, 1, NULL);
@@ -95,12 +96,6 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportSeparator', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportSeparator', 'radio', NULL, '0=la_Linux||1=la_Windows', 70.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEncoding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEncoding', 'radio', NULL, '0=la_Unicode||1=la_Regular', 70.04, 0, 1, NULL);
-# Section "in-portal:configure_promo_blocks":
-INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoRotationDelay', '7', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoRotationDelay', 'text', '', '', 10.01, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionTime', '0.6', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionTime', 'text', '', '', 10.02, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionControls', '1', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionControls', 'select', '', '1=la_Enabled||0=la_Disabled', 10.03, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionEffect', 'fade', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionEffect', 'select', '', 'fade=la_opt_AnimationFade||slide=la_opt_AnimationSlide', 10.04, 0, 0, NULL);
-
# Section "in-portal:configure_users":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Allow_New', '3', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_allow_new', 'radio', '', '1=la_opt_UserInstantRegistration||2=la_opt_UserNotAllowedRegistration||3=la_opt_UserUponApprovalRegistration||4=la_opt_UserEmailActivation', 10.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdvancedUserManagement', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_AdvancedUserManagement', 'checkbox', NULL, NULL, 10.011, 0, 1, NULL);
@@ -705,6 +700,16 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.delete', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_blocks.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_blocks.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_blocks.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_blocks.delete', 11, 1, 1, 0);
+
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_block_groups.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_block_groups.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_block_groups.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_block_groups.delete', 11, 1, 1, 0);
+
INSERT INTO Skins VALUES (DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\nbody, td {\r\n /* fix for Firefox, when font-size was not inherited in table cells */\r\n font-size: 9pt;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: #000000;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000 !important;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-top-width: 1px;\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\ntable.head-table {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/right_background.png'') top right @@HeadBgColor@@ no-repeat;\r\n}\r\n\r\n.head-table tr td, .head-table tr td a {\r\n color: @@HeadColor@@\r\n}\r\n\r\ndiv#extra_toolbar td.button-active {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_button_background.gif'') bottom left repeat-x;\r\n height: 22px;\r\n}\r\n\r\ndiv#extra_toolbar td.button-active a {\r\n color: black;\r\n text-decoration: none;\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_background.gif'') repeat-x top left;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n font-weight: bold;\r\n color: #0080C8;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: #FFFFFF;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back_disabled.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n margin-left: 3px !important;\r\n white-space: nowrap;\r\n}\r\n\r\n.tab-active {\r\n background-color: #4487D9;\r\n}\r\n\r\n.tab a {\r\n color: #4487D9;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #FFFFFF;\r\n font-weight: bold;\r\n}\r\n\r\na.scroll-left, a.scroll-right {\r\n cursor: pointer;\r\n display: block;\r\n float: left;\r\n height: 18px;\r\n margin: 0px 1px;\r\n width: 18px;\r\n}\r\n\r\na.scroll-left {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/left.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.scroll-right {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/right.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.disabled {\r\n visibility: hidden !important;\r\n}\r\n\r\na.scroll-left:hover, a.scroll-right:hover {\r\n background-position: 0 -18px;\r\n}\r\n\r\ntd.scroll-right-container {\r\n width: 20px;\r\n}\r\n\r\ntd.scroll-right-container.disabled, td.scroll-right-container.disabled * {\r\n width: 0px;\r\n margin: 0px;\r\n}\r\n\r\ntd.scroll-right-container.disabled br {\r\n display: none;\r\n}\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n.layout-only-table td {\r\n border: none !important;\r\n}\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n overflow: hidden;\r\n border-right: 1px solid #c9c9c9;\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td, table tr.grid-data-row[_row_highlighted] td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td, table tr.grid-data-row[_row_selected] td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td, .grid-data-row-even[_row_selected] td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n border-right: 1px solid #777;\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-1 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter, input.filter-active, select.filter-active {\r\n margin-bottom: 0px;\r\n border: 1px solid #aaa;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\ndiv.filter, div.filter-active {\r\n background-color: white;\r\n border: 1px solid #AAAAAA;\r\n color: black;\r\n font-weight: normal;\r\n padding: 3px;\r\n}\r\n\r\ndiv.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\ndiv.multioptions_filter {\r\n position: absolute;\r\n z-index: 100;\r\n color: black;\r\n background-color: white;\r\n border: 1px solid black;\r\n padding: 3px 5px;\r\n display: none;\r\n vertical-align: middle;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-0 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\ntr.grid-header-row-0 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-0 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: 1px solid #C9C9C9;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px !important;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n vertical-align: middle;\r\n}\r\n\r\n/* remove top-border from first sub-section element */\r\ntable.edit-form .subsectiontitle:first-child, table.bordered .subsectiontitle:first-child {\r\n border-top-width: 0;\r\n}\r\n\r\n.subsectiontitle td {\r\n vertical-align: middle;\r\n /*padding: 3px 5px 3px 5px;*/\r\n padding: 1px 5px;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(''@@base_url@@/core/admin_templates/img/bgr_input_name_line.gif'') no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 160px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_mid.gif'') repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_input_line.gif'') no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n.error {\r\n color: red;\r\n}\r\n.error-cell {\r\n color: red;\r\n}\r\n\r\n.field-required {\r\n color: red;\r\n}\r\n\r\n.warning-table {\r\n background-color: #F0F1EB;\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n border-top-width: 0px;\r\n}\r\n\r\n.form-notice, .form-warning {\r\n font-size: 11px;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n}\r\n\r\n.form-notice {\r\n color: green;\r\n}\r\n\r\n.priority {\r\n color: red;\r\n padding-left: 1px;\r\n padding-right: 1px;\r\n font-size: 11px;\r\n}\r\n\r\n.small-statistics {\r\n font-size: 11px;\r\n color: #707070;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n/* Uploader */\r\n.uploader-queue div.file {\r\n font-size: 11px;\r\n border: 1px solid #7F99C5;\r\n padding: 3px;\r\n background-color: #DEE7F6;\r\n margin-bottom: 2px;\r\n}\r\n\r\n.uploader-queue .left {\r\n float: left;\r\n vertical-align: top;\r\n}\r\n\r\n.uploader-queue .file-label {\r\n margin-left: 5px;\r\n}\r\n\r\n.uploader-queue .preview .delete-checkbox {\r\n margin-top: -3px;\r\n}\r\n\r\n.uploader-queue .progress-container {\r\n margin: 2px 5px 0px 5px;\r\n}\r\n\r\n.uploader-queue .progress-empty {\r\n width: 150px;\r\n height: 9px;\r\n border: 1px solid black;\r\n background: url(''@@base_url@@/core/admin_templates/img/progress_left.gif'') repeat-x;\r\n}\r\n\r\n.uploader-queue .progress-full {\r\n height: 9px;\r\n background: url(''@@base_url@@/core/admin_templates/img/progress_done.gif'');\r\n}\r\n\r\n.uploader-queue .thumbnail {\r\n /*margin-bottom: 2px;*/\r\n border: 1px solid black;\r\n background-color: grey;\r\n}\r\n\r\n/* To be sorted */\r\nspan#category_path, span#category_path a {\r\n color: #FFFFFF;\r\n}\r\n\r\nspan#category_path a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: @@SectionColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left side of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px;\r\n}\r\n\r\n.tree tr td a:hover, .tree tr td a.debug-only-item:hover {\r\n color: @@TreeHoverColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a, .tree tr.highlighted td a.debug-only-item {\r\n color: @@TreeHighColor@@;\r\n background-color: @@TreeHighBgColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: @@TreeHighHoverColor@@;\r\n}\r\n\r\n.tree tr td a.debug-only-item {\r\n color: grey;\r\n}\r\n\r\n/* Ajax Dropdown */\r\n.suggest-box {\r\n border: 1px solid #999;\r\n background-color: #fff;\r\n}\r\n\r\n.suggest-item, .suggest-item-over {\r\n padding: 1px 2px 0px 2px;\r\n font-family: arial,verdana;\r\n font-size: 12px;\r\n}\r\n\r\n.suggest-item-over {\r\n background-color: #3366CC;\r\n color: #fff;\r\n}\r\n\r\n/* Dashboard Summary Boxes */\r\n.summary-box {\r\n border: 1px solid black;\r\n margin-bottom: 4px;\r\n}\r\n\r\n.summary-box .title {\r\n color: white;\r\n font-weight: bold;\r\n padding: 6px 5px;\r\n vertical-align: middle;\r\n background-color: #4A92CE;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n.summary-box .content {\r\n padding: 4px;\r\n background-color: #F6F6F6;\r\n}\r\n\r\n.summary-box .group {\r\n border-bottom: 1px solid black;\r\n margin-bottom: 10px;\r\n padding: 0 0 10px 10px;\r\n}\r\n\r\n.summary-box .group.last {\r\n border-width: 0px;\r\n margin-bottom: 0;\r\n padding-bottom: 5px;\r\n}\r\n\r\n.summary-box h4 {\r\n margin: 0;\r\n padding: 0 0 3px 0;\r\n font-size: 11px;\r\n font-weight: bold;\r\n}\r\n\r\n.summary-box .hint {\r\n font-size: 10px;\r\n color: grey;\r\n margin-bottom: 3px;\r\n}\r\n\r\n.summary-box .hint .cache-key {\r\n margin-bottom: 7px;\r\n margin-left: 3px;\r\n}\r\n\r\n.summary-box ul {\r\n margin-top: 5px;\r\n margin-bottom: 3px;\r\n padding-left: 30px;\r\n}\r\n\r\n.summary-box li {\r\n padding-bottom: 4px;\r\n}', 'in-portal_logo_img.jpg', 'in-portal_logo_img2.jpg', 'in-portal_logo_login.gif', 'a:22:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#007BF4";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#FFFFFF";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"TreeHoverColor";a:1:{s:5:"Value";s:7:"#009FF0";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:18:"TreeHighHoverColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#4A92CE";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#DCECF6";}}', 1319019189, 1, 1);
INSERT INTO LocalesList VALUES
@@ -995,4 +1000,6 @@
#INSERT INTO PageContent VALUES (DEFAULT, 1, 1, 'In-portal is a revolutionary Web Site management system that allows you to automate and facilitate management of large portal and community web sites. Regardless of whether you are running a directory site or a content news portal, a community site or an online mall, In-portal will enhance your web site management experience with innovative.
We are proud to present our newly developed "default" theme that introduces a fresh look as well totally new approach in the template system. ', NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0);
INSERT INTO Modules VALUES ('Core', 'core/', 'adm', DEFAULT, 1, 1, '', 0, NULL, NULL);
-INSERT INTO Modules VALUES ('In-Portal', 'core/', 'm', DEFAULT, 1, 0, '', 0, NULL, NULL);
\ No newline at end of file
+INSERT INTO Modules VALUES ('In-Portal', 'core/', 'm', DEFAULT, 1, 0, '', 0, NULL, NULL);
+
+INSERT INTO PromoBlockGroups (DEFAULT, 'Promo Block Group', UNIX_TIMESTAMP(), 1, '', '7.00', '0.60', 1, '', '');
Index: core/install/install_schema.sql
===================================================================
--- core/install/install_schema.sql (revision 14902)
+++ core/install/install_schema.sql (working copy)
@@ -478,6 +478,7 @@
LiveRevisionNumber int(11) NOT NULL DEFAULT '1',
DirectLinkEnabled tinyint(4) NOT NULL DEFAULT '1',
DirectLinkAuthKey varchar(20) NOT NULL,
+ PromoBlockGroupId int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (CategoryId),
UNIQUE KEY ResourceId (ResourceId),
KEY ParentId (ParentId),
@@ -506,7 +507,8 @@
KEY OverridePageCacheKey (OverridePageCacheKey),
KEY PageExpiration (PageExpiration),
KEY Protected (Protected),
- KEY LiveRevisionNumber (LiveRevisionNumber)
+ KEY LiveRevisionNumber (LiveRevisionNumber),
+ KEY PromoBlockGroupId (PromoBlockGroupId)
);
CREATE TABLE CategoryCustomData (
@@ -1304,6 +1306,21 @@
l3_Html text,
l4_Html text,
l5_Html text,
+ PromoBlockGroupId int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (BlockId),
- KEY OpenInNewWindow (OpenInNewWindow)
+ KEY OpenInNewWindow (OpenInNewWindow),
+ KEY PromoBlockGroupId (PromoBlockGroupId)
+);
+
+CREATE TABLE PromoBlockGroups (
+ PromoBlockGroupId int(11) NOT NULL AUTO_INCREMENT,
+ Title varchar(255) NOT NULL DEFAULT '',
+ CreatedOn int(10) unsigned DEFAULT NULL,
+ Status tinyint(1) NOT NULL DEFAULT '1',
+ RotationDelay decimal(9,2) NOT NULL DEFAULT 7.00,
+ TransitionTime decimal(9,2) NOT NULL DEFAULT 0.60,
+ TransitionControls tinyint(1) NOT NULL DEFAULT '0',
+ TransitionEffect varchar(255) NOT NULL DEFAULT '',
+ TransitionEffectCustom varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (PromoBlockGroupId)
);
\ No newline at end of file
Index: core/install/upgrades.sql
===================================================================
--- core/install/upgrades.sql (revision 14902)
+++ core/install/upgrades.sql (working copy)
@@ -2333,11 +2333,6 @@
KEY OpenInNewWindow (OpenInNewWindow)
);
-INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoRotationDelay', '7', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoRotationDelay', 'text', '', '', 10.01, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionTime', '0.6', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionTime', 'text', '', '', 10.02, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionControls', '1', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionControls', 'select', '', '1=la_Enabled||0=la_Disabled', 10.03, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionEffect', 'fade', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionEffect', 'select', '', 'fade=la_opt_AnimationFade||slide=la_opt_AnimationSlide', 10.04, 0, 0, NULL);
-
UPDATE Phrase
SET l<%PRIMARY_LANGUAGE%>_ColumnTranslation = l<%PRIMARY_LANGUAGE%>_Translation
WHERE PhraseKey IN ('LA_FLD_CATEGORY', 'LA_FLD_ORDER');
@@ -2425,3 +2420,41 @@
KEY ItemPrefix (ItemPrefix),
KEY Enabled (Enabled)
);
+
+CREATE TABLE PromoBlockGroups (
+ PromoBlockGroupId int(11) NOT NULL AUTO_INCREMENT,
+ Title varchar(255) NOT NULL DEFAULT '',
+ CreatedOn int(10) unsigned DEFAULT NULL,
+ Status tinyint(1) NOT NULL DEFAULT '1',
+ RotationDelay decimal(9,2) NOT NULL DEFAULT 7.00,
+ TransitionTime decimal(9,2) NOT NULL DEFAULT 0.60,
+ TransitionControls tinyint(1) NOT NULL DEFAULT '0',
+ TransitionEffect varchar(255) NOT NULL DEFAULT '',
+ TransitionEffectCustom varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (PromoBlockGroupId)
+);
+
+ALTER TABLE Category ADD PromoBlockGroupId int(10) unsigned NOT NULL DEFAULT '0',
+ADD INDEX ( `PromoBlockGroupId` );
+
+ALTER TABLE PromoBlocks ADD PromoBlockGroupId int(10) unsigned NOT NULL DEFAULT '0',
+ADD INDEX ( `PromoBlockGroupId` );
+
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'DebugOnlyPromoBlockGroupConfigurator', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_DebugOnlyPromoBlockGroupConfigurator', 'checkbox', '', '', 40.13, 0, 0, NULL);
+UPDATE ConfigurationValues SET DisplayOrder = '40.14' WHERE VariableName = 'RememberLastAdminTemplate';
+UPDATE ConfigurationValues SET DisplayOrder = '40.15' WHERE VariableName = 'UseHTTPAuth';
+UPDATE ConfigurationValues SET DisplayOrder = '40.16' WHERE VariableName = 'HTTPAuthUsername';
+UPDATE ConfigurationValues SET DisplayOrder = '40.17' WHERE VariableName = 'HTTPAuthPassword';
+UPDATE ConfigurationValues SET DisplayOrder = '40.18' WHERE VariableName = 'HTTPAuthBypassIPs';
+
+INSERT INTO PromoBlockGroups (DEFAULT, 'Promo Block Group', UNIX_TIMESTAMP(), 1, '', '7.00', '0.60', 1, '', '');
+
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_blocks.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_blocks.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_blocks.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_blocks.delete', 11, 1, 1, 0);
+
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_block_groups.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_block_groups.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_block_groups.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_block_groups.delete', 11, 1, 1, 0);
\ No newline at end of file
Index: core/units/categories/categories_config.php
===================================================================
--- core/units/categories/categories_config.php (revision 14902)
+++ core/units/categories/categories_config.php (working copy)
@@ -407,7 +407,16 @@
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1
),
- 'DirectLinkAuthKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => '')
+ 'DirectLinkAuthKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => ''),
+ 'PromoBlockGroupId' => Array (
+ 'type' => 'int',
+ 'not_null' => 1, 'default' => 0,
+ 'options_sql' => 'SELECT Title, PromoBlockGroupId
+ FROM ' . TABLE_PREFIX . 'PromoBlockGroups
+ ORDER BY Title',
+ 'option_title_field' => 'Title', 'option_key_field' => 'PromoBlockGroupId',
+ ),
+
),
'VirtualFields' => Array (
Index: core/units/promo_block_groups/promo_block_group_eh.php
===================================================================
--- core/units/promo_block_groups/promo_block_group_eh.php (revision 0)
+++ core/units/promo_block_groups/promo_block_group_eh.php (revision 0)
@@ -0,0 +1,142 @@
+beforeItemChange($event);
+ }
+
+ /**
+ * Occurs before updating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnBeforeItemUpdate(&$event)
+ {
+ parent::OnBeforeItemUpdate($event);
+ $this->beforeItemChange($event);
+ }
+
+ /**
+ * Occurs before updating item
+ *
+ * @param kEvent $event
+ * @return void
+ * @access private
+ */
+ private function beforeItemChange(&$event)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ if ($object->GetDBField('TransitionEffect') == '-1') {
+ $object->setRequired('TransitionEffectCustom');
+ }
+ }
+
+ /**
+ * Occures before deleting item
+ *
+ * @param kEvent $event
+ * @access public
+ */
+ public function OnBeforeItemDelete(&$event)
+ {
+ parent::OnBeforeItemDelete($event);
+
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $sql = 'SELECT BlockId FROM '.TABLE_PREFIX.'PromoBlocks
+ WHERE
+ PromoBlockGroupId = '.$object->GetID().'
+ ';
+ $block_id = $this->Conn->GetOne($sql);
+
+ if ( $block_id ) {
+ $this->Application->StoreVar('promo_group_has_block', $block_id);
+ $event->status = kEvent::erFAIL;
+ }
+ }
+
+ /**
+ * After item deleted
+ *
+ * @param kEvent $event
+ * @access public
+ */
+ public function OnAfterItemDelete(&$event)
+ {
+ parent::OnAfterItemDelete($event);
+ $group_id = $event->getEventParam('id');
+ $sql = 'UPDATE '.TABLE_PREFIX.'Category
+ SET
+ PromoBlockGroupId = 0
+ WHERE
+ PromoBlockGroupId = '.$group_id.'
+ ';
+ $this->Conn->Query($sql);
+ }
+
+ /**
+ * Set tree update flag
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnSave(&$event)
+ {
+ parent::OnSave($event);
+
+ if ( $event->status != kEvent::erSUCCESS ) {
+ return;
+ }
+
+ $this->Application->StoreVar('RefreshPromoBlocksTree', 1);
+ }
+
+
+ /**
+ * Set tree update flag
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnMassDelete(&$event)
+ {
+ parent::OnMassDelete($event);
+
+ if ( $event->status != kEvent::erSUCCESS ) {
+ return;
+ }
+
+ $this->Application->StoreVar('RefreshPromoBlocksTree', 1);
+ }
+}
Index: core/units/promo_block_groups/promo_block_group_tp.php
===================================================================
--- core/units/promo_block_groups/promo_block_group_tp.php (revision 0)
+++ core/units/promo_block_groups/promo_block_group_tp.php (revision 0)
@@ -0,0 +1,44 @@
+getObject($params);
+ /* @var $object kDBItem */
+
+ $field = $this->SelectParam($params, 'field');
+ $block_params['name'] = $this->SelectParam($params, 'render_as,block');
+ $categories = explode(';', $object->GetDBField($field));
+
+ $o = '';
+ foreach ($categories AS $category_id) {
+ if ($category_id) {
+ $block_params['cat_id'] = $category_id;
+ $o .= $this->Application->ParseBlock($block_params);
+ }
+ }
+ return $o;
+ }
+}
Index: core/units/promo_block_groups/promo_block_groups_config.php
===================================================================
--- core/units/promo_block_groups/promo_block_groups_config.php (revision 0)
+++ core/units/promo_block_groups/promo_block_groups_config.php (revision 0)
@@ -0,0 +1,121 @@
+ 'promo-block-group',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'PromoBlockGroupEventHandler', 'file' => 'promo_block_group_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'PromoBlockGroupTagProcessor', 'file' => 'promo_block_group_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'PerPage',
+ 4 => 'event',
+ 5 => 'mode',
+ ),
+
+ 'IDField' => 'PromoBlockGroupId',
+
+ 'TableName' => TABLE_PREFIX . 'PromoBlockGroups',
+
+ 'TitleField' => 'Title',
+
+ 'StatusField' => Array('Status'),
+
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('promo-block-group' => '!la_title_AddingPromoBlockGroup!'),
+ 'edit_status_labels' => Array ('promo-block-group' => '!la_title_EditingPromoBlockGroup!'),
+ ),
+
+ 'promo_block_group_list' => Array ('prefixes' => Array ('promo-block-group_List'), 'format' => "!la_tab_PromoBlockGroups! (#promo-block-group_recordcount#)"),
+ 'promo_block_group_edit' => Array ('prefixes' => Array ('promo-block-group'), 'format' => "#promo-block-group_status# '#promo-block-group_titlefield#'"),
+ ),
+
+ 'PermSection' => Array('main' => 'in-portal:promo_block_groups'),
+
+ 'Sections' => Array (
+ 'in-portal:promo_block_groups' => Array(
+ 'parent' => 'in-portal:site',
+ 'icon' => 'form',
+ 'use_parent_header' => 1,
+ 'label' => 'la_tab_PromoBlocks',
+ 'url' => Array('t' => 'promo_block_groups/promo_block_group_list', 'pass' => 'm'),
+ 'late_load' => Array ('t' => 'promo_block_groups/tree_section_xml', 'pass' => 'm', 'm_cat_id' => 0, 'section_name' => 'in-portal:promo_block_groups'),
+ 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'priority' => 7,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'AssignedToSections' => '(SELECT GROUP_CONCAT(CategoryId SEPARATOR ";") FROM '.TABLE_PREFIX.'Category WHERE PromoBlockGroupId = %1$s.PromoBlockGroupId)',
+ ),
+ ),
+
+
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s FROM %1$s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Title' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'PromoBlockGroupId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Title' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'not_null' => 1, 'required' => 1, 'default' => '',
+ ),
+ 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1,
+ ),
+ 'RotationDelay' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '7.00'),
+ 'TransitionTime' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.60'),
+ 'TransitionControls' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1,
+ ),
+ 'TransitionEffect' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array ('fade' => 'la_opt_AnimationFade', 'slide' => 'la_opt_AnimationSlide', '-1' => 'la_opt_AnimationCustom'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => '',
+ ),
+ 'TransitionEffectCustom' => Array (
+ 'type' => 'string',
+ 'error_field' => 'TransitionEffect',
+ 'formatter' => 'kFormatter',
+ 'not_null' => 1, 'default' => '',
+ ),
+ ),
+
+ 'VirtualFields' => Array(
+ 'AssignedToSections' => Array('type' => 'string'),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Fields' => Array (
+ 'PromoBlockGroupId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Title' => Array ('filter_block' => 'grid_like_filter'),
+ 'Status' => Array ('filter_block' => 'grid_options_filter'),
+ 'RotationDelay' => Array ('filter_block' => 'grid_range_filter'),
+ 'TransitionTime' => Array ('filter_block' => 'grid_range_filter'),
+ 'TransitionControls' => Array ('filter_block' => 'grid_options_filter'),
+ 'TransitionEffect' => Array ('filter_block' => 'grid_options_filter'),
+ 'TransitionEffectCustom' => Array ('filter_block' => 'grid_like_filter'),
+ ),
+ ),
+ ),
+);
Index: core/units/promo_blocks/promo_block_eh.php
===================================================================
--- core/units/promo_blocks/promo_block_eh.php (revision 14902)
+++ core/units/promo_blocks/promo_block_eh.php (working copy)
@@ -74,18 +74,24 @@
{
parent::SetCustomQuery($event);
- if ( $this->Application->isAdminUser ) {
+ $object =& $event->getObject();
+ /* @var $object kDBList */
+
+ if ( $this->Application->isAdmin ) {
+ $object->addFilter('promo_group', '%1$s.PromoBlockGroupId= ' . $this->Application->GetVar('group_id'));
return;
}
- $object =& $event->getObject();
- /* @var $object kDBList */
+ $group_id = $event->getEventParam('group_id');
+ if (!$group_id) {
+ $group_id = $this->Application->GetVar('m_cat_id');
+;
+ }
- if ( $event->Special == 'home' ) {
- $object->addFilter('status_filter', '%1$s.Status = ' . STATUS_ACTIVE);
- $object->addFilter('scheduled_from_filter', '%1$s.ScheduleFromDate IS NULL OR %1$s.ScheduleFromDate <= ' . TIMENOW);
- $object->addFilter('scheduled_to_filter', '%1$s.ScheduleToDate IS NULL OR %1$s.ScheduleToDate >= ' . TIMENOW);
- }
+ $object->addFilter('status_filter', '%1$s.Status = ' . STATUS_ACTIVE);
+ $object->addFilter('scheduled_from_filter', '%1$s.ScheduleFromDate IS NULL OR %1$s.ScheduleFromDate <= ' . TIMENOW);
+ $object->addFilter('scheduled_to_filter', '%1$s.ScheduleToDate IS NULL OR %1$s.ScheduleToDate >= ' . TIMENOW);
+ $object->addFilter('promo_group', '%1$s.PromoBlockGroupId= ' . $group_id);
}
/**
@@ -288,6 +294,9 @@
$fields['CategoryId']['options'] = $category_helper->getStructureTreeAsOptions();
+ $this->Application->LinkVar('group_id');
+ $fields['PromoBlockGroupId']['default'] = $this->Application->GetVar('group_id');
+
// images multilang fields
$a_image = Array(
'type' => 'string', 'max_len' => 255,
Index: core/units/promo_blocks/promo_block_tp.php
===================================================================
--- core/units/promo_blocks/promo_block_tp.php (revision 14902)
+++ core/units/promo_blocks/promo_block_tp.php (working copy)
@@ -55,4 +55,33 @@
return $object->GetDBField('OpenInNewWindow');
}
+
+ /**
+ * Get value from corresponding PromoGroupBlocks record
+ *
+ * @param Array $params
+ * @return bool
+ * @access protected
+ */
+ protected function GetGroupSetting($params)
+ {
+ static $group_data;
+
+ $category_id = $this->Application->GetVar('m_cat_id');
+
+ if (isset($params['group_id'])) {
+ $category_id = $params['group_id'];
+ }
+
+ if (!isset($group_data[$category_id])) {
+
+ $category = $this->Application->recallObject('st');
+ /* @var $category CategoriesItem */
+
+ $sql = 'SELECT * FROM '.TABLE_PREFIX.'PromoBlockGroups WHERE PromoBlockGroupId = '.$category->GetDBField('PromoBlockGroupId');
+ $group_data[$category_id] = $this->Conn->GetRow($sql);
+ }
+
+ return $group_data[$category_id][$params['name']];
+ }
}
Index: core/units/promo_blocks/promo_blocks_config.php
===================================================================
--- core/units/promo_blocks/promo_blocks_config.php (revision 14902)
+++ core/units/promo_blocks/promo_blocks_config.php (working copy)
@@ -37,26 +37,18 @@
'Sections' => Array (
'in-portal:promo_blocks' => Array(
- 'parent' => 'in-portal:site',
- 'icon' => 'custom',
- 'label' => 'la_tab_PromoBlocks',
- 'url' => Array('t' => 'promo_blocks/promo_block_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 7,
- 'type' => stTREE,
+ 'parent' => 'in-portal:promo_block_groups',
+ 'icon' => 'form',
+ 'use_parent_header' => 1,
+ 'label' => 'la_tab_PromoBlocks',
+ 'url' => Array('t' => 'promo_blocks/promo_block_list', 'pass' => 'm'),
+ 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'priority' => 1,
+ 'type' => smHIDE,
),
-
- 'in-portal:configure_promo_blocks' => Array (
- 'parent' => 'in-portal:website_setting_folder',
- 'icon' => 'custom',
- 'label' => 'la_title_PromoBlocks',
- 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array ('view', 'edit'),
- 'priority' => 3,
- 'type' => stTREE,
- ),
),
+
'CalculatedFields' => Array (
'' => Array (
'ConversionPercent' => 'IF(%1$s.NumberOfViews > 0, NumberOfClicks / NumberOfViews * 100, NULL)',
@@ -75,6 +67,14 @@
'Fields' => Array (
'BlockId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'PromoBlockGroupId' => Array (
+ 'type' => 'int', 'required' => 1,
+ 'not_null' => 1, 'default' => 0,
+ 'options_sql' => 'SELECT Title, PromoBlockGroupId
+ FROM ' . TABLE_PREFIX . 'PromoBlockGroups
+ ORDER BY Title',
+ 'option_title_field' => 'Title', 'option_key_field' => 'PromoBlockGroupId',
+ ),
'Title' => Array (
'type' => 'string', 'max_len' => 50,
'not_null' => 1, 'required' => 1, 'default' => '',
|