From b560d258d36c00939d0de54bb65a2ffdb88efbbb Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Thu, 16 Aug 2012 11:55:44 +1200 Subject: [PATCH] Re-enable Entwine Inspector in CMS & document --- admin/code/LeftAndMain.php | 6 +++--- docs/en/reference/cms-architecture.md | 4 ++++ docs/en/topics/javascript.md | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index 9f45ea6c0..e96b1c665 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -296,9 +296,9 @@ class LeftAndMain extends Controller implements PermissionProvider { ); // TODO Confuses jQuery.ondemand through document.write() - // if (Director::isDev()) { - // Requirements::javascript(THIRDPARTY_DIR . '/jquery-entwine/src/jquery.entwine.inspector.js'); - // } + if (Director::isDev()) { + Requirements::javascript(THIRDPARTY_DIR . '/jquery-entwine/src/jquery.entwine.inspector.js'); + } Requirements::css(FRAMEWORK_ADMIN_DIR . '/thirdparty/jquery-notice/jquery.notice.css'); Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css'); diff --git a/docs/en/reference/cms-architecture.md b/docs/en/reference/cms-architecture.md index b2f29b0e4..c20fdf067 100644 --- a/docs/en/reference/cms-architecture.md +++ b/docs/en/reference/cms-architecture.md @@ -127,6 +127,10 @@ in jQuery.entwine, we're trying to reuse library code wherever possible. The most prominent example of this is the usage of [jQuery UI](http://jqueryui.com) for dialogs and buttons. +The CMS includes the jQuery.entwine inspector. Press Ctrl+` to bring down the inspector. +You can then click on any element in the CMS to see which entwine methods are bound to +any particular element. + ## JavaScript and CSS dependencies via Requirements and Ajax The JavaScript logic powering the CMS is divided into many files, diff --git a/docs/en/topics/javascript.md b/docs/en/topics/javascript.md index 1255a79c9..b5f6a80db 100644 --- a/docs/en/topics/javascript.md +++ b/docs/en/topics/javascript.md @@ -222,6 +222,9 @@ This is a deliberately simple example, the strength of jQuery.entwine over simpl properties, namespacing, as well as its inheritance based on CSS selectors. Please see the [project documentation](http://github.com/hafriedlander/jquery.entwine/tree/master) for more complete examples. +When working in the CMS, the CMS includes the jQuery.entwine inspector. Press Ctrl+` to bring down the inspector. +You can then click on any element in the CMS to see which entwine methods are bound to any particular element. + ## Architecture and Best Practices ### Keep things simple