Aurelia modal dialog - is there a way to make the parent window fade? - modal-dialog

Hopefully the title makes this fairly self-explanatory.
Just a bit of background, I create and launch an aurelia modal dialog which appears on top of the parent window from where it is launched.
Is there a way to make the background (parent) window appear faded. I have done something similar in .NET environments, and just wanted to know if anything similar is achievable in aurelia?
Some example aurelia-dialog links:
https://www.tutorialspoint.com/aurelia/aurelia_dialog.htm
https://aurelia.io/docs/plugins/dialog#using-the-plugin

The answer to my question turned out to be on one of the aurelia forums:
https://github.com/aurelia/dialog/issues/84#issuecomment-239429527
It's a case up updating your css to include the background / opacity settings as follows:
ai-dialog-overlay.active {
background-color: black;
opacity: .5;
}
Having said this please be aware a breaking change had since been introduced whereby 'ai-dialog' was renamed to 'ux-dialog':
https://discourse.aurelia.io/t/trouble-with-aurelia-dialog-not-displaying-correctly/1382
So the code for your css should now read:
ux-dialog-overlay.active {
opacity: 0.6;
background-color: gray;
}
I found that this was all that was needed to make the background fade on opening the aurelia-based modal dialog, as well as un-fading on closing.

Related

Is it possible to customize the color of TabCloseButton icon in VSCode?

VSCode version 1.16
When i have unsaved changes in a file, the dot in the tab file's name is not really visible as seen below.
I'd like to highlight it somehow (e.g. to change its color). I inspected the dot element via Dev tools in VSCode and it has a ciass of action-label icon close-editor-action but i am not sure how could I implement the CSS into editors' customization..
I know about workbench.colorCustomizations settings but i have not found any documentation about this particular little thing.
The only customizable setting of tabCloseButton is changing its position but not its visual.
Does anybody know how could this be implemented?
Extension Custom CSS and JS Loader.
For instance: changing the entire unsaved tab:
.tab.dirty {
background-origin: border-box;
background-image: repeating-linear-gradient(
45deg,
transparent,
transparent 8px,
#465298 9px
);
}
Or changing close icon:
.tab.dirty .close-editor-action {
background: #465298 !important; /* here could be some inline image*/
border-radius: 50%;
}

Hide sidebar on a page in Confluence 5.1

I'm using Confluence 5.1 and I'd like to hide the sidebar - but only on a few pages. I only found a JQuery based solution which does not seem to work right in all browsers. It seems to hide the sidebar completely regardless of the default settings.
I found a CSS based solution for this after searching around the web for a long time.
Basically, all you need to do is add a CSS macro to the page which shouldn't have a sidebar containing the code below.
CSS Stylesheet macro
#splitter-content {
width: 100% !important;
left: 0px !important;
}
.vsplitbar{
visibility: hidden;
}
This CSS block spans the page content over the whole page width and removes the left margin normally reserved for the sidebar. It also hides the split bar which is normally used to change the sidebar size.
The nice thing is that you don't have to mess with cookies this way or make sure the sidebar is turned back on on the following pages.
There was a Confluence bug filed for this and it was rejected* due to a desire to have a more simplified configuration system. In that bug, a workaround is proposed.
Add this to a <script> stanza at the bottom of the <head> tag in your custom HTML:
AJS.toInit(function(){
if (AJS.$("div.ia-fixed-sidebar").width() > 55){
AJS.Confluence.Sidebar.toggle();
}
});
Since I don't have that level of control, I opted for a Greasemonkey script instead. This only affects me, but it does solve my problem (I just have to make sure I don't take too much advantage of the extra width this affords me). Here is a sample userscript for this, also posted to Github [install]
// ==UserScript==
// #name Confluence - Hide sidebar
// #namespace https://github.com/adamhotep
// #description Collapse the sidebar upon page load
// #include https://confluence.*
// #include http://confluence.*
// #version 1
// #grant none
// #license GPL
// ==/UserScript==
// from https://confluence.atlassian.com/confkb/how-do-i-remove-the-side-bar-in-confluence-5-330796984.html
if (typeof AJS === 'function') {
AJS.toInit(function(){
if (AJS.$("div.ia-fixed-sidebar").width() > 55){
AJS.Confluence.Sidebar.toggle();
}
});
}
This is theme-specific. The above code assumes the default theme and is not guaranteed to work in later versions of Confluence. See the "workaround" link for the code needed for the documentation theme.
* There's also another bug related to a cookie that is supposed to preserve whether or not to show or hide the sidebar. Supposedly, the bug is fixed, but this directly contradicts the first bug linked in this answer, so I can't make sense of it.

Issue with scrolling in iOS 5 using -webkit-overflow-scrolling

