Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branch/blockly clear xml #498

Merged
merged 2 commits into from
May 18, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions support/client/lib/vwf/model/blockly.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,12 @@ define( [ "module", "vwf/model", "vwf/utility",
break;

case "blockly_xml":
value = node.blocks = propertyValue;
if ( propertyValue.indexOf('http://www.w3.org/1999/xhtml') !== -1 ) {
//SJF: Invalid XML being passed in as default on Blockly clear sometimes
} else {
node.blocks = propertyValue;
value = propertyValue;
}
break;

case "blockly_timeBetweenLines":
Expand Down Expand Up @@ -412,7 +417,6 @@ define( [ "module", "vwf/model", "vwf/utility",
if ( executeNextLine ) {

self.state.executionHalted = false;

nextStep( blocklyNode );

// Does this serve any real purpose? It's not handled in any application.
Expand Down
11 changes: 6 additions & 5 deletions support/client/lib/vwf/view/blockly.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ define( [ "module", "vwf/view", "jquery", "vwf/model/blockly/JS-Interpreter/acor
// breaking synchronization.

if ( previousActiveNode === blocklyNode ) {
setBlockXML( blocklyNode );
break;
}

Expand All @@ -248,11 +249,11 @@ define( [ "module", "vwf/view", "jquery", "vwf/model/blockly/JS-Interpreter/acor
} else if ( app.toolbox !== undefined ) {
loadToolbox( app.toolbox );
}
if ( blocklyNode.defaultXml !== undefined ) {
loadDefaultXml( blocklyNode.defaultXml );
} else if ( app.defaultXml !== undefined ) {
loadDefaultXml( app.defaultXml );
}
// if ( blocklyNode.defaultXml !== undefined ) {
// loadDefaultXml( blocklyNode.defaultXml );
// } else if ( app.defaultXml !== undefined ) {
// loadDefaultXml( app.defaultXml );
// }
this.state.blockly.node = blocklyNode;
setBlockXML( blocklyNode );
this.kernel.fireEvent( blocklyNode.ID, "blocklyVisibleChanged", [ getBlocklyUIVisibility() ] );
Expand Down