Property | Type | Description | |
---|---|---|---|
AddKnownStyleIfMissing | void | ||
Ensure | void | ||
EnsureIdsAreUnique | void | ||
GetClasses | IEnumerable |
||
MakeJavascriptElement | |||
MigrateChildren | void | ||
MigrateEditableData | string | ||
RemoveStyleSheetIfFound | void |
Method | Description | |
---|---|---|
AddCalendarFoldClassToBody ( |
||
AddClass ( |
||
AddClassIfMissing ( |
||
AddCreationType ( string mode ) : void |
The Creation Type is either "translation" or "original". This is used to protect fields that should normally not be editable in one or the other. This is a bad name, and we know it!
|
|
AddHidePlaceHoldersClassToBody ( |
||
AddJavascriptFile ( string pathToJavascript ) : void | ||
AddJavascriptFileToBody ( string pathToJavascript ) : void | ||
AddPublishClassToBody ( ) : void | ||
AddPublishClassToBody ( |
By including this class, we help stylesheets do something different for edit vs. publish mode.
|
|
AddRightToLeftClassToBody ( |
||
AddRtlDir ( |
||
AddStyleSheet ( string path ) : void | ||
AddStyleSheetIfMissing ( string path ) : void | ||
AddStylesheetFromAnotherBook ( |
||
ApplyXSLT ( string pathToXSLT ) : |
Applies the XSLT, and returns an XML dom
|
|
Clone ( ) : |
||
ConvertHtmlBreaksToNewLines ( string html ) : string | ||
FindChildWithClass ( |
Find the first child of parent that has the specified class as (one of) its classes.
|
|
FindFontsUsedInCss ( string cssContent, HashSet |
Finds a list of fonts used in the given css
|
|
GatherDataBookLanguages ( ) : List |
Gives all the unique language codes found in datadiv elements that have data-book
|
|
GetAttributeValue ( |
||
GetBookSetting ( string key ) : MultiTextBase | ||
GetImageElementUrl ( ElementProxy imgOrDivWithBackgroundImage ) : UrlPathString |
Gets the url for the image, either from an img element or any other element that has an inline style with background-image set.
|
|
GetImageElementUrl ( GeckoHtmlElement imageElement ) : UrlPathString |
Gets the url for the image, either from an img element or any other element that has an inline style with background-image set.
|
|
GetImageElementUrl ( |
Gets the url for the image, either from an img element or any other element that has an inline style with background-image set.
|
|
GetMetaValue ( string name, string defaultValue ) : string | ||
GetOrCreateDataDiv ( |
||
GetTemplateStyleSheets ( ) : IEnumerable |
||
HasMetaElement ( string name ) : bool | ||
HtmlDom ( ) : System | ||
HtmlDom ( |
||
HtmlDom ( string xhtml ) : System | ||
IsImgOrSomethingWithBackgroundImage ( |
||
MergeClassesIntoNewPage ( |
Blindly merge the classes from the source into the target.
|
|
ProcessPageAfterEditing ( |
||
RemoveBookSetting ( string key ) : void | ||
RemoveClassesBeginingWith ( |
||
RemoveDirectorySpecificationFromStyleSheetLinks ( ) : void | ||
RemoveExtraBookTitles ( ) : void |
Fix BL-2789, where Tok Pisin and Indonesian would show up in the source bubble for book titles, saying the equivalent of "new book" in each language. BasicBook doesn't have that anymore, but this cleans it up in books made from old shells.
|
|
RemoveExtraContentTypesMetas ( ) : void | ||
RemoveFileProtocolFromStyleSheetLinks ( ) : void |
gecko 11 requires the file://, but modern firefox and chrome can't handle it. Checked also that IE10 works without it.
|
|
RemoveMetaElement ( string name ) : void | ||
RemoveMetaElement ( string oldName, Func |
Can be called without knowing that the old exists. If it already has the new, the old is just removed. This is just for migration.
|
|
RemoveModeStyleSheets ( ) : void | ||
RemoveRtlDir ( |
||
RemoveXMatterStyleSheets ( ) : void |
The chosen xmatter changes, so we need to clear out any old ones
|
|
SafeSelectNodes ( string xpath ) : |
||
SelectChildImgAndBackgroundImageElements ( |
||
SelectSingleNode ( string xpath ) : |
||
SelectSingleNodeHonoringDefaultNS ( string xpath ) : |
||
SetBookSetting ( string key, string writingSystemId, string form ) : void | ||
SetElementFromUserStringPreservingLineBreaks ( |
||
SetImageElementUrl ( ElementProxy imgOrDivWithBackgroundImage, UrlPathString url ) : void |
Sets the url attribute either of an img (the src attribute) or a div with an inline style with an background-image rule
|
|
SortStyleSheetLinks ( ) : void | ||
UpdateMetaElement ( string name, string value ) : void |
creates if necessary, then updates the named in the head of the html
|
|
UpdatePageDivs ( ) : void | ||
UpdatePageToTemplate ( |
||
ValidateBook ( string descriptionOfBookForErrorLog ) : string |
Method | Description | |
---|---|---|
AddKnownStyleIfMissing ( |
||
Ensure ( bool passes, string message, StringBuilder builder ) : void | ||
EnsureIdsAreUnique ( |
||
GetClasses ( |
||
MakeJavascriptElement ( string pathToJavascript ) : |
||
MigrateChildren ( |
For each div in the page which has the specified class, find the corresponding div with that class in newPage, and replace its contents with the contents of the source page. Also inserts any needed styles we know about.
|
|
MigrateEditableData ( |
Replace page in its parent with an element which is a clone of template, but with the contents of page transferred as far as possible. Retain the id of the page. Set its lineage to the supplied value
|
|
RemoveStyleSheetIfFound ( string path ) : void |
public static AddCalendarFoldClassToBody ( |
||
dom | ||
return | void |
public static AddClass ( |
||
e | ||
className | string | |
return | void |
public static AddClassIfMissing ( |
||
element | ||
className | string | |
return | void |
public AddCreationType ( string mode ) : void | ||
mode | string | |
return | void |
public static AddHidePlaceHoldersClassToBody ( |
||
dom | ||
return | void |
public AddJavascriptFile ( string pathToJavascript ) : void | ||
pathToJavascript | string | |
return | void |
public AddJavascriptFileToBody ( string pathToJavascript ) : void | ||
pathToJavascript | string | |
return | void |
public static AddPublishClassToBody ( |
||
dom | ||
return | void |
public static AddRightToLeftClassToBody ( |
||
dom | ||
return | void |
public static AddRtlDir ( |
||
e | ||
return | void |
public AddStyleSheetIfMissing ( string path ) : void | ||
path | string | |
return | void |
public static AddStylesheetFromAnotherBook ( |
||
sourceBookDom | ||
targetBookDom | ||
return | void |
public ApplyXSLT ( string pathToXSLT ) : |
||
pathToXSLT | string | |
return |
public static ConvertHtmlBreaksToNewLines ( string html ) : string | ||
html | string | |
return | string |
public static FindChildWithClass ( |
||
parent | ||
classVal | string | |
return |
public static FindFontsUsedInCss ( string cssContent, HashSet |
||
cssContent | string | |
result | HashSet |
|
includeFallbackFonts | bool | true to include fallback fonts, false to include only the first font in each font family |
return | void |
public static GetAttributeValue ( |
||
elt | ||
name | string | |
return | string |
public GetBookSetting ( string key ) : MultiTextBase | ||
key | string | |
return | MultiTextBase |
public static GetImageElementUrl ( ElementProxy imgOrDivWithBackgroundImage ) : UrlPathString | ||
imgOrDivWithBackgroundImage | ElementProxy | |
return | UrlPathString |
public static GetImageElementUrl ( GeckoHtmlElement imageElement ) : UrlPathString | ||
imageElement | GeckoHtmlElement | |
return | UrlPathString |
public static GetImageElementUrl ( |
||
imageElement | ||
return | UrlPathString |
public GetMetaValue ( string name, string defaultValue ) : string | ||
name | string | |
defaultValue | string | |
return | string |
public static GetOrCreateDataDiv ( |
||
dom | ||
return |
public GetTemplateStyleSheets ( ) : IEnumerable |
||
return | IEnumerable |
public HtmlDom ( |
||
domToClone | ||
return | System |
public static IsImgOrSomethingWithBackgroundImage ( |
||
element | ||
return | bool |
public static MergeClassesIntoNewPage ( |
||
sourcePage | ||
targetPage | ||
classesToDrop | string | |
return | void |
public static ProcessPageAfterEditing ( |
||
destinationPageDiv | ||
edittedPageDiv | ||
return | void |
public RemoveBookSetting ( string key ) : void | ||
key | string | |
return | void |
public static RemoveClassesBeginingWith ( |
||
xmlElement | ||
classPrefix | string | |
return | void |
public RemoveDirectorySpecificationFromStyleSheetLinks ( ) : void | ||
return | void |
public RemoveExtraContentTypesMetas ( ) : void | ||
return | void |
public RemoveFileProtocolFromStyleSheetLinks ( ) : void | ||
return | void |
public RemoveMetaElement ( string name ) : void | ||
name | string | |
return | void |
public RemoveMetaElement ( string oldName, Func |
||
oldName | string | |
read | Func |
|
write | Action |
|
return | void |
public static RemoveRtlDir ( |
||
e | ||
return | void |
public SafeSelectNodes ( string xpath ) : |
||
xpath | string | |
return |
public static SelectChildImgAndBackgroundImageElements ( |
||
element | ||
return |
public SelectSingleNode ( string xpath ) : |
||
xpath | string | |
return |
public SelectSingleNodeHonoringDefaultNS ( string xpath ) : |
||
xpath | string | |
return |
public SetBookSetting ( string key, string writingSystemId, string form ) : void | ||
key | string | |
writingSystemId | string | |
form | string | |
return | void |
public static SetElementFromUserStringPreservingLineBreaks ( |
||
node | ||
form | string | |
return | void |
public static SetImageElementUrl ( ElementProxy imgOrDivWithBackgroundImage, UrlPathString url ) : void | ||
imgOrDivWithBackgroundImage | ElementProxy | |
url | UrlPathString | |
return | void |
public UpdateMetaElement ( string name, string value ) : void | ||
name | string | |
value | string | |
return | void |
public UpdatePageToTemplate ( |
||
pageDom | ||
templatePageDiv | ||
pageId | string | |
return | void |
public ValidateBook ( string descriptionOfBookForErrorLog ) : string | ||
descriptionOfBookForErrorLog | string | |
return | string |