* Poprawki w redmine.
[redakcja.git] / project / static / js / editor.js
index cee04db..e37228c 100644 (file)
@@ -45,7 +45,7 @@ Panel.prototype.callHook = function() {
     var noHookAction = args.splice(0,1)[0]
     var result = false;
 
-    // $.log('calling hook: ', hookName, 'with args: ', args);
+    $.log('calling hook: ', hookName, 'with args: ', args);
     if(this.hooks && this.hooks[hookName])
         result = this.hooks[hookName].apply(this, args);
     else if (noHookAction instanceof Function)
@@ -146,6 +146,7 @@ Panel.prototype.connectToolbar = function()
     var extra_buttons = $('span.panel-toolbar-extra', toolbar);
     var placeholder = $('div.panel-toolbar span.panel-toolbar-extra', this.wrap);
     placeholder.replaceWith(extra_buttons);
+    placeholder.hide();
 
     var action_buttons = $('button', extra_buttons);
 
@@ -459,8 +460,10 @@ Editor.prototype.sendMergeRequest = function (message) {
     if( $('.panel-wrap.changed').length != 0)        
         alert("There are unsaved changes - can't commit.");
 
-    var self =  this;
-    $.log('URL !: ', $('#commit-dialog form').attr('action'));
+    var self =  this;    
+
+    $('#commit-dialog-related-issues input:checked').
+        each(function() { message += ' refs #' + $(this).val(); });  
     
     $.ajax({        
         url: $('#commit-dialog form').attr('action'),