2 * Dialog for marking document for publishing
7 function PubmarkDialog(element, options){
8 if (!options.revision && options.revision != 0)
9 throw "PubmarkDialog needs a revision number.";
11 this.ctx = $.wiki.exitContext();
14 /* fill out hidden fields */
15 this.$form = $('form', element);
17 $("input[name='pubmark-id']", this.$form).val(CurrentDocument.id);
18 $("input[name='pubmark-revision']", this.$form).val(options.revision);
20 $.wiki.cls.GenericDialog.call(this, element);
23 PubmarkDialog.prototype = $.extend(new $.wiki.cls.GenericDialog(), {
24 cancelAction: function(){
25 $.wiki.enterContext(this.ctx);
29 saveAction: function(){
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;