mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Fix for save and publish buttons shrinking
This commit is contained in:
parent
ac62b732a4
commit
e2b7ca2e79
6
client/dist/js/bundle.js
vendored
6
client/dist/js/bundle.js
vendored
@ -68,10 +68,10 @@ var n=this.parents("form:first"),a=n.find(":input[name=Version]").val(),i="",s=t
|
|||||||
return i=r.default.sprintf(r.default._t(s?"CMS.RestoreToRoot":"CMS.Restore"),a),!!confirm(i)&&this._super(e)}}),t(".cms-edit-form .btn-toolbar #Form_EditForm_action_unpublish").entwine({onclick:function t(e){
|
return i=r.default.sprintf(r.default._t(s?"CMS.RestoreToRoot":"CMS.Restore"),a),!!confirm(i)&&this._super(e)}}),t(".cms-edit-form .btn-toolbar #Form_EditForm_action_unpublish").entwine({onclick:function t(e){
|
||||||
var n=this.parents("form:first"),a=n.find(":input[name=Version]").val(),i=""
|
var n=this.parents("form:first"),a=n.find(":input[name=Version]").val(),i=""
|
||||||
return i=r.default.sprintf(r.default._t("CMS.Unpublish"),a),!!confirm(i)&&this._super(e)}}),t(".cms-edit-form.changed").entwine({onmatch:function t(e){var n=this.find("button[name=action_save]")
|
return i=r.default.sprintf(r.default._t("CMS.Unpublish"),a),!!confirm(i)&&this._super(e)}}),t(".cms-edit-form.changed").entwine({onmatch:function t(e){var n=this.find("button[name=action_save]")
|
||||||
n.attr("data-text-alternate")&&(n.attr("data-text-standard",n.text()),n.text(n.attr("data-text-alternate"))),n.attr("data-btn-alternate")&&(n.attr("data-btn-standard",n.attr("class")),n.attr("class",n.attr("data-btn-alternate"))),
|
n.attr("data-text-alternate")&&(n.attr("data-text-standard",n.find("span").text()),n.find("span").text(n.attr("data-text-alternate"))),n.attr("data-btn-alternate")&&(n.attr("data-btn-standard",n.attr("class")),
|
||||||
n.removeClass("btn-secondary-outline").addClass("btn-primary")
|
n.attr("class",n.attr("data-btn-alternate"))),n.removeClass("btn-secondary-outline").addClass("btn-primary")
|
||||||
var a=this.find("button[name=action_publish]")
|
var a=this.find("button[name=action_publish]")
|
||||||
a.attr("data-text-alternate")&&(a.attr("data-text-standard",a.attr("data-text-alternate")),a.text(a.attr("data-text-alternate"))),a.attr("data-btn-alternate")&&(a.attr("data-btn-standard",a.attr("class")),
|
a.attr("data-text-alternate")&&(a.attr("data-text-standard",a.find("span").text()),a.find("span").text(a.attr("data-text-alternate"))),a.attr("data-btn-alternate")&&(a.attr("data-btn-standard",a.attr("class")),
|
||||||
a.attr("class",a.attr("data-btn-alternate"))),a.removeClass("btn-secondary-outline").addClass("btn-primary"),this._super(e)},onunmatch:function t(e){var n=this.find("button[name=action_save]")
|
a.attr("class",a.attr("data-btn-alternate"))),a.removeClass("btn-secondary-outline").addClass("btn-primary"),this._super(e)},onunmatch:function t(e){var n=this.find("button[name=action_save]")
|
||||||
n.attr("data-text-standard")&&n.text(n.attr("data-text-standard")),n.attr("data-btn-standard")&&n.attr("class",n.attr("data-btn-standard"))
|
n.attr("data-text-standard")&&n.text(n.attr("data-text-standard")),n.attr("data-btn-standard")&&n.attr("class",n.attr("data-btn-standard"))
|
||||||
var a=this.find("button[name=action_publish]")
|
var a=this.find("button[name=action_publish]")
|
||||||
|
@ -340,11 +340,11 @@ $.entwine('ss', function($){
|
|||||||
*/
|
*/
|
||||||
$('.cms-edit-form.changed').entwine({
|
$('.cms-edit-form.changed').entwine({
|
||||||
onmatch: function(e) {
|
onmatch: function(e) {
|
||||||
var save = this.find('button[name=action_save]');
|
const save = this.find('button[name=action_save]');
|
||||||
|
|
||||||
if(save.attr('data-text-alternate')) {
|
if(save.attr('data-text-alternate')) {
|
||||||
save.attr('data-text-standard', save.text());
|
save.attr('data-text-standard', save.find('span').text());
|
||||||
save.text(save.attr('data-text-alternate'));
|
save.find('span').text(save.attr('data-text-alternate'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(save.attr('data-btn-alternate')) {
|
if(save.attr('data-btn-alternate')) {
|
||||||
@ -357,11 +357,11 @@ $.entwine('ss', function($){
|
|||||||
.removeClass('btn-secondary-outline')
|
.removeClass('btn-secondary-outline')
|
||||||
.addClass('btn-primary');
|
.addClass('btn-primary');
|
||||||
|
|
||||||
var publish = this.find('button[name=action_publish]')
|
const publish = this.find('button[name=action_publish]');
|
||||||
|
|
||||||
if(publish.attr('data-text-alternate')) {
|
if(publish.attr('data-text-alternate')) {
|
||||||
publish.attr('data-text-standard', publish.attr('data-text-alternate'));
|
publish.attr('data-text-standard', publish.find('span').text());
|
||||||
publish.text(publish.attr('data-text-alternate'));
|
publish.find('span').text(publish.attr('data-text-alternate'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(publish.attr('data-btn-alternate')) {
|
if(publish.attr('data-btn-alternate')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user