File tree 3 files changed +40
-4
lines changed
3 files changed +40
-4
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,9 @@ viewResultItem channel show item =
154
154
155
155
else
156
156
[]
157
+
158
+ open =
159
+ SearchMsg ( Search . ShowDetails item. source. name)
157
160
in
158
161
[]
159
162
-- DEBUG: |> List.append
@@ -175,10 +178,22 @@ viewResultItem channel show item =
175
178
-- DEBUG: ]
176
179
|> List . append
177
180
( tr
178
- [ onClick ( SearchMsg ( Search . ShowDetails item . source . name ))
181
+ [ onClick open
179
182
, Search . elementId item. source. name
180
183
]
181
- [ td [] [ text item. source. name ]
184
+ [ td []
185
+ [ Html . button
186
+ [ class " search-result-button"
187
+ , Html . Events . custom " click" <|
188
+ Json . Decode . succeed
189
+ { message = open
190
+ , stopPropagation = True
191
+ , preventDefault = True
192
+ }
193
+ ]
194
+ [ text item. source. name
195
+ ]
196
+ ]
182
197
]
183
198
:: packageDetails
184
199
)
Original file line number Diff line number Diff line change @@ -194,6 +194,9 @@ viewResultItem channel show item =
194
194
195
195
else
196
196
[]
197
+
198
+ open =
199
+ SearchMsg ( Search . ShowDetails item. source. attr_name)
197
200
in
198
201
[]
199
202
-- DEBUG: |> List.append
@@ -222,10 +225,21 @@ viewResultItem channel show item =
222
225
-- DEBUG: ]
223
226
|> List . append
224
227
( tr
225
- [ onClick ( SearchMsg ( Search . ShowDetails item . source . attr_name ))
228
+ [ onClick open
226
229
, Search . elementId item. source. attr_name
227
230
]
228
- [ td [] [ text <| item. source. attr_name ]
231
+ [ td []
232
+ [ Html . button
233
+ [ class " search-result-button"
234
+ , Html . Events . custom " click" <|
235
+ Json . Decode . succeed
236
+ { message = open
237
+ , stopPropagation = True
238
+ , preventDefault = True
239
+ }
240
+ ]
241
+ [ text item. source. attr_name ]
242
+ ]
229
243
, td [] [ text item. source. pname ]
230
244
, td [] [ text item. source. pversion ]
231
245
, td [] [ text <| Maybe . withDefault " " item. source. description ]
Original file line number Diff line number Diff line change @@ -88,6 +88,13 @@ header .navbar.navbar-static-top {
88
88
tbody > td > dl > dd {
89
89
margin-bottom : 1em ;
90
90
}
91
+
92
+ .search-result-button {
93
+ margin : 0 ;
94
+ padding : 0 ;
95
+ border : 0 ;
96
+ background : transparent ;
97
+ }
91
98
}
92
99
93
100
.sort-form ,
You can’t perform that action at this time.
0 commit comments