Epub debugging.
[redakcja.git] / src / redakcja / static / js / wiki / view_history.js
index def2bb6..9ce518c 100644 (file)
                     attr('disabled', null);
             });
 
                     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;
             });
             $(document).on('click', '#changes-list span.tag', function(event){
                 return false;
             });
             }
 
             var version = parseInt($("*[data-stub-value='version']", selected[0]).text());
             }
 
             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() {
         }
 
         makeDiff() {