Plugin Directory

Changeset 1479987


Ignore:
Timestamp:
08/21/2016 01:43:34 PM (10 years ago)
Author:
yoihito
Message:

0.1.7

Location:
tapwarp
Files:
2 deleted
3 edited
6 copied

Legend:

Unmodified
Added
Removed
  • tapwarp/tags/0.1.7/css/tapwarp-admin.css

    r1473811 r1479987  
    1616    position: relative;
    1717    overflow: visible;
    18     z-index: 1;
     18    z-index: 9;
    1919    transition: all 1s ease;
    2020    display: inline-block;
     
    3434    max-width: 223px;
    3535    display: block;
     36    cursor: pointer;
    3637}
    3738
     
    114115    display: block;
    115116}
     117
     118.tapwarp-text-code-container {
     119    position: absolute;
     120    left: 100%;
     121    top: 0px;
     122    width: 1px;
     123    height: 100%;
     124    overflow: hidden;
     125    z-index: 99;
     126    transition: all 0.3s ease;
     127    opacity: 0;
     128    text-indent: -1000px;
     129}
     130
     131.tapwarp-text-code-container.show {
     132    width: 480px;
     133    text-indent: 0px;
     134    opacity: 1;
     135}
     136
     137.tapwarp-text-code-container > div:first-child {
     138    width: 0px;
     139    height: 0px;
     140    border-color: transparent #FFFFFF transparent transparent;
     141    border-width: 20px 20px 20px 0px;
     142    border-style: solid;
     143    display: inline-block;
     144    padding: 0px;
     145    margin: 0px;
     146    vertical-align: middle;
     147}
     148
     149.tapwarp-text-code-container > div:last-child {
     150    display: inline-block;
     151    width: 450px;
     152    height: 100%;
     153    padding: 0px;
     154    margin: 0px;
     155    overflow: hidden;
     156    vertical-align: middle;
     157    position: relative;
     158    text-align: left;
     159}
     160
     161.tapwarp-text-code-container > div:last-child textarea {
     162    width: 430px;
     163    height: 100%;
     164    border: 5px solid white;
     165    background-color: #f0f0f0;
     166    margin: 0px;
     167}
     168
     169.tapwarp-code-copied {
     170    width: 420px;
     171    left: 0px;
     172    bottom: 0%;
     173    background-color: white;
     174    color: black;
     175    position: absolute;
     176    padding: 5px;
     177    border: 1px solid gray;
     178    border-radius: 10px;
     179    text-align: center;
     180}
  • tapwarp/tags/0.1.7/readme.txt

    r1473811 r1479987  
    6666== Changelog ==
    6767
     68= 0.1.7 =
     69
     70Added text copy function.  Click the QR code to find it.
     71
    6872= 0.1.6 =
    6973
  • tapwarp/tags/0.1.7/tapwarp.php

    r1473811 r1479987  
    44Plugin URI: http://twdemo.qaon.net/
    55Description: Upload pictures from smartphone to wordpress easily.
    6 Version:     0.1.6
     6Version:     0.1.7
    77Author:      Yuxiang Mao
    88Author URI:  http://qaon.net
     
    6868            </div>
    6969        </div>
     70        <div class="tapwarp-text-code-container">
     71            <div>&nbsp;</div><div>
     72                <textarea readonly="readonly"><?php echo htmlspecialchars(base64_encode(json_encode(tapwarp_get_jsoninfo()))); ?></textarea>
     73                <div class="tapwarp-code-copied">
     74                    <?php echo __('The code as been copied to your clipboard.') ?><br/>
     75                    <?php echo __('YOu can paste the code into Tap Warp app.') ?>
     76                </div>
     77            </div>
     78        </div>
    7079    </div>
    7180    <?php
     
    8493        };
    8594        jQuery.post(ajaxurl, data, function(response) {
    86             $('.tapwarp-qrcode-image').attr('src','data:image/png;base64,'+response);
     95            jQuery('.tapwarp-qrcode-image').attr('src','data:image/png;base64,'+response);
    8796        });
     97
     98        jQuery('.tapwarp-qrcode-image').on('click',
     99            function () {
     100                var container=jQuery('.tapwarp-text-code-container');
     101                if (container.hasClass('show'))
     102                {
     103                    container.removeClass('show');
     104                    container.find('.tapwarp-code-copied').removeClass('show');
     105                }
     106                else
     107                {
     108                    container.addClass('show');
     109                    var ta=container.find('textarea');
     110                    ta[0].focus();
     111                    ta[0].select();
     112                    if (document.execCommand('copy'))
     113                        container.find('.tapwarp-code-copied').addClass('show');
     114                }
     115            }
     116        );
    88117    });
    89118    </script>
     
    197226}
    198227
    199 function tapwarp_on_ajax_getqrcode()
     228function tapwarp_get_jsoninfo()
    200229{
    201230    global $tapwarp_use_image_server;
    202 
    203     /*
    204        GD library is required to let the plugin work.
    205      */
    206     require( 'phpqrcode/phpqrcode.php' );
    207231
    208232    $sizeHint=get_option('tapwarp_accept_size_hint');
     
    241265    $info->clientData->rid=$receiverid;
    242266
     267    return $info;
     268}
     269
     270function tapwarp_on_ajax_getqrcode()
     271{
     272    $info=tapwarp_get_jsoninfo();
     273    /*
     274       GD library is required to let the plugin work.
     275     */
     276    require( 'phpqrcode/phpqrcode.php' );
    243277    ob_start();
    244278    QRcode::png(json_encode($info));
  • tapwarp/trunk/css/tapwarp-admin.css

    r1473811 r1479987  
    1616    position: relative;
    1717    overflow: visible;
    18     z-index: 1;
     18    z-index: 9;
    1919    transition: all 1s ease;
    2020    display: inline-block;
     
    3434    max-width: 223px;
    3535    display: block;
     36    cursor: pointer;
    3637}
    3738
     
    114115    display: block;
    115116}
     117
     118.tapwarp-text-code-container {
     119    position: absolute;
     120    left: 100%;
     121    top: 0px;
     122    width: 1px;
     123    height: 100%;
     124    overflow: hidden;
     125    z-index: 99;
     126    transition: all 0.3s ease;
     127    opacity: 0;
     128    text-indent: -1000px;
     129}
     130
     131.tapwarp-text-code-container.show {
     132    width: 480px;
     133    text-indent: 0px;
     134    opacity: 1;
     135}
     136
     137.tapwarp-text-code-container > div:first-child {
     138    width: 0px;
     139    height: 0px;
     140    border-color: transparent #FFFFFF transparent transparent;
     141    border-width: 20px 20px 20px 0px;
     142    border-style: solid;
     143    display: inline-block;
     144    padding: 0px;
     145    margin: 0px;
     146    vertical-align: middle;
     147}
     148
     149.tapwarp-text-code-container > div:last-child {
     150    display: inline-block;
     151    width: 450px;
     152    height: 100%;
     153    padding: 0px;
     154    margin: 0px;
     155    overflow: hidden;
     156    vertical-align: middle;
     157    position: relative;
     158    text-align: left;
     159}
     160
     161.tapwarp-text-code-container > div:last-child textarea {
     162    width: 430px;
     163    height: 100%;
     164    border: 5px solid white;
     165    background-color: #f0f0f0;
     166    margin: 0px;
     167}
     168
     169.tapwarp-code-copied {
     170    width: 420px;
     171    left: 0px;
     172    bottom: 0%;
     173    background-color: white;
     174    color: black;
     175    position: absolute;
     176    padding: 5px;
     177    border: 1px solid gray;
     178    border-radius: 10px;
     179    text-align: center;
     180}
  • tapwarp/trunk/readme.txt

    r1473811 r1479987  
    6666== Changelog ==
    6767
     68= 0.1.7 =
     69
     70Added text copy function.  Click the QR code to find it.
     71
    6872= 0.1.6 =
    6973
  • tapwarp/trunk/tapwarp.php

    r1473811 r1479987  
    44Plugin URI: http://twdemo.qaon.net/
    55Description: Upload pictures from smartphone to wordpress easily.
    6 Version:     0.1.6
     6Version:     0.1.7
    77Author:      Yuxiang Mao
    88Author URI:  http://qaon.net
     
    6868            </div>
    6969        </div>
     70        <div class="tapwarp-text-code-container">
     71            <div>&nbsp;</div><div>
     72                <textarea readonly="readonly"><?php echo htmlspecialchars(base64_encode(json_encode(tapwarp_get_jsoninfo()))); ?></textarea>
     73                <div class="tapwarp-code-copied">
     74                    <?php echo __('The code as been copied to your clipboard.') ?><br/>
     75                    <?php echo __('YOu can paste the code into Tap Warp app.') ?>
     76                </div>
     77            </div>
     78        </div>
    7079    </div>
    7180    <?php
     
    8493        };
    8594        jQuery.post(ajaxurl, data, function(response) {
    86             $('.tapwarp-qrcode-image').attr('src','data:image/png;base64,'+response);
     95            jQuery('.tapwarp-qrcode-image').attr('src','data:image/png;base64,'+response);
    8796        });
     97
     98        jQuery('.tapwarp-qrcode-image').on('click',
     99            function () {
     100                var container=jQuery('.tapwarp-text-code-container');
     101                if (container.hasClass('show'))
     102                {
     103                    container.removeClass('show');
     104                    container.find('.tapwarp-code-copied').removeClass('show');
     105                }
     106                else
     107                {
     108                    container.addClass('show');
     109                    var ta=container.find('textarea');
     110                    ta[0].focus();
     111                    ta[0].select();
     112                    if (document.execCommand('copy'))
     113                        container.find('.tapwarp-code-copied').addClass('show');
     114                }
     115            }
     116        );
    88117    });
    89118    </script>
     
    197226}
    198227
    199 function tapwarp_on_ajax_getqrcode()
     228function tapwarp_get_jsoninfo()
    200229{
    201230    global $tapwarp_use_image_server;
    202 
    203     /*
    204        GD library is required to let the plugin work.
    205      */
    206     require( 'phpqrcode/phpqrcode.php' );
    207231
    208232    $sizeHint=get_option('tapwarp_accept_size_hint');
     
    241265    $info->clientData->rid=$receiverid;
    242266
     267    return $info;
     268}
     269
     270function tapwarp_on_ajax_getqrcode()
     271{
     272    $info=tapwarp_get_jsoninfo();
     273    /*
     274       GD library is required to let the plugin work.
     275     */
     276    require( 'phpqrcode/phpqrcode.php' );
    243277    ob_start();
    244278    QRcode::png(json_encode($info));
Note: See TracChangeset for help on using the changeset viewer.