1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-26 15:54:34 +02:00

SQLite: Support UPDATE OF triggers

This commit is contained in:
Jakub Vrana
2014-03-15 10:58:24 -07:00
parent fc668ea326
commit 46bb56cab9
10 changed files with 40 additions and 13 deletions

View File

@@ -488,6 +488,21 @@ function indexesAddColumn(field, prefix) {
/** Handle changing trigger time or event
* @param RegExp
* @param string
* @param HTMLFormElement
*/
function triggerChange(tableRe, table, form) {
var formEvent = selectValue(form['Event']);
if (tableRe.test(form['Trigger'].value)) {
form['Trigger'].value = table + '_' + (selectValue(form['Timing']).charAt(0) + formEvent.charAt(0)).toLowerCase();
}
alterClass(form['Of'], 'hidden', formEvent != 'UPDATE OF');
}
var that, x, y; // em and tablePos defined in schema.inc.php
/** Get mouse position
@@ -565,6 +580,8 @@ function schemaMouseup(ev, db) {
}
}
var helpOpen, helpIgnore; // when mouse outs <option> then it mouse overs border of <select> - ignore it
/** Display help

View File

@@ -5,7 +5,9 @@
* @param [bool]
*/
function alterClass(el, className, enable) {
el.className = el.className.replace(RegExp('(^|\\s)' + className + '(\\s|$)'), '$2') + (enable ? ' ' + className : '');
if (el) {
el.className = el.className.replace(RegExp('(^|\\s)' + className + '(\\s|$)'), '$2') + (enable ? ' ' + className : '');
}
}
/** Toggle visibility