Beispiel #1
0
 public void AddPageAfterHtmlCodeIfNotExists(string pageJsName)
 {
     if (!FootCodes.ContainsKey(pageJsName))
     {
         FootCodes.Add(pageJsName, GetJsCode(pageJsName));
     }
 }
Beispiel #2
0
 public async Task AddPageAfterHtmlCodeIfNotExistsAsync(string pageJsName)
 {
     if (!FootCodes.ContainsKey(pageJsName))
     {
         FootCodes.Add(pageJsName, await GetJsCodeAsync(pageJsName));
     }
 }
Beispiel #3
0
 /// <summary>
 /// 将一个页面的js从本页面去除,提供给分页时使用
 ///  add by sessionliang at 20151209
 /// </summary>
 /// <param name="lastPageInfo"></param>
 public void ClearLastPageScript(PageInfo lastPageInfo)
 {
     foreach (var key in lastPageInfo.BodyCodes.Keys)
     {
         BodyCodes.Remove(key);
     }
     foreach (var key in lastPageInfo.FootCodes.Keys)
     {
         FootCodes.Remove(key);
     }
     foreach (var key in lastPageInfo.HeadCodes.Keys)
     {
         HeadCodes.Remove(key);
     }
 }
Beispiel #4
0
 /// <summary>
 /// 将一个页面的js复制给本页面,提供给分页时使用
 /// add by sessionliang at 20151209
 /// </summary>
 /// <param name="lastPageInfo"></param>
 public void AddLastPageScript(PageInfo lastPageInfo)
 {
     foreach (var key in lastPageInfo.BodyCodes.Keys)
     {
         if (!BodyCodes.ContainsKey(key))
         {
             BodyCodes.Add(key, lastPageInfo.BodyCodes[key]);
         }
     }
     foreach (var key in lastPageInfo.FootCodes.Keys)
     {
         if (!FootCodes.ContainsKey(key))
         {
             FootCodes.Add(key, lastPageInfo.FootCodes[key]);
         }
     }
     foreach (var key in lastPageInfo.HeadCodes.Keys)
     {
         if (!HeadCodes.ContainsKey(key))
         {
             HeadCodes.Add(key, lastPageInfo.HeadCodes[key]);
         }
     }
 }
Beispiel #5
0
 /// <summary>
 /// 清理本页面的js
 /// </summary>
 public void ClearLastPageScript()
 {
     HeadCodes.Clear();
     BodyCodes.Clear();
     FootCodes.Clear();
 }