summaryrefslogtreecommitdiff
path: root/addons/website_event/static/src/js
AgeCommit message (Collapse)Author
2019-08-19[MERGE] forward port branch 12.0 up to 32039b2ab44Christophe Simonis
2019-08-12[MERGE] forward port branch saas-11.3 up to 76a52bdbfbcChristophe Simonis
2019-08-09[FIX] website_event: clean local events snippet before saveqsm-odoo
The local events snippets is an empty HTMLElement which is filled by JavaScript on page loading. Before this commit, the filled content was saved in database. This does not create a real problem as the content is reloaded as soon as the page loads but you can see old events flickering before the new events are actually loaded. Now the snippet is cleaned before saving. This also allows to add default content with a custo so that it is shown during the events loading (as we are currently doing on odoo.com...). closes odoo/odoo#35597 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-14[FIX] website_event: wait drag and drop to be finishedChristophe Monniez
During the event tour, the save button is clicked before the drag and drop is finished and cause an uncaught exception. With this commit, an extra trigger is used to check the presence of the dirty flag that is set when the page is changed and is ready to be saved.
2019-03-06[REF] website_event: adapt code after jQuery updateVincent Schippefilt
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-02-27[REF] *: definitely get rid of web_editor.baseqsm-odoo
* portal, sale, website, website_blog, website_crm, website_event, website_event_sale, website_forum, website_hr_recruitment, website_sale, website_sale_wishlist At last, that ugly JS module can be removed. Before this current PR, it was still used to wait for "page ready", to initialize widgets on page loading. Now, all can be done thanks to public root and public widgets. web_editor.base was also still used in tours, which should not be necessary anymore for the same reason, especially since the tour manager waits for the public root naturally. Part of https://github.com/odoo/odoo/pull/29442 task-1932066
2019-02-26[REF] website, *: use public widgets instead of website animationsqsm-odoo
* website_blog, website_crm_partner_assign, website_event, website_event_track, website_form, website_forum, website_links, website_mail, website_mail_channel, website_mass_mailing, website_sale, website_sale_comparison, website_sale_delivery, website_sale_stock, website_sale_wishlist, website_slides, website_twitter While using the 'Animation' class of website instead of the frontend 'Widget' class leads to the same behaviors, this refactoring is done for two reasons: - Stop using the confusing 'Animation' name for non-animated behaviors - Instantiation of 'Widget' is slightly faster than 'Animation' Part of https://github.com/odoo/odoo/pull/29442 task-1932066
2019-02-11[MERGE] forward port branch saas-12.1 up to 93d736e905eChristophe Simonis
2019-02-06[MERGE] forward port branch saas-11.3 up to 0c42a607eceChristophe Simonis
2019-02-05[MERGE] forward port branch saas-15 up to 66efbf2b5bfChristophe Simonis
2019-02-05[MERGE] forward port branch saas-14 up to 53ba83579beChristophe Simonis
2019-01-29[FIX] website_event: restore country events optionqsm-odoo
With https://github.com/odoo/odoo/commit/ac8b0fcfc5299b5ea62543b8382cb419fed4868e, the 'country_events' class was renamed to 'oe_country_events'. This was done correctly for JS animations and snippets but not for the 'Country Events' option in the customize menu. This made the option useless. This commit solves the problem by supporting the two classes (as it is a stable fix). closes odoo/odoo#30662
2019-01-25[REF] website, *: remove 'web_editor.ready'qsm-odoo
* website_event Following the new editor's merge at https://github.com/odoo/odoo/pull/29775, 'web_editor.ready' was moved to website without being renamed. Following https://github.com/odoo/odoo/pull/30409, this will remove that 'web_editor.ready' module. See upcoming improvements with https://github.com/odoo/odoo/pull/29442 closes odoo/odoo#30548
2018-09-25[IMP] website: add quick install from "new content"Sébastien Theys
This gives the user an overview of the possible actions, including those he currently does not have installed. It allows him to quickly install the missing applications without having to go on the backend. The commit also improves the existing actions: - correct handling of the actions deferred - add some translated terms PR: #27110 task-1885419
2018-09-05[FIX] website_event: attach 'new register' modal to bodyJeremy Kersten
Before this commit it was attached to the form, in case your banner was customized to have the font-color white, the text modal become white on white. Now we attach to body, to don't have custom design from parent div. This commit closes opw-1881280
2018-07-09[FIX] *: fix some side-effects of ↵qsm-odoo
https://github.com/odoo/odoo/commit/9de1bc0eef6f5bfaa2a8d745431caa361ae91548 - JS Modals were not correctly built anymore, their .modal-body element was duplicated and many without-effect JS lines were introduced (as a side effect, the form view design was broken when inside modals) - Tests were changed to make bugs go unnoticed. For example, the media dialog functionnality was entirely broken because the .modal-dialog element was not receiving the correct class anymore. - The JS translation function is _t, not _ - Do not use the <title/> tag as a regular DOM element, it is meant to be unique, in the <head/> section - CSS rules were added to the utils.scss file, which is meant to contain functions and mixins, otherwise, the rule is duplicated in every asset - Some icons were still broken, as missed by https://github.com/odoo/odoo/commit/f90cf060a3cfeb37a67bec83264c0aaab8892b56 - Tests were changed to use [role="dialog"]/footer/header in their selectors without any reason, this commit restores some of that to avoid rebase conflicts with the BS4 work. - ... Note: other elements should still be discussed, like the direct use of the 'o_form_label' class in views definition... but those do not cause direct problems.
2018-06-22[IMP] Improve compatibility with screen readers (accessibility) (#24574)kujiu
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable. This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader. * [IMP] Labels must have a for attribute. Improve accessibility. * [IMP] Better error message when trying to read a missing cached value * [FIX] Add some aria-label and title attributes for screen readers. * [FIX] Template name is not included in the error message in case of SyntaxError in QWeb * [FIX] Improve the Tour failed at step error message to be more explicit. * [IMP] Add aria-labels * [FIX] Add missing aria-label on failing test * [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all. * [IMP] Color names on kanban views and many2many tags * [IMP] Add some checks on views for accessibility. * [IMP] Add `alt` attribute on `img` tags. * [IMP] Add aria-label and title on non-described icons * [IMP] Add button role to widgets with btn class * [IMP] Translate aria and formatted attributes. * [IMP] Remove wrong aria-labelledby * [IMP] Add menu role on dropdowns * [IMP] Buttons must be focusable * [IMP] Add aria attributes on progress bars * [IMP] Improve accessibility of basic widgets * [IMP] Change main layout to more semantic tags * [IMP] Add menuitem role when missing * [IMP] Remove wrong role='presentation' * [IMP] Improve accessibility of tab panels * [IMP] Add aria-invalid on invalid fields * [IMP] Add aria-sort on ordered columns * [IMP] Add role on alerts * [IMP] Use dialog role, header, main and footer tags for modals * [IMP] Add labels on o_status * [IMP] Improve accessibility of kanban view with feeds and articles * [IMP] Add alerts in case of new messages * [IMP] Add widget, navigation or img role to aria-labelled items
2018-06-12[MERGE] forward port branch saas-15 up to d44cd778844Christophe Simonis
2018-06-12[MERGE] forward port branch saas-14 up to 284ed9216c9Christophe Simonis
2018-06-11[FIX] website_event: improve registration modal behaviorAdrien Peiffer (ACSONE)
Currently there are 3 ways of going out of the modal: clicking cancel registration, hitting the close button or clicking outside the modal. The latter one however does not trigger the close event for modals and therefore buttons of event registration are not reset correctly. This commit fixes that behavior by preventing to close modal by clicking outside of it. Buttons should be used and flow is now fixed. Closes #25174 .
2018-06-05[MERGE] forward port branch saas-15 up to c301122b5feChristophe Simonis
2018-06-04[FIX] website_event: unblock button when no reserveNicolas Lempereur
In 11.0, this change e9454e79 solved the use case of: - opening the registration of a ticket - discard => the page must be reloaded to register a ticket A new report is that since 9.0, if we try to register 0 ticket we would also have to reload the page. This commit backports e9454e79 and solves the 0 ticket registration. 10.0 version of 9.0's #24966 opw-1851622 closes #24991
2018-06-01[FIX] website_event: unblock button when no reserveNicolas Lempereur
The website_event_questions override EventRegistrationForm's method on_click and expects the returns is a deferred. This commit provides a deferred in all instances avoiding an error. Also what was done in e9454e79 and enables back the Register Now button if no ticket was selected. opw-1850527 In 11.0, this change e9454e79 solved the use case of: - opening the registration of a ticket - discard => the page must be reloaded to register a ticket A new report is that since 9.0, if we try to register 0 ticket we would also have to reload the page. This commit backports e9454e79 and solves the 0 ticket registration. Also if website_event_questions was installed there was an error preventing an error message to be displayed. saas-15 version of 9.0's #24966 opw-1851622 closes #24967
2018-05-08[FIX] website_event: typo tickets not disappearNicolas Lempereur
Since 809aaf9e, when clicking on "Register Now" on a ticket registering page, the ticket list disappeared because of a typo. opw-1841488 closes #24607
2017-10-27[MERGE] forward port branch saas-16 up to 8fdac4b6b2fChristophe Simonis
2017-10-26[MERGE] forward port branch saas-14 up to a2890c1e76cChristophe Simonis
2017-10-26[MERGE] forward port branch 9.0 up to 809aaf9e7b9Christophe Simonis
2017-10-26[FIX] website_event: avoid double subscriptionJeremy Kersten
Before this commit, you was able to double click on the button when are in registration flow. In this case, you subscribe 2 times and so take 2x more seats, what can be annoying when you have a limited room. In the same time, we fix the form in the form that generate strange behaviour like some events not bubbled correctly. The attendee form (into the modal) was inside the registration form. $'attendee_form).on('submit') obviously failed due to this bad dom. This commit closes opw-778191
2017-09-15[ADD] website: add new page managementrde
website.page = old ir.ui.view with page=True website.redirect is a new mechanism to replace in the futur the ir.attachment mechanism of redirect. From now, we don't have a specific /page controller to serve 'page'. We use a new model website.page which is rendered if none route matches the url and that the field 'url' on website.page matches the request.httprequest.path. The order to serve a path is: - Routes defines in controllers (/shop, /blog, ...) - ir.attachment with name matching the path - website.page with url matching the path - website.redirect with url_from matching the path - 404 To improve: - allow regexp in website.redirect model - allow to edit the view_arch from the page.management via redirect backend (needed when traceback in the page, or when modifying a js/css/less/...)
2017-08-16[REF] web_editor, website, *: complete refactoringqsm-odoo
* mass_mailing, payment, point_of_sale, portal, survey, web, web_tour, website_blog, website_crm_partner_assign, website_event, website_event_questions, website_form, website_forum, website_gengo, website_hr_recruitment, website_links, website_mail, website_mail_channel, website_mass_mailing, website_quote, website_sale, website_sale_options, website_slides, website_twitter This commit reviews the whole "JS side" of the web_editor and website apps. This is a first step to be able to improve them with new and better functionnalities; this commit is not supposed to change any visual behavior. The main goal was to achieve a structure similar to the backend one. Now, the frontend side also has a root widget (like the WebClient) and all other widgets are attached to it one way or another. This allows the benefits of using the 'trigger_up' functionnality for example. As RPC are now mainly done with the `this._rpc` functionnality (being possible thanks to the parent hierarchy), the frontend will also be possible to test thanks to QUnit in a future update (besides the "text" editor side which still requires a refactoring to be able to do that). --- Here are some of the changes: (-) conventions and documentation The code has been updated to follow JS conventions and a lot of code has been commented (around +2000 lines of comment). This also means that lots of functions have been renamed to use camelCase or simply to make their name understandable. See https://github.com/odoo/odoo/wiki/Javascript-coding-guidelines. (-) deprecated: web_editor.base The "web_editor.base" module has been split and does not force the modules which require it to wait for DOM ready anymore. This was indeed slowing loading times, but also prevented to use some modules in some contexts (see the LESS editor use in web_studio which is the subject of another task). Now the "editor context" can be got thanks to the "web_editor.context" JS module with its "get" function. The "web_editor.base" module should probably not be used anymore (see its code and recent updates). (-) new: web.dom_ready If a JS module should wait for the DOM to be ready to be executed, a new JS module has been created: "web.dom_ready". This should always be used in a module which only want to instantiate stuff. Do not extend (or worst, include) classes after DOM ready. (-) website.website The "website.website" module has been split. "website.website" does not return anything useful anymore, it just initialize some miscellaneous stuff, without waiting for the DOM to be ready. You might want to check "website.utils", "website.content.compatibility" or `WebsiteRoot`. Also `website.form` has been deleted (use `this._rpc`), so has been `website.error`. `website.prompt` will be removed in a future update to be replaced by `Dialog.prompt`. (-) widgets are great Many classes which were not widgets are now widgets. This allows them to use the 'events', the 'xmlDependencies' and the 'this._rpc' features for example. Here are some of the main ones: - Snippet options: these were classes with a `$el` for the menu element and `$target` for the customized element. This is still the case but following standard `Widget` structure (one exception: using `this.$(...)` searches in the `$target` as before this update). - Snippet animations: instead of class instances with a `$target` element which can be `start` and `stop`, these are now standard widgets which can be `start` and `destroy`. `this.$target` is an alias to `this.$el` for ease of compatibility. - Snippet editors: instead of class instances in charge of an editor overlay, these are now widgets. Each "child" snippet editor is properly attached as a "child", which allows editors to communicate and to be properly destroyed. (-) root widgets and website navbar The frontend is different of the backend. In the backend, the page has an empty <body/> element and all the components are instantiated from parent to children (i.e. the `WebClient` is instantiated and is in charge of instantiating the `ControlPanel`, etc). The frontend cannot work like that on page loadings as they are way more frequent than in the backend and we do not want them to flicker. A frontend page is loaded as a <body/> element which already contains the website navbar and its menus and the whole content page. JS code has to be "attached" to these existing elements. This is possible thanks to the `RootWidget` instances and the specialized `WebsiteRoot`, `IframeRoot` and `WebsiteNavbar` (see code for details). (-) lazy loading No more (or at least a lot less) XML/JS has to be loaded on page loading, thanks to the use of the `Widget.xmlDependencies` feature. XML which have to be lazy loaded is loaded only on related Widget instantiation if necessary, which allows to execute a lot of JS code before the DOM is ready and to start many widgets on DOM ready (not later). A visual benefit of this is clicking on the 'edit' button as soon as it is possible: before this commit, this was sometimes not doing anything as event handlers were not binded yet. Still a possible exception: loading the session and locales. This may be asynchronous stuff which is still required before widget instantiations but this will be the subject of another task. (-) deprecated code and code location More than reviewing code and organizing it, many apparent dead code was removed. More importantly, mislocated code was put in the right app. This is the case for snippet animations which is a concept for website apps but was defined in the web_editor app, or some translation concepts which were part of website but should have been part of web_editor. --- There are probably more things to say about this commit but I will let the comments speak for those.
2017-03-03[IMP] website_event: apply checkout / buy process improvementsMitali Patel
* reword various texts in website_event to avoid references to a sell or checkout process as website_event does not handle sakes; * if there is only one ticket available, propose to take one by default. Display Register Now instead of Order Now if tickets are free. Display an error if the user chooses no tickets in its registration.; * link in cart for event tickets redirects to event, not product; * confirm attendees only at invoice payment; * improve wording, use schedule instead of agenda.
2016-08-26[IMP] web_tour, *: allow to properly extend toursqsm-odoo
* crm, project, website, website_event, website_blog, website_forum, website_sale Eg: the tour 'shop_buy_product' is extended by the website_sale_options addons to add a step to close a modal. The current solution was requiring the module that defines the tour to extend, then add/remove steps in the "step" key of the tour definition. Some of the problems with this method were: * The "register" method calls the "update" method to immediately search for tip to place once registered (as register may be called after the DOM is ready). So extensions of tours were happening after the tours were started (and the tours were not restarted). * The addition/removal of steps was happening after they were filtered according to the "edition" key. To allow extension, the system is changed as follow: * The "register" method now only saves the steps and options without modifying them and does not call the "update" method. * Once the DOM was ready, the tour service started listening to DOM mutations and called the "update" tour method. Now, this "update" call is replaced by a "_register_all" call, on DOM ready and at the end of the current call stack (which makes sure all modules are loaded). This "_register_all" method marks the registered tours as ready after having filtered the steps according to the "edition" key and initialized the current step to trigger. * Also, tours can now define a "wait_for" option which allow them to be marked as ready for run and update after the given deferred. Those tours can now also be extended without having to wait for the deferred. PhamtomJS must wait for the "ready" key to be true to run the tour.
2016-07-18[IMP] *: activate automatic tour testsqsm-odoo
* project, crm, point_of_sale, website, website_sale, website_blog, website_event, website_forum
2016-07-05[IMP] website(_*): toursqsm-odoo
* Adapt modals for new pages/product/... to leave some space for tour tips on the right * Remove the "click on add page" step which was the start of each tours and leave it to be the last of the website tour * Change position of some tips * Remove step "click on parent button" in website tour as it is not necessary anymore * Remove the possibility to skip the frontend tours
2016-07-04[IMP] website(_*): adaptation of tours to new systemqsm-odoo
+ Adapt website welcome message (Note: temporary duplicate tour: use old version for tests and new version for onboarding)
2016-06-16[IMP] website_event_question: Front-end register display improvementsMohammed Shekha
Purpose: Registration form needs some improvement : When there is lots of question and answer and sometimes question is too long then view is mashed/weired Improve the view and show one question and one answer on line, next question and answer will come on next line, Also change the common question/answers view, put question answer in inline and each question/answer should come into next line Mockup : http://bit.ly/1zpoWju
2016-02-24[FIX] web*: toursqsm-odoo
Selector changes + No need to open the snippet panel anymore.
2015-10-01[FIX] website_event: unnecessary POST callXavier Morel
2015-07-10[IMP] web_editor: adapt css, js and xml to use web_editorChristophe Matthieu
2015-05-15[IMP] website, website_sale, crm, web_planner : add planner for website modulesDarshan Kalola
This commit impact crm, website, website_sale and web_planner modules because it - add planner for website and website_sale - improve planner notebook by setting texterea and input size to 100% and using col-md-* class - split js code into common part (used in backend and frontend) and backend part (only for backend) - adapt some tour, since every page will have the planner modal in its DOM, the tour selectors msut be more accurate - introduce some style fixes and adaptations - ...
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] website_event: update to the new module systemGéry Debongnie
2015-03-04[MERGE] forward port of branch 8.0 up to 017f346Christophe Simonis
2015-03-03[FIX] website: translations for qweb templates not applied.Goffin Simon
-Website.tours must be loaded after the translation data: "website.ready" before the tour ensure that the translations are loaded. -Translations for qweb templates not applied: Translate all text nodes in qweb templates when translation data are loaded. -Add some translations in website tours. opw:619786
2015-03-02[FIX] website: need to wait the editor to continue the tourChristophe Matthieu
2015-01-26[IMP] website editor: display snippet block on the left side and open it on ↵Christophe Matthieu
mouse enter
2015-01-05[IMP] website: use the new summernote editorChristophe Matthieu
2014-10-09[IMP] event: Split Ticket: registration are now for one attendee only.Paramjit Singh Sahota
Registration are now for one attendee only. When buying several seats for an event you have now one registration for each attendee. event: nb_register field is removed; as well as unnecessary user_id and it subscribe / unsubscribe behavior. Also slighly cleaned some views. event_sale: do not auto confirm registrations linked to a draft sale order. Note: strange origin is a char field, not a sale_order_id. Added a small wizard to edit attendees data when confirming a sale order containing event related lines. website_event: when buying free tickets, ask for attendee details. Added template, controllers to handle that behavior. website_event_sale: when buying tickets, ask for attendee details. Events ecommerce should be better integrated with online events, using inheritance to add details instead of being very different.
2014-06-27[MERGE] backend front end integrationSimon Lejeune
Render the top-menu (backend menu or frontend editbar) server-side. Use Fontawesome icons (mail, timezone, chat). Refactor website widgets, split Website.editorBarin editorbar, ace, editorbar- content, editorbarCustomize.
2014-06-18[IMP] Tour: add tour in web module; tour became available in backend.Christophe Matthieu