zoukankan      html  css  js  c++  java
  • SharePoint Tricks

    1. SharePoint 2010中,在Survey的问题框中输入HTML代码可以用于插入图片或者链接,具体方法为:

      1.1 在问题框中输入html,

      1.2 在New Form和Edit Form添加如下代码:

    <script type="text/javascript" src="/sites/XXX/SiteAssets/jquery-1.11.0.min.js"></script>
    <script type="text/javascript">
    $("#WebPartWPQ2 table[class='ms-formtable']").html($("#WebPartWPQ2 table[class='ms-formtable']").html().replace(/&lt;/g,"<").replace(/&gt;/g,">"));
    </script>

      1.3 在Display Form页面和Summary页面添加如下代码:

    <script type="text/javascript" src="/sites/XXX/SiteAssets/jquery-1.11.0.min.js"></script>
    <script type="text/javascript">
    $("#WebPartWPQ2").html($("#WebPartWPQ2").html().replace(/&lt;/g,"<").replace(/&gt;/g,">"));
    </script>

    2. SharePoint 2010中,在Survey中 增加Rating Scale Question的 问题区域宽度,添加背景,以及 增加问题之间的间隔:

    //increase the width of Rating Scale Question
                  $(document).ready(function(){
                      $("table[summary='Rating Scale Question']").each(function(){
                          $(this).find("td:first").css("width", "80%");
                          
                //添加背景色
                          $(this).find("tr").each(function(index, item){
                              if(index >= 3){
                                  if(index%2 == 0){
                                      $(item).css("background-color","#AAD7FF")
                                  }
                              }
                          });
                      });
                  });
    <style>
       .ms-gridT1 { padding-top: 10px; padding-bottom: 10px; }
    </style>

    效果如图:

    3. SharePoint 2010中,为Survey增加显示框的宽度:

    <style>
                      #s4-workspace{
                          720px;
                      }
                  </style>

    4. 

  • 相关阅读:
    UML第一次编程作业
    css文本属性
    css文字属性
    Qobject设置对象名称和属性
    m3u8
    easyUI tree jQuery
    easyUI layout
    正则表达式
    Spring mvc 数据验证框架注解
    blur和click事件的先后顺序问题
  • 原文地址:https://www.cnblogs.com/qijiage/p/5179962.html
Copyright © 2011-2022 走看看