Update html controls with classnames, add in packagename-panel class to css

This commit is contained in:
Brian Read 2024-09-22 11:57:14 +01:00
parent 53d10a96fa
commit 0ed0d09811
15 changed files with 56 additions and 58 deletions

View File

@ -1,5 +1,5 @@
# #
# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-19 12:07:43 # Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-22 11:42:48
# #
# #
# Routines to be edited by the developer to provide validation for parameters # Routines to be edited by the developer to provide validation for parameters

View File

@ -1,6 +1,6 @@
package SrvMngr::Controller::CreateStarterWebsite; package SrvMngr::Controller::CreateStarterWebsite;
# #
# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-19 12:07:43 # Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-22 11:42:48
# #
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# heading : Miscellaneous # heading : Miscellaneous

View File

@ -1,5 +1,5 @@
%# %#
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-19 12:07:43 %# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-22 11:42:48
%# %#
<div id="CreateStarterWebsite-PARAMS" class="partial CreateStarterWebsite-PARAMS"> <div id="CreateStarterWebsite-PARAMS" class="partial CreateStarterWebsite-PARAMS">
<script> <script>
@ -17,9 +17,9 @@
%= hidden_field 'trt' => $csw_data->{trt} %= hidden_field 'trt' => $csw_data->{trt}
%# Inputs etc in here. %# Inputs etc in here.
<h1><%=l('csw_Create_a_starter_website')%></h1> <h1 class='head'><%=l('csw_Create_a_starter_website')%></h1>
<h2><%=l('csw_Manage_CreateStarterWebsite_settings:')%></h2> <h2 class='subh'><%=l('csw_Manage_CreateStarterWebsite_settings:')%></h2>
<p class='paragraph para1'> <p class='paragraph para1'>
%=l('csw_To_create_a_simple_web') %=l('csw_To_create_a_simple_web')
@ -96,10 +96,6 @@
%=l('csw_Do_you_wish_to_proceed?') %=l('csw_Do_you_wish_to_proceed?')
</p> </p>
<span class='data'>
%= submit_button l('csw_Create'), class => 'action'
</span>
%# Probably finally by a submit. %# Probably finally by a submit.
%end %end
</div> </div>

View File

@ -1,6 +1,7 @@
/* /*
Generated by SM2Gen version: SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-19 12:07:43 Generated by SM2Gen version: SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-22 11:42:48
*/ */
.CreateStarterWebsite-panel {}
.name {} .name {}
.rout {} .rout {}
.head {} .head {}

View File

@ -1,5 +1,5 @@
%# %#
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-19 12:07:43 %# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-22 11:42:48
%# %#
% layout 'default', title => "Sme server 2 - Create Starter Website", share_dir => './'; % layout 'default', title => "Sme server 2 - Create Starter Website", share_dir => './';
%# css specific to this panel: %# css specific to this panel:

View File

