mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-22 21:32:18 -06:00
IMP: Add single menu for content browsing
* Categories and content are now available and browsable in a single menu. * Navigation helps user to find content easily * Cleanups for pylint and flake
This commit is contained in:
28
document_page/static/src/js/document_page_kanban.js
Normal file
28
document_page/static/src/js/document_page_kanban.js
Normal file
@@ -0,0 +1,28 @@
|
||||
odoo.define("document_page.update_kanban", function(require) {
|
||||
"use strict";
|
||||
|
||||
var KanbanRecord = require("web.KanbanRecord");
|
||||
|
||||
KanbanRecord.include({
|
||||
// --------------------------------------------------------------------------
|
||||
// Private
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @override
|
||||
* @private
|
||||
*/
|
||||
_openRecord: function() {
|
||||
if (
|
||||
this.modelName === "document.page" &&
|
||||
this.$(".o_document_page_kanban_boxes a").length
|
||||
) {
|
||||
this.$(".o_document_page_kanban_boxes a")
|
||||
.first()
|
||||
.click();
|
||||
} else {
|
||||
this._super.apply(this, arguments);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user