Make WordPress Core

Changeset 12094


Ignore:
Timestamp:
10/23/2009 04:32:56 AM (15 years ago)
Author:
azaozz
Message:

PressThis fixes from noel, fixes #11011

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/press-this.css

    r12030 r12094  
    1 body{font:13px "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;color:#333;margin:0;padding:0;}img{border:none;}#wphead{border-top:none;padding-top:4px;background:#444!important;}.tagchecklist span a{background:transparent url(../images/xit.gif) no-repeat 0 0;}#poststuff #edButtonPreview,#poststuff #edButtonHTML{-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-style:solid;border-width:1px;cursor:pointer;display:block;height:18px;margin:0 5px 0 0;padding:0 5px 0;font-size:10px;line-height:18px;float:left;}.howto{margin-top:2px;margin-bottom:3px;font-size:11px;font-style:italic;display:block;}input.text{outline-color:-moz-use-text-color;outline-style:none;outline-width:medium;width:100%;}#message{-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}div#poststuff{margin:10px;}div.zerosize{border:0 none;height:0;margin:0;overflow:hidden;padding:0;position:absolute;width:0;}#poststuff #edButtonPreview.active,#poststuff #edButtonHTML.active{display:none;}.posting{margin-right:212px;position:relative;left:0;}* html .posting{width:470px;}#side-info-column{float:right;width:200px;}#side-info-column .sleeve{padding-top:5px;}#poststuff .inside{font-size:11px;margin:8px;}#poststuff h2,#poststuff h3{font-size:12px;font-weight:bold;line-height:1;margin:0;padding:7px 9px;}#tagsdiv-post_tag h3,#categorydiv h3{cursor:pointer;}h3.tb{text-shadow:0 1px 0 #fff;font-weight:bold;font-size:12px;margin-left:5px;}#TB_window{border:1px solid #333;-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}.postbox,.stuffbox{margin-bottom:10px;border-width:1px;border-style:solid;line-height:1;-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}#title,.tbtitle{-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;border-style:solid;border-width:1px;font-size:1.7em;outline:none;padding:3px 4px;border-color:#dfdfdf;}.tbtitle{font-size:12px;padding:3px;}#title{width:97%;}.editor-container{-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;border:1px solid #dfdfdf;background-color:#fff;}.postdivrich{position:relative;padding-top:25px;}#actions{float:right;margin:-19px 0 0;}#extra_fields #actions{clear:both;position:relative;right:0;margin:-24px 0 0;}#actions li{float:left;list-style:none;margin-right:10px;}#extra_fields .button{margin-right:5px;padding:3px 6px;border-radius:10px;-webkit-border-radius:10px;-khtml-border-radius:10px;-moz-border-radius:10px;}.photolist{margin-top:-10px;}#photo_saving{margin:0 8px 8px;vertical-align:middle;}#img_container{background-color:#fff;}#img_container_container{overflow:auto;}#extra_fields{margin-top:10px;position:relative;}#extra_fields .postbox{margin-bottom:5px;}#extra_fields .titlewrap{padding:0;overflow:auto;height:100px;}#img_container{position:relative;}#img_container a{display:block;float:left;overflow:hidden;vertical-align:center;}#img_container img,#img_container a{width:68px;height:68px;}#img_container img{border:none;background-color:#f4f4f4;cursor:pointer;}#img_container a,#img_container a:link,#img_container a:visited{border:1px solid #ccc;display:block;position:relative;}#img_container a:hover,#img_container a:active{border-color:#000;z-index:1000;border-width:2px;margin:-1px;}#embed-code{width:100%;height:98px;}#viewsite{padding:0;margin:0 0 20px 0;font-size:10px;clear:both;}#viewsite .button{margin:0;display:block;}.wp-hidden-children .wp-hidden-child{display:none;}#category-adder{padding:4px 0;}#category-adder h4{margin:0 0 8px;}#category-add input{width:94%;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;margin:1px;padding:3px;}#category-add select{width:70%;-x-system-font:none;border-style:solid;border-width:1px;font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif;font-size:12px;height:2em;line-height:20px;padding:2px;margin:1px;vertical-align:top;}#category-add input,#category-add-sumbit{width:auto;}#categorydiv ul,#linkcategorydiv ul{list-style:none;padding:0;margin:0;}#categorydiv ul.categorychecklist ul{margin-left:18px;}#categorydiv div.tabs-panel{height:140px;overflow:auto;}ul.categorychecklist li{margin:0;padding:0;line-height:19px;}.screen-reader-text{display:none;}.tagsdiv .newtag{margin-right:5px;}.jaxtag{clear:both;margin:0;}.tagadd{margin-left:3px;}.tagchecklist{margin-top:3px;margin-bottom:1em;font-size:12px;overflow:auto;}.tagchecklist strong{position:absolute;font-size:.75em;}.tagchecklist span{margin-right:.5em;margin-left:10px;display:block;float:left;font-size:11px;line-height:1.8em;white-space:nowrap;cursor:default;}.tagchecklist span a{margin:6px 0 0 -9px;cursor:pointer;width:10px;height:10px;display:block;float:left;text-indent:-9999px;overflow:hidden;position:absolute;}#content{margin:5px 0;padding:0 5px;border:0 none;height:365px;width:97%!important;}#saving{display:inline;vertical-align:middle;}.submit input,.button,.button-primary,.button-secondary,.button-highlighted,#postcustomstuff .submit input{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;text-decoration:none;font-size:11px!important;line-height:16px;padding:2px 8px;cursor:pointer;border-width:1px;border-style:solid;-moz-border-radius:11px;-khtml-border-radius:11px;-webkit-border-radius:11px;border-radius:11px;}.button-primary{background:#21759B url(../images/button-grad.png) repeat-x scroll left top;border-color:#21759B;color:#fff;}.ac_results{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;display:none;border-width:1px;border-style:solid;}.ac_results li{padding:2px 5px;white-space:nowrap;text-align:left;}.ac_over{cursor:pointer;}.ac_match{text-decoration:underline;}#TB_ajaxContent #options{position:absolute;top:20px;right:25px;padding:5px;}#TB_ajaxContent h3{margin-bottom:.25em;}.updated{margin:10px 0;padding:0;border-width:1px;border-style:solid;width:99%;}.updated p,.error p{margin:.6em 0;padding:0 .6em;}.error a{text-decoration:underline;}.updated a{text-decoration:none;padding-bottom:2px;}#post_status{margin-left:10px;margin-bottom:1em;display:block;}#footer{height:65px;display:block;width:640px;padding:10px 0 0 60px;margin:0;position:absolute;bottom:0;font-size:12px;}#footer p{margin:0;padding:7px 0;}#footer p a{text-decoration:none;}#footer p a:hover{text-decoration:underline;}.centered{text-align:center;}.hidden{display:none;}.postbox input[type="text"],.postbox textarea,.stuffbox input[type="text"],.stuffbox textarea{border-width:1px;border-style:solid;}.taghint{color:#aaa;margin:-17px 6px 0 0;visibility:hidden;}input.newtag ~ div.taghint{visibility:visible;}input.newtag:focus ~ div.taghint{visibility:hidden;}
     1body{font:13px "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;color:#333;margin:0;padding:0;min-width:675px;min-height:400px;}img{border:none;}#wphead{border-top:none;padding-top:4px;background:#444!important;}.tagchecklist span a{background:transparent url(../images/xit.gif) no-repeat 0 0;}#poststuff #edButtonPreview,#poststuff #edButtonHTML{-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-style:solid;border-width:1px;cursor:pointer;display:block;height:18px;margin:0 5px 0 0;padding:0 5px 0;font-size:10px;line-height:18px;float:left;}.howto{margin-top:2px;margin-bottom:3px;font-size:11px;font-style:italic;display:block;}input.text{outline-color:-moz-use-text-color;outline-style:none;outline-width:medium;width:100%;}#message{-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}div#poststuff{margin:10px;}div.zerosize{border:0 none;height:0;margin:0;overflow:hidden;padding:0;width:0;}#poststuff #edButtonPreview.active,#poststuff #edButtonHTML.active{display:none;}.posting{margin-right:212px;position:relative;}#side-info-column{float:right;width:200px;position:relative;right:0;}#side-info-column .sleeve{padding-top:5px;}#poststuff .inside{font-size:11px;margin:8px;}#poststuff h2,#poststuff h3{font-size:12px;font-weight:bold;line-height:1;margin:0;padding:7px 9px;}#tagsdiv-post_tag h3,#categorydiv h3{cursor:pointer;}h3.tb{text-shadow:0 1px 0 #fff;font-weight:bold;font-size:12px;margin-left:5px;}#TB_window{border:1px solid #333;-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}.postbox,.stuffbox{margin-bottom:10px;border-width:1px;border-style:solid;line-height:1;-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}.stuffbox:hover .handlediv{background:transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px;}.handlediv{float:right;height:26px;width:23px;}#title,.tbtitle{-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;border-style:solid;border-width:1px;font-size:1.7em;outline:none;padding:3px 4px;border-color:#dfdfdf;}.tbtitle{font-size:12px;padding:3px;}#title{width:97%;}.editor-container{-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;border:1px solid #dfdfdf;background-color:#fff;}.postdivrich{padding-top:25px;position:relative;}.actions{float:right;margin:-19px 0 0;}#extra-fields .actions{margin:-15px -5px 0 0;}.actions li{float:left;list-style:none;margin-right:10px;}#extra-fields .button{margin-right:5px;padding:3px 6px;border-radius:10px;-webkit-border-radius:10px;-khtml-border-radius:10px;-moz-border-radius:10px;}.photolist{margin-top:-10px;}#photo_saving{margin:0 8px 8px;vertical-align:middle;}#img_container{background-color:#fff;}#img_container_container{overflow:auto;}#extra-fields{margin-top:10px;position:relative;}#waiting{margin-top:10px;}#extra-fields .postbox{margin-bottom:5px;}#extra-fields .titlewrap{padding:0;overflow:auto;height:100px;}#img_container a{display:block;float:left;overflow:hidden;vertical-align:center;}#img_container img,#img_container a{width:68px;height:68px;}#img_container img{border:none;background-color:#f4f4f4;cursor:pointer;}#img_container a,#img_container a:link,#img_container a:visited{border:1px solid #ccc;display:block;position:relative;}#img_container a:hover,#img_container a:active{border-color:#000;z-index:1000;border-width:2px;margin:-1px;}#embed-code{width:100%;height:98px;}#viewsite{padding:0;margin:0 0 20px 5px;font-size:10px;clear:both;}.wp-hidden-children .wp-hidden-child{display:none;}#category-adder{padding:4px 0;}#category-adder h4{margin:0 0 8px;}#category-add input{width:94%;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px;margin:1px;padding:3px;}#category-add select{width:70%;-x-system-font:none;border-style:solid;border-width:1px;font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif;font-size:12px;height:2em;line-height:20px;padding:2px;margin:1px;vertical-align:top;}#category-add input,#category-add-sumbit{width:auto;}#categorydiv ul,#linkcategorydiv ul{list-style:none;padding:0;margin:0;}#categorydiv ul.categorychecklist ul{margin-left:18px;}#categorydiv div.tabs-panel{height:140px;overflow:auto;}ul.categorychecklist li{margin:0;padding:0;line-height:19px;}.screen-reader-text{display:none;}.tagsdiv .newtag{margin-right:5px;}.jaxtag{clear:both;margin:0;}.tagadd{margin-left:3px;}.tagchecklist{margin-top:3px;margin-bottom:1em;font-size:12px;overflow:auto;}.tagchecklist strong{position:absolute;font-size:.75em;}.tagchecklist span{margin-right:.5em;margin-left:10px;display:block;float:left;font-size:11px;line-height:1.8em;white-space:nowrap;cursor:default;}.tagchecklist span a{margin:6px 0 0 -9px;cursor:pointer;width:10px;height:10px;display:block;float:left;text-indent:-9999px;overflow:hidden;position:absolute;}#content{margin:5px 0;padding:0 5px;border:0 none;height:365px;width:97%!important;}#saving{display:inline;vertical-align:middle;}.submit input,.button,.button-primary,.button-secondary,.button-highlighted,#postcustomstuff .submit input{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;text-decoration:none;font-size:11px!important;line-height:16px;padding:2px 8px;cursor:pointer;border-width:1px;border-style:solid;-moz-border-radius:11px;-khtml-border-radius:11px;-webkit-border-radius:11px;border-radius:11px;}.button-primary{background:#21759B url(../images/button-grad.png) repeat-x scroll left top;border-color:#21759B;color:#fff;}.ac_results{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;display:none;border-width:1px;border-style:solid;}.ac_results li{padding:2px 5px;white-space:nowrap;text-align:left;}.ac_over{cursor:pointer;}.ac_match{text-decoration:underline;}#TB_ajaxContent #options{position:absolute;top:20px;right:25px;padding:5px;}#TB_ajaxContent h3{margin-bottom:.25em;}.updated{margin:10px 0;padding:0;border-width:1px;border-style:solid;width:99%;}.updated p,.error p{margin:.6em 0;padding:0 .6em;}.error a{text-decoration:underline;}.updated a{text-decoration:none;padding-bottom:2px;}#post_status{margin-left:10px;margin-bottom:1em;display:block;}#footer{height:65px;display:block;width:640px;padding:10px 0 0 60px;margin:0;position:absolute;bottom:0;font-size:12px;}#footer p{margin:0;padding:7px 0;}#footer p a{text-decoration:none;}#footer p a:hover{text-decoration:underline;}.centered{text-align:center;}.hidden{display:none;}.postbox input[type="text"],.postbox textarea,.stuffbox input[type="text"],.stuffbox textarea{border-width:1px;border-style:solid;}.taghint{color:#aaa;margin:-17px 0 0 7px;visibility:hidden;}input.newtag ~ div.taghint{visibility:visible;}input.newtag:focus ~ div.taghint{visibility:hidden;}
  • trunk/wp-admin/css/press-this.dev.css

    r12030 r12094  
     1
    12body {
    2     font: 13px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif;
     3    font: 13px "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
    34    color: #333;
    45    margin: 0;
    56    padding: 0;
     7    min-width: 675px;
     8    min-height: 400px;
    69}
    710
     
    1821
    1922.tagchecklist span a {
    20 background: transparent url(../images/xit.gif) no-repeat 0 0;
     23    background: transparent url(../images/xit.gif) no-repeat 0 0;
    2124}
    2225
     
    7578    overflow: hidden;
    7679    padding: 0;
    77     position: absolute;
    7880    width: 0;
    7981}
     
    8789    margin-right: 212px;
    8890    position: relative;
    89     left: 0;
    90 }
    91 
    92 * html .posting {
    93     width: 470px;
    9491}
    9592
     
    9794    float: right;
    9895    width: 200px;
     96    position: relative;
     97    right: 0;
    9998}
    10099
     
    108107}
    109108
    110 #poststuff h2, #poststuff h3 {
     109#poststuff h2,#poststuff h3 {
    111110    font-size: 12px;
    112111    font-weight: bold;
     
    148147}
    149148
     149.stuffbox:hover .handlediv {
     150    background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px;
     151}
     152
     153.handlediv {
     154    float: right;
     155    height: 26px;
     156    width: 23px;
     157}
     158
    150159#title,
    151160.tbtitle {
     
    168177
    169178#title {
    170     width: 97%;
     179width: 97%;
    171180}
    172181
     
    181190
    182191.postdivrich {
     192    padding-top: 25px;
    183193    position: relative;
    184     padding-top: 25px;
    185 }
    186 
    187 #actions {
     194}
     195
     196.actions {
    188197    float: right;
    189198    margin: -19px 0 0;
    190199}
    191200
    192 #extra_fields #actions {
    193     clear: both;
    194     position: relative;
    195     right: 0px;
    196     margin: -24px 0 0;
    197 }
    198 
    199 #actions li {
     201#extra-fields .actions {
     202    margin: -15px -5px 0 0;
     203}
     204
     205.actions li {
    200206    float: left;
    201207    list-style: none;
     
    203209}
    204210
    205 #extra_fields .button {
     211#extra-fields .button {
    206212    margin-right: 5px;
    207213    padding: 3px 6px;
     
    225231    background-color: #fff;
    226232}
     233
    227234#img_container_container {
    228235    overflow: auto;
    229236}
    230237
    231 #extra_fields {
     238#extra-fields {
    232239    margin-top: 10px;
    233240    position: relative;
    234241}
    235242
    236 #extra_fields .postbox {
     243#waiting {
     244    margin-top: 10px;
     245}
     246
     247#extra-fields .postbox {
    237248    margin-bottom: 5px;
    238249}
    239250
    240 #extra_fields .titlewrap {
     251#extra-fields .titlewrap {
    241252    padding: 0;
    242253    overflow: auto;
    243254    height: 100px;
    244 }
    245 
    246 #img_container {
    247     position: relative;
    248255}
    249256
     
    292299#viewsite {
    293300    padding: 0;
    294     margin: 0 0 20px 0;
     301    margin: 0 0 20px 5px;
    295302    font-size: 10px;
    296303    clear: both;
    297 }
    298 
    299 #viewsite .button {
    300     margin: 0;
    301     display: block;
    302304}
    303305
     
    317319#category-add input {
    318320    width: 94%;
    319     font-family: Verdana, Arial, Helvetica, sans-serif;
     321    font-family: Verdana,Arial,Helvetica,sans-serif;
    320322    font-size: 13px;
    321323    margin: 1px;
     
    328330    border-style: solid;
    329331    border-width: 1px;
    330     font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif;
     332    font-family: "Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif;
    331333    font-size: 12px;
    332334    height: 2em;
     
    369371    display: none;
    370372}
     373
    371374.tagsdiv .newtag {
    372375    margin-right: 5px;
     
    426429
    427430/* Submit */
    428 
    429431#saving {
    430432    display: inline;
     
    438440.button-highlighted,
    439441#postcustomstuff .submit input {
    440     font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif;
     442    font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
    441443    text-decoration: none;
    442444    font-size: 11px !important;
     
    543545    text-decoration: none;
    544546}
     547
    545548#footer p a:hover {
    546549    text-decoration: underline;
     
    567570.taghint {
    568571    color: #aaa;
    569     margin: -17px 6px 0 0;
     572    margin: -17px 0 0 7px;
    570573    visibility: hidden;
    571574}
  • trunk/wp-admin/press-this.php

    r12042 r12094  
    101101$image = isset($_GET['i']) ? $_GET['i'] : '';
    102102
    103 if ( !empty($_GET['ajax']) ) {
    104     switch ($_GET['ajax']) {
     103if ( !empty($_REQUEST['ajax']) ) {
     104    switch ($_REQUEST['ajax']) {
    105105        case 'video': ?>
    106106            <script type="text/javascript" charset="utf-8">
     
    108108                jQuery('.select').click(function() {
    109109                    append_editor(jQuery('#embed-code').val());
    110                     jQuery('#extra_fields').hide();
    111                     jQuery('#extra_fields').html('');
     110                    jQuery('#extra-fields').hide();
     111                    jQuery('#extra-fields').html('');
    112112                });
    113113                jQuery('.close').click(function() {
    114                     jQuery('#extra_fields').hide();
    115                     jQuery('#extra_fields').html('');
     114                    jQuery('#extra-fields').hide();
     115                    jQuery('#extra-fields').html('');
    116116                });
    117117            /* ]]> */
     
    193193         */
    194194        function get_images_from_uri($uri) {
     195            $uri = preg_replace('/\/#.+?$/','', $uri);
    195196            if( preg_match('/\.(jpg|jpe|jpeg|png|gif)$/', $uri) && !strpos($uri,'blogger.com') )
    196197                return "'".html_entity_decode($uri)."'";
     
    199200                return '';
    200201            $host = parse_url($uri);
    201             $pattern = '/<img ([^>]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif)[^<>\'\"]*)(\2)([^>]*)\/*>/is';
     202            $pattern = '/<img ([^>]*)src=(\"|\')([^<>\'\"]+)(\2)([^>]*)\/*>/is';
    202203            preg_match_all($pattern, $content, $matches);
    203204            if ( empty($matches[0]) )
     
    216217            return "'" . implode("','", $sources) . "'";
    217218        }
    218         $url = urldecode($url);
     219        $url = wp_kses(urldecode($url), null);
    219220        echo 'new Array('.get_images_from_uri($url).')';
    220 
    221221        break;
    222222
     
    225225        var last = null
    226226        var img, img_tag, aspect, w, h, skip, i, strtoappend = "";
     227        if(photostorage == false) {
    227228        var my_src = eval(
    228229            jQuery.ajax({
     
    250251            }
    251252        }
    252 
     253        }
    253254        for (i = 0; i < my_src.length; i++) {
    254255            img = new Image();
     
    295296            src = jQuery('#this_photo').val();
    296297            pick(src, desc);
    297             jQuery('#extra_fields').hide();
    298             jQuery('#extra_fields').html('');
     298            jQuery('#extra-fields').hide();
     299            jQuery('#extra-fields').html('');
    299300            return false;
    300301        }
    301 
    302         jQuery(document).ready(function() {
    303             jQuery('#extra_fields').html('<div class="postbox"><h2>Photo <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul id="actions"><li><a href="#" id="photo_add_url" class="thickbox button"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>');
    304             jQuery('.close').click(function() {
    305                 jQuery('#extra_fields').hide();
    306                 jQuery('#extra_fields').html('');
    307             });
    308             jQuery('.refresh').click(function() {
    309                         show('photo');
    310                     });
     302            jQuery('#extra-fields').html('<div class="postbox"><h2>Add Photos <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul class="actions"><li><a href="#" id="photo-add-url" class="thickbox button"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>');
    311303            jQuery('#img_container').html(strtoappend);
    312             jQuery('#photo_add_url').attr('href', '?ajax=photo_thickbox_url&height=200&width=500');
    313             tb_init('#extra_fields .thickbox');
    314 
    315 
    316         });
    317304        <?php break;
    318305}
     
    329316<?php
    330317    add_thickbox();
    331     wp_enqueue_style('press-this');
    332     wp_enqueue_style('press-this-ie');
     318    wp_enqueue_style( 'press-this' );
     319    wp_enqueue_style( 'press-this-ie');
    333320    wp_enqueue_style( 'colors' );
    334321    wp_enqueue_script( 'post' );
    335     wp_enqueue_script('editor');
     322    wp_enqueue_script( 'editor' );
    336323?>
    337324<script type="text/javascript">
     
    340327var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time() ?>'};
    341328var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-this';
     329var photostorage = false;
    342330//]]>
    343331</script>
     
    377365
    378366    function show(tab_name) {
    379         jQuery('#extra_fields').html('');
    380         jQuery('#extra_fields').show();
     367        jQuery('#extra-fields').html('');
    381368        switch(tab_name) {
    382369            case 'video' :
    383                 jQuery('#extra_fields').load('<?php echo esc_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo esc_attr($selection); ?>'}, function() {
     370                jQuery('#extra-fields').load('<?php echo esc_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo esc_attr($selection); ?>'}, function() {
    384371                    <?php
    385372                    $content = '';
     
    403390                    jQuery('#embed-code').prepend('<?php echo htmlentities($content); ?>');
    404391                });
     392                jQuery('#extra-fields').show();
    405393                return false;
    406394                break;
    407395            case 'photo' :
    408                 jQuery('#extra_fields').before('<p id="waiting"><img src="images/wpspin_light.gif" alt="" /> <?php echo esc_js( __( 'Loading...' ) ); ?></p>');
    409                 jQuery.ajax({
    410                     type: "GET",
    411                     cache : false,
    412                     url: "<?php echo esc_url($_SERVER['PHP_SELF']); ?>",
    413                     data: "ajax=photo_js&u=<?php echo urlencode($url)?>",
    414                     dataType : "script",
    415                     success : function() {
    416                         jQuery('#waiting').remove();
    417                     }
    418                 });
     396                function setup_photo_actions() {
     397                    jQuery('.close').click(function() {
     398                        jQuery('#extra-fields').hide();
     399                        jQuery('#extra-fields').html('');
     400                    });
     401                    jQuery('.refresh').click(function() {
     402                        photostorage = false;
     403                        show('photo');
     404                    });
     405                    jQuery('#photo-add-url').attr('href', '?ajax=photo_thickbox_url&height=200&width=500');
     406                    tb_init('#extra-fields .thickbox');
     407                    jQuery('#waiting').hide();
     408                    jQuery('#extra-fields').show();
     409                }
     410                jQuery('#extra-fields').before('<div id="waiting"><img src="images/wpspin_light.gif" alt="" /> <?php echo esc_js( __( 'Loading...' ) ); ?></div>');
     411               
     412                if(photostorage == false) {
     413                    jQuery.ajax({
     414                        type: "GET",
     415                        cache : false,
     416                        url: "<?php echo esc_url($_SERVER['PHP_SELF']); ?>",
     417                        data: "ajax=photo_js&u=<?php echo urlencode($url)?>",
     418                        dataType : "script",
     419                        success : function(data) {
     420                            eval(data);
     421                            photostorage = jQuery('#extra-fields').html();
     422                            setup_photo_actions();
     423                        }
     424                    });
     425                } else {
     426                    jQuery('#extra-fields').html(photostorage);
     427                    setup_photo_actions();
     428                }
    419429                return false;
    420430                break;
     
    423433    jQuery(document).ready(function($) {
    424434        //resize screen
    425         window.resizeTo(720,570);
     435        window.resizeTo(720,540);
    426436        // set button actions
    427437        jQuery('#photo_button').click(function() { show('photo'); return false; });
     
    450460    <div id="side-info-column">
    451461        <div class="sleeve">
    452             <h1 id="viewsite"><a class="button" href="<?php echo get_option('home'); ?>/" target="_blank"><?php bloginfo('name'); ?> &rsaquo; <?php _e('Press This') ?></a></span></h1>
     462            <h1 id="viewsite"><a href="<?php echo get_option('home'); ?>/" target="_blank"><?php bloginfo('name'); ?> &rsaquo; <?php _e('Press This') ?></a></span></h1>
    453463
    454464            <?php wp_nonce_field('press-this') ?>
     
    462472
    463473            <div id="submitdiv" class="stuffbox">
     474                <div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>">
     475                    <br/>
     476                </div>
    464477                <h3><?php _e('Publish') ?></h3>
    465478                <div class="inside">
     
    477490
    478491            <div id="categorydiv" class="stuffbox">
     492                <div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>">
     493                    <br/>
     494                </div>
    479495                <h3><?php _e('Categories') ?></h3>
    480496                <div class="inside">
    481497
    482498                    <div id="categories-all" class="tabs-panel">
     499
    483500                        <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
    484501                            <?php wp_category_checklist($post_ID, false) ?>
     
    500517
    501518            <div id="tagsdiv-post_tag" class="stuffbox" >
     519                <div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>">
     520                    <br/>
     521                </div>
    502522                <h3><span><?php _e('Post Tags'); ?></span></h3>
    503523                <div class="inside">
     
    519539        </div>
    520540    </div>
    521 
    522541    <div class="posting">
    523542        <?php if ( isset($posted) && intval($posted) ) { $post_ID = intval($posted); ?>
     
    531550        </div>
    532551
    533         <div id="extra_fields" style="display: none"></div>
     552        <div id="extra-fields" style="display: none"></div>
    534553
    535554        <div class="postdivrich">
    536             <ul id="actions">
     555            <ul id="actions" class="actions">
    537556
    538557                <li id="photo_button">
  • trunk/wp-includes/link-template.php

    r12058 r12094  
    17171717            e=encodeURIComponent,
    17181718            u=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=4';
    1719             a=function(){if(!w.open(u,'t','toolbar=0,resizable=0,status=1,width=720,height=570'))l.href=u;};
     1719            a=function(){if(!w.open(u,'t','toolbar=0,resizable=1,scrollbars=1,status=1,width=720,height=570'))l.href=u;};
    17201720            if (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0); else a();
    17211721            void(0)";
  • trunk/wp-includes/script-loader.php

    r12081 r12094  
    439439    $styles->add( 'install', "/wp-admin/css/install$suffix.css", array(), '20090514' );
    440440    $styles->add( 'theme-editor', "/wp-admin/css/theme-editor$suffix.css", array(), '20090625' );
    441     $styles->add( 'press-this', "/wp-admin/css/press-this$suffix.css", array(), '20091014' );
     441    $styles->add( 'press-this', "/wp-admin/css/press-this$suffix.css", array(), '20091022' );
    442442    $styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20090514' );
    443443    $styles->add( 'login', "/wp-admin/css/login$suffix.css", array(), '20091010' );
Note: See TracChangeset for help on using the changeset viewer.