plugins: RESET state now distirnguished ADD and REMOVE events, hazelnut and googlemap...
[myslice.git] / plugins / resources_selected / static / js / resources_selected.js
index 524bf62..56a49af 100644 (file)
 
             var row;
 
-            if (data.request == FIELD_REQUEST_RESET) {
-                // find line
-                // delete it
-                row = this.find_row(data.value);
-                if (row) {
-                    this.table.fnDeleteRow(row.nTr);
-                }
-                return;
-            }
-
             switch(data.request) {
+                case FIELD_REQUEST_ADD_RESET:
+                case FIELD_REQUEST_REMOVE_RESET:
+                    // find line and delete it
+                    row = this.find_row(data.value);
+                    if (row)
+                        this.table.fnDeleteRow(row.nTr);
+                    return;
                 case FIELD_REQUEST_CHANGE:
                     action = 'UPDATE';
                     break;