Ticket #2316 (closed bug: obsolete)

Opened 15 years ago

Last modified 13 years ago

Book templates should create a new book

Reported by: mira Owned by: mira
Priority: major Milestone:
Component: APP_DOCUMENT_MANAGEMENT Version: 2.0
Keywords: Cc:
Category: MAIN Effort:
Importance: Ticket_group:
Estimated Number of Hours: 0 Add Hours to Ticket: 0
Billable?: yes Total Hours: 0
Analysis_owners: mira Design_owners: mira
Imp._owners: mira Test_owners:
Analysis_reviewers: mira Changelog:
Design_reviewers: meddle, pap Imp._reviewers: meddle, deyan, todor
Test_reviewers: Analysis_score: 4
Design_score: 4 Imp._score: 3.5
Test_score: 0

Description

Book templates have different logic than other templates. They are not applied to the current book when double clicked. They open a view for their access that is kept in the Library Tab. When the view is closed this access is also closed and next time the user opens the template an exception occurs. Furthermore, the expected behaviour is that the opening book template creates a new book and is applied to this new book.

Attachments

bookTemplates.patch (10.4 KB) - added by mira 15 years ago.
bookTemplates2.patch (24.0 KB) - added by mira 15 years ago.
The previous patch plus more fixes

Change History

comment:1 Changed 15 years ago by mira

  • Status changed from new to s1b_analysis_finished

comment:2 Changed 15 years ago by mira

  • Design_owners set to mira
  • Status changed from s1b_analysis_finished to s2a_design_started
  • Analysis_reviewers set to mira
  • Analysis_score changed from 0 to 4

comment:3 Changed 15 years ago by mira

  • Status changed from s2a_design_started to s2b_design_finished
  • Imp._owners set to mira

The problem here is that we keep the accesses to the templates even after they are closed. The solution is simple - we should not open a view to the access kept in the Library Tab but other one.
When an element of the book template palette is double clicked a new book should be created. Its initila model should be the one of the template. This book should be opened in the mainWindow documents.
There is also exception if you try to save a book template with title that already exists. Handle it to notify the user that this name is in use.

comment:4 Changed 15 years ago by mira

  • Status changed from s2b_design_finished to s2c_design_ok

comment:5 Changed 15 years ago by mira

  • Owner set to mira
  • Status changed from s2c_design_ok to s3a_implementation_started

Changed 15 years ago by mira

comment:6 Changed 15 years ago by mira

  • Status changed from s3a_implementation_started to s3b_implementation_finished

The implementation is made according to the design. There is a patch file attached to this ticket.

Changed 15 years ago by mira

The previous patch plus more fixes

comment:7 Changed 15 years ago by mira

There is newer implementation patch that takes care of droping of book template on the desktop and save-as-template over an existing one. The new patch is not alteration of the old one - it should be applied on its own.

comment:8 Changed 15 years ago by meddle

  • Status changed from s3b_implementation_finished to s3c_implementation_ok
  • Design_score changed from 0 to 4
  • Design_reviewers set to meddle, pap
  • Imp._score changed from 0 to 3.5
  • Imp._reviewers set to meddle, deyan, todor

Merged to the trunk at [8628].

  • You should improve the code quality of the classes you update (as FileMenuLogic), but that is only like an advise.
  • I fixed some things -> Deyan wanted when you save a book as template to reopen it's book doc window, because the behavior to simply close is strange.
  try {
    fileAccess.save(null);
    ResourceModel model = access.getHead().getModel();
    BookDocView.makeNewBook(model, mainWindow);
    access.close();
				
    mainWindow.documents().get().remove(bookDocView);
    BookTemplateHelper.get().bookTemplates().add(new BookTemplate(fileAccess));
      } catch (IOException e) {
    DialogUtils.showExceptionDialog(bookDocView.swingComponent().get(), e,
      "Couldn't Save Book Template");
    return false;
  } 

comment:9 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

Note: See TracTickets for help on using tickets.