Skip to content

Commit

Permalink
convert cp_add_device.cgi to DOS line endings to fix CI issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-maus committed Aug 17, 2024
1 parent 2b48c49 commit 91fc673
Show file tree
Hide file tree
Showing 4 changed files with 2,118 additions and 2,121 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ jobs:
with:
ignore: '**/node_modules/** **/codemirror/README.md'

- name: Setup remote debug tmate session
uses: mxschmitt/action-tmate@v3

- name: Check Package consistency
run: |
pip install flake8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
--- occu/WebUI/www/config/cp_add_device.cgi.orig
+++ occu/WebUI/www/config/cp_add_device.cgi
@@ -184,6 +184,47 @@
set html ""
set iFace "HmIP-RF"

+ append html "<script type='text/javascript'>"
+ append html "QR_changed = function()"
+ append html "{"
+ append html "var qrcode = jQuery(\"#QRHmIPLocal_$iFace\").val();"
+ append html "if(qrcode == \"\") {"
+ append html "jQuery(\"#keyHmIPLocal_$iFace\").val(\"\");"
+ append html "jQuery(\"#serialHmIPLocal_$iFace\").val(\"\");"
+ append html "jQuery(\"#keyHmIPLocal_$iFace\").prop('disabled', false);"
+ append html "jQuery(\"#serialHmIPLocal_$iFace\").prop('disabled', false);"
+ append html "} else {"
+ append html "jQuery(\"#keyHmIPLocal_$iFace\").prop('disabled', true);"
+ append html "jQuery(\"#serialHmIPLocal_$iFace\").prop('disabled', true);"
+ append html "if(qrcode.length == 65){"
+ append html "var SubString1 = qrcode.substr(0,6);"
+ append html "var SubString2 = qrcode.substr(6,24);"
+ append html "var SubString3 = qrcode.substr(30,3);"
+ append html "var SubString4 = qrcode.substr(33,32);"
+ append html "if((SubString1 == \"EQ01SG\") && (SubString3 == \"DLK\")){"
+ append html "jQuery(\"#keyHmIPLocal_$iFace\").val(SubString2);"
+ append html "jQuery(\"#serialHmIPLocal_$iFace\").val(SubString4);"
+ append html "} else {"
+ append html "alert(translateKey(\"lblTeachInQRCodeFaulty\"));"
+ append html "}"
+ append html "} else {"
+ append html "alert(translateKey(\"lblTeachInQRCodeFaulty\"));"
+ append html "}"
+ append html "}"
+ append html "};"
+
+ append html "KEY_OR_SGTIN_changed = function()"
+ append html "{"
+ append html "var key = jQuery(\"#keyHmIPLocal_$iFace\").val();"
+ append html "var sgtin = jQuery(\"#serialHmIPLocal_$iFace\").val();"
+ append html "if((key == \"\") && (sgtin == \"\")) {"
+ append html "jQuery(\"#QRHmIPLocal_$iFace\").prop('disabled', false);"
+ append html "} else if ((key == \"\") || (sgtin == \"\")){"
+ append html "jQuery(\"#QRHmIPLocal_$iFace\").prop('disabled', true);"
+ append html "}"
+ append html "};"
+ append html "</script>"
+
append html "<tr id='section$iFace' class='CLASS21202 hidden'>"

append html "<td class='CLASS21207'>"
set html ""
set iFace "HmIP-RF"

