Plugin Directory

Changeset 607180


Ignore:
Timestamp:
10/02/2012 08:39:48 PM (13 years ago)
Author:
bastb
Message:

Getting ready to release

Location:
lips/branches/dev-0.8.8
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • lips/branches/dev-0.8.8/css/lips.css

    r606720 r607180  
    9191.lips-static-element.key {
    9292    font-family: "Courier New", "Lucida Console";
     93    background-color: #CCC;
     94    padding-left: 10px;
    9395}
    9496
     
    9698    font-weight: bold;
    9799    color: black;
    98 }
    99 
    100 /* The lips-identified-never-synced thing is copied from
    101   http://www.sitepoint.com/pure-css3-speech-bubbles/
    102 */
    103 p.lips-identified-never-synced {
    104     position: absolute;
    105     right: 0;
    106     top: 0;
    107     width: 350px;
    108     height: 75px;
    109     text-align: center;
    110     padding: 1em;
    111     background-color: lightYellow;
    112     border: 2px solid #E6DB55;
    113     -webkit-border-radius: 10px;
    114     -moz-border-radius: 10px;
    115     border-radius: 10px;
    116     -webkit-box-shadow: 2px 2px 4px #888;
    117     -moz-box-shadow: 2px 2px 4px #888;
    118     box-shadow: 2px 2px 4px #888;
    119     z-index: 3;
    120 }
    121 
    122 #lips-speech-copy {
    123     display: none; 
    124100}
    125101
     
    138114}
    139115
     116.lips-required-key {
     117    font-weight: bold;
     118}
     119
    140120.lips-required-key:after {
    141121    content: "  *";
     
    145125    z-index: 0;
    146126}
    147 
    148 tr:nth-child(odd) {
    149     background-color: #DFDFDF;
    150     font-weight: bold;
    151 }
  • lips/branches/dev-0.8.8/js/lips.dev.js

    r606706 r607180  
    358358        }
    359359        else {
    360             // This profile_source0 option exists only when a profile is stored.
    361             //
     360            // This profile_source0 option exists only when a profile is stored,
     361            // in which case there is a selection to be made.
    362362            var download_profile = true;
    363363            if (jQuery("#profile_source0").length > 0) {
     
    365365            }
    366366           
    367             if (download_profile) {
     367            if ("t" == oauth_initialized && download_profile) {
    368368                jQuery("#lips-saving").css('visibility', 'visible');
    369369                jQuery("#lips-reset-button").attr('disabled', true);           
  • lips/branches/dev-0.8.8/js/lips.js

    r580635 r607180  
    1 jQuery(document).ready(function(a){var k=a(".wrap h3").wrap('<div class="ui-tabs-panel">');k.each(function(){a(this).parent().append(a(this).parent().nextUntil("div.ui-tabs-panel"))});a(".ui-tabs-panel").each(function(b){a(this).attr("id",sections[a(this).children("h3").text()]);b>0&&a(this).addClass("ui-tabs-hide")});a(".ui-tabs").tabs({fx:{opacity:"toggle",duration:"fast"}});a("input[type=text], textarea").each(function(){(a(this).val()==a(this).attr("placeholder")||a(this).val()=="")&&a(this).css("color","#999")});a("input[type=text], textarea").focus(function(){if(a(this).val()==a(this).attr("placeholder")||a(this).val()==""){a(this).val("");a(this).css("color","#000")}}).blur(function(){if(a(this).val()==""||a(this).val()==a(this).attr("placeholder")){a(this).val(a(this).attr("placeholder"));a(this).css("color","#999")}});var f=[];jQuery("#profile_lang").find("option").each(function(b,a){f.push(a)});errors!=null&&a.each(errors,function(d,b){var c=a("<div id='"+d+"' />").html(b[1]).appendTo("body");c.dialog({dialogClass:"wp-dialog",modal:true,autoOpen:false,closeOnEscape:true,title:b[0],buttons:[{text:"Close",click:function(){a(this).dialog("close")}}]}).dialog("open")});jQuery("#update_profile").change(function(){visibility="none";if(a(this).is(":checked"))visibility="block";jQuery(".update_profile").css("display",visibility)}).change();jQuery("#stackexchange_site").change(function(){if(jQuery("#stackexchange_site").val()==no_service)jQuery("#stackexchange_login").attr("disabled",true);else jQuery("#stackexchange_login").removeAttr("disabled")}).change();jQuery("#profile_source0, #profile_source1").change(function(){var b=jQuery("#profile_lang").empty();if(a(this).val()=="li_profile"){jQuery("#keep_local_copy").removeAttr("disabled");jQuery.each(f,function(c,a){b.append(a)})}else{jQuery("#keep_local_copy").attr("disabled","disabled");jQuery.each(language_specific,function(d,c){b.append(a("<option></option>").attr("value",d).text(c))})}});jQuery("#installed_page_template").change(function(){meta_id=this.id+"-meta";meta_text="";id=jQuery("#installed_page_template :selected").val();if(a(this).val()=="custom"){jQuery(".custom_page_template").css("display","block");jQuery(".statics_container").css("display","none")}else{jQuery("#statics-description").html(statics.replace("%tpl",jQuery("#installed_page_template :selected").text()));meta_text='<a class="lips-ext-ref" href="'+sample_links[a(this).val()]+'" target="lips_review">'+sample_link_text+"</a>";jQuery(".custom_page_template, .lips-static").css("display","none");jQuery(".statics_container").css("display","block");jQuery(".statics_container, .lips-static."+id).css("display","block");visibility="block";if(0==jQuery(".lips-static."+id).length)visibility="none";jQuery(".statics_container").css("display",visibility)}jQuery("#"+meta_id).html(meta_text)}).change();jQuery("#have_posts").change(function(){if(a(this).is(":checked")){jQuery(".has_posts").css("display","block");e()}else jQuery(".has_posts").css("display","none")}).change();jQuery("#post_template0, #post_template1, #post_template2").change(function(){jQuery.each([".post_use_installed_template",".custom_post_template"],function(b,a){jQuery(a).css("display","none")});if(jQuery(".has_posts").css("display")=="block")if(this.id=="post_template1"&&a(this).is(":checked"))jQuery(".custom_post_template").css("display","block");else this.id=="post_template2"&&a(this).is(":checked")&&jQuery(".post_use_installed_template").css("display","block")});jQuery("#enable_profile_data_debug").change(function(){visibility="none";if(a(this).is(":checked")){visibility="block";jQuery("#profile_debug_data_page").val()==jQuery("#profile_page").val()&&c(jQuery("#profile_page option:selected").text())}jQuery(".has_profile_debug").css("display",visibility)}).change();function e(){jQuery.each([0,1,2],function(a){element_id="#post_template"+a;jQuery(element_id).is(":checked")&&jQuery(element_id).change()})}function b(){jQuery("#keep_local_copy").removeAttr("disabled");jQuery("#lips-form").submit()}function h(){jQuery("#save").attr("disabled",false);jQuery("#lips-saving").css("visibility","hidden")}function j(){jQuery("#lips-err-detail").removeClass("lips-err-monospace");jQuery("#lips-err-detail").text("Timeout");jQuery("#lips-err-box").dialog("open",title,"Problem contacting LinkedIn&reg;")}function d(a,b){sep_pos=a.indexOf(":");if(sep_pos>-1&&"0"==a.substring(0,sep_pos))b();else{jQuery("#lips-err-text").html("WordPress&trade; was unable to create the page.");jQuery("#lips-err-additional-detail").html("");jQuery("#lips-err-box").dialog({title:"Unable to create page"});if(-1==sep_pos)jQuery("#lips-err-detail").html("Unexpected result: <code>"+a+"</code>");else jQuery("#lips-err-detail").html(a.substring(sep_pos+1));jQuery("#lips-err-box").dialog("open")}}function i(a){sep_pos=a.indexOf(":");if(-1==sep_pos){jQuery("#lips-err-detail").html("Unexpected result: <code>"+a+"</code>");jQuery("#lips-err-box").dialog("open")}else if(a.substring(0,sep_pos)=="0"){jQuery("#pin").val("");jQuery("#oalink").html(a.substring(sep_pos+1));jQuery("#lips-pin-box").dialog("open");jQuery("#pin").focus();setTimeout(function(){jQuery("#lips-pin-box").dialog("close")},3e5)}else{jQuery("#lips-err-detail").addClass("lips-err-monospace");jQuery("#lips-err-detail").text(a.substring(sep_pos+1));jQuery("#lips-err-box").dialog("open")}jQuery("#lips-reset-button").attr("disabled",false)}jQuery("#lips-pin-box").dialog({dialogClass:"wp-dialog",autoOpen:false,height:300,width:400,modal:true,closeOnEscape:true,title:"Authorization required",buttons:[{text:"Fetch",click:function(){if(jQuery("#pin").val().length>0){a(this).dialog("close");g();jQuery("#lips-form").append(jQuery("#pin"));jQuery("#pin").css("visibility","hidden");b()}}},{text:"Cancel",click:function(){a(this).dialog("close")}}],close:function(){jQuery("#lips-saving").css("visibility","hidden");jQuery("#save").attr("disabled",false)}});jQuery("#lips-err-box").dialog({dialogClass:"wp-dialog",title:"Problem contacting LinkedIn&reg;",autoOpen:false,height:220,width:400,modal:true,closeOnEscape:true,buttons:[{text:"Close",click:function(){a(this).dialog("close")}}],close:function(){h()}});jQuery("#lips-page-box").dialog({dialogClass:"wp-dialog",autoOpen:false,height:220,width:400,modal:true,closeOnEscape:true,title:"Create a new page",buttons:[{text:"Create",click:function(){if(jQuery("#lips-page").val().length>0){jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"lips",request:"create_page","page-usage":jQuery("#lips-page").data("page-usage"),specific:jQuery("#lips-page").val()},timeout:1e4,success:function(a){d(a,function(){window.location.reload(true)})},error:function(b,a){"timeout"==a&&d("1:Timeout while trying to create a page")}});a(this).dialog("close")}else jQuery("#lips-page").focus()}},{text:"Cancel",click:function(){a(this).dialog("close")}}],close:function(){}});jQuery("#save").click(function(){if(jQuery("#update_profile").is(":checked"))if(jQuery("#profile_page").val()==no_page_selection.page){jQuery("#lips-err-text").html("You did not select a profile page yet.");jQuery("#lips-err-additional-detail").html("You can select a Profile Page through the <em>Page Settings</em> tab. It's the first option.");jQuery("#lips-err-box").dialog({title:"Unable to save profile"});jQuery("#lips-err-box").dialog("open")}else if(jQuery("#enable_profile_data_debug").is(":checked")&&jQuery("#profile_debug_data_page").val()==no_page_selection.dbg){jQuery("#lips-err-text").html("You enabled the <em>Debug Data On-a-Page</em> option, but you did not select a page to store your debug profile on.");jQuery("#lips-err-additional-detail").html("Select a <em>Debug Data On-a-Page Title</em> from the <em>Development Setting</em> tab or disable the <em>Debug Data On-a-Page</em> option.");jQuery("#lips-err-box").dialog({title:"Unable to save profile"});jQuery("#lips-err-box").dialog("open")}else if(jQuery("#profile_source0").is(":checked")){jQuery("#lips-saving").css("visibility","visible");jQuery("#lips-reset-button").attr("disabled",true);a(this).attr("disabled",true);jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"lips",request:"oalink"},timeout:1e4,success:function(a){i(a)},error:function(b,a){"timeout"==a&&j()}})}else b();else b()});function c(b){var c=a("<div id='lips-duplicate-page-use' />").html(dialog.duplicate.body+"<strong>"+b+"</strong>").appendTo("body");c.dialog({dialogClass:"wp-dialog",modal:true,autoOpen:false,closeOnEscape:true,title:dialog.duplicate.title,buttons:[{text:"Close",click:function(){a(this).dialog("close")}}]}).dialog("open")}function g(){var b=a("<div id='lips-submitting' />").html(dialog.submit.body).appendTo("body");b.dialog({dialogClass:"wp-dialog",modal:true,autoOpen:false,closeOnEscape:false,title:dialog.submit.title,open:function(){a(".ui-dialog-titlebar-close",this.parentNode).hide()}}).dialog("open")}jQuery("#profile_debug_data_page, #profile_page").change(function(){page=a("option:selected",this).text();if(jQuery("#enable_profile_data_debug").is(":checked")&&jQuery("#profile_debug_data_page").val()==jQuery("#profile_page").val()){c(page);if(a(this).data("previous_page")!=""){a(this).val(a(this).data("previous_page"));a(this).change()}}a(this).data("previous_page",a(this).val())});jQuery("#lips-about").click(function(){cur=a(".lips-help").css("display");req="block";if("block"==cur)req="none";a(".lips-help").css("display",req)});jQuery("#lips-close").click(function(){a(this).parent().css("display","none")});a(".wrap h3, .wrap table").show();jQuery("a.lips-tab-section").click(function(){if(a(this).attr("href")=="#li")jQuery("#lips-reset-button").show();else jQuery("#lips-reset-button").hide()});a(".warning").change(function(){if(a(this).is(":checked"))a(this).parent().css("background","#c00").css("color","#fff").css("fontWeight","bold");else a(this).parent().css("background","none").css("color","inherit").css("fontWeight","normal")});a(".lips-with-meta").each(function(b,a){jQuery("#"+a.id).change()});jQuery("#profile_source1").is(":checked")&&jQuery("#profile_source1").change();update_profile_class=jQuery("#update_profile").attr("class");update_profile_class!==undefined&&update_profile_class.indexOf("lips-identified-never-synced")>-1&&jQuery("#lips-speech-copy").css("display","block");if(autorun!=null)autorun=="autoCreatePageTask"&&handleRelates("lips-page-box");a.browser.mozilla&&a("form").attr("autocomplete","off");e()});function handleRelates(a){display_box=true;if("lips-profile-page-box"==a)jQuery("#lips-page").data("page-usage",page_usage.rt);else if("lips-debug-page-box"==a)jQuery("#lips-page").data("page-usage",page_usage.dev);else display_box=false;if(true==display_box){jQuery("#lips-page").val("");jQuery("#lips-page-box").dialog("open")}}
     1jQuery(document).ready(function(a){var k=a(".wrap h3").wrap('<div class="ui-tabs-panel">');k.each(function(){a(this).parent().append(a(this).parent().nextUntil("div.ui-tabs-panel"))});a(".ui-tabs-panel").each(function(b){a(this).attr("id",sections[a(this).children("h3").text()]);b>0&&a(this).addClass("ui-tabs-hide")});a(".ui-tabs").tabs({fx:{opacity:"toggle",duration:"fast"}});a("input[type=text], textarea").each(function(){(a(this).val()==a(this).attr("placeholder")||a(this).val()=="")&&a(this).css("color","#999")});a("input[type=text], textarea").focus(function(){if(a(this).val()==a(this).attr("placeholder")||a(this).val()==""){a(this).val("");a(this).css("color","#000")}}).blur(function(){if(a(this).val()==""||a(this).val()==a(this).attr("placeholder")){a(this).val(a(this).attr("placeholder"));a(this).css("color","#999")}});var e=[];jQuery("#profile_lang").find("option").each(function(b,a){e.push(a)});errors!=null&&a.each(errors,function(d,b){var c=a("<div id='"+d+"' />").html(b[1]).appendTo("body");c.dialog({dialogClass:"wp-dialog",modal:true,autoOpen:false,closeOnEscape:true,title:b[0],buttons:[{text:"Close",click:function(){a(this).dialog("close")}}]}).dialog("open")});jQuery("#update_profile").change(function(){visibility="none";if(a(this).is(":checked"))visibility="block";jQuery(".update_profile").css("display",visibility)}).change();jQuery("#stackexchange_site").change(function(){if(jQuery("#stackexchange_site").val()==no_service)jQuery("#stackexchange_login").attr("disabled",true);else jQuery("#stackexchange_login").removeAttr("disabled")}).change();jQuery("#profile_source0, #profile_source1").change(function(){var b=jQuery("#profile_lang").empty();if(a(this).val()=="li_profile"){jQuery("#keep_local_copy").removeAttr("disabled");jQuery.each(e,function(c,a){b.append(a)})}else{jQuery("#keep_local_copy").attr("disabled","disabled");jQuery.each(language_specific,function(d,c){b.append(a("<option></option>").attr("value",d).text(c))})}});jQuery("#installed_page_template").change(function(){meta_id=this.id+"-meta";meta_text="";id=jQuery("#installed_page_template :selected").val();if(a(this).val()=="custom"){jQuery(".custom_page_template").css("display","block");jQuery(".statics_container").css("display","none")}else{jQuery("#statics-description").html(statics.replace("%tpl",jQuery("#installed_page_template :selected").text()));meta_text='<a class="lips-ext-ref" href="'+sample_links[a(this).val()]+'" target="lips_review">'+sample_link_text+"</a>";jQuery(".custom_page_template, .lips-static").css("display","none");jQuery(".statics_container").css("display","block");jQuery(".statics_container, .lips-static."+id).css("display","block");visibility="block";if(0==jQuery(".lips-static."+id).length)visibility="none";jQuery(".statics_container").css("display",visibility)}jQuery("#"+meta_id).html(meta_text)}).change();jQuery("#have_posts").change(function(){if(a(this).is(":checked")){jQuery(".has_posts").css("display","block");d()}else jQuery(".has_posts").css("display","none")}).change();jQuery("#page_template0, #page_template1").change(function(){jQuery.each([".page_use_installed_template",".custom_page_template"],function(b,a){jQuery(a).css("display","none")});if(this.id=="page_template1"&&a(this).is(":checked"))jQuery(".custom_page_template").css("display","block");else this.id=="page_template0"&&a(this).is(":checked")&&jQuery(".page_use_installed_template").css("display","inline")});jQuery("#post_template0, #post_template1, #post_template2").change(function(){jQuery.each([".post_use_installed_template",".custom_post_template"],function(b,a){jQuery(a).css("display","none")});if(jQuery(".has_posts").css("display")=="block")if(this.id=="post_template1"&&a(this).is(":checked"))jQuery(".custom_post_template").css("display","block");else this.id=="post_template2"&&a(this).is(":checked")&&jQuery(".post_use_installed_template").css("display","block")});jQuery("#enable_profile_data_debug").change(function(){visibility="none";if(a(this).is(":checked")){visibility="block";jQuery("#profile_debug_data_page").val()==jQuery("#profile_page").val()&&b(jQuery("#profile_page option:selected").text())}jQuery(".has_profile_debug").css("display",visibility)}).change();function d(){jQuery.each([0,1,2],function(a){element_id="#post_template"+a;jQuery(element_id).is(":checked")&&jQuery(element_id).change()})}function f(){jQuery("#keep_local_copy").removeAttr("disabled");jQuery("#lips-form").submit()}function h(){jQuery("#save").attr("disabled",false);jQuery("#lips-saving").css("visibility","hidden")}function j(){jQuery("#lips-err-detail").removeClass("lips-err-monospace");jQuery("#lips-err-detail").text("Timeout");jQuery("#lips-err-box").dialog("open",title,"Problem contacting LinkedIn&reg;")}function c(a,b){sep_pos=a.indexOf(":");if(sep_pos>-1&&"0"==a.substring(0,sep_pos))b();else{jQuery("#lips-err-text").html("WordPress&trade; was unable to create the page.");jQuery("#lips-err-additional-detail").html("");jQuery("#lips-err-box").dialog({title:"Unable to create page"});if(-1==sep_pos)jQuery("#lips-err-detail").html("Unexpected result: <code>"+a+"</code>");else jQuery("#lips-err-detail").html(a.substring(sep_pos+1));jQuery("#lips-err-box").dialog("open")}}function i(a){sep_pos=a.indexOf(":");if(-1==sep_pos){jQuery("#lips-err-detail").html("Unexpected result: <code>"+a+"</code>");jQuery("#lips-err-box").dialog("open")}else if(a.substring(0,sep_pos)=="0"){jQuery("#pin").val("");jQuery("#oalink").html(a.substring(sep_pos+1));jQuery("#lips-pin-box").dialog("open");jQuery("#pin").focus();setTimeout(function(){jQuery("#lips-pin-box").dialog("close")},3e5)}else{jQuery("#lips-err-detail").addClass("lips-err-monospace");jQuery("#lips-err-detail").text(a.substring(sep_pos+1));jQuery("#lips-err-box").dialog("open")}jQuery("#lips-reset-button").attr("disabled",false)}jQuery("#lips-pin-box").dialog({dialogClass:"wp-dialog",autoOpen:false,height:300,width:400,modal:true,closeOnEscape:true,title:"Authorization required",buttons:[{text:"Fetch",click:function(){if(jQuery("#pin").val().length>0){a(this).dialog("close");g();jQuery("#lips-form").append(jQuery("#pin"));jQuery("#pin").css("visibility","hidden");f()}}},{text:"Cancel",click:function(){a(this).dialog("close")}}],close:function(){jQuery("#lips-saving").css("visibility","hidden");jQuery("#save").attr("disabled",false)}});jQuery("#lips-err-box").dialog({dialogClass:"wp-dialog",title:"Problem contacting LinkedIn&reg;",autoOpen:false,height:220,width:400,modal:true,closeOnEscape:true,buttons:[{text:"Close",click:function(){a(this).dialog("close")}}],close:function(){h()}});jQuery("#lips-page-box").dialog({dialogClass:"wp-dialog",autoOpen:false,height:220,width:400,modal:true,closeOnEscape:true,title:"Create a new page",buttons:[{text:"Create",click:function(){if(jQuery("#lips-page").val().length>0){jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"lips",request:"create_page","page-usage":jQuery("#lips-page").data("page-usage"),specific:jQuery("#lips-page").val()},timeout:1e4,success:function(a){c(a,function(){window.location.reload(true)})},error:function(b,a){"timeout"==a&&c("1:Timeout while trying to create a page")}});a(this).dialog("close")}else jQuery("#lips-page").focus()}},{text:"Cancel",click:function(){a(this).dialog("close")}}],close:function(){}});jQuery("#save").click(function(){if(jQuery("#profile_page").val()==no_page_selection.page){jQuery("#lips-err-text").html("You did not select a profile page yet.");jQuery("#lips-err-additional-detail").html("Select a Profile Page on the <em>LinkedIn Data Access and Profile Synchronization</em> tab. It's the first option.");jQuery("#lips-err-box").dialog({title:"Unable to save profile"});jQuery("#lips-err-box").dialog("open")}else if(jQuery("#enable_profile_data_debug").is(":checked")&&jQuery("#profile_debug_data_page").val()==no_page_selection.dbg){jQuery("#lips-err-text").html("You enabled the <em>Debug Data On-a-Page</em> option, but you did not select a page to store your debug profile on.");jQuery("#lips-err-additional-detail").html("Select a <em>Debug Data On-a-Page Title</em> from the <em>Development Setting</em> tab or disable the <em>Debug Data On-a-Page</em> option.");jQuery("#lips-err-box").dialog({title:"Unable to save profile"});jQuery("#lips-err-box").dialog("open")}else{var b=true;if(jQuery("#profile_source0").length>0)b=jQuery("#profile_source0").is(":checked");if("t"==oauth_initialized&&b){jQuery("#lips-saving").css("visibility","visible");jQuery("#lips-reset-button").attr("disabled",true);a(this).attr("disabled",true);jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"lips",request:"oalink"},timeout:1e4,success:function(a){i(a)},error:function(b,a){"timeout"==a&&j()}})}else f()}});function b(b){var c=a("<div id='lips-duplicate-page-use' />").html(dialog.duplicate.body+"<strong>"+b+"</strong>").appendTo("body");c.dialog({dialogClass:"wp-dialog",modal:true,autoOpen:false,closeOnEscape:true,title:dialog.duplicate.title,buttons:[{text:"Close",click:function(){a(this).dialog("close")}}]}).dialog("open")}function g(){var b=a("<div id='lips-submitting' />").html(dialog.submit.body).appendTo("body");b.dialog({dialogClass:"wp-dialog",modal:true,autoOpen:false,closeOnEscape:false,title:dialog.submit.title,open:function(){a(".ui-dialog-titlebar-close",this.parentNode).hide()}}).dialog("open")}jQuery("#profile_debug_data_page, #profile_page").change(function(){page=a("option:selected",this).text();if(jQuery("#enable_profile_data_debug").is(":checked")&&jQuery("#profile_debug_data_page").val()==jQuery("#profile_page").val()){b(page);if(a(this).data("previous_page")!=""){a(this).val(a(this).data("previous_page"));a(this).change()}}a(this).data("previous_page",a(this).val())});jQuery("#lips-about").click(function(){cur=a(".lips-help").css("display");req="block";if("block"==cur)req="none";a(".lips-help").css("display",req)});jQuery("#lips-close").click(function(){a(this).parent().css("display","none")});a(".wrap h3, .wrap table").show();jQuery("a.lips-tab-section").click(function(){if(a(this).attr("href")=="#li")jQuery("#lips-reset-button").show();else jQuery("#lips-reset-button").hide()});a(".warning").change(function(){if(a(this).is(":checked"))a(this).parent().css("background","#c00").css("color","#fff").css("fontWeight","bold");else a(this).parent().css("background","none").css("color","inherit").css("fontWeight","normal")});a(".lips-with-meta").each(function(b,a){jQuery("#"+a.id).change()});jQuery("#profile_source1").is(":checked")&&jQuery("#profile_source1").change();update_profile_class=jQuery("#update_profile").attr("class");update_profile_class!==undefined&&update_profile_class.indexOf("lips-identified-never-synced")>-1&&jQuery("#lips-speech-copy").css("display","block");if(autorun!=null)autorun=="autoCreatePageTask"&&handleRelates("lips-page-box");a.browser.mozilla&&a("form").attr("autocomplete","off");d()});function handleRelates(a){display_box=true;if("lips-profile-page-box"==a)jQuery("#lips-page").data("page-usage",page_usage.rt);else if("lips-debug-page-box"==a)jQuery("#lips-page").data("page-usage",page_usage.dev);else display_box=false;if(true==display_box){jQuery("#lips-page").val("");jQuery("#lips-page-box").dialog("open")}}
  • lips/branches/dev-0.8.8/lips.php

    r606720 r607180  
    110110    // uploading message
    111111    protected $jquery_uploading;
     112    // has an OAuth token already. Needed for the Save button to function correctly
     113    protected $jquery_oauth_initialized = false;
    112114    // currently logged on wp user
    113115    protected $current_user;
     
    534536     */
    535537    public function display_section($section) {
    536         $section_description['li'] = __("Basic plugin configuration is done is this section.");
     538        $section_description['li'] = __("Use this section to configure basic settings. The plugin is ready for use when you completed the configuration in this section.");
    537539        $section_description['pot'] = __("LiPS can maintain posts too. Once enabled, these posts will not be shown with the other posts, but instead you can link to them from your profile page.<p>You can provide categories for posts being maintained by this plugin and you can provide the template to use handling position details. There's a template for the title and one for the content.</p>");
    538540        $section_description['dev'] = __("Functions supporting development are found in this section. You can make the template be more verbose and you can make the plugin keep a copy of the profile data.<p>The Debug Data On-a-Page function should only be enabled when you want to create or modify page, post or post-title templates because it'll allow you to take a look at the gathered data.</p>");
     
    773775        try {
    774776            $oauth = LinkedInProfileSyncOAuth::fromTokenStore($this->tokenstore, false);
    775             $never_synced_class = "lips-identified-never-synced";
    776             $update_option_class = $this->has_fetched_profile ? "" : $never_synced_class;
     777            $this->jquery_oauth_initialized = true;
    777778
    778779            $this->settings['profile_page'] = array(
     
    847848            }
    848849   
    849 //          $available_templates['custom'] = __('Create your own template');
    850    
    851             // 'previous'=> array_key_exists('create_new_page', $this->settings) ? 'create_new_page' : 'profile_page',
    852850            $this->settings['installed_page_template'] = array(
    853851                'title'   => __( 'Installed Page Templates' ),
     
    873871                'depends' => 'custom_page_template',
    874872                'class'   => 'custom_page_template',
     873                'required' => true,
    875874            );
    876875
     
    13671366        wp_localize_script('lips', 'no_page_selection', $this->jquery_no_page_selected);
    13681367        wp_localize_script('lips', 'no_service', $this->jquery_service_type);
     1368        wp_localize_script('lips', 'oauth_initialized', $this->jquery_oauth_initialized ? "t" : "f");
    13691369        wp_localize_script('lips', 'dialog', array(
    13701370                "duplicate" => array("title" => __("Duplicate Page Use"), "body" => __("<p>You cannot use this page for both <em>Debug Data On-a-Page Title</em> and <em>Profile Page</em> purposes. Change the page.</p>")),
     
    14061406        }
    14071407
     1408        if (! isset($validated["profile_source"])) {
     1409            $validated["profile_source"] = 'li_profile';           
     1410        }
     1411
    14081412        $id = $this->tokenstore->getIdentificationToken();
    1409         error_log(serialize($id));
    14101413        $do_profile_update = null != $id;
    14111414   
     
    14431446        $this->handlePreTemplateCleanup();
    14441447       
    1445         // Update profile is default when the plugin was authorized
    1446 //      $do_profile_update = array_key_exists('update_profile', $input) && 1 == $input['update_profile'];
    1447        
    14481448        if ($do_profile_update) {
    14491449            if ($validated["profile_page"] == $this->jquery_no_page_selected["page"]) {
     
    15351535            $this->validated_settings = $validated;
    15361536            $this->performProfileUpdate();
    1537             $oauth = LinkedInProfileSyncOAuth::fromTokenStore($this->tokenstore, false);           
    1538             $oauth->revoke();
     1537            if ('li_profile' == $validated["profile_source"]) {
     1538                $oauth = LinkedInProfileSyncOAuth::fromTokenStore($this->tokenstore, false);           
     1539                $oauth->revoke();
     1540            }
    15391541        }
    15401542       
  • lips/branches/dev-0.8.8/readme.txt

    r606642 r607180  
    4646== Screenshots ==
    4747
    48 1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from
    49 the directory of the stable readme.txt, so in this case, `/tags/4.3/screenshot-1.png` (or jpg, jpeg, gif)
    50 2. This is the second screen shot
     481. The page being shown when the plugin has not been configured yet. 
     492. The page being shown when the OAuth token and secret have been provided.
     503. The Authentication dialog box, shown right before downloading the LinkedIn&reg; profile.
    5151
    5252== Changelog ==
    5353= 0.8.8 =
    54 * Removed the PECL OAuth dependency, included the API from http://code.google.com/p/oauth-php/
     54* Removed the PECL OAuth dependency, included the OAuth API found on http://code.google.com/p/oauth-php/.
     55* Changed the main plugin page, allowing basic configuration from the first tab.
    5556= 0.8.7 =
    5657* Fixed an error message raised on PHP 5.4. Reported by Martin Mayer.
     
    8182 * verify whatever a template generates -> the page template must start with a &lt;h1> or
    8283  &lt;div>, same for a post.
    83  * use the other OAuth library, so the limiting PECL extension is not needed anymore.
    8484 * allow a user to remove languages, thus shortening the language list.
    8585 * optimize the jQuery code. It's a bit bloated and contains different styles at once.
Note: See TracChangeset for help on using the changeset viewer.