Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
b810cf1d
Commit
b810cf1d
authored
Nov 13, 2013
by
webchick
Browse files
Issue
#2133871
by Wim Leers: Remove dead code from Edit: Drupal.edit.AppView.enableEditor.
parent
cf59aaf8
Changes
1
Show whitespace changes
Inline
Side-by-side
core/modules/edit/js/views/AppView.js
View file @
b810cf1d
...
...
@@ -412,36 +412,6 @@ Drupal.edit.AppView = Backbone.View.extend({
}
},
/**
*
*/
enableEditor
:
function
(
fieldModel
)
{
// check if there's an active editor.
var
activeEditor
=
this
.
model
.
get
(
'
activeEditor
'
);
// Do nothing if the fieldModel is already the active editor.
if
(
fieldModel
===
activeEditor
)
{
return
;
}
if
(
activeEditor
)
{
// If there is, check if the model is changed.
if
(
activeEditor
.
get
(
'
state
'
)
===
'
changed
'
)
{
// Attempt to save the field.
activeEditor
.
set
(
'
state
'
,
'
saving
'
);
}
// else, set it to a candidate.
else
{
activeEditor
.
set
(
'
state
'
,
'
candidate
'
);
// Set the new fieldModel to activating.
fieldModel
.
set
(
'
state
'
,
'
activating
'
);
}
}
else
{
// Set the new fieldModel to activating.
fieldModel
.
set
(
'
state
'
,
'
activating
'
);
}
},
/**
* Render an updated field (a field whose 'html' attribute changed).
*
...
...
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