source: ether_statistics/web/resources/js/Wijmo.2.2.2/Wijmo-Complete/development-bundle/samples/knockout/ko_wijrating.html @ 622

Last change on this file since 622 was 622, checked in by vmipsl, 12 years ago

wijmo

File size: 3.7 KB
Line 
1<!doctype html>
2<html lang="en">
3<head>
4    <title>Knockout - Rating</title>
5    <link href="../../themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" />
6    <link href="../../themes/wijmo/jquery.wijmo.wijrating.css" rel="stylesheet" type="text/css" />
7    <script src="../../external/jquery-1.8.0.min.js" type="text/javascript"></script>
8    <script src="../../external/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script>
9    <script src="../../wijmo/jquery.wijmo.wijrating.js" type="text/javascript"></script>
10    <script src="../../../../Wijmo-Open/development-bundle/external/knockout-2.0.0.js"
11        type="text/javascript"></script>
12    <script src="../../../../Wijmo-Open/development-bundle/external/knockout.wijmo.js"
13        type="text/javascript"></script>
14    <script type="text/javascript">
15        //Create ViewModel
16        var viewModel = function () {
17            var self = this;
18            self.val = ko.observable(3);
19            self.min = ko.observable(null);
20            self.max = ko.observable(null);
21            self.disabled = ko.observable(false);
22            self.count = ko.observable(5);
23            self.totalValue = ko.observable(5);
24            self.split = ko.observable(1);
25        };
26
27        //Bind ViewModel
28        $(document).ready(function () {
29            var vm = new viewModel();
30            ko.applyBindings(vm, $(".container").get(0));
31        });
32    </script>
33</head>
34<body class="demo-single">
35    <div class="container">
36        <div class="header">
37            <h2>
38                Rating</h2>
39        </div>
40        <div class="main demo">
41            <!-- Begin demo markup -->
42            <div data-bind="wijrating: { value: val, min: min, max: max, disabled: disabled, count: count, totalValue: totalValue,
43                                split: split }">
44            </div>
45            <!-- End demo markup -->
46            <div class="demo-options">
47                <!-- Begin options markup -->
48                <ul>
49                    <li>
50                        <label>
51                            <span>disabled:</span></label><input type="checkbox" data-bind="checked: disabled" />
52                    </li>
53                    <li>
54                        <label>
55                            <span>value:</span></label><input type="text" data-bind="value: val" />
56                    </li>
57                    <li>
58                        <label>
59                            <span>min:</span></label><input type="text" data-bind="value: min" />
60                    </li>
61                    <li>
62                        <label>
63                            <span>max:</span></label><input type="text" data-bind="value: max" />
64                    </li>
65                    <li>
66                        <label>
67                            <span>count:</span></label><input type="text" data-bind="value: count" />
68                    </li>
69                    <li>
70                        <label>
71                            <span>totalValue:</span></label><input type="text" data-bind="value: totalValue" />
72                    </li>
73                    <li>
74                        <label>
75                            <span>split:</span></label><input type="text" data-bind="value: split" />
76                    </li>
77                </ul>
78                <!-- End options markup -->
79            </div>
80        </div>
81        <div class="footer demo-description">
82            <p>
83                Wijmo provides a Knockout Integration Library so that all jQuery UI and Wijmo widgets
84                can be used with Knockout declarative syntax.
85            </p>
86        </div>
87    </div>
88</body>
89</html>
Note: See TracBrowser for help on using the repository browser.