ExtJS 3 -- Always Show menu icon in GridPanel Column Header? - extjs3

I have a requirement to always show the menu icon in a a GridPanel's column header. See attached image. I've tracked down the css class and see the <td /> tag is assigned the x-grid3-hd-btn on hover. The x-grid3-hd-btn class uses a background image, grid3-hd-btn.gif to display the drop-down arrow I want, but I'm not css savvy enough to figure out how to always show it.
There doesn't seem to be a hook in the GridPanel class api's to always display this, wish there was. Also, note that I only want the arrow icon to show, I don't want the column header to change color, etc.
Does anyone have any guidance on this?
Thanks!
John

Add this to your stylesheet, this overwrites default extjs theme styles
/**
* EXTJS Grid-3 Always visible header buttons
*/
.x-grid3-hd-btn {
display: block !important;
height: 22px !important;
}
.x-grid3-hd {
cursor: pointer;
}

have you tried replacing the css class background image in your ext-all.css file?
original:
.x-grid3-header{
background-color:#f9f9f9;
background-image:url(../images/default/grid/grid3-hrow.gif);
}
replace to :
.x-grid3-header{
background-color:#f9f9f9;
background-image:url(../images/default/grid/grid3-hrow-over.gif);
}
tell me if that did it...

Related

SharePoint color picker modal dialogue box not auto adjusting

Background:
- I have a custom SharePoint masterpage with custom CSS.
- I also placed a custom div into the masterpage.html
Problem:
When I use the color picker to change some font color and select "more colors…", the modal dialogue box that comes up is too small and has scroll bars.
I would like for it to auto adjust.
How do I fix this?
I tried using F12 to figure out what CSS element may be affecting it, but I am unable to figure it out.
Note: I tried removing the custom div but the problem persists.
If I get two more reputation points I can upload a picture so you can visually see what I am talking about. A picture is worth a thousand words:/
Or you can go here to see the pic.
UPDATE:
I was able to figure it out:
I update the following custom css with 300px !Important:
#contentBox
{
margin-right:20px;
margin-left:20px;
min-width:300px !Important;
}
And I added the below custom css:
.more-colors-picker
{
margin: 0px;
}
For a complete history and explanation with pictures go here

ionic 3 search bar style and search icon color change

Now I have a search bar, but I want its border to be round, what should I do?
I have tried border : round,border-radius:10px... and it did'nt work.
I even want to change my search icon color and cancel icon color?
Any ideas on how to achieve these things
for Ionic 4 for changing the icon color this works for me just fine
ion-searchbar {
--icon-color: var(--ion-color-primary);
}
for futur references you can check out the official docs
https://ionicframework.com/docs/api/searchbar
I tried all of the above answers and none worked for me.
After some digging, I found something that might be useful to someone else looking to tweak the default styles of ion-searchbar (or any other ion element in general)
Below is the component.scss code for the ion-searchbar wthat I wished to change the styles for:
ion-searchbar{
--icon-color: var (--ion-color-primary);
--box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
::ng-deep{
.searchbar-input-container{
.searchbar-input{
border-radius: 20px;
//any style that you want to implement on your searchbar
}
}
}
}
Here, ::ng-deep disables view encapsulation for specific CSS rules, in other words, it gives you access to DOM elements, which are not in your component's HTML.
To change the icon color. In your "variables.scss" file in the "theme" folder add this line ;
$searchbar-md-input-search-icon-color:#yourColor;
To change the border-radius of the search bar, go to the SCSS file associate to your page containing your SEARCH BAR and put this
ion-searchbar{
.searchbar-input-container{
.searchbar-input{
border-radius: 20px;
}
}
}
The following code changes the colour to white replacing the original greyish colour.
.searchbar .searchbar-search-icon {
background-image: url("data:image/svg+xml;charset=utf-8,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'><path%20fill='%23ffffff'%20d='M337.509,305.372h-17.501l-6.571-5.486c20.791-25.232,33.922-57.054,33.922-93.257C347.358,127.632,283.896,64,205.135,64C127.452,64,64,127.632,64,206.629s63.452,142.628,142.225,142.628c35.011,0,67.831-13.167,92.991-34.008l6.561,5.487v17.551L415.18,448L448,415.086L337.509,305.372z%20M206.225,305.372c-54.702,0-98.463-43.887-98.463-98.743c0-54.858,43.761-98.742,98.463-98.742c54.7,0,98.462,43.884,98.462,98.742C304.687,261.485,260.925,305.372,206.225,305.372z'/></svg>");
}
Try this to change the color of searchbar icon. Works for me.
If you try to inspect the search bar icon it has a background image property which looks something like this
background-image: url("data:image/svg+xml;charset=utf-8,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'><path%20fill='%235b5b5b'%20d='M337.509,305.372h-17.501l-6.571-5.486c20.791-25.232,33.922-57.054,33.922-93.257C347.358,127.632,283.896,64,205.135,64C127.452,64,64,127.632,64,206.629s63.452,142.628,142.225,142.628c35.011,0,67.831-13.167,92.991-34.008l6.561,5.487v17.551L415.18,448L448,415.086L337.509,305.372z%20M206.225,305.372c-54.702,0-98.463-43.887-98.463-98.743c0-54.858,43.761-98.742,98.463-98.742c54.7,0,98.462,43.884,98.462,98.742C304.687,261.485,260.925,305.372,206.225,305.372z'/></svg>");
Just Change the last 6 hex-digits in the fill='%235b5b5b' according to your color. Hope this helps.

