Simon Hunt

GUI -- App view -

- adjusted column widths.
- fixed broken escape handler.
- made URL in details pane a hyperlink.

Change-Id: I0e9756ded47a297f5b2f15177678e7de8d37ee37
...@@ -41,12 +41,12 @@ ...@@ -41,12 +41,12 @@
41 <table> 41 <table>
42 <tr> 42 <tr>
43 <td colId="state" class="table-icon" sortable></td> 43 <td colId="state" class="table-icon" sortable></td>
44 - <td colId="icon" col-width="36px">Icon </td> 44 + <td colId="icon" class="table-icon">Icon </td>
45 - <td colId="id" sortable>App ID </td> 45 + <td colId="id" sortable col-width="250px">App ID </td>
46 - <td colId="version" sortable>Version </td> 46 + <td colId="version" sortable col-width="120px">Version </td>
47 - <td colId="category" sortable>Category </td> 47 + <td colId="category" sortable col-width="100px">Category </td>
48 - <td colId="origin" sortable>Origin </td> 48 + <td colId="origin" sortable col-width="100px">Origin </td>
49 - <td colId="desc" col-width="475px">Description </td> 49 + <td colId="desc">Description </td>
50 <td col-width="50px">URL </td> 50 <td col-width="50px">URL </td>
51 </tr> 51 </tr>
52 </table> 52 </table>
......
...@@ -83,10 +83,6 @@ ...@@ -83,10 +83,6 @@
83 return false; 83 return false;
84 } 84 }
85 85
86 - function handleEscape() {
87 - return editNameCancel() || closePanel();
88 - }
89 -
90 function addCloseBtn(div) { 86 function addCloseBtn(div) {
91 is.loadEmbeddedIcon(div, 'plus', 30); 87 is.loadEmbeddedIcon(div, 'plus', 30);
92 div.select('g').attr('transform', 'translate(25, 0) rotate(45)'); 88 div.select('g').attr('transform', 'translate(25, 0) rotate(45)');
...@@ -137,6 +133,11 @@ ...@@ -137,6 +133,11 @@
137 addCell('value', value); 133 addCell('value', value);
138 } 134 }
139 135
136 + function addUrl(tbody, index, value) {
137 + var href = '<a href="' + value + '" target="_blank">' + value + '</a>';
138 + addProp(tbody, index, href);
139 + }
140 +
140 function addIcon(tbody, value) { 141 function addIcon(tbody, value) {
141 var tr = tbody.append('tr'); 142 var tr = tbody.append('tr');
142 var td = tr.append('td'); 143 var td = tr.append('td');
...@@ -166,7 +167,8 @@ ...@@ -166,7 +167,8 @@
166 167
167 // place rest of the fields to the right table 168 // place rest of the fields to the right table
168 propOrder.forEach(function (prop, i) { 169 propOrder.forEach(function (prop, i) {
169 - addProp(rightTbl, i, details[prop]); 170 + var fn = prop === 'url' ? addUrl : addProp;
171 + fn(rightTbl, i, details[prop]);
170 }); 172 });
171 173
172 // place description field to the description table 174 // place description field to the description table
...@@ -450,7 +452,7 @@ ...@@ -450,7 +452,7 @@
450 } 452 }
451 // create key bindings to handle panel 453 // create key bindings to handle panel
452 ks.keyBindings({ 454 ks.keyBindings({
453 - esc: [handleEscape, 'Close the details panel'], 455 + esc: [closePanel, 'Close the details panel'],
454 _helpFormat: ['esc'] 456 _helpFormat: ['esc']
455 }); 457 });
456 ks.gestureNotes([ 458 ks.gestureNotes([
......