Commit Graph

604 Commits

Author SHA1 Message Date
Gerrit Uitslag 070ca76e65
close curid span correctly
Seems jQuery fixes this wrap already.

#3003
2023-08-25 15:57:46 +02:00
Andreas Gohr 68253c2bb8 be more defensive when matching for section highlight 2023-06-01 16:53:38 +02:00
Andreas Gohr 2e60baeaa9 Avoid flicker when highlighting a section
Previously, elements were wrapped in a div on hover and unwrapped when
the mouse was moved again. This generally worked okay, but led to
problems where the wrapped section contained elements with their own
rendering context (video, object, iframe, ...). The wrapping caused
rerendering of these elements resulting in flicker and layoutshift:

splitbrain/dokuwiki-plugin-vshare#13
cosmocode/dokuwiki-plugin-diagrams#4

This patch changes the higlighting mechanism to always wrap *all*
sections in a div and only toggle classes on hover. Class names have
been chosen to be backwardscompatible, so this should continue to work
as before in all templates.
2023-04-20 11:51:49 +02:00
Andreas Gohr d0eb8bfe20 simplify media manager panel height
The height of the panel was calculated in JavaScript, trying to use the
remaining space. With larger headers that lead to a relatively small
area. In addition the height calculation behaved weirdly on certain
resolutions (in some templates) resulting in a decreasing height on each
image interaction.

This patch simply sets the panel height 60% of the browser window using
the vh unit (which was not available when the media manager was
written).

To keep backward compatibility and not accidentally break a bunch of
templates, the height is still set from JavaScript but only once instead
of updating it on every resize operation.

A proper refactoring of the whole media manager code is still something
we need to tackle in the future, but this change should make it slightly
better.
2023-03-30 15:44:56 +02:00
Andreas Gohr 4e4e74c5d5 jQuery and jQuery UI updates 2023-03-10 17:47:51 +01:00
Mike Steele 760e8655f8 use POSIX standard 'dot' built-in rather than 'source' 2023-01-25 10:54:32 -08:00
Andreas Gohr 2420159423 fix security problems in draft handling. fixes #3565 2021-12-17 23:22:25 +01:00
Damien Regad c8241b3ba7 Add missing `;` causing syntax error in js.php 2021-03-06 11:08:27 +01:00
Andreas Gohr b68a7721c6 add cache buster on security check request
When doing a normal reload on the admin page to recheck the security,
the browser may not re-request the image again. This adds a timestamp to
the URL to ensure the image is tested again
2021-01-11 17:23:22 +01:00
Andreas Gohr d3f829c2e8 cleaner behaviour for data directory check
Show a properly translated message.
2021-01-11 17:16:30 +01:00
Andreas Gohr 052e1c84e6 do not repeat successful security checks. fixes #3363
This avoids creating lots of 403 errors for properly secured data
directories. Only one successful check per browser session will be
executed.
2021-01-05 11:21:09 +01:00
Andreas Gohr 413313a155 Merge branch 'logging'
* logging:
  added JavaScript based filter mechanism
  added logging configuration
  replaced out calls to dbglog with new Logger calls
  added convenience methods to log to our default facilities
  added logviwer admin plugin
  added log dir to git
  central logging mechanism
2020-12-03 20:01:57 +01:00
Andreas Gohr b09504a9ba SVG based smileys
This patch replaces our old gif based smileys by SVG based ones from the
Twemoji project. This allows for scaling the emojis with the text
they're used in.
2020-11-20 00:46:01 +01:00
Andreas Gohr 0afbc17471
Merge pull request #3198 from ssahara/form
refactor html_* functions into Ui class member using Form\Form class
2020-10-13 13:42:24 +02:00
Satoshi Sahara 057cd77551 more narrow jQuery selector to rev2[] checkbox
This fix enables to use disabled checkbox for non-existing revision page or media file in the HTML form of Ui\Revisions.
2020-08-18 14:57:44 +09:00
Giuseppe Di Terlizzi bcdf03d0e0
Optimized pageRestoreConfirm function 2020-08-17 15:49:50 +02:00
Andreas Gohr 70cc2cbf41 added logviwer admin plugin
This allows for easy viewing of the available logs.

The log format was sligthly adjusted again for easier parsing.
2020-08-13 19:48:45 +02:00
Giuseppe Di Terlizzi a802fe3c55 Added confirmation dialog for page tools Revert action 2020-08-10 23:52:24 +02:00
Andreas Gohr 499d9bcd90 hide extensions only when javascript is available
Progressive enhancement asks for having information available fon nonJS
users and transforming the interface by JS if available
2020-07-23 08:21:55 +02:00
Anna Dabrowska 56fc6b1541 More compact list of allowed file types in media uploader 2020-07-22 13:16:04 +02:00
Anna Dabrowska 0b30f01baa Replace id with class in media uploader 2020-07-22 10:23:15 +02:00
Anna Dabrowska 6ed7a26d79 Display the list of allowed mime types in media uploader 2020-07-21 17:22:25 +02:00
Andreas Gohr 95ca65a41a
Merge pull request #3172 from splitbrain/cli-shebang
Use envvars in shebang of executables
2020-06-30 09:13:12 +02:00
Soarinferret f7fa9aa0bc run update.sh to update jquery files 2020-06-28 20:19:37 -05:00
SoarinFerret 0dcf3900aa
Upgrade jQuery 3.5.0 to jQuery 3.5.1
Fixes jQuery regressions laid out here: https://blog.jquery.com/2020/05/04/jquery-3-5-1-released-fixing-a-regression/
2020-06-28 17:00:41 -05:00
Phy cbfa4829d9
use envvars in shebang 2020-06-13 18:41:58 -04:00
Henry Pan 41f652aca5
Merge pull request #3024 from splitbrain/cookieupdate
Upgrade for jQuery.Cookie to 1.4.1
2020-05-07 00:30:11 -04:00
Andreas Gohr a131d86717
Merge pull request #3066 from splitbrain/jquery-update
jQuery Update and jQuery Migrate removal
2020-05-04 17:59:03 +02:00
Andreas Gohr dce218246b remove jQuery Migrate as outlined in #1546 2020-05-02 11:54:12 +02:00
Andreas Gohr 6086afb7c5 Update jQuery to 3.5.0 and Migrate to 3.2.0 2020-05-01 22:33:30 +02:00
Andreas Gohr 65dd7e55a5 Upgrade for jQuery.Cookie to 1.4.1
This fixes a problem with badly encoded cookies that may have been set
by other software on the same domain. Eg. cookies encoded in latin1
instead of UTF-8.

