Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IP-690] Add markdown as custom value field #560

Open
wants to merge 26 commits into
base: v1.6.0
from

Conversation

@MDXDave
Copy link
Contributor

commented Nov 4, 2017

Implements markdown as custom field type.
needs to be parsed in template.

KLelong and others added some commits Oct 24, 2017

Add files via upload
Log logins.
To be able to block brute-force attacks with fail2ban.
@@ -32,6 +32,10 @@
<script src="<?php echo base_url(); ?>assets/core/js/locales/select2/<?php _trans('cldr'); ?>.js"></script>
<?php } ?>


<script src="<?php echo base_url(); ?>assets/core/js/bootstrap-markdown.js"></script>

This comment has been minimized.

Copy link
@MDXDave

MDXDave Nov 5, 2017

Author Contributor

Using the open source bootstrap-markdown plugin:
https://github.com/toopay/bootstrap-markdown

@@ -44,6 +44,8 @@
<?php echo $this->layout->load_view('layout/includes/fullpage-loader'); ?>

<script defer src="<?php echo base_url(); ?>assets/core/js/scripts.min.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/markdown.js/0.5.0/markdown.min.js"></script>

This comment has been minimized.

Copy link
@MDXDave

MDXDave Nov 5, 2017

Author Contributor

... and popular markdown parser for javascript markdown.js:
https://github.com/evilstreak/markdown-js

@@ -32,6 +32,10 @@
<script src="<?php echo base_url(); ?>assets/core/js/locales/select2/<?php _trans('cldr'); ?>.js"></script>
<?php } ?>


<script src="<?php echo base_url(); ?>assets/core/js/bootstrap-markdown.js"></script>
<link href="<?php echo base_url(); ?>assets/core/css/bootstrap-markdown.min.css" rel="stylesheet">

This comment has been minimized.

Copy link
@MDXDave

MDXDave Nov 5, 2017

Author Contributor

@Kovah maybe this should be included in core css file?

case "MARKDOWN":
?>
<textarea class="form-control"
data-provide="markdown"

This comment has been minimized.

Copy link
@MDXDave

MDXDave Nov 5, 2017

Author Contributor

trigger for bootstrap-markdown plugin

@MDXDave

This comment has been minimized.

Copy link
Contributor Author

commented Nov 5, 2017

@Kovah maybe it is useful to ship a php markdown library for parsing in templates?

@Kovah

This comment has been minimized.

Copy link
Contributor

commented Nov 5, 2017

Hi,
thank you for the efforts to implement this feature. Unfortunately it would have saved some time if you would have asked for some details about this in your dev chat. The current implementation can't be used in any PDF files because they do not support Javascript.
JS needs to be replaced with a PHP Markdown library.

MDXDave added some commits Nov 6, 2017

@MDXDave

This comment has been minimized.

Copy link
Contributor Author

commented Nov 6, 2017

@Kovah the markdown js library is only for the preview function of the editor. I've added parsedown for parse markdown within templates, just use _markdown($output)

@MDXDave

This comment has been minimized.

Copy link
Contributor Author

commented Nov 13, 2017

@Kovah do you have any thoughts?

Add another quote state "invoiced"
The quote state indicates, that for an accepted quote
an invoice was written.
When an invoiced is created from a quote the
state of the quote gets changed automatically.

Closes IP-636

@Kovah Kovah added Needs review and removed Change requested labels Apr 8, 2018

@Kovah Kovah changed the base branch from v1.5.6 to v1.6.0 Apr 8, 2018

@Kovah

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2018

Moved this to 1.6.0 as a possible new feature

@Kovah Kovah changed the title Add markdown as custom value field [IP-690] Add markdown as custom value field Apr 9, 2018

Kovah added some commits Apr 9, 2018

@Kovah Kovah added this to the 1.6.0 milestone Apr 9, 2018

Kovah added some commits Apr 9, 2018

@Kovah

This comment has been minimized.

Copy link
Contributor

commented Jul 13, 2018

@MDXDave Could you enable "Allow edits from maintainers." in the right sidebar so I can directly edit the pull request?

@MDXDave

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2018

It's already enabled

Kovah added some commits Jul 13, 2018

Merge branch 'markdown-cf' of https://github.com/MDXDave/InvoicePlane
…into MDXDave-markdown-cf

# Conflicts:
#	application/modules/invoices/views/view.php
#	application/modules/quotes/views/view.php
[IP-690] Optimize the Markdown custom field implementation
Now using NPM for all Markdown assets, includes theme files and Grund copies the locale files.
Also loads the Parsedown library via Composer to be available for PDF templates.

@Kovah Kovah removed the Work in Progress label Jul 13, 2018

@Kovah

Kovah approved these changes Jul 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.