| @@ -189,8 +189,9 @@ $(window).bind("hashchange", function () { | |||
| }); | |||
| 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) { | |||
| hash = conf.default_hash; | |||
| } | |||
| @@ -216,7 +217,7 @@ function change_page() { | |||
| }); | |||
| if (conf.pageinit[hash]) { | |||
| eval(conf.pageinit[hash]); | |||
| eval(conf.pageinit[hash](args)); | |||
| } | |||
| } | |||
| @@ -236,8 +237,7 @@ function page_load_home() { | |||
| document_load(); | |||
| } | |||
| function page_load_document() { | |||
| var docid = $('#autodoc_tab_document').data('docid'); | |||
| function page_load_document(docid) { | |||
| console.log(docid); | |||
| if ( !docid ) { | |||
| return false; | |||
| @@ -318,8 +318,7 @@ function document_load() { | |||
| ); | |||
| $(col).find(".autodoc_template_home_img").data("documentId", doc.id); | |||
| $(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(); | |||
| // home_modal_open($(e.target).data("documentId")); | |||
| }); | |||