How to Implement the SP document library effect similar to Baidu document library (Subtitle: How to Use flexpager to display SWF files in the sp2013 Document Library)

Source: Internet
Author: User

1. Edit the document library list display page, for example:

2. Add a Content Editor, such:

3. Add the following JavaScript code in [Content Editor]-[edit source] and add the following JavaScript code, for example:

?

The Code is as follows:

<Scrip type = "text/JavaScript" src = "/siteassets/jquery-1.4.1.js"> </SCRIPT>

<SCRIPT type = "text/JavaScript">

$ (Function (){

// Force Document Library Document Download

$ ("A [onclick * = 'dispex']"). Each (function (){

VaR href = This. href;

If (href. indexof (". SWF")> = 0)

{

This. href = 'HTTP: // 192.168.56.146: 8001/_ layouts/15/sharepointproject2/flexpaper/index.html? Sourceurl = '+ this. href;

This.tar get = "_ blank ";

}

});

$ ("A [onclick * = 'dispex']"). removeattr ('onclick ');

});

</SCRIPT> ???????????????????

4. Confirm to save the page.

5. Test: Upload the SWF file in the document library and open it as follows:

Tip:

? How to realize the effect of SP document library similar to Baidu document library, you can run Windows service or timerjob in the background to convert uploaded documents into SWF files.

? Convert PPT \ word \ Excel \ TXT and other files into PDF files.

? Convert a PDF file into a SWF file using SWF (the PDF file cannot be encrypted, otherwise it cannot be converted)

Ipv2swf

: Http://www.swftools.org/download.html

Note: Chinese name: Google and Firefox

This 2Default start URL of browsersAddress encoding. For example:

It is unrealistic to manually close the client one by one. You only need to use the code to determine whether it is Firefox or Google's browser. If not, you need to encode it in Chinese, for example:

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.