浏览代码

Updated example

Dante 12 年之前
父节点
当前提交
d3dec0d457
共有 1 个文件被更改,包括 21 次插入1 次删除
  1. 21 1
      examples/index.html

+ 21 - 1
examples/index.html

@@ -173,7 +173,8 @@
     <h3>Button Hotkey</h3>
     <p>
         Try to press the keys that have been associated with buttons below. <br /> 
-        Please note that the <strong>last button</strong> is disabled so nothing is going to happen when pressing its hotkey.
+        The <strong>last button</strong> is disabled so nothing is going to happen when pressing its hotkey. <br />
+        Please note that if there are some components that require keyboard operations in your dialog, conflicts may occur, you can try next example.
     </p>
     <div class="source-code runnable">
         <!--
@@ -206,6 +207,25 @@
         });
         -->
     </div>
+    
+    <h3>Keys Conflicts</h3>
+    <p>Try to avoid doing similar in your code.</p>
+    <div class="source-code runnable">
+        <!--
+        BootstrapDialog.show({
+            title: 'Button Hotkey',
+            message: $('<textarea class="form-control" placeholder="Try to input multiple lines here..."></textarea>'),
+            buttons: [{
+                label: '(Enter) Button A',
+                cssClass: 'btn-primary',
+                hotkey: 13, // Enter.
+                action: function() {
+                    alert('You pressed Enter.');
+                }
+            }]
+        });
+        -->
+    </div>
 
     <h3>Creating dialog instances</h3>
     <p>BootstrapDialog.show(...) is just a shortcut method, if you need dialog instances, use 'new'.</p>