by1455的自留地

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

 
第十周
-  信息目录

o  业务子目录(Business Category)

o  企业子目录(Corporate Category)

-  界面设计

o   演化到version 0.7 (解决webpart乱序问题)
新的jquery代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-tranditional.dtd">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

 <link rel="stylesheet" type="text/css" href="_style/default.css" media="all">
 <script language=javascript src="_style/jquery.js" ></script>
 <script language=javascript src="_style/jquery.tabs.pack.js" ></script>
 <script language=javascript src="_style/interface.js" ></script>
 <script language=javascript src="_style/mycss.js" ></script>
 <script language=javascript >
 <!--
  var ajaxcount = 0;
  
  jQuery(document).ready(function() {
   // add header
   $.get("_include/index_header.html", function(data){
     $('#header').html(data);
   });

   // add side
   $.get("_include/side_personalize.html", function(data){
     $('#side1').html( data );
   });
   
   $.get("_include/side_gottoknow.html", function(data){
     $('#side2').html( data );
   });
   
   $.get("_include/side_mynavi.html", function(data){
     $('#side3').html( data );
   });
   
   $.get("_include/side_activity.html", function(data){
     $('#side4').html( data );
   });
   
   $.get("_include/side_bannerspace.html", function(data){
     $('#side5').html( data );
   });
   
   // add main
   ajaxcount++;
   $.get("_include/main_banner.html", function(data){
     $('#main1').html( data );
     add_tabs();
   });
   
   ajaxcount++;
   $.get("_include/main_happenings.html", function(data){
     $('#main2').html( data );
     add_tabs();
   });
   
   ajaxcount++;
   $.get("_include/main_servicesinfo.html", function(data){
     $('#main3').html( data );
     add_tabs();
   });
   
  });

  function add_tabs() {
   ajaxcount--;
   if(ajaxcount == 0) {
     $('#hpn_div').tabs(1,{ remote: true });
     $('#svcs_div').tabs(1,{ remote: true });
   }
  }
  
 -->
 </script>
 <title>JTC Platinum</title>
</head>

<body class="internal">

<div class="base" id="home">
<div class="layout">

 <div class="header" id="header">
 </div><!-- End of Header -->
 
 <div class="clear"></div>
 
 <div class="content">
  <div class="side" id="side">
   <div id="side1"></div>
   <div id="side2"></div>
   <div id="side3"></div>
   <div id="side4"></div>
   <div id="side5"></div>
  </div><!-- End of Side -->

  <div class="main" id="main">
   <div id="main1"></div>
   <div id="main2"></div>
   <div id="main3"></div>
  </div><!-- End of Main -->
  
  <div class="clear"></div>
 </div><!-- End of Content -->
 
 <div class="clear"></div>

</div><!-- End of Layout -->
</div><!-- End of Base -->

</body>
</html>

-   ViewList.aspx

o   演化到version 0.7
    为了显示folder结构,增加3个tag
    folderPath : Item的路径
    folderlevel: item的深度
    cfolderPath: 因为folderpath无法被javascript直接处理

代码如下

Function GetListXMLwithFolder(ByVal SPList As SPList, ByVal SPviewName As String, ByVal SPFolder As SPFolder) As String
        Dim buf As String = String.Empty
        Dim ViewGUID As String = SPList.Views(SPviewName).ID.ToString("B").ToUpper()
        Dim ds As New DataSet
        Dim Dt As DataTable = Nothing
        Dim SPQuery As SPQuery = New SPQuery()
        Dim SPListItems As SPListItemCollection
        SPQuery.Folder = SPFolder
        SPListItems = SPList.GetItems(SPQuery, ViewGUID)
        If SPListItems.Count > 0 Then
            Dt = SPListItems.GetDataTable()
            Dim dc, dc1, dc2 As DataColumn
            dc = New DataColumn("FolderPath", Type.GetType("System.String"))
            Dt.Columns.Add(dc)
            dc1 = New DataColumn("FolderLevel", Type.GetType("System.String"))
            Dt.Columns.Add(dc1)
            dc2 = New DataColumn("cFolderPath", Type.GetType("System.String"))
            Dt.Columns.Add(dc2)
           
            Dim dr As DataRow
            For Each dr In Dt.Rows
                dr("FolderPath") = FullPathForListFolder(SPList, SPFolder)
                dr("FolderLevel") = FolderLevel(SPList, SPFolder).ToString()
                dr("cFolderPath") = FullPathForListFolder(SPList, SPFolder).Replace("\", "\\").ToString()

            Next
            ds.DataSetName = "List"
            Dt.TableName = "View"
            ds.Tables.Add(Dt)
            buf = buf + ds.GetXml.Replace("<List>", "").Replace("</List>", "")
        End If
        Return buf
    End Function


-          开始考虑用Masterpage 和MOSS online Code 来简化项目的编码工作

 

posted on 2007-11-21 16:44  by1455  阅读(997)  评论(4编辑  收藏  举报