Skip to content

Commit

Permalink
choose icon position left or right, when text is aligned center
Browse files Browse the repository at this point in the history
  • Loading branch information
jp112sdl committed Mar 26, 2019
1 parent 1d24c67 commit c075284
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 16 deletions.
21 changes: 14 additions & 7 deletions src/addon/firmware/rftypes/hb-dis-ep-42bw_e_v1_0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,21 @@
<logical type="boolean" default="false"/>
<physical type="integer" interface="config" list="1" index="144.0" size="0.1"/>
</parameter>
<parameter id="HB_EP_ALIGNMENT">
<logical type="option">
<parameter id="HB_EP_ALIGNMENT">
<logical type="option">
<option id="HB_EP_ALIGN_RIGHT" default="true" />
<option id="HB_EP_ALIGN_CENTER" />
<option id="HB_EP_ALIGN_LEFT" />
</logical>
<physical type="integer" interface="config" list="1" index="145.0" size="1"/>
</parameter>
<option id="HB_EP_ALIGN_CENTER_ICON_RIGHT" />
<option id="HB_EP_ALIGN_CENTER_ICON_LEFT" />
<option id="HB_EP_ALIGN_LEFT" />
</logical>
<physical type="integer" interface="config" list="1" index="145.0" size="1"/>
<conversion type="option_integer">
<value_map device_value="0x00" parameter_value="0"/>
<value_map device_value="0x01" parameter_value="1"/>
<value_map device_value="0x03" parameter_value="2"/>
<value_map device_value="0x02" parameter_value="3"/>
</conversion>
</parameter>
<parameter id="TEXTLINE_1">
<logical type="string"/>
<physical type="string" interface="config_string" list="1" index="54" size="16"/>
Expand Down
30 changes: 24 additions & 6 deletions src/addon/install_hb-dis-ep-xxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,16 @@ if [ -z "`cat $webuiFile | grep \"$webuiInsertParam\"`" ]; then
sed -i "s/\($webuiSearchBegin\)/\1$webuiInsert/g" $webuiFile
fi

webuiInsertParam="HB_EP_ALIGN_CENTER"
webuiInsertValue="stringTableHbEpAlignCenter"
webuiInsertParam="HB_EP_ALIGN_CENTER_ICON_RIGHT"
webuiInsertValue="stringTableHbEpAlignCenterIconRight"
webuiInsert="\n"
webuiInsert="${webuiInsert}elvST['$webuiInsertParam'] = '\${$webuiInsertValue}';"
if [ -z "`cat $webuiFile | grep \"$webuiInsertParam\"`" ]; then
sed -i "s/\($webuiSearchBegin\)/\1$webuiInsert/g" $webuiFile
fi

webuiInsertParam="HB_EP_ALIGN_CENTER_ICON_LEFT"
webuiInsertValue="stringTableHbEpAlignCenterIconLeft"
webuiInsert="\n"
webuiInsert="${webuiInsert}elvST['$webuiInsertParam'] = '\${$webuiInsertValue}';"
if [ -z "`cat $webuiFile | grep \"$webuiInsertParam\"`" ]; then
Expand Down Expand Up @@ -101,8 +109,13 @@ if [ -z "`cat $stringtable_deFile | grep \"HB_EP_ALIGN_RIGHT"`" ]; then
echo -e $stringtable_deInsert >> $stringtable_deFile
fi
stringtable_deInsert="HB_EP_ALIGN_CENTER\t\${stringTableHbEpAlignCenter}"
if [ -z "`cat $stringtable_deFile | grep \"HB_EP_ALIGN_CENTER"`" ]; then
stringtable_deInsert="HB_EP_ALIGN_CENTER_ICON_RIGHT\t\${stringTableHbEpAlignCenterIconRight}"
if [ -z "`cat $stringtable_deFile | grep \"HB_EP_ALIGN_CENTER_ICON_RIGHT"`" ]; then
echo -e $stringtable_deInsert >> $stringtable_deFile
fi

stringtable_deInsert="HB_EP_ALIGN_CENTER_ICON_LEFT\t\${stringTableHbEpAlignCenterIconLeft}"
if [ -z "`cat $stringtable_deFile | grep \"HB_EP_ALIGN_CENTER_ICON_LEFT"`" ]; then
echo -e $stringtable_deInsert >> $stringtable_deFile
fi
Expand Down Expand Up @@ -130,8 +143,13 @@ if [ -z "`cat $translate_deFile | grep \"stringTableHbEpAlignRight\"`" ]; then
sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile
fi

translate_deInsert="\n \"stringTableHbEpAlignCenter\" : \"zentriert\","
if [ -z "`cat $translate_deFile | grep \"stringTableHbEpAlignCenter\"`" ]; then
translate_deInsert="\n \"stringTableHbEpAlignCenterIconRight\" : \"zentriert - Icon rechts\","
if [ -z "`cat $translate_deFile | grep \"stringTableHbEpAlignCenterIconRight\"`" ]; then
sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile
fi

translate_deInsert="\n \"stringTableHbEpAlignCenterIconLeft\" : \"zentriert - Icon links\","
if [ -z "`cat $translate_deFile | grep \"stringTableHbEpAlignCenterIconLeft\"`" ]; then
sed -i "s/\($translate_deSearch\)/\1$translate_deInsert/g" $translate_deFile
fi

Expand Down
12 changes: 9 additions & 3 deletions src/addon/uninstall_hb-dis-ep-xxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ webuiSearch="HB_EP_ALIGNMENT"
sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="HB_EP_ALIGN_RIGHT"
sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="HB_EP_ALIGN_CENTER"
webuiSearch="HB_EP_ALIGN_CENTER_ICON_RIGHT"
sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="HB_EP_ALIGN_CENTER_ICON_LEFT"
sed -i "/\($webuiSearch\)/d" $webuiFile
webuiSearch="HB_EP_ALIGN_LEFT"
sed -i "/\($webuiSearch\)/d" $webuiFile
Expand All @@ -33,7 +35,9 @@ stringtable_deSearch="HB_EP_ALIGNMENT"
sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="HB_EP_ALIGN_RIGHT"
sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="HB_EP_ALIGN_CENTER"
stringtable_deSearch="HB_EP_ALIGN_CENTER_ICON_RIGHT"
sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="HB_EP_ALIGN_CENTER_ICON_LEFT"
sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
stringtable_deSearch="HB_EP_ALIGN_LEFT"
sed -i "/\($stringtable_deSearch\)/d" $stringtable_deFile
Expand All @@ -45,7 +49,9 @@ translate_deSearch="stringTableHbEpAlignment"
sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="stringTableHbEpAlignRight"
sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="stringTableHbEpAlignCenter"
translate_deSearch="stringTableHbEpAlignCenterIconRight"
sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="stringTableHbEpAlignCenterIconLeft"
sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
translate_deSearch="stringTableHbEpAlignLeft"
sed -i "/\(${translate_deSearch}\)/d" $translate_deFile
Expand Down

0 comments on commit c075284

Please sign in to comment.