Fixed copy item in visual console
This commit is contained in:
parent
1eb509371d
commit
02d67835bd
|
@ -375,7 +375,7 @@ function update_button_palette_callback() {
|
|||
}
|
||||
|
||||
|
||||
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
if($('#preview > img').attr('naturalWidth') == null || $('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
$("#image_" + idItem).removeAttr('width');
|
||||
$("#image_" + idItem).removeAttr('height');
|
||||
$("#image_" + idItem).attr('width', 70);
|
||||
|
@ -503,7 +503,7 @@ function update_button_palette_callback() {
|
|||
}
|
||||
|
||||
|
||||
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
if($('#preview > img').attr('naturalWidth') == null || $('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
$("#image_" + idItem).removeAttr('width');
|
||||
$("#image_" + idItem).removeAttr('height');
|
||||
$("#image_" + idItem).attr('width', 70);
|
||||
|
@ -679,7 +679,7 @@ function update_button_palette_callback() {
|
|||
}
|
||||
$("#image_" + idItem).attr('src', "images/spinner.gif");
|
||||
if ((values['width'] == 0) || (values['height'] == 0)) {
|
||||
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
if($('#preview > img').attr('naturalWidth') == null || $('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
$("#image_" + idItem).removeAttr('width');
|
||||
$("#image_" + idItem).removeAttr('height');
|
||||
$("#image_" + idItem).attr('width', 70);
|
||||
|
@ -2807,7 +2807,7 @@ function createItem(type, values, id_data) {
|
|||
// Do none
|
||||
if(values['image'] != '' && values['image'] != 'none'){
|
||||
|
||||
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
if($('#preview > img').attr('naturalWidth') == null || $('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
$image.attr('width', '70')
|
||||
.attr('height', '70');
|
||||
}
|
||||
|
@ -2932,7 +2932,7 @@ function createItem(type, values, id_data) {
|
|||
|
||||
if(values['image'] != '' && values['image'] != 'none'){
|
||||
// Do none
|
||||
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
if($('#preview > img').attr('naturalWidth') == null || $('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
$image.attr('width', '70')
|
||||
.attr('height', '70');
|
||||
}
|
||||
|
@ -3030,18 +3030,15 @@ function createItem(type, values, id_data) {
|
|||
if ((values['width'] == 0) || (values['height'] == 0)) {
|
||||
// Do none
|
||||
if(values['image'] != '' && values['image'] != 'none'){
|
||||
|
||||
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
$image.attr('width', '70')
|
||||
.attr('height', '70');
|
||||
}
|
||||
else{
|
||||
$image.attr('width', $('#preview > img')[0].naturalWidth)
|
||||
.attr('height', $('#preview > img')[0].naturalHeight);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if($('#preview > img').attr('naturalWidth') == null || $('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
$image.attr('width', '70')
|
||||
.attr('height', '70');
|
||||
}
|
||||
else{
|
||||
$image.attr('width', $('#preview > img')[0].naturalWidth)
|
||||
.attr('height', $('#preview > img')[0].naturalHeight);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$image.attr('width', '70')
|
||||
.attr('height', '70');
|
||||
|
@ -3166,7 +3163,7 @@ function createItem(type, values, id_data) {
|
|||
|
||||
if(values['image'] != '' && values['image'] != 'none'){
|
||||
// Do none
|
||||
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
if($('#preview > img').attr('naturalWidth') == null || $('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
$image.attr('width', '70')
|
||||
.attr('height', '70');
|
||||
}
|
||||
|
@ -3447,7 +3444,7 @@ function createItem(type, values, id_data) {
|
|||
break;
|
||||
case 'icon':
|
||||
if ((values['width'] == 0) || (values['height'] == 0)) {
|
||||
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
if($('#preview > img').attr('naturalWidth') == null || $('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||
sizeStyle = 'width: ' + '70' + 'px; height: ' + '70' + 'px;';
|
||||
imageSize = 'width="' + '70' + '" height="' + '70' + '"';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue