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