Method | Description | |
---|---|---|
HandleTemplatesRequest ( |
Returns a json string for initializing the AddPage dialog. It gives paths to our current TemplateBook and specifies whether the dialog is to be used for adding pages or choosing a different layout.
|
|
HandleThumbnailRequest ( |
Called by the server to handle API calls for page thumbnails.
|
|
PageTemplatesApi ( SourceCollectionsList sourceCollectionsList, |
||
RegisterWithServer ( |
Method | Description | |
---|---|---|
AdjustPossibleLocalHostPathToFilePath ( string path ) : string | ||
FindOrGenerateThumbnail ( string expectedPathOfThumbnailImage ) : string |
Usually we expect that a file at the same path but with extension .svg will be found and returned. Failing this we try for one ending in .png. If this still fails we start a process to generate an image from the template page content.
|
|
GetBookTemplatePaths ( string pathToCurrentTemplateHtml, IEnumerable |
Give a list of paths to template books, considering desired presentation order and anything else. This method is the focus of the logic of this class. So is designed to be unit-testable without a ton of setup; making it static makes it easier to keep that constraint. |
|
GetPageGroup ( string path ) : dynamic | ||
GetPathToCurrentTemplateHtml ( ) : string | ||
MassageUrlForJavascript ( string url ) : string |
public HandleTemplatesRequest ( |
||
request | ||
return | void |
public HandleThumbnailRequest ( |
||
request | ||
return | void |
public PageTemplatesApi ( SourceCollectionsList sourceCollectionsList, |
||
sourceCollectionsList | SourceCollectionsList | |
bookSelection | ||
pageSelection | ||
templateInsertionCommand | Bloom.Edit.TemplateInsertionCommand | |
thumbNailer | BookThumbNailer | |
bookFactory | ||
storageFactory | ||
return | System |
public RegisterWithServer ( |
||
server | ||
return | void |