Commit 9c589c9a authored by ephoto_dam's avatar ephoto_dam

Ephoto Dam Field in progress

parent 7f7cd78f
......@@ -119,7 +119,9 @@
},
/**
*
* Select file
*
* @param {number} Field index
*/
selectFile: function(delta) {
this.fieldSelected = this._getFieldValues()[delta];
......@@ -127,11 +129,14 @@
if (!this.fieldSelected) {
alert(Drupal.t('Field selection error'));
return;
}
}
let size = parseInt(this.fieldSelected.size, 10);
size = (size > 1600) 1600 ? ((size < 0) ? 0 : size);
this.ephoto.File.setButtons( this.ephoto.IMAGE_FILES, [ {
'definition': 'custom',
'size': this.fieldSelected.size.toString(),
'size': size,
'dpi': 72,
'format': 'jpg',
'notEnlarge': true
......@@ -141,7 +146,7 @@
},
/**
*
* Get URL of selected file
*/
getUrl: function() {
var self = this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment