Commit graph

6181 commits

Author SHA1 Message Date
jhall 02ae003f2b [Browser test] Removing hard-coded MEDIAWIKI_USER value
Per this QA mail list discussion:
http://lists.wikimedia.org/pipermail/qa/2013-December/000799.html

Change-Id: Ide3bafe9b69eb5769eb99d0a3989d0e909f512ea
2013-12-05 16:56:29 +00:00
jenkins-bot 11cd6fab6b Merge "Don't strip HTML attributes from inspected links" 2013-12-05 15:28:40 +00:00
Roan Kattouw 0f01f951bb Conditionally register oojs and oojs-ui
Only register them if they aren't already registered, so we're compatible
with versions of MW core with and without oojs.

Change-Id: I5dbb480e8330ceaf0531c194b8ef6cc6c65f537e
2013-12-04 18:28:59 -08:00
jenkins-bot d2c74b18a7 Merge "Revert "Update OOJS UI to v0.1.0-pre (d047752ccc)"" 2013-12-05 02:04:59 +00:00
Catrope 2a4ba14862 Revert "Update OOJS UI to v0.1.0-pre (d047752ccc)"
Still broken, this time because PagedOutlineLayout / BookletLayout
usage wasn't updated.

This reverts commit c6cfe763bb.

Change-Id: If0d37d396ecf3bb09f026d4432c5d7e30f040085
2013-12-05 02:03:00 +00:00
Ed Sanders e01e2e045b Always use #getDocumentNode.
Because if you only sometimes use a getter you're just wasting your time!

Change-Id: Idd38976f77b58e322d527cecca9f9c36e3ad9318
2013-12-04 22:55:26 +00:00
Ed Sanders 6d34e344ee getDataFromDom -> getModelFromDom
Following on from getDomFromModel, this returns a document model
instead of element linear data. The only instance that hasn't been
replaced is in rich paste, where we need to sanitize the converted
data before constructing the document model.

This should be cleaned up in a later commit.

Change-Id: I37a2b641632af2cb515e3409deed5cd1fa358af5
2013-12-04 14:46:34 -08:00
Roan Kattouw c8608fd7bc Remove duplicate method setUpSurface from ViewPageTarget
Was already implemented in the parent class. Moved setPasteRules() so it
would still get run, everything else had already been moved.

Change-Id: I55ef2622c9eacc8b46bd3487919165bccfc347d5
2013-12-04 22:43:47 +00:00
jenkins-bot 4fe0bc5b80 Merge "Change signature of getDomFromData and rename" 2013-12-04 22:03:43 +00:00
Translation updater bot 67a6148892 Localisation updates from https://translatewiki.net.
Change-Id: I6261f0832b5b8938e980c6bcec330364f0fc4135
2013-12-04 20:26:17 +00:00
Timo Tijhof 68cf65844e jscs: "var\t" -> "var "
Only 2 hits.

Change-Id: Ie8c5c39a49f620891bae8582dcc0d2f151e50e21
2013-12-04 21:06:19 +01:00
jenkins-bot aff527a20b Merge "Update OOJS UI to v0.1.0-pre (d047752ccc)" 2013-12-04 19:28:24 +00:00
Roan Kattouw b3eb415e37 Remove ooui-inspector-* messages
Move existing uses over to the already existing visualeditor-inspector-*
messages.

Change-Id: I6da7f3d61256d1c2b4c1f9583da8bc59a2d7473d
2013-12-04 19:04:51 +00:00
Timo Tijhof c6cfe763bb Update OOJS UI to v0.1.0-pre (d047752ccc)
Also, as OOjs UI's StackPanelLayout was renamed to StackLayout, and the
showItem() function to setItem(), fix uses in VisualEditor.

Change-Id: If153e5e7c3a7c60e3d62e20aac8fabd4eaaa73c2
2013-12-04 08:53:53 -08:00
Ed Sanders 86922f8ca8 Change signature of getDomFromData and rename
Currently it takes 4 arguments which are all properties
of the document model, so just pass the model instead and
access the properties later. Rename to getDomFromModel.

Change-Id: I0c378a04dc08b9b90bdc3984f8fa8c4acfe0b667
2013-12-04 16:30:40 +00:00
jenkins-bot f0c1bd28f5 Merge "Revert "Update OOJS UI to v0.1.0-pre (d047752ccc)"" 2013-12-04 16:27:13 +00:00
Jforrester b327268e0d Revert "Update OOJS UI to v0.1.0-pre (d047752ccc)"
This reverts commit 32e0850507.

