From fa588c8559ae0abdff6c644ae401913889382208 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Thu, 12 Mar 2015 01:32:40 -0700 Subject: [PATCH 1/4] webdav portal fixes --- .../Sources/WebsitePanel.WebDavPortal/Constants/Formtas.cs | 7 +++++++ .../Mapping/Profiles/Webdav/ResourceTableItemProfile.cs | 3 ++- .../WebsitePanel.WebDavPortal.csproj | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/Constants/Formtas.cs diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Constants/Formtas.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Constants/Formtas.cs new file mode 100644 index 00000000..9c4127ab --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Constants/Formtas.cs @@ -0,0 +1,7 @@ +namespace WebsitePanel.WebDavPortal.Constants +{ + public class Formtas + { + public const string DateFormatWithTime = "MM/dd/yyyy hh:mm tt"; + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Mapping/Profiles/Webdav/ResourceTableItemProfile.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Mapping/Profiles/Webdav/ResourceTableItemProfile.cs index 17d1b07e..92987801 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Mapping/Profiles/Webdav/ResourceTableItemProfile.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Mapping/Profiles/Webdav/ResourceTableItemProfile.cs @@ -7,6 +7,7 @@ using AutoMapper; using WebsitePanel.WebDav.Core.Client; using WebsitePanel.WebDav.Core.Config; using WebsitePanel.WebDav.Core.Extensions; +using WebsitePanel.WebDavPortal.Constants; using WebsitePanel.WebDavPortal.FileOperations; using WebsitePanel.WebDavPortal.Models.FileSystem; @@ -43,7 +44,7 @@ namespace WebsitePanel.WebDavPortal.Mapping.Profiles.Webdav .ForMember(ti => ti.IconHref, x => x.MapFrom(hi => hi.ItemType == ItemType.Folder ? WebDavAppConfigManager.Instance.FileIcons.FolderPath.Trim('~') : WebDavAppConfigManager.Instance.FileIcons[Path.GetExtension(hi.DisplayName.Trim('/'))].Trim('~'))) .ForMember(ti => ti.IsTargetBlank, x => x.MapFrom(hi => openerManager.GetIsTargetBlank(hi))) .ForMember(ti => ti.LastModified, x => x.MapFrom(hi => hi.LastModified)) - .ForMember(ti => ti.LastModifiedFormated, x => x.MapFrom(hi => hi.LastModified == DateTime.MinValue ? "--" : (new WebDavResource(null, hi)).LastModified.ToString("dd/MM/yyyy hh:mm tt"))) + .ForMember(ti => ti.LastModifiedFormated, x => x.MapFrom(hi => hi.LastModified == DateTime.MinValue ? "--" : (new WebDavResource(null, hi)).LastModified.ToString(Formtas.DateFormatWithTime))) .ForMember(ti => ti.Summary, x => x.MapFrom(hi => hi.Summary)) .ForMember(ti => ti.IsRoot, x => x.MapFrom(hi => hi.IsRootItem)) diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj index 5e8b2a86..21db106b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj @@ -165,6 +165,7 @@ + From 0f61d148ffa0c06b2fc8c237ce73e4dfdb3592ef Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Thu, 12 Mar 2015 04:44:39 -0700 Subject: [PATCH 2/4] webdav portal fixes --- .../Content/Site.css | 12 ++++++++- .../Controllers/FileSystemController.cs | 2 +- .../Scripts/appScripts/fileBrowsing.js | 27 ++++++------------- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css index 65108355..ae360b0b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css @@ -102,6 +102,7 @@ tr.selected-file { #summary.summary { font-size: 11px; color: rgb(152, 152, 152); + word-wrap: break-word; } .drag-and-drop-area input { @@ -266,7 +267,7 @@ tr.selected-file { margin-top: 15px; } -#processDialog .dialog-text { +#processDialog .dialog-text, .container .dialog-text{ display: inline-block; margin-left: 10px; } @@ -275,6 +276,15 @@ tr.selected-file { width: 200px; } +.dataTables_processing { + width: 165px !important; + margin: 0 !important;; + padding: 0 !important;; + left: 43% !important;; + background: initial !important;; + background-color: #FFFFFF !important;; +} + .breadcrumb-wsp { display: inline-block; padding-top: 5px; diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs index 4f709e53..bf79329a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs @@ -325,7 +325,7 @@ namespace WebsitePanel.WebDavPortal.Controllers [HttpPost] public JsonResult ItemExist(string org, string pathPart, string newItemName) { - var exist = _webdavManager.FileExist(string.Format("{0}/{1}", pathPart, newItemName)); + var exist = _webdavManager.FileExist(string.Format("{0}/{1}", pathPart.TrimEnd('/'), newItemName.Trim('/'))); return new JsonResult() { diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/appScripts/fileBrowsing.js b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/appScripts/fileBrowsing.js index d7a33633..5849d557 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/appScripts/fileBrowsing.js +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/appScripts/fileBrowsing.js @@ -11,7 +11,8 @@ } , createNewItemDialogId: "#createNewItemDialog", createNewItemButtonId: "#create-button", - createNewItemTitleId: '#create-dalog-label' + createNewItemTitleId: '#create-dalog-label', + processingDialogDom: '

Please wait...

' }; this.itemsTable = null; this.searchTable = null; @@ -96,7 +97,7 @@ WspFileBrowser.prototype = { initDataTable: function (tableId, ajaxUrl) { this.itemsTable = $(tableId).dataTable({ "ajax": ajaxUrl, - "processing": false, + "processing": true, "serverSide": true, "dom": 'rtlp', "columnDefs": [ @@ -131,14 +132,8 @@ WspFileBrowser.prototype = { "createdRow": function(row, data, index) { $(row).addClass('element-container'); }, - "fnPreDrawCallback": function () { - // gather info to compose a message - wsp.dialogs.showProcessDialog(); - return true; - }, - "fnDrawCallback": function () { - // in case your overlay needs to be put away automatically you can put it here - wsp.dialogs.hideProcessDialog(); + "oLanguage": { + "sProcessing": this.settings.processingDialogDom } }); @@ -170,7 +165,7 @@ WspFileBrowser.prototype = { this.searchTable = $(tableId).dataTable({ "ajax": ajaxUrl, - "processing": false, + "processing": true, "serverSide": true, "oSearch": { "sSearch": initSearch }, "dom": 'rtlp', @@ -207,14 +202,8 @@ WspFileBrowser.prototype = { "createdRow": function (row, data, index) { $(row).addClass('element-container'); }, - "fnPreDrawCallback": function () { - // gather info to compose a message - wsp.dialogs.showProcessDialog(); - return true; - }, - "fnDrawCallback": function () { - // in case your overlay needs to be put away automatically you can put it here - wsp.dialogs.hideProcessDialog(); + "oLanguage": { + "sProcessing": this.settings.processingDialogDom } }); From 4503df4578058e43e6b2c02c0a8f72e14f0b0f96 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Thu, 12 Mar 2015 06:40:31 -0700 Subject: [PATCH 3/4] webdav portal fixes --- .../WebsitePanel.WebDavPortal/Content/Site.css | 14 ++++++++------ .../Views/FileSystem/_ShowContentTopMenu.cshtml | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css index ae360b0b..bf5d19b0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css @@ -277,12 +277,14 @@ tr.selected-file { } .dataTables_processing { - width: 165px !important; - margin: 0 !important;; - padding: 0 !important;; - left: 43% !important;; - background: initial !important;; - background-color: #FFFFFF !important;; + width: 185px !important; + margin: 0 !important; + padding: 0 !important; + left: 43% !important; + background: initial !important; + background-color: #FFFFFF !important; + border: 1px solid #CDCDCD; + height: 44px !important; } .breadcrumb-wsp { diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/FileSystem/_ShowContentTopMenu.cshtml b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/FileSystem/_ShowContentTopMenu.cshtml index fdba3215..b749eee1 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/FileSystem/_ShowContentTopMenu.cshtml +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/FileSystem/_ShowContentTopMenu.cshtml @@ -25,7 +25,9 @@ } else { - @UI.SearchResults + @(elements.Any() ?elements.Last():WspContext.User.OrganizationId) + / + @UI.SearchResults } From 8de9e61623c1071fa9212cc60d07cebd6aab3a76 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Thu, 12 Mar 2015 06:46:04 -0700 Subject: [PATCH 4/4] webdav portal fixes --- WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css | 1 + 1 file changed, 1 insertion(+) diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css index bf5d19b0..609ab5d0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css @@ -285,6 +285,7 @@ tr.selected-file { background-color: #FFFFFF !important; border: 1px solid #CDCDCD; height: 44px !important; + z-index: 30; } .breadcrumb-wsp {