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

(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (-2 / +42 lines)
Lines 2404-2409 video { Link Here
2404
    border-color : #ADADAD #ADADAD #949494;
2404
    border-color : #ADADAD #ADADAD #949494;
2405
2405
2406
}
2406
}
2407
2408
.btn-small .caret {
2409
    margin-top : .6em;
2410
}
2411
2412
.icon-hold {
2413
    background-position:-24px -166px;
2414
}
2415
2416
.icon-copy {
2417
    background-position:-3px -166px;
2418
}
2419
2407
#toolbar .btn,
2420
#toolbar .btn,
2408
#toolbar .dropdown-menu {
2421
#toolbar .dropdown-menu {
2409
    font-size: 13px;
2422
    font-size: 13px;
Lines 2415-2421 a.btn:visited{ Link Here
2415
.dropdown-menu li {
2428
.dropdown-menu li {
2416
    list-style: none outside none;
2429
    list-style: none outside none;
2417
}
2430
}
2418
[class^="icon-"],[class*=" icon-"]{background-image:url("../../img/glyphicons-halflings.png");}
2431
[class^="icon-"],[class*=" icon-"]{background-image:url("../../img/glyphicons-halflings-koha.png");}
2419
.icon-white,.nav-tabs>.active>a>[class^="icon-"],.nav-tabs>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"]{background-image:url("../../img/glyphicons-halflings-white.png");}
2432
.icon-white,.nav-tabs>.active>a>[class^="icon-"],.nav-tabs>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"]{background-image:url("../../img/glyphicons-halflings-white.png");}
2420
a.disabled {
2433
a.disabled {
2421
    color : #999999;
2434
    color : #999999;
Lines 2511-2514 a.disabled { Link Here
2511
    padding : 1em;
2524
    padding : 1em;
2512
    font-size : 120%;
2525
    font-size : 120%;
2513
}
2526
}
2514
.separator { color : #666; padding : 0 .2em; }
2527
.separator { color : #666; padding : 0 .2em; }
2528
2529
.close {
2530
    position: inherit;
2531
    top: auto;
2532
    right : auto;
2533
    line-height: inherit;
2534
    filter : none;
2535
    float : none;
2536
    font-size: inherit;
2537
    font-weight: normal;
2538
    opacity: inherit;
2539
    text-shadow: none;
2540
}
2541
2542
.close:hover {
2543
    color: #538200;
2544
    filter: inherit;
2545
    opacity: inherit;
2546
}
2547
2548
/* Redefine a new style for Bootstrap's class "close" since we use that already */
2549
/* Use <a class="closebtn" href="#">&times;</a> */
2550
.alert .closebtn{position:relative;top:-2px;right:-21px;line-height:20px;}
2551
.modal-header .closebtn{margin-top:2px;}
2552
.closebtn{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.closebtn:hover{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;filter:alpha(opacity=40);}
2553
button.closebtn{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;}
2554
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (-97 / +117 lines)
Lines 1-7 Link Here
1
<div id="toolbar">
1
<script type="text/javascript">
2
    <script type="text/javascript">
2
//<![CDATA[
3
    //<![CDATA[
3
$(document).ready(function(){
4
[% IF ( CAN_user_borrowers ) %]
4
    [% IF ( CAN_user_borrowers ) %]
5
        $("#deletepatron").click(function(){
6
                confirm_deletion();
7
                $(".btn-group").removeClass("open");
8
                return false;
9
            });
10
        $("#renewpatron").click(function(){
11
            confirm_reregistration();
12
            $(".btn-group").removeClass("open");
13
            return false;
14
        });
15
        [% IF ( is_child ) %]$("#updatechild").click(function(){
16
            update_child();
17
            $(".btn-group").removeClass("open");
18
        });[% END %]
19
    [% END %]
20
21
    $("#exportcheckins").click(function(){
22
        export_barcodes();
23
        $(".btn-group").removeClass("open");
24
        return false;
25
    });
26
    $("#printsummary").click(function(){
27
        printx_window("page");
28
        $(".btn-group").removeClass("open");
29
        return false;
30
    });
31
    $("#printslip").click(function(){
32
        printx_window("slip");
33
        $(".btn-group").removeClass("open");
34
        return false;
35
    });
36
    $("#printquickslip").click(function(){
37
        printx_window("qslip");
38
        $(".btn-group").removeClass("open");
39
        return false;
40
    });
41
    $("#searchtohold").click(function(){
42
        searchToHold();
43
        return false;
44
    })
45
});
5
function confirm_deletion() {
46
function confirm_deletion() {
6
    var is_confirmed = window.confirm(_("Are you sure you want to delete this patron? This cannot be undone."));
47
    var is_confirmed = window.confirm(_("Are you sure you want to delete this patron? This cannot be undone."));
7
    if (is_confirmed) {
48
    if (is_confirmed) {
Lines 17-136 function confirm_deletion() { Link Here
17
}
58
}
18
59
19
function update_child() {
60
function update_child() {
20
[% IF ( CATCODE_MULTI ) %]
61
    [% IF ( CATCODE_MULTI ) %]
21
 window.open('/cgi-bin/koha/members/update-child.pl?op=multi&borrowernumber=[% borrowernumber %]','UpdateChild','width=400,height=300,toolbar=no,scrollbars=yes,resizable=yes');
62
        window.open('/cgi-bin/koha/members/update-child.pl?op=multi&borrowernumber=[% borrowernumber %]','UpdateChild','width=400,height=300,toolbar=no,scrollbars=yes,resizable=yes');
22
[% ELSE %]
63
    [% ELSE %]
23
 confirm_updatechild();
64
        confirm_updatechild();
65
    [% END %]
66
}
24
[% END %]
67
[% END %]
25
}[% ELSE %][% END %]
26
68
27
function confirm_reregistration() {
69
function confirm_reregistration() {
28
    var is_confirmed = window.confirm(_("Are you sure you want to renew this patron's registration?"));
70
    var is_confirmed = window.confirm(_("Are you sure you want to renew this patron's registration?"));
29
    if (is_confirmed) {
71
    if (is_confirmed) {
30
       window.location = '/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;cardnumber=[% cardnumber %]&amp;destination=[% destination %]&amp;reregistration=y';
72
    window.location = '/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;cardnumber=[% cardnumber %]&amp;desintation=[% destination %]&amp;reregistration=y';
31
    }
73
    }
32
}
74
}
33
function export_barcodes() {
75
function export_barcodes() {
34
    window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrowernumber %]&amp;op=export_barcodes');
76
    window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrowernumber %]&amp;op=export_barcodes');
35
}
77
}
36
[% END %]
78
var slip_re = /slip/;
37
79
function printx_window(print_type) {
38
    // prepare DOM for YUI Toolbar
80
    var handler = print_type.match(slip_re) ? "printslip" : "moremember";
39
81
    window.open("/cgi-bin/koha/members/" + handler + ".pl?borrowernumber=[% borrowernumber %]&amp;print=" + print_type, "printwindow");
40
     $(document).ready(function() {
82
    return false;
41
        $("#printslip,#patronflags,#deletepatron").parent().remove();
83
}
42
        $("#moremenuc,#printmenuc,#searchtoholdc").empty();
84
function searchToHold(){
43
        yuiToolbar();
85
    var date = new Date();
44
     });
86
    date.setTime(date.getTime() + (10 * 60 * 1000));
45
87
    $.cookie("holdfor", "[% borrowernumber %]", { path: "/", expires: date });
46
    // YUI Toolbar Functions
88
    location.href="/cgi-bin/koha/catalogue/search.pl";
47
    var slip_re = /slip/;
89
}
48
    function printx_window(print_type) {
90
//]]>
49
        var handler = print_type.match(slip_re) ? "printslip" : "moremember";
91
</script>
50
        window.open("/cgi-bin/koha/members/" + handler + ".pl?borrowernumber=[% borrowernumber %]&amp;print=" + print_type, "printwindow");
51
        return false;
52
    }
53
    function searchToHold(){
54
        var date = new Date();
55
        date.setTime(date.getTime() + (10 * 60 * 1000));
56
        $.cookie("holdfor", "[% borrowernumber %]", { path: "/", expires: date });
57
        location.href="/cgi-bin/koha/catalogue/search.pl";
58
    }
59
    function yuiToolbar() {
60
        var printmenu = [
61
            { text: _("Print summary"), onclick: {fn: function(){printx_window("page")}} },
62
            { text: _("Print slip"), onclick: {fn: function(){printx_window("slip")}} },
63
            { text: _("Print quick slip"), onclick: {fn: function(){printx_window("qslip")}} }
64
        ];
65
66
        var moremenu = [
67
            { text: _("Renew patron"), [% UNLESS CAN_user_borrowers %]disabled: true, [% END %] onclick: { fn: confirm_reregistration } },
68
            { text: _("Set permissions"), url: "/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]"[% UNLESS CAN_user_permissions %], disabled: true[% END %]},
69
            { text: _("Delete"), [% UNLESS CAN_user_borrowers %]disabled: true, [% END %] onclick: { fn: confirm_deletion } },
70
            { text: _("Update child to adult patron")[% IF is_child && CAN_user_borrowers %], onclick: { fn: update_child }[% ELSE %], disabled: true[% END %]},
71
            { text: _("Export today's checked in barcodes"), [% UNLESS CAN_user_borrowers %]disabled: true, [% END %] onclick: { fn: export_barcodes }}
72
        ];
73
74
        new YAHOO.widget.Button({
75
            type: "menu",
76
            label: _("Print"),
77
            name: "printmenubutton",
78
            menu: printmenu,
79
            container: "printmenuc"
80
        });
81
        new YAHOO.widget.Button({
82
            id: "searchtohold",
83
            type: "button",
84
            label: _("Search to hold"),
85
            container: "searchtoholdc",
86
            onclick: {fn: searchToHold }
87
        });
88
        new YAHOO.widget.Button({
89
            type: "menu",
90
            label: _("More"),
91
            name: "moremenubutton",
92
            menu: moremenu,
93
            container: "moremenuc"
94
        });
95
96
        [% IF ( CAN_user_borrowers ) %][% IF ( adultborrower ) %]new YAHOO.widget.Button("addchild");[% END %]
97
        new YAHOO.widget.Button("editpatron");
98
        new YAHOO.widget.Button("changepassword");
99
        new YAHOO.widget.Button("duplicate");[% END %]
100
        new YAHOO.widget.Button("printslip");
101
        new YAHOO.widget.Button("printpage");
102
    }
103
92
104
    //]]>
93
<div id="toolbar" class="btn-toolbar">
105
    </script>
106
    <ul class="toolbar">
107
    [% IF ( CAN_user_borrowers ) %]
94
    [% IF ( CAN_user_borrowers ) %]
108
        [% IF ( category_type ) %]
95
        [% IF ( category_type ) %]
109
            [% IF ( guarantor ) %]
96
            [% IF ( guarantor ) %]
110
                <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=[% destination %]&amp;borrowernumber=[% borrowernumber %]&amp;guarantorid=[% guarantorborrowernumber %]&amp;category_type=[% category_type %]">
97
                <a id="editpatron" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;guarantorid=[% guarantorborrowernumber %]&amp;category_type=[% category_type %]">
111
            [% ELSE %]
98
            [% ELSE %]
112
            <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=[% destination %]&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">
99
                <a id="editpatron" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">
113
            [% END %]Edit</a></li>
100
            [% END %]
101
                <i class="icon-pencil"></i> Edit</a>
114
        [% ELSE %] <!-- try with categorycode if no category_type -->
102
        [% ELSE %] <!-- try with categorycode if no category_type -->
115
            [% IF ( categorycode ) %]
103
            [% IF ( categorycode ) %]
116
            <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=[% destination %]&amp;borrowernumber=[% borrowernumber %]&amp;categorycode=[% categorycode %]">Edit</a></li>
104
                <a id="editpatron" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;categorycode=[% categorycode %]"><i class="icon-pencil"></i> Edit</a>
117
            [% ELSE %] <!-- if no categorycode, set category_type to A by default -->
105
            [% ELSE %] <!-- if no categorycode, set category_type to A by default -->
118
                <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=[% destination %]&amp;borrowernumber=[% borrowernumber %]&amp;category_type=A">Edit</a></li>
106
                <a id="editpatron" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;category_type=A"><i class="icon-pencil"></i> Edit</a>
119
            [% END %]
107
            [% END %]
120
        [% END %]
108
        [% END %]
121
        [% IF ( adultborrower AND activeBorrowerRelationship ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
122
        <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change password</a></li>
123
        <li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">Duplicate</a></li>
124
    [% END %]
109
    [% END %]
125
    <li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&amp;print=page">Print summary</a></li>
110
126
    <li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&amp;print=slip">Print slip</a></li>
111
    [% IF ( CAN_user_borrowers ) %]
127
    <li id="searchtoholdc"><a id="searchtohold" href="#">Search to hold</a></li>
112
        [% IF ( adultborrower AND activeBorrowerRelationship ) %]
128
    [% IF ( CAN_user_borrowers ) %]<li id="moremenuc"><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&amp;borrowernumber=[% borrowernumber %]">Renew account</a></li>[% END %]
113
            <a id="addchild" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C"><i class="icon-plus"></i> Add child</a>
129
    [% IF ( CAN_user_permissions ) %]
114
        [% END %]
130
        [% IF ( CAN_user_staffaccess ) %]
115
        [% IF ( CAN_user_borrowers ) %]
131
            <li><a id="patronflags" href="/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]">Set permissions</a></li>
116
            <a id="changepassword" class="btn btn-small" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]"><i class="icon-lock"></i> Change password</a>
132
        [% END %]
117
        [% END %]
133
    [% END %]
118
    [% END %]
134
    [% IF ( CAN_user_staffaccess ) %]<li><a id="deletepatron" href="#" onclick="confirm_deletion();">Delete</a></li>[% END %]
135
119
136
</ul></div>
120
    <a id="duplicate" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]"><i class="icon-copy"></i>Duplicate</a>
121
    <div class="btn-group">
122
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-print"></i> Print <span class="caret"></span></button>
123
            <ul class="dropdown-menu">
124
                [% IF ( CAN_user_borrowers ) %]<li><a id="printsummary" href="#">Print summary</a></li>[% END %]
125
                <li><a id="printslip" href="#">Print slip</a></li>
126
                <li><a id="printquickslip" href="#">Print quick slip</a></li>
127
            </ul>
128
    </div>
129
    <a id="searchtohold" class="btn btn-small" href="#"><i class="icon-search"></i> Search to hold</a>
130
    <div class="btn-group">
131
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">More <span class="caret"></span></button>
132
            <ul class="dropdown-menu">
133
                [% IF ( CAN_user_borrowers ) %]
134
                    <li><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&amp;borrowernumber=[% borrowernumber %]">Renew patron</a></li>
135
                [% ELSE %]
136
                    <li class="disabled"><a id="renewpatron" href="#">Renew patron</a></li>
137
                [% END %]
138
                [% IF ( CAN_user_permissions ) %]
139
                    <li><a id="patronflags" href="/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]">Set permissions</a></li>
140
                [% ELSE %]
141
                    <li class="disabled"><a id="patronflags" href="#">Set permissions</a></li>
142
                [% END %]
143
                [% IF ( CAN_user_borrowers ) %]
144
                    <li><a id="deletepatron" href="#">Delete</a></li>
145
                [% ELSE %]
146
                    <li class="disabled"><a id="deletepatron" href="#">Delete</a></li>
147
                [% END %]
148
                [% IF ( is_child ) %]
149
                    <li><a id="updatechild" href="#">Update child to adult patron</a></li>
150
                [% ELSE %]
151
                    <li class="disabled"><a id="updatechild" href="#">Update child to adult patron</a></li></li>
152
                [% END %]
153
                <li><a id="exportcheckins" href="#">Export today's checked in barcodes</a></li>
154
            </ul>
155
    </div>
156
</div>

Return to bug 9420