Professional Documents
Culture Documents
Demo For Jinplace
Demo For Jinplace
Demo For Jinplace
and
Downloads
The database. See your changes here. Object First name Last name Favourites Wild geese that fly with the person John Smith moon on their wingsh person2 Mary Jones
Direction E W
< ! -T h i sw i l ls e tu pa l le d i tf i e l d st h a th a v ec l a s s' e d i t a b l e 'o nt h ep a g < ! -S oi tw i l lo n l yb es h o w ni nt h i se x a m p l e> < s c r i p t > $ ( ' . e d i t a b l e ' ) . j i n p l a c e ( ) ; < / s c r i p t >
Try it out
Click on the name to edit Firstname John
https://bytebucket.org/itinken/jinplace/wiki/demo.html
1/7
7/20/13
Using a textarea
By default you get a normal text input. To get a textarea, then you need to set the type to textarea. Set data-type to t e x t a r e a Everything else is the same as for regular inputs 1 2 3 4 < d i vc l a s s = " e d i t a b l e " d a t a t y p e = " t e x t a r e a "d a t a u r l = " / i n t e r n a l / p e r s o n / f a v o u r i t e s " > W i l dg e e s et h a tf l yw i t ht h em o o no nt h e i rw i n g s < / d i v >
Try it out
Click textarea, modify and click outside it. Wild geese that fly with the moon on their wingsh
D i r e c t i o n : < s p a nc l a s s = " e d i t a b l e "d a t a t y p e = " s e l e c t "d a t a u r l = " / i n t e r n a l / p e r s o n / d i r e c t d a t a d a t a = ' [ [ " E " ," E a s t " ] ,[ " W " ," W e s t " ] ] ' > E a s t < / s p a n >
Try it out
Click to enable the select box. Direction: East
https://bytebucket.org/itinken/jinplace/wiki/demo.html 2/7
7/20/13
With ok button
You can add an OK button which must be clicked to accept the change. Adds an OK button that is clicked to submit the data. The text on the button is set to your value. Clicking outside the field, cancels 1 2 3 4 L a s tn a m e< s p a nc l a s s = " e d i t a b l e " d a t a u r l = " / i n t e r n a l / p e r s o n / l a s t n a m e " d a t a i n p u t c l a s s = " s h o r t " d a t a o k b u t t o n = " G o " > S m i t h < / s p a n >
Try it out
Editing field and click the "Go" button. Last name Smith
https://bytebucket.org/itinken/jinplace/wiki/demo.html
7/20/13
6 7 8
Try it out
Click OK to accept changes, Cancel to throw them away. Some of their favourite things Wild geese that fly with the moon on their wings OK Cancel
Try it out
Click on the "edit" button to start. Clicking on the field does not activate the edit controls. First name: John
Edit
https://bytebucket.org/itinken/jinplace/wiki/demo.html
4/7
7/20/13
< p > D i r e c t i o n : < s p a nc l a s s = " e d i t a b l e 2 "d a t a t y p e = " s e l e c t " d a t a d a t a = ' [ [ " N " , " N o r t h " ] , [ " S " , " S o u t h " ] , [ " E " , " E a s t " ] , d a t a a t t r i b u t e = " d i r e c t i o n " > W e s t < / s p a n > < p > F a v o u r i t e s : < d i vc l a s s = " e d i t a b l e 2 "d a t a t y p e = " t e x t a r e a "d a t a a t t r i b u t e = " f a v o u r i t e s " d a t a n i l = " [ C l i c kt oa d d ] " > < / d i v > < s c r i p t > $ ( ' . e d i t a b l e 2 ' ) . j i n p l a c e ( { u r l :' / i n t e r n a l / p e r s o n 2 ' , n i l :' [ E d i t ] ' } ) ; < / s c r i p t >
Try it out
All the fields can be edited and viewed in the person2 row at the top of this page.
7/20/13
[Click to add]
Try it out
When you click to edit, the edit text will be fetched from the server. So the current (probably stale in this demo) text is disregarded. You can view the results of your edits in the person2 row at the top of this page.
7/20/13
See also
Documentation
and
Downloads
https://bytebucket.org/itinken/jinplace/wiki/demo.html
7/7