fix: CSS dragTrigger: multiple identical ID's on every page
This commit is contained in:
parent
547ced6500
commit
7042946bdf
4 changed files with 8 additions and 5 deletions
|
|
@ -71,6 +71,8 @@
|
|||
http://www.webgui.org/bugs/tracker/session-variables-still-used-in-help-docs
|
||||
- fix: Editing a template sometimes fails (perlDreamer Consulting, LLC)
|
||||
http://www.webgui.org/bugs/tracker/editing-a-template-sometimes-fails
|
||||
- fix: CSS dragTrigger: multiple identical ID's on every page
|
||||
http://www.webgui.org/bugs/tracker/css-dragtrigger-multiple-identical-ids-on-every-page
|
||||
|
||||
7.3.19
|
||||
- Fixed a formatting problem in the workflow editor screen.
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ sub view {
|
|||
if ($self->{_viewVars}{showAdmin} && $self->canEditIfLocked) {
|
||||
# under normal circumstances we don't put HTML stuff in our code, but this will make it much easier
|
||||
# for end users to work with our templates
|
||||
$self->{_viewVars}{"dragger.icon"} = '<div id="dragTrigger" class="dragTrigger">'.$self->session->icon->drag('class="dragTrigger"').'</div>';
|
||||
$self->{_viewVars}{"dragger.icon"} = '<div class="dragTrigger dragTriggerWrap">'.$self->session->icon->drag('class="dragTrigger"').'</div>';
|
||||
$self->{_viewVars}{"dragger.init"} = '
|
||||
<iframe id="dragSubmitter" style="display: none;" src="'.$self->session->url->extras('spacer.gif').'"></iframe>
|
||||
<script type="text/javascript">
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ div.dragable:hover {
|
|||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
#dragTrigger{
|
||||
.dragTriggerWrap{
|
||||
width: 100%;
|
||||
height: 18px;
|
||||
font-size: 10px;
|
||||
|
|
|
|||
|
|
@ -58,11 +58,12 @@ function dragable_checkKeyEvent(e) {
|
|||
|
||||
//goes up the parent tree until class is found. If not found, returns null
|
||||
function dragable_getObjectByClass(target,clazz) {
|
||||
while (target.tagName!=topelement&&target.className!=clazz){
|
||||
var classMatch = new RegExp("\\b" + clazz + "\\b");
|
||||
while (target.tagName!=topelement && target.className.search(classMatch) == -1){
|
||||
target=dom? target.parentNode : target.parentElement
|
||||
}
|
||||
|
||||
if (target.className==clazz){
|
||||
if (target.className.search(classMatch) != -1){
|
||||
return target;
|
||||
}else {
|
||||
return null;
|
||||
|
|
@ -202,7 +203,7 @@ function dragable_dragStart(e){
|
|||
e=dom? e : event;
|
||||
var fObj=dom? e.target : e.srcElement
|
||||
|
||||
if (fObj.className != "dragTrigger") {
|
||||
if (fObj.className.search(/\bdragTrigger\b/) == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue