Skip to content

Commit

Permalink
Item3521: Correctly display and undo OCTAL settings
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@8521 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Aug 17, 2010
1 parent 4d1fc09 commit 49977fb
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions core/lib/Foswiki/Configure/resources/scripts.js
Expand Up @@ -214,7 +214,11 @@ function initDefaultLink(inLink) {
inLink.type = type;

/* retrieve value from title tag */
inLink.defaultValue = unescape(inLink.title);
if (inLink.type == 'OCTAL') {
inLink.defaultValue = 0+parseInt(unescape(inLink.title)).toString(8);
} else {
inLink.defaultValue = unescape(inLink.title);
}

/* set link label states */
inLink.setDefaultLinkText = 'use default';
Expand Down Expand Up @@ -274,8 +278,13 @@ function resetToDefaultValue (inLink, inFormType, inName, inValue) {
elem.checked = value;
} else {
/* including type='text' */
oldValue = elem.value;
elem.value = value;
if (inLink.type == 'OCTAL') {
oldValue = 0+parseInt(elem.value).toString(8);
elem.value = 0+parseInt(value).toString(8);
} else {
oldValue = elem.value;
elem.value = value;
}
}

var label = $('.configureDefaultValueLinkLabel', inLink)[0];
Expand Down

0 comments on commit 49977fb

Please sign in to comment.