Lines 127-132
Link Here
|
127 |
Sticky.hcSticky('refresh'); |
127 |
Sticky.hcSticky('refresh'); |
128 |
}); |
128 |
}); |
129 |
|
129 |
|
|
|
130 |
$('#preview').click(function (){ |
131 |
var content="<h3>Authority #: [% authid %]</h3><hr>"; |
132 |
content+="<div style='color:#004d99;'>"; |
133 |
var line=1; |
134 |
var has_input=0; |
135 |
var sf_has_input=0; |
136 |
$("#authoritytabs").find("[id^=tag_]").each(function(){ |
137 |
//check if tag has content |
138 |
has_input=0; |
139 |
$(this).find(".input_marceditor").each(function(){ |
140 |
if($(this).val()) has_input=1; |
141 |
}); |
142 |
|
143 |
if(has_input){ |
144 |
line=1; |
145 |
//tag |
146 |
var $tag = $(this).find(".tagnum").text(); |
147 |
content += $tag.replace("*",") +" "; |
148 |
//indicators |
149 |
$(this).find(".indicator").each(function(){ |
150 |
if( $(this).val() ) content += $(this).val(); |
151 |
else content += "_"; |
152 |
}); |
153 |
content += " "; |
154 |
//subfields |
155 |
$(this).find(".subfield_line").each(function(){ |
156 |
//check if subfield has content |
157 |
sf_has_input=0; |
158 |
$(this).find(".input_marceditor").each(function(){ |
159 |
if($(this).val()) sf_has_input=1; |
160 |
}); |
161 |
if(sf_has_input){ |
162 |
if(line>1) content += " "; |
163 |
//code |
164 |
$(this).find(".subfieldcode").each(function(){ |
165 |
$(this).find(".flat").each(function(){ |
166 |
if($(this).val()!="00") |
167 |
content += "\$"+$(this).val()+" "; |
168 |
}); |
169 |
}); |
170 |
//value |
171 |
$(this).find(".input_marceditor").each(function(){ |
172 |
content += "<span style='color:#000;'>"+$(this).val()+"</span>"; |
173 |
}); |
174 |
content+="</br>"; |
175 |
line+=1; |
176 |
} |
177 |
} |
178 |
}); |
179 |
}); |
130 |
}); |
180 |
}); |
131 |
|
181 |
|
132 |
function selectTab( tablink ){ |
182 |
function selectTab( tablink ){ |
Lines 475-480
Link Here
|
475 |
[% END %] |
525 |
[% END %] |
476 |
</ul> <!-- /#settings-menu --> |
526 |
</ul> <!-- /#settings-menu --> |
477 |
</div> <!-- /.btn-group --> |
527 |
</div> <!-- /.btn-group --> |
|
|
528 |
<div class="btn-group"> |
529 |
<a class="btn btn-default" id="preview" href="#"><i class="fa fa-eye"></i> MARC Preview</a> |
530 |
</div> |
478 |
<div class="btn-group"> |
531 |
<div class="btn-group"> |
479 |
[% IF ( authid ) %] |
532 |
[% IF ( authid ) %] |
480 |
<a class="btn btn-default" id="cancel" href="/cgi-bin/koha/authorities/detail.pl?authid=[% authid | url %]">Cancel</a> |
533 |
<a class="btn btn-default" id="cancel" href="/cgi-bin/koha/authorities/detail.pl?authid=[% authid | url %]">Cancel</a> |
Lines 762-768
Link Here
|
762 |
</form> |
815 |
</form> |
763 |
|
816 |
|
764 |
[% INCLUDE 'modals/cataloguing_create_av.inc' %] |
817 |
[% INCLUDE 'modals/cataloguing_create_av.inc' %] |
765 |
|
818 |
[% INCLUDE 'modals/edit_authority_preview.inc' %] |
766 |
</div> |
819 |
</div> |
767 |
</div> |
820 |
</div> |
768 |
</div> |
821 |
</div> |
769 |
- |
|
|