Skip to content

Commit a5f417e

Browse files
committed
Editable: Renamed submit method and event to save.
1 parent 4437744 commit a5f417e

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

demos/editable/buttons.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
.click(function() {
4141
$( ".sample" ).editable("start");
4242
});
43-
$( "#submit-all" )
43+
$( "#save-all" )
4444
.button()
4545
.click(function() {
46-
$( ".sample" ).editable("submit");
46+
$( ".sample" ).editable("save");
4747
});
4848
$( "#cancel-all" )
4949
.button()
@@ -58,7 +58,7 @@
5858
<div class="demo">
5959

6060
<button id="start-all">Edit all</button>
61-
<button id="submit-all">Submit all changes</button>
61+
<button id="save-all">Submit all changes</button>
6262
<button id="cancel-all">Skip all changes</button>
6363

6464
<p>
@@ -86,7 +86,7 @@
8686
Click at text to edit it.
8787
</p>
8888
<p>
89-
Save your changes by submiting (pressing Enter or clicking the save button).
89+
Save your changes by pressing Enter or clicking the save button.
9090
</p>
9191
<p>
9292
Abort your changes by pressing Esc or clicking the cancel button.

demos/editable/default.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
}
2323

2424
$( "#editable" )
25-
.bind( "editsubmit", function( ev, ui ) {
26-
log( "submit: " + ui.value );
25+
.bind( "editsave", function( ev, ui ) {
26+
log( "save: " + ui.value );
2727
})
2828
.bind( "editchange", function( ev, ui ) {
2929
log( "change: " + ui.value );
@@ -57,7 +57,7 @@
5757
Click at 'John Doe' text to edit it.
5858
</p>
5959
<p>
60-
Save your changes by submiting (pressing Enter or clicking the save button).
60+
Save your changes by pressing Enter or clicking the save button.
6161
</p>
6262
<p>
6363
Abort your changes by pressing Esc or clicking the cancel button.

demos/editable/editors.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
.click(function() {
4747
$( ".sample" ).editable("start");
4848
});
49-
$( "#submit-all" )
49+
$( "#save-all" )
5050
.button()
5151
.click(function() {
52-
$( ".sample" ).editable("submit");
52+
$( ".sample" ).editable("save");
5353
});
5454
$( "#cancel-all" )
5555
.button()
@@ -64,7 +64,7 @@
6464
<div class="demo">
6565

6666
<button id="start-all">Edit all</button>
67-
<button id="submit-all">Submit all changes</button>
67+
<button id="save-all">Submit all changes</button>
6868
<button id="cancel-all">Skip all changes</button>
6969

7070
<p>
@@ -88,7 +88,7 @@
8888
Click at text to edit it.
8989
</p>
9090
<p>
91-
Save your changes by submiting (pressing Enter or clicking the save button).
91+
Save your changes by pressing Enter or clicking the save button.
9292
</p>
9393
<p>
9494
Abort your changes by pressing Esc or clicking the cancel button.

demos/editable/listener_event.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
event: 'mouseenter'
2525
});
2626
$( "#editable" )
27-
.bind( "editsubmit", function( ev, ui ) {
28-
log( "submit: " + ui.value );
27+
.bind( "editsave", function( ev, ui ) {
28+
log( "save: " + ui.value );
2929
})
3030
.bind( "editchange", function( ev, ui ) {
3131
log( "change: " + ui.value );
@@ -53,7 +53,7 @@
5353

5454
<div class="demo-description">
5555
<p>
56-
Save your changes by submiting (pressing Enter or clicking the save button).
56+
Save your changes by pressing Enter or clicking the save button.
5757
</p>
5858
<p>
5959
Abort your changes by pressing Esc or clicking the cancel button.

demos/editable/validation.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
}
3939

4040
$( "#editable" )
41-
.bind( "editsubmit", function( ev, ui ) {
42-
log( "submit: " + ui.value );
41+
.bind( "editsave", function( ev, ui ) {
42+
log( "save: " + ui.value );
4343
cleanError();
4444
})
4545
.bind( "editchange", function( ev, ui ) {
@@ -86,7 +86,7 @@
8686
Click at the number to edit it, try odd and even numbers to check it out.
8787
</p>
8888
<p>
89-
Save your changes by submiting (pressing Enter or clicking the save button).
89+
Save your changes by pressing Enter or clicking the save button.
9090
</p>
9191
<p>
9292
Abort your changes by pressing Esc or clicking the cancel button.

ui/jquery.ui.editable.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ $.widget( "ui.editable", {
4848
}
4949
},
5050

51-
submit: function() {
51+
save: function() {
5252
$( "form", this.element ).submit();
5353
},
5454

@@ -105,7 +105,7 @@ $.widget( "ui.editable", {
105105

106106
if ( !this._editing ) {}
107107
else if ( $this.hasClass( saveClass ) || $this.parent().hasClass( saveClass ) ) {
108-
this.submit();
108+
this.save();
109109
return false;
110110
}
111111
else if ( $this.hasClass( cancelClass ) || $this.parent().hasClass( cancelClass ) ) {
@@ -128,7 +128,7 @@ $.widget( "ui.editable", {
128128
if(this._skipEnterSubmit) {
129129
break;
130130
}
131-
this.submit();
131+
this.save();
132132
return false;
133133
case keyCode.ESCAPE:
134134
this._cancel();
@@ -257,7 +257,7 @@ $.widget( "ui.editable", {
257257
value: newValue
258258
};
259259

260-
if ( this._trigger( "submit", event, hash ) === false ) {
260+
if ( this._trigger( "save", event, hash ) === false ) {
261261
return;
262262
}
263263
if ( this.value() !== newValue ) {

0 commit comments

Comments
 (0)