Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Dialogs overhaul #639

Merged
merged 92 commits into from
Jan 22, 2015
Merged
Show file tree
Hide file tree
Changes from 86 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
2717957
editor.dialog returns the dialog window
mightyiam Dec 13, 2014
d0d6ef0
New tests for dialog opening or not
mightyiam Dec 14, 2014
5ad672a
_shouldDialogOpen
mightyiam Dec 14, 2014
a54f008
Fix dialog opening test for IE
mightyiam Dec 14, 2014
a2ebc34
Add code comment in dialogs tests file
mightyiam Dec 16, 2014
25a3fa9
Dialogs tests: check titles
mightyiam Dec 16, 2014
e11f8ee
typo.
mightyiam Dec 16, 2014
b9c5480
Add missing documentation in dialogs tests.
mightyiam Dec 16, 2014
2d714ff
Some better code comment in dialogs tests.
mightyiam Dec 16, 2014
c9db264
dialogTestHelper broken down into more function
mightyiam Dec 16, 2014
8d52605
Merge branch 'selectImagesWithRangy' into dialogWindowTests
mightyiam Dec 18, 2014
21b365e
Merge branch 'selectImagesWithRangy' into dialogWindowTests
mightyiam Dec 20, 2014
cbdeed2
Fix extra space in function
mightyiam Dec 20, 2014
b6a0568
Dialog tests: use new manipulationTestHelper's option
mightyiam Dec 20, 2014
844c379
Remove extra dialog test
mightyiam Dec 20, 2014
b502efd
dialogTestHelper: use constants somewhere in that
mightyiam Dec 20, 2014
dc0ee48
Merge branch 'selectImagesWithRangy' into dialogWindowTests
mightyiam Dec 22, 2014
b14ca92
Merge branch 'selectImagesWithRangy' into dialogWindowTests
mightyiam Dec 23, 2014
96072e5
Make JSHint happy
mightyiam Dec 23, 2014
2787d56
Allow infinite dialog windows concurrently.
mightyiam Dec 23, 2014
78df53b
dialogTestHelper: semantic change
mightyiam Dec 23, 2014
8ad25c0
Some comments for dialog tests helpers.
mightyiam Dec 23, 2014
0bb0f3a
Merge branch 'selectImagesWithRangy' into dialogWindowTests
mightyiam Dec 24, 2014
a8045c7
Dialogs tests: use sinon-qunit for spies auto unwrapping
mightyiam Dec 24, 2014
6a28b97
`uniqueStamp`: remove the hyphen.
mightyiam Dec 24, 2014
05e5e90
Make JSHint happy
mightyiam Dec 24, 2014
4e31cd3
Move dialog and _shouldDialogOpen to their own dialogs.js file
mightyiam Dec 24, 2014
feff1ae
WYMeditor.DIALOGS object replaces _shouldDialogOpen
mightyiam Dec 24, 2014
eb4ad56
Some dialogs module improvements
mightyiam Dec 29, 2014
da70824
`dialog`: Use bodyHtml if provided.
mightyiam Dec 29, 2014
3b66e16
`.dialog`: some code comment
mightyiam Dec 29, 2014
f1b39f0
`dialog`: don't get passed features. Use from dialog object.
mightyiam Dec 29, 2014
da5f97c
Don't get passed `bodyHtml`. Use from dialog object.
mightyiam Dec 29, 2014
a0e6522
`dialog`: comment on use of `shouldOpen`.
mightyiam Dec 29, 2014
285b889
`dialog`: use `.call` on `shouldOpen`.
mightyiam Dec 29, 2014
bfc7c4b
`dialog`: fix "no such dialog" error.
mightyiam Dec 29, 2014
413028f
`dialog` semantic optimization
mightyiam Dec 29, 2014
c08d019
`dialog`: Fix string translation
mightyiam Dec 29, 2014
79fb2db
`dialog`: some comments
mightyiam Dec 29, 2014
015eb30
WYMeditor.DIALOGS: comment
mightyiam Dec 29, 2014
f05aee7
Migrate dialog body HTML strings to the dialogs module file.
mightyiam Dec 29, 2014
afd2967
Migrate dialog button selector to `dialogs.js`
mightyiam Dec 29, 2014
3745d40
Migrate initDialog from core.js to dialogs.js.
mightyiam Dec 30, 2014
864a691
dialog: workaround jQuery.fn.bind bug by not using jQuery
mightyiam Dec 30, 2014
9f9b73b
Migrated some dialog options from core.js to dialogs.js
mightyiam Dec 30, 2014
35ffff7
`dialog`: remove disfunctional attribute prepopulation
mightyiam Dec 30, 2014
0d4e747
Lots of dialog windows code improvements
mightyiam Dec 30, 2014
43ade54
Update documentation on removal of some dialog options.
mightyiam Dec 30, 2014
8a98089
Merge branch 'master' into dialogWindowTests
mightyiam Dec 30, 2014
fe5e0f3
Better changelog entry for #639
mightyiam Dec 30, 2014
751ec4c
Remove nonexistent option from docs.
mightyiam Dec 30, 2014
b9b8518
Remove wym._options.dialogButtonSelector
mightyiam Dec 30, 2014
d5d16b4
Fix changing existing link attributes via link dialog.
mightyiam Dec 30, 2014
c6e21a6
Rollback to current dialog names
mightyiam Dec 30, 2014
e3cd60f
Merge branch 'master' into dialogWindowTests
mightyiam Dec 30, 2014
60d14ac
Fix a dialog test for IE7
mightyiam Dec 30, 2014
e622cd8
Revert to single-dialog-window mode
mightyiam Dec 30, 2014
afcefef
Reused dialog windows pop to foreground.
mightyiam Dec 30, 2014
b952645
dialog: slightly better wording on `window.focus` comment
mightyiam Dec 31, 2014
0587d5d
DIALOGS object: some better docstring
mightyiam Dec 31, 2014
511781d
Remove WYMeditor.BASE_PATH and .INDEX
mightyiam Dec 31, 2014
3ff0aed
_init: fix ifameHtml value
mightyiam Jan 12, 2015
cc3ac51
More inline elements dialog example: fix for new dialog API
mightyiam Jan 12, 2015
96cc138
Bring back options.dialog*Html
mightyiam Jan 14, 2015
97be71f
Bring back some dialog related selector options
mightyiam Jan 14, 2015
6486b10
Fix capitalization typo in docs
mightyiam Jan 14, 2015
490541c
Some quick and incomplete fixes in wrap/unwrap
mightyiam Jan 14, 2015
1526dd8
DIALOGS object: `getBodyClass` is now function
mightyiam Jan 14, 2015
d131329
Remove options.dialogTypeSelector again
mightyiam Jan 14, 2015
41022ac
Revert "More inline elements dialog example: fix for new dialog API"
mightyiam Jan 14, 2015
c6fce21
dialog method should now be backwards compatible again
mightyiam Jan 14, 2015
eafba3a
changed #639 changelog entry to a placeholder
mightyiam Jan 14, 2015
4e0cc9b
dialog(): fixed typo in windowFeatures code
mightyiam Jan 15, 2015
aa5ce5a
dialog tests: fixed indentation
mightyiam Jan 15, 2015
e2255e0
dialog tests: a better test description.
mightyiam Jan 15, 2015
fb269e3
added another link dialog opening test
mightyiam Jan 15, 2015
8bb2025
Remove the `jQueryPath` option and `._computeJqueryPath`
mightyiam Jan 15, 2015
ed9be39
Changelog entry for removal of `wym._index`
mightyiam Jan 15, 2015
8439e03
Removed editor.wrap and broken more-inline-elements example that used it
mightyiam Jan 15, 2015
869618d
Removed `wym.unwrap` and the acronym-dialog test
mightyiam Jan 15, 2015
a22e894
Added unwrap removal changelog entry
mightyiam Jan 15, 2015
04b9680
Removed unwrap documentation
mightyiam Jan 15, 2015
56438fe
DIALOGS: added initialize function
mightyiam Jan 15, 2015
05f79e2
dialog method: fix some comment typos
mightyiam Jan 15, 2015
df83da7
dialog method: fix comment typo
mightyiam Jan 15, 2015
eedffc0
`exec` method api doc fix: remove dialog opening commands. Changelog.
mightyiam Jan 15, 2015
09d08f0
Document changes in `dialog` method and `DIALOGS` object.
mightyiam Jan 17, 2015
72d79fa
Add more changelog for #639
mightyiam Jan 20, 2015
3323981
dialogTestHelper: slight optimization
mightyiam Jan 20, 2015
cc146ae
`dialog` method accepts dialog object. Fix docs as well.
mightyiam Jan 20, 2015
148520c
Exmples index: remove link to more inline elements example
mightyiam Jan 22, 2015
f0bbbf6
Examples: remove custom dialog example
mightyiam Jan 22, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ WYMeditor.
* [#648](https://github.com/wymeditor/wymeditor/pull/647),
[#641](https://github.com/wymeditor/wymeditor/pull/641)
Object resizing (images, primarily) in Firefox and IE has been disabled.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#641.

* [#639](https://github.com/wymeditor/wymeditor/pull/639)
* The `jQueryPath` option was removed.
* The `wym._index` editor instance property is removed.
* Removed `wym.wrap` and `wym.unwrap` editor methods.
* Dialogs cannot be opened using the `exec` method. Use the `dialog` method,
instead.

### Enhancements

Expand Down
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ module.exports = function (grunt) {
src: [
"<%= yeoman.app %>/lib/jquery.browser.js",
"<%= yeoman.app %>/wymeditor/core.js",
"<%= yeoman.app %>/wymeditor/editor/dialogs.js",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concatenate the new module.

"<%= yeoman.app %>/wymeditor/editor/base.js",
"<%= yeoman.app %>/wymeditor/editor/" +
"document-structure-manager.js",
Expand Down
25 changes: 1 addition & 24 deletions docs/customizing_wymeditor/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,6 @@ or useful for deep customization.

WYMeditor's relative/absolute base path
(including the trailing slash).
Until we remove our pop-up window dialogs,
this is used to load necessary javascript
in those dialog windows.

This value is automatically guessed by ``computeWymPath``,
which looks for the ``script`` element
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dialog windows don't load their own scripts, anymore.

This makes it far easier to understand the code.

And makes it way more possible to debug.

Expand Down Expand Up @@ -426,26 +423,6 @@ that will be initialized inside the editor body itself.
This value is automatically guessed,
based on the ``basePath`` value.

``jQueryPath``
--------------

This contains the full path or URL
to a copy of the jQuery library.
Like :ref:`options-basePath`,
we only need to know this path
in order to load it inside pop-up dialogs.

Also like :ref:`option-basePath`,
this value is automatically guessed,
but in this case by ``computeJqueryPath()``.

Example
~~~~~~~

.. code-block:: javascript

jQueryPath: "/js/jquery.js"

``updateSelector`` and ``updateEvent``
--------------------------------------

Expand Down Expand Up @@ -516,7 +493,7 @@ List of HTML Template Options
* dialogHtml
* dialogLinkHtml
* dialogFeatures
The dialogs' features. e.g.
The dialogs' default features. e.g.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because now each dialog can have its own features, specified in its object.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a doc fix.


.. code-block:: javascript

Expand Down
35 changes: 0 additions & 35 deletions docs/writing_plugins/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -364,21 +364,10 @@ Undo
undo an action.
Redo
redo an action.
CreateLink
open the link dialog and create/update a link on the selection.
Unlink
remove a link, based on the selection.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exec command can no longer be used to open dialogs. Changelog entry added.

InsertImage
open the image dialog and insert/update an image.
InsertTable
open the table dialog and insert a table.
Paste
opens the paste dialog and paste raw paragraphs from an external
application, e.g. Word.
ToggleHtml
show/hide the HTML value.
Preview
open the preview dialog.

``link(attrs)``
===============
Expand Down Expand Up @@ -460,30 +449,6 @@ Example: switch the root container to Heading 1.

wym.mainContainer('H1');

``wrap(left, right)``
=====================

*Parameters*

* left: XHTML string
* right: XHTML string

*Description*

Wrap the inline selection with XHTML.

Example:

.. code-block:: javascript

wym.wrap('<span class="city">', '</span>');

``unwrap()``
============

Unwrap the selection, by removing inline elements but keeping the selected
text.

``registerModification()``
====================

Expand Down
160 changes: 0 additions & 160 deletions src/examples/14-more-inline-elements.html

This file was deleted.

Loading