SharePoint 2013 uses JavaScript to implement list header column widths draggable

Source: Internet
Author: User

Objective

Recently there is a new demand, users want the title bar can be dragged width, in fact, feel no use, since the user wants and push not off, the reluctant to realize it.

In fact, the principle is relatively simple, is to use JavaScript to control the width of the title bar, and then search from the Internet, happened to see someone write a good method, adhering to the spirit of Take doctrine, borrowed a bit, detailed script reference appendix.

1, the default SharePoint list is the following look, each column of the content is self-adaptive, very compact, in fact, it is OK;

2, drag after the look is the following, in fact, the feeling is no use, very chicken, think of user follow-up will certainly mention, the current state to save the demand;

Although I did not take this demand well, but the heart of the bottom, still use JavaScript to the width of each column, save to the cookie on the line; Of course, some people say that the problem of disabling cookies, then try to save to the URL or server-side control it; Fortunately our unified IE strategy, Cookies are not disabled.

3, in fact, the concrete steps is very simple, is to upload the script file of the appendix to the document library, reference, and then in this view to initialize the table can be;

4, then the reference on the page, also very simple, such as:

5, in fact, the combination of SharePoint and JavaScript can do a lot of things, recently also use Easyui in SharePoint to do some experimenting, combined with the features of SharePoint itself, feel good.

Easyui in the SharePoint a simple example

As an example of the previous one, the feeling is not particularly perfect, but it also indirectly implements the user's needs. The user wants this filter to be searchable because there may be too many options.

So take this function out, specifically to make a search box, the use of Easyui features, the control after initialization, you can have a search function;

Effects such as:

Summarize

Of course, may do the function is relatively simple, want to express the meaning is JavaScript itself in the application of SharePoint more and more widely, I hope you can use more, more practice, more sharing. Meet some of the more wonderful needs, think of us and JavaScript this front-end weapon.

In particular, these things are not just for local SharePoint development and implementation, but also for the century Internet and international version of SharePoint Online.

Appendix

Http://www.cnblogs.com/mlcactus/p/4118714.html

SharePoint 2013 uses JavaScript to implement list header column widths draggable

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.