File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,12 @@ $.widget( "spf.slideshow", {
11
11
that . refresh ( ) ;
12
12
} ) ;
13
13
14
- this . element . delegate ( "button" , "click" , function ( ) {
14
+ this . buttons = $ ( kite ( "#controls-tmpl" ) ( ) ) . insertBefore ( this . element ) . delegate ( "button" , "click" , function ( ) {
15
15
var method = $ ( this ) . data ( "page" ) ;
16
16
var source = that . options . source ;
17
17
source [ method ] ( ) ;
18
18
source . refresh ( ) ;
19
- } ) ;
19
+ } ) . buttonset ( ) . find ( "button" ) ;
20
20
21
21
this . options . source . refresh ( ) ;
22
22
} ,
@@ -31,15 +31,14 @@ $.widget( "spf.slideshow", {
31
31
this . element . empty ( ) ;
32
32
this . element . html ( photosHtml . join ( "" ) ) ;
33
33
34
- var buttons = this . element . prepend ( kite ( "#controls-tmpl" ) ) . find ( ".controls" ) . buttonset ( ) . find ( "button" ) ;
35
- buttons . button ( "enable" ) ;
34
+ this . buttons . button ( "enable" ) ;
36
35
37
36
var source = this . options . source ;
38
37
if ( ! source . _skip ) {
39
- buttons . slice ( 0 , 2 ) . button ( "disable" )
38
+ this . buttons . slice ( 0 , 2 ) . button ( "disable" )
40
39
}
41
40
if ( source . _skip + source . _take >= source . totalCount ) {
42
- buttons . slice ( 2 , 4 ) . button ( "disable" )
41
+ this . buttons . slice ( 2 , 4 ) . button ( "disable" )
43
42
}
44
43
}
45
44
} ) ;
You can’t perform that action at this time.
0 commit comments