@ -1,21 +1,20 @@
# #
# Generated by SM2Gen version: SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-19 12:07:43 # Generated by SM2Gen version: SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-22 11:42:48
# #
'csw_Create_a_starter_website' => 'Create a starter website', 'csw_You_can_leave_any_field' => 'You can leave any field blank if you do not need it. ',
'csw_The_text_that_you_enter' => 'The text that you enter below will be line wrapped for a nicer appearance in your web page. Leave a blank line whenever you want to start a new paragraph. If you need to force a line break without starting a new paragraph (for example after each line of a mailing address), Then type the four-character sequence', 'csw_Do_you_wish_to_proceed?' => 'Do you wish to proceed?',
'csw_First_header,_typically_used_for' => 'First header, Typically used for short phrases such as Leader in the field of textile manufacturing',
'csw_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
'csw_To_create_a_simple_web' => 'To create a simple web page for your company, Fill in the fields below and click onCreate. ',
'csw_Text_following_first_header,_typically' => 'Text following first header, Typically used for a paragraph of marketing information. ',
'csw_Text_following_second_header,_typically' => 'Text following second header, Typically used for contact or ordering information:', 'csw_Text_following_second_header,_typically' => 'Text following second header, Typically used for contact or ordering information:',
'csw_Create_Starter_Website' => 'Create Starter Website', 'csw_Create_Starter_Website' => 'Create Starter Website',
'csw_Do_not_use_this_optionif' => 'Do not use this optionif you have already customized your web site, Since it will overwrite the index. Htm file in your web site directory. ',
'csw_Manage_CreateStarterWebsite_settings:' => 'Manage CreateStarterWebsite settings:',
'csw_' => '',
'csw_Hello_PARAMS' => 'Hello PARAMS', 'csw_Hello_PARAMS' => 'Hello PARAMS',
'csw_The_text_that_you_enter' => 'The text that you enter below will be line wrapped for a nicer appearance in your web page. Leave a blank line whenever you want to start a new paragraph. If you need to force a line break without starting a new paragraph (for example after each line of a mailing address), Then type the four-character sequence',
'csw_Text_following_first_header,_typically' => 'Text following first header, Typically used for a paragraph of marketing information. ',
'csw_Second_header,_typically_used_for' => 'Second header, Typically used for short phrases such as For more information or To order our products:', 'csw_Second_header,_typically_used_for' => 'Second header, Typically used for short phrases such as For more information or To order our products:',
'csw_When_you_create_this_web' => 'When you create this web page, The file index. Htm will be overwritten in your web site directory. ', 'csw_When_you_create_this_web' => 'When you create this web page, The file index. Htm will be overwritten in your web site directory. ',
'csw_Do_you_wish_to_proceed?' => 'Do you wish to proceed?', 'csw_Manage_CreateStarterWebsite_settings:' => 'Manage CreateStarterWebsite settings:',
'csw_Create' => 'Create', 'csw_Do_not_use_this_optionif' => 'Do not use this optionif you have already customized your web site, Since it will overwrite the index. Htm file in your web site directory. ',
'csw_You_can_leave_any_field' => 'You can leave any field blank if you do not need it. ', 'csw_Create_a_starter_website' => 'Create a starter website',
'csw_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
'csw_To_create_a_simple_web' => 'To create a simple web page for your company, Fill in the fields below and click onCreate. ',
'csw_First_header,_typically_used_for' => 'First header, Typically used for short phrases such as Leader in the field of textile manufacturing',
'csw_APPLY' => 'Apply', 'csw_APPLY' => 'Apply',
'csw_' => '',

View File

@ -1,5 +1,5 @@
# #
# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-19 12:30:21 # Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-22 11:30:26
# #
# #
# Routines to be edited by the developer to provide validation for parameters # Routines to be edited by the developer to provide validation for parameters

View File

@ -1,6 +1,6 @@
package SrvMngr::Controller::DiskUsage; package SrvMngr::Controller::DiskUsage;
# #
# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-19 12:30:21 # Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-22 11:30:26
# #
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# heading : Miscellaneous # heading : Miscellaneous

View File

@ -1,5 +1,5 @@
%# %#
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-19 12:30:21 %# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-22 11:30:26
%# %#
<div id="DiskUsage-PARAMS" class="partial DiskUsage-PARAMS"> <div id="DiskUsage-PARAMS" class="partial DiskUsage-PARAMS">
<script> <script>

View File

@ -1,6 +1,7 @@
/* /*
Generated by SM2Gen version: SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-19 12:30:21 Generated by SM2Gen version: SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-22 11:30:26
*/ */
.DiskUsage-panel {}
.name {} .name {}
.rout {} .rout {}
.head {} .head {}
@ -9,7 +10,7 @@
.pref1 {} .pref1 {}
.tabl1 {} .tabl1 {}
thead .tabl1 {} thead .tabl1 {}
tboay .tabl1 {} tbody .tabl1 {}
.tabl2 {} .tabl2 {}
thead .tabl2 {} thead .tabl2 {}
tboay .tabl2 {} tbody .tabl2 {}

View File

@ -1,5 +1,5 @@
%# %#
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-19 12:30:21 %# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-22 11:30:26
%# %#
% layout 'default', title => "Sme server 2 - Disk Usage", share_dir => './'; % layout 'default', title => "Sme server 2 - Disk Usage", share_dir => './';
%# css specific to this panel: %# css specific to this panel:

View File

