| }); | }); | ||||
| function change_page() { | function change_page() { | ||||
| var hash = document.location.hash.substr(1) || conf.default_hash; | |||||
| var args = document.location.hash.substr(1).split('_') || conf.default_hash.split('_'); | |||||
| var hash = anchor.shift(); | |||||
| if (!$("#autodoc_tab_" + hash).length) { | if (!$("#autodoc_tab_" + hash).length) { | ||||
| hash = conf.default_hash; | hash = conf.default_hash; | ||||
| } | } | ||||
| }); | }); | ||||
| if (conf.pageinit[hash]) { | if (conf.pageinit[hash]) { | ||||
| eval(conf.pageinit[hash]); | |||||
| eval(conf.pageinit[hash](args)); | |||||
| } | } | ||||
| } | } | ||||
| document_load(); | document_load(); | ||||
| } | } | ||||
| function page_load_document() { | |||||
| var docid = $('#autodoc_tab_document').data('docid'); | |||||
| function page_load_document(docid) { | |||||
| console.log(docid); | console.log(docid); | ||||
| if ( !docid ) { | if ( !docid ) { | ||||
| return false; | return false; | ||||
| ); | ); | ||||
| $(col).find(".autodoc_template_home_img").data("documentId", doc.id); | $(col).find(".autodoc_template_home_img").data("documentId", doc.id); | ||||
| $(col).find(".autodoc_template_home_img").on('click', function (e) { | $(col).find(".autodoc_template_home_img").on('click', function (e) { | ||||
| $('#autodoc_tab_document').data('docid', $(e.target).data("documentId")); | |||||
| window.location.hash = 'document'; | |||||
| window.location.hash = 'document_' + $(e.target).data("documentId"); | |||||
| e.preventDefault(); | e.preventDefault(); | ||||
| // home_modal_open($(e.target).data("documentId")); | // home_modal_open($(e.target).data("documentId")); | ||||
| }); | }); |