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
eee2ccd6
Commit
eee2ccd6
authored
Jan 18, 2016
by
Tim Krones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove obsolete file containing JS "placeholder" shim.
parent
1f4c54f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
110 deletions
+0
-110
drag_and_drop_v2/drag_and_drop_v2.py
+0
-1
drag_and_drop_v2/public/js/vendor/jquery.html5-placeholder-shim.js
+0
-109
No files found.
drag_and_drop_v2/drag_and_drop_v2.py
View file @
eee2ccd6
...
...
@@ -198,7 +198,6 @@ class DragAndDropBlock(XBlock, XBlockWithSettingsMixin, ThemableXBlockMixin):
)
js_urls
=
(
'public/js/vendor/jquery-ui-1.10.4.custom.min.js'
,
'public/js/vendor/jquery.html5-placeholder-shim.js'
,
'public/js/vendor/handlebars-v1.1.2.js'
,
'public/js/drag_and_drop_edit.js'
,
)
...
...
drag_and_drop_v2/public/js/vendor/jquery.html5-placeholder-shim.js
deleted
100644 → 0
View file @
1f4c54f2
(
function
(
$
)
{
// @todo Document this.
$
.
extend
(
$
,{
placeholder
:
{
browser_supported
:
function
()
{
return
this
.
_supported
!==
undefined
?
this
.
_supported
:
(
this
.
_supported
=
!!
(
'placeholder'
in
$
(
'<input type="text">'
)[
0
])
);
},
shim
:
function
(
opts
)
{
var
config
=
{
color
:
'#888'
,
cls
:
'placeholder'
,
selector
:
'input[placeholder], textarea[placeholder]'
};
$
.
extend
(
config
,
opts
);
return
!
this
.
browser_supported
()
&&
$
(
config
.
selector
).
_placeholder_shim
(
config
);
}
}});
$
.
extend
(
$
.
fn
,{
_placeholder_shim
:
function
(
config
)
{
function
calcPositionCss
(
target
)
{
var
op
=
$
(
target
).
offsetParent
().
offset
();
var
ot
=
$
(
target
).
offset
();
return
{
top
:
ot
.
top
-
op
.
top
,
left
:
ot
.
left
-
op
.
left
,
width
:
$
(
target
).
width
()
};
}
function
adjustToResizing
(
label
)
{
var
$target
=
label
.
data
(
'target'
);
if
(
typeof
$target
!==
"undefined"
)
{
label
.
css
(
calcPositionCss
(
$target
));
$
(
window
).
one
(
"resize"
,
function
()
{
adjustToResizing
(
label
);
});
}
}
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
);
if
(
$this
.
is
(
':visible'
)
)
{
if
(
$this
.
data
(
'placeholder'
)
)
{
var
$ol
=
$this
.
data
(
'placeholder'
);
$ol
.
css
(
calcPositionCss
(
$this
));
return
true
;
}
var
possible_line_height
=
{};
if
(
!
$this
.
is
(
'textarea'
)
&&
$this
.
css
(
'height'
)
!=
'auto'
)
{
possible_line_height
=
{
lineHeight
:
$this
.
css
(
'height'
),
whiteSpace
:
'nowrap'
};
}
var
isBorderBox
=
(
$this
.
css
(
'box-sizing'
)
===
'border-box'
);
var
ol
=
$
(
'<label />'
)
.
text
(
$this
.
attr
(
'placeholder'
))
.
addClass
(
config
.
cls
)
.
css
(
$
.
extend
({
position
:
'absolute'
,
display
:
'inline'
,
'float'
:
'none'
,
overflow
:
'hidden'
,
textAlign
:
'left'
,
color
:
config
.
color
,
cursor
:
'text'
,
paddingTop
:
isBorderBox
?
'0'
:
$this
.
css
(
'padding-top'
),
paddingRight
:
$this
.
css
(
'padding-right'
),
paddingBottom
:
isBorderBox
?
'0'
:
$this
.
css
(
'padding-bottom'
),
paddingLeft
:
$this
.
css
(
'padding-left'
),
fontSize
:
$this
.
css
(
'font-size'
),
fontFamily
:
$this
.
css
(
'font-family'
),
fontStyle
:
$this
.
css
(
'font-style'
),
fontWeight
:
$this
.
css
(
'font-weight'
),
textTransform
:
$this
.
css
(
'text-transform'
),
backgroundColor
:
'transparent'
,
zIndex
:
99
},
possible_line_height
))
.
css
(
calcPositionCss
(
this
))
.
attr
(
'for'
,
this
.
id
)
.
data
(
'target'
,
$this
)
.
click
(
function
(){
if
(
!
$
(
this
).
data
(
'target'
).
is
(
':disabled'
))
{
$
(
this
).
data
(
'target'
).
focus
();
}
})
.
insertBefore
(
this
);
$this
.
data
(
'placeholder'
,
ol
)
.
keydown
(
function
(){
ol
.
hide
();
})
.
blur
(
function
()
{
ol
[
$this
.
val
().
length
?
'hide'
:
'show'
]();
}).
triggerHandler
(
'blur'
);
$
(
window
).
one
(
"resize"
,
function
()
{
adjustToResizing
(
ol
);
});
}
});
}
});
})(
jQuery
);
jQuery
(
document
).
add
(
window
).
bind
(
'ready load'
,
function
()
{
if
(
jQuery
.
placeholder
)
{
jQuery
.
placeholder
.
shim
();
}
});
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