Change-Id: I429b6e6172cb58ded5cad3cf63e8437a9d26ffd5
2013-12-04 16:20:59 +00:00
jhall 1b847c44dd [Browser test] Restoring a missing page element
Earlier check-in for a VE media interface test
inadvertently re-named a page element that
should not have changed.

Change-Id: Iac1ef365e9cb3912977c8a89f3158ad9d122c93d
2013-12-04 16:03:15 +00:00
jenkins-bot 12d2210cb3 Merge "[Browser tests] Prefer double-quoted strings in Ruby code" 2013-12-04 12:17:01 +00:00
jenkins-bot 0b726589bd Merge "Fix spurious MetaList events" 2013-12-04 11:41:30 +00:00
Timo Tijhof 32e0850507 Update OOJS UI to v0.1.0-pre (d047752ccc)
Change-Id: Ic8e5e8176b35be702ad7a995918fc746f8b1176d
2013-12-04 04:04:13 +01:00
Moriel Schottlender 87fd3b7756 Add direction classes to Toolbar based on context
Add rtl/ltr-related classes to the toolbar based on cursor context, so
certain icons can change based on inline and block directions.

Change-Id: I1b6e450226bf8da820fb622f28c1c3062c534bb0
2013-12-03 15:24:54 -08:00
jhall 73198b52d0 [Browser test] New test for VE media interface
Updated to capture changed iframe positioning of some page controls.

Change-Id: I3864e04935eca1ae7c9d70df42fd34ce58e90d66
2013-12-03 23:12:57 +00:00
Roan Kattouw 39eea83698 Fix spurious MetaList events
Moving items around in the MetaList only works if all deletions are
done before all insertions. This was almost but not completely true:
when moving an existing item we would delete it and immediately re-
insert it, meaning that if there were multiple items being moved
there would be a removal after an insertion.

Instead, let the insertion loop re-insert the moved items while
making sure not to emit insert events for them. This is how I
originally intended the code to be structured, but I thought that
duplicating the insertion would be equivalent to protecting the
emission of the insertion event. Clearly I was wrong.

This fixes weird bugs where categories sometimes appeared twice
in the category dialog depending on where the category was in
the list and what the exact length of the list was (i.e., whether
the binary search in the MetaList found the first or second item
with identical offset and index).

Change-Id: I4cd131052dda396add7a0e2dbe2383bb5c1b5721
2013-12-03 22:48:50 +00:00
James D. Forrester a0065cbe0b Fix naked request for save dialog's summary in save
Sometimes a save is not a save, but a switch to the wikitext editor; in this
case, the save dialog doesn't exist, so don't assume that it does.

Bug: 57947
Change-Id: Ic2df7d2066ba03564ed531e1d31351cd27441abe
2013-12-03 14:35:55 -08:00
Timo Tijhof 31e6950af0 Fix csslint warnings
Also:
* Added modules/syntaxhighlight to csslintignore because
  it is broken right now, so it's hard to fix those warnings
  without being able to verify it.
* Fixed a typo in the grunt-watch config that accessed an
  inexistent property.

Change-Id: Ib81572506786b6a1203c454d1b2b91bb6ae2a3de
2013-12-03 23:09:56 +01:00
jenkins-bot bbba628f3c Merge "Close inspectors when surface is focused but selection doesn't change" 2013-12-03 21:39:23 +00:00
Translation updater bot b0b1513ac1 Localisation updates from https://translatewiki.net.
Change-Id: I7c9f6edab0f559e6c1c14d49ac83922c0f818d20
2013-12-03 20:51:30 +00:00
jenkins-bot 9c3610afb3 Merge "Clear cache key when deactivating target" 2013-12-03 18:24:28 +00:00
jenkins-bot 5cc0706067 Merge "Move activating/deactivating to ViewPageTarget" 2013-12-03 18:21:55 +00:00
James D. Forrester 769f3ef0db Blacklist all versions of IE, as IE11 is now out
… and is completely broken still.

Change-Id: Ib8ddd40892688bd919ccc9d690e7bd3f2de6645e
2013-12-02 19:29:08 -08:00
jenkins-bot b5f04fe9e0 Merge "Use a global resizing flag on the surface to hide phantoms" 2013-12-03 03:22:56 +00:00
jenkins-bot 334bb899be Merge "Pressing enter in a list with no nearby content creates a paragraph" 2013-12-03 03:07:19 +00:00
jenkins-bot 76e3d9ec89 Merge "ve.ce.Surface.handleEnter tests" 2013-12-03 03:03:35 +00:00
jenkins-bot ad2fac3f92 Merge "Genericise runSurfaceHandleDeleteTest to work with other 'handle' methods" 2013-12-03 02:59:09 +00:00
jenkins-bot 7bc8da6fab Merge "csslint: Add .csslintignore file and update gruntfile" 2013-12-03 02:55:30 +00:00
Roan Kattouw 75449ea597 Clear cache key when deactivating target
And other state too, while we're at it.

