Browse Source

Bump pressbooks-build-tools from 0.11.0 to 0.12.0 (#124)

* Bump pressbooks-build-tools from 0.11.0 to 0.12.0

Bumps [pressbooks-build-tools](https://github.com/pressbooks/pressbooks-build-tools) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/pressbooks/pressbooks-build-tools/releases)
- [Commits](https://github.com/pressbooks/pressbooks-build-tools/compare/0.11.0...0.12.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Fix lint errors.
pull/125/head
dependabot[bot] 7 years ago committed by Ned Zimmerman
parent
commit
3ac33c688e
  1. 59
      assets/scripts/catalog-admin.js
  2. 29
      assets/scripts/page-section.js
  3. 21053
      package-lock.json
  4. 2
      package.json
  5. 831
      yarn.lock

59
assets/scripts/catalog-admin.js

@ -2,12 +2,18 @@
( function ( $ ) {
$( document ).ready( function () {
$( '.wrap' ).on( 'click', '.notice-dismiss', function () {
$( this ).parent( '#message' ).fadeOut( 500, function () {
$( this )
.parent( '#message' )
.fadeOut( 500, function () {
$( this ).remove();
} );
} );
$( 'input.in-catalog' ).on( 'change', function () {
let book_id = $( this ).parent( 'td' ).siblings( 'th' ).children( 'input' ).val();
let book_id = $( this )
.parent( 'td' )
.siblings( 'th' )
.children( 'input' )
.val();
let in_catalog = $( this ).prop( 'checked' );
$.ajax( {
url: ajaxurl,
@ -20,22 +26,61 @@
},
success: function () {
if ( $( '#message' ).length < 1 ) {
$( '<div id="message" class="updated notice is-dismissible">' ).html( '<p><strong>'+PB_Aldine_Admin.catalog_updated+'</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">'+PB_Aldine_Admin.dismiss_notice+'</span></button>' ).hide().insertAfter( '.wrap h1' ).fadeIn( 500 );
$( '<div id="message" class="updated notice is-dismissible">' )
.html(
'<p><strong>' +
PB_Aldine_Admin.catalog_updated +
'</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">' +
PB_Aldine_Admin.dismiss_notice +
'</span></button>'
)
.hide()
.insertAfter( '.wrap h1' )
.fadeIn( 500 );
} else {
$( '#message' ).fadeOut( 500, function () {
$( this ).remove();
$( '<div id="message" class="updated notice is-dismissible">' ).html( '<p><strong>'+PB_Aldine_Admin.catalog_updated+'</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">'+PB_Aldine_Admin.dismiss_notice+'</span></button>' ).hide().insertAfter( '.wrap h1' ).fadeIn( 500 );
$( '<div id="message" class="updated notice is-dismissible">' )
.html(
'<p><strong>' +
PB_Aldine_Admin.catalog_updated +
'</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">' +
PB_Aldine_Admin.dismiss_notice +
'</span></button>'
)
.hide()
.insertAfter( '.wrap h1' )
.fadeIn( 500 );
} );
}
},
error: function ( jqXHR, textStatus, errorThrown ) {
if ( $( '#message' ).length < 1 ) {
$( '<div id="message" class="error notice is-dismissible">' ).html( '<p><strong>'+PB_Aldine_Admin.catalog_not_updated+'</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">'+PB_Aldine_Admin.dismiss_notice+'</span></button>' ).hide().insertAfter( '.wrap h1' ).fadeIn( 500 );
$( '<div id="message" class="error notice is-dismissible">' )
.html(
'<p><strong>' +
PB_Aldine_Admin.catalog_not_updated +
'</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">' +
PB_Aldine_Admin.dismiss_notice +
'</span></button>'
)
.hide()
.insertAfter( '.wrap h1' )
.fadeIn( 500 );
} else {
$( '#message' ).fadeOut( 500, function () {
$( this ).remove();
$( '<div id="message" class="error notice is-dismissible">' ).html( '<p><strong>'+PB_Aldine_Admin.catalog_not_updated+'</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">'+PB_Aldine_Admin.dismiss_notice+'</span></button>' ).hide().insertAfter( '.wrap h1' ).fadeIn( 500 );
$( '<div id="message" class="error notice is-dismissible">' )
.html(
'<p><strong>' +
PB_Aldine_Admin.catalog_not_updated +
'</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">' +
PB_Aldine_Admin.dismiss_notice +
'</span></button>'
)
.hide()
.insertAfter( '.wrap h1' )
.fadeIn( 500 );
} );
}
},

29
assets/scripts/page-section.js

@ -19,16 +19,30 @@
name: 'variant',
label: 'Variant',
values: [
{ text: aldine.page_section.standard, value: '' },
{ text: aldine.page_section.accent, value: 'accent' },
{ text: aldine.page_section.bordered, value: 'bordered' },
{ text: aldine.page_section.borderless, value: 'borderless' },
{
text: aldine.page_section.standard, value: '',
},
{
text: aldine.page_section.accent, value: 'accent',
},
{
text: aldine.page_section.bordered, value: 'bordered',
},
{
text: aldine.page_section.borderless, value: 'borderless',
},
],
value: '', // Sets the default
},
],
onsubmit: function ( e ) {
editor.insertContent( '[aldine_page_section title="' + e.data.title + '" variant="' + e.data.variant + '"]<p>Insert your page section content here.</p>[/aldine_page_section]' );
editor.insertContent(
'[aldine_page_section title="' +
e.data.title +
'" variant="' +
e.data.variant +
'"]<p>Insert your page section content here.</p>[/aldine_page_section]'
);
},
} );
},
@ -38,5 +52,8 @@
return null;
},
} );
tinymce.PluginManager.add( 'aldine_page_section', tinymce.plugins.aldine_page_section );
tinymce.PluginManager.add(
'aldine_page_section',
tinymce.plugins.aldine_page_section
);
} )();

21053
package-lock.json generated

File diff suppressed because it is too large Load Diff

2
package.json

@ -56,7 +56,7 @@
"node": ">= 6.9.4"
},
"devDependencies": {
"pressbooks-build-tools": "^0.11.0"
"pressbooks-build-tools": "^0.12.0"
},
"dependencies": {
"aetna": "^1.0.0-alpha.17",

831
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save