Note: this library is abandoned and superseeded by js-cookie but an
upgrade to that is not straight forward (and the benefits for us are
unclear)
2020-03-26 10:48:20 +01:00
Phy bbac148918
generate curid class by jQuery
internallink's output <a> tag gets a new attribute, data-wiki-id, so that
jQuery doesn't need to parse the various link format to get the ID.

Any plugin javascript that loads after DokuWiki's script should be able to
discover curid class as usual, as long as they use the default js.php
facility.

fixes #1511, fixes #2968.
2020-03-09 17:02:12 -04:00
Phy 050990ca53
jquery-migrate: replace on()/trigger() shorthand and use prop() for disabled attr
Related to #1546.
2020-02-23 23:22:29 -05:00
leimerp 80a9d31558
allow windows shares for Edge browser 2019-12-30 21:50:40 +01:00
Syntaxseed 13eec6484a Check for null JS object on form field. 2019-10-01 16:28:17 -04:00
Phy fe36a27b51 cookie.js when setValue‘s value parameter is false delete entry 2019-03-13 18:27:33 -04:00
Phy bded2f5042 cookie.js add def parameter to getValue() 2019-03-13 12:51:32 -04:00
Phy 40be5e7a38 cookie.js convert value type to string
This prevents different type returned for DokuCookie.getValue():

DokuCookie.setValue('foo', false);
console.log(DokuCookie.getValue('foo')); // false
location.reload(); // pseudo code
console.log(DokuCookie.getValue('foo')); // 'false'
2019-03-12 07:59:21 -04:00
Phy e7f8ebf332 fix ACL admin footnote JS error, fixes #2540
- ACL's hand-written template doesn't use div.content to wrap the footnote content
- jQuery object existence check should use $obj.length
2019-01-07 22:11:33 -05:00
Andreas Gohr e62a3a2d44 reference existing proper progress gif. fixes #2441 2018-07-20 09:43:14 +02:00
Peter 'Pessoft' Kolínek f8b8d0451b Fix missing ui-bg_glass_95_fef1ec_1x400.png and be/jquery.ui.datepicker.js for jquery 2018-07-03 00:49:24 +02:00
Brend Wanders 018871f404
Change `const` use to `var` for Safari 9 (on iOS)
Safari 9 in iOS does not support the use of `const` in strict mode. Unfortunately, some of us are stuck with Safari 9 due to not being able to upgrade.

I am a big fan of progressive enhancement, but because all javascript code is packed together and sent off to the client, this small incompatibility breaks all javascript for safari 9 browsers. Switching these two keywords makes everything work again.

There are no other uses of `const` in the codebase as far as I can find. This change has little to no impact on anything else, but slighlty extends the range of supported browsers.
2018-06-19 15:15:58 +02:00
Michael Große b16fbc3f1d
🏗 Use json for the response to dw_locktimer 2018-06-08 10:03:55 +02:00
Michael Große f7d14abd12
(dw_locktimer) plugins may reuse to add fields and callbacks
Plugins may want to add further fields to be present when saving drafts.
Plugins may want to execute some js functionality that should be timed to
the saved draft/refreshed lock.

If a plugin does another init() to attach the dw_locktimer to its own editor,
then the default callback would be added a second time, causing unexpected
and undesired behavior.

This includes the changes from the following commits:
6ef45cc1c6
6ca947f3ad
0fff419cc9
87bed8b672
2018-06-08 09:50:46 +02:00
Andreas Gohr 826e222f80 show adavanced tools with JavaScript only 2018-03-28 16:14:18 +02:00
Andreas Gohr 2171f9cb4e added aria attributes 2018-03-28 14:25:44 +02:00
Andreas Gohr 4bdf82b5b9 first go at styling
This removes a lot of reudundant CSS classes in favor of cascading
selectors. Styling isn't done, yet this is just a first step.

Still to do:

* aria labels
* styling the toggle mechanism
* RTL styling
* making sure everything displays correct when no JS is available
* translations may be missing
* refactoring the rest of search.less to make use of LESS features
2018-03-27 17:19:37 +02:00
Michael Große b005809cbc
feat(search): display search tools as lists on click
This functionality is inspired by what other large search engines are
doing.
2018-03-26 18:22:50 +02:00
Michael Große e5bf110d73
feat(search): remember assistance's open/closed state 2018-03-22 17:28:37 +01:00
Michael Große 4d0cb6e1cd
feat(search): show search adjustments as links
This simplifies many aspects. However, it still needs much better
styling.
2018-03-22 17:09:11 +01:00