quasar notify - How to change close button color? - quasar-framework

I can change text color, button color, icon color, close button text, but NOT the close button color.
I am using as
return Notify.create({
type: "positive",
timeout: 0,
html: true,
message: "the message",
closeBtn: true,
textColor: "white",
});
How can i change the color of the 'close' text?

According to Notify's API for closeBtn prop:
Convenient way to add a dismiss button with a specific label, without
using the 'actions' prop.
In other words, It's a shortcut to automatically add an action button. If you need to customize a button, you should add an action by yourself. Like so:
return Notify.create({
type: "positive",
timeout: 0,
html: true,
message: "the message",
textColor: "white",
actions: [
{
label: 'Close', color: 'white', handler: () => undefined
}
]
});

Related

Highcharts: how to dynamically update text inside of the label?

I am having this code: https://jsfiddle.net/delux123/dk9zbsc1/5/ where I successfully can change the label's related colors and the font.
What I am missing is, I want to be able to update the text of the label itself.
I tried this with the code:
// Update the label
thischart.currentAnnotation.update({
labels: [{
text: fontText, //this line is not working
backgroundColor: fontBackgroundColor,
style: {
fontSize: fontSzie,
color: fontColor
}
}]
});
And also I tried with the code:
thischart.currentAnnotation.labels[0].update({
text: fontText
});
And a few more combinations which I found in similar threads (including the attr property), but none of them were working.
So I wonder, how can I update the text dynamically?
The problem results from the fact that you have used format property in the label creation process and update text property. Text is overwritten by format.
var onclick = function() {
_self.chart.addAnnotation(Highcharts.merge({
langKey: 'label',
labelOptions: {
// format: labelTextForm.querySelector('#labelTextInput').value,
shape: 'rect'
},
labels: [{
text: labelTextForm.querySelector('#labelTextInput').value,
...
}]
}, ...));
};
Live demo: https://jsfiddle.net/BlackLabel/pghrfjsx/
API Reference: https://api.highcharts.com/highcharts/annotations.labelOptions.format

Sproutcore SC.MenuPane keep/remember/visible selected item

I have a working popup button with menu 2 options, and need to 'keep/remember' the selected item visible to the user, in other words, the next time the menu pops up, the previous made choice should be visible (eg highlighted).
selectMenuButton: SC.PopupButtonView.extend({
layout: {left:10, bottom: 10, height: 18, width:100},
controlSize: SC.SMALL_CONTROL_SIZE,
title: 'Menu',
menu: SC.MenuPane.extend({
layout: { width: 150 },
items: [
{ title: 'option1', checkbox: YES, action: 'action1',target: 'App.Controller1'},
{ title: 'option2', checkbox: NO, action: 'action2',target: 'App.Controller2'}
]
}),
}),
I tried classnames css .active or .sel, but that didn't work.
Please some advice, thanks in advance.

Highcharts title background can't be changed

I am using Highcharts to create some chart but I find it's not working for changing the background of a chart's title.
For instance:
// works, the color did get to red
title: {
text: title,
style: {"color":"#ff0000"}
},
// the color did get to white but the background is not set to red.
title: {
text: title,
style: {"backgroundcolor":"#ff0000", "color":"#ffffff"}
},
What should I do to fix this?
Thanks
Referencing this question, you can do this by setting useHTML: true and using background-color.
title: {
useHTML: true,
style: {
color: '#FF00FF',
'background-color': '#000000',
fontWeight: 'bold'
}
},
https://jsfiddle.net/nicholasduffy/a32vL38z/

jquery mobile either text or icon showing not both

i am instantiating a button widget like so
var button = $('<div>')
.buttonMarkup({
icon: 'plus',
corners: false,
type: 'button',
})
.attr('id', 'my-button')
.text('start') //when this is added the icon vanishes
.appendTo('#my-div');
the trouble is the when i add text no icon is shown. when i add no text icon is shown
is there anything i overlook
thanks a lot in advance
You need to enhance the markup of the div using .button().
Demo
var button = $('<div>')
.buttonMarkup({
icon: 'plus',
corners: false,
type: 'button',
})
.attr('id', 'my-button')
.text('start') //when this is added the icon vanishes
.appendTo('#my-div').button();

HOw to show the tooltip for an image in the jqGrid?

HOw to show the tooltip for an image in the jqGrid?
Did you check this >>> Custom Data ToolTips for jqGrid
you can use qtip plugin of jquery for this. in my case i have to show tool tip when particular jqgrid cell get focused.
LoadToolTipRackId = function (elem) {
jQuery(elem).qtip({
content: 'this is an image',
show: 'focusin',
hide: 'focusout',
style:
{
name: 'red',
tip: 'leftBottom',
textAlign: 'left',
fontWeight: '500',
fontSize: '11px'
},
position:
{
corner:
{
target: 'rightMiddle',
tooltip: 'leftBottom'
}
}
});
}
you can visit following link to find out more about qtip plugin
http://craigsworks.com/projects/qtip/
whereas i have to set following column properties in jqgrid in colmodel
editoptions: { size: 7, defaultValue: '0.00000', maxlength: 15, dataInit: LoadToolTipRackId}

Resources