Plugin Directory

Changeset 718074


Ignore:
Timestamp:
05/25/2013 02:39:09 AM (13 years ago)
Author:
conductrics
Message:

improvements in embedded setup page

Location:
conductrics-webactions/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • conductrics-webactions/trunk/conductrics-webactions.php

    r717846 r718074  
    33    Plugin Name: Conductrics Web Actions
    44    Description: Includes Conductrics Web Actions scripts in your pages, which makes it easy to test changes to your pages, track their success, and do dynamic targeting.
    5     Version: 0.2.6
     5    Version: 0.2.7
    66    Author: Conductrics
    77    Author URI: http://conductrics.com
  • conductrics-webactions/trunk/includes/wa-settings.php

    r712473 r718074  
    116116                'conductrics-jquery-agent-list',
    117117                'conductrics_wa_account',
    118                 $this->admin_get_options(true)
     118                array_merge(array(), $this->admin_get_options(true), array("permalink" => get_permalink()))
    119119            );
    120120            wp_enqueue_style(
  • conductrics-webactions/trunk/js/agent-list-input.jquery.js

    r717846 r718074  
    5454                    itemLinksFn: function(val) {
    5555                        return [
    56                             { href: thickboxUrl(getConsoleUrl([val, 'web-actions'], true), 800), label: 'Web Actions', class: 'thickbox' },
    57                             { href: thickboxUrl(getConsoleUrl([val, 'reporting-testing'], true), 900), label: 'Report', class: 'thickbox', title:'Quick Report' },
     56                            { href: thickboxUrl(getConsoleUrl([val, 'web-actions'], true, true), 900), label: 'Web Actions', class: 'thickbox thickbox-conductrics' },
     57                            { href: thickboxUrl(getConsoleUrl([val, 'reporting-testing'], true), 900), label: 'Report', class: 'thickbox thickbox-conductrics', title:'Quick Report' },
    5858                            { href: getConsoleUrl([val, 'home']), label: 'Console', target: 'conductrics-console' }
    5959                        ]
     
    6666                    newItemLabel: '(add new agent)'
    6767                })
     68
     69                tb_position_shim()
    6870
    6971                if (callback) callback();
     
    9496    }
    9597
    96     getConsoleUrl = function(paths, embeddedstyle) {
    97         var url = [options.account.adminurl, options.account.owner].concat(paths).join('/');
     98    getConsoleUrl = function(paths, embeddedstyle, withLocation) {
     99        var url = [options.account.adminurl, options.account.owner].concat(paths).join('/') + '?';
    98100        if (embeddedstyle) {
    99             url += "?embeddedstyle=true";
     101            url += "&embeddedstyle=true";
     102        }
     103        if (withLocation && options.account.permalink && options.account.permalink.indexOf('http') == 0) {
     104            url += "&location=" + (options.account.permalink);
    100105        }
    101106        return url;
     
    117122            // Web actions were saved, close modal for that if we have one
    118123            closeThickbox();
     124        }
     125    }
     126
     127    // Hack/workaround for bug in WordPress - http://core.trac.wordpress.org/ticket/17249
     128    // See also http://binarybonsai.com/blog/using-thickbox-in-the-wordpress-admin
     129    var tb_position_original = null;
     130    tb_position_shim = function() {
     131        if (tb_position_original == null) {
     132            tb_position_original = window.tb_position;
     133            window.tb_position = tb_position_wrapper;
     134        }
     135    }
     136    tb_position_wrapper = function() {
     137        var ours = $('#TB_window > iframe').attr('src').indexOf(options.account.adminurl) == 0;
     138        if (!ours) {
     139            return tb_position_original(arguments);
     140        };
     141        // This is from the original Thickbox at http://thickbox.net/thickbox-code/thickbox.js
     142        $("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
     143        if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
     144            $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
    119145        }
    120146    }
  • conductrics-webactions/trunk/readme.txt

    r717846 r718074  
    6161== Changelog ==
    6262
     63= 0.2.7 =
     64* Larger space when setting up web actions for a page or post.
     65
    6366= 0.2.6 =
    6467* Display a hint in wp-admin when Conductrics Account info has not been provided.
     
    7073== Upgrade Notice ==
    7174
     75= 0.2.7 =
     76* This version gives you more space when setting up a test with web actions.
     77
    7278= 0.2.6 =
    7379* This version simplifies the intial setup process.
Note: See TracChangeset for help on using the changeset viewer.