首页 \ 问答 \ 在sharepoint 2010中动态创建新的wiki页面(dynamically create a new wiki page in sharepoint 2010)

在sharepoint 2010中动态创建新的wiki页面(dynamically create a new wiki page in sharepoint 2010)

我是sharepoint的新手,我在sharepoint 2010做一个网站,

我创建了一个员工详细信息列表,它包含各种列,一旦用户在“确定”中将新项目添加到该列表,它应该重定向到弹出按钮,并且点击它将直接允许用户打开一个供他自己使用的新wiki页面。

如果编辑了现有记录,则应该打开该特定用户的现有Wiki页面。

我已经安装了visual studio 2010,以便我可以创建这个自定义webpart,

但我是sharepoint的新手,所以我不知道从哪里开始,怎么开始。

有谁可以请指导我完成这个。

提前致谢,


i m new to sharepoint, i m doing a site in sharepoint 2010,

i created a list of employee details, it contains various columns, once a new item is added to that list on "ok" by a user it should redirect to a pop up button, and onclick of which it will directly allow a user to open a new wiki page for his own use.

and if an existing record is edited, it should open the existing wiki page for that particular user.

i have installed visual studio 2010 so that i can create this custom webpart,

but i m new to sharepoint so i do not know where and how to start from.

could anyone please guide me through this.

thanks in advance,


原文:https://stackoverflow.com/questions/9941369
更新时间:2024-05-04 08:05

最满意答案

我相信在表上完成内联编辑的最简单方法是通过向阵列上的每个对象添加编辑标志来污染您的数据。

下面你可以找到它的例子:

angular.module('app', [])
      .controller('AppController', appController);
    
    function  appController ($scope) {
      
      $scope.roomTypes = [{
        name : 'Test'
      }, {
        name : 'Test2'
      }, {
        name : 'Test3'
      }]
      
      $scope.toggleMode = function (type) {
        type.editing = !type.editing;
      }
    }
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="app" ng-controller="AppController">
        <table>
          <thead>
            <tr>
              <th>Name</th>
              <th>Actions</th>
            </tr>
          </thead>
          <tbody>
            <tr ng-repeat="type in roomTypes">
              <td>
                <span ng-if="!type.editing">
                  {{type.name}}
                </span>
                <span ng-if="type.editing">
                  <input 
                       type="text" 
                       ng-model="type.name" >
                </span>
                
              </td>
              <td>
                <button ng-click="toggleMode(type)">
                   {{type.editing ? 'Save' : 'Edit'}}
                </button>
              </td>
            </tr>
          </tbody>
        </table>
      </div>


I believe the easiest way to accomplish inline editing on a table is to pollute your data by adding a editing flag to each object on your array.

Below you can find the example of it :

angular.module('app', [])
      .controller('AppController', appController);
    
    function  appController ($scope) {
      
      $scope.roomTypes = [{
        name : 'Test'
      }, {
        name : 'Test2'
      }, {
        name : 'Test3'
      }]
      
      $scope.toggleMode = function (type) {
        type.editing = !type.editing;
      }
    }
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="app" ng-controller="AppController">
        <table>
          <thead>
            <tr>
              <th>Name</th>
              <th>Actions</th>
            </tr>
          </thead>
          <tbody>
            <tr ng-repeat="type in roomTypes">
              <td>
                <span ng-if="!type.editing">
                  {{type.name}}
                </span>
                <span ng-if="type.editing">
                  <input 
                       type="text" 
                       ng-model="type.name" >
                </span>
                
              </td>
              <td>
                <button ng-click="toggleMode(type)">
                   {{type.editing ? 'Save' : 'Edit'}}
                </button>
              </td>
            </tr>
          </tbody>
        </table>
      </div>

相关问答

更多