File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 9090 html += "</div>" ;
9191 document . getElementById ( "ownnote" ) . innerHTML = html ;
9292 tinymceInit ( ) ;
93- buildNav ( g ) ;
94- listingtype = g ;
95- buildGroupSelectOptions ( ) ;
93+ buildGroupSelectOptions ( g ) ;
9694 bindEdit ( ) ;
9795 }
9896
166164 $ . get ( url , function ( data ) {
167165 filelist = data ;
168166 listing = jQuery . parseJSON ( filelist ) ;
169- buildNav ( 'All' ) ;
170- listingtype = "All" ;
167+ buildNav ( listingtype ) ;
171168 buildListing ( ) ;
172169 if ( switchgroup != "" ) {
173170 $ ( "[id='link-" + switchgroup + "']" ) . click ( ) ;
276273 }
277274 document . getElementById ( "ownnote" ) . innerHTML = html ;
278275 $ ( '#newfilename' ) . css ( 'color' , '#A0A0A0' ) ;
279- buildGroupSelectOptions ( ) ;
276+ buildGroupSelectOptions ( listingtype ) ;
280277 bindListing ( ) ;
281278 }
282279
283- function buildGroupSelectOptions ( ) {
280+ function buildGroupSelectOptions ( current ) {
284281 var $select = $ ( 'select#groupname' ) ;
285282 $select . append ( $ ( '<option value="">Not grouped</option>' ) ) ;
286283 $select . append ( $ ( '<option>' ) . attr ( 'value' , '_new' ) . text ( 'New group' ) ) ;
287284 $ ( groups ) . each ( function ( i , group ) {
288285 var option = $ ( '<option>' ) . attr ( 'value' , group ) . text ( group ) ;
289- if ( group == listingtype ) {
286+ if ( group == current ) {
290287 option . attr ( 'selected' , 'selected' ) ;
291288 }
292289 $select . append ( option ) ;
403400
404401 var groups = new Array ( ) ;
405402 var counts = new Array ( ) ;
403+
406404 function buildNav ( a ) {
407405 groups . length = 0 ;
408406 counts . length = 0 ;
You can’t perform that action at this time.
0 commit comments