Skip to content

Commit

Permalink
bugfix #15 and new release
Browse files Browse the repository at this point in the history
  • Loading branch information
corinis committed Feb 16, 2017
1 parent f4d6611 commit e2950e2
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 21 deletions.
1 change: 0 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ module.exports = function( grunt ) {
},
options: {
banner: "/*!\n * jQuery.jsForm v<%= pkg.version %> | (c) 2015 <%=pkg.author.name%> <%=pkg.author.url%>\n * Usage: <%=pkg.homepage%>\n */\n",
sourceMap: "js/jquery.jsForm.min.map",
beautify: {
ascii_only: true
}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ You can also check out some [Demos](http://www.gargan.org/jsform/index.jsp).

# Download

Current Version: 1.3.5
Current Version: 1.3.6

* [Minified](https://github.com/corinis/jsForm/raw/master/js/jquery.jsForm.min.js) + [map](https://raw.github.com/corinis/jsForm/master/dist/jquery.jsForm.min.map)
* [Minified](https://github.com/corinis/jsForm/raw/master/js/jquery.jsForm.min.js)
* [Combined Source](https://github.com/corinis/jsForm/raw/master/js/jquery.jsForm.js)

On bower.io:
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-jsform",
"version": "1.3.5",
"version": "1.3.6",
"homepage": "https://github.com/corinis/jsForm",
"authors": [
"Niko <[email protected]>"
Expand Down
23 changes: 19 additions & 4 deletions js/jquery.jsForm-1.3.5.js → js/jquery.jsForm-1.3.6.js
Original file line number Diff line number Diff line change
Expand Up @@ -1863,7 +1863,11 @@
}

// delete the current line
line.on("delete", function(){
line.on("delete", function(ev, target){
// avoid acting on events not meant for me
if(target && target[0] !== this) {
return;
}
var ele = $(this);
var pojo = $(ele).data().pojo;
var base = $(this).closest(".collection");
Expand All @@ -1873,6 +1877,10 @@
});

line.on("sortUp", function(){
// avoid acting on events not meant for me
if(target && target[0] !== this) {
return;
}
// check if there is an up
var ele = $(this);
var prev = ele.prev(".POJO");
Expand All @@ -1886,6 +1894,10 @@
that._reorder(ele);
});
line.on("sortDown", function(){
// avoid acting on events not meant for me
if(target && target[0] !== this) {
return;
}
// check if there is a down
var ele = $(this);
var next = ele.next(".POJO");
Expand All @@ -1901,13 +1913,16 @@


$(".delete", line).click(function(){
$(this).closest(".POJO").trigger("delete");
var ele = $(this).closest(".POJO");
ele.trigger("delete", [ele]);
});
$(".sortUp", line).click(function(){
$(this).closest(".POJO").trigger("sortUp");
var ele = $(this).closest(".POJO");
ele.trigger("sortUp", [ele]);
});
$(".sortDown", line).click(function(){
$(this).closest(".POJO").trigger("sortDown");
var ele = $(this).closest(".POJO");
ele.trigger("sortDown", [ele]);
});

// if collection is sortable: refresh it
Expand Down
23 changes: 19 additions & 4 deletions js/jquery.jsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1863,7 +1863,11 @@
}

// delete the current line
line.on("delete", function(){
line.on("delete", function(ev, target){
// avoid acting on events not meant for me
if(target && target[0] !== this) {
return;
}
var ele = $(this);
var pojo = $(ele).data().pojo;
var base = $(this).closest(".collection");
Expand All @@ -1873,6 +1877,10 @@
});

line.on("sortUp", function(){
// avoid acting on events not meant for me
if(target && target[0] !== this) {
return;
}
// check if there is an up
var ele = $(this);
var prev = ele.prev(".POJO");
Expand All @@ -1886,6 +1894,10 @@
that._reorder(ele);
});
line.on("sortDown", function(){
// avoid acting on events not meant for me
if(target && target[0] !== this) {
return;
}
// check if there is a down
var ele = $(this);
var next = ele.next(".POJO");
Expand All @@ -1901,13 +1913,16 @@


$(".delete", line).click(function(){
$(this).closest(".POJO").trigger("delete");
var ele = $(this).closest(".POJO");
ele.trigger("delete", [ele]);
});
$(".sortUp", line).click(function(){
$(this).closest(".POJO").trigger("sortUp");
var ele = $(this).closest(".POJO");
ele.trigger("sortUp", [ele]);
});
$(".sortDown", line).click(function(){
$(this).closest(".POJO").trigger("sortDown");
var ele = $(this).closest(".POJO");
ele.trigger("sortDown", [ele]);
});

// if collection is sortable: refresh it
Expand Down
6 changes: 3 additions & 3 deletions js/jquery.jsForm.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions js/jquery.jsForm.min.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion jsForm.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"data",
"mvvm"
],
"version": "1.3.5",
"version": "1.3.6",
"author": {
"name": "Niko Berger"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jquery.jsForm",
"title": "jQuery JSON Form - jsForm",
"description": "jQuery based form library that allows you to handle data within a js object (i.e. JSON) with html forms.\nYou can modify all fields/properties by simply creating a html form with the correct naming schema (MVVM Pattern).\n\nThe main features of this library are:\n Full standard html with data available in a js object\n Update an existing js object with changes done within a form\n Fully internationalizable with number format, currency and date formatting\n Provide basic functions for formatting (i.e. date/time, money) using html markup\n Provide form validation functionality\n handle collections (arrays) with subobjects\n provides helper methods to handle array manipulation (add new entry/remove an entry, sorting) using only html markup\n Can be used in connection with an autocomplete function to add new array objects",
"version": "1.3.5",
"version": "1.3.6",
"homepage": "https://github.com/corinis/jsForm",
"author": {
"name": "Niko Berger",
Expand Down
23 changes: 19 additions & 4 deletions src/jquery.jsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1863,7 +1863,11 @@
}

// delete the current line
line.on("delete", function(){
line.on("delete", function(ev, target){
// avoid acting on events not meant for me
if(target && target[0] !== this) {
return;
}
var ele = $(this);
var pojo = $(ele).data().pojo;
var base = $(this).closest(".collection");
Expand All @@ -1873,6 +1877,10 @@
});

line.on("sortUp", function(){
// avoid acting on events not meant for me
if(target && target[0] !== this) {
return;
}
// check if there is an up
var ele = $(this);
var prev = ele.prev(".POJO");
Expand All @@ -1886,6 +1894,10 @@
that._reorder(ele);
});
line.on("sortDown", function(){
// avoid acting on events not meant for me
if(target && target[0] !== this) {
return;
}
// check if there is a down
var ele = $(this);
var next = ele.next(".POJO");
Expand All @@ -1901,13 +1913,16 @@


$(".delete", line).click(function(){
$(this).closest(".POJO").trigger("delete");
var ele = $(this).closest(".POJO");
ele.trigger("delete", [ele]);
});
$(".sortUp", line).click(function(){
$(this).closest(".POJO").trigger("sortUp");
var ele = $(this).closest(".POJO");
ele.trigger("sortUp", [ele]);
});
$(".sortDown", line).click(function(){
$(this).closest(".POJO").trigger("sortDown");
var ele = $(this).closest(".POJO");
ele.trigger("sortDown", [ele]);
});

// if collection is sortable: refresh it
Expand Down

0 comments on commit e2950e2

Please sign in to comment.