Compare commits
No commits in common. "a54cfb46a74dfa1ad637e537eb74e2071e9c1595" and "8f1eca6f488c051272fdfbb6f87db4dd8dcbef3c" have entirely different histories.
a54cfb46a7
...
8f1eca6f48
|
@ -452,7 +452,7 @@
|
||||||
|
|
||||||
<b-field label="User Name"
|
<b-field label="User Name"
|
||||||
:type="userName && userName.trim() ? null : 'is-danger'">
|
:type="userName && userName.trim() ? null : 'is-danger'">
|
||||||
<b-input v-model="userName"
|
<b-input v-model.trim="userName"
|
||||||
% if request.user:
|
% if request.user:
|
||||||
disabled
|
disabled
|
||||||
% endif
|
% endif
|
||||||
|
@ -467,7 +467,7 @@
|
||||||
<b-field label="Message"
|
<b-field label="Message"
|
||||||
:type="message && message.trim() ? null : 'is-danger'">
|
:type="message && message.trim() ? null : 'is-danger'">
|
||||||
<b-input type="textarea"
|
<b-input type="textarea"
|
||||||
v-model="message"
|
v-model.trim="message"
|
||||||
ref="textarea" />
|
ref="textarea" />
|
||||||
</b-field>
|
</b-field>
|
||||||
</section>
|
</section>
|
||||||
|
@ -530,7 +530,7 @@
|
||||||
return {
|
return {
|
||||||
referrer: this.referrer,
|
referrer: this.referrer,
|
||||||
user_uuid: this.userUUID,
|
user_uuid: this.userUUID,
|
||||||
user_name: this.userName.trim(),
|
user_name: this.userName,
|
||||||
message: this.message.trim(),
|
message: this.message.trim(),
|
||||||
...this.getExtraParams(),
|
...this.getExtraParams(),
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,7 +190,7 @@
|
||||||
|
|
||||||
// cf. https://stackoverflow.com/a/56551646
|
// cf. https://stackoverflow.com/a/56551646
|
||||||
ThisPage.methods.beforeWindowUnload = function(e) {
|
ThisPage.methods.beforeWindowUnload = function(e) {
|
||||||
if (this.settingsNeedSaved && !this.savingSettings && !this.undoChanges && !this.purgingSettings) {
|
if (this.settingsNeedSaved && !this.savingSettings && !this.undoChanges) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
e.returnValue = ''
|
e.returnValue = ''
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,7 +210,7 @@ def get_libver(
|
||||||
DeprecationWarning)
|
DeprecationWarning)
|
||||||
return version
|
return version
|
||||||
if not configured_only:
|
if not configured_only:
|
||||||
return '0.9.25'
|
return 'latest'
|
||||||
|
|
||||||
elif key == 'buefy.css':
|
elif key == 'buefy.css':
|
||||||
# nb. this always returns something
|
# nb. this always returns something
|
||||||
|
@ -232,7 +232,7 @@ def get_libver(
|
||||||
|
|
||||||
elif key == 'vue_resource':
|
elif key == 'vue_resource':
|
||||||
if not configured_only:
|
if not configured_only:
|
||||||
return '1.5.3'
|
return 'latest'
|
||||||
|
|
||||||
elif key == 'fontawesome':
|
elif key == 'fontawesome':
|
||||||
if not configured_only:
|
if not configured_only:
|
||||||
|
|
|
@ -60,7 +60,7 @@ class TestGetLibVer(TestCase):
|
||||||
|
|
||||||
def test_buefy_default(self):
|
def test_buefy_default(self):
|
||||||
version = mod.get_libver(self.request, 'buefy')
|
version = mod.get_libver(self.request, 'buefy')
|
||||||
self.assertEqual(version, '0.9.25')
|
self.assertEqual(version, 'latest')
|
||||||
|
|
||||||
def test_buefy_custom_old(self):
|
def test_buefy_custom_old(self):
|
||||||
self.config.setdefault('wuttaweb.buefy_version', '0.9.29')
|
self.config.setdefault('wuttaweb.buefy_version', '0.9.29')
|
||||||
|
@ -84,11 +84,11 @@ class TestGetLibVer(TestCase):
|
||||||
def test_buefy_default_only(self):
|
def test_buefy_default_only(self):
|
||||||
self.config.setdefault('wuttaweb.libver.buefy', '0.9.29')
|
self.config.setdefault('wuttaweb.libver.buefy', '0.9.29')
|
||||||
version = mod.get_libver(self.request, 'buefy', default_only=True)
|
version = mod.get_libver(self.request, 'buefy', default_only=True)
|
||||||
self.assertEqual(version, '0.9.25')
|
self.assertEqual(version, 'latest')
|
||||||
|
|
||||||
def test_buefy_css_default(self):
|
def test_buefy_css_default(self):
|
||||||
version = mod.get_libver(self.request, 'buefy.css')
|
version = mod.get_libver(self.request, 'buefy.css')
|
||||||
self.assertEqual(version, '0.9.25')
|
self.assertEqual(version, 'latest')
|
||||||
|
|
||||||
def test_buefy_css_custom_old(self):
|
def test_buefy_css_custom_old(self):
|
||||||
# nb. this uses same setting as buefy (js)
|
# nb. this uses same setting as buefy (js)
|
||||||
|
@ -109,7 +109,7 @@ class TestGetLibVer(TestCase):
|
||||||
def test_buefy_css_default_only(self):
|
def test_buefy_css_default_only(self):
|
||||||
self.config.setdefault('wuttaweb.libver.buefy', '0.9.29')
|
self.config.setdefault('wuttaweb.libver.buefy', '0.9.29')
|
||||||
version = mod.get_libver(self.request, 'buefy.css', default_only=True)
|
version = mod.get_libver(self.request, 'buefy.css', default_only=True)
|
||||||
self.assertEqual(version, '0.9.25')
|
self.assertEqual(version, 'latest')
|
||||||
|
|
||||||
def test_vue_default(self):
|
def test_vue_default(self):
|
||||||
version = mod.get_libver(self.request, 'vue')
|
version = mod.get_libver(self.request, 'vue')
|
||||||
|
@ -136,7 +136,7 @@ class TestGetLibVer(TestCase):
|
||||||
|
|
||||||
def test_vue_resource_default(self):
|
def test_vue_resource_default(self):
|
||||||
version = mod.get_libver(self.request, 'vue_resource')
|
version = mod.get_libver(self.request, 'vue_resource')
|
||||||
self.assertEqual(version, '1.5.3')
|
self.assertEqual(version, 'latest')
|
||||||
|
|
||||||
def test_vue_resource_custom(self):
|
def test_vue_resource_custom(self):
|
||||||
self.config.setdefault('wuttaweb.libver.vue_resource', '1.5.3')
|
self.config.setdefault('wuttaweb.libver.vue_resource', '1.5.3')
|
||||||
|
@ -247,7 +247,7 @@ class TestGetLibUrl(TestCase):
|
||||||
|
|
||||||
def test_buefy_default(self):
|
def test_buefy_default(self):
|
||||||
url = mod.get_liburl(self.request, 'buefy')
|
url = mod.get_liburl(self.request, 'buefy')
|
||||||
self.assertEqual(url, 'https://unpkg.com/buefy@0.9.25/dist/buefy.min.js')
|
self.assertEqual(url, 'https://unpkg.com/buefy@latest/dist/buefy.min.js')
|
||||||
|
|
||||||
def test_buefy_custom(self):
|
def test_buefy_custom(self):
|
||||||
self.config.setdefault('wuttaweb.liburl.buefy', '/lib/buefy.js')
|
self.config.setdefault('wuttaweb.liburl.buefy', '/lib/buefy.js')
|
||||||
|
@ -262,7 +262,7 @@ class TestGetLibUrl(TestCase):
|
||||||
def test_buefy_default_only(self):
|
def test_buefy_default_only(self):
|
||||||
self.config.setdefault('wuttaweb.liburl.buefy', '/lib/buefy.js')
|
self.config.setdefault('wuttaweb.liburl.buefy', '/lib/buefy.js')
|
||||||
url = mod.get_liburl(self.request, 'buefy', default_only=True)
|
url = mod.get_liburl(self.request, 'buefy', default_only=True)
|
||||||
self.assertEqual(url, 'https://unpkg.com/buefy@0.9.25/dist/buefy.min.js')
|
self.assertEqual(url, 'https://unpkg.com/buefy@latest/dist/buefy.min.js')
|
||||||
|
|
||||||
def test_buefy_configured_only(self):
|
def test_buefy_configured_only(self):
|
||||||
url = mod.get_liburl(self.request, 'buefy', configured_only=True)
|
url = mod.get_liburl(self.request, 'buefy', configured_only=True)
|
||||||
|
@ -281,7 +281,7 @@ class TestGetLibUrl(TestCase):
|
||||||
|
|
||||||
def test_buefy_css_default(self):
|
def test_buefy_css_default(self):
|
||||||
url = mod.get_liburl(self.request, 'buefy.css')
|
url = mod.get_liburl(self.request, 'buefy.css')
|
||||||
self.assertEqual(url, 'https://unpkg.com/buefy@0.9.25/dist/buefy.min.css')
|
self.assertEqual(url, 'https://unpkg.com/buefy@latest/dist/buefy.min.css')
|
||||||
|
|
||||||
def test_buefy_css_custom(self):
|
def test_buefy_css_custom(self):
|
||||||
self.config.setdefault('wuttaweb.liburl.buefy.css', '/lib/buefy.css')
|
self.config.setdefault('wuttaweb.liburl.buefy.css', '/lib/buefy.css')
|
||||||
|
@ -309,7 +309,7 @@ class TestGetLibUrl(TestCase):
|
||||||
|
|
||||||
def test_vue_resource_default(self):
|
def test_vue_resource_default(self):
|
||||||
url = mod.get_liburl(self.request, 'vue_resource')
|
url = mod.get_liburl(self.request, 'vue_resource')
|
||||||
self.assertEqual(url, 'https://cdn.jsdelivr.net/npm/vue-resource@1.5.3')
|
self.assertEqual(url, 'https://cdn.jsdelivr.net/npm/vue-resource@latest')
|
||||||
|
|
||||||
def test_vue_resource_custom(self):
|
def test_vue_resource_custom(self):
|
||||||
self.config.setdefault('wuttaweb.liburl.vue_resource', '/lib/vue-resource.js')
|
self.config.setdefault('wuttaweb.liburl.vue_resource', '/lib/vue-resource.js')
|
||||||
|
|
Loading…
Reference in a new issue