The branch, master has been updated via 42f04687c39dd1bae0f58270900dff3924453efb (commit) via 0e5c8a9497ee30c62863191ee82490b3bbf51c37 (commit) via b3faf9cf42c98de53c1722c15208554a81ff62cf (commit) via ff5e4c83612ce9de4feadea570389499a66a824d (commit) via d28d7daba1a15b184cebaadc94dad787170260e5 (commit) via 5bf85368313d488b57d0edce531de8b172dba8f3 (commit) via 2d8932b95e848741f387af9b4fb0998b5e96570e (commit) via c1f6904eba56f816b203049a7bf2a529903da1e3 (commit) via 3750dcbb2fddc1e513c3ededf94acce95f549d12 (commit) via 73b9166240e1ed5cca413499825bf096d87d1536 (commit) via 770b1c7dd39c979cfafb018e0ecd46bbfc975d0e (commit) via 8a87d944a56d64073cfc840ea43a5f61d9d0cbe1 (commit) via ff292800be9d276c06949ae4dc79c373de3099f7 (commit) via 916db6a9362418d7cb4ee6ee3f9491f379febc8f (commit) via 84ad2a865c82dac2924c04299952d5e87bf71ae9 (commit) via 823decbaf4fbbf2feab9f2af2dc42324742226f5 (commit) via 8493052a2f24c9a8213af50359632e2efd6d6945 (commit) via 467e6beaf7e9c58bbba7d809bbc654829f8439b6 (commit) via 4d27d21e80ef895990c919a5164fac535c9283d4 (commit) via cf64d5282be2c3c20d323256c8aa9fc295fd5ee8 (commit) via c89e0aa2ab2629eb9b47255b070eb14eef75aa19 (commit) via 039d56f97534f2c720df73f4e5325f3a9c838023 (commit) via 2397b6f06f4056a8c3e9bd189adf2cc52646116b (commit) via fcc2f82fa5bbdb3552cae6f15d60246a19442303 (commit) via 78e7565cfd9779065e98ffc1bf8078d73d9a709d (commit) via 83f7170304de06b1789e32105424bdf216bd3227 (commit) via 7c18b8106a8f8b72dbc2b7a2de8da11fec0f975c (commit) via 5814064b81cff9c581a83e773ff7f78fd026eebc (commit) via 169686bccfd6466c631e38c40133227171fee3cb (commit) via eb7c64dfad5203de7c51e87e096b1d677f2dc5ca (commit) via b81ae2e6cc04f004192c127ae6955d11d4356191 (commit) via 031e5c97714f62f39c15fe63cb512d1a6d4e67ce (commit) via fcf671b382eb2c9956fe5d46abccc86fd2da314f (commit) via 0ea798b7940a8ffdb7d4aade42679d860f45e9a1 (commit) via 07c067a83225dc5edab572b3f113915fdae3cff8 (commit) via d37b0fa24609cc4abd9c5c605179519be3c68e5f (commit) via 3ba2aa446336c5bdf48eebf8e116830c2e350f40 (commit) via d7f8b537e32920b6822dd5cdc89a947ffa5d6079 (commit) via 53d7bfa2b1f8261d7ea609ff1ec2d96a3a4c780a (commit) via 46e360de1e827c396a01c26fab0c25b79370d6dd (commit) via 0b933d261484ceb095b47e8aa5ffcb71c362bd54 (commit) via 3ac62ac37f1cab119ef3579e3a8268805ccb8fe0 (commit) via 403e2ed2bfeec79a4bfff4952e3a1499b8c269cd (commit) via 803b4639bd4e036c246d40b545ff9eb573f1181a (commit) via aad9a55b81635ec2c6e25b6f79e0f989508436f6 (commit) via 082345bdfa6b0661a3a6196269ead832e01cd862 (commit) via d0e41349ee45d0d46b32a8fac0856470233097e1 (commit) via c2b78975ab87a7848004c7b211ae8df2b843b92f (commit) via c991a19ceb32493ff0cb27a69a2843546d39ddba (commit) via e9c055c5bc7a94636d7b6cd5801f2044bca86cca (commit) via 5ed509bd89bd363e09b2c6593fc6ea4e6a03dab7 (commit) via 3e3234b156a300e5517d1239755ff49270f24000 (commit) via d64685c25afe282eabe73f23ba5ba2cbfcb541e0 (commit) via ff5544d1c7ecd8efec1a52931f4bb113780118f2 (commit) via e16b77c0a5198b0f79175018e77909037826ae22 (commit) via 04fbe12ac7f6e3efe1b8f81b3d39fe8d11e4cc1f (commit) via 1a66a483cf127c216fad038c9299520442e49b95 (commit) via b0717ff8d5aa263b572746711acc50f7996ea87d (commit) via 86d787267ddca21ee3f478662d46aafd2c8736b4 (commit) via 0e73a2e1b3edae033a8a1ffd86b20a54237b070d (commit) via e1d0b67af6a178e7674b3377435fcb4df4ed1362 (commit) via 13bcc44628d42991818bb8d0e1504f33a52f5721 (commit) via 0cca021b23384898dd96839288176fb749047273 (commit) via dfc7171d6fbd2ef500b23232b8e2f9baaf3f3402 (commit) via ce359e7506533803b97f287d77abd0ef935e2841 (commit) via 88c89b2329fd2474050a73cdb6b1c9b383c0e154 (commit) via 2e9b5a08d21ae7d97fbc0ec8923c45d5260854ec (commit) via 8b8917ff747592e4ae72a5f7c7eda3f735102d57 (commit) via 9fbbafdf7cbd5d06af0d37142724faa809799b51 (commit) via dc81db3c76ba47e467a563b6fb4393589f9318e0 (commit) via 1ab6f82e1dd3e7db2e86fd79b238297e5c56d6e6 (commit) via 6c532a3ba33cceb49f64d19a0f4e82e59a5d1ad4 (commit) via 40c325c4442985ea86345015f852f774bea44f58 (commit) via 211d76b012cbcf6173de2fd75f4b5fe585e2eeb9 (commit) via 3cf69dfbb89b5476de32828a636dd3e27e912a50 (commit) via 3b7f35d5c9f2c25c4fe5d7322fbe79c181637764 (commit) via 6bfeb440764226a7bbe8c8a2c3828809ca4b21d5 (commit) via d174e8b41c6df7b8e38900e2fc4d8560b1501bd5 (commit) via 9ac5173788e174c76865394257c535cf69ecf4b6 (commit) via 67d8f469d24580ae8ad623ad2a175ae017acf193 (commit) via c4c57b86c32647c1a1dcb0b9125d35fbced18aac (commit) via 80981154486608cc154d6ab461847e999336566e (commit) via 159696ba69d85fc59e4f82a343c3ad7a45f1636f (commit) via 6b69e631d72bf08eb32e36c52d99d87db6cf4912 (commit) via f4b47d4cf0a846f394570673429a9759eb5f4991 (commit) via 566851d210104cb44ec536dc195b05707e0496c8 (commit) via 25ae3e2387ca8936434d427fb5eb1f2d0a4f6d13 (commit) via 36680cff27ab43da1051b3877f9134b06ad2873f (commit) via 518638fa87b73c9fb02d341f47a7a01ddb5e4f5b (commit) via c40fed887e27558aa0d07ca10ce69534c4636813 (commit) via ad6e109e0ee20b61fc5b1107856387cd09aeb2d0 (commit) via 9ae87854ed6474e111a4d77a0d747215e1cff9f6 (commit) from 551cc9a465269ab1208438d81fc0d492ce797366 (commit)
- Log ----------------------------------------------------------------- commit 42f04687c39dd1bae0f58270900dff3924453efb Author: Marc Delisle marc@infomarc.info Date: Wed Jun 15 08:12:58 2011 -0400
ChangeLog entries for Aris Feryanto's latest new features
commit 0e5c8a9497ee30c62863191ee82490b3bbf51c37 Merge: 551cc9a465269ab1208438d81fc0d492ce797366 b3faf9cf42c98de53c1722c15208554a81ff62cf Author: Marc Delisle marc@infomarc.info Date: Wed Jun 15 08:06:30 2011 -0400
Merge commit 'b3faf9cf42c98de53c1722c15208554a81ff62cf'
commit b3faf9cf42c98de53c1722c15208554a81ff62cf Merge: ff5e4c83612ce9de4feadea570389499a66a824d 5bf85368313d488b57d0edce531de8b172dba8f3 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 15 07:23:37 2011 +0700
Merge branch 'tablesort' into aris
commit ff5e4c83612ce9de4feadea570389499a66a824d Merge: d28d7daba1a15b184cebaadc94dad787170260e5 2d8932b95e848741f387af9b4fb0998b5e96570e Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 15 07:23:32 2011 +0700
Merge branch 'colresize' into aris
commit d28d7daba1a15b184cebaadc94dad787170260e5 Merge: 73b9166240e1ed5cca413499825bf096d87d1536 25dc50a5dd8a69f435272d37f7febafffc1d0ff0 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 15 07:23:06 2011 +0700
Fix merge conflict with origin/master
commit 5bf85368313d488b57d0edce531de8b172dba8f3 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 15 07:10:16 2011 +0700
Fix bug in 'Remember Sorting': modified caused error in PHP
commit 2d8932b95e848741f387af9b4fb0998b5e96570e Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 14 23:38:30 2011 +0700
Better column order remembering AJAX
commit c1f6904eba56f816b203049a7bf2a529903da1e3 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 14 22:57:47 2011 +0700
Change PMA_isBrowsing to PMA_isSelect
commit 3750dcbb2fddc1e513c3ededf94acce95f549d12 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 14 22:47:19 2011 +0700
Column resizing & reordering: better support without javascript
commit 73b9166240e1ed5cca413499825bf096d87d1536 Merge: 8a87d944a56d64073cfc840ea43a5f61d9d0cbe1 770b1c7dd39c979cfafb018e0ecd46bbfc975d0e Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 14 11:56:06 2011 +0700
Merge branch 'colresize' into aris
commit 770b1c7dd39c979cfafb018e0ecd46bbfc975d0e Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 14 11:55:35 2011 +0700
Fix: column resizing & reordering under db_search.php (also enable inline edit support)
commit 8a87d944a56d64073cfc840ea43a5f61d9d0cbe1 Merge: ff292800be9d276c06949ae4dc79c373de3099f7 916db6a9362418d7cb4ee6ee3f9491f379febc8f Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 14 09:44:10 2011 +0700
Merge branch 'tablesort' into aris
commit ff292800be9d276c06949ae4dc79c373de3099f7 Merge: 467e6beaf7e9c58bbba7d809bbc654829f8439b6 84ad2a865c82dac2924c04299952d5e87bf71ae9 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 14 09:44:05 2011 +0700
Merge branch 'colresize' into aris
commit 916db6a9362418d7cb4ee6ee3f9491f379febc8f Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 14 09:41:32 2011 +0700
Remember sorting: Fix criteria for browsing, following PMA_isBrowsing
commit 84ad2a865c82dac2924c04299952d5e87bf71ae9 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 14 09:38:34 2011 +0700
Fix PMA_isBrowsing criteria
commit 823decbaf4fbbf2feab9f2af2dc42324742226f5 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 14 09:37:51 2011 +0700
Add 'Click to mark' hint
commit 8493052a2f24c9a8213af50359632e2efd6d6945 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 14 08:40:04 2011 +0700
Fix column resizing and reordering compatibility with IE
commit 467e6beaf7e9c58bbba7d809bbc654829f8439b6 Merge: 2397b6f06f4056a8c3e9bd189adf2cc52646116b 4d27d21e80ef895990c919a5164fac535c9283d4 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Mon Jun 13 13:49:12 2011 +0700
Merge branch 'colresize' into aris
commit 4d27d21e80ef895990c919a5164fac535c9283d4 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Mon Jun 13 13:46:18 2011 +0700
No reorder column for table with only 1 column
commit cf64d5282be2c3c20d323256c8aa9fc295fd5ee8 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Mon Jun 13 12:08:17 2011 +0700
Remember column order only in 'Browse' tab
commit c89e0aa2ab2629eb9b47255b070eb14eef75aa19 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Mon Jun 13 11:21:09 2011 +0700
Merge hint for column sorting
commit 039d56f97534f2c720df73f4e5325f3a9c838023 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Mon Jun 13 08:28:21 2011 +0700
Better CSS unit
commit 2397b6f06f4056a8c3e9bd189adf2cc52646116b Merge: 169686bccfd6466c631e38c40133227171fee3cb fcc2f82fa5bbdb3552cae6f15d60246a19442303 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Sun Jun 12 11:12:23 2011 +0700
Merge branch 'colresize' into aris
commit fcc2f82fa5bbdb3552cae6f15d60246a19442303 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Sun Jun 12 11:11:03 2011 +0700
Change column reordering text
commit 78e7565cfd9779065e98ffc1bf8078d73d9a709d Author: Aris Feryanto aris_feryanto@yahoo.com Date: Sun Jun 12 10:58:15 2011 +0700
Fix bug in column reordering tooltip
commit 83f7170304de06b1789e32105424bdf216bd3227 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Sun Jun 12 10:51:53 2011 +0700
Preloading of column pointer arrow
commit 7c18b8106a8f8b72dbc2b7a2de8da11fec0f975c Author: Aris Feryanto aris_feryanto@yahoo.com Date: Sun Jun 12 10:29:15 2011 +0700
Better jQuery animation for column reordering popup balloon
commit 5814064b81cff9c581a83e773ff7f78fd026eebc Author: Aris Feryanto aris_feryanto@yahoo.com Date: Sun Jun 12 09:38:34 2011 +0700
Compress col_pointer images
commit 169686bccfd6466c631e38c40133227171fee3cb Merge: 031e5c97714f62f39c15fe63cb512d1a6d4e67ce eb7c64dfad5203de7c51e87e096b1d677f2dc5ca Author: Aris Feryanto aris_feryanto@yahoo.com Date: Sat Jun 11 10:23:11 2011 +0700
Merge branch 'colresize' into aris
commit eb7c64dfad5203de7c51e87e096b1d677f2dc5ca Merge: b81ae2e6cc04f004192c127ae6955d11d4356191 54c062c0ad19db67250fde19eff7f44f31429e74 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Sat Jun 11 10:19:10 2011 +0700
Merge remote-tracking branch 'origin/master' into colresize
commit b81ae2e6cc04f004192c127ae6955d11d4356191 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Sat Jun 11 10:17:58 2011 +0700
Add column dragging hint & some css prettifier
commit 031e5c97714f62f39c15fe63cb512d1a6d4e67ce Merge: 0ea798b7940a8ffdb7d4aade42679d860f45e9a1 fcf671b382eb2c9956fe5d46abccc86fd2da314f Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri Jun 10 17:29:03 2011 +0700
Merge branch 'colresize' into aris
commit fcf671b382eb2c9956fe5d46abccc86fd2da314f Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri Jun 10 17:27:11 2011 +0700
Use __() for string in 'Restore column order' button, change javascript code style
commit 0ea798b7940a8ffdb7d4aade42679d860f45e9a1 Merge: d37b0fa24609cc4abd9c5c605179519be3c68e5f 07c067a83225dc5edab572b3f113915fdae3cff8 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri Jun 10 09:33:24 2011 +0700
Merge branch 'colresize' into aris
commit 07c067a83225dc5edab572b3f113915fdae3cff8 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri Jun 10 09:32:39 2011 +0700
Fix for 'Restore column order'
commit d37b0fa24609cc4abd9c5c605179519be3c68e5f Merge: d7f8b537e32920b6822dd5cdc89a947ffa5d6079 3ba2aa446336c5bdf48eebf8e116830c2e350f40 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri Jun 10 08:48:41 2011 +0700
Merge branch 'colresize' into aris
commit 3ba2aa446336c5bdf48eebf8e116830c2e350f40 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri Jun 10 08:47:47 2011 +0700
Fix: remove system's drag and drop when dragging table header link
commit d7f8b537e32920b6822dd5cdc89a947ffa5d6079 Merge: 46e360de1e827c396a01c26fab0c25b79370d6dd 53d7bfa2b1f8261d7ea609ff1ec2d96a3a4c780a Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri Jun 10 08:06:29 2011 +0700
Merge branch 'colresize' into aris
commit 53d7bfa2b1f8261d7ea609ff1ec2d96a3a4c780a Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri Jun 10 08:05:37 2011 +0700
Change 'Restore table' button to 'Restore column order'
commit 46e360de1e827c396a01c26fab0c25b79370d6dd Merge: 3ac62ac37f1cab119ef3579e3a8268805ccb8fe0 0b933d261484ceb095b47e8aa5ffcb71c362bd54 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Thu Jun 9 14:44:10 2011 +0700
Merge branch 'colresize' into aris
commit 0b933d261484ceb095b47e8aa5ffcb71c362bd54 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Thu Jun 9 14:43:34 2011 +0700
Fix more bug: Reordering not work correctly if table structure changed
commit 3ac62ac37f1cab119ef3579e3a8268805ccb8fe0 Merge: 403e2ed2bfeec79a4bfff4952e3a1499b8c269cd 803b4639bd4e036c246d40b545ff9eb573f1181a Author: Aris Feryanto aris_feryanto@yahoo.com Date: Thu Jun 9 13:04:57 2011 +0700
Merge branch 'colresize' into aris
commit 403e2ed2bfeec79a4bfff4952e3a1499b8c269cd Merge: aad9a55b81635ec2c6e25b6f79e0f989508436f6 90099b7b5de240e5789ea8bfd29fcb03e867d825 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Thu Jun 9 13:04:53 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit 803b4639bd4e036c246d40b545ff9eb573f1181a Author: Aris Feryanto aris_feryanto@yahoo.com Date: Thu Jun 9 13:04:41 2011 +0700
Fix bug: Remember sorting and Column reordering not work correctly if table structure changed
commit aad9a55b81635ec2c6e25b6f79e0f989508436f6 Merge: 082345bdfa6b0661a3a6196269ead832e01cd862 d0e41349ee45d0d46b32a8fac0856470233097e1 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 8 13:59:42 2011 +0700
Merge branch 'colresize' into aris
commit 082345bdfa6b0661a3a6196269ead832e01cd862 Merge: c2b78975ab87a7848004c7b211ae8df2b843b92f 4333f4c55b40b94f2f8208d1751cf6c743317704 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 8 13:59:38 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit d0e41349ee45d0d46b32a8fac0856470233097e1 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 8 13:58:12 2011 +0700
Add disabled state for 'Restore table' button
commit c2b78975ab87a7848004c7b211ae8df2b843b92f Merge: c991a19ceb32493ff0cb27a69a2843546d39ddba e9c055c5bc7a94636d7b6cd5801f2044bca86cca Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 7 18:27:01 2011 +0700
Merge branch 'colresize' into aris
commit c991a19ceb32493ff0cb27a69a2843546d39ddba Merge: ff5544d1c7ecd8efec1a52931f4bb113780118f2 ca78ac3dc5fe7fe6c35f650430af2c192d666e10 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 7 18:26:18 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit e9c055c5bc7a94636d7b6cd5801f2044bca86cca Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 7 18:22:22 2011 +0700
Column reordering: remember the last column order
commit 5ed509bd89bd363e09b2c6593fc6ea4e6a03dab7 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 7 12:51:22 2011 +0700
Fix column resize bug: wrong resize when RepeatCells work
commit 3e3234b156a300e5517d1239755ff49270f24000 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 7 12:37:23 2011 +0700
Fix bug: Header not displayed correctly when RowActionLinks = Nowhere, RepeatCells = some value that enough to display repeated header
commit d64685c25afe282eabe73f23ba5ba2cbfcb541e0 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue Jun 7 12:32:14 2011 +0700
Add column reordering compatibility with RepeatCells configuration
commit ff5544d1c7ecd8efec1a52931f4bb113780118f2 Merge: 04fbe12ac7f6e3efe1b8f81b3d39fe8d11e4cc1f e16b77c0a5198b0f79175018e77909037826ae22 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Mon Jun 6 16:10:18 2011 +0700
Merge branch 'colresize' into aris
commit e16b77c0a5198b0f79175018e77909037826ae22 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Mon Jun 6 16:03:08 2011 +0700
Add different column pointer for vertical display
commit 04fbe12ac7f6e3efe1b8f81b3d39fe8d11e4cc1f Merge: 1a66a483cf127c216fad038c9299520442e49b95 b0717ff8d5aa263b572746711acc50f7996ea87d Author: Aris Feryanto aris_feryanto@yahoo.com Date: Mon Jun 6 14:58:27 2011 +0700
Merge branch 'colresize' into aris
commit 1a66a483cf127c216fad038c9299520442e49b95 Merge: 0e73a2e1b3edae033a8a1ffd86b20a54237b070d 8b47a1dbd4a38fa12abe57f0eb0cbf74f1e433de Author: Aris Feryanto aris_feryanto@yahoo.com Date: Mon Jun 6 14:58:24 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit b0717ff8d5aa263b572746711acc50f7996ea87d Author: Aris Feryanto aris_feryanto@yahoo.com Date: Mon Jun 6 14:54:07 2011 +0700
Inline edit: fix compatibility with custom 'action column' (RowActionLinks) position
commit 86d787267ddca21ee3f478662d46aafd2c8736b4 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Mon Jun 6 12:20:41 2011 +0700
Fix column resizing and reordering compatibility with custom actions column position
commit 0e73a2e1b3edae033a8a1ffd86b20a54237b070d Merge: 0cca021b23384898dd96839288176fb749047273 e1d0b67af6a178e7674b3377435fcb4df4ed1362 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri Jun 3 09:59:56 2011 +0700
Merge branch 'colresize' into aris
commit e1d0b67af6a178e7674b3377435fcb4df4ed1362 Merge: 13bcc44628d42991818bb8d0e1504f33a52f5721 d6b26b2d8f0cdd4b4bfb798e0b34f2974007fa85 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri Jun 3 09:59:35 2011 +0700
Fix merge conflict caused by new syntax highlighter
commit 13bcc44628d42991818bb8d0e1504f33a52f5721 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri Jun 3 09:47:25 2011 +0700
Fix bug in firefox 4 / ubuntu 11.04, column resize buggy for the second click on the same column
commit 0cca021b23384898dd96839288176fb749047273 Merge: ce359e7506533803b97f287d77abd0ef935e2841 dfc7171d6fbd2ef500b23232b8e2f9baaf3f3402 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Thu Jun 2 15:02:22 2011 +0700
Merge branch 'colresize' into aris
commit dfc7171d6fbd2ef500b23232b8e2f9baaf3f3402 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Thu Jun 2 15:00:16 2011 +0700
Fix column reordering's compatibility with IE8. No graying table anymore
commit ce359e7506533803b97f287d77abd0ef935e2841 Merge: 88c89b2329fd2474050a73cdb6b1c9b383c0e154 2e9b5a08d21ae7d97fbc0ec8923c45d5260854ec Author: Aris Feryanto aris_feryanto@yahoo.com Date: Thu Jun 2 12:15:30 2011 +0700
Merge branch 'colresize' into aris
commit 88c89b2329fd2474050a73cdb6b1c9b383c0e154 Merge: 8b8917ff747592e4ae72a5f7c7eda3f735102d57 d4892728458b6090a148f1f12dd41c4add336fb8 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Thu Jun 2 12:15:25 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit 2e9b5a08d21ae7d97fbc0ec8923c45d5260854ec Author: Aris Feryanto aris_feryanto@yahoo.com Date: Thu Jun 2 12:09:58 2011 +0700
Add column pointer when reordering and some fixes for Original theme
commit 8b8917ff747592e4ae72a5f7c7eda3f735102d57 Merge: dc81db3c76ba47e467a563b6fb4393589f9318e0 9fbbafdf7cbd5d06af0d37142724faa809799b51 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 1 23:40:04 2011 +0700
Merge branch 'colresize' into aris
commit 9fbbafdf7cbd5d06af0d37142724faa809799b51 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 1 23:39:15 2011 +0700
Disable noSelect after drag ended
commit dc81db3c76ba47e467a563b6fb4393589f9318e0 Merge: 6c532a3ba33cceb49f64d19a0f4e82e59a5d1ad4 1ab6f82e1dd3e7db2e86fd79b238297e5c56d6e6 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 1 22:28:12 2011 +0700
Merge branch 'colresize' into aris
commit 1ab6f82e1dd3e7db2e86fd79b238297e5c56d6e6 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 1 22:25:29 2011 +0700
Fix: restrict action column header to be moved
commit 6c532a3ba33cceb49f64d19a0f4e82e59a5d1ad4 Merge: 40c325c4442985ea86345015f852f774bea44f58 211d76b012cbcf6173de2fd75f4b5fe585e2eeb9 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 1 18:01:14 2011 +0700
Merge branch 'colresize' into aris
commit 40c325c4442985ea86345015f852f774bea44f58 Merge: 6bfeb440764226a7bbe8c8a2c3828809ca4b21d5 0dbc9f4a3c7fa46baed1477f001e37dad14fc908 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 1 18:01:00 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit 211d76b012cbcf6173de2fd75f4b5fe585e2eeb9 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 1 17:59:09 2011 +0700
Added new feature: column reordering. Some fixes in column resizing
commit 3cf69dfbb89b5476de32828a636dd3e27e912a50 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 1 13:11:53 2011 +0700
Some optimization for column resize script
commit 3b7f35d5c9f2c25c4fe5d7322fbe79c181637764 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 1 12:45:55 2011 +0700
Add makegrid triggering in other files
commit 6bfeb440764226a7bbe8c8a2c3828809ca4b21d5 Merge: 9ac5173788e174c76865394257c535cf69ecf4b6 d174e8b41c6df7b8e38900e2fc4d8560b1501bd5 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 1 10:40:31 2011 +0700
Merge branch 'colresize' into aris
commit d174e8b41c6df7b8e38900e2fc4d8560b1501bd5 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 1 10:39:45 2011 +0700
Use of .find for code consistency
commit 9ac5173788e174c76865394257c535cf69ecf4b6 Merge: 67d8f469d24580ae8ad623ad2a175ae017acf193 c4c57b86c32647c1a1dcb0b9125d35fbced18aac Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 1 10:15:57 2011 +0700
Merge colresize branch into aris
commit 67d8f469d24580ae8ad623ad2a175ae017acf193 Merge: 80981154486608cc154d6ab461847e999336566e 575f265293ffe0625da6a8fc0877a84d595d5322 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Wed Jun 1 09:47:06 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit c4c57b86c32647c1a1dcb0b9125d35fbced18aac Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue May 31 11:54:04 2011 +0700
Column resize: fix compatibility with inline edit
commit 80981154486608cc154d6ab461847e999336566e Merge: 159696ba69d85fc59e4f82a343c3ad7a45f1636f 6b69e631d72bf08eb32e36c52d99d87db6cf4912 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue May 31 13:13:27 2011 +0700
Merge branch 'colresize' into aris
commit 159696ba69d85fc59e4f82a343c3ad7a45f1636f Merge: 36680cff27ab43da1051b3877f9134b06ad2873f b5c1ee65092ebf67537931dfc1e396acfb1b10c2 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue May 31 13:13:23 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit 6b69e631d72bf08eb32e36c52d99d87db6cf4912 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue May 31 11:54:04 2011 +0700
Column resize: fix compatibility with inline edit
commit f4b47d4cf0a846f394570673429a9759eb5f4991 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue May 31 10:50:56 2011 +0700
Support column resizing for vertical display mode
commit 566851d210104cb44ec536dc195b05707e0496c8 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue May 31 09:46:25 2011 +0700
Add trigger to remake the resizable column when an ajax request is done
commit 25ae3e2387ca8936434d427fb5eb1f2d0a4f6d13 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Tue May 31 09:23:37 2011 +0700
Add checking to first column (actions) span for resizing column
commit 36680cff27ab43da1051b3877f9134b06ad2873f Merge: 518638fa87b73c9fb02d341f47a7a01ddb5e4f5b 9ae87854ed6474e111a4d77a0d747215e1cff9f6 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri May 27 19:09:38 2011 +0700
Merge branch 'colresize' into aris
commit 518638fa87b73c9fb02d341f47a7a01ddb5e4f5b Merge: c40fed887e27558aa0d07ca10ce69534c4636813 e4ba1dc06605fd81718d1991ad509d8e47f159fc Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri May 27 19:09:35 2011 +0700
Merge branch 'tablesorting' into aris
commit c40fed887e27558aa0d07ca10ce69534c4636813 Merge: a55873c9871bfb05bac8a3f42b6c30e23c88677d ad6e109e0ee20b61fc5b1107856387cd09aeb2d0 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri May 27 19:09:30 2011 +0700
Merge branch 'recent' into aris
commit ad6e109e0ee20b61fc5b1107856387cd09aeb2d0 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri May 27 19:03:47 2011 +0700
Fix RecentTable class -> PMA_RecentTable, some fix on documentation
commit 9ae87854ed6474e111a4d77a0d747215e1cff9f6 Author: Aris Feryanto aris_feryanto@yahoo.com Date: Fri May 27 14:05:45 2011 +0700
Add ability to resize column when browsing tables
-----------------------------------------------------------------------
Summary of changes: ChangeLog | 2 + Documentation.html | 2 +- db_search.php | 2 + db_sql.php | 1 + js/db_search.js | 10 +- js/makegrid.js | 617 +++++++++++++++++++++++++++++++ js/sql.js | 121 +++++-- js/tbl_select.js | 1 + libraries/RecentTable.class.php | 10 +- libraries/Table.class.php | 118 +++++- libraries/common.lib.php | 16 + libraries/display_tbl.lib.php | 91 +++++- libraries/header.inc.php | 2 +- navigation.php | 4 +- server_sql.php | 1 + sql.php | 23 +- tbl_replace.php | 1 + tbl_select.php | 1 + tbl_sql.php | 1 + themes/original/css/theme_right.css.php | 65 ++++ themes/original/img/col_pointer.png | Bin 0 -> 121 bytes themes/original/img/col_pointer_ver.png | Bin 0 -> 128 bytes themes/pmahomme/css/theme_right.css.php | 69 ++++ themes/pmahomme/img/col_pointer.png | Bin 0 -> 136 bytes themes/pmahomme/img/col_pointer_ver.png | Bin 0 -> 138 bytes 25 files changed, 1082 insertions(+), 76 deletions(-) create mode 100644 js/makegrid.js create mode 100644 themes/original/img/col_pointer.png create mode 100644 themes/original/img/col_pointer_ver.png create mode 100644 themes/pmahomme/img/col_pointer.png create mode 100644 themes/pmahomme/img/col_pointer_ver.png
diff --git a/ChangeLog b/ChangeLog index 49c7305..daa1a62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,8 @@ + Patch #3271804 for rfe #3177495, new DisableMultiTableMaintenance directive + [interface] Reorganised server status page. + [interface] Changed way of generating charts. ++ rfe #939233 [interface] Flexible column width ++ [interface] Mouse-based column reordering in query results
3.4.3.0 (not yet released) - bug #3311170 [sync] Missing helper icons in Synchronize diff --git a/Documentation.html b/Documentation.html index 4db4ec0..d2dea87 100644 --- a/Documentation.html +++ b/Documentation.html @@ -1073,7 +1073,7 @@ ALTER TABLE `pma_column_comments` Without configuring the storage, you can still access the recently used tables, but it will disappear after you logout.<br/><br/>
- To allow the usage of this functionality: + To allow the usage of this functionality persistently:
<ul> <li>set up <a href="#pmadb">pmadb</a> and the phpMyAdmin configuration storage</li> diff --git a/db_search.php b/db_search.php index d93fd74..a91bf87 100644 --- a/db_search.php +++ b/db_search.php @@ -38,6 +38,8 @@ require_once './libraries/common.inc.php';
$GLOBALS['js_include'][] = 'db_search.js'; +$GLOBALS['js_include'][] = 'sql.js'; +$GLOBALS['js_include'][] = 'makegrid.js';
/** * Gets some core libraries and send headers diff --git a/db_sql.php b/db_sql.php index 08eb5ca..26a6299 100644 --- a/db_sql.php +++ b/db_sql.php @@ -14,6 +14,7 @@ require_once './libraries/common.inc.php'; * Runs common work */ $GLOBALS['js_include'][] = 'functions.js'; +$GLOBALS['js_include'][] = 'makegrid.js'; $GLOBALS['js_include'][] = 'sql.js';
require './libraries/db_common.inc.php'; diff --git a/js/db_search.js b/js/db_search.js index 6fff82d..0cb04b7 100644 --- a/js/db_search.js +++ b/js/db_search.js @@ -26,7 +26,14 @@ function loadResult(result_path , table_name , link , ajaxEnable){ /** Load the browse results to the page */ $("#table-info").show(); $('#table-link').attr({"href" : 'sql.php?'+link }).text(table_name); - $('#browse-results').load(result_path + " '"+'#sqlqueryresults' + "'").show(); + $('#browse-results').load(result_path + " '"+'#sqlqueryresults' + "'", null, function() { + // because under db_search, window.parent.table is not defined yet, + // we assign it manually from #table-link + window.parent.table = $('#table-link').text().trim(); + + appendInlineAnchor(); + $('#table_results').makegrid(); + }).show(); } else { @@ -173,7 +180,6 @@ $(document).ready(function() { if (typeof response == 'string') { // found results $("#searchresults").html(response); - $("#sqlqueryresults").trigger('appendAnchor');
$('#togglesearchresultlink') // always start with the Show message diff --git a/js/makegrid.js b/js/makegrid.js new file mode 100644 index 0000000..038300b --- /dev/null +++ b/js/makegrid.js @@ -0,0 +1,617 @@ +(function ($) { + $.grid = function(t) { + // prepare the grid + var g = { + // constant + minColWidth: 5, + + // variables, assigned with default value, changed later + alignment: 'horizontal', // 3 possibilities: vertical, horizontal, horizontalflipped + actionSpan: 5, + colOrder: new Array(), // array of column order + tableCreateTime: null, // table creation time, only available in "Browse tab" + hintShown: false, // true if hint balloon is shown, used by updateHint() method + reorderHint: '', // string, hint for column reordering + sortHint: '', // string, hint for column sorting + markHint: '', // string, hint for column marking + showReorderHint: false, // boolean, used by showHint() method + showSortHint: false, // boolean, used by showHint() method + showMarkHint: false, + hintIsHiding: false, // true when hint is still shown, but hide() already called + + // functions + dragStartRsz: function(e, obj) { // start column resize + var n = $(this.cRsz).find('div').index(obj); + this.colRsz = { + x0: e.pageX, + n: n, + obj: obj, + objLeft: $(obj).position().left, + objWidth: this.alignment != 'vertical' ? + $(this.t).find('th.draggable:eq(' + n + ') span').outerWidth() : + $(this.t).find('tr:first td:eq(' + n + ') span').outerWidth() + }; + $('body').css('cursor', 'col-resize'); + $('body').noSelect(); + }, + + dragStartMove: function(e, obj) { // start column move + // prepare the cCpy and cPointer from the dragged column + $(this.cCpy).text($(obj).text()); + var objPos = $(obj).position(); + if (this.alignment != 'vertical') { + $(this.cCpy).css({ + top: objPos.top + 20, + left: objPos.left, + height: $(obj).height(), + width: $(obj).width() + }); + $(this.cPointer).css({ + top: objPos.top + }); + } else { // vertical alignment + $(this.cCpy).css({ + top: objPos.top, + left: objPos.left + 30, + height: $(obj).height(), + width: $(obj).width() + }); + $(this.cPointer).css({ + top: objPos.top + }); + } + + // get the column index, zero-based + var n = this.getHeaderIdx(obj); + + this.colMov = { + x0: e.pageX, + y0: e.pageY, + n: n, + newn: n, + obj: obj, + objTop: objPos.top, + objLeft: objPos.left + }; + $('body').css('cursor', 'move'); + this.hideHint(); + $('body').noSelect(); + }, + + dragMove: function(e) { + if (this.colRsz) { + var dx = e.pageX - this.colRsz.x0; + if (this.colRsz.objWidth + dx > this.minColWidth) + $(this.colRsz.obj).css('left', this.colRsz.objLeft + dx + 'px'); + } else if (this.colMov) { + // dragged column animation + if (this.alignment != 'vertical') { + var dx = e.pageX - this.colMov.x0; + $(this.cCpy) + .css('left', this.colMov.objLeft + dx) + .show(); + } else { // vertical alignment + var dy = e.pageY - this.colMov.y0; + $(this.cCpy) + .css('top', this.colMov.objTop + dy) + .show(); + } + + // pointer animation + var hoveredCol = this.getHoveredCol(e); + if (hoveredCol) { + var newn = this.getHeaderIdx(hoveredCol); + this.colMov.newn = newn; + if (newn != this.colMov.n) { + // show the column pointer in the right place + var colPos = $(hoveredCol).position(); + if (this.alignment != 'vertical') { + var newleft = newn < this.colMov.n ? + colPos.left : + colPos.left + $(hoveredCol).outerWidth(); + $(this.cPointer) + .css({ + left: newleft, + visibility: 'visible' + }); + } else { // vertical alignment + var newtop = newn < this.colMov.n ? + colPos.top : + colPos.top + $(hoveredCol).outerHeight(); + $(this.cPointer) + .css({ + top: newtop, + visibility: 'visible' + }); + } + } else { + // no movement to other column, hide the column pointer + $(this.cPointer).css('visibility', 'hidden'); + } + } + } + }, + + dragEnd: function(e) { + if (this.colRsz) { + var dx = e.pageX - this.colRsz.x0; + var nw = this.colRsz.objWidth + dx; + if (nw < this.minColWidth) { + nw = this.minColWidth; + } + var n = this.colRsz.n; + // do the resizing + if (this.alignment != 'vertical') { + $(this.t).find('tr').each(function() { + $(this).find('th.draggable:eq(' + n + ') span,' + + 'td:eq(' + (g.actionSpan + n) + ') span') + .css('width', nw); + }); + } else { // vertical alignment + $(this.t).find('tr').each(function() { + $(this).find('td:eq(' + n + ') span') + .css('width', nw); + }); + } + $('body').css('cursor', 'default'); + this.reposRsz(); + this.colRsz = false; + } else if (this.colMov) { + // shift columns + if (this.colMov.newn != this.colMov.n) { + this.shiftCol(this.colMov.n, this.colMov.newn); + // assign new position + var objPos = $(this.colMov.obj).position(); + this.colMov.objTop = objPos.top; + this.colMov.objLeft = objPos.left; + this.colMov.n = this.colMov.newn; + // send request to server to remember the column order + if (this.tableCreateTime) { + this.sendColOrder(); + } + this.refreshRestoreButton(); + } + + // animate new column position + $(this.cCpy).stop(true, true) + .animate({ + top: g.colMov.objTop, + left: g.colMov.objLeft + }, 'fast') + .fadeOut(); + $(this.cPointer).css('visibility', 'hidden'); + + this.colMov = false; + } + $('body').css('cursor', 'default'); + $('body').noSelect(false); + }, + + /** + * Reposition column resize bars. + */ + reposRsz: function() { + $(this.cRsz).find('div').hide(); + $firstRowCols = this.alignment != 'vertical' ? + $(this.t).find('tr:first th.draggable') : + $(this.t).find('tr:first td'); + for (var n = 0; n < $firstRowCols.length; n++) { + $this = $($firstRowCols[n]); + $cb = $(g.cRsz).find('div:eq(' + n + ')'); // column border + var pad = parseInt($this.css('padding-right')); + $cb.css('left', Math.floor($this.position().left + $this.width() + pad)) + .show(); + } + }, + + /** + * Shift column from index oldn to newn. + */ + shiftCol: function(oldn, newn) { + if (this.alignment != 'vertical') { + $(this.t).find('tr').each(function() { + if (newn < oldn) { + $(this).find('th.draggable:eq(' + newn + '),' + + 'td:eq(' + (g.actionSpan + newn) + ')') + .before($(this).find('th.draggable:eq(' + oldn + '),' + + 'td:eq(' + (g.actionSpan + oldn) + ')')); + } else { + $(this).find('th.draggable:eq(' + newn + '),' + + 'td:eq(' + (g.actionSpan + newn) + ')') + .after($(this).find('th.draggable:eq(' + oldn + '),' + + 'td:eq(' + (g.actionSpan + oldn) + ')')); + } + }); + // reposition the column resize bars + this.reposRsz(); + + } else { // vertical alignment + // shift rows + if (newn < oldn) { + $(this.t).find('tr:eq(' + (g.actionSpan + newn) + ')') + .before($(this.t).find('tr:eq(' + (g.actionSpan + oldn) + ')')); + } else { + $(this.t).find('tr:eq(' + (g.actionSpan + newn) + ')') + .after($(this.t).find('tr:eq(' + (g.actionSpan + oldn) + ')')); + } + } + // adjust the colOrder + var tmp = this.colOrder[oldn]; + this.colOrder.splice(oldn, 1); + this.colOrder.splice(newn, 0, tmp); + }, + + /** + * Find currently hovered table column's header (excluding actions column). + * @return the hovered column's th object or undefined if no hovered column found. + */ + getHoveredCol: function(e) { + var hoveredCol; + $headers = $(this.t).find('th.draggable'); + if (this.alignment != 'vertical') { + $headers.each(function() { + var left = $(this).position().left; + var right = left + $(this).outerWidth(); + if (left <= e.pageX && e.pageX <= right) { + hoveredCol = this; + } + }); + } else { // vertical alignment + $headers.each(function() { + var top = $(this).position().top; + var bottom = top + $(this).height(); + if (top <= e.pageY && e.pageY <= bottom) { + hoveredCol = this; + } + }); + } + return hoveredCol; + }, + + /** + * Get a zero-based index from a <th class="draggable"> tag in a table. + */ + getHeaderIdx: function(obj) { + var n; + if (this.alignment != 'vertical') { + n = $(obj).parents('tr').find('th.draggable').index(obj); + } else { + var column_idx = $(obj).index(); + var $th_in_same_column = $(this.t).find('th.draggable:nth-child(' + (column_idx + 1) + ')'); + n = $th_in_same_column.index(obj); + } + return n; + }, + + /** + * Reposition the table back to normal order. + */ + restore: function() { + // use insertion sort, since we already have shiftCol function + for (var i = 1; i < this.colOrder.length; i++) { + var x = this.colOrder[i]; + var j = i - 1; + while (j >= 0 && x < this.colOrder[j]) { + j--; + } + if (j != i - 1) { + this.shiftCol(i, j + 1); + } + } + if (this.tableCreateTime) { + // send request to server to remember the column order + this.sendColOrder(); + } + this.refreshRestoreButton(); + }, + + /** + * Send column order to the server. + */ + sendColOrder: function() { + $.post('sql.php', { + ajax_request: true, + db: window.parent.db, + table: window.parent.table, + token: window.parent.token, + set_col_order: true, + col_order: this.colOrder.toString(), + table_create_time: this.tableCreateTime + }); + }, + + /** + * Refresh restore button state. + * Make restore button disabled if the table is similar with initial state. + */ + refreshRestoreButton: function() { + // check if table state is as initial state + var isInitial = true; + for (var i = 0; i < this.colOrder.length; i++) { + if (this.colOrder[i] != i) { + isInitial = false; + break; + } + } + // enable or disable restore button + if (isInitial) { + $('.restore_column').hide(); + } else { + $('.restore_column').show(); + } + }, + + /** + * Show hint with the text supplied. + */ + showHint: function(e) { + if (!this.colRsz && !this.colMov) { // if not resizing or dragging + var text = ''; + if (this.showReorderHint) { + text += this.reorderHint; + } + if (this.showSortHint) { + text += text.length > 0 ? '<br />' : ''; + text += this.sortHint; + } + if (this.showMarkHint) { + text += text.length > 0 ? '<br />' : ''; + text += this.markHint; + } + + // hide the hint if no text + if (!text) { + this.hideHint(); + return; + } + + $(this.dHint).html(text); + if (!this.hintShown || this.hintIsHiding) { + $(this.dHint) + .stop(true, true) + .css({ + top: e.pageY, + left: e.pageX + 15 + }) + .show('fast'); + this.hintShown = true; + this.hintIsHiding = false; + } + } + }, + + /** + * Hide the hint. + */ + hideHint: function() { + if (this.hintShown) { + $(this.dHint) + .stop(true, true) + .hide(300, function() { + g.hintShown = false; + g.hintIsHiding = false; + }); + this.hintIsHiding = true; + } + }, + + /** + * Update hint position. + */ + updateHint: function(e) { + if (this.hintShown) { + $(this.dHint).css({ + top: e.pageY, + left: e.pageX + 15 + }); + } + } + } + + g.gDiv = document.createElement('div'); // create global div + g.cRsz = document.createElement('div'); // column resizer + g.cCpy = document.createElement('div'); // column copy, to store copy of dragged column header + g.cPointer = document.createElement('div'); // column pointer, used when reordering column + g.dHint = document.createElement('div'); // draggable hint + + // assign the table alignment + g.alignment = $("#top_direction_dropdown").val(); + + // adjust g.cCpy + g.cCpy.className = 'cCpy'; + $(g.cCpy).hide(); + + // adjust g.cPoint + g.cPointer.className = g.alignment != 'vertical' ? 'cPointer' : 'cPointerVer'; + $(g.cPointer).css('visibility', 'hidden'); + + // adjust g.dHint + g.dHint.className = 'dHint'; + $(g.dHint).hide(); + + // chain table and grid together + t.grid = g; + g.t = t; + + // get first row data columns + var $firstRowCols = g.alignment != 'vertical' ? + $(t).find('tr:first th.draggable') : + $(t).find('tr:first td'); + + // assign first column (actions) span + if (! $(t).find('tr:first th:first').hasClass('draggable')) { // action header exist + g.actionSpan = g.alignment != 'vertical' ? + $(t).find('tr:first th:first').prop('colspan') : + $(t).find('tr:first th:first').prop('rowspan'); + } else { + g.actionSpan = 0; + } + + // assign table create time + // #table_create_time will only available if we are in "Browse" tab + g.tableCreateTime = $('#table_create_time').val(); + + // assign column reorder & column sort hint + g.reorderHint = $('#col_order_hint').val(); + g.sortHint = $('#sort_hint').val(); + g.markHint = $('#col_mark_hint').val(); + + // determine whether to show the column reordering hint or not + g.showReorderHint = $firstRowCols.length > 1; + + // initialize column order + $col_order = $('#col_order'); + if ($col_order.length > 0) { + g.colOrder = $col_order.val().split(','); + for (var i = 0; i < g.colOrder.length; i++) { + g.colOrder[i] = parseInt(g.colOrder[i]); + } + } else { + g.colOrder = new Array(); + for (var i = 0; i < $firstRowCols.length; i++) { + g.colOrder.push(i); + } + } + + // create column borders + $firstRowCols.each(function() { + $this = $(this); + var cb = document.createElement('div'); // column border + var pad = parseInt($this.css('padding-right')); + $(cb).css('left', Math.floor($this.position().left + $this.width() + pad)); + $(cb).addClass('colborder'); + $(cb).mousedown(function(e) { + g.dragStartRsz(e, this); + }); + $(g.cRsz).append(cb); + }); + + // wrap all data cells, except actions cell, with span + $(t).find('th, td:not(:has(span))') + .wrapInner('<span />'); + + // register events + if ($firstRowCols.length > 1) { + $(t).find('th.draggable') + .css('cursor', 'move') + .mousedown(function(e) { + g.dragStartMove(e, this); + }); + } + $(t).find('th.draggable') + .mouseenter(function(e) { + g.showMarkHint = !g.showSortHint; + g.showHint(e); + }) + .mouseleave(function(e) { + g.hideHint(); + }); + $(t).find('th.draggable a') + .attr('title', '') // hide default tooltip for sorting + .mouseenter(function(e) { + g.showSortHint = true; + g.showMarkHint = false; + g.showHint(e); + }) + .mouseleave(function(e) { + g.showSortHint = false; + g.showMarkHint = true; + g.showHint(e); + }); + $(document).mousemove(function(e) { + g.dragMove(e); + g.updateHint(e); + }); + $(document).mouseup(function(e) { + g.dragEnd(e); + }); + $('.restore_column').click(function() { + g.restore(); + }); + + // add table class + $(t).addClass('pma_table'); + + // link all divs + $(t).before(g.gDiv); + $(g.gDiv).append(t); + $(g.gDiv).prepend(g.cRsz); + $(g.gDiv).append(g.cCpy); + $(g.gDiv).append(g.cPointer); + $(g.gDiv).append(g.dHint); + + // some adjustment + g.refreshRestoreButton(); + g.cRsz.className = 'cRsz'; + $(t).removeClass('data'); + $(g.gDiv).addClass('data'); + $(g.cRsz).css('height', $(t).height()); + $(t).find('th a').bind('dragstart', function() { + return false; + }); + }; + + // document ready checking + var docready = false; + $(document).ready(function() { + docready = true; + }); + + // Additional jQuery functions + /** + * Make resizable, reorderable grid. + */ + $.fn.makegrid = function() { + return this.each(function() { + if (!docready) { + var t = this; + $(document).ready(function() { + $.grid(t); + }); + } else { + $.grid(this); + } + }); + }; + /** + * Refresh grid. This must be called after changing the grid's content. + */ + $.fn.refreshgrid = function() { + return this.each(function() { + if (!docready) { + var t = this; + $(document).ready(function() { + if (t.grid) t.grid.reposRsz(); + }); + } else { + if (this.grid) this.grid.reposRsz(); + } + }); + } + $.fn.noSelect = function (p) { //no select plugin by Paulo P.Marinas + var prevent = (p == null) ? true : p; + if (prevent) { + return this.each(function () { + if ($.browser.msie || $.browser.safari) $(this).bind('selectstart', function () { + return false; + }); + else if ($.browser.mozilla) { + $(this).css('MozUserSelect', 'none'); + $('body').trigger('focus'); + } else if ($.browser.opera) $(this).bind('mousedown', function () { + return false; + }); + else $(this).attr('unselectable', 'on'); + }); + } else { + return this.each(function () { + if ($.browser.msie || $.browser.safari) $(this).unbind('selectstart'); + else if ($.browser.mozilla) $(this).css('MozUserSelect', 'inherit'); + else if ($.browser.opera) $(this).unbind('mousedown'); + else $(this).removeAttr('unselectable', 'on'); + }); + } + }; //end noSelect + +})(jQuery); + diff --git a/js/sql.js b/js/sql.js index 65d209a..dfe05da 100644 --- a/js/sql.js +++ b/js/sql.js @@ -42,12 +42,13 @@ function getFieldName($this_field, disp_mode) { else { var this_field_index = $this_field.index(); // ltr or rtl direction does not impact how the DOM was generated - // + // check if the action column in the left exist + var leftActionExist = !$('#table_results').find('th:first').hasClass('draggable'); // 5 columns to account for the checkbox, edit, appended inline edit, copy and delete anchors but index is zero-based so substract 4 - var field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-4 )+') a').text(); + var field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index - (leftActionExist ? 4 : 0)) + ') a').text(); // happens when just one row (headings contain no a) if ("" == field_name) { - field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-4 )+')').text(); + field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index - (leftActionExist ? 4 : 0)) + ')').text(); } }
@@ -211,6 +212,24 @@ $(document).ready(function() { $("#sqlqueryresults").live('appendAnchor',function() { appendInlineAnchor(); }) + + /** + * Attach the {@link makegrid} function to a custom event, which will be + * triggered manually everytime the table of results is reloaded + * @memberOf jQuery + */ + $("#sqlqueryresults").live('makegrid', function() { + $('#table_results').makegrid(); + }) + + /** + * Attach the {@link refreshgrid} function to a custom event, which will be + * triggered manually everytime the table of results is manipulated (e.g., by inline edit) + * @memberOf jQuery + */ + $("#sqlqueryresults").live('refreshgrid', function() { + $('#table_results').refreshgrid(); + })
/** * Trigger the appendAnchor event to prepare the first table for inline edit @@ -324,6 +343,7 @@ $(document).ready(function() { $('#sqlqueryresults').show(); $("#sqlqueryresults").html(data); $("#sqlqueryresults").trigger('appendAnchor'); + $("#sqlqueryresults").trigger('makegrid'); $('#togglequerybox').show(); if($("#togglequerybox").siblings(":visible").length > 0) { $("#togglequerybox").trigger('click'); @@ -364,6 +384,7 @@ $(document).ready(function() { $.post($the_form.attr('action'), $the_form.serialize(), function(data) { $("#sqlqueryresults").html(data); $("#sqlqueryresults").trigger('appendAnchor'); + $("#sqlqueryresults").trigger('makegrid'); PMA_init_slider();
PMA_ajaxRemoveMessage($msgbox); @@ -387,6 +408,7 @@ $(document).ready(function() { $.post($the_form.attr('action'), $the_form.serialize() + '&ajax_request=true', function(data) { $("#sqlqueryresults").html(data); $("#sqlqueryresults").trigger('appendAnchor'); + $("#sqlqueryresults").trigger('makegrid'); PMA_init_slider(); PMA_ajaxRemoveMessage($msgbox); }) // end $.post() @@ -412,7 +434,8 @@ $(document).ready(function() { $.get($anchor.attr('href'), $anchor.serialize() + '&ajax_request=true', function(data) { $("#sqlqueryresults") .html(data) - .trigger('appendAnchor'); + .trigger('appendAnchor') + .trigger('makegrid'); PMA_ajaxRemoveMessage($msgbox); }) // end $.get() })//end Sort results table @@ -431,7 +454,8 @@ $(document).ready(function() { $.post($form.attr('action'), $form.serialize() + '&ajax_request=true' , function(data) { $("#sqlqueryresults") .html(data) - .trigger('appendAnchor'); + .trigger('appendAnchor') + .trigger('makegrid'); PMA_init_slider(); }) // end $.post() }) @@ -517,21 +541,22 @@ $(document).ready(function() { $this_hide.parent().removeClass("hover noclick"); $this_hide.siblings().removeClass("hover");
- var last_column = $this_hide.siblings().length; + var $input_siblings = $this_hide.parent('tr').find('.inline_edit'); var txt = ''; - for(var i = 4; i < last_column; i++) { - if($this_hide.siblings("td:eq(" + i + ")").hasClass("inline_edit") == false) { - continue; + $input_siblings.each(function() { + var $this_hide_siblings = $(this); + txt = $this_hide_siblings.data('original_data'); + if($this_hide_siblings.children('span').children().length != 0) { + $this_hide_siblings.children('span').empty(); + $this_hide_siblings.children('span').append(txt); } - txt = $this_hide.siblings("td:eq(" + i + ")").data('original_data'); - if($this_hide.siblings("td:eq(" + i + ")").children().length != 0) { - $this_hide.siblings("td:eq(" + i + ")").empty(); - $this_hide.siblings("td:eq(" + i + ")").append(txt); - } - } + }); $(this).prev().prev().remove(); $(this).prev().remove(); $(this).remove(); + + // refresh the grid + $("#sqlqueryresults").trigger('refreshgrid'); }); } else { var txt = ''; @@ -539,7 +564,8 @@ $(document).ready(function() {
$('#table_results tbody tr td span a#hide').click(function() { var $hide_a = $(this); - var pos = $hide_a.parents('td').index(); + var $this_hide = $(this).parents('td'); + var pos = $this_hide.index();
var $this_span = $hide_a.parent(); $this_span.find('a, br').remove(); @@ -547,22 +573,26 @@ $(document).ready(function() {
var $this_row = $this_span.parents('tr'); // changing inline_edit_active to inline_edit_anchor - $this_row.siblings("tr:eq(3) td:eq(" + pos + ")").removeClass("inline_edit_active").addClass("inline_edit_anchor"); + $this_hide.removeClass("inline_edit_active").addClass("inline_edit_anchor");
// removing marked and hover classes. $this_row.parent('tbody').find('tr').find("td:eq(" + pos + ")").removeClass("marked hover");
- for( var i = 6; i <= rows + 2; i++){ + for( var i = 0; i <= rows + 2; i++){ if( $this_row.siblings("tr:eq(" + i + ") td:eq(" + pos + ")").hasClass("inline_edit") == false) { continue; } - txt = $this_row.siblings("tr:eq(" + i + ") td:eq(" + pos + ")").data('original_data'); - $this_row.siblings("tr:eq(" + i + ") td:eq(" + pos + ")").empty(); - $this_row.siblings("tr:eq(" + i + ") td:eq(" + pos + ")").append(txt); + $this_row_siblings = $this_row.siblings("tr:eq(" + i + ") td:eq(" + pos + ")"); + txt = $this_row_siblings.data('original_data'); + $this_row_siblings.children('span').empty(); + $this_row_siblings.children('span').append(txt); } $(this).prev().remove(); $(this).prev().remove(); $(this).remove(); + + // refresh the grid + $("#sqlqueryresults").trigger('refreshgrid'); }); }
@@ -594,7 +624,7 @@ $(document).ready(function() { /** * @var data_value Current value of this field */ - var data_value = $(this).html(); + var data_value = $(this).children('span').html();
// We need to retrieve the value from the server for truncated/relation fields // Find the field name @@ -604,6 +634,10 @@ $(document).ready(function() { */ var $this_field = $(this); /** + * @var this_field_span Object referring to this field's child (<span>) + */ + var $this_field_span = $(this).children('span'); + /** * @var field_name String containing the name of this field. * @see getFieldName() */ @@ -620,11 +654,11 @@ $(document).ready(function() { /** * @var curr_value String current value of the field (for fields that are of type enum or set). */ - var curr_value = $this_field.text(); + var curr_value = $this_field_span.text();
if($this_field.is(':not(.not_null)')){ // add a checkbox to mark null for all the field that are nullable. - $this_field.html('<div class="null_div">Null :<input type="checkbox" class="checkbox_null_'+ field_name + '_' + this_row_index +'"></div>'); + $this_field_span.html('<div class="null_div">Null :<input type="checkbox" class="checkbox_null_'+ field_name + '_' + this_row_index +'"></div>'); // check the 'checkbox_null_<field_name>_<row_index>' if the corresponding value is null if($this_field.is('.null')) { $('.checkbox_null_' + field_name + '_' + this_row_index).attr('checked', true); @@ -671,7 +705,7 @@ $(document).ready(function() { })
} else { - $this_field.html('<div class="null_div"></div>'); + $this_field_span.html('<div class="null_div"></div>'); }
// In each input sibling, wrap the current value in a textarea @@ -679,7 +713,7 @@ $(document).ready(function() { if($this_field.is(':not(.truncated, .transformed, .relation, .enum, .set, .null)')) { // handle non-truncated, non-transformed, non-relation values // We don't need to get any more data, just wrap the value - $this_field.append('<textarea>'+data_value+'</textarea>'); + $this_field_span.append('<textarea>'+data_value+'</textarea>'); $this_field.data('original_data', data_value); } else if($this_field.is('.truncated, .transformed')) { @@ -700,8 +734,9 @@ $(document).ready(function() { 'inline_edit' : true }, function(data) { if(data.success == true) { - $this_field.append('<textarea>'+data.value+'</textarea>'); + $this_field_span.append('<textarea>'+data.value+'</textarea>'); $this_field.data('original_data', data_value); + $("#sqlqueryresults").trigger('refreshgrid'); } else { PMA_ajaxShowMessage(data.error); @@ -727,8 +762,9 @@ $(document).ready(function() { }
$.post('sql.php', post_params, function(data) { - $this_field.append(data.dropdown); + $this_field_span.append(data.dropdown); $this_field.data('original_data', data_value); + $("#sqlqueryresults").trigger('refreshgrid'); }) // end $.post() } else if($this_field.is('.enum')) { @@ -748,8 +784,9 @@ $(document).ready(function() { 'curr_value' : curr_value } $.post('sql.php', post_params, function(data) { - $this_field.append(data.dropdown); + $this_field_span.append(data.dropdown); $this_field.data('original_data', data_value); + $("#sqlqueryresults").trigger('refreshgrid'); }) // end $.post() } else if($this_field.is('.set')) { @@ -770,16 +807,21 @@ $(document).ready(function() { }
$.post('sql.php', post_params, function(data) { - $this_field.append(data.select); + $this_field_span.append(data.select); $this_field.data('original_data', data_value); + $("#sqlqueryresults").trigger('refreshgrid'); }) // end $.post() } else if($this_field.is('.null')) { //handle null fields - $this_field.append('<textarea></textarea>'); + $this_field_span.append('<textarea></textarea>'); $this_field.data('original_data', 'NULL'); } - }) + }); + + // refresh the grid + $("#sqlqueryresults").trigger('refreshgrid'); + }) // End On click, replace the current field with an input/textarea
/** @@ -801,7 +843,7 @@ $(document).ready(function() { * being edited * */ - var $this_td = $(this).parent().parent(); + var $this_td = $(this).parents('td'); var $test_element = ''; // to test the presence of a element
// Initialize variables @@ -1043,10 +1085,11 @@ function PMA_unInlineEditRow($del_hide, $chg_submit, $this_td, $input_siblings, $input_siblings.each(function() { // Inline edit post has been successful. $this_sibling = $(this); + $this_sibling_span = $(this).children('span');
var is_null = $this_sibling.find('input:checkbox').is(':checked'); if (is_null) { - $this_sibling.html('NULL'); + $this_sibling_span.html('NULL'); $this_sibling.addClass('null'); } else { $this_sibling.removeClass('null'); @@ -1106,9 +1149,12 @@ function PMA_unInlineEditRow($del_hide, $chg_submit, $this_td, $input_siblings, } } } - $this_sibling.html(new_html); + $this_sibling_span.html(new_html); } }) + + // refresh the grid + $("#sqlqueryresults").trigger('refreshgrid'); }
/** @@ -1155,6 +1201,11 @@ $(document).ready(function() { $('.column_heading.marker').live('click', function() { PMA_changeClassForColumn($(this), 'marked'); }); + + /** + * create resizable table + */ + $("#sqlqueryresults").trigger('makegrid'); });
/* diff --git a/js/tbl_select.js b/js/tbl_select.js index 8115245..8d3049a 100644 --- a/js/tbl_select.js +++ b/js/tbl_select.js @@ -67,6 +67,7 @@ $(document).ready(function() { // found results $("#sqlqueryresults").html(response); $("#sqlqueryresults").trigger('appendAnchor'); + $("#sqlqueryresults").trigger('makegrid'); $('#tbl_search_form') // work around for bug #3168569 - Issue on toggling the "Hide search criteria" in chrome. .slideToggle() diff --git a/libraries/RecentTable.class.php b/libraries/RecentTable.class.php index ebe93f5..b42a0aa 100644 --- a/libraries/RecentTable.class.php +++ b/libraries/RecentTable.class.php @@ -14,7 +14,7 @@ require_once './libraries/Message.class.php'; * * @package phpMyAdmin */ -class RecentTable +class PMA_RecentTable { /** * Defines the internal PMA table which contains recent tables. @@ -33,9 +33,9 @@ class RecentTable public $tables;
/** - * RecentTable instance. + * PMA_RecentTable instance. * - * @var RecentTable + * @var PMA_RecentTable */ private static $_instance;
@@ -56,12 +56,12 @@ class RecentTable /** * Returns class instance. * - * @return RecentTable + * @return PMA_RecentTable */ public static function getInstance() { if (is_null(self::$_instance)) { - self::$_instance = new RecentTable(); + self::$_instance = new PMA_RecentTable(); } return self::$_instance; } diff --git a/libraries/Table.class.php b/libraries/Table.class.php index c73eb31..cfc28d6 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -12,9 +12,10 @@ class PMA_Table { /** - * UI preferences property: sorted column + * UI preferences properties */ const PROP_SORTED_COLUMN = 'sorted_col'; + const PROP_COLUMN_ORDER = 'col_order';
static $cache = array();
@@ -1196,6 +1197,27 @@ class PMA_Table }
/** + * Get all columns + * + * returns an array with all columns + * + * @param boolean whether to quote name with backticks `` + * @return array + */ + public function getColumns($backquoted = true) + { + $sql = 'SHOW COLUMNS FROM ' . $this->getFullName(true); + $indexed = PMA_DBI_fetch_result($sql, 'Field', 'Field'); + + $return = array(); + foreach ($indexed as $column) { + $return[] = $this->getFullName($backquoted) . '.' . ($backquoted ? PMA_backquote($column) : $column); + } + + return $return; + } + + /** * Return UI preferences for this table from phpMyAdmin database. * * @uses PMA_query_as_controluser() @@ -1276,25 +1298,11 @@ class PMA_Table }
/** - * Get UI preferences array for this table. - * If pmadb and table_uiprefs is set, it will get the UI preferences from - * phpMyAdmin database. - * - * @return array - */ - public function getUiPrefs() - { - if (! isset($this->uiprefs)) { - $this->loadUiPrefs(); - } - return $this->uiprefs; - } - - /** * Get a property from UI preferences. * Return false if the property is not found. * Available property: * - PROP_SORTED_COLUMN + * - PROP_COLUMN_ORDER * * @uses loadUiPrefs() * @@ -1306,6 +1314,42 @@ class PMA_Table if (! isset($this->uiprefs)) { $this->loadUiPrefs(); } + // do checking based on property + if ($property == self::PROP_SORTED_COLUMN) { + if (isset($this->uiprefs[$property])) { + // check if the column name is exist in this table + $tmp = explode(' ', $this->uiprefs[$property]); + $colname = $tmp[0]; + $avail_columns = $this->getColumns(); + foreach ($avail_columns as $each_col) { + // check if $each_col ends with $colname + if (substr_compare($each_col, $colname, + strlen($each_col) - strlen($colname)) === 0) { + return $this->uiprefs[$property]; + } + } + // remove the property, since it is not exist anymore in database + $this->removeUiProp(self::PROP_SORTED_COLUMN); + return false; + } else { + return false; + } + } else if ($property == self::PROP_COLUMN_ORDER) { + if (isset($this->uiprefs[$property])) { + // check if the table has not been modified + if (self::sGetStatusInfo($this->db_name, $this->name, 'CREATE_TIME') == + $this->uiprefs['CREATE_TIME']) { + return $this->uiprefs[$property]; + } else { + // remove the property, since the table has been modified + $this->removeUiProp(self::PROP_COLUMN_ORDER); + return false; + } + } else { + return false; + } + } + // default behaviour for other property: return isset($this->uiprefs[$property]) ? $this->uiprefs[$property] : false; }
@@ -1313,16 +1357,34 @@ class PMA_Table * Set a property from UI preferences. * If pmadb and table_uiprefs is set, it will save the UI preferences to * phpMyAdmin database. + * Available property: + * - PROP_SORTED_COLUMN + * - PROP_COLUMN_ORDER * * @param string $property * @param mixed $value - * @return true|PMA_Message + * @param string $table_create_time Needed for PROP_COLUMN_ORDER + * @return boolean|PMA_Message */ - public function setUiProp($property, $value) + public function setUiProp($property, $value, $table_create_time = NULL) { if (! isset($this->uiprefs)) { $this->loadUiPrefs(); } + // we want to save the create time if the property is PROP_COLUMN_ORDER + if ($property == self::PROP_COLUMN_ORDER) { + $curr_create_time = self::sGetStatusInfo($this->db_name, $this->name, 'CREATE_TIME'); + if (isset($table_create_time) && + $table_create_time == $curr_create_time) { + $this->uiprefs['CREATE_TIME'] = $curr_create_time; + } else { + // there is no $table_create_time, or + // supplied $table_create_time is older than current create time, + // so don't save + return false; + } + } + // save the value $this->uiprefs[$property] = $value; // check if pmadb is set if (strlen($GLOBALS['cfg']['Server']['pmadb']) @@ -1331,5 +1393,25 @@ class PMA_Table } return true; } + + /** + * Remove a property from UI preferences. + * + * @param string $property + */ + public function removeUiProp($property) + { + if (! isset($this->uiprefs)) { + $this->loadUiPrefs(); + } + if (isset($this->uiprefs[$property])) { + unset($this->uiprefs[$property]); + // check if pmadb is set + if (strlen($GLOBALS['cfg']['Server']['pmadb']) + && strlen($GLOBALS['cfg']['Server']['table_uiprefs'])) { + return $this->saveUiprefsToDb(); + } + } + } } ?> diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 037656e..d2c8249 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1032,6 +1032,22 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view // Analyze it if (isset($parsed_sql)) { $analyzed_display_query = PMA_SQP_analyze($parsed_sql); + + // Same as below (append LIMIT), append the remembered ORDER BY + if ($GLOBALS['cfg']['RememberSorting'] + && isset($analyzed_display_query[0]['queryflags']['select_from']) + && isset($GLOBALS['sql_order_to_append'])) { + $query_base = $analyzed_display_query[0]['section_before_limit'] + . "\n" . $GLOBALS['sql_order_to_append'] + . $analyzed_display_query[0]['section_after_limit']; + + // Need to reparse query + $parsed_sql = PMA_SQP_parse($query_base); + // update the $analyzed_display_query + $analyzed_display_query[0]['section_before_limit'] .= $GLOBALS['sql_order_to_append']; + $analyzed_display_query[0]['order_by_clause'] = $GLOBALS['sorted_col']; + } + // Here we append the LIMIT added for navigation, to // enable its display. Adding it higher in the code // to $sql_query would create a problem when diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 26d362d..84e6f7b 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -185,6 +185,25 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
/** + * Return true if we are executing a query in the form of + * "SELECT * FROM <a table> ..." + * + * @return boolean + */ +function PMA_isSelect() +{ + // global variables set from sql.php + global $is_count, $is_export, $is_func, $is_analyse; + global $analyzed_sql; + + return ! ($is_count || $is_export || $is_func || $is_analyse) + && count($analyzed_sql[0]['select_expr']) == 0 + && isset($analyzed_sql[0]['queryflags']['select_from']) + && count($analyzed_sql[0]['table_ref']) == 1; +} + + +/** * Displays a navigation button * * @uses $GLOBALS['cfg']['NavigationBarIconic'] @@ -374,6 +393,26 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di ); } // end move toward ?> + <td> + <input class="restore_column hide" type="submit" value="<?php echo __('Restore column order'); ?>" /> + <?php + if (PMA_isSelect()) { + // generate the column order, if it is set + $pmatable = new PMA_Table($GLOBALS['table'], $GLOBALS['db']); + $col_order = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_ORDER); + if ($col_order) { + echo '<input id="col_order" type="hidden" value="' . implode(',', $col_order) . '" />'; + } + // generate table create time + echo '<input id="table_create_time" type="hidden" value="' . + PMA_Table::sGetStatusInfo($GLOBALS['db'], $GLOBALS['table'], 'CREATE_TIME') . '" />'; + } + // generate hints + echo '<input id="col_order_hint" type="hidden" value="' . __('Drag to reorder') . '" />'; + echo '<input id="sort_hint" type="hidden" value="' . __('Click to sort') . '" />'; + echo '<input id="col_mark_hint" type="hidden" value="' . __('Click to mark/unmark') . '" />'; + ?> + </td> </tr> </table>
@@ -695,7 +734,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ // ... elseif display an empty column if the actions links are disabled to match the rest of the table elseif ($GLOBALS['cfg']['RowActionLinks'] == 'none' && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')) { - echo '<td></td>'; + echo '<th></th>'; }
// 2. Displays the fields' name @@ -735,7 +774,17 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ } }
- for ($i = 0; $i < $fields_cnt; $i++) { + if (PMA_isSelect()) { + // prepare to get the column order, if available + $pmatable = new PMA_Table($GLOBALS['table'], $GLOBALS['db']); + $col_order = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_ORDER); + } else { + $col_order = false; + } + + for ($j = 0; $j < $fields_cnt; $j++) { + // assign $i with appropriate column order + $i = $col_order ? $col_order[$j] : $j; // See if this column should get highlight because it's used in the // where-query. if (isset($highlight_columns[$fields_meta[$i]->name]) || isset($highlight_columns[PMA_backquote($fields_meta[$i]->name)])) { @@ -870,6 +919,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { echo '<th'; $th_class = array(); + $th_class[] = 'draggable'; if ($condition_field) { $th_class[] = 'condition'; } @@ -888,7 +938,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ echo '>' . $order_link . $comments . '</th>'; } $vertical_display['desc'][] = ' <th ' - . ($condition_field ? ' class="condition"' : '') . '>' . "\n" + . 'class="draggable' . ($condition_field ? ' condition' : '') . '">' . "\n" . $order_link . $comments . ' </th>' . "\n"; } // end if (2.1)
@@ -897,9 +947,12 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { echo '<th'; + $th_class = array(); + $th_class[] = 'draggable'; if ($condition_field) { - echo ' class="condition"'; + $th_class[] = 'condition'; } + echo ' class="' . implode(' ', $th_class) . '"'; if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { echo ' valign="bottom"'; } @@ -917,7 +970,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ echo "\n" . $comments . '</th>'; } $vertical_display['desc'][] = ' <th ' - . ($condition_field ? ' class="condition"' : '') . '>' . "\n" + . 'class="draggable' . ($condition_field ? ' condition"' : '') . '">' . "\n" . ' ' . htmlspecialchars($fields_meta[$i]->name) . "\n" . $comments . ' </th>'; } // end else (2.2) @@ -1150,6 +1203,8 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { if ($vertical_display['emptypre'] > 0) { echo ' <th colspan="' . $vertical_display['emptypre'] . '">' . "\n" .' </th>' . "\n"; + } else if ($GLOBALS['cfg']['RowActionLinks'] == 'none') { + echo ' <th></th>' . "\n"; }
foreach ($vertical_display['desc'] as $val) { @@ -1285,7 +1340,19 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { } // end if (1)
// 2. Displays the rows' values - for ($i = 0; $i < $fields_cnt; ++$i) { + + if (PMA_isSelect()) { + // prepare to get the column order, if available + $pmatable = new PMA_Table($GLOBALS['table'], $GLOBALS['db']); + $col_order = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_ORDER); + } else { + $col_order = false; + } + + for ($j = 0; $j < $fields_cnt; ++$j) { + // assign $i with appropriate column order + $i = $col_order ? $col_order[$j] : $j; + $meta = $fields_meta[$i]; $not_null_class = $meta->not_null ? 'not_null' : ''; $relation_class = isset($map[$meta->name]) ? 'relation' : ''; @@ -1652,8 +1719,18 @@ function PMA_displayVerticalTable() echo '</tr>' . "\n"; } // end if
+ if (PMA_isSelect()) { + // prepare to get the column order, if available + $pmatable = new PMA_Table($GLOBALS['table'], $GLOBALS['db']); + $col_order = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_ORDER); + } else { + $col_order = false; + } + // Displays data - foreach ($vertical_display['desc'] AS $key => $val) { + foreach ($vertical_display['desc'] AS $j => $val) { + // assign appropriate key with current column order + $key = $col_order ? $col_order[$j] : $j;
echo '<tr>' . "\n"; echo $val; diff --git a/libraries/header.inc.php b/libraries/header.inc.php index 4036f86..5c07472 100644 --- a/libraries/header.inc.php +++ b/libraries/header.inc.php @@ -19,7 +19,7 @@ require_once './libraries/RecentTable.class.php'; * @param string $table The table name */ function PMA_addRecentTable($db, $table) { - $tmp_result = RecentTable::getInstance()->add($db, $table); + $tmp_result = PMA_RecentTable::getInstance()->add($db, $table); if ($tmp_result === true) { echo '<span class="hide" id="update_recent_tables"></span>'; } else { diff --git a/navigation.php b/navigation.php index 76f5b98..af3f138 100644 --- a/navigation.php +++ b/navigation.php @@ -59,7 +59,7 @@ require_once './libraries/RecentTable.class.php'; * Check if it is an ajax request to reload the recent tables list. */ if ($GLOBALS['is_ajax_request'] && $_REQUEST['recent_table']) { - PMA_ajaxResponse('', true, array('options' => RecentTable::getInstance()->getHtmlSelectOption()) ); + PMA_ajaxResponse('', true, array('options' => PMA_RecentTable::getInstance()->getHtmlSelectOption()) ); }
// keep the offset of the db list in session before closing it @@ -195,7 +195,7 @@ require './libraries/navigation_header.inc.php'; // display recently used tables if ($GLOBALS['cfg']['LeftRecentTable'] > 0) { echo '<div id="recentTableList">'; - echo RecentTable::getInstance()->getHtmlSelect(); + echo PMA_RecentTable::getInstance()->getHtmlSelect(); echo '</div>'; }
diff --git a/server_sql.php b/server_sql.php index 243d0bf..f8609f4 100644 --- a/server_sql.php +++ b/server_sql.php @@ -14,6 +14,7 @@ require_once './libraries/common.inc.php'; * Does the common work */ $GLOBALS['js_include'][] = 'functions.js'; +$GLOBALS['js_include'][] = 'makegrid.js'; $GLOBALS['js_include'][] = 'sql.js';
require_once './libraries/server_common.inc.php'; diff --git a/sql.php b/sql.php index e8850fb..bd3ff46 100644 --- a/sql.php +++ b/sql.php @@ -159,6 +159,17 @@ if(isset($_REQUEST['get_set_values']) && $_REQUEST['get_set_values'] == true) { $extra_data['select'] = $select; PMA_ajaxResponse(NULL, true, $extra_data); } + +/** + * Check ajax request to set the column order + */ +if(isset($_REQUEST['set_col_order']) && $_REQUEST['set_col_order'] == true) { + $pmatable = new PMA_Table($table, $db); + $col_order = explode(',', $_REQUEST['col_order']); + $retval = $pmatable->setUiProp(PMA_Table::PROP_COLUMN_ORDER, $col_order, $_REQUEST['table_create_time']); + PMA_ajaxResponse(NULL, ($retval == true)); +} + // Default to browse if no query set and we have table // (needed for browsing from DefaultTabTable) if (empty($sql_query) && strlen($table) && strlen($db)) { @@ -363,10 +374,13 @@ if ($is_select) { // see line 141 $is_maint = true; }
+// assign default full_sql_query +$full_sql_query = $sql_query; + // Handle remembered sorting order, only for single table query if ($GLOBALS['cfg']['RememberSorting'] - && basename($GLOBALS['PMA_PHP_SELF']) == 'sql.php' && ! ($is_count || $is_export || $is_func || $is_analyse) + && count($analyzed_sql[0]['select_expr']) == 0 && isset($analyzed_sql[0]['queryflags']['select_from']) && count($analyzed_sql[0]['table_ref']) == 1 ) { @@ -376,7 +390,7 @@ if ($GLOBALS['cfg']['RememberSorting'] if ($sorted_col) { // retrieve the remembered sorting order for current table $sql_order_to_append = ' ORDER BY ' . $sorted_col . ' '; - $sql_query = $analyzed_sql[0]['section_before_limit'] . $sql_order_to_append . $analyzed_sql[0]['section_after_limit']; + $full_sql_query = $analyzed_sql[0]['section_before_limit'] . $sql_order_to_append . $analyzed_sql[0]['section_after_limit'];
// update the $analyzed_sql $analyzed_sql[0]['section_before_limit'] .= $sql_order_to_append; @@ -412,9 +426,7 @@ if ((! $cfg['ShowAll'] || $_SESSION['tmp_user_values']['max_rows'] != 'all') } }
-} else { - $full_sql_query = $sql_query; -} // end if...else +}
if (strlen($db)) { PMA_DBI_select_db($db); @@ -846,6 +858,7 @@ else { } else {
$GLOBALS['js_include'][] = 'functions.js'; + $GLOBALS['js_include'][] = 'makegrid.js'; $GLOBALS['js_include'][] = 'sql.js';
unset($message); diff --git a/tbl_replace.php b/tbl_replace.php index 5b722c6..d23482e 100644 --- a/tbl_replace.php +++ b/tbl_replace.php @@ -65,6 +65,7 @@ PMA_DBI_select_db($GLOBALS['db']); */ $goto_include = false;
+$GLOBALS['js_include'][] = 'makegrid.js'; // Needed for generation of Inline Edit anchors $GLOBALS['js_include'][] = 'sql.js';
diff --git a/tbl_select.php b/tbl_select.php index 681083a..875182d 100644 --- a/tbl_select.php +++ b/tbl_select.php @@ -16,6 +16,7 @@ require_once './libraries/common.inc.php'; require_once './libraries/mysql_charsets.lib.php';
+$GLOBALS['js_include'][] = 'makegrid.js'; $GLOBALS['js_include'][] = 'sql.js'; $GLOBALS['js_include'][] = 'tbl_select.js'; $GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js'; diff --git a/tbl_sql.php b/tbl_sql.php index 70fafc1..0321395 100644 --- a/tbl_sql.php +++ b/tbl_sql.php @@ -14,6 +14,7 @@ require_once './libraries/common.inc.php'; * Runs common work */ $GLOBALS['js_include'][] = 'functions.js'; +$GLOBALS['js_include'][] = 'makegrid.js'; $GLOBALS['js_include'][] = 'sql.js';
require './libraries/tbl_common.php'; diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 94ed5fe..72dec00 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -1913,3 +1913,68 @@ span.mysql-separator { span.mysql-number { color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['digit_integer']; ?>; } + +.colborder { + border-right: solid 1px #FFFFFF; + cursor: col-resize; + height: 100%; + margin-left: -3px; + position: absolute; + width: 5px; +} + +.pma_table th.draggable span, .pma_table tbody td span { + display: block; + overflow: hidden; +} + +.cRsz { + position: absolute; +} + +.draggable { + cursor: move; +} + +.cCpy { + background: #000; + color: #FFF; + font-weight: bold; + margin: 0.1em; + padding: 0.3em; + position: absolute; +} + +.cPointer { + background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>col_pointer.png); + height: 20px; + margin-left: -5px; /* must be minus half of its width */ + margin-top: -10px; + position: absolute; + width: 10px; +} + +.cPointerVer { /* cPointer with vertical display mode */ + background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>col_pointer_ver.png); + height: 10px; + margin-left: -5px; + margin-top: -5px; /* must be minus half of its height */ + position: absolute; + width: 20px; +} + +.dHint { + background: #333; + border:1px solid #000; + color: #FFF; + font-size: 0.8em; + font-weight: bold; + margin-top: -1em; + opacity: 0.8; + padding: 0.5em 1em; + position: absolute; + text-shadow: -1px -1px #000; + -moz-border-radius: 0.3em; + -webkit-border-radius: 0.3em; + border-radius: 0.3em; +} diff --git a/themes/original/img/col_pointer.png b/themes/original/img/col_pointer.png new file mode 100644 index 0000000..7126aef Binary files /dev/null and b/themes/original/img/col_pointer.png differ diff --git a/themes/original/img/col_pointer_ver.png b/themes/original/img/col_pointer_ver.png new file mode 100644 index 0000000..4607912 Binary files /dev/null and b/themes/original/img/col_pointer_ver.png differ diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index c403698..3c9d951 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -2269,3 +2269,72 @@ span.mysql-separator { span.mysql-number { color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['digit_integer']; ?>; } + +.colborder { + border-left: 1px solid #FFF; + cursor: col-resize; + height: 100%; + margin-left: -1px; + position: absolute; + width: 5px; +} + +.pma_table th.draggable span, .pma_table tbody td span { + display: block; + overflow: hidden; +} + +.cRsz { + position: absolute; +} + +.cCpy { + background: #333; + color: #FFF; + font-weight: bold; + margin: 0.1em; + padding: 0.3em; + position: absolute; + text-shadow: -1px -1px #000; + + -moz-box-shadow: 0 0 0.7em #000; + -webkit-box-shadow: 0 0 0.7em #000; + box-shadow: 0 0 0.7em #000; + -moz-border-radius: 0.3em; + -webkit-border-radius: 0.3em; + border-radius: 0.3em; +} + +.cPointer { + background: url(./themes/pmahomme/img/col_pointer.png); + height: 20px; + margin-left: -5px; /* must be minus half of its width */ + margin-top: -10px; + position: absolute; + width: 10px; +} + +.cPointerVer { /* cPointer with vertical display mode */ + background: url(./themes/pmahomme/img/col_pointer_ver.png); + height: 10px; + margin-left: -5px; + margin-top: -5px; /* must be minus half of its height */ + position: absolute; + width: 20px; +} + +.dHint { + background: #333; + border:1px solid #000; + color: #FFF; + font-size: 0.8em; + font-weight: bold; + margin-top: -1em; + opacity: 0.8; + padding: 0.5em 1em; + position: absolute; + text-shadow: -1px -1px #000; + -moz-border-radius: 0.3em; + -webkit-border-radius: 0.3em; + border-radius: 0.3em; +} diff --git a/themes/pmahomme/img/col_pointer.png b/themes/pmahomme/img/col_pointer.png new file mode 100644 index 0000000..8882a2e Binary files /dev/null and b/themes/pmahomme/img/col_pointer.png differ diff --git a/themes/pmahomme/img/col_pointer_ver.png b/themes/pmahomme/img/col_pointer_ver.png new file mode 100644 index 0000000..8964754 Binary files /dev/null and b/themes/pmahomme/img/col_pointer_ver.png differ
hooks/post-receive