提交 d00cab09 编写于 作者: J Jason Park

fix minor

上级 53e7cf81
......@@ -65,9 +65,7 @@
</div>
<div id="footer">
<button id="scratch-paper"><i class="fa fa-code"></i> Scratch Paper</button>
<a href="https://github.com/parkjs814/AlgorithmVisualizer/wiki">
<button><i class="fa fa-book"></i> Documentation</button>
</a>
<button id="documentation"><i class="fa fa-book"></i> Documentation</button>
<button class="category" id="powered-by"><i class="fa fa-github"></i> Powered by ...</button>
<div id="powered-by-list">
<a href="https://github.com/jquery/jquery">
......
......@@ -5,8 +5,7 @@ const setupDocument = require('./setup_document');
const setupFilesBar = require('./setup_files_bar');
const setupInterval = require('./setup_interval');
const setupModuleContainer = require('./setup_module_container');
const setupPoweredBy = require('./setup_powered_by');
const setupScratchPaper = require('./setup_scratch_paper');
const setupTabContainer = require('./setup_tab_container');
const setupSideMenu = require('./setup_side_menu');
const setupTopMenu = require('./setup_top_menu');
const setupWindow = require('./setup_window');
......@@ -35,11 +34,8 @@ const setup = () => {
// module container
setupModuleContainer();
// powered by
setupPoweredBy();
// scratch paper
setupScratchPaper();
// tab container
setupTabContainer();
// side menu
setupSideMenu();
......
......@@ -98,4 +98,4 @@ module.exports = () => {
for (let i = 0; i < dividers.length; i++) {
addDividerToDom(dividers[i]);
}
}
};
\ No newline at end of file
'use strict';
module.exports = () => {
$('#powered-by').click(function() {
$('#powered-by-list button').toggleClass('collapse');
});
};
'use strict';
const app = require('../../app');
const Server = require('../../server');
const showAlgorithm = require('../show_algorithm');
module.exports = () => {
$('#scratch-paper').click(function() {
const category = 'scratch';
const algorithm = app.getLoadedScratch();
Server.loadAlgorithm(category, algorithm).then((data) => {
showAlgorithm(category, algorithm, data);
});
});
};
'use strict';
const app = require('../../app');
const Server = require('../../server');
const showAlgorithm = require('../show_algorithm');
let sidemenu_percent;
......@@ -24,4 +26,20 @@ module.exports = () => {
app.getTracerManager().resize();
});
}
$('#documentation').click(function () {
$('#btn_doc').click();
});
$('#powered-by').click(() => {
$('#powered-by-list button').toggleClass('collapse');
});
$('#scratch-paper').click(() => {
const category = 'scratch';
const algorithm = app.getLoadedScratch();
Server.loadAlgorithm(category, algorithm).then((data) => {
showAlgorithm(category, algorithm, data);
});
});
};
\ No newline at end of file
'use strict';
module.exports = () => {
$('.tab_bar > button').click(function () {
$('.tab_bar > button').removeClass('active');
$('.tab_container > .tab').removeClass('active');
$(this).addClass('active');
$($(this).attr('data-target')).addClass('active');
});
};
\ No newline at end of file
......@@ -72,13 +72,4 @@ module.exports = () => {
app.getTracerManager().nextStep();
});
// description & trace
$('.tab_bar > button').click(function () {
$('.tab_bar > button').removeClass('active');
$('.tab_container > .tab').removeClass('active');
$(this).addClass('active');
$($(this).attr('data-target')).addClass('active');
});
};
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册