cockpit/themes/extended/theme.js in cpee-2.1.38 vs cockpit/themes/extended/theme.js in cpee-2.1.39
- old
+ new
@@ -1209,10 +1209,34 @@
'closeblock': false,
'balance': true,
'expansion': function(node) {
return 'vertical';
},
+ 'resolve_symbol': function(node) {
+ let plist = []
+ let dirty = false
+ $('*:not(:has(*))',node).each(function(i,n) {
+ let lines = n.textContent.split(/(\r\n)|\n|;/)
+ for (const l of lines) {
+ if (l != null) {
+ let m0 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*=/)
+ if (m0 != null) {
+ plist.push(m0[1])
+ }
+ let m1 = l.match(/=[^=].*data\.([a-z0-9A-Z_]+)/)
+ let m2 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*$/)
+ if (m1 != null && !plist.includes(m1[1])) {
+ dirty = true
+ }
+ if (m2 != null && !plist.includes(m2[1])) {
+ dirty = true
+ }
+ }
+ }
+ })
+ if (dirty) { return 'start_event'; }
+ },
'closing_symbol': 'end',
'col_shift': function(node) {
return true;
},
'svg': self.adaptor.theme_dir + 'symbols/start.svg'
@@ -1282,9 +1306,15 @@
}; /*}}}*/
// Abstract Elements
// * they may only have an illustrator (or other parts)
// * they HAVE TO have a parent
+ this.elements.start_event = { /*{{{*/
+ 'parent': 'start',
+ 'illustrator': {//{{{
+ 'svg': self.adaptor.theme_dir + 'symbols/start_event.svg'
+ }//}}}
+ }; /*}}}*/
this.elements.call_sensor = { /*{{{*/
'parent': 'call',
'illustrator': {//{{{
'svg': self.adaptor.theme_dir + 'symbols/call_sensor.svg'
}//}}}