Changeset 4478


Ignore:
Timestamp:
20/11/08 17:33:01 (11 years ago)
Author:
cbyrom
Message:

Create new util to save the current editor state into a session variable + add code to track this so that the tab state can be roughly
maintained when swapping between tabs.

Location:
MILK/trunk/milk_server/milk_server
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/controllers/atom_editor/editatom.py

    r4468 r4478  
    2323import milk_server.lib.htmlUtilities as utils 
    2424from granulatorTool.granulite import granulite as granulite 
     25from milk_server.lib.atomutilities import savePageAndRender 
    2526 
    2627class EditatomController(BaseController): 
     
    314315 
    315316        try: 
    316             return render("genshi", 'atom_editor/atom_editor') 
     317            return savePageAndRender(self.pathInfo, "atom_editor/atom_editor") 
    317318         
    318319        except ExpatError, e: 
     
    329330         
    330331        response.status_code = 400 
    331         return render('error') 
     332        return render('atom_editor/error') 
    332333 
    333334 
     
    589590 
    590591        try: 
    591             return render("genshi", 'atom_editor/atom_creator') 
     592            return savePageAndRender(self.pathInfo, 'atom_editor/atom_creator') 
    592593 
    593594        except Exception, e: 
     
    603604         
    604605        try: 
    605             return render("genshi", 'atom_editor/atom_granulator') 
     606            return savePageAndRender(self.pathInfo, 'atom_editor/atom_granulator') 
    606607 
    607608        except Exception, e: 
  • MILK/trunk/milk_server/milk_server/controllers/atom_editor/listatom.py

    r4468 r4478  
    2222import milk_server.lib.htmlUtilities as utils 
    2323from editatom import EditatomController as ec 
     24from milk_server.lib.atomutilities import savePageAndRender 
    2425 
    2526 
     
    5152        logging.info("Rendering atom home page") 
    5253        c.title = "Atom Editor Home Page" 
    53         return render("genshi", "atom_editor/atom_home") 
     54        return savePageAndRender(self.pathInfo, "atom_editor/atom_home") 
    5455 
    5556     
     
    128129                                                     selected = inputs.get('providerID')) 
    129130 
    130             return render("genshi", 'atom_editor/atom_list') 
     131            return savePageAndRender(self.pathInfo, 'atom_editor/atom_list') 
    131132 
    132133        except Exception, e: 
     
    138139         
    139140        response.status_code = 400 
    140         return render("genshi", 'error') 
     141        return render("genshi", 'atom_editor/error') 
    141142     
    142143     
Note: See TracChangeset for help on using the changeset viewer.