Skip to content

Commit 281246b

Browse files
committed
Merge branch 'V5' into V6
2 parents c8f7c22 + 53dc1b7 commit 281246b

File tree

7 files changed

+21
-17
lines changed

7 files changed

+21
-17
lines changed

publiccms-parent/publiccms-core/src/main/java/com/publiccms/common/tools/CmsFileUtils.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,12 +471,17 @@ public static boolean moveFile(String filepath, String backupFilePath) {
471471
if (CommonUtils.notEmpty(file)) {
472472
File backupFile = new File(backupFilePath);
473473
try {
474-
if (backupFile.exists()) {
475-
FileUtils.deleteQuietly(backupFile);
476-
}
477474
if (file.isDirectory()) {
478-
FileUtils.moveDirectory(file, backupFile);
475+
if (backupFile.exists()) {
476+
FileUtils.copyDirectory(file, backupFile);
477+
FileUtils.deleteQuietly(file);
478+
} else {
479+
FileUtils.moveDirectory(file, backupFile);
480+
}
479481
} else {
482+
if (backupFile.exists()) {
483+
FileUtils.deleteQuietly(backupFile);
484+
}
480485
FileUtils.moveFile(file, backupFile);
481486
}
482487
return true;

publiccms-parent/publiccms/src/main/resources/templates/admin/cmsFileBackup/list.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@
6464
<td>${a.creationTime?datetime}</td>
6565
<td><@t.fileSize a.size/></td>
6666
<td class="wrap">
67-
<#if !a.directory>
68-
<a href="cmsFileBackup/recycle?type=${type!}&paths=${filePath?url}&_csrf=<@tools.csrfToken admin=true/>" class="btnText green" title="<@t.page 'confirm.recycle'/>" target="ajaxTodo"><i class="icon-reply icon-large"></i><@t.page 'button.recycle'/></a>
69-
</#if>
67+
<a href="cmsFileBackup/recycle?type=${type!}&paths=${filePath?url}&_csrf=<@tools.csrfToken admin=true/>" class="btnText green" title="<@t.page 'confirm.recycle'/>" target="ajaxTodo"><i class="icon-reply icon-large"></i><@t.page 'button.recycle'/></a>
7068
<#if editableSubfix?seq_contains(a.fileName?keep_after_last('.')?lower_case)>
7169
<a href="cmsFileBackup/content?type=${type!}&path=${filePath?url}" class="edit btnText blue" target="navTab" rel="cmsWebBackup/content:${filePath}" title="${a.fileName}"><i class="icon-eye-open"></i><@t.page 'button.view'/></a>
7270
</#if>

publiccms-parent/publiccms/src/main/resources/templates/admin/cmsPage/list.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<#macro pageList filepath=''>
22
<@tools.fileList path=filepath>
33
<#list list as a>
4-
<@t.merge 'pages' filepath+'/'+a.fileName/>
4+
<@t.merge 'pages' '/'+filepath?has_content?then(filepath+'/','')+a.fileName/>
55
<#if !a.directory><@t.merge 'paths' filepath+'/'+a.fileName/></#if>
66
</#list>
77
<@sys.lock userId=admin.id itemType='page' itemIds=t.paths><#assign lockMap=map!/></@sys.lock>
@@ -14,17 +14,17 @@
1414
<@sys.user ids=t.userIds!><#assign userMap=map!/></@sys.user>
1515
<#list list as a>
1616
<#local currentPath=filepath?has_content?then(filepath+'/','')+a.fileName>
17-
<#if (deptPageMap[filepath+'/'+a.fileName])?has_content&&deptPageMap[filepath+'/'+a.fileName]>
17+
<#if (deptPageMap['/'+currentPath])?has_content&&deptPageMap['/'+currentPath]>
1818
<li<#if a.directory><#if (path?has_content && path?starts_with(currentPath+'/'))> class="expand"<#else> _src="cmsPage/list.html?parent=${currentPath?url}"</#if><#elseif path?has_content && path=currentPath> class="selected"</#if>>
1919
<#if a.directory>
2020
<a href="javascript:;" onclick="return false;">${a.fileName}</a>
2121
<#if path?has_content && path?starts_with(currentPath+'/')>
2222
<ul>
2323
<@pageList currentPath/>
24-
</ul>
24+
</ul>
2525
</#if>
2626
<#else>
27-
<a href="cmsPage/metadata.html?path=${(currentPath?url)!}" target="ajax" rel="pageBox">
27+
<a href="cmsPage/metadata.html?path=${(currentPath?url)!}"<#if (object.extendList)?has_content> class="red" title="<@t.page "metadata"/>"</#if> target="ajax" rel="pageBox">
2828
<@tools.metadata path=currentPath>
2929
<#if lockMap?has_content && lockMap[currentPath]?has_content>
3030
<#assign lockUser=(userMap[lockMap[currentPath].userId?string].nickname)!''/>

publiccms-parent/publiccms/src/main/resources/templates/admin/cmsPlace/list.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
<#if path?has_content && path?starts_with(currentPath+'/')>
1515
<ul>
1616
<@placeList currentPath/>
17-
</ul>
17+
</ul>
1818
</#if>
1919
<#elseif (object.size)?has_content && 0 lt object.size && (!(object.metadataExtendList)?has_content)>
20-
<a href="cmsPlace/dataList.html?path=${currentPath?url}" target="navTab" rel="cmsPlace/dataList" title="<@t.page 'place_data'/>:${(object.alias)!}">${(object.alias)!a.fileName}<#if 0 lt ((object.size)!0)> <@t.page 'place_data'/>(${object.size})</#if></a>
20+
<a href="cmsPlace/dataList.html?path=${currentPath?url}" target="navTab" rel="cmsPlace/dataList" title="<@t.page 'place_data'/>:${(object.alias)!}">${(object.alias)!a.fileName} <@t.page 'place_data'/>(${object.size})</a>
2121
<#else>
22-
<a href="cmsPlace/metadata.html?path=${currentPath?url}" target="ajax" rel="placeBox">${(object.alias)!a.fileName}<#if 0 lt ((object.size)!0)> (${object.size})</#if></a>
22+
<a href="cmsPlace/metadata.html?path=${currentPath?url}"<#if (object.metadataExtendList)?has_content> class="red" title="<@t.page "metadata"/>"</#if> target="ajax" rel="placeBox">${(object.alias)!a.fileName}</a><#if 0 lt ((object.size)!0)> <a href="cmsPlace/dataList.html?path=${currentPath?url}" target="navTab" rel="cmsPlace/dataList" title="<@t.page 'place_data'/>:${(object.alias)!}"><@t.page 'place_data'/> (${object.size})</a></#if>
2323
</#if>
2424
</@tools.placeMetadata>
2525
</li>

publiccms-parent/publiccms/src/main/webapp/resource/css/core.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,10 @@ header .navbar-toggler.side-right{background-image:url(../images/side-right.png)
165165
.leftPageContent .tree li:not(:has(ul)){min-width:auto;float:none;clear:both;}
166166
.tree ul:after{display:block;content:".";height:0;clear:both;visibility:hidden;}
167167
.tree li a.disabled{color:#aaa;}
168-
.tree a{height:auto;line-height:26px;font-size:13px;}
168+
.tree a{height:auto;line-height:26px;font-size:13px;margin-right:5px;}
169169
.tree a>i{margin-right:5px;}
170170
.tree a, .tree a:hover{text-decoration:none;}
171+
.tree a.red{color:red;}
171172
.tree .collapsable,.tree .end_collapsable,.tree .end_expandable,.tree .expandable,.tree .file,.tree .folder_collapsable,.tree .folder_expandable,.tree .last_collapsable,.tree .last_expandable, .tree .first_collapsable, .tree .first_expandable,.tree .ckbox{font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display: inline-block;line-height:26px;text-align:center;width:18px;}
172173
.tree .collapsable,.tree .end_collapsable,.tree .end_expandable,.tree .expandable,.tree .file,.tree .folder_collapsable,.tree .folder_expandable,.tree .last_collapsable,.tree .last_expandable, .tree .first_collapsable, .tree .first_expandable{font-family:iconfont;}
173174
.tree .folder_collapsable:before{content:"\e668";}

publiccms-parent/publiccms/src/main/webapp/resource/js/jui.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

publiccms-parent/publiccms/src/main/webapp/resource/js/jui/tree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
tree.subTree(op);
166166
}
167167
} else {
168-
node.children().wrap("<div></div>");
168+
node.children().wrapAll("<div></div>");
169169
var $box=$(">div", node).prepend(( op.ckbox ? "<span class=\"ckbox " + checked + "\"></span>": "" )
170170
+ ( op.icon ? "<span class=\""+op.options.file+"\"></span>": "" ));
171171
if(node.hasClass(op.options.selected) ){

0 commit comments

Comments
 (0)