Index: src/webapp/tests/manual-tests/html/InlineEdit.html =================================================================== --- src/webapp/tests/manual-tests/html/InlineEdit.html (revision 7204) +++ src/webapp/tests/manual-tests/html/InlineEdit.html (working copy) @@ -1,124 +0,0 @@ - - - - - Inline Edit Manual Test Page - - - - - - - - - - - - - - - - - - - -
-
Click me to edit (you'll be able to undo)...
-
- -
-
-
- No, click me instead! - -
-
-
Oh, pick me! Pick me!
-
- -
-
- -
- I don't have a built-in input field. -
- -

The following line is an empty inline edit with default invitation text: - -

- -

The following line is an empty inline edit with custom invitation text: - -

- -

- These edit fields - are all set up - with a single - function call - and with - selectOnEdit true., - as well as each being individually undoable. -

- -

- These edit fields - are all set up - with a single - function call - and with - selectOnEdit true.(2nd copy), - as well as each being individually undoable. -

- -

The following text is an empty inline edit 'span' with NO invitation text: - - This text is after the inline edit. -

- -

- This text has a tooltip with the default text. -

- -

- This text has a tooltip with custom text. -

- -

- This control features an undoable edit mode -

- - - - - - -
- This is an editable table cell. -
- -
-
- This is another editable table cell. -
- -
-
- - - - Index: src/webapp/tests/manual-tests/html/rich-text-inline-edit.html =================================================================== --- src/webapp/tests/manual-tests/html/rich-text-inline-edit.html (revision 7204) +++ src/webapp/tests/manual-tests/html/rich-text-inline-edit.html (working copy) @@ -1,77 +0,0 @@ - - - - - Rich Text Inline Edit - - - - - - - - - - - - - - - - - - - - - - - - - -

Rich Text Inline Editor

- -
-

- - Lorem ipsum... - - - - - -

- -

- - Lorem ipsum 2... - - - - - -

- -

- - Lorem FCK... - - - - - -

- - -

- - Lorem FCK 2... - - - - - -

- -
- - Index: src/webapp/tests/manual-tests/css/InlineEdit.css =================================================================== --- src/webapp/tests/manual-tests/css/InlineEdit.css (revision 7204) +++ src/webapp/tests/manual-tests/css/InlineEdit.css (working copy) @@ -1,20 +0,0 @@ -form, #inline-edit4 { - padding: 1em; -} - -.fl-inlineEdit-invitation { - background-color: #FFECB3; - /* See http://www.quirksmode.org/css/cursor.html#note for cross-platform recommendation */ - cursor: pointer; -} - -.fl-inlineEdit-invitation-text { - color: #999999; -} -.fl-inlineEdit-focus { - border: 2px solid #777777; -} - -.fluid-undo { - font-size: smaller; -} \ No newline at end of file Index: src/webapp/tests/manual-tests/js/rich-text-inline-edit.js =================================================================== --- src/webapp/tests/manual-tests/js/rich-text-inline-edit.js (revision 7204) +++ src/webapp/tests/manual-tests/js/rich-text-inline-edit.js (working copy) @@ -1,48 +0,0 @@ -/* -Copyright 2008-2009 University of Cambridge -Copyright 2008-2009 University of Toronto -Copyright 2007-2009 University of California, Berkeley - -Licensed under the Educational Community License (ECL), Version 2.0 or the New -BSD license. You may not use this file except in compliance with one these -Licenses. - -You may obtain a copy of the ECL 2.0 License and BSD License at -https://source.fluidproject.org/svn/LICENSE.txt -*/ - -(function ($) { - $(function () { - - function makeButtons(editor) { - $(".save", editor.container).click(function(){ - editor.finish(); - return false; - }); - - $(".cancel", editor.container).click(function(){ - editor.cancel(); - return false; - }); - } - - var richEditor = fluid.inlineEdit.tinyMCE("#rich-editable-paragraph"); - makeButtons(richEditor); - - var richEditor2 = fluid.inlineEdit.tinyMCE("#rich-editable-paragraph-2", - //{tinyMCE: {theme: "advanced"}} // this will cause the entire browser to become corrupted - {tinyMCE: {width: 1024}} - ); - makeButtons(richEditor2); - - var richEditor3 = fluid.inlineEdit.FCKEditor("#FCK-editable-paragraph", - {FCKEditor: {BasePath: "../lib/fckeditor/"}}); - makeButtons(richEditor3); - - var richEditor4 = fluid.inlineEdit.FCKEditor("#FCK-editable-paragraph-2", - {FCKEditor: {Width: 600, BasePath: "../lib/fckeditor/"}} - ); - makeButtons(richEditor4); - - }); -})(jQuery); \ No newline at end of file Index: src/webapp/standalone-demos/quick-start-examples/inlineEdit/html/inline-edit.html =================================================================== --- src/webapp/standalone-demos/quick-start-examples/inlineEdit/html/inline-edit.html (revision 0) +++ src/webapp/standalone-demos/quick-start-examples/inlineEdit/html/inline-edit.html (revision 0) @@ -0,0 +1,220 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CD Database Example + + + + +

Example 1. Default Inline Edit

+

The words in bold are editable.

+
+ The quick brown fox jumped over the lazy dogs and then... +
+ + +

Example 2. Customized edit field

+

The words in bold are editable. with a maximum of 35 characters allowed.

+
+ The quick brown fox jumped + over the lazy dogs + + + + and then... +
+ + +

Example 3. Multiple Inline Edits

+

The words in bold are editable.

+
+ +

The quick brown fox jumped over the lazy dogs and then...

+

The quick brown fox over jumped the lazy dogs and then...

+

The quick brown fox jumped over the lazy dogs and then...

+ +

The quick brown fox jumped over the lazy dogs and then...

+

The over quick brown fox jumped the lazy dogs and then...

+
+ + +

Example 4: Rich Text Inline Edit (using Tiny_MCE editor)

+
+ +

After a hiatus, Portishead is back with their first studio + album in 6 years. Third brings back the familiar and + the new, and none of this is best exemplified than in the track + Machine Gun. It seems that regardless of how Portishead + sounds now, the one thing that has stayed constant is their refusal to be ordinary. +

+
+ + + + +
+ + +

Example 5: Rich Text Inline Edit (using FCKEditor)

+
+ +

After a hiatus, Portishead is back with their first studio + album in 6 years. Third brings back the familiar and + the new, and none of this is best exemplified than in the track + Machine Gun. It seems that regardless of how Portishead + sounds now, the one thing that has stayed constant is their refusal to be ordinary. +

+
+ + + + +
+ + +
+

Example 6: Mist Themed Combination of Various Inline Editors

+ + + + + + + + + + + + + + + + + + + + + +
ArtistAlbumYearGenrePlay LengthLabelReview 1Review 2
+ Portishead + Third2008Triphop49 min 13 sUniversal Music +
+ +

After a hiatus, Portishead is back with their first studio + album in 6 years. Third brings back the familiar and + the new, and none of this is best exemplified than in the track + Machine Gun. It seems that regardless of how Portishead + sounds now, the one thing that has stayed constant is their refusal to be ordinary. +

+
+ + + + +
+
+
+ +

...It feels like a staggering transformation and a return to + form that was never lost, an ideal adaptation by a group that many + people didn't know they needed to hear again. +

+
+ + + + +
+
+
+ + +
+

Example 7: HC Themed Combination of Various Inline Editors

+ + + + + + + + + + + + + + + + + + + + + +
ArtistAlbumYearGenrePlay LengthLabelReview 1Review 2
+ Portishead + Third2008Triphop49 min 13 sUniversal Music +
+ +

After a hiatus, Portishead is back with their first studio + album in 6 years. Third brings back the familiar and + the new, and none of this is best exemplified than in the track + Machine Gun. It seems that regardless of how Portishead + sounds now, the one thing that has stayed constant is their refusal to be ordinary. +

+
+ + + + +
+
+
+ +

...It feels like a staggering transformation and a return to + form that was never lost, an ideal adaptation by a group that many + people didn't know they needed to hear again. +

+
+ + + + +
+
+
+ + + + + Index: src/webapp/standalone-demos/quick-start-examples/inlineEdit/html/InlineEdit.html =================================================================== --- src/webapp/standalone-demos/quick-start-examples/inlineEdit/html/InlineEdit.html (revision 7204) +++ src/webapp/standalone-demos/quick-start-examples/inlineEdit/html/InlineEdit.html (working copy) @@ -1,163 +0,0 @@ - - - - - Inline Edit Examples - - - - - - - - - - - - - - - - - - - -

Example 1. Default Inline Edit

-

The words in bold are editable.

-
- The quick brown fox jumped over the lazy dogs and then... -
- - -

Example 2. Customized edit field

-

The words in bold are editable. with a maximum of 35 characters allowed.

-
- The quick brown fox jumped - over the lazy dogs - - - - and then... -
- - -

Example 3. Multiple Inline Edits

-

The words in bold are editable.

-
-

The quick brown fox jumped over the lazy dogs and then...

-

The quick brown fox over jumped the lazy dogs and then...

-

The quick brown fox jumped over the lazy dogs and then...

-

The quick brown fox jumped over the lazy dogs and then...

-

The over quick brown fox jumped the lazy dogs and then...

-
- -
-

Example 4. MIST Themed Inline Edit Scenarios

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
SubjectFromDateDelete?
Lecture Room ChangeGeorge O'Malley Jun 10, 2008 1:12 pm
Reading for Tuesday's LabMeredith Grey Jun 6, 2008 1:12 pm
DNA Polymorphism Exam on ThursdayMeredith Grey Jun 4, 2008 10:00 am
-
-
- -
-

Example 5. HIGH CONTRAST Themed Inline Edit Scenarios

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
SubjectFromDateDelete?
Lecture Room ChangeGeorge O'Malley Jun 10, 2008 1:12 pm
Reading for Tuesday's LabMeredith Grey Jun 6, 2008 1:12 pm
DNA Polymorphism Exam on ThursdayMeredith Grey Jun 4, 2008 10:00 am
-
-
- - - - - \ No newline at end of file Index: src/webapp/standalone-demos/quick-start-examples/inlineEdit/css/inline-edit.css =================================================================== --- src/webapp/standalone-demos/quick-start-examples/inlineEdit/css/inline-edit.css (revision 0) +++ src/webapp/standalone-demos/quick-start-examples/inlineEdit/css/inline-edit.css (revision 0) @@ -0,0 +1,21 @@ +.combination-table td{ + vertical-align: top; +} +.review1, .review2{ + width: 400px; +} + +#customEdit .fl-inlineEdit-invitation { + border : 1px solid red; + font : bold 12px "Arial"; + background : yellow; + color : red; + padding : 2px; +} + +#customizedEditField { + border : 1px dashed #999; + font : bold 12px "Arial"; + color : #999; + padding : 2px; +} \ No newline at end of file Index: src/webapp/standalone-demos/quick-start-examples/inlineEdit/css/InlineEdit.css =================================================================== --- src/webapp/standalone-demos/quick-start-examples/inlineEdit/css/InlineEdit.css (revision 7204) +++ src/webapp/standalone-demos/quick-start-examples/inlineEdit/css/InlineEdit.css (working copy) @@ -1,22 +0,0 @@ -body {font:normal 12px "Arial","Tahoma",sans-serif} -table {border-collapse:collapse;} -table th {padding:3px 5px;} -table td {padding:3px 5px;} -h1 {font-size:125%; padding:5px;} - -#customEditorContainer {} - -#customEdit .fl-inlineEdit-invitation { - border : 1px solid red; - font : bold 12px "Arial"; - background : yellow; - color : red; - padding : 2px; -} - -#customizedEditField { - border : 1px dashed #999; - font : bold 12px "Arial"; - color : #999; - padding : 2px; -} \ No newline at end of file Index: src/webapp/standalone-demos/quick-start-examples/inlineEdit/js/inline-edit-example.js =================================================================== --- src/webapp/standalone-demos/quick-start-examples/inlineEdit/js/inline-edit-example.js (revision 0) +++ src/webapp/standalone-demos/quick-start-examples/inlineEdit/js/inline-edit-example.js (revision 0) @@ -0,0 +1,200 @@ +/* +Copyright 2008-2009 University of Cambridge +Copyright 2008-2009 University of Toronto +Copyright 2007-2009 University of California, Berkeley + +Licensed under the Educational Community License (ECL), Version 2.0 or the New +BSD license. You may not use this file except in compliance with one these +Licenses. + +You may obtain a copy of the ECL 2.0 License and BSD License at +https://source.fluidproject.org/svn/LICENSE.txt +*/ + +/*global jQuery*/ +/*global fluid*/ +/*global demo*/ + +var demo = demo || {}; +(function ($, fluid) { + + /** + * Initialize all simple inline edit components present on the inline-edit + * demo. + */ + var inlineSimpleEditSetup = function () { + + /** + * Customize the undo subcomponent appearance. + * @param {Object} that + * @param {Object} targetContainer + */ + var myUndoRenderer = function (that, targetContainer) { + var markup = "" + + "Undo your edit" + + "Redo your edit" + + ""; + var markupNode = $(markup); + targetContainer.append(markupNode); + return markupNode; + }; + + /** + * Simple inline edits example. + */ + fluid.inlineEdit("#simpleEdit", { + componentDecorators: { + type: "fluid.undoDecorator" + } + }); + + fluid.inlineEdit("#artistName", { + componentDecorators: { + type: "fluid.undoDecorator" + } + }); + + fluid.inlineEdit("#artistNameHC", { + componentDecorators: { + type: "fluid.undoDecorator" + } + }); + + /** + * Customized simple inline edit. + */ + fluid.inlineEdit("#customEdit", { + selectors: { + editContainer: "#customEditorContainer", + edit: "#customizedEditField" + }, + componentDecorators: { + type: "fluid.undoDecorator", + options: { + renderer: myUndoRenderer + } + } + }); + + /** + * Multiple inline text editors. + */ + fluid.inlineEdits("#multipleEdit", { + selectors: { + text: ".editableText", + editables : "p" + }, + componentDecorators: { + type: "fluid.undoDecorator" + } + }); + }; + + /** + * Initialize all rich text inline edit components present on the inline-edit + * demo. + */ + var inlineRichTextEditSetup = function () { + + var editors = []; + + /** + * Create cancel and save buttons for a rich inline editor. + * @param {Object} editor + */ + var makeButtons = function (editor) { + $(".save", editor.container).click(function(){ + editor.finish(); + return false; + }); + + $(".cancel", editor.container).click(function(){ + editor.cancel(); + return false; + }); + }; + + /** + * Create cancel and save buttons for all rich text editors. + * @param {Object} editors array of rich inline editors. + */ + var makeAllButtons = function (editors) { + while (editors.length > 0) { + makeButtons(editors.pop()); + } + } + + /** + * Tiny MCE rich inline text editor example. + */ + editors.push( + fluid.inlineEdit.tinyMCE("#richEdit1", { + tinyMCE: {width: 1024}, + componentDecorators: { + type: "fluid.undoDecorator" + } + }) + ); + + /** + * FCK Editor rich inline text editor example. + */ + editors.push( + fluid.inlineEdit.FCKEditor("#richEdit2", { + FCKEditor: {BasePath: "../../../../tests/manual-tests/lib/fckeditor/"}, + componentDecorators: { + type: "fluid.undoDecorator" + } + }) + ); + + /** + * Mist theme block. + */ + editors.push( + fluid.inlineEdit.tinyMCE("#cd-review1", { + tinyMCE: {width: 300}, + componentDecorators: { + type: "fluid.undoDecorator" + } + }) + ); + + editors.push( + fluid.inlineEdit.FCKEditor("#cd-review2", { + FCKEditor: {BasePath: "../../../../tests/manual-tests/lib/fckeditor/"}, + componentDecorators: { + type: "fluid.undoDecorator" + } + }) + ); + + /** + * High Contrast theme block. + */ + editors.push( + fluid.inlineEdit.tinyMCE("#cd-review1HC", { + tinyMCE: {width: 300}, + componentDecorators: { + type: "fluid.undoDecorator" + } + }) + ); + + editors.push( + fluid.inlineEdit.FCKEditor("#cd-review2HC", { + FCKEditor: {BasePath: "../../../../tests/manual-tests/lib/fckeditor/"}, + componentDecorators: { + type: "fluid.undoDecorator" + } + }) + ); + + makeAllButtons(editors); + }; + + demo.initInlineEdit = function () { + inlineSimpleEditSetup(); + inlineRichTextEditSetup(); + }; +})(jQuery, fluid); \ No newline at end of file