Make the cancel and apply button applicable for all modules

If a user does changes in module A, does not save or cancel,
goes to module B, does some changes, moves to other modules,
and finally presses Apply, all changes should get saved.

Similarly, if a user cancels, all changes should get cancelled.

This required moving the cancel and apply button outside of modules
and managed by the language settings framework.

Modules get mw.uls.settings.apply or mw.uls.settings.cancel triggers
to do whatever they want to do on apply or save.

Includes some refactoring related to this.

Bug: 53256
Change-Id: I7d773d33a980a78604b36e39bf96a5686870124e
This commit is contained in:
Santhosh Thottingal authored and Amir E. Aharoni committed 2013-09-02 17:03:13 +02:00
1 parent 375c676fba
commit 3af403fee5
9 files changed
+51 -80

No files matched your search

@@ -4,10 +4,8 @@ module InterlanguagePageModule
include PageObject
a(:add_links, id: 'wbc-linkToItem-link')
span(:apply_settings, class: 'uls-settings-trigger')
a(:back_to_display, text: 'Back to display settings')
a(:back_to_input, text: 'Back to input settings')
button(:cancel, class: 'button uls-display-settings-cancel')
span(:cog, class: 'uls-settings-trigger')
button(:ellipsis_button, class: 'uls-more-languages button')
a(:english_link, text: 'English')