Coder Social home page Coder Social logo

Comments (98)

kid1194 avatar kid1194 commented on May 20, 2024 1

@mohsinalimat I suspect that it is because of the dialog that is supposed to display the file when the filename is clicked..

Is the field type Attach or Attach Image?

Attach Image field doesn't have a dialog so can you please try the child table with Attach Image field..

And can you please try both Attach and Attach Image fields outside child table..

v2 will be dedicated to you bro for your enormous help 😁

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024 1

You mean the edit dialog is still not opening?
Or it is something else?

Yes. Not opening

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024 1

Yes, not opening in form view in child table.

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024 1

Still not opening in form view in child table.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Thanks a lot buddy for reporting this..

I knew that there is an issue with the web form but I didn't find a way to fix it..

Can you please check the console for any error..
And please also check if only the allowed_file_types option is what makes the control stop working or other options cause that too..

I'm very thankful for your help..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

in inspect element html we put accept="image/*" then only images option comes in file browser.

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

If I change below line in core code then after it works in web-form and doctype form.

I also check in version-13 and version-14.

Screenshot 2023-01-31 at 1 33 18 PM

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat That's weird..

Anyway, I have updated the plugin, hopefully it will fix this issue..
Please give it a try and let me know if you find any bug..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Still not working in web-from in version-14.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat I couldn't find a solution for this problem..

I think that the problem isn't from the plugin, but from the web_script.js file..

Check this #4 for more info..

Best regards..

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Hey buddy..

I think that I have found a solution for the web form. Can you please update the plugin, move the config from the Options property to the Better Attach Optiins property and then check if the plugin works properly in desk and in web form..

To show gratitude for your contribution to this plugin, I have added your name in the README file..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Still same error.

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

@mohsinalimat Hey buddy..

I think that I have found a solution for the web form. Can you please update the plugin, move the config from the Options property to the Better Attach Optiins property and then check if the plugin works properly in desk and in web form..

To show gratitude for your contribution to this plugin, I have added your name in the README file..

Best regards..

Please share a demo video for web-form restrictions.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Sorry buddy, I can't test it currently..

The issue was that in web_script.js, the web form fields of type Attach and Attach Image gets their options property set to null if the property value is not an object and since the plugin options is JSON that means it gets removed..

So, I added a custom field to hold the plugin options in order to bypass this action of web_script.js, and the plugin gets the options from the custom field..

Have you tried it after putting the options in the custom field?

If yes and it still doesn't work, please let me know..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

I have child table in web-form. And in child table assign the image property.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

Is there a field property called Better Attach Options?
It should appear under the Options property..

If yes, did you put the plugin options inside it instead of the Options property?

if yes, then did it work for you in web form or not?

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Hey buddy..

I just wanted to remind you about the questions I wrote in the above comment..

I'm still waiting for your reply..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Is there a field property called Better Attach Options? It should appear under the Options property..

If yes, did you put the plugin options inside it instead of the Options property?

if yes, then did it work for you in web form or not?

I can not find any Better Attach Options property.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat There should be a field for the plugin options..

What version you are using?
Are you using the Beta version?

The field exists in the Beta-8 version...

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

What version you are using?

version-14 & version-13

Are you using the Beta version?

Yes, Beta-8

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Web From

Screenshot 2023-02-22 at 11 29 50 AM

Child Doctype

Screenshot 2023-02-22 at 11 44 04 AM

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat I believe that you understood me wrong..

The plugin field will only appear if the field type is Attach or Attach Image...

So, when you edit your attach field you will see it and not when editing the child table...

If you edit your WF Attachment Child and you edit the attach field, you will be able to see the plugin options field below the normal options field..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

I can not find anything related the plugin options.

Screenshot 2023-02-23 at 1 21 42 PM

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat The plugin setup code might not have created the custom field..

Can you please do the following..

  1. Go to Home > Customization > Form Customization > Custom Field
  2. In the list, check if there is a custom field called Better Attach Options
  3. If there is no custom field, then create a new field and set the following data:
    • Document: DocField
    • Label: Better Attach Options
    • Field Type: Small Text
    • Field Name: better_attach_options
    • Depends On: eval:in_list(['Attach', 'Attach Image'], doc.fieldtype)
    • Insert Below: options

