bug/bug/bug.js | 13 +++++++++---- bug/bug/select.js | 1 + bug/components.xsl | 1 + bug/op_sys.pl | 2 +- bug/query.pl | 4 ++-- bug/subcomponents.xsl | 3 ++- 6 files changed, 16 insertions(+), 8 deletions(-)
New commits: commit 9e5b161bf41ce4c6adb030fd57c0a3f822c3cc85 Author: Rob Snelders <programm...@ertai.nl> Date: Thu Dec 13 21:40:36 2012 +0100 regression-version needs to be older then the version of the bug. diff --git a/bug/bug/bug.js b/bug/bug/bug.js index 9b3d3bd..a1d3b7b 100644 --- a/bug/bug/bug.js +++ b/bug/bug/bug.js @@ -96,9 +96,11 @@ url: '', token: '', sub_component: 'EMPTY', - lo_version: '', op_sys: '', + lo_version: '', regression: '', + lo_version_id: '', + regression_id: '', state_signin_error_regexps: [/CLASS="THROW_ERROR">([^<]*)/i], state_signin_success_regexp: /LOG&NBSP;OUT<\/A>([^<]*)/i, @@ -177,6 +179,7 @@ $(".state_details .versions .choice[data='NONE']").remove(); $(".versions .select .choice", element).click(function() { $.bug.lo_version = $('.state_details .versions .chosen').attr('data'); + $.bug.lo_version_id = $('.state_details .versions .chosen').attr('idvalue'); if ($.bug.subcomponent != 'EMPTY' && $.bug.op_sys != '' && $.bug.regression != '') { $.bug.state_description(); } @@ -191,6 +194,7 @@ $(".select", element).select(); $(".regression .select .choice", element).click(function() { $.bug.regression = $('.state_details .regression .chosen').attr('data'); + $.bug.regression_id = $('.state_details .regression .chosen').attr('idvalue'); if ($.bug.subcomponent != 'EMPTY' && $.bug.lo_version != '' && $.bug.op_sys != '') { $.bug.state_description(); } @@ -273,9 +277,10 @@ //Add Operating System var op_sys = $('.state_op_sys .chosen').attr('data'); var comment = $('.state_description .long').val(); - var regression = (($.bug.regression != "NONE" && $.bug.regression != "")?$.bug.regression:""); + if (($.bug.regression_id >= 0) && ($.bug.regression_id <= $.bug.version_id)) + $.bug.regression_id = -1; comment = comment + "\nOperating System: " + $(".op_sys .chosen").text(); - comment = comment + ((regression != "")?"\nLast worked in: " + regression:""); + comment = comment + (($.bug.regression_id >= 0)?"\nLast worked in: " + $.bug.regression:""); $("body").css("cursor", "progress"); $('input[name="token"]', form).val($.bug.token); $('input[name="component"]', form).val(component); @@ -283,7 +288,7 @@ $('input[name="op_sys"]', form).val($.bug.op_sys); $('input[name="short_desc"]', form).val(short_desc); $('input[name="comment"]', form).val(comment); - $('input[name="keywords"]', form).val(((regression != "")?"regression":"")); + $('input[name="keywords"]', form).val((($.bug.regression_id >= 0)?"regression":"")); $.bug.token = ''; return true; }); diff --git a/bug/bug/select.js b/bug/bug/select.js index 54aef31..5fcd914 100644 --- a/bug/bug/select.js +++ b/bug/bug/select.js @@ -36,6 +36,7 @@ $('li', this).click(function() { $('.chosen', element). attr('data', $(this).attr('data')). + attr('idvalue', $(this).attr('idvalue')). text($(this).text()); $('.choices', element).hide(); }); diff --git a/bug/components.xsl b/bug/components.xsl index 76c52a0..2ac0ae7 100644 --- a/bug/components.xsl +++ b/bug/components.xsl @@ -54,6 +54,7 @@ <xsl:template match="div[@class='component']"> <xsl:element name="li"> <xsl:attribute name="data"><xsl:value-of select="translate(translate(*[position()=1],' ','_')," ",'_')" /></xsl:attribute> + <xsl:attribute name="idvalue">0</xsl:attribute> <xsl:attribute name="class">choice</xsl:attribute> <xsl:value-of select="*[position()=1]"/> </xsl:element> diff --git a/bug/op_sys.pl b/bug/op_sys.pl index dee774b..e56ad0c 100644 --- a/bug/op_sys.pl +++ b/bug/op_sys.pl @@ -22,7 +22,7 @@ while(<STDIN>) { $op_sys = $_; $op_sys =~ s/\R//g; my($display_value, $data) = split(/::/, $op_sys, 2); - print " <li class='choice' data='$data'>$display_value</li>\n"; + print " <li class='choice' data='$data' idvalue='0'>$display_value</li>\n"; } print <<EOF; diff --git a/bug/query.pl b/bug/query.pl index c3e6c6c..4fff9bb 100644 --- a/bug/query.pl +++ b/bug/query.pl @@ -58,9 +58,9 @@ print <<EOF; <div class="center"> <ul> EOF - print " <li class='choice' data='NONE'>None</li>\n"; + print " <li class='choice' data='NONE' idvalue='-1'>None</li>\n"; for($count = 0; $count < @versions; $count++) { - print " <li class='choice' data='$versions[$count]'>$versions[$count]</li>\n"; + print " <li class='choice' data='$versions[$count]' idvalue='$count'>$versions[$count]</li>\n"; } print <<EOF; </ul> diff --git a/bug/subcomponents.xsl b/bug/subcomponents.xsl index ba87311..eab814d 100644 --- a/bug/subcomponents.xsl +++ b/bug/subcomponents.xsl @@ -38,7 +38,7 @@ <div class="bottom-right"></div> <div class="center"> <ul> - <li class="choice" data=''>(all other problems)</li> + <li class="choice" data='' idvalue=''>(all other problems)</li> <xsl:apply-templates select="descendant::*[contains(@class,'search')]"/> </ul> </div> @@ -55,6 +55,7 @@ <xsl:if test="not(contains(*,'['))"> <xsl:element name="li"> <xsl:attribute name="data"><xsl:value-of select="*"/></xsl:attribute> + <xsl:attribute name="idvalue">0</xsl:attribute> <xsl:attribute name="class">choice</xsl:attribute> <xsl:value-of select="*"/> </xsl:element> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits