app/assets/htmls/gs-element-blockly.html in gobstones-blockly-0.8.5 vs app/assets/htmls/gs-element-blockly.html in gobstones-blockly-0.10.0
- old
+ new
@@ -99,15 +99,15 @@
<block type="procedures_defreturnsimple"></block>
<block type="procedures_defreturnsimplewithparams"></block>
<block type="procedures_defreturn"></block>
</category>
</category>
- <category name="Auxiliares Docente">
- <block type="ComandoCompletar"></block>
- <block type="ExpresionCompletar"></block>
- <block type="AsociacionDeTeclaCompletar"></block>
- </category>
+ <category name="Auxiliares Docente">
+ <block type="ComandoCompletar"></block>
+ <block type="ExpresionCompletar"></block>
+ <block type="AsociacionDeTeclaCompletar"></block>
+ </category>
</xml>
</template>
<script>// Do not edit this file; automatically generated by build.py.
'use strict';
@@ -3310,11 +3310,11 @@
};</script>
<script>var PLUS = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAQAAAD2e2DtAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAHdElNRQfhDAUCCjFLV0NqAAAC60lEQVR42u3dQW7aQABA0Wl7MMjJICeDnIwuqm4qVQrYjMH/Pa/jsfFnTJDwjAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMBUP7Y+gClOY4zznX9zHmN8bn3gLHcYtwXbYevDZ5nLost/G7dx2foUeNzyyy+BN7Zs8ncjeHvrvP/NAW9qvff/rueAn1sfwNMcX3hvL2S/3wPcVt7fTl+p/c4AfIsA4gQQJ4A4AcQJIE4AcQKIE0CcAOIEECeAOAHECSBOAHECiBNAnADiBBAngDgBxAkgTgBxAogTQJwA4gQQJ4A4AcQJIE4AcQKIE0CcAOIEECeAOAHECSBOAHECiBNAnADiBBAngDgBxAkgTgBxAogTQJwA4mYHcBinVRdz+v+2tjlHfdrv8lRjHFZcyG3P22VmBPOWQrrsd+WtJ7iOjzkDzQrA5b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z2/3zmj402j42Gj43Gj53mj53Wj42mj41mj30WjswEr401/52V/53V/54F/64V/531/522H4zErtsir4yD350j352Tn63TL63Cj61Bn4xQL3twD3tgD4xgD61QD73wD74QD72wD5zgD3vgD3uAD5ywD73AD86wD97wD85AD61AD4wgD2tQD5yQD01gDz3AD60wD4vwDsrgHqswH////vUbxMAAAATXRSTlMABAQHwMIIen0c8fIeCa6yCgI5e7Hp67WAPwOD/otJ/PxLev7+fAKSlQIG3OEIy9IBA+HpBAj1/v77DAr58ZMtKo3u/Q4BcGcTEGJzAcqMNfMAAAABYktHRKBe076gAAAAB3RJTUUH4QwFFBQHSAc27gAAANRJREFUGNNjYIAARiYGFMDMwsqGIsDu68eBzOfk8vfn5kHwefkCAgOD+AXAHEEhYRHR4JDQ0JAwMXEJSSkGaZnwiMio6JiY6Ni4+IREWQY5+aTklNS09PSMzKzsHAVFBgYl5dy8/ILCwqLiklIVVaAhaupl5RWVVdU1tXX1GpogY7W0Gxqbmlta29p1dCG26nV0dnX39Pb16xuA+YZGEyZOmjxl6rTpxiZgAVOzGTNnmVvMnjPX0gosYG0zz9bO3sHRab6zC1jA1c3dA0R7enn7MDAAABs9NIkRbjxSAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTEyLTA1VDIwOjIwOjA3LTA1OjAw6QjR4wAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0xMi0wNVQyMDoyMDowNy0wNTowMJhVaV8AAAAASUVORK5CYII=";
-function initProcedsBlockly(customStatementType) {
+window.initProcedsBlockly = function(customStatementType) {
Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = 'Describe el procedimiento...';
Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = "Hacer algo";
Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = "Definir";
Blockly.Msg.PROCEDURES_DEFNORETURN_NOPARAMS = "";
Blockly.Msg.PROCEDURES_DEFRETURN_NOPARAMS = "";
@@ -4874,11 +4874,11 @@
});
},
mutationToDom: function() {
var container = document.createElement('mutation');
container.setAttribute('var', this.getFieldValue('VAR'));
- container.setAttribute("parent", this.$parent || null)
+ if (this.$parent) container.setAttribute("parent", this.$parent);
return container;
},
domToMutation: function(xmlElement) {
var var_name = xmlElement.getAttribute('var');
this.setFieldValue(var_name, 'VAR');
@@ -6252,11 +6252,18 @@
* ser usados para definir el toolbox mediante la propiedad `toolbox`.
* * `categoryContents`: La lista de objetos categorÃa/bloque dentro de esta categorÃa.
*
* @return {Array} Los objetos.
*/
- validToolboxIDs: function(){
+ validToolboxIDs: function() {
return this._validToolboxIDsFrom(this._defaultToolboxTree());
+ },
+
+ setDefaultToolbox: function(xml) {
+ this.$$('#toolbox').innerHTML = xml;
+
+ const toolboxXml = `<xml>${xml}</xml>`;
+ this.workspace.updateToolbox(toolboxXml);
},
/**
* Recursively defined. Gets a list of user-readable objects describing the
* toolboxTree hierarchy and aliases.
\ No newline at end of file