X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/454635a6a1b93154e38eb761ac1e7e403f165a81..3ca475c8e10c811633dec531772e18da6e5fa33d:/src/redakcja/static/js/wiki/view_history.js diff --git a/src/redakcja/static/js/wiki/view_history.js b/src/redakcja/static/js/wiki/view_history.js index def2bb6e..9ce518cb 100644 --- a/src/redakcja/static/js/wiki/view_history.js +++ b/src/redakcja/static/js/wiki/view_history.js @@ -53,6 +53,12 @@ attr('disabled', null); }); + $(document).on('click', '#changes-list .entry .approved', function(){ + $("#changes-list .entry.selected").removeClass('selected'); + $(this).closest('.entry').click(); + self.showPubmarkForm(); + return false; + }) $(document).on('click', '#changes-list span.tag', function(event){ return false; }); @@ -138,7 +144,8 @@ } var version = parseInt($("*[data-stub-value='version']", selected[0]).text()); - $.wiki.showDialog('#pubmark_dialog', {'revision': version}); + var approved = selected.attr('data-approved') == 'true'; + $.wiki.showDialog('#pubmark_dialog', {'revision': version, 'approved': !approved}); } makeDiff() {