Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
240392cc
Commit
240392cc
authored
Apr 16, 2014
by
Alex Pott
Browse files
Issue
#1874640
by xjm, Wim Leers: Rename edit module to quickedit.
parent
a62511ff
Changes
74
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php
View file @
240392cc
...
...
@@ -21,7 +21,7 @@
* "string",
* "email"
* },
* edit = {
*
quick
edit = {
* "editor" = "plain_text"
* }
* )
...
...
core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
View file @
240392cc
...
...
@@ -27,7 +27,7 @@
* field_types = {
* "comment"
* },
* edit = {
*
quick
edit = {
* "editor" = "disabled"
* }
* )
...
...
core/modules/edit/edit.services.yml
deleted
100644 → 0
View file @
a62511ff
services
:
plugin.manager.edit.editor
:
class
:
Drupal\edit\Plugin\InPlaceEditorManager
parent
:
default_plugin_manager
access_check.edit.entity_field
:
class
:
Drupal\edit\Access\EditEntityFieldAccessCheck
arguments
:
[
'
@entity.manager'
]
tags
:
-
{
name
:
access_check
,
applies_to
:
_access_edit_entity_field
}
access_check.edit.entity
:
class
:
Drupal\edit\Access\EditEntityAccessCheck
arguments
:
[
'
@entity.manager'
]
tags
:
-
{
name
:
access_check
,
applies_to
:
_access_edit_entity
}
edit.editor.selector
:
class
:
Drupal\edit\EditorSelector
arguments
:
[
'
@plugin.manager.edit.editor'
,
'
@plugin.manager.field.formatter'
]
edit.metadata.generator
:
class
:
Drupal\edit\MetadataGenerator
arguments
:
[
'
@access_check.edit.entity_field'
,
'
@edit.editor.selector'
,
'
@plugin.manager.edit.editor'
]
core/modules/editor/editor.libraries.yml
View file @
240392cc
...
...
@@ -31,12 +31,12 @@ drupal.editor.dialog:
-
core/drupal.ajax
-
core/drupalSettings
edit.inPlaceEditor.formattedText
:
quick
edit.inPlaceEditor.formattedText
:
version
:
VERSION
js
:
js/editor.formattedTextEditor.js
:
{
scope
:
footer
,
attributes
:
{
defer
:
true
}
}
dependencies
:
-
edit/
edit
-
quickedit/quick
edit
-
editor/drupal.editor
-
core/drupal.ajax
-
core/drupalSettings
core/modules/editor/editor.routing.yml
View file @
240392cc
...
...
@@ -13,7 +13,7 @@ editor.field_untransformed_text:
_theme
:
ajax_base_page
requirements
:
_permission
:
'
access
in-place
editing'
_access_edit_entity_field
:
'
TRUE'
_access_
quick
edit_entity_field
:
'
TRUE'
editor.image_dialog
:
path
:
'
/editor/dialog/image/{filter_format}'
...
...
core/modules/editor/js/editor.formattedTextEditor.js
View file @
240392cc
...
...
@@ -14,7 +14,7 @@
"
use strict
"
;
Drupal
.
edit
.
editors
.
editor
=
Drupal
.
edit
.
EditorView
.
extend
({
Drupal
.
quick
edit
.
editors
.
editor
=
Drupal
.
quick
edit
.
EditorView
.
extend
({
// The text format for this field.
textFormat
:
null
,
...
...
@@ -32,9 +32,9 @@
* {@inheritdoc}
*/
initialize
:
function
(
options
)
{
Drupal
.
edit
.
EditorView
.
prototype
.
initialize
.
call
(
this
,
options
);
Drupal
.
quick
edit
.
EditorView
.
prototype
.
initialize
.
call
(
this
,
options
);
var
metadata
=
Drupal
.
edit
.
metadata
.
get
(
this
.
fieldModel
.
get
(
'
fieldID
'
),
'
custom
'
);
var
metadata
=
Drupal
.
quick
edit
.
metadata
.
get
(
this
.
fieldModel
.
get
(
'
fieldID
'
),
'
custom
'
);
this
.
textFormat
=
drupalSettings
.
editor
.
formats
[
metadata
.
format
];
this
.
textFormatHasTransformations
=
metadata
.
formatHasTransformations
;
this
.
textEditor
=
Drupal
.
editors
[
this
.
textFormat
.
editor
];
...
...
@@ -137,7 +137,7 @@
/**
* {@inheritdoc}
*/
getEditUISettings
:
function
()
{
get
Quick
EditUISettings
:
function
()
{
return
{
padding
:
true
,
unifiedToolbar
:
true
,
fullWidthToolbar
:
true
,
popup
:
false
};
},
...
...
@@ -164,7 +164,7 @@
// Create a Drupal.ajax instance to load the form.
var
textLoaderAjax
=
new
Drupal
.
ajax
(
fieldID
,
this
.
$el
,
{
url
:
Drupal
.
edit
.
util
.
buildUrl
(
fieldID
,
Drupal
.
url
(
'
editor/!entity_type/!id/!field_name/!langcode/!view_mode
'
)),
url
:
Drupal
.
quick
edit
.
util
.
buildUrl
(
fieldID
,
Drupal
.
url
(
'
editor/!entity_type/!id/!field_name/!langcode/!view_mode
'
)),
event
:
'
editor-internal.editor
'
,
submit
:
{
nocssjs
:
true
},
progress
:
{
type
:
null
}
// No progress indicator.
...
...
core/modules/editor/lib/Drupal/editor/Ajax/GetUntransformedTextCommand.php
View file @
240392cc
...
...
@@ -8,7 +8,7 @@
namespace
Drupal\editor\Ajax
;
use
Drupal\Core\Ajax\CommandInterface
;
use
Drupal\edit\Ajax\BaseCommand
;
use
Drupal\
quick
edit\Ajax\BaseCommand
;
/**
* AJAX command to rerender a processed text field without any transformation
...
...
core/modules/editor/lib/Drupal/editor/Plugin/InPlaceEditor/Editor.php
View file @
240392cc
...
...
@@ -9,7 +9,7 @@
use
Drupal\Component\Plugin\PluginBase
;
use
Drupal\Core\Field\FieldItemListInterface
;
use
Drupal\edit\Plugin\InPlaceEditorInterface
;
use
Drupal\
quick
edit\Plugin\InPlaceEditorInterface
;
use
Drupal\filter\Plugin\FilterInterface
;
/**
...
...
@@ -88,7 +88,7 @@ public function getAttachments() {
$attachments
=
$manager
->
getAttachments
(
$formats
);
// Also include editor.module's formatted text editor.
$attachments
[
'library'
][]
=
'editor/edit.inPlaceEditor.formattedText'
;
$attachments
[
'library'
][]
=
'editor/
quick
edit.inPlaceEditor.formattedText'
;
return
$attachments
;
}
...
...
core/modules/editor/lib/Drupal/editor/Tests/EditIntegrationLoadingTest.php
→
core/modules/editor/lib/Drupal/editor/Tests/
Quick
EditIntegrationLoadingTest.php
View file @
240392cc
...
...
@@ -2,7 +2,7 @@
/**
* @file
* Contains \Drupal\editor\Tests\EditIntegrationLoadingTest.
* Contains \Drupal\editor\Tests\
Quick
EditIntegrationLoadingTest.
*/
namespace
Drupal\editor\Tests
;
...
...
@@ -11,16 +11,16 @@
use
Drupal\simpletest\WebTestBase
;
/**
* Tests Edit module integration endpoints.
* Tests
Quick
Edit module integration endpoints.
*/
class
EditIntegrationLoadingTest
extends
WebTestBase
{
class
Quick
EditIntegrationLoadingTest
extends
WebTestBase
{
/**
* Modules to enable.
*
* @var array
*/
public
static
$modules
=
array
(
'edit'
,
'filter'
,
'node'
,
'editor'
);
public
static
$modules
=
array
(
'
quick
edit'
,
'filter'
,
'node'
,
'editor'
);
/**
* The basic permissions necessary to view content and use in-place editing.
...
...
@@ -32,7 +32,7 @@ class EditIntegrationLoadingTest extends WebTestBase {
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'In-place text editor loading'
,
'description'
=>
'Tests Edit module integration endpoints.'
,
'description'
=>
'Tests
Quick
Edit module integration endpoints.'
,
'group'
=>
'Text Editor'
,
);
}
...
...
core/modules/editor/lib/Drupal/editor/Tests/EditIntegrationTest.php
→
core/modules/editor/lib/Drupal/editor/Tests/
Quick
EditIntegrationTest.php
View file @
240392cc
...
...
@@ -2,25 +2,25 @@
/**
* @file
* Contains \Drupal\editor\Tests\EditIntegrationTest.
* Contains \Drupal\editor\Tests\
Quick
EditIntegrationTest.
*/
namespace
Drupal\editor\Tests
;
use
Drupal\Component\Utility\Json
;
use
Drupal\Core\Language\Language
;
use
Drupal\edit\EditorSelector
;
use
Drupal\edit\MetadataGenerator
;
use
Drupal\edit\Plugin\InPlaceEditorManager
;
use
Drupal\edit\Tests\EditTestBase
;
use
Drupal\edit_test
\
MockEditEntityFieldAccessCheck
;
use
Drupal\
quick
edit\EditorSelector
;
use
Drupal\
quick
edit\MetadataGenerator
;
use
Drupal\
quick
edit\Plugin\InPlaceEditorManager
;
use
Drupal\
quick
edit\Tests\
Quick
EditTestBase
;
use
Drupal\
quick
edit_test
\
MockEditEntityFieldAccessCheck
;
use
Drupal\editor\EditorController
;
use
Symfony\Component\HttpFoundation\Request
;
/**
* Tests Edit module integration (Editor module's inline editing support).
*/
class
EditIntegrationTest
extends
EditTestBase
{
class
Quick
EditIntegrationTest
extends
Quick
EditTestBase
{
/**
* The manager for editor plug-ins.
...
...
@@ -32,21 +32,21 @@ class EditIntegrationTest extends EditTestBase {
/**
* The metadata generator object to be tested.
*
* @var \Drupal\edit\MetadataGeneratorInterface.php
* @var \Drupal\
quick
edit\MetadataGeneratorInterface.php
*/
protected
$metadataGenerator
;
/**
* The editor selector object to be used by the metadata generator object.
*
* @var \Drupal\edit\EditorSelectorInterface
* @var \Drupal\
quick
edit\EditorSelectorInterface
*/
protected
$editorSelector
;
/**
* The access checker object to be used by the metadata generator object.
*
* @var \Drupal\edit\Access\EditEntityFieldAccessCheckInterface
* @var \Drupal\
quick
edit\Access\EditEntityFieldAccessCheckInterface
*/
protected
$accessChecker
;
...
...
@@ -59,7 +59,7 @@ class EditIntegrationTest extends EditTestBase {
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'In-place text editors (Edit module integration)'
,
'name'
=>
'In-place text editors (
Quick
Edit module integration)'
,
'description'
=>
'Tests Edit module integration (Editor module\'s inline editing support).'
,
'group'
=>
'Text Editor'
,
);
...
...
@@ -124,8 +124,8 @@ protected function getSelectedEditor($entity_id, $field_name, $view_mode = 'defa
* format compatibility.
*/
public
function
testEditorSelection
()
{
$this
->
editorManager
=
$this
->
container
->
get
(
'plugin.manager.edit.editor'
);
$this
->
editorSelector
=
$this
->
container
->
get
(
'edit.editor.selector'
);
$this
->
editorManager
=
$this
->
container
->
get
(
'plugin.manager.
quick
edit.editor'
);
$this
->
editorSelector
=
$this
->
container
->
get
(
'
quick
edit.editor.selector'
);
// Create an entity with values for this text field.
$this
->
entity
=
entity_create
(
'entity_test'
);
...
...
@@ -151,9 +151,9 @@ public function testEditorSelection() {
* Tests (custom) metadata when the formatted text editor is used.
*/
public
function
testMetadata
()
{
$this
->
editorManager
=
$this
->
container
->
get
(
'plugin.manager.edit.editor'
);
$this
->
editorManager
=
$this
->
container
->
get
(
'plugin.manager.
quick
edit.editor'
);
$this
->
accessChecker
=
new
MockEditEntityFieldAccessCheck
();
$this
->
editorSelector
=
$this
->
container
->
get
(
'edit.editor.selector'
);
$this
->
editorSelector
=
$this
->
container
->
get
(
'
quick
edit.editor.selector'
);
$this
->
metadataGenerator
=
new
MetadataGenerator
(
$this
->
accessChecker
,
$this
->
editorSelector
,
$this
->
editorManager
);
// Create an entity with values for the field.
...
...
core/modules/edit/css/edit.icons.css
→
core/modules/
quick
edit/css/
quick
edit.icons.css
View file @
240392cc
/**
* @file
* Icons for
e
dit module.
* Icons for
Quick E
dit module.
*/
.edit
.icon
{
.
quick
edit
.icon
{
min-height
:
1em
;
min-width
:
2.5em
;
position
:
relative
;
}
.edit
.icon.icon-only
{
.
quick
edit
.icon.icon-only
{
text-indent
:
-9999px
;
}
.edit
.icon.icon-end
{
.
quick
edit
.icon.icon-end
{
padding-right
:
2.5em
;
/* LTR */
}
[
dir
=
"rtl"
]
.edit
.icon.icon-end
{
[
dir
=
"rtl"
]
.
quick
edit
.icon.icon-end
{
padding-left
:
2.5em
;
padding-right
:
0
;
}
.edit
.icon
:before
{
.
quick
edit
.icon
:before
{
background-attachment
:
scroll
;
background-color
:
transparent
;
background-position
:
center
center
;
...
...
@@ -31,23 +31,23 @@
top
:
0
;
width
:
100%
;
}
[
dir
=
"rtl"
]
.edit
.icon
:before
{
[
dir
=
"rtl"
]
.
quick
edit
.icon
:before
{
left
:
auto
;
right
:
0
;
}
.edit
.icon-end
:before
{
.
quick
edit
.icon-end
:before
{
left
:
auto
;
/* LTR */
right
:
0.5em
;
/* LTR */
width
:
18px
;
}
[
dir
=
"rtl"
]
.edit
.icon-end
:before
{
[
dir
=
"rtl"
]
.
quick
edit
.icon-end
:before
{
left
:
0.5em
;
right
:
auto
;
}
.edit
button
.icon
{
.
quick
edit
button
.icon
{
font-size
:
1em
;
}
.edit
.icon-pencil
{
.
quick
edit
.icon-pencil
{
margin-left
:
.5em
;
padding-left
:
1.5em
;
}
...
...
@@ -55,19 +55,19 @@
/**
* Images.
*/
.edit
.icon-close
:before
{
.
quick
edit
.icon-close
:before
{
background-image
:
url('../../../misc/icons/787878/ex.svg')
;
height
:
12px
;
top
:
10px
;
}
.edit
.icon-close
:hover:before
,
.edit
.icon-close
:active:before
{
.
quick
edit
.icon-close
:hover:before
,
.
quick
edit
.icon-close
:active:before
{
background-image
:
url('../../../misc/icons/000000/ex.svg')
;
}
.edit
.icon-throbber
:before
{
.
quick
edit
.icon-throbber
:before
{
background-image
:
url("../images/icon-throbber.gif")
;
}
.edit
.icon-pencil
:before
{
.
quick
edit
.icon-pencil
:before
{
background-image
:
url('../../../misc/icons/5181c6/pencil.svg')
;
background-position
:
left
center
;
background-size
:
1.3em
;
...
...
core/modules/edit/css/edit.module.css
→
core/modules/
quick
edit/css/
quick
edit.module.css
View file @
240392cc
/**
* @file
* Generic base styles for
e
dit module.
* Generic base styles for
Quick E
dit module.
*
* Note: every class is prefixed with "edit-" to prevent collisions with modules
* or themes. In Edit module-specific DOM subtrees, this is not necessary.
* Note: every class is prefixed with "quickedit-" to prevent collisions with
* modules or themes. In Edit module-specific DOM subtrees, this is not
* necessary.
*/
/**
* Editable.
*/
.edit-editable
{
.
quick
edit-editable
{
z-index
:
98
;
position
:
relative
;
cursor
:
pointer
;
}
.edit-editable
:focus
{
.
quick
edit-editable
:focus
{
outline
:
none
;
}
/**
* Highlighted (hovered) editable.
*/
.edit-editable.edit-highlighted
{
.
quick
edit-editable.
quick
edit-highlighted
{
z-index
:
99
;
}
.edit-validation-errors
>
.messages
{
.
quick
edit-validation-errors
>
.messages
{
margin-left
:
0
;
margin-right
:
0
;
}
.edit-validation-errors
>
.messages
>
ul
{
.
quick
edit-validation-errors
>
.messages
>
ul
{
list-style
:
none
;
margin
:
0
;
padding
:
0
;
...
...
@@ -37,18 +38,18 @@
/**
* In-place editors that don't use a popup.
*/
.edit-validation-errors
{
.
quick
edit-validation-errors
{
z-index
:
300
;
position
:
relative
;
}
.edit-validation-errors
.messages.error
{
.
quick
edit-validation-errors
.messages.error
{
position
:
absolute
;
top
:
6px
;
left
:
-5px
;
/* LTR */
margin
:
0
;
border
:
none
;
}
[
dir
=
"rtl"
]
.edit-validation-errors
.messages.error
{
[
dir
=
"rtl"
]
.
quick
edit-validation-errors
.messages.error
{
left
:
auto
;
right
:
-5px
;
}
...
...
@@ -56,46 +57,46 @@
/**
* Styling specific to the 'form' in-place editor.
*/
#edit_backstage
{
#
quick
edit_backstage
{
display
:
none
;
}
.edit-form
{
.
quick
edit-form
{
position
:
absolute
;
z-index
:
300
;
max-width
:
35em
;
}
.edit-form
.placeholder
{
.
quick
edit-form
.placeholder
{
min-height
:
22px
;
}
/**
* Default form styling overrides.
*/
.edit-form
.form-wrapper
.form-wrapper
{
.
quick
edit-form
.form-wrapper
.form-wrapper
{
margin
:
inherit
;
}
.edit-form
.form-actions
{
.
quick
edit-form
.form-actions
{
display
:
none
;
}
.edit-form
input
{
.
quick
edit-form
input
{
max-width
:
100%
;
}
/**
* Entity toolbar.
*/
.edit-toolbar-container
{
.
quick
edit-toolbar-container
{
max-width
:
100%
;
position
:
absolute
;
max-width
:
320px
;
width
:
320px
;
z-index
:
100
;
}
.edit-toolbar-container
>
.edit-toolbar-pointer
,
.edit-toolbar-container
>
.edit-toolbar-lining
{
.
quick
edit-toolbar-container
>
.
quick
edit-toolbar-pointer
,
.
quick
edit-toolbar-container
>
.
quick
edit-toolbar-lining
{
display
:
none
;
}
.edit-form-container
{
.
quick
edit-form-container
{
position
:
relative
;
padding
:
0
;
border
:
0
;
...
...
@@ -103,16 +104,16 @@
vertical-align
:
baseline
;
z-index
:
100
;
}
.edit-toolgroup.ops
{
.
quick
edit-toolgroup.ops
{
float
:
right
;
/* LTR */
}
[
dir
=
"rtl"
]
.edit-toolgroup.ops
{
[
dir
=
"rtl"
]
.
quick
edit-toolgroup.ops
{
float
:
left
;
}
.edit-toolbar-label
{
.
quick
edit-toolbar-label
{
overflow
:
hidden
;
}
#edit-toolbar-fence
{
#
quick
edit-toolbar-fence
{
bottom
:
0
;
left
:
0
;
right
:
0
;
...
...
core/modules/edit/css/edit.theme.css
→
core/modules/
quick
edit/css/
quick
edit.theme.css
View file @
240392cc
/**
* @file
* Styling for
e
dit module.
* Styling for
Quick E
dit module.
*/
/**
* Editable.
*/
.edit-field.edit-editable
,
.edit-field
.edit-editable
{
.
quick
edit-field.
quick
edit-editable
,
.
quick
edit-field
.
quick
edit-editable
{
box-shadow
:
0
0
0
2px
#74b7ff
;
}
/**
* Highlighted (hovered) editable.
*/
.edit-field.edit-highlighted
,
.edit-form.edit-highlighted
,
.edit-field
.edit-highlighted
{
.
quick
edit-field.
quick
edit-highlighted
,
.
quick
edit-form.
quick
edit-highlighted
,
.
quick
edit-field
.
quick
edit-highlighted
{
box-shadow
:
0
0
0
1px
#74b7ff
,
0
0
0
2px
#007fff
;
}
.edit-field.edit-changed
,
.edit-form.edit-changed
,
.edit-field
.edit-changed
{
.
quick
edit-field.
quick
edit-changed
,
.
quick
edit-form.
quick
edit-changed
,
.
quick
edit-field
.
quick
edit-changed
{
box-shadow
:
0
0
0
1px
#fec17e
,
0
0
0
2px
#f7870a
;
}
.edit-editing.edit-validation-error
,
.edit-form.edit-validation-error
{
.
quick
edit-editing.
quick
edit-validation-error
,
.
quick
edit-form.
quick
edit-validation-error
{
box-shadow
:
0
0
0px
1px
#ee8b74
,
0
0
0
2px
#fa2209
;
}
.edit-editing.edit-editor-is-popup
{
.
quick
edit-editing.
quick
edit-editor-is-popup
{
box-shadow
:
none
;
}
.edit-form
.form-item
.error
{
.
quick
edit-form
.form-item
.error
{
border
:
1px
solid
#eea0a0
;
}
/**
* Default form styling overrides.
*/
.edit-form
form
{
.
quick
edit-form
form
{
padding
:
0.5em
;
}
.edit-form
.form-item
{
.
quick
edit-form
.form-item
{
margin
:
0
;
}
.edit-form
.form-wrapper
{
.
quick
edit-form
.form-wrapper
{
margin
:
.5em
;
}
/**
* Animations.
*/
.edit-animate-invisible
{
.
quick
edit-animate-invisible
{
opacity
:
0
;
}
.edit-animate-default
{
.
quick
edit-animate-default
{
-webkit-transition
:
all
.4s
ease
;
transition
:
all
.4s
ease
;
}
.edit-animate-slow
{
.
quick
edit-animate-slow
{
-webkit-transition
:
all
.6s
ease
;
transition
:
all
.6s
ease
;
}
.edit-animate-delay-veryfast
{
.
quick
edit-animate-delay-veryfast
{
-webkit-transition-delay
:
.05s
;
transition-delay
:
.05s
;
}
.edit-animate-delay-fast
{
.
quick
edit-animate-delay-fast
{
-webkit-transition-delay
:
.2s
;
transition-delay
:
.2s
;
}
.edit-animate-disable-width
{
.
quick
edit-animate-disable-width
{
-webkit-transition
:
width
0s
;
transition
:
width
0s
;
}
.edit-animate-only-visibility
{
.
quick
edit-animate-only-visibility
{
-webkit-transition
:
opacity
.2s
ease
;
transition
:
opacity
.2s
ease
;
}
...
...
@@ -82,7 +82,7 @@
/**
* In-place editors that don't use a popup.
*/
.edit-validation-errors
.messages.error
{
.
quick
edit-validation-errors
.messages.error
{
box-shadow
:
0
0
1px
1px
red
,
0
0
3px
3px
rgba
(
153
,
153
,
153
,
.5
);
background-color
:
white
;
}
...
...
@@ -90,7 +90,7 @@
/**
* Styling specific to the 'form' in-place editor.
*/
.edit-form
{
.
quick
edit-form
{
box-shadow
:
0
0
30px
4px
#4f4f4f
;
background-color
:
white
;
}
...
...
@@ -98,14 +98,14 @@
/**
* Toolbars.
*/
.edit-toolbar-container
{
.
quick
edit-toolbar-container
{