Skip to content

Commit cc9bbb0

Browse files
Merge pull request #4322 from IgorA100/patch-152539
Replace old style layouts with new style layouts + added "24 Wide" & "48 Wide" Layouts (montage page)
2 parents b029975 + cb7d7f4 commit cc9bbb0

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

db/zm_create.sql.in

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,16 +1194,17 @@ CREATE TABLE MontageLayouts (
11941194
PRIMARY KEY (`Id`)
11951195
);
11961196

1197-
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('Freeform', '{ "default":{"float":"left","left":"0px","right":"0px","top":"0px","bottom":"0px","width":"auto"} }' );
1198-
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('2 Wide', '{ "default":{"float":"left", "width":"50%","left":"0px","right":"0px","top":"0px","bottom":"0px"} }' );
1199-
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('3 Wide', '{ "default":{"float":"left", "width":"33%","left":"0px","right":"0px","top":"0px","bottom":"0px"} }' );
1200-
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('4 Wide', '{ "default":{"float":"left", "width":"25%","left":"0px","right":"0px","top":"0px","bottom":"0px"} }' );
1201-
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('5 Wide', '{ "default":{"float":"left", "width":"20%","left":"0px","right":"0px","top":"0px","bottom":"0px"} }' );
1202-
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('6 Wide', '{ "default":{"float":"left", "width":"16.6%","left":"0px","right":"0px","top":"0px","bottom":"0px"} }' );
1203-
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('7 Wide', '{ "default":{"float":"left", "width":"14.2%","left":"0px","right":"0px","top":"0px","bottom":"0px"} }' );
1204-
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('8 Wide', '{ "default":{"float":"left", "width":"12.5%","left":"0px","right":"0px","top":"0px","bottom":"0px"} }' );
1205-
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('9 Wide', '{ "default":{"float":"left", "width":"11.1%","left":"0px","right":"0px","top":"0px","bottom":"0px"} }' );
1206-
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('10 Wide', '{ "default":{"float":"left", "width":"10%","left":"0px","right":"0px","top":"0px","bottom":"0px"} }' );
1197+
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('Auto', NULL );
1198+
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('1 Wide', NULL );
1199+
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('2 Wide', NULL );
1200+
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('3 Wide', NULL );
1201+
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('4 Wide', NULL );
1202+
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('6 Wide', NULL );
1203+
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('8 Wide', NULL );
1204+
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('12 Wide', NULL );
1205+
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('16 Wide', NULL );
1206+
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('24 Wide', NULL );
1207+
INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('48 Wide', NULL );
12071208

12081209
CREATE TABLE Sessions (
12091210
id char(32) not null,

web/skins/classic/views/montage.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,18 @@
7777
'6 Wide',
7878
'8 Wide',
7979
'12 Wide',
80-
'16 Wide'
80+
'16 Wide',
81+
'24 Wide',
82+
'48 Wide'
8183
);
8284

8385
/* Create an array "Name"=>layouts to make it easier to find IDs by name */
8486
$layoutsByName = array();
8587
foreach ($layouts as $l) {
88+
/* IMPORTANT!
89+
* Before GridStack integration, instead of the layer name "Auto", we used "Freeform" in the DB.
90+
* Before deleting this check, you need to replace "Freeform" with "Auto" in the DB of already installed ZM !!!
91+
*/
8692
if ($l->Name() == 'Freeform') $l->Name('Auto');
8793
$layoutsByName[$l->Name()] = $l;
8894
}

0 commit comments

Comments
 (0)