How to implement the SP document library similar to the effect of Baidu document library (subtitle: How to display the SWF file in the SP2013 document library with Flexpager)

Source: Internet
Author: User

1. Edit the document library list display page, such as:

2, add content editor, such as:

3, add the following in the "Content editor"-"edit source", add the following JS code, such as:

?

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.target= "_blank";

}

});

$ ("a[onclick*= ' Dispex ')"). Removeattr (' onclick ');

});

</script>???????????????????

4. Make sure to save the page.

5, test, upload the SWF file in the document library, open as follows:

Tips:

Ø How to implement the SP's document library similar to the effect of Baidu document library, you can run Windows services in the background or timerjob upload the various documents into the SWF file.

Ø if Ppt\word\excel\txt and other documents are converted into PDF files

Ø use pdf2swf to convert PDF to SWF (PDF file cannot be encrypted or cannot be converted)

pdf2swf

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

Note: The Chinese name Google and Firefox browser issues

this 2 a browser default start URL address encoding. such as:

If you use manual client to go off not realistic. Only use code to determine whether Firefox and Google Browser, if not the Chinese to code, such as:

How to implement the SP document library similar to the effect of Baidu document library (subtitle: How to display the SWF file in the SP2013 document library with Flexpager)

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.