Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amanda Ghassaei
DMDesign
Commits
70d21873
Commit
70d21873
authored
Aug 20, 2015
by
Amanda Ghassaei
Browse files
script view working
parent
f879aa8e
Changes
5
Hide whitespace changes
Inline
Side-by-side
css/main.css
View file @
70d21873
...
...
@@ -105,7 +105,7 @@ nav .btn {
#menuWrapper
,
#scriptView
{
height
:
100%
;
z-index
:
1
;
z-index
:
2
;
position
:
absolute
;
display
:
block
;
background-color
:
rgba
(
255
,
255
,
255
,
0.8
);
...
...
dependencies/codemirror/javascript.js
View file @
70d21873
...
...
@@ -5,9 +5,9 @@
(
function
(
mod
)
{
if
(
typeof
exports
==
"
object
"
&&
typeof
module
==
"
object
"
)
// CommonJS
mod
(
require
(
"
../../lib/
code
m
irror
"
));
mod
(
require
(
"
code
M
irror
"
));
else
if
(
typeof
define
==
"
function
"
&&
define
.
amd
)
// AMD
define
([
"
../../lib/
code
m
irror
"
],
mod
);
define
([
"
code
M
irror
"
],
mod
);
else
// Plain browser env
mod
(
CodeMirror
);
})(
function
(
CodeMirror
)
{
...
...
js/main.js
View file @
70d21873
...
...
@@ -234,10 +234,6 @@ require.config({
},
'
numeric
'
:
{
exports
:
'
numeric
'
},
'
codeMirror
'
:
{
deps
:
[
'
codeMirrorJS
'
],
exports
:
'
CodeMirror
'
}
}
...
...
@@ -250,7 +246,7 @@ require.config({
//};
//init stuff
require
([
'
appState
'
,
'
lattice
'
,
'
navbar
'
,
'
threeModel
'
,
'
threeView
'
,
'
flatUI
'
,
'
bootstrapSlider
'
,
'
ribbon
'
,
'
menuWrapper
'
],
require
([
'
appState
'
,
'
lattice
'
,
'
navbar
'
,
'
threeModel
'
,
'
threeView
'
,
'
flatUI
'
,
'
bootstrapSlider
'
,
'
ribbon
'
,
'
menuWrapper
'
,
'
scriptView
'
],
function
(
appState
,
lattice
,
Navbar
,
three
,
ThreeView
){
new
Navbar
({
model
:
appState
});
...
...
js/menus/ScriptView.js
View file @
70d21873
...
...
@@ -4,7 +4,8 @@
define
([
'
jquery
'
,
'
underscore
'
,
'
backbone
'
,
'
appState
'
,
'
codeMirror
'
],
function
(
$
,
_
,
Backbone
,
appState
,
CodeMirror
){
define
([
'
jquery
'
,
'
underscore
'
,
'
backbone
'
,
'
appState
'
,
'
codeMirror
'
,
'
text!menus/templates/ScriptView.html
'
,
'
codeMirrorJS
'
],
function
(
$
,
_
,
Backbone
,
appState
,
CodeMirror
,
template
){
var
ScriptView
=
Backbone
.
View
.
extend
({
...
...
@@ -19,7 +20,7 @@ define(['jquery', 'underscore', 'backbone', 'appState', 'codeMirror'], function(
initialize
:
function
(){
_
.
bindAll
(
this
,
"
render
"
,
"
_handleKeyStroke
"
);
_
.
bindAll
(
this
,
"
render
"
);
//bind events
// $(document).bind('keydown', {}, this._handleKeyStroke);
...
...
@@ -83,12 +84,7 @@ define(['jquery', 'underscore', 'backbone', 'appState', 'codeMirror'], function(
this
.
_setEditorHeight
();
},
template
:
_
.
template
(
'
\
<div class="col-sm-4"><a href="#" id="loadScript" class=" btn btn-lg btn-block btn-default">Load Script</a></div>
\
<div class="col-sm-4"><a href="#" id="runScript" class=" btn btn-lg btn-block btn-default">Run Script   (CTRL/⌘ + R)</a></div>
\
<div class="col-sm-4"><a href="#" id="saveScript" class=" btn btn-lg btn-block btn-default">Save Script</a></div><br/><br/>
\
<textarea id="scriptEditor"><%= script %></textarea><br/>
\
'
)
template
:
_
.
template
(
template
)
});
...
...
js/menus/templates/ScriptView.html
0 → 100644
View file @
70d21873
<!--<div class="col-sm-4"><a href="#" id="loadScript" class=" btn btn-lg btn-block btn-default">Load Script</a></div>-->
<!--<div class="col-sm-4"><a href="#" id="runScript" class=" btn btn-lg btn-block btn-default">Run Script   (CTRL/⌘ + R)</a></div>-->
Script Name
<a
href=
"#"
id=
"saveScript"
class=
" btn btn-lg btn-default pull-right"
>
Save Script
</a><br/><br/>
<!--<br/><br/>-->
<textarea
id=
"scriptEditor"
><
%=
script
%
></textarea><br/>
\ No newline at end of file
Write
Preview
Supports
Markdown
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