cwrc / DEPRECATED-CWRC-Writer

The Canadian Writing Research Collaboratory (CWRC) is developing an in-browser text markup editor (CWRCWriter) for use by collaborative scholarly editing projects.
http://www.cwrc.ca/projects/infrastructure-projects/technical-projects/cwrc-writer/
GNU General Public License v2.0
24 stars 17 forks source link

Make removing or hiding the "Open Document" button on the CWRC-Writer configurable #349

Closed SusanBrown closed 7 years ago

SusanBrown commented 9 years ago

From dgi:

We also have another request for Open Sky if possible for integrating the template work. Could that add a configuration option that would Remove or Hide the Open Document button in the CWRC-Writer?

ajmacdonald commented 9 years ago

See https://github.com/cwrc/CWRC-Writer/blob/development/src/reader.htm#L57 for an example of how to configure the buttons that are available.

ilovan commented 9 years ago

Latest feedback from dgi: Still needed: Addition of the capability to toggle the Open Document button of the CWRC-Writer on/off at runtime.

@ajmacdonald , could you please give this issue the highest priority and/or pinpoint them to any existing code they might have missed?

ajmacdonald commented 9 years ago

Use the function I added in referenced commit https://github.com/cwrc/CWRC-Writer/commit/77c1e6946781b6c71fc1e75196bfcbdaca5a7aea to get a button by name. Then use hide or show.

For example:

writer.getButtonByName('loadbutton').hide()
jchartrand commented 9 years ago

Andrew added this last week. He correctly referenced the commit in the GitHub issue, but I should have also emailed you about it too. My fault.

Anyhow, Andrew has added:

writer.getButtonByName(buttonName)

So, DGI can now call:

writer.getButtonByName('loadbutton').hide()

james

On Sep 24, 2015, at 2:00 AM, Mihaela Ilovan notifications@github.com wrote:

Latest feedback from dgi: Still needed: Addition of the capability to toggle the Open Document button of the CWRC-Writer on/off at runtime.

@ajmacdonald https://github.com/ajmacdonald , could you please give this issue the highest priority and/or pinpoint them to any existing code they might have missed?

— Reply to this email directly or view it on GitHub https://github.com/cwrc/CWRC-Writer/issues/349#issuecomment-142819317.