[Jifty-commit] r2752 - in jifty/branches/virtual-models: . lib/Jifty/Manual lib/Jifty/Script share/web/static/js

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Mon Feb 5 19:14:16 EST 2007


Author: audreyt
Date: Mon Feb  5 19:14:15 2007
New Revision: 2752

Modified:
   jifty/branches/virtual-models/   (props changed)
   jifty/branches/virtual-models/lib/Jifty.pm
   jifty/branches/virtual-models/lib/Jifty/Manual/PageRegions.pod
   jifty/branches/virtual-models/lib/Jifty/Script/Schema.pm
   jifty/branches/virtual-models/share/web/static/js/jifty_utils.js

Log:
 r26969 at 122-126-32-5 (orig r2697):  audreyt | 2007-01-29 00:08:00 +0800
 * strict, warnings, and redefinition warning avoidance for J::Module::Pluggable.
 r26972 at 122-126-32-5 (orig r2700):  trs | 2007-01-29 11:17:23 +0800
  r19265 at zot:  tom | 2007-01-28 22:17:12 -0500
  Squash warning
 
 r26998 at 122-126-32-5 (orig r2726):  audreyt | 2007-01-29 22:52:08 +0800
 * Jifty.pm - Instead of randol popping @ISA (which works only if
   Class::Accessor::Fast is somehow in the inheritance chain leading
   up to WithFilter.pm), do an explicit pop.
 r27009 at 122-126-32-5 (orig r2737):  hlb | 2007-01-31 05:37:18 +0800
 * fix JScript conditional compilation bug. Jifty.Utils.isMSIE works now.
 
 r27019 at 122-126-32-5 (orig r2747):  ruz | 2007-02-01 07:54:11 +0800
 * add an example with regions
 r27319 at 122-126-32-5 (orig r2750):  bartb | 2007-02-04 06:27:45 +0800
 update docs about SchemaCheck


Modified: jifty/branches/virtual-models/lib/Jifty.pm
==============================================================================

Modified: jifty/branches/virtual-models/lib/Jifty/Manual/PageRegions.pod
==============================================================================
--- jifty/branches/virtual-models/lib/Jifty/Manual/PageRegions.pod	(original)
+++ jifty/branches/virtual-models/lib/Jifty/Manual/PageRegions.pod	Mon Feb  5 19:14:15 2007
@@ -168,4 +168,69 @@
 which were mapped by the request mapper.  Finally, it displays
 any messages and errors from actions.
 
+=head2 EXAMPLES
+
+=head3 Hidden information that shows after click on a link
+
+It's ofetn required to hide some extra information, a list of objects
+or something else under a link. User clicks on the link and the
+information you're hiding shows up instead of the link. Regions could
+help you to do this task very easy.
+
+First of all you'll need a region's component F<templates/additional_info>:
+
+    <%args>
+    $collapsed => 1
+    ... some other arguments required to show correct info ...
+    </%args>
+    % if ( $collapsed ) {
+    <% Jifty->web->link(
+        label   => _('text of the link'),
+        onclick => {
+            refresh_self => 1,
+            args         => { %ARGS, collapsed => 0 },
+        },
+    ) %>
+    % } else {
+    .... here we show our additional info ...
+    % }
+
+In this component we have one argument C<$collapsed> that controls either
+we show link or information. By default we prefer hidden state and in this
+case we show only the link with an C<onclick> action that refreshes the
+current region, however value of the argument is overriden.
+
+You can add any arguments you want to this component that may be required
+to show the additional information, for example an id of some object, but
+you should remeber to use this arguments during links generation.
+
+Next thing you should do is to add a region to some page:
+
+    ... and region:
+    <% Jifty->web->region(
+        name => 'block_name',
+        path => '/additional_info',
+        defaults => { ... some args required to show the info ... },
+    ) %>
+    ... other information on the page
+
+That's all. Things should just work.
+
+Smarty ones should mention that the link disappears after click, but may
+be you want show/hide functionality. This is very easy task when we know how
+to use links generation. In the component's else branch add:
+
+    % } else {
+    <% Jifty->web->link(
+        label   => _('text of the link that hides'),
+        onclick => {
+            refresh_self => 1,
+            args         => { %ARGS, collapsed => 1 },
+        },
+    ) %>
+    .... here we show our additional info ...
+    % }
+
+Wow! Works again. Enjoy.
+
 =cut

Modified: jifty/branches/virtual-models/lib/Jifty/Script/Schema.pm
==============================================================================
--- jifty/branches/virtual-models/lib/Jifty/Script/Schema.pm	(original)
+++ jifty/branches/virtual-models/lib/Jifty/Script/Schema.pm	Mon Feb  5 19:14:15 2007
@@ -549,6 +549,7 @@
    --setup            Upgrade or install the database, creating it if need be
    --create-database  Only creates the database
    --drop-database    Drops the database
+   --ignore-reserved-words   Ignore any SQL reserved words in schema definition
 
    --help             brief help message
    --man              full documentation
@@ -582,6 +583,11 @@
 assumed if the database does not exist, or the database version is not
 the same as the application's version.
 
+=item B<--ignore-reserved-words>
+
+Ignore any SQL reserved words used in table or column deffinitions, if
+this option is not used and a reserved word is found it will cause an error.
+
 =item B<--help>
 
 Print a brief help message and exits.
@@ -605,6 +611,13 @@
 I<ProjectRoot>C</etc/config.yml>, because the SQL generated may depend
 on the database type.)
 
+By default checks for SQL reserved words in your table names and
+column definitions, throwing an error if any are found.  
+
+If you want to permanently turn this behaviour off you can set
+CheckSchema to 0 in the database section of your applications config
+file.
+
 =head1 BUGS
 
 Due to limitations of L<DBIx::DBSchema>, this probably only works with

Modified: jifty/branches/virtual-models/share/web/static/js/jifty_utils.js
==============================================================================
--- jifty/branches/virtual-models/share/web/static/js/jifty_utils.js	(original)
+++ jifty/branches/virtual-models/share/web/static/js/jifty_utils.js	Mon Feb  5 19:14:15 2007
@@ -141,7 +141,7 @@
 };
 
 /* This sets Jifty.Utils.isMSIE to true in IE */
-/*@cc_on
+/* @cc_on
     Jifty.Utils.isMSIE = true;
 @*/
 


More information about the Jifty-commit mailing list