Skip to content
GitLab
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
42a715a0
Commit
42a715a0
authored
Sep 08, 2015
by
Amanda Ghassaei
Browse files
view menu fixes
parent
c144c688
Changes
2
Hide whitespace changes
Inline
Side-by-side
js/menus/NavViewMenu.js
View file @
42a715a0
...
...
@@ -3,15 +3,16 @@
*/
define
([
'
jquery
'
,
'
underscore
'
,
'
backbone
'
,
'
plist
'
,
'
text!navViewMenuTemplate
'
],
function
(
$
,
_
,
Backbone
,
plist
,
template
){
define
([
'
jquery
'
,
'
underscore
'
,
'
backbone
'
,
'
plist
'
,
'
lattice
'
,
'
text!navViewMenuTemplate
'
],
function
(
$
,
_
,
Backbone
,
plist
,
lattice
,
template
){
return
Backbone
.
View
.
extend
({
el
:
"
#navViewMenu
"
,
events
:
{
"
click a
.boolProperty
"
:
"
_makeSelection
"
,
"
click #reset3DView
"
:
"
_reset3DNavigation
"
"
click a
"
:
"
_makeSelection
"
,
"
click #reset3DView
"
:
"
_reset3DNavigation
"
},
initialize
:
function
(){
...
...
@@ -20,6 +21,7 @@ define(['jquery', 'underscore', 'backbone', 'plist', 'text!navViewMenuTemplate']
},
_makeSelection
:
function
(
e
){
e
.
preventDefault
();
var
$target
=
$
(
e
.
target
);
...
...
@@ -46,7 +48,7 @@ define(['jquery', 'underscore', 'backbone', 'plist', 'text!navViewMenuTemplate']
},
render
:
function
(){
this
.
$el
.
html
(
this
.
template
(
_
.
extend
(
this
.
model
.
toJSON
(),
plist
)));
this
.
$el
.
html
(
this
.
template
(
_
.
extend
(
this
.
model
.
toJSON
(),
plist
,
lattice
.
toJSON
()
)));
var
self
=
this
;
_
.
each
(
$
(
"
.boolProperty
"
),
function
(
item
){
...
...
js/menus/templates/NavViewMenu.html
View file @
42a715a0
...
...
@@ -28,7 +28,8 @@
<li
class=
"dropdown-submenu"
>
<a
tabindex=
"-1"
>
Cells
<span
class=
"pull-right fui-arrow-right"
></span></a>
<ul
class=
"dropdown-menu"
>
<
%
_.each
(
allCellModes
,
function
(
mode
,
key
){
%
>
<
%
_.each
(
allCellModes
,
function
(
mode
,
key
){
if
(key =
=
"
part
"
&&
allLattices[cellType].connection[connectionType].type[latticeType].parts =
==
null
)
return
;
%
>
<li><a
class=
"appState"
data-property=
"cellMode"
data-value=
"<%= key %>"
href=
"#"
><
%
if
(cellMode =
=
key
)
{
%
><span
class=
"fui-check"
></span><
%
}
%
><
%=
mode
%
></a></li>
<
%
});
%
>
</ul>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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