forked from verdnatura/hedera-web
Commit para cambiar de rama
This commit is contained in:
parent
4340980b18
commit
343ac581e9
|
@ -8,6 +8,8 @@ Vn.Photos = new Class
|
|||
this.$('schema').value = 'catalog';
|
||||
this.$('photo-size').value = 10 /* MB */ * 1048576;
|
||||
this.$('photo-id').focus ();
|
||||
this.$('html-form').action =
|
||||
'//'+ Vn.Config['image_host'] +'/hedera-web/rest.php?action=image';
|
||||
}
|
||||
|
||||
,onFormSubmit: function ()
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
<div class="box">
|
||||
<div class="body">
|
||||
<form
|
||||
id="html-form"
|
||||
method="post"
|
||||
enctype="multipart/form-data"
|
||||
action="rest.php?action=image"
|
||||
target="photos-iframe"
|
||||
on-submit="onFormSubmit">
|
||||
<div class="form-group">
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</sql-batch>
|
||||
</db-model>
|
||||
<db-model property="model" id="warehouses" auto-load="false" result-index="1" on-status-changed="onWarehousesReady">
|
||||
CALL agency_list_from_date (#date, NULL);
|
||||
CALL agency_list_from_date (#date, #address);
|
||||
SELECT a.Id_Agencia, SUBSTR(a.description, 5) description
|
||||
FROM t_agency t
|
||||
JOIN vn2008.Agencias a ON a.Id_Agencia = t.agency_id
|
||||
|
@ -43,6 +43,7 @@
|
|||
ORDER BY a.description;
|
||||
DROP TEMPORARY TABLE t_agency;
|
||||
<sql-batch property="batch">
|
||||
<item name="address" param="address"/>
|
||||
<item name="date" param="date"/>
|
||||
</sql-batch>
|
||||
</db-model>
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
Vn.include (['js/htk/widget.js']);
|
||||
Vn.resource (['js/htk/widget.js']);
|
||||
Vn.define (function () {
|
||||
*/
|
||||
/**
|
||||
* A form to handle the image database, it allows to add new images or replace it
|
||||
**/
|
||||
|
@ -11,7 +16,8 @@ Htk.ImageEditor = new Class
|
|||
this.parent (props)
|
||||
this.builderInit (this.constructor.Xml);
|
||||
this.$('max-size').value = 10 /* MB */ * 1048576;
|
||||
this.$('form').action = '//'+ Vn.Config['image_host'] +'/rest.php?action=image'
|
||||
this.$('form').action =
|
||||
'//'+ Vn.Config['image_host'] +'/hedera-web/rest.php?action=image'
|
||||
}
|
||||
|
||||
,onNameChange: function ()
|
||||
|
@ -52,3 +58,4 @@ Htk.ImageEditor = new Class
|
|||
}
|
||||
});
|
||||
|
||||
//});
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
<div id="main" class="htk-image-editor">
|
||||
<h2><t>UpdateImage</t></h2>
|
||||
<form
|
||||
id="form"
|
||||
method="post"
|
||||
target="image-editor"
|
||||
enctype="multipart/form-data"
|
||||
on-submit="onFormSubmit"
|
||||
id="form">
|
||||
on-submit="onFormSubmit">
|
||||
<div class="form-group">
|
||||
<label for="name"><t>FileName</t></label>
|
||||
<input id="name" type="text" name="name" on-change="onNameChange"/>
|
||||
|
|
|
@ -26,6 +26,35 @@ var Vn =
|
|||
}
|
||||
}
|
||||
|
||||
,onScriptLoad: function ()
|
||||
{
|
||||
// console.log (document.currentScript.src);
|
||||
|
||||
/* var scripts = document.getElementsByTagName( 'script' );
|
||||
var me = scripts[ scripts.length - 1 ];
|
||||
console.log (me.src);
|
||||
*/
|
||||
}
|
||||
|
||||
,tmpIncludes: null
|
||||
,tmpResources: null
|
||||
,tmpDefine: null
|
||||
|
||||
,include: function (includes)
|
||||
{
|
||||
this.tmpIncludes = includes;
|
||||
}
|
||||
|
||||
,resource: function (resources)
|
||||
{
|
||||
this.tmpResources = resources;
|
||||
}
|
||||
|
||||
,define: function (calback)
|
||||
{
|
||||
this.tmpDefine = callback;
|
||||
}
|
||||
|
||||
/**
|
||||
* Includes a new Javascript in the current document, if the script
|
||||
* is already included, does nothing and calls the callback.
|
||||
|
@ -91,6 +120,8 @@ var Vn =
|
|||
{
|
||||
if (includeData.loaded)
|
||||
return;
|
||||
|
||||
console.log (includeData.script.src);
|
||||
|
||||
for (var i = 0; i < includeData.callbacks.length; i++)
|
||||
includeData.callbacks[i] (success);
|
||||
|
|
Loading…
Reference in New Issue