cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

File Upload widget custom styling (Thingworx 9.6)

JO_9930585
14-Alexandrite

File Upload widget custom styling (Thingworx 9.6)

When I upload a file, it shows the file below with an "x" to remove the file as well. However, I need to remove this "x" because there is no bindable event to removing an item. Instead, I have a button to clear the items which then triggers some other services. 

 

How do I remove the "x" button from this widget as shown below? Thingworx 9.6

JO_9930585_0-1765831799597.png

 

ACCEPTED SOLUTION

Accepted Solutions
Rocko
19-Tanzanite
(To:JO_9930585)

add custom css to the mashup:

@supports (ptcs-style-unit: "PTCS-FILE-UPLOAD-LIST-ITEM") {
[part=hit-area] {
display:none;
}
}

 

you probably need to disable linting which will keep you from saving.

View solution in original post

6 REPLIES 6
Rocko
19-Tanzanite
(To:JO_9930585)

The x removes the file from the list of files to be uploaded, in case you accidentally added something to the list. It does not need to be bound to work.

JO_9930585
14-Alexandrite
(To:Rocko)

As stated, I have services that need to be triggered once the file is cleared from the widget and there is not bindable event to call these services when the "x" is clicked. I went into more detail below.

PEHOWE
17-Peridot
(To:JO_9930585)

Hello @JO_9930585 ,

 

As Rocko, indicated the "X" is used to update the file which is selected for Upload.  It is has no other action then to remove the selected file name from the widget. 
In your post you indicate that you have a button which does this action. What other operations are required for removing the file selected in the widget.
 

 

Regards,

Pehowe

JO_9930585
14-Alexandrite
(To:PEHOWE)

When a user clicks the "x" it removes the file from the list as stated. I have a webframe directly below this that shows the file that has been selected. The "x" does NOT have a bindable event to clear this webframe when it is clicked. Therefore, I am using a button to clear the file. However, the "x" is still visible which is not desirable since it is not useable. Also, the file upload widget is disabled after a single file is uploaded which gives the "x" button no functionality. This is great, but it is still visible.

JO_9930585_0-1766071581049.png

 

Rocko
19-Tanzanite
(To:JO_9930585)

add custom css to the mashup:

@supports (ptcs-style-unit: "PTCS-FILE-UPLOAD-LIST-ITEM") {
[part=hit-area] {
display:none;
}
}

 

you probably need to disable linting which will keep you from saving.

JO_9930585
14-Alexandrite
(To:Rocko)

Thanks! This is what I was looking for.

 

I find myself needing access to the CSS for the shadow dom every now and then. I have seen this link...

https://support.ptc.com/help/thingworx/platform/r9.6/en/?_gl=1*7xyrcd*_gcl_au*MTQ1Nzk1OTMxMi4xNzQ0MDMxNzk1LjE1Mzg2MjI2OTYuMTc0NTUwOTk1NS4xNzQ1NTA5OTU2*_ga*MTM3NzIxMjUyOC4xNjU1NDAxNzYz*_ga_7NMP2MSYPM*MTc0NTUwOTk0MC4zMzkuMS4xNzQ1NTA5OTcyLjI4LjAuMA..#page/ThingWorx/Help/Mashup_Builder/Theming/ApplyingC...

 

But, it doesn't show every widget ptcs-style-unit. Is there another source for this information. I originally tried "PTCS-FILE-UPLOAD", and "PTCS-FILEUPLOAD" when I tried styling this example because I was basically guessing as to what it was called.

Announcements


Top Tags