Commit Graph

49 Commits

Author SHA1 Message Date
Santhosh Thottingal
be99ff9a55 Fix bug: Cannot apply changes after switching panels back and forth
Bug: 57011
Change-Id: I0614d97dea99781f46bb80a496b12c95aef55c8c
2013-11-14 14:12:59 +00:00
Santhosh Thottingal
f5ce066c80 Lazyload jquery.uls library
In the "interlanguage" position ULS is shown after 2 clicks,
so don't load it initially.

In the "personal" position ULS is shown immediately after
the language icon click, so load it, but conditionally.

The new RL module ext.uls.mediawiki is added for setting
jquery.uls defaults in a way that will lazy-load the language names.

Change-Id: Ic33ef034c794a523b5403867196c6098a58eb5b1
2013-11-11 14:13:02 +05:30
Siebrand Mazeland
315cf739bc Update formatting
Change-Id: Iaee2ab4f36d3a0dce143c62965ab29de504b31ea
2013-10-09 15:40:39 +02:00
Santhosh Thottingal
3af403fee5 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
2013-09-02 17:03:13 +02:00
Nikerabbit
ef826e0e75 Simplify the cancel logic for input and display settings
Change-Id: I2afe78edad31b00a35d0589384e4091b61091275
2013-08-29 10:57:45 +00:00
Nikerabbit
537e6def5d Revert "Simplify the cancel logic for input and display settings"
This reverts commit a5d79594a3.

Causes new integration tests to fail.

Change-Id: I7e14d73d0d726a3253e8c6e6bdf5066230d8454c
2013-08-27 12:34:50 +00:00
Santhosh Thottingal
a5d79594a3 Simplify the cancel logic for input and display settings
Restore the language(ui, content), font values, input method values.

Rest of the UI resetting will be done by redrawing the settings
area whenever the language settings is accessed again.

Change-Id: Ia1488d1501f9c9f61726cea3637624f22a7ba135
2013-08-26 14:56:38 +00:00
Santhosh Thottingal
4704cf5182 Use mw.hook for notifying cancel of settings window to modules
This avoids mandate of having 'cancel' method defined in settings module.
Also avoids looping of all modules while cancel is happening.

Change-Id: I87d0975f2ef1bdee61f71d66eabe3040b81876b8
2013-08-22 11:51:26 +05:30
Siebrand Mazeland
64cd234e27 Change comma to semi-colon
Cannot cause confusion this way.

Change-Id: I75e6dcd9e9dd45e8b9c605c28d766f87e06dd271
2013-08-05 17:21:08 +00:00
Santhosh Thottingal
f11ef736a4 Fix the logic of apply and cancel actions
* Refactored the Cancel button handler code to cancel method in
display settings and input settings.
* When the user makes changes in multiple modules and clicks the Cancel
button or closes the language settings after that, cancel the changes in
all the modules. See bug 50564.
* The Apply button was always active in input methods module. Fixed the
logic for that.
* Renamed the enableApplyButton method to markDirty in both modules.
* Introduced isDirty attribute to the modules for optimizing the Cancel
method to avoid unnecessary restore actions.
* More minor cleanup and documentation.

Bug: 50564

Change-Id: I71f527bfb7dd7f6724e4365371ac3e4fc0723ed6
2013-07-23 14:09:27 +03:00
Santhosh Thottingal
f144cd5c16 Fix regression of bf1d62ba4
https://gerrit.wikimedia.org/r/#/c/75076/ had multiple issues:
1. Selecting of input methods stopped working
2. With 'personal' position, ULS windows comes on every page click

Bug: 50559

Change-Id: I0cf815228760d27bca07acd58631713988659831
2013-07-22 11:25:30 +00:00
Santhosh Thottingal
bf1d62ba42 Close language settings when clicked outside
To make the behavior consistent with ULS langauge selection window.

This also avoid multiple language settings screen appearing in rare
case of using two entry points to access language settings one after
another.

Bug: 50559
Change-Id: I990eb6402085290df314db0a75235e0ad7b2fd55
2013-07-22 13:40:23 +05:30
Santhosh Thottingal
8f9cec5835 Sort the language modules by id
Bug: 49735
Change-Id: I82e0d47781f982dd1a6ea7cc1e3cbe07bfd6b616
2013-06-26 10:25:25 +00:00
Amir E. Aharoni
3332062bac Cleanup ext.uls.languagesettings.js
Change-Id: Ied12c6bf2022c0c291d7e5edc213340e6a159f77
2013-06-14 18:28:35 -07:00
Santhosh Thottingal
6a9b31ad26 Use smooth scrolling for the windows when not in viewport
Change-Id: I94591d17ba023d9a13e2436ddebfd0209e076845
2013-06-07 14:26:31 +00:00
Santhosh Thottingal
84355a422d On show of language settings, update the panel
Settings changed using other UIs will not be updated unless we refresh
the settings panel.