After creating the custom field, you will be able to see it when editing an Attach or Attach Image field..

If you can't find the document DocField, please let me know..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

When I add Better Attach Options in Core Doctype of DocField then I will show. Issue is not solved in web form.

Screenshot 2023-02-24 at 10 17 22 AM

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

It should be working..

Anyway, I have made a small change to the plugin..

Please update and then when you open the web form, open the browser console and you will see the current options of the plugin. Check if the options from the console matches the options from the Better Attach Options field..

Also you will find in the console the uploader options that is being used when you click on the attach button and the file browser options when you click on the file browser button..

All the 3 options that you will find in the console should match with the options from the Better Attach Options field..

Thanks a lot buddy for your help..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024
		frappe._messages = {
 "Sr": "Sr"
};
		frappe.web_form_doc = {
 "allow_comments": 0,
 "allow_delete": 0,
 "allow_edit": 0,
 "allow_incomplete": 0,
 "allow_multiple": 0,
 "allow_print": 0,
 "apply_document_permissions": 0,
 "button_label": "Save",
 "creation": "2023-02-22 11:28:13.181937",
 "doc_type": "WF Attachment",
 "docstatus": 0,
 "doctype": "Web Form",
 "idx": 0,
 "in_edit_mode": false,
 "in_view_mode": false,
 "is_new": true,
 "is_standard": 0,
 "list_columns": [],
 "login_required": 0,
 "max_attachment_size": 0,
 "modified": "2023-02-22 11:28:15.646272",
 "modified_by": "Administrator",
 "module": "Website",
 "name": "wf-attachment",
 "owner": "Administrator",
 "published": 1,
 "route": "wf-attachment",
 "show_attachments": 0,
 "show_list": 0,
 "show_sidebar": 0,
 "title": "WF Attachment",
 "web_form_fields": [
  {
   "allow_read_on_all_link_options": 0,
   "creation": "2023-02-22 11:28:13.181937",
   "docstatus": 0,
   "doctype": "Web Form Field",
   "fieldname": "name1",
   "fieldtype": "Data",
   "hidden": 0,
   "idx": 1,
   "label": "Name",
   "max_length": 0,
   "max_value": 0,
   "modified": "2023-02-22 11:28:15.646272",
   "modified_by": "Administrator",
   "name": "192ee1f888",
   "owner": "Administrator",
   "parent": "WF Attachment",
   "parentfield": "web_form_fields",
   "parenttype": "Web Form",
   "read_only": 0,
   "reqd": 0,
   "show_in_filter": 0
  },
  {
   "allow_read_on_all_link_options": 0,
   "creation": "2023-02-22 11:28:13.181937",
   "docstatus": 0,
   "doctype": "Web Form Field",
   "fieldname": "wf_attachment_child",
   "fields": [
    {
     "fieldname": "name",
     "fieldtype": "Data",
     "label": "Name"
    },
    {
     "allow_bulk_edit": 0,
     "allow_in_quick_entry": 0,
     "allow_on_submit": 0,
     "better_attach_options": "{\"allowed_file_types\": [\"image/*\"]}",
     "bold": 0,
     "collapsible": 0,
     "collapsible_depends_on": null,
     "columns": 0,
     "creation": "2023-02-22 11:26:43.193107",
     "default": null,
     "depends_on": null,
     "description": null,
     "docstatus": 0,
     "doctype": "DocField",
     "documentation_url": null,
     "fetch_from": null,
     "fetch_if_empty": 0,
     "fieldname": "attach",
     "fieldtype": "Attach",
     "hidden": 0,
     "hide_border": 0,
     "hide_days": 0,
     "hide_seconds": 0,
     "idx": 1,
     "ignore_user_permissions": 0,
     "ignore_xss_filter": 0,
     "in_filter": 0,
     "in_global_search": 0,
     "in_list_view": 1,
     "in_preview": 0,
     "in_standard_filter": 0,
     "is_virtual": 0,
     "label": "Attach",
     "length": 0,
     "mandatory_depends_on": null,
     "max_height": null,
     "modified": "2023-02-24 13:15:05.238014",
     "modified_by": "Administrator",
     "name": "44e44f08b8",
     "no_copy": 0,
     "non_negative": 0,
     "oldfieldname": null,
     "oldfieldtype": null,
     "options": "{\"allowed_file_types\": [\"image/*\"]}",
     "owner": "Administrator",
     "parent": "WF Attachment Child",
     "parentfield": "fields",
     "parenttype": "DocType",
     "permlevel": 0,
     "precision": null,
     "print_hide": 0,
     "print_hide_if_no_value": 0,
     "print_width": null,
     "read_only": 0,
     "read_only_depends_on": null,
     "remember_last_selected_value": 0,
     "report_hide": 0,
     "reqd": 0,
     "search_index": 0,
     "set_only_once": 0,
     "show_dashboard": 0,
     "show_preview_popup": 0,
     "translatable": 0,
     "trigger": null,
     "unique": 0,
     "width": null
    }
   ],
   "fieldtype": "Table",
   "hidden": 0,
   "idx": 2,
   "label": "WF Attachment Child",
   "max_length": 0,
   "max_value": 0,
   "modified": "2023-02-22 11:28:15.646272",
   "modified_by": "Administrator",
   "name": "fb7fd3d135",
   "options": "WF Attachment Child",
   "owner": "Administrator",
   "parent": "WF Attachment",
   "parentfield": "web_form_fields",
   "parenttype": "Web Form",
   "read_only": 0,
   "reqd": 0,
   "show_in_filter": 0
  }
 ]
};

