Changeset 77
- Timestamp:
- 07/05/07 16:51:01 (1 year ago)
- Files:
-
- branch/controllers/points_controller.php (modified) (1 diff)
- branch/db.sql (modified) (64 diffs)
- branch/views/layouts/map.ctp (modified) (1 diff)
- branch/views/points/add.ctp (modified) (2 diffs)
- branch/views/points/index.ctp (modified) (2 diffs)
- branch/webroot/js/gmap.js (modified) (2 diffs)
- branch/webroot/js/jquery.js (modified) (2 diffs)
- branch/webroot/js/wymeditor/README (modified) (1 diff)
- branch/webroot/js/wymeditor/jquery.wymeditor.js (modified) (16 diffs)
- branch/webroot/js/wymeditor/jquery.wymeditor.pack.js (modified) (1 diff)
- branch/webroot/js/wymeditor/lang/hu.js (added)
- branch/webroot/js/wymeditor/lang/nl.js (added)
- branch/webroot/js/wymeditor/skins/default/screen.css (modified) (2 diffs)
- branch/webroot/js/wymeditor/wym_css_parser.js (added)
- branch/webroot/js/wymeditor/xhtml_parser.js (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branch/controllers/points_controller.php
r76 r77 13 13 14 14 function add() { 15 $this->layout = "map"; 15 16 if(empty($this->data)) { 16 17 $this->render(); branch/db.sql
r69 r77 4 4 -- 5 5 -- Host: localhost 6 -- Generation Time: Ju n 15, 2007 at 05:01PM6 -- Generation Time: Jul 05, 2007 at 05:49 PM 7 7 -- Server version: 5.0.38 8 8 -- PHP Version: 5.2.1 … … 17 17 -- 18 18 19 DROP TABLE IF EXISTS `cake_sessions`; 19 20 CREATE TABLE `cake_sessions` ( 20 21 `id` varchar(255) NOT NULL default '', … … 24 25 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 25 26 27 -- 28 -- Dumping data for table `cake_sessions` 29 -- 30 31 26 32 -- -------------------------------------------------------- 27 33 … … 30 36 -- 31 37 38 DROP TABLE IF EXISTS `comments`; 32 39 CREATE TABLE `comments` ( 33 40 `id` int(8) unsigned NOT NULL auto_increment, … … 40 47 `modified` datetime NOT NULL, 41 48 PRIMARY KEY (`id`) 42 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 49 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 50 51 -- 52 -- Dumping data for table `comments` 53 -- 54 55 43 56 -- -------------------------------------------------------- 44 57 … … 47 60 -- 48 61 62 DROP TABLE IF EXISTS `config_categories`; 49 63 CREATE TABLE `config_categories` ( 50 64 `id` int(10) unsigned NOT NULL auto_increment, … … 70 84 -- 71 85 86 DROP TABLE IF EXISTS `configs`; 72 87 CREATE TABLE `configs` ( 73 88 `id` int(10) unsigned NOT NULL auto_increment, … … 103 118 -- 104 119 120 DROP TABLE IF EXISTS `copyrights`; 105 121 CREATE TABLE `copyrights` ( 106 122 `id` int(8) unsigned NOT NULL auto_increment, … … 128 144 -- 129 145 146 DROP TABLE IF EXISTS `countries`; 130 147 CREATE TABLE `countries` ( 131 148 `id` smallint(6) NOT NULL auto_increment, … … 388 405 -- 389 406 407 DROP TABLE IF EXISTS `event_types`; 390 408 CREATE TABLE `event_types` ( 391 409 `id` int(8) unsigned NOT NULL auto_increment, … … 410 428 -- 411 429 430 DROP TABLE IF EXISTS `events`; 412 431 CREATE TABLE `events` ( 413 432 `id` int(8) unsigned NOT NULL auto_increment, … … 429 448 `modified` datetime NOT NULL, 430 449 PRIMARY KEY (`id`) 431 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;450 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 432 451 433 452 -- … … 442 461 -- 443 462 463 DROP TABLE IF EXISTS `events_tags`; 444 464 CREATE TABLE `events_tags` ( 445 465 `event_id` int(8) NOT NULL, … … 459 479 -- 460 480 481 DROP TABLE IF EXISTS `feeds`; 461 482 CREATE TABLE `feeds` ( 462 483 `id` int(8) unsigned NOT NULL auto_increment, … … 468 489 `modified` datetime NOT NULL, 469 490 PRIMARY KEY (`id`) 470 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;491 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 471 492 472 493 -- … … 481 502 -- 482 503 504 DROP TABLE IF EXISTS `galleries`; 483 505 CREATE TABLE `galleries` ( 484 506 `id` int(8) unsigned NOT NULL auto_increment, … … 492 514 `modified` datetime NOT NULL, 493 515 PRIMARY KEY (`id`) 494 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;516 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 495 517 496 518 -- … … 505 527 -- 506 528 529 DROP TABLE IF EXISTS `galleries_images`; 507 530 CREATE TABLE `galleries_images` ( 508 531 `gallery_id` int(8) unsigned NOT NULL, … … 521 544 -- 522 545 546 DROP TABLE IF EXISTS `galleries_tags`; 523 547 CREATE TABLE `galleries_tags` ( 524 548 `gallery_id` int(8) unsigned NOT NULL, … … 537 561 -- 538 562 563 DROP TABLE IF EXISTS `groups`; 539 564 CREATE TABLE `groups` ( 540 565 `id` int(10) unsigned NOT NULL auto_increment, … … 565 590 -- 566 591 592 DROP TABLE IF EXISTS `groups_permissions`; 567 593 CREATE TABLE `groups_permissions` ( 568 594 `group_id` int(10) unsigned NOT NULL default '0', … … 589 615 -- 590 616 617 DROP TABLE IF EXISTS `images`; 591 618 CREATE TABLE `images` ( 592 619 `id` int(8) unsigned NOT NULL auto_increment, … … 607 634 `modified` datetime default NULL, 608 635 PRIMARY KEY (`id`) 609 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;636 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; 610 637 611 638 -- … … 620 647 -- 621 648 649 DROP TABLE IF EXISTS `images_tags`; 622 650 CREATE TABLE `images_tags` ( 623 651 `image_id` int(8) NOT NULL, … … 630 658 -- 631 659 660 632 661 -- -------------------------------------------------------- 633 662 … … 636 665 -- 637 666 667 DROP TABLE IF EXISTS `login_attempts`; 638 668 CREATE TABLE `login_attempts` ( 639 669 `ip` varchar(15) character set utf8 collate utf8_unicode_ci NOT NULL, … … 655 685 -- 656 686 687 DROP TABLE IF EXISTS `menus`; 657 688 CREATE TABLE `menus` ( 658 689 `id` int(11) unsigned NOT NULL auto_increment, … … 668 699 `modified` datetime NOT NULL, 669 700 PRIMARY KEY (`id`) 670 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 1;701 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=42 ; 671 702 672 703 -- … … 714 745 (38, 'Add Track', '/admin/tracks/add', 30, NULL, 37, 1, 900, 1, '2007-06-04 22:54:37', '2007-06-04 22:54:37'), 715 746 (39, 'Manage Playlists', '/admin/playlists/', 31, NULL, 29, 1, 900, 1, '2007-06-04 22:55:27', '2007-06-04 22:55:27'), 716 (40, 'Add Playlist', '/admin/playlists/add', 32, NULL, 39, 1, 900, 1, '2007-06-04 22:56:09', '2007-06-04 22:56:09'); 747 (40, 'Add Playlist', '/admin/playlists/add', 32, NULL, 39, 1, 900, 1, '2007-06-04 22:56:09', '2007-06-04 22:56:09'), 748 (41, 'Manage Tags', '/admin/tags', 1, NULL, 35, 1, 900, 1, '2007-06-20 16:02:08', '2007-06-20 16:02:08'); 717 749 718 750 -- -------------------------------------------------------- … … 722 754 -- 723 755 756 DROP TABLE IF EXISTS `pages`; 724 757 CREATE TABLE `pages` ( 725 758 `id` int(8) unsigned NOT NULL auto_increment, … … 736 769 `modified` datetime NOT NULL, 737 770 PRIMARY KEY (`id`) 738 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;771 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 739 772 740 773 -- … … 742 775 -- 743 776 777 744 778 -- -------------------------------------------------------- 745 779 … … 748 782 -- 749 783 784 DROP TABLE IF EXISTS `pages_tags`; 750 785 CREATE TABLE `pages_tags` ( 751 786 `page_id` int(8) unsigned NOT NULL, … … 765 800 -- 766 801 802 DROP TABLE IF EXISTS `permissions`; 767 803 CREATE TABLE `permissions` ( 768 804 `id` int(10) unsigned NOT NULL auto_increment, … … 796 832 -- 797 833 834 DROP TABLE IF EXISTS `playlists`; 798 835 CREATE TABLE `playlists` ( 799 836 `id` int(8) unsigned NOT NULL auto_increment, … … 801 838 `comments` varchar(255) collate utf8_unicode_ci NOT NULL, 802 839 PRIMARY KEY (`id`) 803 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;840 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; 804 841 805 842 -- … … 814 851 -- 815 852 853 DROP TABLE IF EXISTS `playlists_tracks`; 816 854 CREATE TABLE `playlists_tracks` ( 817 855 `playlist_id` int(8) unsigned NOT NULL, … … 828 866 829 867 -- 868 -- Table structure for table `points` 869 -- 870 871 DROP TABLE IF EXISTS `points`; 872 CREATE TABLE `points` ( 873 `id` int(11) NOT NULL auto_increment, 874 `name` varchar(60) NOT NULL, 875 `description` text NOT NULL, 876 `street` varchar(60) NOT NULL, 877 `city` varchar(60) NOT NULL, 878 `state` varchar(2) NOT NULL, 879 `zip` varchar(5) NOT NULL, 880 `latitude` float NOT NULL, 881 `longitude` float NOT NULL, 882 `zoom` int(11) NOT NULL, 883 `created` datetime NOT NULL, 884 `modified` datetime NOT NULL, 885 PRIMARY KEY (`id`) 886 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; 887 888 -- 889 -- Dumping data for table `points` 890 -- 891 892 INSERT INTO `points` (`id`, `name`, `description`, `street`, `city`, `state`, `zip`, `latitude`, `longitude`, `zoom`, `created`, `modified`) VALUES 893 (1, 'Tane''s Home', 'Tanes Home', '20/4 Dalgety Ave', 'Edinburgh', '', 'EH7 5', 55.9584, -3.16237, 3, '2007-07-05 17:10:14', '2007-07-05 17:10:14'), 894 (4, '', '', '', '', '', '', 55.8683, -4.27112, 0, '2007-07-05 17:21:59', '2007-07-05 17:21:59'), 895 (5, '', '', '', '', '', '', 34.0996, -118.412, 0, '2007-07-05 17:31:55', '2007-07-05 17:31:55'); 896 897 -- -------------------------------------------------------- 898 899 -- 830 900 -- Table structure for table `posts` 831 901 -- 832 902 903 DROP TABLE IF EXISTS `posts`; 833 904 CREATE TABLE `posts` ( 834 905 `id` int(8) unsigned NOT NULL auto_increment, … … 848 919 `modified` datetime default NULL, 849 920 PRIMARY KEY (`id`) 850 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;921 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; 851 922 852 923 -- … … 854 925 -- 855 926 927 INSERT INTO `posts` (`id`, `title`, `byline`, `body`, `post_date`, `comments_count`, `user_id`, `subject_id`, `access_level`, `stub`, `tags`, `frontpage`, `published`, `created`, `modified`) VALUES 928 (1, 'Welcome to the new No Half Measures website', 'New updated fancy do.', '<p><img alt="" title="" src="http://webrocket/img/NoHalfMeasures.jpg" align="left"/>Welcome to the new No Half Measures website. This website has been updated to include lots of new features, such as:</p><ul><li>RSS feeds for all news and event content</li><li>Access to all our artists videos on youtube</li><li>You are able to comment on stories</li><li>Members-only access areas.<br /></li></ul>', '2007-06-21 14:56:00', NULL, 1, 1, 0, 'welcome_to_the_new_no_half_measures_website', 'No Half Measures, Youtube, Videos, Members Only', 1, 1, '2007-06-21 14:59:32', '2007-06-21 15:12:10'); 856 929 857 930 -- -------------------------------------------------------- … … 861 934 -- 862 935 936 DROP TABLE IF EXISTS `posts_tags`; 863 937 CREATE TABLE `posts_tags` ( 864 938 `post_id` int(8) unsigned NOT NULL, … … 871 945 -- 872 946 947 INSERT INTO `posts_tags` (`post_id`, `tag_id`) VALUES 948 (1, 5), 949 (1, 6), 950 (1, 7), 951 (1, 8); 952 873 953 -- -------------------------------------------------------- 874 954 … … 877 957 -- 878 958 959 DROP TABLE IF EXISTS `profiles`; 879 960 CREATE TABLE `profiles` ( 880 961 `id` int(8) unsigned NOT NULL auto_increment, … … 887 968 `modified` datetime NOT NULL, 888 969 PRIMARY KEY (`id`) 889 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;970 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 890 971 891 972 -- … … 900 981 -- 901 982 983 DROP TABLE IF EXISTS `sections`; 902 984 CREATE TABLE `sections` ( 903 985 `id` int(8) unsigned NOT NULL auto_increment, … … 919 1001 -- 920 1002 1003 DROP TABLE IF EXISTS `states`; 921 1004 CREATE TABLE `states` ( 922 1005 `id` tinyint(4) NOT NULL auto_increment, … … 1005 1088 -- 1006 1089 1090 DROP TABLE IF EXISTS `subjects`; 1007 1091 CREATE TABLE `subjects` ( 1008 1092 `id` int(8) unsigned NOT NULL auto_increment, … … 1025 1109 1026 1110 INSERT INTO `subjects` (`id`, `title`, `posts_count`, `pages_count`, `events_count`, `feeds_count`, `images_count`, `galleries_count`, `videos_count`, `created`, `modified`) VALUES 1027 (1, 'Uncatagorised', 9, 0, 2, 0, 3, 0, 0, '2007-05-01 17:05:55', '2007-05-01 17:05:55');1111 (1, 'Uncatagorised', 1, 0, 2, 0, 0, 0, 0, '2007-05-01 17:05:55', '2007-05-01 17:05:55'); 1028 1112 1029 1113 -- -------------------------------------------------------- … … 1033 1117 -- 1034 1118 1119 DROP TABLE IF EXISTS `tags`; 1035 1120 CREATE TABLE `tags` ( 1036 1121 `id` int(8) unsigned NOT NULL auto_increment, 1037 1122 `tag` varchar(255) collate utf8_unicode_ci NOT NULL, 1038 1123 PRIMARY KEY (`id`) 1039 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;1124 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=9 ; 1040 1125 1041 1126 -- … … 1043 1128 -- 1044 1129 1130 INSERT INTO `tags` (`id`, `tag`) VALUES 1131 (4, 'Test 2'), 1132 (3, 'Test'), 1133 (5, 'No Half Measures'), 1134 (6, 'Youtube'), 1135 (7, 'Videos'), 1136 (8, 'Members Only'); 1137 1045 1138 -- -------------------------------------------------------- 1046 1139 … … 1049 1142 -- 1050 1143 1144 DROP TABLE IF EXISTS `tags_tracks`; 1051 1145 CREATE TABLE `tags_tracks` ( 1052 1146 `tag_id` int(8) unsigned NOT NULL, … … 1058 1152 -- 1059 1153 1154 1060 1155 -- -------------------------------------------------------- 1061 1156 … … 1064 1159 -- 1065 1160 1161 DROP TABLE IF EXISTS `tags_users`; 1066 1162 CREATE TABLE `tags_users` ( 1067 1163 `tag_id` int(8) unsigned NOT NULL, … … 1080 1176 -- 1081 1177 1178 DROP TABLE IF EXISTS `tags_videos`; 1082 1179 CREATE TABLE `tags_videos` ( 1083 1180 `tag_id` int(8) unsigned NOT NULL, … … 1091 1188 -- 1092 1189 1190 1093 1191 -- -------------------------------------------------------- 1094 1192 … … 1097 1195 -- 1098 1196 1197 DROP TABLE IF EXISTS `tracks`; 1099 1198 CREATE TABLE `tracks` ( 1100 1199 `id` int(8) unsigned NOT NULL auto_increment, … … 1111 1210 `modified` datetime default NULL, 1112 1211 PRIMARY KEY (`id`) 1113 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;1212 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; 1114 1213 1115 1214 -- … … 1117 1216 -- 1118 1217 1218 1119 1219 -- -------------------------------------------------------- 1120 1220 … … 1123 1223 -- 1124 1224 1225 DROP TABLE IF EXISTS `user_histories`; 1125 1226 CREATE TABLE `user_histories` ( 1126 1227 `id` int(10) unsigned NOT NULL auto_increment, … … 1130 1231 `visitdate` datetime NOT NULL, 1131 1232 PRIMARY KEY (`id`) 1132 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;1233 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 1133 1234 1134 1235 -- … … 1143 1244 -- 1144 1245 1246 DROP TABLE IF EXISTS `users`; 1145 1247 CREATE TABLE `users` ( 1146 1248 `id` int(10) unsigned NOT NULL auto_increment, … … 1171 1273 1172 1274 INSERT INTO `users` (`id`, `username`, `passwd`, `name`, `email`, `last_visit`, `group_id`, `profile_id`, `posts_count`, `pages_count`, `comments_count`, `videos_count`, `tags`, `active`, `created`, `modified`) VALUES 1173 (1, 'WebrocketAdmin', 'fdfedc01c66e9ea2817508ca1097df2f', 'Webrocket Admin', 'admin@webrocket.com', '2007-06-11 17:29:46', 1, 1, 9, 2, 2, 0, '', 1, '2007-03-26 00:00:00', '0000-00-00 00:00:00'),1275 (1, 'WebrocketAdmin', 'fdfedc01c66e9ea2817508ca1097df2f', 'Webrocket Admin', 'admin@webrocket.com', '2007-06-11 17:29:46', 1, 1, 1, 2, 2, 0, '', 1, '2007-03-26 00:00:00', '0000-00-00 00:00:00'), 1174 1276 (2, 'Editor', '5aee9dbd2a188839105073571bee1b1f', 'Site', 'Editor', '2007-04-27 10:02:45', 2, 0, 0, 0, 0, 0, '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'), 1175 1277 (3, 'Member', 'aa08769cdcb26674c6706093503ff0a3', 'Member', 'member@member.com', '2007-04-26 13:43:34', 3, 0, 0, 0, 0, 0, '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'); … … 1181 1283 -- 1182 1284 1285 DROP TABLE IF EXISTS `videos`; 1183 1286 CREATE TABLE `videos` ( 1184 1287 `id` int(8) unsigned NOT NULL auto_increment, 1185 1288 `title` varchar(255) NOT NULL, 1186 `url` varchar(255) NOT NULL, 1187 `video_location` varchar(255) NOT NULL, 1188 `video_date` date NOT NULL, 1289 `slug` varchar(255) NOT NULL, 1189 1290 `body` text NOT NULL, 1190 `copyright_owner` varchar(255) NOT NULL,1191 `copyright_id` int(8) unsigned NOT NULL,1192 1291 `published` tinyint(1) NOT NULL, 1292 `playlist_id` varchar(255) NOT NULL, 1293 `pages` int(8) unsigned NOT NULL, 1294 `num_per_page` int(8) unsigned NOT NULL, 1193 1295 `user_id` int(8) unsigned NOT NULL, 1194 1296 `subject_id` int(8) unsigned NOT NULL, … … 1197 1299 `modified` datetime NOT NULL, 1198 1300 PRIMARY KEY (`id`) 1199 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;1301 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ; 1200 1302 1201 1303 -- 1202 1304 -- Dumping data for table `videos` 1203 1305 -- 1306 1307 INSERT INTO `videos` (`id`, `title`, `slug`, `body`, `published`, `playlist_id`, `pages`, `num_per_page`, `user_id`, `subject_id`, `tags`, `created`, `modified`) VALUES 1308 (4, 'The Hedrons Playlist', 'the_hedrons_playlist', 'All of The hedrons videos', 1, '374A01AB56A74B24', 1, 20, 1, 1, 'The Hedrons, Videos, Singles, Album, Music', '2007-06-22 14:15:08', '2007-06-22 14:15:08'), 1309 (5, 'The Hedrons EPK Videos', 'the_hedrons_epk_videos', 'The Hedrons press & Documentry videos', 1, '1C0DBE8419B7009A', 1, 20, 1, 1, 'The Hedrons, EPK, Videos, Press', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), 1310 (6, 'The Hedrons Music Videos', 'the_hedrons_music_videos', 'All of The Hedrons music videos', 1, 'DC8DA47DD3DF59EA', 1, 20, 1, 1, 'The Hedrons, Music, Videos', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), 1311 (7, 'The Hedrons Live Videos', 'the_hedrons_live_videos', 'A collection of live performances by The Hedrons', 1, '447B38C4E627A018', 1, 20, 1, 1, 'The Hedrons, Live, Music', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); 1312 branch/views/layouts/map.ctp
r76 r77 15 15 <?php echo $html->css('jdMenu.slate');?> 16 16 <?php echo $html->css('../js/wymeditor/skins/default/screen');?> 17 <?php echo $javascript->link('http://maps.google.com/maps?file=api&v=2&key=ABQIAAAApCYnM8S-TSRBhQk16Ynr4B TuQ5Stu0YOLxDNgQD6HZLt-gFdYxSy1p2Jm4EqTOljqE9qKAQSPbXPYA') ?>18 <?php echo $javascript->link('http://www.google.com/uds/api?file=uds.js&v=1.0&key=ABQIAAAApCYnM8S-TSRBhQk16Ynr4B TuQ5Stu0YOLxDNgQD6HZLt-gFdYxSy1p2Jm4EqTOljqE9qKAQSPbXPYA') ?>19 <?php e($ javascript->link('gmap'));?>17 <?php echo $javascript->link('http://maps.google.com/maps?file=api&v=2&key=ABQIAAAApCYnM8S-TSRBhQk16Ynr4BRA04cqJrHarhjq-7w24zYog0j8lRSudZ1P7zGx8GlIuWk6PlgJYmhZtw') ?> 18 <?php echo $javascript->link('http://www.google.com/uds/api?file=uds.js&v=1.0&key=ABQIAAAApCYnM8S-TSRBhQk16Ynr4BRA04cqJrHarhjq-7w24zYog0j8lRSudZ1P7zGx8GlIuWk6PlgJYmhZtw') ?> 19 <?php e($this->element('js_include'));?> 20 20 </head> 21 21 <body> branch/views/points/add.ctp
r76 r77 1 1 <h2>New Point</h2> 2 3 <div style="float:left;width:800px;"> 4 <?php 5 $default = array('type'=>'0','zoom'=>13,'lat'=>'55.868272','long'=>'-4.271121'); 6 echo $googleMap->map($default, $style = 'width:100%; height: 600px' ); 7 //if(isset($points)){ 8 echo $googleMap->addMarkers($points); 9 // } 10 11 12 ?> 13 </div> 14 15 <div style="float:left;width:15%"> 16 <p> 17 Please enter the postcode or address of the point you want to add. 18 </p> 19 2 20 <?php e($form->create('Point'));?> 21 22 <?php e($form->input('postcode'));?> 23 24 <input type="text" id="postcode" size="25" /><br /> 25 <input type="submit" onclick="javascript:usePointFromPostcode(document.getElementById('postcode').value, setCenterToPoint)" value="Center Map"/> 26 <input type="submit" value="Place Marker" onclick="javascript:usePointFromPostcode(document.getElementById('postcode').value, placeMarkerAtPoint)" /> 27 <input type="submit" value="Do whatever" onclick="javascript:usePointFromPostcode(document.getElementById('postcode').value, function (point) { alert('Latitude: ' + point.lat() + '\nLongitude: ' + point.lng());})" /> 28 <br /> 29 <input id="lat" /><input id="lng" /> 30 31 32 3 33 <?php e($form->input('name'));?> 4 34 <?php e($form->input('description'));?> … … 13 43 <li><?php echo $html->link('List points', '/points/index')?></li> 14 44 </ul> 45 </div> branch/views/points/index.ctp
r76 r77 17 17 $avg_lon = $avg_lon/$count; 18 18 //echo $avg_lat,' ',$avg_lon; 19 $default = array('type'=>' 0','zoom'=>13,'lat'=>$avg_lat,'long'=>$avg_lon);19 $default = array('type'=>'2','zoom'=>13,'lat'=>$avg_lat,'long'=>$avg_lon); 20 20 echo $googleMap->map($default, $style = 'width:100%; height: 800px' ); 21 21 //if(isset($points)){ … … 52 52 <input type="submit" value="Place Marker" onclick="javascript:usePointFromPostcode(document.getElementById('postcode').value, placeMarkerAtPoint)" /> 53 53 <input type="submit" value="Do whatever" onclick="javascript:usePointFromPostcode(document.getElementById('postcode').value, function (point) { alert('Latitude: ' + point.lat() + '\nLongitude: ' + point.lng());})" /> 54 <br /> 55 <input id="lat" /><input id="lng" /> 54 56 </div> branch/webroot/js/gmap.js
r76 r77 19 19 var resultLat = localSearch.results[0].lat; 20 20 var resultLng = localSearch.results[0].lng; 21 $j('#lat').attr('value', resultLat); 22 $j('#lng').attr('value', resultLng); 21 23 var point = new GLatLng(resultLat,resultLng); 22 24 callbackFunction(point); … … 80 82 } 81 83 82 addLoadEvent(mapLoad);84 //addLoadEvent(mapLoad); 83 85 addUnLoadEvent(GUnload); branch/webroot/js/jquery.js
r61 r77 1 // prevent execution of jQuery if included more than once2 if(typeof window.jQuery == "undefined") {3 1 /* 4 * jQuery @VERSION- New Wave Javascript2 * jQuery 1.1.3.1 - New Wave Javascript 5 3 * 6 4 * Copyright (c) 2007 John Resig (jquery.com) … … 8 6 * and GPL (GPL-LICENSE.txt) licenses. 9 7 * 10 * $Date: 2007-0 5-23 13:48:15 +0100 (Wed, 23 May2007) $11 * $Rev: 1961$8 * $Date: 2007-07-05 00:43:24 -0400 (Thu, 05 Jul 2007) $ 9 * $Rev: 2243 $ 12 10 */ 13 14 // Global undefined variable 15 window.undefined = window.undefined; 16 17 /** 18 * Create a new jQuery Object 19 * 20 * @constructor 21 * @private 22 * @name jQuery 23 * @param String|Function|Element|Array<Element>|jQuery a selector 24 * @param jQuery|Element|Array<Element> c context 25 * @cat Core 26 */ 27 var jQuery = function(a,c) { 28 // If the context is global, return a new object 29 if ( window == this ) 30 return new jQuery(a,c); 31 32 return this.init(a,c); 33 }; 34 35 // Map over the $ in case of overwrite 36 if ( typeof $ != "undefined" ) 37 jQuery._$ = $; 38 39 // Map the jQuery namespace to the '$' one 40 var $ = jQuery; 41 42 /** 43 * This function accepts a string containing a CSS or 44 * basic XPath selector which is then used to match a set of elements. 45 * 46 * The core functionality of jQuery centers around this function. 47 * Everything in jQuery is based upon this, or uses this in some way. 48 * The most basic use of this function is to pass in an expression 49 * (usually consisting of CSS or XPath), which then finds all matching 50 * elements. 51 * 52 * By default, if no context is specified, $() looks for DOM elements within the context of the 53 * current HTML document. If you do specify a context, such as a DOM 54 * element or jQuery object, the expression will be matched against 55 * the contents of that context. 56 * 57 * See [[DOM/Traversing/Selectors]] for the allowed CSS/XPath syntax for expressions. 58 * 59 * @example $("div > p") 60 * @desc Finds all p elements that are children of a div element. 61 * @before <p>one</p> <div><p>two</p></div> <p>three</p> 62 * @result [ <p>two</p> ] 63 * 64 * @example $("input:radio", document.forms[0]) 65 * @desc Searches for all inputs of type radio within the first form in the document 66 * 67 * @example $("div", xml.responseXML) 68 * @desc This finds all div elements within the specified XML document. 69 * 70 * @name $ 71 * @param String expr An expression to search with 72 * @param Element|jQuery context (optional) A DOM Element, Document or jQuery to use as context 73 * @cat Core 74 * @type jQuery 75 * @see $(Element) 76 * @see $(Element<Array>) 77 */ 78 79 /** 80 * Create DOM elements on-the-fly from the provided String of raw HTML. 81 * 82 * @example $("<div><p>Hello</p></div>").appendTo("body") 83 * @desc Creates a div element (and all of its contents) dynamically, 84 * and appends it to the body element. Internally, an 85 * element is created and its innerHTML property set to the given markup. 86 * It is therefore both quite flexible and limited. 87 * 88 * @name $ 89 * @param String html A string of HTML to create on the fly. 90 * @cat Core 91 * @type jQuery 92 * @see appendTo(String) 93 */ 94 95 /** 96 * Wrap jQuery functionality around a single or multiple DOM Element(s). 97 * 98 * This function also accepts XML Documents and Window objects 99 * as valid arguments (even though they are not DOM Elements). 100 * 101 * @example $(document.body).css( "background", "black" ); 102 * @desc Sets the background color of the page to black. 103 * 104 * @example $( myForm.elements ).hide() 105 * @desc Hides all the input elements within a form 106 * 107 * @name $ 108 * @param Element|Array<Element> elems DOM element(s) to be encapsulated by a jQuery object. 109 * @cat Core 110 * @type jQuery 111 */ 112 113 /** 114 * A shorthand for $(document).ready(), allowing you to bind a function 115 * to be executed when the DOM document has finished loading. This function 116 * behaves just like $(document).ready(), in that it should be used to wrap 117 * other $() operations on your page that depend on the DOM being ready to be 118 * operated on. While this function is, technically, chainable - there really 119 * isn't much use for chaining against it. 120 * 121 * You can have as many $(document).ready events on your page as you like. 122 * 123 * See ready(Function) for details about the ready event. 124 * 125 * @example $(function(){ 126 * // Document is ready 127 * }); 128 * @desc Executes the function when the DOM is ready to be used. 129 * 130 * @example jQuery(function($) { 131 * // Your code using failsafe $ alias here... 132 * }); 133 * @desc Uses both the shortcut for $(document).ready() and the argument 134 * to write failsafe jQuery code using the $ alias, without relying on the 135 * global alias. 136 * 137 * @name $ 138 * @param Function fn The function to execute when the DOM is ready. 139 * @cat Core 140 * @type jQuery 141 * @see ready(Function) 142 */ 143 144 jQuery.fn = jQuery.prototype = { 145 /** 146 * Initialize a new jQuery object 147 * 148 * @private 149 * @name init 150 * @param String|Function|Element|Array<Element>|jQuery a selector 151 * @param jQuery|Element|Array<Element> c context 152 * @cat Core 153 */ 154 init: function(a,c) { 155 // Make sure that a selection was provided 156 a = a || document; 157 158 // HANDLE: $(function) 159 // Shortcut for document ready 160 if ( jQuery.isFunction(a) ) 161 return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( a ); 162 163 // Handle HTML strings 164 if ( typeof a == "string" ) { 165 // HANDLE: $(html) -> $(array) 166 var m = /^[^<]*(<(.|\s)+>)[^>]*$/.exec(a); 167 if ( m ) 168 a = jQuery.clean( [ m[1] ] ); 169 170 // HANDLE: $(expr) 171 else 172 return new jQuery( c ).find( a ); 173 } 174 175 return this.setArray( 176 // HANDLE: $(array) 177 a.constructor == Array && a || 178 179 // HANDLE: $(arraylike) 180 // Watch for when an array-like object is passed as the selector 181 (a.jquery || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType) && jQuery.makeArray( a ) || 182 183 // HANDLE: $(*) 184 [ a ] ); 185 }, 186 187 /** 188 * The current version of jQuery. 189 * 190 * @private 191 * @property 192 * @name jquery 193 * @type String 194 * @cat Core 195 */ 196 jquery: "@VERSION", 197 198 /** 199 * The number of elements currently matched. The size function will return the same value. 200 * 201 * @example $("img").length; 202 * @before <img src="test1.jpg"/> <img src="test2.jpg"/> 203 * @result 2 204 * 205 * @property 206 * @name length 207 * @type Number 208 * @cat Core 209 */ 210 211 /** 212 * Get the number of elements currently matched. This returns the same 213 * number as the 'length' property of the jQuery object. 214 * 215 * @example $("img").size(); 216 * @before <img src="test1.jpg"/> <img src="test2.jpg"/> 217 * @result 2 218 * 219 * @name size 220 * @type Number 221 * @cat Core 222 */ 223 size: function() { 224 return this.length; 225 }, 226 227 length: 0, 228 229 /** 230 * Access all matched DOM elements. This serves as a backwards-compatible 231 * way of accessing all matched elements (other than the jQuery object 232 * itself, which is, in fact, an array of elements). 233 * 234 * It is useful if you need to operate on the DOM elements themselves instead of using built-in jQuery functions. 235 * 236 * @example $("img").get(); 237 * @before <img src="test1.jpg"/> <img src="test2.jpg"/> 238 * @result [ <img src="test1.jpg"/> <img src="test2.jpg"/> ] 239 * @desc Selects all images in the document and returns the DOM Elements as an Array 240 * 241 * @name get 242 * @type Array<Element> 243 * @cat Core 244 */ 245 246 /** 247 * Access a single matched DOM element at a specified index in the matched set. 248 * This allows you to extract the actual DOM element and operate on it 249 * directly without necessarily using jQuery functionality on it. 250 * 251 * @example $("img").get(0); 252 * @before <img src="test1.jpg"/> <img src="test2.jpg"/> 253 * @result <img src="test1.jpg"/> 254 * @desc Selects all images in the document and returns the first one 255 * 256 * @name get 257 * @type Element 258 * @param Number num Access the element in the Nth position. 259 * @cat Core 260 */ 261 get: function( num ) { 262 return num == undefined ? 263 264 // Return a 'clean' array 265 jQuery.makeArray( this ) : 266 267 // Return just the object 268 this[num]; 269 }, 270 271 /** 272 * Set the jQuery object to an array of elements, while maintaining 273 * the stack. 274 * 275 * @example $("img").pushStack([ document.body ]); 276 * @result $("img").pushStack() == [ document.body ] 277 * 278 * @private 279 * @name pushStack 280 * @type jQuery 281 * @param Elements elems An array of elements 282 * @cat Core 283 */ 284 pushStack: function( a ) { 285 var ret = jQuery(a); 286 ret.prevObject = this; 287 return ret; 288 }, 289 290 /** 291 * Set the jQuery object to an array of elements. This operation is 292 * completely destructive - be sure to use .pushStack() if you wish to maintain 293 * the jQuery stack. 294 * 295 * @example $("img").setArray([ document.body ]); 296 * @result $("img").setArray() == [ document.body ] 297 * 298 * @private 299 * @name setArray 300 * @type jQuery 301 * @param Elements elems An array of elements 302 * @cat Core 303 */ 304 setArray: function( a ) { 305 this.length = 0; 306 [].push.apply( this, a ); 307 return this; 308 }, 309 310 /** 311 * Execute a function within the context of every matched element. 312 * This means that every time the passed-in function is executed 313 * (which is once for every element matched) the 'this' keyword 314 * points to the specific DOM element. 315 * 316 * Additionally, the function, when executed, is passed a single 317 * argument representing the position of the element in the matched 318 * set (integer, zero-index). 319 * 320 * @example $("img").each(function(i){ 321 * this.src = "test" + i + ".jpg"; 322 * }); 323 * @before <img/><img/> 324 * @result <img src="test0.jpg"/><img src="test1.jpg"/> 325 * @desc Iterates over two images and sets their src property 326 * 327 * @name each 328 * @type jQuery 329 * @param Function fn A function to execute 330 * @cat Core 331 */ 332 each: function( fn, args ) { 333 return jQuery.each( this, fn, args ); 334 }, 335 336 /** 337 * Searches every matched element for the object and returns 338 * the index of the element, if found, starting with zero. 339 * Returns -1 if the object wasn't found. 340 * 341 * @example $("*").index( $('#foobar')[0] ) 342 * @before <div id="foobar"><b></b><span id="foo"></span></div> 343 * @result 0 344 * @desc Returns the index for the element with ID foobar 345 * 346 * @example $("*").index( $('#foo')[0] ) 347 * @before <div id="foobar"><b></b><span id="foo"></span></div> 348 * @result 2 349 * @desc Returns the index for the element with ID foo within another element 350 * 351 * @example $("*").index( $('#bar')[0] ) 352 * @before <div id="foobar"><b></b><span id="foo"></span></div> 353 * @result -1 354 * @desc Returns -1, as there is no element with ID bar 355 * 356 * @name index 357 * @type Number 358 * @param Element subject Object to search for 359 * @cat Core 360 */ 361 index: function( obj ) { 362 var pos = -1; 363 this.each(function(i){ 364 if ( this == obj ) pos = i; 365 }); 366 return pos; 367 }, 368 369 /** 370 * Access a property on the first matched element. 371 * This method makes it easy to retrieve a property value 372 * from the first matched element. 373 * 374 * If the element does not have an attribute with such a 375 * name, undefined is returned. 376 * 377 * @example $("img").attr("src"); 378 * @before <img src="test.jpg"/> 379 * @result test.jpg 380 * @desc Returns the src attribute from the first image in the document. 381 * 382 * @name attr 383 * @type Object 384 * @param String name The name of the property to access. 385 * @cat DOM/Attributes 386 */ 387 388 /** 389 * Set a key/value object as properties to all matched elements. 390 * 391 * This serves as the best way to set a large number of properties 392 * on all matched elements. 393 * 394 * @example $("img").attr({ src: "test.jpg", alt: "Test Image" }); 395 * @before <img/> 396 * @result <img src="test.jpg" alt="Test Image"/> 397 * @desc Sets src and alt attributes to all images. 398 * 399 * @name attr 400 * @type jQuery 401 * @param Map properties Key/value pairs to set as object properties. 402 * @cat DOM/Attributes 403 */ 404 405 /** 406 * Set a single prope