webdav portal bugs fix

This commit is contained in:
vfedosevich 2015-01-12 01:28:59 -08:00
parent 5d37adf09b
commit 05d9fddb5d
6 changed files with 62 additions and 59 deletions

View file

@ -16,9 +16,9 @@
</div>
}
<div class="form-group">
<label for="inputEmail" class="col-sm-2 control-label">Login</label>
<label for="inputLogin" class="col-sm-2 control-label">Login</label>
<div class="col-sm-10">
@Html.TextBoxFor(x => x.Login, new { @class = "form-control", id = "inputPassword", placeholder = "Login" })
@Html.TextBoxFor(x => x.Login, new { @class = "form-control", id = "inputLogin", placeholder = "Login", autofocus = "autofocus" })
</div>
</div>
<div class="form-group">
@ -34,3 +34,13 @@
</div>
</form>
</div>
@section scripts
{
<script>
$(document).ready(function () {
$('[autofocus]').focus();
});
</script>
}

View file

@ -1,9 +1,11 @@
@using WebsitePanel.WebDav.Core.Client
@using Ninject
@using WebsitePanel.WebDavPortal.Config
@model WebsitePanel.WebDavPortal.Models.ModelForWebDav
@{
var webDavManager = DependencyResolver.Current.GetService<WebsitePanel.WebDavPortal.Models.IWebDavManager>();
ViewBag.Title = (string.IsNullOrEmpty(Model.UrlSuffix) ? webDavManager.OrganizationName : Model.UrlSuffix);
ViewBag.Title = WebDavAppConfigManager.Instance.ApplicationName;
}
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/appScripts")

View file

@ -6,7 +6,7 @@
@{
string actualPath = Model.ItemType == ItemType.Folder ? "~/Content/Images/folder_100x100.png" : WebDavAppConfigManager.Instance.FileIcons[Path.GetExtension(Model.DisplayName.Trim('/'))];
string name = Model.ItemType == ItemType.Folder ? Model.DisplayName.Trim('/') : Path.GetFileNameWithoutExtension(Model.DisplayName);
string name = Model.ItemType == ItemType.Folder ? Model.DisplayName.Trim('/') : Model.DisplayName;
var opener = new FileOpenerManager()[Path.GetExtension(Model.DisplayName)];
bool isTargetBlank;
string href = "/";
@ -18,7 +18,6 @@
break;
default:
isTargetBlank = false;
var webDavManager = DependencyResolver.Current.GetService<WebsitePanel.WebDavPortal.Models.IWebDavManager>();
href = Model.Href.AbsolutePath;
break;
}