Skip to content
Code-Schnipsel Gruppen Projekte
Commit b9b55be0 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

bild grössen werden gehohle und gesetzt beim bild einfügen

Übergeordneter f25146ce
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
...@@ -12,10 +12,12 @@ define([ ...@@ -12,10 +12,12 @@ define([
'require', 'require',
'controls/editors/Editor', 'controls/editors/Editor',
'Locale', 'Locale',
'Ajax',
'qui/utils/Math',
'css!package/quiqqer/ckeditor4/bin/Editor.css' 'css!package/quiqqer/ckeditor4/bin/Editor.css'
], function(require, Editor, Locale) ], function(require, Editor, Locale, Ajax, QUIMath)
{ {
"use strict"; "use strict";
...@@ -392,6 +394,15 @@ define([ ...@@ -392,6 +394,15 @@ define([
var UrlInput = UrlGroup.getElement( 'input[type="text"]' ); var UrlInput = UrlGroup.getElement( 'input[type="text"]' );
var HeightInput = this.getContentElement('info', 'txtHeight' )
.getElement().$
.getElement( 'input[type="text"]' );
var WidthInput = this.getContentElement('info', 'txtWidth' )
.getElement().$
.getElement( 'input[type="text"]' );
if ( !UrlGroup.getElement( '.qui-button' ) ) if ( !UrlGroup.getElement( '.qui-button' ) )
{ {
var Button = new Element('button', { var Button = new Element('button', {
...@@ -407,6 +418,22 @@ define([ ...@@ -407,6 +418,22 @@ define([
onSubmit : function(Win, data) onSubmit : function(Win, data)
{ {
UrlInput.value = data.url; UrlInput.value = data.url;
Ajax.get('ajax_media_details', function(fileData)
{
var result = QUIMath.resizeVar(
fileData.image_height,
fileData.image_width,
500
);
HeightInput.value = result.var1;
WidthInput.value = result.var2;
}, {
project : data.project,
fileid : data.id
});
} }
} }
}); });
...@@ -557,8 +584,7 @@ define([ ...@@ -557,8 +584,7 @@ define([
}).inject( UrlInput, 'after' ); }).inject( UrlInput, 'after' );
} }
return ev; return ev;
} }
}); });
}); });
\ No newline at end of file
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren