imp: rename library into owl

This commit is contained in:
Géry Debongnie
2019-03-27 15:26:20 +01:00
parent e53287b52e
commit 80e2124cbf
11 changed files with 18 additions and 16 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import { TodoItem } from "./TodoItem.js";
const { Component } = odoo.core;
const { connect } = odoo.extras;
const { Component } = owl.core;
const { connect } = owl.extras;
const ENTER_KEY = 13;
+1 -1
View File
@@ -1,7 +1,7 @@
const ENTER_KEY = 13;
const ESC_KEY = 27;
export class TodoItem extends odoo.core.Component {
export class TodoItem extends owl.core.Component {
template = "todoitem";
state = { isEditing: false };
+1 -1
View File
@@ -8,7 +8,7 @@ async function makeEnv() {
}
let templates = await result.text();
templates = templates.replace(/<!--[\s\S]*?-->/g, "");
const qweb = new odoo.core.QWeb();
const qweb = new owl.core.QWeb();
qweb.loadTemplates(templates);
return {
qweb,
+1 -1
View File
@@ -66,7 +66,7 @@ export function makeStore() {
);
const nextId = Math.max(0, ...todos.map(t => t.id || 0)) + 1;
const state = { todos, nextId };
const store = new odoo.extras.Store({ state, actions, mutations });
const store = new owl.extras.Store({ state, actions, mutations });
store.on("update", null, () => {
const state = JSON.stringify(store.state.todos);
window.localStorage.setItem(LOCALSTORAGE_KEY, state);