Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebUI: Missing wordwrap at Variables #236

Closed
Schello805 opened this issue Jan 6, 2018 · 2 comments
Closed

WebUI: Missing wordwrap at Variables #236

Schello805 opened this issue Jan 6, 2018 · 2 comments
Labels
🐛 bug-report Something isn't working 🏷️ WebUI This refs the WebUI component

Comments

@Schello805
Copy link

Schello805 commented Jan 6, 2018

If the Variables to long, the button "select" is missing in overview, during installiert a program. Also the scrolling Bar is not visible.

26678677_1578642045553087_3501776232432210124_o

@jens-maus jens-maus changed the title Missing wordwrap at Variables WebUI: Missing wordwrap at Variables Jan 8, 2018
@jens-maus jens-maus added 🏷️ WebUI This refs the WebUI component 🐛 bug-report Something isn't working labels Jan 8, 2018
@HMside
Copy link
Contributor

HMside commented Feb 28, 2018

we can fix this in /www/webui/style.css

OLD:

.SysVarsTblPopup{
  background-color:$_(inactiveBackground);
  color: $_(textColorB); /* black */
  height:60px;
  text-align:center;
}

NEW:

.SysVarsTblPopup{
  background-color:$_(inactiveBackground);
  color: $_(textColorB); /* black */
  height:60px;
  text-align:center;
  max-width: 215.333px;
  -ms-word-break: break-all;
  word-break: break-all;
  word-break: break-word;
}

@HMside
Copy link
Contributor

HMside commented Feb 28, 2018

We should also make the variables make selectable by clicking on any cell and remove the select button. Just the same as in the selection of devices. The following patches are required. This patches are created with the RaspberryMatic files note with the CCU2 files.

/www/webui/webui.js

--- webui.js.orig
+++ webui.js
@@ -28513,25 +28513,20 @@
       IseSort(arSysVars,this.colName,false,true);
       for (var i = 0; i < arSysVars.length; i++) 
       {
+        var sOnclick = "PopupClose();";
+        if( this.sec ) sOnclick = "restorePrevious();";
+        sOnclick = "saveDlgResult("+arSysVars[i]['id']+");"+sOnclick;
+
         var tr = Builder.node('tr', {id: arSysVars[i]['trid']});
-        var td = Builder.node('td', {className: 'SysVarsTblPopup'}, strCut(translateString(arSysVars[i]['name']), true));
+        var td = Builder.node('td', {className: 'SysVarsTblPopup', onclick:sOnclick}, strCut(translateString(arSysVars[i]['name']), true));
         tr.appendChild(td);
-        td = Builder.node('td', {className: 'SysVarsTblPopup'}, translateString(arSysVars[i]['desc']));
+        td = Builder.node('td', {className: 'SysVarsTblPopup', onclick:sOnclick}, translateString(arSysVars[i]['desc']));
         tr.appendChild(td);
-        td = Builder.node('td', {className: 'SysVarsTblPopup'}, translateString(arSysVars[i]['typenames']));
+        td = Builder.node('td', {className: 'SysVarsTblPopup', onclick:sOnclick}, translateString(arSysVars[i]['typenames']));
         tr.appendChild(td);
-        td = Builder.node('td', {className: 'SysVarsTblPopup'}, translateString(arSysVars[i]['values']));
+        td = Builder.node('td', {className: 'SysVarsTblPopup', onclick:sOnclick}, translateString(arSysVars[i]['values']));
         tr.appendChild(td);
-        td = Builder.node('td', {className: 'SysVarsTblPopup'}, translateString(arSysVars[i]['unit']));
-        tr.appendChild(td);
-        
-        var sOnclick = "PopupClose();";
-        if( this.sec ) sOnclick = "restorePrevious();";
-        sOnclick = "saveDlgResult("+arSysVars[i]['id']+");"+sOnclick;
-      
-        td = Builder.node('td', {className: 'WhiteBkg'}, [
-          Builder.node('div', {className: 'StdButton', onclick:sOnclick}, translateKey('btnSelect'))
-         ]);
+        td = Builder.node('td', {className: 'SysVarsTblPopup', onclick:sOnclick}, translateString(arSysVars[i]['unit']));
         tr.appendChild(td);
 
         tableBody.appendChild(tr);

/www/rega/pages/msg/sysVarsSelection.htm

--- sysVarsSelection.htm.orig
+++ sysVarsSelection.htm
@@ -70,9 +70,8 @@
       <col width="10%" />
       <col width="20%" />
       <col width="15%" />
-      <col width="20%" />
+      <col width="35%" />
       <col width="10%" />
-      <col width="15%" />
     </colgroup>
     <thead id="svsBody">
     <tr id="rowhead">
@@ -84,7 +83,6 @@
       <th class="CLASS00302">${thValues}</th>
       <%string sCssName="Sort"; if(system.GetSessionVar("sessionLS")=="unit"){sCssName="SortSelected";} %>
       <th class="CLASS00302"><div id="unit" class="pt11 <%Write(sCssName); %>" onclick="DivSort('unit');">${thUnit}</div></th>
-      <th class="CLASS00302">${thAction}</th>
     </tr>
     
     <tr id="rowflt">
@@ -131,7 +129,6 @@
             <div id="ftCancelUnitBtn" class='FilterSetButton' onclick="$('btnFilterUnitSub').hide();">${filterClose}</div>
         </div>
       </td>
-      <td class="CLASS00307"></td>
     </tr>
    </thead>
    <tbody id="sysVarDisplay">

@jens-maus jens-maus added this to the 2.31.x.20180324 milestone Mar 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug-report Something isn't working 🏷️ WebUI This refs the WebUI component
Projects
Development

No branches or pull requests

3 participants