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
Show 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() {
...
@@ -27,8 +27,8 @@ Ardublockly.init = function() {
Ardublockly
.
initLanguage
();
Ardublockly
.
initLanguage
();
// Inject Blockly into content_blocks
// Inject Blockly into content_blocks
Ardublockly
.
injectBlockly
(
Ardublockly
.
injectBlockly
(
document
.
getElementById
(
'
content_blocks
'
),
document
.
getElementById
(
'
content_blocks
'
),
'
ardublockly_toolbox.xml
'
);
'
ardublockly_toolbox.xml
'
,
'
../blockly/
'
);
Ardublockly
.
designJsInit
();
Ardublockly
.
designJsInit
();
Ardublockly
.
initialiseIdeButtons
();
Ardublockly
.
initialiseIdeButtons
();
...
...
ardublockly/ardublockly_blockly.js
View file @
0dd88a65
...
@@ -27,8 +27,14 @@ Ardublockly.BLOCKLY_INJECTED_ = false;
...
@@ -27,8 +27,14 @@ Ardublockly.BLOCKLY_INJECTED_ = false;
* file.
* file.
* @param {!Element} blocklyEl Element to inject Blockly into.
* @param {!Element} blocklyEl Element to inject Blockly into.
* @param {!string} toolboxPath String containing the toolbox XML file path.
* @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
// Create a an XML HTTP request
var
request
=
Ardublockly
.
ajaxRequest
();
var
request
=
Ardublockly
.
ajaxRequest
();
...
@@ -48,7 +54,7 @@ Ardublockly.injectBlockly = function(blocklyEl, toolboxPath) {
...
@@ -48,7 +54,7 @@ Ardublockly.injectBlockly = function(blocklyEl, toolboxPath) {
collapse
:
true
,
collapse
:
true
,
comments
:
true
,
comments
:
true
,
disable
:
true
,
disable
:
true
,
media
:
'
../blockly
/media/
'
,
media
:
blocklyPath
+
'
/media/
'
,
rtl
:
false
,
rtl
:
false
,
scrollbars
:
true
,
scrollbars
:
true
,
toolbox
:
xmlTree
,
toolbox
:
xmlTree
,
...
@@ -286,7 +292,7 @@ Ardublockly.blocklyPaste = function() {
...
@@ -286,7 +292,7 @@ Ardublockly.blocklyPaste = function() {
}
}
};
};
/**
Wraps the blockly 'pas
te' functionality. */
/**
Wraps the blockly 'dele
te' functionality. */
Ardublockly
.
blocklyDelete
=
function
()
{
Ardublockly
.
blocklyDelete
=
function
()
{
if
(
Blockly
.
selected
&&
Blockly
.
selected
.
isDeletable
())
{
if
(
Blockly
.
selected
&&
Blockly
.
selected
.
isDeletable
())
{
Blockly
.
hideChaff
();
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