@ -1,14 +1,14 @@
# #
# Generated by SM2Gen version: SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-19 12:30:21 # Generated by SM2Gen version: SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-22 11:30:26
# #
'du_Hello_PARAMS' => 'Hello PARAMS',
'du_Usage' => 'Usage',
'du_Users' => 'Users',
'du_I-bays' => 'I-bays', 'du_I-bays' => 'I-bays',
'du_Disk_Usage' => 'Disk Usage',
'du_Disk_usage' => 'Disk usage',
'du_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
'du_Manage_DiskUsage_settings:' => 'Manage DiskUsage settings:',
'du_APPLY' => 'Apply', 'du_APPLY' => 'Apply',
'du_Disk_Usage' => 'Disk Usage',
'du_Hello_PARAMS' => 'Hello PARAMS',
'du_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
'du_Wed_Sep_11_19:01:00_BST' => 'Wed Sep 11 19:01:00 BST 2024', 'du_Wed_Sep_11_19:01:00_BST' => 'Wed Sep 11 19:01:00 BST 2024',
'du_Path' => 'Path', 'du_Path' => 'Path',
'du_Usage' => 'Usage',
'du_Users' => 'Users',
'du_Disk_usage' => 'Disk usage',
'du_Manage_DiskUsage_settings:' => 'Manage DiskUsage settings:',

View File

@ -47,11 +47,11 @@
]]></Text> ]]></Text>
<SubHeader><![CDATA[ <SubHeader><![CDATA[
<h2><%=l('${Value}')%></h2>]]> <h2 class='subh${type_serial}'><%=l('${Value}')%></h2>]]>
</SubHeader> </SubHeader>
<Header><![CDATA[ <Header><![CDATA[
<h1><%=l('${Value}')%></h1>]]> <h1 class='head${type_serial}'><%=l('${Value}')%></h1>]]>
</Header> </Header>
<Paragraph><![CDATA[ <Paragraph><![CDATA[
@ -62,7 +62,7 @@
<Submit><![CDATA[ <Submit><![CDATA[
<span class='data'> <span class='data'>
%= submit_button l('${Value}'), class => 'action' %= submit_button l('${Value}'), class => 'action subm${type_serial}'
</span>]]> </span>]]>
</Submit> </Submit>
@ -71,7 +71,7 @@
%=l('${prefix}_${Label}') %=l('${prefix}_${Label}')
</span><span class=data> </span><span class=data>
%=Search field %=Search field
%=search field %=search field , class => 'searc${type_serial}'
</span>span></p> </span>span></p>
]]> ]]>
</search> </search>
@ -80,7 +80,7 @@
<p><span class=label> <p><span class=label>
%=l('${Label}') %=l('${Label}')
</span><span class=data> </span><span class=data>
%=URL field %=URL field , class => 'url${type_serial}'
</span>span></p> </span>span></p>
]]> ]]>
</url> </url>
@ -89,7 +89,7 @@
<p><span class=label> <p><span class=label>
%=l('${Label}') %=l('${Label}')
</span><span class=data> </span><span class=data>
%=tel field %=tel field, class => 'tel${type_serial}'
</span>span></p> </span>span></p>
]]> ]]>
</tel> </tel>
@ -98,7 +98,7 @@
<p><span class=label> <p><span class=label>
%=l('${Label}') %=l('${Label}')
</span><span class=data> </span><span class=data>
%=email field %=email field, class => 'emai${type_serial}'
</span>span></p> </span>span></p>
]]> ]]>
</email> </email>
@ -107,7 +107,7 @@
<p><span class='label'> <p><span class='label'>
%=l('${Label}') %=l('${Label}')
</span><span class=data> </span><span class=data>
%=password field %=password field, class => 'pass${type_serial}'
</span>span></p> </span>span></p>
]]> ]]>
</password> </password>
@ -116,7 +116,7 @@
<p><span class='label'> <p><span class='label'>
%=l('${Label}') %=l('${Label}')
</span><span class=data> </span><span class=data>
%=timedate field %=timedate field, class => 'time${type_serial}'
</span>span></p> </span>span></p>
]]> ]]>
</timedate> </timedate>
@ -125,7 +125,7 @@
<p><span class='label'> <p><span class='label'>
%=l('${Label}') %=l('${Label}')
</span><span class=data> </span><span class=data>
%=week field %=week field, class => 'week${type_serial}'
</span>span></p> </span>span></p>
]]> ]]>
</week> </week>
@ -134,7 +134,7 @@
<p><span class='label'> <p><span class='label'>
%=l('${Label}') %=l('${Label}')
</span><span class=data> </span><span class=data>
%=month field %=month field, class => 'mont${type_serial}'
</span>span></p> </span>span></p>
]]> ]]>
</month> </month>
@ -143,7 +143,7 @@
<p><span class='label'> <p><span class='label'>
%=l('${Label}') %=l('${Label}')
</span><span class=data> </span><span class=data>
%=range field %=range field, class => 'rang${type_serial}'
</span>span></p> </span>span></p>
]]> ]]>
</range> </range>
@ -152,7 +152,7 @@
<p><span class='label'> <p><span class='label'>
%=l('${Label}') %=l('${Label}')
</span><span class=data> </span><span class=data>
%=radio field %=radio field, class => 'radi${type_serial}'
</span>span></p> </span>span></p>
]]> ]]>
</radio> </radio>
@ -161,7 +161,7 @@
<p><span class='label'> <p><span class='label'>
%=l('${Label}') %=l('${Label}')
</span><span class=data> </span><span class=data>
%=number field %=number field, class => 'numb${type_serial}'
</span>span></p> </span>span></p>
]]> ]]>
</number> </number>
@ -170,7 +170,7 @@
<p><span class='label'> <p><span class='label'>
%=l('${Label}') %=l('${Label}')
</span><span class=data> </span><span class=data>
%=file field %=file field, class => 'file${type_serial}'
</span>span></p> </span>span></p>
]]> ]]>
</file> </file>
@ -179,7 +179,7 @@
<p><span class='label'> <p><span class='label'>
%=l('${Label}') %=l('${Label}')
</span><span class=data> </span><span class=data>
%=color field %=color field, class => 'colo${type_serial}'
</span>span></p> </span>span></p>
]]> ]]>
</color> </color>
@ -188,7 +188,7 @@
<p><span class='label'> <p><span class='label'>
%=l('${Label}') %=l('${Label}')
</span><span class=data> </span><span class=data>
%=checkbox field %=checkbox field, class => 'chec${type_serial}'
</span>span></p> </span>span></p>
]]> ]]>
</checkbox> </checkbox>

