Version 11 (modified by deyan, 16 years ago) (diff) |
---|
Analysis
(Give as much as possible of the needed information for designing and implementing the task in the following sections.)
Overview
The resource palette consist of only frame contents. These frames include all the frames which can be inserted without the browser frame. All The resources can be imported and exported as while exporting, the elements are exported in the corresponding format(if jpg, in jpg; if pdf in pdf; if sjrb, in sjrb and so on). The other goal of this revision is to support import multiple files at once.
Task requirements
- Create support for selecting multiple items in the file dialogs
- This should allow importing a lot of image or other media resources at once.
- Create an ability for importing any resource.
- The "Import" from resources palette should open a file dialog
- The file dialog dropdown should have 1 entry - All files (*.*) - This is for now, later "Image", "Audio", etc things should be added.
- The tooltip should say "Import any kind of supported resource, folder or zip with resources."
- When a folder is selected the button should not change to "Open" like it does in the other file dialogs. Import should be available instead, which should allow import of a folder with resources
- zip files should be scanned for resources and they should be added to the list with the resources. This should be done carefully, because Sophie internal resources are in zips too.
- For both, folder and zip, only their supported contents should be added. But if the user has selected an unsupported file, he should be warned by a message box. If multiple files are selected and part of them are unsupported the user should be notified about them, and the supported ones should be imported.
- Every resource is exported in the corresponding format.
- The "Import" from resources palette should open a file dialog with "All files" entry and correct name suggested. (the same name as the resource)
- (Optional) Multiple export should only ask for folder to export the resources. Not required for this revision
- Texts and comments are exported in rtf format.
- All the imported resources are not inserted on the page work area but only in the resources palette and can be inserted in the page by drag and drop (Drag and drop is not part of this task).
- (optioanal) Resources can be exported and imported by drag and drop
Task result
Source code
Implementation idea
- Make file dialog to support multiple selection and provide a logic that will handle it.
- Add new file dialog that can open files and directories. When the user select something:
1 If it is a file, try to open it
1.2 If it is a zip file, decompress it and go to 1
2 If it is a directory list its files
2.1 If there are only files go to 1
2.2 If there are directories go to 2
- Create something like ResourceManipuationProvider, which will be used for easier and centralized import of resources, for example with it will be registered the corresponding insert menus and will be used for both inserting resources with frames and importing them.
- Modify the FileDialogInput to work with folders.
- Add logic for decompressing or browsing zip files
- Try to fix the RTF export/import of the text to take in mind styles (optional because it could be time taking).
Related
APP_RESOURCE_LIST_IMPORT_EXPORT_R0
APP_RESOURCE_LIST_IMPORT_EXPORT_R1
How to demo
- Create a book
- Go to insert menu, choose Image..., and select 2 images in jpeg format by using ctrl+click and notice they are inserted at the one and same time.
- Export one of the pictures and notice it is exported in jpeg format.
- Insert a text frame.
- Export the text frame and notice it is in rtf format.
- Choose insert -> Any resource
- Select the folder and click insert. Notice all the familiar format files from the folder are inserted.
Design
(Describe your design here.)
Implementation
(Describe and link the implementation results here (from the wiki or the repository).)
Testing
(Place the testing results here.)
Comments
(Write comments for this or later revisions here.)
Attachments
- resources.jpg (12.6 KB) - added by deyan 16 years ago.