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

update v14 fix #4

Closed
wants to merge 8 commits into from
Closed

update v14 fix #4

wants to merge 8 commits into from

Conversation

Nrtyck
Copy link

@Nrtyck Nrtyck commented Dec 25, 2022

No description provided.

    2:this object must closure in edge browser
    3:fix on_upload_complete save fail
    4:fix _setup_dialog bug in edge
    5:fix _reset_value must remove dialog image row
    6:fix _set_value return value be array string
    7.add .gitigoner
	modified:   frappe_better_attach_control/api/file_manager.py
	modified:   frappe_better_attach_control/hooks.py
	modified:   frappe_better_attach_control/public/build.json
	new file:   frappe_better_attach_control/public/js/better_attach_v14.bundle.js
	modified:   frappe_better_attach_control/public/js/controls/attach.js
	modified:   frappe_better_attach_control/public/js/controls/v13/attach.js
	new file:   frappe_better_attach_control/public/js/controls/v14/attach_image.js
	new file:   frappe_better_attach_control/public/js/uploader/v14/index.js
	modified:   frappe_better_attach_control/public/js/utils/index.js
    update v14
@kid1194
Copy link
Owner

kid1194 commented Dec 25, 2022

@Nrtyck Thanks a lot for your contribution..

Please check my comments on the changes you made..
And also please explain why you added the v14 files..

@Nrtyck
Copy link
Author

Nrtyck commented Dec 26, 2022

@kid1194 Frappe v14 install the app, It don't work in edge browser. The contribution fix and test it.

@kid1194
Copy link
Owner

kid1194 commented Dec 26, 2022

@Nrtyck Thank you bro..
Have you test the plugin in other browsers, using your fix?

@kid1194 kid1194 self-assigned this Dec 26, 2022
@kid1194 kid1194 added bug Something isn't working enhancement New feature or request labels Dec 26, 2022
Adding the flt method to the frappe.utils imports instead of using method namespace..
Removing the v14 file since the base file "better_attach.bundle.js" is meant for v14..
Removing v14 from build since the base file "better_attach.bundle.js" is meant for v14 and as of v14 the js file doesn't require to be built as long as it has ".bundle" in its name..
Copy link
Owner

@kid1194 kid1194 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made some changes to your repo, if my changes work on edge and other browsers please let me know so I remove the v14 js files you created and merge this pull..

@Nrtyck
Copy link
Author

Nrtyck commented Dec 26, 2022

It is nice, I am not sure about the frappe v13 Attach Image control code and fileupdata code. So I'll keep the V13 original code

@Nrtyck
Copy link
Author

Nrtyck commented Dec 26, 2022

I found that the control code does not work properly in webfrom,I'm trying to fix it, but there are still some problems

@kid1194
Copy link
Owner

kid1194 commented Dec 27, 2022

@Nrtyck Can you please explain the problem with webform? Maybe I will be able to fix it..

@Nrtyck
Copy link
Author

Nrtyck commented Dec 28, 2022

at apps/frappe/frappe/public/js/frappe/web_form/webform_script.js
function setup_fields(web_form_doc, doc_data)

here:
if (["Attach", "Attach Image"].includes(df.fieldtype)) {
if (typeof df.options !== "object") {
df.options = {}; // here options to empty
}
df.options.disable_file_browser = true;
}

@kid1194
Copy link
Owner

kid1194 commented Dec 28, 2022

@Nrtyck For the web form, I think that is not possible to solve the problem..

@kid1194
Copy link
Owner

kid1194 commented Dec 28, 2022

@Nrtyck I have updated the plugin. I have made a lot of changes in terms of the code..
I hope that it works without any problem..

Regarding the web form, I couldn't find a solution..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants