Assembla home | Assembla project page
 

Changeset 89

Show
Ignore:
Timestamp:
07/17/07 15:16:48 (1 year ago)
Author:
digitalspaghetti
Message:

Various experiments with layout and navigation

Files:

Legend:

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

    r67 r89  
    55        var $uses = array('Post', 'Group'); 
    66        // 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')); 
    88         
    99        function index() { 
     
    119119                $this->set('access_levels', $this->Group->generateList(null, 'Group.name ASC', null,'{n}.Group.level', '{n}.Group.name')); 
    120120                $this->set('subjects', $this->Post->Subject->generateList()); 
     121                $this->set('images', $this->Post->Image->generateList()); 
    121122        } 
    122123 
  • branch/models/image.php

    r66 r89  
    4040                                                                'order' => '', 
    4141                                                                'counterCache' => ''), 
     42                         
    4243        ); 
    4344 
     
    5455                                                                'finderQuery' => '', 
    5556                                                                'counterQuery' => ''), 
     57                        'Post' => array('className' => 'Post'), 
    5658        ); 
    5759 
  • branch/models/post.php

    r69 r89  
    3232                                                                'order' => '', 
    3333                                                                'counterCache' => ''), 
     34                        'Image' => array('className' => 'Image') 
    3435        ); 
    35  
     36         
    3637        var $hasMany = array( 
    3738                        'Comment' => array('className' => 'Comment', 
  • branch/views/elements/js_include.ctp

    r88 r89  
    88<?php e($javascript->link('jquery.form'));?> 
    99<?php e($javascript->link('jquery.autocomplete'));?> 
    10 <?php e($javascript->link('jquery.jdMenu'));?> 
     10<?php e($javascript->link('jquery.accordion'));?> 
    1111<?php e($javascript->link('wymeditor/jquery.wymeditor'));?> 
    1212<?php e($javascript->link('wymeditor/plugins/tidy/jquery.wymeditor.tidy'));?> 
  • branch/views/posts/admin_add.ctp

    r68 r89  
    1313                        <?php echo $form->input('byline', array('class' => 'required'));?> 
    1414                        <?php echo $form->input('body',array('class'=>'wymeditor'));?> 
     15                        <?php e($form->input('image_id', array('options'=>$images)));?> 
    1516                </fieldset> 
    1617                 
  • branch/views/posts/index.ctp

    r76 r89  
    11<?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> 
    723                </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> 
    2424<?php endforeach; ?> 
    2525 
  • branch/webroot/css/default.css

    r88 r89  
    204204 
    205205/* Entry */ 
     206 
     207div.hentry { 
     208        width:90%; 
     209        margin: 0 auto; 
     210        margin-top: 50px; 
     211        margin-bottom:50px; 
     212} 
     213 
    206214div.hentry h2, div.event h2 { 
    207215        background: url('../img/h2_top.png') repeat-x; 
     
    274282        color: #000; 
    275283} 
     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                         
     295ul#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  
    66                 
    77                settings = jQuery.extend({ 
    8                          
     8                        pageprev: "#paginate span.previous a", 
     9                        pagenext: "#paginate span.next a" 
    910                },settings); 
    1011                 
    1112                return this.each(function(){ 
    1213                        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                        }); 
    1426                }); 
    1527        } 
    1628}); 
    1729})(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  
    4141         
    4242        $j(".wymsubmit").click(function () {alert($j(this).siblings(".wymeditor").val());}); 
    43                  
    44         var autoopts = { 
    45                 multiple: true, 
    46                 mustMatch: false 
    47         }; 
    4843         
    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 }); 
    5745         
    5846        $j('a.videolink').bind('click', function(){ 
     
    6250                        return false; 
    6351                         
     52        }); 
     53         
     54        $j('#navigation').Accordion({ 
     55                active: false, 
     56                header: '.head', 
     57                alwaysOpen: false, 
     58                navigation: true 
    6459        }); 
    6560