1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-15 03:05:26 +02:00
This commit is contained in:
Ryan Cramer
2019-10-25 10:53:50 -04:00
parent 063203af26
commit 7544e0b56f
2 changed files with 13 additions and 6 deletions

View File

@@ -1452,9 +1452,17 @@ function InputfieldImage($) {
// setup default values
if(typeof data[name] == "undefined") data[name] = {};
if(typeof data[name].size == "undefined") data[name].size = parseInt($inputfield.find('.gridImages').attr('data-size'));
if(typeof data[name].listSize == "undefined") data[name].listSize = 23;
if(typeof data[name].mode == "undefined") data[name].mode = $inputfield.find('.gridImages').attr('data-gridMode');
if(typeof data[name].size == "undefined" || !data[name].size) {
data[name].size = parseInt($inputfield.find('.gridImages').attr('data-size'));
if(!data[name].size) data[name].size = 130;
}
if(typeof data[name].listSize == "undefined" || !data[name].listSize) {
data[name].listSize = 23;
}
if(typeof data[name].mode == "undefined" || !data[name].mode) {
data[name].mode = $inputfield.find('.gridImages').attr('data-gridMode');
if(!data[name].mode) data[name].mode = 'list';
}
//if(typeof data[name].ragged == "undefined") data[name].ragged = $inputfield.find('.gridImages').attr('data-ragged') ? true : false;
if(cookieData == null) cookieData = data; // cache
@@ -1471,8 +1479,7 @@ function InputfieldImage($) {
value = data[name][property];
}
//console.log('getCookieData(' + property + ') ...');
//console.log(value);
// console.log(name + ' getCookieData(' + property + '): ' + value);
return value;
}

File diff suppressed because one or more lines are too long