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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt (-3 / +11 lines)
Lines 74-79 Link Here
74
    <script>
74
    <script>
75
        var oTable; /* oTable needs to be global */
75
        var oTable; /* oTable needs to be global */
76
        var sEmptyTable = _("No quotes available. Please use the 'Add quote' button to add a quote."); /* override the default message in datatables.inc */
76
        var sEmptyTable = _("No quotes available. Please use the 'Add quote' button to add a quote."); /* override the default message in datatables.inc */
77
78
        var quoteSource = '<input id="quoteSource" type="text" style="width:99%" onkeydown="fnClickAddQuote(event,this.parentNode.parentNode)"/>';
79
        var quoteText = '<input id="quoteText" type="text" style="width:99%" onkeydown="fnClickAddQuote(event,this.parentNode.parentNode)"/>';
77
        $(document).ready(function() {
80
        $(document).ready(function() {
78
            /* NOTE: This is an ajax-source datatable and *not* a server-side sourced datatable. */
81
            /* NOTE: This is an ajax-source datatable and *not* a server-side sourced datatable. */
79
            /* See the datatable docs if you don't understand this difference. */
82
            /* See the datatable docs if you don't understand this difference. */
Lines 89-100 Link Here
89
                                        {
92
                                        {
90
                                            "sWidth": "11%",
93
                                            "sWidth": "11%",
91
                                            "render": function(data, type, row, meta){
94
                                            "render": function(data, type, row, meta){
95
                                                if ( data == quoteSource ) {
96
                                                    return data;
97
                                                }
92
                                                return escape_str(data);
98
                                                return escape_str(data);
93
                                            }
99
                                            }
94
                                        },
100
                                        },
95
                                        {
101
                                        {
96
                                            "sWidth": "75%",
102
                                            "sWidth": "75%",
97
                                            "render": function(data, type, row, meta){
103
                                            "render": function(data, type, row, meta){
104
                                                if ( data == quoteText ) {
105
                                                    return data;
106
                                                }
98
                                                return escape_str(data);
107
                                                return escape_str(data);
99
                                            }
108
                                            }
100
                                        },
109
                                        },
Lines 199-206 Link Here
199
            var aRow = oTable.fnAddData(
208
            var aRow = oTable.fnAddData(
200
                [
209
                [
201
                    'NA', // this is hackish to fool the datatable sort routine into placing this row at the end of the list...
210
                    'NA', // this is hackish to fool the datatable sort routine into placing this row at the end of the list...
202
                    '<input id="quoteSource" type="text" style="width:99%" onkeydown="fnClickAddQuote(event,this.parentNode.parentNode)"/>',
211
                    quoteSource,
203
                    '<input id="quoteText" type="text" style="width:99%" onkeydown="fnClickAddQuote(event,this.parentNode.parentNode)"/>',
212
                    quoteText,
204
                    '0000-00-00 00:00:00',
213
                    '0000-00-00 00:00:00',
205
                ],
214
                ],
206
                false
215
                false
207
- 

Return to bug 28675