2018-03-28 09:36:01 +08:00
|
|
|
import noteDetailService from "./note_detail.js";
|
|
|
|
|
|
|
|
const $searchString = $("#search-string");
|
|
|
|
const $noteDetailSearch = $('#note-detail-search');
|
|
|
|
|
|
|
|
function getContent() {
|
|
|
|
JSON.stringify({
|
|
|
|
searchString: $searchString.val()
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2018-03-28 09:46:38 +08:00
|
|
|
function show() {
|
2018-03-28 09:36:01 +08:00
|
|
|
$noteDetailSearch.show();
|
|
|
|
|
|
|
|
try {
|
|
|
|
const json = JSON.parse(noteDetailService.getCurrentNote().content);
|
|
|
|
|
|
|
|
$searchString.val(json.searchString);
|
|
|
|
}
|
|
|
|
catch (e) {
|
|
|
|
console.log(e);
|
|
|
|
$searchString.val('');
|
|
|
|
}
|
|
|
|
|
|
|
|
$searchString.on('input', noteDetailService.noteChanged);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
getContent,
|
2018-03-28 09:46:38 +08:00
|
|
|
show,
|
2018-09-03 22:05:28 +08:00
|
|
|
focus: () => null,
|
|
|
|
onNoteChange: () => null
|
2018-03-28 09:36:01 +08:00
|
|
|
}
|