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

(-)a/koha-tmpl/intranet-tmpl/prog/en/css/quotes.css (-2 lines)
Lines 4-10 Link Here
4
}
4
}
5
5
6
#footer {
6
#footer {
7
    visibility  : hidden;
8
    position    : relative;
7
    position    : relative;
9
    top         : 10px;
8
    top         : 10px;
10
    height      : 25px;
9
    height      : 25px;
Lines 37-41 Link Here
37
#quotes_editor {
36
#quotes_editor {
38
    float       : left;
37
    float       : left;
39
    width       : 100%;
38
    width       : 100%;
40
    visibility  :hidden;
41
}
39
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/quotes-toolbar.inc (-1 lines)
Lines 43-48 Link Here
43
        <li id="add_quote"><a id="add" href="#">Add quote</a></li>
43
        <li id="add_quote"><a id="add" href="#">Add quote</a></li>
44
        <li id="delete_quote"><a id="delete" href="#">Delete quote(s)</a></li>
44
        <li id="delete_quote"><a id="delete" href="#">Delete quote(s)</a></li>
45
        <li id="import_quotes"><a id="import" href="#">Import quotes</a></li>
45
        <li id="import_quotes"><a id="import" href="#">Import quotes</a></li>
46
        <span class="hint" style="">Click Source or Text field to edit contents. Press &lt;Enter&gt; to save changes.</span>
47
    </ul>
46
    </ul>
48
</div>
47
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt (-2 / +2 lines)
Lines 340-346 Link Here
340
                    </div>
340
                    </div>
341
                </fieldset>
341
                </fieldset>
342
                <div id="server_response" onclick='fnResetUpload()'>Server Response</div>
342
                <div id="server_response" onclick='fnResetUpload()'>Server Response</div>
343
                <table id="quotes_editor">
343
                <table id="quotes_editor" style="visibility: hidden;">
344
                <thead>
344
                <thead>
345
                    <tr>
345
                    <tr>
346
                        <th>Source</th>
346
                        <th>Source</th>
Lines 357-363 Link Here
357
                    </tr>
357
                    </tr>
358
                </tbody>
358
                </tbody>
359
                </table>
359
                </table>
360
                <fieldset id="footer" class="action">
360
                <fieldset id="footer" class="action" style="visibility: hidden;">
361
                </fieldset>
361
                </fieldset>
362
            </div>
362
            </div>
363
        </div>
363
        </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt (-9 / +22 lines)
Lines 2-7 Link Here
2
    <title>Koha &rsaquo; Tools &rsaquo; Quote editor</title>
2
    <title>Koha &rsaquo; Tools &rsaquo; Quote editor</title>
3
    [% INCLUDE 'doc-head-close.inc' %]
3
    [% INCLUDE 'doc-head-close.inc' %]
4
    <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
4
    <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5
    <link rel="stylesheet" type="text/css" href="[% themelang %]/css/quotes.css" />
5
    <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
6
    <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
6
    <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/dataTables.fnReloadAjax.js"></script>
7
    <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/dataTables.fnReloadAjax.js"></script>
7
    [% INCLUDE 'datatables-strings.inc' %]
8
    [% INCLUDE 'datatables-strings.inc' %]
Lines 39-45 Link Here
39
                        var quoteID = $('td', nRow)[0].innerHTML;
40
                        var quoteID = $('td', nRow)[0].innerHTML;
40
                        $(nRow).attr("id", quoteID); /* set row ids to quote id */
41
                        $(nRow).attr("id", quoteID); /* set row ids to quote id */
41
                        $('td:eq(0)', nRow).click(function() {$(this.parentNode).toggleClass('selected',this.clicked);}); /* add row selectors */
42
                        $('td:eq(0)', nRow).click(function() {$(this.parentNode).toggleClass('selected',this.clicked);}); /* add row selectors */
42
                        $('td:eq(0)', nRow).attr("title", "Click ID to select/deselect quote");
43
                        $('td:eq(0)', nRow).attr("title", _("Click ID to select/deselect quote"));
43
                        if (isNaN(quoteID)) {
44
                        if (isNaN(quoteID)) {
44
                            noEditFields = [0,1,2,3]; /* all fields when adding a quote */
45
                            noEditFields = [0,1,2,3]; /* all fields when adding a quote */
45
                        }
46
                        }
