Normally, documents that are created get a title similar to this: "Sheet
- Mon, July 10, 2023". This commit adds " (copy)" to those documents
when copied.
The last commit added `.ico` versions of the `png` favicons. This commit
adds each favicon statically to each application's `index.html` file.
By statically, I mean it is not inserted through Javascript and instead
is present in the file already.
This fixes favicons not displaying on Firefox.
Normally, copied CryptPad files have a " (copy)" suffixed to them but OnlyOffice doesn't because it has different internal architechture.
Copied OnlyOffice files can be identified by two attributes: a non-empty title and template data.
Since OnlyOffice files cannot be just copy and pasted, I resorted to modifying their metadata through metadataMgr in `./common/onlyoffice/inner.js`
Essentially, this commit check if a file is a copied file. If it is, it updates the title. It doesn't actually copy the file but merely modifies the title after it has been copied.
This commit basically adds " (copy)" to all copies of files.
The "Make a copy" button sends an event to
`./www/common/sframe-common-outer.js` with a ton of variables. Luckily,
the title of the file is available as originalTitle and all I had to do
was simply add `+ " (copy)"` for it to work.
Basically, all this commit does is create and execute a script
(`./customize.dist/favicon/convert.sh`) that uses ImageMagick to convert
various PNGs to ICOs(the format of favicon). It also adds the favicons
to the HTML document through `./www/common/notify.js`.
This commit adds a 'Make A Copy' to all onlyoffice applications
theortically. Though, I only tested sheets since that's all I had in
my toolset.
The toolbar works through adding buttons with 'createButton' in
`./www/common/common-ui-elements.js:569` and there are (thankfully)
premade buttons. That means that buttons like 'Export', 'Make A Copy',
'Import', etc can be created by supplying the type and a boolean
indicating the right side.
But most uses of createButton are through
`./www/common/sframe-common.js:106` which is the same underlying function
of `common-ui-elements.js` but with the first two arguments skipped.
Anyhoo, this was long. Basically, all this commit does is add two lines at
`./www/common/onlyoffice/inner.js:2853`.