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.";
13 this.ctx = $.wiki.exitContext();
16 /* fill out hidden fields */
17 this.$form = $('form', element);
19 $("input[name='pubmark-id']", this.$form).val(CurrentDocument.id);
20 $("input[name='pubmark-revision']", this.$form).val(options.revision);
25 $.wiki.enterContext(this.ctx);
33 message: "Oznaczanie wersji",
37 CurrentDocument.pubmark({
39 success: function(doc, changed, info){
44 onUnblock: function(){
46 $.wiki.enterContext(self.ctx);
50 failure: function(doc, info){
51 console.log("Failure", info);
52 self.reportErrors(info);
60 $.wiki.cls.PubmarkDialog = PubmarkDialog;