Skip to content

Commit 21f4137

Browse files
committed
fixes CCALI/a2jviewer#165 (trim a/v urls)
1 parent 2452cba commit 21f4137

4 files changed

Lines changed: 22 additions & 18 deletions

File tree

CAJA_WS.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@
391391
}
392392
break;
393393

394-
case 'guidesavenew':
394+
case 'guidesavenew':
395395
// Saving new guide
396396
$title=($mysqli->real_escape_string($_REQUEST['title']));
397397
$xml=$_REQUEST['guide'];

legacy/A2J_Pages.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -708,9 +708,9 @@ function buildPopupFieldSet (page) {
708708
window.form.pickAudio({
709709
label: 'Text Audio:',
710710
placeholder: '',
711-
value: page.textAudioURL,
711+
value: (page.textAudioURL || '').trim(),
712712
change: function (val, page) {
713-
page.textAudioURL = val
713+
page.textAudioURL = (val || '').trim()
714714
}
715715
})
716716
)
@@ -792,9 +792,9 @@ function buildQuestionFieldSet (page) {
792792
window.form.pickAudio({
793793
label: 'Audio:',
794794
placeholder: '',
795-
value: page.textAudioURL,
795+
value: (page.textAudioURL || '').trim(),
796796
change: function (val, page) {
797-
page.textAudioURL = val
797+
page.textAudioURL = (val || '').trim()
798798
}
799799
})
800800
)
@@ -885,9 +885,9 @@ function buildLearnMoreFieldSet (page) {
885885
name: 'helpAudio',
886886
label: 'Audio:',
887887
placeholder: '',
888-
value: page.helpAudioURL,
888+
value: (page.helpAudioURL || '').trim(),
889889
change: function (val, page) {
890-
page.helpAudioURL = val
890+
page.helpAudioURL = (val || '').trim()
891891
}
892892
})
893893
)
@@ -897,9 +897,9 @@ function buildLearnMoreFieldSet (page) {
897897
name: 'helpGraphic',
898898
label: 'Graphic:',
899899
placeholder: '',
900-
value: page.helpImageURL,
900+
value: (page.helpImageURL || '').trim(),
901901
change: function (val, page) {
902-
page.helpImageURL = val
902+
page.helpImageURL = (val || '').trim()
903903
}
904904
})
905905
)
@@ -920,9 +920,9 @@ function buildLearnMoreFieldSet (page) {
920920
name: 'helpVideo',
921921
label: 'Video:',
922922
placeholder: '',
923-
value: page.helpVideoURL,
923+
value: (page.helpVideoURL || '').trim(),
924924
change: function (val, page) {
925-
page.helpVideoURL = val
925+
page.helpVideoURL = (val || '').trim()
926926
}
927927
})
928928
)

legacy/viewer/A2J_MobileFile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ function page2JSON_Mobile (page) { // 12/22/2014 Convert native TPage into Mobil
2525
help: page.help,
2626
helpCitation: page.helpCitation,
2727
helpMediaLabel: page.helpMediaLabel,
28-
helpAudioURL: page.helpAudioURL,
28+
helpAudioURL: (page.helpAudioURL || '').trim(),
2929
helpReader: page.helpReader,
30-
helpImageURL: page.helpImageURL,
30+
helpImageURL: (page.helpImageURL || '').trim(),
3131
helpAltText: page.helpAltText,
32-
helpVideoURL: page.helpVideoURL,
32+
helpVideoURL: (page.helpVideoURL || '').trim(),
3333
buttons: [],
3434
fields: [],
3535
codeBefore: page.codeBefore,

styles/author/viewer-layout.less

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
@import (reference) '../../styles';
2+
13
.author-debug-panel {
24
position: fixed;
35
width: 400px;
46
}
57

6-
#viewer-app.with-debug-panel {
7-
right: 0;
8-
left: 410px;
9-
position: fixed;
8+
@media (min-width: (@screen-sm + 1)) {
9+
#viewer-app.with-debug-panel {
10+
right: 0;
11+
left: 410px;
12+
position: fixed;
13+
}
1014
}
1115

1216
a2j-viewer-preview {

0 commit comments

Comments
 (0)