Changeset 89
- Timestamp:
- 07/17/07 15:16:48 (1 year ago)
- Files:
-
- branch/controllers/posts_controller.php (modified) (2 diffs)
- branch/models/image.php (modified) (2 diffs)
- branch/models/post.php (modified) (1 diff)
- branch/plugins/videos (deleted)
- branch/views/elements/js_include.ctp (modified) (1 diff)
- branch/views/elements/testnav.ctp (added)
- branch/views/layouts/default.ctp (deleted)
- branch/views/layouts/map.ctp (deleted)
- branch/views/layouts/olddefault.ctp (deleted)
- branch/views/posts/admin_add.ctp (modified) (1 diff)
- branch/views/posts/index.ctp (modified) (1 diff)
- branch/webroot/css/accordion.css (added)
- branch/webroot/css/default.css (modified) (2 diffs)
- branch/webroot/img/bg.gif (added)
- branch/webroot/img/blade.png (added)
- branch/webroot/img/blade_sel.png (added)
- branch/webroot/img/collapsed.gif (added)
- branch/webroot/img/expanded.gif (added)
- branch/webroot/img/title1.png (added)
- branch/webroot/img/title2.png (added)
- branch/webroot/img/title3.png (added)
- branch/webroot/img/title4.png (added)
- branch/webroot/js/jquery.accordion.js (added)
- branch/webroot/js/jquery.accordion.pack.js (added)
- branch/webroot/js/jquery.hoverIntent.js (added)
- branch/webroot/js/jquery.newsbox.js (modified) (1 diff)
- branch/webroot/js/jquery.slidingPanels.js (added)
- branch/webroot/js/webrocket.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branch/controllers/posts_controller.php
r67 r89 5 5 var $uses = array('Post', 'Group'); 6 6 // Set the default Paginate values 7 var $paginate = array('fields'=>array('Post.id', 'Post.title', 'Post.byline', 'Post.body', 'Post.comments_count' ,'Post.user_id', 'Post.stub' ,'Post.post_date' , 'Post.access_level', 'Post.frontpage' ,'Post.published' ,'User.id', 'User.username', 'Subject.id' ,'Subject.title' ),'limit'=>10, 'order'=>array('Post.post_date'=>'DESC', 'Post.created' => 'DESC'));7 var $paginate = array('fields'=>array('Post.id', 'Post.title', 'Post.byline', 'Post.body', 'Post.comments_count' ,'Post.user_id', 'Post.stub' ,'Post.post_date' , 'Post.access_level', 'Post.frontpage' ,'Post.published' ,'User.id', 'User.username', 'Subject.id' ,'Subject.title', 'Image.filename'),'limit'=>10, 'order'=>array('Post.post_date'=>'DESC', 'Post.created' => 'DESC')); 8 8 9 9 function index() { … … 119 119 $this->set('access_levels', $this->Group->generateList(null, 'Group.name ASC', null,'{n}.Group.level', '{n}.Group.name')); 120 120 $this->set('subjects', $this->Post->Subject->generateList()); 121 $this->set('images', $this->Post->Image->generateList()); 121 122 } 122 123 branch/models/image.php
r66 r89 40 40 'order' => '', 41 41 'counterCache' => ''), 42 42 43 ); 43 44 … … 54 55 'finderQuery' => '', 55 56 'counterQuery' => ''), 57 'Post' => array('className' => 'Post'), 56 58 ); 57 59 branch/models/post.php
r69 r89 32 32 'order' => '', 33 33 'counterCache' => ''), 34 'Image' => array('className' => 'Image') 34 35 ); 35 36 36 37 var $hasMany = array( 37 38 'Comment' => array('className' => 'Comment', branch/views/elements/js_include.ctp
r88 r89 8 8 <?php e($javascript->link('jquery.form'));?> 9 9 <?php e($javascript->link('jquery.autocomplete'));?> 10 <?php e($javascript->link('jquery. jdMenu'));?>10 <?php e($javascript->link('jquery.accordion'));?> 11 11 <?php e($javascript->link('wymeditor/jquery.wymeditor'));?> 12 12 <?php e($javascript->link('wymeditor/plugins/tidy/jquery.wymeditor.tidy'));?> branch/views/posts/admin_add.ctp
r68 r89 13 13 <?php echo $form->input('byline', array('class' => 'required'));?> 14 14 <?php echo $form->input('body',array('class'=>'wymeditor'));?> 15 <?php e($form->input('image_id', array('options'=>$images)));?> 15 16 </fieldset> 16 17 branch/views/posts/index.ctp
r76 r89 1 1 <?php foreach ($posts as $post): ?> 2 <div class="hentry"> 3 <h2 class="entry-title"><?php e($html->link($post['Post']['title'], array('controller'=>'posts', 'action'=>'view', $post['Post']['stub']))); ?></h2> 4 <div class="entry-infobar"> 5 Updated on <abbr class="updated" title=""><?php echo $post['Post']['post_date']; ?></abbr> by 6 <span class="vcard author fn"><?php echo $html->link($post['User']['username'], array('controller'=> 'users', 'action'=>'view', $post['User']['id'])); ?></span> 2 <div class="hentry"> 3 <h2 class="entry-title"><?php e($html->link($post['Post']['title'], array('controller'=>'posts', 'action'=>'view', $post['Post']['stub']))); ?></h2> 4 <div class="entry-infobar"> 5 Updated on <abbr class="updated" title=""><?php echo $post['Post']['post_date']; ?></abbr> by 6 <span class="vcard author fn"><?php echo $html->link($post['User']['username'], array('controller'=> 'users', 'action'=>'view', $post['User']['id'])); ?></span> 7 </div> 8 <div class="entry-content"> 9 <p> 10 <?php echo $post['Post']['body']; ?> 11 </p> 12 </div> 13 14 <div class="meta"> 15 Comments: <?php echo $post['Post']['comments_count']; ?><br /> 16 Tags: <?php foreach ($post['Tag'] as $tag) : 17 e($html->link($tag['tag'], 'http://technorati.com/tag/' . $tag['tag'], array('rel'=>'tag', 'class'=>'tag'))); 18 endforeach; 19 ?> 20 </div> 21 22 <span class="version" style="display: none;">0.3</span> 7 23 </div> 8 <div class="entry-content">9 <p>10 <?php echo $post['Post']['body']; ?>11 </p>12 </div>13 14 <div class="meta">15 Comments: <?php echo $post['Post']['comments_count']; ?><br />16 Tags: <?php foreach ($post['Tag'] as $tag) :17 e($html->link($tag['tag'], 'http://technorati.com/tag/' . $tag['tag'], array('rel'=>'tag', 'class'=>'tag')));18 endforeach;19 ?>20 </div>21 22 <span class="version" style="display: none;">0.3</span>23 </div>24 24 <?php endforeach; ?> 25 25 branch/webroot/css/default.css
r88 r89 204 204 205 205 /* Entry */ 206 207 div.hentry { 208 width:90%; 209 margin: 0 auto; 210 margin-top: 50px; 211 margin-bottom:50px; 212 } 213 206 214 div.hentry h2, div.event h2 { 207 215 background: url('../img/h2_top.png') repeat-x; … … 274 282 color: #000; 275 283 } 284 285 /* Panels */ 286 #content div#wrapper { 287 position: relative; 288 overflow: hidden; 289 width: 100%; 290 height: 300px; 291 padding: 0; 292 margin: 0; 293 border: solid 1px #cc9;} 294 295 ul#panels { 296 display:block; 297 position:relative; 298 overflow:hidden; 299 width:100%; 300 height:290px; 301 padding:0; 302 margin:0;} 303 304 ul#panels li { 305 display:block; 306 position:relative; 307 overflow:hidden; 308 float: left; 309 width:150px; 310 height:290px; 311 padding:0; 312 margin:0;} 313 314 ul#panels li.slidingPanelsActivated { 315 position:absolute; 316 top:0; 317 left:0; 318 width:375px;} 319 320 ul#panels li span.panelContainer { 321 display:block; 322 float: left;} 323 324 ul#panels li span span.col1 { 325 display:block; 326 float: left; 327 padding-top: 10px; 328 text-align: right;} 329 330 ul#panels li span span.label { 331 display: block; 332 padding-left:10px; 333 text-align: left;} 334 335 ul#panels li span span.col2 { 336 display:block; 337 float: right; 338 padding-top: 10px; 339 width:220px;} 340 341 ul#panels li.hover {background:#fff;} 342 ul#panels li.notHover {background:#ccc;} branch/webroot/js/jquery.newsbox.js
r88 r89 6 6 7 7 settings = jQuery.extend({ 8 8 pageprev: "#paginate span.previous a", 9 pagenext: "#paginate span.next a" 9 10 },settings); 10 11 11 12 return this.each(function(){ 12 13 var newsbox = this; 13 14 $(settings.pageprev).bind('click', function(){ 15 $(newsbox).slideUp('slow'); 16 $(newsbox).load(this.href); 17 $(newsbox).slideDown('slow'); 18 return false; 19 }); 20 $(settings.pagenext).bind('click', function(){ 21 $(newsbox).slideUp('slow'); 22 $(newsbox).load(this.href); 23 $(newsbox).slideDown('slow'); 24 return false; 25 }); 14 26 }); 15 27 } 16 28 }); 17 29 })(jQuery); 30 31 /*$(document).ready(function() { 32 $('.handle').bind("mouseover", function(){ 33 $(this).css({background:"url(../img/blade_sel.png)"}); 34 }); 35 36 $('.handle').bind("mouseout", function(){ 37 if( $(this).attr("rel") == "selected"){ 38 39 } else { 40 $(this).css({background:"url(../img/blade.png)"}); 41 } 42 }); 43 44 $(".handle").bind("click",function() { 45 $('.handle').attr("rel",""); 46 $('.handle').css({background:"url(../img/blade.png)"}); 47 $(this).css({background:"url(../img/blade_sel.png)"}); 48 $('div[@id*=content]').animate({className:"content"},500,"backin"); 49 $('div[@id*=hdiv]').animate({className:"start"},500,"backin"); 50 $('#hdiv'+$(this).attr("id")).animate({className:"end"},500, 'easein'); 51 $('#content'+$(this).attr("id")).animate({className:"endcontent"},800,'easein'); 52 $('.handle[@id*='+$(this).attr("id")+"]").attr("rel","selected"); 53 }); 54 }); 55 */ branch/webroot/js/webrocket.js
r88 r89 41 41 42 42 $j(".wymsubmit").click(function () {alert($j(this).siblings(".wymeditor").val());}); 43 44 var autoopts = {45 multiple: true,46 mustMatch: false47 };48 43 49 $j(".tags").autocomplete("/tags/autocomplete", autoopts); 50 51 $j('ul.jd_menu').jdMenu(); 52 53 /*$j('.front-posts').jCarouselLite({ 54 btnNext: ".next", 55 btnPrev: ".previous" 56 });*/ 44 $j(".tags").autocomplete("/tags/autocomplete", { multiple: true, mustMatch: false }); 57 45 58 46 $j('a.videolink').bind('click', function(){ … … 62 50 return false; 63 51 52 }); 53 54 $j('#navigation').Accordion({ 55 active: false, 56 header: '.head', 57 alwaysOpen: false, 58 navigation: true 64 59 }); 65 60