Commit Graph

170 Commits

Author SHA1 Message Date
Ingo Schommer
8ec3641e60 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	admin/javascript/LeftAndMain.FieldHelp.js
	lang/en.yml
	model/URLSegmentFilter.php
2012-12-21 15:04:17 +01:00
unclecheese
07fb756327 Fix edge case in which uninitialized buttons are being destroyed.
In certain cases, the button may not yet be initialized or may no longer have button properties at the time of removal from the DOM. Without this check, an uncaught exception is thrown.
2012-12-18 09:41:54 -05:00
uniun
77212c0647 CMS Titles does not support UTF-8
Title in CMS is set using header X-Title. But UTF-8 characters can't be used in HTTP headers. So the title should be encoded just before sending X-Title header and decoded before setting HTML document title (fixes #7942).
2012-12-17 17:36:00 +01:00
Ingo Schommer
a823c38c3f Fixed JS syntax error 2012-12-17 11:38:03 +01:00
Mateusz Uzdowski
8455686c36 BUG Fix the re-layouting not being triggered in IE8.
Move onresize handler from entwine to regular event for IE8. The
fromWindow::onresize does not trigger otherwise.

Refer to http://open.silverstripe.org/ticket/8095
2012-12-16 16:14:45 +13:00
Ingo Schommer
963f02e7a3 Using new description style in MemberDateTimeOptionSetField 2012-12-14 01:58:04 +01:00
Mateusz Uzdowski
4d6d823cb1 API Allow ignoring persistent tab state through entwine property.
In this case we don't want to rely on data attributes in the DOM, as
this should be an inbuilt property associated with this class.
2012-12-13 17:43:25 +01:00
Naomi Guyer
5cef05ebea Separate out ActionTabSet functionality into a new file & clean up. 2012-12-13 17:43:25 +01:00
Mateusz Uzdowski
fe08236f21 API Add action tabsets as a interface idiom.
Introduces the concept of action tabsets - usage of TabSet and Tabs
in between the action buttons to allow richer set of capabilities that
can be offered to the user.

Goes along with c8d0cdec99c95dbed3b58ebcc098cc9d22c58206 that implements
a change to the CMS actions.
2012-12-13 17:43:24 +01:00
Simon Welsh
b0121b541c Add codesniffer that ensures indentation is with tabs. 2012-12-12 17:33:31 +13:00
Simon Welsh
fc5dd2994c Add codesniffer that ensures indentation is with tabs. 2012-12-12 00:12:11 +13:00
Naomi Guyer
00f1ba4ab0 Side-by-side preview browser compatibility fixes. 2012-12-10 17:52:02 +01:00
Mateusz Uzdowski
d4f13fe532 API Refactor the CMS layouting to provide access to options.
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!
2012-12-10 17:52:01 +01:00
Mateusz Uzdowski
1edfeefbdd BUG Remove extraneous layout calls.
Remove .layout() calls on redraw. It's unnessecary and means layout
actually gets triggered multiple times, making resizing very slow.
This was a hack to fix the positioning of ajax-replaced elements.

The problem is jLayout does not track replaced elements. We have
to trigger layout algorithm manually on the parents of the replaced DOM
so it can update internal structures and do the re-layout.

Relayouting only needed 3 levels down.
2012-12-10 17:51:35 +01:00
Mateusz Uzdowski
f4b080ee06 NEW Side by side editing functionality - first cut (os#7412)
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
2012-12-10 17:51:35 +01:00
Ingo Schommer
fa84c2d705 Merge remote-tracking branch 'origin/3.0' 2012-12-10 17:50:43 +01:00
Ingo Schommer
0be51a9321 BUG Fix ModelAdmin search (fixes #8052)
Broken by jQuery UI ajax behaviour in tabs, which compares
URLs to determine if the tab needs to be loaded via ajax.
This was always a brittle solution, and now broke alongside
our upgrade to jQuery UI 1.9 (specifically, with 2657a275).

The ajax behaviour is now globally disabled in favour of
having '.cms-panel-link' behaviour on the tabs, which
was already in place.
2012-12-04 14:28:36 +01:00
Marcus Nyeholt
34788130ef BUG Rewrite hashlinks failing on empty a tags
Check for presence of href in _a_ tags before trying to .match them to
prevent null pointer errors.

Some external JS libs (eg tag-it) use <ul><a> structures which get matched
and break

(fixes regression introduced by ff39f9ad38)
2012-12-04 15:47:14 +11:00
Kirk Mayo
20a5bc1d36 BUG iOS safari navigation bug (fixes #8039) 2012-12-03 12:27:59 +01:00
Ingo Schommer
e021a190b3 Merge pull request #968 from silverstripe-droptables/submitform-validation
Future-proof the submitForm for use with forms without validation.
2012-11-22 15:31:51 -08:00
Ingo Schommer
c55c7c33f8 Merge branch '3.0'
Conflicts:
	admin/code/CMSProfileController.php
	composer.json
	tests/model/DataObjectTest.php
2012-11-22 23:51:28 +01:00
Mateusz Uzdowski
3f2ddbb3fb Future-proof the submitForm for use with forms without validation.
We might decide to use it for other submissions than EditForm.
2012-11-23 11:09:43 +13:00
Mateusz Uzdowski
2657a27573 BUG Adjust the handler to jQuery UI 1.9 API change.
Settings.url no longer contains the URL, as a result navigating around
tabs in IE (browsers that do not support History API) becomes broken.

For example when the admin is opened on "Pages" section it is impossible to
navigate to specific page, or if the admin is opened on a tab, it's not
possible to navigate to another tab.
2012-11-21 11:02:51 +01:00
Sean Harvey
f4a4465873 Merge branch '3.0' 2012-11-07 11:12:01 +13:00
Ingo Schommer
a7efc76c36 Removed usage of deprecated jQuery UI 1.9 features
See http://jqueryui.com/upgrade-guide/1.9 for details.
Fixes fade effect on changing toplevel tabs
(semantics for "show" option in $.tabs() changed).
2012-11-06 22:53:34 +01:00
Ingo Schommer
3214a0a756 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	admin/css/screen.css
2012-11-06 19:56:34 +01:00
Ingo Schommer
ff39f9ad38 Upgrade jQuery UI to 1.9
- Fixed jQuery.tabs remote tabs loading behaviour (see http://forum.jquery.com/topic/tabs-api-redesign)
2012-11-06 19:45:56 +01:00
Saophalkun Ponlu
e3a27ea7da CMS member profile now is no longer in a popup (#7880) 2012-10-08 12:57:55 +02:00
Sam Minnee
28bd939580 FIX: Ignore charset when checking mime types in LeftAndMain ajax responses.
This is partly a fix to #7574, although quite different from the work Ingo did on Content-length.  The text/json mime type occasionally gets a charset suffixed to it by the webserver, which broke everything.

A follow-on fix from this would be to get the PHP code to supply charsets more consistently, so that webservers don't have to make things up.

Additionally, the 2nd interpretation - which treats the response as text/html - should probably only happen if the response is text/html, and throw a more helpful error otherwise.
2012-09-30 16:32:22 +13:00
Ingo Schommer
91e4fde96f ENHANCEMENT "Readonly" behaviour for CMS tabs 2012-09-28 16:37:35 +02:00
Marcus Nyeholt
da70dc469c BUG Fixed possible reference to null string
Hashlink for tabs in the backend didn't check the existence of
the href value before trying to .replace it.
2012-09-26 16:27:50 +10:00
Saophalkun Ponlu
a0462b90cf BUG Fixes an issue where batch actions dropdown doesn't show up after ajax request back to the cms Pages section 2012-09-03 18:47:25 +12:00
Andrew Short
2503e481ff Only initialise chosen elements when visible. 2012-08-16 23:26:33 +02:00
Mateusz Uzdowski
70eaa270e4 API Allow to force URL reload, while replacing the history state
Comes with a wrapper for easy reloading of the current panel.
2012-08-16 22:02:19 +02:00
Ingo Schommer
f79d2df104 BUG More robust url comparison in CMS
Avoid ajax reloads when URLs differ in irrelevant ways,
e.g. admin/?locale=de vs. admin?locale=de.
This caused problems with the translatable module
reloading page content where it didn't need to,
because some previous robustness patches to the same problem
didn't apply (they only removed trailing slashes, ignoring
query parameter strings). The visible problem for this was
a broken tree panel, because it was ajax-loaded in parallel
with its container. Depending on ajax response order,
this would break the inner panel (in this case the tree),
since its original container was replaced with a new DOM.
2012-08-15 21:22:15 +02:00
Ingo Schommer
35ca67535d Merge pull request #667 from jakr/trac7617-followup
Fix edge case in sessionStorage detection for FireFox.
2012-08-10 01:42:58 -07:00
Hamish Friedlander
5591017577 BUG 3156e755 broke GridField Add forms because guessed frag was wrong 2012-07-27 11:13:23 +12:00
jakr
3bc2798e72 Fix edge case in sessionStorage detection for FireFox. If it is disabled using about:config, typeof will be object, but the value will be null. 2012-07-24 12:54:23 +02:00
Ingo Schommer
09067cc8dd NEW Open first tab with validation errors 2012-07-18 16:50:09 +02:00
Ingo Schommer
3156e75548 BUG Redisplay CMS forms with validation errors
Guess the fragment based on the returned HTML.
The validation error HTTP response is generated by Form rather than
the controller (LeftAndMain), so we can't set custom PJAX headers easily.
2012-07-18 16:50:04 +02:00
unclecheese
d571cdcc85 ENHANCEMENT: Hide the search bar in Chosen dropdown fields when list is reasonably short. 2012-07-16 10:10:01 +02:00
Ingo Schommer
bf91594e4f Disable tab state logic on uninit'ed tabs, allow opt-out
Fixes a problem when switching between ajax tabs,
e.g. "Content" and "Settings" in admin/pages/edit/show/<id>.
2012-07-13 17:34:55 +02:00
Ingo Schommer
c493dc730a Avoid lonely question mark for GridField URLs in CMS 2012-07-13 17:33:48 +02:00
Ingo Schommer
155758f546 NEW Save and restore tab state upon CMS navigation (fixes #7647)
Implemented independently of URL state to ensure that
state is retained on every user interaction, rather than
having to add it to each URL specifically.
Same reasons for not saving it as HTML5 history metadata,
as that's only inspected on history events, not
normal CMS navigation.
2012-07-13 16:46:23 +02:00
Ingo Schommer
a5a08530fc BUG Force "full" ajax content reload with invalid fragments
When one or more fragments are requested that are not in
the current DOM, we need to force loading the outermost
fragment instead (currently hardcoded to "Content").
This mainly prevents history back navigation from breaking,
e.g. admin/pages -> admin/pages/list ->
admin/pages/list/?ParentID=99 -> admin/pages/edit/show/5 -> (back)
2012-07-13 10:19:24 +02:00
Ingo Schommer
7a52a7fe41 BUG Default form submits to text/html, fixing validation (#7653)
Was using text/json, which Form->httpSubmission() interprets
(correctly) to returning JSON validation data.
This trips up the interface, which expects HTML with
the validation errors directly in the markup.
2012-07-12 17:10:50 +02:00
Ingo Schommer
fa62c1b0ba Smarter concat of query params in LeftAndMain.js
Broke when CMS URL already had query params,
such as ?locale=en_US with the Translatable module enabled.
With this patch it doesn't double-concat ?locale....
Still doubles query params, but that's acceptable
until we find a more solid URL manipulation lib for JS.
2012-06-29 14:23:01 +02:00
Sean Harvey
c801671a90 BUGFIX #7394: Allow unselect dropdowns in chosen if there's an empty option 2012-06-15 14:32:21 +12:00
Hamish Friedlander
acee026875 BUGFIX: Buttons in the cms that didnt have .ss-ui-button werent becoming buttons because we changed buttons to trigger on onadd, but the ss-ui-button class was being added dynamically 2012-06-15 01:19:31 +02:00
Ingo Schommer
ecb48bb57c BUGFIX Force full window reload on IE7/IE8 every 20 pushState requests (see #7258) 2012-06-15 01:19:20 +02:00