Exemple #1
0
        def _onSaveAs(control, buttonEvent):
            def handleSaveDocumentAsFn(filename):
                document.saveAs(filename)

            DocumentManagement.promptSaveDocumentAs(
                world,
                control.getElement().getRootElement().getComponent(),
                handleSaveDocumentAsFn, document.getFilename())
Exemple #2
0
def _save(subject, pageController):
	document = subject._document
	if document.hasFilename():
		document.save()
	else:
		def handleSaveDocumentAsFn(filename):
			document.saveAs( filename )

		DocumentManagement.promptSaveDocumentAs( subject.world, None, handleSaveDocumentAsFn )
Exemple #3
0
        def _onSaveAs(link, event):
            element = link.getElement()
            world = fragment.subject.world
            document = node.getDocument()

            def handleSaveDocumentAsFn(filename):
                document.saveAs(filename)

            DocumentManagement.promptSaveDocumentAs(
                world,
                element.getRootElement().getComponent(),
                handleSaveDocumentAsFn, document.getFilename())
Exemple #4
0
        def _onReload(control, buttonEvent):
            if document.hasFilename():
                document.save()
                document.reload()
                project.reset()
            else:

                def handleSaveDocumentAsFn(filename):
                    document.saveAs(filename)
                    document.reload()
                    project.reset()

                DocumentManagement.promptSaveDocumentAs(
                    world,
                    control.getElement().getRootElement().getComponent(),
                    handleSaveDocumentAsFn)
Exemple #5
0
def _saveAs(subject, pageController):
	document = subject._document
	def handleSaveDocumentAsFn(filename):
		document.saveAs( filename )

	DocumentManagement.promptSaveDocumentAs( subject.world, None, handleSaveDocumentAsFn, document.getFilename() )