Bug: 49148
Change-Id: Ia7cd8c91e59360c80eb72fdf0a966bdb3ce52d27
2013-06-07 14:25:39 +00:00
Santhosh Thottingal
73716f3f67 Remove lot of scroll to view related code
Just use javascript scrollIntoView to do that.
Also remove duplication of code related to this

Change-Id: Ied1235a85f4fe2d99afa127737979c24d3591118
2013-06-03 05:44:17 +00:00
Santhosh Thottingal
146f0fc2a4 Scroll the window to show language settings if necessary
Restores the feature removed while refactoring in
Iafb15ac9a7140fcce9e71ed933be6c55be81dc7e

Change-Id: I3aec168457190b7bfb40c09c97252e0cbb3dd1de
2013-05-20 14:01:58 +05:30
Santhosh Thottingal
b1563040ab Cog icon can be used to close the language settings panel
Bug: 47971
Change-Id: I7b6d6142e113bf3f90feef1650bc384a5edc42cb
2013-05-20 07:59:43 +00:00
Santhosh Thottingal
bb3e72f5a0 Simplify the language settings display
Directly show language settings instead of showing ULS language selector
and then simulating click on language settings

Change-Id: Iafb15ac9a7140fcce9e71ed933be6c55be81dc7e
2013-05-20 10:21:38 +05:30
jenkins-bot
ee9fe23599 Merge "Scroll language settings on all changes" 2013-05-16 09:52:35 +00:00
Amir E. Aharoni
5dde8024cf Revert "Avoid duplicate languagesettings dialog in page source"
This reverts commit 3b2e39d822.

Because of that commit input settings cannot be opened from
the IME menu and from the buttons at the bottom of ULS.

Change-Id: I9aee4f40d39392df0cdc5aba8b481b71838dc41a
2013-05-15 22:38:42 +03:00
Amir E. Aharoni
73e6e01c22 Scroll language settings on all changes
Change-Id: I550f309d713cb6aac6b18b326379b879dc0b9589
2013-05-15 15:33:26 +03:00
Santhosh Thottingal
3b2e39d822 Avoid duplicate languagesettings dialog in page source
Bug: 48211
Change-Id: I78ad47b1875f9f6f40707fb05f948c939fe91b39
2013-05-15 14:46:46 +05:30
Amir E. Aharoni
03546744ba Changes to show the display settings in the sidebar
* Add a caret for the ULS in the sidebar.
* Adjust the panel's position.
* Immediately show the Display settings instead of the language list.

Also added documentation.

Change-Id: I6635092e9e020cb1f5b51f437abde4e81c31ae48
2013-05-02 07:51:49 +03:00
Pau Giner
a2bb12e332 Make sections more clear in settings panel
CSS adjustments to visually distinguish settings sections from the
settings panel. Sections in the left use a light gray background to
provide contrast with the specific settings of each category.

Change-Id: Ie56020d6b8886cb9296f9ac9defe6ad81a6cc184
2013-03-27 12:15:04 +01:00
Amir E. Aharoni
4f651fa0e2 Cleanup for JSHint
Change-Id: I35d2d41640f405f4e1e94b18ddac751437a84bb5
2013-03-05 14:50:12 +02:00
Santhosh Thottingal
ff54d8ac13 Update jquery.uls from upstream
Contains CSS grid changes

Change-Id: I064304d0727c9a050935793c44588c6eb93c00b4
2012-12-04 11:07:28 +05:30
Santhosh Thottingal
36a8382763 Do not close when clicked outside
Change-Id: I8c62161ee277dcbad9f8989362290b983978c785
2012-11-21 17:34:33 +05:30
Santhosh Thottingal
5e6d44e940 Close the language settings if clicked outside
Make the behavior consistant with ULS language selector

Change-Id: I9bfc29f908ebe48a1bb9cdcdede75a5d5aa3839d
2012-11-21 17:05:27 +05:30
pginer
73bb7015c8 CSS fixes to match the style modifications of jquery.uls
The style rearrangements of jquery.uls (to avoid CSSLint warnings)
requires some fixes on the extension.

Also update the changes from jquery.uls

Change-Id: I607f7778e620a398ce8648c21c594a3505ec0816
2012-11-20 16:33:32 +05:30
Santhosh Thottingal
90de05cb97 Make the setting item toggle on click
Selection was not removed from other items when clicked.

