[Kimchi-devel] [PATCH] UI: Sample of dialog widget

Wen Wang wenwang at linux.vnet.ibm.com
Fri Jan 30 08:30:15 UTC 2015


Signed-off-by: Wen Wang <wenwang at linux.vnet.ibm.com>
---
 ui/js/widgets/samples/dialog-sample.html | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 ui/js/widgets/samples/dialog-sample.html

diff --git a/ui/js/widgets/samples/dialog-sample.html b/ui/js/widgets/samples/dialog-sample.html
new file mode 100644
index 0000000..65b77fb
--- /dev/null
+++ b/ui/js/widgets/samples/dialog-sample.html
@@ -0,0 +1,32 @@
+<!--Sample code of dialog-->
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="UTF-8">
+        <title>Dialog Demo</title>
+        <script src="../../../libs/jquery-1.10.0.min.js"></script>
+        <script src="../../../libs/jquery-ui.min.js"></script>
+        <script src="../dialog-flat.js"></script>
+        <link rel="stylesheet" href="../../../libs/themes/base/jquery-ui.min.css">
+        <link rel="stylesheet" href="../../../css/theme-default/dialog-flat.css">
+        <link rel="stylesheet" href="../../../css/fontello/css/animation.css">
+        <link rel="stylesheet" href="../../../css/fontello/css/fontello.css">
+    </head>
+    <body>
+        <div class="dialog-demo"></div>
+        <script>
+            $(document).ready(function() {
+                $(".dialog-demo").dialogFlat({
+                    title: "Demo",  //Title of the dialog.
+                    confirmText: "Ok",  //Text of the confirm button, "Ok" is the default value.
+                    cancelText: "Cancel",  //Text of the cancel button.
+                    width: "600",  //Width of the dialog, "px" is the default unit.
+                    height: "500",  //Height of the dialog, "px" is the default unit.
+                    confirmFunc: function() {
+                       alert("success");//Function after confirm
+                    }
+                });
+            });
+        </script>
+    </body>
+</html>
\ No newline at end of file
-- 
2.1.0




More information about the Kimchi-devel mailing list