@@ -30,7 +30,7 @@ export class CustomisePages extends FormApplication {
30
30
tabs . push ( { navSelector : `.${ page } -tabs` , contentSelector : `.${ page } -body` , initial : "tabs" } ) ;
31
31
}
32
32
33
- return mergeObject ( super . defaultOptions , {
33
+ return foundry . utils . mergeObject ( super . defaultOptions , {
34
34
id : "customise-pages" ,
35
35
classes : [ "form" ] ,
36
36
title : "Customise Pages" ,
@@ -48,7 +48,7 @@ export class CustomisePages extends FormApplication {
48
48
for ( let page of CustomisePages . typeList ) {
49
49
let template = `modules/monks-enhanced-journal/templates/customise/${ page } .html` ;
50
50
load_templates [ page ] = template ;
51
- delete _templateCache [ template ] ;
51
+ delete Handlebars . partials [ template ] ;
52
52
}
53
53
await loadTemplates ( load_templates ) ;
54
54
const html = await super . _renderInner ( ...args ) ;
@@ -58,7 +58,7 @@ export class CustomisePages extends FormApplication {
58
58
getData ( options ) {
59
59
let data = super . getData ( options ) ;
60
60
data . generalEdit = true ;
61
- data . sheetSettings = duplicate ( this . sheetSettings ) ;
61
+ data . sheetSettings = foundry . utils . duplicate ( this . sheetSettings ) ;
62
62
63
63
for ( let page of CustomisePages . typeList ) {
64
64
data . sheetSettings [ page ] = MonksEnhancedJournal . convertObjectToArray ( data . sheetSettings [ page ] ) ;
@@ -84,7 +84,7 @@ export class CustomisePages extends FormApplication {
84
84
85
85
addAttribute ( event ) {
86
86
let attribute = event . currentTarget . dataset . attribute ;
87
- let attributes = getProperty ( this , attribute ) ;
87
+ let attributes = foundry . utils . getProperty ( this , attribute ) ;
88
88
89
89
if ( ! attributes ) return ;
90
90
@@ -94,16 +94,16 @@ export class CustomisePages extends FormApplication {
94
94
maxOrder = Math . max ( maxOrder , attr . order ) ;
95
95
}
96
96
97
- attributes [ randomID ( ) ] = { id : randomID ( ) , name : "" , shown : true , full : false , order : maxOrder + 1 } ;
97
+ attributes [ foundry . utils . randomID ( ) ] = { id : foundry . utils . randomID ( ) , name : "" , shown : true , full : false , order : maxOrder + 1 } ;
98
98
99
99
this . render ( true ) ;
100
100
}
101
101
102
102
changeData ( event ) {
103
103
let prop = $ ( event . currentTarget ) . attr ( "name" ) ;
104
- if ( hasProperty ( this , prop ) ) {
104
+ if ( foundry . utils . hasProperty ( this , prop ) ) {
105
105
let val = $ ( event . currentTarget ) . attr ( "type" ) == "checkbox" ? $ ( event . currentTarget ) . prop ( 'checked' ) : $ ( event . currentTarget ) . val ( ) ;
106
- setProperty ( this , prop , val ) ;
106
+ foundry . utils . setProperty ( this , prop , val ) ;
107
107
}
108
108
}
109
109
@@ -158,10 +158,10 @@ export class CustomisePages extends FormApplication {
158
158
if ( data . id === target . dataset . id ) return ; // Don't drop on yourself
159
159
160
160
let property = event . target . dataset . attribute ;
161
- let attributes = getProperty ( this , property ) ;
161
+ let attributes = foundry . utils . getProperty ( this , property ) ;
162
162
163
- let from = ( getProperty ( this , data . id ) || { } ) . order ?? 0 ;
164
- let to = ( getProperty ( this , target . dataset . id ) || { } ) . order ?? 0 ;
163
+ let from = ( foundry . utils . getProperty ( this , data . id ) || { } ) . order ?? 0 ;
164
+ let to = ( foundry . utils . getProperty ( this , target . dataset . id ) || { } ) . order ?? 0 ;
165
165
log ( 'from' , from , 'to' , to ) ;
166
166
167
167
if ( from < to ) {
@@ -179,7 +179,7 @@ export class CustomisePages extends FormApplication {
179
179
}
180
180
$ ( '.item-list .item[data-id="' + data . id + '"]' , this . element ) . insertBefore ( target ) ;
181
181
}
182
- ( getProperty ( this , data . id ) || { } ) . order = to ;
182
+ ( foundry . utils . getProperty ( this , data . id ) || { } ) . order = to ;
183
183
}
184
184
}
185
185
0 commit comments