-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cms_status_message: apply pre-commit
- Loading branch information
Showing
8 changed files
with
146 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
odoo.define('cms_status_message.autodismiss', function (require) { | ||
'use strict'; | ||
odoo.define("cms_status_message.autodismiss", function(require) { | ||
"use strict"; | ||
|
||
var sAnimation = require('website.content.snippets.animation'); | ||
|
||
sAnimation.registry.CMSStatusMessageAutoDismiss = sAnimation.Class.extend({ | ||
selector: ".status_message [data-autodismiss]", | ||
start: function () { | ||
this.dimissTimeout = this.$el.data('autodismissTimeout') || 8000; | ||
this.handle_autodimiss(); | ||
}, | ||
handle_autodimiss: function () { | ||
this.$el.fadeOut(this.dimissTimeout, function() { | ||
this.$el.remove(); | ||
}).on("mouseover", function(e) { | ||
$(this).stop(true /*, false implied */ ).fadeIn(0); | ||
}); | ||
} | ||
}); | ||
var sAnimation = require("website.content.snippets.animation"); | ||
|
||
sAnimation.registry.CMSStatusMessageAutoDismiss = sAnimation.Class.extend({ | ||
selector: ".status_message [data-autodismiss]", | ||
start: function() { | ||
this.dimissTimeout = this.$el.data("autodismissTimeout") || 8000; | ||
this.handle_autodimiss(); | ||
}, | ||
handle_autodimiss: function() { | ||
this.$el | ||
.fadeOut(this.dimissTimeout, function() { | ||
this.$el.remove(); | ||
}) | ||
.on("mouseover", function() { | ||
$(this) | ||
.stop(true) | ||
.fadeIn(0); | ||
}); | ||
}, | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
|
||
<template id="display_test" name="CMS status message display test"> | ||
|
||
<t t-call="website.layout"> | ||
<div class="container mt64 text-center"> | ||
<h1>Status message display test</h1> | ||
<form class="form" method="GET"> | ||
<p>Enter a message and submit the form. <br />You'll see your message rendered as a status message.</p> | ||
<div> | ||
<label for="message">Message</label> | ||
<input type="text" id="message" name="message"/> | ||
</div> | ||
<button type="submit">Test</button> | ||
</form> | ||
</div> | ||
</t> | ||
|
||
</template> | ||
|
||
<template id="display_test" name="CMS status message display test"> | ||
<t t-call="website.layout"> | ||
<div class="container mt64 text-center"> | ||
<h1>Status message display test</h1> | ||
<form class="form" method="GET"> | ||
<p>Enter a message and submit the form. <br | ||
/>You'll see your message rendered as a status message.</p> | ||
<div> | ||
<label for="message">Message</label> | ||
<input type="text" id="message" name="message" /> | ||
</div> | ||
<button type="submit">Test</button> | ||
</form> | ||
</div> | ||
</t> | ||
</template> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.