Browse Source

Supressed useles files

EyeXion 7 months ago
parent
commit
8635fa5f8a
48 changed files with 6 additions and 41877 deletions
  1. 6
    6
      build/libs/config.properties
  2. 0
    1054
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2.html
  3. 0
    834
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/ajax.js
  4. 0
    349
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/codemirror.css
  5. 0
    9765
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/codemirror.js
  6. 0
    550
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/common.js
  7. 0
    886
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/config.js
  8. 0
    1495
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/console.js
  9. 0
    14
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/cross_framing_protection.js
  10. 0
    365
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/doclinks.js
  11. BIN
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/dot.gif
  12. 0
    326
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/error_report.js
  13. 0
    5181
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/functions.js
  14. 0
    761
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/indexes.js
  15. 0
    678
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/jquery-migrate.js
  16. 0
    2291
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/jquery-ui-timepicker-addon.js
  17. 0
    1312
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/jquery-ui.css
  18. 0
    13
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/jquery-ui.js
  19. 0
    71
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/jquery.js
  20. 0
    2
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/jquery_002.js
  21. 0
    117
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/jquery_003.js
  22. 0
    402
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/jquery_004.js
  23. 0
    1650
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/jquery_005.js
  24. 0
    221
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/jquery_006.js
  25. 0
    390
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/jquery_007.js
  26. 0
    163
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/js.js
  27. 0
    140
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/keyhandler.js
  28. 0
    73
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/lint.css
  29. 0
    252
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/lint.js
  30. BIN
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/logo_left.png
  31. 0
    222
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/menu-resizer.js
  32. 0
    413
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/messages.php
  33. 0
    1680
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/navigation.js
  34. 0
    59
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/page_settings.js
  35. 0
    5355
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/phpmyadmin.css
  36. 0
    169
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/printview.css
  37. 0
    1075
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/rte.js
  38. 0
    72
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/runmode.js
  39. 0
    101
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/shortcuts_handler.js
  40. 0
    36
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/show-hint.css
  41. 0
    460
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/show-hint.js
  42. 0
    211
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/sprintf.js
  43. 0
    304
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/sql-hint.js
  44. 0
    38
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/sql-lint.js
  45. 0
    494
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/sql.js
  46. 0
    500
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/tbl_structure.js
  47. 0
    1277
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/tracekit.js
  48. 0
    50
      src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/whitelist.php

+ 6
- 6
build/libs/config.properties View File

@@ -3,15 +3,15 @@
3 3
 # For more information, visit https://www.etud.insa-toulouse.fr/~tali/DownloadPageJigglyMessenger/
4 4
 
5 5
 # The broadcast address of the local network
6
-app.localNetIPAddress=192.168.1.255
6
+app.localNetIPAddress=10.1.5.255
7 7
 # Port number use by the application (more than 1024)
8 8
 app.udpPortNumber=12345
9 9
 # Servlet URL : DON'T FORGET THE LAST "/"
10
-app.servletURL=http://192.168.1.18:8080/Gradle___com_example___ServeurClavardage_1_0_SNAPSHOT_war/
10
+app.servletURL=https://srv-gei-tomcat.insa-toulouse.fr/ServletJiggly/
11 11
 # The Database Address (URL or IP)
12
-app.dataBaseAddress=192.168.1.18
13
-app.dataBaseUser=root
12
+app.dataBaseAddress=srv-bdens.insa-toulouse.fr
13
+app.dataBaseUser=tp_servlet_013
14 14
 # The Database user password
15
-app.dataBasePasswd=0000
15
+app.dataBasePasswd=eiN3ahng
16 16
 # The Database name
17
-app.dataBaseName=testDBChat
17
+app.dataBaseName=tp_servlet_013

+ 0
- 1054
src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2.html
File diff suppressed because it is too large
View File


+ 0
- 834
src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/ajax.js View File

