Plugin Directory

Changeset 1443643


Ignore:
Timestamp:
06/26/2016 02:05:20 PM (10 years ago)
Author:
LabelBlanc
Message:

v1.1.1: code updated to allow Wordpress Translation service (text domain changed to the plugin's slug)

Location:
improved-save-button
Files:
40 added
3 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • improved-save-button/trunk/actions/class-lb-save-and-then-action-list.php

    r1267552 r1443643  
    22
    33/**
    4  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     4 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    55 *
    66 * This file is part of the "Improved Save Button"
     
    6868     */
    6969    function get_name() {
    70         return __('Save and List', 'lb-save-and-then');
     70        return __('Save and List', 'improved-save-button');
    7171    }
    7272   
     
    8282     */
    8383    function get_description() {
    84         return __('Shows the <strong>posts list</strong> after save.', 'lb-save-and-then');
     84        return __('Shows the <strong>posts list</strong> after save.', 'improved-save-button');
    8585    }
    8686   
     
    8989     */
    9090    function get_button_label_pattern( $post ) {
    91         return __('%s and List', 'lb-save-and-then');
     91        return __('%s and List', 'improved-save-button');
    9292    }
    9393
  • improved-save-button/trunk/actions/class-lb-save-and-then-action-new.php

    r1267552 r1443643  
    22
    33/**
    4  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     4 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    55 *
    66 * This file is part of the "Improved Save Button"
     
    3232     */
    3333    function get_name() {
    34         return __('Save and New', 'lb-save-and-then');
     34        return __('Save and New', 'improved-save-button');
    3535    }
    3636
     
    4646     */
    4747    function get_description() {
    48         return __('Shows the <strong>new post</strong> form after save.', 'lb-save-and-then');
     48        return __('Shows the <strong>new post</strong> form after save.', 'improved-save-button');
    4949    }
    5050
     
    5353     */
    5454    function get_button_label_pattern( $post ) {
    55         return __('%s and New', 'lb-save-and-then');
     55        return __('%s and New', 'improved-save-button');
    5656    }
    5757
  • improved-save-button/trunk/actions/class-lb-save-and-then-action-next.php

    r1267552 r1443643  
    22
    33/**
    4  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     4 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    55 *
    66 * This file is part of the "Improved Save Button"
     
    3434     */
    3535    function get_name() {
    36         return __('Save and Next', 'lb-save-and-then');
     36        return __('Save and Next', 'improved-save-button');
    3737    }
    3838
     
    4848     */
    4949    function get_description() {
    50         return __('Shows the <strong>next post</strong> edit form after save.', 'lb-save-and-then');
     50        return __('Shows the <strong>next post</strong> edit form after save.', 'improved-save-button');
    5151    }
    5252
     
    5555     */
    5656    function get_button_label_pattern( $post ) {
    57         return __('%s and Next', 'lb-save-and-then');
     57        return __('%s and Next', 'improved-save-button');
    5858    }
    5959
     
    8181    function get_button_title( $post ) {
    8282        if( ! $this->is_enabled( $post ) ) {
    83             return __('You are at the last post', 'lb-save-and-then');
     83            return __('You are at the last post', 'improved-save-button');
    8484        } else {
    8585            $next_post = LB_Save_And_Then_Utils::get_adjacent_post( $post, 'next' );
    86             return sprintf( __('Next post is "%s"', 'lb-save-and-then'), $next_post->post_title );
     86            return sprintf( __('Next post is "%s"', 'improved-save-button'), $next_post->post_title );
    8787        }
    8888    }
  • improved-save-button/trunk/actions/class-lb-save-and-then-action-previous.php

    r1267552 r1443643  
    22
    33/**
    4  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     4 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    55 *
    66 * This file is part of the "Improved Save Button"
     
    3434     */
    3535    function get_name() {
    36         return __('Save and Previous', 'lb-save-and-then');
     36        return __('Save and Previous', 'improved-save-button');
    3737    }
    3838
     
    4848     */
    4949    function get_description() {
    50         return __('Shows the <strong>previous post</strong> edit form after save.', 'lb-save-and-then');
     50        return __('Shows the <strong>previous post</strong> edit form after save.', 'improved-save-button');
    5151    }
    5252
     
    5555     */
    5656    function get_button_label_pattern( $post ) {
    57         return __('%s and Previous', 'lb-save-and-then');
     57        return __('%s and Previous', 'improved-save-button');
    5858    }
    5959
     
    8181    function get_button_title( $post ) {
    8282        if( ! $this->is_enabled( $post ) ) {
    83             return __('You are at the first post', 'lb-save-and-then');
     83            return __('You are at the first post', 'improved-save-button');
    8484        } else {
    8585            $previous_post = LB_Save_And_Then_Utils::get_adjacent_post( $post, 'previous' );
    86             return sprintf( __('Previous post is "%s"', 'lb-save-and-then'), $previous_post->post_title );
     86            return sprintf( __('Previous post is "%s"', 'improved-save-button'), $previous_post->post_title );
    8787        }
    8888    }
  • improved-save-button/trunk/actions/class-lb-save-and-then-action-view-popup.php

    r1267552 r1443643  
    22
    33/**
    4  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     4 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    55 *
    66 * This file is part of the "Improved Save Button"
     
    103103            popupWindow = window.open( '', '<?php echo $js_window_name; ?>' );
    104104            popupWindow.document.open();
    105             popupWindow.document.write("<?php _e('Please wait while the post is being saved. This window will refresh automatically.', 'lb-save-and-then'); ?>");
     105            popupWindow.document.write("<?php _e('Please wait while the post is being saved. This window will refresh automatically.', 'improved-save-button'); ?>");
    106106            popupWindow.document.close();
    107107        });
     
    119119     */     
    120120    function get_name() {
    121         return sprintf( __('Save and View %s (new window)', 'lb-save-and-then'), self::HTML_ICON );
     121        return sprintf( __('Save and View %s (new window)', 'improved-save-button'), self::HTML_ICON );
    122122    }
    123123
     
    133133     */
    134134    function get_description() {
    135         return __('Shows the <strong>post itself in a new window</strong> after save.', 'lb-save-and-then');
     135        return __('Shows the <strong>post itself in a new window</strong> after save.', 'improved-save-button');
    136136    }
    137137
     
    141141    function get_button_label_pattern( $post ) {
    142142        // The first %s must be escaped, because it is not replaced by this sprintf
    143         return sprintf( __('%%s and View %s', 'lb-save-and-then'), self::HTML_ICON );
     143        return sprintf( __('%%s and View %s', 'improved-save-button'), self::HTML_ICON );
    144144    }
    145145
     
    152152     */
    153153    function get_button_title( $post ) {
    154         return __('Post will be shown in a new window', 'lb-save-and-then');
     154        return __('Post will be shown in a new window', 'improved-save-button');
    155155    }
    156156
  • improved-save-button/trunk/actions/class-lb-save-and-then-action-view.php

    r1267552 r1443643  
    22
    33/**
    4  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     4 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    55 *
    66 * This file is part of the "Improved Save Button"
     
    3232     */
    3333    function get_name() {
    34         return __('Save and View', 'lb-save-and-then');
     34        return __('Save and View', 'improved-save-button');
    3535    }
    3636
     
    4646     */
    4747    function get_description() {
    48         return __('Shows the <strong>post itself</strong> after save. The same window is used.', 'lb-save-and-then');
     48        return __('Shows the <strong>post itself</strong> after save. The same window is used.', 'improved-save-button');
    4949    }
    5050
     
    5353     */
    5454    function get_button_label_pattern( $post ) {
    55         return __('%s and View', 'lb-save-and-then');
     55        return __('%s and View', 'improved-save-button');
    5656    }
    5757
     
    6464     */
    6565    function get_button_title( $post ) {
    66         return __('Post will be shown in this window', 'lb-save-and-then');
     66        return __('Post will be shown in this window', 'improved-save-button');
    6767    }
    6868
  • improved-save-button/trunk/improved-save-button.php

    r1267552 r1443643  
    44Description: Adds a new "Save" button to the Post Edit screen that saves the post and immediately redirects to one of the common screens: the Posts List, the New Post screen, the previous or next post's Edit screen or the post's frontend page.
    55Author: Label Blanc
    6 Version: 1.1
     6Version: 1.1.1
    77Author URI: http://www.labelblanc.ca
    88Domain Path: /languages/
    9 Text Domain: lb-save-and-then
     9Text Domain: improved-save-button
    1010*/
    1111
    1212/**
    13  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     13 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    1414 *
    1515 * This file is part of the "Improved Save Button"
  • improved-save-button/trunk/js/backward-compatibility/post-edit.pre-4.2.js

    r1150608 r1443643  
    11/**
    2  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     2 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    33 *
    44 * This file is part of the "Improved Save Button"
  • improved-save-button/trunk/js/post-edit.js

    r1267552 r1443643  
    11/**
    2  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     2 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    33 *
    44 * This file is part of the "Improved Save Button"
  • improved-save-button/trunk/js/post-edit.min.js

    r1267552 r1443643  
    11/* Generated from JavaScript source files. Do not modify directly. */
    2 window.LabelBlanc=window.LabelBlanc||{},window.LabelBlanc.SaveAndThen=window.LabelBlanc.SaveAndThen||{},function(a){var b=window.LabelBlanc.SaveAndThen;a(function(){var c=b.config,d=a("#post");c&&d.length&&new b.PostEditForm(d,c)}),b.PostEditForm=function(a,c){if(c.actions&&0!==c.actions.length){this.$form=a,this.config=c,this.action=null;var d=this.getDefaultAction();1!==c.actions.length||c.actions[0].enabled||(this.config.newButtonSetIsDummy=!0,d=c.actions[0]),this.$actionInput=this.createActionInput(),this.$originalPublishButton=this.getOriginalPublishButton(),this.newPublishButtonSet=new b.PublishButtonSet(this),this.$spinner=this.$form.find("#publishing-action .spinner"),this.setupForm(),this.setupOriginalPublishButton(),this.newPublishButtonSet.setAction(d),this.setupFormListeners(),this.setupWordpressListeners(),this.newPublishButtonSet.hideMenu(),this.insertNewPublishButtonSet(),this.setupSpinner(),this.config.newButtonSetIsDummy&&this.newPublishButtonSet.disable(!0)}},b.PostEditForm.LAST_USED_COOKIE_NAME="lb-sat-last-used-action",b.PostEditForm.prototype={getOriginalPublishButton:function(){return this.$form.find("#publish")},setupSpinner:function(){this.$spinner.addClass("lb-sat-spinner"),this.$originalPublishButton.before(this.$spinner)},insertNewPublishButtonSet:function(){var b=this.newPublishButtonSet.$container,c=a('<div class="lb-sat-separator"></div>');this.config.setAsDefault?this.$originalPublishButton.after(b).after(c):this.$originalPublishButton.before(b).before(c)},createActionInput:function(){return a('<input type="hidden" name="'+b.HTTP_PARAM_ACTION+'" />')},setupForm:function(){this.$form.prepend(this.$actionInput)},setupOriginalPublishButton:function(){this.config.setAsDefault&&!this.config.newButtonSetIsDummy&&this.$originalPublishButton.removeClass("button-primary").removeAttr("accesskey")},setAction:function(a){this.action=a,wpCookies.set(b.PostEditForm.LAST_USED_COOKIE_NAME,a.id,31536e3),this.$actionInput.val(a.id)},getAction:function(){return this.action},submit:function(){this.setAction(this.newPublishButtonSet.getAction());var b=a.Event("lb-save-and-then:submit");this.$form.trigger(b,this),b.isDefaultPrevented()||(this.$form.data("lbsat-button-submitted",!0),this.getOriginalPublishButton().click())},setupFormListeners:function(){var a=this;this.$form.on("submit.lbsat-post-edit",function(b){var c=a.$form.data("lbsat-button-submitted");a.$form.removeData("lbsat-button-submitted"),b.isDefaultPrevented()||c===!0&&a.newPublishButtonSet.$container.before(a.$spinner)})},getDefaultAction:function(){var c,d=this.config.defaultActionId,e=null;if(a.each(this.config.actions,function(a,b){return b.enabled?(c=b,!1):void 0}),!d)return c;if(b.ACTION_LAST_ID===d){var f=wpCookies.get(b.PostEditForm.LAST_USED_COOKIE_NAME);if(!f)return c;d=f}return e=this.getActionFromId(d),e&&e.enabled||(e=c),e},getActionFromId:function(b){var c=null;return a.each(this.config.actions,function(a,d){return d.id===b?(c=d,!1):void 0}),c},setupWordpressListeners:function(){var b=this;this.$form.on("click.lbsat-post-edit",":submit, a.submitdelete, #post-preview",function(){var c=a(this);c.hasClass("disabled")||c.hasClass("submitdelete")||c.is("#post-preview")||b.$form.one("submit.lbsat-post-edit",function(a){a.isDefaultPrevented()||b.newPublishButtonSet.disable(!0)})}),a(document).on("autosave-disable-buttons.edit-post",function(){b.newPublishButtonSet.disable(!0)}).on("autosave-enable-buttons.edit-post",function(){wp.heartbeat&&wp.heartbeat.hasConnectionError()||b.config.newButtonSetIsDummy||b.newPublishButtonSet.disable(!1)}),this.$form.on("click","#post-visibility-select .cancel-post-visibility,#post-visibility-select .save-post-visibility,#timestampdiv .cancel-timestamp,#timestampdiv .save-timestamp,#post-status-select .save-post-status,#post-status-select .cancel-post-status",function(){b.newPublishButtonSet.updateLabels()})}},b.PublishButtonSet=function(a){this.postEditForm=a,this.config=this.postEditForm.config,this.action=null,this.$mainButton=this.createMainButton(),this.$dropdownButton=this.createDropdownButton(),this.$dropdownMenu=this.createDropdownMenu(),this.$container=this.createContainer(),this.setupDocumentClickListener(),this.setupMainButtonListeners(),this.setupDropdownButtonListeners(),this.setupDropdownMenuListeners()},b.PublishButtonSet.prototype={createMainButton:function(){var b=a('<button type="button"/>');return b.attr("class","button button-large lb-sat-main-button"),this.config.setAsDefault&&!this.config.newButtonSetIsDummy?b.addClass("button-primary"):b.removeAttr("accesskey"),b},createDropdownButton:function(){var b=a('<input type="button" value="&#xf140;" />');return b.attr("class",this.$mainButton.attr("class")),b.removeClass("lb-sat-main-button").addClass("lb-sat-dropdown-button"),b},createDropdownMenu:function(){var b=a('<ul class="lb-sat-dropdown-menu"></ul>'),c=this;return a.each(this.config.actions,function(d,e){var f=a('<li data-lb-sat-value="'+e.id+'">'+c.generateButtonLabel(e.buttonLabelPattern)+"</li>");e.title&&f.attr("title",e.title),e.enabled?f.data("lbSatActionData",e):f.addClass("disabled"),b.append(f)}),b},createContainer:function(){var b=a('<span class="lb-sat-container"></span>');return b.append(this.$mainButton),this.config.actions.length>1&&b.addClass("lb-sat-with-dropdown").append(this.$dropdownButton).append(this.$dropdownMenu),this.config.setAsDefault&&b.addClass("lb-sat-set-as-default"),b},setupDocumentClickListener:function(){var b=this;a(document).click(function(){b.menuShown()&&b.hideMenu()})},setupMainButtonListeners:function(){var b=this;this.$mainButton.click(function(){a(this).hasClass("disabled")||b.config.newButtonSetIsDummy||b.postEditForm.submit()})},setupDropdownButtonListeners:function(){var a=this;this.$dropdownButton.click(function(b){a.menuShown()||(a.showMenu(),b.stopPropagation())})},setupDropdownMenuListeners:function(){var b=this;this.$dropdownMenu.on("click","li",function(){a(this).hasClass("disabled")||b.config.newButtonSetIsDummy||(b.setAction(a(this).data("lbSatActionData")),b.$mainButton.click())})},menuShown:function(){return this.$container.hasClass("lb-sat-dropdown-menu-shown")},showMenu:function(){this.$container.addClass("lb-sat-dropdown-menu-shown")},hideMenu:function(){this.$container.removeClass("lb-sat-dropdown-menu-shown")},setAction:function(a){this.action=a,this.updateLabels()},getAction:function(){return this.action},updateLabels:function(){var b=this;this.$mainButton.html(this.generateButtonLabel(this.action.buttonLabelPattern)),this.$mainButton.attr("title",this.action.title?this.action.title:""),a.each(this.config.actions,function(a,c){var d=b.$dropdownMenu.find('[data-lb-sat-value="'+c.id+'"]');d.html(b.generateButtonLabel(c.buttonLabelPattern))})},generateButtonLabel:function(a){return a.replace("%s",this.postEditForm.$originalPublishButton.val())},disable:function(a){this.$mainButton.toggleClass("disabled",a),this.$dropdownButton.toggleClass("disabled",a)}}}(jQuery);
     2window.LabelBlanc=window.LabelBlanc||{},window.LabelBlanc.SaveAndThen=window.LabelBlanc.SaveAndThen||{},function(a){var b=window.LabelBlanc.SaveAndThen;a(function(){var c=b.config,d=a("#post");c&&d.length&&new b.PostEditForm(d,c)}),b.PostEditForm=function(a,c){if(c.actions&&0!==c.actions.length){this.$form=a,this.config=c,this.action=null;var d=this.getDefaultAction();1!==c.actions.length||c.actions[0].enabled||(this.config.newButtonSetIsDummy=!0,d=c.actions[0]),this.$actionInput=this.createActionInput(),this.$originalPublishButton=this.getOriginalPublishButton(),this.newPublishButtonSet=new b.PublishButtonSet(this),this.$spinner=this.$form.find("#publishing-action .spinner"),this.setupForm(),this.setupOriginalPublishButton(),this.newPublishButtonSet.setAction(d),this.setupFormListeners(),this.setupWordpressListeners(),this.newPublishButtonSet.hideMenu(),this.insertNewPublishButtonSet(),this.setupSpinner(),this.config.newButtonSetIsDummy&&this.newPublishButtonSet.disable(!0)}},b.PostEditForm.LAST_USED_COOKIE_NAME="lb-sat-last-used-action",b.PostEditForm.prototype={getOriginalPublishButton:function(){return this.$form.find("#publish")},setupSpinner:function(){this.$spinner.addClass("lb-sat-spinner"),this.$originalPublishButton.before(this.$spinner)},insertNewPublishButtonSet:function(){var b=this.newPublishButtonSet.$container,c=a('<div class="lb-sat-separator"></div>');this.config.setAsDefault?this.$originalPublishButton.after(b).after(c):this.$originalPublishButton.before(b).before(c)},createActionInput:function(){return a('<input type="hidden" name="'+b.HTTP_PARAM_ACTION+'" />')},setupForm:function(){this.$form.prepend(this.$actionInput)},setupOriginalPublishButton:function(){this.config.setAsDefault&&!this.config.newButtonSetIsDummy&&this.$originalPublishButton.removeClass("button-primary").removeAttr("accesskey")},setAction:function(a){this.action=a,wpCookies.set(b.PostEditForm.LAST_USED_COOKIE_NAME,a.id,31536e3),this.$actionInput.val(a.id)},getAction:function(){return this.action},submit:function(){this.setAction(this.newPublishButtonSet.getAction());var b=a.Event("lb-save-and-then:submit");this.$form.trigger(b,this),b.isDefaultPrevented()||(this.$form.data("lbsat-button-submitted",!0),this.getOriginalPublishButton().click())},setupFormListeners:function(){var a=this;this.$form.on("submit.lbsat-post-edit",function(b){var c=a.$form.data("lbsat-button-submitted");a.$form.removeData("lbsat-button-submitted"),b.isDefaultPrevented()||c===!0&&a.newPublishButtonSet.$container.before(a.$spinner)})},getDefaultAction:function(){var c,d=this.config.defaultActionId,e=null;if(a.each(this.config.actions,function(a,b){return b.enabled?(c=b,!1):void 0}),!d)return c;if(b.ACTION_LAST_ID===d){var f=wpCookies.get(b.PostEditForm.LAST_USED_COOKIE_NAME);if(!f)return c;d=f}return e=this.getActionFromId(d),e&&e.enabled||(e=c),e},getActionFromId:function(b){var c=null;return a.each(this.config.actions,function(a,d){return d.id===b?(c=d,!1):void 0}),c},setupWordpressListeners:function(){var b=this;this.$form.on("click.lbsat-post-edit",":submit, a.submitdelete, #post-preview",function(c){var d=a(this);d.hasClass("disabled")||d.hasClass("submitdelete")||d.is("#post-preview")||b.$form.one("submit.lbsat-post-edit",function(a){a.isDefaultPrevented()||b.newPublishButtonSet.disable(!0)})}),a(document).on("autosave-disable-buttons.edit-post",function(){b.newPublishButtonSet.disable(!0)}).on("autosave-enable-buttons.edit-post",function(){wp.heartbeat&&wp.heartbeat.hasConnectionError()||b.config.newButtonSetIsDummy||b.newPublishButtonSet.disable(!1)}),this.$form.on("click","#post-visibility-select .cancel-post-visibility,#post-visibility-select .save-post-visibility,#timestampdiv .cancel-timestamp,#timestampdiv .save-timestamp,#post-status-select .save-post-status,#post-status-select .cancel-post-status",function(){b.newPublishButtonSet.updateLabels()})}},b.PublishButtonSet=function(a){this.postEditForm=a,this.config=this.postEditForm.config,this.action=null,this.$mainButton=this.createMainButton(),this.$dropdownButton=this.createDropdownButton(),this.$dropdownMenu=this.createDropdownMenu(),this.$container=this.createContainer(),this.setupDocumentClickListener(),this.setupMainButtonListeners(),this.setupDropdownButtonListeners(),this.setupDropdownMenuListeners()},b.PublishButtonSet.prototype={createMainButton:function(){var b=a('<button type="button"/>');return b.attr("class","button button-large lb-sat-main-button"),this.config.setAsDefault&&!this.config.newButtonSetIsDummy?b.addClass("button-primary"):b.removeAttr("accesskey"),b},createDropdownButton:function(){var b=a('<input type="button" value="&#xf140;" />');return b.attr("class",this.$mainButton.attr("class")),b.removeClass("lb-sat-main-button").addClass("lb-sat-dropdown-button"),b},createDropdownMenu:function(){var b=a('<ul class="lb-sat-dropdown-menu"></ul>'),c=this;return a.each(this.config.actions,function(d,e){var f=a('<li data-lb-sat-value="'+e.id+'">'+c.generateButtonLabel(e.buttonLabelPattern)+"</li>");e.title&&f.attr("title",e.title),e.enabled?f.data("lbSatActionData",e):f.addClass("disabled"),b.append(f)}),b},createContainer:function(){var b=a('<span class="lb-sat-container"></span>');return b.append(this.$mainButton),this.config.actions.length>1&&b.addClass("lb-sat-with-dropdown").append(this.$dropdownButton).append(this.$dropdownMenu),this.config.setAsDefault&&b.addClass("lb-sat-set-as-default"),b},setupDocumentClickListener:function(){var b=this;a(document).click(function(){b.menuShown()&&b.hideMenu()})},setupMainButtonListeners:function(){var b=this;this.$mainButton.click(function(){a(this).hasClass("disabled")||b.config.newButtonSetIsDummy||b.postEditForm.submit()})},setupDropdownButtonListeners:function(){var a=this;this.$dropdownButton.click(function(b){a.menuShown()||(a.showMenu(),b.stopPropagation())})},setupDropdownMenuListeners:function(){var b=this;this.$dropdownMenu.on("click","li",function(){a(this).hasClass("disabled")||b.config.newButtonSetIsDummy||(b.setAction(a(this).data("lbSatActionData")),b.$mainButton.click())})},menuShown:function(){return this.$container.hasClass("lb-sat-dropdown-menu-shown")},showMenu:function(){this.$container.addClass("lb-sat-dropdown-menu-shown")},hideMenu:function(){this.$container.removeClass("lb-sat-dropdown-menu-shown")},setAction:function(a){this.action=a,this.updateLabels()},getAction:function(){return this.action},updateLabels:function(){var b=this;this.$mainButton.html(this.generateButtonLabel(this.action.buttonLabelPattern)),this.$mainButton.attr("title",this.action.title?this.action.title:""),a.each(this.config.actions,function(a,c){var d=b.$dropdownMenu.find('[data-lb-sat-value="'+c.id+'"]');d.html(b.generateButtonLabel(c.buttonLabelPattern))})},generateButtonLabel:function(a){return a.replace("%s",this.postEditForm.$originalPublishButton.val())},disable:function(a){this.$mainButton.toggleClass("disabled",a),this.$dropdownButton.toggleClass("disabled",a)}}}(jQuery);
  • improved-save-button/trunk/js/settings-page.js

    r1267552 r1443643  
    11/**
    2  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     2 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    33 *
    44 * This file is part of the "Improved Save Button"
  • improved-save-button/trunk/lib/class-lb-save-and-then-action.php

    r1267552 r1443643  
    22
    33/**
    4  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     4 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    55 *
    66 * This file is part of the "Improved Save Button"
  • improved-save-button/trunk/lib/class-lb-save-and-then-actions.php

    r1267552 r1443643  
    22
    33/**
    4  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     4 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    55 *
    66 * This file is part of the "Improved Save Button"
  • improved-save-button/trunk/lib/class-lb-save-and-then-messages.php

    r1267552 r1443643  
    22
    33/**
    4  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     4 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    55 *
    66 * This file is part of the "Improved Save Button"
  • improved-save-button/trunk/lib/class-lb-save-and-then-post-edit.php

    r1267552 r1443643  
    22
    33/**
    4  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     4 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    55 *
    66 * This file is part of the "Improved Save Button"
  • improved-save-button/trunk/lib/class-lb-save-and-then-post-save.php

    r1267552 r1443643  
    22
    33/**
    4  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     4 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    55 *
    66 * This file is part of the "Improved Save Button"
  • improved-save-button/trunk/lib/class-lb-save-and-then-settings.php

    r1267552 r1443643  
    22
    33/**
    4  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     4 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    55 *
    66 * This file is part of the "Improved Save Button"
     
    109109        add_settings_field(
    110110            'lb-save-and-then-set-as-default',
    111             __('Display button as default', 'lb-save-and-then'),
     111            __('Display button as default', 'improved-save-button'),
    112112            array( get_called_class(), 'create_setting_field' ),
    113113            self::MENU_SLUG,
     
    118118        add_settings_field(
    119119            'lb-save-and-then-actions',
    120             __('Actions to show', 'lb-save-and-then'),
     120            __('Actions to show', 'improved-save-button'),
    121121            array( get_called_class(), 'create_setting_field' ),
    122122            self::MENU_SLUG,
     
    127127        add_settings_field(
    128128            'lb-save-and-then-default-action',
    129             __('Default action', 'lb-save-and-then'),
     129            __('Default action', 'improved-save-button'),
    130130            array( get_called_class(), 'create_setting_field' ),
    131131            self::MENU_SLUG,
     
    141141    static function create_administration_menu() {
    142142        add_options_page(
    143             sprintf( __('%s Settings', 'lb-save-and-then'), LB_Save_And_Then::get_localized_name() ),
    144             __('Improved Save Button', 'lb-save-and-then'),
     143            sprintf( __('%s Settings', 'improved-save-button'), LB_Save_And_Then::get_localized_name() ),
     144            __('Improved Save Button', 'improved-save-button'),
    145145            'manage_options',
    146146            self::MENU_SLUG,
     
    158158        ?>
    159159        <div class="wrap">
    160         <h1><?php printf( __('<em>%s</em> Settings', 'lb-save-and-then'), LB_Save_And_Then::get_localized_name() ); ?></h1>
     160        <h1><?php printf( __('<em>%s</em> Settings', 'improved-save-button'), LB_Save_And_Then::get_localized_name() ); ?></h1>
    161161        <form method="post" action="options.php" data-lb-sat-settings="form">
    162162            <?php settings_fields( self::OPTION_GROUP ); ?>
     
    188188            case 'set-as-default':
    189189                $html .= '<fieldset><label><input type="checkbox" name="' . $option_field_name. '" value="1"' . checked( 1, $option_value, false ) . '/>';
    190                 $html .= '<span>' . __('Display the new save button as the default one', 'lb-save-and-then') . '</span></label></fieldset>';
     190                $html .= '<span>' . __('Display the new save button as the default one', 'improved-save-button') . '</span></label></fieldset>';
    191191                break;
    192192
     
    225225
    226226                        $action_id = LB_Save_And_Then_Actions::ACTION_LAST;
    227                         $action_name = '<em>' . __('Last used', 'lb-save-and-then') . '</em>';
    228                         $action_description = __('The last action that was used', 'lb-save-and-then');
     227                        $action_name = '<em>' . __('Last used', 'improved-save-button') . '</em>';
     228                        $action_description = __('The last action that was used', 'improved-save-button');
    229229
    230230                    } else {
  • improved-save-button/trunk/lib/class-lb-save-and-then-utils.php

    r1267552 r1443643  
    22
    33/**
    4  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     4 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    55 *
    66 * This file is part of the "Improved Save Button"
  • improved-save-button/trunk/readme.txt

    r1443446 r1443643  
    44Requires at least: 3.5
    55Tested up to: 4.5.3
    6 Stable tag: 1.1
     6Stable tag: 1.1.1
    77License: GPLv3 or later
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5050== Changelog ==
    5151
     52= 1.1.1 =
     53Release Date: June 25, 2016
     54
     55* Misc: code updated to allow Wordpress Translation service (text domain changed to the plugin's slug)
     56
    5257= 1.1 =
    5358Release Date: October 17, 2015
  • improved-save-button/trunk/scss/post-edit.scss

    r1267552 r1443643  
    11/**
    2  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     2 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    33 *
    44 * This file is part of the "Improved Save Button"
  • improved-save-button/trunk/uninstall.php

    r1094802 r1443643  
    22
    33/**
    4  * Copyright 2015 Label Blanc (http://www.labelblanc.ca/)
     4 * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
    55 *
    66 * This file is part of the "Improved Save Button"
Note: See TracChangeset for help on using the changeset viewer.