Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
work.w
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
30
Issues
30
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
osp
work.w
Commits
f11e1bd3
Commit
f11e1bd3
authored
Feb 05, 2018
by
gijs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes
#8
parent
f0b5ad3a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
playground/static/playground/js/controllers.js
playground/static/playground/js/controllers.js
+5
-5
playground/static/playground/js/views.js
playground/static/playground/js/views.js
+2
-2
No files found.
playground/static/playground/js/controllers.js
View file @
f11e1bd3
...
...
@@ -3,29 +3,29 @@ window.W = window.W || {};
;
(
function
(
undefined
)
{
(
function
(
undefined
)
{
'
use strict
'
;
W
.
ScoreController
=
Backbone
.
Marionette
.
Object
.
extend
({
scoreList
:
function
()
{
scoreList
:
function
()
{
var
app
=
this
.
getOption
(
'
application
'
);
// app.getRegion().empty();
var
myListView
=
new
W
.
ScoreListView
();
app
.
showView
(
myListView
);
},
scoreDetail
:
function
(
id
)
{
scoreDetail
:
function
(
id
)
{
var
app
=
this
.
getOption
(
'
application
'
);
// Backbone relational refuse to instantiate more than one model
// with the same id
var
scoreModel
=
W
.
ScoreModel
.
find
({
id
:
id
})
||
new
W
.
ScoreModel
({
id
:
id
});
var
scoreModel
=
W
.
ScoreModel
.
find
({
id
:
id
})
||
new
W
.
ScoreModel
({
id
:
id
});
var
myScoreDetailView
=
new
W
.
ScoreDetailView
({
model
:
scoreModel
});
// Attach the views when the model is successfully fetched
scoreModel
.
fetch
({
success
:
(
function
()
{
app
.
showView
(
myScoreDetailView
);
app
.
showView
(
myScoreDetailView
);
}).
bind
(
this
)
});
}
...
...
playground/static/playground/js/views.js
View file @
f11e1bd3
...
...
@@ -496,7 +496,7 @@ window.W = window.W || {};
this
.
model
.
unset
(
'
alternative_p
'
);
this
.
model
.
unset
(
'
alternative_mode
'
);
this
.
editMode
=
false
;
this
.
collapsed
=
fals
e
;
this
.
collapsed
=
tru
e
;
this
.
listenTo
(
this
.
model
,
'
change
'
,
this
.
render
);
},
...
...
@@ -753,7 +753,7 @@ window.W = window.W || {};
// inverts the data-collapsed option
// Uses CSS to toggle visibility
this
.
collapsed
=
(
this
.
collapsed
)
?
false
:
true
;
this
.
collapsed
=
!
this
.
collapsed
;
this
.
$el
.
attr
(
"
data-collapsed
"
,
this
.
collapsed
);
},
...
...
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