How to manipulate tinyMCE image functionality

I'm trying to manipulate the functionality of tinyMCE when user tries to attach picture in the editor. What I want to achieve is to HARDCODE the properties of the picture. So when he selects a picture I want to disable the options for SIZE selection, orientation and all other options. Is this possible and what are the ways to do that... I searched the web but without any luck. My idea is to open the script file ot tinyMCE image plugin and to change the values which the script takes and inserts like inline styles, but I'll be glad to see if there is more elegant solution.
Thanks in advance,
Z.
You could add the unselectable=true attribute to the image. This way the image cannot get resized (you may strip out that attribute later on before saving the content to db). To disallow special attributes of your image you may define what attributes are allowed using the tinymce valid_elements setting.
UPDATE: This is the css necessary to be set using the tinymce param content_css in order to make images non-resizeable
img {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none; /* IE10+ */
user-select: none;
}

GWT push button blue border behaviour

Does anybody can tell me where that blue border that appears after you push a PushButton comes from?
I really want to override that behaviour, don't know where or how though
UPDATE:
the effect I'm talking about turns out to be blue on Safari, it goes orange on Chrome and no effect on Mozilla
it occurs when the button has been pressed once, best way to explain it is the http://gwt.google.com/samples/Showcase/Showcase.html#!CwCustomButton
Are you talking about the "focus ring" that appear around any element when it's focused?
You can tweak it using the outline set of CSS properties: http://www.w3.org/TR/CSS21/ui.html#dynamic-outlines
But please note that it's bad practice (re. accessibility) to completely remove it, as you'd remove any indication of whether the button is focused or not, and incidentally, which element is focused, if any.
This behavior should be defined in the appropriate stylesheet. If you check GWT sources that would be in /trunk/user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard.css. It's also defined in other themes.
What you should do is define your own styles
.my-PushButton
{
border : 1px solid #666;
padding : 0 10px;
}
.my-PushButton-down-hovering
{
background-color : #aaf;
}
.my-PushButton-up-hovering
{
background-color : #afa;
}
And then
PushButton btn = new PushButton(...);
widget.setStylePrimaryName("my-PushButton");
Hope this helps.

Disable the text-highlighting magnifier on touch-hold on Mobile Safari / Webkit

I have some elements in my iPhone website that don't have any text in them but require the user to click and hold on them (DIVs). This causes the text-highlighting/editing loop/cursor to show up, which is really distracting.
I know there is a CSS rule for removing the black-box that shows up on clickable elements when they are touched. Is there anything like that to disable the text magnifier?
Just got a response from the Developer Center help desk. I needed to add this CSS rule:
-webkit-user-select: none;
Add this to the CSS
body {
-webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
-webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
-webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */}
Use these CSS rules:
-webkit-touch-callout: none;
-webkit-user-select: none; /* Disable selection/copy in UIWebView */
This is also useful in protecting content that you don't want copied or saved, such as an image:
#yourdiv img {-webkit-touch-callout: none; }
This solved it for me, in JS:
document.getElementsByTagName("body")[0].addEventListener("touchstart",
function(e) { e.returnValue = false });
Seems to bypass whatever the OS has in there to catch the touch.
I found this out while trying it out myself. First of all you have to add this rule to the enclosing element:
-webkit-user-select: none;
But that, by itself, is not enough on the iPhone. It turns out that the magnifying glass can still appear because, for example, a parent element would accept selection, or just because it feels like it.
However, I then discovered something cool - if your element adds a touchend and click handler to an element, then Apple's Safari finally avoids the annoying code path that causes the magnifying glass to appear, probably realizing that this element is meant for some UI interaction, and not selecting text. On an equally awesome note, if you do this on elements near the top of the screen, it will also cancel the appearance of the navigation in landscape mode! Not sure however how to cancel the appearance of navigation when clicking on elements on the bottom, does anyone have a solution for that one?
On IOS 15.2 -webkit-user-select: none; fixed the issue, but only partially.
A long press doesn't show the magnifier anymore. However, if you double-tap and hold, it magically still appears.
There is still no 100% reliable way except event.preventDefault on touchstart. But this also blocks underlying actions so things like buttons with long-press tooltips break. Therefore, it is not always an option...