I use the Kendo Upload component for Angular 2.
I cannot figure out how to hide the file list below the uploader button. I know it can be customized using ng-template but I want it to be hidden. I've tried setting the class like this :
.k-upload-files{
display: none;
}
but this has no effect.
Can you help ?
The file-list can be hidden by utilizing the showFileList input. API Reference
<kendo-upload
[showFileList]="false"
...
>
</kendo-upload>
Alternatively you can use a css rules to hide the file-list (as you already stated in your question).
.k-upload-files {
display: none;
}
I've prepared an example showing both approaches in action.
Related
I am working on Liferay 6.1 and I want to remove portlet header section completely for one of the portlet( This should not be visible for admin even)
Header section is edit,minimize,maximize,delete and title bar.
I have tried removing border but in vain. Also tried additional style sheet options
PortletId is correct as I am able to change other styles
p_p_id_top_WAR_SecondPortletProjectportlet_.portlet-borderless-bar {
display:none;
}
p_p_id_top_WAR_SecondPortletProjectportlet_.portlet-topper {
display: none;
}
p_p_id_top_WAR_SecondPortletProjectportlet_.portlet-title {
display: none;
}
Try this code
p_p_id_top_WAR_SecondPortletProjectportlet_ .portlet-borderless-bar {
display:none;
}
p_p_id_top_WAR_SecondPortletProjectportlet_ .portlet-topper {
display: none;
}
p_p_id_top_WAR_SecondPortletProjectportlet_ .portlet-title {
display: none;
}
As you are using css class you need to give space before using it.
More Info css .class selector
Edit: Sorry, I misread your question - You're explicitly asking about an embedded portlet. Disregard my answer, I'm not deleting it as this question might be found by others that are looking for this solution for non-embedded portlets.
I'm suggesting a slightly different approach than you ask for:
Don't display portlet borders. This will do the job if you also uncheck the "Display Edit Controls" checkbox in the dockbar. However, it will allow you to move the portlets on the page, configure them as you need.
Alternatively, specify in your theme that you don't want to show the borders by default - this way you don't have to change each single portlet's borders, but they're all gone at the same time (provided the current border-display-setting is on default):
in liferay-look-and-feel.xml add this line:
<setting configurable="true"
key="portlet-setup-show-borders-default"
type="checkbox"
value="false" />
When you disable borders, some handle will only appear if a) "Display Edit Controls" is checked AND the user is hovering the mouse over a portlet.
After that, don't grant the full Administrator role to people that you don't want to see the controls at all. Instead create an alternative role with permissions that match your requirements - this typically involves setting portlet preferences for the single portlets, configuring permissions for them as well as changing/modifying pages (try them out, I can't name them from the top of my head)
I would like to put a custom icon in a p:menuButton, is this possible?
Yest it is possible. All you need to do is to override primefaces css classes generated for the p:menuButton.
Approach:
In the rendered web page you can right click on the generated p:menuButton and -> inspect element. There you can inspect all of the related css classes.
You can try to experiment with them (which I would advice, if you have time) for better understanding of css selectors and so on ...
The .ui-menubutton .ui-state-default .ui-icon are the classes that you need.
So now when you know which css classes are related to the icon you can override them :
Add .ui-menubutton .ui-state-default .ui-icon rule to your stylesheet (I assume you have one and it is sucesfully imported and working. If not check here.)
yourStyles.css :
.ui-menubutton .ui-state-default .ui-icon {
background: orange; /** insert your background image **/
}
This will override icons of all p:menuButtons used in your project. If you want to reduce it to some particular p:menuButton then add its ID to the style definition.
#menubID.ui-menubutton .ui-state-default .ui-icon {
background: orange; /** insert your background image **/
}
My problem is that I want to overwrite a style of a site. Thing is, there is a way to do this, using the !important sentence, as seen in this example.
However, there are thousands of CSS instructions in my file, is there a more quick/efficient way to do this, i.e. not putting !important on each and every single line?
The approach I've found easiest and most effective is to wrap whatever html template you're injecting in a div with a very specific id.
<div id="my-specific-id">
// Your injected HTML template or section of the website you want to change
</div>
Once you've done this, reset all of the CSS that might affect that section.
#my-specific-id {
// A comprehensive CSS reset
}
// The rest of your CSS will override the reset above
Here is one such reset: http://html5doctor.com/html-5-reset-stylesheet/
Note that you probably won't need everything from the CSS Reset, so remove what isn't relevant to take some load off the browser. I can't imagine that you really want to reset figcaption, for example.
As someone writing an extension, you should care a lot about whether or not your extension ruins the user experience on websites you inject scripts into.
The approach I've outlined will guarantee that only the sections of the website that you specifically care about are changed.
You can do this with your own templates (say you wanted to add a weather widget to every page without using an iframe) or with specific parts of the page. You could, for example, wrap all <p> elements in a highly specific id that you define.
Here's an example using Sass from a recent project I've been working on...
#specific-id-css-ultimate-reset {
html, button, input, div, p, img, form {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
#import "modules/all";
#import "components/all";
#import "popups/all";
}
<div id="my-superspecific-html-template-wrapper">
<HTML TEMPLATE>
</div>
Maybe it will be faster for you to include all styles from the original CSS that you don't wish to override in your injected stylesheet? If so, you can then remove the original stylesheet from page using content script/code injection or blocking the browser request for CSS file.
You can also write a small script that does some regex magic and adds !important to every line of given CSS file.
How can i add icon to dojo grid header. I tried setting the headerClasses with appropriate css class but dint work.
sample css class i used
.sample{
background : url ('______') no-repeat right top;
}
this never worked for me.
Any help would be great.
basically you needed to add ".tundra" in front of .sample because the .tundra stylesheet is at the top of the hierarchy.
I found the solution wich may help you here: https://stackoverflow.com/a/2456933/1238394
Is there a way to change the default unsorted icon for a rich:column?
I am aware that you can add sortIcon="/images/myPic.png", but i don't want to have to add that for every single column.
I tried adding an attribute selector to my CSS file to "hide" the image:
img[src="/app/a4j/g/3_3_0.GAorg.richfaces.renderkit.html.iconimages.DataTableIconSortNone/DATB/eAFjYGD4!!8!AAYAAv4_"]
{
width: 0px;
}
That works for Firefox, but IE doesn't honor it.
Any ideas? Thanks in advance.
Use the sortIcon attribute of the rich:column tag to point to your own image as in:
<rich:column sortIcon="img/defaultIcon.png">...</rich:column>
According to the RichFaces documentation:
You can customize the sorting's icon
element using "rich-sort-icon" class
So I'd create a class in your css file that references the icon you'd like to use.
RichFaces rich:column documentation