mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-15 09:46:06 +01:00
Added logic to list fields who shouldn't be watched for changes (fixes #83)
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
var getState = function(){
|
||||
var loadValues = [];
|
||||
var loadValues = [],
|
||||
ignoreNames = ['page-filter', 'page-search'];
|
||||
$('input, select, textarea').each(function(index, element){
|
||||
var name = $(element).prop('name'),
|
||||
value = $(element).val();
|
||||
|
||||
if (name) loadValues.push(name + '|' + value);
|
||||
if (name && !~ignoreNames.indexOf(name)) loadValues.push(name + '|' + value);
|
||||
});
|
||||
|
||||
return loadValues.toString();
|
||||
|
||||
Reference in New Issue
Block a user