PrepareElementsInPageOrDocument() public static method

For each group of editable elements in the div which have lang attributes (normally, a .bloom-translationGroup div), make a new element with the lang code of the vernacular (normally, a .bloom-editable). Also enable/disable editing as warranted (e.g. in shell mode or not)
public static PrepareElementsInPageOrDocument ( XmlNode pageOrDocumentNode, CollectionSettings collectionSettings ) : void
pageOrDocumentNode System.Xml.XmlNode
collectionSettings Bloom.Collection.CollectionSettings
return void
Example #1
0
        public static void SetupPage(XmlElement pageDiv, CollectionSettings collectionSettings, string contentLanguageIso1, string contentLanguageIso2)        //, bool inShellMode)
        {
            TranslationGroupManager.PrepareElementsInPageOrDocument(pageDiv, collectionSettings);

            // a page might be "extra" as far as the template is concerned, but
            // once a page is inserted into book (which may become a shell), it's
            // just a normal page
            pageDiv.SetAttribute("data-page", pageDiv.GetAttribute("data-page").Replace("extra", "").Trim());
            ClearAwayDraftText(pageDiv);
        }
Example #2
0
        public static void SetupPage(XmlElement pageDiv, BookData bookData)        //, bool inShellMode)
        {
            TranslationGroupManager.PrepareElementsInPageOrDocument(pageDiv, bookData);

            SetLanguageForElementsWithMetaLanguage(pageDiv, bookData);

            // a page might be "extra" as far as the template is concerned, but
            // once a page is inserted into book (which may become a shell), it's
            // just a normal page
            pageDiv.SetAttribute("data-page", pageDiv.GetAttribute("data-page").Replace("extra", "").Trim());
            ClearAwayDraftText(pageDiv);
            ClearAwayPageDescription(pageDiv);
        }