Skip to content

Commit

Permalink
Merge pull request #31 from peckadesign/30-iterace-nad-array
Browse files Browse the repository at this point in the history
30 iterace nad array
  • Loading branch information
zipper authored Nov 16, 2020
2 parents 99c1254 + 2966ea8 commit 77db4db
Show file tree
Hide file tree
Showing 7 changed files with 4,496 additions and 4,761 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ $ cat bower.json

## Changelog

### v1.3.12
- oprava iterování přes `Array`

### v1.3.11
- přidání rumunského (`ro`) a srbského (`sr`) překladu

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery.pdbox",
"version": "1.3.11",
"version": "1.3.12",
"homepage": "https://github.com/peckadesign/jquery.pdbox",
"authors": [
"PeckaDesign, s.r.o <support@peckadesign.cz>"
Expand Down
22 changes: 11 additions & 11 deletions dist/js/jquery.pdbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @copyright Copyright (c) 2014-2020 PeckaDesign, s.r.o
* @license MIT
*
* @version 1.3.11
* @version 1.3.12
*/
$.pdBox = (function () {

Expand Down Expand Up @@ -94,18 +94,18 @@ $.pdBox = (function () {
this.$el = null; // element, který otevřel pdbox

var optName = '';
for (var e in events) {
optName = getEventOptName(events[e]);
for (i = 0; i < events.length; i++) {
optName = getEventOptName(events[i]);

if (typeof options[optName] === 'object') {
for (fn in options[optName]) {
if (options[optName].hasOwnProperty(fn) && typeof options[optName][fn] === 'function') {
this.addEventListener(events[e], options[optName][fn]);
this.addEventListener(events[i], options[optName][fn]);
}
}
}
else if (typeof options[optName] === 'function') {
this.addEventListener(events[e], options[optName]);
this.addEventListener(events[i], options[optName]);
}

// vymazání hodnoty, ta slouží k uchování ad-hoc handlerů přes element
Expand Down Expand Up @@ -242,7 +242,7 @@ $.pdBox = (function () {
* @param isOptions flag, zda jde opravdu o options a ne kontext předaný z onLoad callbacku
*/
PdBox.prototype.setOptions = function (options, isOptions) {
var e;
var i;
var optName;
var dataName;

Expand All @@ -252,8 +252,8 @@ $.pdBox = (function () {
$.extend(this.options, this.defaults);

// slouží k ad-hoc handlerům, proto můžeme smazat
for (e in events) {
optName = getEventOptName(events[e]);
for (i = 0; i < events.length; i++) {
optName = getEventOptName(events[i]);

this.options[optName] = null;
}
Expand All @@ -266,9 +266,9 @@ $.pdBox = (function () {
elOptions.width = this.$el.data('pdboxWidth');
elOptions.className = this.$el.data('pdboxClassName') ? this.$el.data('pdboxClassName') + ' ' + this.defaults.className : this.defaults.className;

for (e in events) {
dataName = getEventDataName(events[e]);
optName = getEventOptName(events[e]);
for (i = 0; i < events.length; i++) {
dataName = getEventDataName(events[i]);
optName = getEventOptName(events[i]);

elOptions[optName] = this.$el.data(dataName);
}
Expand Down
4 changes: 2 additions & 2 deletions dist/js/jquery.pdbox.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 77db4db

Please sign in to comment.