Testing external scripts on dev deployment. If works, deploying stable
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ExternalScripts.ascx.cs" Inherits="Swarmops.Frontend.Controls.v5.UI.ExternalScripts" %>
|
||||
|
||||
<asp:Literal ID="LiteralReference1" runat="server" />
|
||||
<asp:Literal ID="LiteralReference2" runat="server" />
|
||||
<asp:Literal ID="LiteralReference3" runat="server" />
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace Swarmops.Frontend.Controls.v5.UI
|
||||
{
|
||||
public partial class ExternalScripts : ControlV5Base
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
string externalScriptUrl = "//hostedscripts.falkvinge.net";
|
||||
|
||||
string testFolderName = Server.MapPath("~/Scripts/ExternalScripts");
|
||||
if (Directory.Exists(testFolderName))
|
||||
{
|
||||
externalScriptUrl = "/Scripts/ExternalScripts";
|
||||
}
|
||||
|
||||
if (Package == "easyui")
|
||||
{
|
||||
this.LiteralReference1.Text = "<script src=\"" + externalScriptUrl +
|
||||
"/easyui/jquery.easyui.min.js\" type=\"text/javascript\"></script>";
|
||||
this.LiteralReference2.Text = "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + externalScriptUrl +
|
||||
"/easyui/themes/icon.css\" />";
|
||||
this.LiteralReference3.Text = "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + externalScriptUrl +
|
||||
"/easyui/themes/default/" + this.Control + ".css\" />";
|
||||
}
|
||||
}
|
||||
|
||||
public string Package { get; set; }
|
||||
public string Control { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" CodeFile="AttestCosts.aspx.cs" Inherits="Swarmops.Frontend.Pages.v5.Financial.AttestCosts" %>
|
||||
<%@ Register src="~/Controls/v5/UI/ExternalScripts.ascx" tagname="ExternalScripts" tagprefix="Swarmops5" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
|
||||
<script src="https://hostedscripts.falkvinge.net/easyui/jquery.easyui.min.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" type="text/css" href="https://hostedscripts.falkvinge.net/easyui/themes/icon.css" />
|
||||
<link rel="stylesheet" type="text/css" href="https://hostedscripts.falkvinge.net/easyui/themes/default/datagrid.css"/>
|
||||
<Swarmops5:ExternalScripts Package="easyui" Control="datagrid" runat="server" />
|
||||
|
||||
<script type="text/javascript">
|
||||
function preload(arrayOfImages) {
|
||||
|
||||
Reference in New Issue
Block a user