webdav portal fixes
This commit is contained in:
parent
29747087ff
commit
68b2ef1e0c
5 changed files with 41 additions and 31 deletions
|
@ -29,14 +29,20 @@ textarea {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.selected-file {
|
.element-container .element {
|
||||||
|
position: relative;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-file .element {
|
||||||
|
position: relative;
|
||||||
box-sizing:border-box;
|
box-sizing:border-box;
|
||||||
-moz-box-sizing:border-box;
|
-moz-box-sizing:border-box;
|
||||||
-webkit-box-sizing:border-box;
|
-webkit-box-sizing:border-box;
|
||||||
border: 1px solid rgb(80, 152, 249);
|
border: 1px solid rgb(80, 152, 249);
|
||||||
}
|
}
|
||||||
|
|
||||||
.selected-file div.selected-element-overlay {
|
.selected-file .element div.selected-element-overlay {
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:0px;
|
top:0px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
|
|
|
@ -133,11 +133,7 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
|
|
||||||
if (filePathes == null)
|
if (filePathes == null)
|
||||||
{
|
{
|
||||||
model.Messages.Add(new Message
|
model.AddMessage(MessageType.Error, Resources.NoFilesAreSelected);
|
||||||
{
|
|
||||||
Type = MessageType.Error,
|
|
||||||
Value = Resources.NoFilesAreSelected
|
|
||||||
});
|
|
||||||
|
|
||||||
return Json(model);
|
return Json(model);
|
||||||
}
|
}
|
||||||
|
@ -152,21 +148,13 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
}
|
}
|
||||||
catch (WebDavException exception)
|
catch (WebDavException exception)
|
||||||
{
|
{
|
||||||
model.Messages.Add(new Message
|
model.AddMessage(MessageType.Error, exception.Message);
|
||||||
{
|
|
||||||
Type = MessageType.Error,
|
|
||||||
Value = exception.Message
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (model.DeletedFiles.Any())
|
if (model.DeletedFiles.Any())
|
||||||
{
|
{
|
||||||
model.Messages.Insert(0, new Message
|
model.AddMessage(MessageType.Success, string.Format(Resources.ItemsWasRemovedFormat, model.DeletedFiles.Count));
|
||||||
{
|
|
||||||
Type = MessageType.Success,
|
|
||||||
Value = string.Format(Resources.ItemsWasRemovedFormat, model.DeletedFiles.Count)
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Json(model);
|
return Json(model);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
using WebsitePanel.WebDavPortal.Models.Common.Enums;
|
||||||
|
|
||||||
namespace WebsitePanel.WebDavPortal.Models.Common
|
namespace WebsitePanel.WebDavPortal.Models.Common
|
||||||
{
|
{
|
||||||
|
@ -11,5 +12,14 @@ namespace WebsitePanel.WebDavPortal.Models.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Message> Messages { get; private set; }
|
public List<Message> Messages { get; private set; }
|
||||||
|
|
||||||
|
public void AddMessage(MessageType type, string value)
|
||||||
|
{
|
||||||
|
Messages.Add(new Message
|
||||||
|
{
|
||||||
|
Type =type,
|
||||||
|
Value = value
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -6,6 +6,10 @@
|
||||||
|
|
||||||
maxHeight = Math.max.apply(null, heights);
|
maxHeight = Math.max.apply(null, heights);
|
||||||
|
|
||||||
|
if (maxHeight < 135) {
|
||||||
|
maxHeight = 135;
|
||||||
|
}
|
||||||
|
|
||||||
$(".element-container").height(maxHeight);
|
$(".element-container").height(maxHeight);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="col-sm-2 element-container">
|
<div class="col-sm-2 element-container">
|
||||||
|
<div class="element">
|
||||||
<img class="icon-size" src="@Url.Content(actualPath)" />
|
<img class="icon-size" src="@Url.Content(actualPath)" />
|
||||||
|
|
||||||
<a href="@href" @Html.Raw(isTargetBlank ? "target=\"_blank\"" : string.Empty) class="file-link" title="@name">
|
<a href="@href" @Html.Raw(isTargetBlank ? "target=\"_blank\"" : string.Empty) class="file-link" title="@name">
|
||||||
|
@ -57,4 +58,5 @@
|
||||||
|
|
||||||
<div class="selected-element-overlay">
|
<div class="selected-element-overlay">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
Loading…
Add table
Add a link
Reference in a new issue