Lines 102-145
function Check(){
Link Here
|
102 |
} |
102 |
} |
103 |
} |
103 |
} |
104 |
|
104 |
|
105 |
|
|
|
106 |
// returns the subfieldcode based upon subfieldid writing |
107 |
function getSubfieldcode(tagsubfieldid){ |
108 |
// 3 : tag +3 : tagnumber +4 : number of _ +8 subfield -1 begins at 0 |
109 |
return tagsubfieldid.substr(3+3+4+8-1,1); |
110 |
} |
111 |
|
112 |
// Take the base of tagsubfield information (removing the subfieldcodes and subfieldindexes) |
113 |
// returns the filter |
114 |
function getTagInputnameFilter(tagsubfieldid){ |
115 |
var tagsubfield=tagsubfieldid.substr(0,tagsubfieldid.lastIndexOf("_")); |
116 |
var tagcode=tagsubfield.substr(tagsubfield.lastIndexOf("_")); |
117 |
tagsubfield=tagsubfield.substr(0,tagsubfield.lastIndexOf("_")); |
118 |
tagsubfield=tagsubfield.substr(0,tagsubfield.lastIndexOf("_")); |
119 |
tagsubfield=tagsubfield+"_."+tagcode; |
120 |
return tagsubfield; |
121 |
} |
122 |
|
123 |
function openAuth(tagsubfieldid,authtype) { |
124 |
// let's take the base of tagsubfield information (removing the indexes and the codes |
125 |
var element=document.getElementById(tagsubfieldid); |
126 |
var tagsubfield=getTagInputnameFilter(tagsubfieldid); |
127 |
var elementsubfcode=getSubfieldcode(element.name); |
128 |
var mainmainstring=element.value; |
129 |
var mainstring=""; |
130 |
var inputs = element.parentNode.parentNode.getElementsByTagName("input"); |
131 |
|
132 |
for (var myindex =0; myindex<inputs.length;myindex++){ |
133 |
if (inputs[myindex].name && inputs[myindex].name.match(tagsubfield)){ |
134 |
var subfieldcode=getSubfieldcode(inputs[myindex].name); |
135 |
if (isNaN(parseInt(subfieldcode)) && inputs[myindex].value != "" && subfieldcode!=elementsubfcode){ |
136 |
mainstring=inputs[myindex].value+" "+mainstring; |
137 |
} |
138 |
} |
139 |
} |
140 |
newin=window.open("../authorities/auth_finder.pl?source=auth&authtypecode="+ authtype+ "&index="+tagsubfieldid+"&value_mainstr="+encodeURI(mainmainstring)+"&value_main="+encodeURI(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes'); |
141 |
} |
142 |
|
143 |
function AddField(field,cntrepeatfield) { |
105 |
function AddField(field,cntrepeatfield) { |
144 |
document.forms['f'].op.value = "addfield"; |
106 |
document.forms['f'].op.value = "addfield"; |
145 |
document.forms['f'].addfield_field.value=field; |
107 |
document.forms['f'].addfield_field.value=field; |
146 |
- |
|
|