Qual: Clean code to be able to update combo box when removing a box.
Qual: Opensurvey tables
This commit is contained in:
parent
08ae1d289b
commit
bb3f40a1bf
@ -165,7 +165,8 @@ class ModeleBoxes // Can't be abtract as it is instanciated to build "empty"
|
|||||||
print '</td><td class="nocellnopadd boxclose" nowrap="nowrap">';
|
print '</td><td class="nocellnopadd boxclose" nowrap="nowrap">';
|
||||||
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
|
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
|
||||||
print img_picto($langs->trans("MoveBox",$this->box_id),'grip','class="boxhandle hideonsmartphone" style="cursor:move;"');
|
print img_picto($langs->trans("MoveBox",$this->box_id),'grip','class="boxhandle hideonsmartphone" style="cursor:move;"');
|
||||||
print img_picto($langs->trans("Close",$this->box_id),'close','class="boxclose" style="cursor:pointer;" id="imgclose'.$this->box_id.'"');
|
print img_picto($langs->trans("Close",$this->box_id),'close','class="boxclose" rel="x:y" style="cursor:pointer;" id="imgclose'.$this->box_id.'"');
|
||||||
|
print '<input type="hidden" id="boxlabelentry'.$this->box_id.'" value="'.dol_escape_htmltag($head['text']).'">';
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -953,7 +953,9 @@ class FormOther
|
|||||||
jQuery(".boxclose").click(function() {
|
jQuery(".boxclose").click(function() {
|
||||||
var self = this; // because JQuery can modify this
|
var self = this; // because JQuery can modify this
|
||||||
var boxid=self.id.substring(8);
|
var boxid=self.id.substring(8);
|
||||||
|
var label=jQuery(\'#boxlabelentry\'+boxid).val();
|
||||||
jQuery(\'#boxto_\'+boxid).remove();
|
jQuery(\'#boxto_\'+boxid).remove();
|
||||||
|
// TODO Add id, label into combo list
|
||||||
updateBoxOrder(1);
|
updateBoxOrder(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
22
htdocs/install/mysql/tables/llx_opensurvey_comments.key.sql
Executable file
22
htdocs/install/mysql/tables/llx_opensurvey_comments.key.sql
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; either version 3 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
ALTER TABLE llx_opensurvey_comments ADD INDEX idx_id_comment (id_comment);
|
||||||
|
ALTER TABLE llx_opensurvey_comments ADD INDEX idx_id_sondage (id_sondage);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
25
htdocs/install/mysql/tables/llx_opensurvey_comments.sql
Executable file
25
htdocs/install/mysql/tables/llx_opensurvey_comments.sql
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; either version 3 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
CREATE TABLE llx_opensurvey_comments (
|
||||||
|
id_comment INTEGER unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
id_sondage CHAR(16) NOT NULL,
|
||||||
|
comment text NOT NULL,
|
||||||
|
tms timestamp,
|
||||||
|
usercomment text
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
19
htdocs/install/mysql/tables/llx_opensurvey_sondage.key.sql
Executable file
19
htdocs/install/mysql/tables/llx_opensurvey_sondage.key.sql
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; either version 3 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_id_sondage_admin (id_sondage_admin);
|
||||||
|
ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_date_fin (date_fin);
|
||||||
33
htdocs/install/mysql/tables/llx_opensurvey_sondage.sql
Executable file
33
htdocs/install/mysql/tables/llx_opensurvey_sondage.sql
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; either version 3 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
CREATE TABLE llx_opensurvey_sondage (
|
||||||
|
id_sondage VARCHAR(16) PRIMARY KEY,
|
||||||
|
id_sondage_admin CHAR(24),
|
||||||
|
commentaires text,
|
||||||
|
mail_admin VARCHAR(128),
|
||||||
|
nom_admin VARCHAR(64),
|
||||||
|
titre text,
|
||||||
|
date_fin datetime,
|
||||||
|
format VARCHAR(2),
|
||||||
|
mailsonde varchar(2) DEFAULT '0',
|
||||||
|
survey_link_visible integer DEFAULT 1,
|
||||||
|
canedit integer DEFAULT 0,
|
||||||
|
origin varchar(64),
|
||||||
|
tms timestamp,
|
||||||
|
sujet TEXT
|
||||||
|
) ENGINE=InnoDB;
|
||||||
20
htdocs/install/mysql/tables/llx_opensurvey_user_studs.key.sql
Executable file
20
htdocs/install/mysql/tables/llx_opensurvey_user_studs.key.sql
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; either version 3 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_id_users (id_users);
|
||||||
|
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_nom (nom);
|
||||||
|
ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_id_sondage (id_sondage);
|
||||||
24
htdocs/install/mysql/tables/llx_opensurvey_user_studs.sql
Executable file
24
htdocs/install/mysql/tables/llx_opensurvey_user_studs.sql
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
-- ============================================================================
|
||||||
|
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
--
|
||||||
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation; either version 3 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
|
CREATE TABLE llx_opensurvey_user_studs (
|
||||||
|
id_users INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
nom VARCHAR(64) NOT NULL,
|
||||||
|
id_sondage VARCHAR(16) NOT NULL,
|
||||||
|
reponses VARCHAR(100) NOT NULL,
|
||||||
|
tms timestamp
|
||||||
|
) ENGINE=InnoDB;
|
||||||
Loading…
Reference in New Issue
Block a user