Monday, April 30, 2018

Absolute minimum required sharepoint js files for sharepoint add-in pages (work in progress)

I'm trying to put up a custom sharepoint add-in (sharepoint app) without the masterpage and themes of the original sharepoint site carrying over to the add-in (basically this makes the add-in feel more like a hosted app rather than a sharepoint app). At the moment these are the bare minimum js files I have (depending on what you want to accomplish.

<!DOCTYPE html>
<%@ Page language="C#" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>


<html lang="en">

  <head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="WebPartPageExpansion" content="full" />

    <title>Sharepoint core javascript</title>
    <script type="text/javascript" src="/_layouts/1033/init.js"></script>
    <script  type="text/javascript" src="/_layouts/15/MicrosoftAjax.js"></script>
    <script  type="text/javascript" src="/_layouts/15/sp.core.js"></script>
    <script  type="text/javascript" src="/_layouts/15/sp.runtime.js"></script>
    <script  type="text/javascript" src="/_layouts/15/sp.js"></script>
    <!-- Bootstrap core CSS -->    
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
      
    <!-- Add your CSS styles to the following file -->
    <link rel="Stylesheet" type="text/css" href="../Content/App.css" />

    
    <!-- Custom styles for this template -->
    <style>
        body {
              margin: auto;
              background: #eaeaea;
              font-family: 'Open Sans', sans-serif;
              }
        body {
              padding-top: 54px;
              }
        @media (min-width: 992px) {
              body {
                   padding-top: 56px;
                   }
              }

    </style>

  </head>

  <body>

    <!-- Bootstrap core JavaScript -->   
      <script src="../Scripts/jquery-3.0.0.min.js"></script>
      
      <!-- Add your JavaScript to the following file -->
      <script src="../Scripts/App.js"></script>
  </body>

</html>









No comments:

Post a Comment