mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
linting
This commit is contained in:
@@ -1,56 +1,54 @@
|
||||
$navbar-height: 40px;
|
||||
$main-color: #875A7B;
|
||||
$main-color: #875a7b;
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Web Client */
|
||||
.o_web_client {
|
||||
font-family: sans-serif;
|
||||
height: 100%;
|
||||
display: grid;
|
||||
grid-template-rows: $navbar-height auto;
|
||||
font-family: sans-serif;
|
||||
height: 100%;
|
||||
display: grid;
|
||||
grid-template-rows: $navbar-height auto;
|
||||
}
|
||||
|
||||
/* Navbar */
|
||||
.o_navbar {
|
||||
background-color: $main-color;
|
||||
background-color: $main-color;
|
||||
color: white;
|
||||
display: flex;
|
||||
line-height: $navbar-height;
|
||||
|
||||
span.title {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
display: inline-flex;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 0 4px;
|
||||
font-size: 20px;
|
||||
&:hover {
|
||||
background-color: darken($main-color, 10);
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
display: flex;
|
||||
line-height: $navbar-height;
|
||||
|
||||
span.title {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
display: inline-flex;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 0 4px;
|
||||
font-size: 20px;
|
||||
&:hover {
|
||||
background-color: darken($main-color, 10);
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
padding: 0 5px;
|
||||
|
||||
}
|
||||
text-decoration: none;
|
||||
padding: 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -649,7 +649,7 @@ const onDirective: Directive = {
|
||||
});
|
||||
ctx.addLine(
|
||||
`p${nodeID}.on = {${eventName}: context['${handler}'].bind(context${
|
||||
extraArgs ? ", " + qweb._formatExpression(extraArgs) : ""
|
||||
extraArgs ? ", " + qweb._formatExpression(extraArgs) : ""
|
||||
})}`
|
||||
);
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@ export function escape(str: string | number | undefined): string {
|
||||
*/
|
||||
export function htmlTrim(s: string): string {
|
||||
let result = s.replace(/(^\s+|\s+$)/g, "");
|
||||
if (s[0] === ' ') {
|
||||
result = ' ' + result;
|
||||
if (s[0] === " ") {
|
||||
result = " " + result;
|
||||
}
|
||||
if (result !== ' ' && s[s.length - 1] === ' ') {
|
||||
result = result + ' ';
|
||||
if (result !== " " && s[s.length - 1] === " ") {
|
||||
result = result + " ";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -26,4 +26,3 @@ export function makeEnvironment(): Env {
|
||||
actions
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
///<amd-module name="main" />
|
||||
|
||||
import RootWidget from "./widgets/root_widget";
|
||||
import {makeEnvironment} from "./env";
|
||||
import { makeEnvironment } from "./env";
|
||||
|
||||
document.addEventListener("DOMContentLoaded", async function() {
|
||||
const env = makeEnvironment();
|
||||
|
||||
@@ -12,13 +12,11 @@ import { Action } from "./actions";
|
||||
// { id: 2, title: "CRM", Widget: CRM }
|
||||
// ];
|
||||
|
||||
|
||||
|
||||
export default class ActionManager {
|
||||
doAction(action: Action) {
|
||||
console.log(action);
|
||||
// load data (??)
|
||||
// trigger action somewhere
|
||||
// upload url with router
|
||||
}
|
||||
}
|
||||
doAction(action: Action) {
|
||||
console.log(action);
|
||||
// load data (??)
|
||||
// trigger action somewhere
|
||||
// upload url with router
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
|
||||
export default class Ajax{}
|
||||
export default class Ajax {}
|
||||
|
||||
@@ -16,11 +16,14 @@ export default class Router {
|
||||
|
||||
constructor() {
|
||||
window.addEventListener("popstate", this.onUrlChange.bind(this));
|
||||
window.onhashchange = function () { console.log('aaaa'); debugger; }
|
||||
window.onhashchange = function() {
|
||||
console.log("aaaa");
|
||||
debugger;
|
||||
};
|
||||
}
|
||||
|
||||
onUrlChange(event: PopStateEvent) {
|
||||
debugger
|
||||
debugger;
|
||||
event.preventDefault();
|
||||
const info = this.getRoute();
|
||||
for (let listener of this.listeners) {
|
||||
|
||||
@@ -16,7 +16,7 @@ export default class Counter extends Widget<Env> {
|
||||
counter: 0
|
||||
};
|
||||
|
||||
constructor(parent: Widget<Env>, props: {initialState?: number}) {
|
||||
constructor(parent: Widget<Env>, props: { initialState?: number }) {
|
||||
super(parent);
|
||||
this.state.counter = props.initialState || 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user