Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.3.0.3 version #57

Merged
merged 6 commits into from
Jun 23, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update to file size calc.
  • Loading branch information
viliusle committed Jun 16, 2017
commit 067a061e35b126f0d37edd15673162a5f00afece
10 changes: 9 additions & 1 deletion js/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,11 @@ function FILE_CLASS() {
save_default = this.SAVE_TYPES[1]; //jpg

calc_size_value = 'No';
if(WIDTH * HEIGHT < 1000000)
calc_size = false;
if(WIDTH * HEIGHT < 1000000){
calc_size_value = 'Yes';
calc_size = true;
}

POP.add({name: "name", title: "File name:", value: this.SAVE_NAME});
POP.add({name: "type", title: "Save as type:", values: this.SAVE_TYPES, value: save_default, onchange: "FILE.save_dialog_onchange(this)"});
Expand All @@ -240,6 +243,11 @@ function FILE_CLASS() {
document.getElementById("pop_data_name").select();
if (e != undefined)
e.preventDefault();

if(calc_size == true){
//calc size once
this.save_dialog_onchange();
}
};

//activated on save dialog parameters change
Expand Down