44
55< head >
66 < title > jQuery UI Month Picker tests</ title >
7- <!--flick smoothness-->
87 < link rel ="stylesheet " type ="text/css " href ="../bower_components/jquery-ui/themes/smoothness/jquery-ui.css ">
9-
10- < link rel ="stylesheet " type ="text/css " href ="../bower_components/jquery-ui/
11- themes/smoothness/jquery.ui.theme.css ">
12- < link rel ="stylesheet " type ="text/css " href ="../css/MonthPicker.css " />
8+
9+ < link rel ="stylesheet " type ="text/css " href ="../bower_components/jquery-ui/themes/smoothness/jquery.ui.theme.css ">
10+ < link rel ="stylesheet " type ="text/css " href ="../src/MonthPicker.css " />
1311 < link rel ="stylesheet " type ="text/css " href ="test.css " />
1412 < link rel ="stylesheet " href ="../bower_components/qunit/qunit/qunit.css " />
1513
2018 < script src ="../bower_components/qunit/qunit/qunit.js "> </ script >
2119 < script >
2220 if ( typeof $ === 'undefined' || ! $ . ui || typeof QUnit === 'undefnied' ) {
23- var message =
24- "Welcome to the jQuery UI Month Picker project.\n" +
25- "\n" +
21+ var message =
22+ "Welcome to the jQuery UI Month Picker project.\n" +
23+ "\n" +
2624 "jQuery UI and QUnit are required for testing.\n" +
27- "Please download node.js, 'cd ./jquery-ui-month-picker' and run 'npm install'.\n" +
28- "\n" +
25+ "Please download node.js, 'cd ./jquery-ui-month-picker' and run 'npm install'.\n" +
26+ "\n" +
2927 "Tests can be ran from the command line using the 'grunt test' command." ;
30-
28+
3129 if ( alert ) {
3230 alert ( message ) ;
3331 }
34-
32+
3533 throw message ;
3634 }
3735 </ script >
38- < script src ="jquery.maskedinput.min.js "> </ script >
39- < script src ="../MonthPicker.js "> </ script >
36+ < script src ="../bower_components/jquery.maskedinput/dist/ jquery.maskedinput.min.js "> </ script >
37+ < script src ="../src/ MonthPicker.js "> </ script >
4038 < script >
4139 // TODO: Refactor!
4240 $ ( function ( ) {
4341 // output of: ls | tr '\n' ' ' > themes.txt
4442 var themes = 'black-tie blitzer cupertino dark-hive dot-luv eggplant excite-bike flick hot-sneaks humanity le-frog mint-choc overcast pepper-grinder redmond smoothness south-street start sunny swanky-purse trontastic ui-darkness ui-lightness vader' . split ( " " ) ;
45-
43+
4644 var sel = $ ( "select" ) . change ( function ( ) {
4745 var selVal = $ ( this ) . val ( ) ;
4846 var replaceWith = 'themes/' + selVal + '/' ;
5149 $ ( this ) . attr ( "href" , href . replace ( / t h e m e s \/ .+ \/ / , replaceWith ) ) ;
5250 } ) ;
5351 } ) ;
54-
52+
5553 $ . each ( themes , function ( i , theme ) {
5654 sel . append ( $ ( "<option>" + theme + "</option>" ) . prop ( 'selected' , theme == 'smoothness' ) ) ;
5755 } ) ;
58-
56+
5957 var invert = false ;
6058 $ ( invertCb ) . click ( function ( ) {
6159 $ ( document . body ) . css ( 'background-color' , ( invert = ! invert ) ? '#555' :'#fff' ) ;
6260 } ) ;
63-
61+
6462 $ ( "div, #field" ) . MonthPicker ( ) ;
6563 } ) ;
6664 </ script >
7573 Example: < br > < input id ='field '> </ input >
7674</ body >
7775
78- </ html >
76+ </ html >
0 commit comments