~smagoun/whoopsie/whoopsie-lp1017637

« back to all changes in this revision

Viewing changes to backend/stats/static/js/yui/tests/button/tests/manual/new-plugin.html

  • Committer: Evan Dandrea
  • Date: 2012-05-09 05:53:45 UTC
  • Revision ID: evan.dandrea@canonical.com-20120509055345-z2j41tmcbf4as5uf
The backend now lives in lp:daisy and the website (errors.ubuntu.com) now lives in lp:errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML>
2
 
<html>
3
 
    <body class='yui3-skin-sam'>
4
 
        <button id="my-button">my button</button>
5
 
 
6
 
        <script type="text/javascript" src="../../../../build/yui/yui.js"></script>
7
 
        <script type="text/javascript">
8
 
        
9
 
        YUI({
10
 
            filter: 'raw'
11
 
        }).use('button-plugin', function(Y) {
12
 
            var ButtonFactory = Y.Plugin.Button.createNode;
13
 
            
14
 
            var button = ButtonFactory('#my-button', {
15
 
                disabled: false
16
 
            });
17
 
            Y.log(button.get('label'));
18
 
            Y.log(button.get('disabled'));
19
 
            button.on('click', function(){
20
 
                button.set('disabled', true);
21
 
                button.set('label', 'disabled');
22
 
                Y.log(button.get('disabled'));
23
 
            });
24
 
            
25
 
            
26
 
            /*-----*/
27
 
            
28
 
            
29
 
            var button2 = ButtonFactory({label: 'foo'});
30
 
            Y.augment(button2, Y.AttributeCore);
31
 
 
32
 
            button2.on('disabledChange', function(e) {
33
 
                
34
 
            });
35
 
 
36
 
            button2.appendTo('body');
37
 
            
38
 
            button2.on('click', function(){
39
 
                Y.log('b');
40
 
            });
41
 
 
42
 
        });
43
 
        </script>
44
 
    </body>
45
 
</html>
 
 
b'\\ No newline at end of file'