[[BackLinksMenu]] [[TicketQuery(summary=UNPLANNED_SCRIPTING_REFACTORING_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|)]] = Analysis = == Overview == * The goal of this task is to restore the previously working functionality of scripting in Sophie, replacing all obsolete code with new one, using the new model and views. * This is a refactoring task, so no new functionality will be implemented. == Task requirements == * Reimplement the following functionality, using the new model and views: * The user should have access to the current book and should be able to do the following actions with it: * get/set its title * get/set the page size (width and height) * get a list of all pages or a page with a given index * add a new page in it * remove a page * reorder the pages * get/set the current page * For every page the user should be able to: * get its name * get its index (but not set it) * get a list of all frames * add a new frame * remove a frame * For every frame the user should be able to: * get/set its size * [Optional] get/set its z-order * get/set its content location * get/set its rotation angle * The user should be able to create a new book (which will be automatically added to the list of open books). * All model changes should be performed in {{{AutoAction}}}s. * Remove the deprecated code in {{{ScriptResourceH}}}. * Refactor all tests. == Task result == * Source code * Updated wiki documentation == Implementation idea == * Currently {{{BookH}}}, {{{PageH}}} and {{{FrameH}}} are adapted for use in javascript. Instead, make the adapters to adapt {{{BookView}}}, {{{RootPageView}}} and {{{FrameView}}}, respectively. == Related == * [wiki:GROUP_SCRIPTING_R0] * [wiki:SCRIPTING_ACTIONS_API_R0] == How to demo == * Insert a new script in current book and run it. = 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.)