Author: gotcha
Date: Sat Sep 15 00:41:14 2007
New Revision: 46604
Modified:
kukit/kss.core/trunk/kss/core/pluginregistry/browser/develui.pt
Log:
remove use of KSS, add a back link based on referrer to allow to quickly go
back to page after having toggled mode
Modified: kukit/kss.core/trunk/kss/core/pluginregistry/browser/develui.pt
==============================================================================
--- kukit/kss.core/trunk/kss/core/pluginregistry/browser/develui.pt
(original)
+++ kukit/kss.core/trunk/kss/core/pluginregistry/browser/develui.pt Sat Sep
15 00:41:14 2007
@@ -11,8 +11,9 @@
<link rel="stylesheet" type="text/css"
tal:attributes="href
string:${context/@@absolute_url}/@@kss_devel_mode/ui_css"/>
- <link rel="kinetic-stylesheet" type="text/kss"
- tal:attributes="href
string:${context/@@absolute_url}/@@kss_devel_mode/ui_kss"/>
+ <!-- We do not use kss in this page -->
+ <!--link rel="kinetic-stylesheet" type="text/kss"
+ tal:attributes="href
string:${context/@@absolute_url}/@@kss_devel_mode/ui_kss"/-->
<script type="text/javascript"
tal:attributes="src
string:${context/@@absolute_url}/++resource++sarissa.js;"
@@ -36,7 +37,8 @@
src="++resource++MochiKit.js">
</script>
- <script tal:define="kss_devel_mode nocall:context/@@kss_devel_mode |
nothing"
+ <!-- We do not use kss in this page -->
+ <!-- script tal:define="kss_devel_mode nocall:context/@@kss_devel_mode |
nothing"
tal:condition="python: not kss_devel_mode or
kss_devel_mode.isoff()" type="text/javascript"
tal:attributes="src
string:${context/@@absolute_url}/++resource++kukit.js;">
</script>
@@ -44,49 +46,54 @@
<script tal:define="kss_devel_mode nocall:context/@@kss_devel_mode |
nothing"
tal:condition="python: kss_devel_mode and kss_devel_mode.ison()"
type="text/javascript"
tal:attributes="src
string:${context/@@absolute_url}/++resource++kukit-devel.js;">
- </script>
+ </script-->
<script type="text/javascript"
tal:attributes="src
string:${context/@@absolute_url}/@@kss_devel_mode/ui_js">
</script>
</head>
- <body>
+ <body tal:define="devel_mode python: view.ison();
+ referer request/referer|request/HTTP_REFERER|nothing">
- <h2>Kss development mode browser setup</h2>
- <form name="edit">
+ <h2>Kss mode setup</h2>
+
<p>
- Different browser side parameters can be set up.
- </p>
-
- <h3>
- <code>@@kss_devel_mode/ison on the current context</code>
- </h3>
+ Current KSS mode is<b>
+ <span class="green"
+ tal:condition="devel_mode">development</span><span
+ class="red" tal:condition="not: devel_mode">production</span></b>.
+ </p>
- <p tal:define="devel_mode python: view.ison()">
- Kss development mode is<b>
- <span class="green" tal:condition="devel_mode">on</span>
- <span class="red" tal:condition="not: devel_mode">off</span>
- </b>
+ <p>
+ If you call <code>@@kss_devel_mode/ison</code> on the current context,
+ you get <code>True</code> if in development mode, <code>False</code>
in in production mode.
</p>
<h3>
- <code>Set kss development mode cookie</code>
+ Set KSS mode cookie
</h3>
- <p>The cookie is global to the site and may be overridden by a
- local utility (eg. ResourceRegistries, in Plone)</p>
+ <form name="edit">
<div class="help">
- Click the button here.
+ Click the button to toggle mode.
</div>
<div>
+ <input type="hidden" name="referer"
+ tal:attributes="value referer" />
<input type="submit" name="prod" id="button_prod" class="clickable"
- value="Production" />
+ tal:condition="devel_mode"
+ value="Switch to production mode." />
<input type="submit" name="devel" id="button_devel" class="clickable"
- value="Development" />
+ tal:condition="not:devel_mode"
+ value="Switch to development mode." />
</div>
+ <p class="help">The cookie is global to the site and may be overridden by a
+ local utility (eg. ResourceRegistries, in Plone)</p>
</form>
+ <p><a tal:attributes="href referer">Back</a></p>
+
</body>
</html>
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins