Skip to content

Commit

Permalink
Deprecate dijit.form.InlineEditBox and switch existing tests to use d…
Browse files Browse the repository at this point in the history
…ijit.InlineEditBox. Refs #4098
  • Loading branch information
wkeese committed Oct 19, 2007
1 parent 5c7cd36 commit 8823e6d
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 54 deletions.
2 changes: 1 addition & 1 deletion dijit-all.js
Expand Up @@ -12,14 +12,14 @@ dojo.require("dijit.TitlePane");
dojo.require("dijit.Toolbar");
dojo.require("dijit.Tooltip");
dojo.require("dijit.Tree");
dojo.require("dijit.InlineEditBox");

dojo.require("dijit.form.Button");
dojo.require("dijit.form.CheckBox");
dojo.require("dijit.form.ComboBox");
dojo.require("dijit.form.CurrencyTextBox");
dojo.require("dijit.form.DateTextBox");
dojo.require("dijit.form.FilteringSelect");
dojo.require("dijit.form.InlineEditBox");
dojo.require("dijit.form.NumberSpinner");
dojo.require("dijit.form.NumberTextBox");
dojo.require("dijit.form.Slider");
Expand Down
2 changes: 2 additions & 0 deletions form/InlineEditBox.js
Expand Up @@ -8,6 +8,8 @@ dojo.require("dijit.form.Button");

dojo.requireLocalization("dijit", "common");

dojo.deprecated("dijit.form.InlineEditBox is deprecated, use dijit.InlineEditBox instead", "", "1.1");

dojo.declare(
"dijit.form.InlineEditBox",
[dijit.form._FormWidget, dijit._Container],
Expand Down
7 changes: 0 additions & 7 deletions tests/_base/test_focusWidget.html
Expand Up @@ -15,7 +15,6 @@
dojo.require("dijit.form.DateTextBox");
dojo.require("dijit.form.ComboBox");
dojo.require("dijit.form.NumberSpinner");
dojo.require("dijit.form.InlineEditBox");
dojo.require("dijit.form.Button");
dojo.require("dijit.Menu");
dojo.require("dijit.layout.ContentPane");
Expand Down Expand Up @@ -110,12 +109,6 @@ <h3>Widget Focus Test</h3>
<label for="spinner">a Spinner widget:</label>
<input id=spinner dojoType="dijit.form.NumberSpinner" value=100><br>

<label for="editSpinner">a Spinner widget inside an inlineEditBox:</label>
<div id=editSpinner dojoType=dijit.form.InlineEditBox>
<input id=spinner2 dojoType="dijit.form.NumberSpinner" value=100>
</div>
<br>

<label for="button">a Combobutton widget:</label>
<div id=button dojoType="dijit.form.ComboButton" tabIndex=0>
<span>push me</span>
Expand Down
3 changes: 1 addition & 2 deletions tests/form/test_InlineEditBox.html
Expand Up @@ -44,8 +44,7 @@
</style>
</head>
<body>
<h1 class="testTitle">Dijit InlineEditBox Test</h1>

<h1 style="color: red; margin-bottom: 5em;">dijit.form.InlineEditBox is deprecated, use <a href="../test_InlineEditBox.html">dijit.InlineEditBox</a> instead</h1>
<div>
The following tests each show a plain element followed by an editable element.
The plain element and editable element should look the same (font, font-size, block vs. inline) etc.,
Expand Down
11 changes: 2 additions & 9 deletions tests/layout/combotab.html
@@ -1,15 +1,8 @@
<div dojoType="dojo.data.ItemFileReadStore" jsId="stateStore"
url="../_data/states.json"></div>
State:
<span id="editable" dojoType="dijit.form.InlineEditBox">
<input dojoType="dijit.form.ComboBox"
value="California"
store="stateStore"
searchAttr="name"
name="state2"
promptMessage="Please enter a state"
id="datatest"
>
<span id="editable" dojoType="dijit.InlineEditBox" editor="dijit.form.ComboBox"
editorParams="{value: 'California', store: stateStore, searchAttr: 'name', promptMessage='Please enter a state'}">
<script type="dojo/connect" event="onChange">
// connect to editable onChange event, Note that we dont need to disconnect
console.log('User selected:'+this.getValue());
Expand Down
2 changes: 1 addition & 1 deletion tests/layout/test_ContentPane.html
Expand Up @@ -12,7 +12,7 @@
dojo.require("dijit.layout.ContentPane");
dojo.require("dojo.data.ItemFileReadStore");
dojo.require("dijit.form.ComboBox");
dojo.require("dijit.form.InlineEditBox");
dojo.require("dijit.InlineEditBox");
dojo.require("dojo.parser"); // scan page for widgets and instantiate them
</script>
<style>
Expand Down
54 changes: 20 additions & 34 deletions themes/themeTester.html
Expand Up @@ -73,7 +73,7 @@
dojo.require("dijit.form.TextBox");
dojo.require("dijit.form.DateTextBox");
dojo.require("dijit.form.Button");
dojo.require("dijit.form.InlineEditBox");
dojo.require("dijit.InlineEditBox");
dojo.require("dijit.form.NumberSpinner");
dojo.require("dijit.form.Slider");

Expand Down Expand Up @@ -618,24 +618,23 @@ <h2>dijit.Editor:</h2>
<hr class="spacer">


<h2 class="testTitle">dijit.form.InlineEditBox + dijit.form.TextBox</h2>
<h2 class="testTitle">dijit.InlineEditBox + dijit.form.TextBox</h2>

This is an InLine Sentence,
<span id="editable" style="font-size:larger;" dojoType="dijit.form.InlineEditBox" onChange="myHandler(this.id,arguments[0])">
<input dojoType="dijit.form.TextBox" value="Edit me - I trigger the onChange callback">
</span>
And Keep the text around me satic.
This is an editable header,
<h3 id="editable" style="font-size:larger;" dojoType="dijit.InlineEditBox" onChange="myHandler(this.id,arguments[0])">
Edit me - I trigger the onChange callback
</h3>
And keep the text around me static.

<hr class="spacer">

<h2>dijit.form.InlineEditBox + dijit.form.Textarea</h2>
<h2>dijit.InlineEditBox + dijit.form.Textarea</h2>

(HTML before)
<div style="width:300px;">
<p><span id="areaEditable" dojoType="dijit.form.InlineEditBox">
<textarea dojoType="dijit.form.Textarea">I'm one big paragraph. Go ahead and <i>edit</i> me. <b>I dare you.</b> The quick brown fox jumped over the lazy dog. Blah blah blah blah blah blah blah ...</textarea>
</span></p>
</div>
<p id="areaEditable" dojoType="dijit.InlineEditBox" editor="dijit.form.Textarea">
I'm one big paragraph. Go ahead and <i>edit</i> me. <b>I dare you.</b>
The quick brown fox jumped over the lazy dog. Blah blah blah blah blah blah blah ...
</p>
(HTML after)

<p>
Expand All @@ -650,40 +649,27 @@ <h2>dijit.form.InlineEditBox + dijit.form.Textarea</h2>
<h2>dijit.form.DateTextBox:</h2>

(HTML inline before)
<span id="backgroundArea" dojoType="dijit.form.InlineEditBox">
<input name="date" value="2005-12-30"
dojoType="dijit.form.DateTextBox"
required="true"
promptMessage="Please enter a date."
invalidMessage="Invalid date.">
</span>
<span id="backgroundArea" dojoType="dijit.InlineEditBox" editor="dijit.form.DateTextBox" width="170px">12/30/2005</span>
(HTML after)

<hr class="spacer">

<h2>dijit.form.TimeTextBox:</h2>

(HTML inline before)
<span id="timePicker" dojoType="dijit.form.InlineEditBox">
<input name="date" value="T09:00:00"
dojoType="dijit.form.TimeTextBox"
required="true"
promptMessage="Please enter a time."
invalidMessage="Invalid time.">
</span>
<span id="timePicker" dojoType="dijit.InlineEditBox" editor="dijit.form.TimeTextBox" width="150px">9:00 AM</span>
(HTML after)

<hr class="spacer">


<h2>dijit.form.FilteringSelect + Inline + remote data store:</h2>
(HTML block before)
<p id="backgroundArea2" dojoType="dijit.form.InlineEditBox">
<input searchField="name" keyField="abbreviation" id="setvaluetest"
dojoType="dijit.form.FilteringSelect" value="IA"
store="stateStore" name="state1" autoComplete="true"
promptMessage="Please enter a state">
</p>
(HTML inline before)
<span id="backgroundArea2" dojoType="dijit.InlineEditBox" editor="dijit.form.FilteringSelect"
editorParams="{store: stateStore, autoComplete: true, promptMessage: 'Please enter a state'}"
width="300px">
Indiana
</span>
(HTML after)

</div><!-- end fourth upper tab -->
Expand Down

0 comments on commit 8823e6d

Please sign in to comment.