Skip to content

Commit 4a663a3

Browse files
committed
Editable: renamed Inlineedit to Editable. The latter is simpler than the former and has been preferred by the core team.
1 parent bbf8009 commit 4a663a3

File tree

6 files changed

+36
-36
lines changed

6 files changed

+36
-36
lines changed

demos/inlineedit/default.html renamed to demos/editable/default.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" >
5-
<title>jQuery UI Inlineedit - Default functionality</title>
5+
<title>jQuery UI Editable - Default functionality</title>
66
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
77
<script src="../../jquery-1.6.2.js"></script>
88
<script src="../../ui/jquery.ui.core.js"></script>
99
<script src="../../ui/jquery.ui.widget.js"></script>
10-
<script src="../../ui/jquery.ui.inlineedit.js"></script>
10+
<script src="../../ui/jquery.ui.editable.js"></script>
1111
<link rel="stylesheet" href="../demos.css">
1212
<style>
1313
.demo p { font-size: 14px; }
1414
.demo p span { display: inline-block; }
1515
</style>
1616
<script>
1717
$(function() {
18-
$( "#inlineedit" ).inlineedit();
18+
$( "#editable" ).editable();
1919
});
2020
</script>
2121
</head>
@@ -24,7 +24,7 @@
2424
<div class="demo">
2525

2626
<p>
27-
Name: <b><span id="inlineedit">John Doe</span></b>
27+
Name: <b><span id="editable">John Doe</span></b>
2828
</p>
2929

3030
</div><!-- End demo -->

demos/inlineedit/index.html renamed to demos/editable/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
<title>jQuery UI Inlineedit Demos</title>
5+
<title>jQuery UI Editable Demos</title>
66
<link rel="stylesheet" href="../demos.css">
77
</head>
88
<body>

themes/base/jquery.ui.base.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@import url("jquery.ui.button.css");
1515
@import url("jquery.ui.datepicker.css");
1616
@import url("jquery.ui.dialog.css");
17-
@import url("jquery.ui.inlineedit.css");
17+
@import url("jquery.ui.editable.css");
1818
@import url("jquery.ui.menubar.css");
1919
@import url("jquery.ui.menu.css");
2020
@import url("jquery.ui.progressbar.css");

themes/base/jquery.ui.editable.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* jQuery UI Editable @VERSION
3+
*
4+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5+
* Dual licensed under the MIT or GPL Version 2 licenses.
6+
* http://jquery.org/license
7+
*
8+
* http://docs.jquery.com/UI/Tooltip#theming
9+
*/
10+
.ui-editable-content { position: relative; }
11+
.ui-editable-placeholder { color: #555; font-style: italic; }
12+
.ui-editable-input { margin-right: 16px; padding: .2em; border: none; background: none; height: 32px; }
13+
.ui-editable-button { position: absolute; width: 16px; height: 16px; display: block; right: 0; }
14+
.ui-editable .ui-editable-button { background: none; border: none; }
15+
.ui-editable-save { top: 0; }
16+
.ui-editable-cancel { bottom: 0; }

themes/base/jquery.ui.inlineedit.css

Lines changed: 0 additions & 16 deletions
This file was deleted.

ui/jquery.ui.inlineedit.js renamed to ui/jquery.ui.editable.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
/*
2-
* jQuery UI Inlineedit @VERSION
2+
* jQuery UI Editable @VERSION
33
*
44
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
55
* Dual licensed under the MIT or GPL Version 2 licenses.
66
* http://jquery.org/license
77
*
8-
* http://docs.jquery.com/UI/Inlineedit (to be created)
8+
* http://docs.jquery.com/UI/Editable (to be created)
99
*
1010
* Depends:
1111
* jquery.ui.core.js
1212
* jquery.ui.widget.js
1313
*/
1414
(function( $, undefined ) {
1515

16-
var uiInlineEditClasses = 'ui-inlineedit-content ui-widget ui-widget-content ui-corner-all',
17-
buttonClass = 'ui-inlineedit-button',
18-
cancelClass = 'ui-inlineedit-cancel',
19-
inputClass = 'ui-inlineedit-input',
20-
placeholderClass = 'ui-inlineedit-placeholder',
21-
saveClass = 'ui-inlineedit-save',
16+
var uiEditableClasses = 'ui-editable-content ui-widget ui-widget-content ui-corner-all',
17+
buttonClass = 'ui-editable-button',
18+
cancelClass = 'ui-editable-cancel',
19+
inputClass = 'ui-editable-input',
20+
placeholderClass = 'ui-editable-placeholder',
21+
saveClass = 'ui-editable-save',
2222
cancelIconClass = 'ui-icon ui-icon-cancel',
2323
saveIconClass = 'ui-icon ui-icon-disk',
2424
defaultStateClass = 'ui-state-default',
2525
highlightStateClass = 'ui-state-highlight',
2626
hoverStateClass = 'ui-state-hover';
2727

28-
$.widget( "ui.inlineedit", {
28+
$.widget( "ui.editable", {
2929
version: "@VERSION",
3030
widgetEventPrefix: "edit",
3131

@@ -60,7 +60,7 @@ $.widget( "ui.inlineedit", {
6060
return;
6161
}
6262

63-
if ($this.hasClass('ui-inlineedit') || $this.hasClass(placeholderClass)) {
63+
if ($this.hasClass('ui-editable') || $this.hasClass(placeholderClass)) {
6464
self._edit();
6565
return;
6666
}
@@ -76,7 +76,7 @@ $.widget( "ui.inlineedit", {
7676
return;
7777
}
7878

79-
if ($this.hasClass('ui-inlineedit') || $this.hasClass(placeholderClass)) {
79+
if ($this.hasClass('ui-editable') || $this.hasClass(placeholderClass)) {
8080
self.element.addClass(highlightStateClass);
8181
return;
8282
}
@@ -89,12 +89,12 @@ $.widget( "ui.inlineedit", {
8989
return;
9090
}
9191

92-
if ($this.hasClass('ui-inlineedit') || $this.hasClass(placeholderClass)) {
92+
if ($this.hasClass('ui-editable') || $this.hasClass(placeholderClass)) {
9393
self.element.removeClass(highlightStateClass);
9494
return;
9595
}
9696
})
97-
.addClass( 'ui-inlineedit' );
97+
.addClass( 'ui-editable' );
9898
},
9999

100100
_show: function() {
@@ -115,7 +115,7 @@ $.widget( "ui.inlineedit", {
115115

116116
_form: function() {
117117
return $( "<form></form>" )
118-
.addClass( uiInlineEditClasses )
118+
.addClass( uiEditableClasses )
119119
.append( $( "<input/>" )
120120
.attr( "type", "text" )
121121
.attr( "value", this.value() )

0 commit comments

Comments
 (0)