Last modified: 2014-08-07 12:14:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11424, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9424 - [CharInsert] Use event binding from a module instead of inline javascript
[CharInsert] Use event binding from a module instead of inline javascript
Status: PATCH_TO_REVIEW
Product: MediaWiki extensions
Classification: Unclassified
CharInsert (Other open bugs)
unspecified
All All
: Low enhancement with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy, javascript
Depends on:
Blocks: javascript edit-toolbar
  Show dependency treegraph
 
Reported: 2007-03-27 13:13 UTC by jisok2
Modified: 2014-08-07 12:14 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description jisok2 2007-03-27 13:13:01 UTC
Editing in non-javascript environment, I copy&paste characters in
[[MediaWiki:Edittools]]. But because of the mouse links, it's somewhat tricky to
drag the wanted character. I want the links activated only when javascript is
enabled.
Comment 1 Danny B. 2007-07-18 12:29:22 UTC
Any stuff requiring JavaScript should not be in Edittools. Only JS independent texts and placeholders which are to be filled/manipulated by scripts in Common.js or other linked js pages.
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-07-18 20:25:40 UTC
Yes, the Charinsert extension should just output a plain character wrapped in a span with class="mw-charinsert" that the JavaScript can add a link to if enabled.
Comment 3 Tisza Gergő 2009-02-27 11:44:23 UTC
The script should be able to differentiate between <charinsert>A+B</charinsert> (inserts "A" to the beginning and "B" to the end of the selection) and <charinsert>A<nowiki>+</nowiki>B</charinsert> (inserts "A+B").
Comment 4 Helder 2011-08-12 14:28:58 UTC
Per comment #2, it seems adequated to tag this as "easy".
Comment 5 Krinkle 2011-08-12 14:30:30 UTC
If any scripts or styles remain, port to ResourceLoader as well.
Comment 6 Krinkle 2012-02-29 02:24:32 UTC
Actually the links by core EditTools do use JavaScript and it looks genuine too.

In the current state (SVN HEAD:112664)  extensions/CharInsert/CharInsert.php outputs:
 <a onclick="insertTags( .. );"> .. </a>

Which calls the core mw.toolbar.insertTags function. So it does work by default (insertion in toolbar). And that pretty much justifies the use of links, right ?

Granted it could be nicer and prettier but the assumption made here that it requires site-specific javascript code to work is not true. Marking WONTFIX as such.
Comment 7 Danny B. 2012-03-09 12:19:20 UTC
Well, the deal was to remove onclick=... stuff in favour of jQuery general global handling.

Thus reopening.
Comment 8 Krinkle 2012-03-09 12:24:25 UTC
OK, maybe that should be a separate request then. Re-summarizing for now (removing javascript on itself   makes no sense as a goal unless it's redundant or broken).
Comment 9 Helder 2014-08-06 16:37:59 UTC
Change 152076 had a related patch set uploaded by Helder:
Use event binding from a module instead of inline javascript

https://gerrit.wikimedia.org/r/152076
Comment 10 Gerrit Notification Bot 2014-08-07 12:14:33 UTC
Change 152076 had a related patch set uploaded by TheDJ:
Use event binding from a module instead of inline javascript

https://gerrit.wikimedia.org/r/152076

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links