Родитель
69fa2bfcb6
Коммит
8314aed6a9
|
@ -106,7 +106,9 @@ run(`docker cp ${DUMP_FILE} ${IMAGE_NAMES.POSTGRES}:/`);
|
|||
postgres(`pg_restore ${DB_FLAGS} -dwagtail ${DUMP_FILE}`);
|
||||
|
||||
console.log(`Migrating database...`);
|
||||
run(`docker exec ${IMAGE_NAMES.BACKEND} ./dockerpythonvenv/bin/python network-api/manage.py migrate`);
|
||||
run(
|
||||
`docker exec ${IMAGE_NAMES.BACKEND} ./dockerpythonvenv/bin/python network-api/manage.py migrate`
|
||||
);
|
||||
|
||||
console.log(`Updating site bindings...`);
|
||||
run(`inv manage fix_local_site_bindings`, true, silent);
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -22,6 +22,9 @@ import wagtail.core.fields
|
|||
import wagtail.images.blocks
|
||||
import wagtailmetadata.models
|
||||
|
||||
def print_progress(apps, schema_editor):
|
||||
print('Applying wagtailpages 0001_initial')
|
||||
|
||||
def create_default_blog_categories(apps, schema_editor):
|
||||
BlogPageCategory = apps.get_model("wagtailpages", "BlogPageCategory")
|
||||
BlogPageCategory.objects.get_or_create(name='Mozilla Festival')
|
||||
|
@ -79,6 +82,9 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(
|
||||
code=print_progress,
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='BlogPage',
|
||||
fields=[
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
from django.db import migrations
|
||||
|
||||
def print_progress(apps, schema_editor):
|
||||
print('Applying wagtailpages 0002')
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
|
@ -10,6 +12,9 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(
|
||||
code=print_progress,
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='productpage',
|
||||
name='cloudinary_image',
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
from django.db import migrations
|
||||
|
||||
|
||||
def print_progress(apps, schema_editor):
|
||||
print('Applying wagtailpages 0020')
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
|
@ -10,6 +13,9 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(
|
||||
code=print_progress,
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='blogpage',
|
||||
name='body_de',
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
def print_progress(apps, schema_editor):
|
||||
print('Applying wagtailpages 0040')
|
||||
|
||||
|
||||
def copy_petition_cta_to_cta(apps, schema_editor):
|
||||
CTA = apps.get_model("wagtailpages", "CTA")
|
||||
|
||||
|
@ -26,6 +30,9 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(
|
||||
code=print_progress,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='banneredcampaignpage',
|
||||
name='cta',
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
from django.db import migrations
|
||||
|
||||
def print_progress(apps, schema_editor):
|
||||
print('Applying wagtailpages 0060')
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
|
@ -10,6 +12,9 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(
|
||||
code=print_progress,
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='cta',
|
||||
options={'ordering': ['-id'], 'verbose_name_plural': 'CTA'},
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
from django.db import migrations
|
||||
from django.conf import settings
|
||||
from django.template.defaultfilters import slugify
|
||||
|
||||
def add_pni_subcategories(apps, schema):
|
||||
Locale = apps.get_model("wagtailcore", "Locale")
|
||||
DEFAULT_LOCALE = Locale.objects.get(language_code=settings.LANGUAGE_CODE)
|
||||
|
||||
BuyersGuideProductCategory = apps.get_model("wagtailpages", "BuyersGuideProductCategory")
|
||||
healthAndExercise = BuyersGuideProductCategory.objects.get(name="Health & Exercise")
|
||||
healthAndExercise = BuyersGuideProductCategory.objects.get(
|
||||
name="Health & Exercise",
|
||||
locale=DEFAULT_LOCALE
|
||||
)
|
||||
|
||||
subcategories = [
|
||||
"Exercise Equipment",
|
||||
|
@ -12,7 +19,6 @@ def add_pni_subcategories(apps, schema):
|
|||
]
|
||||
|
||||
for cat in subcategories:
|
||||
print(f"creating {cat}")
|
||||
subcategory, created = BuyersGuideProductCategory.objects.get_or_create(
|
||||
name=cat,
|
||||
parent=healthAndExercise,
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -66,7 +66,7 @@ class CreepVote extends Component {
|
|||
.then((res) => res.text())
|
||||
.then((html) => {
|
||||
const d = document.createElement(`div`);
|
||||
d.innerHTML = html
|
||||
d.innerHTML = html;
|
||||
this.setState({
|
||||
csrfToken: d.querySelector(`input`).value,
|
||||
});
|
||||
|
|
|
@ -39,15 +39,11 @@ export function setupNavLinks(instance) {
|
|||
|
||||
if (categoryName) {
|
||||
document
|
||||
.querySelector(
|
||||
`#multipage-nav a[data-name="${categoryName}"]`
|
||||
)
|
||||
.querySelector(`#multipage-nav a[data-name="${categoryName}"]`)
|
||||
.classList.add(`active`);
|
||||
|
||||
document
|
||||
.querySelector(
|
||||
`#pni-nav-mobile a[data-name="${categoryName}"]`
|
||||
)
|
||||
.querySelector(`#pni-nav-mobile a[data-name="${categoryName}"]`)
|
||||
.classList.add(`active`);
|
||||
|
||||
instance.clearText();
|
||||
|
|
|
@ -10,7 +10,6 @@ const ALL_CATEGORY_LABEL = document.querySelector(
|
|||
).textContent;
|
||||
const PARENT_TITLE = document.querySelector(`.parent-title`);
|
||||
|
||||
|
||||
export class Utils {
|
||||
/**
|
||||
*...
|
||||
|
@ -121,12 +120,14 @@ export class Utils {
|
|||
}
|
||||
|
||||
document
|
||||
.querySelector( `#pni-nav-mobile a[data-name="${PARENT_TITLE.value.trim()}"]`
|
||||
.querySelector(
|
||||
`#pni-nav-mobile a[data-name="${PARENT_TITLE.value.trim()}"]`
|
||||
)
|
||||
.classList.add(`active`);
|
||||
|
||||
document
|
||||
.querySelector( `#multipage-nav a[data-name="${PARENT_TITLE.value.trim()}"]`
|
||||
.querySelector(
|
||||
`#multipage-nav a[data-name="${PARENT_TITLE.value.trim()}"]`
|
||||
)
|
||||
.classList.add(`active`);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
import Swiper, {A11y, Autoplay, Pagination, Navigation, Keyboard} from 'swiper';
|
||||
import Swiper, {
|
||||
A11y,
|
||||
Autoplay,
|
||||
Pagination,
|
||||
Navigation,
|
||||
Keyboard,
|
||||
} from "swiper";
|
||||
|
||||
Swiper.use([A11y, Autoplay, Pagination, Navigation, Keyboard]);
|
||||
|
||||
|
@ -16,7 +22,7 @@ class Carousel {
|
|||
enabled: true,
|
||||
},
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
el: ".swiper-pagination",
|
||||
clickable: true,
|
||||
},
|
||||
navigation: {
|
||||
|
|
|
@ -259,8 +259,12 @@ class JoinUs extends Component {
|
|||
*/
|
||||
renderFlowHeading() {
|
||||
return [
|
||||
<h2 className="h3-heading text-center" key={`flowheading`}>{this.props.flowHeading}</h2>,
|
||||
<p className="text-center" key={`flowheadingpara`}>{this.props.flowText}</p>,
|
||||
<h2 className="h3-heading text-center" key={`flowheading`}>
|
||||
{this.props.flowHeading}
|
||||
</h2>,
|
||||
<p className="text-center" key={`flowheadingpara`}>
|
||||
{this.props.flowText}
|
||||
</p>,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -65,9 +65,9 @@ class PulseProjectList extends Component {
|
|||
|
||||
// Giving users ability to link to pulse objects using an anchor link
|
||||
// and having it render in the right place after recieving data.
|
||||
scrollToLinkedPulseObject(){
|
||||
scrollToLinkedPulseObject() {
|
||||
const linkedPulseObject = document.querySelector(window.location.hash);
|
||||
linkedPulseObject?.scrollIntoView()
|
||||
linkedPulseObject?.scrollIntoView();
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
@ -75,8 +75,8 @@ class PulseProjectList extends Component {
|
|||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
if(window.location.hash){
|
||||
this.scrollToLinkedPulseObject()
|
||||
if (window.location.hash) {
|
||||
this.scrollToLinkedPulseObject();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import injectNews from "./news.js";
|
|||
import injectPetition from "./petition.js";
|
||||
import injectPulseProjectList from "./pulse-project-list.js";
|
||||
import injectShareButtonGroup from "./share-button-group.js";
|
||||
import injectPulseTabbedProfileDirectory from "./pulse-tabbed-profile-filters"
|
||||
import injectPulseTabbedProfileDirectory from "./pulse-tabbed-profile-filters";
|
||||
|
||||
/**
|
||||
* Inject React components
|
||||
|
|
|
@ -199,12 +199,14 @@ import copyToClipboard from "../../copy-to-clipboard.js";
|
|||
callButton.removeAttribute(`disabled`);
|
||||
|
||||
// also make sure the social share buttons work on success
|
||||
document.querySelectorAll(`.share-button-group .btn`).forEach((element) => {
|
||||
const { target } = element.dataset;
|
||||
element.addEventListener(`click`, (evt) =>
|
||||
shareButtonClicked(evt, target)
|
||||
);
|
||||
});
|
||||
document
|
||||
.querySelectorAll(`.share-button-group .btn`)
|
||||
.forEach((element) => {
|
||||
const { target } = element.dataset;
|
||||
element.addEventListener(`click`, (evt) =>
|
||||
shareButtonClicked(evt, target)
|
||||
);
|
||||
});
|
||||
},
|
||||
};
|
||||
})().init();
|
||||
|
|
|
@ -3,7 +3,7 @@ import { ReactGA } from "../../../../common";
|
|||
// For the featured banner type on mozefest homepage
|
||||
const watchFeaturedVideoHandler = () => {
|
||||
const watchVideoButton = document.querySelector(
|
||||
`#mozfest-home-watch-featured-video-button`
|
||||
`#mozfest-home-watch-featured-video-button`
|
||||
);
|
||||
const externalVideo = document.querySelector(`#mozfest-hero-video iframe`);
|
||||
const internalVideo = document.querySelector(`#mozfest-hero-video video`);
|
||||
|
@ -100,26 +100,25 @@ const trackWatchVideoClicks = () => {
|
|||
action: `watch video tap`,
|
||||
label: `watch video button tap`,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const scrollToVideoHandler = () => {
|
||||
let element = document.getElementById('mozfest-hero-video');
|
||||
let button = document.getElementById('mozfest-hero-video-cta');
|
||||
let element = document.getElementById("mozfest-hero-video");
|
||||
let button = document.getElementById("mozfest-hero-video-cta");
|
||||
|
||||
if (element && button) {
|
||||
let headerOffset = 90;
|
||||
let elementPosition = element.getBoundingClientRect().top;
|
||||
let offsetPosition = elementPosition - headerOffset;
|
||||
|
||||
button.addEventListener('click', () => {
|
||||
button.addEventListener("click", () => {
|
||||
window.scrollTo({
|
||||
top: offsetPosition,
|
||||
behavior: "smooth"
|
||||
behavior: "smooth",
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Bind handlers to MozFest homepage banner
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
export function setupTito() {
|
||||
globalThis.tito = globalThis.tito || function() {
|
||||
(tito.q = tito.q || []).push(arguments);
|
||||
globalThis.tito =
|
||||
globalThis.tito ||
|
||||
function () {
|
||||
(tito.q = tito.q || []).push(arguments);
|
||||
};
|
||||
|
||||
tito('on:registration:finished', function(data) {
|
||||
// TODO: this callback will be needed for #7435
|
||||
console.log('Finished');
|
||||
});
|
||||
};
|
||||
tito("on:registration:finished", function (data) {
|
||||
// TODO: this callback will be needed for #7435
|
||||
console.log("Finished");
|
||||
});
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ module.exports = async function waitForImagesToLoad(page) {
|
|||
(async function testLoaded() {
|
||||
// force-load all lazy content
|
||||
await images.evaluateAll((imgs) => {
|
||||
const visible = Array.from(imgs).filter(i => i.offsetParent !== null)
|
||||
const visible = Array.from(imgs).filter((i) => i.offsetParent !== null);
|
||||
visible.forEach((img) => {
|
||||
if (img.loading === `lazy` && !img.complete) img.scrollIntoView();
|
||||
});
|
||||
|
@ -22,7 +22,7 @@ module.exports = async function waitForImagesToLoad(page) {
|
|||
|
||||
// then check how many images aren't complete yet
|
||||
const result = await images.evaluateAll((imgs) => {
|
||||
const visible = Array.from(imgs).filter(i => i.offsetParent !== null);
|
||||
const visible = Array.from(imgs).filter((i) => i.offsetParent !== null);
|
||||
return visible.filter((img) => !img.complete).length;
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче