mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
Flip revisions diff format, by popular request
Switch from 'what you will lose' to 'what you will gain'...
This commit is contained in:
parent
b1e0e31a9e
commit
3e37b9b7e4
3 changed files with 9 additions and 9 deletions
|
@ -1093,14 +1093,17 @@ func (h *Handler) GetDiff(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
var cfg = &htmldiff.Config{
|
||||
Granularity: 5,
|
||||
InsertedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: palegreen;"}},
|
||||
DeletedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: lightpink; text-decoration: line-through;"}},
|
||||
DeletedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: palegreen;"}},
|
||||
InsertedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: lightpink; text-decoration: line-through;"}},
|
||||
ReplacedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: lightskyblue;"}},
|
||||
CleanTags: []string{"documize"},
|
||||
}
|
||||
// InsertedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: palegreen;"}},
|
||||
// DeletedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: lightpink; text-decoration: line-through;"}},
|
||||
// ReplacedSpan: []htmldiff.Attribute{{Key: "style", Val: "background-color: lightskyblue;"}},
|
||||
|
||||
res, err := cfg.HTMLdiff([]string{latestHTML, previousHTML})
|
||||
// res, err := cfg.HTMLdiff([]string{previousHTML, latestHTML})
|
||||
// res, err := cfg.HTMLdiff([]string{latestHTML, previousHTML})
|
||||
res, err := cfg.HTMLdiff([]string{previousHTML, latestHTML})
|
||||
if err != nil {
|
||||
response.WriteServerError(w, method, err)
|
||||
return
|
||||
|
|
|
@ -47,14 +47,11 @@
|
|||
onCopyPage=(action 'onCopyPage') onMovePage=(action 'onMovePage') onDeletePage=(action 'onPageDeleted')
|
||||
refresh=(action 'refresh')}}
|
||||
{{/if}}
|
||||
|
||||
{{#if (eq tab 'attachment')}}
|
||||
{{document/view-attachment document=document permissions=permissions}}
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if (eq tab 'revision')}}
|
||||
{{document/view-revision document=document folder=folder pages=pages onRollback=(action 'onRollback')}}
|
||||
{{document/view-revision document=document folder=folder pages=pages permissions=permissions onRollback=(action 'onRollback')}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue