Skip to content

Commit 11888c3

Browse files
committed
File manager and plugin refactoring
1 parent 1b08144 commit 11888c3

7 files changed

Lines changed: 36 additions & 24 deletions

File tree

BlogEngine/BlogEngine.NET/BlogEngine.NET.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@
182182
<Content Include="admin\editors\tinymce\plugins\fullpage\plugin.min.js" />
183183
<Content Include="admin\editors\tinymce\plugins\fullscreen\plugin.min.js" />
184184
<Content Include="admin\editors\tinymce\plugins\hr\plugin.min.js" />
185-
<Content Include="admin\editors\tinymce\plugins\image4be\filemgr.png" />
186-
<Content Include="admin\editors\tinymce\plugins\image4be\plugin.min.js" />
185+
<Content Include="admin\editors\tinymce\plugins\filemanager\filemgr.png" />
186+
<Content Include="admin\editors\tinymce\plugins\filemanager\plugin.min.js" />
187187
<Content Include="admin\editors\tinymce\plugins\imagetools\plugin.min.js" />
188188
<Content Include="admin\editors\tinymce\plugins\image\plugin.min.js" />
189189
<Content Include="admin\editors\tinymce\plugins\importcss\plugin.min.js" />
@@ -301,14 +301,14 @@
301301
<Content Include="admin\editors\tinymce\skins\lightgray\fonts\tinymce.eot" />
302302
<Content Include="admin\editors\tinymce\skins\lightgray\fonts\tinymce.ttf" />
303303
<Content Include="admin\editors\tinymce\skins\lightgray\fonts\tinymce.woff" />
304-
<Content Include="admin\editors\tinymce\plugins\image4be\filemgr.cshtml" />
305304
<Content Include="admin\themes\lte\layout.cshtml" />
306305
<Content Include="admin\themes\lte\sidebar.cshtml" />
307306
<Content Include="admin\themes\lte\header.cshtml" />
308307
<Content Include="admin\themes\standard\layout.cshtml" />
309308
<Content Include="admin\themes\standard\sidebar.cshtml" />
310309
<Content Include="admin\editpost.cshtml" />
311310
<Content Include="admin\editpage.cshtml" />
311+
<Content Include="admin\filemanager.cshtml" />
312312
<None Include="App_Data\PublishProfiles\be.pubxml" />
313313
<None Include="App_Data\PublishProfiles\bespa - FTP.pubxml" />
314314
<None Include="App_Data\PublishProfiles\bespa - Web Deploy.pubxml" />
@@ -1518,6 +1518,7 @@
15181518
<Content Include="Scripts\toastr.min.js.map" />
15191519
<Content Include="Scripts\syntaxhighlighter\syntaxhighlighter.version" />
15201520
<Content Include="Scripts\version.json" />
1521+
<Content Include="setup\Web.config" />
15211522
<None Include="Web.Debug.config">
15221523
<DependentUpon>Web.config</DependentUpon>
15231524
</None>

BlogEngine/BlogEngine.NET/admin/Web.Config

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
<configuration>
33
<system.web>
44
<pages enableSessionState="true" />
5+
<authorization>
6+
<deny users="?"/>
7+
<allow users="*"/>
8+
</authorization>
59
</system.web>
6-
</configuration>
7-
10+
</configuration>

BlogEngine/BlogEngine.NET/admin/editors/tinymce/editor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ tinymce.init({
1919
plugins: [
2020
"advlist autolink lists link image charmap print preview anchor",
2121
"searchreplace visualblocks code fullscreen textcolor imagetools",
22-
"insertdatetime media table contextmenu paste sh4tinymce image4be"
22+
"insertdatetime media table contextmenu paste sh4tinymce filemanager"
2323
],
24-
toolbar: "fullscreen code | styleselect forecolor | bold italic | alignleft aligncenter alignright | bullist numlist | link media sh4tinymce | image4be",
24+
toolbar: "fullscreen code | styleselect forecolor | bold italic | alignleft aligncenter alignright | bullist numlist | link media sh4tinymce | filemanager",
2525
autosave_ask_before_unload: false,
2626
max_height: 400,
2727
min_height: 160,

BlogEngine/BlogEngine.NET/admin/editors/tinymce/plugins/image4be/filemgr.png renamed to BlogEngine/BlogEngine.NET/admin/editors/tinymce/plugins/filemanager/filemgr.png

File renamed without changes.

BlogEngine/BlogEngine.NET/admin/editors/tinymce/plugins/image4be/plugin.min.js renamed to BlogEngine/BlogEngine.NET/admin/editors/tinymce/plugins/filemanager/plugin.min.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
tinymce.PluginManager.add("image4be", function (editor, url) {
2-
editor.addButton("image4be", {
1+
tinymce.PluginManager.add("filemanager", function (editor, url) {
2+
editor.addButton("filemanager", {
33
title: "File manager",
44
image : url + '/filemgr.png',
55
onclick: function () {
66
editor.windowManager.open({
77
title: "File manager",
8-
url: url + "/filemgr.cshtml",
8+
url: url + "../../../../../filemanager.cshtml",
99
width: window.innerWidth * 0.9,
1010
height: window.innerHeight * 0.8
1111
}, {

BlogEngine/BlogEngine.NET/admin/editors/tinymce/plugins/image4be/filemgr.cshtml renamed to BlogEngine/BlogEngine.NET/admin/filemanager.cshtml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,22 @@
5656
</div>
5757
</div>
5858

59-
<div class="row">
59+
<div class="row clearfix" style="margin: 5px 0; width: 100%">
6060
<div class="pull-left">
61-
<button class="btn btn-default" style="border:none;" disabled="disabled">
62-
<span class="ng-scope ng-binding">{{currentPath}}</span>
63-
</button>
64-
</div>
65-
<div class="btn-group fileupload-wrapper pull-right">
66-
<div class="btn-group btn-group-fileupload">
67-
<button type="button" tabindex="-1" class="btn btn-success btn-tabkey input-sm" id="fileBtn"><i class="fa fa-upload"></i> {{lbl.uploadFile}}</button>
68-
<input type="file" id="file" name="file" data-role="magic-overlay" tabindex="-1" data-target="#fileBtn" title="{{lbl.uploadFile}}" onchange="angular.element(this).scope().uploadFile(this.files)" />
61+
<div class="pull-left" style="margin-right: 10px; padding-right: 10px; border-right: 1px solid #e5e5e5">
62+
<div>
63+
<button type="button" tabindex="-1" class="btn btn-sm btn-success" id="fileBtn"><i class="fa fa-plus"></i> NEW</button>
64+
<input type="file" id="file" name="file" data-role="magic-overlay" tabindex="-1" data-target="#fileBtn" title="{{lbl.uploadFile}}" onchange="angular.element(this).scope().uploadFile(this.files)" />
65+
</div>
66+
</div>
67+
<div class="btn-group befdv pull-left">
68+
<button ng-click="addFolder()" class="btn btn-sm btn-warning" type="submit" title="Add folder"><i class="fa fa-folder"></i></button>
69+
<button ng-disabled="itemsChecked() === false" ng-click="processChecked('delete')" title="Delete" class="btn btn-sm btn-danger"><i class="fa fa-trash"></i></button>
6970
</div>
70-
<button style="margin-left: 5px" ng-click="addFolder()" class="btn btn-success btn-tabkey input-sm" type="submit"><i class="fa fa-folder"></i> {{lbl.addFolder}}</button>
71-
<button style="margin-left: 5px" ng-disabled="itemsChecked() === false" ng-click="processChecked('delete')" class="btn btn-danger btn-tabkey input-sm"><i class="fa fa-times"></i>{{lbl.doDelete}}</button>
72-
<div class="pull-right filterbar flt-r clearfix btn-tabkey">
73-
<div class="active-flt-r"></div>
71+
<div class="pull-left" style="margin-left: 5px">
7472
<input type="text" data-ng-model="query" data-ng-change="search()" class="input-sm form-control search-grid pull-right" placeholder="{{lbl.search}}" />
7573
</div>
74+
<div class="pull-left" style="margin-left: 20px; line-height: 32px; color: #666">{{currentPath}}</div>
7675
</div>
7776
</div>
7877

@@ -98,7 +97,7 @@
9897
</div>
9998
</div>
10099

101-
<div ng-if="items.length > itemsPerPage" class="text-left pagination-wrapper" style="margin-top: 10px">
100+
<div ng-if="items.length > itemsPerPage" class="text-right pagination-wrapper" style="margin-top: 10px">
102101
<ul class="pagination pagination-sm">
103102
<li data-ng-class="{disabled: currentPage == 0}">
104103
<a data-ng-click="prevPage()"{{lbl.prev}}</a>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0"?>
2+
<configuration>
3+
<system.web>
4+
<authorization>
5+
<deny users="?"/>
6+
<allow users="*"/>
7+
</authorization>
8+
</system.web>
9+
</configuration>

0 commit comments

Comments
 (0)