I have an HTML page with a fixed-height div which should be scrollable (only vertically). In iOS 5 this can be achieved using:
overflow-y: auto;
-webkit-overflow-scrolling: touch;
The div contains an unordered list with about 10 items.
The scrolling works, but sometimes it scrolls only if I swipe my finger diagonally or even horizontally and not vertically as it should be.
I'm wondering if anyone has encountered this issue. I don't want to think that it is a bug in iOS5, but I can't figure out what I'm doing wrong because most of the time it works fine.
I had exactly the same issue. The problem turned out to be caused by two zero size iframes my site used to track history changes and load scripts. Removing these fixed the issue. I filed a bug with apple, waiting to hear back from them.
Check to see if you have any iframes on your page they could be the cause.
I have found a hacky solution but it needs javascript...
I stumbled upon that problem while loading scrollable nodes via ajax and appending them with js.
I found out that resetting the -webkit-overflow-scrolling property with js saved the day
JS CODE:
var myDiv = $('.myDiv');
myDiv.css('-webkit-overflow-scrolling','auto');
function fn(){
myDiv.css('-webkit-overflow-scrolling','touch');
}
setTimeout(fn,500);
It really sucks that we have to call the setTimeout method but that's the only way I could think of...
EDIT : Watch out for display:none
Webkit overflow scrolling touch CSS bug on iPad
You need to put this css setting in your css file - the one you load using the content_css configuration variable:
body {
-webkit-transform: translate3d(0, 0, 0);
}
The other option is to set the css directly from code on tinymce initialization:
$(tinymce.activeEditor.getBody()).css('-webkit-transform', translate3d(0, 0, 0));
I had the same problem in iOS 5.1.1 and it turned out to be due to an ::after pseudo-element with position: fixed that was on an element that contained the scrollable list exhibiting the "wrong scroll axis" behavior. Details here.

Custom skin for facebook like button

Is there an (easy) way to customise the look of the facebook like button implemented via fbml?
I am pretty sure I saw this somewhere, but I cant remember where and I cant find any documentation on this.
You don't need to make these illegal hacking. Just use the "Open Graph": https://developers.facebook.com/docs/opengraph/actions/builtin/likes/. The downside is you need to create an app.
Are you guys lawyers or programmers? the question was HOW not '...to do or not to do...'.
#pixelistik button can be inserted either via script tag or iframe and of course you can use css with iframe just via JS, easy peasy.
#skrat good point!
#Slavic what service exactly? I call it half-service because you can like only - no place for criticism so... your criticism is not proper. Like our posts! :P
generally: if you create custom button and you didn't sign to any t&c or something like that you can do whatever you want on YOUR webpage.
Although it may not even be legal to do so (check the terms and policies for yourself), you could do something like:
/* Like button main text color */
div.like span.connect_widget_text {color:#fff;}
div.like div.connect_widget_confirmation {color:#fff;}
div.like span.connect_widget_text a {color:#ffc6ff;}
This link shows some mild styling options:
http://forum.developers.facebook.net/viewtopic.php?pid=236534
Easy peasy:
Simply set the opacity (filter for ie) to 0 and put the iframes over an image or div with a bg image. For bigger buttons simply load in multiple like buttons, don't load in too many this will make your page unbearable slow.
Hiya, you can do it with some smart CSS - http://www.esrun.co.uk/blog/disguising-a-facebook-like-link/
Although the legality of such edits is under question, I just wanted to share my findings on this subject.
I right clicked on a FB Like button in Firefox, and inspected the element with firebug. The readout of the class elements is:
.connect_widget_like_button .liketext {
background: url(http://static.ak.fbcdn.net/rsrc.php/v1/y7/r/ql9vukDCc4R.png) -1px -33px no-repeat;
background-image: url(http://static.ak.fbcdn.net/rsrc.php/v1/y7/r/ql9vukDCc4R.png);
background-repeat-x: no-repeat;
background-repeat-y: no-repeat;
background-attachment: initial;
background-position-x: -1px;
background-position-y: -33px;
background-origin: initial;
background-clip: initial;
background-color: initial;
}
This exists on line 172 of like.php
One company I know of that does use a custom like graphic is Disqus, however their button is a multi-functional element that offers you a choice between facebook & twitter onClick, which may be how they were able to customize it to their needs.

Ajax Accordion and IE8 rendering problem

I have an accordion control that is generated in code. Earlier today it stopped rendering correctly in IE8. It would function ok, but sometimes the layout would get corrupted, and all kinds of weird graphical glitches occured. It did not fail in firefox.
I reset my IE settings to factory defaults and it fixed it. It works perfectly on another test machine, but on some of the machines on our network the graphical issues occur.
Has anyone else experienced the same or know a fix? All of our computers run internet explorer 8. If it becomes a big problem I will try forcing compatibility mode but I would prefer a more permenant fix (and also that might not even fix the issue!).
I've had issues like this in the past, most typically an issue with some CSS settings. If you use the developer tools in IE, look to see what CSS settings are being applied and try to rule that out.
A screenshot of what is happening and what should happen would be useful along with the code sample.
On your accordion headers only, place the following css code:
.accordionHeader { display: table; width: 100%; }
If you find that the headers still jump when hovering between them, use a border-top using a solid colour rather than using margin and padding. Of course this only works on designs ontop of solid colours (the border colour would need to match the background colour). Heres an example:
.accordionHeader { border-top: 10px solid #FFFFFF; }
This will fix IE8 right up! This has taken me a year to figure out lol.