Changeset 2812

Show
Ignore:
Timestamp:
07/18/08 18:30:37 (1 month ago)
Author:
breese
Message:

fixed bug 80518 - finalized the upgrade widget copy

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-41/lib/MT/CMS/Dashboard.pm

    r2307 r2812  
    7979      { 
    8080        feature_label => MT->translate('Better, Stronger, Faster'), 
    81         feature_url  => $app->help_url('mt415/known-issues.html'), 
    82         feature_description => MT->translate('A concerted effort has been made to make significant improvements to Movable Type\'s performance and reliability with added features like Server Side Includes and Template Module Caching.'), 
     81        feature_url  => $app->help_url('mt42/performance.html'), 
     82        feature_description => MT->translate('Movable Type has undergone a significant overhaul in all aspects of performance. Memory utilization has been reduced, publishing times have been increased significantly and search is now 100x faster!'), 
    8383      }, 
    8484      { 
    85         feature_label => MT->translate('Improved Template Management'), 
    86         feature_url  => $app->help_url('mt415/whats-new.html#design-changes'), 
    87         feature_description => MT->translate('The template editing interface has been enhanced to make designers more efficient at updating their site\'s design.'), 
     85        feature_label => MT->translate('Module Caching'), 
     86        feature_url  => $app->help_url('mt42/module-caching.html'), 
     87        feature_description => MT->translate('Template module and widget content can now be cached in the database to dramatically speed up publishing.'), 
     88      }, 
     89      { 
     90        feature_label => MT->translate('Improved Template and Design Management'), 
     91        feature_url  => $app->help_url('mt42/design-enhancements.html'), 
     92        feature_description => MT->translate('The template editing interface has been enhanced to make designers more efficient at updating their site\'s design. The default templates have also been dramatically simplified to make it easier for you to edit and create the site you want.'), 
    8893      }, 
    8994      { 
    9095        feature_label => MT->translate('Threaded Comments'), 
    91         feature_url  => $app->help_url('mt415/threaded-comments.html'), 
     96        feature_url  => $app->help_url('mt42/threading.html'), 
    9297        feature_description => MT->translate('Allow commenters on your blog to reply to each other increasing user engagement and creating more dynamic conversations.'), 
    9398      }; 
  • branches/release-41/mt-static/js/tc/mixer/display.js

    r1174 r2812  
    5353        "description" : "Description:", 
    5454        "author" : "Author:", 
    55         "tags" : "Tags:" 
    56         ,"url" : "URL:" 
     55        "tags" : "Tags:", 
     56        "url" : "CSS File", 
     57        "props_url" : "Donate" 
    5758}; 
    5859 
     
    227228                        // get natural language label 
    228229                        var epLabel = this.entryProperties[ ep ]; 
    229                         var epValue = entry[ ep ] || " "; 
     230                        var epValue = entry[ ep ]; 
     231 
     232                        if( epValue == null )  
     233                            continue; 
    230234                         
    231235                        // fix array values 
    232236                        if( epValue.join ) 
    233                                epValue = epValue.join( ", " ); 
     237                            epValue = epValue.join( ", " ); 
    234238                         
    235239                        // only handle strings 
    236240                        if( typeof( epValue ) != "string" ) 
    237                                continue; 
     241                            continue; 
    238242                         
    239243                        // property 
     
    242246                        props.appendChild( prop ); 
    243247                         
    244                         // label 
    245                         var label = this.document.createElement( "span" ); 
    246                         label.className = "label"; 
    247                         label.appendChild( this.document.createTextNode( epLabel ) ); 
    248                         prop.appendChild( label ); 
    249                          
    250248                        // content 
    251249                        var content = this.document.createElement( "span" ); 
    252250                        content.className = "content"; 
    253                         if ( epLabel == "URL:") { 
     251                        if ( ep.match(/(_|^)url$/) ) { 
    254252                           var link = this.document.createElement( "a" ); 
    255253                           link.href = epValue; 
    256                            link.appendChild( this.document.createTextNode( "CSS File" )); 
     254                           var link_text = this.document.createElement( "span" ); 
     255                           link_text.appendChild( this.document.createTextNode( epLabel ) ); 
     256                           link.appendChild( link_text ); 
    257257                           content.appendChild( link ); 
    258258                        } else { 
    259             content.appendChild( this.document.createTextNode( epValue ) ); 
     259                            // label 
     260                            var label = this.document.createElement( "span" ); 
     261                            label.className = "label"; 
     262                            label.appendChild( this.document.createTextNode( epLabel ) ); 
     263                            prop.appendChild( label ); 
     264                            content.appendChild( this.document.createTextNode( epValue ) ); 
    260265                        } 
    261266                        prop.appendChild( content ); 
  • branches/release-41/mt-static/plugins/StyleCatcher/templates.css

    r1104 r2812  
    372372#display-details .url .content { display: inline; height: auto; } 
    373373 
     374#display-details .props_url { margin-bottom: 4px; } 
     375#display-details .props_url .content { display: block; height: auto; } 
     376#display-details .props_url .content a { 
     377    display: block; 
     378    background-image: url(https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif); 
     379    width: 74px; 
     380    height: 21px; 
     381} 
     382#display-details .props_url .content a * { display: none } 
     383 
    374384/*#display-details .tags .label { display: inline; height: auto; } 
    375385#display-details .tags .content { display: inline; height: auto; word-spacing: 0.5em; }*/ 
  • branches/release-41/mt-static/themes/hills-dusk/screen.css

    r1262 r2812  
    55designer: Mena Trott   
    66layouts: layout-wtt, layout-twt, layout-wt, layout-tw 
     7props_url: byrne@majordojo.com 
    78*/ 
    89 
  • branches/release-41/plugins/StyleCatcher/lib/StyleCatcher/CMS.pm

    r2743 r2812  
    99use strict; 
    1010use File::Basename qw(basename); 
     11use MT::Util qw( caturl ); 
    1112 
    1213our $DEFAULT_STYLE_LIBRARY; 
     
    155156    $app->validate_magic or return $app->json_error($app->translate("Invalid request")); 
    156157    return $app->json_error($app->translate("Invalid request")) 
    157       unless $blog_id && $url && $tmpl; 
     158       unless $blog_id && $url && $tmpl; 
    158159 
    159160    my $static_path = $app->static_file_path; 
     
    162163    } 
    163164 
    164     my $themeroot = 
    165       File::Spec->catdir( $static_path, 'support', 'themes' ); 
     165    my $themeroot =  File::Spec->catdir( $static_path, 'support', 'themes' ); 
    166166    my $webthemeroot = $app->static_path . 'support/themes/'; 
    167167    my $mtthemeroot  = $app->static_path . 'themes/'; 
     
    174174    # yonder... 
    175175    my $filemgr = file_mgr() 
    176       or return $app->json_error( MT::FileMgr->errstr ); 
     176        or return $app->json_error( MT::FileMgr->errstr ); 
     177    print STDERR "Applying theme... ($url)\n"; 
    177178 
    178179    if ( $url !~ m/^(\Q$webthemeroot\E|\Q$mtthemeroot\E)/ ) { 
    179180        my $new_url = ''; 
    180  
    181181        for (0..(scalar(@url)-2)) { 
    182182            $new_url .= $url[$_] . '/'; 
    183183        } 
     184        print STDERR "Processing for application: $url\n"; 
    184185        my ( $basename, $extension ) = split( /\./, $url[-1] ); 
    185186        if ($basename eq 'screen') { 
     
    206207        $content =~ s!/\*.*?\*/!!gs;    # strip all comments first 
    207208        my @images = $content =~ 
    208           m/\b(?:url\(\s*)([a-zA-Z0-9_.-]+\.(?:gif|jpe?g|png))(?:\s*?\))/gi; 
     209          m/\b(?:url\(\s*)([a-zA-Z0-9_.-]+\.(?:gif|jpe?g|png|css))(?:\s*?\))/gi; 
    209210        $filemgr->mkpath( File::Spec->catdir( $themeroot, $basename ) ) 
    210211          or return $app->json_error( 
     
    233234        } 
    234235 
    235        # Pick up the images we parsed earlier and write them to the theme folder 
     236        # Pick up the images we parsed earlier and write them to the theme folder 
    236237        for my $image_url (@images) { 
    237238            my $image_request = 
     
    253254        $url = "$webthemeroot$basename/$basename.css"; 
    254255    } 
     256    print STDERR "url: $url\n"; 
    255257     
    256258    my $blog = MT->model('blog')->load($blog_id)     
     
    267269    my $footer = '/* end StyleCatcher imports */'; 
    268270    my $styles = $header . "\n"; 
    269     $styles .= "\@import url(".File::Spec->catfile($app->static_path, $base_css).");\n" if $base_css; 
     271    $styles .= "\@import url(".caturl($app->static_path, $base_css).");\n" if $base_css; 
    270272    $styles .= "\@import url($url);\n"; 
    271273    $styles .= $footer; 
    272     print STDERR "styles=$styles\n"; 
    273274 
    274275    if ($template_text =~ s/\Q$header\E.*\Q$footer\E/$styles/s) { 
     
    426427    my $data    = {}; 
    427428 
    428   # If we have a url then we're specifying a specific theme (css) or repo (html) 
     429    # If we have a url then we're specifying a specific theme (css) or repo (html) 
    429430    # Pick up the file (html with <link>s or a css file with metadata) 
    430431    my $user_agent = $app->new_ua; 
     
    593594        return unless $stylesheet; 
    594595 
    595 # Break up the css url in to a couple useful pieces (generalize and break me out) 
     596        # Break up the css url in to a couple useful pieces (generalize and break me out) 
    596597        $theme = $url; 
    597598        # discard any generic 'screen.css' filename 
     
    602603            $new_url .= $url[$_] . '/'; 
    603604        } 
     605        # note: this stripped off the css file and left a path only 
    604606    } 
    605607    else { 
     
    651653    # Trim me white space, yarr 
    652654    for (@comments) { 
    653  
    654655        # TBD: strip any "risky" content; we don't want any 
    655656        # XSS in this content. 
     
    663664    } 
    664665 
     666#    for my $line (@comments) { 
     667#        # TBD: strip any "risky" content; we don't want any 
     668#        # XSS in this content. 
     669#        # Strip any null bytes 
     670#        $line =~ tr/\x00//d; 
     671#        $line =~ s/^\s+|\s+$//g; 
     672#       if ($line =~ m{ \A (\w+) : \s* (.*) \z }xmsg) { 
     673#           my ( $key, $value ) = ($1, $2); 
     674#           print STDERR "$key => $value\n";# if (lc $key eq 'theme name' || lc $key eq 'name'); 
     675#           next if !$value; 
     676#           $metadata{ lc $key } = $value; 
     677#       } 
     678#    } 
     679 
    665680    my $thumbnail_link; 
    666681    $thumbnail_link = $new_url . 'thumbnail.gif'; 
     
    669684 
    670685    require MT::Util; 
     686    my $name = delete $metadata{'name'} || delete $metadata{'theme name'}; 
     687    print STDERR "name = $name\n"; 
    671688    my $data = { 
    672         name        => $theme, 
    673         description => $metadata{description} || '', 
    674         title       => $metadata{name} || '(Untitled)', 
     689#        name        => $theme, 
     690        name        => $name, 
     691#        description => $metadata{'description'} || $metadata{'description'} || '', 
     692        title       => $name || '(Untitled)', 
    675693        url         => $url, 
    676694        imageSmall  => $thumbnail_link, 
    677695        imageBig    => $thumbnail_large_link, 
    678         author      => $metadata{designer} || $metadata{author} || '', 
    679         author_url  => $metadata{designer_url} || $metadata{author_url} || '', 
    680         author_affiliation => $metadata{author_affiliation} || '', 
    681         layouts            => $metadata{layouts} || '', 
    682         'sort'             => $metadata{name} || '', 
     696        author      => delete $metadata{'designer'} || delete $metadata{'author'} || '', 
     697        author_url  => delete $metadata{'designer_url'} || delete $metadata{'author_url'} || delete $metadata{'author uri'} || '', 
     698#        author_affiliation => $metadata{'author_affiliation'} || '', 
     699#        layouts            => $metadata{'layouts'} || '', 
     700        'sort'             => $name || '', 
    683701        tags               => $tags, 
    684702        blogs              => [], 
    685703    }; 
     704    for my $field (qw( author_affiliation layouts description )) { 
     705        $data->{$field} = delete $metadata{$field} || ''; 
     706    } 
     707    # Toss in all the other metadata too. 
     708    @$data{keys %metadata} = values %metadata; 
     709    require Data::Dumper; 
     710    MT->log('YAY THEME DATA: ' . Data::Dumper::Dumper($data)); 
    686711    $data; 
    687712}