The main benefit of this is so that authors who make use of
.editorconfig don't end up with whitespace changes in their PRs.
Spaces vs. tabs has been left alone, although that could do with a
tidy-up in SS4 after the switch to PSR-1/2.
The command used was this:
for match in '*.ss' '*.css' '*.scss' '*.html' '*.yml' '*.php' '*.js' '*.csv' '*.inc' '*.php5'; do
find . -path ./thirdparty -not -prune -o -path ./admin/thirdparty -not -prune -o -type f -name "$match" -exec sed -E -i '' 's/[[:space:]]+$//' {} \+
find . -path ./thirdparty -not -prune -o -path ./admin/thirdparty -not -prune -o -type f -name "$match" | xargs perl -pi -e 's/ +$//'
done
In IE11 windows 8 call to window.localStorage was throwing out an access denied error. Using try and catch manages the issue and allows the script to execute in IE 11 in desktop mode.
I think it is a problem with IE11 rather than the way Silverstripe is implementing the preview via an iframe from what I have been reading. http://blogs.msdn.com/b/ieinternals/archive/2009/09/16/bugs-in-ie8-support-for-html5-postmessage-sessionstorage-and-localstorage.aspx. It seems that the way IE11 deals with localStorage is broken in certain cases but I am not 100% certain of the cause yet as I have not been able to find a definitive answer. I only noticed it was a problem when a new client said they couldn't view the admin screen properly in IE11. I took a look in IE11 and I was experiencing the same problem which makes the admin interface layout screw up and the preview doesn't work due the error mentioned in the first post.
Instead of the original code I submitted I have amended it and added an additional function to test more robustly to see if localStorage is available and can be accessed properly. It is a copy of the code on a blog post Mathias Bynens has written about detecting if localStorage is available and can be used: https://mathiasbynens.be/notes/localstorage-pattern
I have added a console.warn as you suggested if localStorage is not available so that at least you get a warning if localStorage tests fail.
I have tested this on Windows 8.1: Firefox, Chrome & Mac: Firefox, Safari, Chrome and it seems to work as expected. On IE11 it displays the admin area correctly now but obviously doesn't save the preview settings between page loads if localStorage is not available.
The CMS preview causes unnecessary browser processing by loading a URL
which should be considered "in transit" when a CMS redirect is set through
the X-ControllerURL HTTP header. The CMS history processing will
load this new URL, and cause a new preview URL to be loaded.
Fixes https://github.com/silverstripe/silverstripe-translatable/issues/158
1. Add missing _super calls.
2. Make UI widget destroys more consistent to avoid exceptions.
Selectable would throw an exception in the GridField.js if destroy
called from onunmatch - at that stage jQuery UI would have had called
the destroy already. Add a guard, and change to onremove, which triggers
before the element is removed from DOM.
3. DOM traversal fails after the element is removed from DOM.
Onunmatch triggers after the removal of the element from the DOM, which
makes DOM traversal fail. Use onremove instead, which triggers while the
element is still in DOM.
In IE8, when a page in the preview iframe uses a web font (not just
references it in CSS, but actually has glyphs present in the page),
the fonts in the containing admin interface will become corrupted
(display as all squares) until the mouse moves.
This commit uses the technique described at
http://stackoverflow.com/questions/9809351/ie8-css-font-face-fonts-only-working-for-before-content-on-over-and-sometimes#10557782
to cause the admin panel to re-calculated all it's fonts
after the preview iframe has loaded, fixing the glitch
Updating the iframe src when the iframe isnt visible in IE8 causes a
view disconcerting font glitch (and it slows down navigation anyway),
so if the iframe isnt visible, delay setting the src until it is
This was a regression made visible by the recent change to
enforce dimensions on this overlay, which in turn visualizes
the blocked/unblocked states of the preview (see fc6d6ffad)
The new 'liszt:ready' handler is called late enough to trigger the
update, whereas the redraw is called to early for IE8 to pick up the
class change. The class property is changed correcly though, it looks
like an IE8 rendering issue.
http://open.silverstripe.org/ticket/8095
Add extra preview-mode selector to the CMS actions so we can show
something when the preview is closed (and with it all options are not
visible).
Thanks @mateusz, @clarkepaul and @robert-h-curry for contributing.
It is now possible to change the threeColumnLayout width options for the
columns via entwine property LayoutOptions and accessor methods.
Thanks @robert-h-curry, @clarkepaul for contributing!
Introduces a preview window that appears when the screen is wide enough,
removes old preview button, adds a draft-public switch, adds variety of
preview options which are not hooked up yet.
Goes along with cms commit fa3738a9f4c5181eabf18a77ca89792d31592250
jQuery seems to order by DOM rather than occurrence of
selectors, which means it always takes the last populated
field (in our case the "live" link over the "draft" link).
Goes by priority, but allows for fields to be empty.
This is important e.g. for models which are removed just
from live, or just from draft.
Also reacts to a field rename done in CMS module (62783c75).
Rather than disabling the links altogether, which is
counter-intuitive to most users.
See https://github.com/silverstripe/sapphire/pull/638.
Also hide a duplicate $SilverStripeNavigator on the previewed
website (in case it has been manually applied to the template).
- Changed application order
- Fixed layout trigger after preview toggle
- Replaced button row dimension approximation with double application of jQuery.layout() - once before sizing the action panel height to set correct width on container, then again for the height