Change diff colors to match github, provided by Ralf

This commit is contained in:
nathangray 2019-03-01 10:31:52 -07:00
parent b39f4e0aef
commit 8765b9a084
2 changed files with 20 additions and 7 deletions

View File

@ -47,7 +47,7 @@ var et2_diff = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDe
// included via etemplate2.css // included via etemplate2.css
//this.egw().includeCSS('../../../vendor/bower-asset/dist/dist2html.css'); //this.egw().includeCSS('../../../vendor/bower-asset/dist/dist2html.css');
this.div = document.createElement("div"); this.div = document.createElement("div");
jQuery(this.div).addClass('diff'); jQuery(this.div).addClass('et2_diff');
}, },
set_value: function(value) { set_value: function(value) {
@ -100,7 +100,7 @@ var et2_diff = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDe
{ {
jQuery(this).height(jQuery(window).height() *0.7); jQuery(this).height(jQuery(window).height() *0.7);
} }
jQuery(this).dialog({position: "center"}); jQuery(this).addClass('et2_diff').dialog({position: "center"});
}, },
close: function(event, ui) { close: function(event, ui) {
// Need to destroy the dialog, etemplate widget needs divs back where they were // Need to destroy the dialog, etemplate widget needs divs back where they were

View File

@ -567,22 +567,22 @@ for printing
/** /**
* Diff widget * Diff widget
*/ */
div.diff { div.et2_diff {
width: 100%; width: 100%;
} }
.diff thead, .et2_diff thead,
.author, .author,
.d2h-file-header, .d2h-file-header,
.d2h-file-info, .d2h-file-info,
.d2h-info, .d2h-info,
.diff .d2h-cntx .et2_diff .d2h-cntx
{ {
display: none; display: none;
} }
.d2h-file-diff { .d2h-file-diff {
white-space:normal; white-space:normal;
} }
.diff .d2h-file-diff { .et2_diff .d2h-file-diff {
overflow-x: hidden; overflow-x: hidden;
} }
.ui-widget-content .d2h-code-line-ctn { .ui-widget-content .d2h-code-line-ctn {
@ -592,10 +592,23 @@ div.diff {
overflow-x: visible; overflow-x: visible;
overflow-y: visible; overflow-y: visible;
} }
.diff .ui-icon { .et2_diff .ui-icon {
margin-top: -16px; margin-top: -16px;
float: right; float: right;
} }
.et2_diff .d2h-del, .et2_diff.d2h-del.d2h-change, .et2_diff .d2h-file-diff .d2h-del.d2h-change {
background-color: #ffeef0;
}
.et2_diff .d2h-code-line del, .et2_diff .d2h-code-side-line del {
background-color: #fdb8c0;
}
.et2_diff .d2h-ins, .et2_diff.d2h-ins.d2h-change, .et2_diff .d2h-file-diff .d2h-ins.d2h-change {
background-color: #e6ffed;
}
.et2_diff .d2h-code-line ins, .et2_diff .d2h-code-side-line ins {
background-color: #acf2bd;
}
/** Display a loading icon **/ /** Display a loading icon **/
.loading { .loading {
background-position: center; background-position: center;