Changeset 32285

Show
Ignore:
Timestamp:
07/25/08 13:15:50 (3 months ago)
Author:
stan
Message:

APG-138 fixing various bug when editing a document file attachment

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nuxeo-rcp/trunk/nuxeo-apogee-rcp/plugins/org.nuxeo.ecm.platform.rcp/src/org/nuxeo/ecm/rcp/actions/EditDocumentWithDefaultApplicationAction.java

    r32106 r32285  
    6767 
    6868        public static void editFile(Shell shell, DocumentModel doc) { 
    69                 String filename = (String) doc.getProperty("file", "filename"); //$NON-NLS-1$ //$NON-NLS-2$ 
    70                 AbstractBlob blob = (AbstractBlob) doc.getProperty("file", "content"); //$NON-NLS-1$ //$NON-NLS-2$ 
    71                 File file = saveBlob(filename, blob); 
     69        File file = FileCache.getFlushedCachedFile(doc); 
     70        // String filename = (String) doc.getProperty("file", "filename"); 
     71        // //$NON-NLS-1$ //$NON-NLS-2$ 
     72        // AbstractBlob blob = (AbstractBlob) doc.getProperty("file", 
     73        // "content"); //$NON-NLS-1$ //$NON-NLS-2$ 
     74        // File file = saveBlob(filename, blob); 
    7275                try { 
    7376                        Program.launch(file.getCanonicalPath()); 
  • nuxeo-rcp/trunk/nuxeo-apogee-rcp/plugins/org.nuxeo.ecm.platform.rcp/src/org/nuxeo/ecm/rcp/actions/messages.properties

    r31833 r32285  
    5454EditDocumentWithDefaultApplicationAction_tooltip_editWithDefaultApp=Edit with default application 
    5555EditDocumentWithDefaultApplicationAction_title_editingFile=Editing file 
    56 EditDocumentWithDefaultApplicationAction_message_editingFile=The default editor had been open by Nuxeo RCP,\n click OK when finish working the file to save it
     56EditDocumentWithDefaultApplicationAction_message_editingFile=The default editor is being launched with the document file for editing,\nClick on OK to upload the modifications
    5757EditDocumentWithDefaultApplicationAction_Ok=Ok 
    5858EditDocumentWithDefaultApplicationAction_Cancel=Cancel 
  • nuxeo-rcp/trunk/nuxeo-apogee-rcp/plugins/org.nuxeo.ecm.platform.rcp/src/org/nuxeo/ecm/rcp/editors/pages/DocumentViewPage.java

    r32275 r32285  
    498498                public void widgetSelected(SelectionEvent e) { 
    499499                    EditDocumentWithDefaultApplicationAction.editFile( 
    500                             e.widget.getDisplay().getActiveShell(), doc); 
     500                            e.widget.getDisplay().getActiveShell(), editor.getDocument()); 
    501501                } 
    502502            }); 
    503             open.setEnabled(doc.getProperty("file", "filename") != null); //$NON-NLS-1$ //$NON-NLS-2$ 
     503            edit.setEnabled(doc.getProperty("file", "filename") != null); //$NON-NLS-1$ //$NON-NLS-2$ 
    504504 
    505505            // Upload attached file button 
  • nuxeo-rcp/trunk/nuxeo-apogee-rcp/plugins/org.nuxeo.ecm.platform.rcp/src/org/nuxeo/ecm/rcp/wizards/Messages.java

    r32106 r32285  
    3333 
    3434    public static String NewCustomPlatformPage_title; 
     35 
     36    public static String NewLocalPlatformPage_description; 
     37 
     38    public static String NewLocalPlatformPage_error_processingTemplate; 
     39 
     40    public static String NewLocalPlatformPage_reponame_label; 
     41 
     42    public static String NewLocalPlatformPage_title; 
    3543 
    3644    public static String NewPlatformIntroPage_autoDetect; 
  • nuxeo-rcp/trunk/nuxeo-apogee-rcp/plugins/org.nuxeo.ecm.platform.rcp/src/org/nuxeo/ecm/rcp/wizards/NewLocalPlatformPage.java

    r32275 r32285  
    4242    public NewLocalPlatformPage(NewPlatformWizard wizard, String pageName) { 
    4343        super( 
    44                 "Local platform"
    45                 "Local platform"
     44                Messages.NewLocalPlatformPage_title
     45                Messages.NewLocalPlatformPage_title
    4646                UIActivator.getImageDescriptor(NewPlatformWizard.NEW_PLATFORM_WIZ)); 
    4747        this.wizard = wizard; 
    4848        // Set the description 
    49         setDescription(Messages.NewCustomPlatformPage_description); 
     49        setDescription(Messages.NewLocalPlatformPage_description); 
    5050    } 
    5151 
     
    6060 
    6161        Label label = new Label(composite, SWT.NONE); 
    62         label.setText("Name of repository"); 
     62        label.setText(Messages.NewLocalPlatformPage_reponame_label); 
    6363 
    6464        reposName = new Text(composite, SWT.BORDER); 
     
    111111            // return wizard.introPage.name.getText(); 
    112112        } catch (Exception e) { 
    113             log.error("Couldn't process template", e); 
     113            log.error(Messages.NewLocalPlatformPage_error_processingTemplate, e); 
    114114        } 
    115115        return null; 
     
    119119            throws Exception { 
    120120 
    121         String xmlfilename = "default-repository-config.xml"; 
     121        String xmlfilename = "default-repository-config.xml"; //$NON-NLS-1$ 
    122122 
    123123        TextTemplate textTemplate = new TextTemplate(); 
    124         textTemplate.setVariable("name", name); 
     124        textTemplate.setVariable("name", name); //$NON-NLS-1$ 
    125125 
    126         textTemplate.setVariable("title", title); 
     126        textTemplate.setVariable("title", title); //$NON-NLS-1$ 
    127127 
    128128        InputStream templateFileStream = FileLocator.openStream( 
    129129                PlatformActivator.getDefault().getBundle(), new Path( 
    130                         "reposTemplates/" + xmlfilename), false); 
     130                        "reposTemplates/" + xmlfilename), false); //$NON-NLS-1$ 
    131131        textTemplate.process(templateFileStream, os); 
    132132        // return textTemplate.process(templateFileStream); 
  • nuxeo-rcp/trunk/nuxeo-apogee-rcp/plugins/org.nuxeo.ecm.platform.rcp/src/org/nuxeo/ecm/rcp/wizards/messages.properties

    r24083 r32285  
    77NewPlatformIntroPage_title=Component Registry 
    88NewPlatformIntroPage_local=Local Platform 
     9NewLocalPlatformPage_title=Local platform 
    910NewAutoPlatformPage_description=Add a Detected Component Registry 
    1011NewPlatformIntroPage_autoDetect=Auto Detect ECM Platforms 
     
    2021NewPlatformIntroPage_description=Add a New Component Registry 
    2122NewPlatformWizard_introPageTitle=Connect to an ECM Platform 
     23NewLocalPlatformPage_description=This page let you create a new local ECM platform based on  a default platform template 
    2224NewPlatformIntroPage_platformName=Platform Name: 
    2325NewPlatformWizard_remotePageTitle=Connect to a remote ECM Platform 
     
    2527NewRemotePlatformPage_description=This page let you connect to a remote ECM platform b ased on a default platform template 
    2628NewCustomPlatformPage_extensionFile=Extension File 
     29NewLocalPlatformPage_reponame_label=Name of repository 
    2730NewPlatformIntroPage_defaultPlatformName=ECM Platform 
    2831NewPlatformIntroPage_specifyDefinePlatformLocation=Specify how you want to define the platform location 
    2932NewPlatformWizard_unknowWizardResultTypeError=BUG: Unknown wizard result type: {0}. Must be File or InputStream. 
     33NewLocalPlatformPage_error_processingTemplate=Couldn't process template 
    3034NewPlatformWizard_failedCreatePlatformDefinitionError=Failed to create platform definition