Assembla home | Assembla project page
 

Changeset 77

Show
Ignore:
Timestamp:
07/05/07 16:51:01 (1 year ago)
Author:
digitalspaghetti
Message:

Added new WymEditor 4. Started work on new venue/points system for google maps

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branch/controllers/points_controller.php

    r76 r77  
    1313 
    1414        function add() { 
     15                $this->layout = "map"; 
    1516                if(empty($this->data)) { 
    1617                        $this->render(); 
  • branch/db.sql

    r69 r77  
    44--  
    55-- Host: localhost 
    6 -- Generation Time: Jun 15, 2007 at 05:01 PM 
     6-- Generation Time: Jul 05, 2007 at 05:49 PM 
    77-- Server version: 5.0.38 
    88-- PHP Version: 5.2.1 
     
    1717--  
    1818 
     19DROP TABLE IF EXISTS `cake_sessions`; 
    1920CREATE TABLE `cake_sessions` ( 
    2021  `id` varchar(255) NOT NULL default '', 
     
    2425) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
    2526 
     27--  
     28-- Dumping data for table `cake_sessions` 
     29--  
     30 
     31 
    2632-- -------------------------------------------------------- 
    2733 
     
    3036--  
    3137 
     38DROP TABLE IF EXISTS `comments`; 
    3239CREATE TABLE `comments` ( 
    3340  `id` int(8) unsigned NOT NULL auto_increment, 
     
    4047  `modified` datetime NOT NULL, 
    4148  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 
    4356-- -------------------------------------------------------- 
    4457 
     
    4760--  
    4861 
     62DROP TABLE IF EXISTS `config_categories`; 
    4963CREATE TABLE `config_categories` ( 
    5064  `id` int(10) unsigned NOT NULL auto_increment, 
     
    7084--  
    7185 
     86DROP TABLE IF EXISTS `configs`; 
    7287CREATE TABLE `configs` ( 
    7388  `id` int(10) unsigned NOT NULL auto_increment, 
     
    103118--  
    104119 
     120DROP TABLE IF EXISTS `copyrights`; 
    105121CREATE TABLE `copyrights` ( 
    106122  `id` int(8) unsigned NOT NULL auto_increment, 
     
    128144--  
    129145 
     146DROP TABLE IF EXISTS `countries`; 
    130147CREATE TABLE `countries` ( 
    131148  `id` smallint(6) NOT NULL auto_increment, 
     
    388405--  
    389406 
     407DROP TABLE IF EXISTS `event_types`; 
    390408CREATE TABLE `event_types` ( 
    391409  `id` int(8) unsigned NOT NULL auto_increment, 
     
    410428--  
    411429 
     430DROP TABLE IF EXISTS `events`; 
    412431CREATE TABLE `events` ( 
    413432  `id` int(8) unsigned NOT NULL auto_increment, 
     
    429448  `modified` datetime NOT NULL, 
    430449  PRIMARY KEY  (`id`) 
    431 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
     450) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
    432451 
    433452--  
     
    442461--  
    443462 
     463DROP TABLE IF EXISTS `events_tags`; 
    444464CREATE TABLE `events_tags` ( 
    445465  `event_id` int(8) NOT NULL, 
     
    459479--  
    460480 
     481DROP TABLE IF EXISTS `feeds`; 
    461482CREATE TABLE `feeds` ( 
    462483  `id` int(8) unsigned NOT NULL auto_increment, 
     
    468489  `modified` datetime NOT NULL, 
    469490  PRIMARY KEY  (`id`) 
    470 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
     491) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
    471492 
    472493--  
     
    481502--  
    482503 
     504DROP TABLE IF EXISTS `galleries`; 
    483505CREATE TABLE `galleries` ( 
    484506  `id` int(8) unsigned NOT NULL auto_increment, 
     
    492514  `modified` datetime NOT NULL, 
    493515  PRIMARY KEY  (`id`) 
    494 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
     516) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
    495517 
    496518--  
     
    505527--  
    506528 
     529DROP TABLE IF EXISTS `galleries_images`; 
    507530CREATE TABLE `galleries_images` ( 
    508531  `gallery_id` int(8) unsigned NOT NULL, 
     
    521544--  
    522545 
     546DROP TABLE IF EXISTS `galleries_tags`; 
    523547CREATE TABLE `galleries_tags` ( 
    524548  `gallery_id` int(8) unsigned NOT NULL, 
     
    537561--  
    538562 
     563DROP TABLE IF EXISTS `groups`; 
    539564CREATE TABLE `groups` ( 
    540565  `id` int(10) unsigned NOT NULL auto_increment, 
     
    565590--  
    566591 
     592DROP TABLE IF EXISTS `groups_permissions`; 
    567593CREATE TABLE `groups_permissions` ( 
    568594  `group_id` int(10) unsigned NOT NULL default '0', 
     
    589615--  
    590616 
     617DROP TABLE IF EXISTS `images`; 
    591618CREATE TABLE `images` ( 
    592619  `id` int(8) unsigned NOT NULL auto_increment, 
     
    607634  `modified` datetime default NULL, 
    608635  PRIMARY KEY  (`id`) 
    609 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8
     636) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2
    610637 
    611638--  
     
    620647--  
    621648 
     649DROP TABLE IF EXISTS `images_tags`; 
    622650CREATE TABLE `images_tags` ( 
    623651  `image_id` int(8) NOT NULL, 
     
    630658--  
    631659 
     660 
    632661-- -------------------------------------------------------- 
    633662 
     
    636665--  
    637666 
     667DROP TABLE IF EXISTS `login_attempts`; 
    638668CREATE TABLE `login_attempts` ( 
    639669  `ip` varchar(15) character set utf8 collate utf8_unicode_ci NOT NULL, 
     
    655685--  
    656686 
     687DROP TABLE IF EXISTS `menus`; 
    657688CREATE TABLE `menus` ( 
    658689  `id` int(11) unsigned NOT NULL auto_increment, 
     
    668699  `modified` datetime NOT NULL, 
    669700  PRIMARY KEY  (`id`) 
    670 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=41
     701) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=42
    671702 
    672703--  
     
    714745(38, 'Add Track', '/admin/tracks/add', 30, NULL, 37, 1, 900, 1, '2007-06-04 22:54:37', '2007-06-04 22:54:37'), 
    715746(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'); 
    717749 
    718750-- -------------------------------------------------------- 
     
    722754--  
    723755 
     756DROP TABLE IF EXISTS `pages`; 
    724757CREATE TABLE `pages` ( 
    725758  `id` int(8) unsigned NOT NULL auto_increment, 
     
    736769  `modified` datetime NOT NULL, 
    737770  PRIMARY KEY  (`id`) 
    738 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
     771) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
    739772 
    740773--  
     
    742775--  
    743776 
     777 
    744778-- -------------------------------------------------------- 
    745779 
     
    748782--  
    749783 
     784DROP TABLE IF EXISTS `pages_tags`; 
    750785CREATE TABLE `pages_tags` ( 
    751786  `page_id` int(8) unsigned NOT NULL, 
     
    765800--  
    766801 
     802DROP TABLE IF EXISTS `permissions`; 
    767803CREATE TABLE `permissions` ( 
    768804  `id` int(10) unsigned NOT NULL auto_increment, 
     
    796832--  
    797833 
     834DROP TABLE IF EXISTS `playlists`; 
    798835CREATE TABLE `playlists` ( 
    799836  `id` int(8) unsigned NOT NULL auto_increment, 
     
    801838  `comments` varchar(255) collate utf8_unicode_ci NOT NULL, 
    802839  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
    804841 
    805842--  
     
    814851--  
    815852 
     853DROP TABLE IF EXISTS `playlists_tracks`; 
    816854CREATE TABLE `playlists_tracks` ( 
    817855  `playlist_id` int(8) unsigned NOT NULL, 
     
    828866 
    829867--  
     868-- Table structure for table `points` 
     869--  
     870 
     871DROP TABLE IF EXISTS `points`; 
     872CREATE 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 
     892INSERT 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--  
    830900-- Table structure for table `posts` 
    831901--  
    832902 
     903DROP TABLE IF EXISTS `posts`; 
    833904CREATE TABLE `posts` ( 
    834905  `id` int(8) unsigned NOT NULL auto_increment, 
     
    848919  `modified` datetime default NULL, 
    849920  PRIMARY KEY  (`id`) 
    850 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8
     921) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2
    851922 
    852923--  
     
    854925--  
    855926 
     927INSERT 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'); 
    856929 
    857930-- -------------------------------------------------------- 
     
    861934--  
    862935 
     936DROP TABLE IF EXISTS `posts_tags`; 
    863937CREATE TABLE `posts_tags` ( 
    864938  `post_id` int(8) unsigned NOT NULL, 
     
    871945--  
    872946 
     947INSERT INTO `posts_tags` (`post_id`, `tag_id`) VALUES  
     948(1, 5), 
     949(1, 6), 
     950(1, 7), 
     951(1, 8); 
     952 
    873953-- -------------------------------------------------------- 
    874954 
     
    877957--  
    878958 
     959DROP TABLE IF EXISTS `profiles`; 
    879960CREATE TABLE `profiles` ( 
    880961  `id` int(8) unsigned NOT NULL auto_increment, 
     
    887968  `modified` datetime NOT NULL, 
    888969  PRIMARY KEY  (`id`) 
    889 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
     970) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
    890971 
    891972--  
     
    900981--  
    901982 
     983DROP TABLE IF EXISTS `sections`; 
    902984CREATE TABLE `sections` ( 
    903985  `id` int(8) unsigned NOT NULL auto_increment, 
     
    9191001--  
    9201002 
     1003DROP TABLE IF EXISTS `states`; 
    9211004CREATE TABLE `states` ( 
    9221005  `id` tinyint(4) NOT NULL auto_increment, 
     
    10051088--  
    10061089 
     1090DROP TABLE IF EXISTS `subjects`; 
    10071091CREATE TABLE `subjects` ( 
    10081092  `id` int(8) unsigned NOT NULL auto_increment, 
     
    10251109 
    10261110INSERT 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'); 
    10281112 
    10291113-- -------------------------------------------------------- 
     
    10331117--  
    10341118 
     1119DROP TABLE IF EXISTS `tags`; 
    10351120CREATE TABLE `tags` ( 
    10361121  `id` int(8) unsigned NOT NULL auto_increment, 
    10371122  `tag` varchar(255) collate utf8_unicode_ci NOT NULL, 
    10381123  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
    10401125 
    10411126--  
     
    10431128--  
    10441129 
     1130INSERT 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 
    10451138-- -------------------------------------------------------- 
    10461139 
     
    10491142--  
    10501143 
     1144DROP TABLE IF EXISTS `tags_tracks`; 
    10511145CREATE TABLE `tags_tracks` ( 
    10521146  `tag_id` int(8) unsigned NOT NULL, 
     
    10581152--  
    10591153 
     1154 
    10601155-- -------------------------------------------------------- 
    10611156 
     
    10641159--  
    10651160 
     1161DROP TABLE IF EXISTS `tags_users`; 
    10661162CREATE TABLE `tags_users` ( 
    10671163  `tag_id` int(8) unsigned NOT NULL, 
     
    10801176--  
    10811177 
     1178DROP TABLE IF EXISTS `tags_videos`; 
    10821179CREATE TABLE `tags_videos` ( 
    10831180  `tag_id` int(8) unsigned NOT NULL, 
     
    10911188--  
    10921189 
     1190 
    10931191-- -------------------------------------------------------- 
    10941192 
     
    10971195--  
    10981196 
     1197DROP TABLE IF EXISTS `tracks`; 
    10991198CREATE TABLE `tracks` ( 
    11001199  `id` int(8) unsigned NOT NULL auto_increment, 
     
    11111210  `modified` datetime default NULL, 
    11121211  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
    11141213 
    11151214--  
     
    11171216--  
    11181217 
     1218 
    11191219-- -------------------------------------------------------- 
    11201220 
     
    11231223--  
    11241224 
     1225DROP TABLE IF EXISTS `user_histories`; 
    11251226CREATE TABLE `user_histories` ( 
    11261227  `id` int(10) unsigned NOT NULL auto_increment, 
     
    11301231  `visitdate` datetime NOT NULL, 
    11311232  PRIMARY KEY  (`id`) 
    1132 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
     1233) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
    11331234 
    11341235--  
     
    11431244--  
    11441245 
     1246DROP TABLE IF EXISTS `users`; 
    11451247CREATE TABLE `users` ( 
    11461248  `id` int(10) unsigned NOT NULL auto_increment, 
     
    11711273 
    11721274INSERT 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'), 
    11741276(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'), 
    11751277(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'); 
     
    11811283--  
    11821284 
     1285DROP TABLE IF EXISTS `videos`; 
    11831286CREATE TABLE `videos` ( 
    11841287  `id` int(8) unsigned NOT NULL auto_increment, 
    11851288  `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, 
    11891290  `body` text NOT NULL, 
    1190   `copyright_owner` varchar(255) NOT NULL, 
    1191   `copyright_id` int(8) unsigned NOT NULL, 
    11921291  `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, 
    11931295  `user_id` int(8) unsigned NOT NULL, 
    11941296  `subject_id` int(8) unsigned NOT NULL, 
     
    11971299  `modified` datetime NOT NULL, 
    11981300  PRIMARY KEY  (`id`) 
    1199 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8
     1301) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8
    12001302 
    12011303--  
    12021304-- Dumping data for table `videos` 
    12031305--  
     1306 
     1307INSERT 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  
    1515        <?php echo $html->css('jdMenu.slate');?> 
    1616        <?php echo $html->css('../js/wymeditor/skins/default/screen');?> 
    17         <?php echo $javascript->link('http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAApCYnM8S-TSRBhQk16Ynr4BTuQ5Stu0YOLxDNgQD6HZLt-gFdYxSy1p2Jm4EqTOljqE9qKAQSPbXPYA') ?> 
    18         <?php echo $javascript->link('http://www.google.com/uds/api?file=uds.js&v=1.0&key=ABQIAAAApCYnM8S-TSRBhQk16Ynr4BTuQ5Stu0YOLxDNgQD6HZLt-gFdYxSy1p2Jm4EqTOljqE9qKAQSPbXPYA') ?> 
    19         <?php e($javascript->link('gmap'));?> 
     17        <?php echo $javascript->link('http://maps.google.com/maps?file=api&amp;v=2&amp;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'));?> 
    2020</head> 
    2121<body> 
  • branch/views/points/add.ctp

    r76 r77  
    11<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'); 
     6echo $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> 
     17Please enter the postcode or address of the point you want to add. 
     18</p> 
     19 
    220<?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 
    333<?php e($form->input('name'));?> 
    434<?php e($form->input('description'));?> 
     
    1343<li><?php echo $html->link('List points', '/points/index')?></li> 
    1444</ul> 
     45</div> 
  • branch/views/points/index.ctp

    r76 r77  
    1717$avg_lon = $avg_lon/$count; 
    1818//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); 
    2020echo $googleMap->map($default, $style = 'width:100%; height: 800px' ); 
    2121//if(isset($points)){ 
     
    5252<input type="submit" value="Place Marker" onclick="javascript:usePointFromPostcode(document.getElementById('postcode').value, placeMarkerAtPoint)" /> 
    5353<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" /> 
    5456</div> 
  • branch/webroot/js/gmap.js

    r76 r77  
    1919                                var resultLat = localSearch.results[0].lat; 
    2020                                var resultLng = localSearch.results[0].lng; 
     21                                $j('#lat').attr('value', resultLat); 
     22                                $j('#lng').attr('value', resultLng); 
    2123                                var point = new GLatLng(resultLat,resultLng); 
    2224                                callbackFunction(point); 
     
    8082} 
    8183 
    82 addLoadEvent(mapLoad); 
     84//addLoadEvent(mapLoad); 
    8385addUnLoadEvent(GUnload); 
  • branch/webroot/js/jquery.js

    r61 r77  
    1 // prevent execution of jQuery if included more than once 
    2 if(typeof window.jQuery == "undefined") { 
    31/* 
    4  * jQuery @VERSION - New Wave Javascript 
     2 * jQuery 1.1.3.1 - New Wave Javascript 
    53 * 
    64 * Copyright (c) 2007 John Resig (jquery.com) 
     
    86 * and GPL (GPL-LICENSE.txt) licenses. 
    97 * 
    10  * $Date: 2007-05-23 13:48:15 +0100 (Wed, 23 May 2007) $ 
    11  * $Rev: 1961
     8 * $Date: 2007-07-05 00:43:24 -0400 (Thu, 05 Jul 2007) $ 
     9 * $Rev: 2243
    1210 */ 
    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