Commit graph

82 commits

Author SHA1 Message Date
Richard Hansen
c696732838 ace: Asyncify Ace2Editor.init() 2021-03-01 14:32:33 +00:00
Richard Hansen
159fd5bdeb ace: Simplify passing of editorInfo 2021-03-01 14:32:33 +00:00
Richard Hansen
e57829183d ace: Pass objects to Ace2Inner via function args 2021-03-01 14:32:33 +00:00
Richard Hansen
6fe0154129 ace: Use absolute URLs when building iframes
This isn't strictly necessary right now, but will become
necessary (due to a Safari quirk) when we change to building the
iframes programmatically (vs. the current `document.write()`
approach).
2021-03-01 14:32:33 +00:00
Richard Hansen
9cfc2fb801 ace: Simplify the aceEditorCSS hook map function 2021-03-01 14:32:33 +00:00
Richard Hansen
94c221586c ace: Factor out duplicated $$INCLUDE_CSS code 2021-03-01 14:32:33 +00:00
Richard Hansen
54df7f3728 ace: Delete unused clientVars.disableCustomScriptsAndStyles 2021-03-01 14:32:33 +00:00
Richard Hansen
d84447290e ace: Delete unnecessary IIFE 2021-03-01 14:32:33 +00:00
Richard Hansen
3a311d2182 ace: Lint and simplify script strings 2021-03-01 14:32:33 +00:00
Richard Hansen
c9b1f17f25 ace: Format script strings for readability 2021-03-01 14:32:33 +00:00
Richard Hansen
b3416c4eeb ace: Delete ignored class attribute 2021-03-01 14:32:33 +00:00
Richard Hansen
c9c8b27854 ace: Delete unused Ace2Editor.getFrame() method 2021-03-01 14:32:33 +00:00
webzwo0i
348d08c79e ensure version string is attached for inner frame resources 2021-02-27 16:28:12 +00:00
webzwo0i
01dd9f5440 speed up page load 2021-02-27 16:28:12 +00:00
webzwo0i
fa29858a4e avoid manually including require-kernel in ace.js 2021-02-25 16:59:06 +00:00
Richard Hansen
8ae8710a14 ace: Fix EMBEDDED check 2021-02-12 07:08:51 +00:00
Richard Hansen
1c9afa5168 lint: src/static/js/ace.js 2021-02-07 20:04:07 +00:00
Richard Hansen
8668017c62 ace: Use globalThis instead of non-strict default context
This is necessary before `'use strict';` can be added to the top of
the file.
2021-02-07 20:04:07 +00:00
Richard Hansen
3c2e0f0e16 ace: Simplify Ace2Editor method creation
* Delete the unused `optDoNow` parameter from `pendingInit()`.
  * Move the `setAuthorInfo()` 1st parameter check out of the wrapper
    and in to the `setAuthorInfo()` function itself.
2021-02-07 20:04:07 +00:00
Richard Hansen
f54dcbc766 lint: Re-run eslint --fix 2020-12-16 22:09:48 +00:00
Richard Hansen
8e5fd19db2 lint: Run eslint --fix on src/ 2020-11-24 20:06:12 +00:00
Richard Hansen
7df3ded66f lint: Put opening brace on same line as function
Normally I would let `eslint --fix` do this for me, but there's a bug
that causes:

    const x = function ()
    {
      // ...
    };

to become:

    const x = ()
    => {
      // ...
    };

which ESLint thinks is a syntax error. (It probably is; I don't know
enough about the automatic semicolon insertion rules to be confident.)
2020-11-24 20:06:12 +00:00
Richard Hansen
da459888dc plugins: Move plugin definitions to avoid monkey patching
Also document the plugin data structures.
2020-09-08 00:50:24 +01:00
John McLear
00b6a1d9fe
Remove top console logs to stop hosted iFrames being broken. 2020-05-29 12:56:03 +01:00
muxator
6dd9e9adc8 assets: also use cache busting via query string in files imported from acs.js
Before this change, a client would require two versions of the same assets (with
and without randomVersionString), wasting resources and triggering all sorts of
hard to debug inconsistencies.

This change should have been part of 95fd5ce2a4 and completes it.
2020-05-15 01:29:13 +02:00
Sebastian Castro
709e5d2233 colibris: introduce skin variants, in order to customize the rendering
This provide a nice way to change the colors of main containers from settings file. See comment inside settings for how it works
2020-04-19 03:03:44 +02:00
Sebastian Castro
5fd6aeeea6 css: refactor element positioning
No more javascript to change css properties
Remove a number of useless tables
Try to stop positioning elements with absolute, but use flex-boxes instead

