Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
0dd88a65
Commit
0dd88a65
authored
Dec 22, 2015
by
carlosperate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove relative blockly path from ardublockly_blockly.js, now a func argument.
parent
92d4574e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
ardublockly/ardublockly.js
ardublockly/ardublockly.js
+2
-2
ardublockly/ardublockly_blockly.js
ardublockly/ardublockly_blockly.js
+9
-3
No files found.
ardublockly/ardublockly.js
View file @
0dd88a65
...
...
@@ -27,8 +27,8 @@ Ardublockly.init = function() {
Ardublockly
.
initLanguage
();
// Inject Blockly into content_blocks
Ardublockly
.
injectBlockly
(
document
.
getElementById
(
'
content_blocks
'
),
'
ardublockly_toolbox.xml
'
);
Ardublockly
.
injectBlockly
(
document
.
getElementById
(
'
content_blocks
'
),
'
ardublockly_toolbox.xml
'
,
'
../blockly/
'
);
Ardublockly
.
designJsInit
();
Ardublockly
.
initialiseIdeButtons
();
...
...
ardublockly/ardublockly_blockly.js
View file @
0dd88a65
...
...
@@ -27,8 +27,14 @@ Ardublockly.BLOCKLY_INJECTED_ = false;
* file.
* @param {!Element} blocklyEl Element to inject Blockly into.
* @param {!string} toolboxPath String containing the toolbox XML file path.
* @param {!string} blocklyPath String containing the Blockly directory path.
*/
Ardublockly
.
injectBlockly
=
function
(
blocklyEl
,
toolboxPath
)
{
Ardublockly
.
injectBlockly
=
function
(
blocklyEl
,
toolboxPath
,
blocklyPath
)
{
// Remove any trailing slashes in the blockly path
if
(
blocklyPath
.
substr
(
-
1
)
===
'
/
'
)
{
blocklyPath
=
blocklyPath
.
slice
(
0
,
-
1
);
}
// Create a an XML HTTP request
var
request
=
Ardublockly
.
ajaxRequest
();
...
...
@@ -48,7 +54,7 @@ Ardublockly.injectBlockly = function(blocklyEl, toolboxPath) {
collapse
:
true
,
comments
:
true
,
disable
:
true
,
media
:
'
../blockly
/media/
'
,
media
:
blocklyPath
+
'
/media/
'
,
rtl
:
false
,
scrollbars
:
true
,
toolbox
:
xmlTree
,
...
...
@@ -286,7 +292,7 @@ Ardublockly.blocklyPaste = function() {
}
};
/**
Wraps the blockly 'pas
te' functionality. */
/**
Wraps the blockly 'dele
te' functionality. */
Ardublockly
.
blocklyDelete
=
function
()
{
if
(
Blockly
.
selected
&&
Blockly
.
selected
.
isDeletable
())
{
Blockly
.
hideChaff
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment