Commit graph

46 commits

Author SHA1 Message Date
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Suraj Shetty
6960a19208 fix: RTL for print views 2021-06-28 12:03:31 +05:30
Suraj Shetty
2d8c6c1710 Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website 2021-06-03 11:43:28 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Suraj Shetty
68e2dfa499 Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website 2021-05-20 12:57:23 +05:30
Gavin D'souza
fc86458d3e fix: Increase timeout for window close
On mobile view, window.close would block rendering the print view.
Increasing the timeout to 10s from 1s helps

(cherry picked from commit b341167ffc37b1b93bdf1d712406c1d730746fd6)
2021-05-20 04:16:21 +00:00
Suraj Shetty
51a072bbf8 Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website 2021-05-18 17:02:44 +05:30
Joseph Marie Alba
a13d208a28
fix: DeprecationWarning: invalid escape sequence \(
Python 3 interprets string literals as Unicode strings, and therefore \( is treated as an escaped Unicode character.

Declare RegEx pattern as a raw string instead by prepending r
2021-05-16 06:20:44 +08:00
Suraj Shetty
d961bda492 fix: Base template path 2021-04-29 12:43:58 +05:30
Shakirullah Waseeb
9bb0c85d3f
fix: added 'ps' to the right-to-left languages list (#12812)
* Added Pashto language to the rtl list.

Pashto (ps) writing is based on Arabic script, so it is a right to left language.  Therefore, added the "ps" to the rtl languages list in the following line of code.
is_rtl(lang=null) {
		return ["ar", "he", "fa", "ps"].includes(lang || frappe.boot.lang);
}

* fix: ps to rtl languages list in printview.py
2021-04-12 06:40:01 +00:00
prssanna
5bbc330c45 fix: printview context 2020-12-18 14:26:04 +05:30
Suraj Shetty
25dc9ee222 Merge branch 'develop' of https://github.com/frappe/frappe into rebrand-ui 2020-12-11 13:02:36 +05:30
Saqib Ansari
3296097df6 feat: show absolute value in print format 2020-11-30 15:46:29 +05:30
prssanna
4719209312 fix: remove unused method 2020-11-05 11:28:05 +05:30
prssanna
7841dd9461 refactor: refactor contextual print setting implementation 2020-10-29 14:19:00 +05:30
Faris Ansari
4abb44857e wip 2020-10-28 13:52:34 +05:30
prssanna
64f72dbff1 fix: update print contextual settings api 2020-10-22 17:18:41 +05:30
prssanna
285a0b5da5 feat: separate route for print view
- use sidebar layout with settings

- hook to fetch contextual print settings

- change default font to Inter
2020-10-22 15:29:37 +05:30
Chinmay D. Pai
e952a3f72b
fix: escape unwanted tags before displaying printview
prevents xss on the printview page

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-07-03 10:52:10 +05:30
Saif Ur Rehman
11a2a2a3c1 fix(printview): Make before_print hookable 2019-10-26 18:56:49 +05:30
Suraj Shetty
33a99f2392 feat: Show signature placeholder in print view (#8354) 2019-09-07 21:18:15 +05:30
Marica
d33d2ee60e fix(minor): Changed error message display in printview (#8200)
* fix(minor): Changed error message display in printview

* fix: Check for HTML on creation of Print Format

The printview will remain as it is.
Validation of HTML while Custom Format is checked and Raw Printing isn't checked in Print Format.

* fix: Improved handling of no template found in Printview

User will see 'No preview found' instead of error prompt with path in it
Validation on Print Format refactored slightly.

* Codacy fixes
2019-09-05 15:02:15 +05:30
deepeshgarg007
037f231d3c fix: Add prefix print in attribute names 2019-08-07 18:10:58 +05:30
deepeshgarg007
9e278c83c6 fix: Headings and line breaks not seen in print formats 2019-08-07 15:08:40 +05:30
gavin
b5ab59ad6e feat: Access log (#8014)
* feat: Access log doctype for logging information about private file
downloads, backups downloads, printing and exporting data

* updated: access log

* updated: formattted access_log.js

* access logging: print/pdf/pvt files/export/backup

client side implementation: treeview, query_report
server side implementation on the rest

* fixes: codacy errors

* Update response.py

* Update response.py

* Update response.py

* codacy: please

* travis fixes

* changes:filters=>_filters(lol this works @ times?)

added: tests for access_log, make_access_log formatting, form ui added
buttons

* this hopefully fixes em tests

* changes: fixed indents, session.user, formatting

* fixes: tests, refactor, permissions

emerging from exporter.py => reference doctype in export_data (check
format!)

* fixes: convert dict to json

* changes: added more tests, wrote lesser code?

switched js to display depends on

* fixes: codacy and hopefully travis

* fix: tests? and polishing up

* added column field, removed tracked views

changed access log in exporter.py > export_data
added access log in reportview.py > export_query

* style: Fix indentation

* style: Fix indentation

* fix: Remove problematic string replace

It may replace quotes in the actual filter values which can result in invalid JSON

* fix: Remove filter string conversion

* fix: Error due to quote escapes

TODO: Check for a better way
2019-08-06 10:24:55 +05:30
Himanshu
9067f7adec fix(Print): Set Document Language (#7746) 2019-06-28 14:12:08 +05:30
karthikeyan5
8397383dd6 fix(Raw Printing): fixes as per PR review
> fixing confusing naming in the UI and calling it "Raw Print"
> used import for sha256 library
> changed the Print Preview message for raw print
> same possible codacy fixes
2019-04-16 15:40:56 +05:30
karthikeyan5
92b8d82f94 fix(raw printing): codacy issues 2019-04-16 15:40:56 +05:30
karthikeyan5
043c413571 fix(Raw Printing): fixing code standard 2019-04-16 15:40:56 +05:30
karthikeyan5
70c256f81b feat(Raw Printing): Adding Support for qz-tray 2019-04-16 15:40:56 +05:30
Faris Ansari
467bd8a8ad fix: Remove no_sitemap flag 2019-03-19 20:34:19 +05:30
Faris Ansari
2fd6cd65f5 fix: Permlevel check in Print
Stupid check hides fields with permlevel > 0 no matter who has access
2019-02-15 12:48:33 +05:30
Faris Ansari
60f9e2c973 Add utility frappe.utils.md_to_html
- Replace all occurences of manual imports with this utility
- Also enable extras
  - fenced-code-blocks
  - tables with class 'table table-bordered'
  - header-ids
2018-08-05 18:19:25 +05:30
Nabin Hait
c4c3cd3131 Merge branch 'master' into develop 2018-04-13 14:32:03 +05:30
Rohit Waghchaure
2ccc7593b1 [Fix] Text editor with value image not displaying in the print form 2018-04-09 20:56:45 +05:30
Nabin Hait
3f3d9e52c8 Fixed merge conflict 2018-03-23 15:16:18 +05:30
rohitwaghchaure
13f0f19f75 [Fix] RTL for document print (#5244) 2018-03-22 11:15:01 +05:30
Achilles Rasquinha
f70a1cce39 Fixed printpriview 2018-03-09 14:46:37 +05:30
Faris Ansari
e581be9fa8 Add translation support for DocFields (#5002)
* Initial changes for Translation

* Merged translate app into frappe core

* Minor typo fix

* Fixes while syncing translations

* Set defaults

* Fixes on setup

* Improve Code Quality

* Could Code Quality be Improved?

* Small code tweaks

* Minor typo fix

* Addition of Translatable Property

* Small fixes for Codacy Comments

* Simplify code

* Show translations in grid

* Remove enabled from Language

* Revert render_template logic

* typo

* Cleanup unused methods

* move patch to erpnext

* fix codacy

* Update patches.txt

* Update patches.txt
2018-02-16 15:12:12 +05:30
rohitwaghchaure
5d6fdb8f05 Show zero rate column in the print if print_hide_if_no_value is disabled (#4694) 2017-12-28 13:08:54 +05:30
rohitwaghchaure
cacc206f5a Show zero rate column in the print if print_hide_if_no_value is disabled (#4694) 2017-12-28 12:55:21 +05:30
Faris Ansari
3df0659c87 [Print Format] Align labels to right (#4068) 2017-09-06 12:17:48 +05:30
Rushabh Mehta
19e9834850 [added] print style 2017-08-17 18:34:14 +05:30
Aditya Hase
769338f136 Replaced all instances of basestring with six.string_types 2017-08-11 00:10:11 +05:30
ci2014
f3998a1cca Add jinja support to leader_head.content and letter_head.footer (#3493)
* Add jinja support to leader_head.content and letter_head.footer

Add jinja support to leader_head.content and letter_head.footer

* Fix

convert_markdown(doc, meta) was missing my mistake

* Update printview.py

Considering that letter_head could be empty and cleaner code

* Update printview.py

* Update printview.py

* Update printview.py

* Update printview.py

Remove trailing whitespace
2017-06-19 09:03:41 +05:30
Rushabh Mehta
62f0480117 [rename] frappe.www.print to frappe.www.printview 2017-05-03 15:59:24 +05:30
Renamed from frappe/www/print.py (Browse further)