mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-16 10:16:07 +01:00
moved getState method in admin-all so it's always available
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
var getState = function(){
|
||||
var loadValues = [];
|
||||
$('input, select, textarea').each(function(index, element){
|
||||
var name = $(element).prop('name'),
|
||||
value = $(element).val();
|
||||
|
||||
if (name) loadValues.push(name + '|' + value);
|
||||
});
|
||||
|
||||
return loadValues.toString();
|
||||
};
|
||||
|
||||
$(function () {
|
||||
jQuery.substitute = function(str, sub) {
|
||||
return str.replace(/\{(.+?)\}/g, function($0, $1) {
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
this.scanned = true;
|
||||
|
||||
//Refresh root.currentValues as toggleables have been initialized
|
||||
(root || window.GravJS).currentValues = getState();
|
||||
root.currentValues = getState();
|
||||
};
|
||||
|
||||
Form.factories = {};
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
var getState = function(){
|
||||
var loadValues = [];
|
||||
$('input, select, textarea').each(function(index, element){
|
||||
var name = $(element).prop('name'),
|
||||
value = $(element).val();
|
||||
|
||||
if (name) loadValues.push(name + '|' + value);
|
||||
});
|
||||
|
||||
return loadValues.toString();
|
||||
};
|
||||
|
||||
$(function(){
|
||||
var root = window || {};
|
||||
root = root.GravJS = root.GravJS || {};
|
||||
|
||||
Reference in New Issue
Block a user