Lines 78-83
Link Here
|
78 |
selectTab( tablink ); |
78 |
selectTab( tablink ); |
79 |
window.scrollTo( 0, getScrollto( field, "toolbar" ) ); |
79 |
window.scrollTo( 0, getScrollto( field, "toolbar" ) ); |
80 |
}); |
80 |
}); |
|
|
81 |
|
82 |
$('#preview').click(function (){ |
83 |
var content="<h3>Authority #: [% authid %]</h3><hr>"; |
84 |
content+="<div style='color:#004d99;'>"; |
85 |
var line=1; |
86 |
var has_input=0; |
87 |
var sf_has_input=0; |
88 |
$('#authoritytabs').find('[id^=tag_]').each(function(){ |
89 |
//check if tag has content |
90 |
has_input=0; |
91 |
$(this).find('.input_marceditor').each(function(){ |
92 |
if($(this).val()) has_input=1; |
93 |
}); |
94 |
|
95 |
if(has_input){ |
96 |
line=1; |
97 |
//tag |
98 |
var $tag = $(this).find('.tagnum').text(); |
99 |
content += $tag.replace('*','') +" "; |
100 |
//indicators |
101 |
$(this).find('.indicator').each(function(){ |
102 |
if( $(this).val() ) content += $(this).val(); |
103 |
else content += "_"; |
104 |
}); |
105 |
content += " "; |
106 |
//subfields |
107 |
$(this).find('.subfield_line').each(function(){ |
108 |
//check if subfield has content |
109 |
sf_has_input=0; |
110 |
$(this).find('.input_marceditor').each(function(){ |
111 |
if($(this).val()) sf_has_input=1; |
112 |
}); |
113 |
if(sf_has_input){ |
114 |
if(line>1) content += " "; |
115 |
//code |
116 |
$(this).find('.subfieldcode').each(function(){ |
117 |
$(this).find('.flat').each(function(){ |
118 |
if($(this).val()!='00') |
119 |
content += "\$"+$(this).val()+" "; |
120 |
}); |
121 |
}); |
122 |
//value |
123 |
$(this).find('.input_marceditor').each(function(){ |
124 |
content += "<span style='color:#000;'>"+$(this).val()+"</span>"; |
125 |
}); |
126 |
content+="</br>"; |
127 |
line+=1; |
128 |
} |
129 |
}); |
130 |
} |
131 |
}); |
81 |
}); |
132 |
}); |
82 |
|
133 |
|
83 |
function selectTab( tablink ){ |
134 |
function selectTab( tablink ){ |
Lines 321-326
Link Here
|
321 |
<a class="btn btn-default" id="z3950submit" href="#"><i class="fa fa-search"></i> Z39.50/SRU search</a> |
372 |
<a class="btn btn-default" id="z3950submit" href="#"><i class="fa fa-search"></i> Z39.50/SRU search</a> |
322 |
[% END %] |
373 |
[% END %] |
323 |
</div> |
374 |
</div> |
|
|
375 |
<div class="btn-group"> |
376 |
<a class="btn btn-default" id="preview" href="#"><i class="fa fa-eye"></i> MARC Preview</a> |
377 |
</div> |
324 |
<div class="btn-group"> |
378 |
<div class="btn-group"> |
325 |
[% IF ( authid ) %] |
379 |
[% IF ( authid ) %] |
326 |
<a class="btn btn-default" id="cancel" href="/cgi-bin/koha/authorities/detail.pl?authid=[% authid | url %]">Cancel</a> |
380 |
<a class="btn btn-default" id="cancel" href="/cgi-bin/koha/authorities/detail.pl?authid=[% authid | url %]">Cancel</a> |
Lines 604-610
Link Here
|
604 |
</form> |
658 |
</form> |
605 |
|
659 |
|
606 |
[% INCLUDE 'modals/cataloguing_create_av.inc' %] |
660 |
[% INCLUDE 'modals/cataloguing_create_av.inc' %] |
607 |
|
661 |
[% INCLUDE 'modals/edit_authority_preview.inc' %] |
608 |
</div> |
662 |
</div> |
609 |
</div> |
663 |
</div> |
610 |
</div> |
664 |
</div> |
611 |
- |
|
|