summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/tree_view.js
AgeCommit message (Collapse)Author
2017-04-11[REF] web, *: redesign all JS viewsGéry Debongnie
This commit introduce a full redesign of all JS views. We started basically from scratch. The goal was to unify all the various views under a common framework, to make them testable, to make then usable in different conditions (in studio, or in the frontend), and to make our lives easier. Some important points are: - we introduced new coding guidelines (camelCase, 80 chars width, ...) - we have a brand new testing framework (still QUnit based) - kanban view moved to the web addon - calendar view (formerly web_calender) moved to web as well - the tree view was removed - all new code should be documented We hope that this code is the start of a new era for the Odoo web client, we want to have a high quality codebase, well documented, well tested, well designed. Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2016-09-15[FIX] web: error when click twice on "Salary Structures Hierarchy"Christophe Matthieu
2016-04-21[REF] web: stop duplicating webAaron Bohy
Avoid duplicating web addon in enterprise by extracting a common basis. Enterprise features stay in enterprise, but use that common basis. Mainly: - JS refactoring and linting - Conversion of .sass into .less split into multiple files - Templates cleaning and DOM simplification - Re-generation of web.pot, and update of .po files
2016-03-18[IMP] openerp, web(_*): batch views RPCsAaron Bohy
Load the fields_view of all views of the action together. If a searchview is required, also load its fields_view and its filters. Use lazy-loading for fields as they are required for the Pivot and Graph views only, and may be used by Filters and GroupBy menus of the Search view if the users clicks on 'Add a custom Filter/Group'. The fields are thus also loaded directly if the first view of the action is Pivot or Graph, and otherwise, they are lazy-loaded when/if the user opens a Pivot or Graph view, or if he wants to add a custom Filter/Group. Some refactoring of views API as well: - Views must now be instantiated with their fields_view - Move code requiring fields_view from start() to init(), or willStart() for heavy processing. - Remove view_type attribute from views as it was used to call fields_view_get. - Remove view_id parameter to views' init as it is no longer used. - Move duplicate code from various views' init to the View widget. - Remove view_loading() function from views as they now follow the classical lifecycle of widgets (init -> willStart -> start -> destroy). - Searchview now extends View like all other views. - Remove useless function guard_active() as it was used for the form_view's action buttons to wrap handlers to ensure that they are executed only if the form_view is the current active view. This is not useful anymore as from v9, views and their control panel are appended in the DOM simultaneously, so one can't click on a button of a view which is not the current active view.
2015-08-07[REF] web(_*): views: view_switcher iconAaron Bohy
Add a key icon in the view's prototype corresponding to the font-awesome icon to display in the view switcher.
2015-07-17[IMP] web: use a classname to show/hide widgetsAaron Bohy
The problem of $el.show()/hide() is that calling show() on a jQuery element on which there is no display rule in the stylesheet automatically sets 'display: block'. However, when a jQuery element is not yet in the DOM, the rules defined on it are not yet applied, meaning that calling show() will set its display to block (in inline style), even if there is different a css rule (e.g. 'dislay: flex'). As the inline style takes the priority over the stylesheet, the correct display won't be applied, even when the widget will be appended in the DOM, resulting in a possibly broken layout.
2015-03-18[IMP] web+addons: improvement to module systemGéry Debongnie
The module system needs to know the dependencies of a given module before executing the function. This is why the dependencies were defined once in an array, and then were described one more times in the call to require. But a trick can simplify this: the boot function can parse the string representation of the module and extract the calls to require from it. It is more work for the processor, but it leads to simpler module definitions.
2015-03-18[REF] web: add module system to the web clientGéry Debongnie
This commit introduces a new module system for the javascript code. Instead of using global (namespaced) variables everywhere (like openerp.web.whatever, ...), each file declare one (or more) module with its dependencies. Each module will be loaded after its dependencies, and will be given a reference to the return values. This change is a massive departure from the way the client worked previously. It will sadly break some/most history, but I am sure that the future git ecosystem will allow you to easily browse the history past this revision (one can dream). This commit feature: * main namespace is now odoo instead of openerp * a way to define modules and dependencies (inspired by requirejs) * many files have been splitted in simpler subfiles * basic support for debugging in odoo.__DEBUG__ * no global variable (i.e. nothing in window.openerp) * many bug fixes, many new bugs Future vision: this modularization should simplify future code development, simplify debugging and will allow a serious testing effort