Merge "Edit notification template addition" into tizen
authorMijin Cho <mijin85.cho@samsung.com>
Fri, 12 May 2017 07:52:20 +0000 (07:52 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Fri, 12 May 2017 07:52:20 +0000 (07:52 +0000)
1  2 
org.tizen.guides/html/web/notification/notification_w.htm

@@@ -207,38 -207,37 +207,37 @@@ tizen.notification.removeAll()
      </ol></li>
    </ol>
  
- <h2 id="templates" name="templates">Managing Notification templates</h2>
+ <h2 id="templates" name="templates">Managing Notification Templates</h2>
  
- <p>Learning how to manage notification templates allows you to save a notification as a template and use it later to faster creation of new notifications based on the same pattern:</p>
+ <p>Learning how to manage notification templates allows you to create a template from an existing notification, and reuse that template later to quickly create other notifications with the same pattern:</p>
+   <ul>
+   <li>To create a template:
    <ol>
-    <li><p>To save a template:</p>
-     <ol type="a">
-      <li>Create a <a href="#create">"SIMPLE"</a> or <a href="#progress">"PROGRESS"</a> notification, which would be used as a template. There is no need to post it.
+    <li>Create a <a href="#create">simple</a> or <a href="#progress">progress</a> notification to be used as a template.
+ <p>You do not need to post the notification to save it as a template.</p>
  <pre class="prettyprint">
- // assume that myNotification is a valid tizen.StatusNotification object
+ /* Assume that myNotification is a valid tizen.StatusNotification object */
  var myNotification;
  </pre></li>
-      <li><p>To save the template, use <code>saveNotificationAsTemplate()</code> method of the <code>NotificationManager</code> interface (in <a href="../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html#NotificationManager::saveNotificationAsTemplate">mobile</a> and <a href="../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/notification.html#NotificationManager::saveNotificationAsTemplate">wearable</a> applications):</p>
+      <li>Save the template with the <code>saveNotificationAsTemplate()</code> method of the <code>NotificationManager</code> interface (in <a href="../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html#NotificationManager">mobile</a> and <a href="../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/notification.html#NotificationManager">wearable</a> applications):
  <pre class="prettyprint">
  try {
 -&nbsp;&nbsp;&nbsp;var templateName = &quot;importantNoti&quot;;
 -&nbsp;&nbsp;&nbsp;tizen.notification.saveNotificationAsTemplate(templateName, myNotification);
 +   var templateName = "importantNoti";
 +   tizen.notification.saveNotificationAsTemplate(templateName, myNotification);
  } catch(e) {
 -&nbsp;&nbsp;&nbsp;console.log(&quot;Error &quot; + e.message + &quot; occured&quot;);
 +   console.log("Error " + e.message + " occured");
  }
- </pre></li>
    </ol></li>
-    <li><p>To use the template for creation of new pre-set notification, use the <code>createNotificationFromTemplate()</code> method of the <code>NotificationManager</code> interface (in <a href="../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html#NotificationManager::createNotificationFromTemplate">mobile</a> and <a href="../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/notification.html#NotificationManager::createNotificationFromTemplate">wearable</a> applications):</p>
+ </pre></li></ol>
+ </li>
+ <li>To use the template when creating a new notification, use the <code>createNotificationFromTemplate()</code> method of the <code>NotificationManager</code> interface:
  <pre class="prettyprint">
  try {
 -&nbsp;&nbsp;&nbsp;var newTemplateNotification = tizen.notification.createNotificationFromTemplate(templateName);
 -&nbsp;&nbsp;&nbsp;console.log(&quot;Content of new notification: &quot; + content);
 +   var newTemplateNotification = tizen.notification.createNotificationFromTemplate(templateName);
 +   console.log("Content of new notification: " + content);
  } catch (e) {
 -&nbsp;&nbsp;&nbsp;console.log(&quot;Error &quot; + e.message + &quot; occured&quot;);
 +   console.log("Error " + e.message + " occured");
  }
- </pre></li>
-     </ol></li>
-   </ol>
+ </pre></li></ul>
  
  <script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>
  <script type="text/javascript" src="../../scripts/showhide.js"></script>