colonymech / docs / www / colonyscout / internal / editTest.php @ f59acf11
History | View | Annotate | Download (1.29 KB)
1 | f59acf11 | Dan Shope | <?php
|
---|---|---|---|
2 | |||
3 | /* No hardoced URL's in examples. Just copy the folder to server. */
|
||
4 | $folder = str_replace(basename($_SERVER['PHP_SELF']), '', $_SERVER['PHP_SELF']); |
||
5 | $url = sprintf('http://%s%sphp/', $_SERVER['SERVER_NAME'], $folder); |
||
6 | |||
7 | ?>
|
||
8 | <html>
|
||
9 | <head>
|
||
10 | |||
11 | <script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script> |
||
12 | <script src="js/jquery.jeditable.js" type="text/javascript" charset="utf-8"></script> |
||
13 | |||
14 | <script type="text/javascript" charset="utf-8"> |
||
15 |
|
||
16 | $(function() {
|
||
17 | $(".dblclick").editable("<?php print $url ?>echo.php", { |
||
18 | indicator : "<img src='img/indicator.gif'>", |
||
19 | tooltip : "Doubleclick to edit...", |
||
20 | event : "dblclick", |
||
21 | style : "inherit" |
||
22 | }); |
||
23 | }); |
||
24 | </script>
|
||
25 | |||
26 | <style type="text/css"> |
||
27 | #sidebar {
|
||
28 | width: 0px;
|
||
29 | }
|
||
30 |
|
||
31 | #content {
|
||
32 | width: 770px;
|
||
33 | }
|
||
34 |
|
||
35 | .editable input[type=submit] {
|
||
36 | color: #F00;
|
||
37 | font-weight: bold;
|
||
38 | }
|
||
39 | .editable input[type=button] {
|
||
40 | color: #0F0;
|
||
41 | font-weight: bold;
|
||
42 | }
|
||
43 | |||
44 | </style>
|
||
45 | </head>
|
||
46 | |||
47 | |||
48 | <body>
|
||
49 | |||
50 | <h2>Different events</h2> |
||
51 | <p>
|
||
52 | <b class="click" style="display: inline">Click me if you dare!</b></> or maybe you should |
||
53 | <b class="dblclick" style="display: inline">doubleclick</b> instead? Really lazy people can just |
||
54 | <b class="mouseover" style="display: inline">mouseover me</b>... |
||
55 | </p>
|
||
56 | |||
57 | </body>
|
||
58 | </html>
|
||
59 | |||
60 |