Skip to content

Commit 6a3ce86

Browse files
author
Robinson Tryon
committed
EOL: Notify user when an EOL version has been selected
This commit expands on the previous EOL commit and implements a basic EOL/unsupported version warning whenever a user selects a flagged version in the drop-down box. NOTE: I wasn't able to get the jquery .get() function to properly load the data file, so the list of unsupport versions is currently hard-coded in bug.js. When we get that issue ironed-out, we'll want to actually read the data from that file.
1 parent 1a4f174 commit 6a3ce86

File tree

2 files changed

+54
-2
lines changed

2 files changed

+54
-2
lines changed

bug/bug.js

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,26 @@
195195
$.bug.current_step('details');
196196
}
197197
element.show();
198+
// Start by hiding the end-of-life message.
199+
var uv_element = $('.state_details .unsupported-versions');
200+
uv_element.hide();
201+
202+
// Grab the list of unsupported versions and stuff the
203+
// versions into an array.
204+
var uv_array = new Array();
205+
206+
/* -- I can't seem to get the file to load properly, so I'll
207+
-- just hard-code the values for now.
208+
var jqxhr = $.get("unsupported-versions/file/here", function(data){
209+
//uv_array = data.split("\n");
210+
console.log("Something...here ");
211+
//console.log(uv_array);
212+
})
213+
.done(function() { console.log("done here..."); })
214+
.fail(function() { console.log("GET failed"); });
215+
*/
216+
uv_array = ["3.5 all versions", "3.4 all versions", "3.3 all versions"];
217+
198218
$('.active_subcomponent .select', element).select();
199219
$('.active_subcomponent .select .choice', element).click(function() {
200220
$.bug.refresh_related_bugs();
@@ -205,12 +225,24 @@
205225
});
206226
$(".select", element).select();
207227
$(".state_details .versions .choice[data='NONE']").remove();
228+
// When the user selects a version in the drop-down box,
229+
// run this function.
208230
$(".versions .select .choice", element).click(function() {
209231
$.bug.lo_version = $('.state_details .versions .chosen').attr('data');
210232
$.bug.lo_version_id = $('.state_details .versions .chosen').attr('idvalue');
211-
if ($.bug.sub_component != 'EMPTY' && $.bug.op_sys != '' && $.bug.regression != '') {
212-
$.bug.state_description();
233+
if ($.bug.sub_component != 'EMPTY' &&
234+
$.bug.op_sys != '' &&
235+
$.bug.regression != '') {
236+
$.bug.state_description();
213237
}
238+
239+
// If this version is unsupported, display a warning
240+
// message.
241+
if($.inArray($.bug.lo_version, uv_array) >= 0) {
242+
uv_element.show();
243+
} else {
244+
uv_element.hide();
245+
}
214246
});
215247
$(".select", element).select();
216248
$(".op_sys .select .choice", element).click(function() {

en/bug.xhtml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,26 @@ Thank you for using LibreOffice and for helping us improve our software. This as
178178
</div>
179179
</div>
180180

181+
<div class="state state_details">
182+
<div class="inlineblock">
183+
<div class="state state_details unsupported-versions">
184+
<div class="end-of-life-message">
185+
<!-- End of life message to be displayed when a user selects a version
186+
that is listed in unsupported-versions.txt
187+
-->
188+
<p>The Document Foundation is no longer supporting this version of LibreOffice as it has reached its <a href="https://wiki.documentfoundation.org/ReleasePlan#End_of_Life_Releases">End of Life</a>. We encourage you to update to a new release and see if your bug is still present:
189+
</p>
190+
<ul>
191+
<li><a href="https://wiki.documentfoundation.org/QA/BSA/Update_LibreOffice#Windows">Windows</a></li>
192+
<li><a href="https://wiki.documentfoundation.org/QA/BSA/Update_LibreOffice#OSX">Mac OSX</a></li>
193+
<li><a href="https://wiki.documentfoundation.org/QA/BSA/Update_LibreOffice#Ubuntu">Ubuntu</a></li>
194+
<li><a href="https://wiki.documentfoundation.org/QA/BSA/Update_LibreOffice#Generic_Linux">Linux (generic)</a></li>
195+
</ul>
196+
</div>
197+
</div>
198+
</div>
199+
</div>
200+
181201
<div class="state state_description">
182202
<div class="subject input-label">Subject:</div>
183203
<div class="subject-input"><input type="text" class="short" size="50"></input></div>

0 commit comments

Comments
 (0)