##// END OF EJS Templates
diffs: fixed scope mismatch for diff navigation
marcink -
r3163:b94db191 default
parent child Browse files
Show More
@@ -850,7 +850,8 b' def get_comments_for(diff_type, comments'
850
850
851 }(result, escapeMarkup);
851 }(result, escapeMarkup);
852 };
852 };
853 var preloadData = {
853
854 var preloadFileFilterData = {
854 results: [
855 results: [
855 % for filediff in diffset.files:
856 % for filediff in diffset.files:
856 {id:"a_${h.FID(filediff.raw_id, filediff.patch['filename'])}",
857 {id:"a_${h.FID(filediff.raw_id, filediff.patch['filename'])}",
@@ -868,15 +869,15 b' def get_comments_for(diff_type, comments'
868 'placeholder': "${file_placeholder}",
869 'placeholder': "${file_placeholder}",
869 containerCssClass: "drop-menu",
870 containerCssClass: "drop-menu",
870 dropdownCssClass: "drop-menu-dropdown",
871 dropdownCssClass: "drop-menu-dropdown",
871 data: preloadData,
872 data: preloadFileFilterData,
872 query: function(query) {
873 query: function(query) {
873 feedFilesOptions(query, preloadData);
874 feedFilesOptions(query, preloadFileFilterData);
874 },
875 },
875 formatResult: formatFileResult
876 formatResult: formatFileResult
876 });
877 });
878
877 % if range_diff_on is True:
879 % if range_diff_on is True:
878 fileFilter.select2("enable", false);
880 fileFilter.select2("enable", false);
879
880 % endif
881 % endif
881
882
882 $("#file_filter").on('click', function (e) {
883 $("#file_filter").on('click', function (e) {
@@ -948,7 +949,7 b' def get_comments_for(diff_type, comments'
948 }
949 }
949 );
950 );
950
951
951 var preloadData = {
952 var preloadDiffMenuData = {
952 results: [
953 results: [
953 ## Wide diff mode
954 ## Wide diff mode
954 {
955 {
@@ -1004,7 +1005,7 b' def get_comments_for(diff_type, comments'
1004 containerCssClass: "drop-menu",
1005 containerCssClass: "drop-menu",
1005 dropdownCssClass: "drop-menu-dropdown",
1006 dropdownCssClass: "drop-menu-dropdown",
1006 dropdownAutoWidth: true,
1007 dropdownAutoWidth: true,
1007 data: preloadData,
1008 data: preloadDiffMenuData,
1008 placeholder: "${_('Diff Options')}",
1009 placeholder: "${_('Diff Options')}",
1009 });
1010 });
1010 $("#diff_menu").on('select2-selecting', function (e) {
1011 $("#diff_menu").on('select2-selecting', function (e) {
General Comments 0
You need to be logged in to leave comments. Login now