Update the custom app but still same issue.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Can you please post a screenshot of the web browser console when using the web form..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Browser Console log of web form.

Screenshot 2023-02-27 at 10 45 30 AM

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat I realized that the plugin doesn't override the default attach controls in web forms since it doesn't get loaded at all..

Injecting custom JavaScript and CSS files to web forms cannot be done unless specified in the hooks and for specific standard web forms only..

Because of that, I have made the plugin intercept the web form load and manually inject both JavaScript and CSS but I'm not sure that it will work since I don't know when the code will be executed, at the beginning of the web form load or at the end (which is the right time)..

So please update the plugin and check if it works automatically in web forms or not..

If it doesn't work, then the please try the following..

  • If the web form is set as Standard, then the following code must be placed at the top of the exported web form js file..
  • But if it is not set as Standard, then the desired web form must modified and following code must be placed at top inside the Client Script field of the web form..

For v14

frappe.require(['better_attach.bundle.js', 'better_attach.bundle.css']);

For v13

frappe.require([
    '/assets/frappe_better_attach_control/js/better_attach.js',
    '/assets/frappe_better_attach_control/css/better_attach.css',
]);

For v12

frappe.require([
    '/assets/frappe_better_attach_control/js/better_attach_v12.js',
    '/assets/frappe_better_attach_control/css/better_attach.css',
]);

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Still facing same issue.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Did you update the plugin?

If you did then please check frappe error log doctype and see if there is an entry from the plugin..

Have you tried the second method which is adding the js code?

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

I have update the app and uninstall and install again.

Second option is also tried but no luck.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Did you check frappe error log doctype for any error entry posted by the plugin?

If you checked and there were no plugin errors then making the plugin work for web forms might not be possible..😔

I have checked frappe source code for any possible workaround but I couldn't find any other than what I mentioned in the comment before last..

The context injection hook seems to be executed before the web form which is why the injection code doesn't work..

Even if I inject the js and css files for every web page and form, web forms will override both js and css if the form is set as Standard..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

For v14

frappe.require(['better_attach.bundle.js', 'better_attach.bundle.css']);

I used this code in web form script but error is said no file found.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Then please try using the code for v13..

This might be our last hope with web form..

frappe.require([
    '/assets/frappe_better_attach_control/js/better_attach.js',
    '/assets/frappe_better_attach_control/css/better_attach.css',
]);

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat I think that I have solved this problem..

Please update the plugin and then check if it works for web forms..

The plugin should load in web forms with any Attach or Attach Image fields..

If it doesn't then please check frappe error log for any entry posted by the plugin..

