Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-drag-and-drop-v2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
xblock-drag-and-drop-v2
Commits
888ac97c
Commit
888ac97c
authored
Feb 08, 2016
by
Braden MacDonald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Background Description was required but not always saved
parent
cabfb810
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
drag_and_drop_v2/public/css/drag_and_drop_edit.css
+1
-2
drag_and_drop_v2/public/js/drag_and_drop_edit.js
+2
-2
drag_and_drop_v2/templates/html/drag_and_drop_edit.html
+1
-1
No files found.
drag_and_drop_v2/public/css/drag_and_drop_edit.css
View file @
888ac97c
...
@@ -188,7 +188,7 @@
...
@@ -188,7 +188,7 @@
.xblock--drag-and-drop--editor
.items-form
.item-image-url
{
.xblock--drag-and-drop--editor
.items-form
.item-image-url
{
width
:
81%
;
width
:
81%
;
margin
-right
:
1%
;
margin
:
0
1%
;
}
}
.xblock--drag-and-drop--editor
.items-form
.item-width
{
.xblock--drag-and-drop--editor
.items-form
.item-width
{
...
@@ -224,7 +224,6 @@
...
@@ -224,7 +224,6 @@
border
:
1px
solid
#156ab4
;
border
:
1px
solid
#156ab4
;
border-radius
:
6px
;
border-radius
:
6px
;
padding
:
5px
10px
;
padding
:
5px
10px
;
margin-top
:
15px
;
}
}
.xblock--drag-and-drop--editor
.btn
:hover
{
.xblock--drag-and-drop--editor
.btn
:hover
{
...
...
drag_and_drop_v2/public/js/drag_and_drop_edit.js
View file @
888ac97c
...
@@ -181,13 +181,13 @@ function DragAndDropEditBlock(runtime, element, params) {
...
@@ -181,13 +181,13 @@ function DragAndDropEditBlock(runtime, element, params) {
_fn
.
build
.
$el
.
targetImage
.
attr
(
'src'
,
new_img_url
);
_fn
.
build
.
$el
.
targetImage
.
attr
(
'src'
,
new_img_url
);
}
}
_fn
.
data
.
targetImg
=
new_img_url
;
_fn
.
data
.
targetImg
=
new_img_url
;
})
.
on
(
'input'
,
'.target-image-form #background-description'
,
function
(
e
)
{
var
new_description
=
$
.
trim
(
var
new_description
=
$
.
trim
(
$
(
'.target-image-form #background-description'
,
element
).
val
()
$
(
'.target-image-form #background-description'
,
element
).
val
()
);
);
_fn
.
build
.
$el
.
targetImage
.
attr
(
'alt'
,
new_description
);
_fn
.
build
.
$el
.
targetImage
.
attr
(
'alt'
,
new_description
);
_fn
.
data
.
targetImgDescription
=
new_description
;
_fn
.
data
.
targetImgDescription
=
new_description
;
})
})
.
on
(
'click'
,
'.display-labels-form input'
,
function
(
e
)
{
.
on
(
'click'
,
'.display-labels-form input'
,
function
(
e
)
{
_fn
.
data
.
displayLabels
=
$
(
'.display-labels-form input'
,
element
).
is
(
':checked'
);
_fn
.
data
.
displayLabels
=
$
(
'.display-labels-form input'
,
element
).
is
(
':checked'
);
...
...
drag_and_drop_v2/templates/html/drag_and_drop_edit.html
View file @
888ac97c
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
<input
id=
"background-url"
<input
id=
"background-url"
type=
"text"
type=
"text"
placeholder=
"{% trans 'For example, http://example.com/background.png or /static/background.png' %}"
>
placeholder=
"{% trans 'For example, http://example.com/background.png or /static/background.png' %}"
>
<button
class=
"btn"
>
{% trans "Change background" %}
</button>
<label
class=
"h3"
for=
"background-description"
>
{% trans "Background description" %}
</label>
<label
class=
"h3"
for=
"background-description"
>
{% trans "Background description" %}
</label>
<textarea
required
id=
"background-description"
<textarea
required
id=
"background-description"
aria-describedby=
"background-description-description"
></textarea>
aria-describedby=
"background-description-description"
></textarea>
...
@@ -62,7 +63,6 @@
...
@@ -62,7 +63,6 @@
to solve the problem even without seeing the image.
to solve the problem even without seeing the image.
{% endblocktrans %}
{% endblocktrans %}
</div>
</div>
<button
class=
"btn"
>
{% trans "Change background" %}
</button>
</form>
</form>
</section>
</section>
<section
class=
"tab-content"
>
<section
class=
"tab-content"
>
...
...
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