Skip to content

Commit

Permalink
合并前端静态打包资源
Browse files Browse the repository at this point in the history
  • Loading branch information
xiweicheng committed Feb 12, 2021
1 parent 822fe00 commit 727decf
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/main/resources/static/page/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<script src="cdn/dragula.min.js"></script>
<script src="cdn/sortable.min.js"></script>
<script src="cdn/xlsx.full.min.js"></script>
<script src="scripts/vendor-bundle-a18de83830.fa20615a.1586268.js" data-main="aurelia-bootstrapper"></script>
<script src="scripts/vendor-bundle-a18de83830.d9e51f5c.1586268.js" data-main="aurelia-bootstrapper"></script>
</body>

</html>
16 changes: 10 additions & 6 deletions src/main/resources/static/page/mind.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
border: none;
font-size: 14px;
}

#import {
color: #fff;
background: #00aaff;
Expand All @@ -94,6 +94,7 @@
.topbar>input {
width: 250px;
}

#import {
display: none;
}
Expand Down Expand Up @@ -179,17 +180,22 @@
<script type="text/javascript" src="cdn/sockjs.min.js"></script>
<script type="text/javascript" src="cdn/stomp.min.js"></script>
<script>
var newMindStr = null;

function initMind(data) {

var readonly = typeof url('?readonly') !== 'undefined';

if ($('#mind').length == 0) return;

var newMind = data ? null : MindElixir.new('新主题');
newMindStr = JSON.stringify(newMind);

window.mind = new MindElixir({
el: '#mind',
direction: MindElixir.SIDE,
locale: 'cn',
data: data ? data : MindElixir.new('新主题'),
data: data ? data : newMind,
draggable: !readonly, // default true
editable: !readonly,
contextMenu: !readonly, // default true
Expand Down Expand Up @@ -522,9 +528,7 @@
if (blog) {
updated = (blog.title != title) || (blog.content != content);
} else {
updated = !!$.trim(title) || (!!$.trim(content) && content !=
`{"nodeData":{"id":"root","topic":"新主题","root":true,"children":[]},"linkData":{}}`
);
updated = !!$.trim(title) || (!!$.trim(content) && content != newMindStr);
}

(window.parent && window.parent.postMessage) && (window.parent
Expand Down Expand Up @@ -634,7 +638,7 @@
$('#saveFrm .btnOk').click(function (event) {

var title = $('#title').val();

mind.cancelFocus();
var content = mind.getAllDataString();

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 727decf

Please sign in to comment.