Show More
@@ -211,7 +211,7 b'' | |||
|
211 | 211 | % if c.at_version_num != ver_pr: |
|
212 | 212 | <i class="icon-comment"></i> |
|
213 | 213 | <code class="tooltip" title="${_('Comment from pull request version {0}, general:{1} inline:{2}').format(ver_pos, len(c.comment_versions[ver_pr]['at']), len(c.inline_versions[ver_pr]['at']))}"> |
|
214 | ${len(c.comment_versions[ver_pr]['at'])}/${len(c.inline_versions[ver_pr]['at'])} | |
|
214 | G:${len(c.comment_versions[ver_pr]['at'])} / I:${len(c.inline_versions[ver_pr]['at'])} | |
|
215 | 215 | </code> |
|
216 | 216 | % endif |
|
217 | 217 | </td> |
@@ -225,9 +225,13 b'' | |||
|
225 | 225 | % endfor |
|
226 | 226 | |
|
227 | 227 | <tr> |
|
228 |
<td colspan=" |
|
|
229 |
<button id="show-version-diff" onclick="return versionController.showVersionDiff()" class="btn btn-sm" style="display: none" |
|
|
230 |
${_('s |
|
|
228 | <td colspan="6"> | |
|
229 | <button id="show-version-diff" onclick="return versionController.showVersionDiff()" class="btn btn-sm" style="display: none" | |
|
230 | data-label-text-locked="${_('select versions to show changes')}" | |
|
231 | data-label-text-diff="${_('show changes between versions')}" | |
|
232 | data-label-text-show="${_('show pull request for this version')}" | |
|
233 | > | |
|
234 | ${_('select versions to show changes')} | |
|
231 | 235 | </button> |
|
232 | 236 | </td> |
|
233 | 237 | </tr> |
@@ -619,18 +623,35 b'' | |||
|
619 | 623 | }; |
|
620 | 624 | |
|
621 | 625 | var curVal = getVal($(curNode).val()); |
|
626 | var cleared = false; | |
|
627 | ||
|
622 | 628 | $.each(self.$verSource, function(index, value){ |
|
623 | 629 | var elVal = getVal($(value).val()); |
|
630 | ||
|
624 | 631 | if(elVal > curVal){ |
|
632 | if ($(value).is(':checked')) { | |
|
633 | cleared = true; | |
|
634 | } | |
|
625 | 635 | $(value).attr('disabled', 'disabled'); |
|
626 | 636 | $(value).removeAttr('checked'); |
|
637 | $(value).css({'opacity': 0.1}); | |
|
627 | 638 | } |
|
628 | 639 | else{ |
|
640 | $(value).css({'opacity': 1}); | |
|
629 | 641 | $(value).removeAttr('disabled'); |
|
630 | 642 | } |
|
631 | 643 | }); |
|
632 | 644 | |
|
633 | self.setLockAction(false, $(curNode).data('verPos')); | |
|
645 | if (cleared) { | |
|
646 | // if we unchecked an active, set the next one to same loc. | |
|
647 | $(this.$verSource).filter('[value={0}]'.format( | |
|
648 | curVal)).attr('checked', 'checked'); | |
|
649 | } | |
|
650 | ||
|
651 | self.setLockAction(false, | |
|
652 | $(curNode).data('verPos'), | |
|
653 | $(this.$verSource).filter(':checked').data('verPos') | |
|
654 | ); | |
|
634 | 655 | }; |
|
635 | 656 | |
|
636 | 657 | |
@@ -652,16 +673,21 b'' | |||
|
652 | 673 | |
|
653 | 674 | }; |
|
654 | 675 | |
|
655 | this.setLockAction = function (state, selectedVersion) { | |
|
676 | this.setLockAction = function (state, selectedVersion, otherVersion) { | |
|
656 | 677 | if(state){ |
|
657 | $('#show-version-diff').attr('disabled','disabled') | |
|
658 | $('#show-version-diff').addClass('disabled') | |
|
659 | $('#show-version-diff').html($('#show-version-diff').data('labelText')); | |
|
678 | $('#show-version-diff').attr('disabled', 'disabled'); | |
|
679 | $('#show-version-diff').addClass('disabled'); | |
|
680 | $('#show-version-diff').html($('#show-version-diff').data('labelTextLocked')); | |
|
660 | 681 | } |
|
661 | 682 | else{ |
|
662 | 683 | $('#show-version-diff').removeAttr('disabled'); |
|
663 | $('#show-version-diff').removeClass('disabled') | |
|
664 | //$('#show-version-diff').html(_gettext('show changes for v') + selectedVersion) | |
|
684 | $('#show-version-diff').removeClass('disabled'); | |
|
685 | ||
|
686 | if (selectedVersion == otherVersion) { | |
|
687 | $('#show-version-diff').html($('#show-version-diff').data('labelTextShow')); | |
|
688 | } else { | |
|
689 | $('#show-version-diff').html($('#show-version-diff').data('labelTextDiff')); | |
|
690 | } | |
|
665 | 691 | } |
|
666 | 692 | |
|
667 | 693 | }; |
General Comments 0
You need to be logged in to leave comments.
Login now