Bug: 57905
Change-Id: Ifd2744c841f302764cf57c13f4a760cbe80fa2e0
2013-12-02 18:52:47 -08:00
Roan Kattouw 9dc891f4cb Move activating/deactivating to ViewPageTarget
That's where they belong IMO, since ViewPageTarget is the one that
has .activate() and .deactivate(), and mw.Target doesn't retain any
state (apart from some caching things).

Change-Id: Ia6cf5bac9054163d54ab492d691d8ce9d6a3bb90
2013-12-02 18:21:31 -08:00
jenkins-bot 164a262aeb Merge changes I8c8b2d49,If2124c68,I786b63ab
* changes:
  Split apart onSaveError logic for other mw targets
  mw.ViewPageTarget: Remove unused onTokenError handler covered in onSaveError
  Create base MobileView config and target refactor
2013-12-03 02:11:57 +00:00
Rob Moen db970a61fc Split apart onSaveError logic for other mw targets
Change-Id: I8c8b2d4900b511a65cff4c554cf7ef89d6d39ea9
2013-12-02 18:04:29 -08:00
Rob Moen a701e87caa mw.ViewPageTarget: Remove unused onTokenError handler covered in onSaveError
Change-Id: If2124c68aab0d313f4ddd698014d2a4296bbabb8
2013-12-03 02:02:03 +00:00
Rob Moen f1fa56165d Create base MobileView config and target refactor
Changes include:
* Target mobile for ve dependencies
* Create mobile view constructor
** Some tools like dialogs are excluded for now
* Refactor mw.target to permit code reuse
** Split out pageTarget view functionality from core init methods

Change-Id: I786b63ab57518fc6af7761501259ed66592f70e3
2013-12-02 17:59:27 -08:00
Roan Kattouw da4995888b Close inspectors when surface is focused but selection doesn't change
It's possible for the user to put the cursor back from the inspector
in the surface without triggering a selection change, if the selection
was collapsed and they clicked in exactly the right spot.
In practice, this can happen if the link inspector is open in creation
mode and the user clicks to drop the cursor at the same position where
it was when the inspector was opened.

When this happens, the inspector wouldn't close, because it only closed
in response to selection changes. If the user then typed something,
weird things would happen.

To prevent this state (cursor is in surface but inspector is open) from
occurring, close the inspector and hide the context when the document is
focused. This fixes the link inspector creation mode issue, and it also
causes the link inspector to no longer briefly remain visible after the
user has clicked out of it.

Bug: 56976
Change-Id: Ib70fc13031873009a175e4b049a07694a87ce25d
2013-12-02 23:52:54 +00:00
jenkins-bot c06316eb64 Merge "Make veaction=edit work regardless of user preference" 2013-12-02 23:43:52 +00:00
Timo Tijhof a49195ac55 csslint: Add .csslintignore file and update gruntfile
Add .csslintignore file for the csslint run by Jenkins.

Also updating our Gruntfile for local usage to include demos,
which Jenkins is going to include as well (as it uses an ignore
blacklist instead of whitelist).

Change-Id: I9114cfc54e82f090f0fcf62155ef7c1a9261548d
2013-12-03 00:15:50 +01:00
jenkins-bot 4c54865134 Merge "Re-order command registry to match toolbar order" 2013-12-02 22:51:52 +00:00
jenkins-bot 5ca96e805f Merge changes I177877bf,I49a02b5d
* changes:
  Use visibility: hidden; for the ui.Context and its popup
  Followup eb95d7b0b2: don't hide the inspectors WindowSet at all
2013-12-02 21:18:55 +00:00
jenkins-bot e223156d06 Merge "Fix JS errors when inserting references" 2013-12-02 21:15:32 +00:00
Roan Kattouw 1df63b8a63 Use visibility: hidden; for the ui.Context and its popup
They contain iframes and those need to not be display: none;
in order to make Firefox happy.

Bug: 57568
Change-Id: I177877bff3c3b18bfc87ee4e6afa7e60fea26ffc
2013-12-02 13:03:06 -08:00
Translation updater bot 9e233c4a7a Localisation updates from https://translatewiki.net.
Change-Id: I4ef6e82d38f98bb2c6373bea1d9ffec985b5e250
2013-12-02 20:41:40 +00:00