Browse Source

[CodeFactor] Apply fixes

pull/677/head
codefactor-io 6 years ago
parent
commit
154f525e52
  1. 14
      src/static/scripts/bootstrap-native-v4.js
  2. 2
      src/static/scripts/md5.js

14
src/static/scripts/bootstrap-native-v4.js

@ -1282,7 +1282,7 @@
if ( !!element && !(stringModal in element) ) { if ( !!element && !(stringModal in element) ) {
on(element, clickEvent, clickHandler); on(element, clickEvent, clickHandler);
} }
if ( !!self[content] ) { self.setContent( self[content] ); } if ( self[content] ) { self.setContent( self[content] ); }
if (element) { element[stringModal] = self; modal[modalTrigger] = element; } if (element) { element[stringModal] = self; modal[modalTrigger] = element; }
else { modal[stringModal] = self; } else { modal[stringModal] = self; }
}; };
@ -1372,7 +1372,7 @@
titleString = options.title || element[getAttribute](dataTitle); titleString = options.title || element[getAttribute](dataTitle);
contentString = options.content || element[getAttribute](dataContent); contentString = options.content || element[getAttribute](dataContent);
// fixing https://github.com/thednp/bootstrap.native/issues/233 // fixing https://github.com/thednp/bootstrap.native/issues/233
contentString = !!contentString ? contentString.trim() : null; contentString = contentString ? contentString.trim() : null;
popover = DOC[createElement](div); popover = DOC[createElement](div);
@ -1452,7 +1452,7 @@
updatePopover(); updatePopover();
showPopover(); showPopover();
bootstrapCustomEvent.call(element, showEvent, component); bootstrapCustomEvent.call(element, showEvent, component);
!!self[animation] ? emulateTransitionEnd(popover, showTrigger) : showTrigger(); self[animation] ? emulateTransitionEnd(popover, showTrigger) : showTrigger();
} }
}, 20 ); }, 20 );
}; };
@ -1462,7 +1462,7 @@
if (popover && popover !== null && hasClass(popover,showClass)) { if (popover && popover !== null && hasClass(popover,showClass)) {
bootstrapCustomEvent.call(element, hideEvent, component); bootstrapCustomEvent.call(element, hideEvent, component);
removeClass(popover,showClass); removeClass(popover,showClass);
!!self[animation] ? emulateTransitionEnd(popover, hideTrigger) : hideTrigger(); self[animation] ? emulateTransitionEnd(popover, hideTrigger) : hideTrigger();
} }
}, self[delay] ); }, self[delay] );
}; };
@ -1516,7 +1516,7 @@
for (var i=0, il=links[length]; i<il; i++) { for (var i=0, il=links[length]; i<il; i++) {
var href = links[i][getAttribute]('href'), var href = links[i][getAttribute]('href'),
targetItem = href && href.charAt(0) === '#' && href.slice(-1) !== '#' && queryElement(href); targetItem = href && href.charAt(0) === '#' && href.slice(-1) !== '#' && queryElement(href);
if ( !!targetItem ) { if ( targetItem ) {
items[push](links[i]); items[push](links[i]);
targetItems[push](targetItem); targetItems[push](targetItem);
} }
@ -1940,7 +1940,7 @@
updateTooltip(); updateTooltip();
showTooltip(); showTooltip();
bootstrapCustomEvent.call(element, showEvent, component); bootstrapCustomEvent.call(element, showEvent, component);
!!self[animation] ? emulateTransitionEnd(tooltip, showTrigger) : showTrigger(); self[animation] ? emulateTransitionEnd(tooltip, showTrigger) : showTrigger();
} }
} }
}, 20 ); }, 20 );
@ -1951,7 +1951,7 @@
if (tooltip && hasClass(tooltip,showClass)) { if (tooltip && hasClass(tooltip,showClass)) {
bootstrapCustomEvent.call(element, hideEvent, component); bootstrapCustomEvent.call(element, hideEvent, component);
removeClass(tooltip,showClass); removeClass(tooltip,showClass);
!!self[animation] ? emulateTransitionEnd(tooltip, hideTrigger) : hideTrigger(); self[animation] ? emulateTransitionEnd(tooltip, hideTrigger) : hideTrigger();
} }
}, self[delay]); }, self[delay]);
}; };

2
src/static/scripts/md5.js

@ -21,7 +21,7 @@
/* eslint-disable strict */ /* eslint-disable strict */
;(function($) { (function($) {
'use strict' 'use strict'
/** /**

Loading…
Cancel
Save