Ticket #2423 (closed feature: obsolete)
template-editing-page -- Page editing in separate window
Reported by: | deyan | Owned by: | deni |
---|---|---|---|
Priority: | major | Milestone: | X3 |
Component: | uncategorized | Version: | 2.0 |
Keywords: | Cc: | ||
Category: | unknown | Effort: | |
Importance: | Ticket_group: | ||
Estimated Number of Hours: | 0 | Add Hours to Ticket: | 0 |
Billable?: | yes | Total Hours: | 0 |
Analysis_owners: | deyan, deyan | Design_owners: | deni |
Imp._owners: | deni | Test_owners: | |
Analysis_reviewers: | deni | Changelog: | Changelog |
Design_reviewers: | meddle, pap | Imp._reviewers: | meddle, deyan |
Test_reviewers: | Analysis_score: | 3.5 | |
Design_score: | 4 | Imp._score: | 3.5 |
Test_score: | 0 |
Description (last modified by deyan) (diff)
Implement page template editing in separate window
- Double clicking a template in the library tab should open the template for editing
- The page size should be taken from the book
- The following menu items should not be active (including their shortcuts)
- Save
- Save as
- Save on server
- Save as template
- Book properties
- Export book as
- The page turning controls in Book panel should not be present
- The book extras tab should not be accessible (should be gray
- The pages palette should only be displaying the template or should not be accessible (gray)
- If possible, the changes palette should only show the changes made for the template. Book's changes palette may show all made to the template as regular changes
- Behavior
- The changes should be applied immidiately
- The page should be displayed with all the halos and HUDs
- Resources added to the page should be accessible in the book and vice versa
- All resources and library items should be accessible when editing a template
- Books, Tools, Config, Servers, Resources, Library and Changes tabs should work normally
- File -> Close Book should be renamed to File -> Close and the tooltip should be set to "Close current document". This should work for page templates.
- Edit and Insert should work over the current template, adding/removing frames to it and content (media, text, etc) to the original book (including shortcuts for insert, copy, paste, etc)
- View, Skins, Window and Help menus should work normally
- Drag and drop should work like in normal book
- You should be able to apply templates to the frames
- You should be able to apply templates to the page
- You should be able to insert resources in the page via Drag and Drop - frames should appear and resources should be added to the resource palette
- Applying page templates to the template should be possible
- If a template is deleted or creation is undone, its window should be closed and notification "This template does not exist" should appear in a dialog
Attachments
Change History
comment:2 Changed 15 years ago by deyan
- Type changed from bug to feature
- Description modified (diff)
- Analysis_owners set to deyan
- Milestone set to X3
comment:3 Changed 15 years ago by deyan
- Owner set to deyan
- Status changed from new to s1a_analysis_started
- Description modified (diff)
comment:6 Changed 15 years ago by deyan
- Status changed from s1a_analysis_started to s1b_analysis_finished
- Description modified (diff)
comment:7 Changed 15 years ago by deni
- Status changed from s1b_analysis_finished to new
I like the analysis but I think it is incomplete and a bit inconsistent.
Please take in mind the following: When opening a page template in its own window, we are actually opening a special book window, that shows the page template (instead of an ordinary page from the book) and does not display all the controls that are present now. This will ensure that most of the menu items and palettes will continue to work on the original book (which is exactly what we what for the whole insert menu, resources and library palette and so on). However, if there are some differences, they should be mentioned in the analysis.
I would appreaciate a more detailed description about the functionality of the menu items, palettes (including the buttons on them and DnD behaviour), halos and huds when the current document is showing a template - which of the constrols should be inactive, which functionality should be present and which not...
Notes on the current requirements:
- The requirements about page size are contradictory - I think we agreed to take it from the book (even if it does not cover all page elements), so please update the analysis.
- Since we are editing whole the book that contains the page template, we cannot ignore resizing the page. It will be difficult to implement and the behaviour will be inconsistent (we change the book (and not only the template) by importing resources).
comment:8 Changed 15 years ago by deyan
- Status changed from new to s1a_analysis_started
- Description modified (diff)
comment:9 Changed 15 years ago by deyan
- Status changed from s1a_analysis_started to s1b_analysis_finished
- Description modified (diff)
comment:10 Changed 15 years ago by deyan
- Analysis_reviewers set to deni
- Analysis_owners changed from deyan to deyan, deyan
- Description modified (diff)
comment:12 Changed 15 years ago by deni
- Design_owners set to deni
- Status changed from s1b_analysis_finished to s1c_analysis_ok
- Imp._owners set to deni
- Analysis_score changed from 0 to 3.5
comment:13 Changed 15 years ago by deni
- Owner changed from deyan to deni
- Status changed from s1c_analysis_ok to s2a_design_started
comment:14 Changed 15 years ago by deni
- Status changed from s2a_design_started to s2b_design_finished
- General ideas
- A new DocView showing only a single page of a book (in this case the page template) should be created. However its model should be the whole book, because when inserting frames in the page, we also import their main resources as children of the book.
- In order to reuse BookDocView and BookView, we should extract some of their logic in superclasses - BaseBookDocView and BaseBookView and use the base classes where possible. In particular, PageWorkArea should keep a BaseBookView instead of BookView.
- Add a new class SinglePageBookView - a BaseBookView that displays only a single page from the book. It keeps a reference to the page in a final property.
- Add a new class SinglePageBookDocView - a BaseBookDocView that uses a SinglePageBookView.
- A new DocView showing only a single page of a book (in this case the page template) should be created. However its model should be the whole book, because when inserting frames in the page, we also import their main resources as children of the book.
- BaseBookView
- extends BaseVisualElement
- implements ResourceView and MediaComposite
- holds the BookViewOptions for displaying the book
- methods connected to page views:
- public abstract RootPageView getCurrentPageView()
- public abstract int getCurPageIndex()
- public abstract void goToPage(ResourceRefR4 ref)
- public RootPageView getPageView(ResourceRefR4 pageRef)
- public List<RootPageView> getOpenPageViews()
- SinglePageBookView:
- public Prop<ResourceRefR4> pageRef() - final property holding a reference to the page that should be displayed.
- implements getCurrentPageView() to return a RootPageView for the page pointted by pageRef().get()
- implements getCurPageIndex() to return -1
- implements goToPage(ResourceRefR4) to do nothing
- implements getAudioChunks(List<AudioChunk>, TimePos) to get the audio chunks from the page that is displayed
- implements setTime(TimePos) to set the time of the page that is displayed
- BaseBookDocView
- extends ResourceDocView
- implements MediaComposite
- the only differences from the old BookDocView are:
- In initAccess(ResourceAccess) do not create a new BookView and initialize the bookView property. Instead, call the new abstract method initBookView(BookViewOptions).
- public static BookDocView create(AppMainWindow window, BookInfo info) is moved to the subclasss BookDocView
- SinglePageBookDocView
- implements initBookView(BookViewOptions viewOptions) to create a new SinglePageBookView and initialize the bookView property
- public void initPageRef(ResourceRefR4 pageRef) - initializes the page that should be shown. Actually, delegates to the book view.
- overrides computeTitle() to return the title of the page (instead of the title of the book)
- Opening page templates in SinglePageBookDocViews
- Add a new event in PageTemplatesPalette.EventIds - OPEN_PAGE_TEMPLATE which indicates that the page template should be opened for editing in its own window.
- Override PageTemplateItem.doubleClicked() to fire an OPEN_PAGE_TEMPLATE event.
- ON_OPEN_PAGE_TEMPLATE operation - opens a page template for editing in its own window.
- The SinglePageBookDocView should be created using new, instead of AppViewUtil.getView(...). Otherwise, opening a page template from a book will work only the first time.
comment:15 Changed 15 years ago by deni
The source code is now in:
svn://branches/private/deni/page-templates-editing-de
comment:16 Changed 15 years ago by meddle
- Status changed from s2b_design_finished to s2c_design_ok
- Design_score changed from 0 to 4
- Design_reviewers set to meddle, pap
- About the preview:
- In the base bookdocview add an abstract method preview or something like that which each instance overrides.
- This way you will not call 'instanceof'
- Use AppViewUtil when creating the new SinglePageBookDocView
4p
comment:17 Changed 15 years ago by deni
- Status changed from s2c_design_ok to s3a_implementation_started
comment:18 Changed 15 years ago by deni
- Status changed from s3a_implementation_started to s3b_implementation_finished
comment:19 Changed 15 years ago by deni
Extracted the AutoActions connected to templates in separate classes. The patch is independent of the branch for the implementation.
comment:20 Changed 15 years ago by meddle
- Status changed from s3b_implementation_finished to s3c_implementation_ok
- Imp._score changed from 0 to 3.5
- Imp._reviewers set to meddle, deyan
Merged into the trunk at [9153] and [9154].
- The auto actions you pulled out don't include the one moved in the preview method... Strange...
- You had some problems with the server.
- I don't like the way you left the new auto action creations and then registration.
- It is better to have an action instance, and then to register an access in it, I mean variable.
- Fixed the AppViewUtil creation.
3.5p
comment:21 Changed 13 years ago by meddle
- Status changed from s3c_implementation_ok to closed
- Resolution set to obsolete
Closing all the tickets before M Y1
Implement page template editing in separate window