fix: add accept attribute to file pickers
This commit is contained in:
@@ -10,15 +10,15 @@
|
||||
<div id="pluginLibrary">
|
||||
<h4 id="pluginLibraryHeading">The plugin library [<a href="https://discoict.com.au/">https://discoict.com.au</a>] was last updated @CommonHelpers.FriendlyDate((Model.Library.ManifestDate > DateTime.Now ? DateTime.Now : Model.Library.ManifestDate))</h4>
|
||||
@if (Model.Library.Plugins.Count == 0)
|
||||
{
|
||||
{
|
||||
<div class="form" style="width: 450px; padding: 100px 0;">
|
||||
<h2>No Plugins are Available</h2>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
var pluginGroups = Model.AvailablePlugins;
|
||||
|
||||
|
||||
<div id="pluginLibraryGroups">
|
||||
@foreach (var pluginGroup in pluginGroups)
|
||||
{
|
||||
@@ -31,7 +31,8 @@
|
||||
<tr>
|
||||
<td>
|
||||
<div class="pluginItem@(installedPlugin != null ? " pluginInstalled" : string.Empty)">
|
||||
<h2 class="pluginName"><i class="fa fa-cogs"></i>@plugin.Item1.Name
|
||||
<h2 class="pluginName">
|
||||
<i class="fa fa-cogs"></i>@plugin.Item1.Name
|
||||
@if (installedPlugin == null)
|
||||
{
|
||||
<a class="pluginInstallLink button" href="@(Url.Action(MVC.API.Plugin.Install(plugin.Item1.Id)))">Install</a>
|
||||
@@ -40,11 +41,11 @@
|
||||
{
|
||||
if (Version.Parse(plugin.Item2.Version) > installedPlugin.Version)
|
||||
{
|
||||
<a class="pluginUpdateLink button" href="@(Url.Action(MVC.API.Plugin.Update(plugin.Item1.Id)))">Update</a>
|
||||
<a class="pluginUpdateLink button" href="@(Url.Action(MVC.API.Plugin.Update(plugin.Item1.Id)))">Update</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a class="pluginInstalledLink button disabled" href="#">Installed</a>
|
||||
<a class="pluginInstalledLink button disabled" href="#">Installed</a>
|
||||
}
|
||||
}
|
||||
</h2>
|
||||
@@ -54,13 +55,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
}
|
||||
</div>
|
||||
<div id="dialogInstallPlugin" title="Install this Plugin?">
|
||||
@@ -81,7 +83,7 @@
|
||||
@using (Html.BeginForm(MVC.API.Plugin.InstallLocal(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
<label for="pluginFile">Plugin Package: </label>
|
||||
<input id="pluginFile" name="Plugin" type="file" />
|
||||
<input id="pluginFile" name="Plugin" type="file" accept=".discoPlugin" />
|
||||
}
|
||||
</div>
|
||||
<div class="info-box error">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -27,7 +27,6 @@ namespace Disco.Web.Areas.Config.Views.Plugins
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
@@ -94,7 +93,7 @@ WriteLiteral("</h4>\r\n");
|
||||
|
||||
#line 12 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
if (Model.Library.Plugins.Count == 0)
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -105,7 +104,7 @@ WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px; padding: 100px 0;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>No Plugins are Available</h2>\r\n </div> \r\n");
|
||||
WriteLiteral(">\r\n <h2>No Plugins are Available</h2>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 17 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
@@ -113,7 +112,7 @@ WriteLiteral(">\r\n <h2>No Plugins are Available</h2>\r\n </di
|
||||
else
|
||||
{
|
||||
var pluginGroups = Model.AvailablePlugins;
|
||||
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
@@ -171,30 +170,30 @@ WriteLiteral("</h2>\r\n <table>\r\n");
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1506), Tuple.Create("\"", 1586)
|
||||
, Tuple.Create(Tuple.Create("", 1514), Tuple.Create("pluginItem", 1514), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1495), Tuple.Create("\"", 1575)
|
||||
, Tuple.Create(Tuple.Create("", 1503), Tuple.Create("pluginItem", 1503), true)
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1524), Tuple.Create<System.Object, System.Int32>(installedPlugin != null ? " pluginInstalled" : string.Empty
|
||||
, Tuple.Create(Tuple.Create("", 1513), Tuple.Create<System.Object, System.Int32>(installedPlugin != null ? " pluginInstalled" : string.Empty
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1524), false)
|
||||
, 1513), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <h2");
|
||||
|
||||
WriteLiteral(" class=\"pluginName\"");
|
||||
|
||||
WriteLiteral("><i");
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-cogs\"");
|
||||
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(plugin.Item1.Name);
|
||||
#line 35 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(plugin.Item1.Name);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -202,13 +201,13 @@ WriteLiteral("></i>");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 35 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 36 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 36 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
if (installedPlugin == null)
|
||||
{
|
||||
|
||||
@@ -219,20 +218,20 @@ WriteLiteral(" <a");
|
||||
|
||||
WriteLiteral(" class=\"pluginInstallLink button\"");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1904), Tuple.Create("\"", 1965)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1939), Tuple.Create("\"", 2000)
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1911), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Plugin.Install(plugin.Item1.Id))
|
||||
#line 38 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1946), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Plugin.Install(plugin.Item1.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1911), false)
|
||||
, 1946), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">Install</a>\r\n");
|
||||
|
||||
|
||||
#line 38 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 39 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -242,24 +241,24 @@ WriteLiteral(">Install</a>\r\n");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteLiteral(" class=\"pluginUpdateLink button\"");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 2373), Tuple.Create("\"", 2433)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 2412), Tuple.Create("\"", 2472)
|
||||
|
||||
#line 43 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2380), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Plugin.Update(plugin.Item1.Id))
|
||||
#line 44 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2419), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Plugin.Update(plugin.Item1.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2380), false)
|
||||
, 2419), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">Update</a> \r\n");
|
||||
WriteLiteral(">Update</a>\r\n");
|
||||
|
||||
|
||||
#line 44 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 45 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -267,16 +266,16 @@ WriteLiteral(">Update</a> \r\n");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteLiteral(" class=\"pluginInstalledLink button disabled\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(">Installed</a> \r\n");
|
||||
WriteLiteral(">Installed</a>\r\n");
|
||||
|
||||
|
||||
#line 48 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 49 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,7 +290,7 @@ WriteLiteral(" class=\"pluginItemBlurb\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 52 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(new HtmlString(plugin.Item1.Description));
|
||||
|
||||
|
||||
@@ -308,7 +307,7 @@ WriteLiteral(" class=\"pluginId\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 54 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(plugin.Item1.Id);
|
||||
|
||||
|
||||
@@ -321,7 +320,7 @@ WriteLiteral(" class=\"pluginVersion\"");
|
||||
WriteLiteral(">v");
|
||||
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 54 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(plugin.Item2.Version);
|
||||
|
||||
|
||||
@@ -330,7 +329,7 @@ WriteLiteral(">v");
|
||||
WriteLiteral("</span> | ");
|
||||
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 54 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(plugin.Item1.Author);
|
||||
|
||||
|
||||
@@ -338,14 +337,14 @@ WriteLiteral("</span> | ");
|
||||
#line hidden
|
||||
WriteLiteral(" | <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3244), Tuple.Create("\"", 3279)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 3279), Tuple.Create("\"", 3314)
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3251), Tuple.Create<System.Object, System.Int32>(plugin.Item1.InformationUrl
|
||||
#line 54 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3286), Tuple.Create<System.Object, System.Int32>(plugin.Item1.InformationUrl
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3251), false)
|
||||
, 3286), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" title=\"More Information\"");
|
||||
@@ -358,10 +357,11 @@ WriteLiteral(" class=\"fa fa-external-link\"");
|
||||
|
||||
WriteLiteral("></i></a>\r\n </div>\r\n " +
|
||||
" </div>\r\n </td>\r\n " +
|
||||
" </tr> \r\n");
|
||||
" </tr>\r\n");
|
||||
|
||||
|
||||
#line 58 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 59 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -370,7 +370,7 @@ WriteLiteral("></i></a>\r\n </div>\r\n
|
||||
WriteLiteral(" </table>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 61 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 63 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -379,8 +379,8 @@ WriteLiteral(" </table>\r\n </div>\r\n");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 63 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
|
||||
#line 65 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -417,7 +417,7 @@ WriteLiteral("></i><strong>Warning:</strong> All plugins run with the same level
|
||||
"om a trusted source.</strong>\r\n </p>\r\n </div>\r\n</div>\r\n");
|
||||
|
||||
|
||||
#line 77 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 79 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
if (canInstallLocal)
|
||||
{
|
||||
|
||||
@@ -437,13 +437,13 @@ WriteLiteral(" style=\"padding-bottom: 10px;\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 81 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 83 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 81 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 83 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Plugin.InstallLocal(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
|
||||
@@ -464,10 +464,12 @@ WriteLiteral(" name=\"Plugin\"");
|
||||
|
||||
WriteLiteral(" type=\"file\"");
|
||||
|
||||
WriteLiteral(" accept=\".discoPlugin\"");
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 87 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -491,7 +493,7 @@ WriteLiteral("></i><strong>Warning:</strong> All plugins run with the same level
|
||||
"\n");
|
||||
|
||||
|
||||
#line 94 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 96 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -527,13 +529,13 @@ WriteLiteral("<script>\r\n $(function () {\r\n var $selectedPlugin;\r\
|
||||
"\n\r\n return false;\r\n });\r\n\r\n");
|
||||
|
||||
|
||||
#line 153 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 155 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 153 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 155 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
if (canInstallLocal)
|
||||
{
|
||||
|
||||
@@ -568,7 +570,7 @@ WriteLiteral(@"
|
||||
");
|
||||
|
||||
|
||||
#line 180 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 182 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -583,7 +585,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 184 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 186 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(Html.ActionLinkButton("Update Plugin Library", MVC.API.Plugin.UpdateLibraryManifest()));
|
||||
|
||||
|
||||
@@ -592,13 +594,13 @@ Write(Html.ActionLinkButton("Update Plugin Library", MVC.API.Plugin.UpdateLibrar
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 185 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 187 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 185 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 187 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
if (canInstallLocal)
|
||||
{
|
||||
|
||||
@@ -606,14 +608,14 @@ WriteLiteral("\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 187 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 189 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
Write(Html.ActionLinkButton("Install Plugin Package", MVC.API.Plugin.InstallLocal(), "buttonUpload"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 187 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
#line 189 "..\..\Areas\Config\Views\Plugins\Install.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user