Changeset bf400b in indico


Ignore:
Timestamp:
01/28/11 15:53:52 (2 years ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
Children:
4b2050
Parents:
492fbe
git-author:
Adrian Moennich <jerome.ernst.monnich@…> (01/26/11 14:19:40)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (01/28/11 15:53:52)
Message:

[FIX] close minutes window after save confirmation

  • when saving after trying to close the window with unsaved changes, close the window afterwards
  • fixes #628
File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/htdocs/js/indico/Legacy/Dialogs.js

    r79b41e rbf400b  
    593593               var compileMinutes = exists(compile)?compile:false; 
    594594               var killProgress = null; 
     595               var saveAndClose = false; 
    595596 
    596597               var rtWidget = new ParsedRichTextEditor(700, 400, 'IndicoFull'); 
     
    649650                           wasChanged = true; 
    650651                           saveButton.dom.disabled = true; 
     652                           if (saveAndClose) { 
     653                               closeMinutes(); 
     654                           } 
    651655                       } 
    652656                   } 
     
    665669                   var content = Html.div({}, rtWidget.draw()); 
    666670 
    667                    var commitChanges = function(suicideHook) { 
     671                   var commitChanges = function() { 
     672                       debugger; 
    668673                       killProgress = IndicoUI.Dialogs.Util.progress($T('Saving...')); 
    669674                       if(rtWidget.clean()){ 
    670675                           changedText.set(false); 
     676                           wasChanged = true; 
    671677                           saveButton.dom.disabled = true; 
    672                            req.set(rtWidget.get()) 
     678                           req.set(rtWidget.get()); 
    673679                       } 
    674                        killProgress() 
     680                       killProgress(); 
    675681                   }; 
    676682 
    677                    var commitChangesAndClose = function(suicideHook) { 
    678                        commitChanges(suicideHook); 
     683                   var commitChangesAndClose = function() { 
     684                       saveAndClose = true; 
     685                       commitChanges(); 
    679686                   }; 
    680687 
     
    699706                   }; 
    700707 
    701                    saveButton = Widget.button(command(curry(commitChanges, function(){self.close();}, null), $T("Save"))); 
     708                   saveButton = Widget.button(command(commitChanges, $T("Save"))); 
    702709                   saveButton.dom.disabled = !compileMinutes; 
    703710 
Note: See TracChangeset for help on using the changeset viewer.