Kaynağa Gözat

[document]merge from trunk to 1.12 branch

git-svn-id: http://framework.zend.com/svn/framework/standard/branches/release-1.12@24999 44c647ce-9c0f-0410-b52a-842ac1e357ba
yoshida@zend.co.jp 13 yıl önce
ebeveyn
işleme
9103cc4648

+ 8 - 8
documentation/manual/ja/module_specs/Zend_Application-AvailableResources-Frontcontroller.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<!-- EN-Revision: 24798 -->
+<!-- EN-Revision: 24997 -->
 <sect2 id="zend.application.available-resources.frontcontroller">
     <title>Zend_Application_Resource_Frontcontroller(日本語)</title>
 
@@ -110,15 +110,15 @@
                 and <property>params</property>, an array of parameters to pass to the dispatcher constructor.
             </para>
             
-            <example id="zend.application.available-resources.frontcontroller.configExample">
+            <example id="zend.application.available-resources.frontcontroller.configExample.1">
                 <title>ディスパッチャーを上書き</title>
 
                 <programlisting language="ini"><![CDATA[
-        [production]
-        resources.frontController.dispatcher.class = "My_Custom_Dispatcher"
-        resources.frontController.dispatcher.params.foo = "bar"
-        resources.frontController.dispatcher.params.baz = "grok"
-        ]]></programlisting>
+[production]
+resources.frontController.dispatcher.class = "My_Custom_Dispatcher"
+resources.frontController.dispatcher.params.foo = "bar"
+resources.frontController.dispatcher.params.baz = "grok"
+]]></programlisting>
             </example>
 
         </listitem>
@@ -131,7 +131,7 @@
         フロントコントローラ・パラメータとして登録されます。
     </para>
 
-    <example id="zend.application.available-resources.frontcontroller.configExample">
+    <example id="zend.application.available-resources.frontcontroller.configExample.2">
         <title>フロントコントローラ・リソース構成サンプル</title>
 
         <para>

+ 12 - 12
documentation/manual/ja/module_specs/Zend_Controller-Response.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<!-- EN-Revision: 24822 -->
+<!-- EN-Revision: 24997 -->
 <sect1 id="zend.controller.response">
     <title>レスポンスオブジェクト</title>
 
@@ -247,7 +247,7 @@ $front->dispatch();
                 <classname>Zend_Http_Header_SetCookie</classname>
             </para>
 
-            <sect3 id="zend.controller.response.headers.setcookie.constructor">
+            <sect4 id="zend.controller.response.headers.setcookie.constructor">
                 <title>コンストラクタの引数</title>
 
                 <para>
@@ -310,20 +310,19 @@ $front->dispatch();
                         </para>
                     </listitem>
                 </itemizedlist>
-            </sect3>
- 
-            <example>
-                <title>Populate Zend_Http_Header_SetCookie via constructor and add to response</title>
-                <programlisting language="php"><![CDATA[
+
+                <example>
+                    <title>Populate Zend_Http_Header_SetCookie via constructor and add to response</title>
+                    <programlisting language="php"><![CDATA[
 $this->getResponse()->setRawHeader(new Zend_Http_Header_SetCookie(
     'foo', 'bar', NULL, '/', 'example.com', false, true
 ));
 ]]></programlisting>
-            </example>
+                </example>
 
-            <example>
-                <title>Populate Zend_Http_Header_SetCookie via setters and add to response</title>
-                <programlisting language="php"><![CDATA[
+                <example>
+                    <title>Populate Zend_Http_Header_SetCookie via setters and add to response</title>
+                    <programlisting language="php"><![CDATA[
 $cookie = new Zend_Http_Header_SetCookie();
 $cookie->setName('foo')
        ->setValue('bar')
@@ -332,7 +331,8 @@ $cookie->setName('foo')
        ->setHttponly(true);
 $this->getResponse()->setRawHeader($cookie);
 ]]></programlisting>
-            </example>
+                </example>
+            </sect4>
 
         </sect3>
 

+ 30 - 2
documentation/manual/ja/module_specs/Zend_View-Helpers-HeadScript.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<!-- EN-Revision: 24249 -->
+<!-- EN-Revision: 24997 -->
 <sect3 id="zend.view.helpers.initial.headscript">
     <title>HeadScript ヘルパー</title>
     <!-- Skip-EN-Revisions: 19437 -->
@@ -68,8 +68,36 @@ $this->headScript()->appendFile(
         </example>
     </note>
 
+    <!-- TODO : to be translated -->
+    <note>
+        <title>Preventing HTML style comments or CDATA wrapping of scripts</title>
+
+        <para>
+            By default <classname>HeadScript</classname> will wrap scripts with HTML
+            comments or it wraps scripts with XHTML cdata. This behavior can be
+            problematic when you intend to use the script tag in an alternative way by
+            setting the type to something other then 'text/javascript'. To prevent such
+            escaping, pass an <varname>noescape</varname> with a value of true as part of
+            the <varname>$attrs</varname> parameter in the method calls.
+        </para>
+
+        <example id="zend.view.helpers.initial.headscript.noescape">
+            <title>headScript で jQuery テンプレートを作成 </title>
+
+            <programlisting language="php"><![CDATA[
+// jquery テンプレート
+$template = '<div class="book">{{:title}}</div>';
+$this->headScript()->appendScript(
+    $template,
+    'text/x-jquery-tmpl',
+    array('id='tmpl-book', 'noescape' => true)
+);
+]]></programlisting>
+        </example>
+    </note>
+
     <para>
-        <code>HeadScript</code> はスクリプトのキャプチャも行います。
+        <classname>HeadScript</classname> はスクリプトのキャプチャも行います。
         これは、クライアント側スクリプトをプログラム上で作成してから
         どこか別の場所で使いたい場合に便利です。
         使用法は、以下の例で示します。