mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-16 02:06:08 +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 () {
|
$(function () {
|
||||||
jQuery.substitute = function(str, sub) {
|
jQuery.substitute = function(str, sub) {
|
||||||
return str.replace(/\{(.+?)\}/g, function($0, $1) {
|
return str.replace(/\{(.+?)\}/g, function($0, $1) {
|
||||||
|
|||||||
@@ -115,7 +115,7 @@
|
|||||||
this.scanned = true;
|
this.scanned = true;
|
||||||
|
|
||||||
//Refresh root.currentValues as toggleables have been initialized
|
//Refresh root.currentValues as toggleables have been initialized
|
||||||
(root || window.GravJS).currentValues = getState();
|
root.currentValues = getState();
|
||||||
};
|
};
|
||||||
|
|
||||||
Form.factories = {};
|
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(){
|
$(function(){
|
||||||
var root = window || {};
|
var root = window || {};
|
||||||
root = root.GravJS = root.GravJS || {};
|
root = root.GravJS = root.GravJS || {};
|
||||||
|
|||||||
Reference in New Issue
Block a user