+ append html "<script type='text/javascript'>"
+ append html "QR_changed = function()"
+ append html "{"
+ append html "var qrcode = jQuery(\"#QRHmIPLocal_$iFace\").val();"
+ append html "if(qrcode == \"\") {"
+ append html "jQuery(\"#keyHmIPLocal_$iFace\").val(\"\");"
+ append html "jQuery(\"#serialHmIPLocal_$iFace\").val(\"\");"
+ append html "jQuery(\"#keyHmIPLocal_$iFace\").prop('disabled', false);"
+ append html "jQuery(\"#serialHmIPLocal_$iFace\").prop('disabled', false);"
+ append html "} else {"
+ append html "jQuery(\"#keyHmIPLocal_$iFace\").prop('disabled', true);"
+ append html "jQuery(\"#serialHmIPLocal_$iFace\").prop('disabled', true);"
+ append html "if(qrcode.length == 65){"
+ append html "var SubString1 = qrcode.substr(0,6);"
+ append html "var SubString2 = qrcode.substr(6,24);"
+ append html "var SubString3 = qrcode.substr(30,3);"
+ append html "var SubString4 = qrcode.substr(33,32);"
+ append html "if((SubString1 == \"EQ01SG\") && (SubString3 == \"DLK\")){"
+ append html "jQuery(\"#keyHmIPLocal_$iFace\").val(SubString2);"
+ append html "jQuery(\"#serialHmIPLocal_$iFace\").val(SubString4);"
+ append html "} else {"
+ append html "alert(translateKey(\"lblTeachInQRCodeFaulty\"));"
+ append html "}"
+ append html "} else {"
+ append html "alert(translateKey(\"lblTeachInQRCodeFaulty\"));"
+ append html "}"
+ append html "}"
+ append html "};"
+
+ append html "KEY_OR_SGTIN_changed = function()"
+ append html "{"
+ append html "var key = jQuery(\"#keyHmIPLocal_$iFace\").val();"
+ append html "var sgtin = jQuery(\"#serialHmIPLocal_$iFace\").val();"
+ append html "if((key == \"\") && (sgtin == \"\")) {"
+ append html "jQuery(\"#QRHmIPLocal_$iFace\").prop('disabled', false);"
+ append html "} else if ((key == \"\") || (sgtin == \"\")){"
+ append html "jQuery(\"#QRHmIPLocal_$iFace\").prop('disabled', true);"
+ append html "}"
+ append html "};"
+ append html "</script>"
+
append html "<tr id='section$iFace' class='CLASS21202 hidden'>"

append html "<td class='CLASS21207'>"
@@ -236,7 +277,7 @@
append html "<span>\${lblTeachInKEY}</span>"
append html "</td>"
append html "<td>"
- append html "<input id='keyHmIPLocal_$iFace' type='text' style='width:390px'>"
+ append html "<input id='keyHmIPLocal_$iFace' type='text' style='width:390px' onchange='KEY_OR_SGTIN_changed()'>"
append html "</td>"
append html "</tr>"

append html "<span>\${lblTeachInKEY}</span>"
append html "</td>"
append html "<td>"
- append html "<input id='keyHmIPLocal_$iFace' type='text' style='width:390px'>"
+ append html "<input id='keyHmIPLocal_$iFace' type='text' style='width:390px' onchange='KEY_OR_SGTIN_changed()'>"
append html "</td>"
append html "</tr>"

@@ -245,7 +286,16 @@
append html "<span>\${lblTeachInSGTIN}</span>"
append html "</td>"
append html "<td>"
- append html "<input id='serialHmIPLocal_$iFace' type='text' style='width:390px;'>"
+ append html "<input id='serialHmIPLocal_$iFace' type='text' style='width:390px' onchange='KEY_OR_SGTIN_changed()'>"
+ append html "</td>"
+ append html "</tr>"
+
+ append html "<tr>"
+ append html "<td style='text-align: right'>"
+ append html "<span>\${lblTeachInQRCode}</span>"
+ append html "</td>"
+ append html "<td>"
+ append html "<input id='QRHmIPLocal_$iFace' type='text' style='width:390px' onchange='QR_changed()'>"
append html "</td>"
append html "</tr>"

append html "<span>\${lblTeachInSGTIN}</span>"
append html "</td>"
append html "<td>"
- append html "<input id='serialHmIPLocal_$iFace' type='text' style='width:390px;'>"
+ append html "<input id='serialHmIPLocal_$iFace' type='text' style='width:390px' onchange='KEY_OR_SGTIN_changed()'>"
+ append html "</td>"
+ append html "</tr>"
+
+ append html "<tr>"
+ append html "<td style='text-align: right'>"
+ append html "<span>\${lblTeachInQRCode}</span>"
+ append html "</td>"
+ append html "<td>"
+ append html "<input id='QRHmIPLocal_$iFace' type='text' style='width:390px' onchange='QR_changed()'>"
append html "</td>"
append html "</tr>"

--- occu/WebUI/www/webui/js/lang/de/translate.lang.extension.js.orig
+++ occu/WebUI/www/webui/js/lang/de/translate.lang.extension.js
@@ -660,7 +660,7 @@
Expand Down
Loading

0 comments on commit 91fc673

Please sign in to comment.