View File

@ -1,5 +1,5 @@
// //
// Generated by sm1-html-2-json5 version:0.5 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-19 12:30:19 // Generated by sm1-html-2-json5 version:0.5 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-22 11:30:23
// //
{ {
'PackageName': 'DiskUsage', 'PackageName': 'DiskUsage',

View File

@ -602,7 +602,7 @@ if __name__ == "__main__":
acc_css_entries += f".{class_name} {{}}\n" acc_css_entries += f".{class_name} {{}}\n"
if html_Type == "Table": if html_Type == "Table":
acc_css_entries += f"thead .{class_name} {{}}\n" acc_css_entries += f"thead .{class_name} {{}}\n"
acc_css_entries += f"tboay .{class_name} {{}}\n" acc_css_entries += f"tbody .{class_name} {{}}\n"
try: try:
control_template = PageTemplate(html_controls[inner_html["Type"]]) control_template = PageTemplate(html_controls[inner_html["Type"]])
try: try:
@ -665,6 +665,7 @@ if __name__ == "__main__":
# Create the css file (the header, followed by a dumy entry for each class created/used above) # Create the css file (the header, followed by a dumy entry for each class created/used above)
with open(css_file, "w") as file: with open(css_file, "w") as file:
file.write(f"/*\n Generated by SM2Gen version: {strVersion}\n*/\n") file.write(f"/*\n Generated by SM2Gen version: {strVersion}\n*/\n")
file.write(f".{hl('PackageName')}-panel {{}}\n")
file.write(acc_css_entries); file.write(acc_css_entries);
# Now generate the <name>.en file # Now generate the <name>.en file