Loading .gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -49,3 +49,4 @@ src/assets/config/config.prod.json src/assets/config/config.theming.json /src/assets/config/theming.scss /.angular /.tmp/ src/app/p_services/admin/lifeCycleManagement/service-rule-design/service-rule-design.component.html +4 −2 Original line number Diff line number Diff line Loading @@ -129,7 +129,9 @@ <category name="Text" colour="160"> <block type="literal_text"></block> <block type="literal_text_multiline"></block> <block type="variable_declare_string"></block> <block type="variable_get_string"></block> <block type="variable_set_string"></block> Loading src/app/p_services/admin/lifeCycleManagement/service-rule-design/service-rule-design.component.ts +8 −1 Original line number Diff line number Diff line Loading @@ -108,6 +108,7 @@ export class ServiceRuleDesignComponent implements OnInit { this.workspace = Blockly.inject('blocklyDiv', { toolbox: document.getElementById('toolbox'), theme: Blockly.Themes.Halloween, trashcan: true, scrollbars: true }); Loading Loading @@ -601,6 +602,12 @@ export class ServiceRuleDesignComponent implements OnInit { // workspace.registerToolboxCategoryCallback( 'SPECCHARVARIABLES_BOOL', this.charvarsBool); // workspace.registerToolboxCategoryCallback( 'SPECCHARVARIABLES_SET', this.charvarsSet); Blockly.Java['literal_text_multiline'] = function(block: { getFieldValue: (arg0: string) => any; }) { // Text value. var code = '"""\n' + block.getFieldValue('TEXT') + '\n"""\n'; return [code, Blockly.Java.ORDER_ATOMIC]; }; Blockly.Java['changecharacteristicvalue'] = function (block: any) { Loading src/app/p_services/admin/lifeCycleManagement/services/blockly-java.service.ts +5 −0 Original line number Diff line number Diff line Loading @@ -2108,6 +2108,11 @@ Blockly.Java['lists_getSublist'] = function(block: { getFieldValue: (arg0: strin Blockly.Java['literal_text'] = function(block: { getFieldValue: (arg0: string) => any; }) { // Text value. var code = Blockly.Java.quote_(block.getFieldValue('TEXT')); Loading src/assets/blockly/custom_blocks.js +38 −1 Original line number Diff line number Diff line Loading @@ -42,8 +42,45 @@ Blockly.defineBlocksWithJsonArray([ } ]); /*************************************************************************** * * Text RELATED * ****************************************************************************/ Blockly.Blocks['literal_text_multiline'] = { /** * Block for text value. * @this Blockly.Block */ init: function() { var bff = new Blockly.FieldMultilineInput(''); bff.maxLines_ = 15; this.appendDummyInput() .appendField(this.newQuote_(true)) .appendField( bff, 'TEXT') .appendField(this.newQuote_(false)); this.setOutput(true, 'String'); this.setColour(180); this.setTooltip("A multi-line text input"); }, /** * Create an image of an open or closed quote. * @param {boolean} open True if open quote, false if closed. * @return {!Blockly.FieldImage} The field image of the quote. * @private */ newQuote_: function(open) { if (open == Blockly.RTL) { var file = 'quote1.png'; } else { var file = 'quote0.png'; } return new Blockly.FieldImage(Blockly.pathToMedia + file, 12, 12, '"'); } }; /*************************************************************************** * Loading Loading
.gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -49,3 +49,4 @@ src/assets/config/config.prod.json src/assets/config/config.theming.json /src/assets/config/theming.scss /.angular /.tmp/
src/app/p_services/admin/lifeCycleManagement/service-rule-design/service-rule-design.component.html +4 −2 Original line number Diff line number Diff line Loading @@ -129,7 +129,9 @@ <category name="Text" colour="160"> <block type="literal_text"></block> <block type="literal_text_multiline"></block> <block type="variable_declare_string"></block> <block type="variable_get_string"></block> <block type="variable_set_string"></block> Loading
src/app/p_services/admin/lifeCycleManagement/service-rule-design/service-rule-design.component.ts +8 −1 Original line number Diff line number Diff line Loading @@ -108,6 +108,7 @@ export class ServiceRuleDesignComponent implements OnInit { this.workspace = Blockly.inject('blocklyDiv', { toolbox: document.getElementById('toolbox'), theme: Blockly.Themes.Halloween, trashcan: true, scrollbars: true }); Loading Loading @@ -601,6 +602,12 @@ export class ServiceRuleDesignComponent implements OnInit { // workspace.registerToolboxCategoryCallback( 'SPECCHARVARIABLES_BOOL', this.charvarsBool); // workspace.registerToolboxCategoryCallback( 'SPECCHARVARIABLES_SET', this.charvarsSet); Blockly.Java['literal_text_multiline'] = function(block: { getFieldValue: (arg0: string) => any; }) { // Text value. var code = '"""\n' + block.getFieldValue('TEXT') + '\n"""\n'; return [code, Blockly.Java.ORDER_ATOMIC]; }; Blockly.Java['changecharacteristicvalue'] = function (block: any) { Loading
src/app/p_services/admin/lifeCycleManagement/services/blockly-java.service.ts +5 −0 Original line number Diff line number Diff line Loading @@ -2108,6 +2108,11 @@ Blockly.Java['lists_getSublist'] = function(block: { getFieldValue: (arg0: strin Blockly.Java['literal_text'] = function(block: { getFieldValue: (arg0: string) => any; }) { // Text value. var code = Blockly.Java.quote_(block.getFieldValue('TEXT')); Loading
src/assets/blockly/custom_blocks.js +38 −1 Original line number Diff line number Diff line Loading @@ -42,8 +42,45 @@ Blockly.defineBlocksWithJsonArray([ } ]); /*************************************************************************** * * Text RELATED * ****************************************************************************/ Blockly.Blocks['literal_text_multiline'] = { /** * Block for text value. * @this Blockly.Block */ init: function() { var bff = new Blockly.FieldMultilineInput(''); bff.maxLines_ = 15; this.appendDummyInput() .appendField(this.newQuote_(true)) .appendField( bff, 'TEXT') .appendField(this.newQuote_(false)); this.setOutput(true, 'String'); this.setColour(180); this.setTooltip("A multi-line text input"); }, /** * Create an image of an open or closed quote. * @param {boolean} open True if open quote, false if closed. * @return {!Blockly.FieldImage} The field image of the quote. * @private */ newQuote_: function(open) { if (open == Blockly.RTL) { var file = 'quote1.png'; } else { var file = 'quote0.png'; } return new Blockly.FieldImage(Blockly.pathToMedia + file, 12, 12, '"'); } }; /*************************************************************************** * Loading