Send Dolibarr-dev mailing list submissions to
address@hidden
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
or, via email, send a message with subject or body 'help' to
address@hidden
You can reach the person managing the list at
address@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Dolibarr-dev digest..."
Today's Topics:
1. Re: HTML5 (Ditto Dito)
2. SQL comment in SQL module dev / Int?gration des commentaires
SQL dans le dev des mosules (Florian HENRY)
----------------------------------------------------------------------
Message: 1
Date: Thu, 9 Jun 2011 17:30:21 +0200
From: Ditto Dito <address@hidden>
To: Posts about Dolibarr development and coding
<address@hidden>
Subject: Re: [Dolibarr-dev] HTML5
Message-ID: <address@hidden>
Content-Type: text/plain; charset="us-ascii"
Can you provide us an example on how to add a "required" property on a html field ?
<form id="someform">
<label>Name:</label> <input type="text" id="name" required="true" /><br/>
<label>Car:</label> <input type="text" id="car" required="true" /><br/>
<input type="submit" id="btnsubmit" value="Submit!" />
</form>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </archive/html/dolibarr-dev/attachments/20110609/021007d6/attachment.html>
------------------------------
Message: 2
Date: Thu, 9 Jun 2011 11:35:07 -0400
From: Florian HENRY <address@hidden>
To: address@hidden
Subject: [Dolibarr-dev] SQL comment in SQL module dev / Int?gration
des commentaires SQL dans le dev des mosules
Message-ID: <address@hidden>
Content-Type: text/plain; charset="iso-8859-1"
Bonjour,
J'ai pu remarquer que dans le developement d'un nouveau module, et que l'on
a besion de cr?e des tables, il n'est pas possible de faire fichier de cette
forme :
create table llx_table
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
label varchar(128) NOT NULL, -- comment 1
datec datetime, -- comment 2
tms timestamp, -- comment 3
fk_user_author integer, -- comment 4
}
les commentaires sont int?gr? dans le buffer d'execution et il sont refuser.
Je propose d'int?gr? cette modification dans htdocs/lib/admin.lib.php
Dans le function run_sql juste apr?s le test qui valide que la ligne ne
commence pas par un commentaire :
// Add line buf to buffer if not a comment
if (! preg_match('/^--/',$buf))
{
* //remove comment from a line that not start with --
before add it to the buffer
if (preg_match('/--/',$buf))
{
$buf = substr($buf,0,strpos($buf, '-'));
}*
$buffer .= trim($buf);
}
Dites moi ce que vous en pensez ?
Cordialement
Henry Florian
----------------------------
Hello
I notice during the new module devloepement and if we need to create table,
it's not possible to write the SQL file like that
create table llx_table
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
label varchar(128) NOT NULL, -- comment 1
datec datetime, -- comment 2
tms timestamp, -- comment 3
fk_user_author integer, -- comment 4
}
Comment at the end of the line are integrated into the execution buffer and
they are interpreted as invalid instructions
I suggest a modification in htdocs/lib/admin.lib.php
In function run_sql juste just after the test "Add line buf to buffer if not
a comment" :
// Add line buf to buffer if not a comment
if (! preg_match('/^--/',$buf))
{
*//remove comment from a line that not start with --
before add it to the buffer
if (preg_match('/--/',$buf))
{
$buf = substr($buf,0,strpos($buf, '-'));
}
* $buffer .= trim($buf);
}
What do you think about ?
Kind regards
Henry Florian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </archive/html/dolibarr-dev/attachments/20110609/6a37ffa6/attachment.html>
------------------------------
_______________________________________________
Dolibarr-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
End of Dolibarr-dev Digest, Vol 99, Issue 9
*******************************************