@@ -1,834 +0,0 @@
1
-/* vim: set expandtab sw=4 ts=4 sts=4: */
2
-/**
3
- * This object handles ajax requests for pages. It also
4
- * handles the reloading of the main menu and scripts.
5
- */
6
-var AJAX = {
7
-    /**
8
-     * @var bool active Whether we are busy
9
-     */
10
-    active: false,
11
-    /**
12
-     * @var object source The object whose event initialized the request
13
-     */
14
-    source: null,
15
-    /**
16
-     * @var object xhr A reference to the ajax request that is currently running
17
-     */
18
-    xhr: null,
19
-    /**
20
-     * @var object lockedTargets, list of locked targets
21
-     */
22
-    lockedTargets: {},
23
-    /**
24
-     * @var function Callback to execute after a successful request
25
-     *               Used by PMA_commonFunctions from common.js
26
-     */
27
-    _callback: function () {},
28
-    /**
29
-     * @var bool _debug Makes noise in your Firebug console
30
-     */
31
-    _debug: false,
32
-    /**
33
-     * @var object $msgbox A reference to a jQuery object that links to a message
34
-     *                     box that is generated by PMA_ajaxShowMessage()
35
-     */
36
-    $msgbox: null,
37
-    /**
38
-     * Given the filename of a script, returns a hash to be
39
-     * used to refer to all the events registered for the file
40
-     *
41
-     * @param key string key The filename for which to get the event name
42
-     *
43
-     * @return int
44
-     */
45
-    hash: function (key) {
46
-        /* http://burtleburtle.net/bob/hash/doobs.html#one */
47
-        key += '';
48
-        var len = key.length;
49
-        var hash = 0;
50
-        var i = 0;
51
-        for (; i < len; ++i) {
52
-            hash += key.charCodeAt(i);
53
-            hash += (hash << 10);
54
-            hash ^= (hash >> 6);
55
-        }
56
-        hash += (hash << 3);
57
-        hash ^= (hash >> 11);
58
-        hash += (hash << 15);
59
-        return Math.abs(hash);
60
-    },
61
-    /**
62
-     * Registers an onload event for a file
63
-     *
64
-     * @param file string   file The filename for which to register the event
65
-     * @param func function func The function to execute when the page is ready
66
-     *
67
-     * @return self For chaining
68
-     */
69
-    registerOnload: function (file, func) {
70
-        var eventName = 'onload_' + AJAX.hash(file);
71
-        $(document).on(eventName, func);
72
-        if (this._debug) {
73
-            console.log(
74
-                // no need to translate
75
-                'Registered event ' + eventName + ' for file ' + file
76
-            );
77
-        }
78
-        return this;
79
-    },
80
-    /**
81
-     * Registers a teardown event for a file. This is useful to execute functions
82
-     * that unbind events for page elements that are about to be removed.
83
-     *
84
-     * @param string   file The filename for which to register the event
85
-     * @param function func The function to execute when
86
-     *                      the page is about to be torn down
87
-     *
88
-     * @return self For chaining
89
-     */
90
-    registerTeardown: function (file, func) {
91
-        var eventName = 'teardown_' + AJAX.hash(file);
92
-        $(document).on(eventName, func);
93
-        if (this._debug) {
94
-            console.log(
95
-                // no need to translate
96
-                'Registered event ' + eventName + ' for file ' + file
97
-            );
98
-        }
99
-        return this;
100
-    },
101
-    /**
102
-     * Called when a page has finished loading, once for every
103
-     * file that registered to the onload event of that file.
104
-     *
105
-     * @param string file The filename for which to fire the event
106
-     *
107
-     * @return void
108
-     */
109
-    fireOnload: function (file) {
110
-        var eventName = 'onload_' + AJAX.hash(file);
111
-        $(document).trigger(eventName);
112
-        if (this._debug) {
113
-            console.log(
114
-                // no need to translate
115
-                'Fired event ' + eventName + ' for file ' + file
116
-            );
117
-        }
118
-    },
119
-    /**
120
-     * Called just before a page is torn down, once for every
121
-     * file that registered to the teardown event of that file.
122
-     *
123
-     * @param string file The filename for which to fire the event
124
-     *
125
-     * @return void
126
-     */
127
-    fireTeardown: function (file) {
128
-        var eventName = 'teardown_' + AJAX.hash(file);
129
-        $(document).triggerHandler(eventName);
130
-        if (this._debug) {
131
-            console.log(
132
-                // no need to translate
133
-                'Fired event ' + eventName + ' for file ' + file
134
-            );
135
-        }
136
-    },
137
-    /**
138
-     * function to handle lock page mechanism
139
-     *
140
-     * @param event the event object
141
-     *
142
-     * @return void
143
-     */
144
-    lockPageHandler: function (event) {
145
-        var newHash = null;
146
-        var oldHash = null;
147
-        var lockId;
148
-        // CodeMirror lock
149
-        if (event.data.value === 3) {
150
-            newHash = event.data.content;
151
-            oldHash = true;
152
-            lockId = 'cm';
153
-        } else {
154
-            // Don't lock on enter.
155
-            if (0 === event.charCode) {
156
-                return;
157
-            }
158
-
159
-            lockId = $(this).data('lock-id');
160
-            if (typeof lockId === 'undefined') {
161
-                return;
162
-            }
163
-            /*
164
-             * @todo Fix Code mirror does not give correct full value (query)
165
-             * in textarea, it returns only the change in content.
166
-             */
167
-            if (event.data.value === 1) {
168
-                newHash = AJAX.hash($(this).val());
169
-            } else {
170
-                newHash = AJAX.hash($(this).is(':checked'));
171
-            }
172
-            oldHash = $(this).data('val-hash');
173
-        }
174
-        // Set lock if old value !== new value
175
-        // otherwise release lock
176
-        if (oldHash !== newHash) {
177
-            AJAX.lockedTargets[lockId] = true;
178
-        } else {
179
-            delete AJAX.lockedTargets[lockId];
180
-        }
181
-        // Show lock icon if locked targets is not empty.
182
-        // otherwise remove lock icon
183
-        if (!jQuery.isEmptyObject(AJAX.lockedTargets)) {
184
-            $('#lock_page_icon').html(PMA_getImage('s_lock', PMA_messages.strLockToolTip).toString());
185
-        } else {
186
-            $('#lock_page_icon').html('');
187
-        }
188
-    },
189
-    /**
190
-     * resets the lock
191
-     *
192
-     * @return void
193
-     */
194
-    resetLock: function () {
195
-        AJAX.lockedTargets = {};
196
-        $('#lock_page_icon').html('');
197
-    },
198
-    handleMenu: {
199
-        replace: function (content) {
200
-            $('#floating_menubar').html(content)
201
-                // Remove duplicate wrapper
202
-                // TODO: don't send it in the response
203
-                .children().first().remove();
204
-            $('#topmenu').menuResizer(PMA_mainMenuResizerCallback);
205
-        }
206
-    },
207
-    /**
208
-     * Event handler for clicks on links and form submissions
209
-     *
210
-     * @param object e Event data
211
-     *
212
-     * @return void
213
-     */
214
-    requestHandler: function (event) {
215
-        // In some cases we don't want to handle the request here and either
216
-        // leave the browser deal with it natively (e.g: file download)
217
-        // or leave an existing ajax event handler present elsewhere deal with it
218
-        var href = $(this).attr('href');
219
-        if (typeof event !== 'undefined' && (event.shiftKey || event.ctrlKey)) {
220
-            return true;
221
-        } else if ($(this).attr('target')) {
222
-            return true;
223
-        } else if ($(this).hasClass('ajax') || $(this).hasClass('disableAjax')) {
224
-            // reset the lockedTargets object, as specified AJAX operation has finished
225
-            AJAX.resetLock();
226
-            return true;
227
-        } else if (href && href.match(/^#/)) {
228
-            return true;
229
-        } else if (href && href.match(/^mailto/)) {
230
-            return true;
231
-        } else if ($(this).hasClass('ui-datepicker-next') ||
232
-            $(this).hasClass('ui-datepicker-prev')
233
-        ) {
234
-            return true;
235
-        }
236
-
237
-        if (typeof event !== 'undefined') {
238
-            event.preventDefault();
239
-            event.stopImmediatePropagation();
240
-        }
241
-
242
-        // triggers a confirm dialog if:
243
-        // the user has performed some operations on loaded page
244
-        // the user clicks on some link, (won't trigger for buttons)
245
-        // the click event is not triggered by script
246
-        if (typeof event !== 'undefined' && event.type === 'click' &&
247
-            event.isTrigger !== true &&
248
-            !jQuery.isEmptyObject(AJAX.lockedTargets) &&
249
-            confirm(PMA_messages.strConfirmNavigation) === false
250
-        ) {
251
-            return false;
252
-        }
253
-        AJAX.resetLock();
254
-        var isLink = !! href || false;
255
-        var previousLinkAborted = false;
256
-
257
-        if (AJAX.active === true) {
258
-            // Cancel the old request if abortable, when the user requests
259
-            // something else. Otherwise silently bail out, as there is already
260
-            // a request well in progress.
261
-            if (AJAX.xhr) {
262
-                // In case of a link request, attempt aborting
263
-                AJAX.xhr.abort();
264
-                if (AJAX.xhr.status === 0 && AJAX.xhr.statusText === 'abort') {
265
-                    // If aborted
266
-                    AJAX.$msgbox = PMA_ajaxShowMessage(PMA_messages.strAbortedRequest);
267
-                    AJAX.active = false;
268
-                    AJAX.xhr = null;
269
-                    previousLinkAborted = true;
270
-                } else {
271
-                    // If can't abort
272
-                    return false;
273
-                }
274
-            } else {
275
-                // In case submitting a form, don't attempt aborting
276
-                return false;
277
-            }
278
-        }
279
-
280
-        AJAX.source = $(this);
281
-
282
-        $('html, body').animate({ scrollTop: 0 }, 'fast');
283
-
284
-        var url = isLink ? href : $(this).attr('action');
285
-        var argsep = PMA_commonParams.get('arg_separator');
286
-        var params = 'ajax_request=true' + argsep + 'ajax_page_request=true';
287
-        var dataPost = AJAX.source.getPostData();
288
-        if (! isLink) {
289
-            params += argsep + $(this).serialize();
290
-        } else if (dataPost) {
291
-            params += argsep + dataPost;
292
-            isLink = false;
293
-        }
294
-        if (! (history && history.pushState)) {
295
-            // Add a list of menu hashes that we have in the cache to the request
296
-            params += PMA_MicroHistory.menus.getRequestParam();
297
-        }
298
-
299
-        if (AJAX._debug) {
300
-            console.log('Loading: ' + url); // no need to translate
301
-        }
302
-
303
-        if (isLink) {
304
-            AJAX.active = true;
305
-            AJAX.$msgbox = PMA_ajaxShowMessage();
306
-            // Save reference for the new link request
307
-            AJAX.xhr = $.get(url, params, AJAX.responseHandler);
308
-            if (history && history.pushState) {
309
-                var state = {
310
-                    url : href
311
-                };
312
-                if (previousLinkAborted) {
313
-                    // hack: there is already an aborted entry on stack
314
-                    // so just modify the aborted one
315
-                    history.replaceState(state, null, href);
316
-                } else {
317
-                    history.pushState(state, null, href);
318
-                }
319
-            }
320
-        } else {
321
-            /**
322
-             * Manually fire the onsubmit event for the form, if any.
323
-             * The event was saved in the jQuery data object by an onload
324
-             * handler defined below. Workaround for bug #3583316
325
-             */
326
-            var onsubmit = $(this).data('onsubmit');
327
-            // Submit the request if there is no onsubmit handler
328
-            // or if it returns a value that evaluates to true
329
-            if (typeof onsubmit !== 'function' || onsubmit.apply(this, [event])) {
330
-                AJAX.active = true;
331
-                AJAX.$msgbox = PMA_ajaxShowMessage();
332
-                $.post(url, params, AJAX.responseHandler);
333
-            }
334
-        }
335
-    },
336
-    /**
337
-     * Called after the request that was initiated by this.requestHandler()
338
-     * has completed successfully or with a caught error. For completely
339
-     * failed requests or requests with uncaught errors, see the .ajaxError
340
-     * handler at the bottom of this file.
341
-     *
342
-     * To refer to self use 'AJAX', instead of 'this' as this function
343
-     * is called in the jQuery context.
344
-     *
345
-     * @param object e Event data
346
-     *
347
-     * @return void
348
-     */
349
-    responseHandler: function (data) {
350
-        if (typeof data === 'undefined' || data === null) {
351
-            return;
352
-        }
353
-        if (typeof data.success !== 'undefined' && data.success) {
354
-            $('html, body').animate({ scrollTop: 0 }, 'fast');
355
-            PMA_ajaxRemoveMessage(AJAX.$msgbox);
356
-
357
-            if (data._redirect) {
358
-                PMA_ajaxShowMessage(data._redirect, false);
359
-                AJAX.active = false;
360
-                AJAX.xhr = null;
361
-                return;
362
-            }
363
-
364
-            AJAX.scriptHandler.reset(function () {
365
-                if (data._reloadNavigation) {
366
-                    PMA_reloadNavigation();
367
-                }
368
-                if (data._title) {
369
-                    $('title').replaceWith(data._title);
370
-                }
371
-                if (data._menu) {
372
-                    if (history && history.pushState) {
373
-                        var state = {
374
-                            url : data._selflink,
375
-                            menu : data._menu
376
-                        };
377
-                        history.replaceState(state, null);
378
-                        AJAX.handleMenu.replace(data._menu);
379
-                    } else {
380
-                        PMA_MicroHistory.menus.replace(data._menu);
381
-                        PMA_MicroHistory.menus.add(data._menuHash, data._menu);
382
-                    }
383
-                } else if (data._menuHash) {
384
-                    if (! (history && history.pushState)) {
385
-                        PMA_MicroHistory.menus.replace(PMA_MicroHistory.menus.get(data._menuHash));
386
-                    }
387
-                }
388
-                if (data._disableNaviSettings) {
389
-                    PMA_disableNaviSettings();
390
-                } else {
391
-                    PMA_ensureNaviSettings(data._selflink);
392
-                }
393
-
394
-                // Remove all containers that may have
395
-                // been added outside of #page_content
396
-                $('body').children()
397
-                    .not('#pma_navigation')
398
-                    .not('#floating_menubar')
399
-                    .not('#page_nav_icons')
400
-                    .not('#page_content')
401
-                    .not('#selflink')
402
-                    .not('#pma_header')
403
-                    .not('#pma_footer')
404
-                    .not('#pma_demo')
405
-                    .not('#pma_console_container')
406
-                    .not('#prefs_autoload')
407
-                    .remove();
408
-                // Replace #page_content with new content
409
-                if (data.message && data.message.length > 0) {
410
-                    $('#page_content').replaceWith(
411
-                        '<div id=\'page_content\'>' + data.message + '</div>'
412
-                    );
413
-                    PMA_highlightSQL($('#page_content'));
414
-                    checkNumberOfFields();
415
-                }
416
-
417
-                if (data._selflink) {
418
-                    var source = data._selflink.split('?')[0];
419
-                    // Check for faulty links
420
-                    $selflink_replace = {
421
-                        'import.php': 'tbl_sql.php',
422
-                        'tbl_chart.php': 'sql.php',
423
-                        'tbl_gis_visualization.php': 'sql.php'
424
-                    };
425
-                    if ($selflink_replace[source]) {
426
-                        var replacement = $selflink_replace[source];
427
-                        data._selflink = data._selflink.replace(source, replacement);
428
-                    }
429
-                    $('#selflink').find('> a').attr('href', data._selflink);
430
-                }
431
-                if (data._params) {
432
-                    PMA_commonParams.setAll(data._params);
433
-                }
434
-                if (data._scripts) {
435
-                    AJAX.scriptHandler.load(data._scripts);
436
-                }
437
-                if (data._selflink && data._scripts && data._menuHash && data._params) {
438
-                    if (! (history && history.pushState)) {
439
-                        PMA_MicroHistory.add(
440
-                            data._selflink,
441
-                            data._scripts,
442
-                            data._menuHash,
443
-                            data._params,
444
-                            AJAX.source.attr('rel')
445
-                        );
446
-                    }
447
-                }
448
-                if (data._displayMessage) {
449
-                    $('#page_content').prepend(data._displayMessage);
450
-                    PMA_highlightSQL($('#page_content'));
451
-                }
452
-
453
-                $('#pma_errors').remove();
454
-
455
-                var msg = '';
456
-                if (data._errSubmitMsg) {
457
-                    msg = data._errSubmitMsg;
458
-                }
459
-                if (data._errors) {
460
-                    $('<div/>', { id : 'pma_errors', class : 'clearfloat' })
461
-                        .insertAfter('#selflink')
462
-                        .append(data._errors);
463
-                    // bind for php error reporting forms (bottom)
464
-                    $('#pma_ignore_errors_bottom').on('click', function (e) {
465
-                        e.preventDefault();
466
-                        PMA_ignorePhpErrors();
467
-                    });
468
-                    $('#pma_ignore_all_errors_bottom').on('click', function (e) {
469
-                        e.preventDefault();
470
-                        PMA_ignorePhpErrors(false);
471
-                    });
472
-                    // In case of 'sendErrorReport'='always'
473
-                    // submit the hidden error reporting form.
474
-                    if (data._sendErrorAlways === '1' &&
475
-                        data._stopErrorReportLoop !== '1'
476
-                    ) {
477
-                        $('#pma_report_errors_form').submit();
478
-                        PMA_ajaxShowMessage(PMA_messages.phpErrorsBeingSubmitted, false);
479
-                        $('html, body').animate({ scrollTop:$(document).height() }, 'slow');
480
-                    } else if (data._promptPhpErrors) {
481
-                        // otherwise just prompt user if it is set so.
482
-                        msg = msg + PMA_messages.phpErrorsFound;
483
-                        // scroll to bottom where all the errors are displayed.
484
-                        $('html, body').animate({ scrollTop:$(document).height() }, 'slow');
485
-                    }
486
-                }
487
-                PMA_ajaxShowMessage(msg, false);
488
-                // bind for php error reporting forms (popup)
489
-                $('#pma_ignore_errors_popup').on('click', function () {
490
-                    PMA_ignorePhpErrors();
491
-                });
492
-                $('#pma_ignore_all_errors_popup').on('click', function () {
493
-                    PMA_ignorePhpErrors(false);
494
-                });
495
-
496
-                if (typeof AJAX._callback === 'function') {
497
-                    AJAX._callback.call();
498
-                }
499
-                AJAX._callback = function () {};
500
-            });
501
-        } else {
502
-            PMA_ajaxShowMessage(data.error, false);
503
-            AJAX.active = false;
504
-            AJAX.xhr = null;
505
-            PMA_handleRedirectAndReload(data);
506
-            if (data.fieldWithError) {
507
-                $(':input.error').removeClass('error');
508
-                $('#' + data.fieldWithError).addClass('error');
509
-            }
510
-        }
511
-    },
512
-    /**
513
-     * This object is in charge of downloading scripts,
514
-     * keeping track of what's downloaded and firing
515
-     * the onload event for them when the page is ready.
516
-     */
517
-    scriptHandler: {
518
-        /**
519
-         * @var array _scripts The list of files already downloaded
520
-         */
521
-        _scripts: [],
522
-        /**
523
-         * @var string _scriptsVersion version of phpMyAdmin from which the
524
-         *                             scripts have been loaded
525
-         */
526
-        _scriptsVersion: null,
527
-        /**
528
-         * @var array _scriptsToBeLoaded The list of files that
529
-         *                               need to be downloaded
530
-         */
531
-        _scriptsToBeLoaded: [],
532
-        /**
533
-         * @var array _scriptsToBeFired The list of files for which
534
-         *                              to fire the onload and unload events
535
-         */
536
-        _scriptsToBeFired: [],
537
-        _scriptsCompleted: false,
538
-        /**
539
-         * Records that a file has been downloaded
540
-         *
541
-         * @param string file The filename
542
-         * @param string fire Whether this file will be registering
543
-         *                    onload/teardown events
544
-         *
545
-         * @return self For chaining
546
-         */
547
-        add: function (file, fire) {
548
-            this._scripts.push(file);
549
-            if (fire) {
550
-                // Record whether to fire any events for the file
551
-                // This is necessary to correctly tear down the initial page
552
-                this._scriptsToBeFired.push(file);
553
-            }
554
-            return this;
555
-        },
556
-        /**
557
-         * Download a list of js files in one request
558
-         *
559
-         * @param array files An array of filenames and flags
560
-         *
561
-         * @return void
562
-         */
563
-        load: function (files, callback) {
564
-            var self = this;
565
-            var i;
566
-            // Clear loaded scripts if they are from another version of phpMyAdmin.
567
-            // Depends on common params being set before loading scripts in responseHandler
568
-            if (self._scriptsVersion === null) {
569
-                self._scriptsVersion = PMA_commonParams.get('PMA_VERSION');
570
-            } else if (self._scriptsVersion !== PMA_commonParams.get('PMA_VERSION')) {
571
-                self._scripts = [];
572
-                self._scriptsVersion = PMA_commonParams.get('PMA_VERSION');
573
-            }
574
-            self._scriptsCompleted = false;
575
-            self._scriptsToBeFired = [];
576
-            // We need to first complete list of files to load
577
-            // as next loop will directly fire requests to load them
578
-            // and that triggers removal of them from
579
-            // self._scriptsToBeLoaded
580
-            for (i in files) {
581
-                self._scriptsToBeLoaded.push(files[i].name);
582
-                if (files[i].fire) {
583
-                    self._scriptsToBeFired.push(files[i].name);
584
-                }
585
-            }
586
-            for (i in files) {
587
-                var script = files[i].name;
588
-                // Only for scripts that we don't already have
589
-                if ($.inArray(script, self._scripts) === -1) {
590
-                    this.add(script);
591
-                    this.appendScript(script, callback);
592
-                } else {
593
-                    self.done(script, callback);
594
-                }
595
-            }
596
-            // Trigger callback if there is nothing else to load
597
-            self.done(null, callback);
598
-        },
599
-        /**
600
-         * Called whenever all files are loaded
601
-         *
602
-         * @return void
603
-         */
604
-        done: function (script, callback) {
605
-            if (typeof ErrorReport !== 'undefined') {
606
-                ErrorReport.wrap_global_functions();
607
-            }
608
-            if ($.inArray(script, this._scriptsToBeFired)) {
609
-                AJAX.fireOnload(script);
610
-            }
611
-            if ($.inArray(script, this._scriptsToBeLoaded)) {
612
-                this._scriptsToBeLoaded.splice($.inArray(script, this._scriptsToBeLoaded), 1);
613
-            }
614
-            if (script === null) {
615
-                this._scriptsCompleted = true;
616
-            }
617
-            /* We need to wait for last signal (with null) or last script load */
618
-            AJAX.active = (this._scriptsToBeLoaded.length > 0) || ! this._scriptsCompleted;
619
-            /* Run callback on last script */
620
-            if (! AJAX.active && $.isFunction(callback)) {
621
-                callback();
622
-            }
623
-        },
624
-        /**
625
-         * Appends a script element to the head to load the scripts
626
-         *
627
-         * @return void
628
-         */
629
-        appendScript: function (name, callback) {
630
-            var head = document.head || document.getElementsByTagName('head')[0];
631
-            var script = document.createElement('script');
632
-            var self = this;
633
-
634
-            script.type = 'text/javascript';
635
-            script.src = 'js/' + name + '?' + 'v=' + encodeURIComponent(PMA_commonParams.get('PMA_VERSION'));
636
-            script.async = false;
637
-            script.onload = function () {
638
-                self.done(name, callback);
639
-            };
640
-            head.appendChild(script);
641
-        },
642
-        /**
643
-         * Fires all the teardown event handlers for the current page
644
-         * and rebinds all forms and links to the request handler
645
-         *
646
-         * @param function callback The callback to call after resetting
647
-         *
648
-         * @return void
649
-         */
650
-        reset: function (callback) {
651
-            for (var i in this._scriptsToBeFired) {
652
-                AJAX.fireTeardown(this._scriptsToBeFired[i]);
653
-            }
654
-            this._scriptsToBeFired = [];
655
-            /**
656
-             * Re-attach a generic event handler to clicks
657
-             * on pages and submissions of forms
658
-             */
659
-            $(document).off('click', 'a').on('click', 'a', AJAX.requestHandler);
660
-            $(document).off('submit', 'form').on('submit', 'form', AJAX.requestHandler);
661
-            if (! (history && history.pushState)) {
662
-                PMA_MicroHistory.update();
663
-            }
664
-            callback();
665
-        }
666
-    }
667
-};
668
-
669
-/**
670
- * Here we register a function that will remove the onsubmit event from all
671
- * forms that will be handled by the generic page loader. We then save this
672
- * event handler in the "jQuery data", so that we can fire it up later in
673
- * AJAX.requestHandler().
674
- *
675
- * See bug #3583316
676
- */
677
-AJAX.registerOnload('functions.js', function () {
678
-    // Registering the onload event for functions.js
679
-    // ensures that it will be fired for all pages
680
-    $('form').not('.ajax').not('.disableAjax').each(function () {
681
-        if ($(this).attr('onsubmit')) {
682
-            $(this).data('onsubmit', this.onsubmit).attr('onsubmit', '');
683
-        }
684
-    });
685
-
686
-    var $page_content = $('#page_content');
687
-    /**
688
-     * Workaround for passing submit button name,value on ajax form submit
689
-     * by appending hidden element with submit button name and value.
690
-     */
691
-    $page_content.on('click', 'form input[type=submit]', function () {
692
-        var buttonName = $(this).attr('name');
693
-        if (typeof buttonName === 'undefined') {
694
-            return;
695
-        }
696
-        $(this).closest('form').append($('<input/>', {
697
-            'type' : 'hidden',
698
-            'name' : buttonName,
699
-            'value': $(this).val()
700
-        }));
701
-    });
702
-
703
-    /**
704
-     * Attach event listener to events when user modify visible
705
-     * Input,Textarea and select fields to make changes in forms
706
-     */
707
-    $page_content.on(
708
-        'keyup change',
709
-        'form.lock-page textarea, ' +
710
-        'form.lock-page input[type="text"], ' +
711
-        'form.lock-page input[type="number"], ' +
712
-        'form.lock-page select',
713
-        { value:1 },
714
-        AJAX.lockPageHandler
715
-    );
716
-    $page_content.on(
717
-        'change',
718
-        'form.lock-page input[type="checkbox"], ' +
719
-        'form.lock-page input[type="radio"]',
720
-        { value:2 },
721
-        AJAX.lockPageHandler
722
-    );
723
-    /**
724
-     * Reset lock when lock-page form reset event is fired
725
-     * Note: reset does not bubble in all browser so attach to
726
-     * form directly.
727
-     */
728
-    $('form.lock-page').on('reset', function (event) {
729
-        AJAX.resetLock();
730
-    });
731
-});
732
-
733
-/**
734
- * Page load event handler
735
- */
736
-$(function () {
737
-    var menuContent = $('<div></div>')
738
-        .append($('#serverinfo').clone())
739
-        .append($('#topmenucontainer').clone())
740
-        .html();
741
-    if (history && history.pushState) {
742
-        // set initial state reload
743
-        var initState = ('state' in window.history && window.history.state !== null);
744
-        var initURL = $('#selflink').find('> a').attr('href') || location.href;
745
-        var state = {
746
-            url : initURL,
747
-            menu : menuContent
748
-        };
749
-        history.replaceState(state, null);
750
-
751
-        $(window).on('popstate', function (event) {
752
-            var initPop = (! initState && location.href === initURL);
753
-            initState = true;
754
-            // check if popstate fired on first page itself
755
-            if (initPop) {
756
-                return;
757
-            }
758
-            var state = event.originalEvent.state;
759
-            if (state && state.menu) {
760
-                AJAX.$msgbox = PMA_ajaxShowMessage();
761
-                var params = 'ajax_request=true' + PMA_commonParams.get('arg_separator') + 'ajax_page_request=true';
762
-                var url = state.url || location.href;
763
-                $.get(url, params, AJAX.responseHandler);
764
-                // TODO: Check if sometimes menu is not retrieved from server,
765
-                // Not sure but it seems menu was missing only for printview which
766
-                // been removed lately, so if it's right some dead menu checks/fallbacks
767
-                // may need to be removed from this file and Header.php
768
-                // AJAX.handleMenu.replace(event.originalEvent.state.menu);
769
-            }
770
-        });
771
-    } else {
772
-        // Fallback to microhistory mechanism
773
-        AJAX.scriptHandler
774
-            .load([{ 'name' : 'microhistory.js', 'fire' : 1 }], function () {
775
-                // The cache primer is set by the footer class
776
-                if (PMA_MicroHistory.primer.url) {
777
-                    PMA_MicroHistory.menus.add(
778
-                        PMA_MicroHistory.primer.menuHash,
779
-                        menuContent
780
-                    );
781
-                }
782
-                $(function () {
783
-                    // Queue up this event twice to make sure that we get a copy
784
-                    // of the page after all other onload events have been fired
785
-                    if (PMA_MicroHistory.primer.url) {
786
-                        PMA_MicroHistory.add(
787
-                            PMA_MicroHistory.primer.url,
788
-                            PMA_MicroHistory.primer.scripts,
789
-                            PMA_MicroHistory.primer.menuHash
790
-                        );
791
-                    }
792
-                });
793
-            });
794
-    }
795
-});
796
-
797
-/**
798
- * Attach a generic event handler to clicks
799
- * on pages and submissions of forms
800
- */
801
-$(document).on('click', 'a', AJAX.requestHandler);
802
-$(document).on('submit', 'form', AJAX.requestHandler);
803
-
804
-/**
805
- * Gracefully handle fatal server errors
806
- * (e.g: 500 - Internal server error)
807
- */
808
-$(document).ajaxError(function (event, request, settings) {
809
-    if (AJAX._debug) {
810
-        console.log('AJAX error: status=' + request.status + ', text=' + request.statusText);
811
-    }
812
-    // Don't handle aborted requests
813
-    if (request.status !== 0 || request.statusText !== 'abort') {
814
-        var details = '';
815
-        var state = request.state();
816
-
817
-        if (request.status !== 0) {
818
-            details += '<div>' + escapeHtml(PMA_sprintf(PMA_messages.strErrorCode, request.status)) + '</div>';
819
-        }
820
-        details += '<div>' + escapeHtml(PMA_sprintf(PMA_messages.strErrorText, request.statusText + ' (' + state + ')')) + '</div>';
821
-        if (state === 'rejected' || state === 'timeout') {
822
-            details += '<div>' + escapeHtml(PMA_messages.strErrorConnection) + '</div>';
823
-        }
824
-        PMA_ajaxShowMessage(
825
-            '<div class="error">' +
826
-            PMA_messages.strErrorProcessingRequest +
827
-            details +
828
-            '</div>',
829
-            false
830
-        );
831
-        AJAX.active = false;
832
-        AJAX.xhr = null;
833
-    }
834
-});

+ 0
- 349
src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/codemirror.css View File

@@ -1,349 +0,0 @@
1
-/* BASICS */
2
-
3
-.CodeMirror {
4
-  /* Set height, width, borders, and global font properties here */
5
-  font-family: monospace;
6
-  height: 300px;
7
-  color: black;
8
-  direction: ltr;
9
-}
10
-
11
-/* PADDING */
12
-
13
-.CodeMirror-lines {
14
-  padding: 4px 0; /* Vertical padding around content */
15
-}
16
-.CodeMirror pre.CodeMirror-line,
17
-.CodeMirror pre.CodeMirror-line-like {
18
-  padding: 0 4px; /* Horizontal padding of content */
19
-}
20
-
21
-.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
22
-  background-color: white; /* The little square between H and V scrollbars */
23
-}
24
-
25
-/* GUTTER */
26
-
27
-.CodeMirror-gutters {
28
-  border-right: 1px solid #ddd;
29
-  background-color: #f7f7f7;
30
-  white-space: nowrap;
31
-}
32
-.CodeMirror-linenumbers {}
33
-.CodeMirror-linenumber {
34
-  padding: 0 3px 0 5px;
35
-  min-width: 20px;
36
-  text-align: right;
37
-  color: #999;
38
-  white-space: nowrap;
39
-}
40
-
41
-.CodeMirror-guttermarker { color: black; }
42
-.CodeMirror-guttermarker-subtle { color: #999; }
43
-
44
-/* CURSOR */
45
-
46
-.CodeMirror-cursor {
47
-  border-left: 1px solid black;
48
-  border-right: none;
49
-  width: 0;
50
-}
51
-/* Shown when moving in bi-directional text */
52
-.CodeMirror div.CodeMirror-secondarycursor {
53
-  border-left: 1px solid silver;
54
-}
55
-.cm-fat-cursor .CodeMirror-cursor {
56
-  width: auto;
57
-  border: 0 !important;
58
-  background: #7e7;
59
-}
60
-.cm-fat-cursor div.CodeMirror-cursors {
61
-  z-index: 1;
62
-}
63
-.cm-fat-cursor-mark {
64
-  background-color: rgba(20, 255, 20, 0.5);
65
-  -webkit-animation: blink 1.06s steps(1) infinite;
66
-  -moz-animation: blink 1.06s steps(1) infinite;
67
-  animation: blink 1.06s steps(1) infinite;
68
-}
69
-.cm-animate-fat-cursor {
70
-  width: auto;
71
-  border: 0;
72
-  -webkit-animation: blink 1.06s steps(1) infinite;
73
-  -moz-animation: blink 1.06s steps(1) infinite;
74
-  animation: blink 1.06s steps(1) infinite;
75
-  background-color: #7e7;
76
-}
77
-@-moz-keyframes blink {
78
-  0% {}
79
-  50% { background-color: transparent; }
80
-  100% {}
81
-}
82
-@-webkit-keyframes blink {
83
-  0% {}
84
-  50% { background-color: transparent; }
85
-  100% {}
86
-}
87
-@keyframes blink {
88
-  0% {}
89
-  50% { background-color: transparent; }
90
-  100% {}
91
-}
92
-
93
-/* Can style cursor different in overwrite (non-insert) mode */
94
-.CodeMirror-overwrite .CodeMirror-cursor {}
95
-
96
-.cm-tab { display: inline-block; text-decoration: inherit; }
97
-
98
-.CodeMirror-rulers {
99
-  position: absolute;
100
-  left: 0; right: 0; top: -50px; bottom: 0;
101
-  overflow: hidden;
102
-}
103
-.CodeMirror-ruler {
104
-  border-left: 1px solid #ccc;
105
-  top: 0; bottom: 0;
106
-  position: absolute;
107
-}
108
-
109
-/* DEFAULT THEME */
110
-
111
-.cm-s-default .cm-header {color: blue;}
112
-.cm-s-default .cm-quote {color: #090;}
113
-.cm-negative {color: #d44;}
114
-.cm-positive {color: #292;}
115
-.cm-header, .cm-strong {font-weight: bold;}
116
-.cm-em {font-style: italic;}
117
-.cm-link {text-decoration: underline;}
118
-.cm-strikethrough {text-decoration: line-through;}
119
-
120
-.cm-s-default .cm-keyword {color: #708;}
121
-.cm-s-default .cm-atom {color: #219;}
122
-.cm-s-default .cm-number {color: #164;}
123
-.cm-s-default .cm-def {color: #00f;}
124
-.cm-s-default .cm-variable,
125
-.cm-s-default .cm-punctuation,
126
-.cm-s-default .cm-property,
127
-.cm-s-default .cm-operator {}
128
-.cm-s-default .cm-variable-2 {color: #05a;}
129
-.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
130
-.cm-s-default .cm-comment {color: #a50;}
131
-.cm-s-default .cm-string {color: #a11;}
132
-.cm-s-default .cm-string-2 {color: #f50;}
133
-.cm-s-default .cm-meta {color: #555;}
134
-.cm-s-default .cm-qualifier {color: #555;}
135
-.cm-s-default .cm-builtin {color: #30a;}
136
-.cm-s-default .cm-bracket {color: #997;}
137
-.cm-s-default .cm-tag {color: #170;}
138
-.cm-s-default .cm-attribute {color: #00c;}
139
-.cm-s-default .cm-hr {color: #999;}
140
-.cm-s-default .cm-link {color: #00c;}
141
-
142
-.cm-s-default .cm-error {color: #f00;}
143
-.cm-invalidchar {color: #f00;}
144
-
145
-.CodeMirror-composing { border-bottom: 2px solid; }
146
-
147
-/* Default styles for common addons */
148
-
149
-div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
150
-div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
151
-.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
152
-.CodeMirror-activeline-background {background: #e8f2ff;}
153
-
154
-/* STOP */
155
-
156
-/* The rest of this file contains styles related to the mechanics of
157
-   the editor. You probably shouldn't touch them. */
158
-
159
-.CodeMirror {
160
-  position: relative;
161
-  overflow: hidden;
162
-  background: white;
163
-}
164
-
165
-.CodeMirror-scroll {
166
-  overflow: scroll !important; /* Things will break if this is overridden */
167
-  /* 30px is the magic margin used to hide the element's real scrollbars */
168
-  /* See overflow: hidden in .CodeMirror */
169
-  margin-bottom: -30px; margin-right: -30px;
170
-  padding-bottom: 30px;
171
-  height: 100%;
172
-  outline: none; /* Prevent dragging from highlighting the element */
173
-  position: relative;
174
-}
175
-.CodeMirror-sizer {
176
-  position: relative;
177
-  border-right: 30px solid transparent;
178
-}
179
-
180
-/* The fake, visible scrollbars. Used to force redraw during scrolling
181
-   before actual scrolling happens, thus preventing shaking and
182
-   flickering artifacts. */
183
-.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
184
-  position: absolute;
185
-  z-index: 6;
186
-  display: none;
187
-}
188
-.CodeMirror-vscrollbar {
189
-  right: 0; top: 0;
190
-  overflow-x: hidden;
191
-  overflow-y: scroll;
192
-}
193
-.CodeMirror-hscrollbar {
194
-  bottom: 0; left: 0;
195
-  overflow-y: hidden;
196
-  overflow-x: scroll;
197
-}
198
-.CodeMirror-scrollbar-filler {
199
-  right: 0; bottom: 0;
200
-}
201
-.CodeMirror-gutter-filler {
202
-  left: 0; bottom: 0;
203
-}
204
-
205
-.CodeMirror-gutters {
206
-  position: absolute; left: 0; top: 0;
207
-  min-height: 100%;
208
-  z-index: 3;
209
-}
210
-.CodeMirror-gutter {
211
-  white-space: normal;
212
-  height: 100%;
213
-  display: inline-block;
214
-  vertical-align: top;
215
-  margin-bottom: -30px;
216
-}
217
-.CodeMirror-gutter-wrapper {
218
-  position: absolute;
219
-  z-index: 4;
220
-  background: none !important;
221
-  border: none !important;
222
-}
223
-.CodeMirror-gutter-background {
224
-  position: absolute;
225
-  top: 0; bottom: 0;
226
-  z-index: 4;
227
-}
228
-.CodeMirror-gutter-elt {
229
-  position: absolute;
230
-  cursor: default;
231
-  z-index: 4;
232
-}
233
-.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
234
-.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
235
-
236
-.CodeMirror-lines {
237
-  cursor: text;
238
-  min-height: 1px; /* prevents collapsing before first draw */
239
-}
240
-.CodeMirror pre.CodeMirror-line,
241
-.CodeMirror pre.CodeMirror-line-like {
242
-  /* Reset some styles that the rest of the page might have set */
243
-  -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
244
-  border-width: 0;
245
-  background: transparent;
246
-  font-family: inherit;
247
-  font-size: inherit;
248
-  margin: 0;
249
-  white-space: pre;
250
-  word-wrap: normal;
251
-  line-height: inherit;
252
-  color: inherit;
253
-  z-index: 2;
254
-  position: relative;
255
-  overflow: visible;
256
-  -webkit-tap-highlight-color: transparent;
257
-  -webkit-font-variant-ligatures: contextual;
258
-  font-variant-ligatures: contextual;
259
-}
260
-.CodeMirror-wrap pre.CodeMirror-line,
261
-.CodeMirror-wrap pre.CodeMirror-line-like {
262
-  word-wrap: break-word;
263
-  white-space: pre-wrap;
264
-  word-break: normal;
265
-}
266
-
267
-.CodeMirror-linebackground {
268
-  position: absolute;
269
-  left: 0; right: 0; top: 0; bottom: 0;
270
-  z-index: 0;
271
-}
272
-
273
-.CodeMirror-linewidget {
274
-  position: relative;
275
-  z-index: 2;
276
-  padding: 0.1px; /* Force widget margins to stay inside of the container */
277
-}
278
-
279
-.CodeMirror-widget {}
280
-
281
-.CodeMirror-rtl pre { direction: rtl; }
282
-
283
-.CodeMirror-code {
284
-  outline: none;
285
-}
286
-
287
-/* Force content-box sizing for the elements where we expect it */
288
-.CodeMirror-scroll,
289
-.CodeMirror-sizer,
290
-.CodeMirror-gutter,
291
-.CodeMirror-gutters,
292
-.CodeMirror-linenumber {
293
-  -moz-box-sizing: content-box;
294
-  box-sizing: content-box;
295
-}
296
-
297
-.CodeMirror-measure {
298
-  position: absolute;
299
-  width: 100%;
300
-  height: 0;
301
-  overflow: hidden;
302
-  visibility: hidden;
303
-}
304
-
305
-.CodeMirror-cursor {
306
-  position: absolute;
307
-  pointer-events: none;
308
-}
309
-.CodeMirror-measure pre { position: static; }
310
-
311
-div.CodeMirror-cursors {
312
-  visibility: hidden;
313
-  position: relative;
314
-  z-index: 3;
315
-}
316
-div.CodeMirror-dragcursors {
317
-  visibility: visible;
318
-}
319
-
320
-.CodeMirror-focused div.CodeMirror-cursors {
321
-  visibility: visible;
322
-}
323
-
324
-.CodeMirror-selected { background: #d9d9d9; }
325
-.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
326
-.CodeMirror-crosshair { cursor: crosshair; }
327
-.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
328
-.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
329
-
330
-.cm-searching {
331
-  background-color: #ffa;
332
-  background-color: rgba(255, 255, 0, .4);
333
-}
334
-
335
-/* Used to force a border model for a node */
336
-.cm-force-border { padding-right: .1px; }
337
-
338
-@media print {
339
-  /* Hide the cursor when printing */
340
-  .CodeMirror div.CodeMirror-cursors {
341
-    visibility: hidden;
342
-  }
343
-}
344
-
345
-/* See issue #2901 */
346
-.cm-tab-wrap-hack:after { content: ''; }
347
-
348
-/* Help users use markselection to safely style text background */
349
-span.CodeMirror-selectedtext { background: none; }

+ 0
- 9765
src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/codemirror.js
File diff suppressed because it is too large
View File


+ 0
- 550
src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/common.js View File

@@ -1,550 +0,0 @@
1
-/* vim: set expandtab sw=4 ts=4 sts=4: */
2
-
3
-$(function () {
4
-    checkNumberOfFields();
5
-});
6
-
7
-/**
8
- * Holds common parameters such as server, db, table, etc
9
- *
10
- * The content for this is normally loaded from Header.php or
11
- * Response.php and executed by ajax.js
12
- */
13
-var PMA_commonParams = (function () {
14
-    /**
15
-     * @var hash params An associative array of key value pairs
16
-     * @access private
17
-     */
18
-    var params = {};
19
-    // The returned object is the public part of the module
20
-    return {
21
-        /**
22
-         * Saves all the key value pair that
23
-         * are provided in the input array
24
-         *
25
-         * @param obj hash The input array
26
-         *
27
-         * @return void
28
-         */
29
-        setAll: function (obj) {
30
-            var reload = false;
31
-            var updateNavigation = false;
32
-            for (var i in obj) {
33
-                if (params[i] !== undefined && params[i] !== obj[i]) {
34
-                    if (i === 'db' || i === 'table') {
35
-                        updateNavigation = true;
36
-                    }
37
-                    reload = true;
38
-                }
39
-                params[i] = obj[i];
40
-            }
41
-            if (updateNavigation &&
42
-                    $('#pma_navigation_tree').hasClass('synced')
43
-            ) {
44
-                PMA_showCurrentNavigation();
45
-            }
46
-        },
47
-        /**
48
-         * Retrieves a value given its key
49
-         * Returns empty string for undefined values
50
-         *
51
-         * @param name string The key
52
-         *
53
-         * @return string
54
-         */
55
-        get: function (name) {
56
-            return params[name];
57
-        },
58
-        /**
59
-         * Saves a single key value pair
60
-         *
61
-         * @param name  string The key
62
-         * @param value string The value
63
-         *
64
-         * @return self For chainability
65
-         */
66
-        set: function (name, value) {
67
-            var updateNavigation = false;
68
-            if (name === 'db' || name === 'table' &&
69
-                params[name] !== value
70
-            ) {
71
-                updateNavigation = true;
72
-            }
73
-            params[name] = value;
74
-            if (updateNavigation &&
75
-                    $('#pma_navigation_tree').hasClass('synced')
76
-            ) {
77
-                PMA_showCurrentNavigation();
78
-            }
79
-            return this;
80
-        },
81
-        /**
82
-         * Returns the url query string using the saved parameters
83
-         *
84
-         * @return string
85
-         */
86
-        getUrlQuery: function () {
87
-            var common = this.get('common_query');
88
-            var separator = '?';
89
-            var argsep = PMA_commonParams.get('arg_separator');
90
-            if (common.length > 0) {
91
-                separator = argsep;
92
-            }
93
-            return PMA_sprintf(
94
-                '%s%sserver=%s' + argsep + 'db=%s' + argsep + 'table=%s',
95
-                this.get('common_query'),
96
-                separator,
97
-                encodeURIComponent(this.get('server')),
98
-                encodeURIComponent(this.get('db')),
99
-                encodeURIComponent(this.get('table'))
100
-            );
101
-        }
102
-    };
103
-}());
104
-
105
-/**
106
- * Holds common parameters such as server, db, table, etc
107
- *
108
- * The content for this is normally loaded from Header.php or
109
- * Response.php and executed by ajax.js
110
- */
111
-var PMA_commonActions = {
112
-    /**
113
-     * Saves the database name when it's changed
114
-     * and reloads the query window, if necessary
115
-     *
116
-     * @param new_db string new_db The name of the new database
117
-     *
118
-     * @return void
119
-     */
120
-    setDb: function (new_db) {
121
-        if (new_db !== PMA_commonParams.get('db')) {
122
-            PMA_commonParams.setAll({ 'db': new_db, 'table': '' });
123
-        }
124
-    },
125
-    /**
126
-     * Opens a database in the main part of the page
127
-     *
128
-     * @param new_db string The name of the new database
129
-     *
130
-     * @return void
131
-     */
132
-    openDb: function (new_db) {
133
-        PMA_commonParams
134
-            .set('db', new_db)
135
-            .set('table', '');
136
-        this.refreshMain(
137
-            PMA_commonParams.get('opendb_url')
138
-        );
139
-    },
140
-    /**
141
-     * Refreshes the main frame
142
-     *
143
-     * @param mixed url Undefined to refresh to the same page
144
-     *                  String to go to a different page, e.g: 'index.php'
145
-     *
146
-     * @return void
147
-     */
148
-    refreshMain: function (url, callback) {
149
-        if (! url) {
150
-            url = $('#selflink').find('a').attr('href') || window.location.pathname;
151
-            url = url.substring(0, url.indexOf('?'));
152
-        }
153
-        url += PMA_commonParams.getUrlQuery();
154
-        $('<a />', { href: url })
155
-            .appendTo('body')
156
-            .click()
157
-            .remove();
158
-        AJAX._callback = callback;
159
-    }
160
-};
161
-
162
-/**
163
- * Class to handle PMA Drag and Drop Import
164
- *      feature
165
- */
166
-PMA_DROP_IMPORT = {
167
-    /**
168
-     * @var int, count of total uploads in this view
169
-     */
170
-    uploadCount: 0,
171
-    /**
172
-     * @var int, count of live uploads
173
-     */
174
-    liveUploadCount: 0,
175
-    /**
176
-     * @var  string array, allowed extensions
177
-     */
178
-    allowedExtensions: ['sql', 'xml', 'ldi', 'mediawiki', 'shp'],
179
-    /**
180
-     * @var  string array, allowed extensions for compressed files
181
-     */
182
-    allowedCompressedExtensions: ['gz', 'bz2', 'zip'],
183
-    /**
184
-     * @var obj array to store message returned by import_status.php
185
-     */
186
-    importStatus: [],
187
-    /**
188
-     * Checks if any dropped file has valid extension or not
189
-     *
190
-     * @param file filename
191
-     *
192
-     * @return string, extension for valid extension, '' otherwise
193
-     */
194
-    _getExtension: function (file) {
195
-        var arr = file.split('.');
196
-        ext = arr[arr.length - 1];
197
-
198
-        // check if compressed
199
-        if (jQuery.inArray(ext.toLowerCase(),
200
-            PMA_DROP_IMPORT.allowedCompressedExtensions) !== -1) {
201
-            ext = arr[arr.length - 2];
202
-        }
203
-
204
-        // Now check for extension
205
-        if (jQuery.inArray(ext.toLowerCase(),
206
-            PMA_DROP_IMPORT.allowedExtensions) !== -1) {
207
-            return ext;
208
-        }
209
-        return '';
210
-    },
211
-    /**
212
-     * Shows upload progress for different sql uploads
213
-     *
214
-     * @param: hash (string), hash for specific file upload
215
-     * @param: percent (float), file upload percentage
216
-     *
217
-     * @return void
218
-     */
219
-    _setProgress: function (hash, percent) {
220
-        $('.pma_sql_import_status div li[data-hash="' + hash + '"]')
221
-            .children('progress').val(percent);
222
-    },
223
-    /**
224
-     * Function to upload the file asynchronously
225
-     *
226
-     * @param formData FormData object for a specific file
227
-     * @param hash hash of the current file upload
228
-     *
229
-     * @return void
230
-     */
231
-    _sendFileToServer: function (formData, hash) {
232
-        var uploadURL = './import.php'; // Upload URL
233
-        var extraData = {};
234
-        var jqXHR = $.ajax({
235
-            xhr: function () {
236
-                var xhrobj = $.ajaxSettings.xhr();
237
-                if (xhrobj.upload) {
238
-                    xhrobj.upload.addEventListener('progress', function (event) {
239
-                        var percent = 0;
240
-                        var position = event.loaded || event.position;
241
-                        var total = event.total;
242
-                        if (event.lengthComputable) {
243
-                            percent = Math.ceil(position / total * 100);
244
-                        }
245
-                        // Set progress
246
-                        PMA_DROP_IMPORT._setProgress(hash, percent);
247
-                    }, false);
248
-                }
249
-                return xhrobj;
250
-            },
251
-            url: uploadURL,
252
-            type: 'POST',
253
-            contentType:false,
254
-            processData: false,
255
-            cache: false,
256
-            data: formData,
257
-            success: function (data) {
258
-                PMA_DROP_IMPORT._importFinished(hash, false, data.success);
259
-                if (!data.success) {
260
-                    PMA_DROP_IMPORT.importStatus[PMA_DROP_IMPORT.importStatus.length] = {
261
-                        hash: hash,
262
-                        message: data.error
263
-                    };
264
-                }
265
-            }
266
-        });
267
-
268
-        // -- provide link to cancel the upload
269
-        $('.pma_sql_import_status div li[data-hash="' + hash +
270
-            '"] span.filesize').html('<span hash="' +
271
-            hash + '" class="pma_drop_file_status" task="cancel">' +
272
-            PMA_messages.dropImportMessageCancel + '</span>');
273
-
274
-        // -- add event listener to this link to abort upload operation
275
-        $('.pma_sql_import_status div li[data-hash="' + hash +
276
-            '"] span.filesize span.pma_drop_file_status')
277
-            .on('click', function () {
278
-                if ($(this).attr('task') === 'cancel') {
279
-                    jqXHR.abort();
280
-                    $(this).html('<span>' + PMA_messages.dropImportMessageAborted + '</span>');
281
-                    PMA_DROP_IMPORT._importFinished(hash, true, false);
282
-                } else if ($(this).children('span').html() ===
283
-                    PMA_messages.dropImportMessageFailed) {
284
-                    // -- view information
285
-                    var $this = $(this);
286
-                    $.each(PMA_DROP_IMPORT.importStatus,
287
-                        function (key, value) {
288
-                            if (value.hash === hash) {
289
-                                $('.pma_drop_result:visible').remove();
290
-                                var filename = $this.parent('span').attr('data-filename');
291
-                                $('body').append('<div class="pma_drop_result"><h2>' +
292
-                                PMA_messages.dropImportImportResultHeader + ' - ' +
293
-                                filename + '<span class="close">x</span></h2>' + value.message + '</div>');
294
-                                $('.pma_drop_result').draggable();  // to make this dialog draggable
295
-                            }
296
-                        });
297
-                }
298
-            });
299
-    },
300
-    /**
301
-     * Triggered when an object is dragged into the PMA UI
302
-     *
303
-     * @param event obj
304
-     *
305
-     * @return void
306
-     */
307
-    _dragenter : function (event) {
308
-        // We don't want to prevent users from using
309
-        // browser's default drag-drop feature on some page(s)
310
-        if ($('.noDragDrop').length !== 0) {
311
-            return;
312
-        }
313
-
314
-        event.stopPropagation();
315
-        event.preventDefault();
316
-        if (!PMA_DROP_IMPORT._hasFiles(event)) {
317
-            return;
318
-        }
319
-        if (PMA_commonParams.get('db') === '') {
320
-            $('.pma_drop_handler').html(PMA_messages.dropImportSelectDB);
321
-        } else {
322
-            $('.pma_drop_handler').html(PMA_messages.dropImportDropFiles);
323
-        }
324
-        $('.pma_drop_handler').fadeIn();
325
-    },
326
-    /**
327
-     * Check if dragged element contains Files
328
-     *
329
-     * @param event the event object
330
-     *
331
-     * @return bool
332
-     */
333
-    _hasFiles: function (event) {
334
-        return !(typeof event.originalEvent.dataTransfer.types === 'undefined' ||
335
-            $.inArray('Files', event.originalEvent.dataTransfer.types) < 0 ||
336
-            $.inArray(
337
-                'application/x-moz-nativeimage',
338
-                event.originalEvent.dataTransfer.types
339
-            ) >= 0);
340
-    },
341
-    /**
342
-     * Triggered when dragged file is being dragged over PMA UI
343
-     *
344
-     * @param event obj
345
-     *
346
-     * @return void
347
-     */
348
-    _dragover: function (event) {
349
-        // We don't want to prevent users from using
350
-        // browser's default drag-drop feature on some page(s)
351
-        if ($('.noDragDrop').length !== 0) {
352
-            return;
353
-        }
354
-
355
-        event.stopPropagation();
356
-        event.preventDefault();
357
-        if (!PMA_DROP_IMPORT._hasFiles(event)) {
358
-            return;
359
-        }
360
-        $('.pma_drop_handler').fadeIn();
361
-    },
362
-    /**
363
-     * Triggered when dragged objects are left
364
-     *
365
-     * @param event obj
366
-     *
367
-     * @return void
368
-     */
369
-    _dragleave: function (event) {
370
-        // We don't want to prevent users from using
371
-        // browser's default drag-drop feature on some page(s)
372
-        if ($('.noDragDrop').length !== 0) {
373
-            return;
374
-        }
375
-        event.stopPropagation();
376
-        event.preventDefault();
377
-        var $pma_drop_handler = $('.pma_drop_handler');
378
-        $pma_drop_handler.clearQueue().stop();
379
-        $pma_drop_handler.fadeOut();
380
-        $pma_drop_handler.html(PMA_messages.dropImportDropFiles);
381
-    },
382
-    /**
383
-     * Called when upload has finished
384
-     *
385
-     * @param string, unique hash for a certain upload
386
-     * @param bool, true if upload was aborted
387
-     * @param bool, status of sql upload, as sent by server
388
-     *
389
-     * @return void
390
-     */
391
-    _importFinished: function (hash, aborted, status) {
392
-        $('.pma_sql_import_status div li[data-hash="' + hash + '"]')
393
-            .children('progress').hide();
394
-        var icon = 'icon ic_s_success';
395
-        // -- provide link to view upload status
396
-        if (!aborted) {
397
-            if (status) {
398
-                $('.pma_sql_import_status div li[data-hash="' + hash +
399
-                   '"] span.filesize span.pma_drop_file_status')
400
-                    .html('<span>' + PMA_messages.dropImportMessageSuccess + '</a>');
401
-            } else {
402
-                $('.pma_sql_import_status div li[data-hash="' + hash +
403
-                   '"] span.filesize span.pma_drop_file_status')
404
-                    .html('<span class="underline">' + PMA_messages.dropImportMessageFailed +
405
-                   '</a>');
406
-                icon = 'icon ic_s_error';
407
-            }
408
-        } else {
409
-            icon = 'icon ic_s_notice';
410
-        }
411
-        $('.pma_sql_import_status div li[data-hash="' + hash +
412
-            '"] span.filesize span.pma_drop_file_status')
413
-            .attr('task', 'info');
414
-
415
-        // Set icon
416
-        $('.pma_sql_import_status div li[data-hash="' + hash + '"]')
417
-            .prepend('<img src="./themes/dot.gif" title="finished" class="' +
418
-            icon + '"> ');
419
-
420
-        // Decrease liveUploadCount by one
421
-        $('.pma_import_count').html(--PMA_DROP_IMPORT.liveUploadCount);
422
-        if (!PMA_DROP_IMPORT.liveUploadCount) {
423
-            $('.pma_sql_import_status h2 .close').fadeIn();
424
-        }
425
-    },
426
-    /**
427
-     * Triggered when dragged objects are dropped to UI
428
-     * From this function, the AJAX Upload operation is initiated
429
-     *
430
-     * @param event object
431
-     *
432
-     * @return void
433
-     */
434
-    _drop: function (event) {
435
-        // We don't want to prevent users from using
436
-        // browser's default drag-drop feature on some page(s)
437
-        if ($('.noDragDrop').length !== 0) {
438
-            return;
439
-        }
440
-
441
-        var dbname = PMA_commonParams.get('db');
442
-        var server = PMA_commonParams.get('server');
443
-
444
-        // if no database is selected -- no
445
-        if (dbname !== '') {
446
-            var files = event.originalEvent.dataTransfer.files;
447
-            if (!files || files.length === 0) {
448
-                // No files actually transferred
449
-                $('.pma_drop_handler').fadeOut();
450
-                event.stopPropagation();
451
-                event.preventDefault();
452
-                return;
453
-            }
454
-            $('.pma_sql_import_status').slideDown();
455
-            for (var i = 0; i < files.length; i++) {
456
-                var ext  = (PMA_DROP_IMPORT._getExtension(files[i].name));
457
-                var hash = AJAX.hash(++PMA_DROP_IMPORT.uploadCount);
458
-
459
-                var $pma_sql_import_status_div = $('.pma_sql_import_status div');
460
-                $pma_sql_import_status_div.append('<li data-hash="' + hash + '">' +
461
-                    ((ext !== '') ? '' : '<img src="./themes/dot.gif" title="invalid format" class="icon ic_s_notice"> ') +
462
-                    escapeHtml(files[i].name) + '<span class="filesize" data-filename="' +
463
-                    escapeHtml(files[i].name) + '">' + (files[i].size / 1024).toFixed(2) +
464
-                    ' kb</span></li>');
465
-
466
-                // scroll the UI to bottom
467
-                $pma_sql_import_status_div.scrollTop(
468
-                    $pma_sql_import_status_div.scrollTop() + 50
469
-                );  // 50 hardcoded for now
470
-
471
-                if (ext !== '') {
472
-                    // Increment liveUploadCount by one
473
-                    $('.pma_import_count').html(++PMA_DROP_IMPORT.liveUploadCount);
474
-                    $('.pma_sql_import_status h2 .close').fadeOut();
475
-
476
-                    $('.pma_sql_import_status div li[data-hash="' + hash + '"]')
477
-                        .append('<br><progress max="100" value="2"></progress>');
478
-
479
-                    // uploading
480
-                    var fd = new FormData();
481
-                    fd.append('import_file', files[i]);
482
-                    fd.append('noplugin', Math.random().toString(36).substring(2, 12));
483
-                    fd.append('db', dbname);
484
-                    fd.append('server', server);
485
-                    fd.append('token', PMA_commonParams.get('token'));
486
-                    fd.append('import_type', 'database');
487
-                    // todo: method to find the value below
488
-                    fd.append('MAX_FILE_SIZE', '4194304');
489
-                    // todo: method to find the value below
490
-                    fd.append('charset_of_file','utf-8');
491
-                    // todo: method to find the value below
492
-                    fd.append('allow_interrupt', 'yes');
493
-                    fd.append('skip_queries', '0');
494
-                    fd.append('format',ext);
495
-                    fd.append('sql_compatibility','NONE');
496
-                    fd.append('sql_no_auto_value_on_zero','something');
497
-                    fd.append('ajax_request','true');
498
-                    fd.append('hash', hash);
499
-
500
-                    // init uploading
501
-                    PMA_DROP_IMPORT._sendFileToServer(fd, hash);
502
-                } else if (!PMA_DROP_IMPORT.liveUploadCount) {
503
-                    $('.pma_sql_import_status h2 .close').fadeIn();
504
-                }
505
-            }
506
-        }
507
-        $('.pma_drop_handler').fadeOut();
508
-        event.stopPropagation();
509
-        event.preventDefault();
510
-    }
511
-};
512
-
513
-/**
514
- * Called when some user drags, dragover, leave
515
- *       a file to the PMA UI
516
- * @param object Event data
517
- * @return void
518
- */
519
-$(document).on('dragenter', PMA_DROP_IMPORT._dragenter);
520
-$(document).on('dragover', PMA_DROP_IMPORT._dragover);
521
-$(document).on('dragleave', '.pma_drop_handler', PMA_DROP_IMPORT._dragleave);
522
-
523
-// when file is dropped to PMA UI
524
-$(document).on('drop', 'body', PMA_DROP_IMPORT._drop);
525
-
526
-// minimizing-maximising the sql ajax upload status
527
-$(document).on('click', '.pma_sql_import_status h2 .minimize', function () {
528
-    if ($(this).attr('toggle') === 'off') {
529
-        $('.pma_sql_import_status div').css('height','270px');
530
-        $(this).attr('toggle','on');
531
-        $(this).html('-');  // to minimize
532
-    } else {
533
-        $('.pma_sql_import_status div').css('height','0px');
534
-        $(this).attr('toggle','off');
535
-        $(this).html('+');  // to maximise
536
-    }
537
-});
538
-
539
-// closing sql ajax upload status
540
-$(document).on('click', '.pma_sql_import_status h2 .close', function () {
541
-    $('.pma_sql_import_status').fadeOut(function () {
542
-        $('.pma_sql_import_status div').html('');
543
-        PMA_DROP_IMPORT.importStatus = [];  // clear the message array
544
-    });
545
-});
546
-
547
-// Closing the import result box
548
-$(document).on('click', '.pma_drop_result h2 .close', function () {
549
-    $(this).parent('h2').parent('div').remove();
550
-});

+ 0
- 886
src/main/resources/logos/localhost _ localhost _ testDBChat _ Chat1_2 | phpMyAdmin 4.9.5deb2_fichiers/config.js View File

@@ -1,886 +0,0 @@
1
-/* vim: set expandtab sw=4 ts=4 sts=4: */
2
-/**
3
- * Functions used in configuration forms and on user preferences pages
4
- */
5
-
6
-/**
7
- * checks whether browser supports web storage
8
- *
9
- * @param type the type of storage i.e. localStorage or sessionStorage
10
- *
11
- * @returns bool
12
- */
13
-function isStorageSupported (type, warn) {
14
-    try {
15
-        window[type].setItem('PMATest', 'test');
16
-        // Check whether key-value pair was set successfully
17
-        if (window[type].getItem('PMATest') === 'test') {
18
-            // Supported, remove test variable from storage
19
-            window[type].removeItem('PMATest');
20
-            return true;
21
-        }
22
-    } catch (error) {
23
-        // Not supported
24
-        if (warn) {
25
-            PMA_ajaxShowMessage(PMA_messages.strNoLocalStorage, false);
26
-        }
27
-    }
28
-    return false;
29
-}
30
-
31
-/**
32
- * Unbind all event handlers before tearing down a page
33
- */
34
-AJAX.registerTeardown('config.js', function () {
35
-    $('.optbox input[id], .optbox select[id], .optbox textarea[id]').off('change').off('keyup');
36
-    $('.optbox input[type=button][name=submit_reset]').off('click');
37
-    $('div.tabs_contents').off();
38
-    $('#import_local_storage, #export_local_storage').off('click');
39
-    $('form.prefs-form').off('change').off('submit');
40
-    $(document).off('click', 'div.click-hide-message');
41
-    $('#prefs_autoload').find('a').off('click');
42
-});
43
-
44
-AJAX.registerOnload('config.js', function () {
45
-    var $topmenu_upt = $('#topmenu2.user_prefs_tabs');
46
-    $topmenu_upt.find('li.active a').attr('rel', 'samepage');
47
-    $topmenu_upt.find('li:not(.active) a').attr('rel', 'newpage');
48
-});
49
-
50
-// default values for fields
51
-var defaultValues = {};
52
-
53
-/**
54
- * Returns field type
55
- *
56
- * @param {Element} field
57
- */
58
-function getFieldType (field) {
59
-    var $field = $(field);
60
-    var tagName = $field.prop('tagName');
61
-    if (tagName === 'INPUT') {
62
-        return $field.attr('type');
63
-    } else if (tagName === 'SELECT') {
64
-        return 'select';
65
-    } else if (tagName === 'TEXTAREA') {
66
-        return 'text';
67
-    }
68
-    return '';
69
-}
70
-
71
-/**
72
- * Enables or disables the "restore default value" button
73
- *
74
- * @param {Element} field
75
- * @param {boolean} display
76
- */
77
-function setRestoreDefaultBtn (field, display) {
78
-    var $el = $(field).closest('td').find('.restore-default img');
79
-    $el[display ? 'show' : 'hide']();
80
-}
81
-
82
-/**
83
- * Marks field depending on its value (system default or custom)
84
- *
85
- * @param {Element} field
86
- */
87
-function markField (field) {
88
-    var $field = $(field);
89
-    var type = getFieldType($field);
90
-    var isDefault = checkFieldDefault($field, type);
91
-
92
-    // checkboxes uses parent <span> for marking
93
-    var $fieldMarker = (type === 'checkbox') ? $field.parent() : $field;
94
-    setRestoreDefaultBtn($field, !isDefault);
95
-    $fieldMarker[isDefault ? 'removeClass' : 'addClass']('custom');
96
-}
97
-
98
-/**
99
- * Sets field value
100
- *
101
- * value must be of type:
102
- * o undefined (omitted) - restore default value (form default, not PMA default)
103
- * o String - if field_type is 'text'
104
- * o boolean - if field_type is 'checkbox'
105
- * o Array of values - if field_type is 'select'
106
- *
107
- * @param {Element} field
108
- * @param {String}  field_type  see {@link #getFieldType}
109
- * @param {String|Boolean}  value
110
- */
111
-function setFieldValue (field, field_type, value) {
112
-    var $field = $(field);
113
-    switch (field_type) {
114
-    case 'text':
115
-    case 'number':
116
-        $field.val(value);
117
-        break;
118
-    case 'checkbox':
119
-        $field.prop('checked', value);
120
-        break;
121
-    case 'select':
122
-        var options = $field.prop('options');
123
-        var i;
124
-        var imax = options.length;
125
-        var i, imax = options.length;
126
-        for (i = 0; i < imax; i++) {
127
-            options[i].selected = (value.indexOf(options[i].value) != -1);
128
-        }
129
-        break;
130
-    }
131
-    markField($field);
132
-}
133
-
134
-/**
135
- * Gets field value
136
- *
137
- * Will return one of:
138
- * o String - if type is 'text'
139
- * o boolean - if type is 'checkbox'
140
- * o Array of values - if type is 'select'
141
- *
142
- * @param {Element} field
143
- * @param {String}  field_type returned by {@link #getFieldType}
144
- * @type Boolean|String|String[]
145
- */
146
-function getFieldValue (field, field_type) {
147
-    var $field = $(field);
148
-    switch (field_type) {
149
-    case 'text':
150
-    case 'number':
151
-        return $field.prop('value');
152
-    case 'checkbox':
153
-        return $field.prop('checked');
154
-    case 'select':
155
-        var options = $field.prop('options');
156
-        var i;
157
-        var imax = options.length;
158
-        var items = [];
159
-        for (i = 0; i < imax; i++) {
160
-            if (options[i].selected) {
161
-                items.push(options[i].value);
162
-            }
163
-        }
164
-        return items;
165
-    }
166
-    return null;
167
-}
168
-
169
-/**
170
- * Returns values for all fields in fieldsets
171
- */
172
-function getAllValues () {
173
-    var $elements = $('fieldset input, fieldset select, fieldset textarea');
174
-    var values = {};
175
-    var type;
176
-    var value;
177
-    for (var i = 0; i < $elements.length; i++) {
178
-        type = getFieldType($elements[i]);
179
-        value = getFieldValue($elements[i], type);
180
-        if (typeof value !== 'undefined') {
181
-            // we only have single selects, fatten array
182
-            if (type === 'select') {
183
-                value = value[0];
184
-            }
185
-            values[$elements[i].name] = value;
186
-        }
187
-    }
188
-    return values;
189
-}
190
-
191
-/**
192
- * Checks whether field has its default value
193
- *
194
- * @param {Element} field
195
- * @param {String}  type
196
- * @return boolean
197
- */
198
-function checkFieldDefault (field, type) {
199
-    var $field = $(field);
200
-    var field_id = $field.attr('id');
201
-    if (typeof defaultValues[field_id] === 'undefined') {
202
-        return true;
203
-    }
204
-    var isDefault = true;
205
-    var currentValue = getFieldValue($field, type);
206
-    if (type !== 'select') {
207
-        isDefault = currentValue === defaultValues[field_id];
208
-    } else {
209
-        // compare arrays, will work for our representation of select values
210
-        if (currentValue.length !== defaultValues[field_id].length) {
211
-            isDefault = false;
212
-        } else {
213
-            for (var i = 0; i < currentValue.length; i++) {
214
-                if (currentValue[i] !== defaultValues[field_id][i]) {
215
-                    isDefault = false;
216
-                    break;
217
-                }
218
-            }
219
-        }
220
-    }
221
-    return isDefault;
222
-}
223
-
224
-/**
225
- * Returns element's id prefix
226
- * @param {Element} element
227
- */
228
-function getIdPrefix (element) {
229
-    return $(element).attr('id').replace(/[^-]+$/, '');
230
-}
231
-
232
-// ------------------------------------------------------------------
233
-// Form validation and field operations
234
-//
235
-
236
-// form validator assignments
237
-var validate = {};
238
-
239
-// form validator list
240
-var validators = {
241
-    // regexp: numeric value
242
-    _regexp_numeric: /^[0-9]+$/,
243
-    // regexp: extract parts from PCRE expression
244
-    _regexp_pcre_extract: /(.)(.*)\1(.*)?/,
245
-    /**
246
-     * Validates positive number
247
-     *
248
-     * @param {boolean} isKeyUp
249
-     */
250
-    PMA_validatePositiveNumber: function (isKeyUp) {
251
-        if (isKeyUp && this.value === '') {
252
-            return true;
253
-        }
254
-        var result = this.value !== '0' && validators._regexp_numeric.test(this.value);
255
-        return result ? true : PMA_messages.error_nan_p;
256
-    },
257
-    /**
258
-     * Validates non-negative number
259
-     *
260
-     * @param {boolean} isKeyUp
261
-     */
262
-    PMA_validateNonNegativeNumber: function (isKeyUp) {
263
-        if (isKeyUp && this.value === '') {
264
-            return true;
265
-        }
266
-        var result = validators._regexp_numeric.test(this.value);
267
-        return result ? true : PMA_messages.error_nan_nneg;
268
-    },
269
-    /**
270
-     * Validates port number
271
-     *
272
-     * @param {boolean} isKeyUp
273
-     */
274
-    PMA_validatePortNumber: function (isKeyUp) {
275
-        if (this.value === '') {
276
-            return true;
277
-        }
278
-        var result = validators._regexp_numeric.test(this.value) && this.value !== '0';
279
-        return result && this.value <= 65535 ? true : PMA_messages.error_incorrect_port;
280
-    },
281
-    /**
282
-     * Validates value according to given regular expression
283
-     *
284
-     * @param {boolean} isKeyUp
285
-     * @param {string}  regexp
286
-     */
287
-    PMA_validateByRegex: function (isKeyUp, regexp) {
288
-        if (isKeyUp && this.value === '') {
289
-            return true;
290
-        }
291
-        // convert PCRE regexp
292
-        var parts = regexp.match(validators._regexp_pcre_extract);
293
-        var valid = this.value.match(new RegExp(parts[2], parts[3])) !== null;
294
-        return valid ? true : PMA_messages.error_invalid_value;
295
-    },
296
-    /**
297
-     * Validates upper bound for numeric inputs
298
-     *
299
-     * @param {boolean} isKeyUp
300
-     * @param {int} max_value
301
-     */
302
-    PMA_validateUpperBound: function (isKeyUp, max_value) {
303
-        var val = parseInt(this.value, 10);
304
-        if (isNaN(val)) {
305
-            return true;
306
-        }
307
-        return val <= max_value ? true : PMA_sprintf(PMA_messages.error_value_lte, max_value);
308
-    },
309
-    // field validators
310
-    _field: {
311
-    },
312
-    // fieldset validators
313
-    _fieldset: {
314
-    }
315
-};
316
-
317
-/**
318
- * Registers validator for given field
319
- *
320
- * @param {String}  id       field id
321
- * @param {String}  type     validator (key in validators object)
322
- * @param {boolean} onKeyUp  whether fire on key up
323
- * @param {Array}   params   validation function parameters
324
- */
325
-function validateField (id, type, onKeyUp, params) {
326
-    if (typeof validators[type] === 'undefined') {
327
-        return;
328
-    }
329
-    if (typeof validate[id] === 'undefined') {
330
-        validate[id] = [];
331
-    }
332
-    if (validate[id].length === 0) {
333
-        validate[id].push([type, params, onKeyUp]);
334
-    }
335
-}
336
-
337
-/**
338
- * Returns validation functions associated with form field
339
- *
340
- * @param {String}  field_id     form field id
341
- * @param {boolean} onKeyUpOnly  see validateField
342
- * @type Array
343
- * @return array of [function, parameters to be passed to function]
344
- */
345
-function getFieldValidators (field_id, onKeyUpOnly) {
346
-    // look for field bound validator
347
-    var name = field_id && field_id.match(/[^-]+$/)[0];
348
-    if (typeof validators._field[name] !== 'undefined') {
349
-        return [[validators._field[name], null]];
350
-    }
351
-
352
-    // look for registered validators
353
-    var functions = [];
354
-    if (typeof validate[field_id] !== 'undefined') {
355
-        // validate[field_id]: array of [type, params, onKeyUp]
356
-        for (var i = 0, imax = validate[field_id].length; i < imax; i++) {
357
-            if (onKeyUpOnly && !validate[field_id][i][2]) {
358
-                continue;
359
-            }
360
-            functions.push([validators[validate[field_id][i][0]], validate[field_id][i][1]]);
361
-        }
362
-    }
363
-
364
-    return functions;
365
-}
366
-
367
-/**
368
- * Displays errors for given form fields
369
- *
370
- * WARNING: created DOM elements must be identical with the ones made by
371
- * PhpMyAdmin\Config\FormDisplayTemplate::displayInput()!
372
- *
373
- * @param {Object} error_list list of errors in the form {field id: error array}
374
- */
375
-function displayErrors (error_list) {
376
-    var tempIsEmpty = function (item) {
377
-        return item !== '';
378
-    };
379
-
380
-    for (var field_id in error_list) {
381
-        var errors = error_list[field_id];
382
-        var $field = $('#' + field_id);
383
-        var isFieldset = $field.attr('tagName') === 'FIELDSET';
384
-        var $errorCnt;
385
-        if (isFieldset) {
386
-            $errorCnt = $field.find('dl.errors');
387
-        } else {
388
-            $errorCnt = $field.siblings('.inline_errors');
389
-        }
390
-
391
-        // remove empty errors (used to clear error list)
392
-        errors = $.grep(errors, tempIsEmpty);
393
-
394
-        // CSS error class
395
-        if (!isFieldset) {
396
-            // checkboxes uses parent <span> for marking
397
-            var $fieldMarker = ($field.attr('type') === 'checkbox') ? $field.parent() : $field;
398
-            $fieldMarker[errors.length ? 'addClass' : 'removeClass']('field-error');
399
-        }
400
-
401
-        if (errors.length) {
402
-            // if error container doesn't exist, create it
403
-            if ($errorCnt.length === 0) {
404
-                if (isFieldset) {
405
-                    $errorCnt = $('<dl class="errors" />');
406
-                    $field.find('table').before($errorCnt);
407
-                } else {
408
-                    $errorCnt = $('<dl class="inline_errors" />');
409
-                    $field.closest('td').append($errorCnt);
410
-                }
411
-            }
412
-
413
-            var html = '';
414
-            for (var i = 0, imax = errors.length; i < imax; i++) {
415
-                html += '<dd>' + errors[i] + '</dd>';
416
-            }
417
-            $errorCnt.html(html);
418
-        } else if ($errorCnt !== null) {
419
-            // remove useless error container
420
-            $errorCnt.remove();
421
-        }
422
-    }
423
-}
424
-
425
-/**
426
- * Validates fields and fieldsets and call displayError function as required
427
- */
428
-function setDisplayError() {
429
-    var elements = $('.optbox input[id], .optbox select[id], .optbox textarea[id]');
430
-    // run all field validators
431
-    var errors = {};
432
-    for (var i = 0; i < elements.length; i++) {
433
-        validate_field(elements[i], false, errors);
434
-    }
435
-    // run all fieldset validators
436
-    $('fieldset.optbox').each(function () {
437
-        validate_fieldset(this, false, errors);
438
-    });
439
-    displayErrors(errors);
440
-}
441
-
442
-/**
443
- * Validates fieldset and puts errors in 'errors' object
444
- *
445
- * @param {Element} fieldset
446
- * @param {boolean} isKeyUp
447
- * @param {Object}  errors
448
- */
449
-function validate_fieldset (fieldset, isKeyUp, errors) {
450
-    var $fieldset = $(fieldset);
451
-    if ($fieldset.length && typeof validators._fieldset[$fieldset.attr('id')] !== 'undefined') {
452
-        var fieldset_errors = validators._fieldset[$fieldset.attr('id')].apply($fieldset[0], [isKeyUp]);
453
-        for (var field_id in fieldset_errors) {
454
-            if (typeof errors[field_id] === 'undefined') {
455
-                errors[field_id] = [];
456
-            }
457
-            if (typeof fieldset_errors[field_id] === 'string') {
458
-                fieldset_errors[field_id] = [fieldset_errors[field_id]];
459
-            }
460
-            $.merge(errors[field_id], fieldset_errors[field_id]);
461
-        }
462
-    }
463
-}
464
-
465
-/**
466
- * Validates form field and puts errors in 'errors' object
467
- *
468
- * @param {Element} field
469
- * @param {boolean} isKeyUp
470
- * @param {Object}  errors
471
- */
472
-function validate_field (field, isKeyUp, errors) {
473
-    var args;
474
-    var result;
475
-    var $field = $(field);
476
-    var field_id = $field.attr('id');
477
-    errors[field_id] = [];
478
-    var functions = getFieldValidators(field_id, isKeyUp);
479
-    for (var i = 0; i < functions.length; i++) {
480
-        if (typeof functions[i][1] !== 'undefined' && functions[i][1] !== null) {
481
-            args = functions[i][1].slice(0);
482
-        } else {
483
-            args = [];
484
-        }
485
-        args.unshift(isKeyUp);
486
-        result = functions[i][0].apply($field[0], args);
487
-        if (result !== true) {
488
-            if (typeof result === 'string') {
489
-                result = [result];
490
-            }
491
-            $.merge(errors[field_id], result);
492
-        }
493
-    }
494
-}
495
-
496
-/**
497
- * Validates form field and parent fieldset
498
- *
499
- * @param {Element} field
500
- * @param {boolean} isKeyUp
501
- */
502
-function validate_field_and_fieldset (field, isKeyUp) {
503
-    var $field = $(field);
504
-    var errors = {};
505
-    validate_field($field, isKeyUp, errors);
506
-    validate_fieldset($field.closest('fieldset.optbox'), isKeyUp, errors);
507
-    displayErrors(errors);
508
-}
509
-
510
-function loadInlineConfig () {
511
-    if (!Array.isArray(configInlineParams)) {
512
-        return;
513
-    }
514
-    for (var i = 0; i < configInlineParams.length; ++i) {
515
-        if (typeof configInlineParams[i] === 'function') {
516
-            configInlineParams[i]();
517
-        }
518
-    }
519
-}
520
-
521
-function setupValidation () {
522
-    validate = {};
523
-    configScriptLoaded = true;
524
-    if (configScriptLoaded && typeof configInlineParams !== 'undefined') {
525
-        loadInlineConfig();
526
-    }
527
-    // register validators and mark custom values
528
-    var $elements = $('.optbox input[id], .optbox select[id], .optbox textarea[id]');
529
-    $elements.each(function () {
530
-        markField(this);
531
-        var $el = $(this);
532
-        $el.on('change', function () {
533
-            validate_field_and_fieldset(this, false);
534
-            markField(this);
535
-        });
536
-        var tagName = $el.attr('tagName');
537
-        // text fields can be validated after each change
538
-        if (tagName === 'INPUT' && $el.attr('type') === 'text') {
539
-            $el.keyup(function () {
540
-                validate_field_and_fieldset($el, true);
541
-                markField($el);
542
-            });
543
-        }
544
-        // disable textarea spellcheck
545
-        if (tagName === 'TEXTAREA') {
546
-            $el.attr('spellcheck', false);
547
-        }
548
-    });
549
-
550
-    // check whether we've refreshed a page and browser remembered modified
551
-    // form values
552
-    var $check_page_refresh = $('#check_page_refresh');
553
-    if ($check_page_refresh.length === 0 || $check_page_refresh.val() === '1') {
554
-        // run all field validators
555
-        var errors = {};
556
-        for (var i = 0; i < $elements.length; i++) {
557
-            validate_field($elements[i], false, errors);
558
-        }
559
-        // run all fieldset validators
560
-        $('fieldset.optbox').each(function () {
561
-            validate_fieldset(this, false, errors);
562
-        });
563
-
564
-        displayErrors(errors);
565
-    } else if ($check_page_refresh) {
566
-        $check_page_refresh.val('1');
567
-    }
568
-}
569
-
570
-AJAX.registerOnload('config.js', function () {
571
-    setupValidation();
572
-});
573
-
574
-//
575
-// END: Form validation and field operations
576
-// ------------------------------------------------------------------
577
-
578
-// ------------------------------------------------------------------
579
-// Tabbed forms
580
-//
581
-
582
-/**
583
- * Sets active tab
584
- *
585
- * @param {String} tab_id
586
- */
587
-function setTab (tab_id) {
588
-    $('ul.tabs').each(function () {
589
-        var $this = $(this);
590
-        if (!$this.find('li a[href="#' + tab_id + '"]').length) {
591
-            return;
592
-        }
593
-        $this.find('li').removeClass('active').find('a[href="#' + tab_id + '"]').parent().addClass('active');
594
-        $this.parent().find('div.tabs_contents fieldset').hide().filter('#' + tab_id).show();
595
-        var hashValue = 'tab_' + tab_id;
596
-        location.hash = hashValue;
597
-        $this.parent().find('input[name=tab_hash]').val(hashValue);
598
-    });
599
-}
600
-
601
-function setupConfigTabs () {
602
-    var forms = $('form.config-form');
603
-    forms.each(function () {
604
-        var $this = $(this);
605
-        var $tabs = $this.find('ul.tabs');
606
-        if (!$tabs.length) {
607
-            return;
608
-        }
609
-        // add tabs events and activate one tab (the first one or indicated by location hash)
610
-        $tabs.find('li').removeClass('active');
611
-        $tabs.find('a')
612
-            .click(function (e) {
613
-                e.preventDefault();
614
-                setTab($(this).attr('href').substr(1));
615
-            })
616
-            .filter(':first')
617
-            .parent()
618
-            .addClass('active');
619
-        $this.find('div.tabs_contents fieldset').hide().filter(':first').show();
620
-    });
621
-}
622
-
623
-function adjustPrefsNotification () {
624
-    var $prefsAutoLoad = $('#prefs_autoload');
625
-    var $tableNameControl = $('#table_name_col_no');
626
-    var $prefsAutoShowing = ($prefsAutoLoad.css('display') !== 'none');
627
-
628
-    if ($prefsAutoShowing && $tableNameControl.length) {
629
-        $tableNameControl.css('top', '55px');
630
-    }
631
-}
632
-
633
-AJAX.registerOnload('config.js', function () {
634
-    setupConfigTabs();
635
-    adjustPrefsNotification();
636
-
637
-    // tab links handling, check each 200ms
638
-    // (works with history in FF, further browser support here would be an overkill)
639
-    var prev_hash;
640
-    var tab_check_fnc = function () {
641
-        if (location.hash !== prev_hash) {
642
-            prev_hash = location.hash;
643
-            if (prev_hash.match(/^#tab_[a-zA-Z0-9_]+$/)) {
644
-                // session ID is sometimes appended here
645
-                var hash = prev_hash.substr(5).split('&')[0];
646
-                if ($('#' + hash).length) {
647
-                    setTab(hash);
648
-                }
649
-            }
650
-        }
651
-    };
652
-    tab_check_fnc();
653
-    setInterval(tab_check_fnc, 200);
654
-});
655
-
656
-//
657
-// END: Tabbed forms
658
-// ------------------------------------------------------------------
659
-
660
-// ------------------------------------------------------------------
661
-// Form reset buttons
662
-//
663
-
664
-AJAX.registerOnload('config.js', function () {
665
-    $('.optbox input[type=button][name=submit_reset]').on('click', function () {
666
-        var fields = $(this).closest('fieldset').find('input, select, textarea');
667
-        for (var i = 0, imax = fields.length; i < imax; i++) {
668
-            setFieldValue(fields[i], getFieldType(fields[i]), defaultValues[fields[i].id]);
669
-        }
670
-        setDisplayError();
671
-    });
672
-});
673
-
674
-//
675
-// END: Form reset buttons
676
-// ------------------------------------------------------------------
677
-
678
-// ------------------------------------------------------------------
679
-// "Restore default" and "set value" buttons
680
-//
681
-
682
-/**
683
- * Restores field's default value
684
- *
685
- * @param {String} field_id
686
- */
687
-function restoreField (field_id) {
688
-    var $field = $('#' + field_id);
689
-    if ($field.length === 0 || defaultValues[field_id] === undefined) {
690
-        return;
691
-    }
692
-    setFieldValue($field, getFieldType($field), defaultValues[field_id]);
693
-}
694
-
695
-function setupRestoreField () {
696
-    $('div.tabs_contents')
697
-        .on('mouseenter', '.restore-default, .set-value', function () {
698
-            $(this).css('opacity', 1);
699
-        })
700
-        .on('mouseleave', '.restore-default, .set-value', function () {
701
-            $(this).css('opacity', 0.25);
702
-        })
703
-        .on('click', '.restore-default, .set-value', function (e) {
704
-            e.preventDefault();
705
-            var href = $(this).attr('href');
706
-            var field_sel;
707
-            if ($(this).hasClass('restore-default')) {
708
-                field_sel = href;
709
-                restoreField(field_sel.substr(1));
710
-            } else {
711
-                field_sel = href.match(/^[^=]+/)[0];
712
-                var value = href.match(/\=(.+)$/)[1];
713
-                setFieldValue($(field_sel), 'text', value);
714
-            }
715
-            $(field_sel).trigger('change');
716
-        })
717
-        .find('.restore-default, .set-value')
718
-        // inline-block for IE so opacity inheritance works
719
-        .css({ display: 'inline-block', opacity: 0.25 });
720
-}
721
-
722
-AJAX.registerOnload('config.js', function () {
723
-    setupRestoreField();
724
-});
725
-
726