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

fix minor

上级 53e7cf81
...@@ -65,9 +65,7 @@ ...@@ -65,9 +65,7 @@
</div> </div>
<div id="footer"> <div id="footer">
<button id="scratch-paper"><i class="fa fa-code"></i> Scratch Paper</button> <button id="scratch-paper"><i class="fa fa-code"></i> Scratch Paper</button>
<a href="https://github.com/parkjs814/AlgorithmVisualizer/wiki"> <button id="documentation"><i class="fa fa-book"></i> Documentation</button>
<button><i class="fa fa-book"></i> Documentation</button>
</a>
<button class="category" id="powered-by"><i class="fa fa-github"></i> Powered by ...</button> <button class="category" id="powered-by"><i class="fa fa-github"></i> Powered by ...</button>
<div id="powered-by-list"> <div id="powered-by-list">
<a href="https://github.com/jquery/jquery"> <a href="https://github.com/jquery/jquery">
......
...@@ -5,8 +5,7 @@ const setupDocument = require('./setup_document'); ...@@ -5,8 +5,7 @@ const setupDocument = require('./setup_document');
const setupFilesBar = require('./setup_files_bar'); const setupFilesBar = require('./setup_files_bar');
const setupInterval = require('./setup_interval'); const setupInterval = require('./setup_interval');
const setupModuleContainer = require('./setup_module_container'); const setupModuleContainer = require('./setup_module_container');
const setupPoweredBy = require('./setup_powered_by'); const setupTabContainer = require('./setup_tab_container');
const setupScratchPaper = require('./setup_scratch_paper');
const setupSideMenu = require('./setup_side_menu'); const setupSideMenu = require('./setup_side_menu');
const setupTopMenu = require('./setup_top_menu'); const setupTopMenu = require('./setup_top_menu');
const setupWindow = require('./setup_window'); const setupWindow = require('./setup_window');
...@@ -35,11 +34,8 @@ const setup = () => { ...@@ -35,11 +34,8 @@ const setup = () => {
// module container // module container
setupModuleContainer(); setupModuleContainer();
// powered by // tab container
setupPoweredBy(); setupTabContainer();
// scratch paper
setupScratchPaper();
// side menu // side menu
setupSideMenu(); setupSideMenu();
......
...@@ -98,4 +98,4 @@ module.exports = () => { ...@@ -98,4 +98,4 @@ module.exports = () => {
for (let i = 0; i < dividers.length; i++) { for (let i = 0; i < dividers.length; i++) {
addDividerToDom(dividers[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'; 'use strict';
const app = require('../../app'); const app = require('../../app');
const Server = require('../../server');
const showAlgorithm = require('../show_algorithm');
let sidemenu_percent; let sidemenu_percent;
...@@ -24,4 +26,20 @@ module.exports = () => { ...@@ -24,4 +26,20 @@ module.exports = () => {
app.getTracerManager().resize(); 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 = () => { ...@@ -72,13 +72,4 @@ module.exports = () => {
app.getTracerManager().nextStep(); 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.
先完成此消息的编辑!
想要评论请 注册