Adds comment to pad template, and move popups and chatbox inside editorcontainerbox (so absolute positioning is straightforward)

Make the design more consistent: always use base color, font-family and font-size. USe relative font size if necessary (.9rem instead of 11px for example)

Remove two columns in the popups, just use one column

Remove css meant to support old browser (like -webkit-box-shadow, -moz-box-shadow). Those css rules are quite common now, and If we want to support very old browser, we should use clean-css or other tools to add them automatically
2020-04-19 03:03:44 +02:00
John McLear
dbab4ad13a dont pass empty author info to edit 2020-04-02 23:29:03 +01:00
Sebastian Castro
4115f792e4 ace.js: prioritize the skin style over the plugin style
Preparatory work for introducing colibris skin
2018-11-08 21:55:34 +01:00
Sebastian Castro
8a6eae26d7 ace.js: also add plugins names to #outerdocbody (refs #3488)
This commit is an integration to aa8204e5dfe4
2018-11-08 21:55:07 +01:00
muxator
36f39a6e13 ace.js: remove template literals to keep IE 11 compatibility
Files in "src/static" are executed on the client: do not break browser
compatibility because of syntactic sugar.

Introduced in 9c990ab08a.
2018-08-27 02:18:34 +02:00
muxator
9c990ab08a skins: finalize support for multiple skins
The old "static/custom" directory is replaced by "static/skins/<skinName>",
where <skinName> is taken from settings.json.
When no value is found, a default of "no-skin" is assumed, so that backward
compatibility is maintained.

The most evident security concerns have been addressed.

Closes #3471.
2018-08-26 21:17:04 +02:00
muxator
6c56e7ca7a ace.js: use URL encoding when building an URL via string concatenation
Not performing encoding/decoding when traversing logical domains is a security
risk.
String concatenation is not great, too, but this change is just focused on
allowing the implementation of skin support.
2018-08-26 02:40:36 +02:00
John McLear
73414df3c7 heh whoops :) 2016-05-20 14:43:01 +01:00
John McLear
a8487dd5dc client Var value for disabling scripts 2016-05-20 14:42:05 +01:00
Mikk Andresen
ad2ea924b5 aceEditorCSS to allow absolute paths to resources to include external CSS 2015-12-01 14:16:44 +02:00
John McLear
82c7ca4ac3 add classes for bootstrap targeting, pew pew 2015-10-22 01:32:02 +01:00
John McLear
7b726cbc02 more working logic and also pretty nice screen reader experience 2015-03-26 13:58:57 +00:00
John McLear
959aa92656 stop listing URL each time focus is placed back on inner iframe 2015-03-26 13:32:45 +00:00
John McLear
1a5ea8707f make the pad contents act like an application and not contents, this can probably be togglable but default state should be editable 2015-03-26 13:16:54 +00:00
webzwo0i
3f31445abf don't call ace_getInInternationalComposition if editor is not fully loaded 2014-01-28 14:07:26 +01:00
webzwo0i
020bd3915c remove empty&unused overlaysdiv 2013-12-08 17:24:12 +01:00
Chia-liang Kao
f31db205da allow cssmanager to manage outer_ace 2013-06-15 01:38:46 +08:00
NAGOYA, Yoshihiko
957a0aa873 fix Pita/etherpad-lite #1032
refact inInternationalComposition
2012-10-12 01:12:15 +09:00
Chad Weider
622819ba93 Make intialization of Ace2Inner analogous to other page controllers. 2012-09-21 22:09:55 -07:00
Chad Weider
9f5946c942 Reformat Ace2Editor frame boot scripts. 2012-09-21 22:09:55 -07:00
Chad Weider
fa65f889ec Consolidate Ace2Editor frame's boot script. 2012-09-21 22:09:55 -07:00
Chad Weider
b691606c4e Replace ParentRequire hack.
Instead of hacking with the internals of require, make client_plugins aware
and capable of sharing behavior.
2012-09-11 21:16:47 -07:00
Chad Weider
1258ed3a0d Split client and server plugin functionality.
There is virtually no shared code for the client, extract it into its own
module and do away with the switches.
2012-09-11 21:16:47 -07:00
Chad Weider
3b5ea88bf5 If the file was not found this should be nothing. 2012-09-09 14:42:32 -07:00