Lines 101-111 Link Here
101
                    });
102
                    });
102
                }
103
                }
103
                else {
104
                else {
104
                    alert('Please supply both the text and source of the quote before saving.');
105
                    alert(_('Please supply both the text and source of the quote before saving.'));
105
                }
106
                }
106
            }
107
            }
107
            else if (e.keyCode == 27) {
108
            else if (e.keyCode == 27) {
108
                if (confirm('Are you sure you want to cancel adding this quote?')) {
109
                if (confirm(_('Are you sure you want to cancel adding this quote?'))) {
109
                    oTable.fnDeleteRow(node);
110
                    oTable.fnDeleteRow(node);
110
                }
111
                }
111
                else {
112
                else {
Lines 134-142 Link Here
134
                  return this.id;
135
                  return this.id;
135
            }).get().join(', ');
136
            }).get().join(', ');
136
            if (!idsToDelete) {
137
            if (!idsToDelete) {
137
                alert('Please select a quote(s) by clicking the quote id(s) you desire to delete.');
138
                alert(_('Please select a quote(s) by clicking the quote id(s) you desire to delete.'));
138
            }
139
            }
139
            else if (confirm('Are you sure you wish to delete quote(s) '+idsToDelete+'?')) {
140
            else if (confirm(_('Are you sure you wish to delete quote(s) ')+idsToDelete+'?')) {
140
                oTable.$('.selected').each(function(){
141
                oTable.$('.selected').each(function(){
141
                        var quoteID = $(this).attr('id');
142
                        var quoteID = $(this).attr('id');
142
                            $.ajax({
143
                            $.ajax({
Lines 173-182 Link Here
173
            <div class="yui-b">
174
            <div class="yui-b">
174
                [% INCLUDE 'quotes-toolbar.inc' %]
175
                [% INCLUDE 'quotes-toolbar.inc' %]
175
                <h2>Quote editor</h2>
176
                <h2>Quote editor</h2>
176
                <table id="quotes_editor" style="float: left; width: 100%;">
177
                <div id="instructions">
178
                <fieldset id="quote_editor_help" class="rows">
179
                    <legend>Instructions</legend>
180
                    <div id="quote_editor_inst">
181
                        <ul>
182
                        <li>Click on the 'Add Quote' button to add a single quote; Press the &lt;Enter&gt; key to save the quote. <b>Note:</b> Both the 'source' and 'text' fields must have content in order for the quote to be saved.</li>
183
                        <li>Click on any field to edit the contents; Press the &lt;Enter&gt; key to save edit.</li>
184
                        <li>Click on one or more quote numbers to select entire quotes for deletion; Click the 'Delete Quote(s)' button to delete selected quotes.</li>
185
                        <li>Click the 'Import Quotes' button in the toolbar to import a CSV file of quotes.</li>
186
                        </ul>
187
                    </div>
188
                </fieldset>
189
                </div>
190
                <table id="quotes_editor">
177
                <thead>
191
                <thead>
178
                    <tr>
192
                    <tr>
179
                        <th><span style="cursor: help" onclick="event.stopPropagation();alert('Click on the quote\'s id to select or deselect the quote. Multiple quotes may be selected.');">ID</span></th>
193
                        <th><span style="cursor: help" onclick="event.stopPropagation();alert(_('Click on the quote\'s id to select or deselect the quote. Multiple quotes may be selected.'));">ID</span></th>
180
                        <th>Source</th>
194
                        <th>Source</th>
181
                        <th>Text</th>
195
                        <th>Text</th>
182
                        <th>Last Displayed</th>
196
                        <th>Last Displayed</th>
Lines 194-200 Link Here
194
                    </tr>
208
                    </tr>
195
                </tbody>
209
                </tbody>
196
                </table>
210
                </table>
197
                <fieldset id="footer" class="action" style="height:25px;">
211
                <fieldset id="footer" class="action">
198
                </fieldset>
212
                </fieldset>
199
            </div>
213
            </div>
200
        </div>
214
        </div>
201
- 

Return to bug 7977