自定义PDP布局 [英] Custom PDP Layout

查看:51
本文介绍了自定义PDP布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我们已经创建了许多自定义字段,并且正在创建一个PDP来显示它们并收集信息。 这些字段成对地相互关联,因此将它们并排显示而不是自上而下是很好的。 例如


IT资源数量:__     IT分配百分比:__


人力资源数量:__   人力资源分配百分比:__


而不是:


IT资源数量:__


IT分配百分比:__


人力资源数量:__   


人力资源分配百分比:__


无论如何都要自定义Web部件的布局这样的时尚? 


 


提前致谢

解决方案

我很幸运使用jquery修改这些表单。


您可以:



  • 将内容编辑器Web部件添加到项目详细信息页面
  • 设置内容链接属性指向包含JQuery的HTML文件,以选择并移动表单控件。

在您的HTML文件中,使用ECMA脚本,使用JQuery选择器,您可以像这样引用表单控件并尝试移动它们:



< script 语言 =" javascript"
src =" /SiteName/SiteCollectionDocuments/jquery-1.5.1.min.js">< / script >


< script
language =" ; javascript">




ownerTXT =


< blockquote>('td')。find('input [title =" Owner"] ');



< / script >



我没有演示如何使用此代码段移动控件,只是如何获取对控件的引用。


这是定义的,而不是开箱即用的解决方案,但我已经使用过了在过去取得成功。 它为解决方案增加了一些复杂性,但如果要求足够强大,那么它可能是值得的。




Hi All,

We have created a number of custom field and are creating a PDP to display them and collect information.  The fields correlate with one another in pairs so it would be nice to display them side by side instead of top down.  For example

Number of IT Resources: __     Percentage IT Allocation: __

Number of HR Resources: __    Percentage HR Allocation: __

Instead of:

Number of IT Resources: __

Percentage IT Allocation: __

Number of HR Resources: __   

Percentage HR Allocation: __

Is there anyway to customize the layout of the web part in such a fashion? 

 

Thanks in advance!

解决方案

I have had some luck modifying these forms using jquery.

You can:

  • Add a Content Editor Web Part to the Project Details page
  • Set the Content Link property to point at an HTML file that contains the JQuery to select and move the form controls around with.

In your HTML file, with ECMA script, using JQuery selectors, you can reference the form controls like this and try moving them:

<script language="javascript" src="/SiteName/SiteCollectionDocuments/jquery-1.5.1.min.js"></script>

<script language="javascript">


ownerTXT =


('td').find('input[title="Owner"]');

</script>

I haven't demonstrated how to move the controls around with this snippet, just how to get a reference to the control.

This is definetely, not an out of the box solution, but I've used it with success in the past.  It adds a bit of complexity to the solution, but if the requirements are strong enough, it might be worth it.



这篇关于自定义PDP布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