Change-Id: Ie460ecc6504ccbe2abc217ba2e0a027f407c31cc
2012-10-26 11:14:02 +05:30
Santhosh Thottingal
b8b6cc7be7 More jshint fixes
Change-Id: I132133b183be28165067f2c023304c00a4cb8f76
2012-10-16 17:10:08 +05:30
Santhosh Thottingal
018f8418ad Internationalize Mediawiki ULS extension
Change-Id: I17d6c4d6322e30c96a48788dd34dc11530b809b5
2012-09-25 16:39:40 -07:00
Siebrand Mazeland
e1a4f7f0cb After training the PHPStorm code formatter.
See https://github.com/siebrand/MediaWiki-PHPStorm

Issue remains with anonymous functions in JavaScript.

Change-Id: I2b520f8df127452acf02deb659277a6465e6ca59
2012-09-17 17:10:59 -07:00
Santhosh Thottingal
ac79f8a205 Fix the broken default module rendering
defaultModule option for language settings is module name string
and not the module itself

Change-Id: Ief84cc723157df43c7ec57d6576a707df09b9e2d
2012-09-12 15:30:33 -07:00
Santhosh Thottingal
5c07275300 Fix Bug 39686 - Cancel button in settings should go to the previous context
* Add an onClose option for language settings
* Add a close method to language settings and display settings
* some documentation and cleanup

Change-Id: I3040e0740bd8a9f9f7d3ad508a3003415a24e7a9
2012-09-12 10:52:58 +05:30
Santhosh Thottingal
0b2b993b19 Correct selectors, and formatting
Fix the issues from Ib2c8cfed
And for ID based selectors removed the element name.

Change-Id: I0016246c3a32b2b3696a1da1c04f507275c2267c
2012-09-07 18:55:02 +05:30
Santhosh Thottingal
805482d9cd Fix Bug 39529 - Display settings section should be selected by default
* add a parameter acitve to renderModule so that it is highlighted
  and active
* move the default module render call to renderModule method

Change-Id: I5dca8586dddf1065b4e85642a40c3558f0b6586b
2012-09-07 17:25:02 +05:30
Santhosh Thottingal
5b3f7cc269 Whitespace cleanup, remove deprecated methods
* Fixed many white space issues- mainly whitespace missing before
  function start paranthesis eg: function()
* Removed the deprecated live methods and replaced with on
* Added file documentation for ext.uls.geoclient

Change-Id: Ib2c8cfed1a6ff3859495e707680d5c19882a33e8
2012-09-07 16:47:03 +05:30
Santhosh Thottingal
5ce0dac72d JsHint fixes - Move the invocation into the parens that contain the function.
Change-Id: I83d4808a9daeb6e0d52f77c718f9e384454d8ecc
2012-09-07 13:46:12 +05:30
Santhosh Thottingal
d070071274 Make the close button of language settings work
* Actually it should go to previous context. but that is a FIXME
* Jslint fixes

Change-Id: I2e0685adc42331fd86716dfa73be3630208aa893
2012-08-21 15:16:48 +05:30
Santhosh Thottingal
0d281887d3 ULS - Language settings navigation fix
Hide the popup when navigating to other window.

Change-Id: I7f1f6eef08249d6e40225d5ad7036b39e7c26b0e
2012-08-20 10:54:54 +05:30
Santhosh Thottingal
d67771fa01 Display Settings - ULS - Display settings navigation
Change-Id: I9d16cbac8f0f897378f769b0b98e48441503fe1a
2012-08-19 19:49:11 +03:00
Santhosh Thottingal
1bc80d58ba ULS persistent preference system.
Change-Id: Ieb22e09f226e770c9935b875f4226a75ffd8c46d
2012-08-16 17:20:21 +03:00
Santhosh Thottingal
398f9ef949 Position the language settings
* Expose two options: left and top
* Make the init script pass that.
* Introduce position method in jquery.uls

Change-Id: I21f4d956f1ed2c56528731ab09ecc6a89834f796
2012-08-15 21:25:16 +03:00
Santhosh Thottingal
a17598ad04 More UI code
Not all functionalities are added.

Change-Id: I37007a8dedce6bcb055a9d6d79376f40868fd6dd
2012-08-15 18:25:09 +03:00
Santhosh Thottingal
e62b50c9d8 WebFonts integration with ULS display settings.
This does not add much functionality. That will come in
future commits.

This commit has many cleanup, refactoring on the display settings,
language settings code.

Change-Id: I7fbc3ebb9b67c1afd80f159c2d82cd2a1c6bea74
2012-08-14 18:01:25 +03:00
Amir E. Aharoni
a3ab65906a Add Language settings dialog
Change-Id: Ie3455f32ac6ceff3c52d79643a6f7f82106ab7f1
2012-08-14 10:42:13 +05:30