View | Details | Raw Unified | Return to bug 19939
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt (-28 / +52 lines)
Lines 4-13 Link Here
4
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
6
<style type="text/css">
6
<style type="text/css">
7
.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
8
.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
9
.linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
10
tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent; }
11
#dataPreview { width : 90%; top: 5%; } .modal-body { max-height: 380px; } .modal-header { padding: 0 14px; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }
7
#dataPreview { width : 90%; top: 5%; } .modal-body { max-height: 380px; } .modal-header { padding: 0 14px; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }
12
</style>
8
</style>
13
</head>
9
</head>
Lines 104-127 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
104
        <th>Edition</th>
100
        <th>Edition</th>
105
        <th>ISBN</th>
101
        <th>ISBN</th>
106
        <th>LCCN</th>
102
        <th>LCCN</th>
107
        <th>MARC</th>
103
        <th>Actions</th>
108
        <th>Card</th>
109
		<th>&nbsp;</th>
110
    </tr></thead>
104
    </tr></thead>
111
    <tbody>[% FOREACH breeding_loo IN breeding_loop %]
105
    <tbody>[% FOREACH breeding_loo IN breeding_loop %]
112
        [% IF ( breeding_loo.breedingid ) %]
106
        [% IF ( breeding_loo.breedingid ) %]
113
107
114
	    <tr id="row[% breeding_loo.breedingid %]">
108
	    <tr id="row[% breeding_loo.breedingid %]">
115
            <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" class="previewData">Preview card</a> <a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode | uri %]">Import</a><a href="#" id="close_menu" title="Close this menu"> X </a></div> </td>
109
            <td>[% breeding_loo.server %]</td>
116
            <td>[% breeding_loo.title |html %]</td>
110
            <td>[% breeding_loo.title |html %]</td>
117
            <td>[% breeding_loo.author %]</td>
111
            <td>[% breeding_loo.author %]</td>
118
            <td>[% breeding_loo.date %]</td>
112
            <td>[% breeding_loo.date %]</td>
119
            <td>[% breeding_loo.edition %]</td>
113
            <td>[% breeding_loo.edition %]</td>
120
            <td>[% breeding_loo.isbn %]</td>
114
            <td>[% breeding_loo.isbn %]</td>
121
            <td>[% breeding_loo.lccn %]</td>
115
            <td>[% breeding_loo.lccn %]</td>
122
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">MARC</a></td>
116
123
            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" class="previewData">Card</a></td>
117
            <td>
124
            <td><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode | uri %]">Import</a></td>
118
                <div class="dropdown">
119
                    <a class="btn btn-default btn-xs dropdown-toggle" id="cataloguesearchactions[% breeding_loo.breedingid %]" role="button" data-toggle="dropdown" href="#">
120
                      Actions <b class="caret"></b>
121
                    </a>
122
                    <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="cataloguesearchactions[% breeding_loo.breedingid %]">
123
                        <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" title="MARC" class="previewData"><i class="fa fa-eye"></i> MARC preview</a></li>
124
                        <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" title="Card" class="previewData"><i class="fa fa-eye"></i> Card preview</a></li>
125
                        <li><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode | uri %]"><i class="fa fa-download"></i> Import</a></li>
126
                    </ul>
127
                </div>
128
            </td>
125
        </tr>
129
        </tr>
126
        [% END %]
130
        [% END %]
127
    [% END %]</tbody>
131
    [% END %]</tbody>
Lines 189-194 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
189
    <script type="text/javascript">
193
    <script type="text/javascript">
190
        $(document).ready(function(){
194
        $(document).ready(function(){
191
195
196
            $(".dropdown").on("hidden.bs.dropdown", function(){
197
                // Reset menu styles so that a click on the
198
                // original dropdown button toggle works correctly
199
                $(".dropdown").css("position","absolute");
200
                $(".dropdown-menu").css({
201
                    "top" : "100%",
202
                    "left" : "auto",
203
                    "right" : 0
204
                });
205
            });
206
192
            $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
207
            $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
193
                "sDom": 't',
208
                "sDom": 't',
194
                "aoColumnDefs": [
209
                "aoColumnDefs": [
Lines 198-220 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
198
                "aaSorting": [[ 1, "asc" ]],
213
                "aaSorting": [[ 1, "asc" ]],
199
                "bPaginate": false
214
                "bPaginate": false
200
            }));
215
            }));
201
                /* Inline edit/delete links */
202
                $("td").click(function(event){
203
                    var $tgt = $(event.target);
204
                    var row = $(this).parent();
205
                    $(".linktools").hide();
206
                    $("tr").removeClass("selected");
207
                    row.addClass("selected");
208
                    if($tgt.is("a")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){
209
                        //Don't show inline links for cells containing links of their own.
210
                    } else {
211
                        var position = $(this).offset();
212
                        var top = position.top+5;
213
                        var left = position.left+5;
214
                        $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
215
                    }
216
                });
217
216
217
            /* Display actions menu anywhere the table is clicked */
218
            $("td").click(function(event){
219
                var tgt = $(event.target);
220
                var row = $(this).parent();
221
                var rowid = row.attr("id");
222
                $("tr").removeClass("highlighted-row");
223
                row.addClass("highlighted-row");
224
                $(".dropdown").removeClass("open");
225
                if(tgt.is("a")||tgt.is(":nth-child(8)")){
226
                    // Don't show inline links for cells containing links of their own.
227
                } else {
228
                    event.stopPropagation();
229
                    var dropdown = $(".dropdown", row);
230
                    dropdown.addClass("open");
231
                    var position = $(this).offset();
232
                    var top = position.top + 5;
233
                    var left = position.left + 5;
234
                    dropdown.css("position","unset");
235
                    $(".dropdown-menu", row).css({
236
                        "top" : top,
237
                        "left" : left,
238
                        "right" : "unset"
239
                    });
240
241
               }
242
            });
218
        });
243
        });
219
    </script>
244
    </script>
220
    [% INCLUDE 'z3950_search.inc' %]
245
    [% INCLUDE 'z3950_search.inc' %]
221
- 

Return to bug 19939