2 * Dialog for marking document for publishing
7 class PubmarkDialog extends $.wiki.cls.GenericDialog {
8 constructor(element, options) {
9 if (!options.revision && options.revision != 0)
10 throw "PubmarkDialog needs a revision number.";
12 let ctx = $.wiki.exitContext();
17 /* fill out hidden fields */
18 this.$form = $('form', element);
20 $("input[name='pubmark-id']", this.$form).val(CurrentDocument.id);
21 $("input[name='pubmark-revision']", this.$form).val(options.revision);
26 $.wiki.enterContext(this.ctx);
34 message: "Oznaczanie wersji",
38 CurrentDocument.pubmark({
40 success: function(doc, changed, info){
45 onUnblock: function(){
47 $.wiki.enterContext(self.ctx);
51 failure: function(doc, info){
52 console.log("Failure", info);
53 self.reportErrors(info);
61 $.wiki.cls.PubmarkDialog = PubmarkDialog;