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