Thanks a lot buddy..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Screenshot 2023-03-01 at 11 41 30 AM

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Finally we got something although it is an error..

I will fix it and get back to you..

Thanks a lot buddy..

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat I have updated the plugin..

It should work but if the plugin was unable to load a specific file, instead of throwing an error like before it will post an error entry with the file name to the Error Log doctype..

Please give it another try..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Screenshot 2023-03-01 at 11 41 30 AM

Still get same error.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Thanks to you bro I have managed to load both js and css for v14..

v13 and v12 someone must test and see it it loads or not..

Anyway I have updated the plugin..

Please give it a try..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

After take latest pull then below error comes.

Screenshot 2023-03-03 at 12 59 33 PM

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat A million thanks for your contribution bro..

It looks like the js files must be built before being used directly so I built the js files manually for v14, v13 and v12..

Now it should work 😁

Please update then give it another try and let me know if you face any problem..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Can you please do the following..

Go to Home > Customization > Form Customization > Custom Field
In the list, check if there is a custom field called Better Attach Options
If there is no custom field, then create a new field and set the following data:
Document: DocField
Label: Better Attach Options
Field Type: Small Text
Field Name: better_attach_options
Depends On: eval:in_list(['Attach', 'Attach Image'], doc.fieldtype)
Insert Below: options
After creating the custom field, you will be able to see it when editing an Attach or Attach Image field..

If you can't find the document DocField, please let me know..

In this one issue is there. I can see in property list but I can not see in customize form. Then after I added in core doctype DocField doctype then it works.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

In this one issue is there. I can see in property list but I can not see in customize form. Then after I added in core doctype DocField doctype then it works.

That is weird, because it's a custom field for DocField doctype so it must be included in any DocField doctype form..

Maybe it wasn't included because you didn't set the module for this custom field as Frappe Better Attach Control, which I forgot to tell you about..

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Hey bro..

Do you think that the plugin doesn't have any errors?
Do you think that it is production ready or not yet?

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Finally Now, I can only pick image extension but After select image below error comes.

Screenshot 2023-03-06 at 9 58 57 AM

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

Thanks bro for reporting this..

I have updated the plugin, please update and give it a try..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Please check this issue.

Screen.Recording.2023-03-08.at.8.34.11.PM.mov

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat I have checked the video and I think that the file success upload handler that is being used is of the original control..

I have updated the plugin and added a lot of console logs so if it doesn't work we can find out what is going wrong..

Please give it a try and get back to me..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Please check console log.

Screen.Recording.2023-03-09.at.10.08.48.AM.mov

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Thanks a lot buddy..

Now I know where is the problem..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Great 👍

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat I have updated the plugin. It should work..

Can you please check if the same problem exists in desk?

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

When pick image and upload then memory goes high.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Browser memory or server memory?

Can you please provide a screenshot..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Browser memory.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat please post a screenshot of the console and of the memory..

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Thanks bro. It's a bug and I will fix it 😀..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Screenshot 2023-03-09 at 8 38 29 PM

Screenshot 2023-03-09 at 8 38 34 PM

Screenshot 2023-03-09 at 8 41 45 PM

Screenshot 2023-03-09 at 8 42 53 PM

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Thanks a lot bro for the screenshots..

There was a loop problem..

I have updated the plugin so please give it a try and get back to me..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Upload issue solve but image extension issue comes up. I already set {"allowed_file_types": ["image/*"]} in Better Attach Options and Options

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Another issue in form attachment.

Screenshot 2023-03-10 at 10 27 54 AM

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Thanks a lot bro..

I will fix everything and get back to you..

I was just waiting for the confirmation from you regarding the web form so I can fix it for desk too..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Image extension issue is there in web from also.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Thanks a million buddy..

I have updated the plugin and fixed every known bug 😁

Please give it a try and check if there are still some bugs in both, web form and desk..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Now, upload the image but image extension is not working.

Screenshot 2023-03-11 at 10 04 28 AM

Screenshot 2023-03-11 at 10 04 17 AM

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat My mistake bro..

I made some changes to the list of allowed files to reduce memory but it is supposed to be done after it get used in html..

I have fixed this issue and added support for use of regex in allowed file types by adding $ as a prefix to the regex like $image\/([a-z]+)..

Please update and check if you still face any problem..

Many thanks to you bro for your help..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Still restrictions not working

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat That is weird..

Does the allowed file types appear in the accept html attribute?

Anyway, I will check the code to see if I missed something..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

I used in options {"allowed_file_types": ["image/*"]}

https://user-images.githubusercontent.com/973676/224465071-352d0445-a5d0-4d8d-a520-5662137a5db2.png

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat I have updated the plugin and there will be some messages in the browser console..

Everything is supposed to work but please let me know if it doesn't and post a screenshot of the console..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Now, it's working but let me check tomorrow because take lots of browser memory in form and web form also.

I think log takes too much browser memory.

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024
Screen.Recording.2023-03-13.at.10.46.33.AM.mov

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Thanks a lot buddy for your help..

Just to clarify things, you have an attach field in a child table and because of the attach field, you can't edit a row or add a new one in that child table. Am I right?

What about if the attach field is not in a child table, does it work or not?

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

What about if the attach field is not in a child table, does it work or not?

Not checked.

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

Yes. And it's sometimes this happened.

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

It's Attach field type.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat I have changed a bit for v14 desk and web form controls in terms of the filename click.

I have put some console logs for the click event and removed the previous logs..

So please update and check the console after you click on the attached filename, edit button and add row button..

If you find any log in the console, please post a screenshot..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024
  • In web form working perfect now.
  • Still Edit button not in form view, Please check below video.
ScreenRecorderProject1.mp4

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat I have updated the plugin..

I have disabled the uploaded files list and preview dialog that appears after clicking the file name, only if the field is placed inside a child table..

I'm trying to find out if the problem is from the dialog or not..

There should be a console log stating that the field is inside a child table but if it doesn't appear in console it means that the child table check code isn't working..

Please give it a try and then let me know if it is still working in web form and if the bug is fixed in desk..

Best regards..

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Hey buddy..

I just wanted to check if you have tried the last update or not.

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

I think all is good. And in form edit view there is bug in frappe framework.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Thanks a lot bro..

So the problem was with the dialog of uploaded files..

I will create a custom dialog that is not bound to frappe dialogs, then I will update the plugin and let you know..

Can you please tell me about the frappe bug you found so I can check if I can help them fixing it..

Best regards..

from frappe-better-attach-control.

mohsinalimat avatar mohsinalimat commented on May 20, 2024

In Attach field type in child table issue.

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat I have updated the plugin with custom dialog for uploaded files..

Please give it a try..

In Attach field type in child table issue.

You mean the edit dialog is still not opening?
Or it is something else?

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Bro, I just want to remind you about trying out the latest update..

Have you tried it?

In Attach field type in child table issue.

You mean the edit dialog is still not opening?
Or it is something else?

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Is the edit dialog not opening using the latest update? If yes, then I need to create a different way to display the list of uploaded files in child table..

Thanks a lot bro..

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Brother, I have updated the plugin..

Now the child table dialog should open and everything should work..

Please give it a try and let me know if you find any bug or problem..

Please also try it with multiple files disabled, using Attach Image and also when editing an entry with already uploaded files, only if you have time..

Best regards..

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat I just want to check if everything is working or there are any issues..

Best regards..

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

That's weird bro. I have made the dialog gets created on demand and gets destroyed when closed so it doesn't block the child table dialog. Just like dialog of frappe File Uploader..

Do you think that I should get rid of the dialog and find another way to list and preview the uploaded files?

Should I do that for child table only or for form also?

Thanks a lot for your help bro..

Best regards..

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Hey bro..

I have removed the dialog from the plugin and replaced it with a list that is displayed under the field..

I have removed the dialog from desk and web form..

So please whenever you are free, update the plugin and give it a try..

I hope that there will be no bugs this time..

Best regards..

from frappe-better-attach-control.

kid1194 avatar kid1194 commented on May 20, 2024

@mohsinalimat Hey bro..

I just want to check if everything is working well or there are still some bugs..

Best regards..

from frappe-better-attach-control.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.